Skip to content

Commit

Permalink
chore: Use default export
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Aug 21, 2024
1 parent 43ffb00 commit 50a5351
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cypress/platform/flowchart-refactor.html
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@

<script type="module">
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.parseError = function (err, hash) {};

Expand Down
2 changes: 1 addition & 1 deletion cypress/platform/flowchart-sate.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@

<script type="module">
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.parseError = function (err, hash) {};

Expand Down
2 changes: 1 addition & 1 deletion cypress/platform/knsv2.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@

<script type="module">
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.parseError = function (err, hash) {
console.error('Mermaid error: ', err);
Expand Down
4 changes: 2 additions & 2 deletions cypress/platform/state-refactor.html
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@

<script type="module">
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.parseError = function (err, hash) {

Expand Down Expand Up @@ -1268,4 +1268,4 @@
</script>
</body>

</html>
</html>
4 changes: 2 additions & 2 deletions cypress/platform/viewer.js
Original file line number Diff line number Diff line change
@@ -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 layouts from './mermaid-layout-elk.esm.mjs';
import zenUml from './mermaid-zenuml.esm.mjs';
import mermaid from './mermaid.esm.mjs';

function b64ToUtf8(str) {
return decodeURIComponent(escape(window.atob(str)));
Expand Down
4 changes: 3 additions & 1 deletion packages/mermaid-layout-elk/src/layouts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { LayoutLoaderDefinition } from 'mermaid';
const loader = async () => await import(`./render.js`);
const algos = ['elk.stress', 'elk.force', 'elk.mrtree', 'elk.sporeOverlap'];

export const layouts: LayoutLoaderDefinition[] = [
const layouts: LayoutLoaderDefinition[] = [
{
name: 'elk',
loader,
Expand All @@ -15,3 +15,5 @@ export const layouts: LayoutLoaderDefinition[] = [
algorithm: algo,
})),
];

export default layouts;

0 comments on commit 50a5351

Please sign in to comment.