@zenuml/core 3.41.2 → 3.41.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/CLAUDE.md +21 -14
- package/bun.lock +18 -2
- package/bunfig.toml +52 -0
- package/dist/zenuml.esm.mjs +10230 -10216
- package/dist/zenuml.js +460 -459
- package/docs/parser/PARSER_IMPROVEMENTS_CC.md +425 -0
- package/docs/parser/grammar_review_gemini.md +116 -0
- package/package.json +6 -4
- package/test-setup.ts +114 -0
- package/tsconfig.test.json +9 -0
- package/vite.config.ts +15 -0
- package/vitest.config.ts +0 -20
package/CLAUDE.md
CHANGED
|
@@ -4,19 +4,19 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|
|
4
4
|
|
|
5
5
|
## Development Commands
|
|
6
6
|
|
|
7
|
-
- **Start development server**: `
|
|
8
|
-
- **Build library**: `
|
|
9
|
-
- **Build site**: `
|
|
10
|
-
- **Run tests**: `
|
|
11
|
-
- **Run E2E tests**: `
|
|
12
|
-
- **Run E2E tests (CI)**: `
|
|
13
|
-
- **Open Playwright UI**: `
|
|
14
|
-
- **Update Playwright snapshots**: `
|
|
15
|
-
- **Install Playwright browsers**: `
|
|
16
|
-
- **Run smoke tests**: `
|
|
17
|
-
- **Lint code**: `
|
|
18
|
-
- **Format code**: `
|
|
19
|
-
- **Generate ANTLR parser**: `
|
|
7
|
+
- **Start development server**: `bun dev` (runs on port 8080)
|
|
8
|
+
- **Build library**: `bun build` (builds library with vite.config.lib.ts)
|
|
9
|
+
- **Build site**: `bun build:site` (builds demo site with vite.config.ts)
|
|
10
|
+
- **Run tests**: `bun run test:bun` (runs unit tests with Bun, excluding E2E) or `bun run test` (runs Vitest)
|
|
11
|
+
- **Run E2E tests**: `bun pw` (runs Playwright tests)
|
|
12
|
+
- **Run E2E tests (CI)**: `bun pw:ci` (runs with GitHub reporter for CI)
|
|
13
|
+
- **Open Playwright UI**: `bun pw:ui`
|
|
14
|
+
- **Update Playwright snapshots**: `bun pw:update`
|
|
15
|
+
- **Install Playwright browsers**: `bun pw:install`
|
|
16
|
+
- **Run smoke tests**: `bun pw:smoke`
|
|
17
|
+
- **Lint code**: `bun eslint` (runs ESLint with auto-fix)
|
|
18
|
+
- **Format code**: `bun prettier` (runs Prettier)
|
|
19
|
+
- **Generate ANTLR parser**: `bun antlr` (generates JavaScript parser from grammar)
|
|
20
20
|
|
|
21
21
|
## Project Architecture
|
|
22
22
|
|
|
@@ -87,7 +87,14 @@ Output formats:
|
|
|
87
87
|
|
|
88
88
|
## Package Management
|
|
89
89
|
|
|
90
|
-
Uses
|
|
90
|
+
Uses Bun as the package manager and JavaScript runtime. Bun is a fast all-in-one JavaScript runtime that includes a package manager, test runner, and bundler.
|
|
91
|
+
|
|
92
|
+
### Test Configuration
|
|
93
|
+
- **Unit tests with Bun**: `bun run test:bun` - Runs unit tests in `src/` and `test/unit/` folders (excludes `/tests` E2E folder)
|
|
94
|
+
- **Vitest**: `bun run test` - Uses Vitest for compatibility with existing test suite
|
|
95
|
+
- **E2E tests**: `bun pw` - Runs Playwright tests in `/tests` folder
|
|
96
|
+
- Tests use `vi` mocking utilities which are mapped to Jest-compatible APIs in `test-setup.ts`
|
|
97
|
+
- Coverage is disabled by default due to resource issues; enable with `bun test --coverage`
|
|
91
98
|
|
|
92
99
|
## Development Notes
|
|
93
100
|
|
package/bun.lock
CHANGED
|
@@ -29,11 +29,12 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@eslint/js": "^9.21.0",
|
|
32
|
+
"@happy-dom/global-registrator": "^18.0.1",
|
|
32
33
|
"@playwright/test": "^1.54.1",
|
|
33
34
|
"@storybook/addon-docs": "^9.0.16",
|
|
34
35
|
"@storybook/addon-onboarding": "^9.0.16",
|
|
35
36
|
"@storybook/react-vite": "^9.0.16",
|
|
36
|
-
"@testing-library/jest-dom": "^6.
|
|
37
|
+
"@testing-library/jest-dom": "^6.8.0",
|
|
37
38
|
"@testing-library/react": "^16.3.0",
|
|
38
39
|
"@types/antlr4": "~4.11.2",
|
|
39
40
|
"@types/color-string": "^1.5.5",
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
"eslint-plugin-react-refresh": "^0.4.19",
|
|
53
54
|
"eslint-plugin-storybook": "^9.0.16",
|
|
54
55
|
"globals": "^15.15.0",
|
|
56
|
+
"happy-dom": "^18.0.1",
|
|
55
57
|
"jsdom": "^26.1.0",
|
|
56
58
|
"less": "^4.3.0",
|
|
57
59
|
"postcss": "^8.5.3",
|
|
@@ -226,6 +228,8 @@
|
|
|
226
228
|
|
|
227
229
|
"@floating-ui/utils": ["@floating-ui/utils@0.2.10", "", {}, "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ=="],
|
|
228
230
|
|
|
231
|
+
"@happy-dom/global-registrator": ["@happy-dom/global-registrator@18.0.1", "", { "dependencies": { "@types/node": "^20.0.0", "happy-dom": "^18.0.1" } }, "sha512-xCy/cpEP8xyJ6u0eokYgaQxeUmcKqHx/+aC3R0DLa7/S38efhZAVDQqLJ5zzTguLFS0gvAzZHP40NGaLwRyapQ=="],
|
|
232
|
+
|
|
229
233
|
"@headlessui/react": ["@headlessui/react@2.2.7", "", { "dependencies": { "@floating-ui/react": "^0.26.16", "@react-aria/focus": "^3.20.2", "@react-aria/interactions": "^3.25.0", "@tanstack/react-virtual": "^3.13.9", "use-sync-external-store": "^1.5.0" }, "peerDependencies": { "react": "^18 || ^19 || ^19.0.0-rc", "react-dom": "^18 || ^19 || ^19.0.0-rc" } }, "sha512-WKdTymY8Y49H8/gUc/lIyYK1M+/6dq0Iywh4zTZVAaiTDprRfioxSgD0wnXTQTBpjpGJuTL1NO/mqEvc//5SSg=="],
|
|
230
234
|
|
|
231
235
|
"@headlessui/tailwindcss": ["@headlessui/tailwindcss@0.2.2", "", { "peerDependencies": { "tailwindcss": "^3.0 || ^4.0" } }, "sha512-xNe42KjdyA4kfUKLLPGzME9zkH7Q3rOZ5huFihWNWOQFxnItxPB3/67yBI8/qBfY8nwBRx5GHn4VprsoluVMGw=="],
|
|
@@ -502,6 +506,8 @@
|
|
|
502
506
|
|
|
503
507
|
"@types/trusted-types": ["@types/trusted-types@2.0.7", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="],
|
|
504
508
|
|
|
509
|
+
"@types/whatwg-mimetype": ["@types/whatwg-mimetype@3.0.2", "", {}, "sha512-c2AKvDT8ToxLIOUlN51gTiHXflsfIFisS4pO7pDPoKouJCESkhZnEy623gwP9laCy5lnLDAw1vAzu2vM2YLOrA=="],
|
|
510
|
+
|
|
505
511
|
"@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.42.0", "", { "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "8.42.0", "@typescript-eslint/type-utils": "8.42.0", "@typescript-eslint/utils": "8.42.0", "@typescript-eslint/visitor-keys": "8.42.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.42.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-Aq2dPqsQkxHOLfb2OPv43RnIvfj05nw8v/6n3B2NABIPpHnjQnaLo9QGMTvml+tv4korl/Cjfrb/BYhoL8UUTQ=="],
|
|
506
512
|
|
|
507
513
|
"@typescript-eslint/parser": ["@typescript-eslint/parser@8.42.0", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.42.0", "@typescript-eslint/types": "8.42.0", "@typescript-eslint/typescript-estree": "8.42.0", "@typescript-eslint/visitor-keys": "8.42.0", "debug": "^4.3.4" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-r1XG74QgShUgXph1BYseJ+KZd17bKQib/yF3SR+demvytiRXrwd12Blnz5eYGm8tXaeRdd4x88MlfwldHoudGg=="],
|
|
@@ -818,6 +824,8 @@
|
|
|
818
824
|
|
|
819
825
|
"graphemer": ["graphemer@1.4.0", "", {}, "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag=="],
|
|
820
826
|
|
|
827
|
+
"happy-dom": ["happy-dom@18.0.1", "", { "dependencies": { "@types/node": "^20.0.0", "@types/whatwg-mimetype": "^3.0.2", "whatwg-mimetype": "^3.0.0" } }, "sha512-qn+rKOW7KWpVTtgIUi6RVmTBZJSe2k0Db0vh1f7CWrWclkkc7/Q+FrOfkZIb2eiErLyqu5AXEzE7XthO9JVxRA=="],
|
|
828
|
+
|
|
821
829
|
"has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="],
|
|
822
830
|
|
|
823
831
|
"hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="],
|
|
@@ -1278,7 +1286,7 @@
|
|
|
1278
1286
|
|
|
1279
1287
|
"whatwg-encoding": ["whatwg-encoding@3.1.1", "", { "dependencies": { "iconv-lite": "0.6.3" } }, "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ=="],
|
|
1280
1288
|
|
|
1281
|
-
"whatwg-mimetype": ["whatwg-mimetype@
|
|
1289
|
+
"whatwg-mimetype": ["whatwg-mimetype@3.0.0", "", {}, "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q=="],
|
|
1282
1290
|
|
|
1283
1291
|
"whatwg-url": ["whatwg-url@14.2.0", "", { "dependencies": { "tr46": "^5.1.0", "webidl-conversions": "^7.0.0" } }, "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw=="],
|
|
1284
1292
|
|
|
@@ -1328,6 +1336,8 @@
|
|
|
1328
1336
|
|
|
1329
1337
|
"@eslint/eslintrc/globals": ["globals@14.0.0", "", {}, "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ=="],
|
|
1330
1338
|
|
|
1339
|
+
"@happy-dom/global-registrator/@types/node": ["@types/node@20.19.14", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-gqiKWld3YIkmtrrg9zDvg9jfksZCcPywXVN7IauUGhilwGV/yOyeUsvpR796m/Jye0zUzMXPKe8Ct1B79A7N5Q=="],
|
|
1340
|
+
|
|
1331
1341
|
"@headlessui/react/@floating-ui/react": ["@floating-ui/react@0.26.28", "", { "dependencies": { "@floating-ui/react-dom": "^2.1.2", "@floating-ui/utils": "^0.2.8", "tabbable": "^6.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-yORQuuAtVpiRjpMhdc0wJj06b9JFjrYF4qp96j++v2NBpbi6SEGF7donUJ3TMieerQ6qVkAv1tgr7L4r5roTqw=="],
|
|
1332
1342
|
|
|
1333
1343
|
"@poppinss/dumper/supports-color": ["supports-color@10.2.0", "", {}, "sha512-5eG9FQjEjDbAlI5+kdpdyPIBMRH4GfTVDGREVupaZHmVoppknhM29b/S9BkQz7cathp85BVgRi/As3Siln7e0Q=="],
|
|
@@ -1354,6 +1364,8 @@
|
|
|
1354
1364
|
|
|
1355
1365
|
"csso/css-tree": ["css-tree@2.2.1", "", { "dependencies": { "mdn-data": "2.0.28", "source-map-js": "^1.0.1" } }, "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA=="],
|
|
1356
1366
|
|
|
1367
|
+
"data-urls/whatwg-mimetype": ["whatwg-mimetype@4.0.0", "", {}, "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg=="],
|
|
1368
|
+
|
|
1357
1369
|
"dom-serializer/entities": ["entities@4.5.0", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="],
|
|
1358
1370
|
|
|
1359
1371
|
"eslint/find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="],
|
|
@@ -1362,6 +1374,10 @@
|
|
|
1362
1374
|
|
|
1363
1375
|
"glob/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
|
|
1364
1376
|
|
|
1377
|
+
"happy-dom/@types/node": ["@types/node@20.19.14", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-gqiKWld3YIkmtrrg9zDvg9jfksZCcPywXVN7IauUGhilwGV/yOyeUsvpR796m/Jye0zUzMXPKe8Ct1B79A7N5Q=="],
|
|
1378
|
+
|
|
1379
|
+
"jsdom/whatwg-mimetype": ["whatwg-mimetype@4.0.0", "", {}, "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg=="],
|
|
1380
|
+
|
|
1365
1381
|
"make-dir/semver": ["semver@5.7.2", "", { "bin": { "semver": "bin/semver" } }, "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g=="],
|
|
1366
1382
|
|
|
1367
1383
|
"micromatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
|
package/bunfig.toml
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Bun configuration file
|
|
2
|
+
|
|
3
|
+
[test]
|
|
4
|
+
# Preload setup file for test environment
|
|
5
|
+
preload = ["./test-setup.ts"]
|
|
6
|
+
|
|
7
|
+
# Project root directory
|
|
8
|
+
root = "./"
|
|
9
|
+
|
|
10
|
+
# Note: To exclude /tests folder (Playwright tests), use the npm script:
|
|
11
|
+
# bun run test:bun
|
|
12
|
+
# Or run directly: bun test 'src/**/*.{spec,test}.{ts,tsx}' 'test/**/*.{spec,test}.{ts,tsx}'
|
|
13
|
+
|
|
14
|
+
# Coverage configuration
|
|
15
|
+
# Disabled by default due to resource issues with large asset files
|
|
16
|
+
# Enable with: bun test --coverage
|
|
17
|
+
coverage = false
|
|
18
|
+
coverageReporter = ["text"]
|
|
19
|
+
coverageDirectory = "./coverage"
|
|
20
|
+
|
|
21
|
+
# Timeout for tests (in milliseconds)
|
|
22
|
+
timeout = 5000
|
|
23
|
+
|
|
24
|
+
# Run tests in watch mode by default
|
|
25
|
+
# watch = false
|
|
26
|
+
|
|
27
|
+
[install]
|
|
28
|
+
# Package manager settings
|
|
29
|
+
peer = true
|
|
30
|
+
dev = true
|
|
31
|
+
optional = true
|
|
32
|
+
|
|
33
|
+
# Auto install dependencies
|
|
34
|
+
auto = "auto"
|
|
35
|
+
|
|
36
|
+
# Disable cache if needed
|
|
37
|
+
# disable = false
|
|
38
|
+
|
|
39
|
+
[install.lockfile]
|
|
40
|
+
# Save exact versions
|
|
41
|
+
save = true
|
|
42
|
+
|
|
43
|
+
# Print changes to lockfile
|
|
44
|
+
print = "yarn"
|
|
45
|
+
|
|
46
|
+
[run]
|
|
47
|
+
# Bun runtime settings for scripts
|
|
48
|
+
# Silent mode for cleaner output
|
|
49
|
+
# silent = false
|
|
50
|
+
|
|
51
|
+
# Automatically install missing packages when running scripts
|
|
52
|
+
autoInstall = true
|