mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
chore: Use default export
This commit is contained in:
parent
43ffb00996
commit
50a535125e
@ -822,7 +822,7 @@ flowchart LR
|
|||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import mermaid from './mermaid.esm.mjs';
|
import mermaid from './mermaid.esm.mjs';
|
||||||
import { layouts } from './mermaid-layout-elk.esm.mjs';
|
import layouts from './mermaid-layout-elk.esm.mjs';
|
||||||
mermaid.registerLayoutLoaders(layouts);
|
mermaid.registerLayoutLoaders(layouts);
|
||||||
mermaid.parseError = function (err, hash) {};
|
mermaid.parseError = function (err, hash) {};
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ flowchart LR
|
|||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import mermaid from './mermaid.esm.mjs';
|
import mermaid from './mermaid.esm.mjs';
|
||||||
import { layouts } from './mermaid-layout-elk.esm.mjs';
|
import layouts from './mermaid-layout-elk.esm.mjs';
|
||||||
mermaid.registerLayoutLoaders(layouts);
|
mermaid.registerLayoutLoaders(layouts);
|
||||||
mermaid.parseError = function (err, hash) {};
|
mermaid.parseError = function (err, hash) {};
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ flowchart LR
|
|||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import mermaid from './mermaid.esm.mjs';
|
import mermaid from './mermaid.esm.mjs';
|
||||||
// import { layouts } from './mermaid-layout-elk.esm.mjs';
|
// import layouts from './mermaid-layout-elk.esm.mjs';
|
||||||
// mermaid.registerLayoutLoaders(layouts);
|
// mermaid.registerLayoutLoaders(layouts);
|
||||||
mermaid.parseError = function (err, hash) {
|
mermaid.parseError = function (err, hash) {
|
||||||
console.error('Mermaid error: ', err);
|
console.error('Mermaid error: ', err);
|
||||||
|
@ -1222,7 +1222,7 @@ direction LR
|
|||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import mermaid from './mermaid.esm.mjs';
|
import mermaid from './mermaid.esm.mjs';
|
||||||
import { layouts } from './mermaid-layout-elk.esm.mjs';
|
import layouts from './mermaid-layout-elk.esm.mjs';
|
||||||
mermaid.registerLayoutLoaders(layouts);
|
mermaid.registerLayoutLoaders(layouts);
|
||||||
mermaid.parseError = function (err, hash) {
|
mermaid.parseError = function (err, hash) {
|
||||||
|
|
||||||
@ -1268,4 +1268,4 @@ direction LR
|
|||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import mermaid from './mermaid.esm.mjs';
|
|
||||||
import { layouts } from './mermaid-layout-elk.esm.mjs';
|
|
||||||
import externalExample from './mermaid-example-diagram.esm.mjs';
|
import externalExample from './mermaid-example-diagram.esm.mjs';
|
||||||
|
import layouts from './mermaid-layout-elk.esm.mjs';
|
||||||
import zenUml from './mermaid-zenuml.esm.mjs';
|
import zenUml from './mermaid-zenuml.esm.mjs';
|
||||||
|
import mermaid from './mermaid.esm.mjs';
|
||||||
|
|
||||||
function b64ToUtf8(str) {
|
function b64ToUtf8(str) {
|
||||||
return decodeURIComponent(escape(window.atob(str)));
|
return decodeURIComponent(escape(window.atob(str)));
|
||||||
|
@ -3,7 +3,7 @@ import type { LayoutLoaderDefinition } from 'mermaid';
|
|||||||
const loader = async () => await import(`./render.js`);
|
const loader = async () => await import(`./render.js`);
|
||||||
const algos = ['elk.stress', 'elk.force', 'elk.mrtree', 'elk.sporeOverlap'];
|
const algos = ['elk.stress', 'elk.force', 'elk.mrtree', 'elk.sporeOverlap'];
|
||||||
|
|
||||||
export const layouts: LayoutLoaderDefinition[] = [
|
const layouts: LayoutLoaderDefinition[] = [
|
||||||
{
|
{
|
||||||
name: 'elk',
|
name: 'elk',
|
||||||
loader,
|
loader,
|
||||||
@ -15,3 +15,5 @@ export const layouts: LayoutLoaderDefinition[] = [
|
|||||||
algorithm: algo,
|
algorithm: algo,
|
||||||
})),
|
})),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export default layouts;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user