@zenuml/core 3.27.10 → 3.27.12
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/{StylePanel.4c7e384c.js → StylePanel.1d5cdf4e.js} +2 -2
- package/dist/{close.2f92c7c3.js → close.8e1a8f43.js} +2 -2
- package/dist/{collapse-expanded.6c2f6324.js → collapse-expanded.3a026466.js} +2 -2
- package/dist/{collapse-unexpanded.57d93176.js → collapse-unexpanded.028788c0.js} +2 -2
- package/dist/{core.5d747191.js → core.d2435cf8.js} +9 -9
- package/dist/{debug.c3cbb606.js → debug.71f96b5f.js} +2 -2
- package/dist/{message-arrow.9c4f220c.js → message-arrow.8538bb49.js} +2 -2
- package/dist/{non-selected-cycle.5890f028.js → non-selected-cycle.028fa6a9.js} +2 -2
- package/dist/{numbering.b9b738ad.js → numbering.be93c905.js} +2 -2
- package/dist/{privacy.d2c8e4c9.js → privacy.0c4d8726.js} +2 -2
- package/dist/{selected-cycle.26c07248.js → selected-cycle.f9c7ae90.js} +2 -2
- package/dist/{theme.0d111179.js → theme.6275f9f3.js} +2 -2
- package/dist/{tip.06c2c1c7.js → tip.e1cca752.js} +2 -2
- package/dist/zenuml.esm.mjs +2 -2
- package/dist/zenuml.js +4 -4
- package/dist/{zoom-in.c8fc5e0f.js → zoom-in.51811ef7.js} +2 -2
- package/dist/{zoom-out.32596871.js → zoom-out.4f76068f.js} +2 -2
- package/index.html +24 -47
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as c, c as e, a as o } from "./core.
|
|
1
|
+
import { o as c, c as e, a as o } from "./core.d2435cf8.js";
|
|
2
2
|
const s = {
|
|
3
3
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4
4
|
viewBox: "0 0 1024 1024"
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
_ as default,
|
|
21
21
|
l as render
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=zoom-in.
|
|
23
|
+
//# sourceMappingURL=zoom-in.51811ef7.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as t, c, a as o } from "./core.
|
|
1
|
+
import { o as t, c, a as o } from "./core.d2435cf8.js";
|
|
2
2
|
const e = {
|
|
3
3
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4
4
|
viewBox: "0 0 1024 1024"
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
h as default,
|
|
21
21
|
s as render
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=zoom-out.
|
|
23
|
+
//# sourceMappingURL=zoom-out.4f76068f.js.map
|
package/index.html
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
as="style"
|
|
8
8
|
href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@300;400;500;700&display=swap"
|
|
9
9
|
/>
|
|
10
|
-
<!-- <link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@300;400;500;700&display=swap'>-->
|
|
11
10
|
<style id="zenumlstyle">
|
|
12
11
|
/* Prefix your CSS rules with `#diagram` */
|
|
13
12
|
/*@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&display=swap');*/
|
|
@@ -79,70 +78,48 @@
|
|
|
79
78
|
class="col-span-1 m-1 border-2"
|
|
80
79
|
cols="30"
|
|
81
80
|
rows="200"
|
|
82
|
-
oninput="updateCode(this.value)"
|
|
83
81
|
></textarea>
|
|
84
82
|
</div>
|
|
85
83
|
<div class="col-span-4">
|
|
86
84
|
<pre class="zenuml" style="margin: 0"></pre>
|
|
87
85
|
</div>
|
|
88
86
|
</div>
|
|
89
|
-
<script>
|
|
87
|
+
<script type="module">
|
|
88
|
+
import { waitUntil, debounce } from "./src/utils.ts";
|
|
89
|
+
import { createConfig } from "./src/config.ts";
|
|
90
|
+
|
|
90
91
|
const editor = CodeMirror.fromTextArea(document.getElementById("text"), {
|
|
91
92
|
lineNumbers: true,
|
|
92
93
|
singleCursorHeightPerLine: false,
|
|
93
94
|
});
|
|
94
95
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
96
|
+
const updateDiagram = debounce((content) => {
|
|
97
|
+
const config = createConfig({
|
|
98
|
+
onContentChange: (code) => editor.setValue(code),
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
window.zenUml.render(content, config).then((r) => {
|
|
102
|
+
window.parentLogger
|
|
103
|
+
.child({ name: "index.html" })
|
|
104
|
+
.debug("render resolved", r);
|
|
105
|
+
});
|
|
106
|
+
}, 500);
|
|
105
107
|
|
|
106
108
|
editor.on("change", function (cm) {
|
|
107
109
|
waitUntil(
|
|
110
|
+
() => window.zenUml,
|
|
108
111
|
() => {
|
|
109
|
-
|
|
112
|
+
updateDiagram(cm.getValue());
|
|
113
|
+
// Save to localStorage
|
|
114
|
+
localStorage.setItem("zenuml-cm-code", cm.getValue());
|
|
110
115
|
},
|
|
111
|
-
(() => {
|
|
112
|
-
let timer = 0;
|
|
113
|
-
return () => {
|
|
114
|
-
clearTimeout(timer);
|
|
115
|
-
timer = setTimeout(() => {
|
|
116
|
-
const theme =
|
|
117
|
-
localStorage.getItem(`${location.hostname}-zenuml-theme`) ||
|
|
118
|
-
"theme-default";
|
|
119
|
-
window.zenUml
|
|
120
|
-
.render(cm.getValue(), {
|
|
121
|
-
theme,
|
|
122
|
-
onContentChange: (code) => editor.setValue(code),
|
|
123
|
-
onThemeChange: ({ theme }) => {
|
|
124
|
-
localStorage.setItem(
|
|
125
|
-
`${location.hostname}-zenuml-theme`,
|
|
126
|
-
theme,
|
|
127
|
-
);
|
|
128
|
-
},
|
|
129
|
-
})
|
|
130
|
-
.then((r) => {
|
|
131
|
-
window.parentLogger
|
|
132
|
-
.child({ name: "index.html" })
|
|
133
|
-
.debug("render resolved", r);
|
|
134
|
-
});
|
|
135
|
-
}, 500);
|
|
136
|
-
};
|
|
137
|
-
})(),
|
|
138
116
|
);
|
|
139
|
-
// write cm.getValue() to localStorage
|
|
140
|
-
localStorage.setItem("zenuml-cm-code", cm.getValue());
|
|
141
117
|
});
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
118
|
+
|
|
119
|
+
// Load saved code from localStorage
|
|
120
|
+
const savedCode = localStorage.getItem("zenuml-cm-code");
|
|
121
|
+
if (savedCode) {
|
|
122
|
+
editor.setValue(savedCode);
|
|
146
123
|
}
|
|
147
124
|
</script>
|
|
148
125
|
<script type="module" src="./src/main.ts"></script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenuml/core",
|
|
3
|
-
"version": "3.27.
|
|
3
|
+
"version": "3.27.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"pino": "^8.8.0",
|
|
61
61
|
"postcss": "^8.4.31",
|
|
62
62
|
"ramda": "^0.28.0",
|
|
63
|
-
"tailwindcss": "^3.
|
|
63
|
+
"tailwindcss": "^3.4.17",
|
|
64
64
|
"vue": "^3.2.45",
|
|
65
65
|
"vuex": "^4.1.0"
|
|
66
66
|
},
|