@zenuml/core 3.25.4 → 3.27.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.
@@ -1,4 +1,4 @@
1
- import { o as c, c as e, a as o } from "./core.16f7d885.js";
1
+ import { o as c, c as e, a as o } from "./core.9195c008.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.9db8778e.js.map
23
+ //# sourceMappingURL=zoom-in.0f34cde4.js.map
@@ -1,4 +1,4 @@
1
- import { o as t, c, a as o } from "./core.16f7d885.js";
1
+ import { o as t, c, a as o } from "./core.9195c008.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.57ea6bf4.js.map
23
+ //# sourceMappingURL=zoom-out.547dc3be.js.map
package/index.html CHANGED
@@ -115,7 +115,7 @@
115
115
  timer = setTimeout(() => {
116
116
  const theme =
117
117
  localStorage.getItem(`${location.hostname}-zenuml-theme`) ||
118
- "theme-idle-afternoon";
118
+ "theme-default";
119
119
  window.zenUml
120
120
  .render(cm.getValue(), {
121
121
  theme,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenuml/core",
3
- "version": "3.25.4",
3
+ "version": "3.27.0",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "repository": {
package/vite.config.js CHANGED
@@ -3,6 +3,7 @@ import { defineConfig } from "vite";
3
3
  import createVuePlugin from "@vitejs/plugin-vue";
4
4
  import { execSync } from "child_process";
5
5
  import svgLoader from "vite-svg-loader";
6
+ import { readFileSync } from "fs";
6
7
 
7
8
  process.env.VITE_APP_GIT_HASH = process.env.DOCKER
8
9
  ? ""
@@ -11,6 +12,11 @@ process.env.VITE_APP_GIT_BRANCH = process.env.DOCKER
11
12
  ? ""
12
13
  : execSync("git branch --show-current").toString().trim();
13
14
 
15
+ // Read version from package.json
16
+ const packageJson = JSON.parse(
17
+ readFileSync(resolve(__dirname, "package.json"), "utf-8"),
18
+ );
19
+
14
20
  function getCypressHtmlFiles() {
15
21
  const cypressFolder = resolve(__dirname, "cy");
16
22
  const strings = execSync(`find ${cypressFolder} -name '*.html'`)
@@ -49,6 +55,9 @@ export default defineConfig(({ mode }) => ({
49
55
  }),
50
56
  svgLoader(),
51
57
  ],
58
+ define: {
59
+ "import.meta.env.PACKAGE_VERSION": JSON.stringify(packageJson.version),
60
+ },
52
61
  test: {
53
62
  // used by vitest: https://vitest.dev/guide/#configuring-vitest
54
63
  environment: "jsdom",
@@ -4,6 +4,12 @@ import { defineConfig } from "vite";
4
4
  import createVuePlugin from "@vitejs/plugin-vue";
5
5
  import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js";
6
6
  import svgLoader from "vite-svg-loader";
7
+ import { readFileSync } from "fs";
8
+
9
+ // Read version from package.json
10
+ const packageJson = JSON.parse(
11
+ readFileSync(resolve(__dirname, "package.json"), "utf-8"),
12
+ );
7
13
 
8
14
  export default defineConfig({
9
15
  build: {
@@ -57,5 +63,7 @@ export default defineConfig({
57
63
  ],
58
64
  define: {
59
65
  "process.env.NODE_ENV": '"production"',
66
+ // Replace version placeholder during build
67
+ "import.meta.env.PACKAGE_VERSION": JSON.stringify(packageJson.version),
60
68
  },
61
69
  });