@dxos/plugin-mermaid 0.8.4-main.7ace549 → 0.8.4-main.9735255
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 +9 -10
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/MermaidPlugin.d.ts +2 -1
- package/dist/types/src/MermaidPlugin.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -21
- package/src/MermaidPlugin.tsx +9 -6
- package/src/extensions/mermaid.stories.tsx +3 -3
- package/src/meta.ts +2 -2
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-mermaid",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.9735255",
|
|
4
4
|
"description": "Mermaid markdown plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"author": "DXOS.org",
|
|
9
13
|
"sideEffects": true,
|
|
@@ -27,32 +31,33 @@
|
|
|
27
31
|
"@codemirror/language": "^6.11.3",
|
|
28
32
|
"@codemirror/state": "^6.5.2",
|
|
29
33
|
"@codemirror/view": "^6.38.4",
|
|
30
|
-
"@preact-signals/safe-react": "^0.9.0",
|
|
31
34
|
"mermaid": "^10.9.4",
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/
|
|
35
|
+
"@dxos/app-framework": "0.8.4-main.9735255",
|
|
36
|
+
"@dxos/operation": "0.8.4-main.9735255",
|
|
37
|
+
"@dxos/plugin-markdown": "0.8.4-main.9735255",
|
|
38
|
+
"@dxos/react-ui-editor": "0.8.4-main.9735255",
|
|
39
|
+
"@dxos/ui-editor": "0.8.4-main.9735255",
|
|
40
|
+
"@dxos/plugin-space": "0.8.4-main.9735255",
|
|
41
|
+
"@dxos/util": "0.8.4-main.9735255"
|
|
37
42
|
},
|
|
38
43
|
"devDependencies": {
|
|
39
|
-
"@types/react": "~19.2.
|
|
40
|
-
"@types/react-dom": "~19.2.
|
|
41
|
-
"effect": "3.
|
|
42
|
-
"react": "~19.2.
|
|
43
|
-
"react-dom": "~19.2.
|
|
44
|
+
"@types/react": "~19.2.7",
|
|
45
|
+
"@types/react-dom": "~19.2.3",
|
|
46
|
+
"effect": "3.19.11",
|
|
47
|
+
"react": "~19.2.3",
|
|
48
|
+
"react-dom": "~19.2.3",
|
|
44
49
|
"vite": "7.1.9",
|
|
45
|
-
"@dxos/echo": "0.8.4-main.
|
|
46
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
50
|
+
"@dxos/echo": "0.8.4-main.9735255",
|
|
51
|
+
"@dxos/react-ui": "0.8.4-main.9735255",
|
|
52
|
+
"@dxos/storybook-utils": "0.8.4-main.9735255",
|
|
53
|
+
"@dxos/ui-theme": "0.8.4-main.9735255"
|
|
49
54
|
},
|
|
50
55
|
"peerDependencies": {
|
|
51
|
-
"effect": "
|
|
52
|
-
"react": "
|
|
53
|
-
"react-dom": "
|
|
54
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
55
|
-
"@dxos/
|
|
56
|
+
"effect": "3.19.11",
|
|
57
|
+
"react": "~19.2.3",
|
|
58
|
+
"react-dom": "~19.2.3",
|
|
59
|
+
"@dxos/react-ui": "0.8.4-main.9735255",
|
|
60
|
+
"@dxos/ui-theme": "0.8.4-main.9735255"
|
|
56
61
|
},
|
|
57
62
|
"publishConfig": {
|
|
58
63
|
"access": "public"
|
package/src/MermaidPlugin.tsx
CHANGED
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability, Plugin } from '@dxos/app-framework';
|
|
6
8
|
import { MarkdownCapabilities, MarkdownEvents } from '@dxos/plugin-markdown';
|
|
7
9
|
|
|
8
10
|
import { mermaid } from './extensions';
|
|
9
11
|
import { meta } from './meta';
|
|
10
12
|
|
|
11
|
-
export const MermaidPlugin =
|
|
12
|
-
|
|
13
|
-
id:
|
|
13
|
+
export const MermaidPlugin = Plugin.define(meta).pipe(
|
|
14
|
+
Plugin.addModule({
|
|
15
|
+
id: 'markdown',
|
|
14
16
|
activatesOn: MarkdownEvents.SetupExtensions,
|
|
15
|
-
activate: () => contributes(MarkdownCapabilities.Extensions, [mermaid]),
|
|
17
|
+
activate: () => Effect.succeed(Capability.contributes(MarkdownCapabilities.Extensions, [mermaid])),
|
|
16
18
|
}),
|
|
17
|
-
|
|
19
|
+
Plugin.make,
|
|
20
|
+
);
|
|
@@ -7,13 +7,13 @@ import React from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { useThemeContext } from '@dxos/react-ui';
|
|
9
9
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
10
|
+
import { useTextEditor } from '@dxos/react-ui-editor';
|
|
10
11
|
import {
|
|
11
12
|
createBasicExtensions,
|
|
12
13
|
createMarkdownExtensions,
|
|
13
14
|
createThemeExtensions,
|
|
14
15
|
decorateMarkdown,
|
|
15
|
-
|
|
16
|
-
} from '@dxos/react-ui-editor';
|
|
16
|
+
} from '@dxos/ui-editor';
|
|
17
17
|
|
|
18
18
|
import { mermaid } from './mermaid-extension';
|
|
19
19
|
|
|
@@ -45,7 +45,7 @@ const DefaultStory = ({ text }: StoryProps) => {
|
|
|
45
45
|
const meta = {
|
|
46
46
|
title: 'plugins/plugin-mermaid/extensions',
|
|
47
47
|
render: DefaultStory,
|
|
48
|
-
decorators: [withTheme, withLayout({
|
|
48
|
+
decorators: [withTheme, withLayout({ layout: 'column' })],
|
|
49
49
|
} satisfies Meta<typeof DefaultStory>;
|
|
50
50
|
|
|
51
51
|
export default meta;
|
package/src/meta.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type
|
|
5
|
+
import { type Plugin } from '@dxos/app-framework';
|
|
6
6
|
import { trim } from '@dxos/util';
|
|
7
7
|
|
|
8
|
-
export const meta:
|
|
8
|
+
export const meta: Plugin.Meta = {
|
|
9
9
|
id: 'dxos.org/plugin/mermaid',
|
|
10
10
|
name: 'Mermaid',
|
|
11
11
|
description: trim`
|