Skip to content

Commit

Permalink
Merge 05a594a into 56add07
Browse files Browse the repository at this point in the history
  • Loading branch information
knsv committed Oct 3, 2022
2 parents 56add07 + 05a594a commit fcac931
Show file tree
Hide file tree
Showing 14 changed files with 183 additions and 480 deletions.
2 changes: 1 addition & 1 deletion .vite/server.ts
Expand Up @@ -12,10 +12,10 @@ async function createServer() {
appType: 'custom', // don't include Vite's default HTML handling middlewares
});

app.use(vite.middlewares);
app.use(express.static('./packages/mermaid/dist'));
app.use(express.static('./packages/mermaid-example-diagram/dist'));
app.use(express.static('./packages/mermaid-mindmap/dist'));
app.use(vite.middlewares);
app.use(express.static('demos'));
app.use(express.static('cypress/platform'));

Expand Down
4 changes: 4 additions & 0 deletions cypress/platform/knsv.html
Expand Up @@ -6,6 +6,10 @@
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
/>
<link
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
rel="stylesheet"
Expand Down
10 changes: 8 additions & 2 deletions cypress/platform/knsv2.html
Expand Up @@ -6,6 +6,10 @@
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
/>
<link
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
rel="stylesheet"
Expand Down Expand Up @@ -63,9 +67,11 @@
::icon(mdi mdi-fire)
gc6((grand<br/>child 6))
::icon(mdi mdi-fire)
gc7((grand<br/>grand<br/>child 8))
</pre>
<script src="./mermaid-mindmap-detector.js"></script>
<script src="./mermaid-example-diagram-detector.js"></script>
<!-- <div id="cy"></div> -->
<script src="http://localhost:9000/packages/mermaid-mindmap/dist/mermaid-mindmap-detector.js"></script>
<!-- <script src="./mermaid-example-diagram-detector.js"></script> -->
<script src="./mermaid.js"></script>
<script>
mermaid.parseError = function (err, hash) {
Expand Down
4 changes: 2 additions & 2 deletions packages/mermaid-example-diagram/src/exampleDiagram.spec.js
Expand Up @@ -7,8 +7,8 @@ describe('when parsing an info graph it', function () {
ex.yy = db;
});

it('should handle an info definition', function () {
let str = `info
it('should handle an example-diagram definition', function () {
let str = `example-diagram
showInfo`;

ex.parse(str);
Expand Down
2 changes: 2 additions & 0 deletions packages/mermaid-mindmap/package.json
Expand Up @@ -55,6 +55,8 @@
"dependencies": {
"@braintree/sanitize-url": "^6.0.0",
"cytoscape": "^3.23.0",
"cytoscape-cose-bilkent": "^4.1.0",
"cytoscape-fcose": "^2.1.0",
"d3": "^7.0.0",
"non-layered-tidy-tree-layout": "^2.0.2"
},
Expand Down
6 changes: 0 additions & 6 deletions packages/mermaid-mindmap/src/add-diagram.ts
Expand Up @@ -5,12 +5,6 @@ import mindmapRenderer from './mindmapRenderer';
import mindmapStyles from './styles';
import { injectUtils } from './mermaidUtils';

// const getBaseFolder = (path: string) => {
// const parts = path.split('/');
// parts.pop();
// return parts.join('/');
// };

window.mermaid.connectDiagram(
'mindmap',
{
Expand Down
20 changes: 1 addition & 19 deletions packages/mermaid-mindmap/src/mindmapDb.js
Expand Up @@ -132,11 +132,7 @@ export const type2Str = (type) => {
}
};

export let parseError; // = (str, hash)
// => {
// const error = { str, hash };
// throw error;
// };
export let parseError;
export const setErrorHandler = (handler) => {
parseError = handler;
};
Expand All @@ -146,17 +142,3 @@ export const getLogger = () => log;

export const getNodeById = (id) => nodes[id];
export const getElementById = (id) => elements[id];
// export default {
// // getMindmap,
// // addNode,
// // clear,
// // nodeType,
// // getType,
// // decorateNode,
// // setElementForId,
// getElementById: (id) => elements[id],
// // getNodeById: (id) => nodes.find((node) => node.id === id),
// getNodeById: (id) => nodes[id],
// // type2Str,
// // parseError
// };
8 changes: 0 additions & 8 deletions packages/mermaid-mindmap/src/mindmapDetector.old

This file was deleted.

0 comments on commit fcac931

Please sign in to comment.