@dxos/plugin-mermaid 0.9.0 → 0.9.1-staging.ee54ba693a

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.
@@ -5,7 +5,7 @@ import { MarkdownEvents } from "@dxos/plugin-markdown";
5
5
  import { MarkdownExtension } from "#capabilities";
6
6
  import { meta } from "#meta";
7
7
 
8
- // raw-loader:/__w/dxos/dxos/packages/plugins/plugin-mermaid/PLUGIN.mdl?raw
8
+ // raw-loader:/__w/dxos/dxos/packages/plugins/plugin-mermaid/PLUGIN.mdl
9
9
  var PLUGIN_default = "---\nid: org.dxos.plugin.mermaid\nname: MermaidPlugin\nversion: 0.1.0\n---\n\nA CodeMirror extension plugin for DXOS Composer that renders Mermaid diagram\ndefinitions as live SVG previews inside the markdown editor.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|-------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype DiagramKind\n literals: flowchart | sequenceDiagram | classDiagram | stateDiagram | erDiagram | gantt | pie | gitGraph | mindmap | timeline\n```\n\n```mdl\ntype DiagramTheme\n literals: default | neutral | dark | forest | base\n```\n\n```mdl\ntype RenderResult\n fields:\n svg: string # rendered SVG markup\n id: string # unique widget id used by the Mermaid API\n```\n\n```mdl\ntype RenderError\n fields:\n message: string # human-readable parse or render error text\n source: string # the Mermaid source that caused the error\n```\n\n## Components\n\n```mdl\ncomponent MermaidWidget\n desc: |\n An inline CodeMirror widget that replaces a ```mermaid fenced code block\n with its rendered SVG diagram. The source code block is hidden while the\n cursor is outside it; moving the cursor inside restores the raw text for\n editing.\n props:\n id: string # unique widget id (mermaid-<offset>)\n source: string # raw Mermaid diagram source\n label?: string # first token of source used as a diagram-type badge\n darkMode: boolean # mirrors the editor dark-theme facet\n state:\n svg?: string # last successfully rendered SVG\n error?: string # last render error message; shown in place of diagram\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [rendered SVG diagram] \u2502\n \u2502 [label] \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n (on error)\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 error text \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\n```mdl\nop renderDiagram\n desc: Parses a Mermaid source string and renders it to SVG via the Mermaid JS API.\n input:\n id: string # unique element id required by the Mermaid render API\n source: string # raw Mermaid diagram definition\n darkMode?: boolean # sets darkMode / theme on the Mermaid config\n output: RenderResult\n errors:\n ParseError: source does not conform to Mermaid syntax\n RenderError: SVG generation failed after successful parse\n```\n\n## Features\n\n```mdl\nfeat F-1: Diagram Rendering\n\n req F-1.1:\n when: a fenced code block with language tag `mermaid` is present in the document\n then: the block is replaced by a rendered SVG diagram widget\n\n req F-1.2:\n when: the cursor moves inside the fenced code block\n then: raw source text is revealed for editing and the widget is hidden\n\n req F-1.3:\n when: the cursor moves outside the fenced code block\n then: the widget is restored and the raw text is hidden\n\n req F-1.4:\n when: the editor is in read-only mode\n then: widgets are always shown regardless of cursor position\n```\n\n```mdl\nfeat F-2: Error Handling\n\n req F-2.1:\n when: Mermaid fails to parse the source\n then: an inline error message is shown in place of the diagram\n\n req F-2.2:\n when: a previously failing source is corrected\n then: the widget re-renders and displays the valid diagram\n```\n\n```mdl\nfeat F-3: Theme Integration\n\n req F-3.1:\n when: the editor's dark-theme facet is true\n then: the Mermaid diagram is initialized with darkMode enabled\n\n req F-3.2: The rendered widget uses the editor's group-surface background token.\n```\n\n```mdl\nfeat F-4: Markdown Editor Integration\n\n req F-4.1:\n when: the MermaidPlugin is loaded\n then: it registers the mermaid CodeMirror extension via MarkdownCapabilities.ExtensionProvider\n\n req F-4.2: The plugin activates on MarkdownEvents.SetupExtensions.\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Valid flowchart renders\n given: a document containing a ```mermaid fenced block with a valid flowchart definition\n then:\n - the raw code block lines are hidden\n - an SVG widget is injected immediately after the block\n - no error text is visible\n```\n\n```mdl\ntest T-2: Cursor-in/out toggle\n given: a rendered Mermaid widget is visible\n when: the cursor moves inside the fenced code block\n then:\n - the cm-mermaid-hidden class is removed from the block lines\n - the widget is no longer rendered in the viewport\n\n when: the cursor moves back outside the block\n then:\n - block lines are hidden again\n - widget is rendered again\n```\n\n```mdl\ntest T-3: Invalid syntax shows error\n given: a document containing a ```mermaid block with invalid syntax\n then:\n - no SVG is rendered\n - an inline error message is shown with class cm-mermaid-error\n```\n\n```mdl\ntest T-4: Read-only always shows widget\n given: the editor is in read-only mode\n when: any cursor position\n then: widgets are rendered and raw source lines remain hidden\n```\n\n```mdl\ntest T-5: Plugin activates on markdown event\n given: MermaidPlugin and ProcessManagerPlugin are loaded\n when: MarkdownEvents.SetupExtensions fires\n then: the markdown module is in the active module list\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap # name[?]: TypeExpr (# inline comment)\n literals?: UnionList # a | b | c\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n";
10
10
 
11
11
  // src/MermaidPlugin.tsx
@@ -15,7 +15,7 @@ var MermaidPlugin = Plugin.define(meta).pipe(Plugin.addModule({
15
15
  activate: MarkdownExtension
16
16
  }), AppPlugin.addPluginAssetModule({
17
17
  asset: {
18
- pluginId: meta.id,
18
+ pluginId: meta.profile.key,
19
19
  path: "PLUGIN.mdl",
20
20
  content: PLUGIN_default,
21
21
  mimeType: "application/x-mdl"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/MermaidPlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-mermaid/PLUGIN.mdl?raw"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { MarkdownEvents } from '@dxos/plugin-markdown';\n\nimport { MarkdownExtension } from '#capabilities';\nimport { meta } from '#meta';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const MermaidPlugin = Plugin.define(meta).pipe(\n Plugin.addModule({\n id: 'markdown',\n activatesOn: MarkdownEvents.SetupExtensions,\n activate: MarkdownExtension,\n }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default MermaidPlugin;\n", "---\nid: org.dxos.plugin.mermaid\nname: MermaidPlugin\nversion: 0.1.0\n---\n\nA CodeMirror extension plugin for DXOS Composer that renders Mermaid diagram\ndefinitions as live SVG previews inside the markdown editor.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|-------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype DiagramKind\n literals: flowchart | sequenceDiagram | classDiagram | stateDiagram | erDiagram | gantt | pie | gitGraph | mindmap | timeline\n```\n\n```mdl\ntype DiagramTheme\n literals: default | neutral | dark | forest | base\n```\n\n```mdl\ntype RenderResult\n fields:\n svg: string # rendered SVG markup\n id: string # unique widget id used by the Mermaid API\n```\n\n```mdl\ntype RenderError\n fields:\n message: string # human-readable parse or render error text\n source: string # the Mermaid source that caused the error\n```\n\n## Components\n\n```mdl\ncomponent MermaidWidget\n desc: |\n An inline CodeMirror widget that replaces a ```mermaid fenced code block\n with its rendered SVG diagram. The source code block is hidden while the\n cursor is outside it; moving the cursor inside restores the raw text for\n editing.\n props:\n id: string # unique widget id (mermaid-<offset>)\n source: string # raw Mermaid diagram source\n label?: string # first token of source used as a diagram-type badge\n darkMode: boolean # mirrors the editor dark-theme facet\n state:\n svg?: string # last successfully rendered SVG\n error?: string # last render error message; shown in place of diagram\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [rendered SVG diagram] \u2502\n \u2502 [label] \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n (on error)\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 error text \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\n```mdl\nop renderDiagram\n desc: Parses a Mermaid source string and renders it to SVG via the Mermaid JS API.\n input:\n id: string # unique element id required by the Mermaid render API\n source: string # raw Mermaid diagram definition\n darkMode?: boolean # sets darkMode / theme on the Mermaid config\n output: RenderResult\n errors:\n ParseError: source does not conform to Mermaid syntax\n RenderError: SVG generation failed after successful parse\n```\n\n## Features\n\n```mdl\nfeat F-1: Diagram Rendering\n\n req F-1.1:\n when: a fenced code block with language tag `mermaid` is present in the document\n then: the block is replaced by a rendered SVG diagram widget\n\n req F-1.2:\n when: the cursor moves inside the fenced code block\n then: raw source text is revealed for editing and the widget is hidden\n\n req F-1.3:\n when: the cursor moves outside the fenced code block\n then: the widget is restored and the raw text is hidden\n\n req F-1.4:\n when: the editor is in read-only mode\n then: widgets are always shown regardless of cursor position\n```\n\n```mdl\nfeat F-2: Error Handling\n\n req F-2.1:\n when: Mermaid fails to parse the source\n then: an inline error message is shown in place of the diagram\n\n req F-2.2:\n when: a previously failing source is corrected\n then: the widget re-renders and displays the valid diagram\n```\n\n```mdl\nfeat F-3: Theme Integration\n\n req F-3.1:\n when: the editor's dark-theme facet is true\n then: the Mermaid diagram is initialized with darkMode enabled\n\n req F-3.2: The rendered widget uses the editor's group-surface background token.\n```\n\n```mdl\nfeat F-4: Markdown Editor Integration\n\n req F-4.1:\n when: the MermaidPlugin is loaded\n then: it registers the mermaid CodeMirror extension via MarkdownCapabilities.ExtensionProvider\n\n req F-4.2: The plugin activates on MarkdownEvents.SetupExtensions.\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Valid flowchart renders\n given: a document containing a ```mermaid fenced block with a valid flowchart definition\n then:\n - the raw code block lines are hidden\n - an SVG widget is injected immediately after the block\n - no error text is visible\n```\n\n```mdl\ntest T-2: Cursor-in/out toggle\n given: a rendered Mermaid widget is visible\n when: the cursor moves inside the fenced code block\n then:\n - the cm-mermaid-hidden class is removed from the block lines\n - the widget is no longer rendered in the viewport\n\n when: the cursor moves back outside the block\n then:\n - block lines are hidden again\n - widget is rendered again\n```\n\n```mdl\ntest T-3: Invalid syntax shows error\n given: a document containing a ```mermaid block with invalid syntax\n then:\n - no SVG is rendered\n - an inline error message is shown with class cm-mermaid-error\n```\n\n```mdl\ntest T-4: Read-only always shows widget\n given: the editor is in read-only mode\n when: any cursor position\n then: widgets are rendered and raw source lines remain hidden\n```\n\n```mdl\ntest T-5: Plugin activates on markdown event\n given: MermaidPlugin and ProcessManagerPlugin are loaded\n when: MarkdownEvents.SetupExtensions fires\n then: the markdown module is in the active module list\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap # name[?]: TypeExpr (# inline comment)\n literals?: UnionList # a | b | c\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n"],
5
- "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,sBAAsB;AAE/B,SAASC,yBAAyB;AAClC,SAASC,YAAY;;;ACTrB;;;ADcO,IAAMC,gBAAgBC,OAAOC,OAAOC,IAAAA,EAAMC,KAC/CH,OAAOI,UAAU;EACfC,IAAI;EACJC,aAAaC,eAAeC;EAC5BC,UAAUC;AACZ,CAAA,GACAC,UAAUC,qBAAqB;EAC7BC,OAAO;IAAEC,UAAUZ,KAAKG;IAAIU,MAAM;IAAcC,SAASC;IAAYC,UAAU;EAAoB;AACrG,CAAA,GACAlB,OAAOmB,IAAI;AAGb,IAAA,wBAAepB;",
6
- "names": ["Plugin", "AppPlugin", "MarkdownEvents", "MarkdownExtension", "meta", "MermaidPlugin", "Plugin", "define", "meta", "pipe", "addModule", "id", "activatesOn", "MarkdownEvents", "SetupExtensions", "activate", "MarkdownExtension", "AppPlugin", "addPluginAssetModule", "asset", "pluginId", "path", "content", "pluginSpec", "mimeType", "make"]
3
+ "sources": ["../../../src/MermaidPlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-mermaid/PLUGIN.mdl"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { MarkdownEvents } from '@dxos/plugin-markdown';\n\nimport { MarkdownExtension } from '#capabilities';\nimport { meta } from '#meta';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const MermaidPlugin = Plugin.define(meta).pipe(\n Plugin.addModule({\n id: 'markdown',\n activatesOn: MarkdownEvents.SetupExtensions,\n activate: MarkdownExtension,\n }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default MermaidPlugin;\n", "---\nid: org.dxos.plugin.mermaid\nname: MermaidPlugin\nversion: 0.1.0\n---\n\nA CodeMirror extension plugin for DXOS Composer that renders Mermaid diagram\ndefinitions as live SVG previews inside the markdown editor.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|-------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype DiagramKind\n literals: flowchart | sequenceDiagram | classDiagram | stateDiagram | erDiagram | gantt | pie | gitGraph | mindmap | timeline\n```\n\n```mdl\ntype DiagramTheme\n literals: default | neutral | dark | forest | base\n```\n\n```mdl\ntype RenderResult\n fields:\n svg: string # rendered SVG markup\n id: string # unique widget id used by the Mermaid API\n```\n\n```mdl\ntype RenderError\n fields:\n message: string # human-readable parse or render error text\n source: string # the Mermaid source that caused the error\n```\n\n## Components\n\n```mdl\ncomponent MermaidWidget\n desc: |\n An inline CodeMirror widget that replaces a ```mermaid fenced code block\n with its rendered SVG diagram. The source code block is hidden while the\n cursor is outside it; moving the cursor inside restores the raw text for\n editing.\n props:\n id: string # unique widget id (mermaid-<offset>)\n source: string # raw Mermaid diagram source\n label?: string # first token of source used as a diagram-type badge\n darkMode: boolean # mirrors the editor dark-theme facet\n state:\n svg?: string # last successfully rendered SVG\n error?: string # last render error message; shown in place of diagram\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [rendered SVG diagram] \u2502\n \u2502 [label] \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n (on error)\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 error text \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\n```mdl\nop renderDiagram\n desc: Parses a Mermaid source string and renders it to SVG via the Mermaid JS API.\n input:\n id: string # unique element id required by the Mermaid render API\n source: string # raw Mermaid diagram definition\n darkMode?: boolean # sets darkMode / theme on the Mermaid config\n output: RenderResult\n errors:\n ParseError: source does not conform to Mermaid syntax\n RenderError: SVG generation failed after successful parse\n```\n\n## Features\n\n```mdl\nfeat F-1: Diagram Rendering\n\n req F-1.1:\n when: a fenced code block with language tag `mermaid` is present in the document\n then: the block is replaced by a rendered SVG diagram widget\n\n req F-1.2:\n when: the cursor moves inside the fenced code block\n then: raw source text is revealed for editing and the widget is hidden\n\n req F-1.3:\n when: the cursor moves outside the fenced code block\n then: the widget is restored and the raw text is hidden\n\n req F-1.4:\n when: the editor is in read-only mode\n then: widgets are always shown regardless of cursor position\n```\n\n```mdl\nfeat F-2: Error Handling\n\n req F-2.1:\n when: Mermaid fails to parse the source\n then: an inline error message is shown in place of the diagram\n\n req F-2.2:\n when: a previously failing source is corrected\n then: the widget re-renders and displays the valid diagram\n```\n\n```mdl\nfeat F-3: Theme Integration\n\n req F-3.1:\n when: the editor's dark-theme facet is true\n then: the Mermaid diagram is initialized with darkMode enabled\n\n req F-3.2: The rendered widget uses the editor's group-surface background token.\n```\n\n```mdl\nfeat F-4: Markdown Editor Integration\n\n req F-4.1:\n when: the MermaidPlugin is loaded\n then: it registers the mermaid CodeMirror extension via MarkdownCapabilities.ExtensionProvider\n\n req F-4.2: The plugin activates on MarkdownEvents.SetupExtensions.\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Valid flowchart renders\n given: a document containing a ```mermaid fenced block with a valid flowchart definition\n then:\n - the raw code block lines are hidden\n - an SVG widget is injected immediately after the block\n - no error text is visible\n```\n\n```mdl\ntest T-2: Cursor-in/out toggle\n given: a rendered Mermaid widget is visible\n when: the cursor moves inside the fenced code block\n then:\n - the cm-mermaid-hidden class is removed from the block lines\n - the widget is no longer rendered in the viewport\n\n when: the cursor moves back outside the block\n then:\n - block lines are hidden again\n - widget is rendered again\n```\n\n```mdl\ntest T-3: Invalid syntax shows error\n given: a document containing a ```mermaid block with invalid syntax\n then:\n - no SVG is rendered\n - an inline error message is shown with class cm-mermaid-error\n```\n\n```mdl\ntest T-4: Read-only always shows widget\n given: the editor is in read-only mode\n when: any cursor position\n then: widgets are rendered and raw source lines remain hidden\n```\n\n```mdl\ntest T-5: Plugin activates on markdown event\n given: MermaidPlugin and ProcessManagerPlugin are loaded\n when: MarkdownEvents.SetupExtensions fires\n then: the markdown module is in the active module list\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap # name[?]: TypeExpr (# inline comment)\n literals?: UnionList # a | b | c\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,sBAAsB;AAE/B,SAASC,yBAAyB;AAClC,SAASC,YAAY;;;ACTrB;;;ADcO,IAAMC,gBAAgBC,OAAOC,OAAOC,IAAAA,EAAMC,KAC/CH,OAAOI,UAAU;EACfC,IAAI;EACJC,aAAaC,eAAeC;EAC5BC,UAAUC;AACZ,CAAA,GACAC,UAAUC,qBAAqB;EAC7BC,OAAO;IAAEC,UAAUZ,KAAKa,QAAQC;IAAKC,MAAM;IAAcC,SAASC;IAAYC,UAAU;EAAoB;AAC9G,CAAA,GACApB,OAAOqB,IAAI;AAGb,IAAA,wBAAetB;",
6
+ "names": ["Plugin", "AppPlugin", "MarkdownEvents", "MarkdownExtension", "meta", "MermaidPlugin", "Plugin", "define", "meta", "pipe", "addModule", "id", "activatesOn", "MarkdownEvents", "SetupExtensions", "activate", "MarkdownExtension", "AppPlugin", "addPluginAssetModule", "asset", "pluginId", "profile", "key", "path", "content", "pluginSpec", "mimeType", "make"]
7
7
  }
@@ -0,0 +1,45 @@
1
+ // src/meta.ts
2
+ import { Plugin } from "@dxos/app-framework";
3
+
4
+ // dx.config.ts
5
+ import { Config2 } from "@dxos/app-framework/config";
6
+ import { trim } from "@dxos/util";
7
+ var dx_config_default = Config2.make({
8
+ plugin: {
9
+ key: "org.dxos.plugin.mermaid",
10
+ name: "Mermaid",
11
+ author: "DXOS",
12
+ description: trim`
13
+ Generate diagrams from simple text-based definitions using Mermaid syntax.
14
+ Create flowcharts, sequence diagrams, class diagrams, state diagrams, entity-relationship
15
+ diagrams, Gantt charts, pie charts, Git graphs, mindmaps, and timelines — all from
16
+ plain-text source embedded directly in your documents.
17
+
18
+ The plugin integrates with the markdown editor as a CodeMirror extension.
19
+ Any fenced code block tagged with the \`mermaid\` language identifier is automatically
20
+ detected and replaced with a live SVG preview rendered by the Mermaid JS library.
21
+ The raw source is revealed for editing whenever the cursor moves inside the block,
22
+ then the rendered diagram is restored when the cursor moves away, providing a seamless
23
+ live-preview experience without leaving the editor.
24
+
25
+ Diagram rendering adapts to the editor's current color scheme: dark-mode documents
26
+ use Mermaid's dark theme while light-mode documents use the neutral theme.
27
+ Parse and render errors are shown inline in place of the diagram so that
28
+ invalid syntax is immediately visible without disrupting the rest of the document.
29
+ `,
30
+ source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-mermaid",
31
+ icon: {
32
+ key: "ph--anchor-simple--regular",
33
+ hue: "cyan"
34
+ },
35
+ spec: "PLUGIN.mdl"
36
+ }
37
+ });
38
+
39
+ // src/meta.ts
40
+ var meta = Plugin.getMetaFromConfig(dx_config_default);
41
+
42
+ export {
43
+ meta
44
+ };
45
+ //# sourceMappingURL=chunk-ZBARIEVA.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts", "../../../dx.config.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport config from '../dx.config';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.mermaid',\n name: 'Mermaid',\n author: 'DXOS',\n description: trim`\n Generate diagrams from simple text-based definitions using Mermaid syntax.\n Create flowcharts, sequence diagrams, class diagrams, state diagrams, entity-relationship\n diagrams, Gantt charts, pie charts, Git graphs, mindmaps, and timelines — all from\n plain-text source embedded directly in your documents.\n\n The plugin integrates with the markdown editor as a CodeMirror extension.\n Any fenced code block tagged with the \\`mermaid\\` language identifier is automatically\n detected and replaced with a live SVG preview rendered by the Mermaid JS library.\n The raw source is revealed for editing whenever the cursor moves inside the block,\n then the rendered diagram is restored when the cursor moves away, providing a seamless\n live-preview experience without leaving the editor.\n\n Diagram rendering adapts to the editor's current color scheme: dark-mode documents\n use Mermaid's dark theme while light-mode documents use the neutral theme.\n Parse and render errors are shown inline in place of the diagram so that\n invalid syntax is immediately visible without disrupting the rest of the document.\n `,\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-mermaid',\n icon: { key: 'ph--anchor-simple--regular', hue: 'cyan' },\n spec: 'PLUGIN.mdl',\n },\n});\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;;;ACAvB,SAASC,eAAe;AACxB,SAASC,YAAY;AAErB,IAAA,oBAAeD,QAAQE,KAAK;EAC1BC,QAAQ;IACNC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,aAAaN;;;;;;;;;;;;;;;;;;IAkBbO,QAAQ;IACRC,MAAM;MAAEL,KAAK;MAA8BM,KAAK;IAAO;IACvDC,MAAM;EACR;AACF,CAAA;;;AD1BO,IAAMC,OAAOC,OAAOC,kBAAkBC,iBAAAA;",
6
+ "names": ["Plugin", "Config2", "trim", "make", "plugin", "key", "name", "author", "description", "source", "icon", "hue", "spec", "meta", "Plugin", "getMetaFromConfig", "config"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  meta
3
- } from "./chunk-WD2YFG2L.mjs";
3
+ } from "./chunk-ZBARIEVA.mjs";
4
4
  export {
5
5
  meta
6
6
  };
@@ -1 +1 @@
1
- {"inputs":{"src/meta.ts":{"bytes":4532,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":368,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-mermaid/PLUGIN.mdl?raw":{"bytes":7350,"imports":[]},"src/MermaidPlugin.tsx":{"bytes":2950,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-mermaid/PLUGIN.mdl?raw","kind":"import-statement","original":"../PLUGIN.mdl?raw"}],"format":"esm"},"src/extensions/mermaid-extension.ts":{"bytes":25026,"imports":[{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"mermaid","kind":"import-statement","external":true}],"format":"esm"},"src/extensions/index.ts":{"bytes":401,"imports":[{"path":"src/extensions/mermaid-extension.ts","kind":"import-statement","original":"./mermaid-extension"}],"format":"esm"},"src/capabilities/markdown-extension.ts":{"bytes":1563,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"src/extensions/index.ts","kind":"import-statement","original":"../extensions"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":845,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/markdown-extension.ts","kind":"dynamic-import","original":"./markdown-extension"}],"format":"esm"},"src/plugin.ts":{"bytes":860,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"}},"outputs":{"dist/lib/neutral/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-WD2YFG2L.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":101},"dist/lib/neutral/MermaidPlugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9707},"dist/lib/neutral/MermaidPlugin.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["MermaidPlugin","default"],"entryPoint":"src/MermaidPlugin.tsx","inputs":{"src/MermaidPlugin.tsx":{"bytesInOutput":612},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-mermaid/PLUGIN.mdl?raw":{"bytesInOutput":8064}},"bytes":8911},"dist/lib/neutral/capabilities/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":454},"dist/lib/neutral/capabilities/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/neutral/markdown-extension-7YWEUNWO.mjs","kind":"dynamic-import"}],"exports":["MarkdownExtension"],"entryPoint":"src/capabilities/index.ts","inputs":{"src/capabilities/index.ts":{"bytesInOutput":164}},"bytes":260},"dist/lib/neutral/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/meta.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-WD2YFG2L.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/meta.ts","inputs":{},"bytes":100},"dist/lib/neutral/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":443},"dist/lib/neutral/plugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-WD2YFG2L.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["MermaidPlugin"],"entryPoint":"src/plugin.ts","inputs":{"src/plugin.ts":{"bytesInOutput":110}},"bytes":239},"dist/lib/neutral/chunk-WD2YFG2L.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2101},"dist/lib/neutral/chunk-WD2YFG2L.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":1559}},"bytes":1638},"dist/lib/neutral/markdown-extension-7YWEUNWO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12975},"dist/lib/neutral/markdown-extension-7YWEUNWO.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"mermaid","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/markdown-extension.ts","inputs":{"src/capabilities/markdown-extension.ts":{"bytesInOutput":316},"src/extensions/mermaid-extension.ts":{"bytesInOutput":5273},"src/extensions/index.ts":{"bytesInOutput":0}},"bytes":5823}}}
1
+ {"inputs":{"dx.config.ts":{"bytes":4579,"imports":[{"path":"@dxos/app-framework/config","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/meta.ts":{"bytes":799,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dx.config.ts","kind":"import-statement","original":"../dx.config"}],"format":"esm"},"src/index.ts":{"bytes":368,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-mermaid/PLUGIN.mdl":{"bytes":7350,"imports":[]},"src/MermaidPlugin.tsx":{"bytes":3007,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-mermaid/PLUGIN.mdl","kind":"import-statement","original":"../PLUGIN.mdl?raw"}],"format":"esm"},"src/extensions/mermaid-extension.ts":{"bytes":25026,"imports":[{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"mermaid","kind":"import-statement","external":true}],"format":"esm"},"src/extensions/index.ts":{"bytes":401,"imports":[{"path":"src/extensions/mermaid-extension.ts","kind":"import-statement","original":"./mermaid-extension"}],"format":"esm"},"src/capabilities/markdown-extension.ts":{"bytes":1563,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"src/extensions/index.ts","kind":"import-statement","original":"../extensions"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":845,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/markdown-extension.ts","kind":"dynamic-import","original":"./markdown-extension"}],"format":"esm"},"src/plugin.ts":{"bytes":860,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"}},"outputs":{"dist/lib/neutral/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-ZBARIEVA.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":101},"dist/lib/neutral/MermaidPlugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9736},"dist/lib/neutral/MermaidPlugin.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["MermaidPlugin","default"],"entryPoint":"src/MermaidPlugin.tsx","inputs":{"src/MermaidPlugin.tsx":{"bytesInOutput":621},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-mermaid/PLUGIN.mdl":{"bytesInOutput":8064}},"bytes":8916},"dist/lib/neutral/capabilities/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":454},"dist/lib/neutral/capabilities/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/neutral/markdown-extension-7YWEUNWO.mjs","kind":"dynamic-import"}],"exports":["MarkdownExtension"],"entryPoint":"src/capabilities/index.ts","inputs":{"src/capabilities/index.ts":{"bytesInOutput":164}},"bytes":260},"dist/lib/neutral/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/meta.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-ZBARIEVA.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/meta.ts","inputs":{},"bytes":100},"dist/lib/neutral/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":443},"dist/lib/neutral/plugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-ZBARIEVA.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["MermaidPlugin"],"entryPoint":"src/plugin.ts","inputs":{"src/plugin.ts":{"bytesInOutput":110}},"bytes":239},"dist/lib/neutral/chunk-ZBARIEVA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2429},"dist/lib/neutral/chunk-ZBARIEVA.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/config","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":102},"dx.config.ts":{"bytesInOutput":1612}},"bytes":1826},"dist/lib/neutral/markdown-extension-7YWEUNWO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12975},"dist/lib/neutral/markdown-extension-7YWEUNWO.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"mermaid","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/markdown-extension.ts","inputs":{"src/capabilities/markdown-extension.ts":{"bytesInOutput":316},"src/extensions/mermaid-extension.ts":{"bytesInOutput":5273},"src/extensions/index.ts":{"bytesInOutput":0}},"bytes":5823}}}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  meta
3
- } from "./chunk-WD2YFG2L.mjs";
3
+ } from "./chunk-ZBARIEVA.mjs";
4
4
  export {
5
5
  meta
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  meta
3
- } from "./chunk-WD2YFG2L.mjs";
3
+ } from "./chunk-ZBARIEVA.mjs";
4
4
 
5
5
  // src/plugin.ts
6
6
  import { Plugin } from "@dxos/app-framework";
@@ -0,0 +1,28 @@
1
+ declare const _default: {
2
+ readonly plugin: {
3
+ readonly key: string;
4
+ readonly name: string;
5
+ readonly description?: string | undefined;
6
+ readonly author?: string | undefined;
7
+ readonly homePage?: string | undefined;
8
+ readonly source?: string | undefined;
9
+ readonly screenshots?: readonly {
10
+ readonly light?: string | undefined;
11
+ readonly dark?: string | undefined;
12
+ }[] | undefined;
13
+ readonly tags?: readonly string[] | undefined;
14
+ readonly icon?: {
15
+ readonly key: string;
16
+ readonly hue?: string | undefined;
17
+ } | undefined;
18
+ readonly spec?: string | undefined;
19
+ readonly dependsOn?: readonly string[] | undefined;
20
+ };
21
+ readonly publish?: {
22
+ readonly buildCommand?: string | undefined;
23
+ readonly outputDirectory?: string | undefined;
24
+ readonly assetBaseUrl?: string | undefined;
25
+ } | undefined;
26
+ };
27
+ export default _default;
28
+ //# sourceMappingURL=dx.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dx.config.d.ts","sourceRoot":"","sources":["../../dx.config.ts"],"names":[],"mappings":""}
@@ -1,3 +1,3 @@
1
1
  import { Capability } from '@dxos/app-framework';
2
- export declare const MarkdownExtension: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/plugin-markdown").MarkdownExtensionProvider[]>>, Error>;
2
+ export declare const MarkdownExtension: Capability.LazyCapability<void, Capability.ModuleReturn, Error>;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,iBAAiB,qJAA6E,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,iBAAiB,iEAA6E,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import * as Effect from 'effect/Effect';
2
2
  import { Capability } from '@dxos/app-framework';
3
- declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<import("@dxos/plugin-markdown").MarkdownExtensionProvider[]>>, never, never>;
3
+ declare const _default: (props: void) => Effect.Effect<Capability.Any, never, never>;
4
4
  export default _default;
5
5
  //# sourceMappingURL=markdown-extension.d.ts.map
@@ -1,11 +1,11 @@
1
1
  import { type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
- type DefaultStoryProps = {
3
+ type StoryArgs = {
4
4
  text?: string;
5
5
  };
6
6
  declare const meta: {
7
7
  title: string;
8
- render: ({ text }: DefaultStoryProps) => React.JSX.Element;
8
+ render: ({ text }: StoryArgs) => React.JSX.Element;
9
9
  decorators: import("@storybook/react").Decorator[];
10
10
  };
11
11
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"mermaid.stories.d.ts","sourceRoot":"","sources":["../../../../src/extensions/mermaid.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,KAAK,iBAAiB,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAqBF,QAAA,MAAM,IAAI;;uBAnBsB,iBAAiB;;CAuBZ,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAqBrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAgBnB,CAAC"}
1
+ {"version":3,"file":"mermaid.stories.d.ts","sourceRoot":"","sources":["../../../../src/extensions/mermaid.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,KAAK,SAAS,GAAG;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAqBF,QAAA,MAAM,IAAI;;uBAnBsB,SAAS;;CAuBJ,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAqBrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAgBnB,CAAC"}
@@ -1,3 +1,33 @@
1
- import { Plugin } from '@dxos/app-framework';
2
- export declare const meta: Plugin.Meta;
1
+ export declare const meta: {
2
+ readonly profile: {
3
+ readonly key: string;
4
+ readonly name: string;
5
+ readonly description?: string | undefined;
6
+ readonly homePage?: string | undefined;
7
+ readonly source?: string | undefined;
8
+ readonly tags?: readonly string[] | undefined;
9
+ readonly screenshots?: readonly {
10
+ readonly light?: string | undefined;
11
+ readonly dark?: string | undefined;
12
+ }[] | undefined;
13
+ readonly icon?: {
14
+ readonly key: string;
15
+ readonly hue?: string | undefined;
16
+ } | undefined;
17
+ readonly dependsOn?: readonly string[] | undefined;
18
+ readonly spec?: string | undefined;
19
+ readonly createdAt?: string | undefined;
20
+ readonly author?: string | undefined;
21
+ };
22
+ readonly release?: {
23
+ readonly version: string;
24
+ readonly moduleUrl: string;
25
+ readonly dependencies?: {
26
+ readonly [x: string]: string;
27
+ } | undefined;
28
+ readonly pluginKey?: string | undefined;
29
+ readonly manifestHash?: string | undefined;
30
+ readonly createdAt?: string | undefined;
31
+ } | undefined;
32
+ };
3
33
  //# sourceMappingURL=meta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,eAAO,MAAM,IAAI,aA0Bf,CAAC"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAmC,CAAC"}