@zenuml/core 3.43.3 → 3.44.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/.mcp.json +16 -0
- package/AGENTS.md +26 -0
- package/CLAUDE.md +5 -4
- package/TUTORIAL.md +1 -1
- package/bun.lock +6 -0
- package/bunfig.toml +1 -1
- package/cy/demo1.html +28 -0
- package/cy/demo3.html +28 -0
- package/cy/demo4.html +28 -0
- package/cy/smoke-fragment.html +1 -2
- package/cy/vertical-1.html +25 -0
- package/cy/vertical-10.html +33 -0
- package/cy/vertical-11.html +29 -0
- package/cy/vertical-2.html +23 -0
- package/cy/vertical-3.html +37 -0
- package/cy/vertical-4.html +42 -0
- package/cy/vertical-5.html +40 -0
- package/cy/vertical-6.html +29 -0
- package/cy/vertical-7.html +27 -0
- package/cy/vertical-8.html +32 -0
- package/cy/vertical-9.html +25 -0
- package/dist/stats.html +1 -1
- package/dist/zenuml.esm.mjs +19275 -18871
- package/dist/zenuml.js +570 -569
- package/docs/asciidoc/contributor.adoc +4 -4
- package/docs/osx-unsupported-arm64-node12.md +2 -2
- package/docs/watch.md +1 -1
- package/index.html +53 -28
- package/package.json +7 -9
- package/playwright.config.ts +6 -3
- package/scripts/snapshot-dual.js +173 -0
package/.mcp.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"playwright": {
|
|
4
|
+
"type": "stdio",
|
|
5
|
+
"command": "npx",
|
|
6
|
+
"args": ["-y", "@playwright/mcp", "--browser", "msedge"],
|
|
7
|
+
"env": {}
|
|
8
|
+
},
|
|
9
|
+
"chrome-devtools": {
|
|
10
|
+
"type": "stdio",
|
|
11
|
+
"command": "npx",
|
|
12
|
+
"args": ["-y", "chrome-devtools-mcp"],
|
|
13
|
+
"env": {}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Repository Guidelines
|
|
2
|
+
|
|
3
|
+
## Project Structure & Module Organization
|
|
4
|
+
`src/` holds the TypeScript/React core plus ANTLR grammars in `src/g4/` whose generated output belongs in `src/generated-parser/`. Static assets stay in `public/`, while demos and docs live in `playground/` and `docs/`. Bun specs reside in `test/unit/` (fixtures in `test/`); Playwright suites and snapshots live in `tests/`. Tooling sits in `scripts/`, `antlr/`, `types/`, and the repo-level configs (including `wrangler.toml`).
|
|
5
|
+
|
|
6
|
+
## Build, Test, and Development Commands
|
|
7
|
+
- `bun install` – install dependencies (Bun 1.x, Node ≥20).
|
|
8
|
+
- `bun run dev` – Vite dev server on `http://localhost:8080`.
|
|
9
|
+
- `bun run build` – library bundle via `vite.config.lib.ts`.
|
|
10
|
+
- `bun run build:site` / `bun run build:gh-pages` – demo/docs build (standard vs GitHub Pages).
|
|
11
|
+
- `bun run test` – Bun unit tests covering `src` and `test/unit`.
|
|
12
|
+
- `bun run pw`, `bun run pw:smoke`, `bun run pw:update` – Playwright full suite, smoke subset, snapshot refresh.
|
|
13
|
+
- `bun run worker:dev` / `worker:deploy(:staging)` – build site then run or ship the Cloudflare Worker.
|
|
14
|
+
- `bun run antlr:lexer && bun run antlr:parser` (plus `antlr:clear`) – regenerate parser artifacts after grammar edits.
|
|
15
|
+
|
|
16
|
+
## Coding Style & Naming Conventions
|
|
17
|
+
Stick to 2-space indentation, TypeScript, and arrow components with PascalCase names. Hooks/atoms stay camelCase (`modeAtom`), constants SCREAMING_SNAKE_CASE, and specs follow `FeatureName.spec.ts`. Scope Tailwind utilities under `.zenuml`; styles belong in `src/assets/tailwind.css` or the relevant component SCSS. Run `bun run eslint` and `bun run prettier` before committing.
|
|
18
|
+
|
|
19
|
+
## Testing Guidelines
|
|
20
|
+
Touching parser, rendering, or positioning code requires matching `*.spec.ts/tsx` updates, with fixtures held in `test/unit/parser/fixture`. Keep Bun tests deterministic (fake timers, no global state leaks) and prefer small diagrams. UI or regression work belongs in `tests/*.spec.ts` with stable selectors; refresh snapshots via `pw:update`. Every fix ships with a failing test first and, when visuals change, the updated snapshot artifacts.
|
|
21
|
+
|
|
22
|
+
## Commit & Pull Request Guidelines
|
|
23
|
+
Follow the conventional pattern (`fix:`, `feat:`, `refactor:`, etc.) and reference issues using `(#123)` in the subject. PRs summarize intent, list the verification commands (`bun run test`, `bun run pw:smoke`, etc.), and attach screenshots or GIFs for UI updates. Call out parser regeneration, config edits, or worker deploy steps so reviewers can verify the correct artifacts.
|
|
24
|
+
|
|
25
|
+
## Security & Configuration Tips
|
|
26
|
+
Keep secrets out of git—Wrangler reads Cloudflare credentials from your local profile, and environment overrides stay in untracked `.env`. Document worker route or KV changes in the PR, verify them in staging, and scrub proprietary diagrams before committing docs or tests.
|
package/CLAUDE.md
CHANGED
|
@@ -90,11 +90,12 @@ Output formats:
|
|
|
90
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
91
|
|
|
92
92
|
### Test Configuration
|
|
93
|
-
- **Unit tests with Bun**: `bun run test
|
|
94
|
-
- **Vitest**:
|
|
93
|
+
- **Unit tests with Bun**: `bun test` (alias: `bun run test`) - Runs unit tests in `src/` and `test/unit/` folders (excludes `/tests` E2E folder)
|
|
94
|
+
- **Vitest**: Tests also support Vitest for IDE integration compatibility
|
|
95
95
|
- **E2E tests**: `bun pw` - Runs Playwright tests in `/tests` folder
|
|
96
|
-
-
|
|
97
|
-
-
|
|
96
|
+
- **Test setup**: `test/setup.ts` configures test environment (mocks IntersectionObserver, etc.)
|
|
97
|
+
- Tests use `vi` mocking utilities from Vitest
|
|
98
|
+
- Test files use `.spec.ts` extension and are co-located with source files
|
|
98
99
|
|
|
99
100
|
## Development Notes
|
|
100
101
|
|
package/TUTORIAL.md
CHANGED
package/bun.lock
CHANGED
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
"happy-dom": "^18.0.1",
|
|
57
57
|
"jsdom": "^26.1.0",
|
|
58
58
|
"less": "^4.3.0",
|
|
59
|
+
"pixelmatch": "^7.1.0",
|
|
60
|
+
"pngjs": "^7.0.0",
|
|
59
61
|
"postcss": "^8.5.3",
|
|
60
62
|
"prettier": "3.5.3",
|
|
61
63
|
"rollup-plugin-visualizer": "^6.0.5",
|
|
@@ -1043,10 +1045,14 @@
|
|
|
1043
1045
|
|
|
1044
1046
|
"pirates": ["pirates@4.0.7", "", {}, "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA=="],
|
|
1045
1047
|
|
|
1048
|
+
"pixelmatch": ["pixelmatch@7.1.0", "", { "dependencies": { "pngjs": "^7.0.0" }, "bin": { "pixelmatch": "bin/pixelmatch" } }, "sha512-1wrVzJ2STrpmONHKBy228LM1b84msXDUoAzVEl0R8Mz4Ce6EPr+IVtxm8+yvrqLYMHswREkjYFaMxnyGnaY3Ng=="],
|
|
1049
|
+
|
|
1046
1050
|
"playwright": ["playwright@1.55.0", "", { "dependencies": { "playwright-core": "1.55.0" }, "optionalDependencies": { "fsevents": "2.3.2" }, "bin": { "playwright": "cli.js" } }, "sha512-sdCWStblvV1YU909Xqx0DhOjPZE4/5lJsIS84IfN9dAZfcl/CIZ5O8l3o0j7hPMjDvqoTF8ZUcc+i/GL5erstA=="],
|
|
1047
1051
|
|
|
1048
1052
|
"playwright-core": ["playwright-core@1.55.0", "", { "bin": { "playwright-core": "cli.js" } }, "sha512-GvZs4vU3U5ro2nZpeiwyb0zuFaqb9sUiAJuyrWpcGouD8y9/HLgGbNRjIph7zU9D3hnPaisMl9zG9CgFi/biIg=="],
|
|
1049
1053
|
|
|
1054
|
+
"pngjs": ["pngjs@7.0.0", "", {}, "sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow=="],
|
|
1055
|
+
|
|
1050
1056
|
"postcss": ["postcss@8.5.6", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg=="],
|
|
1051
1057
|
|
|
1052
1058
|
"postcss-import": ["postcss-import@15.1.0", "", { "dependencies": { "postcss-value-parser": "^4.0.0", "read-cache": "^1.0.0", "resolve": "^1.1.7" }, "peerDependencies": { "postcss": "^8.0.0" } }, "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew=="],
|
package/bunfig.toml
CHANGED
package/cy/demo1.html
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
<title>Demo1 DSL</title>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
margin: 0;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="diagram" class="diagram">
|
|
16
|
+
<pre class="zenuml" id="dsl-slot" style="margin: 0"></pre>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<script type="module">
|
|
20
|
+
import demo1 from "/src/demo1.js";
|
|
21
|
+
const target = document.getElementById("dsl-slot");
|
|
22
|
+
if (target) {
|
|
23
|
+
target.textContent = demo1;
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
<script type="module" src="/src/main-cy.ts"></script>
|
|
27
|
+
</body>
|
|
28
|
+
</html>
|
package/cy/demo3.html
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
<title>Demo3 DSL</title>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
margin: 0;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="diagram" class="diagram">
|
|
16
|
+
<pre class="zenuml" id="dsl-slot" style="margin: 0"></pre>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<script type="module">
|
|
20
|
+
import demo3 from "/src/demo3.js";
|
|
21
|
+
const target = document.getElementById("dsl-slot");
|
|
22
|
+
if (target) {
|
|
23
|
+
target.textContent = demo3;
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
<script type="module" src="/src/main-cy.ts"></script>
|
|
27
|
+
</body>
|
|
28
|
+
</html>
|
package/cy/demo4.html
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
<title>Demo4 DSL</title>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
margin: 0;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="diagram" class="diagram">
|
|
16
|
+
<pre class="zenuml" id="dsl-slot" style="margin: 0"></pre>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<script type="module">
|
|
20
|
+
import demo4 from "/src/demo4.js";
|
|
21
|
+
const target = document.getElementById("dsl-slot");
|
|
22
|
+
if (target) {
|
|
23
|
+
target.textContent = demo4;
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
<script type="module" src="/src/main-cy.ts"></script>
|
|
27
|
+
</body>
|
|
28
|
+
</html>
|
package/cy/smoke-fragment.html
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
<title>Creation Assignment</title>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
margin: 0;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="diagram" class="diagram">
|
|
16
|
+
<pre class="zenuml" style="margin: 0">
|
|
17
|
+
// red
|
|
18
|
+
// green
|
|
19
|
+
a = A.m111
|
|
20
|
+
new E
|
|
21
|
+
</pre>
|
|
22
|
+
</div>
|
|
23
|
+
<script type="module" src="/src/main-cy.ts"></script>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
<title>Self Sync Message at Root</title>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
margin: 0; /* mostly for demo on mobile */
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="diagram" class="diagram">
|
|
16
|
+
<pre class="zenuml" style="margin: 0">
|
|
17
|
+
new E
|
|
18
|
+
E.messageA()
|
|
19
|
+
new A {
|
|
20
|
+
if (x) {
|
|
21
|
+
new D
|
|
22
|
+
}
|
|
23
|
+
new B {
|
|
24
|
+
new C
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
</pre>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<!-- built files will be auto injected -->
|
|
31
|
+
<script type="module" src="/src/main-cy.ts"></script>
|
|
32
|
+
</body>
|
|
33
|
+
</html>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
<title>Self Sync Message at Root</title>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
margin: 0; /* mostly for demo on mobile */
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="diagram" class="diagram">
|
|
16
|
+
<pre class="zenuml" style="margin: 0">
|
|
17
|
+
A.call {
|
|
18
|
+
// pre creation
|
|
19
|
+
A->B: prep
|
|
20
|
+
a = new A()
|
|
21
|
+
a->B: post
|
|
22
|
+
}
|
|
23
|
+
</pre>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<!-- built files will be auto injected -->
|
|
27
|
+
<script type="module" src="/src/main-cy.ts"></script>
|
|
28
|
+
</body>
|
|
29
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
<title>Creation Assignment</title>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
margin: 0;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="diagram" class="diagram">
|
|
16
|
+
<pre class="zenuml" style="margin: 0">
|
|
17
|
+
// [red]
|
|
18
|
+
new B
|
|
19
|
+
</pre>
|
|
20
|
+
</div>
|
|
21
|
+
<script type="module" src="/src/main-cy.ts"></script>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
<title>Creation Assignment</title>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
margin: 0;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="diagram" class="diagram">
|
|
16
|
+
<pre class="zenuml" style="margin: 0">
|
|
17
|
+
if(x) {
|
|
18
|
+
// comment
|
|
19
|
+
new A
|
|
20
|
+
} else {
|
|
21
|
+
new B
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
new C
|
|
25
|
+
try {
|
|
26
|
+
new D
|
|
27
|
+
} catch {
|
|
28
|
+
par {
|
|
29
|
+
new E
|
|
30
|
+
new F
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
</pre>
|
|
34
|
+
</div>
|
|
35
|
+
<script type="module" src="/src/main-cy.ts"></script>
|
|
36
|
+
</body>
|
|
37
|
+
</html>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
<title>Creation Assignment</title>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
margin: 0;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="diagram" class="diagram">
|
|
16
|
+
<pre class="zenuml" style="margin: 0">
|
|
17
|
+
if(x) {
|
|
18
|
+
// comment
|
|
19
|
+
new A
|
|
20
|
+
} else {
|
|
21
|
+
new B
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
new C
|
|
25
|
+
try {
|
|
26
|
+
new D
|
|
27
|
+
} catch {
|
|
28
|
+
par {
|
|
29
|
+
new E
|
|
30
|
+
new F
|
|
31
|
+
if(x) {
|
|
32
|
+
new X
|
|
33
|
+
} else {
|
|
34
|
+
new Y
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
</pre>
|
|
39
|
+
</div>
|
|
40
|
+
<script type="module" src="/src/main-cy.ts"></script>
|
|
41
|
+
</body>
|
|
42
|
+
</html>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
<title>Creation Assignment</title>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
margin: 0;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="diagram" class="diagram">
|
|
16
|
+
<pre class="zenuml" style="margin: 0">
|
|
17
|
+
par {
|
|
18
|
+
new F
|
|
19
|
+
if(x) {
|
|
20
|
+
new X
|
|
21
|
+
} else {
|
|
22
|
+
try {
|
|
23
|
+
new Y
|
|
24
|
+
} catch {
|
|
25
|
+
par {
|
|
26
|
+
new G
|
|
27
|
+
if(x) {
|
|
28
|
+
new H
|
|
29
|
+
} else {
|
|
30
|
+
new I
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</pre>
|
|
37
|
+
</div>
|
|
38
|
+
<script type="module" src="/src/main-cy.ts"></script>
|
|
39
|
+
</body>
|
|
40
|
+
</html>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
<title>Creation Assignment</title>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
margin: 0;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="diagram" class="diagram">
|
|
16
|
+
<pre class="zenuml" style="margin: 0">
|
|
17
|
+
new a
|
|
18
|
+
if(x) {
|
|
19
|
+
new b
|
|
20
|
+
} else {
|
|
21
|
+
new c
|
|
22
|
+
new e
|
|
23
|
+
}
|
|
24
|
+
new D
|
|
25
|
+
</pre>
|
|
26
|
+
</div>
|
|
27
|
+
<script type="module" src="/src/main-cy.ts"></script>
|
|
28
|
+
</body>
|
|
29
|
+
</html>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
<title>Demo1 DSL</title>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
margin: 0;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="diagram" class="diagram">
|
|
16
|
+
<pre class="zenuml" style="margin: 0">
|
|
17
|
+
A.method
|
|
18
|
+
section(){
|
|
19
|
+
new B
|
|
20
|
+
}
|
|
21
|
+
</pre>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<!-- built files will be auto injected -->
|
|
25
|
+
<script type="module" src="/src/main-cy.ts"></script>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
<title>Demo1 DSL</title>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
margin: 0;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="diagram" class="diagram">
|
|
16
|
+
<pre class="zenuml" style="margin: 0">
|
|
17
|
+
new Creation() {
|
|
18
|
+
return from_creation
|
|
19
|
+
}
|
|
20
|
+
return "from if to original source"
|
|
21
|
+
try {
|
|
22
|
+
new AHasAVeryLongNameLongNameLongNameLongName() {
|
|
23
|
+
new CreatWithinCreat()
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</pre>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<!-- built files will be auto injected -->
|
|
30
|
+
<script type="module" src="/src/main-cy.ts"></script>
|
|
31
|
+
</body>
|
|
32
|
+
</html>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
<title>Self Sync Message at Root</title>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
margin: 0; /* mostly for demo on mobile */
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="diagram" class="diagram">
|
|
16
|
+
<pre class="zenuml" style="margin: 0">
|
|
17
|
+
A0->A0: self
|
|
18
|
+
new A
|
|
19
|
+
</pre>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<!-- built files will be auto injected -->
|
|
23
|
+
<script type="module" src="/src/main-cy.ts"></script>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|