@zenuml/core 3.4.1 → 3.6.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.
@@ -62,7 +62,7 @@
62
62
  enable it to continue.</strong
63
63
  >
64
64
  </noscript>
65
- <div class="m-1 grid grid-cols-6" id="diagram1">
65
+ <div class="m-1 grid grid-cols-6" id="diagram1" style="padding-top: 100px;">
66
66
  <div class="col-span-2">
67
67
  <textarea
68
68
  id="text"
package/index.html CHANGED
@@ -1,17 +1,17 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
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");*!*/
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;*/
@@ -41,6 +41,10 @@
41
41
  font-size: 13px;
42
42
  height: 800px;
43
43
  }
44
+ .zenuml .CodeMirror .CodeMirror-cursor {
45
+ border-color: #000;
46
+ border-left-width: 1px;
47
+ }
44
48
  .grid {
45
49
  display: grid;
46
50
  }
@@ -103,7 +107,8 @@
103
107
  return () => {
104
108
  clearTimeout(timer)
105
109
  timer = setTimeout(() => {
106
- window.zenUml.render(cm.getValue(), {theme: 'theme-default'}).then((r) => {
110
+ const theme = localStorage.getItem(`${location.hostname}-zenuml-theme`) || 'theme-default'
111
+ window.zenUml.render(cm.getValue(), {theme}).then((r) => {
107
112
  window.parentLogger.child({ name: 'index.html' }).debug('render resolved', r);
108
113
  });
109
114
  }, 500);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenuml/core",
3
- "version": "3.4.1",
3
+ "version": "3.6.0",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -33,6 +33,8 @@
33
33
  "module": "./dist/zenuml.esm.mjs",
34
34
  "types": "./types/index.d.ts",
35
35
  "dependencies": {
36
+ "@headlessui/tailwindcss": "^0.2.0",
37
+ "@headlessui/vue": "^1.7.16",
36
38
  "@types/assert": "^1.5.4",
37
39
  "@types/ramda": "^0.28.0",
38
40
  "@vue/compat": "^3.2.45",
package/pnpm-lock.yaml CHANGED
@@ -5,6 +5,12 @@ settings:
5
5
  excludeLinksFromLockfile: false
6
6
 
7
7
  dependencies:
8
+ '@headlessui/tailwindcss':
9
+ specifier: ^0.2.0
10
+ version: 0.2.0(tailwindcss@3.2.4)
11
+ '@headlessui/vue':
12
+ specifier: ^1.7.16
13
+ version: 1.7.16(vue@3.2.45)
8
14
  '@types/assert':
9
15
  specifier: ^1.5.4
10
16
  version: 1.5.6
@@ -75,7 +81,7 @@ devDependencies:
75
81
  version: 4.14.191
76
82
  '@types/node':
77
83
  specifier: latest
78
- version: 20.4.6
84
+ version: 20.5.1
79
85
  '@typescript-eslint/eslint-plugin':
80
86
  specifier: ^5.46.1
81
87
  version: 5.46.1(@typescript-eslint/parser@5.46.1)(eslint@8.30.0)(typescript@4.9.4)
@@ -141,13 +147,13 @@ devDependencies:
141
147
  version: 3.1.0(webpack@5.85.0)
142
148
  ts-node:
143
149
  specifier: ^10.9.1
144
- version: 10.9.1(@types/node@20.4.6)(typescript@4.9.4)
150
+ version: 10.9.1(@types/node@20.5.1)(typescript@4.9.4)
145
151
  typescript:
146
152
  specifier: ^4.7.4
147
153
  version: 4.9.4
148
154
  vite:
149
155
  specifier: ^3.2.3
150
- version: 3.2.5(@types/node@20.4.6)(less@4.1.3)(sass@1.57.0)
156
+ version: 3.2.5(@types/node@20.5.1)(less@4.1.3)(sass@1.57.0)
151
157
  vite-plugin-css-injected-by-js:
152
158
  specifier: ^2.2.0
153
159
  version: 2.2.0(vite@3.2.5)
@@ -1728,6 +1734,24 @@ packages:
1728
1734
  resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==}
1729
1735
  dev: true
1730
1736
 
1737
+ /@headlessui/tailwindcss@0.2.0(tailwindcss@3.2.4):
1738
+ resolution: {integrity: sha512-fpL830Fln1SykOCboExsWr3JIVeQKieLJ3XytLe/tt1A0XzqUthOftDmjcCYLW62w7mQI7wXcoPXr3tZ9QfGxw==}
1739
+ engines: {node: '>=10'}
1740
+ peerDependencies:
1741
+ tailwindcss: ^3.0
1742
+ dependencies:
1743
+ tailwindcss: 3.2.4(postcss@8.4.20)(ts-node@10.9.1)
1744
+ dev: false
1745
+
1746
+ /@headlessui/vue@1.7.16(vue@3.2.45):
1747
+ resolution: {integrity: sha512-nKT+nf/q6x198SsyK54mSszaQl/z+QxtASmgMEJtpxSX2Q0OPJX0upS/9daDyiECpeAsvjkoOrm2O/6PyBQ+Qg==}
1748
+ engines: {node: '>=10'}
1749
+ peerDependencies:
1750
+ vue: ^3.2.0
1751
+ dependencies:
1752
+ vue: 3.2.45
1753
+ dev: false
1754
+
1731
1755
  /@humanwhocodes/config-array@0.11.8:
1732
1756
  resolution: {integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==}
1733
1757
  engines: {node: '>=10.10.0'}
@@ -2312,8 +2336,8 @@ packages:
2312
2336
  resolution: {integrity: sha512-hcU9AIQVHmPnmjRK+XUUYlILlr9pQrsqSrwov/JK1pnf3GTQowVBhx54FbvM0AU/VXGH4i3+vgXS5EguR7fysA==}
2313
2337
  dev: true
2314
2338
 
2315
- /@types/node@20.4.6:
2316
- resolution: {integrity: sha512-q0RkvNgMweWWIvSMDiXhflGUKMdIxBo2M2tYM/0kEGDueQByFzK4KZAgu5YHGFNxziTlppNpTIBcqHQAxlfHdA==}
2339
+ /@types/node@20.5.1:
2340
+ resolution: {integrity: sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==}
2317
2341
 
2318
2342
  /@types/normalize-package-data@2.4.1:
2319
2343
  resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==}
@@ -2341,7 +2365,7 @@ packages:
2341
2365
  resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==}
2342
2366
  requiresBuild: true
2343
2367
  dependencies:
2344
- '@types/node': 20.4.6
2368
+ '@types/node': 20.5.1
2345
2369
  dev: true
2346
2370
  optional: true
2347
2371
 
@@ -2481,7 +2505,7 @@ packages:
2481
2505
  vite: ^4.0.0
2482
2506
  vue: ^3.2.25
2483
2507
  dependencies:
2484
- vite: 3.2.5(@types/node@20.4.6)(less@4.1.3)(sass@1.57.0)
2508
+ vite: 3.2.5(@types/node@20.5.1)(less@4.1.3)(sass@1.57.0)
2485
2509
  vue: 3.2.45
2486
2510
  dev: true
2487
2511
 
@@ -5056,7 +5080,7 @@ packages:
5056
5080
  resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==}
5057
5081
  engines: {node: '>= 10.13.0'}
5058
5082
  dependencies:
5059
- '@types/node': 20.4.6
5083
+ '@types/node': 20.5.1
5060
5084
  merge-stream: 2.0.0
5061
5085
  supports-color: 7.2.0
5062
5086
  dev: true
@@ -5065,7 +5089,7 @@ packages:
5065
5089
  resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==}
5066
5090
  engines: {node: '>= 10.13.0'}
5067
5091
  dependencies:
5068
- '@types/node': 20.4.6
5092
+ '@types/node': 20.5.1
5069
5093
  merge-stream: 2.0.0
5070
5094
  supports-color: 8.1.1
5071
5095
  dev: true
@@ -6061,6 +6085,7 @@ packages:
6061
6085
  /pify@4.0.1:
6062
6086
  resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==}
6063
6087
  engines: {node: '>=6'}
6088
+ requiresBuild: true
6064
6089
  dev: true
6065
6090
  optional: true
6066
6091
 
@@ -6155,7 +6180,7 @@ packages:
6155
6180
  dependencies:
6156
6181
  lilconfig: 2.0.6
6157
6182
  postcss: 8.4.20
6158
- ts-node: 10.9.1(@types/node@20.4.6)(typescript@4.9.4)
6183
+ ts-node: 10.9.1(@types/node@20.5.1)(typescript@4.9.4)
6159
6184
  yaml: 1.10.2
6160
6185
  dev: false
6161
6186
 
@@ -6243,6 +6268,7 @@ packages:
6243
6268
 
6244
6269
  /prr@1.0.1:
6245
6270
  resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==}
6271
+ requiresBuild: true
6246
6272
  dev: true
6247
6273
  optional: true
6248
6274
 
@@ -7189,7 +7215,7 @@ packages:
7189
7215
  utf8-byte-length: 1.0.4
7190
7216
  dev: true
7191
7217
 
7192
- /ts-node@10.9.1(@types/node@20.4.6)(typescript@4.9.4):
7218
+ /ts-node@10.9.1(@types/node@20.5.1)(typescript@4.9.4):
7193
7219
  resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==}
7194
7220
  hasBin: true
7195
7221
  peerDependencies:
@@ -7208,7 +7234,7 @@ packages:
7208
7234
  '@tsconfig/node12': 1.0.11
7209
7235
  '@tsconfig/node14': 1.0.3
7210
7236
  '@tsconfig/node16': 1.0.3
7211
- '@types/node': 20.4.6
7237
+ '@types/node': 20.5.1
7212
7238
  acorn: 8.8.1
7213
7239
  acorn-walk: 8.2.0
7214
7240
  arg: 4.1.3
@@ -7432,7 +7458,7 @@ packages:
7432
7458
  extsprintf: 1.3.0
7433
7459
  dev: true
7434
7460
 
7435
- /vite-node@0.26.1(@types/node@20.4.6)(less@4.1.3)(sass@1.57.0):
7461
+ /vite-node@0.26.1(@types/node@20.5.1)(less@4.1.3)(sass@1.57.0):
7436
7462
  resolution: {integrity: sha512-5FJSKZZJz48zFRKHE55WyevZe61hLMQEsqGn+ungfd60kxEztFybZ3yG9ToGFtOWNCCy7Vn5EVuXD8bdeHOSdw==}
7437
7463
  engines: {node: '>=v14.16.0'}
7438
7464
  hasBin: true
@@ -7442,7 +7468,7 @@ packages:
7442
7468
  pathe: 0.2.0
7443
7469
  source-map: 0.6.1
7444
7470
  source-map-support: 0.5.21
7445
- vite: 4.0.1(@types/node@20.4.6)(less@4.1.3)(sass@1.57.0)
7471
+ vite: 4.0.1(@types/node@20.5.1)(less@4.1.3)(sass@1.57.0)
7446
7472
  transitivePeerDependencies:
7447
7473
  - '@types/node'
7448
7474
  - less
@@ -7458,10 +7484,10 @@ packages:
7458
7484
  peerDependencies:
7459
7485
  vite: '>2.0.0-0'
7460
7486
  dependencies:
7461
- vite: 3.2.5(@types/node@20.4.6)(less@4.1.3)(sass@1.57.0)
7487
+ vite: 3.2.5(@types/node@20.5.1)(less@4.1.3)(sass@1.57.0)
7462
7488
  dev: true
7463
7489
 
7464
- /vite@3.2.5(@types/node@20.4.6)(less@4.1.3)(sass@1.57.0):
7490
+ /vite@3.2.5(@types/node@20.5.1)(less@4.1.3)(sass@1.57.0):
7465
7491
  resolution: {integrity: sha512-4mVEpXpSOgrssFZAOmGIr85wPHKvaDAcXqxVxVRZhljkJOMZi1ibLibzjLHzJvcok8BMguLc7g1W6W/GqZbLdQ==}
7466
7492
  engines: {node: ^14.18.0 || >=16.0.0}
7467
7493
  hasBin: true
@@ -7486,7 +7512,7 @@ packages:
7486
7512
  terser:
7487
7513
  optional: true
7488
7514
  dependencies:
7489
- '@types/node': 20.4.6
7515
+ '@types/node': 20.5.1
7490
7516
  esbuild: 0.15.18
7491
7517
  less: 4.1.3
7492
7518
  postcss: 8.4.20
@@ -7497,7 +7523,7 @@ packages:
7497
7523
  fsevents: 2.3.2
7498
7524
  dev: true
7499
7525
 
7500
- /vite@4.0.1(@types/node@20.4.6)(less@4.1.3)(sass@1.57.0):
7526
+ /vite@4.0.1(@types/node@20.5.1)(less@4.1.3)(sass@1.57.0):
7501
7527
  resolution: {integrity: sha512-kZQPzbDau35iWOhy3CpkrRC7It+HIHtulAzBhMqzGHKRf/4+vmh8rPDDdv98SWQrFWo6//3ozwsRmwQIPZsK9g==}
7502
7528
  engines: {node: ^14.18.0 || >=16.0.0}
7503
7529
  hasBin: true
@@ -7522,7 +7548,7 @@ packages:
7522
7548
  terser:
7523
7549
  optional: true
7524
7550
  dependencies:
7525
- '@types/node': 20.4.6
7551
+ '@types/node': 20.5.1
7526
7552
  esbuild: 0.16.8
7527
7553
  less: 4.1.3
7528
7554
  postcss: 8.4.20
@@ -7557,7 +7583,7 @@ packages:
7557
7583
  dependencies:
7558
7584
  '@types/chai': 4.3.4
7559
7585
  '@types/chai-subset': 1.3.3
7560
- '@types/node': 20.4.6
7586
+ '@types/node': 20.5.1
7561
7587
  acorn: 8.8.1
7562
7588
  acorn-walk: 8.2.0
7563
7589
  chai: 4.3.7
@@ -7569,8 +7595,8 @@ packages:
7569
7595
  tinybench: 2.3.1
7570
7596
  tinypool: 0.3.0
7571
7597
  tinyspy: 1.0.2
7572
- vite: 4.0.1(@types/node@20.4.6)(less@4.1.3)(sass@1.57.0)
7573
- vite-node: 0.26.1(@types/node@20.4.6)(less@4.1.3)(sass@1.57.0)
7598
+ vite: 4.0.1(@types/node@20.5.1)(less@4.1.3)(sass@1.57.0)
7599
+ vite-node: 0.26.1(@types/node@20.5.1)(less@4.1.3)(sass@1.57.0)
7574
7600
  transitivePeerDependencies:
7575
7601
  - less
7576
7602
  - sass
@@ -66,6 +66,7 @@ module.exports = {
66
66
  },
67
67
  },
68
68
  borderColor: {
69
+ primary: 'var(--color-border-primary)',
69
70
  skin: {
70
71
  frame: 'var(--color-border-frame, var(--color-border-base, #000))',
71
72
  participant:
@@ -86,6 +87,10 @@ module.exports = {
86
87
  secondary: 'var(--color-bg-secondary)',
87
88
  },
88
89
  },
90
+ boxShadow: {
91
+ participant: 'var(--color-shadow-participant, transparent)',
92
+ occurrence: 'var(--color-shadow-occurrence, transparent)',
93
+ }
89
94
  },
90
95
  },
91
96
  variants: {
@@ -98,5 +103,7 @@ module.exports = {
98
103
  corePlugins: {
99
104
  preflight: false
100
105
  },
101
- plugins: [],
106
+ plugins: [
107
+ require('@headlessui/tailwindcss')
108
+ ],
102
109
  };