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

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.9be5663bfe",
3
+ "version": "0.8.4-main.abd8ff62ef",
4
4
  "description": "Mermaid markdown plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -13,6 +13,7 @@
13
13
  "sideEffects": true,
14
14
  "type": "module",
15
15
  "imports": {
16
+ "#plugin": "./src/MermaidPlugin.tsx",
16
17
  "#meta": "./src/meta.ts"
17
18
  },
18
19
  "exports": {
@@ -23,9 +24,6 @@
23
24
  }
24
25
  },
25
26
  "types": "dist/types/src/index.d.ts",
26
- "typesVersions": {
27
- "*": {}
28
- },
29
27
  "files": [
30
28
  "dist",
31
29
  "src"
@@ -35,13 +33,13 @@
35
33
  "@codemirror/state": "^6.5.2",
36
34
  "@codemirror/view": "^6.38.4",
37
35
  "mermaid": "^10.9.4",
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"
36
+ "@dxos/app-framework": "0.8.4-main.abd8ff62ef",
37
+ "@dxos/plugin-markdown": "0.8.4-main.abd8ff62ef",
38
+ "@dxos/plugin-space": "0.8.4-main.abd8ff62ef",
39
+ "@dxos/react-ui-editor": "0.8.4-main.abd8ff62ef",
40
+ "@dxos/ui-editor": "0.8.4-main.abd8ff62ef",
41
+ "@dxos/util": "0.8.4-main.abd8ff62ef",
42
+ "@dxos/operation": "0.8.4-main.abd8ff62ef"
45
43
  },
46
44
  "devDependencies": {
47
45
  "@types/react": "~19.2.7",
@@ -49,18 +47,18 @@
49
47
  "effect": "3.20.0",
50
48
  "react": "~19.2.3",
51
49
  "react-dom": "~19.2.3",
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"
50
+ "vite": "^8.0.10",
51
+ "@dxos/echo": "0.8.4-main.abd8ff62ef",
52
+ "@dxos/react-ui": "0.8.4-main.abd8ff62ef",
53
+ "@dxos/storybook-utils": "0.8.4-main.abd8ff62ef",
54
+ "@dxos/ui-theme": "0.8.4-main.abd8ff62ef"
57
55
  },
58
56
  "peerDependencies": {
59
57
  "effect": "3.20.0",
60
58
  "react": "~19.2.3",
61
59
  "react-dom": "~19.2.3",
62
- "@dxos/react-ui": "0.8.4-main.9be5663bfe",
63
- "@dxos/ui-theme": "0.8.4-main.9be5663bfe"
60
+ "@dxos/react-ui": "0.8.4-main.abd8ff62ef",
61
+ "@dxos/ui-theme": "0.8.4-main.abd8ff62ef"
64
62
  },
65
63
  "publishConfig": {
66
64
  "access": "public"
@@ -0,0 +1,30 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { describe, test } from 'vitest';
6
+
7
+ import { OperationPlugin, RuntimePlugin } from '@dxos/app-framework';
8
+ import { createTestApp } from '@dxos/app-framework/testing';
9
+ import { MarkdownEvents } from '@dxos/plugin-markdown';
10
+
11
+ import { MermaidPlugin } from '#plugin';
12
+
13
+ import { meta } from './meta';
14
+
15
+ const moduleId = (name: string) => `${meta.id}.module.${name}`;
16
+
17
+ describe('MermaidPlugin', () => {
18
+ test('modules activate on the expected events', async ({ expect }) => {
19
+ // Use createTestApp directly — only RuntimePlugin and OperationPlugin are needed.
20
+ // MermaidPlugin has no surface module so SetupReactSurface firing harmlessly is fine.
21
+ await using harness = await createTestApp({
22
+ plugins: [OperationPlugin(), RuntimePlugin(), MermaidPlugin()],
23
+ });
24
+
25
+ // The markdown module activates on MarkdownEvents.SetupExtensions,
26
+ // which is fired by MarkdownPlugin before its ReactSurface activates.
27
+ await harness.fire(MarkdownEvents.SetupExtensions);
28
+ expect(harness.manager.getActive()).toContain(moduleId('markdown'));
29
+ });
30
+ });
@@ -5,7 +5,7 @@
5
5
  import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capability, Plugin } from '@dxos/app-framework';
8
- import { MarkdownCapabilities, MarkdownEvents } from '@dxos/plugin-markdown';
8
+ import { MarkdownCapabilities, MarkdownEvents } from '@dxos/plugin-markdown/types';
9
9
 
10
10
  import { meta } from '#meta';
11
11
 
@@ -19,3 +19,5 @@ export const MermaidPlugin = Plugin.define(meta).pipe(
19
19
  }),
20
20
  Plugin.make,
21
21
  );
22
+
23
+ export default MermaidPlugin;
package/src/index.ts CHANGED
@@ -2,5 +2,10 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- export * from './MermaidPlugin';
5
+ import { Plugin } from '@dxos/app-framework';
6
+
7
+ import { meta } from './meta';
8
+
9
+ export const MermaidPlugin = Plugin.lazy(meta, () => import('./MermaidPlugin'));
10
+
6
11
  export * from './meta';