@stigmer/react 3.1.2 → 3.1.4
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/composer/SessionComposer.d.ts +37 -5
- package/composer/SessionComposer.d.ts.map +1 -1
- package/composer/SessionComposer.js +13 -5
- package/composer/SessionComposer.js.map +1 -1
- package/execution/ArtifactApplyButton.d.ts +25 -0
- package/execution/ArtifactApplyButton.d.ts.map +1 -0
- package/execution/ArtifactApplyButton.js +21 -0
- package/execution/ArtifactApplyButton.js.map +1 -0
- package/execution/ArtifactContentBody.d.ts +36 -0
- package/execution/ArtifactContentBody.d.ts.map +1 -0
- package/execution/ArtifactContentBody.js +62 -0
- package/execution/ArtifactContentBody.js.map +1 -0
- package/execution/ArtifactDocument.d.ts +48 -0
- package/execution/ArtifactDocument.d.ts.map +1 -0
- package/execution/ArtifactDocument.js +89 -0
- package/execution/ArtifactDocument.js.map +1 -0
- package/execution/ArtifactPreviewModal.d.ts +9 -9
- package/execution/ArtifactPreviewModal.d.ts.map +1 -1
- package/execution/ArtifactPreviewModal.js +18 -145
- package/execution/ArtifactPreviewModal.js.map +1 -1
- package/execution/ArtifactRow.d.ts +49 -0
- package/execution/ArtifactRow.d.ts.map +1 -0
- package/execution/ArtifactRow.js +56 -0
- package/execution/ArtifactRow.js.map +1 -0
- package/execution/ArtifactsWidget.d.ts +6 -9
- package/execution/ArtifactsWidget.d.ts.map +1 -1
- package/execution/ArtifactsWidget.js +15 -19
- package/execution/ArtifactsWidget.js.map +1 -1
- package/execution/FileChangeProgressBar.d.ts +47 -0
- package/execution/FileChangeProgressBar.d.ts.map +1 -0
- package/execution/FileChangeProgressBar.js +49 -0
- package/execution/FileChangeProgressBar.js.map +1 -0
- package/execution/FileChangesView.d.ts.map +1 -1
- package/execution/FileChangesView.js +19 -4
- package/execution/FileChangesView.js.map +1 -1
- package/execution/FileReviewAtoms.d.ts +27 -0
- package/execution/FileReviewAtoms.d.ts.map +1 -0
- package/execution/FileReviewAtoms.js +64 -0
- package/execution/FileReviewAtoms.js.map +1 -0
- package/execution/FileReviewCard.d.ts +2 -2
- package/execution/FileReviewCard.d.ts.map +1 -1
- package/execution/FileReviewCard.js +32 -62
- package/execution/FileReviewCard.js.map +1 -1
- package/execution/MessageEntry.d.ts +0 -9
- package/execution/MessageEntry.d.ts.map +1 -1
- package/execution/MessageEntry.js +1 -11
- package/execution/MessageEntry.js.map +1 -1
- package/execution/MessageThread.d.ts +3 -4
- package/execution/MessageThread.d.ts.map +1 -1
- package/execution/MessageThread.js +25 -11
- package/execution/MessageThread.js.map +1 -1
- package/execution/PlanArtifactCard.d.ts +16 -10
- package/execution/PlanArtifactCard.d.ts.map +1 -1
- package/execution/PlanArtifactCard.js +31 -7
- package/execution/PlanArtifactCard.js.map +1 -1
- package/execution/PlanCompletionCard.d.ts +4 -4
- package/execution/PlanCompletionCard.d.ts.map +1 -1
- package/execution/PlanCompletionCard.js +4 -4
- package/execution/PlanCompletionCard.js.map +1 -1
- package/execution/PlanStreamingCard.d.ts +7 -2
- package/execution/PlanStreamingCard.d.ts.map +1 -1
- package/execution/PlanStreamingCard.js +11 -6
- package/execution/PlanStreamingCard.js.map +1 -1
- package/execution/index.d.ts +12 -2
- package/execution/index.d.ts.map +1 -1
- package/execution/index.js +6 -1
- package/execution/index.js.map +1 -1
- package/execution/use-build-from-plan-hotkey.d.ts +1 -1
- package/execution/use-build-from-plan-hotkey.js +1 -1
- package/execution/useArtifactContent.d.ts +6 -1
- package/execution/useArtifactContent.d.ts.map +1 -1
- package/execution/useArtifactContent.js +7 -2
- package/execution/useArtifactContent.js.map +1 -1
- package/execution/useArtifactCopy.d.ts +51 -0
- package/execution/useArtifactCopy.d.ts.map +1 -0
- package/execution/useArtifactCopy.js +75 -0
- package/execution/useArtifactCopy.js.map +1 -0
- package/execution/useArtifactDownload.d.ts.map +1 -1
- package/execution/useArtifactDownload.js +17 -5
- package/execution/useArtifactDownload.js.map +1 -1
- package/execution/useArtifactInspection.d.ts +85 -0
- package/execution/useArtifactInspection.d.ts.map +1 -0
- package/execution/useArtifactInspection.js +143 -0
- package/execution/useArtifactInspection.js.map +1 -0
- package/execution/useCreateAgentExecution.d.ts +16 -3
- package/execution/useCreateAgentExecution.d.ts.map +1 -1
- package/execution/useCreateAgentExecution.js +1 -0
- package/execution/useCreateAgentExecution.js.map +1 -1
- package/index.d.ts +4 -4
- package/index.d.ts.map +1 -1
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/internal/MermaidDiagram.d.ts +47 -0
- package/internal/MermaidDiagram.d.ts.map +1 -0
- package/internal/MermaidDiagram.js +118 -0
- package/internal/MermaidDiagram.js.map +1 -0
- package/internal/file-tree/FileTreeNode.d.ts.map +1 -1
- package/internal/file-tree/FileTreeNode.js +2 -2
- package/internal/file-tree/FileTreeNode.js.map +1 -1
- package/internal/markdown-components.d.ts.map +1 -1
- package/internal/markdown-components.js +34 -0
- package/internal/markdown-components.js.map +1 -1
- package/internal/mermaid-loader.d.ts +26 -0
- package/internal/mermaid-loader.d.ts.map +1 -0
- package/internal/mermaid-loader.js +34 -0
- package/internal/mermaid-loader.js.map +1 -0
- package/internal/mermaid-theme-css.d.ts +41 -0
- package/internal/mermaid-theme-css.d.ts.map +1 -0
- package/internal/mermaid-theme-css.js +179 -0
- package/internal/mermaid-theme-css.js.map +1 -0
- package/internal/slug.d.ts +9 -5
- package/internal/slug.d.ts.map +1 -1
- package/internal/slug.js +10 -6
- package/internal/slug.js.map +1 -1
- package/library/detect-plan-artifact.d.ts +27 -9
- package/library/detect-plan-artifact.d.ts.map +1 -1
- package/library/detect-plan-artifact.js +26 -6
- package/library/detect-plan-artifact.js.map +1 -1
- package/library/index.d.ts +1 -1
- package/library/index.d.ts.map +1 -1
- package/library/index.js +1 -1
- package/library/index.js.map +1 -1
- package/package.json +5 -4
- package/session/PlanEditor.js +1 -1
- package/session/PlanEditor.js.map +1 -1
- package/session/SessionViewer.d.ts.map +1 -1
- package/session/SessionViewer.js +122 -30
- package/session/SessionViewer.js.map +1 -1
- package/session/artifact-document.d.ts +13 -0
- package/session/artifact-document.d.ts.map +1 -0
- package/session/artifact-document.js +22 -0
- package/session/artifact-document.js.map +1 -0
- package/session/facets/ArtifactsTab.d.ts +30 -4
- package/session/facets/ArtifactsTab.d.ts.map +1 -1
- package/session/facets/ArtifactsTab.js +32 -10
- package/session/facets/ArtifactsTab.js.map +1 -1
- package/session/index.d.ts +2 -1
- package/session/index.d.ts.map +1 -1
- package/session/index.js +4 -1
- package/session/index.js.map +1 -1
- package/session/plan-document.d.ts +14 -2
- package/session/plan-document.d.ts.map +1 -1
- package/session/plan-document.js +14 -3
- package/session/plan-document.js.map +1 -1
- package/session/usePlanDraft.d.ts +1 -1
- package/session/useSessionArtifacts.d.ts +17 -0
- package/session/useSessionArtifacts.d.ts.map +1 -1
- package/session/useSessionArtifacts.js +16 -5
- package/session/useSessionArtifacts.js.map +1 -1
- package/session/useSessionConversation.d.ts +26 -3
- package/session/useSessionConversation.d.ts.map +1 -1
- package/session/useSessionConversation.js +51 -6
- package/session/useSessionConversation.js.map +1 -1
- package/session/useSessionPageFlow.d.ts.map +1 -1
- package/session/useSessionPageFlow.js +1 -0
- package/session/useSessionPageFlow.js.map +1 -1
- package/session/useSessionPanel.d.ts +20 -0
- package/session/useSessionPanel.d.ts.map +1 -1
- package/session/useSessionPanel.js +13 -0
- package/session/useSessionPanel.js.map +1 -1
- package/session/useSessionRailViews.d.ts +13 -1
- package/session/useSessionRailViews.d.ts.map +1 -1
- package/session/useSessionRailViews.js +5 -3
- package/session/useSessionRailViews.js.map +1 -1
- package/src/composer/SessionComposer.tsx +76 -7
- package/src/composer/__tests__/SessionComposer-editing.test.tsx +128 -0
- package/src/execution/ArtifactApplyButton.tsx +79 -0
- package/src/execution/ArtifactContentBody.tsx +255 -0
- package/src/execution/ArtifactDocument.tsx +344 -0
- package/src/execution/ArtifactPreviewModal.tsx +49 -415
- package/src/execution/ArtifactRow.tsx +165 -0
- package/src/execution/ArtifactsWidget.tsx +24 -33
- package/src/execution/FileChangeProgressBar.tsx +121 -0
- package/src/execution/FileChangesView.tsx +18 -4
- package/src/execution/FileReviewAtoms.tsx +89 -0
- package/src/execution/FileReviewCard.tsx +57 -90
- package/src/execution/MessageEntry.tsx +0 -62
- package/src/execution/MessageThread.tsx +29 -15
- package/src/execution/PlanArtifactCard.tsx +130 -52
- package/src/execution/PlanCompletionCard.tsx +5 -5
- package/src/execution/PlanStreamingCard.tsx +15 -11
- package/src/execution/__tests__/ArtifactContentBody.test.tsx +131 -0
- package/src/execution/__tests__/ArtifactDocument.test.tsx +100 -0
- package/src/execution/__tests__/ArtifactPreviewModal.test.tsx +6 -6
- package/src/execution/__tests__/ArtifactRow.test.tsx +139 -0
- package/src/execution/__tests__/ArtifactsWidget.test.tsx +78 -0
- package/src/execution/__tests__/FileChangeProgressBar.test.tsx +125 -0
- package/src/execution/__tests__/FileReviewCard.test.tsx +66 -7
- package/src/execution/__tests__/MessageThread.test.tsx +1 -1
- package/src/execution/__tests__/PlanArtifactCard.test.tsx +52 -18
- package/src/execution/__tests__/PlanCompletionCard.test.tsx +2 -2
- package/src/execution/__tests__/PlanStreamingCard.test.tsx +11 -4
- package/src/execution/__tests__/buildThreadItems-plan-completion.test.ts +104 -8
- package/src/execution/__tests__/message-entry.test.tsx +56 -39
- package/src/execution/__tests__/useArtifactCopy.test.tsx +90 -0
- package/src/execution/__tests__/useArtifactDownload.test.tsx +2 -0
- package/src/execution/__tests__/useArtifactInspection.test.tsx +151 -0
- package/src/execution/__tests__/useCreateAgentExecution.test.tsx +35 -0
- package/src/execution/index.ts +20 -2
- package/src/execution/use-build-from-plan-hotkey.ts +1 -1
- package/src/execution/useArtifactContent.ts +7 -0
- package/src/execution/useArtifactCopy.ts +109 -0
- package/src/execution/useArtifactDownload.ts +17 -5
- package/src/execution/useArtifactInspection.ts +252 -0
- package/src/execution/useCreateAgentExecution.ts +17 -3
- package/src/index.ts +17 -2
- package/src/internal/MermaidDiagram.tsx +164 -0
- package/src/internal/__tests__/a11y/mermaid-theme.a11y.test.tsx +122 -0
- package/src/internal/__tests__/markdown-components.test.tsx +93 -1
- package/src/internal/__tests__/mermaid-diagram.test.tsx +282 -0
- package/src/internal/file-tree/FileTreeNode.tsx +13 -2
- package/src/internal/markdown-components.tsx +36 -1
- package/src/internal/mermaid-loader.ts +44 -0
- package/src/internal/mermaid-theme-css.ts +178 -0
- package/src/internal/slug.ts +10 -6
- package/src/library/__tests__/detect-plan-artifact.test.ts +21 -0
- package/src/library/detect-plan-artifact.ts +32 -10
- package/src/library/index.ts +2 -0
- package/src/session/PlanEditor.tsx +1 -1
- package/src/session/SessionViewer.tsx +227 -51
- package/src/session/__tests__/PlanEditor.test.tsx +4 -4
- package/src/session/__tests__/PlanStreamingDocument.test.tsx +1 -1
- package/src/session/__tests__/SessionViewer-artifactTabs.test.tsx +210 -0
- package/src/session/__tests__/SessionViewer-editResubmit.test.tsx +233 -0
- package/src/session/__tests__/SessionViewer-fileReviewDock.test.tsx +57 -0
- package/src/session/__tests__/useSessionArtifacts.test.ts +57 -0
- package/src/session/__tests__/useSessionConversation.test.tsx +216 -1
- package/src/session/__tests__/useSessionPanel.test.ts +70 -1
- package/src/session/artifact-document.ts +23 -0
- package/src/session/facets/ArtifactsTab.tsx +66 -18
- package/src/session/facets/__tests__/ArtifactsTab.test.tsx +111 -47
- package/src/session/index.ts +5 -1
- package/src/session/plan-document.ts +14 -3
- package/src/session/usePlanDraft.ts +1 -1
- package/src/session/useSessionArtifacts.ts +16 -5
- package/src/session/useSessionConversation.ts +80 -10
- package/src/session/useSessionPageFlow.ts +1 -0
- package/src/session/useSessionPanel.ts +41 -0
- package/src/session/useSessionRailViews.tsx +21 -1
- package/src/workspace/EditorTabs.tsx +38 -9
- package/src/workspace/ExplorerTree.tsx +10 -4
- package/src/workspace/FileViewer.tsx +27 -6
- package/src/workspace/WorkspaceContentSearch.tsx +44 -20
- package/src/workspace/WorkspaceEditor.tsx +19 -16
- package/src/workspace/WorkspaceFileSearch.tsx +51 -28
- package/src/workspace/WorkspaceSurface.tsx +106 -48
- package/src/workspace/__tests__/EditorTabs.test.tsx +4 -2
- package/src/workspace/__tests__/ExplorerTree.test.tsx +52 -0
- package/src/workspace/__tests__/FileViewer.test.tsx +18 -0
- package/src/workspace/__tests__/WorkspaceContentSearch.test.tsx +38 -5
- package/src/workspace/__tests__/WorkspaceEditor-initialPanel.test.tsx +19 -0
- package/src/workspace/__tests__/WorkspaceFileSearch.test.tsx +27 -6
- package/src/workspace/__tests__/WorkspaceSurface.test.tsx +70 -0
- package/src/workspace/__tests__/a11y/harness.tsx +140 -0
- package/src/workspace/__tests__/a11y/mock-capabilities.ts +138 -0
- package/src/workspace/__tests__/a11y/workspace-editor.a11y.test.tsx +65 -0
- package/src/workspace/__tests__/a11y/workspace-explorer-search.a11y.test.tsx +112 -0
- package/src/workspace/__tests__/a11y/workspace-viewer-tabs.a11y.test.tsx +69 -0
- package/styles.css +1 -1
- package/workspace/EditorTabs.d.ts +21 -3
- package/workspace/EditorTabs.d.ts.map +1 -1
- package/workspace/EditorTabs.js +18 -6
- package/workspace/EditorTabs.js.map +1 -1
- package/workspace/ExplorerTree.js +8 -4
- package/workspace/ExplorerTree.js.map +1 -1
- package/workspace/FileViewer.d.ts.map +1 -1
- package/workspace/FileViewer.js +19 -8
- package/workspace/FileViewer.js.map +1 -1
- package/workspace/WorkspaceContentSearch.d.ts.map +1 -1
- package/workspace/WorkspaceContentSearch.js +23 -2
- package/workspace/WorkspaceContentSearch.js.map +1 -1
- package/workspace/WorkspaceEditor.d.ts.map +1 -1
- package/workspace/WorkspaceEditor.js +8 -10
- package/workspace/WorkspaceEditor.js.map +1 -1
- package/workspace/WorkspaceFileSearch.d.ts.map +1 -1
- package/workspace/WorkspaceFileSearch.js +23 -3
- package/workspace/WorkspaceFileSearch.js.map +1 -1
- package/workspace/WorkspaceSurface.d.ts.map +1 -1
- package/workspace/WorkspaceSurface.js +54 -18
- package/workspace/WorkspaceSurface.js.map +1 -1
- package/execution/ArtifactCard.d.ts +0 -81
- package/execution/ArtifactCard.d.ts.map +0 -1
- package/execution/ArtifactCard.js +0 -130
- package/execution/ArtifactCard.js.map +0 -1
- package/src/execution/ArtifactCard.tsx +0 -320
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { useIsCodeFenceIncomplete } from "streamdown";
|
|
5
|
+
import { useColorMode } from "../color-mode.js";
|
|
6
|
+
import { loadMermaid } from "./mermaid-loader.js";
|
|
7
|
+
import { MERMAID_THEME_CSS } from "./mermaid-theme-css.js";
|
|
8
|
+
/**
|
|
9
|
+
* `mermaid.render` requires a DOM id for its scratch element. Ids must be
|
|
10
|
+
* unique per render call — theme switches and streaming updates can overlap
|
|
11
|
+
* renders within one component — so a module counter is the simplest
|
|
12
|
+
* collision-free source.
|
|
13
|
+
*/
|
|
14
|
+
let renderSequence = 0;
|
|
15
|
+
/**
|
|
16
|
+
* Renders a fenced ```mermaid block as an inline SVG diagram.
|
|
17
|
+
*
|
|
18
|
+
* Mounted by the shared `pre` override in
|
|
19
|
+
* {@link file://./markdown-components.tsx} whenever a fenced block carries the
|
|
20
|
+
* explicit `mermaid` info string — which means every SDK markdown surface
|
|
21
|
+
* (chat via Streamdown, artifacts/skills via react-markdown) renders diagrams
|
|
22
|
+
* identically. Detection is deliberately limited to the explicit language tag;
|
|
23
|
+
* guessing diagram intent from fence bodies (e.g. a bare fence starting with
|
|
24
|
+
* `flowchart`) is the kind of fuzzy heuristic this codebase avoids.
|
|
25
|
+
*
|
|
26
|
+
* Every failure mode degrades to the exact code block the fence rendered as
|
|
27
|
+
* before this component existed:
|
|
28
|
+
*
|
|
29
|
+
* - **Streaming** — while the fence is still open (`useIsCodeFenceIncomplete`,
|
|
30
|
+
* a safe no-op under react-markdown where the context defaults to `false`),
|
|
31
|
+
* the source renders as a code block; the diagram appears once the fence
|
|
32
|
+
* closes. No half-parsed error flashing mid-stream.
|
|
33
|
+
* - **Library unavailable** — `mermaid` is an optional peer dependency; if the
|
|
34
|
+
* dynamic import fails the source stays a code block.
|
|
35
|
+
* - **Parse error** — invalid diagram source falls back to the code block plus
|
|
36
|
+
* a screen-reader-announced note, so the agent's output is never hidden.
|
|
37
|
+
*
|
|
38
|
+
* Security: agent output is untrusted and this SDK renders inside host
|
|
39
|
+
* applications, so mermaid runs with `securityLevel: "strict"` (sanitized
|
|
40
|
+
* labels, no `click` interactivity) — deliberately stricter than the
|
|
41
|
+
* docs-site renderer, which only ever shows first-party content.
|
|
42
|
+
*
|
|
43
|
+
* Theming: the container chrome is fully `--stgm-*` token-driven, and so is
|
|
44
|
+
* the SVG interior. The built-in `default`/`dark` theme (selected via
|
|
45
|
+
* {@link useColorMode}) is the base; on top of it we inject
|
|
46
|
+
* {@link MERMAID_THEME_CSS}, a token-driven stylesheet whose `var(--stgm-*)`
|
|
47
|
+
* references the browser resolves against the `.stgm` scope. Interiors
|
|
48
|
+
* therefore track the active preset *and* color mode live — no color is read
|
|
49
|
+
* in JS, and a preset switch needs no re-render. Feeding tokens through
|
|
50
|
+
* mermaid's `themeVariables` is not possible: they are authored in `oklch()`,
|
|
51
|
+
* which mermaid's color engine (khroma) cannot parse. Any element or diagram
|
|
52
|
+
* type the CSS does not target falls back to the built-in theme, so a diagram
|
|
53
|
+
* is never blank or mis-colored.
|
|
54
|
+
*/
|
|
55
|
+
export function MermaidDiagram({ chart }) {
|
|
56
|
+
const isIncomplete = useIsCodeFenceIncomplete();
|
|
57
|
+
const colorMode = useColorMode();
|
|
58
|
+
const [state, setState] = useState({ status: "pending" });
|
|
59
|
+
// Markdown parsers hand the fence body over with its trailing newline;
|
|
60
|
+
// mermaid treats leading/trailing blank lines as part of the diagram.
|
|
61
|
+
const source = chart.trim();
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (isIncomplete || source.length === 0)
|
|
64
|
+
return;
|
|
65
|
+
let cancelled = false;
|
|
66
|
+
void (async () => {
|
|
67
|
+
const renderId = `stgm-mermaid-${++renderSequence}`;
|
|
68
|
+
try {
|
|
69
|
+
const mermaid = await loadMermaid();
|
|
70
|
+
// initialize() mutates a global singleton, so it runs before every
|
|
71
|
+
// render call — all diagrams under one provider share a color mode,
|
|
72
|
+
// and re-initializing keeps a theme switch from bleeding stale config
|
|
73
|
+
// into the next render.
|
|
74
|
+
mermaid.initialize({
|
|
75
|
+
startOnLoad: false,
|
|
76
|
+
securityLevel: "strict",
|
|
77
|
+
theme: colorMode === "dark" ? "dark" : "default",
|
|
78
|
+
themeCSS: MERMAID_THEME_CSS,
|
|
79
|
+
fontFamily: "inherit",
|
|
80
|
+
});
|
|
81
|
+
const { svg } = await mermaid.render(renderId, source);
|
|
82
|
+
if (!cancelled)
|
|
83
|
+
setState({ status: "rendered", svg });
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
// Mermaid has historically leaked its scratch element into the
|
|
87
|
+
// document on parse failure; removing it defensively costs nothing.
|
|
88
|
+
document.getElementById(renderId)?.remove();
|
|
89
|
+
if (!cancelled) {
|
|
90
|
+
setState({
|
|
91
|
+
status: "failed",
|
|
92
|
+
message: error instanceof Error ? error.message : String(error),
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
})();
|
|
97
|
+
return () => {
|
|
98
|
+
cancelled = true;
|
|
99
|
+
};
|
|
100
|
+
// A previously rendered diagram stays visible while a re-render (theme
|
|
101
|
+
// switch) is in flight — swapping to a blank pending state would flash.
|
|
102
|
+
}, [source, colorMode, isIncomplete]);
|
|
103
|
+
if (state.status === "rendered") {
|
|
104
|
+
return (_jsx("div", { role: "img", "aria-label": "Mermaid diagram", className: "mb-3 last:mb-0 flex justify-center overflow-x-auto rounded-md border border-border bg-card p-3 [&_svg]:max-w-full", dangerouslySetInnerHTML: { __html: state.svg } }));
|
|
105
|
+
}
|
|
106
|
+
return (_jsx(MermaidSourceFallback, { chart: chart, failureMessage: state.status === "failed" ? state.message : null }));
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* The pre-diagram presentation of a mermaid fence: the same styled code block
|
|
110
|
+
* the shared `pre`/`code` overrides in `markdown-components.tsx` would have
|
|
111
|
+
* produced (classes mirrored from there — importing them would create a
|
|
112
|
+
* module cycle, since that file mounts this component). Shown while the fence
|
|
113
|
+
* streams, while mermaid loads, and permanently when rendering fails.
|
|
114
|
+
*/
|
|
115
|
+
function MermaidSourceFallback({ chart, failureMessage, }) {
|
|
116
|
+
return (_jsxs("div", { className: "mb-3 last:mb-0", children: [_jsx("pre", { className: "overflow-x-auto rounded-md bg-muted p-3", children: _jsx("code", { className: "font-mono text-xs text-foreground", children: chart }) }), failureMessage !== null && (_jsxs("p", { role: "status", className: "mt-1 text-xs text-muted-foreground", children: ["Mermaid diagram failed to render; showing source. (", failureMessage, ")"] }))] }));
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=MermaidDiagram.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MermaidDiagram.js","sourceRoot":"","sources":["../../src/internal/MermaidDiagram.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;;;;GAKG;AACH,IAAI,cAAc,GAAG,CAAC,CAAC;AAavB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,KAAK,EAAuB;IAC3D,MAAM,YAAY,G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.d.ts","sourceRoot":"","sources":["../../../src/internal/file-tree/FileTreeNode.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;GAIG;AACH,eAAO,MAAM,aAAa,mCAAmC,CAAC;AAE9D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC;;;;;;;OAOG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,KAAK,EACL,UAAkB,EAClB,SAAiB,EACjB,YAAoB,EACpB,eAAe,GAChB,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"FileTreeNode.d.ts","sourceRoot":"","sources":["../../../src/internal/file-tree/FileTreeNode.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;GAIG;AACH,eAAO,MAAM,aAAa,mCAAmC,CAAC;AAE9D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC;;;;;;;OAOG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,KAAK,EACL,UAAkB,EAClB,SAAiB,EACjB,YAAoB,EACpB,eAAe,GAChB,EAAE,iBAAiB,2CAkGnB"}
|
|
@@ -40,10 +40,10 @@ export function FileTreeNode({ node, selectedPath, onSelect, onActivate, depth,
|
|
|
40
40
|
e.dataTransfer.setData(FILE_REF_MIME, JSON.stringify({ path: node.path }));
|
|
41
41
|
e.dataTransfer.effectAllowed = "link";
|
|
42
42
|
}, [node.path]);
|
|
43
|
-
return (_jsxs("li", { role: "treeitem", "aria-expanded": isFolder ? expanded : undefined, children: [_jsxs("button", { type: "button", onClick: handleClick, onDoubleClick: onActivate ? handleDoubleClick : undefined, draggable: isDraggable, onDragStart: isDraggable ? handleDragStart : undefined, className: cn("flex w-full items-center gap-1.5 py-1 text-left text-xs transition-colors", "hover:bg-muted", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring", isSelected && !isFolder && "bg-muted text-foreground font-medium", !isSelected && "text-muted-foreground", isDraggable && "cursor-grab active:cursor-grabbing"),
|
|
43
|
+
return (_jsxs("li", { role: "treeitem", "aria-level": depth + 1, "aria-expanded": isFolder ? expanded : undefined, children: [_jsxs("button", { type: "button", onClick: handleClick, onDoubleClick: onActivate ? handleDoubleClick : undefined, draggable: isDraggable, onDragStart: isDraggable ? handleDragStart : undefined, className: cn("flex w-full items-center gap-1.5 py-1 text-left text-xs transition-colors", "hover:bg-muted", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring", isSelected && !isFolder && "bg-muted text-foreground font-medium", !isSelected && "text-muted-foreground", isDraggable && "cursor-grab active:cursor-grabbing"),
|
|
44
44
|
// Indent-guide mode indents via the nested group's margin, so rows need
|
|
45
45
|
// only a small constant inset; padding mode keeps the per-depth inset.
|
|
46
|
-
style: { paddingLeft: indentGuides ? "8px" : `${12 + depth * 12}px`, paddingRight: "8px" }, "aria-current": isSelected ? "true" : undefined, children: [isFolder && (_jsx("span", { className: "text-[10px] text-muted-foreground-subtle", children: expanded ? "▼" : "▶" })), showIcons &&
|
|
46
|
+
style: { paddingLeft: indentGuides ? "8px" : `${12 + depth * 12}px`, paddingRight: "8px" }, "aria-current": isSelected ? "true" : undefined, children: [isFolder && (_jsx("span", { "aria-hidden": "true", className: "text-[10px] text-muted-foreground-subtle", children: expanded ? "▼" : "▶" })), showIcons &&
|
|
47
47
|
(isFolder ? (_jsx(FolderTypeIcon, { open: expanded })) : (_jsx(FileTypeIcon, { fileName: node.name }))), _jsx("span", { className: cn("truncate", isFolder && "font-medium text-foreground"), children: node.name })] }), isFolder && expanded && node.children && (_jsx("ul", { role: "group", className: cn(indentGuides && "ml-3 border-l border-border"), children: node.children.map((child) => (_jsx(FileTreeNode, { node: child, selectedPath: selectedPath, onSelect: onSelect, onActivate: onActivate, depth: depth + 1, enableDrag: enableDrag, showIcons: showIcons, indentGuides: indentGuides, maxInitialDepth: maxInitialDepth }, child.path))) }))] }));
|
|
48
48
|
}
|
|
49
49
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I,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC5B,KAAC,YAAY,IAEX,IAAI,EAAE,KAAK,EACX,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,GAAG,CAAC,EAChB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,IAT3B,KAAK,CAAC,IAAI,CAUf,CACH,CAAC,GACC,CACN,IACE,CACN,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-components.d.ts","sourceRoot":"","sources":["../../src/internal/markdown-components.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,SAAS,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"markdown-components.d.ts","sourceRoot":"","sources":["../../src/internal/markdown-components.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,SAAS,MAAM,YAAY,CAAC;AAUnC;;;GAGG;AACH,eAAO,MAAM,cAAc,sBAAc,CAAC;AAI1C;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD;AAwBD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,EACf,cAAc,UAAQ,GACrB,MAAM,CASR;AASD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG;IAClD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAKA;AA0BD;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,EAAE,UAqMjC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iCAAiC,EAAE,UAqC/C,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { isValidElement } from "react";
|
|
2
3
|
import remarkGfm from "remark-gfm";
|
|
3
4
|
import { cn } from "@stigmer/theme";
|
|
4
5
|
import { highlightToReact } from "./code-highlight.js";
|
|
6
|
+
import { MermaidDiagram } from "./MermaidDiagram.js";
|
|
5
7
|
const LANGUAGE_CLASS_PREFIX = "language-";
|
|
8
|
+
const MERMAID_LANGUAGE_CLASS = "language-mermaid";
|
|
6
9
|
/**
|
|
7
10
|
* Remark plugins applied to all SDK markdown surfaces.
|
|
8
11
|
* Includes GFM (tables, strikethrough, autolinks, task lists).
|
|
@@ -102,6 +105,29 @@ export function extractLeadingH1(markdown) {
|
|
|
102
105
|
return { title: null, body: markdown };
|
|
103
106
|
return { title: match[1], body: trimmed.slice(match[0].length) };
|
|
104
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Returns the mermaid source when a `pre` element's children are a single
|
|
110
|
+
* fenced code block explicitly tagged `mermaid`, or `null` otherwise.
|
|
111
|
+
*
|
|
112
|
+
* Both renderers (Streamdown for chat, react-markdown for artifacts/skills)
|
|
113
|
+
* hand `pre` exactly one `<code>` child whose `className` carries the fence's
|
|
114
|
+
* info string as `language-*` and whose children are the raw source text.
|
|
115
|
+
* Anything that deviates from that shape — a different language, a missing
|
|
116
|
+
* tag, non-string children — is not a mermaid fence and keeps the ordinary
|
|
117
|
+
* code-block rendering. Only the explicit `mermaid` tag qualifies:
|
|
118
|
+
* inspecting fence bodies to guess diagram intent is the kind of fuzzy
|
|
119
|
+
* heuristic this codebase avoids.
|
|
120
|
+
*/
|
|
121
|
+
function extractMermaidSource(children) {
|
|
122
|
+
if (!isValidElement(children))
|
|
123
|
+
return null;
|
|
124
|
+
const { className, children: code } = children.props;
|
|
125
|
+
if (typeof className !== "string")
|
|
126
|
+
return null;
|
|
127
|
+
if (!className.split(/\s+/).includes(MERMAID_LANGUAGE_CLASS))
|
|
128
|
+
return null;
|
|
129
|
+
return typeof code === "string" ? code : null;
|
|
130
|
+
}
|
|
105
131
|
/**
|
|
106
132
|
* Styled react-markdown component overrides for SDK markdown surfaces.
|
|
107
133
|
*
|
|
@@ -140,6 +166,14 @@ export const MARKDOWN_COMPONENTS = {
|
|
|
140
166
|
return (_jsx("li", { className: "leading-relaxed break-words", ...props, children: children }));
|
|
141
167
|
},
|
|
142
168
|
pre({ children, ...props }) {
|
|
169
|
+
// A ```mermaid fence renders as a diagram, not a code block. The check
|
|
170
|
+
// lives here (not in the `code` override) because the diagram must
|
|
171
|
+
// replace the <pre> wrapper too — a block-level diagram container inside
|
|
172
|
+
// <pre> is invalid HTML and would inherit code-block chrome.
|
|
173
|
+
const mermaidSource = extractMermaidSource(children);
|
|
174
|
+
if (mermaidSource !== null) {
|
|
175
|
+
return _jsx(MermaidDiagram, { chart: mermaidSource });
|
|
176
|
+
}
|
|
143
177
|
return (_jsx("pre", { className: "mb-3 last:mb-0 overflow-x-auto rounded-md bg-muted p-3", ...props, children: children }));
|
|
144
178
|
},
|
|
145
179
|
code({ children, className: codeClassName, ...props }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-components.js","sourceRoot":"","sources":["../../src/internal/markdown-components.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"markdown-components.js","sourceRoot":"","sources":["../../src/internal/markdown-components.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAiD,MAAM,OAAO,CAAC;AAEtF,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,E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QAAQ,GACN,CACN,CAAC;IACJ,CAAC;IAED,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAiB;QACtC,OAAO,CACL,aAAI,SAAS,EAAC,wEAAwE,KAAK,KAAK,YAC7F,QAAQ,GACN,CACN,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lazy loader for the `mermaid` library, isolated in its own module — the
|
|
3
|
+
* same seam pattern as `workflow/layout/elk-layout-engine.ts` — so
|
|
4
|
+
* {@link file://./MermaidDiagram.tsx} stays a pure presentation component and
|
|
5
|
+
* tests can mock the load outcome (resolve, reject) without touching module
|
|
6
|
+
* registries.
|
|
7
|
+
*
|
|
8
|
+
* `mermaid` is an optional peer dependency (DD-013): it is large, so it must
|
|
9
|
+
* never sit on the synchronous bundle path, and a host that has not installed
|
|
10
|
+
* it must degrade gracefully (the caller falls back to a code block).
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The mermaid API surface the SDK consumes, typed from the package itself so
|
|
14
|
+
* it stays in lockstep with the installed version.
|
|
15
|
+
*/
|
|
16
|
+
export type MermaidModule = typeof import("mermaid").default;
|
|
17
|
+
/**
|
|
18
|
+
* Dynamically imports `mermaid`, sharing one in-flight import across callers.
|
|
19
|
+
*
|
|
20
|
+
* @returns The mermaid default export.
|
|
21
|
+
* @throws If `mermaid` cannot be imported (not installed, or the async chunk
|
|
22
|
+
* failed to load). Callers treat this as "diagrams unavailable" and render
|
|
23
|
+
* the fenced source as a plain code block.
|
|
24
|
+
*/
|
|
25
|
+
export declare function loadMermaid(): Promise<MermaidModule>;
|
|
26
|
+
//# sourceMappingURL=mermaid-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mermaid-loader.d.ts","sourceRoot":"","sources":["../../src/internal/mermaid-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,cAAc,SAAS,EAAE,OAAO,CAAC;AAU7D;;;;;;;GAOG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAAC,aAAa,CAAC,CASpD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lazy loader for the `mermaid` library, isolated in its own module — the
|
|
3
|
+
* same seam pattern as `workflow/layout/elk-layout-engine.ts` — so
|
|
4
|
+
* {@link file://./MermaidDiagram.tsx} stays a pure presentation component and
|
|
5
|
+
* tests can mock the load outcome (resolve, reject) without touching module
|
|
6
|
+
* registries.
|
|
7
|
+
*
|
|
8
|
+
* `mermaid` is an optional peer dependency (DD-013): it is large, so it must
|
|
9
|
+
* never sit on the synchronous bundle path, and a host that has not installed
|
|
10
|
+
* it must degrade gracefully (the caller falls back to a code block).
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Holds the in-flight import promise so concurrent diagrams share one load.
|
|
14
|
+
* A failed import clears the cache: rejections are often transient (a
|
|
15
|
+
* chunk-load hiccup mid-deploy), and caching one would break every diagram
|
|
16
|
+
* for the rest of the session.
|
|
17
|
+
*/
|
|
18
|
+
let mermaidImport = null;
|
|
19
|
+
/**
|
|
20
|
+
* Dynamically imports `mermaid`, sharing one in-flight import across callers.
|
|
21
|
+
*
|
|
22
|
+
* @returns The mermaid default export.
|
|
23
|
+
* @throws If `mermaid` cannot be imported (not installed, or the async chunk
|
|
24
|
+
* failed to load). Callers treat this as "diagrams unavailable" and render
|
|
25
|
+
* the fenced source as a plain code block.
|
|
26
|
+
*/
|
|
27
|
+
export function loadMermaid() {
|
|
28
|
+
mermaidImport ??= import("mermaid").then((module) => module.default, (error) => {
|
|
29
|
+
mermaidImport = null;
|
|
30
|
+
throw error;
|
|
31
|
+
});
|
|
32
|
+
return mermaidImport;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=mermaid-loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mermaid-loader.js","sourceRoot":"","sources":["../../src/internal/mermaid-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH;;;;;GAKG;AACH,IAAI,aAAa,GAAkC,IAAI,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW;IACzB,aAAa,KAAK,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CACtC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAC1B,CAAC,KAAc,EAAE,EAAE;QACjB,aAAa,GAAG,IAAI,CAAC;QACrB,MAAM,KAAK,CAAC;IACd,CAAC,CACF,CAAC;IACF,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token-driven `themeCSS` for Mermaid diagram interiors.
|
|
3
|
+
*
|
|
4
|
+
* Mermaid's built-in `default`/`dark` themes color a diagram's SVG interior
|
|
5
|
+
* with a fixed palette that ignores the host's `--stgm-*` preset (Corporate,
|
|
6
|
+
* Fintech, ...). The obvious fix — feeding resolved tokens into Mermaid's
|
|
7
|
+
* `themeVariables` — is blocked: our tokens are authored in `oklch()`, and
|
|
8
|
+
* Mermaid's color engine (`khroma`) parses only hex/rgb/hsl/keyword, so it
|
|
9
|
+
* throws or NaNs on `oklch(...)`. (Mermaid also gates every `themeVariables`
|
|
10
|
+
* value through the allowlist `^[\d "#%(),.;A-Za-z]+$`, which excludes `-` and
|
|
11
|
+
* would blank any `var(--...)`.)
|
|
12
|
+
*
|
|
13
|
+
* Instead we hand Mermaid this CSS via `initialize({ themeCSS })`. Mermaid
|
|
14
|
+
* injects it into the diagram's own `<style>` block, scoped under the render
|
|
15
|
+
* id (`#stgm-mermaid-N`), *after* the theme palette it computes. Because every
|
|
16
|
+
* selector in that block is id-prefixed, our rules and the palette's rules sit
|
|
17
|
+
* at equal specificity, so ours win by source order — and `!important` makes
|
|
18
|
+
* that bulletproof against the few palette rules that are themselves important
|
|
19
|
+
* or inlined. Crucially, `themeCSS` never passes through khroma, so the
|
|
20
|
+
* `oklch()`-backed `var(--stgm-*)` references flow straight to the browser,
|
|
21
|
+
* which resolves them against the `.stgm` scope the SVG lives in. That is why
|
|
22
|
+
* interiors track the active preset *and* color mode live, with no JS color
|
|
23
|
+
* reading and no re-render on theme change.
|
|
24
|
+
*
|
|
25
|
+
* `initialize({ theme })` still selects the built-in `default`/`dark` theme as
|
|
26
|
+
* the base, so any element or diagram type we do not target here degrades to
|
|
27
|
+
* Mermaid's stock palette — never a blank or mis-colored diagram.
|
|
28
|
+
*
|
|
29
|
+
* Palette intent (subtle surfaces + brand accents — legibility over brand
|
|
30
|
+
* saturation): node/actor bodies sit on a muted surface with quiet
|
|
31
|
+
* token-colored borders and edges; labels use the standard foreground; the
|
|
32
|
+
* brand `--stgm-primary` is reserved for structural headers (subgraph/cluster
|
|
33
|
+
* titles, sequence loop/section titles, the sequence-number badge).
|
|
34
|
+
*
|
|
35
|
+
* Coverage is the two families agents emit overwhelmingly — flowchart and
|
|
36
|
+
* sequence — plus the shared marker/edge-label chrome. Both label render paths
|
|
37
|
+
* are handled: SVG `text`/`tspan` (via `fill`) and HTML labels inside
|
|
38
|
+
* `foreignObject` (via `color`).
|
|
39
|
+
*/
|
|
40
|
+
export declare const MERMAID_THEME_CSS = "\n /* Shared: edge arrowheads / markers */\n .marker {\n fill: var(--stgm-border) !important;\n stroke: var(--stgm-border) !important;\n }\n .marker.cross {\n stroke: var(--stgm-border) !important;\n }\n\n /* Flowchart: node bodies */\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: var(--stgm-muted) !important;\n stroke: var(--stgm-border) !important;\n }\n .node .neo-node {\n stroke: var(--stgm-border) !important;\n }\n .node .katex path {\n fill: var(--stgm-foreground) !important;\n stroke: var(--stgm-foreground) !important;\n }\n\n /* Flowchart: node labels (SVG text and HTML spans) */\n .label {\n color: var(--stgm-foreground) !important;\n }\n .label text,\n .label span {\n fill: var(--stgm-foreground) !important;\n color: var(--stgm-foreground) !important;\n }\n\n /* Flowchart: edges */\n .edgePath .path,\n .flowchart-link {\n stroke: var(--stgm-border) !important;\n }\n .arrowheadPath,\n .root .anchor path {\n fill: var(--stgm-border) !important;\n stroke: var(--stgm-border) !important;\n }\n\n /* Flowchart: edge labels sit on the diagram surface for legibility */\n .edgeLabel,\n .edgeLabel p,\n .edgeLabel rect,\n .labelBkg {\n background-color: var(--stgm-card) !important;\n fill: var(--stgm-card) !important;\n }\n\n /* Flowchart: subgraph clusters \u2014 muted surface, brand-accent title */\n .cluster rect {\n fill: var(--stgm-muted-subtle) !important;\n stroke: var(--stgm-border) !important;\n }\n .cluster-label text,\n .cluster text {\n fill: var(--stgm-primary) !important;\n }\n .cluster-label span,\n .cluster span {\n color: var(--stgm-primary) !important;\n }\n\n /* Sequence: actors and lifelines */\n .actor {\n fill: var(--stgm-muted) !important;\n stroke: var(--stgm-border) !important;\n }\n text.actor > tspan {\n fill: var(--stgm-foreground) !important;\n }\n .actor-line {\n stroke: var(--stgm-border) !important;\n }\n\n /* Sequence: messages */\n .messageLine0,\n .messageLine1 {\n stroke: var(--stgm-border) !important;\n }\n [id$=\"-arrowhead\"] path,\n [id$=\"-crosshead\"] path {\n fill: var(--stgm-border) !important;\n stroke: var(--stgm-border) !important;\n }\n .messageText {\n fill: var(--stgm-foreground) !important;\n }\n\n /* Sequence: number badge \u2014 brand accent with its paired foreground */\n [id$=\"-sequencenumber\"] {\n fill: var(--stgm-primary) !important;\n }\n .sequenceNumber {\n fill: var(--stgm-primary-foreground) !important;\n }\n\n /* Sequence: alt/opt/loop boxes and labels */\n .labelBox {\n fill: var(--stgm-muted-subtle) !important;\n stroke: var(--stgm-border) !important;\n }\n .labelText,\n .labelText > tspan {\n fill: var(--stgm-foreground) !important;\n }\n .loopText,\n .loopText > tspan,\n .sectionTitle,\n .sectionTitle > tspan {\n fill: var(--stgm-primary) !important;\n }\n .loopLine {\n stroke: var(--stgm-border) !important;\n }\n\n /* Sequence: notes and activations */\n .note {\n fill: var(--stgm-muted-subtle) !important;\n stroke: var(--stgm-border) !important;\n }\n .noteText,\n .noteText > tspan {\n fill: var(--stgm-foreground) !important;\n }\n .activation0,\n .activation1 {\n fill: var(--stgm-muted) !important;\n stroke: var(--stgm-border) !important;\n }\n";
|
|
41
|
+
//# sourceMappingURL=mermaid-theme-css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mermaid-theme-css.d.ts","sourceRoot":"","sources":["../../src/internal/mermaid-theme-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,iBAAiB,61GA0I7B,CAAC"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token-driven `themeCSS` for Mermaid diagram interiors.
|
|
3
|
+
*
|
|
4
|
+
* Mermaid's built-in `default`/`dark` themes color a diagram's SVG interior
|
|
5
|
+
* with a fixed palette that ignores the host's `--stgm-*` preset (Corporate,
|
|
6
|
+
* Fintech, ...). The obvious fix — feeding resolved tokens into Mermaid's
|
|
7
|
+
* `themeVariables` — is blocked: our tokens are authored in `oklch()`, and
|
|
8
|
+
* Mermaid's color engine (`khroma`) parses only hex/rgb/hsl/keyword, so it
|
|
9
|
+
* throws or NaNs on `oklch(...)`. (Mermaid also gates every `themeVariables`
|
|
10
|
+
* value through the allowlist `^[\d "#%(),.;A-Za-z]+$`, which excludes `-` and
|
|
11
|
+
* would blank any `var(--...)`.)
|
|
12
|
+
*
|
|
13
|
+
* Instead we hand Mermaid this CSS via `initialize({ themeCSS })`. Mermaid
|
|
14
|
+
* injects it into the diagram's own `<style>` block, scoped under the render
|
|
15
|
+
* id (`#stgm-mermaid-N`), *after* the theme palette it computes. Because every
|
|
16
|
+
* selector in that block is id-prefixed, our rules and the palette's rules sit
|
|
17
|
+
* at equal specificity, so ours win by source order — and `!important` makes
|
|
18
|
+
* that bulletproof against the few palette rules that are themselves important
|
|
19
|
+
* or inlined. Crucially, `themeCSS` never passes through khroma, so the
|
|
20
|
+
* `oklch()`-backed `var(--stgm-*)` references flow straight to the browser,
|
|
21
|
+
* which resolves them against the `.stgm` scope the SVG lives in. That is why
|
|
22
|
+
* interiors track the active preset *and* color mode live, with no JS color
|
|
23
|
+
* reading and no re-render on theme change.
|
|
24
|
+
*
|
|
25
|
+
* `initialize({ theme })` still selects the built-in `default`/`dark` theme as
|
|
26
|
+
* the base, so any element or diagram type we do not target here degrades to
|
|
27
|
+
* Mermaid's stock palette — never a blank or mis-colored diagram.
|
|
28
|
+
*
|
|
29
|
+
* Palette intent (subtle surfaces + brand accents — legibility over brand
|
|
30
|
+
* saturation): node/actor bodies sit on a muted surface with quiet
|
|
31
|
+
* token-colored borders and edges; labels use the standard foreground; the
|
|
32
|
+
* brand `--stgm-primary` is reserved for structural headers (subgraph/cluster
|
|
33
|
+
* titles, sequence loop/section titles, the sequence-number badge).
|
|
34
|
+
*
|
|
35
|
+
* Coverage is the two families agents emit overwhelmingly — flowchart and
|
|
36
|
+
* sequence — plus the shared marker/edge-label chrome. Both label render paths
|
|
37
|
+
* are handled: SVG `text`/`tspan` (via `fill`) and HTML labels inside
|
|
38
|
+
* `foreignObject` (via `color`).
|
|
39
|
+
*/
|
|
40
|
+
export const MERMAID_THEME_CSS = `
|
|
41
|
+
/* Shared: edge arrowheads / markers */
|
|
42
|
+
.marker {
|
|
43
|
+
fill: var(--stgm-border) !important;
|
|
44
|
+
stroke: var(--stgm-border) !important;
|
|
45
|
+
}
|
|
46
|
+
.marker.cross {
|
|
47
|
+
stroke: var(--stgm-border) !important;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Flowchart: node bodies */
|
|
51
|
+
.node rect,
|
|
52
|
+
.node circle,
|
|
53
|
+
.node ellipse,
|
|
54
|
+
.node polygon,
|
|
55
|
+
.node path {
|
|
56
|
+
fill: var(--stgm-muted) !important;
|
|
57
|
+
stroke: var(--stgm-border) !important;
|
|
58
|
+
}
|
|
59
|
+
.node .neo-node {
|
|
60
|
+
stroke: var(--stgm-border) !important;
|
|
61
|
+
}
|
|
62
|
+
.node .katex path {
|
|
63
|
+
fill: var(--stgm-foreground) !important;
|
|
64
|
+
stroke: var(--stgm-foreground) !important;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Flowchart: node labels (SVG text and HTML spans) */
|
|
68
|
+
.label {
|
|
69
|
+
color: var(--stgm-foreground) !important;
|
|
70
|
+
}
|
|
71
|
+
.label text,
|
|
72
|
+
.label span {
|
|
73
|
+
fill: var(--stgm-foreground) !important;
|
|
74
|
+
color: var(--stgm-foreground) !important;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Flowchart: edges */
|
|
78
|
+
.edgePath .path,
|
|
79
|
+
.flowchart-link {
|
|
80
|
+
stroke: var(--stgm-border) !important;
|
|
81
|
+
}
|
|
82
|
+
.arrowheadPath,
|
|
83
|
+
.root .anchor path {
|
|
84
|
+
fill: var(--stgm-border) !important;
|
|
85
|
+
stroke: var(--stgm-border) !important;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Flowchart: edge labels sit on the diagram surface for legibility */
|
|
89
|
+
.edgeLabel,
|
|
90
|
+
.edgeLabel p,
|
|
91
|
+
.edgeLabel rect,
|
|
92
|
+
.labelBkg {
|
|
93
|
+
background-color: var(--stgm-card) !important;
|
|
94
|
+
fill: var(--stgm-card) !important;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Flowchart: subgraph clusters — muted surface, brand-accent title */
|
|
98
|
+
.cluster rect {
|
|
99
|
+
fill: var(--stgm-muted-subtle) !important;
|
|
100
|
+
stroke: var(--stgm-border) !important;
|
|
101
|
+
}
|
|
102
|
+
.cluster-label text,
|
|
103
|
+
.cluster text {
|
|
104
|
+
fill: var(--stgm-primary) !important;
|
|
105
|
+
}
|
|
106
|
+
.cluster-label span,
|
|
107
|
+
.cluster span {
|
|
108
|
+
color: var(--stgm-primary) !important;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Sequence: actors and lifelines */
|
|
112
|
+
.actor {
|
|
113
|
+
fill: var(--stgm-muted) !important;
|
|
114
|
+
stroke: var(--stgm-border) !important;
|
|
115
|
+
}
|
|
116
|
+
text.actor > tspan {
|
|
117
|
+
fill: var(--stgm-foreground) !important;
|
|
118
|
+
}
|
|
119
|
+
.actor-line {
|
|
120
|
+
stroke: var(--stgm-border) !important;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Sequence: messages */
|
|
124
|
+
.messageLine0,
|
|
125
|
+
.messageLine1 {
|
|
126
|
+
stroke: var(--stgm-border) !important;
|
|
127
|
+
}
|
|
128
|
+
[id$="-arrowhead"] path,
|
|
129
|
+
[id$="-crosshead"] path {
|
|
130
|
+
fill: var(--stgm-border) !important;
|
|
131
|
+
stroke: var(--stgm-border) !important;
|
|
132
|
+
}
|
|
133
|
+
.messageText {
|
|
134
|
+
fill: var(--stgm-foreground) !important;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Sequence: number badge — brand accent with its paired foreground */
|
|
138
|
+
[id$="-sequencenumber"] {
|
|
139
|
+
fill: var(--stgm-primary) !important;
|
|
140
|
+
}
|
|
141
|
+
.sequenceNumber {
|
|
142
|
+
fill: var(--stgm-primary-foreground) !important;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Sequence: alt/opt/loop boxes and labels */
|
|
146
|
+
.labelBox {
|
|
147
|
+
fill: var(--stgm-muted-subtle) !important;
|
|
148
|
+
stroke: var(--stgm-border) !important;
|
|
149
|
+
}
|
|
150
|
+
.labelText,
|
|
151
|
+
.labelText > tspan {
|
|
152
|
+
fill: var(--stgm-foreground) !important;
|
|
153
|
+
}
|
|
154
|
+
.loopText,
|
|
155
|
+
.loopText > tspan,
|
|
156
|
+
.sectionTitle,
|
|
157
|
+
.sectionTitle > tspan {
|
|
158
|
+
fill: var(--stgm-primary) !important;
|
|
159
|
+
}
|
|
160
|
+
.loopLine {
|
|
161
|
+
stroke: var(--stgm-border) !important;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Sequence: notes and activations */
|
|
165
|
+
.note {
|
|
166
|
+
fill: var(--stgm-muted-subtle) !important;
|
|
167
|
+
stroke: var(--stgm-border) !important;
|
|
168
|
+
}
|
|
169
|
+
.noteText,
|
|
170
|
+
.noteText > tspan {
|
|
171
|
+
fill: var(--stgm-foreground) !important;
|
|
172
|
+
}
|
|
173
|
+
.activation0,
|
|
174
|
+
.activation1 {
|
|
175
|
+
fill: var(--stgm-muted) !important;
|
|
176
|
+
stroke: var(--stgm-border) !important;
|
|
177
|
+
}
|
|
178
|
+
`;
|
|
179
|
+
//# sourceMappingURL=mermaid-theme-css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mermaid-theme-css.js","sourceRoot":"","sources":["../../src/internal/mermaid-theme-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0IhC,CAAC"}
|
package/internal/slug.d.ts
CHANGED
|
@@ -7,17 +7,21 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Rules (applied in order):
|
|
9
9
|
* 1. Convert to lowercase
|
|
10
|
-
* 2. Replace spaces with hyphens
|
|
10
|
+
* 2. Replace spaces and dots (namespace separators) with hyphens
|
|
11
11
|
* 3. Strip everything except `a-z`, `0-9`, and `-`
|
|
12
12
|
* 4. Collapse consecutive hyphens into one
|
|
13
13
|
* 5. Trim leading / trailing hyphens
|
|
14
14
|
*
|
|
15
|
+
* Dots are treated as namespace separators (e.g. `platform.sara` → `platform-sara`),
|
|
16
|
+
* matching the backend generators, so namespace-scoped names stay readable.
|
|
17
|
+
*
|
|
15
18
|
* @example
|
|
16
19
|
* ```ts
|
|
17
|
-
* generateSlug("My Cool Agent")
|
|
18
|
-
* generateSlug("Acme Corp!")
|
|
19
|
-
* generateSlug(" --hello-- ")
|
|
20
|
-
* generateSlug("")
|
|
20
|
+
* generateSlug("My Cool Agent") // "my-cool-agent"
|
|
21
|
+
* generateSlug("Acme Corp!") // "acme-corp"
|
|
22
|
+
* generateSlug(" --hello-- ") // "hello"
|
|
23
|
+
* generateSlug("platform.planton-arch") // "platform-planton-arch"
|
|
24
|
+
* generateSlug("") // ""
|
|
21
25
|
* ```
|
|
22
26
|
*/
|
|
23
27
|
export declare function generateSlug(name: string): string;
|
package/internal/slug.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slug.d.ts","sourceRoot":"","sources":["../../src/internal/slug.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"slug.d.ts","sourceRoot":"","sources":["../../src/internal/slug.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOjD;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
|
package/internal/slug.js
CHANGED
|
@@ -7,23 +7,27 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Rules (applied in order):
|
|
9
9
|
* 1. Convert to lowercase
|
|
10
|
-
* 2. Replace spaces with hyphens
|
|
10
|
+
* 2. Replace spaces and dots (namespace separators) with hyphens
|
|
11
11
|
* 3. Strip everything except `a-z`, `0-9`, and `-`
|
|
12
12
|
* 4. Collapse consecutive hyphens into one
|
|
13
13
|
* 5. Trim leading / trailing hyphens
|
|
14
14
|
*
|
|
15
|
+
* Dots are treated as namespace separators (e.g. `platform.sara` → `platform-sara`),
|
|
16
|
+
* matching the backend generators, so namespace-scoped names stay readable.
|
|
17
|
+
*
|
|
15
18
|
* @example
|
|
16
19
|
* ```ts
|
|
17
|
-
* generateSlug("My Cool Agent")
|
|
18
|
-
* generateSlug("Acme Corp!")
|
|
19
|
-
* generateSlug(" --hello-- ")
|
|
20
|
-
* generateSlug("")
|
|
20
|
+
* generateSlug("My Cool Agent") // "my-cool-agent"
|
|
21
|
+
* generateSlug("Acme Corp!") // "acme-corp"
|
|
22
|
+
* generateSlug(" --hello-- ") // "hello"
|
|
23
|
+
* generateSlug("platform.planton-arch") // "platform-planton-arch"
|
|
24
|
+
* generateSlug("") // ""
|
|
21
25
|
* ```
|
|
22
26
|
*/
|
|
23
27
|
export function generateSlug(name) {
|
|
24
28
|
return name
|
|
25
29
|
.toLowerCase()
|
|
26
|
-
.replace(/ /g, "-")
|
|
30
|
+
.replace(/[ .]/g, "-")
|
|
27
31
|
.replace(/[^a-z0-9-]/g, "")
|
|
28
32
|
.replace(/-{2,}/g, "-")
|
|
29
33
|
.replace(/^-+|-+$/g, "");
|
package/internal/slug.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slug.js","sourceRoot":"","sources":["../../src/internal/slug.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"slug.js","sourceRoot":"","sources":["../../src/internal/slug.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,IAAI;SACR,WAAW,EAAE;SACb,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;SACrB,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC;SAC1B,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;SACtB,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|