@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.
Files changed (97) hide show
  1. package/Integration/vanilla-js/index.html +31 -0
  2. package/LICENSE +21 -0
  3. package/README.md +81 -0
  4. package/README_CN.md +15 -0
  5. package/antlr/antlr-4.8-complete.jar +0 -0
  6. package/coverage/clover.xml +6 -0
  7. package/coverage/coverage-final.json +1 -0
  8. package/coverage/lcov-report/Interaction.vue.html +532 -0
  9. package/coverage/lcov-report/Owner.js.html +175 -0
  10. package/coverage/lcov-report/base.css +224 -0
  11. package/coverage/lcov-report/block-navigation.js +79 -0
  12. package/coverage/lcov-report/components/interaction/Interaction.vue.html +544 -0
  13. package/coverage/lcov-report/components/interaction/index.html +110 -0
  14. package/coverage/lcov-report/index.html +95 -0
  15. package/coverage/lcov-report/positioning/david/DavidEisenstat2.ts.html +196 -0
  16. package/coverage/lcov-report/positioning/david/index.html +110 -0
  17. package/coverage/lcov-report/prettify.css +1 -0
  18. package/coverage/lcov-report/prettify.js +2 -0
  19. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  20. package/coverage/lcov-report/sorter.js +170 -0
  21. package/coverage/lcov.info +0 -0
  22. package/cypress/fixtures/example.json +5 -0
  23. package/cypress/fixtures/profile.json +5 -0
  24. package/cypress/fixtures/users.json +232 -0
  25. package/cypress/integration/__image_snapshots__/Smoke test creation #0.png +0 -0
  26. package/cypress/integration/__image_snapshots__/Smoke test fragment #0.png +0 -0
  27. package/cypress/integration/__image_snapshots__/Smoke test fragmentIssue #0.png +0 -0
  28. package/cypress/integration/__image_snapshots__/Smoke test interaction #0.png +0 -0
  29. package/cypress/integration/__image_snapshots__/Smoke test return #0.png +0 -0
  30. package/cypress/integration/__image_snapshots__/Smoke test return #1.png +0 -0
  31. package/cypress/integration/__image_snapshots__/Smoke test should load the home page #0.png +0 -0
  32. package/cypress/integration/smoke.spec.js +64 -0
  33. package/cypress/plugins/index.js +30 -0
  34. package/cypress/support/commands.js +25 -0
  35. package/cypress/support/index.js +20 -0
  36. package/cypress/videos/smoke.spec.js.mp4 +0 -0
  37. package/cypress.json +7 -0
  38. package/dist/fonts/kalam-v15-latin-300.00bd845e.woff2 +0 -0
  39. package/dist/fonts/kalam-v15-latin-300.1c36b0ad.woff +0 -0
  40. package/dist/fonts/kalam-v15-latin-700.2a87f463.woff2 +0 -0
  41. package/dist/fonts/kalam-v15-latin-700.9ec0bbf1.woff +0 -0
  42. package/dist/fonts/kalam-v15-latin-regular.4c0c4df4.woff +0 -0
  43. package/dist/fonts/kalam-v15-latin-regular.e4d4907f.woff2 +0 -0
  44. package/dist/vue-sequence.css +7 -0
  45. package/dist/vue-sequence.umd.min.js +12 -0
  46. package/docs/asciidoc/contributor.adoc +79 -0
  47. package/docs/asciidoc/create-my-own-theme.adoc +25 -0
  48. package/docs/asciidoc/images/creation-component.png +0 -0
  49. package/docs/asciidoc/images/creation-rtl.png +0 -0
  50. package/docs/asciidoc/images/message-arrow-rtl.png +0 -0
  51. package/docs/asciidoc/images/occurrence.png +0 -0
  52. package/docs/asciidoc/images/return-message-conflict.png +0 -0
  53. package/docs/asciidoc/images/shift-up-half-the-height.png +0 -0
  54. package/docs/asciidoc/images/vertical-alignment.svg +1 -0
  55. package/docs/asciidoc/images/vertically-aligning.png +0 -0
  56. package/docs/asciidoc/index.adoc +277 -0
  57. package/docs/asciidoc/integration-guide.adoc +121 -0
  58. package/docs/asciidoc/tutorial.adoc +22 -0
  59. package/docs/async-vs-sync-parser-rules.md +78 -0
  60. package/docs/handling-starter.png +0 -0
  61. package/docs/highlighting-messages.md +47 -0
  62. package/docs/inherited-vs-provided-from.md +59 -0
  63. package/docs/invalid-host-header-error.md +20 -0
  64. package/docs/osx-unsupported-arm64-node12.md +13 -0
  65. package/docs/participants-function.md +27 -0
  66. package/docs/responsive-participant-margin.md +52 -0
  67. package/docs/starter.md +8 -0
  68. package/docs/testing-minified-lib.md +29 -0
  69. package/docs/watch.md +1 -0
  70. package/docs/why-we-publish-embed-view-to-github-pages.md +15 -0
  71. package/docs/width-translate-and-offsets.md +54 -0
  72. package/gen/css3.interp +214 -0
  73. package/gen/css3.tokens +92 -0
  74. package/gen/css3BaseListener.java +1106 -0
  75. package/gen/css3BaseVisitor.java +636 -0
  76. package/gen/css3Lexer.interp +251 -0
  77. package/gen/css3Lexer.java +672 -0
  78. package/gen/css3Lexer.tokens +92 -0
  79. package/gen/css3Listener.java +939 -0
  80. package/gen/css3Parser.java +8113 -0
  81. package/gen/css3Visitor.java +566 -0
  82. package/gen/sequenceLexer.interp +206 -0
  83. package/gen/sequenceLexer.java +419 -0
  84. package/gen/sequenceLexer.tokens +104 -0
  85. package/gen/sequenceParser.interp +180 -0
  86. package/gen/sequenceParser.java +4659 -0
  87. package/gen/sequenceParser.tokens +101 -0
  88. package/gen/sequenceParserBaseListener.java +830 -0
  89. package/gen/sequenceParserBaseVisitor.java +475 -0
  90. package/gen/sequenceParserListener.java +703 -0
  91. package/gen/sequenceParserVisitor.java +425 -0
  92. package/package.json +133 -0
  93. package/playground/creation.html +32 -0
  94. package/playground/message.html +39 -0
  95. package/tailwind.config.js +15 -0
  96. package/types/index.d.ts +34 -0
  97. 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
@@ -0,0 +1,15 @@
1
+ # Development
2
+
3
+ ````
4
+ yarn install
5
+ yarn start
6
+ ````
7
+
8
+ # 代码结构
9
+
10
+ DSL解析器和渲染器都在这个代码库中。
11
+
12
+ DSL解析器是基于Antlr4构建的。其定义文件位于`src/g4`。生成的解析器位于 `src/generated-parser`。
13
+ 对解析器的增强相关的代码位于`src/parser`文件夹。
14
+
15
+ 所有其他的文件基本上都是跟渲染器相关的。渲染器是基于VueJs 2.x开发的。
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
+ {}