@zenuml/core 2.0.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/Integration/vanilla-js/index.html +31 -0
- package/LICENSE +21 -0
- package/README.md +81 -0
- package/README_CN.md +15 -0
- package/antlr/antlr-4.8-complete.jar +0 -0
- package/coverage/clover.xml +6 -0
- package/coverage/coverage-final.json +1 -0
- package/coverage/lcov-report/Interaction.vue.html +532 -0
- package/coverage/lcov-report/Owner.js.html +175 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +79 -0
- package/coverage/lcov-report/components/interaction/Interaction.vue.html +544 -0
- package/coverage/lcov-report/components/interaction/index.html +110 -0
- package/coverage/lcov-report/index.html +95 -0
- package/coverage/lcov-report/positioning/david/DavidEisenstat2.ts.html +196 -0
- package/coverage/lcov-report/positioning/david/index.html +110 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +170 -0
- package/coverage/lcov.info +0 -0
- package/cypress/fixtures/example.json +5 -0
- package/cypress/fixtures/profile.json +5 -0
- package/cypress/fixtures/users.json +232 -0
- package/cypress/integration/__image_snapshots__/Smoke test creation #0.png +0 -0
- package/cypress/integration/__image_snapshots__/Smoke test fragment #0.png +0 -0
- package/cypress/integration/__image_snapshots__/Smoke test fragmentIssue #0.png +0 -0
- package/cypress/integration/__image_snapshots__/Smoke test interaction #0.png +0 -0
- package/cypress/integration/__image_snapshots__/Smoke test return #0.png +0 -0
- package/cypress/integration/__image_snapshots__/Smoke test return #1.png +0 -0
- package/cypress/integration/__image_snapshots__/Smoke test should load the home page #0.png +0 -0
- package/cypress/integration/smoke.spec.js +64 -0
- package/cypress/plugins/index.js +30 -0
- package/cypress/support/commands.js +25 -0
- package/cypress/support/index.js +20 -0
- package/cypress/videos/smoke.spec.js.mp4 +0 -0
- package/cypress.json +7 -0
- package/dist/fonts/kalam-v15-latin-300.00bd845e.woff2 +0 -0
- package/dist/fonts/kalam-v15-latin-300.1c36b0ad.woff +0 -0
- package/dist/fonts/kalam-v15-latin-700.2a87f463.woff2 +0 -0
- package/dist/fonts/kalam-v15-latin-700.9ec0bbf1.woff +0 -0
- package/dist/fonts/kalam-v15-latin-regular.4c0c4df4.woff +0 -0
- package/dist/fonts/kalam-v15-latin-regular.e4d4907f.woff2 +0 -0
- package/dist/vue-sequence.css +7 -0
- package/dist/vue-sequence.umd.min.js +12 -0
- package/docs/asciidoc/contributor.adoc +79 -0
- package/docs/asciidoc/create-my-own-theme.adoc +25 -0
- package/docs/asciidoc/images/creation-component.png +0 -0
- package/docs/asciidoc/images/creation-rtl.png +0 -0
- package/docs/asciidoc/images/message-arrow-rtl.png +0 -0
- package/docs/asciidoc/images/occurrence.png +0 -0
- package/docs/asciidoc/images/return-message-conflict.png +0 -0
- package/docs/asciidoc/images/shift-up-half-the-height.png +0 -0
- package/docs/asciidoc/images/vertical-alignment.svg +1 -0
- package/docs/asciidoc/images/vertically-aligning.png +0 -0
- package/docs/asciidoc/index.adoc +277 -0
- package/docs/asciidoc/integration-guide.adoc +121 -0
- package/docs/asciidoc/tutorial.adoc +22 -0
- package/docs/async-vs-sync-parser-rules.md +78 -0
- package/docs/handling-starter.png +0 -0
- package/docs/highlighting-messages.md +47 -0
- package/docs/inherited-vs-provided-from.md +59 -0
- package/docs/invalid-host-header-error.md +20 -0
- package/docs/osx-unsupported-arm64-node12.md +13 -0
- package/docs/participants-function.md +27 -0
- package/docs/responsive-participant-margin.md +52 -0
- package/docs/starter.md +8 -0
- package/docs/testing-minified-lib.md +29 -0
- package/docs/watch.md +1 -0
- package/docs/why-we-publish-embed-view-to-github-pages.md +15 -0
- package/docs/width-translate-and-offsets.md +54 -0
- package/gen/css3.interp +214 -0
- package/gen/css3.tokens +92 -0
- package/gen/css3BaseListener.java +1106 -0
- package/gen/css3BaseVisitor.java +636 -0
- package/gen/css3Lexer.interp +251 -0
- package/gen/css3Lexer.java +672 -0
- package/gen/css3Lexer.tokens +92 -0
- package/gen/css3Listener.java +939 -0
- package/gen/css3Parser.java +8113 -0
- package/gen/css3Visitor.java +566 -0
- package/gen/sequenceLexer.interp +206 -0
- package/gen/sequenceLexer.java +419 -0
- package/gen/sequenceLexer.tokens +104 -0
- package/gen/sequenceParser.interp +180 -0
- package/gen/sequenceParser.java +4659 -0
- package/gen/sequenceParser.tokens +101 -0
- package/gen/sequenceParserBaseListener.java +830 -0
- package/gen/sequenceParserBaseVisitor.java +475 -0
- package/gen/sequenceParserListener.java +703 -0
- package/gen/sequenceParserVisitor.java +425 -0
- package/package.json +133 -0
- package/playground/creation.html +32 -0
- package/playground/message.html +39 -0
- package/tailwind.config.js +15 -0
- package/types/index.d.ts +34 -0
- package/vue.config.spec.js +53 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Integration ZenUML Library with Vanilla JavaScript</title>
|
|
6
|
+
<script src="https://unpkg.com/vue@2.6.14"></script>
|
|
7
|
+
<script src="https://unpkg.com/vuex@3.6.2"></script>
|
|
8
|
+
<script src="https://unpkg.com/vue-sequence"></script>
|
|
9
|
+
<link rel="stylesheet" href="https://unpkg.com/vue-sequence/dist/vue-sequence.css">
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="app" />
|
|
13
|
+
<script>
|
|
14
|
+
Vue.use(Vuex);
|
|
15
|
+
const VueSequence = window['vue-sequence'].VueSequence;
|
|
16
|
+
const store = new Vuex.Store(VueSequence.Store());
|
|
17
|
+
store.dispatch('updateCode',{ code: `
|
|
18
|
+
@EC2 BookService
|
|
19
|
+
@DynamoDB BookRepository
|
|
20
|
+
BookService.saveBook(1) {
|
|
21
|
+
BookRepository.storeBook()
|
|
22
|
+
}
|
|
23
|
+
`});
|
|
24
|
+
new Vue({
|
|
25
|
+
el: '#app',
|
|
26
|
+
store,
|
|
27
|
+
render: h => h(VueSequence.DiagramFrame)
|
|
28
|
+
});
|
|
29
|
+
</script>
|
|
30
|
+
</body>
|
|
31
|
+
</html>
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Peng Xiao
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
> Note: This repository has been renamed to `core` from `vue-sequence`. This is repository contains the core renderer and other core functionalities including
|
|
2
|
+
export images.
|
|
3
|
+
|
|
4
|
+
# ZenUML/Core
|
|
5
|
+
ZenUML is JavaScript-based diagramming tool that uses Markdown-inspired text definitions
|
|
6
|
+
and a renderer to create and modify sequence diagrams. The main purpose of ZenUML is to
|
|
7
|
+
help documentation catch up with development.
|
|
8
|
+
|
|
9
|
+
ZenUML allows even non-programmers to easily create beautiful sequence diagrams through
|
|
10
|
+
the [ZenUML Live Editor](https://app.zenuml.com).
|
|
11
|
+
|
|
12
|
+
You can use it ZenUML on your favorite platforms and applications:
|
|
13
|
+
* [Confluence](https://marketplace.atlassian.com/apps/1218380/zenuml-diagrams-for-confluence-freemium?hosting=cloud&tab=overview)
|
|
14
|
+
* [Web App](https://app.zenuml.com/)
|
|
15
|
+
* [JetBrains Plugin](https://plugins.jetbrains.com/plugin/12437-zenuml-support)
|
|
16
|
+
* [Chrome Extension](https://chrome.google.com/webstore/detail/zenuml-sequence/kcpganeflmhffnlofpdmcjklmdpbbmef)
|
|
17
|
+
|
|
18
|
+
# Development
|
|
19
|
+
|
|
20
|
+
## TODOs
|
|
21
|
+
- [x] Rename this repository to 'core'
|
|
22
|
+
- [ ] and rename the package to @zenuml/core
|
|
23
|
+
|
|
24
|
+
````
|
|
25
|
+
yarn install
|
|
26
|
+
yarn start
|
|
27
|
+
````
|
|
28
|
+
|
|
29
|
+
## CI/CD
|
|
30
|
+
CI/CD is done with GitHub Actions. The workflow is defined in `.github/workflows/*.yml`.
|
|
31
|
+
|
|
32
|
+
## gh-pages.yml
|
|
33
|
+
This workflow has two jobs: `build` -> `deploy`.
|
|
34
|
+
|
|
35
|
+
````text
|
|
36
|
+
test -> npm publish
|
|
37
|
+
-> cy tests
|
|
38
|
+
-> build site -> deploy gh-pages
|
|
39
|
+
````
|
|
40
|
+
|
|
41
|
+
This workflow is triggered on every push to the `main` branch.
|
|
42
|
+
It will build the project and publish the `dist` folder to the `gh-pages` branch.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## Put localhost on the internet
|
|
46
|
+
We sometimes need to put our localhost on the internet so that we can test it remotely.
|
|
47
|
+
|
|
48
|
+
Ngrok is a good tool for this. It is free for personal use. But if you want to use a
|
|
49
|
+
custom domain, you have to pay. If you want to use custom domain, we suggest Cloudflare
|
|
50
|
+
tunnels for this.
|
|
51
|
+
|
|
52
|
+
### Ngrok [TODO]
|
|
53
|
+
|
|
54
|
+
### Cloudflare tunnels [for collaborators only]
|
|
55
|
+
|
|
56
|
+
1. Request a subdomain from the team. For example, `air.zenuml.com`.
|
|
57
|
+
2. You will be given a command that install a service locally. Run it.
|
|
58
|
+
3. Your localhost:8080 will be available at `air.zenuml.com`.
|
|
59
|
+
4. Add your subdomain to `vue.config.js` so that it is allowed to access the dev server.
|
|
60
|
+
|
|
61
|
+
```js
|
|
62
|
+
devServer: {
|
|
63
|
+
allowedHosts: "all",
|
|
64
|
+
historyApiFallback: true,
|
|
65
|
+
hot: true,
|
|
66
|
+
host: '0.0.0.0',
|
|
67
|
+
port: 8080,
|
|
68
|
+
client: {
|
|
69
|
+
webSocketURL: 'auto://0.0.0.0:0/ws',
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
# Code Structure
|
|
75
|
+
This repository contains both the DSL parser and the renderer.
|
|
76
|
+
|
|
77
|
+
The parser is generated with Antlr4. You can find the definition at `src/g4`. Generated parser is at `src/generated-parser`.
|
|
78
|
+
Parser enhancement with customised functionalities is in the `src/parser` folder.
|
|
79
|
+
|
|
80
|
+
Almost everything else under serc are for the renderer. The render is based on VueJs 2.x.
|
|
81
|
+
|
package/README_CN.md
ADDED
|
Binary file
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<coverage generated="1644804298327" clover="3.2.0">
|
|
3
|
+
<project timestamp="1644804298327" name="All files">
|
|
4
|
+
<metrics statements="0" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0" elements="0" coveredelements="0" complexity="0" loc="0" ncloc="0" packages="0" files="0" classes="0"/>
|
|
5
|
+
</project>
|
|
6
|
+
</coverage>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|