@dxos/plugin-mermaid 0.8.4-main.9735255 → 0.8.4-main.9be5663bfe

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-mermaid",
3
- "version": "0.8.4-main.9735255",
3
+ "version": "0.8.4-main.9be5663bfe",
4
4
  "description": "Mermaid markdown plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -12,6 +12,9 @@
12
12
  "author": "DXOS.org",
13
13
  "sideEffects": true,
14
14
  "type": "module",
15
+ "imports": {
16
+ "#meta": "./src/meta.ts"
17
+ },
15
18
  "exports": {
16
19
  ".": {
17
20
  "source": "./src/index.ts",
@@ -32,32 +35,32 @@
32
35
  "@codemirror/state": "^6.5.2",
33
36
  "@codemirror/view": "^6.38.4",
34
37
  "mermaid": "^10.9.4",
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"
38
+ "@dxos/operation": "0.8.4-main.9be5663bfe",
39
+ "@dxos/plugin-markdown": "0.8.4-main.9be5663bfe",
40
+ "@dxos/react-ui-editor": "0.8.4-main.9be5663bfe",
41
+ "@dxos/ui-editor": "0.8.4-main.9be5663bfe",
42
+ "@dxos/app-framework": "0.8.4-main.9be5663bfe",
43
+ "@dxos/plugin-space": "0.8.4-main.9be5663bfe",
44
+ "@dxos/util": "0.8.4-main.9be5663bfe"
42
45
  },
43
46
  "devDependencies": {
44
47
  "@types/react": "~19.2.7",
45
48
  "@types/react-dom": "~19.2.3",
46
- "effect": "3.19.11",
49
+ "effect": "3.20.0",
47
50
  "react": "~19.2.3",
48
51
  "react-dom": "~19.2.3",
49
- "vite": "7.1.9",
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"
52
+ "vite": "^7.1.11",
53
+ "@dxos/react-ui": "0.8.4-main.9be5663bfe",
54
+ "@dxos/storybook-utils": "0.8.4-main.9be5663bfe",
55
+ "@dxos/echo": "0.8.4-main.9be5663bfe",
56
+ "@dxos/ui-theme": "0.8.4-main.9be5663bfe"
54
57
  },
55
58
  "peerDependencies": {
56
- "effect": "3.19.11",
59
+ "effect": "3.20.0",
57
60
  "react": "~19.2.3",
58
61
  "react-dom": "~19.2.3",
59
- "@dxos/react-ui": "0.8.4-main.9735255",
60
- "@dxos/ui-theme": "0.8.4-main.9735255"
62
+ "@dxos/react-ui": "0.8.4-main.9be5663bfe",
63
+ "@dxos/ui-theme": "0.8.4-main.9be5663bfe"
61
64
  },
62
65
  "publishConfig": {
63
66
  "access": "public"
@@ -7,8 +7,9 @@ import * as Effect from 'effect/Effect';
7
7
  import { Capability, Plugin } from '@dxos/app-framework';
8
8
  import { MarkdownCapabilities, MarkdownEvents } from '@dxos/plugin-markdown';
9
9
 
10
+ import { meta } from '#meta';
11
+
10
12
  import { mermaid } from './extensions';
11
- import { meta } from './meta';
12
13
 
13
14
  export const MermaidPlugin = Plugin.define(meta).pipe(
14
15
  Plugin.addModule({
@@ -112,18 +112,18 @@ export const mermaid = (_options: MermaidOptions = {}): Extension => {
112
112
  maring: '4px 0',
113
113
  padding: '16px',
114
114
  justifyContent: 'center',
115
- backgroundColor: 'var(--dx-groupSurface)',
115
+ backgroundColor: 'var(--color-group-surface)',
116
116
  borderRadius: '8px',
117
117
  },
118
118
  '& .cm-mermaid-label': {
119
119
  position: 'absolute',
120
120
  right: '16px',
121
121
  fontFamily: 'unset',
122
- color: 'var(--dx-subdued)',
122
+ color: 'var(--color-subdued)',
123
123
  },
124
124
  '& .cm-mermaid-error': {
125
125
  display: 'inline-block',
126
- color: 'var(--dx-errorText)',
126
+ color: 'var(--color-error)',
127
127
  },
128
128
  '& .cm-mermaid-hidden': {
129
129
  display: 'none !important',
@@ -6,8 +6,8 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React from 'react';
7
7
 
8
8
  import { useThemeContext } from '@dxos/react-ui';
9
- import { withLayout, withTheme } from '@dxos/react-ui/testing';
10
9
  import { useTextEditor } from '@dxos/react-ui-editor';
10
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
11
11
  import {
12
12
  createBasicExtensions,
13
13
  createMarkdownExtensions,
@@ -19,11 +19,11 @@ import { mermaid } from './mermaid-extension';
19
19
 
20
20
  const str = (...lines: string[]) => lines.join('\n');
21
21
 
22
- type StoryProps = {
22
+ type DefaultStoryProps = {
23
23
  text?: string;
24
24
  };
25
25
 
26
- const DefaultStory = ({ text }: StoryProps) => {
26
+ const DefaultStory = ({ text }: DefaultStoryProps) => {
27
27
  const { themeMode } = useThemeContext();
28
28
  const { parentRef, focusAttributes } = useTextEditor(
29
29
  () => ({
@@ -39,13 +39,13 @@ const DefaultStory = ({ text }: StoryProps) => {
39
39
  [themeMode],
40
40
  );
41
41
 
42
- return <div className='is-[50rem]' ref={parentRef} {...focusAttributes} />;
42
+ return <div className='w-[50rem]' ref={parentRef} {...focusAttributes} />;
43
43
  };
44
44
 
45
45
  const meta = {
46
- title: 'plugins/plugin-mermaid/extensions',
46
+ title: 'plugins/plugin-mermaid/extensions/mermaid',
47
47
  render: DefaultStory,
48
- decorators: [withTheme, withLayout({ layout: 'column' })],
48
+ decorators: [withTheme(), withLayout({ layout: 'column' })],
49
49
  } satisfies Meta<typeof DefaultStory>;
50
50
 
51
51
  export default meta;
package/src/meta.ts CHANGED
@@ -6,7 +6,7 @@ import { type Plugin } from '@dxos/app-framework';
6
6
  import { trim } from '@dxos/util';
7
7
 
8
8
  export const meta: Plugin.Meta = {
9
- id: 'dxos.org/plugin/mermaid',
9
+ id: 'org.dxos.plugin.mermaid',
10
10
  name: 'Mermaid',
11
11
  description: trim`
12
12
  Generate diagrams from simple text-based definitions using Mermaid syntax.