Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
feat(webui): render Mermaid diagrams with Pele (#6302)
chengyongruf57018aa7fa4
diff --git a/docs/webui.md b/docs/webui.mdindex d39eb7260..c624dc36d 100644--- a/docs/webui.md+++ b/docs/webui.md@@ -133,6 +133,10 @@ PNG, JPEG, GIF and WebP files up to 8 MiB can be previewed as images. Hover or fA plain image file link does not automatically insert a large image into the reply. Explicit Markdown images appear inline; image attachments use a compact gallery, showing at most four thumbnails before a count of the remaining images. An image already displayed inline is not duplicated in the attachment gallery.+Mermaid code fences show their source while a reply is being generated, then render a diagram when the reply finishes. Choose **Source** or **Diagram** to switch views, or **Copy source** to copy the original code. **Enlarge diagram** opens a viewer with zoom buttons, pinch-to-zoom and drag-to-pan. With the viewport focused, use **+**, **−** and **0** to zoom or reset, and arrow keys to pan; **Escape** closes the viewer.++If a diagram cannot be rendered, its source stays available with an error message. Links, external images and executable HTML inside diagrams are disabled.+Select a file reference to preview it. Right-click the reference or its preview tab to copy its absolute or project-relative path. Keyboard users can focus a reference and press **Shift+F10**. Paths are resolved on the gateway machine, which may not be the computer running your browser. Files outside the project do not have a project-relative path. If a reference cannot be resolved, you can still copy the original reference; the menu does not invent an absolute path. Finder, external editor and terminal launching are not available from this browser menu.File previews follow the active topic's access mode. Restricted workspace access previews only files under the selected workspace. Full Access can preview files outside the workspace when that access mode is allowed by the gateway.diff --git a/scripts/check_client_import_boundaries.mjs b/scripts/check_client_import_boundaries.mjsindex 2f004d7a7..1abf7a845 100644--- a/scripts/check_client_import_boundaries.mjs+++ b/scripts/check_client_import_boundaries.mjs@@ -120,6 +120,14 @@ export function findViolations(compiler, root, file, source, options, project) {rules.push("tui-client");}}+ if (within(relative, "webui/src") && within(specifier, "pele")+ && relative !== "webui/src/components/markdown-diagrams/pele.worker.ts") {+ rules.push("diagram-worker-engine");+ }+ if (within(relative, "webui/src") && ["saxes", "css-tree"].some((name) => within(specifier, name))+ && relative !== "webui/src/components/markdown-diagrams/svg-image.ts") {+ rules.push("diagram-worker-output");+ }if (within(relative, "webui/src/lib") && WEBUI_VIEWS.some((prefix) => targetPath !== null && within(targetPath, prefix))) {rules.push("webui-lib");}diff --git a/scripts/check_client_import_boundaries.test.mjs b/scripts/check_client_import_boundaries.test.mjsindex 0498e7bd0..81d2f05c6 100644--- a/scripts/check_client_import_boundaries.test.mjs+++ b/scripts/check_client_import_boundaries.test.mjs@@ -82,6 +82,8 @@ test.each([["webui/src/lib/model.ts", 'import "../i18n";', "webui-lib-bootstrap"],["webui/src/lib/model.ts", 'import "../i18n/index.ts";', "webui-lib-bootstrap"],["webui/src/lib/format.ts", 'import i18n from "i18next";', "pure-format-utils"],+ ["webui/src/components/markdown-diagrams/runtime.ts", 'import { render } from "pele/lazy";', "diagram-worker-engine"],+ ["webui/src/components/markdown-diagrams/MermaidBlock.tsx", 'import { SaxesParser } from "saxes";', "diagram-worker-output"],])("rejects the owning boundary in %s", (relative, source, rule) => {expect(inspect(relative, source)).toHaveLength(1);expect(inspect(relative, source)[0]).toContain(`[${rule}] must not import`);@@ -92,6 +94,8 @@ test.each([["tui/src/client/api.ts", 'import "../../../packages/client-events/notifications";'],["webui/src/lib/model.ts", 'import "../../../packages/client-events/notifications";'],["webui/src/channel-plugins/types.ts", 'import type { ComponentType } from "react";'],+ ["webui/src/components/markdown-diagrams/pele.worker.ts", 'import { render } from "pele/lazy";'],+ ["webui/src/components/markdown-diagrams/svg-image.ts", 'import { parse } from "css-tree/parser";'],])("permits the shared contract or contribution interface in %s", (relative, source) => {expect(inspect(relative, source)).toEqual([]);});diff --git a/webui/browser/diagram-fixture.tsx b/webui/browser/diagram-fixture.tsxnew file mode 100644index 000000000..a91526dfe--- /dev/null+++ b/webui/browser/diagram-fixture.tsx@@ -0,0 +1,37 @@+import { useState } from "react";++import { MessageBubble } from "@/components/MessageBubble";+import { DiagramScope } from "@/components/markdown-diagrams/context";+import { ThemeProvider, useTheme } from "@/hooks/useTheme";++export const diagramExamples = {+ flowchart: 'flowchart LR\nA[开始:接收用户请求] --> B{检查权限}\nB -->|允许| C[执行任务 ✅]\nB -->|拒绝| D[返回说明]',+ sequence: 'sequenceDiagram\nparticipant 用户\nparticipant 助手\n用户->>助手: 分析这个问题\n助手-->>用户: 返回结果 ✅',+ state: 'stateDiagram-v2\n[*] --> 等待\n等待 --> 处理中: 收到请求\n处理中 --> 完成: 成功\n完成 --> [*]',+ invalid: 'flowchart LR\nA[Unclosed',+};++export function DiagramFixture({ parameters }: { parameters: URLSearchParams }) {+ const { theme, toggle } = useTheme();+ const [streaming, setStreaming] = useState(parameters.has("stream"));+ const [identity, setIdentity] = useState("first");+ const [source, setSource] = useState(diagramExamples[parameters.get("type") as keyof typeof diagramExamples] ?? diagramExamples.flowchart);+ const examples = parameters.has("many")+ ? Array.from({ length: 12 }, (_, index) => `flowchart LR\nA[输入 ${index}] --> B[处理 ${index}] --> C[输出 ${index}]`)+ : parameters.has("multiple") ? Object.values(diagramExamples).slice(0, 3) : [source];+ const replies = parameters.has("many")+ ? [examples.map((example) => `\`\`\`mermaid\n${example}\n\`\`\``).join("\n\n")]+ : examples.map((example, index) => `A ${index + 1} diagram.\n\n\`\`\`mermaid\n${example}\n\`\`\`\n\nThe source stays available.`);+ return <ThemeProvider theme={theme}><main className="mx-auto max-w-3xl space-y-4 p-4 sm:p-6">+ <div className="flex flex-wrap gap-3">+ <button onClick={toggle}>Toggle theme</button>+ <button onClick={() => setStreaming(false)}>Complete message</button>+ <button onClick={() => { setIdentity((value) => value === "first" ? "second" : "first"); setSource(diagramExamples.state); }}>Switch conversation</button>+ </div>+ {parameters.has("edit") && <textarea aria-label="Diagram source" className="h-32 w-full border" value={source} onChange={(event) => setSource(event.target.value)} />}+ <DiagramScope identity={identity}>{replies.map((content, index) => <MessageBubble key={index} message={{+ id: `diagram-${index}`, role: "assistant", createdAt: index + 1, isStreaming: streaming,+ content,+ }} />)}</DiagramScope>+ </main></ThemeProvider>;+}diff --git a/webui/browser/diagrams.spec.ts b/webui/browser/diagrams.spec.tsnew file mode 100644index 000000000..ae0e89336--- /dev/null+++ b/webui/browser/diagrams.spec.ts@@ -0,0 +1,196 @@+import { expect, test, type Locator } from "@playwright/test";++async function loadedImage(image: Locator) {+ await expect(image).toBeVisible();+ await expect.poll(() => image.evaluate((element: HTMLImageElement) => element.complete && element.naturalWidth > 0)).toBe(true);+}++test("same-source completion loads a real Pele image only after generation, with source/copy/viewer controls", async ({ page, context }) => {+ await context.grantPermissions(["clipboard-read", "clipboard-write"]);+ const requests: string[] = [];+ page.on("request", (request) => requests.push(request.url()));+ await page.goto("/browser/fixture.html?case=diagrams&stream");+ await expect(page.getByText("开始:接收用户请求", { exact: false })).toBeVisible();+ expect(requests.some((url) => /pele\.worker|node_modules\/pele\//.test(url))).toBe(false);+ await page.getByRole("button", { name: "Complete message" }).click();+ const block = page.getByTestId("mermaid-block");+ const image = block.locator("img");+ await loadedImage(image);+ expect(requests.some((url) => url.includes("pele.worker"))).toBe(true);+ const content = await image.evaluate(async (element: HTMLImageElement) => fetch(element.src).then((response) => response.text()));+ expect(content).toContain("<path");+ expect(content).toContain("接收用户请求");+ const copyButton = block.getByRole("button", { name: "Copy source" });+ await copyButton.hover();+ await expect(page.getByRole("tooltip", { name: "Copy source", exact: true })).toBeVisible();+ await copyButton.click();+ await expect.poll(() => page.evaluate(() => navigator.clipboard.readText())).toContain("flowchart LR");+ await block.getByRole("button", { name: "Source", exact: true }).click();+ await expect(block.locator("pre")).toContainText("检查权限");+ await block.getByRole("button", { name: "Diagram", exact: true }).click();+ await loadedImage(image);+ const opener = block.getByRole("button", { name: "Enlarge diagram" });+ await opener.hover();+ await expect(page.getByRole("tooltip", { name: "Enlarge diagram", exact: true })).toBeVisible();+ await page.mouse.move(0, 0, { steps: 10 });+ await expect(page.getByRole("tooltip")).toHaveCount(0);+ await opener.focus();+ await expect(page.getByRole("tooltip", { name: "Enlarge diagram", exact: true })).toBeVisible();+ await page.keyboard.press("Enter");+ const dialog = page.getByRole("dialog");+ await expect(dialog).toBeVisible();+ await dialog.getByRole("button", { name: "Zoom in" }).click();+ await expect(dialog.getByRole("button", { name: "Fit image" })).toHaveText("150%");+ const viewport = dialog.getByTestId("image-viewport");+ await viewport.focus();+ await page.keyboard.press("0");+ await expect(dialog.getByRole("button", { name: "Fit image" })).toHaveText("100%");+ await page.keyboard.press("Escape");+ await expect(dialog).not.toBeVisible();+ await expect(opener).toBeFocused();+ await page.screenshot({ path: test.info().outputPath("flowchart-light.png"), fullPage: true });+});++test("flowchart, sequence and state images remain readable across theme and narrow-width changes", async ({ page }) => {+ await page.setViewportSize({ width: 1280, height: 1400 });+ await page.goto("/browser/fixture.html?case=diagrams&multiple");+ const blocks = page.getByTestId("mermaid-block");+ const images = blocks.locator("img");+ await expect(images).toHaveCount(3);+ for (const image of await images.all()) await loadedImage(image);+ const before = await images.evaluateAll((elements) => elements.map((element) => (element as HTMLImageElement).src));+ await page.getByRole("button", { name: "Toggle theme" }).click();+ await expect.poll(() => images.evaluateAll((elements) => elements.map((element) => (element as HTMLImageElement).src))).not.toEqual(before);+ await page.screenshot({ path: test.info().outputPath("multiple-dark-desktop.png"), fullPage: true });+ await page.setViewportSize({ width: 390, height: 844 });+ for (const block of await blocks.all()) { await block.scrollIntoViewIfNeeded(); await loadedImage(block.locator("img")); }+ expect(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth)).toBe(true);+ await page.screenshot({ path: test.info().outputPath("multiple-dark-mobile.png"), fullPage: true });+});++test("twelve visible small diagrams render together and recolor without exhausting the shared budget", async ({ page }) => {+ await page.setViewportSize({ width: 1280, height: 2300 });+ await page.goto("/browser/fixture.html?case=diagrams&many");+ const blocks = page.getByTestId("mermaid-block");+ const images = blocks.locator("img");+ await expect(blocks).toHaveCount(12);+ await expect(images).toHaveCount(12);+ for (const image of await images.all()) await loadedImage(image);+ await expect(blocks.last()).toBeInViewport();+ const before = await images.evaluateAll((elements) => elements.map((element) => (element as HTMLImageElement).src));+ await page.getByRole("button", { name: "Toggle theme" }).click();+ await expect.poll(() => images.evaluateAll((elements, previous) => elements.length === previous.length+ && elements.every((element, index) => {+ const image = element as HTMLImageElement;+ return image.src !== previous[index] && image.complete && image.naturalWidth > 0;+ }), before)).toBe(true);+ await expect(blocks.getByRole("status")).toHaveCount(0);+ await page.screenshot({ path: test.info().outputPath("twelve-diagrams-dark.png"), fullPage: true });+ await blocks.first().getByRole("button", { name: "Source", exact: true }).click();+ await expect(images).toHaveCount(11);+ await blocks.first().getByRole("button", { name: "Diagram", exact: true }).click();+ await expect(images).toHaveCount(12);+ await loadedImage(blocks.first().locator("img"));+});++test("syntax and source limits stay local; replacing source and switching conversations discards old images", async ({ page }) => {+ await page.goto("/browser/fixture.html?case=diagrams&type=invalid&edit");+ const block = page.getByTestId("mermaid-block");+ await expect(block.getByRole("status")).toContainText("syntax");+ await expect(block.locator("pre")).toContainText("A[Unclosed");+ await page.getByRole("textbox", { name: "Diagram source" }).fill(`flowchart LR\n${" ".repeat(50_001)}`);+ await expect(block.getByRole("status")).toContainText("limit");+ await page.getByRole("textbox", { name: "Diagram source" }).fill("flowchart LR\nA[First] --> B[Result]");+ await loadedImage(block.locator("img"));+ await block.getByRole("button", { name: "Enlarge diagram" }).click();+ await page.getByRole("dialog").press("Escape");+ await page.getByRole("button", { name: "Switch conversation" }).click();+ await loadedImage(block.locator("img"));+ const svg = await block.locator("img").evaluate(async (element: HTMLImageElement) => fetch(element.src).then((response) => response.text()));+ expect(svg).toContain("处理中");+ expect(svg).not.toContain("First");+});++test("author directives, links, HTML and external images cannot execute or fetch resources", async ({ page }) => {+ const external: string[] = [];+ const dialogs: string[] = [];+ page.on("request", (request) => { if (/^https?:/.test(request.url()) && !request.url().startsWith("http://127.0.0.1:")) external.push(request.url()); });+ page.on("dialog", (dialog) => { dialogs.push(dialog.message()); void dialog.dismiss(); });+ await page.goto("/browser/fixture.html?case=diagrams&edit");+ const source = [+ '%%{init: {"securityLevel":"loose","themeVariables":{"fontFamily":"evil"}}}%%',+ 'flowchart LR',+ 'A["<img src=https://example.invalid/spy onerror=alert(1)>"] --> B["<script>alert(2)</script>"]',+ 'click A "https://example.invalid/click"',+ ].join("\n");+ await page.getByRole("textbox", { name: "Diagram source" }).fill(source);+ const block = page.getByTestId("mermaid-block");+ await expect.poll(() => block.evaluate((element) => {+ const image = element.querySelector("img");+ if (image) return image.complete && image.naturalWidth > 0;+ const status = element.querySelector('[role="status"]');+ return !!status && !status.textContent?.includes("Preparing");+ })).toBe(true);+ expect(external).toEqual([]);+ expect(dialogs).toEqual([]);+ expect(page.url()).toContain("case=diagrams");+ if (await block.locator("img").count()) {+ const svg = await block.locator("img").evaluate(async (element: HTMLImageElement) => fetch(element.src).then((response) => response.text()));+ expect(svg).not.toMatch(/<(?:script|image|foreignObject|a)\b/i);+ }+});++test("a real blocked Worker hits its deadline while sibling diagrams finish", async ({ page }) => {+ await page.setViewportSize({ width: 1280, height: 1400 });+ let held = false;+ await page.route("**/pele.worker.ts?*", async (route) => {+ if (held) { await route.continue(); return; }+ held = true;+ await route.fulfill({ contentType: "application/javascript", body: 'self.onmessage = () => { postMessage({kind:"started"}); while (true) {} };' });+ });+ await page.goto("/browser/fixture.html?case=diagrams&multiple");+ const blocks = page.getByTestId("mermaid-block");+ await expect(page.getByText("The diagram took too long", { exact: false })).toBeVisible();+ await expect(blocks.locator("img")).toHaveCount(2);+ for (const image of await blocks.locator("img").all()) await loadedImage(image);+ await page.getByRole("button", { name: "Retry", exact: true }).click();+ await expect(blocks.locator("img")).toHaveCount(3);+ for (const image of await blocks.locator("img").all()) await loadedImage(image);+});+++test("an enlarged diagram keeps its camera through resize and recoloring", async ({ page }) => {+ await page.goto("/browser/fixture.html?case=diagrams");+ const block = page.getByTestId("mermaid-block");+ await loadedImage(block.locator("img"));+ await block.getByRole("button", { name: "Enlarge diagram" }).click();+ const dialog = page.getByRole("dialog");+ await dialog.getByRole("button", { name: "Zoom in" }).click();+ const fit = dialog.getByRole("button", { name: "Fit image" });+ await expect(fit).toHaveText("150%");+ const before = await dialog.locator("img").getAttribute("src");+ await page.setViewportSize({ width: 720, height: 850 });+ await expect(dialog).toBeVisible();+ await expect(fit).toHaveText("150%");+ await expect(dialog.locator("img")).toHaveAttribute("src", before!);+ // Change the trusted document palette without closing the reader.+ await page.evaluate(() => document.documentElement.classList.toggle("dark"));+ await expect(dialog.locator("img")).not.toHaveAttribute("src", before!);+ await expect(fit).toHaveText("150%");+ await dialog.press("Escape");+ await expect(dialog).not.toBeVisible();+ await loadedImage(block.locator("img"));+});++test("published Pele renders Chinese subgraph, wrapping, emoji and measured emphasis", async ({ page }) => {+ await page.goto("/browser/fixture.html?case=diagrams&edit");+ const source = 'flowchart TD\nsubgraph 审核流程[中文子图:权限审核与结果交付]\nA["接收用户请求并检查工作区权限,保留中文长标签与 emoji ✅"] --> B["生成结果,并返回说明"]\nend\nclassDef measured font-size:18px,font-weight:bold,font-style:italic\nclass B measured';+ await page.getByRole("textbox", { name: "Diagram source" }).fill(source);+ const image = page.getByTestId("mermaid-block").locator("img");+ await loadedImage(image);+ const svg = await image.evaluate(async (element: HTMLImageElement) => fetch(element.src).then((response) => response.text()));+ expect(svg).toContain("中文子图");+ expect(svg).toContain("emoji ✅");+ expect(svg).toContain('font-weight="var(--_w)"');+ await page.screenshot({ path: test.info().outputPath("chinese-subgraph.png"), fullPage: true });+});diff --git a/webui/browser/fixture.tsx b/webui/browser/fixture.tsxindex fd7980542..c37c63995 100644--- a/webui/browser/fixture.tsx+++ b/webui/browser/fixture.tsx@@ -21,6 +21,7 @@ import { SkeletonFixture } from "./skeleton-fixture";import { installSkeletonPreviewApi, SkeletonAdditionsFixture } from "./skeleton-additions-fixture";import { NewChatSkeletonFixture } from "./new-chat-skeleton-fixture";import "../src/globals.css";+import { DiagramFixture } from "./diagram-fixture";const history: UIMessage[] = [{ id: "question", role: "user", content: "Earlier question", createdAt: 1_700_000_000_000 },@@ -142,7 +143,9 @@ function AppsFixture() {if (parameters.get("case") === "skeleton-additions") installSkeletonPreviewApi();await initializeI18n();createRoot(document.getElementById("root")!).render(<TooltipProvider>- {parameters.get("case") === "new-chat-skeleton"+ {parameters.get("case") === "diagrams"+ ? <DiagramFixture parameters={parameters} />+ : parameters.get("case") === "new-chat-skeleton"? <ClientProvider client={railClient} token="fixture"><NewChatSkeletonFixture /></ClientProvider>: parameters.get("case") === "skeleton-additions"? <ClientProvider client={railClient} token="fixture"><SkeletonAdditionsFixture /></ClientProvider>diff --git a/webui/bun.lock b/webui/bun.lockindex a3cd87572..171e138d7 100644--- a/webui/bun.lock+++ b/webui/bun.lock@@ -15,11 +15,13 @@"@radix-ui/react-tooltip": "^1.1.6","class-variance-authority": "^0.7.1","clsx": "^2.1.1",+ "css-tree": "3.1.0","diff": "^9.0.0","i18next": "^26.0.6","lucide-react": "^0.469.0","micromark-factory-space": "^2.0.1","micromark-util-decode-string": "^2.0.1",+ "pele": "1.6.0","qrcode": "^1.5.4","react": "^18.3.1","react-dom": "^18.3.1",@@ -31,7 +33,8 @@"remark-math": "^6.0.0","remark-parse": "^11.0.0","remend": "1.3.0",- "streamdown": "2.5.0",+ "saxes": "6.0.0",+ "streamdown": "2.6.0","tailwind-merge": "^2.6.0","unified": "^11.0.5",},@@ -42,6 +45,7 @@"@testing-library/jest-dom": "^6.6.3","@testing-library/react": "^16.1.0","@testing-library/user-event": "^14.5.2",+ "@types/css-tree": "^2.3.10","@types/mdast": "^4.0.4","@types/node": "^24.0.0","@types/qrcode": "^1.5.6",@@ -76,8 +80,6 @@"@ampproject/remapping": ["@ampproject/[email protected]", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw=="],- "@antfu/install-pkg": ["@antfu/[email protected]", "", { "dependencies": { "package-manager-detector": "^1.3.0", "tinyexec": "^1.0.1" } }, "sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ=="],-"@babel/code-frame": ["@babel/[email protected]", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw=="],"@babel/compat-data": ["@babel/[email protected]", "", {}, "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg=="],@@ -120,10 +122,6 @@"@bcoe/v8-coverage": ["@bcoe/[email protected]", "", {}, "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw=="],- "@braintree/sanitize-url": ["@braintree/[email protected]", "", {}, "sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA=="],-- "@chevrotain/types": ["@chevrotain/[email protected]", "", {}, "sha512-U+HFai5+zmJCkK86QsaJtoITlboZHBqrVketcO2ROv865xfCMSFpELQoz1GkX5GzME8pTa+3kbKrZHQtI0gdbw=="],-"@esbuild/aix-ppc64": ["@esbuild/[email protected]", "", { "os": "aix", "cpu": "ppc64" }, "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ=="],"@esbuild/android-arm": ["@esbuild/[email protected]", "", { "os": "android", "cpu": "arm" }, "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg=="],@@ -204,10 +202,6 @@"@humanwhocodes/retry": ["@humanwhocodes/[email protected]", "", {}, "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ=="],- "@iconify/types": ["@iconify/[email protected]", "", {}, "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg=="],-- "@iconify/utils": ["@iconify/[email protected]", "", { "dependencies": { "@antfu/install-pkg": "^1.1.0", "@iconify/types": "^2.0.0", "import-meta-resolve": "^4.2.0" } }, "sha512-b1S7B1k9ohZ+iNTi2ATxbRYG9fTrJmUT0rc46bvVnNxqNRGW7dyo/vRREwyniI5IRN2RSJHDcm+s3BjWrSAjHw=="],-"@isaacs/cliui": ["@isaacs/[email protected]", "", { "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", "strip-ansi": "^7.0.1", "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", "wrap-ansi": "^8.1.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" } }, "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA=="],"@istanbuljs/schema": ["@istanbuljs/[email protected]", "", {}, "sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw=="],@@ -222,8 +216,6 @@"@jridgewell/trace-mapping": ["@jridgewell/[email protected]", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="],- "@mermaid-js/parser": ["@mermaid-js/[email protected]", "", { "dependencies": { "@chevrotain/types": "~11.1.2" } }, "sha512-oYPyv8A4As1yH5Bx+04iQEQxXuIQDe0GKCNSRgao6z8AM9jixXIfP0vsppRLvGf+nKIOb9/LdpWA4YuJiVvESA=="],-"@nodelib/fs.scandir": ["@nodelib/[email protected]", "", { "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g=="],"@nodelib/fs.stat": ["@nodelib/[email protected]", "", {}, "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A=="],@@ -232,7 +224,7 @@"@pkgjs/parseargs": ["@pkgjs/[email protected]", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="],- "@playwright/test": ["@playwright/[email protected]", "https://registry.npmjs.org/@playwright/test/-/test-1.64.1.tgz", { "dependencies": { "playwright": "1.64.1" }, "bin": { "playwright": "cli.js" } }, "sha512-IaYGml/nSOiZWROfPtuIL7neuu9qDOZ3TNvNljUIrhDMxiGTgPjzj/g9p9RxpS2tSepPDRY+UwAaEeiKtUvIAg=="],+ "@playwright/test": ["@playwright/[email protected]", "", { "dependencies": { "playwright": "1.64.1" }, "bin": { "playwright": "cli.js" } }, "sha512-IaYGml/nSOiZWROfPtuIL7neuu9qDOZ3TNvNljUIrhDMxiGTgPjzj/g9p9RxpS2tSepPDRY+UwAaEeiKtUvIAg=="],"@radix-ui/number": ["@radix-ui/[email protected]", "", {}, "sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g=="],@@ -374,67 +366,7 @@"@types/babel__traverse": ["@types/[email protected]", "", { "dependencies": { "@babel/types": "^7.28.2" } }, "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q=="],- "@types/d3": ["@types/[email protected]", "", { "dependencies": { "@types/d3-array": "*", "@types/d3-axis": "*", "@types/d3-brush": "*", "@types/d3-chord": "*", "@types/d3-color": "*", "@types/d3-contour": "*", "@types/d3-delaunay": "*", "@types/d3-dispatch": "*", "@types/d3-drag": "*", "@types/d3-dsv": "*", "@types/d3-ease": "*", "@types/d3-fetch": "*", "@types/d3-force": "*", "@types/d3-format": "*", "@types/d3-geo": "*", "@types/d3-hierarchy": "*", "@types/d3-interpolate": "*", "@types/d3-path": "*", "@types/d3-polygon": "*", "@types/d3-quadtree": "*", "@types/d3-random": "*", "@types/d3-scale": "*", "@types/d3-scale-chromatic": "*", "@types/d3-selection": "*", "@types/d3-shape": "*", "@types/d3-time": "*", "@types/d3-time-format": "*", "@types/d3-timer": "*", "@types/d3-transition": "*", "@types/d3-zoom": "*" } }, "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww=="],-- "@types/d3-array": ["@types/[email protected]", "", {}, "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw=="],-- "@types/d3-axis": ["@types/[email protected]", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw=="],-- "@types/d3-brush": ["@types/[email protected]", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A=="],-- "@types/d3-chord": ["@types/[email protected]", "", {}, "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg=="],-- "@types/d3-color": ["@types/[email protected]", "", {}, "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A=="],-- "@types/d3-contour": ["@types/[email protected]", "", { "dependencies": { "@types/d3-array": "*", "@types/geojson": "*" } }, "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg=="],-- "@types/d3-delaunay": ["@types/[email protected]", "", {}, "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw=="],-- "@types/d3-dispatch": ["@types/[email protected]", "", {}, "sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA=="],-- "@types/d3-drag": ["@types/[email protected]", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ=="],-- "@types/d3-dsv": ["@types/[email protected]", "", {}, "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g=="],-- "@types/d3-ease": ["@types/[email protected]", "", {}, "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA=="],-- "@types/d3-fetch": ["@types/[email protected]", "", { "dependencies": { "@types/d3-dsv": "*" } }, "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA=="],-- "@types/d3-force": ["@types/[email protected]", "", {}, "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw=="],-- "@types/d3-format": ["@types/[email protected]", "", {}, "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g=="],-- "@types/d3-geo": ["@types/[email protected]", "", { "dependencies": { "@types/geojson": "*" } }, "sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ=="],-- "@types/d3-hierarchy": ["@types/[email protected]", "", {}, "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg=="],-- "@types/d3-interpolate": ["@types/[email protected]", "", { "dependencies": { "@types/d3-color": "*" } }, "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA=="],-- "@types/d3-path": ["@types/[email protected]", "", {}, "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg=="],-- "@types/d3-polygon": ["@types/[email protected]", "", {}, "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA=="],-- "@types/d3-quadtree": ["@types/[email protected]", "", {}, "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg=="],-- "@types/d3-random": ["@types/[email protected]", "", {}, "sha512-UHYId5WTCx4L4YNel7NU00XUXXgvgpgZOvp10PuvsQENjMDXhh2RyFc0KBjO7B45ne4Ha1yVH7ii0vnzKkuzWA=="],-- "@types/d3-scale": ["@types/[email protected]", "", { "dependencies": { "@types/d3-time": "*" } }, "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw=="],-- "@types/d3-scale-chromatic": ["@types/[email protected]", "", {}, "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ=="],-- "@types/d3-selection": ["@types/[email protected]", "", {}, "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w=="],-- "@types/d3-shape": ["@types/[email protected]", "", { "dependencies": { "@types/d3-path": "*" } }, "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w=="],-- "@types/d3-time": ["@types/[email protected]", "", {}, "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g=="],-- "@types/d3-time-format": ["@types/[email protected]", "", {}, "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg=="],-- "@types/d3-timer": ["@types/[email protected]", "", {}, "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw=="],-- "@types/d3-transition": ["@types/[email protected]", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg=="],-- "@types/d3-zoom": ["@types/[email protected]", "", { "dependencies": { "@types/d3-interpolate": "*", "@types/d3-selection": "*" } }, "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw=="],+ "@types/css-tree": ["@types/[email protected]", "", {}, "sha512-aEokibJOI77uIlqoBOkVbaQGC9zII0A+JH1kcTNKW2CwyYWD8KM6qdo+4c77wD3wZOQfJuNWAr9M4hdk+YhDIg=="],"@types/debug": ["@types/[email protected]", "", { "dependencies": { "@types/ms": "*" } }, "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw=="],@@ -444,8 +376,6 @@"@types/estree-jsx": ["@types/[email protected]", "", { "dependencies": { "@types/estree": "*" } }, "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg=="],- "@types/geojson": ["@types/[email protected]", "", {}, "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg=="],-"@types/hast": ["@types/[email protected]", "", { "dependencies": { "@types/unist": "*" } }, "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ=="],"@types/json-schema": ["@types/[email protected]", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="],@@ -468,8 +398,6 @@"@types/react-syntax-highlighter": ["@types/[email protected]", "", { "dependencies": { "@types/react": "*" } }, "sha512-uLGJ87j6Sz8UaBAooU0T6lWJ0dBmjZgN1PZTrj05TNql2/XpC6+4HhMT5syIdFUUt+FASfCeLLv4kBygNU+8qA=="],- "@types/trusted-types": ["@types/[email protected]", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="],-"@types/unist": ["@types/[email protected]", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],"@typescript-eslint/eslint-plugin": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "@typescript-eslint/scope-manager": "8.62.1", "@typescript-eslint/type-utils": "8.62.1", "@typescript-eslint/utils": "8.62.1", "@typescript-eslint/visitor-keys": "8.62.1", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.62.1", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-4EQM77WgVNxj7OkL/5b/D/xZsw00G577+UriYTC7JF5opcF3T2AuoeY7ueLaZgSVjSgCS6yOAJB5bRGLPSJUzA=="],@@ -494,8 +422,6 @@"@ungap/structured-clone": ["@ungap/[email protected]", "", {}, "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g=="],- "@upsetjs/venn.js": ["@upsetjs/[email protected]", "", { "optionalDependencies": { "d3-selection": "^3.0.0", "d3-transition": "^3.0.1" } }, "sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw=="],-"@vitejs/plugin-react": ["@vitejs/[email protected]", "", { "dependencies": { "@babel/core": "^7.28.0", "@babel/plugin-transform-react-jsx-self": "^7.27.1", "@babel/plugin-transform-react-jsx-source": "^7.27.1", "@rolldown/pluginutils": "1.0.0-beta.27", "@types/babel__core": "^7.20.5", "react-refresh": "^0.17.0" }, "peerDependencies": { "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA=="],"@vitest/coverage-v8": ["@vitest/[email protected]", "", { "dependencies": { "@ampproject/remapping": "^2.3.0", "@bcoe/v8-coverage": "^0.2.3", "debug": "^4.3.7", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", "istanbul-lib-source-maps": "^5.0.6", "istanbul-reports": "^3.1.7", "magic-string": "^0.30.12", "magicast": "^0.3.5", "std-env": "^3.8.0", "test-exclude": "^7.0.1", "tinyrainbow": "^1.2.0" }, "peerDependencies": { "@vitest/browser": "2.1.9", "vitest": "2.1.9" }, "optionalPeers": ["@vitest/browser"] }, "sha512-Z2cOr0ksM00MpEfyVE8KXIYPEcBFxdbLSs56L8PO0QQMxt/6bDj45uQfxoc96v05KW3clk7vvgP0qfDit9DmfQ=="],@@ -592,90 +518,16 @@"convert-source-map": ["[email protected]", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="],- "cose-base": ["[email protected]", "", { "dependencies": { "layout-base": "^1.0.0" } }, "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg=="],-"cross-spawn": ["[email protected]", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="],+ "css-tree": ["[email protected]", "", { "dependencies": { "mdn-data": "2.12.2", "source-map-js": "^1.0.1" } }, "sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w=="],+"css.escape": ["[email protected]", "", {}, "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg=="],"cssesc": ["[email protected]", "", { "bin": { "cssesc": "bin/cssesc" } }, "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg=="],"csstype": ["[email protected]", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="],- "cytoscape": ["[email protected]", "", {}, "sha512-62rNSrioXw93uliKFBwjukeQyeWwH2PqDrTac31r2P6464u3AUvTk0xS4LVvT251g7IgkFunrI48ZEZGjywSOg=="],-- "cytoscape-cose-bilkent": ["[email protected]", "", { "dependencies": { "cose-base": "^1.0.0" }, "peerDependencies": { "cytoscape": "^3.2.0" } }, "sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ=="],-- "cytoscape-fcose": ["[email protected]", "", { "dependencies": { "cose-base": "^2.2.0" }, "peerDependencies": { "cytoscape": "^3.2.0" } }, "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ=="],-- "d3": ["[email protected]", "", { "dependencies": { "d3-array": "3", "d3-axis": "3", "d3-brush": "3", "d3-chord": "3", "d3-color": "3", "d3-contour": "4", "d3-delaunay": "6", "d3-dispatch": "3", "d3-drag": "3", "d3-dsv": "3", "d3-ease": "3", "d3-fetch": "3", "d3-force": "3", "d3-format": "3", "d3-geo": "3", "d3-hierarchy": "3", "d3-interpolate": "3", "d3-path": "3", "d3-polygon": "3", "d3-quadtree": "3", "d3-random": "3", "d3-scale": "4", "d3-scale-chromatic": "3", "d3-selection": "3", "d3-shape": "3", "d3-time": "3", "d3-time-format": "4", "d3-timer": "3", "d3-transition": "3", "d3-zoom": "3" } }, "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA=="],-- "d3-array": ["[email protected]", "", { "dependencies": { "internmap": "1 - 2" } }, "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg=="],-- "d3-axis": ["[email protected]", "", {}, "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw=="],-- "d3-brush": ["[email protected]", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-drag": "2 - 3", "d3-interpolate": "1 - 3", "d3-selection": "3", "d3-transition": "3" } }, "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ=="],-- "d3-chord": ["[email protected]", "", { "dependencies": { "d3-path": "1 - 3" } }, "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g=="],-- "d3-color": ["[email protected]", "", {}, "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA=="],-- "d3-contour": ["[email protected]", "", { "dependencies": { "d3-array": "^3.2.0" } }, "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA=="],-- "d3-delaunay": ["[email protected]", "", { "dependencies": { "delaunator": "5" } }, "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A=="],-- "d3-dispatch": ["[email protected]", "", {}, "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg=="],-- "d3-drag": ["[email protected]", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-selection": "3" } }, "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg=="],-- "d3-dsv": ["[email protected]", "", { "dependencies": { "commander": "7", "iconv-lite": "0.6", "rw": "1" }, "bin": { "csv2json": "bin/dsv2json.js", "csv2tsv": "bin/dsv2dsv.js", "dsv2dsv": "bin/dsv2dsv.js", "dsv2json": "bin/dsv2json.js", "json2csv": "bin/json2dsv.js", "json2dsv": "bin/json2dsv.js", "json2tsv": "bin/json2dsv.js", "tsv2csv": "bin/dsv2dsv.js", "tsv2json": "bin/dsv2json.js" } }, "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q=="],-- "d3-ease": ["[email protected]", "", {}, "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w=="],-- "d3-fetch": ["[email protected]", "", { "dependencies": { "d3-dsv": "1 - 3" } }, "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw=="],-- "d3-force": ["[email protected]", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-quadtree": "1 - 3", "d3-timer": "1 - 3" } }, "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg=="],-- "d3-format": ["[email protected]", "", {}, "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg=="],-- "d3-geo": ["[email protected]", "", { "dependencies": { "d3-array": "2.5.0 - 3" } }, "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q=="],-- "d3-hierarchy": ["[email protected]", "", {}, "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA=="],-- "d3-interpolate": ["[email protected]", "", { "dependencies": { "d3-color": "1 - 3" } }, "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g=="],-- "d3-path": ["[email protected]", "", {}, "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ=="],-- "d3-polygon": ["[email protected]", "", {}, "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg=="],-- "d3-quadtree": ["[email protected]", "", {}, "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw=="],-- "d3-random": ["[email protected]", "", {}, "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ=="],-- "d3-sankey": ["[email protected]", "", { "dependencies": { "d3-array": "1 - 2", "d3-shape": "^1.2.0" } }, "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ=="],-- "d3-scale": ["[email protected]", "", { "dependencies": { "d3-array": "2.10.0 - 3", "d3-format": "1 - 3", "d3-interpolate": "1.2.0 - 3", "d3-time": "2.1.1 - 3", "d3-time-format": "2 - 4" } }, "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ=="],-- "d3-scale-chromatic": ["[email protected]", "", { "dependencies": { "d3-color": "1 - 3", "d3-interpolate": "1 - 3" } }, "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ=="],-- "d3-selection": ["[email protected]", "", {}, "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ=="],-- "d3-shape": ["[email protected]", "", { "dependencies": { "d3-path": "^3.1.0" } }, "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA=="],-- "d3-time": ["[email protected]", "", { "dependencies": { "d3-array": "2 - 3" } }, "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q=="],-- "d3-time-format": ["[email protected]", "", { "dependencies": { "d3-time": "1 - 3" } }, "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg=="],-- "d3-timer": ["[email protected]", "", {}, "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA=="],-- "d3-transition": ["[email protected]", "", { "dependencies": { "d3-color": "1 - 3", "d3-dispatch": "1 - 3", "d3-ease": "1 - 3", "d3-interpolate": "1 - 3", "d3-timer": "1 - 3" }, "peerDependencies": { "d3-selection": "2 - 3" } }, "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w=="],-- "d3-zoom": ["[email protected]", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-drag": "2 - 3", "d3-interpolate": "1 - 3", "d3-selection": "2 - 3", "d3-transition": "2 - 3" } }, "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw=="],-- "dagre-d3-es": ["[email protected]", "", { "dependencies": { "d3": "^7.9.0", "lodash-es": "^4.17.21" } }, "sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg=="],-- "dayjs": ["[email protected]", "", {}, "sha512-98IT+HOahAisibz/yjKbzuOBwYcjJ7BCLPzARyHiyEBmRz4fatF+KPJszEHXsGYjUG234aH/cOjW1wwTbKUZlA=="],-"debug": ["[email protected]", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="],"decamelize": ["[email protected]", "", {}, "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA=="],@@ -686,8 +538,6 @@"deep-is": ["[email protected]", "", {}, "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="],- "delaunator": ["[email protected]", "", { "dependencies": { "robust-predicates": "^3.0.2" } }, "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ=="],-"dequal": ["[email protected]", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="],"detect-node-es": ["[email protected]", "", {}, "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ=="],@@ -704,8 +554,6 @@"dom-accessibility-api": ["[email protected]", "", {}, "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w=="],- "dompurify": ["[email protected]", "", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-zQvGet8Z2sWbQhCmfFz/T5QWH2oBmjnqK3qvOjaqaNLrLEF912WamU+ohnTp0TCep/MFVHpdJuCZEdFOdTnEFg=="],-"eastasianwidth": ["[email protected]", "", {}, "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="],"electron-to-chromium": ["[email protected]", "", {}, "sha512-908qahOGocRMinT2nM3ajCEM99H4iPdv84eagPP3FfZy/1ZGeOy2CZYzjhms81ckOPCXPlW7LkY4XpxD8r1DrA=="],@@ -718,8 +566,6 @@"es-module-lexer": ["[email protected]", "", {}, "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA=="],- "es-toolkit": ["[email protected]", "", {}, "sha512-G5iZ6Pc/FNRY/soKZHC+TxGDD83rHUDXxzaWhGCX44vAv/tMs56WMusnm/KMNK+luUPsgA9U28cGr4RDlSzL2g=="],-"esbuild": ["[email protected]", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.21.5", "@esbuild/android-arm": "0.21.5", "@esbuild/android-arm64": "0.21.5", "@esbuild/android-x64": "0.21.5", "@esbuild/darwin-arm64": "0.21.5", "@esbuild/darwin-x64": "0.21.5", "@esbuild/freebsd-arm64": "0.21.5", "@esbuild/freebsd-x64": "0.21.5", "@esbuild/linux-arm": "0.21.5", "@esbuild/linux-arm64": "0.21.5", "@esbuild/linux-ia32": "0.21.5", "@esbuild/linux-loong64": "0.21.5", "@esbuild/linux-mips64el": "0.21.5", "@esbuild/linux-ppc64": "0.21.5", "@esbuild/linux-riscv64": "0.21.5", "@esbuild/linux-s390x": "0.21.5", "@esbuild/linux-x64": "0.21.5", "@esbuild/netbsd-x64": "0.21.5", "@esbuild/openbsd-x64": "0.21.5", "@esbuild/sunos-x64": "0.21.5", "@esbuild/win32-arm64": "0.21.5", "@esbuild/win32-ia32": "0.21.5", "@esbuild/win32-x64": "0.21.5" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw=="],"escalade": ["[email protected]", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="],@@ -798,8 +644,6 @@"globals": ["[email protected]", "", {}, "sha512-Czmyns5dUsq4seFBR/Kdydhmo8y9kC79hiSkPn0YcGtNnYWnrgt0vjrSjx9tspoDGWm2CMarffRuLjM4xUz8xg=="],- "hachure-fill": ["[email protected]", "", {}, "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg=="],-"happy-dom": ["[email protected]", "", { "dependencies": { "webidl-conversions": "^7.0.0", "whatwg-mimetype": "^3.0.0" } }, "sha512-n0QrmT9lD81rbpKsyhnlz3DgnMZlaOkJPpgi746doA+HvaMC79bdWkwjrNnGJRvDrWTI8iOcJiVTJ5CdT/AZRw=="],"has-flag": ["[email protected]", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="],@@ -850,20 +694,14 @@"i18next": ["[email protected]", "", { "peerDependencies": { "typescript": "^5 || ^6" }, "optionalPeers": ["typescript"] }, "sha512-zwBHldHdTmwN7r6UNc7lC6GWNN+YYg3DrRSeHR5PRRBf5QnJZcYHrQc0uaU26qZeYxR7iFZD+Y315dPnKP47wA=="],- "iconv-lite": ["[email protected]", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="],-"ignore": ["[email protected]", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="],- "import-meta-resolve": ["[email protected]", "", {}, "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg=="],-"imurmurhash": ["[email protected]", "", {}, "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA=="],"indent-string": ["[email protected]", "", {}, "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg=="],"inline-style-parser": ["[email protected]", "", {}, "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA=="],- "internmap": ["[email protected]", "", {}, "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg=="],-"is-alphabetical": ["[email protected]", "", {}, "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg=="],"is-alphanumerical": ["[email protected]", "", { "dependencies": { "is-alphabetical": "^1.0.0", "is-decimal": "^1.0.0" } }, "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A=="],@@ -916,10 +754,6 @@"keyv": ["[email protected]", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="],- "khroma": ["[email protected]", "", {}, "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw=="],-- "layout-base": ["[email protected]", "", {}, "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg=="],-"levn": ["[email protected]", "", { "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" } }, "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="],"lilconfig": ["[email protected]", "", {}, "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw=="],@@ -928,8 +762,6 @@"locate-path": ["[email protected]", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="],- "lodash-es": ["[email protected]", "", {}, "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A=="],-"longest-streak": ["[email protected]", "", {}, "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g=="],"loose-envify": ["[email protected]", "", { "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, "bin": { "loose-envify": "cli.js" } }, "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q=="],@@ -988,9 +820,9 @@"mdast-util-to-string": ["[email protected]", "", { "dependencies": { "@types/mdast": "^4.0.0" } }, "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg=="],- "merge2": ["[email protected]", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="],+ "mdn-data": ["[email protected]", "", {}, "sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA=="],- "mermaid": ["[email protected]", "", { "dependencies": { "@braintree/sanitize-url": "^7.1.2", "@iconify/utils": "^3.0.2", "@mermaid-js/parser": "^1.2.0", "@types/d3": "^7.4.3", "@upsetjs/venn.js": "^2.0.0", "cytoscape": "^3.33.3", "cytoscape-cose-bilkent": "^4.1.0", "cytoscape-fcose": "^2.2.0", "d3": "^7.9.0", "d3-sankey": "^0.12.3", "dagre-d3-es": "7.0.14", "dayjs": "^1.11.20", "dompurify": "^3.3.3", "es-toolkit": "^1.45.1", "katex": "^0.16.45", "khroma": "^2.1.0", "marked": "^16.3.0", "roughjs": "^4.6.6", "stylis": "^4.3.6", "ts-dedent": "^2.2.0", "uuid": "^11.1.0 || ^12 || ^13 || ^14.0.0" } }, "sha512-Zvm3kbstgdpvIJPPItlL7fppIZ3kibvc1oZIGxdvk9t6UFz6flv+Jw7FtRGKwfcI8OckmH04LqG6LlS6X4B1pA=="],+ "merge2": ["[email protected]", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="],"micromark": ["[email protected]", "", { "dependencies": { "@types/debug": "^4.0.0", "debug": "^4.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA=="],@@ -1084,14 +916,10 @@"package-json-from-dist": ["[email protected]", "", {}, "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw=="],- "package-manager-detector": ["[email protected]", "", {}, "sha512-xg1eHpwYL/D/HEdWw2goFZP6vV0FH7W+PZ5rFkGjdIDLtxq7EkzBUeT3m+lndYCt8wKbmofUu1MUdMCXkCk9ZQ=="],-"parse-entities": ["[email protected]", "", { "dependencies": { "character-entities": "^1.0.0", "character-entities-legacy": "^1.0.0", "character-reference-invalid": "^1.0.0", "is-alphanumerical": "^1.0.0", "is-decimal": "^1.0.0", "is-hexadecimal": "^1.0.0" } }, "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ=="],"parse5": ["[email protected]", "", { "dependencies": { "entities": "^6.0.0" } }, "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw=="],- "path-data-parser": ["[email protected]", "", {}, "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w=="],-"path-exists": ["[email protected]", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="],"path-key": ["[email protected]", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="],@@ -1104,6 +932,8 @@"pathval": ["[email protected]", "", {}, "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ=="],+ "pele": ["[email protected]", "", {}, "sha512-VfAiVItsOGlGhvnBfphdT28VCG7mXMZxQNOwAGsCtxI2ztbUsT39MraEOYjsapLxVETkdUZscm0DdotYDQMLdw=="],+"picocolors": ["[email protected]", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],"picomatch": ["[email protected]", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="],@@ -1112,16 +942,12 @@"pirates": ["[email protected]", "", {}, "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA=="],- "playwright": ["[email protected]", "https://registry.npmjs.org/playwright/-/playwright-1.64.1.tgz", { "dependencies": { "playwright-core": "1.64.1" }, "bin": { "playwright": "cli.js" } }, "sha512-HCrVhHr5QQuwYoswEUGTb7gGp522yflbv/ST8nF4sFWGuLjQCt17Q/EubpGGSNKYn1tsTCPZxqHhHCfVURu7UA=="],+ "playwright": ["[email protected]", "", { "dependencies": { "playwright-core": "1.64.1" }, "bin": { "playwright": "cli.js" } }, "sha512-HCrVhHr5QQuwYoswEUGTb7gGp522yflbv/ST8nF4sFWGuLjQCt17Q/EubpGGSNKYn1tsTCPZxqHhHCfVURu7UA=="],- "playwright-core": ["[email protected]", "https://registry.npmjs.org/playwright-core/-/playwright-core-1.64.1.tgz", { "bin": { "playwright-core": "cli.js" } }, "sha512-BC4s8y6SEVA6Q1rSxZTto8hI1KUI3xXlHGZgvGqP4IqPdI/a6FX9H29IDNz7vKo9l21b6LfYosScPL6M3xxyDQ=="],+ "playwright-core": ["[email protected]", "", { "bin": { "playwright-core": "cli.js" } }, "sha512-BC4s8y6SEVA6Q1rSxZTto8hI1KUI3xXlHGZgvGqP4IqPdI/a6FX9H29IDNz7vKo9l21b6LfYosScPL6M3xxyDQ=="],"pngjs": ["[email protected]", "", {}, "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw=="],- "points-on-curve": ["[email protected]", "", {}, "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A=="],-- "points-on-path": ["[email protected]", "", { "dependencies": { "path-data-parser": "0.1.0", "points-on-curve": "0.2.0" } }, "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g=="],-"postcss": ["[email protected]", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-pMMHxBOZKFU6HgAZ4eyGnwXF/EvPGGqUr0MnZ5+99485wwW41kW91A4LOGxSHhgugZmSChL5AlElNdwlNgcnLQ=="],"postcss-import": ["[email protected]", "", { "dependencies": { "postcss-value-parser": "^4.0.0", "read-cache": "^1.0.0", "resolve": "^1.1.7" }, "peerDependencies": { "postcss": "^8.0.0" } }, "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew=="],@@ -1206,17 +1032,11 @@"reusify": ["[email protected]", "", {}, "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw=="],- "robust-predicates": ["[email protected]", "", {}, "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA=="],-"rollup": ["[email protected]", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.60.1", "@rollup/rollup-android-arm64": "4.60.1", "@rollup/rollup-darwin-arm64": "4.60.1", "@rollup/rollup-darwin-x64": "4.60.1", "@rollup/rollup-freebsd-arm64": "4.60.1", "@rollup/rollup-freebsd-x64": "4.60.1", "@rollup/rollup-linux-arm-gnueabihf": "4.60.1", "@rollup/rollup-linux-arm-musleabihf": "4.60.1", "@rollup/rollup-linux-arm64-gnu": "4.60.1", "@rollup/rollup-linux-arm64-musl": "4.60.1", "@rollup/rollup-linux-loong64-gnu": "4.60.1", "@rollup/rollup-linux-loong64-musl": "4.60.1", "@rollup/rollup-linux-ppc64-gnu": "4.60.1", "@rollup/rollup-linux-ppc64-musl": "4.60.1", "@rollup/rollup-linux-riscv64-gnu": "4.60.1", "@rollup/rollup-linux-riscv64-musl": "4.60.1", "@rollup/rollup-linux-s390x-gnu": "4.60.1", "@rollup/rollup-linux-x64-gnu": "4.60.1", "@rollup/rollup-linux-x64-musl": "4.60.1", "@rollup/rollup-openbsd-x64": "4.60.1", "@rollup/rollup-openharmony-arm64": "4.60.1", "@rollup/rollup-win32-arm64-msvc": "4.60.1", "@rollup/rollup-win32-ia32-msvc": "4.60.1", "@rollup/rollup-win32-x64-gnu": "4.60.1", "@rollup/rollup-win32-x64-msvc": "4.60.1", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-VmtB2rFU/GroZ4oL8+ZqXgSA38O6GR8KSIvWmEFv63pQ0G6KaBH9s07PO8XTXP4vI+3UJUEypOfjkGfmSBBR0w=="],- "roughjs": ["[email protected]", "", { "dependencies": { "hachure-fill": "^0.5.2", "path-data-parser": "^0.1.0", "points-on-curve": "^0.2.0", "points-on-path": "^0.2.1" } }, "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ=="],-"run-parallel": ["[email protected]", "", { "dependencies": { "queue-microtask": "^1.2.2" } }, "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA=="],- "rw": ["[email protected]", "", {}, "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ=="],-- "safer-buffer": ["[email protected]", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="],+ "saxes": ["[email protected]", "", { "dependencies": { "xmlchars": "^2.2.0" } }, "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA=="],"scheduler": ["[email protected]", "", { "dependencies": { "loose-envify": "^1.1.0" } }, "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ=="],@@ -1240,7 +1060,7 @@"std-env": ["[email protected]", "", {}, "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg=="],- "streamdown": ["[email protected]", "", { "dependencies": { "clsx": "^2.1.1", "hast-util-to-jsx-runtime": "^2.3.6", "html-url-attributes": "^3.0.1", "marked": "^17.0.1", "mermaid": "^11.12.2", "rehype-harden": "^1.1.8", "rehype-raw": "^7.0.0", "rehype-sanitize": "^6.0.0", "remark-gfm": "^4.0.1", "remark-parse": "^11.0.0", "remark-rehype": "^11.1.2", "remend": "1.3.0", "tailwind-merge": "^3.4.0", "unified": "^11.0.5", "unist-util-visit": "^5.0.0", "unist-util-visit-parents": "^6.0.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, "sha512-/tTnURfIOxZK/pqJAxsfCvETG/XCJHoWnk3jq9xLcuz6CSpnjjuxSRBTTL4PKGhxiZQf0lqPxGhImdpwcZ2XwA=="],+ "streamdown": ["[email protected]", "", { "dependencies": { "clsx": "^2.1.1", "hast-util-to-jsx-runtime": "^2.3.6", "html-url-attributes": "^3.0.1", "marked": "^17.0.1", "rehype-harden": "^1.1.8", "rehype-raw": "^7.0.0", "rehype-sanitize": "^6.0.0", "remark-gfm": "^4.0.1", "remark-parse": "^11.0.0", "remark-rehype": "^11.1.2", "remend": "1.3.1", "tailwind-merge": "^3.6.0", "unified": "^11.0.5", "unist-util-visit": "^5.1.0", "unist-util-visit-parents": "^6.0.2" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, "sha512-nQZVUn4GvB2R5SAlDNph20iKZeW+RM4gv6G1H3ACypEnmQf8PgTHZ/1Ta2OACRwQ2coK7aW5AeIAa7Ls5zk+RA=="],"string-width": ["[email protected]", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],@@ -1258,8 +1078,6 @@"style-to-object": ["[email protected]", "", { "dependencies": { "inline-style-parser": "0.2.7" } }, "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw=="],- "stylis": ["[email protected]", "", {}, "sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA=="],-"sucrase": ["[email protected]", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.2", "commander": "^4.0.0", "lines-and-columns": "^1.1.6", "mz": "^2.7.0", "pirates": "^4.0.1", "tinyglobby": "^0.2.11", "ts-interface-checker": "^0.1.9" }, "bin": { "sucrase": "bin/sucrase", "sucrase-node": "bin/sucrase-node" } }, "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw=="],"supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],@@ -1298,8 +1116,6 @@"ts-api-utils": ["[email protected]", "", { "peerDependencies": { "typescript": ">=4.8.4" } }, "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA=="],- "ts-dedent": ["[email protected]", "", {}, "sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg=="],-"ts-interface-checker": ["[email protected]", "", {}, "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA=="],"tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],@@ -1340,8 +1156,6 @@"util-deprecate": ["[email protected]", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="],- "uuid": ["[email protected]", "", { "bin": { "uuid": "dist-node/bin/uuid" } }, "sha512-6ZxzVpzDXDa3bJWaHilVayA+BH/1zmxCJoVgvmqJnid/gPoKHxUrS/aC/T6LGQtNHT+XHG9fXPJB4d+IrU30Ew=="],-"vfile": ["[email protected]", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="],"vfile-location": ["[email protected]", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile": "^6.0.0" } }, "sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg=="],@@ -1374,6 +1188,8 @@"wrap-ansi-cjs": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="],+ "xmlchars": ["[email protected]", "", {}, "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="],+"xtend": ["[email protected]", "", {}, "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="],"y18n": ["[email protected]", "", {}, "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ=="],@@ -1392,8 +1208,6 @@"zwitch": ["[email protected]", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="],- "@antfu/install-pkg/tinyexec": ["[email protected]", "", {}, "sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg=="],-"@eslint-community/eslint-utils/eslint-visitor-keys": ["[email protected]", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="],"@isaacs/cliui/string-width": ["[email protected]", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="],@@ -1428,14 +1242,6 @@"chokidar/glob-parent": ["[email protected]", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],- "cytoscape-fcose/cose-base": ["[email protected]", "", { "dependencies": { "layout-base": "^2.0.0" } }, "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g=="],-- "d3-dsv/commander": ["[email protected]", "", {}, "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw=="],-- "d3-sankey/d3-array": ["[email protected]", "", { "dependencies": { "internmap": "^1.0.0" } }, "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ=="],-- "d3-sankey/d3-shape": ["[email protected]", "", { "dependencies": { "d3-path": "1" } }, "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw=="],-"fast-glob/glob-parent": ["[email protected]", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],"glob/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^2.0.2" } }, "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg=="],@@ -1458,8 +1264,6 @@"mdast-util-mdx-jsx/parse-entities": ["[email protected]", "", { "dependencies": { "@types/unist": "^2.0.0", "character-entities-legacy": "^3.0.0", "character-reference-invalid": "^2.0.0", "decode-named-character-reference": "^1.0.0", "is-alphanumerical": "^2.0.0", "is-decimal": "^2.0.0", "is-hexadecimal": "^2.0.0" } }, "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw=="],- "mermaid/marked": ["[email protected]", "", { "bin": { "marked": "bin/marked.js" } }, "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA=="],-"parse-entities/character-entities": ["[email protected]", "", {}, "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw=="],"path-scurry/lru-cache": ["[email protected]", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],@@ -1468,6 +1272,8 @@"refractor/prismjs": ["[email protected]", "", {}, "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA=="],+ "streamdown/remend": ["[email protected]", "", {}, "sha512-N3DiY5qbRPoa5vkxn1oDLMyXOVTeo6Hp+XOj6SIqJAYUgLS0Q587gILPMom/qm86AQ/ZrcOdwEIzCz8V3J0nxQ=="],+"streamdown/tailwind-merge": ["[email protected]", "", {}, "sha512-uxL7qAVQriqRQPAyK3pj66VqskWqoZ37PW94jwOTwNfq/z9oyu1V+eqrZqtR2+fCiXdYOZe/Modt8GtvqNzu+w=="],"stringify-entities/character-entities-legacy": ["[email protected]", "", {}, "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ=="],@@ -1490,12 +1296,6 @@"@isaacs/cliui/wrap-ansi/ansi-styles": ["[email protected]", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="],- "cytoscape-fcose/cose-base/layout-base": ["[email protected]", "", {}, "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg=="],-- "d3-sankey/d3-array/internmap": ["[email protected]", "", {}, "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw=="],-- "d3-sankey/d3-shape/d3-path": ["[email protected]", "", {}, "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg=="],-"glob/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg=="],"hast-util-from-dom/hastscript/hast-util-parse-selector": ["[email protected]", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A=="],diff --git a/webui/package-lock.json b/webui/package-lock.jsonindex 77e173adc..98fd545dd 100644--- a/webui/package-lock.json+++ b/webui/package-lock.json@@ -18,11 +18,13 @@"@radix-ui/react-tooltip": "^1.1.6","class-variance-authority": "^0.7.1","clsx": "^2.1.1",+ "css-tree": "3.1.0","diff": "^9.0.0","i18next": "^26.0.6","lucide-react": "^0.469.0","micromark-factory-space": "^2.0.1","micromark-util-decode-string": "^2.0.1",+ "pele": "1.6.0","qrcode": "^1.5.4","react": "^18.3.1","react-dom": "^18.3.1",@@ -34,7 +36,8 @@"remark-math": "^6.0.0","remark-parse": "^11.0.0","remend": "1.3.0",- "streamdown": "2.5.0",+ "saxes": "6.0.0",+ "streamdown": "2.6.0","tailwind-merge": "^2.6.0","unified": "^11.0.5"},@@ -45,6 +48,7 @@"@testing-library/jest-dom": "^6.6.3","@testing-library/react": "^16.1.0","@testing-library/user-event": "^14.5.2",+ "@types/css-tree": "^2.3.10","@types/mdast": "^4.0.4","@types/node": "^24.0.0","@types/qrcode": "^1.5.6",@@ -101,28 +105,6 @@"node": ">=6.0.0"}},- "node_modules/@antfu/install-pkg": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-1.1.0.tgz",- "integrity": "sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==",- "license": "MIT",- "dependencies": {- "package-manager-detector": "^1.3.0",- "tinyexec": "^1.0.1"- },- "funding": {- "url": "https://github.com/sponsors/antfu"- }- },- "node_modules/@antfu/install-pkg/node_modules/tinyexec": {- "version": "1.2.4",- "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.2.4.tgz",- "integrity": "sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==",- "license": "MIT",- "engines": {- "node": ">=18"- }- },"node_modules/@babel/code-frame": {"version": "7.29.0","dev": true,@@ -381,18 +363,6 @@"dev": true,"license": "MIT"},- "node_modules/@braintree/sanitize-url": {- "version": "7.1.2",- "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.2.tgz",- "integrity": "sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==",- "license": "MIT"- },- "node_modules/@chevrotain/types": {- "version": "11.1.2",- "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.1.2.tgz",- "integrity": "sha512-U+HFai5+zmJCkK86QsaJtoITlboZHBqrVketcO2ROv865xfCMSFpELQoz1GkX5GzME8pTa+3kbKrZHQtI0gdbw==",- "license": "Apache-2.0"- },"node_modules/@esbuild/aix-ppc64": {"version": "0.21.5","resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",@@ -1006,23 +976,6 @@"url": "https://github.com/sponsors/nzakas"}},- "node_modules/@iconify/types": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz",- "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==",- "license": "MIT"- },- "node_modules/@iconify/utils": {- "version": "3.1.4",- "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-3.1.4.tgz",- "integrity": "sha512-b1S7B1k9ohZ+iNTi2ATxbRYG9fTrJmUT0rc46bvVnNxqNRGW7dyo/vRREwyniI5IRN2RSJHDcm+s3BjWrSAjHw==",- "license": "MIT",- "dependencies": {- "@antfu/install-pkg": "^1.1.0",- "@iconify/types": "^2.0.0",- "import-meta-resolve": "^4.2.0"- }- },"node_modules/@isaacs/cliui": {"version": "8.0.2","resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",@@ -1176,15 +1129,6 @@"@jridgewell/sourcemap-codec": "^1.4.14"}},- "node_modules/@mermaid-js/parser": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-1.2.0.tgz",- "integrity": "sha512-oYPyv8A4As1yH5Bx+04iQEQxXuIQDe0GKCNSRgao6z8AM9jixXIfP0vsppRLvGf+nKIOb9/LdpWA4YuJiVvESA==",- "license": "MIT",- "dependencies": {- "@chevrotain/types": "~11.1.2"- }- },"node_modules/@nodelib/fs.scandir": {"version": "2.1.5","dev": true,@@ -2566,259 +2510,13 @@"@babel/types": "^7.28.2"}},- "node_modules/@types/d3": {- "version": "7.4.3",- "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz",- "integrity": "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==",- "license": "MIT",- "dependencies": {- "@types/d3-array": "*",- "@types/d3-axis": "*",- "@types/d3-brush": "*",- "@types/d3-chord": "*",- "@types/d3-color": "*",- "@types/d3-contour": "*",- "@types/d3-delaunay": "*",- "@types/d3-dispatch": "*",- "@types/d3-drag": "*",- "@types/d3-dsv": "*",- "@types/d3-ease": "*",- "@types/d3-fetch": "*",- "@types/d3-force": "*",- "@types/d3-format": "*",- "@types/d3-geo": "*",- "@types/d3-hierarchy": "*",- "@types/d3-interpolate": "*",- "@types/d3-path": "*",- "@types/d3-polygon": "*",- "@types/d3-quadtree": "*",- "@types/d3-random": "*",- "@types/d3-scale": "*",- "@types/d3-scale-chromatic": "*",- "@types/d3-selection": "*",- "@types/d3-shape": "*",- "@types/d3-time": "*",- "@types/d3-time-format": "*",- "@types/d3-timer": "*",- "@types/d3-transition": "*",- "@types/d3-zoom": "*"- }- },- "node_modules/@types/d3-array": {- "version": "3.2.2",- "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz",- "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==",- "license": "MIT"- },- "node_modules/@types/d3-axis": {- "version": "3.0.6",- "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.6.tgz",- "integrity": "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==",- "license": "MIT",- "dependencies": {- "@types/d3-selection": "*"- }- },- "node_modules/@types/d3-brush": {- "version": "3.0.6",- "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-3.0.6.tgz",- "integrity": "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==",- "license": "MIT",- "dependencies": {- "@types/d3-selection": "*"- }- },- "node_modules/@types/d3-chord": {- "version": "3.0.6",- "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-3.0.6.tgz",- "integrity": "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==",- "license": "MIT"- },- "node_modules/@types/d3-color": {- "version": "3.1.3",- "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz",- "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==",- "license": "MIT"- },- "node_modules/@types/d3-contour": {- "version": "3.0.6",- "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-3.0.6.tgz",- "integrity": "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==",- "license": "MIT",- "dependencies": {- "@types/d3-array": "*",- "@types/geojson": "*"- }- },- "node_modules/@types/d3-delaunay": {- "version": "6.0.4",- "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz",- "integrity": "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==",- "license": "MIT"- },- "node_modules/@types/d3-dispatch": {- "version": "3.0.7",- "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-3.0.7.tgz",- "integrity": "sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA==",- "license": "MIT"- },- "node_modules/@types/d3-drag": {- "version": "3.0.7",- "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-3.0.7.tgz",- "integrity": "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==",- "license": "MIT",- "dependencies": {- "@types/d3-selection": "*"- }- },- "node_modules/@types/d3-dsv": {- "version": "3.0.7",- "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-3.0.7.tgz",- "integrity": "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==",- "license": "MIT"- },- "node_modules/@types/d3-ease": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz",- "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==",- "license": "MIT"- },- "node_modules/@types/d3-fetch": {- "version": "3.0.7",- "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-3.0.7.tgz",- "integrity": "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==",- "license": "MIT",- "dependencies": {- "@types/d3-dsv": "*"- }- },- "node_modules/@types/d3-force": {- "version": "3.0.10",- "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-3.0.10.tgz",- "integrity": "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==",- "license": "MIT"- },- "node_modules/@types/d3-format": {- "version": "3.0.4",- "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.4.tgz",- "integrity": "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==",- "license": "MIT"- },- "node_modules/@types/d3-geo": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.0.tgz",- "integrity": "sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==",- "license": "MIT",- "dependencies": {- "@types/geojson": "*"- }- },- "node_modules/@types/d3-hierarchy": {- "version": "3.1.7",- "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz",- "integrity": "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==",- "license": "MIT"- },- "node_modules/@types/d3-interpolate": {- "version": "3.0.4",- "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz",- "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==",- "license": "MIT",- "dependencies": {- "@types/d3-color": "*"- }- },- "node_modules/@types/d3-path": {- "version": "3.1.1",- "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz",- "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==",- "license": "MIT"- },- "node_modules/@types/d3-polygon": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-3.0.2.tgz",- "integrity": "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==",- "license": "MIT"- },- "node_modules/@types/d3-quadtree": {- "version": "3.0.6",- "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz",- "integrity": "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==",- "license": "MIT"- },- "node_modules/@types/d3-random": {- "version": "3.0.4",- "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-3.0.4.tgz",- "integrity": "sha512-UHYId5WTCx4L4YNel7NU00XUXXgvgpgZOvp10PuvsQENjMDXhh2RyFc0KBjO7B45ne4Ha1yVH7ii0vnzKkuzWA==",- "license": "MIT"- },- "node_modules/@types/d3-scale": {- "version": "4.0.9",- "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz",- "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==",- "license": "MIT",- "dependencies": {- "@types/d3-time": "*"- }- },- "node_modules/@types/d3-scale-chromatic": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz",- "integrity": "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==",- "license": "MIT"- },- "node_modules/@types/d3-selection": {- "version": "3.0.11",- "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz",- "integrity": "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==",- "license": "MIT"- },- "node_modules/@types/d3-shape": {- "version": "3.1.8",- "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.8.tgz",- "integrity": "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==",- "license": "MIT",- "dependencies": {- "@types/d3-path": "*"- }- },- "node_modules/@types/d3-time": {- "version": "3.0.4",- "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz",- "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==",- "license": "MIT"- },- "node_modules/@types/d3-time-format": {- "version": "4.0.3",- "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-4.0.3.tgz",- "integrity": "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==",- "license": "MIT"- },- "node_modules/@types/d3-timer": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz",- "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==",+ "node_modules/@types/css-tree": {+ "version": "2.3.11",+ "resolved": "https://registry.npmjs.org/@types/css-tree/-/css-tree-2.3.11.tgz",+ "integrity": "sha512-aEokibJOI77uIlqoBOkVbaQGC9zII0A+JH1kcTNKW2CwyYWD8KM6qdo+4c77wD3wZOQfJuNWAr9M4hdk+YhDIg==",+ "dev": true,"license": "MIT"},- "node_modules/@types/d3-transition": {- "version": "3.0.9",- "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-3.0.9.tgz",- "integrity": "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==",- "license": "MIT",- "dependencies": {- "@types/d3-selection": "*"- }- },- "node_modules/@types/d3-zoom": {- "version": "3.0.8",- "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.8.tgz",- "integrity": "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==",- "license": "MIT",- "dependencies": {- "@types/d3-interpolate": "*",- "@types/d3-selection": "*"- }- },"node_modules/@types/debug": {"version": "4.1.13","license": "MIT",@@ -2844,12 +2542,6 @@"@types/estree": "*"}},- "node_modules/@types/geojson": {- "version": "7946.0.16",- "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz",- "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==",- "license": "MIT"- },"node_modules/@types/hast": {"version": "3.0.4","license": "MIT",@@ -2929,13 +2621,6 @@"@types/react": "*"}},- "node_modules/@types/trusted-types": {- "version": "2.0.7",- "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",- "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==",- "license": "MIT",- "optional": true- },"node_modules/@types/unist": {"version": "3.0.3","license": "MIT"@@ -3187,16 +2872,6 @@"version": "1.3.0","license": "ISC"},- "node_modules/@upsetjs/venn.js": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/@upsetjs/venn.js/-/venn.js-2.0.0.tgz",- "integrity": "sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==",- "license": "MIT",- "optionalDependencies": {- "d3-selection": "^3.0.0",- "d3-transition": "^3.0.1"- }- },"node_modules/@vitejs/plugin-react": {"version": "4.7.0","dev": true,@@ -3698,671 +3373,161 @@"url": "https://github.com/sponsors/wooorm"}},- "node_modules/check-error": {- "version": "2.1.3",- "dev": true,- "license": "MIT",- "engines": {- "node": ">= 16"- }- },- "node_modules/chokidar": {- "version": "3.6.0",- "dev": true,- "license": "MIT",- "dependencies": {- "anymatch": "~3.1.2",- "braces": "~3.0.2",- "glob-parent": "~5.1.2",- "is-binary-path": "~2.1.0",- "is-glob": "~4.0.1",- "normalize-path": "~3.0.0",- "readdirp": "~3.6.0"- },- "engines": {- "node": ">= 8.10.0"- },- "funding": {- "url": "https://paulmillr.com/funding/"- },- "optionalDependencies": {- "fsevents": "~2.3.2"- }- },- "node_modules/chokidar/node_modules/glob-parent": {- "version": "5.1.2",- "dev": true,- "license": "ISC",- "dependencies": {- "is-glob": "^4.0.1"- },- "engines": {- "node": ">= 6"- }- },- "node_modules/class-variance-authority": {- "version": "0.7.1",- "license": "Apache-2.0",- "dependencies": {- "clsx": "^2.1.1"- },- "funding": {- "url": "https://polar.sh/cva"- }- },- "node_modules/cliui": {- "version": "6.0.0",- "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",- "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",- "license": "ISC",- "dependencies": {- "string-width": "^4.2.0",- "strip-ansi": "^6.0.0",- "wrap-ansi": "^6.2.0"- }- },- "node_modules/clsx": {- "version": "2.1.1",- "license": "MIT",- "engines": {- "node": ">=6"- }- },- "node_modules/color-convert": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",- "license": "MIT",- "dependencies": {- "color-name": "~1.1.4"- },- "engines": {- "node": ">=7.0.0"- }- },- "node_modules/color-name": {- "version": "1.1.4",- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",- "license": "MIT"- },- "node_modules/comma-separated-tokens": {- "version": "2.0.3",- "license": "MIT",- "funding": {- "type": "github",- "url": "https://github.com/sponsors/wooorm"- }- },- "node_modules/commander": {- "version": "8.3.0",- "license": "MIT",- "engines": {- "node": ">= 12"- }- },- "node_modules/convert-source-map": {- "version": "2.0.0",- "dev": true,- "license": "MIT"- },- "node_modules/cose-base": {- "version": "1.0.3",- "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-1.0.3.tgz",- "integrity": "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==",- "license": "MIT",- "dependencies": {- "layout-base": "^1.0.0"- }- },- "node_modules/cross-spawn": {- "version": "7.0.6",- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",- "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",- "dev": true,- "license": "MIT",- "dependencies": {- "path-key": "^3.1.0",- "shebang-command": "^2.0.0",- "which": "^2.0.1"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/css.escape": {- "version": "1.5.1",- "dev": true,- "license": "MIT"- },- "node_modules/cssesc": {- "version": "3.0.0",- "dev": true,- "license": "MIT",- "bin": {- "cssesc": "bin/cssesc"- },- "engines": {- "node": ">=4"- }- },- "node_modules/csstype": {- "version": "3.2.3",- "devOptional": true,- "license": "MIT"- },- "node_modules/cytoscape": {- "version": "3.34.0",- "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.34.0.tgz",- "integrity": "sha512-62rNSrioXw93uliKFBwjukeQyeWwH2PqDrTac31r2P6464u3AUvTk0xS4LVvT251g7IgkFunrI48ZEZGjywSOg==",- "license": "MIT",- "engines": {- "node": ">=0.10"- }- },- "node_modules/cytoscape-cose-bilkent": {- "version": "4.1.0",- "resolved": "https://registry.npmjs.org/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz",- "integrity": "sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==",- "license": "MIT",- "dependencies": {- "cose-base": "^1.0.0"- },- "peerDependencies": {- "cytoscape": "^3.2.0"- }- },- "node_modules/cytoscape-fcose": {- "version": "2.2.0",- "resolved": "https://registry.npmjs.org/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz",- "integrity": "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==",- "license": "MIT",- "dependencies": {- "cose-base": "^2.2.0"- },- "peerDependencies": {- "cytoscape": "^3.2.0"- }- },- "node_modules/cytoscape-fcose/node_modules/cose-base": {- "version": "2.2.0",- "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-2.2.0.tgz",- "integrity": "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==",- "license": "MIT",- "dependencies": {- "layout-base": "^2.0.0"- }- },- "node_modules/cytoscape-fcose/node_modules/layout-base": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-2.0.1.tgz",- "integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==",- "license": "MIT"- },- "node_modules/d3": {- "version": "7.9.0",- "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz",- "integrity": "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==",- "license": "ISC",- "dependencies": {- "d3-array": "3",- "d3-axis": "3",- "d3-brush": "3",- "d3-chord": "3",- "d3-color": "3",- "d3-contour": "4",- "d3-delaunay": "6",- "d3-dispatch": "3",- "d3-drag": "3",- "d3-dsv": "3",- "d3-ease": "3",- "d3-fetch": "3",- "d3-force": "3",- "d3-format": "3",- "d3-geo": "3",- "d3-hierarchy": "3",- "d3-interpolate": "3",- "d3-path": "3",- "d3-polygon": "3",- "d3-quadtree": "3",- "d3-random": "3",- "d3-scale": "4",- "d3-scale-chromatic": "3",- "d3-selection": "3",- "d3-shape": "3",- "d3-time": "3",- "d3-time-format": "4",- "d3-timer": "3",- "d3-transition": "3",- "d3-zoom": "3"- },- "engines": {- "node": ">=12"- }- },- "node_modules/d3-array": {- "version": "3.2.4",- "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz",- "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==",- "license": "ISC",- "dependencies": {- "internmap": "1 - 2"- },- "engines": {- "node": ">=12"- }- },- "node_modules/d3-axis": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz",- "integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==",- "license": "ISC",- "engines": {- "node": ">=12"- }- },- "node_modules/d3-brush": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz",- "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==",- "license": "ISC",- "dependencies": {- "d3-dispatch": "1 - 3",- "d3-drag": "2 - 3",- "d3-interpolate": "1 - 3",- "d3-selection": "3",- "d3-transition": "3"- },- "engines": {- "node": ">=12"- }- },- "node_modules/d3-chord": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz",- "integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==",- "license": "ISC",- "dependencies": {- "d3-path": "1 - 3"- },- "engines": {- "node": ">=12"- }- },- "node_modules/d3-color": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz",- "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==",- "license": "ISC",- "engines": {- "node": ">=12"- }- },- "node_modules/d3-contour": {- "version": "4.0.2",- "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz",- "integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==",- "license": "ISC",- "dependencies": {- "d3-array": "^3.2.0"- },- "engines": {- "node": ">=12"- }- },- "node_modules/d3-delaunay": {- "version": "6.0.4",- "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz",- "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==",- "license": "ISC",- "dependencies": {- "delaunator": "5"- },- "engines": {- "node": ">=12"- }- },- "node_modules/d3-dispatch": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz",- "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==",- "license": "ISC",- "engines": {- "node": ">=12"- }- },- "node_modules/d3-drag": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz",- "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==",- "license": "ISC",- "dependencies": {- "d3-dispatch": "1 - 3",- "d3-selection": "3"- },- "engines": {- "node": ">=12"- }- },- "node_modules/d3-dsv": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz",- "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==",- "license": "ISC",- "dependencies": {- "commander": "7",- "iconv-lite": "0.6",- "rw": "1"- },- "bin": {- "csv2json": "bin/dsv2json.js",- "csv2tsv": "bin/dsv2dsv.js",- "dsv2dsv": "bin/dsv2dsv.js",- "dsv2json": "bin/dsv2json.js",- "json2csv": "bin/json2dsv.js",- "json2dsv": "bin/json2dsv.js",- "json2tsv": "bin/json2dsv.js",- "tsv2csv": "bin/dsv2dsv.js",- "tsv2json": "bin/dsv2json.js"- },- "engines": {- "node": ">=12"- }- },- "node_modules/d3-dsv/node_modules/commander": {- "version": "7.2.0",- "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",- "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",- "license": "MIT",- "engines": {- "node": ">= 10"- }- },- "node_modules/d3-ease": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz",- "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==",- "license": "BSD-3-Clause",- "engines": {- "node": ">=12"- }- },- "node_modules/d3-fetch": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz",- "integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==",- "license": "ISC",- "dependencies": {- "d3-dsv": "1 - 3"- },- "engines": {- "node": ">=12"- }- },- "node_modules/d3-force": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz",- "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==",- "license": "ISC",- "dependencies": {- "d3-dispatch": "1 - 3",- "d3-quadtree": "1 - 3",- "d3-timer": "1 - 3"- },- "engines": {- "node": ">=12"- }- },- "node_modules/d3-format": {- "version": "3.1.2",- "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz",- "integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==",- "license": "ISC",- "engines": {- "node": ">=12"- }- },- "node_modules/d3-geo": {- "version": "3.1.1",- "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz",- "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==",- "license": "ISC",- "dependencies": {- "d3-array": "2.5.0 - 3"- },- "engines": {- "node": ">=12"- }- },- "node_modules/d3-hierarchy": {- "version": "3.1.2",- "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz",- "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==",- "license": "ISC",- "engines": {- "node": ">=12"- }- },- "node_modules/d3-interpolate": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz",- "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==",- "license": "ISC",- "dependencies": {- "d3-color": "1 - 3"- },- "engines": {- "node": ">=12"- }- },- "node_modules/d3-path": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz",- "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==",- "license": "ISC",- "engines": {- "node": ">=12"- }- },- "node_modules/d3-polygon": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz",- "integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==",- "license": "ISC",- "engines": {- "node": ">=12"- }- },- "node_modules/d3-quadtree": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz",- "integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==",- "license": "ISC",- "engines": {- "node": ">=12"- }- },- "node_modules/d3-random": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz",- "integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==",- "license": "ISC",- "engines": {- "node": ">=12"- }- },- "node_modules/d3-sankey": {- "version": "0.12.3",- "resolved": "https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.12.3.tgz",- "integrity": "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==",- "license": "BSD-3-Clause",- "dependencies": {- "d3-array": "1 - 2",- "d3-shape": "^1.2.0"- }- },- "node_modules/d3-sankey/node_modules/d3-array": {- "version": "2.12.1",- "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz",- "integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==",- "license": "BSD-3-Clause",- "dependencies": {- "internmap": "^1.0.0"+ "node_modules/check-error": {+ "version": "2.1.3",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 16"}},- "node_modules/d3-sankey/node_modules/d3-path": {- "version": "1.0.9",- "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz",- "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==",- "license": "BSD-3-Clause"- },- "node_modules/d3-sankey/node_modules/d3-shape": {- "version": "1.3.7",- "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz",- "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==",- "license": "BSD-3-Clause",+ "node_modules/chokidar": {+ "version": "3.6.0",+ "dev": true,+ "license": "MIT","dependencies": {- "d3-path": "1"+ "anymatch": "~3.1.2",+ "braces": "~3.0.2",+ "glob-parent": "~5.1.2",+ "is-binary-path": "~2.1.0",+ "is-glob": "~4.0.1",+ "normalize-path": "~3.0.0",+ "readdirp": "~3.6.0"+ },+ "engines": {+ "node": ">= 8.10.0"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ },+ "optionalDependencies": {+ "fsevents": "~2.3.2"}},- "node_modules/d3-sankey/node_modules/internmap": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz",- "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==",- "license": "ISC"- },- "node_modules/d3-scale": {- "version": "4.0.2",- "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz",- "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==",+ "node_modules/chokidar/node_modules/glob-parent": {+ "version": "5.1.2",+ "dev": true,"license": "ISC","dependencies": {- "d3-array": "2.10.0 - 3",- "d3-format": "1 - 3",- "d3-interpolate": "1.2.0 - 3",- "d3-time": "2.1.1 - 3",- "d3-time-format": "2 - 4"+ "is-glob": "^4.0.1"},"engines": {- "node": ">=12"+ "node": ">= 6"}},- "node_modules/d3-scale-chromatic": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz",- "integrity": "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==",- "license": "ISC",+ "node_modules/class-variance-authority": {+ "version": "0.7.1",+ "license": "Apache-2.0","dependencies": {- "d3-color": "1 - 3",- "d3-interpolate": "1 - 3"+ "clsx": "^2.1.1"},- "engines": {- "node": ">=12"+ "funding": {+ "url": "https://polar.sh/cva"}},- "node_modules/d3-selection": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz",- "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",+ "node_modules/cliui": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",+ "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==","license": "ISC",- "engines": {- "node": ">=12"+ "dependencies": {+ "string-width": "^4.2.0",+ "strip-ansi": "^6.0.0",+ "wrap-ansi": "^6.2.0"}},- "node_modules/d3-shape": {- "version": "3.2.0",- "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz",- "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==",- "license": "ISC",- "dependencies": {- "d3-path": "^3.1.0"- },+ "node_modules/clsx": {+ "version": "2.1.1",+ "license": "MIT","engines": {- "node": ">=12"+ "node": ">=6"}},- "node_modules/d3-time": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz",- "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==",- "license": "ISC",+ "node_modules/color-convert": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",+ "license": "MIT","dependencies": {- "d3-array": "2 - 3"+ "color-name": "~1.1.4"},"engines": {- "node": ">=12"+ "node": ">=7.0.0"}},- "node_modules/d3-time-format": {- "version": "4.1.0",- "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz",- "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==",- "license": "ISC",- "dependencies": {- "d3-time": "1 - 3"- },- "engines": {- "node": ">=12"+ "node_modules/color-name": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",+ "license": "MIT"+ },+ "node_modules/comma-separated-tokens": {+ "version": "2.0.3",+ "license": "MIT",+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/wooorm"}},- "node_modules/d3-timer": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz",- "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==",- "license": "ISC",+ "node_modules/commander": {+ "version": "8.3.0",+ "license": "MIT","engines": {- "node": ">=12"+ "node": ">= 12"}},- "node_modules/d3-transition": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz",- "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==",- "license": "ISC",+ "node_modules/convert-source-map": {+ "version": "2.0.0",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/cross-spawn": {+ "version": "7.0.6",+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",+ "dev": true,+ "license": "MIT","dependencies": {- "d3-color": "1 - 3",- "d3-dispatch": "1 - 3",- "d3-ease": "1 - 3",- "d3-interpolate": "1 - 3",- "d3-timer": "1 - 3"+ "path-key": "^3.1.0",+ "shebang-command": "^2.0.0",+ "which": "^2.0.1"},"engines": {- "node": ">=12"- },- "peerDependencies": {- "d3-selection": "2 - 3"+ "node": ">= 8"}},- "node_modules/d3-zoom": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz",- "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==",- "license": "ISC",+ "node_modules/css-tree": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.1.0.tgz",+ "integrity": "sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==",+ "license": "MIT","dependencies": {- "d3-dispatch": "1 - 3",- "d3-drag": "2 - 3",- "d3-interpolate": "1 - 3",- "d3-selection": "2 - 3",- "d3-transition": "2 - 3"+ "mdn-data": "2.12.2",+ "source-map-js": "^1.0.1"},"engines": {- "node": ">=12"+ "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"}},- "node_modules/dagre-d3-es": {- "version": "7.0.14",- "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.14.tgz",- "integrity": "sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg==",+ "node_modules/css.escape": {+ "version": "1.5.1",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/cssesc": {+ "version": "3.0.0",+ "dev": true,"license": "MIT",- "dependencies": {- "d3": "^7.9.0",- "lodash-es": "^4.17.21"+ "bin": {+ "cssesc": "bin/cssesc"+ },+ "engines": {+ "node": ">=4"}},- "node_modules/dayjs": {- "version": "1.11.21",- "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.21.tgz",- "integrity": "sha512-98IT+HOahAisibz/yjKbzuOBwYcjJ7BCLPzARyHiyEBmRz4fatF+KPJszEHXsGYjUG234aH/cOjW1wwTbKUZlA==",+ "node_modules/csstype": {+ "version": "3.2.3",+ "devOptional": true,"license": "MIT"},"node_modules/debug": {@@ -4423,15 +3588,6 @@"dev": true,"license": "MIT"},- "node_modules/delaunator": {- "version": "5.1.0",- "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.1.0.tgz",- "integrity": "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==",- "license": "ISC",- "dependencies": {- "robust-predicates": "^3.0.2"- }- },"node_modules/dequal": {"version": "2.0.3","license": "MIT",@@ -4484,15 +3640,6 @@"dev": true,"license": "MIT"},- "node_modules/dompurify": {- "version": "3.4.12",- "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.12.tgz",- "integrity": "sha512-zQvGet8Z2sWbQhCmfFz/T5QWH2oBmjnqK3qvOjaqaNLrLEF912WamU+ohnTp0TCep/MFVHpdJuCZEdFOdTnEFg==",- "license": "(MPL-2.0 OR Apache-2.0)",- "optionalDependencies": {- "@types/trusted-types": "^2.0.7"- }- },"node_modules/eastasianwidth": {"version": "0.2.0","resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",@@ -4534,16 +3681,6 @@"dev": true,"license": "MIT"},- "node_modules/es-toolkit": {- "version": "1.49.0",- "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.49.0.tgz",- "integrity": "sha512-G5iZ6Pc/FNRY/soKZHC+TxGDD83rHUDXxzaWhGCX44vAv/tMs56WMusnm/KMNK+luUPsgA9U28cGr4RDlSzL2g==",- "license": "MIT",- "workspaces": [- "docs",- "benchmarks"- ]- },"node_modules/esbuild": {"version": "0.21.5","dev": true,@@ -5116,12 +4253,6 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/hachure-fill": {- "version": "0.5.2",- "resolved": "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz",- "integrity": "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==",- "license": "MIT"- },"node_modules/happy-dom": {"version": "16.8.1","dev": true,@@ -5542,18 +4673,6 @@}}},- "node_modules/iconv-lite": {- "version": "0.6.3",- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",- "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",- "license": "MIT",- "dependencies": {- "safer-buffer": ">= 2.1.2 < 3.0.0"- },- "engines": {- "node": ">=0.10.0"- }- },"node_modules/ignore": {"version": "5.3.2","resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",@@ -5564,16 +4683,6 @@"node": ">= 4"}},- "node_modules/import-meta-resolve": {- "version": "4.2.0",- "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz",- "integrity": "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==",- "license": "MIT",- "funding": {- "type": "github",- "url": "https://github.com/sponsors/wooorm"- }- },"node_modules/imurmurhash": {"version": "0.1.4","resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",@@ -5596,15 +4705,6 @@"version": "0.2.7","license": "MIT"},- "node_modules/internmap": {- "version": "2.0.3",- "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz",- "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==",- "license": "ISC",- "engines": {- "node": ">=12"- }- },"node_modules/is-alphabetical": {"version": "1.0.4","license": "MIT",@@ -5868,17 +4968,6 @@"json-buffer": "3.0.1"}},- "node_modules/khroma": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/khroma/-/khroma-2.1.0.tgz",- "integrity": "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw=="- },- "node_modules/layout-base": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-1.0.2.tgz",- "integrity": "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==",- "license": "MIT"- },"node_modules/levn": {"version": "0.4.1","resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",@@ -5925,12 +5014,6 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/lodash-es": {- "version": "4.18.1",- "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz",- "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==",- "license": "MIT"- },"node_modules/longest-streak": {"version": "3.1.0","license": "MIT",@@ -6403,6 +5486,12 @@"url": "https://opencollective.com/unified"}},+ "node_modules/mdn-data": {+ "version": "2.12.2",+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.12.2.tgz",+ "integrity": "sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==",+ "license": "CC0-1.0"+ },"node_modules/merge2": {"version": "1.4.1","dev": true,@@ -6411,47 +5500,6 @@"node": ">= 8"}},- "node_modules/mermaid": {- "version": "11.16.0",- "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.16.0.tgz",- "integrity": "sha512-Zvm3kbstgdpvIJPPItlL7fppIZ3kibvc1oZIGxdvk9t6UFz6flv+Jw7FtRGKwfcI8OckmH04LqG6LlS6X4B1pA==",- "license": "MIT",- "dependencies": {- "@braintree/sanitize-url": "^7.1.2",- "@iconify/utils": "^3.0.2",- "@mermaid-js/parser": "^1.2.0",- "@types/d3": "^7.4.3",- "@upsetjs/venn.js": "^2.0.0",- "cytoscape": "^3.33.3",- "cytoscape-cose-bilkent": "^4.1.0",- "cytoscape-fcose": "^2.2.0",- "d3": "^7.9.0",- "d3-sankey": "^0.12.3",- "dagre-d3-es": "7.0.14",- "dayjs": "^1.11.20",- "dompurify": "^3.3.3",- "es-toolkit": "^1.45.1",- "katex": "^0.16.45",- "khroma": "^2.1.0",- "marked": "^16.3.0",- "roughjs": "^4.6.6",- "stylis": "^4.3.6",- "ts-dedent": "^2.2.0",- "uuid": "^11.1.0 || ^12 || ^13 || ^14.0.0"- }- },- "node_modules/mermaid/node_modules/marked": {- "version": "16.4.2",- "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz",- "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==",- "license": "MIT",- "bin": {- "marked": "bin/marked.js"- },- "engines": {- "node": ">= 20"- }- },"node_modules/micromark": {"version": "4.0.2","funding": [@@ -7168,12 +6216,6 @@"dev": true,"license": "BlueOak-1.0.0"},- "node_modules/package-manager-detector": {- "version": "1.7.0",- "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.7.0.tgz",- "integrity": "sha512-xg1eHpwYL/D/HEdWw2goFZP6vV0FH7W+PZ5rFkGjdIDLtxq7EkzBUeT3m+lndYCt8wKbmofUu1MUdMCXkCk9ZQ==",- "license": "MIT"- },"node_modules/parse-entities": {"version": "2.0.0","license": "MIT",@@ -7200,12 +6242,6 @@"url": "https://github.com/inikulin/parse5?sponsor=1"}},- "node_modules/path-data-parser": {- "version": "0.1.0",- "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz",- "integrity": "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==",- "license": "MIT"- },"node_modules/path-exists": {"version": "4.0.0","resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",@@ -7267,6 +6303,15 @@"node": ">= 14.16"}},+ "node_modules/pele": {+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/pele/-/pele-1.6.0.tgz",+ "integrity": "sha512-VfAiVItsOGlGhvnBfphdT28VCG7mXMZxQNOwAGsCtxI2ztbUsT39MraEOYjsapLxVETkdUZscm0DdotYDQMLdw==",+ "license": "MIT",+ "engines": {+ "node": ">=20"+ }+ },"node_modules/picocolors": {"version": "1.1.1","dev": true,@@ -7339,22 +6384,6 @@"node": ">=10.13.0"}},- "node_modules/points-on-curve": {- "version": "0.2.0",- "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz",- "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==",- "license": "MIT"- },- "node_modules/points-on-path": {- "version": "0.2.1",- "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz",- "integrity": "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==",- "license": "MIT",- "dependencies": {- "path-data-parser": "0.1.0",- "points-on-curve": "0.2.0"- }- },"node_modules/postcss": {"version": "8.5.10","dev": true,@@ -7997,12 +7026,6 @@"node": ">=0.10.0"}},- "node_modules/robust-predicates": {- "version": "3.0.3",- "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.3.tgz",- "integrity": "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==",- "license": "Unlicense"- },"node_modules/rollup": {"version": "4.60.1","dev": true,@@ -8046,18 +7069,6 @@"fsevents": "~2.3.2"}},- "node_modules/roughjs": {- "version": "4.6.6",- "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.6.6.tgz",- "integrity": "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==",- "license": "MIT",- "dependencies": {- "hachure-fill": "^0.5.2",- "path-data-parser": "^0.1.0",- "points-on-curve": "^0.2.0",- "points-on-path": "^0.2.1"- }- },"node_modules/run-parallel": {"version": "1.2.0","dev": true,@@ -8080,17 +7091,17 @@"queue-microtask": "^1.2.2"}},- "node_modules/rw": {- "version": "1.3.3",- "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz",- "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==",- "license": "BSD-3-Clause"- },- "node_modules/safer-buffer": {- "version": "2.1.2",- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",- "license": "MIT"+ "node_modules/saxes": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz",+ "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==",+ "license": "ISC",+ "dependencies": {+ "xmlchars": "^2.2.0"+ },+ "engines": {+ "node": ">=v12.22.7"+ }},"node_modules/scheduler": {"version": "0.23.2",@@ -8156,7 +7167,6 @@},"node_modules/source-map-js": {"version": "1.2.1",- "dev": true,"license": "BSD-3-Clause","engines": {"node": ">=0.10.0"@@ -8181,33 +7191,38 @@"license": "MIT"},"node_modules/streamdown": {- "version": "2.5.0",- "resolved": "https://registry.npmjs.org/streamdown/-/streamdown-2.5.0.tgz",- "integrity": "sha512-/tTnURfIOxZK/pqJAxsfCvETG/XCJHoWnk3jq9xLcuz6CSpnjjuxSRBTTL4PKGhxiZQf0lqPxGhImdpwcZ2XwA==",+ "version": "2.6.0",+ "resolved": "https://registry.npmjs.org/streamdown/-/streamdown-2.6.0.tgz",+ "integrity": "sha512-nQZVUn4GvB2R5SAlDNph20iKZeW+RM4gv6G1H3ACypEnmQf8PgTHZ/1Ta2OACRwQ2coK7aW5AeIAa7Ls5zk+RA==","license": "Apache-2.0","dependencies": {"clsx": "^2.1.1","hast-util-to-jsx-runtime": "^2.3.6","html-url-attributes": "^3.0.1","marked": "^17.0.1",- "mermaid": "^11.12.2","rehype-harden": "^1.1.8","rehype-raw": "^7.0.0","rehype-sanitize": "^6.0.0","remark-gfm": "^4.0.1","remark-parse": "^11.0.0","remark-rehype": "^11.1.2",- "remend": "1.3.0",- "tailwind-merge": "^3.4.0",+ "remend": "1.3.1",+ "tailwind-merge": "^3.6.0","unified": "^11.0.5",- "unist-util-visit": "^5.0.0",- "unist-util-visit-parents": "^6.0.0"+ "unist-util-visit": "^5.1.0",+ "unist-util-visit-parents": "^6.0.2"},"peerDependencies": {"react": "^18.0.0 || ^19.0.0","react-dom": "^18.0.0 || ^19.0.0"}},+ "node_modules/streamdown/node_modules/remend": {+ "version": "1.3.1",+ "resolved": "https://registry.npmjs.org/remend/-/remend-1.3.1.tgz",+ "integrity": "sha512-N3DiY5qbRPoa5vkxn1oDLMyXOVTeo6Hp+XOj6SIqJAYUgLS0Q587gILPMom/qm86AQ/ZrcOdwEIzCz8V3J0nxQ==",+ "license": "Apache-2.0"+ },"node_modules/streamdown/node_modules/tailwind-merge": {"version": "3.6.0","resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.6.0.tgz",@@ -8319,12 +7334,6 @@"inline-style-parser": "0.2.7"}},- "node_modules/stylis": {- "version": "4.4.0",- "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.4.0.tgz",- "integrity": "sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==",- "license": "MIT"- },"node_modules/sucrase": {"version": "3.35.1","dev": true,@@ -8565,15 +7574,6 @@"typescript": ">=4.8.4"}},- "node_modules/ts-dedent": {- "version": "2.3.0",- "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.3.0.tgz",- "integrity": "sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg==",- "license": "MIT",- "engines": {- "node": ">=6.10"- }- },"node_modules/ts-interface-checker": {"version": "0.1.13","dev": true,@@ -8828,19 +7828,6 @@"dev": true,"license": "MIT"},- "node_modules/uuid": {- "version": "14.0.1",- "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.1.tgz",- "integrity": "sha512-6ZxzVpzDXDa3bJWaHilVayA+BH/1zmxCJoVgvmqJnid/gPoKHxUrS/aC/T6LGQtNHT+XHG9fXPJB4d+IrU30Ew==",- "funding": [- "https://github.com/sponsors/broofa",- "https://github.com/sponsors/ctavan"- ],- "license": "MIT",- "bin": {- "uuid": "dist-node/bin/uuid"- }- },"node_modules/vfile": {"version": "6.0.3","license": "MIT",@@ -9164,6 +8151,12 @@"url": "https://github.com/chalk/ansi-styles?sponsor=1"}},+ "node_modules/xmlchars": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",+ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==",+ "license": "MIT"+ },"node_modules/xtend": {"version": "4.0.2","license": "MIT",diff --git a/webui/package.json b/webui/package.jsonindex 94c3641f3..8c2b1e81d 100644--- a/webui/package.json+++ b/webui/package.json@@ -27,11 +27,13 @@"@radix-ui/react-tooltip": "^1.1.6","class-variance-authority": "^0.7.1","clsx": "^2.1.1",+ "css-tree": "3.1.0","diff": "^9.0.0","i18next": "^26.0.6","lucide-react": "^0.469.0","micromark-factory-space": "^2.0.1","micromark-util-decode-string": "^2.0.1",+ "pele": "1.6.0","qrcode": "^1.5.4","react": "^18.3.1","react-dom": "^18.3.1",@@ -43,7 +45,8 @@"remark-math": "^6.0.0","remark-parse": "^11.0.0","remend": "1.3.0",- "streamdown": "2.5.0",+ "saxes": "6.0.0",+ "streamdown": "2.6.0","tailwind-merge": "^2.6.0","unified": "^11.0.5"},@@ -54,6 +57,7 @@"@testing-library/jest-dom": "^6.6.3","@testing-library/react": "^16.1.0","@testing-library/user-event": "^14.5.2",+ "@types/css-tree": "^2.3.10","@types/node": "^24.0.0","@types/mdast": "^4.0.4","@types/qrcode": "^1.5.6",diff --git a/webui/public/licenses/diagram-parsers.txt b/webui/public/licenses/diagram-parsers.txtnew file mode 100644index 000000000..860dcce5a--- /dev/null+++ b/webui/public/licenses/diagram-parsers.txt@@ -0,0 +1,60 @@+css-tree 3.1.0 — MIT+https://github.com/csstree/csstree++Copyright (C) 2016-2024 by Roman Dvornov++Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.++====++saxes 6.0.0 — ISC+https://github.com/lddubeau/saxes/blob/v6.0.0/LICENSE++The ISC License++Copyright (c) Contributors++Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.++THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.++====++The following license is the one that governed sax, from which saxes was forked. Isaac Schlueter is not *directly* involved with saxes so don't go bugging him for saxes issues.++The ISC License++Copyright (c) Isaac Z. Schlueter and Contributors++Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.++THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.++====++`String.fromCodePoint` by Mathias Bynens is no longer used, but it can still be found in old commits. It was once used according to terms of MIT License, as follows:++Copyright Mathias Bynens <https://mathiasbynens.be/>++Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.++====++xmlchars 2.2.0 — MIT+https://github.com/lddubeau/xmlchars++Copyright Louis-Dominique Dubeau and contributors to xmlchars++Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.diff --git a/webui/public/licenses/pele.txt b/webui/public/licenses/pele.txtnew file mode 100644index 000000000..2f7126f4d--- /dev/null+++ b/webui/public/licenses/pele.txt@@ -0,0 +1,21 @@+Pele 1.6.0 — https://github.com/obsidianmd/pele++MIT License++Copyright (c) 2026 kepano++Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.++---++The reset icon of the zoom controls is "rotate-ccw" from Lucide v1.14.0 (https://lucide.dev), under the ISC License:++Copyright (c) 2026 Lucide Icons and Contributors++Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.++THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.diff --git a/webui/src/components/MarkdownTextRenderer.tsx b/webui/src/components/MarkdownTextRenderer.tsxindex 3982bad38..2d56c40d7 100644--- a/webui/src/components/MarkdownTextRenderer.tsx+++ b/webui/src/components/MarkdownTextRenderer.tsx@@ -20,7 +20,8 @@ import { parseMathAwareMarkdownBlocks } from "@/lib/markdown-streaming-blocks";import { DisplayMath } from "@/components/DisplayMath";import { AttachmentTile } from "@/components/AttachmentTile";-import { CodeBlock } from "@/components/CodeBlock";+import { MarkdownCodeBlock } from "@/components/markdown-diagrams/MarkdownCodeBlock";+import { MarkdownCodeContext } from "@/components/markdown-diagrams/context";import { WebLink } from "@/components/WebLink";import {INLINE_TOKEN_HIGHLIGHT_COLOR,@@ -559,12 +560,6 @@ function useFaviconFallback(host: string) {};}-function isRenderedCodeBlock(value: ReactNode): boolean {- if (!isValidElement(value)) return false;- const props = value.props as { code?: unknown };- return value.type === CodeBlock || typeof props.code === "string";-}-function codeFenceFromPreChild(value: ReactNode): { code: string; language?: string } | null {if (!isValidElement(value)) return null;const props = value.props as { className?: unknown; children?: ReactNode };@@ -609,19 +604,6 @@ export default function MarkdownTextRenderer({() => ({code({ className: cls, children: kids, node: _node, ...props }) {void _node;- const match = /language-(\w+)/.exec(cls || "");- if (match) {- const code = String(kids).replace(/\n$/, "");- return (- <CodeBlock- language={match[1]}- code={code}- className="my-3"- highlight={highlightCode}- showLineNumbers={code.includes("\n")}- />- );- }const raw = String(kids).replace(/\n$/, "");if (!documentPath && isLikelyFilePath(raw)) {return (@@ -662,20 +644,10 @@ export default function MarkdownTextRenderer({pre({ children: markdownChildren }) {const kids = Children.toArray(markdownChildren);const lone = kids.length === 1 ? kids[0] : null;- /** Highlighted fences render ``CodeBlock`` (block shell); skip invalid ``<pre><div>``. */- if (isRenderedCodeBlock(lone)) {- return <>{markdownChildren}</>;- }const fence = codeFenceFromPreChild(lone);if (fence) {return (- <CodeBlock- language={fence.language || "text"}- code={fence.code}- className="my-3"- highlight={highlightCode}- showLineNumbers={fence.code.includes("\n")}- />+ <MarkdownCodeBlock language={fence.language} code={fence.code} />);}return (@@ -896,10 +868,11 @@ export default function MarkdownTextRenderer({);},}),- [highlightCode, onOpenFilePreview, documentPath, t],+ [onOpenFilePreview, documentPath, t],);return (+ <MarkdownCodeContext.Provider value={{ streaming, highlight: highlightCode }}><Streamdownkey={needsMath && mathPlugin ? "math" : "text"}mode={streaming || preserveStreamingLayout ? "streaming" : "static"}@@ -927,8 +900,9 @@ export default function MarkdownTextRenderer({className,)}>- {/* Streamdown 2.5 ignores repair-option changes in its memo comparator. */}+ {/* Repair follows generation, independently of the preserved layout mode. */}{streaming ? remend(children, REMEND_OPTIONS) : children}</Streamdown>+ </MarkdownCodeContext.Provider>);}diff --git a/webui/src/components/ZoomableImage.tsx b/webui/src/components/ZoomableImage.tsxindex 332240561..ed72b923f 100644--- a/webui/src/components/ZoomableImage.tsx+++ b/webui/src/components/ZoomableImage.tsx@@ -1,119 +1,14 @@-import { useCallback, useEffect, useRef, useState, type PointerEvent } from "react";-import { Minus, Plus } from "lucide-react";-import { useTranslation } from "react-i18next";+import { ImageViewport } from "@/components/ui/image-viewport";-import { cn } from "@/lib/utils";--type Point = { x: number; y: number };-type View = Point & { scale: number };-const FIT: View = { x: 0, y: 0, scale: 1 };-const MAX_SCALE = 8;-const clamp = (value: number, min: number, max: number) => Math.min(max, Math.max(min, value));-const midpoint = (a: Point, b: Point): Point => ({ x: (a.x + b.x) / 2, y: (a.y + b.y) / 2 });-const distance = (a: Point, b: Point) => Math.hypot(a.x - b.x, a.y - b.y);--/** Image-local gestures; the surrounding page retains normal browser zoom. Remount per image. */+/** Photo lightbox layout; the gallery retains ownership of the arrow keys. */export function ZoomableImage({ src, alt }: { src: string; alt: string }) {- const { t } = useTranslation();- const viewport = useRef<HTMLDivElement>(null);- const image = useRef<HTMLImageElement>(null);- const pointers = useRef(new Map<number, Point>());- const viewRef = useRef(FIT);- const [view, setView] = useState(FIT);- const [dragging, setDragging] = useState(false);-- const apply = useCallback((next: View) => {- const scale = clamp(next.scale, 1, MAX_SCALE);- const maxX = Math.max(0, ((image.current?.offsetWidth ?? 0) * scale - (viewport.current?.clientWidth ?? 0)) / 2);- const maxY = Math.max(0, ((image.current?.offsetHeight ?? 0) * scale - (viewport.current?.clientHeight ?? 0)) / 2);- const bounded = { scale, x: clamp(next.x, -maxX, maxX), y: clamp(next.y, -maxY, maxY) };- viewRef.current = bounded;- setView(bounded);- }, []);-- const zoom = useCallback((scale: number, from?: Point, to = from) => {- const rect = viewport.current?.getBoundingClientRect();- const current = viewRef.current;- const next = clamp(scale, 1, MAX_SCALE);- const center = rect ? { x: rect.left + rect.width / 2, y: rect.top + rect.height / 2 } : { x: 0, y: 0 };- const origin = from ?? center;- const target = to ?? origin;- apply({- scale: next,- x: target.x - center.x - (origin.x - center.x - current.x) * next / current.scale,- y: target.y - center.y - (origin.y - center.y - current.y) * next / current.scale,- });- }, [apply]);-- useEffect(() => {- const element = viewport.current;- if (!element) return;- // React's wheel listener is passive; cancel browser zoom only over this image viewport.- const onWheel = (event: WheelEvent) => {- if (event.ctrlKey) {- event.preventDefault();- zoom(viewRef.current.scale * Math.exp(-clamp(event.deltaY, -50, 50) * 0.01), { x: event.clientX, y: event.clientY });- } else if (viewRef.current.scale > 1) {- event.preventDefault();- const unit = event.deltaMode === 1 ? 16 : event.deltaMode === 2 ? element.clientHeight : 1;- apply({ ...viewRef.current, x: viewRef.current.x - event.deltaX * unit, y: viewRef.current.y - event.deltaY * unit });- }- };- element.addEventListener("wheel", onWheel, { passive: false });- const resize = new ResizeObserver(() => apply(viewRef.current));- resize.observe(element);- return () => { element.removeEventListener("wheel", onWheel); resize.disconnect(); };- }, [apply, zoom]);-- const onPointerDown = (event: PointerEvent<HTMLDivElement>) => {- if (event.button !== 0 || pointers.current.size >= 2) return;- pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY });- event.currentTarget.setPointerCapture(event.pointerId);- setDragging(true);- };- const onPointerMove = (event: PointerEvent<HTMLDivElement>) => {- if (!pointers.current.has(event.pointerId)) return;- const before = [...pointers.current.values()];- pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY });- const after = [...pointers.current.values()];- if (before.length === 2) {- const previousDistance = distance(before[0], before[1]);- if (previousDistance > 0) zoom(viewRef.current.scale * distance(after[0], after[1]) / previousDistance,- midpoint(before[0], before[1]), midpoint(after[0], after[1]));- } else if (viewRef.current.scale > 1) {- apply({ ...viewRef.current, x: viewRef.current.x + after[0].x - before[0].x, y: viewRef.current.y + after[0].y - before[0].y });- }- };- const endPointer = (event: PointerEvent<HTMLDivElement>) => {- pointers.current.delete(event.pointerId);- if (event.currentTarget.hasPointerCapture(event.pointerId)) event.currentTarget.releasePointerCapture(event.pointerId);- setDragging(pointers.current.size > 0);- };- const buttonClass = "grid size-9 shrink-0 place-items-center rounded-full text-white/90 transition-colors hover:text-white disabled:opacity-30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/70";-- return <>- <div ref={viewport} data-testid="image-zoom-viewport" tabIndex={0} role="group" aria-label={t("lightbox.gestures")}- className={cn("absolute inset-x-3 bottom-[calc(4rem+env(safe-area-inset-bottom))] top-14 flex touch-none select-none items-center justify-center overflow-hidden focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/40 sm:inset-x-8", view.scale > 1 ? dragging ? "cursor-grabbing" : "cursor-grab" : "cursor-zoom-in")}- onPointerDown={onPointerDown} onPointerMove={onPointerMove} onPointerUp={endPointer} onPointerCancel={endPointer} onLostPointerCapture={endPointer}- onDoubleClick={(event) => zoom(view.scale > 1 ? 1 : 2, { x: event.clientX, y: event.clientY })}- onKeyDown={(event) => {- if (event.key === "+" || event.key === "=") zoom(view.scale * 1.5);- else if (event.key === "-") zoom(view.scale / 1.5);- else if (event.key === "0") apply(FIT);- else return;- event.preventDefault();- }}>- <img ref={image} src={src} alt={alt} decoding="async" draggable={false} onLoad={() => apply(viewRef.current)}- className="max-h-full max-w-full select-none rounded-compact object-contain shadow-2xl will-change-transform"- style={{ transform: `translate3d(${view.x}px, ${view.y}px, 0) scale(${view.scale})` }} />- </div>- <div className="absolute bottom-[calc(1rem+env(safe-area-inset-bottom))] left-1/2 flex -translate-x-1/2 items-center gap-1 rounded-full bg-black/55 p-1 backdrop-blur-sm">- <button type="button" aria-label={t("lightbox.zoomOut")} title={t("lightbox.zoomOut")} disabled={view.scale <= 1} className={buttonClass} onClick={() => zoom(view.scale / 1.5)}><Minus className="size-4" aria-hidden /></button>- <button type="button" aria-label={t("lightbox.resetZoom")} title={t("lightbox.resetZoom")}- className="h-9 min-w-14 rounded-full px-2 text-xs font-medium tabular-nums text-white/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/70" onClick={() => apply(FIT)}>- {Math.round(view.scale * 100)}%- </button>- <button type="button" aria-label={t("lightbox.zoomIn")} title={t("lightbox.zoomIn")} disabled={view.scale >= MAX_SCALE} className={buttonClass} onClick={() => zoom(view.scale * 1.5)}><Plus className="size-4" aria-hidden /></button>- </div>- </>;+ return <ImageViewport+ src={src}+ alt={alt}+ testId="image-zoom-viewport"+ panWithArrows={false}+ className="absolute inset-x-3 bottom-[calc(4rem+env(safe-area-inset-bottom))] top-14 focus-visible:ring-white/40 sm:inset-x-8"+ imageClassName="rounded-compact shadow-2xl"+ controlsClassName="absolute bottom-[calc(1rem+env(safe-area-inset-bottom))] left-1/2 -translate-x-1/2 bg-black/55 text-white/90 backdrop-blur-sm [&_button:first-child:hover]:text-white [&_button:last-child:hover]:text-white [&_button:focus-visible]:ring-white/70"+ />;}diff --git a/webui/src/components/markdown-diagrams/MarkdownCodeBlock.tsx b/webui/src/components/markdown-diagrams/MarkdownCodeBlock.tsxnew file mode 100644index 000000000..fe27598d1--- /dev/null+++ b/webui/src/components/markdown-diagrams/MarkdownCodeBlock.tsx@@ -0,0 +1,27 @@+import { Component, lazy, Suspense, useContext, type ReactNode } from "react";+import { useTranslation } from "react-i18next";++import { CodeBlock } from "@/components/CodeBlock";+import { MarkdownCodeContext } from "./context";++const MermaidBlock = lazy(() => import("./MermaidBlock"));++class DiagramBoundary extends Component<{ children: ReactNode; fallback: ReactNode }, { failed: boolean }> {+ state = { failed: false };+ static getDerivedStateFromError() { return { failed: true }; }+ render() { return this.state.failed ? this.props.fallback : this.props.children; }+}++export function MarkdownCodeBlock({ code, language }: { code: string; language?: string }) {+ const { t } = useTranslation();+ const { streaming, highlight } = useContext(MarkdownCodeContext);+ const source = <CodeBlock language={language || "text"} code={code} className="my-3" highlight={highlight} showLineNumbers={code.includes("\n")} />;+ if (language?.toLowerCase() !== "mermaid") return source;+ const preparing = <div aria-busy={streaming}>+ <p className="my-1 text-xs text-muted-foreground" role="status">{t("diagram.preparing")}</p>{source}+ </div>;+ if (streaming) return preparing;+ return <DiagramBoundary key={code} fallback={<><p className="text-xs text-muted-foreground" role="status">{t("diagram.errors.load")}</p>{source}</>}>+ <Suspense fallback={preparing}><MermaidBlock source={code} /></Suspense>+ </DiagramBoundary>;+}diff --git a/webui/src/components/markdown-diagrams/MermaidBlock.tsx b/webui/src/components/markdown-diagrams/MermaidBlock.tsxnew file mode 100644index 000000000..9aa11dc4a--- /dev/null+++ b/webui/src/components/markdown-diagrams/MermaidBlock.tsx@@ -0,0 +1,148 @@+import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";+import { Check, Copy, Maximize2 } from "lucide-react";+import { useTranslation } from "react-i18next";++import { CodeBlock } from "@/components/CodeBlock";+import { Dialog, DialogContent, DialogTitle, DialogTrigger } from "@/components/ui/dialog";+import { HoverHint } from "@/components/ui/hover-hint";+import { ImageViewport } from "@/components/ui/image-viewport";+import { copyTextToClipboard } from "@/lib/clipboard";+import { cn } from "@/lib/utils";+import { useDiagramScope } from "./context";+import { requestDiagram, type DiagramPalette, type DiagramRequest, type DiagramState } from "./runtime";+import type { DiagramInput } from "./types";++function readPalette(element: HTMLElement): DiagramPalette {+ const style = getComputedStyle(element);+ const color = (token: string) => `hsl(${style.getPropertyValue(token).trim()})`;+ return {+ "--pele-bg": color("--background"), "--pele-fg": color("--foreground"),+ "--pele-muted": color("--muted-foreground"), "--pele-line": color("--foreground"),+ "--pele-surface": color("--muted"), "--pele-surface-alt": color("--secondary"),+ "--pele-border": color("--border"), "--pele-accent": color("--primary"),+ "--pele-critical": color("--destructive"),+ };+}++export default function MermaidBlock({ source }: { source: string }) {+ const { t } = useTranslation();+ const scope = useDiagramScope();+ const container = useRef<HTMLDivElement>(null);+ const mono = useRef<HTMLSpanElement>(null);+ const request = useRef<DiagramRequest | null>(null);+ const palette = useRef<DiagramPalette>({});+ const visible = useRef(false);+ const height = useRef(0);+ const [input, setInput] = useState<Omit<DiagramInput, "source"> | null>(null);+ const [state, setState] = useState<DiagramState>({ kind: "waiting" });+ const [view, setView] = useState<"diagram" | "source">("diagram");+ const [open, setOpen] = useState(false);+ const [copied, setCopied] = useState(false);+ const copyTimer = useRef<ReturnType<typeof setTimeout>>();+ const demand = useRef({ view, open });+ demand.current = { view, open };++ const updateDemand = useCallback(() => request.current?.setDemand(document.hidden || demand.current.view === "source"+ ? "none" : demand.current.open ? "dialog" : visible.current ? "visible" : "none"), []);++ useEffect(() => {+ const element = container.current;+ if (!element) return;+ let active = true;+ let frame = 0;+ const measure = () => {+ if (!active) return;+ cancelAnimationFrame(frame);+ frame = requestAnimationFrame(() => {+ const width = Math.floor(element.clientWidth);+ if (width <= 0) return;+ const style = getComputedStyle(element);+ const next = { width, fonts: { sans: style.fontFamily, mono: getComputedStyle(mono.current!).fontFamily, size: 16 } };+ // The open viewer fits its existing image; defer layout changes until it closes.+ if (!demand.current.open) setInput((previous) => JSON.stringify(previous) === JSON.stringify(next) ? previous : next);+ palette.current = readPalette(element);+ request.current?.setPalette(palette.current);+ });+ };+ const resize = new ResizeObserver(measure);+ resize.observe(element);+ const intersection = new IntersectionObserver(([entry]) => {+ visible.current = entry.isIntersecting;+ updateDemand();+ });+ intersection.observe(element);+ const appearance = new MutationObserver(measure);+ appearance.observe(document.documentElement, { attributes: true, attributeFilter: ["class", "style"] });+ document.addEventListener("visibilitychange", updateDemand);+ void document.fonts.ready.then(measure);+ measure();+ return () => {+ active = false;+ resize.disconnect(); intersection.disconnect(); appearance.disconnect();+ document.removeEventListener("visibilitychange", updateDemand);+ cancelAnimationFrame(frame);+ };+ }, [updateDemand, open]);++ useLayoutEffect(() => { setOpen(false); }, [source, scope]);+ useLayoutEffect(() => {+ setState({ kind: "waiting" });+ if (!input) return;+ const controller = new AbortController();+ const handle = requestDiagram({ ...input, source }, controller.signal, (next) => {+ if (controller.signal.aborted) return;+ if (next.kind === "ready") height.current = Math.min(448, next.image.height * Math.min(1, input.width / next.image.width));+ setState(next);+ });+ request.current = handle;+ handle.setPalette(palette.current);+ updateDemand();+ return () => { controller.abort(); request.current = null; };+ }, [source, scope, input, updateDemand]);++ useEffect(() => { updateDemand(); }, [view, open, updateDemand]);+ useEffect(() => () => clearTimeout(copyTimer.current), []);++ const copy = async () => {+ if (!await copyTextToClipboard(source)) return;+ setCopied(true);+ clearTimeout(copyTimer.current);+ copyTimer.current = setTimeout(() => setCopied(false), 2000);+ };+ const buttonClass = "rounded px-2 py-1 text-xs text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";+ const showSource = view === "source" || state.kind === "failed";+ const image = state.kind === "ready" ? state.image : null;++ return <div ref={container} className="not-prose my-3 min-w-0 overflow-hidden rounded-lg border border-border/60" data-testid="mermaid-block">+ <span ref={mono} className="hidden font-mono" aria-hidden />+ <div className="flex flex-wrap items-center gap-1 border-b border-border/60 px-2 py-1">+ <span className="mr-auto px-1 text-xs text-muted-foreground">Mermaid</span>+ <button type="button" aria-pressed={view === "diagram"} className={cn(buttonClass, view === "diagram" && "bg-muted text-foreground")} onClick={() => setView("diagram")}>{t("diagram.graph")}</button>+ <button type="button" aria-pressed={view === "source"} className={cn(buttonClass, view === "source" && "bg-muted text-foreground")} onClick={() => setView("source")}>{t("diagram.source")}</button>+ <HoverHint content={t("diagram.copy")}>+ <button type="button" className={buttonClass} aria-label={t("diagram.copy")} onClick={() => void copy()}>+ {copied ? <Check className="h-3.5 w-3.5" /> : <Copy className="h-3.5 w-3.5" />}+ </button>+ </HoverHint>+ <Dialog open={open && !!image} onOpenChange={setOpen}>+ <HoverHint content={t("diagram.enlarge")}>+ <DialogTrigger asChild><button type="button" className={buttonClass} aria-label={t("diagram.enlarge")} disabled={!image}><Maximize2 className="h-3.5 w-3.5" /></button></DialogTrigger>+ </HoverHint>+ <DialogContent className="h-[85dvh] max-w-[min(96vw,90rem)] gap-0 overflow-hidden p-3 sm:p-4" aria-describedby={undefined}>+ <DialogTitle className="sr-only">{t("diagram.title")}</DialogTitle>+ {image && <div className="flex h-full min-h-0 flex-col gap-2 pt-6"><ImageViewport src={image.url} alt={image.label || t("diagram.title")} className="flex-1" /></div>}+ </DialogContent>+ </Dialog>+ </div>+ {state.kind === "failed" && <div className="flex items-center gap-2 px-3 py-2 text-xs text-muted-foreground" role="status">+ <span>{t(`diagram.errors.${state.reason}`)}</span>+ {["load", "worker", "deadline", "image"].includes(state.reason) && <button type="button" className={buttonClass} onClick={() => request.current?.retry()}>{t("common.retry")}</button>}+ </div>}+ {showSource ? <CodeBlock language="mermaid" code={source} chrome="none" highlight={false} showLineNumbers={source.includes("\n")} />+ : image ? <div className="flex justify-center p-3"><img src={image.url} alt={image.label || t("diagram.title")} width={image.width} height={image.height} className="max-h-[28rem] max-w-full object-contain" /></div>+ : <div className="px-3 py-2" style={{ minHeight: height.current || undefined }}>+ <p className="m-0 py-1 text-xs text-muted-foreground" role="status">{t("diagram.preparing")}</p>+ {!height.current && <CodeBlock language="mermaid" code={source} chrome="none" highlight={false} />}+ </div>}+ </div>;+}diff --git a/webui/src/components/markdown-diagrams/context.tsx b/webui/src/components/markdown-diagrams/context.tsxnew file mode 100644index 000000000..436302e48--- /dev/null+++ b/webui/src/components/markdown-diagrams/context.tsx@@ -0,0 +1,14 @@+import { createContext, useContext, useMemo, type ReactNode } from "react";++export const MarkdownCodeContext = createContext({ streaming: false, highlight: true });+const ScopeContext = createContext<object | null>(null);++// Context invalidates resource effects even through memoized Markdown fences.+export function DiagramScope({ identity, children }: { identity: string | null; children: ReactNode }) {+ const scope = useMemo(() => ({ identity }), [identity]);+ return <ScopeContext.Provider value={scope}>{children}</ScopeContext.Provider>;+}++export function useDiagramScope() {+ return useContext(ScopeContext);+}diff --git a/webui/src/components/markdown-diagrams/pele.worker.ts b/webui/src/components/markdown-diagrams/pele.worker.tsnew file mode 100644index 000000000..7b6ba613f--- /dev/null+++ b/webui/src/components/markdown-diagrams/pele.worker.ts@@ -0,0 +1,42 @@+import { detectType, load, render, PeleError } from "pele/lazy";+import { canvasTextMeasurer } from "./render";+import { diagramImageTemplate, DiagramImageError } from "./svg-image";+import {+ MAX_DIMENSION, OUTPUT_LIMIT, SOURCE_LIMIT,+ type DiagramInput, type DiagramReply,+} from "./types";++self.onmessage = async (event: MessageEvent<DiagramInput>) => {+ // One attempt per Worker. The parent owns watchdogs, termination, URLs and revisions.+ self.onmessage = null;+ const reply = (message: DiagramReply) => self.postMessage(message);+ let started = false;+ try {+ const input = event.data;+ if (input.source.length > SOURCE_LIMIT || !Number.isFinite(input.width)+ || input.width <= 0 || input.width > MAX_DIMENSION) throw new DiagramImageError("limit");+ // detectType preprocesses source config synchronously. The parent's loading+ // watchdog is already active here; it also covers all lazy module loading.+ const type = detectType(input.source);+ if (!await load(type)) throw new DiagramImageError("unsupported");+ const measurer = canvasTextMeasurer(input.fonts);+ reply({ kind: "started" });+ started = true;+ const result = render(input.source, {+ measurer, fontFamily: input.fonts.sans, fontFamilyMono: input.fonts.mono,+ fontSize: input.fonts.size, maxWidth: input.width, responsive: false,+ links: false, images: false, limit: SOURCE_LIMIT, outputLimit: OUTPUT_LIMIT,+ maxEdges: 500,+ });+ const template = diagramImageTemplate(result.svg, input.fonts);+ if (template.width !== result.width || template.height !== result.height) throw new DiagramImageError("policy");+ reply({ kind: "image", template });+ } catch (error) {+ if (error instanceof DiagramImageError) reply({ kind: "failed", reason: error.reason });+ else if (error instanceof PeleError) reply({+ kind: "failed", reason: error.code === "limit" ? "limit"+ : error.code === "unsupported-diagram" ? "unsupported" : "syntax",+ });+ else reply({ kind: "failed", reason: started ? "worker" : "load" });+ }+};diff --git a/webui/src/components/markdown-diagrams/render.ts b/webui/src/components/markdown-diagrams/render.tsnew file mode 100644index 000000000..1b7b6c0d4--- /dev/null+++ b/webui/src/components/markdown-diagrams/render.ts@@ -0,0 +1,29 @@+import { DiagramImageError } from "./svg-image";+import type { DiagramInput } from "./types";++// Pele's public TextMeasurer contract; the engine import stays in the Worker entry.+export function canvasTextMeasurer(fonts: DiagramInput["fonts"]): {+ width(text: string, size: number, style: number): number;+} {+ let context: OffscreenCanvasRenderingContext2D | null = null;+ try {+ if (typeof OffscreenCanvas !== "undefined") context = new OffscreenCanvas(1, 1).getContext("2d");+ } catch { /* Capability failure, never Pele's approximate metrics fallback. */ }+ if (!context) throw new DiagramImageError("capability");+ const canvas = context;+ return {+ width(text, size, style) {+ if (!Number.isFinite(size) || size <= 0 || size > 200 || (style & ~7) !== 0) {+ throw new DiagramImageError("unsupported");+ }+ const font = `${style & 2 ? "italic " : ""}${style & 1 ? "bold " : ""}${size}px ${style & 4 ? fonts.mono : fonts.sans}`;+ // Reset first so an invalid canvas font cannot reuse the preceding measurement.+ canvas.font = "1px serif";+ canvas.font = font;+ if (canvas.font === "1px serif") throw new DiagramImageError("capability");+ const width = canvas.measureText(text).width;+ if (!Number.isFinite(width) || width < 0) throw new DiagramImageError("capability");+ return width;+ },+ };+}diff --git a/webui/src/components/markdown-diagrams/runtime.ts b/webui/src/components/markdown-diagrams/runtime.tsnew file mode 100644index 000000000..aa063aca3--- /dev/null+++ b/webui/src/components/markdown-diagrams/runtime.ts@@ -0,0 +1,311 @@+import { MAX_DIMENSION, MAX_PIXELS, OUTPUT_LIMIT, SOURCE_LIMIT } from "./types";+import type { DiagramFailure, DiagramInput, DiagramTemplate } from "./types";++export interface DiagramImage {+ url: string;+ width: number;+ height: number;+ label: string;+}+export type DiagramState = { kind: "waiting" | "rendering" }+ | { kind: "ready"; image: DiagramImage }+ | { kind: "failed"; reason: DiagramFailure };+export type DiagramPalette = Readonly<Record<string, string>>;+export interface DiagramRequest {+ setDemand(demand: "none" | "visible" | "dialog"): void;+ setPalette(palette: DiagramPalette): void;+ retry(): void;+ dispose(): void;+}++const RUNNING_LIMIT = 2;+const QUEUE_LIMIT = 4;+const BYTE_LIMIT = 8 * OUTPUT_LIMIT;+const PIXEL_LIMIT = 32_000_000;+const PALETTE_LIMIT = 4096;+// Reserve one largest replacement inside the totals so retained images can always be recolored.+const ADMISSION_BYTE_LIMIT = BYTE_LIMIT - OUTPUT_LIMIT;+const ADMISSION_PIXEL_LIMIT = PIXEL_LIMIT - MAX_PIXELS;+const tasks = new Set<Task>();+const queue: Task[] = [];+let capacityWakePending = false;+let running = 0;+let retainedBytes = 0;+let retainedPixels = 0;++function pump() {+ queue.length = 0;+ // Prioritize before bounding admission, including a viewer opened behind a full queue.+ for (const demand of ["dialog", "visible"] as const) {+ for (const task of tasks) {+ if (queue.length >= QUEUE_LIMIT) break;+ if (task.eligible && task.demand === demand) queue.push(task);+ }+ }+ while (running < RUNNING_LIMIT && queue.length) {+ const task = queue.shift()!;+ if (task.eligible) task.run();+ }+}++function capacityChanged() {+ if (capacityWakePending) return;+ capacityWakePending = true;+ queueMicrotask(() => {+ capacityWakePending = false;+ for (const task of tasks) task.resumeCapacity();+ pump();+ });+}++function imageTemplate(value: unknown): value is DiagramTemplate {+ if (!value || typeof value !== "object") return false;+ const template = value as Partial<DiagramTemplate>;+ return typeof template.content === "string" && template.content.length <= OUTPUT_LIMIT+ && typeof template.style === "string" && template.style.length <= 4096+ && typeof template.label === "string" && template.label.length <= 4096+ && typeof template.width === "number" && Number.isFinite(template.width)+ && typeof template.height === "number" && Number.isFinite(template.height)+ && template.width > 0 && template.width <= MAX_DIMENSION+ && template.height > 0 && template.height <= MAX_DIMENSION+ && template.width * template.height <= MAX_PIXELS;+}+const failures = new Set<DiagramFailure>(["syntax", "unsupported", "policy", "limit", "load", "deadline", "worker", "image", "capability"]);+const escapeAttribute = (value: string) => value.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<");++function paletteStyle(palette: DiagramPalette): string {+ return Object.entries(palette).map(([key, value]) => {+ if (!/^--pele-(?:bg|fg|muted|line|surface|surface-alt|border|accent|critical|series-[1-8])$/.test(key)+ || !/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\([\d\s%,./+-]+\))$/i.test(value)) {+ throw new Error("Invalid diagram palette");+ }+ return `${key}:${value}`;+ }).join(";");+}++class Task implements DiagramRequest {+ demand: "none" | "visible" | "dialog" = "none";+ private worker: Worker | null = null;+ private timer: ReturnType<typeof setTimeout> | undefined;+ private disposed = false;+ private failed = false;+ private capacityBlocked = false;+ private template: DiagramTemplate | null = null;+ private templateBytes = 0;+ private asset: { image: DiagramImage; release: () => void } | null = null;+ private decoding: (() => void) | null = null;+ private attempt = 0;+ private palette: DiagramPalette = {};++ constructor(private input: DiagramInput, private signal: AbortSignal, private publish: (state: DiagramState) => void) {+ tasks.add(this);+ signal.addEventListener("abort", this.dispose, { once: true });+ }++ get eligible() {+ return !this.disposed && this.demand !== "none" && !this.failed && !this.capacityBlocked+ && !this.worker && !this.template && !this.decoding;+ }++ setDemand(demand: "none" | "visible" | "dialog") {+ if (this.disposed || demand === this.demand) return;+ this.demand = demand;+ if (demand === "none") {+ this.capacityBlocked = false;+ this.cancel();+ this.clearTemplate();+ this.asset?.release();+ this.asset = null;+ if (!this.failed) this.publish({ kind: "waiting" });+ }+ pump();+ }++ setPalette(palette: DiagramPalette) {+ if (this.disposed || JSON.stringify(palette) === JSON.stringify(this.palette)) return;+ this.palette = palette;+ if (this.template && !this.failed) this.decode();+ }++ retry() {+ if (this.disposed || !this.failed) return;+ this.failed = false;+ this.clearTemplate();+ this.publish({ kind: "waiting" });+ pump();+ }++ private stopWorker() {+ clearTimeout(this.timer);+ if (this.worker) {+ this.worker.onmessage = null;+ this.worker.onerror = null;+ this.worker.onmessageerror = null;+ this.worker.terminate();+ this.worker = null;+ running--;+ }+ }++ private cancel() {+ this.attempt++;+ const index = queue.indexOf(this);+ if (index !== -1) queue.splice(index, 1);+ this.stopWorker();+ this.decoding?.();+ this.decoding = null;+ }++ private clearTemplate() {+ if (this.templateBytes) {+ retainedBytes -= this.templateBytes;+ capacityChanged();+ }+ this.templateBytes = 0;+ this.template = null;+ }++ private waitForCapacity() {+ this.capacityBlocked = true;+ if (!this.asset) this.publish({ kind: "waiting" });+ }++ resumeCapacity() {+ if (!this.capacityBlocked || this.disposed) return;+ this.capacityBlocked = false;+ if (this.template && this.demand !== "none" && !this.failed) this.decode();+ }++ private fail(reason: DiagramFailure) {+ this.cancel();+ this.failed = true;+ this.clearTemplate();+ this.asset?.release();+ this.asset = null;+ this.publish({ kind: "failed", reason });+ queueMicrotask(pump);+ }++ run() {+ if (this.input.source.length > SOURCE_LIMIT) { this.fail("limit"); return; }+ if (typeof Worker === "undefined") { this.fail("capability"); return; }+ this.publish({ kind: "rendering" });+ try {+ const worker = new Worker(new URL("./pele.worker.ts", import.meta.url), { type: "module" });+ this.worker = worker;+ running++;+ const attempt = ++this.attempt;+ this.timer = setTimeout(() => this.fail("load"), 10_000);+ worker.onmessage = ({ data }: MessageEvent<unknown>) => {+ if (this.disposed || this.worker !== worker || attempt !== this.attempt) return;+ if (!data || typeof data !== "object" || !("kind" in data)) { this.fail("worker"); return; }+ if (data.kind === "started") {+ clearTimeout(this.timer);+ this.timer = setTimeout(() => this.fail("deadline"), 2000);+ } else if (data.kind === "image" && "template" in data && imageTemplate(data.template)) {+ this.stopWorker();+ const bytes = new Blob([data.template.content, data.template.style]).size;+ if (bytes > OUTPUT_LIMIT) { this.fail("limit"); return; }+ if (retainedBytes + bytes > ADMISSION_BYTE_LIMIT) { this.waitForCapacity(); pump(); return; }+ this.template = data.template;+ this.templateBytes = bytes;+ retainedBytes += bytes;+ this.decode();+ pump();+ } else if (data.kind === "failed" && "reason" in data && failures.has(data.reason as DiagramFailure)) {+ this.fail(data.reason as DiagramFailure);+ } else this.fail("worker");+ };+ worker.onerror = worker.onmessageerror = () => this.fail("worker");+ worker.postMessage(this.input);+ } catch { this.fail("worker"); }+ }++ private decode() {+ const template = this.template;+ if (!template || this.disposed || this.demand === "none") return;+ this.decoding?.();+ const attempt = ++this.attempt;+ let blob: Blob;+ let paletteBytes: number;+ try {+ const palette = paletteStyle(this.palette);+ paletteBytes = new Blob([palette]).size;+ if (paletteBytes > PALETTE_LIMIT) { this.fail("limit"); return; }+ const style = escapeAttribute(`${template.style};${palette}`);+ blob = new Blob([`<svg xmlns="http://www.w3.org/2000/svg" width="${template.width}" height="${template.height}" viewBox="0 0 ${template.width} ${template.height}" fill="var(--_fg)" style="${style}">${template.content}</svg>`], { type: "image/svg+xml" });+ } catch { this.fail("image"); return; }+ const pixels = template.width * template.height;+ // Only the bounded palette can vary for this template. Its envelope stays constant+ // across themes, preserving replacement headroom without charging small SVGs 1 MiB.+ const reservedBytes = Math.min(blob.size - paletteBytes + PALETTE_LIMIT, OUTPUT_LIMIT);+ const byteLimit = this.asset ? BYTE_LIMIT : ADMISSION_BYTE_LIMIT;+ const pixelLimit = this.asset ? PIXEL_LIMIT : ADMISSION_PIXEL_LIMIT;+ if (blob.size > OUTPUT_LIMIT) { this.fail("limit"); return; }+ if (retainedBytes + reservedBytes > byteLimit || retainedPixels + pixels > pixelLimit) {+ this.waitForCapacity(); return;+ }+ this.capacityBlocked = false;+ retainedBytes += reservedBytes;+ retainedPixels += pixels;+ let url: string;+ try { url = URL.createObjectURL(blob); }+ catch {+ retainedBytes -= reservedBytes;+ retainedPixels -= pixels;+ this.fail("image"); return;+ }+ let released = false;+ const release = () => {+ if (released) return;+ released = true;+ URL.revokeObjectURL(url);+ retainedBytes -= reservedBytes;+ retainedPixels -= pixels;+ capacityChanged();+ };+ const image = new Image();+ image.decoding = "async";+ const cleanup = () => {+ clearTimeout(timer);+ image.onload = image.onerror = null;+ };+ const finish = () => {+ if (this.disposed || attempt !== this.attempt || this.demand === "none") { cleanup(); release(); return; }+ cleanup();+ this.decoding = null;+ const previous = this.asset;+ this.asset = { image: { url, width: template.width, height: template.height, label: template.label }, release };+ this.publish({ kind: "ready", image: this.asset.image });+ previous?.release();+ };+ const timer = setTimeout(() => this.fail("image"), 5000);+ this.decoding = () => { cleanup(); image.removeAttribute("src"); release(); };+ image.onerror = () => this.fail("image");+ image.onload = () => {+ if (typeof image.decode === "function") void image.decode().then(finish, () => {+ if (attempt === this.attempt && !this.disposed) this.fail("image");+ });+ else finish();+ };+ image.src = url;+ }++ dispose = () => {+ if (this.disposed) return;+ this.disposed = true;+ this.signal.removeEventListener("abort", this.dispose);+ tasks.delete(this);+ this.cancel();+ this.asset?.release();+ this.asset = null;+ this.clearTemplate();+ pump();+ };+}++export function requestDiagram(input: DiagramInput, signal: AbortSignal, publish: (state: DiagramState) => void): DiagramRequest {+ const task = new Task(input, signal, publish);+ if (signal.aborted) task.dispose();+ return task;+}diff --git a/webui/src/components/markdown-diagrams/svg-image.ts b/webui/src/components/markdown-diagrams/svg-image.tsnew file mode 100644index 000000000..670deede3--- /dev/null+++ b/webui/src/components/markdown-diagrams/svg-image.ts@@ -0,0 +1,342 @@+// Worker-only policy for Pele 1.6 image documents. This is NOT an inline-SVG sanitizer.+import { SaxesParser } from "saxes";+import type * as CssTree from "css-tree";+// css-tree publishes these split entry points, but @types/css-tree declares only the barrel.+// @ts-expect-error No declaration for the public parser entry point.+import parse from "css-tree/parser";+// @ts-expect-error No declaration for the public walker entry point.+import walk from "css-tree/walker";+// @ts-expect-error No declaration for the public generator entry point.+import generate from "css-tree/generator";+import {+ MAX_DIMENSION, MAX_PIXELS, OUTPUT_LIMIT,+ type DiagramFailure, type DiagramInput, type DiagramTemplate,+} from "./types";++const parseCss: typeof CssTree.parse = parse;+const walkCss: typeof CssTree.walk = walk;+const generateCss: typeof CssTree.generate = generate;+const SVG_NS = "http://www.w3.org/2000/svg";+const XML_NS = "http://www.w3.org/XML/1998/namespace";+const XMLNS_NS = "http://www.w3.org/2000/xmlns/";+const ELEMENT_LIMIT = 10_000;+const encoder = new TextEncoder();++export class DiagramImageError extends Error {+ constructor(readonly reason: DiagramFailure) {+ super(`Diagram ${reason}`);+ }+}++function fail(reason: DiagramFailure = "policy"): never {+ throw new DiagramImageError(reason);+}++// Reviewed against the published 1.6.0 string renderer, including nested icon geometry.+// Local marker/clip structures are accepted, but never <use>, links, images or paint servers.+const ELEMENTS = new Set([+ "svg", "g", "path", "rect", "circle", "ellipse", "line", "polyline", "polygon",+ "text", "tspan", "title", "desc", "defs", "marker", "clipPath",+]);+const ATTRIBUTES = new Set([+ "id", "class", "data-id", "data-icon", "role", "aria-hidden", "aria-roledescription",+ "aria-labelledby", "aria-describedby", "style", "viewBox", "preserveAspectRatio",+ "x", "y", "x1", "x2", "y1", "y2", "cx", "cy", "r", "rx", "ry", "width", "height",+ "dx", "dy", "d", "points", "transform", "pathLength", "markerWidth", "markerHeight",+ "refX", "refY", "orient", "markerUnits", "clipPathUnits",+]);+const NUMERIC_ATTRIBUTES = new Set([+ "x", "y", "x1", "x2", "y1", "y2", "cx", "cy", "r", "rx", "ry", "width", "height",+ "dx", "dy", "pathLength", "markerWidth", "markerHeight", "refX", "refY",+]);+const DRAWING_PROPERTIES = new Set([+ "fill", "fill-opacity", "fill-rule", "stroke", "stroke-width", "stroke-opacity",+ "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",+ "stroke-miterlimit", "opacity", "color", "rx", "ry", "text-anchor", "text-decoration",+ "dominant-baseline", "alignment-baseline", "visibility", "display", "vector-effect",+ "marker-start", "marker-mid", "marker-end", "clip-path", "clip-rule",+]);+const TYPOGRAPHY_PROPERTIES = new Set([+ "font", "font-family", "font-size", "font-weight", "font-style", "letter-spacing",+ "word-spacing", "text-transform", "direction",+]);+const ROOT_ALIASES: Readonly<Record<string, string>> = {+ "--_bg": "var(--pele-bg,#fff)", "--_fg": "var(--pele-fg,#1f1f1f)",+ "--_m": "var(--pele-muted,#6e6e6e)", "--_l": "var(--pele-line,#1f1f1f)",+ "--_s": "var(--pele-surface,#f3f3f3)", "--_a": "var(--pele-surface-alt,#e6e6e6)",+ "--_b": "var(--pele-border,#8a8a8a)", "--_c": "var(--pele-accent,#5b7bd5)",+ "--_r": "var(--pele-radius,4px)", "--_tw": "var(--pele-title-weight,bold)",+ "--_hw": "var(--pele-heading-weight,bold)", "--_w": "var(--pele-bold-weight,bold)",+};+const VARIABLES = new Set([+ ...Object.keys(ROOT_ALIASES), "--_fm", "--pele-bg", "--pele-fg", "--pele-muted",+ "--pele-line", "--pele-surface", "--pele-surface-alt", "--pele-border", "--pele-accent",+ "--pele-critical", ...Array.from({ length: 8 }, (_, i) => `--pele-series-${i + 1}`),+]);+const FUNCTIONS = new Set([+ "rgb", "rgba", "hsl", "hsla", "hwb", "lab", "lch", "oklab", "oklch", "color",+ "color-mix", "calc", "min", "max", "clamp",+]);+interface Reference { id: string; target: "marker" | "clipPath" }++function css(source: string, context: "value" | "declarationList"): CssTree.CssNode {+ try {+ return parseCss(source, {+ context, parseCustomProperty: true,+ onParseError: () => fail(),+ });+ } catch (error) {+ if (error instanceof DiagramImageError) throw error;+ return fail();+ }+}++function family(source: string): string {+ const ast = css(source, "value");+ if (ast.type !== "Value" || ast.children.isEmpty) fail("capability");+ for (const node of ast.children) {+ if (node.type === "Identifier" && !/^(?:inherit|initial|unset|revert)$/i.test(node.name)) continue;+ if (node.type === "String" && node.value.length > 0) continue;+ if (node.type === "Operator" && node.value === ",") continue;+ fail("capability");+ }+ return generateCss(ast);+}++function fontSize(node: CssTree.CssNode, allowUnitless: boolean): number {+ if (node.type !== "Value" || node.children.size !== 1) return fail("unsupported");+ const size = node.children.first;+ if (size?.type !== "Dimension" && !(allowUnitless && size?.type === "Number")) return fail("unsupported");+ if (size.type === "Dimension" && size.unit !== "px") return fail("unsupported");+ const value = Number(size.value);+ if (!Number.isFinite(value) || value <= 0 || value > 200) return fail("unsupported");+ return value;+}++function typography(+ property: string, value: CssTree.CssNode, root: boolean,+ fonts: DiagramInput["fonts"], attribute: boolean,+): string {+ const text = generateCss(value);+ switch (property) {+ case "font":+ if (!root || text !== `${fonts.size}px sans-serif`) fail("unsupported");+ break;+ case "font-family":+ if (root) {+ const expected = generateCss(css(`var(--pele-font,${fonts.sans})`, "value"));+ if (text !== expected) fail("unsupported");+ return family(fonts.sans);+ }+ // Pele measures its built-in monospace sections with Style.Mono. Author style+ // font-family is NOT measured, even when it happens to name our mono font.+ if (!attribute || text !== "var(--_fm)") fail("unsupported");+ break;+ case "font-size":+ fontSize(value, attribute);+ break;+ case "font-weight":+ if (!["normal", "400", "bold", "700", "var(--_w)", "var(--_hw)", "var(--_tw)"].includes(text)) fail("unsupported");+ break;+ case "font-style":+ if (text !== "normal" && text !== "italic") fail("unsupported");+ break;+ case "letter-spacing":+ case "word-spacing":+ if (text !== "normal") fail("unsupported");+ break;+ case "text-transform":+ if (text !== "none") fail("unsupported");+ break;+ case "direction":+ if (text !== "ltr") fail("unsupported");+ }+ return text;+}++function drawingValue(property: string, value: CssTree.CssNode, refs: Reference[]): string {+ walkCss(value, (node) => {+ if (node.type === "Raw") fail();+ if (node.type === "Url") {+ const target = property === "clip-path" ? "clipPath"+ : property.startsWith("marker-") ? "marker" : fail();+ if (!/^#[A-Za-z0-9_.:-]+$/.test(node.value)) fail();+ refs.push({ id: node.value.slice(1), target });+ }+ if (node.type === "Function") {+ if (node.name === "var") {+ const name = node.children.first;+ if (name?.type !== "Identifier" || !VARIABLES.has(name.name)) fail();+ } else if (!FUNCTIONS.has(node.name.toLowerCase())) fail();+ }+ if ((node.type === "Number" || node.type === "Dimension" || node.type === "Percentage")+ && !Number.isFinite(Number(node.value))) fail("limit");+ });+ return generateCss(value);+}++function style(+ source: string, root: boolean, fonts: DiagramInput["fonts"], refs: Reference[],+): string {+ const ast = css(source, "declarationList");+ if (ast.type !== "DeclarationList") return fail();+ const declarations: string[] = [];+ const properties = new Set<string>();+ for (const declaration of ast.children) {+ if (declaration.type !== "Declaration" || declaration.important) fail();+ const { property, value } = declaration;+ if (root && properties.has(property)) fail();+ properties.add(property);+ let accepted: string;+ if (property === "--_fm") {+ if (!root || generateCss(value) !== generateCss(css(`var(--pele-font-mono,${fonts.mono})`, "value"))) fail("unsupported");+ accepted = family(fonts.mono);+ } else if (Object.hasOwn(ROOT_ALIASES, property)) {+ if (!root || generateCss(value) !== ROOT_ALIASES[property]) fail();+ // Font weights and radius are layout constants, never theme-controlled values.+ accepted = property === "--_r" ? "4px"+ : ["--_tw", "--_hw", "--_w"].includes(property) ? "bold" : generateCss(value);+ } else if (TYPOGRAPHY_PROPERTIES.has(property)) {+ accepted = typography(property, value, root, fonts, false);+ } else if (DRAWING_PROPERTIES.has(property)) {+ accepted = drawingValue(property, value, refs);+ } else if (root && ((property === "max-width" && generateCss(value) === "100%")+ || (property === "height" && generateCss(value) === "auto"))) {+ accepted = generateCss(value);+ } else fail();+ declarations.push(`${property}:${accepted}`);+ }+ if (root) {+ for (const required of [+ "--_bg", "--_fg", "--_m", "--_l", "--_s", "--_a", "--_b", "--_c", "--_fm",+ "font", "font-family", "letter-spacing", "word-spacing", "text-transform", "direction",+ ]) if (!properties.has(required)) fail();+ }+ return declarations.join(";");+}++const NUMBER = /[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?/g;+function numbers(value: string, letters = ""): number[] {+ if (new RegExp(`[^\\s,\\d.eE+\\-${letters}]`).test(value)) fail();+ const values = Array.from(value.matchAll(NUMBER), (match) => Number(match[0]));+ if (values.length === 0 || values.some((value) => !Number.isFinite(value))) fail("limit");+ return values;+}+function dimension(value: string | undefined): number {+ if (!value || !/^(?:\d+(?:\.\d*)?|\.\d+)$/.test(value)) return fail("limit");+ const number = Number(value);+ if (!Number.isFinite(number) || number <= 0 || number > MAX_DIMENSION) return fail("limit");+ return number;+}+function geometry(name: string, value: string): void {+ if (NUMERIC_ATTRIBUTES.has(name)) {+ const values = numbers(value);+ if (values.length !== 1) fail();+ if (["r", "rx", "ry", "width", "height", "markerWidth", "markerHeight", "pathLength"].includes(name)+ && values[0] < 0) fail("limit");+ } else if (name === "d") numbers(value, "MmLlHhVvCcSsQqTtAaZz");+ else if (name === "points" || name === "viewBox") numbers(value);+ else if (name === "transform") {+ const rest = value.replace(/(?:matrix|translate|scale|rotate|skewX|skewY)\(([^()]*)\)/g, (_, args: string) => {+ numbers(args);+ return "";+ });+ if (rest.trim() !== "") fail();+ } else if (name === "orient" && value !== "auto" && value !== "auto-start-reverse") numbers(value);+}++function escapeXml(value: string): string {+ return value.replace(/[&<>"\r\n\t]/g, (character) => ({+ "&": "&", "<": "<", ">": ">", '"': """,+ "\r": " ", "\n": " ", "\t": "	",+ })[character]!);+}++export function diagramImageTemplate(svg: string, fonts: DiagramInput["fonts"]): DiagramTemplate {+ if (svg.length > OUTPUT_LIMIT || encoder.encode(svg).byteLength > OUTPUT_LIMIT) fail("limit");+ family(fonts.sans);+ family(fonts.mono);+ if (!Number.isFinite(fonts.size) || fonts.size <= 0 || fonts.size > 200) fail("capability");+ const parser = new SaxesParser({ xmlns: true });+ const content: string[] = [];+ const stack: string[] = [];+ const ids = new Map<string, string>();+ const refs: Reference[] = [];+ let elements = 0;+ let width = 0;+ let height = 0;+ let rootStyle = "";+ let title = "";+ let description = "";+ parser.on("error", () => fail());+ parser.on("doctype", () => fail());+ parser.on("processinginstruction", () => fail());+ parser.on("xmldecl", () => fail());+ parser.on("opentag", (tag) => {+ if (++elements > ELEMENT_LIMIT) fail("limit");+ if (tag.uri !== SVG_NS || tag.prefix !== "" || !ELEMENTS.has(tag.local)) fail();+ const root = stack.length === 0;+ if (root && (elements !== 1 || tag.local !== "svg")) fail();+ if (stack.at(-1) === "title" || stack.at(-1) === "desc") fail();+ const attributes: string[] = [];+ const rootDrawing: string[] = [];+ for (const attribute of Object.values(tag.attributes)) {+ const { name, value, uri } = attribute;+ if (uri === XMLNS_NS) {+ if (name !== "xmlns" || value !== SVG_NS) fail();+ continue;+ }+ if (uri !== "" && !(uri === XML_NS && name === "xml:space")) fail();+ let accepted = value;+ if (name === "xml:space") {+ if (value !== "preserve" && value !== "default") fail();+ } else if (name === "style") accepted = style(value, root, fonts, refs);+ else if (DRAWING_PROPERTIES.has(name)) accepted = drawingValue(name, css(value, "value"), refs);+ else if (TYPOGRAPHY_PROPERTIES.has(name)) accepted = typography(name, css(value, "value"), root, fonts, true);+ else if (!ATTRIBUTES.has(name)) fail();+ else geometry(name, value);+ if (name === "id") {+ if (!/^[A-Za-z0-9_.:-]+$/.test(value) || ids.has(value)) fail();+ ids.set(value, tag.local);+ }+ if (!root) attributes.push(` ${name}="${escapeXml(accepted)}"`);+ else if (name === "style") rootStyle = accepted;+ else if (DRAWING_PROPERTIES.has(name)) rootDrawing.push(`${name}:${accepted}`);+ }+ if (root) {+ if (!rootStyle) fail();+ rootStyle += rootDrawing.length ? `;${rootDrawing.join(";")}` : "";+ width = dimension(tag.attributes.width?.value);+ height = dimension(tag.attributes.height?.value);+ if (width * height > MAX_PIXELS) fail("limit");+ const viewBox = numbers(tag.attributes.viewBox?.value ?? "");+ if (viewBox.length !== 4 || viewBox[0] !== 0 || viewBox[1] !== 0+ || viewBox[2] !== width || viewBox[3] !== height) fail("limit");+ if (!rootStyle) fail();+ } else content.push(`<${tag.local}${attributes.join("")}>`);+ stack.push(tag.local);+ });+ const text = (value: string) => {+ const element = stack.at(-1);+ if (element === "title") title += value.slice(0, Math.max(0, 1000 - title.length));+ if (element === "desc") description += value.slice(0, Math.max(0, 1000 - description.length));+ if (stack.length > 1) {+ if (value.trim() && !["title", "desc", "text", "tspan"].includes(element ?? "")) fail();+ content.push(escapeXml(value));+ } else if (value.trim()) fail();+ };+ parser.on("text", text);+ parser.on("cdata", text);+ parser.on("closetag", (tag) => {+ if (stack.length > 1) content.push(`</${tag.local}>`);+ stack.pop();+ });+ parser.write(svg).close();+ for (const ref of refs) if (ids.get(ref.id) !== ref.target) fail();+ const body = content.join("");+ if (encoder.encode(body + rootStyle).byteLength > OUTPUT_LIMIT) fail("limit");+ return {+ content: body, style: rootStyle, width, height,+ label: [title, description].filter(Boolean).join(". ").replace(/\s+/g, " ").trim().slice(0, 1000),+ };+}diff --git a/webui/src/components/markdown-diagrams/types.ts b/webui/src/components/markdown-diagrams/types.tsnew file mode 100644index 000000000..7ed1b73d4--- /dev/null+++ b/webui/src/components/markdown-diagrams/types.ts@@ -0,0 +1,27 @@+// Private feature contracts. Only the Worker imports Pele and the XML/CSS parsers.+export interface DiagramInput {+ source: string;+ width: number;+ fonts: { sans: string; mono: string; size: number };+}++export type DiagramFailure = "syntax" | "unsupported" | "policy" | "limit"+ | "load" | "deadline" | "worker" | "image" | "capability";++// Image-context only; never insert this content into the page DOM.+export interface DiagramTemplate {+ content: string;+ style: string;+ width: number;+ height: number;+ label: string;+}++export type DiagramReply = { kind: "started" }+ | { kind: "image"; template: DiagramTemplate }+ | { kind: "failed"; reason: DiagramFailure };++export const SOURCE_LIMIT = 50_000;+export const OUTPUT_LIMIT = 1_048_576;+export const MAX_DIMENSION = 8192;+export const MAX_PIXELS = 8_000_000;diff --git a/webui/src/components/thread/ThreadViewport.tsx b/webui/src/components/thread/ThreadViewport.tsxindex 88033d687..80c9dbaf7 100644--- a/webui/src/components/thread/ThreadViewport.tsx+++ b/webui/src/components/thread/ThreadViewport.tsx@@ -14,6 +14,7 @@ import { useTranslation } from "react-i18next";import { PromptRail } from "@/components/thread/PromptRail";import { SubagentThreadMessages, useHasSubagentContent } from "@/components/thread/SubagentTasks";+import { DiagramScope } from "@/components/markdown-diagrams/context";import { ThreadHistoryStatus } from "@/components/thread/ThreadHistoryStatus";import { isAgentActivityMember } from "@/components/thread/AgentActivityCluster";import { ThreadCameraController } from "@/components/thread/thread-camera";@@ -1028,6 +1029,7 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro)}><div ref={messageContentRef} className="w-full">+ <DiagramScope identity={conversationKey}><SubagentThreadMessagesmessages={visibleMessages}temporary={temporary}@@ -1047,6 +1049,7 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportProonQuoteSelection={onQuoteSelection}onActivityToggle={yieldCameraToUser}/>+ </DiagramScope></div><div aria-hidden className="thread-message-end-gap shrink-0" /><div ref={bottomRef} aria-hidden className="h-px shrink-0" />diff --git a/webui/src/components/ui/image-viewport.tsx b/webui/src/components/ui/image-viewport.tsxnew file mode 100644index 000000000..c311a6822--- /dev/null+++ b/webui/src/components/ui/image-viewport.tsx@@ -0,0 +1,155 @@+import { useCallback, useEffect, useRef, useState, type PointerEvent } from "react";+import { Minus, Plus } from "lucide-react";+import { useTranslation } from "react-i18next";++import { cn } from "@/lib/utils";++type Point = { x: number; y: number };+type View = Point & { scale: number };+const FIT: View = { x: 0, y: 0, scale: 1 };+const MAX_SCALE = 8;+const PAN_STEP = 40;+const clamp = (value: number, min: number, max: number) => Math.min(max, Math.max(min, value));+const midpoint = (a: Point, b: Point): Point => ({ x: (a.x + b.x) / 2, y: (a.y + b.y) / 2 });+const distance = (a: Point, b: Point) => Math.hypot(a.x - b.x, a.y - b.y);++export interface ImageViewportProps {+ src: string;+ alt: string;+ /** Styles for the bounded viewport; controls are a separate sibling. */+ className?: string;+ imageClassName?: string;+ controlsClassName?: string;+ testId?: string;+ /** Disable when a surrounding gallery owns the arrow keys. */+ panWithArrows?: boolean;+}++/** Image-local gestures and controls. Provide viewport dimensions and remount per image. */+export function ImageViewport({+ src,+ alt,+ className,+ imageClassName,+ controlsClassName,+ testId = "image-viewport",+ panWithArrows = true,+}: ImageViewportProps) {+ const { t } = useTranslation();+ const viewport = useRef<HTMLDivElement>(null);+ const image = useRef<HTMLImageElement>(null);+ const pointers = useRef(new Map<number, Point>());+ const viewRef = useRef(FIT);+ const [view, setView] = useState(FIT);+ const [dragging, setDragging] = useState(false);++ const apply = useCallback((next: View) => {+ const scale = clamp(next.scale, 1, MAX_SCALE);+ const maxX = Math.max(0, ((image.current?.offsetWidth ?? 0) * scale - (viewport.current?.clientWidth ?? 0)) / 2);+ const maxY = Math.max(0, ((image.current?.offsetHeight ?? 0) * scale - (viewport.current?.clientHeight ?? 0)) / 2);+ const bounded = { scale, x: clamp(next.x, -maxX, maxX), y: clamp(next.y, -maxY, maxY) };+ viewRef.current = bounded;+ setView(bounded);+ }, []);++ const zoom = useCallback((scale: number, from?: Point, to = from) => {+ const rect = viewport.current?.getBoundingClientRect();+ const current = viewRef.current;+ const next = clamp(scale, 1, MAX_SCALE);+ const center = rect ? { x: rect.left + rect.width / 2, y: rect.top + rect.height / 2 } : { x: 0, y: 0 };+ const origin = from ?? center;+ const target = to ?? origin;+ apply({+ scale: next,+ x: target.x - center.x - (origin.x - center.x - current.x) * next / current.scale,+ y: target.y - center.y - (origin.y - center.y - current.y) * next / current.scale,+ });+ }, [apply]);++ useEffect(() => {+ const element = viewport.current;+ if (!element) return;+ const activePointers = pointers.current;+ // React's wheel listener is passive; cancel browser zoom only over this viewport.+ const onWheel = (event: WheelEvent) => {+ if (event.ctrlKey) {+ event.preventDefault();+ zoom(viewRef.current.scale * Math.exp(-clamp(event.deltaY, -50, 50) * 0.01), { x: event.clientX, y: event.clientY });+ } else if (viewRef.current.scale > 1) {+ event.preventDefault();+ const unit = event.deltaMode === 1 ? 16 : event.deltaMode === 2 ? element.clientHeight : 1;+ apply({ ...viewRef.current, x: viewRef.current.x - event.deltaX * unit, y: viewRef.current.y - event.deltaY * unit });+ }+ };+ element.addEventListener("wheel", onWheel, { passive: false });+ const resize = new ResizeObserver(() => apply(viewRef.current));+ resize.observe(element);+ return () => {+ element.removeEventListener("wheel", onWheel);+ resize.disconnect();+ for (const pointerId of activePointers.keys()) {+ if (element.hasPointerCapture(pointerId)) element.releasePointerCapture(pointerId);+ }+ activePointers.clear();+ };+ }, [apply, zoom]);++ const onPointerDown = (event: PointerEvent<HTMLDivElement>) => {+ if (event.button !== 0 || pointers.current.size >= 2) return;+ pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY });+ event.currentTarget.setPointerCapture(event.pointerId);+ setDragging(true);+ };+ const onPointerMove = (event: PointerEvent<HTMLDivElement>) => {+ if (!pointers.current.has(event.pointerId)) return;+ const before = [...pointers.current.values()];+ pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY });+ const after = [...pointers.current.values()];+ if (before.length === 2) {+ const previousDistance = distance(before[0], before[1]);+ if (previousDistance > 0) zoom(viewRef.current.scale * distance(after[0], after[1]) / previousDistance,+ midpoint(before[0], before[1]), midpoint(after[0], after[1]));+ } else if (viewRef.current.scale > 1) {+ apply({ ...viewRef.current, x: viewRef.current.x + after[0].x - before[0].x, y: viewRef.current.y + after[0].y - before[0].y });+ }+ };+ const endPointer = (event: PointerEvent<HTMLDivElement>) => {+ pointers.current.delete(event.pointerId);+ if (event.currentTarget.hasPointerCapture(event.pointerId)) event.currentTarget.releasePointerCapture(event.pointerId);+ setDragging(pointers.current.size > 0);+ };+ const buttonClass = "grid size-9 shrink-0 place-items-center rounded-full transition-colors hover:text-foreground disabled:opacity-30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";++ return <>+ <div ref={viewport} data-testid={testId} tabIndex={0} role="group" aria-label={t("lightbox.gestures")}+ className={cn("flex min-h-0 min-w-0 touch-none select-none items-center justify-center overflow-hidden focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", view.scale > 1 ? dragging ? "cursor-grabbing" : "cursor-grab" : "cursor-zoom-in", className)}+ onPointerDown={onPointerDown} onPointerMove={onPointerMove} onPointerUp={endPointer} onPointerCancel={endPointer} onLostPointerCapture={endPointer}+ onDoubleClick={(event) => zoom(viewRef.current.scale > 1 ? 1 : 2, { x: event.clientX, y: event.clientY })}+ onKeyDown={(event) => {+ if (event.ctrlKey || event.metaKey || event.altKey) return;+ const current = viewRef.current;+ if (event.key === "+" || event.key === "=") zoom(current.scale * 1.5);+ else if (event.key === "-") zoom(current.scale / 1.5);+ else if (event.key === "0") apply(FIT);+ else if (panWithArrows && event.key === "ArrowLeft") apply({ ...current, x: current.x + PAN_STEP });+ else if (panWithArrows && event.key === "ArrowRight") apply({ ...current, x: current.x - PAN_STEP });+ else if (panWithArrows && event.key === "ArrowUp") apply({ ...current, y: current.y + PAN_STEP });+ else if (panWithArrows && event.key === "ArrowDown") apply({ ...current, y: current.y - PAN_STEP });+ else return;+ event.preventDefault();+ event.stopPropagation();+ }}>+ <img ref={image} src={src} alt={alt} decoding="async" draggable={false} onLoad={() => apply(viewRef.current)}+ className={cn("max-h-full max-w-full select-none object-contain will-change-transform", imageClassName)}+ style={{ transform: `translate3d(${view.x}px, ${view.y}px, 0) scale(${view.scale})` }} />+ </div>+ <div className={cn("flex items-center justify-center gap-1 rounded-full p-1 text-muted-foreground", controlsClassName)}>+ <button type="button" aria-label={t("lightbox.zoomOut")} title={t("lightbox.zoomOut")} disabled={view.scale <= 1} className={buttonClass} onClick={() => zoom(viewRef.current.scale / 1.5)}><Minus className="size-4" aria-hidden /></button>+ <button type="button" aria-label={t("lightbox.resetZoom")} title={t("lightbox.resetZoom")}+ className="h-9 min-w-14 rounded-full px-2 text-xs font-medium tabular-nums focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" onClick={() => apply(FIT)}>+ {Math.round(view.scale * 100)}%+ </button>+ <button type="button" aria-label={t("lightbox.zoomIn")} title={t("lightbox.zoomIn")} disabled={view.scale >= MAX_SCALE} className={buttonClass} onClick={() => zoom(viewRef.current.scale * 1.5)}><Plus className="size-4" aria-hidden /></button>+ </div>+ </>;+}diff --git a/webui/src/dev/gallery/foundations.tsx b/webui/src/dev/gallery/foundations.tsxindex b7fef3414..5db9963af 100644--- a/webui/src/dev/gallery/foundations.tsx+++ b/webui/src/dev/gallery/foundations.tsx@@ -18,6 +18,7 @@ import { HoverHint, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Trimport { Disclosure } from "@/components/ui/disclosure";import { ExpandableText } from "@/components/ui/expandable-text";import { StreamingLabelSheen } from "@/components/ui/streaming-label-sheen";+import { ImageViewport } from "@/components/ui/image-viewport";import { Sample, type ComponentExample } from "./example";function Buttons() {@@ -223,6 +224,12 @@ function StreamingLabels() {</div>;}+function ImageViewports() {+ return <div className="flex h-80 max-w-xl flex-col rounded-lg border p-3">+ <ImageViewport src="/brand/nanobot_icon_512.png" alt="Nanobot" className="flex-1" />+ </div>;+}+const base = "webui/src/components/ui/";export const foundationExamples: ComponentExample[] = [{ title: "Button · 按钮", files: ["button"], Preview: Buttons,@@ -274,6 +281,9 @@ export const foundationExamples: ComponentExample[] = [{ title: "ExpandableText · 文本展开", files: ["expandable-text"], Preview: Expandable,description: "A line-limited preview of the same mounted text.", options: "The caller owns expanded. lines sets the collapsed line count; provide an accessible toggle.",code: '<ExpandableText expanded={expanded} lines={2} className="text-sm leading-6">{description}</ExpandableText>' },+ { title: "ImageViewport · 图像视口", files: ["image-viewport"], Preview: ImageViewports,+ description: "Image-local fit, zoom, pan and pinch controls.", options: "Supply a bounded className and remount for a different image identity. Set panWithArrows=false when a gallery owns arrow navigation.",+ code: '<div className="flex h-80 flex-col"><ImageViewport src={url} alt={label} className="flex-1" /></div>' },{ title: "StreamingLabelSheen · 流光文字", files: ["streaming-label-sheen"], Preview: StreamingLabels,description: "A shared text animation for active thinking and tool labels.", options: "active controls animation. String or number children supply the glyph overlay; reduced-motion settings are respected.",code: '<StreamingLabelSheen active={running}>Working…</StreamingLabelSheen>' },diff --git a/webui/src/i18n/locales/en/common.json b/webui/src/i18n/locales/en/common.jsonindex 7100394f3..a1f37f674 100644--- a/webui/src/i18n/locales/en/common.json+++ b/webui/src/i18n/locales/en/common.json@@ -2410,6 +2410,25 @@"dismiss": "Dismiss","continue": "Continue"},+ "diagram": {+ "graph": "Diagram",+ "source": "Source",+ "copy": "Copy source",+ "enlarge": "Enlarge diagram",+ "title": "Mermaid diagram",+ "preparing": "Preparing diagram…",+ "errors": {+ "syntax": "Check the diagram syntax in the source.",+ "unsupported": "This diagram type is not supported. View the source.",+ "policy": "This diagram uses unsupported styling or resources. View the source.",+ "limit": "This diagram exceeds the rendering limit. View the source.",+ "load": "Couldn't load the diagram renderer. Try again.",+ "deadline": "The diagram took too long to render. Simplify the source or try again.",+ "worker": "Couldn't render the diagram. Try again.",+ "image": "Couldn't display the diagram. Try again.",+ "capability": "Diagram rendering is unavailable in this browser. View the source."+ }+ },"lightbox": {"viewAll": "View all {{count}} images","zoomIn": "Zoom in",diff --git a/webui/src/i18n/locales/es/common.json b/webui/src/i18n/locales/es/common.jsonindex 8aefbcc58..58e41b487 100644--- a/webui/src/i18n/locales/es/common.json+++ b/webui/src/i18n/locales/es/common.json@@ -2211,6 +2211,25 @@"dismiss": "Descartar","continue": "Continuar"},+ "diagram": {+ "graph": "Diagrama",+ "source": "Código fuente",+ "copy": "Copiar código fuente",+ "enlarge": "Ampliar diagrama",+ "title": "Diagrama Mermaid",+ "preparing": "Preparando diagrama…",+ "errors": {+ "syntax": "Comprueba la sintaxis del diagrama en el código fuente.",+ "unsupported": "Este tipo de diagrama no es compatible. Consulta el código fuente.",+ "policy": "El diagrama usa estilos o recursos no compatibles. Consulta el código fuente.",+ "limit": "El diagrama supera el límite de renderizado. Consulta el código fuente.",+ "load": "No se pudo cargar el motor de diagramas. Inténtalo de nuevo.",+ "deadline": "El renderizado tardó demasiado. Simplifica el código fuente o inténtalo de nuevo.",+ "worker": "No se pudo generar el diagrama. Inténtalo de nuevo.",+ "image": "No se pudo mostrar el diagrama. Inténtalo de nuevo.",+ "capability": "Este navegador no puede generar diagramas. Consulta el código fuente."+ }+ },"lightbox": {"viewAll": "Ver las {{count}} imágenes","zoomIn": "Acercar",diff --git a/webui/src/i18n/locales/fr/common.json b/webui/src/i18n/locales/fr/common.jsonindex 69ad97831..46171cb06 100644--- a/webui/src/i18n/locales/fr/common.json+++ b/webui/src/i18n/locales/fr/common.json@@ -2210,6 +2210,25 @@"dismiss": "Ignorer","continue": "Continuer"},+ "diagram": {+ "graph": "Diagramme",+ "source": "Source",+ "copy": "Copier la source",+ "enlarge": "Agrandir le diagramme",+ "title": "Diagramme Mermaid",+ "preparing": "Préparation du diagramme…",+ "errors": {+ "syntax": "Vérifiez la syntaxe du diagramme dans la source.",+ "unsupported": "Ce type de diagramme n'est pas pris en charge. Consultez la source.",+ "policy": "Ce diagramme utilise des styles ou ressources non pris en charge. Consultez la source.",+ "limit": "Ce diagramme dépasse la limite de rendu. Consultez la source.",+ "load": "Impossible de charger le moteur de diagrammes. Réessayez.",+ "deadline": "Le rendu a pris trop de temps. Simplifiez la source ou réessayez.",+ "worker": "Impossible de générer le diagramme. Réessayez.",+ "image": "Impossible d'afficher le diagramme. Réessayez.",+ "capability": "Ce navigateur ne peut pas générer le diagramme. Consultez la source."+ }+ },"lightbox": {"viewAll": "Voir les {{count}} images","zoomIn": "Agrandir",diff --git a/webui/src/i18n/locales/id/common.json b/webui/src/i18n/locales/id/common.jsonindex d1a7d6caf..35d73d733 100644--- a/webui/src/i18n/locales/id/common.json+++ b/webui/src/i18n/locales/id/common.json@@ -2210,6 +2210,25 @@"dismiss": "Abaikan","continue": "Lanjutkan"},+ "diagram": {+ "graph": "Diagram",+ "source": "Sumber",+ "copy": "Salin sumber",+ "enlarge": "Perbesar diagram",+ "title": "Diagram Mermaid",+ "preparing": "Menyiapkan diagram…",+ "errors": {+ "syntax": "Periksa sintaks diagram pada sumber.",+ "unsupported": "Jenis diagram ini belum didukung. Lihat sumber.",+ "policy": "Diagram memakai gaya atau sumber daya yang tidak didukung. Lihat sumber.",+ "limit": "Diagram melampaui batas perenderan. Lihat sumber.",+ "load": "Tidak dapat memuat perender diagram. Coba lagi.",+ "deadline": "Perenderan diagram terlalu lama. Sederhanakan sumber atau coba lagi.",+ "worker": "Tidak dapat merender diagram. Coba lagi.",+ "image": "Tidak dapat menampilkan diagram. Coba lagi.",+ "capability": "Browser ini tidak dapat merender diagram. Lihat sumber."+ }+ },"lightbox": {"viewAll": "Lihat semua {{count}} gambar","zoomIn": "Perbesar",diff --git a/webui/src/i18n/locales/ja/common.json b/webui/src/i18n/locales/ja/common.jsonindex 260dbb155..570c82ccc 100644--- a/webui/src/i18n/locales/ja/common.json+++ b/webui/src/i18n/locales/ja/common.json@@ -2210,6 +2210,25 @@"dismiss": "閉じる","continue": "続行"},+ "diagram": {+ "graph": "図",+ "source": "ソース",+ "copy": "ソースをコピー",+ "enlarge": "図を拡大",+ "title": "Mermaid 図",+ "preparing": "図を準備中…",+ "errors": {+ "syntax": "ソースの図の構文を確認してください。",+ "unsupported": "この図の種類には対応していません。ソースを確認してください。",+ "policy": "未対応のスタイルやリソースが含まれています。ソースを確認してください。",+ "limit": "図が描画の上限を超えています。ソースを確認してください。",+ "load": "図の描画機能を読み込めませんでした。再試行してください。",+ "deadline": "図の描画がタイムアウトしました。ソースを簡略化するか再試行してください。",+ "worker": "図を描画できませんでした。再試行してください。",+ "image": "図を表示できませんでした。再試行してください。",+ "capability": "このブラウザーでは図を描画できません。ソースを確認してください。"+ }+ },"lightbox": {"viewAll": "すべての画像({{count}} 枚)を表示","zoomIn": "拡大",diff --git a/webui/src/i18n/locales/ko/common.json b/webui/src/i18n/locales/ko/common.jsonindex e368fecb4..3f0bd5a37 100644--- a/webui/src/i18n/locales/ko/common.json+++ b/webui/src/i18n/locales/ko/common.json@@ -2210,6 +2210,25 @@"dismiss": "닫기","continue": "계속"},+ "diagram": {+ "graph": "다이어그램",+ "source": "소스",+ "copy": "소스 복사",+ "enlarge": "다이어그램 확대",+ "title": "Mermaid 다이어그램",+ "preparing": "다이어그램 준비 중…",+ "errors": {+ "syntax": "소스의 다이어그램 문법을 확인하세요.",+ "unsupported": "지원하지 않는 다이어그램 유형입니다. 소스를 확인하세요.",+ "policy": "지원하지 않는 스타일이나 리소스가 있습니다. 소스를 확인하세요.",+ "limit": "다이어그램이 렌더링 제한을 초과했습니다. 소스를 확인하세요.",+ "load": "다이어그램 렌더러를 불러오지 못했습니다. 다시 시도하세요.",+ "deadline": "다이어그램 렌더링 시간이 초과되었습니다. 소스를 단순화하거나 다시 시도하세요.",+ "worker": "다이어그램을 렌더링하지 못했습니다. 다시 시도하세요.",+ "image": "다이어그램을 표시하지 못했습니다. 다시 시도하세요.",+ "capability": "이 브라우저에서는 다이어그램을 렌더링할 수 없습니다. 소스를 확인하세요."+ }+ },"lightbox": {"viewAll": "이미지 {{count}}개 모두 보기","zoomIn": "확대",diff --git a/webui/src/i18n/locales/pt-BR/common.json b/webui/src/i18n/locales/pt-BR/common.jsonindex 58875906e..6ecf810ba 100644--- a/webui/src/i18n/locales/pt-BR/common.json+++ b/webui/src/i18n/locales/pt-BR/common.json@@ -2224,6 +2224,25 @@"dismiss": "Descartar","continue": "Continuar"},+ "diagram": {+ "graph": "Diagrama",+ "source": "Código-fonte",+ "copy": "Copiar código-fonte",+ "enlarge": "Ampliar diagrama",+ "title": "Diagrama Mermaid",+ "preparing": "Preparando diagrama…",+ "errors": {+ "syntax": "Confira a sintaxe do diagrama no código-fonte.",+ "unsupported": "Este tipo de diagrama não é compatível. Consulte o código-fonte.",+ "policy": "O diagrama usa estilos ou recursos incompatíveis. Consulte o código-fonte.",+ "limit": "O diagrama excede o limite de renderização. Consulte o código-fonte.",+ "load": "Não foi possível carregar o renderizador. Tente novamente.",+ "deadline": "A renderização demorou demais. Simplifique o código-fonte ou tente novamente.",+ "worker": "Não foi possível gerar o diagrama. Tente novamente.",+ "image": "Não foi possível exibir o diagrama. Tente novamente.",+ "capability": "Este navegador não pode gerar diagramas. Consulte o código-fonte."+ }+ },"lightbox": {"viewAll": "Ver todas as {{count}} imagens","zoomIn": "Ampliar",diff --git a/webui/src/i18n/locales/vi/common.json b/webui/src/i18n/locales/vi/common.jsonindex 2cb0c1f6b..0814e4b5d 100644--- a/webui/src/i18n/locales/vi/common.json+++ b/webui/src/i18n/locales/vi/common.json@@ -2210,6 +2210,25 @@"dismiss": "Bỏ qua","continue": "Tiếp tục"},+ "diagram": {+ "graph": "Sơ đồ",+ "source": "Mã nguồn",+ "copy": "Sao chép mã nguồn",+ "enlarge": "Phóng to sơ đồ",+ "title": "Sơ đồ Mermaid",+ "preparing": "Đang chuẩn bị sơ đồ…",+ "errors": {+ "syntax": "Hãy kiểm tra cú pháp sơ đồ trong mã nguồn.",+ "unsupported": "Chưa hỗ trợ loại sơ đồ này. Hãy xem mã nguồn.",+ "policy": "Sơ đồ dùng kiểu hoặc tài nguyên không được hỗ trợ. Hãy xem mã nguồn.",+ "limit": "Sơ đồ vượt quá giới hạn kết xuất. Hãy xem mã nguồn.",+ "load": "Không thể tải bộ kết xuất sơ đồ. Hãy thử lại.",+ "deadline": "Kết xuất sơ đồ quá thời gian. Hãy đơn giản hóa mã nguồn hoặc thử lại.",+ "worker": "Không thể kết xuất sơ đồ. Hãy thử lại.",+ "image": "Không thể hiển thị sơ đồ. Hãy thử lại.",+ "capability": "Trình duyệt này không thể kết xuất sơ đồ. Hãy xem mã nguồn."+ }+ },"lightbox": {"viewAll": "Xem tất cả {{count}} ảnh","zoomIn": "Phóng to",diff --git a/webui/src/i18n/locales/zh-CN/common.json b/webui/src/i18n/locales/zh-CN/common.jsonindex 32c13e121..d24c6b4f4 100644--- a/webui/src/i18n/locales/zh-CN/common.json+++ b/webui/src/i18n/locales/zh-CN/common.json@@ -2410,6 +2410,25 @@"dismiss": "忽略","continue": "继续"},+ "diagram": {+ "graph": "图形",+ "source": "源码",+ "copy": "复制源码",+ "enlarge": "放大查看",+ "title": "Mermaid 图表",+ "preparing": "正在准备图表…",+ "errors": {+ "syntax": "图表语法有误,请检查源码。",+ "unsupported": "暂不支持此类图表,可查看源码。",+ "policy": "图表含不支持的样式或资源,可查看源码。",+ "limit": "图表超出渲染限制,可查看源码。",+ "load": "图表渲染器加载失败,请重试。",+ "deadline": "图表渲染超时,请简化源码或重试。",+ "worker": "图表渲染失败,请重试。",+ "image": "图表显示失败,请重试。",+ "capability": "此浏览器无法渲染图表,可查看源码。"+ }+ },"lightbox": {"viewAll": "查看全部 {{count}} 张图片","zoomIn": "放大",diff --git a/webui/src/i18n/locales/zh-TW/common.json b/webui/src/i18n/locales/zh-TW/common.jsonindex d8f571c80..6e534b9d6 100644--- a/webui/src/i18n/locales/zh-TW/common.json+++ b/webui/src/i18n/locales/zh-TW/common.json@@ -2210,6 +2210,25 @@"dismiss": "略過","continue": "繼續"},+ "diagram": {+ "graph": "圖形",+ "source": "原始碼",+ "copy": "複製原始碼",+ "enlarge": "放大檢視",+ "title": "Mermaid 圖表",+ "preparing": "正在準備圖表…",+ "errors": {+ "syntax": "圖表語法有誤,請檢查原始碼。",+ "unsupported": "尚不支援此類圖表,可檢視原始碼。",+ "policy": "圖表含不支援的樣式或資源,可檢視原始碼。",+ "limit": "圖表超出繪製限制,可檢視原始碼。",+ "load": "圖表繪製器載入失敗,請重試。",+ "deadline": "圖表繪製逾時,請簡化原始碼或重試。",+ "worker": "圖表繪製失敗,請重試。",+ "image": "圖表顯示失敗,請重試。",+ "capability": "此瀏覽器無法繪製圖表,可檢視原始碼。"+ }+ },"lightbox": {"viewAll": "查看全部 {{count}} 張圖片","zoomIn": "放大",diff --git a/webui/src/tests/diagram-image.test.ts b/webui/src/tests/diagram-image.test.tsnew file mode 100644index 000000000..ea6f4b44e--- /dev/null+++ b/webui/src/tests/diagram-image.test.ts@@ -0,0 +1,183 @@+import { afterEach, beforeAll, describe, expect, it, vi } from "vitest";+import { detectType, load, render } from "pele/lazy";+import { canvasTextMeasurer } from "../components/markdown-diagrams/render";+import { diagramImageTemplate, DiagramImageError } from "../components/markdown-diagrams/svg-image";+import { OUTPUT_LIMIT, SOURCE_LIMIT, type DiagramInput, type DiagramReply } from "../components/markdown-diagrams/types";++const fonts: DiagramInput["fonts"] = {+ sans: '-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',+ mono: 'ui-monospace, "Cascadia Code", monospace', size: 14,+};+const source = 'flowchart LR\n A["`**粗体** _italic_ 中文 😀`"] --> B[Result]';+let base: string;++async function peleSvg(text: string): Promise<string> {+ await load(detectType(text));+ return render(text, {+ fontFamily: fonts.sans, fontFamilyMono: fonts.mono, fontSize: fonts.size,+ measurer: { width: (text) => text.length * 7 }, links: false, images: false,+ responsive: false, maxWidth: 600, maxEdges: 500,+ }).svg;+}+function documentSvg(body: string): string {+ return base.slice(0, base.indexOf(">") + 1) + body + "</svg>";+}+function reject(svg: string, reason = "policy"): void {+ expect(() => diagramImageTemplate(svg, fonts)).toThrowError(+ expect.objectContaining({ reason }),+ );+}+function canvasFixture() {+ const context = {+ font: "",+ measureText: vi.fn((text: string) => ({ width: text.length * 7 })),+ };+ vi.stubGlobal("OffscreenCanvas", class {+ getContext() { return context; }+ });+ return context;+}++beforeAll(async () => { base = await peleSvg(source); });+afterEach(() => { vi.unstubAllGlobals(); });++describe("Pele image-only output", () => {+ it.each([+ source,+ "sequenceDiagram\n Alice->>Bob: 中文 and emoji 😀\n Note over Alice,Bob: two lines<br/>second",+ "stateDiagram-v2\n [*] --> Active\n state Active {\n [*] --> Ready\n Ready --> [*]\n }",+ ])("accepts the published engine's measured geometries: %s", async (text) => {+ const svg = await peleSvg(text);+ const image = diagramImageTemplate(svg, fonts);+ expect(image.content).toContain("<text");+ expect(image.content).not.toMatch(/^<svg/);+ expect(image.style).toContain("--_bg:var(--pele-bg,#fff)");+ expect(image.style).toContain('font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif');+ expect(image.style).toContain('--_fm:ui-monospace,"Cascadia Code",monospace');+ expect(image.style).not.toContain("--pele-font,");+ expect(image.width).toBeGreaterThan(0);+ expect(image.height).toBeGreaterThan(0);+ });++ it("retains measured bold, italic and numeric size styling", async () => {+ const image = diagramImageTemplate(await peleSvg(`${source}\n classDef measured font-size:18px,font-weight:bold,font-style:italic\n class B measured`), fonts);+ expect(image.style).toContain("--_w:bold");+ expect(image.content).toContain("font-size:18px");+ expect(image.content).toContain("font-style:italic");+ expect(image.content).toContain('font-weight="var(--_w)"');+ });++ it.each([+ "font-family:fantasy", "letter-spacing:4px", "word-spacing:1em",+ "font-size:2em", "font-size:201px", "font-weight:600", "font-style:oblique",+ ])("rejects unmeasured author typography: %s", async (authorStyle) => {+ reject(await peleSvg(`flowchart LR\n A[Label] --> B\n style A ${authorStyle}`), "unsupported");+ });++ it("preserves and resolves local marker/clip references and monospace attributes", () => {+ const image = diagramImageTemplate(documentSvg('<defs><marker id="arrow" markerWidth="8" markerHeight="8" refX="4" refY="4" orient="auto"><path d="M0 0L8 4L0 8Z"/></marker><clipPath id="clip"><rect width="40" height="20"/></clipPath></defs><path d="M0 0L40 20" marker-end="url(#arrow)" style="clip-path:url(#clip)"/><text font-family="var(--_fm)" font-size="12">code</text>'), fonts);+ expect(image.content).toContain('marker-end="url(#arrow)"');+ expect(image.content).toContain('style="clip-path:url(#clip)"');+ expect(image.content).toContain('font-family="var(--_fm)"');+ reject(documentSvg('<path d="M0 0L2 2" marker-end="url(#missing)"/>'));+ reject(documentSvg('<g id="wrong"/><path d="M0 0L2 2" marker-end="url(#wrong)"/>'));+ });++ it("serializes XML and extracts an inert plain accessible label", () => {+ const image = diagramImageTemplate(documentSvg('<title id="title">A & B <img></title><desc>中文\n description</desc><text><![CDATA[<script> & "quoted"]]></text>'), fonts);+ expect(image.label).toBe("A & B <img>. 中文 description");+ expect(image.content).toContain("<script> & "quoted"");+ expect(image.content).not.toContain("<![CDATA[");+ });++ it.each([+ '<script>alert(1)</script>', '<foreignObject/>', '<animate attributeName="x"/>',+ '<image href="https://bad.test/image"/>', '<a href="https://bad.test/"><text>link</text></a>',+ '<use href="#shape"/>', '<path d="M0 0L1 1" onclick="alert(1)"/>',+ '<g xmlns="http://www.w3.org/1999/xhtml"/>', '<text>&unknown;</text>',+ '<path style="fill:url(https://bad.test/a)"/>', '<path style="fill:u\\72l(https://bad.test/a)"/>',+ '<path style="fill:var(--custom,red)"/>', '<path style="fill:var(--_fg,url(https://bad.test/a))"/>',+ '<path style="--custom:red;fill:var(--custom)"/>', '<path style="filter:blur(4px)"/>',+ '<path style="@import url(https://bad.test/a)"/>',+ ])("rejects active/resource/unsupported XML or CSS: %s", (body) => {+ reject(documentSvg(body));+ });++ it("rejects DTD/entity declarations and processing instructions", () => {+ reject('<!DOCTYPE svg [<!ENTITY value "expanded">]>' + documentSvg("<text>&value;</text>"));+ reject('<?xml-stylesheet href="https://bad.test/style"?>' + base);+ });++ it("bounds dimensions, finite geometry, element count and final UTF-8 bytes", () => {+ reject(base.replace(/width="\d+"/, 'width="8193"'), "limit");+ reject(base.replace(/viewBox="[^"]+"/, 'viewBox="0 0 1 1"'), "limit");+ reject(base.replace(/viewBox="[^"]+"/, 'viewBox="0 0 3000 3000"').replace(/width="\d+"/, 'width="3000"').replace(/height="\d+"/, 'height="3000"'), "limit");+ reject(documentSvg('<path d="M0 0L1e999 2"/>'), "limit");+ reject(documentSvg("<g/>".repeat(10_000)), "limit");+ const multibyte = documentSvg(`<text>${"中".repeat(360_000)}</text>`);+ expect(multibyte.length).toBeLessThan(OUTPUT_LIMIT);+ reject(multibyte, "limit");+ reject(documentSvg(`<text><![CDATA[${"<".repeat(270_000)}]]></text>`), "limit");+ });+});++describe("canvas-only typography", () => {+ it("uses the exact sans/mono size, bold and italic flags", () => {+ const context = canvasFixture();+ const measurer = canvasTextMeasurer(fonts);+ for (const [flags, expected] of [+ [0, `18px ${fonts.sans}`], [1, `bold 18px ${fonts.sans}`],+ [2, `italic 18px ${fonts.sans}`], [4, `18px ${fonts.mono}`],+ [7, `italic bold 18px ${fonts.mono}`],+ ] as const) {+ expect(measurer.width("中文 emoji 😀", 18, flags)).toBe(77);+ expect(context.font).toBe(expected);+ }+ });++ it("fails explicitly without OffscreenCanvas rather than using approximate metrics", () => {+ vi.stubGlobal("OffscreenCanvas", undefined);+ expect(() => canvasTextMeasurer(fonts)).toThrowError(new DiagramImageError("capability"));+ });+});++describe("single-input Worker protocol", () => {+ async function run(text: string): Promise<DiagramReply[]> {+ vi.resetModules();+ const replies: DiagramReply[] = [];+ const worker: {+ onmessage: ((event: MessageEvent<DiagramInput>) => Promise<void>) | null;+ postMessage(reply: DiagramReply): void;+ } = { onmessage: null, postMessage: (reply) => { replies.push(reply); } };+ vi.stubGlobal("self", worker);+ const canvas = canvasFixture();+ canvas.measureText.mockImplementation((text) => {+ expect(replies.at(-1)?.kind).toBe("started");+ return { width: text.length * 7 };+ });+ await import("../components/markdown-diagrams/pele.worker");+ if (!worker.onmessage) throw new Error("Worker handler missing");+ await worker.onmessage(new MessageEvent<DiagramInput>("message", {+ data: { source: text, width: 600, fonts },+ }));+ expect(worker.onmessage).toBeNull();+ return replies;+ }++ it("loads the actual engine, announces sync work, and returns only an image template", async () => {+ const replies = await run('---\ntitle: Supported frontmatter\nconfig:\n links: true\n images: true\n---\n%%{init: {"flowchart":{"wrappingWidth":120}}}%%\nflowchart LR\n A["<b>中文</b>"] --> B\n click A "https://bad.test/"\n');+ expect(replies.map((reply) => reply.kind)).toEqual(["started", "image"]);+ const image = replies[1];+ if (image.kind !== "image") throw new Error("Image missing");+ expect(image.template.content).toContain("Supported frontmatter");+ expect(image.template.content).not.toMatch(/<a\b|href=|<image\b/);+ });++ it("enforces host source/edge limits and reports unsupported or invalid syntax", async () => {+ expect(await run("x".repeat(SOURCE_LIMIT + 1))).toEqual([{ kind: "failed", reason: "limit" }]);+ expect(await run("unknownDiagram A")).toEqual([{ kind: "failed", reason: "unsupported" }]);+ expect((await run("flowchart LR\n A[unclosed")).at(-1)).toEqual({ kind: "failed", reason: "syntax" });+ const edges = Array.from({ length: 501 }, (_, i) => `A${i} --> A${i + 1}`).join("\n");+ expect((await run(`flowchart LR\n${edges}`)).at(-1)).toEqual({ kind: "failed", reason: "limit" });+ });+});diff --git a/webui/src/tests/diagram-runtime.test.ts b/webui/src/tests/diagram-runtime.test.tsnew file mode 100644index 000000000..e3bd85622--- /dev/null+++ b/webui/src/tests/diagram-runtime.test.ts@@ -0,0 +1,213 @@+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";++import { requestDiagram, type DiagramPalette, type DiagramRequest, type DiagramState } from "@/components/markdown-diagrams/runtime";+import type { DiagramInput, DiagramReply } from "@/components/markdown-diagrams/types";++class RenderWorker {+ static instances: RenderWorker[] = [];+ onmessage: ((event: MessageEvent) => void) | null = null;+ onerror: (() => void) | null = null;+ onmessageerror: (() => void) | null = null;+ terminate = vi.fn();+ postMessage = vi.fn();+ constructor() { RenderWorker.instances.push(this); }+ reply(data: DiagramReply) { this.onmessage?.({ data } as MessageEvent); }+}+class DecodedImage {+ static instances: DecodedImage[] = [];+ src = "";+ decoding = "";+ onload: (() => void) | null = null;+ onerror: (() => void) | null = null;+ removeAttribute = vi.fn();+ decode = vi.fn(() => Promise.resolve());+ constructor() { DecodedImage.instances.push(this); }+}+const input: DiagramInput = { source: "flowchart LR\nA --> B", width: 500, fonts: { sans: "sans-serif", mono: "monospace", size: 16 } };+const result: DiagramReply = { kind: "image", template: { content: '<path d="M0 0L20 20"/>', style: "fill:black", width: 100, height: 50, label: "Example" } };+let requests: DiagramRequest[];+function start(source = input.source) {+ const controller = new AbortController();+ const states: DiagramState[] = [];+ const request = requestDiagram({ ...input, source }, controller.signal, (state) => states.push(state));+ requests.push(request);+ request.setDemand("visible");+ return { request, states, controller };+}++beforeEach(() => {+ requests = [];+ RenderWorker.instances = [];+ DecodedImage.instances = [];+ vi.useFakeTimers();+ vi.stubGlobal("Worker", RenderWorker);+ vi.stubGlobal("Image", DecodedImage);+ vi.spyOn(URL, "createObjectURL").mockImplementation(() => `blob:diagram-${DecodedImage.instances.length}`);+ vi.spyOn(URL, "revokeObjectURL").mockImplementation(() => {});+});+afterEach(() => {+ requests.forEach((request) => request.dispose());+ vi.useRealTimers();+ vi.restoreAllMocks();+ vi.unstubAllGlobals();+});++describe("diagram runtime", () => {+ it("bounds concurrent rendering, prioritizes an opened diagram and cancels only its task", () => {+ const jobs = Array.from({ length: 8 }, () => start());+ expect(RenderWorker.instances).toHaveLength(2);+ jobs[7].request.setDemand("dialog");+ jobs[0].controller.abort();+ expect(RenderWorker.instances[0].terminate).toHaveBeenCalledOnce();+ expect(RenderWorker.instances[1].terminate).not.toHaveBeenCalled();+ expect(RenderWorker.instances).toHaveLength(3);+ jobs[7].controller.abort();+ expect(RenderWorker.instances[2].terminate).toHaveBeenCalledOnce();+ });++ it("terminates timed-out synchronous work and ignores its late result", () => {+ const job = start();+ const worker = RenderWorker.instances[0];+ const lateReply = worker.onmessage!;+ worker.reply({ kind: "started" });+ vi.advanceTimersByTime(2000);+ expect(worker.terminate).toHaveBeenCalledOnce();+ expect(job.states.at(-1)).toEqual({ kind: "failed", reason: "deadline" });+ lateReply({ data: result } as MessageEvent);+ expect(URL.createObjectURL).not.toHaveBeenCalled();+ });++ it("releases the worker when module loading fails and permits an explicit retry", () => {+ const job = start();+ vi.advanceTimersByTime(10_000);+ expect(job.states.at(-1)).toEqual({ kind: "failed", reason: "load" });+ expect(RenderWorker.instances[0].terminate).toHaveBeenCalledOnce();+ // Source view / scrolling offscreen must preserve the error and its retry action.+ job.request.setDemand("none");+ job.request.setDemand("visible");+ expect(job.states.at(-1)).toEqual({ kind: "failed", reason: "load" });+ expect(RenderWorker.instances).toHaveLength(1);+ job.request.retry();+ expect(RenderWorker.instances).toHaveLength(2);+ });++ it("decodes before publishing and rebinds the theme without executing Pele again", async () => {+ const job = start();+ RenderWorker.instances[0].reply(result);+ expect(job.states.at(-1)?.kind).toBe("rendering");+ expect(RenderWorker.instances[0].terminate).toHaveBeenCalledOnce();+ DecodedImage.instances[0].onload?.();+ await Promise.resolve();+ expect(job.states.at(-1)).toMatchObject({ kind: "ready", image: { width: 100, label: "Example" } });+ job.request.setPalette({ "--pele-fg": "#eeeeee" });+ expect(RenderWorker.instances).toHaveLength(1);+ DecodedImage.instances[1].onload?.();+ await Promise.resolve();+ expect(URL.revokeObjectURL).toHaveBeenCalledWith("blob:diagram-0");+ job.controller.abort();+ expect(URL.revokeObjectURL).toHaveBeenCalledTimes(2);+ });++ it("keeps twelve small visible diagrams ready through growing and shrinking palettes", async () => {+ const jobs = Array.from({ length: 12 }, () => start());+ for (let index = 0; index < jobs.length; index++) {+ RenderWorker.instances[index].reply(result);+ expect(DecodedImage.instances).toHaveLength(index + 1);+ DecodedImage.instances[index].onload?.();+ await Promise.resolve();+ expect(jobs[index].states.at(-1)?.kind).toBe("ready");+ }+ const palettes: DiagramPalette[] = [+ { "--pele-bg": "hsl(210 40% 98%)", "--pele-fg": "hsl(222.2 84% 4.9%)", "--pele-accent": "rgb(12 34 56)" },+ { "--pele-fg": "#eee" },+ ];+ for (const palette of palettes) {+ const offset = DecodedImage.instances.length;+ const before = jobs.map(({ states }) => states.at(-1));+ jobs.forEach(({ request }) => request.setPalette(palette));+ expect(DecodedImage.instances).toHaveLength(offset + jobs.length);+ expect(jobs.map(({ states }) => states.at(-1))).toEqual(before);+ for (let index = 0; index < jobs.length; index++) DecodedImage.instances[offset + index].onload?.();+ await Promise.resolve();+ expect(jobs.map(({ states }) => states.at(-1))).toEqual(jobs.map((_, index) => ({+ kind: "ready", image: { url: `blob:diagram-${offset + index}`, width: 100, height: 50, label: "Example" },+ })));+ }+ expect(RenderWorker.instances).toHaveLength(jobs.length);+ jobs.forEach(({ controller }) => controller.abort());+ expect(URL.revokeObjectURL).toHaveBeenCalledTimes(36);+ });++ it("disposes a pending image on session change, suppressing its late decode", async () => {+ const job = start();+ RenderWorker.instances[0].reply(result);+ const image = DecodedImage.instances[0];+ let resolve!: () => void;+ image.decode.mockImplementation(() => new Promise<void>((done) => { resolve = done; }));+ image.onload?.();+ job.controller.abort();+ resolve();+ await Promise.resolve();+ expect(job.states.some((state) => state.kind === "ready")).toBe(false);+ expect(URL.revokeObjectURL).toHaveBeenCalledOnce();+ });++ it("releases offscreen assets and re-renders only on renewed demand", async () => {+ const job = start();+ RenderWorker.instances[0].reply(result);+ DecodedImage.instances[0].onload?.();+ await Promise.resolve();+ job.request.setDemand("none");+ expect(URL.revokeObjectURL).toHaveBeenCalledOnce();+ expect(job.states.at(-1)).toEqual({ kind: "waiting" });+ expect(RenderWorker.instances).toHaveLength(1);+ job.request.setDemand("visible");+ expect(RenderWorker.instances).toHaveLength(2);+ });++ it.each([+ { budget: "pixels", content: "<path/>", width: 4000, height: 2000 },+ { budget: "bytes", content: `<path d="M0 0${" L1 1".repeat(190_000)}"/>`, width: 100, height: 50 },+ ])("reserves replacement $budget while a new fence waits for shared capacity", async ({ content, width, height }) => {+ const jobs = Array.from({ length: 4 }, () => start());+ const large: DiagramReply = { kind: "image", template: { content, style: "fill:black", width, height, label: "Large graph" } };+ for (let index = 0; index < 3; index++) {+ RenderWorker.instances[index].reply(large);+ DecodedImage.instances[index].onload?.();+ await Promise.resolve();+ expect(jobs[index].states.at(-1)?.kind).toBe("ready");+ }+ RenderWorker.instances[3].reply(large);+ expect(jobs[3].states.at(-1)).toEqual({ kind: "waiting" });+ expect(DecodedImage.instances).toHaveLength(3);++ // A theme change must progress at full admission capacity without losing the visible images.+ jobs.slice(0, 3).forEach(({ request }) => request.setPalette({ "--pele-fg": "#eeeeee" }));+ for (let index = 0; index < 3; index++) {+ expect(DecodedImage.instances).toHaveLength(4 + index);+ expect(URL.revokeObjectURL).not.toHaveBeenCalledWith(`blob:diagram-${index}`);+ DecodedImage.instances[3 + index].onload?.();+ await Promise.resolve();+ await Promise.resolve();+ expect(jobs[index].states.at(-1)).toMatchObject({ kind: "ready", image: { url: `blob:diagram-${3 + index}` } });+ expect(URL.revokeObjectURL).toHaveBeenCalledWith(`blob:diagram-${index}`);+ }+ expect(jobs[3].states.at(-1)).toEqual({ kind: "waiting" });+ jobs[0].controller.abort();+ await Promise.resolve();+ expect(DecodedImage.instances).toHaveLength(7);+ DecodedImage.instances[6].onload?.();+ await Promise.resolve();+ expect(jobs[3].states.at(-1)?.kind).toBe("ready");+ expect(RenderWorker.instances).toHaveLength(4);+ });++ it("retains source-only failure when Worker is unavailable or source exceeds the budget", () => {+ const oversized = start("a".repeat(50_001));+ expect(oversized.states.at(-1)).toEqual({ kind: "failed", reason: "limit" });+ vi.stubGlobal("Worker", undefined);+ const unavailable = start();+ expect(unavailable.states.at(-1)).toEqual({ kind: "failed", reason: "capability" });+ expect(RenderWorker.instances).toHaveLength(0);+ });+});diff --git a/webui/src/tests/image-lightbox.test.tsx b/webui/src/tests/image-lightbox.test.tsxindex 21ff4ba70..a79c761a3 100644--- a/webui/src/tests/image-lightbox.test.tsx+++ b/webui/src/tests/image-lightbox.test.tsx@@ -1,15 +1,17 @@-import { fireEvent, render, screen, within } from "@testing-library/react";-import { describe, expect, it } from "vitest";+import { act, fireEvent, render, screen, within } from "@testing-library/react";+import { afterEach, describe, expect, it, vi } from "vitest";import { ImageLightbox } from "@/components/ImageLightbox";-import { ZoomableImage } from "@/components/ZoomableImage";+import { ImageViewport } from "@/components/ui/image-viewport";++afterEach(() => vi.unstubAllGlobals());function renderImage() {- const result = render(<ZoomableImage src="data:image/png;base64,test" alt="Test chart" />);- const viewport = screen.getByTestId("image-zoom-viewport");+ const result = render(<ImageViewport src="data:image/png;base64,test" alt="Test chart" />);+ const viewport = screen.getByTestId("image-viewport");const image = screen.getByRole("img", { name: "Test chart" });- Object.defineProperties(viewport, { clientWidth: { value: 800 }, clientHeight: { value: 600 } });- Object.defineProperties(image, { offsetWidth: { value: 800 }, offsetHeight: { value: 600 } });+ Object.defineProperties(viewport, { clientWidth: { value: 800, configurable: true }, clientHeight: { value: 600, configurable: true } });+ Object.defineProperties(image, { offsetWidth: { value: 800, configurable: true }, offsetHeight: { value: 600, configurable: true } });viewport.getBoundingClientRect = () => new DOMRect(0, 0, 800, 600);return { ...result, viewport, image };}@@ -37,6 +39,13 @@ describe("image zoom", () => {fireEvent.pointerMove(viewport, { pointerId: 1, clientX: 300, clientY: 300 });expect(image.style.transform).toBe("translate3d(400px, 300px, 0) scale(2)");expect(viewport.className).not.toContain("cursor-grabbing");+ fireEvent.pointerDown(viewport, { pointerId: 3, button: 0, clientX: 400, clientY: 300 });+ fireEvent.pointerMove(viewport, { pointerId: 3, clientX: 300, clientY: 300 });+ expect(image.style.transform).toBe("translate3d(300px, 300px, 0) scale(2)");+ fireEvent.lostPointerCapture(viewport, { pointerId: 3 });+ fireEvent.pointerMove(viewport, { pointerId: 3, clientX: 200, clientY: 300 });+ expect(image.style.transform).toBe("translate3d(300px, 300px, 0) scale(2)");+ expect(viewport.className).not.toContain("cursor-grabbing");fireEvent.click(screen.getByRole("button", { name: "Fit image" }));expect(image.style.transform).toBe("translate3d(0px, 0px, 0) scale(1)");});@@ -47,6 +56,7 @@ describe("image zoom", () => {expect(wheel(viewport, -50)).toBe(false);expect(image.style.transform).toContain(`scale(${Math.exp(0.5)})`);expect(wheel(document.body, -50)).toBe(true);+ expect(wheel(document.body, 20, false)).toBe(true);expect(wheel(viewport, 20, false)).toBe(false);expect(image.style.transform).toContain("-20px");for (let i = 0; i < 10; i++) wheel(viewport, -50);@@ -63,6 +73,10 @@ describe("image zoom", () => {expect(image.style.transform).toContain("scale(2)");fireEvent.doubleClick(viewport, { clientX: 400, clientY: 300 });expect(image.style.transform).toContain("scale(1)");+ fireEvent.keyDown(viewport, { key: "=" });+ expect(screen.getByRole("button", { name: "Fit image" })).toHaveTextContent("150%");+ fireEvent.keyDown(viewport, { key: "-" });+ expect(image.style.transform).toContain("scale(1)");fireEvent.keyDown(viewport, { key: "+" });expect(screen.getByRole("button", { name: "Fit image" })).toHaveTextContent("150%");fireEvent.keyDown(viewport, { key: "0" });@@ -71,6 +85,81 @@ describe("image zoom", () => {expect(image.style.transform).toContain("scale(1)");});+ it("pans with focused arrow keys within the image bounds", () => {+ const { viewport, image } = renderImage();+ viewport.focus();+ fireEvent.click(screen.getByRole("button", { name: "Zoom in" }));+ expect(fireEvent.keyDown(viewport, { key: "ArrowRight" })).toBe(false);+ expect(image.style.transform).toBe("translate3d(-40px, 0px, 0) scale(1.5)");+ fireEvent.keyDown(viewport, { key: "ArrowDown" });+ expect(image.style.transform).toBe("translate3d(-40px, -40px, 0) scale(1.5)");+ fireEvent.keyDown(viewport, { key: "ArrowLeft" });+ fireEvent.keyDown(viewport, { key: "ArrowUp" });+ expect(image.style.transform).toBe("translate3d(0px, 0px, 0) scale(1.5)");+ for (let i = 0; i < 10; i++) {+ fireEvent.keyDown(viewport, { key: "ArrowRight" });+ fireEvent.keyDown(viewport, { key: "ArrowDown" });+ }+ expect(image.style.transform).toBe("translate3d(-200px, -150px, 0) scale(1.5)");+ fireEvent.keyDown(viewport, { key: "0" });+ expect(image.style.transform).toBe("translate3d(0px, 0px, 0) scale(1)");+ });++ it("leaves outside keys and browser zoom shortcuts alone", () => {+ const { viewport, image } = renderImage();+ fireEvent.click(screen.getByRole("button", { name: "Zoom in" }));+ expect(fireEvent.keyDown(document.body, { key: "+" })).toBe(true);+ expect(fireEvent.keyDown(document.body, { key: "ArrowRight" })).toBe(true);+ expect(fireEvent.keyDown(viewport, { key: "+", ctrlKey: true })).toBe(true);+ expect(fireEvent.keyDown(viewport, { key: "0", metaKey: true })).toBe(true);+ expect(image.style.transform).toBe("translate3d(0px, 0px, 0) scale(1.5)");+ });++ it("reclamps on resize and image load, then releases observers, wheel and pointer capture", () => {+ let onResize: (() => void) | undefined;+ const observe = vi.fn();+ const disconnect = vi.fn();+ vi.stubGlobal("ResizeObserver", class {+ constructor(callback: () => void) { onResize = callback; }+ observe = observe;+ disconnect = disconnect;+ });+ const { viewport, image, unmount } = renderImage();+ const captured = new Set<number>();+ viewport.setPointerCapture = (id) => { captured.add(id); };+ viewport.hasPointerCapture = (id) => captured.has(id);+ const release = vi.fn((id: number) => { captured.delete(id); });+ viewport.releasePointerCapture = release;+ expect(observe).toHaveBeenCalledWith(viewport);+ fireEvent.doubleClick(viewport, { clientX: 400, clientY: 300 });+ fireEvent.pointerDown(viewport, { pointerId: 1, button: 0, clientX: 400, clientY: 300 });+ fireEvent.pointerMove(viewport, { pointerId: 1, clientX: 9000, clientY: 9000 });+ expect(image.style.transform).toBe("translate3d(400px, 300px, 0) scale(2)");+ Object.defineProperties(viewport, { clientWidth: { value: 1200 }, clientHeight: { value: 900 } });+ act(() => onResize?.());+ expect(image.style.transform).toBe("translate3d(200px, 150px, 0) scale(2)");+ Object.defineProperties(image, { offsetWidth: { value: 500 }, offsetHeight: { value: 400 } });+ fireEvent.load(image);+ expect(image.style.transform).toBe("translate3d(0px, 0px, 0) scale(2)");+ unmount();+ expect(disconnect).toHaveBeenCalledOnce();+ expect(release).toHaveBeenCalledWith(1);+ expect(wheel(viewport, -50)).toBe(true);+ });++ it("preserves left/right gallery navigation from the focused, zoomed photo viewport", () => {+ const images = [{ url: "data:image/png;base64,a", name: "A" }, { url: "data:image/png;base64,b", name: "B" }, { url: "data:image/png;base64,c", name: "C" }];+ const onIndexChange = vi.fn();+ render(<ImageLightbox images={images} index={1} onIndexChange={onIndexChange} onOpenChange={() => {}} />);+ const viewport = screen.getByTestId("image-zoom-viewport");+ fireEvent.click(screen.getByRole("button", { name: "Zoom in" }));+ viewport.focus();+ fireEvent.keyDown(document.activeElement!, { key: "ArrowLeft" });+ fireEvent.keyDown(document.activeElement!, { key: "ArrowRight" });+ expect(onIndexChange.mock.calls).toEqual([[0], [2]]);+ expect(screen.getByRole("button", { name: "Fit image" })).toHaveTextContent("150%");+ });+it("resets zoom when switching images and reopening the lightbox", () => {const images = [{ url: "data:image/png;base64,a", name: "A" }, { url: "data:image/png;base64,b", name: "B" }];const view = (index: number | null) => <ImageLightbox images={images} index={index} onIndexChange={() => {}} onOpenChange={() => {}} />;diff --git a/webui/src/tests/mermaid-block.test.tsx b/webui/src/tests/mermaid-block.test.tsxnew file mode 100644index 000000000..5ce02b437--- /dev/null+++ b/webui/src/tests/mermaid-block.test.tsx@@ -0,0 +1,78 @@+import { act, fireEvent, render, screen, waitFor } from "@testing-library/react";+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";++import { MessageBubble } from "@/components/MessageBubble";+import MarkdownTextRenderer from "@/components/MarkdownTextRenderer";+import { DiagramScope } from "@/components/markdown-diagrams/context";+import type { DiagramInput } from "@/components/markdown-diagrams/types";+import type { DiagramState } from "@/components/markdown-diagrams/runtime";++const runtime = vi.hoisted(() => ({ request: vi.fn() }));+vi.mock("@/components/markdown-diagrams/runtime", () => ({ requestDiagram: runtime.request }));+const code = "flowchart LR\n开始 --> 完成";+const markdown = `Before the graph.\n\n\`\`\`mermaid\n${code}\n\`\`\`\n\nAfter the graph.`;+const jobs: { input: DiagramInput; signal: AbortSignal; publish: (state: DiagramState) => void; demand: ReturnType<typeof vi.fn> }[] = [];+class VisibleObserver {+ constructor(private callback: (entries: { isIntersecting: boolean }[]) => void) {}+ observe() { this.callback([{ isIntersecting: true }]); }+ disconnect() {}+}+class SizeObserver {+ constructor(private callback: () => void) {}+ observe() { this.callback(); }+ disconnect() {}+}+beforeEach(() => {+ jobs.length = 0;+ runtime.request.mockImplementation((input: DiagramInput, signal: AbortSignal, publish: (state: DiagramState) => void) => {+ const demand = vi.fn();+ jobs.push({ input, signal, publish, demand });+ return { setDemand: demand, setPalette: vi.fn(), retry: vi.fn(), dispose: vi.fn() };+ });+ vi.stubGlobal("IntersectionObserver", VisibleObserver);+ vi.stubGlobal("ResizeObserver", SizeObserver);+ vi.spyOn(HTMLElement.prototype, "clientWidth", "get").mockReturnValue(640);+});+afterEach(() => { vi.restoreAllMocks(); vi.unstubAllGlobals(); });++describe("Mermaid message fences", () => {+ it("renders identical source at actual completion through preserved Streamdown layout", async () => {+ const message = { id: "diagram", role: "assistant" as const, content: markdown, createdAt: 1, isStreaming: true };+ const view = render(<MessageBubble message={message} />);+ await waitFor(() => expect(view.container.querySelector(".markdown-content")).toBeInTheDocument());+ const tree = view.container.querySelector(".markdown-content");+ expect(runtime.request).not.toHaveBeenCalled();+ expect(view.container).toHaveTextContent("开始 --> 完成");+ view.rerender(<MessageBubble message={{ ...message, isStreaming: false }} />);+ await waitFor(() => expect(jobs).toHaveLength(1));+ expect(jobs[0].input.source).toBe(code);+ expect(view.container.querySelector(".markdown-content")).toBe(tree);+ act(() => jobs[0].publish({ kind: "ready", image: { url: "blob:completed-diagram", width: 200, height: 100, label: "A real diagram result" } }));+ expect(screen.getByRole("img", { name: "A real diagram result" })).toHaveAttribute("src", "blob:completed-diagram");+ expect(screen.getByRole("button", { name: "Enlarge diagram" })).not.toBeDisabled();+ expect(view.container).toHaveTextContent("Before the graph.");+ expect(view.container).toHaveTextContent("After the graph.");+ });++ it("keeps errors local and makes failed source available", async () => {+ render(<MarkdownTextRenderer>{markdown}</MarkdownTextRenderer>);+ await waitFor(() => expect(jobs).toHaveLength(1));+ act(() => jobs[0].publish({ kind: "failed", reason: "syntax" }));+ expect(screen.getByRole("status")).toHaveTextContent("Check the diagram syntax");+ expect(screen.getByTestId("plain-code-fallback")).toHaveTextContent("开始 --> 完成");+ expect(screen.getByText("After the graph.")).toBeInTheDocument();+ expect(screen.getByRole("button", { name: "Copy source" })).toBeInTheDocument();+ });++ it("keeps a chosen source view and cancels resources when the conversation identity changes", async () => {+ const view = render(<DiagramScope identity="first"><MarkdownTextRenderer>{markdown}</MarkdownTextRenderer></DiagramScope>);+ await waitFor(() => expect(jobs).toHaveLength(1));+ fireEvent.click(screen.getByRole("button", { name: "Source" }));+ expect(jobs[0].demand).toHaveBeenLastCalledWith("none");+ view.rerender(<DiagramScope identity="second"><MarkdownTextRenderer>{markdown}</MarkdownTextRenderer></DiagramScope>);+ await waitFor(() => expect(jobs).toHaveLength(2));+ expect(jobs[0].signal.aborted).toBe(true);+ expect(screen.getByRole("button", { name: "Source" })).toHaveAttribute("aria-pressed", "true");+ expect(jobs[1].demand).toHaveBeenLastCalledWith("none");+ });+});diff --git a/webui/src/tests/vite-config.test.ts b/webui/src/tests/vite-config.test.tsindex 72ccfcc4c..159c65599 100644--- a/webui/src/tests/vite-config.test.ts+++ b/webui/src/tests/vite-config.test.ts@@ -19,6 +19,15 @@ describe("development overlay dependencies", () => {});});+describe("development diagram Worker dependencies", () => {+ it("pre-bundles Worker-only imports without a first-use page reload", () => {+ const config = webuiConfig({ command: "serve", mode: "test" });+ expect(config.optimizeDeps?.include).toEqual(expect.arrayContaining([+ "pele/lazy", "saxes", "css-tree/parser", "css-tree/walker", "css-tree/generator",+ ]));+ });+});+describe("gzipWebuiAssets", () => {it("compresses finalized files after Rollup writes the bundle", async () => {const plugin = gzipWebuiAssets();@@ -63,10 +72,12 @@ describe("entryLazyFeatureImports", () => {"assets/markdown-vendor-abc.js","assets/syntax-highlight-def.js","assets/katex-ghi.js",+ "assets/MermaidBlock-jkl.js",])).toEqual(["assets/markdown-vendor-abc.js","assets/syntax-highlight-def.js","assets/katex-ghi.js",+ "assets/MermaidBlock-jkl.js",]);});});@@ -102,6 +113,7 @@ describe("webuiManualChunk", () => {});it("keeps Streamdown and its repair helper in the markdown chunk", () => {+ expect(webuiManualChunk("/repo/webui/src/components/markdown-diagrams/context.tsx")).toBeUndefined();expect(webuiManualChunk("/repo/node_modules/streamdown/dist/index.js")).toBe("markdown-vendor",);diff --git a/webui/vite.config.ts b/webui/vite.config.tsindex a778dd42f..507118ed3 100644--- a/webui/vite.config.ts+++ b/webui/vite.config.ts@@ -32,7 +32,7 @@ function startupSkeleton(): Plugin {const GZIP_MIN_BYTES = 4 * 1024;const GZIP_ASSET_PATTERN = /\.(?:css|html|js|json|mjs|svg)$/i;-const LAZY_FEATURE_CHUNK_PREFIXES = ["markdown-vendor-", "syntax-highlight-", "katex-"];+const LAZY_FEATURE_CHUNK_PREFIXES = ["markdown-vendor-", "markdown-diagrams-", "MermaidBlock-", "syntax-highlight-", "katex-"];export function entryLazyFeatureImports(imports: string[]): string[] {return imports.filter((fileName) =>@@ -108,8 +108,7 @@ export function webuiManualChunk(id: string): string | undefined {if (id.includes("node_modules/refractor/lang/")) {return;}- // Streamdown lazy-loads diagrams and highlighted code. Keep those modules- // outside the core markdown chunk so ordinary replies do not download them.+ // Streamdown retains a lazy viewer shell, not the native Mermaid engine.if (id.includes("node_modules/streamdown/dist/mermaid-")) return "markdown-diagrams";if (id.includes("node_modules/streamdown/dist/highlighted-body-")) return "markdown-code";// Refractor reaches this HAST helper through hastscript. Keeping it with@@ -158,8 +157,14 @@ export default defineConfig(({ mode }) => {// Pre-bundle Dialog up front, including lazy settings/sheets. Excluding// it splits its layer/focus state from optimized Popover and DropdownMenu,// so nested overlays can dismiss the wrong layer in development.- include: ["@radix-ui/react-dialog"],+ include: [+ "@radix-ui/react-dialog",+ // Vite's HTML scan does not follow the lazy Worker entry. Discovering+ // these imports on first render would reload the page and lose UI state.+ "pele/lazy", "saxes", "css-tree/parser", "css-tree/walker", "css-tree/generator",+ ],},+ worker: { format: "es" },build: {outDir: path.resolve(__dirname, "../nanobot/web/dist"),emptyOutDir: true,