@zenuml/core 3.8.5 → 3.9.0
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/.eslintrc.js +4 -1
- package/dist/StylePanel.1cb79e61.js +1737 -0
- package/dist/core.0ce2e684.js +33644 -0
- package/dist/zenuml.esm.mjs +4 -33565
- package/dist/zenuml.js +60 -55
- package/index.html +45 -30
- package/package.json +3 -1
- package/pnpm-lock.yaml +549 -604
- package/vite.config.js +3 -2
- package/vite.config.lib.js +1 -8
package/index.html
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!doctype html>
|
|
2
2
|
<html>
|
|
3
|
-
<head>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
<head>
|
|
4
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
5
|
+
<link
|
|
6
|
+
rel="preload stylesheet"
|
|
7
|
+
as="style"
|
|
8
|
+
href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@300;400;500;700&display=swap"
|
|
9
|
+
/>
|
|
10
|
+
<!-- <link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@300;400;500;700&display=swap'>-->
|
|
11
|
+
<style id="zenumlstyle">
|
|
12
|
+
/* Prefix your CSS rules with `#diagram` */
|
|
13
|
+
/*@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&display=swap');*/
|
|
14
|
+
/*!*@import url("https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@300;400;500;700&display=swap");*!*/
|
|
15
15
|
|
|
16
16
|
/*#diagram1 .sequence-diagram {*/
|
|
17
17
|
/* font-family: "Kalam", serif;*/
|
|
@@ -35,35 +35,41 @@
|
|
|
35
35
|
/>
|
|
36
36
|
<title>ZenUML Core Demo</title>
|
|
37
37
|
<style>
|
|
38
|
-
.
|
|
38
|
+
.CodeMirror {
|
|
39
39
|
/* Set height, width, borders, and global font properties here */
|
|
40
40
|
font-family: monospace;
|
|
41
41
|
font-size: 13px;
|
|
42
|
-
height:
|
|
42
|
+
height: 1000px;
|
|
43
43
|
}
|
|
44
|
+
|
|
44
45
|
.zenuml .CodeMirror .CodeMirror-cursor {
|
|
45
46
|
border-color: #000;
|
|
46
47
|
border-left-width: 1px;
|
|
47
48
|
}
|
|
49
|
+
|
|
48
50
|
.grid {
|
|
49
51
|
display: grid;
|
|
50
52
|
}
|
|
53
|
+
|
|
51
54
|
.grid-cols-6 {
|
|
52
55
|
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
53
56
|
}
|
|
57
|
+
|
|
54
58
|
.col-span-2 {
|
|
55
59
|
grid-column: span 2 / span 2;
|
|
56
60
|
}
|
|
61
|
+
|
|
57
62
|
.col-span-4 {
|
|
58
63
|
grid-column: span 4 / span 4;
|
|
59
64
|
}
|
|
60
65
|
</style>
|
|
61
66
|
</head>
|
|
67
|
+
|
|
62
68
|
<body>
|
|
63
69
|
<noscript>
|
|
64
70
|
<strong
|
|
65
|
-
>We're sorry but vue-sequence doesn't work properly without JavaScript
|
|
66
|
-
enable it to continue.</strong
|
|
71
|
+
>We're sorry but vue-sequence doesn't work properly without JavaScript
|
|
72
|
+
enabled. Please enable it to continue.</strong
|
|
67
73
|
>
|
|
68
74
|
</noscript>
|
|
69
75
|
<div class="m-1 grid grid-cols-6" id="diagram1">
|
|
@@ -77,11 +83,11 @@
|
|
|
77
83
|
></textarea>
|
|
78
84
|
</div>
|
|
79
85
|
<div class="col-span-4">
|
|
80
|
-
<pre class="zenuml" style="margin:0
|
|
86
|
+
<pre class="zenuml" style="margin: 0"></pre>
|
|
81
87
|
</div>
|
|
82
88
|
</div>
|
|
83
89
|
<script>
|
|
84
|
-
const editor = CodeMirror.fromTextArea(document.getElementById(
|
|
90
|
+
const editor = CodeMirror.fromTextArea(document.getElementById("text"), {
|
|
85
91
|
lineNumbers: true,
|
|
86
92
|
singleCursorHeightPerLine: false,
|
|
87
93
|
});
|
|
@@ -97,29 +103,38 @@
|
|
|
97
103
|
}
|
|
98
104
|
}
|
|
99
105
|
|
|
100
|
-
editor.on(
|
|
106
|
+
editor.on("change", function (cm) {
|
|
101
107
|
waitUntil(
|
|
102
108
|
() => {
|
|
103
109
|
return window.zenUml;
|
|
104
110
|
},
|
|
105
111
|
(() => {
|
|
106
|
-
let timer = 0
|
|
112
|
+
let timer = 0;
|
|
107
113
|
return () => {
|
|
108
|
-
clearTimeout(timer)
|
|
114
|
+
clearTimeout(timer);
|
|
109
115
|
timer = setTimeout(() => {
|
|
110
|
-
const theme =
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
+
})
|
|
124
|
+
.then((r) => {
|
|
125
|
+
window.parentLogger
|
|
126
|
+
.child({ name: "index.html" })
|
|
127
|
+
.debug("render resolved", r);
|
|
128
|
+
});
|
|
114
129
|
}, 500);
|
|
115
|
-
}
|
|
116
|
-
})()
|
|
130
|
+
};
|
|
131
|
+
})(),
|
|
117
132
|
);
|
|
118
133
|
// write cm.getValue() to localStorage
|
|
119
|
-
localStorage.setItem(
|
|
134
|
+
localStorage.setItem("zenuml-cm-code", cm.getValue());
|
|
120
135
|
});
|
|
121
136
|
// read localStorage and set to code mirror
|
|
122
|
-
const code = localStorage.getItem(
|
|
137
|
+
const code = localStorage.getItem("zenuml-cm-code");
|
|
123
138
|
if (code) {
|
|
124
139
|
editor.setValue(code);
|
|
125
140
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenuml/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"*.{js,ts,vue,json,htm,html}": "eslint --fix"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
+
"@headlessui-float/vue": "^0.11.3",
|
|
41
42
|
"@headlessui/tailwindcss": "^0.2.0",
|
|
42
43
|
"@headlessui/vue": "^1.7.16",
|
|
43
44
|
"@types/assert": "^1.5.6",
|
|
@@ -77,6 +78,7 @@
|
|
|
77
78
|
"cypress-plugin-snapshots": "^1.4.4",
|
|
78
79
|
"eslint": "^8.30.0",
|
|
79
80
|
"eslint-config-prettier": "^9.0.0",
|
|
81
|
+
"eslint-plugin-html": "^7.1.0",
|
|
80
82
|
"eslint-plugin-prettier": "^5.0.0",
|
|
81
83
|
"eslint-plugin-vue": "^9.17.0",
|
|
82
84
|
"global-jsdom": "^8.6.0",
|