@dxos/plugin-mermaid 0.8.4-main.dedc0f3 → 0.8.4-main.ead640a
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/dist/lib/browser/index.mjs +2 -4
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/MermaidPlugin.d.ts +1 -1
- package/dist/types/src/MermaidPlugin.d.ts.map +1 -1
- package/dist/types/src/extensions/mermaid.stories.d.ts +0 -1
- package/dist/types/src/extensions/mermaid.stories.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +21 -21
- package/src/MermaidPlugin.tsx +7 -8
- package/src/extensions/mermaid.stories.tsx +2 -10
- package/src/meta.ts +1 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-mermaid",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.ead640a",
|
|
4
4
|
"description": "Mermaid markdown plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -26,32 +26,32 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@codemirror/language": "^6.11.3",
|
|
28
28
|
"@codemirror/state": "^6.5.2",
|
|
29
|
-
"@codemirror/view": "^6.38.
|
|
29
|
+
"@codemirror/view": "^6.38.4",
|
|
30
30
|
"@preact-signals/safe-react": "^0.9.0",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/plugin-markdown": "0.8.4-main.dedc0f3"
|
|
31
|
+
"mermaid": "^10.9.4",
|
|
32
|
+
"@dxos/app-framework": "0.8.4-main.ead640a",
|
|
33
|
+
"@dxos/plugin-markdown": "0.8.4-main.ead640a",
|
|
34
|
+
"@dxos/plugin-space": "0.8.4-main.ead640a",
|
|
35
|
+
"@dxos/react-ui-editor": "0.8.4-main.ead640a"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
39
|
-
"@types/react": "~
|
|
40
|
-
"@types/react-dom": "~
|
|
41
|
-
"
|
|
42
|
-
"react
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"@dxos/echo
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
38
|
+
"@types/react": "~19.2.2",
|
|
39
|
+
"@types/react-dom": "~19.2.1",
|
|
40
|
+
"effect": "3.18.3",
|
|
41
|
+
"react": "~19.2.0",
|
|
42
|
+
"react-dom": "~19.2.0",
|
|
43
|
+
"vite": "7.1.9",
|
|
44
|
+
"@dxos/echo": "0.8.4-main.ead640a",
|
|
45
|
+
"@dxos/react-ui": "0.8.4-main.ead640a",
|
|
46
|
+
"@dxos/react-ui-theme": "0.8.4-main.ead640a",
|
|
47
|
+
"@dxos/storybook-utils": "0.8.4-main.ead640a"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"effect": "^3.13.3",
|
|
51
|
-
"react": "
|
|
52
|
-
"react-dom": "
|
|
53
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
54
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
51
|
+
"react": "^19.0.0",
|
|
52
|
+
"react-dom": "^19.0.0",
|
|
53
|
+
"@dxos/react-ui": "0.8.4-main.ead640a",
|
|
54
|
+
"@dxos/react-ui-theme": "0.8.4-main.ead640a"
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
package/src/MermaidPlugin.tsx
CHANGED
|
@@ -8,11 +8,10 @@ import { MarkdownCapabilities, MarkdownEvents } from '@dxos/plugin-markdown';
|
|
|
8
8
|
import { mermaid } from './extensions';
|
|
9
9
|
import { meta } from './meta';
|
|
10
10
|
|
|
11
|
-
export const MermaidPlugin = () =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
]);
|
|
11
|
+
export const MermaidPlugin = definePlugin(meta, () => [
|
|
12
|
+
defineModule({
|
|
13
|
+
id: `${meta.id}/module/markdown`,
|
|
14
|
+
activatesOn: MarkdownEvents.SetupExtensions,
|
|
15
|
+
activate: () => contributes(MarkdownCapabilities.Extensions, [mermaid]),
|
|
16
|
+
}),
|
|
17
|
+
]);
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
10
8
|
import { useThemeContext } from '@dxos/react-ui';
|
|
9
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
11
10
|
import {
|
|
12
11
|
createBasicExtensions,
|
|
13
12
|
createMarkdownExtensions,
|
|
@@ -15,7 +14,6 @@ import {
|
|
|
15
14
|
decorateMarkdown,
|
|
16
15
|
useTextEditor,
|
|
17
16
|
} from '@dxos/react-ui-editor';
|
|
18
|
-
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
19
17
|
|
|
20
18
|
import { mermaid } from './mermaid-extension';
|
|
21
19
|
|
|
@@ -47,13 +45,7 @@ const DefaultStory = ({ text }: StoryProps) => {
|
|
|
47
45
|
const meta = {
|
|
48
46
|
title: 'plugins/plugin-mermaid/extensions',
|
|
49
47
|
render: DefaultStory,
|
|
50
|
-
decorators: [
|
|
51
|
-
withTheme,
|
|
52
|
-
withLayout({
|
|
53
|
-
fullscreen: true,
|
|
54
|
-
classNames: 'justify-center',
|
|
55
|
-
}),
|
|
56
|
-
],
|
|
48
|
+
decorators: [withTheme, withLayout({ container: 'column' })],
|
|
57
49
|
} satisfies Meta<typeof DefaultStory>;
|
|
58
50
|
|
|
59
51
|
export default meta;
|
package/src/meta.ts
CHANGED
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { type PluginMeta } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
export const MERMAID_PLUGIN = 'dxos.org/plugin/mermaid';
|
|
8
|
-
|
|
9
7
|
export const meta: PluginMeta = {
|
|
10
|
-
id:
|
|
8
|
+
id: 'dxos.org/plugin/mermaid',
|
|
11
9
|
name: 'Mermaid',
|
|
12
10
|
description: 'Tool that renders text definitions to create diagrams.',
|
|
13
11
|
icon: 'ph--anchor-simple--regular',
|