diff --git a/.changeset/framed-diagram-blocks.md b/.changeset/framed-diagram-blocks.md new file mode 100644 index 0000000000..1c4c9c7e94 --- /dev/null +++ b/.changeset/framed-diagram-blocks.md @@ -0,0 +1,5 @@ +--- +"@schlessera/brain-ui-kit": minor +"@schlessera/brain-module-diagrams": patch +--- +Rendered diagrams in chat and file views now sit in one frame like other content blocks: the title and compact Open diagram and Share diagram icon buttons share a header row, replacing the separate row with a large Open diagram button. The authored 320px layout still fits a 320px column, print shows the same paper drawing without the frame or actions, and shared output is unchanged. The kit's `IconName` gains `enlarge`. diff --git a/api-report/ui-kit.txt b/api-report/ui-kit.txt index e352a97382..bb953a609a 100644 --- a/api-report/ui-kit.txt +++ b/api-report/ui-kit.txt @@ -1301,6 +1301,7 @@ signatures (every public export and the types it is made of) readonly dismiss: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; readonly down: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; readonly edit: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; + readonly enlarge: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; readonly expand: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; readonly failed: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; readonly file: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; diff --git a/docs/integration-contract/package-api.md b/docs/integration-contract/package-api.md index 3f8a8d19e4..8d34b179de 100644 --- a/docs/integration-contract/package-api.md +++ b/docs/integration-contract/package-api.md @@ -213,6 +213,13 @@ omitted prop or state keeps every existing file default, meaning, state machine, focus and announcement. The kit has no finding-kind prop: callers choose the copy from the action and outcome they hold. +## UI-kit enlarge icon (additive #3397) + +The semantic `IconName` gains `enlarge`: open content in its dedicated +full-size viewer. It draws lucide's `Expand`, the glyph the chat Mermaid block +already uses for Open diagram. The framed diagram renderer's header uses it. +No existing key, glyph or component changes. + ## UI-kit Button reach (additive #3252) `ButtonProps.reach?: boolean`, when the Button has `onClick`, adds the kit's diff --git a/packages/module-diagrams/README.md b/packages/module-diagrams/README.md index 7642c8c09f..75d850b2ad 100644 --- a/packages/module-diagrams/README.md +++ b/packages/module-diagrams/README.md @@ -58,9 +58,15 @@ SVG, PNG or PDF through the existing share path, always using the print palette. Inline figures retain native coordinates so displayed text never shrinks below 9px. A constrained container uses the authored 320px layout when it fits; -otherwise it shows the caption, semantic summary and a 44px Open diagram button. +otherwise it shows the caption and semantic summary. +In chat and file views the figure is one framed content block: the title and +compact Open diagram and Share diagram icon buttons share its header row (44px +targets under a touch pointer). The frame's edge is an inset outline, so a +320px column still fits the authored 320px layout, and the frame replaces the +drawing's own screen edge. Share output embeds the unframed figure. The dedicated viewer starts at readable 100% with explicit pan/zoom controls. -Browser print uses a white, non-interactive drawing without the screen frame. +Browser print uses a white, non-interactive drawing without the screen frame, +the frame or the header actions. ## Ordered axis diagrams diff --git a/packages/module-diagrams/src/ui.tsx b/packages/module-diagrams/src/ui.tsx index 33eea25b64..471d692fe7 100644 --- a/packages/module-diagrams/src/ui.tsx +++ b/packages/module-diagrams/src/ui.tsx @@ -1,7 +1,7 @@ import { groupCallouts, undrawnCalloutExplanation } from "./callouts.js"; import { AXIS_TYPES } from "./spec.js"; import { createElement, useEffect, useId, useMemo, useRef, useState } from "react"; -import { Button } from "@schlessera/brain-ui-kit"; +import { Button, IconButton, color } from "@schlessera/brain-ui-kit"; import type { ContentRendererPack, ContentRendererProps } from "@schlessera/brain-ui-sdk/client"; import { StaticDiagramShareMenu, ZoomViewer, useWikiLinkNavigation } from "@schlessera/brain-ui-react/content-figures"; import { diagramSvgModel, parseDiagram, type DiagramSvgModel, type SvgPrimitive } from "./svg-model.js"; @@ -28,30 +28,46 @@ function Drawing({model,theme,id,interactive=true}: {model:DiagramSvgModel;theme {model.elements.map(render)} ; } -/** Render at native units; never shrink text below the approved 9px floor. */ +/** Frame chrome that only CSS can express: print strips the frame back to the + * unframed paper figure, and the frame replaces the drawing's own screen edge. + * The drawing stays a direct child, at native width, so a 320px column still + * fits the authored 320px layout: the edge is an inset outline, not a border. */ +const FRAME_CSS=`[data-diagram-framed]>svg.bk-diagram{margin:0 auto;border-radius:0 0 11px 11px}[data-diagram-framed]>svg.bk-diagram .bk-diagram-screen-frame{display:none}@media print{[data-diagram-framed]{outline:none!important;border-radius:0!important}[data-diagram-framed]>.bk-diagram-head{padding:0!important;border-bottom:none!important}[data-diagram-framed]>[data-diagram-summary],[data-diagram-framed]>[data-diagram-notes]{padding:0!important}}`; +/** Render at native units; never shrink text below the approved 9px floor. + * Chat and file views frame the figure like other content blocks, with the + * title and the open/share actions in one header. Share output keeps the + * unframed figure it has always embedded. */ export function DiagramContent({source,theme,mode}:ContentRendererProps) { const spec=useMemo(()=>parseDiagram(source),[source]), desktop=useMemo(()=>diagramSvgModel(spec),[spec]); const narrow=useMemo(()=>{try{return spec.layouts?.narrow || (AXIS_TYPES as readonly string[]).includes(spec.type)?diagramSvgModel(spec,"narrow"):null;}catch{return null;}},[spec]); const host=useRef(null), [width,setWidth]=useState(0),[viewer,setViewer]=useState(false),id=useId().replace(/[^a-z0-9-]/gi,""); useEffect(()=>{const element=host.current;if(!element)return;const observer=new ResizeObserver(entries=>setWidth(entries[0]!.contentRect.width));observer.observe(element);setWidth(element.getBoundingClientRect().width);return()=>observer.disconnect();},[]); const model=width>=desktop.tree.viewBox.width ? desktop : narrow&&width>=narrow.tree.viewBox.width?narrow:null; - const renderModel=mode==="share"?desktop:model; - return
+ const renderModel=mode==="share"?desktop:model, framed=mode!=="share", inset=framed?"0 12px":undefined; + const share=toStatic(source,{theme:"print"})}/>; + return
-
{spec.title}
- {renderModel ? : <>

{spec.desc}

{spec.callouts?.length?
{groupCallouts(spec).map(group=>{ + {framed ?
+ {spec.title} + + setViewer(true)}/> + {share} + +
:
{spec.title}
} + {renderModel ? : <>

{spec.desc}

{spec.callouts?.length?
{groupCallouts(spec).map(group=>{ const planned=desktop.elements.flatMap(item=>item.attrs["data-diagram-notes-band"]!==undefined?item.children??[]:[]).find(item=>item.attrs["data-diagram-callout-group"]===group.target); return

{group.name} · {group.indices.length} {group.indices.length===1?"NOTE":"NOTES"}

{planned?.attrs["data-target-drawn"]==="false"?

{undrawnCalloutExplanation(spec,group.target)}

:null}
    {group.indices.map(index=>
  1. {index+1}{spec.callouts![index]!.text}
  2. )}
; })}
:null}} -
+ {framed ? null :
+ {share} +
}
+ {framed ? : null} {viewer&&setViewer(false)} minScale={1} maxFitScale={1} actions={toStatic(source,{theme:"print"})}/>}>}
; } diff --git a/packages/ui-kit/src/primitives/Icon.tsx b/packages/ui-kit/src/primitives/Icon.tsx index 88495e8d56..23f9069ee9 100644 --- a/packages/ui-kit/src/primitives/Icon.tsx +++ b/packages/ui-kit/src/primitives/Icon.tsx @@ -14,8 +14,8 @@ * glyph directly, so swapping `icon` swaps the glyph, with no imperative * escape hatch and no timer. * - * 88 keys, 86 distinct glyphs. Two pairs are aliases — `deny`/`dismiss` both - * render an x, `settings`/`filter` both render sliders — and all 88 are kept. + * 89 keys, 87 distinct glyphs. Two pairs are aliases — `deny`/`dismiss` both + * render an x, `settings`/`filter` both render sliders — and all 89 are kept. * They render identically today but mean different things, and collapsing them * would leave a future icon set unable to tell them apart. * @@ -70,6 +70,7 @@ import { Download, Ellipsis, EllipsisVertical, + Expand, FileImage, FileLock2, FilePenLine, @@ -203,6 +204,8 @@ export const ICONS = { digest: Newspaper, health: ChartColumn, // lucide renames `bar-chart-3`; the semantic key is the kit's vocabulary link: ArrowUpRight, + /** Open content in its dedicated full-size viewer (a diagram's zoom). */ + enlarge: Expand, chat: MessageSquare, wifi: Wifi, battery: BatteryFull, diff --git a/packages/ui-kit/tests/icon-map.test.ts b/packages/ui-kit/tests/icon-map.test.ts index 9f9efdad65..29cdb4ee41 100644 --- a/packages/ui-kit/tests/icon-map.test.ts +++ b/packages/ui-kit/tests/icon-map.test.ts @@ -5,7 +5,7 @@ * of failure into a red build. * * It also pins the key and glyph counts (the port shipped 78 over 76, then 79 over 77; D52 added - * eight session-state keys, 87 over 85; Discovery adds loading, 88 over 86) — so a key lost in a merge is caught, and the + * eight session-state keys, 87 over 85; Discovery adds loading, 88 over 86; framed diagrams add enlarge, 89 over 87) — so a key lost in a merge is caught, and the * two deprecated aliases stay repointed at their canonical exports. */ @@ -23,13 +23,14 @@ describe("icon map", () => { expect(unresolved).toEqual([]); }); - test("all 88 keys survive, over 86 distinct glyphs", () => { + test("all 89 keys survive, over 87 distinct glyphs", () => { // Two pairs are aliases — deny/dismiss and settings/filter. They render // identically today but mean different things, and collapsing them would // leave a future icon set unable to tell them apart. - expect(entries.length).toBe(88); - expect(new Set(entries.map(([, glyph]) => glyph)).size).toBe(86); + expect(entries.length).toBe(89); + expect(new Set(entries.map(([, glyph]) => glyph)).size).toBe(87); expect(ICONS.loading).toBe(lucide.LoaderCircle); + expect(ICONS.enlarge).toBe(lucide.Expand); expect(ICONS.deny).toBe(ICONS.dismiss); expect(ICONS.settings).toBe(ICONS.filter); }); diff --git a/packages/ui-kit/vitest.config.ts b/packages/ui-kit/vitest.config.ts index f6fe7ec27c..ac51a4c59d 100644 --- a/packages/ui-kit/vitest.config.ts +++ b/packages/ui-kit/vitest.config.ts @@ -1,6 +1,6 @@ import { recordingProof } from "../ui-react/tests/browser/offline/recording-proof.ts"; import { conversationServer } from "../ui-react/tests/browser/conversation-server-command.ts"; -import { diagramArtifact, diagramFontStyles, diagramRasterComparison } from "../ui-react/tests/browser/diagram-export-command.ts"; +import { diagramArtifact, diagramFontStyles, diagramRasterComparison, diagramRepaintParity, fullRasterChromiumArgs } from "../ui-react/tests/browser/diagram-export-command.ts"; import { diagramCapture, diagramFixture } from "../ui-react/tests/browser/diagram-proof-command.ts"; import { mermaidMedia, mermaidOutput, mermaidScreenComparison } from "../ui-react/tests/browser/mermaid-proof-command.ts"; import { consumerParityViewport } from "./tests/visual/consumer-parity-viewport.ts"; @@ -138,8 +138,8 @@ export default mergeConfig( include: ["../ui-react/tests/browser/diagrams-*.layout.tsx"], browser: { enabled: true, screenshotFailures: false, - commands: { diagramRasterComparison, diagramFontStyles, diagramArtifact, mermaidScreenComparison, diagramCapture, diagramFixture, overlayMouse, mermaidMedia, mermaidOutput, formConsumerStyles, formViewport }, - provider: playwright({ contextOptions: { reducedMotion: "reduce" } }), + commands: { diagramRasterComparison, diagramRepaintParity, diagramFontStyles, diagramArtifact, mermaidScreenComparison, diagramCapture, diagramFixture, overlayMouse, mermaidMedia, mermaidOutput, formConsumerStyles, formViewport }, + provider: playwright({ contextOptions: { reducedMotion: "reduce" }, launchOptions: { args: fullRasterChromiumArgs } }), headless: true, instances: [{ browser: "chromium" }], }, @@ -152,7 +152,7 @@ export default mergeConfig( include: ["../ui-react/tests/browser/diagrams-*.layout.tsx"], browser: { enabled: true, screenshotFailures: false, - commands: { diagramRasterComparison, diagramFontStyles, diagramArtifact, mermaidScreenComparison, diagramCapture, diagramFixture, overlayMouse, mermaidMedia, mermaidOutput, formConsumerStyles, formViewport }, + commands: { diagramRasterComparison, diagramRepaintParity, diagramFontStyles, diagramArtifact, mermaidScreenComparison, diagramCapture, diagramFixture, overlayMouse, mermaidMedia, mermaidOutput, formConsumerStyles, formViewport }, provider: playwright({ contextOptions: { reducedMotion: "reduce" } }), headless: true, instances: [{ browser: "webkit" }], diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-dark-chromium-linux.png index c967662f8b..8485160a58 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-dark-webkit-linux.png index d16e9f7c1e..9f1cf73284 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-light-chromium-linux.png index f02fb57700..910fc520b8 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-light-webkit-linux.png index 3386a1501a..0b84b6b4c4 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-print-chromium-linux.png index 2085fa1b57..3f0ae3a649 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-print-webkit-linux.png index 76230f8b3a..e6f0481e56 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-gantt-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-320-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-320-dark-chromium-linux.png index 509eb1c14f..67436d0acb 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-320-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-320-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-320-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-320-dark-webkit-linux.png index a92446b930..2a5916b7d2 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-320-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-320-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-alt-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-alt-chromium-linux.png index 50d774f359..c25df7af0b 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-alt-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-alt-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-alt-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-alt-webkit-linux.png index fb25028b42..0688c9cbc5 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-alt-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-alt-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-dark-chromium-linux.png index ac65041626..c720dc9967 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-dark-webkit-linux.png index 037d754432..da8809134d 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-light-chromium-linux.png index db511d2200..284870d91d 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-light-webkit-linux.png index 3da3dbd65f..262ca54092 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-loop-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-loop-chromium-linux.png index 7d6965b489..7c468105c6 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-loop-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-loop-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-loop-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-loop-webkit-linux.png index 8eff562e94..7b56f8e280 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-loop-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-loop-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-opt-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-opt-chromium-linux.png index 57f5a62004..07727930bf 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-opt-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-opt-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-opt-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-opt-webkit-linux.png index 06f5ed7c69..a98cef047b 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-opt-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-opt-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-print-chromium-linux.png index 49728bb24f..1f88241ce1 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-print-webkit-linux.png index 525322e9b0..f9018d4fcd 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-sequence-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-dark-chromium-linux.png index dc2dac8912..45999f64ac 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-dark-webkit-linux.png index a74f0bb85a..9908520f32 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-light-chromium-linux.png index f270de9fc6..9d51a3f035 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-light-webkit-linux.png index 4257f2a59c..22d62af53e 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-print-chromium-linux.png index e51d64870f..8faf52dcf6 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-print-webkit-linux.png index 01b69bf9d6..8b5d3994f8 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-swimlane-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-dark-chromium-linux.png index 804175628c..243cb65637 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-dark-webkit-linux.png index cfe55f9251..ad233c974f 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-light-chromium-linux.png index bcd7a2a170..0751bab06a 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-light-webkit-linux.png index af6d693ba6..37e4901a0a 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-print-chromium-linux.png index b56ee9e316..4f788130c7 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-print-webkit-linux.png index 3b5b678255..97c5b9557e 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-axis.layout.tsx/axis-timeline-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-dark-chromium-linux.png index 8f9d3fcbbc..23e43a78e9 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-dark-webkit-linux.png index 1473ef339f..b74f8edcf0 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-light-chromium-linux.png index 33ad22239c..1bd5d79a70 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-light-webkit-linux.png index 251bf91fa2..4f86834101 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-print-chromium-linux.png index b4509abde8..3e28fc6b4d 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-print-webkit-linux.png index 4da8cb1c44..8de8873c7d 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-containment-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-dark-chromium-linux.png index 1e0c07d817..c5077d5cbe 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-dark-webkit-linux.png index 398bb18901..e8c3fad4de 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-light-chromium-linux.png index dc2305ba3b..a9d4439bee 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-light-webkit-linux.png index bde0d2bd5f..95ce23fd35 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-print-chromium-linux.png index 6db83a5667..82768e801e 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-print-webkit-linux.png index 33dab2ee59..e8b4a8a437 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-architecture-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-dark-chromium-linux.png index 35773c84c5..abe4aa9d31 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-dark-webkit-linux.png index 962dd66088..9ec814d5ea 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-light-chromium-linux.png index 2aa78ad7be..2a548da1bd 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-light-webkit-linux.png index cfaae2c022..ee76d87927 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-print-chromium-linux.png index 75e15ae104..59517a4983 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-print-webkit-linux.png index b862263a8f..e0976d6818 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-dependency-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-dark-chromium-linux.png index 1a4ca95d58..a1fd3ed719 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-dark-webkit-linux.png index d092ddfff8..42bf522419 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-light-chromium-linux.png index 738bc5d3a9..7a2c844aeb 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-light-webkit-linux.png index b628c7ce88..79ef2f8110 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-print-chromium-linux.png index 0f4ec7f21f..c15597cd55 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-print-webkit-linux.png index 171b28cca4..35cb0e91f2 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-er-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-dark-chromium-linux.png index 14d66545ac..98f16e3f70 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-dark-webkit-linux.png index c2b90dc8e4..3108b576b5 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-light-chromium-linux.png index 764fc79ef7..2f3706ed91 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-light-webkit-linux.png index 68e9c77887..2a670c4155 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-print-chromium-linux.png index 74b5960b00..e424b394db 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-print-webkit-linux.png index efa1a7abf1..3d60eb8e14 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-flowchart-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-dark-chromium-linux.png index ac988cbd11..0a92a098e1 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-dark-webkit-linux.png index ff8151e0db..4973fb1d4c 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-light-chromium-linux.png index 18f8082132..1be26cf773 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-light-webkit-linux.png index 7670e735aa..2e54b80bed 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-print-chromium-linux.png index a6b8d38e20..c8e9f435d2 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-print-webkit-linux.png index 65f257ae41..fa1c7d1784 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-state-machine-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-dark-chromium-linux.png index e7f4d13b60..cb457371f3 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-dark-webkit-linux.png index ffb05ea49d..c346af2773 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-light-chromium-linux.png index 422ccadf5b..7bf1bc03dc 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-light-webkit-linux.png index a882684adb..1348b8ee39 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-print-chromium-linux.png index 85b719f5b0..9bc027871e 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-print-webkit-linux.png index 241223644e..e0881937ea 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-node-link.layout.tsx/node-link-tree-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-dark-chromium-linux.png index 320228f4d0..b9bdbceee1 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-dark-webkit-linux.png index 8b0cad0ede..b5fd040299 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-light-chromium-linux.png index 65f091f70d..9bf57c93d6 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-light-webkit-linux.png index 0414c26b8e..8f4db3d2b6 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-print-chromium-linux.png index d5556d2aff..16f3aa1cc8 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-print-webkit-linux.png index 035c8f700c..0a0fdf499e 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-flywheel-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-dark-chromium-linux.png index 74433e515e..8b1a5aa630 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-dark-webkit-linux.png index eee3270a78..93b8044393 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-light-chromium-linux.png index dc00bf9fd0..a69389c0cc 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-light-webkit-linux.png index 1d1cf584ab..7fecc89504 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-print-chromium-linux.png index c17342cd0f..17373dc0cd 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-print-webkit-linux.png index 446e32ed02..fd2e5b55db 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-funnel-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-dark-chromium-linux.png index cfc67ea272..1e53861148 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-dark-webkit-linux.png index 6300612c9c..fd2e439c7f 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-light-chromium-linux.png index 9ebd9ff153..e826856b65 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-light-webkit-linux.png index 8749d5094f..c210705389 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-print-chromium-linux.png index d30c81db28..5da7077da3 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-print-webkit-linux.png index d088d7178d..994a21c9e0 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-layer-stack-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-dark-chromium-linux.png index 63588cae36..34434c699c 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-dark-webkit-linux.png index eed4fa103b..2893782b04 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-light-chromium-linux.png index d90fa85b73..6d7c198f9c 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-light-webkit-linux.png index fbf861f41d..e9ba1d140d 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-print-chromium-linux.png index 1f4dbac0eb..c89d4e4a72 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-print-webkit-linux.png index dca4612cd4..67f9192344 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-loop-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-dark-chromium-linux.png index 31c5f133aa..38f1cdc583 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-dark-webkit-linux.png index 6b8684d93e..edc282300b 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-light-chromium-linux.png index c336afe101..6319107258 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-light-webkit-linux.png index 77273514a6..1227fd9124 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-print-chromium-linux.png index 034498df79..9bf918df28 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-print-webkit-linux.png index 38e061d4f8..eed667fda1 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-pyramid-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-dark-chromium-linux.png index 3e35f4075b..50d762924d 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-dark-webkit-linux.png index 2dad9c4d19..622dbeaa92 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-light-chromium-linux.png index d0fb52e42a..285bd00c4f 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-light-webkit-linux.png index 9c4e2df559..769bb5a23a 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-print-chromium-linux.png index c1dd72f34d..7697167a27 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-print-webkit-linux.png index bf142034f4..0191796685 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-quadrant-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-dark-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-dark-chromium-linux.png index 3690511573..f595a1a47a 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-dark-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-dark-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-dark-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-dark-webkit-linux.png index 0be6e00159..0f53da4001 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-dark-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-dark-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-light-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-light-chromium-linux.png index fdc71984da..42666bc93f 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-light-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-light-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-light-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-light-webkit-linux.png index 008fab37eb..fd0fa490b0 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-light-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-light-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-print-chromium-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-print-chromium-linux.png index 6acd5f2eb6..ed74a90f32 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-print-chromium-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-print-chromium-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-print-webkit-linux.png b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-print-webkit-linux.png index 74e36d2502..b5cb82778c 100644 Binary files a/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-print-webkit-linux.png and b/packages/ui-react/tests/browser/__screenshots__/diagrams-positional.layout.tsx/positional-venn-print-webkit-linux.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/overlay-stacking.pointer.tsx/batch-3-dark-framed-diagram-Open-diagram--target-1.png b/packages/ui-react/tests/browser/__screenshots__/overlay-stacking.pointer.tsx/batch-3-dark-framed-diagram-Open-diagram--target-1.png new file mode 100644 index 0000000000..32e918a53c Binary files /dev/null and b/packages/ui-react/tests/browser/__screenshots__/overlay-stacking.pointer.tsx/batch-3-dark-framed-diagram-Open-diagram--target-1.png differ diff --git a/packages/ui-react/tests/browser/__screenshots__/overlay-stacking.pointer.tsx/batch-3-light-framed-diagram-Open-diagram--target-1.png b/packages/ui-react/tests/browser/__screenshots__/overlay-stacking.pointer.tsx/batch-3-light-framed-diagram-Open-diagram--target-1.png new file mode 100644 index 0000000000..f1ce2efcd9 Binary files /dev/null and b/packages/ui-react/tests/browser/__screenshots__/overlay-stacking.pointer.tsx/batch-3-light-framed-diagram-Open-diagram--target-1.png differ diff --git a/packages/ui-react/tests/browser/diagram-export-command.ts b/packages/ui-react/tests/browser/diagram-export-command.ts index 05b8a34293..c7758b2589 100644 --- a/packages/ui-react/tests/browser/diagram-export-command.ts +++ b/packages/ui-react/tests/browser/diagram-export-command.ts @@ -1,11 +1,11 @@ import assert from "node:assert/strict"; import {diagramFontCss} from "../../../module-diagrams/src/fonts.ts"; /// -import {readFileSync,writeFileSync,mkdirSync,mkdtempSync} from "node:fs"; +import {readFileSync,writeFileSync,mkdirSync,mkdtempSync,rmSync} from "node:fs"; import {createHash} from "node:crypto"; import {resolve,join} from "node:path"; import {zeroRequestReplay} from "../../../ui-kit/tests/visual/zero-request-replay.ts"; -import {chromium} from "playwright"; +import {chromium,type Page} from "playwright"; import type {BrowserCommand} from "vitest/node"; /** Actual optional-renderer CLI in the pinned offline browser environment. */ export const diagramFontStyles:BrowserCommand<[],string>=async()=>diagramFontCss(); @@ -23,7 +23,7 @@ export const diagramArtifact:BrowserCommand<[],unknown>=async(ctx)=>{ for(const format of ["svg","png","pdf"]){const name=`release.${format}`,bytes=readFileSync(resolve(prepared,name));assert.equal(createHash("sha256").update(bytes).digest("hex"),receipt.files[name],"NATIVE_EXPORT_ARTIFACT_CHANGED");writeFileSync(resolve(directory,name),bytes);} const artifacts=receipt.artifacts as {format:string;bytes:number;pixelEquivalent?:boolean}[]; const svg=readFileSync(resolve(directory,"release.svg"),"utf8"),width=Number(/width="([0-9.]+)"/.exec(svg)![1]),height=Number(/height="([0-9.]+)"/.exec(svg)![1]); - const browser=await chromium.launch({headless:true,executablePath:chromium.executablePath(),args:["--disable-gpu"]});const context=await browser.newContext({viewport:{width,height},deviceScaleFactor:2});const page=await context.newPage();const replay=await zeroRequestReplay(page); + const browser=await chromium.launch({headless:true,executablePath:chromium.executablePath(),args:["--disable-gpu",...fullRasterChromiumArgs]});const context=await browser.newContext({viewport:{width,height},deviceScaleFactor:2});const page=await context.newPage();const replay=await zeroRequestReplay(page); try{ await page.setContent(`${svg}`);replay.assert("diagram artifact content");await page.evaluate(()=>document.fonts.ready);replay.assert("diagram artifact fonts");const reference=await page.locator("svg").screenshot();writeFileSync(resolve(directory,"reference.png"),reference); const identical=await page.evaluate(async([actual,expected])=>{const pixels=async(base64:string)=>{const image=new Image();image.src=`data:image/png;base64,${base64}`;await image.decode();const canvas=document.createElement("canvas");canvas.width=image.width;canvas.height=image.height;const ctx=canvas.getContext("2d")!;ctx.drawImage(image,0,0);return ctx.getImageData(0,0,canvas.width,canvas.height).data;};const a=await pixels(actual!),b=await pixels(expected!);return a.length===b.length&&a.every((value,i)=>value===b[i]);},[readFileSync(resolve(directory,"release.png")).toString("base64"),reference.toString("base64")]); @@ -31,11 +31,76 @@ export const diagramArtifact:BrowserCommand<[],unknown>=async(ctx)=>{ }finally{await context.close();await browser.close();} }; declare module "vitest/browser"{interface BrowserCommands{diagramFontStyles():Promise;diagramArtifact():Promise<{format:string;bytes:number;width?:number;height?:number;fonts?:string[];pixelEquivalent?:boolean}[]>;}} +/** Chromium arguments for every diagram comparison browser. A dirty rectangle + * smaller than a raster tile is re-rastered into the tile already painted, and + * curved anti-aliased edges in it then differ by one channel step from a full + * raster. An exact comparison would record each capture's paint history rather + * than its document (#2469). Editorial captures use the same documented flag + * (docs/decisions/approval-capture-raster.md). */ +export const fullRasterChromiumArgs=["--disable-partial-raster"]; +type CaptureState={suffix:string;viewport:{width:number;height:number}|null;devicePixelRatio:number;layout:{width:number;height:number};fonts:{status:string;faces:{family:string;weight:string;style:string;status:string}[]}}; +const sha256=(bytes:Buffer|string)=>createHash("sha256").update(bytes).digest("hex"); +const comparisonDocument=(html:string)=>`${html}`; +/** Load one document at its native size and capture the complete SVG. */ +async function captureNativeSvg(page:Page,replay:Replay,html:string){ + await page.setContent(comparisonDocument(html));replay.assert("diagram comparison content"); + const size=await page.locator("svg").evaluate(element=>{const box=element.getBoundingClientRect();return {width:Math.ceil(box.width),height:Math.ceil(box.height),nativeWidth:Number(element.getAttribute("width")),nativeHeight:Number(element.getAttribute("height"))};}); + assert(size.width>0&&size.height>0,"NATIVE_CAPTURE_NONZERO");assert.equal(size.width,size.nativeWidth,"NATIVE_CAPTURE_FULL_WIDTH");assert.equal(size.height,size.nativeHeight,"NATIVE_CAPTURE_FULL_HEIGHT"); + await page.setViewportSize({width:size.width,height:size.height});await page.evaluate(()=>document.fonts.ready);replay.assert("diagram comparison fonts"); + const fonts=await page.evaluate(()=>({status:document.fonts.status,faces:[...document.fonts].map(face=>({family:face.family,weight:face.weight,style:face.style,status:face.status}))})); + const capture=await page.locator("svg").screenshot(),ratio=await page.evaluate(()=>devicePixelRatio); + assert.equal(capture.readUInt32BE(16),Math.round(size.width*ratio),"CAPTURE_PNG_FULL_WIDTH");assert.equal(capture.readUInt32BE(20),Math.round(size.height*ratio),"CAPTURE_PNG_FULL_HEIGHT"); + return {capture,state:{viewport:page.viewportSize(),devicePixelRatio:ratio,layout:{width:size.width,height:size.height},fonts}}; +} +/** Decode both PNGs in the browser, as the artifact parity check does, and locate differing pixels. */ +async function decodedDifference(page:Page,before:Buffer,after:Buffer){ + return page.evaluate(async([a,b])=>{ + const pixels=async(base64:string)=>{const image=new Image();image.src=`data:image/png;base64,${base64}`;await image.decode();const canvas=document.createElement("canvas");canvas.width=image.width;canvas.height=image.height;const context=canvas.getContext("2d")!;context.drawImage(image,0,0);return {width:image.width,height:image.height,data:context.getImageData(0,0,image.width,image.height).data};}; + const x=await pixels(a!),y=await pixels(b!); + if(x.width!==y.width||x.height!==y.height)return {sameDimensions:false,differingPixels:null,bounds:null,maxChannelDelta:null}; + let differingPixels=0,maxChannelDelta=0,left=x.width,top=x.height,right=0,bottom=0; + for(let i=0;i{const file=`${name}-${state.suffix}.html`,html=comparisonDocument(documents[i]!);writeFileSync(resolve(directory,file),html);return {suffix:state.suffix,file,sha256:sha256(html),bytes:Buffer.byteLength(html)};}); + const encoded=captures.map((capture,i)=>({suffix:states[i]!.suffix,file:`${name}-${states[i]!.suffix}.png`,sha256:sha256(capture),bytes:capture.length,width:capture.readUInt32BE(16),height:capture.readUInt32BE(20)})); + const receipt={version:1,name,engine,browserVersion:version,configuredLaunchArguments:engine==="chromium"?fullRasterChromiumArgs:[],captureOrder:states.map(state=>state.suffix),encoded:{equal:false,captures:encoded},decoded:{equal:decoded.differingPixels===0,...decoded},captures:states,markup}; + writeFileSync(resolve(directory,`${name}-parity.json`),`${JSON.stringify(receipt,null,1)}\n`); + console.error(`DIAGRAM_RASTER_PARITY ${engine} ${name}: encoded ${encoded.map(c=>`${c.suffix}=${c.sha256.slice(0,12)} ${c.width}x${c.height}`).join(" ")}; decoded ${decoded.sameDimensions?`${decoded.differingPixels} differing pixels, bounds ${JSON.stringify(decoded.bounds)}, max channel delta ${decoded.maxChannelDelta}`:"dimensions differ"}; fonts ${states.map(state=>`${state.suffix}=${state.fonts.status}`).join(" ")}; receipt ${name}-parity.json`); +} +type Replay=Awaited>; /** Compare the complete native SVG, including content outside ordinary viewports. */ export const diagramRasterComparison:BrowserCommand<[string,string,string],boolean>=async(ctx,name,before,after)=>{ + if(!/^[a-z0-9-]+$/.test(name))throw Error("Invalid diagram proof name"); + const browser=ctx.context.browser()!,engine=browser.browserType().name(),directory=resolve("../../tmp/diagram-export-proof",engine); + const page=await ctx.context.newPage();const replay=await zeroRequestReplay(page);const captures:Buffer[]=[],states:CaptureState[]=[]; + try{ + for(const [suffix,html] of [["before",before],["after",after]] as const){const {capture,state}=await captureNativeSvg(page,replay,html);mkdirSync(directory,{recursive:true});writeFileSync(resolve(directory,`${name}-${suffix}.png`),capture);replay.assert("diagram comparison capture");captures.push(capture);states.push({suffix,...state});} + const equal=captures[0]!.equals(captures[1]!); + for(const stale of [`${name}-parity.json`,`${name}-before.html`,`${name}-after.html`])rmSync(resolve(directory,stale),{force:true}); + if(!equal)await recordParityFailure(page,replay,directory,name,engine,browser.version(),[before,after],captures,states); + return equal; + }finally{await page.close();} +}; +/** Repaint a strip narrower than a raster tile over an already painted SVG, + * then capture again. The second capture must equal the first: a comparison + * may not depend on which regions an earlier frame happened to repaint. */ +export const diagramRepaintParity:BrowserCommand<[string,string],boolean>=async(ctx,name,html)=>{ if(!/^[a-z0-9-]+$/.test(name))throw Error("Invalid diagram proof name"); const directory=resolve("../../tmp/diagram-export-proof",ctx.context.browser()!.browserType().name()); - const page=await ctx.context.newPage();const replay=await zeroRequestReplay(page);const captures:Buffer[]=[]; - try{for(const [suffix,html] of [["before",before],["after",after]]){await page.setContent(`${html}`);replay.assert("diagram comparison content");const size=await page.locator("svg").evaluate(element=>{const box=element.getBoundingClientRect();return {width:Math.ceil(box.width),height:Math.ceil(box.height),nativeWidth:Number(element.getAttribute("width")),nativeHeight:Number(element.getAttribute("height"))};});assert(size.width>0&&size.height>0,"NATIVE_CAPTURE_NONZERO");assert.equal(size.width,size.nativeWidth,"NATIVE_CAPTURE_FULL_WIDTH");assert.equal(size.height,size.nativeHeight,"NATIVE_CAPTURE_FULL_HEIGHT");await page.setViewportSize({width:size.width,height:size.height});await page.evaluate(()=>document.fonts.ready);replay.assert("diagram comparison fonts");const capture=await page.locator("svg").screenshot(),ratio=await page.evaluate(()=>devicePixelRatio);assert.equal(capture.readUInt32BE(16),Math.round(size.width*ratio),"CAPTURE_PNG_FULL_WIDTH");assert.equal(capture.readUInt32BE(20),Math.round(size.height*ratio),"CAPTURE_PNG_FULL_HEIGHT");mkdirSync(directory,{recursive:true});writeFileSync(resolve(directory,`${name}-${suffix}.png`),capture);replay.assert("diagram comparison capture");captures.push(capture);}return captures[0]!.equals(captures[1]!);}finally{await page.close();} + const page=await ctx.context.newPage();const replay=await zeroRequestReplay(page); + const frames=()=>page.evaluate(()=>new Promise(done=>requestAnimationFrame(()=>requestAnimationFrame(()=>done())))); + try{ + const {capture:full}=await captureNativeSvg(page,replay,html); + await page.evaluate(()=>{const box=document.querySelector("svg")!.getBoundingClientRect(),strip=document.createElement("div");strip.id="repaint-strip";strip.style.cssText=`position:absolute;left:${box.width-116}px;top:0;width:116px;height:${box.height}px;background:#f00`;document.body.append(strip);}); + await frames();await page.screenshot();await page.evaluate(()=>document.getElementById("repaint-strip")!.remove());await frames(); + const repainted=await page.locator("svg").screenshot();replay.assert("diagram repaint capture"); + mkdirSync(directory,{recursive:true});writeFileSync(resolve(directory,`${name}-full.png`),full);writeFileSync(resolve(directory,`${name}-repainted.png`),repainted); + return full.equals(repainted); + }finally{await page.close();} }; -declare module "vitest/browser"{interface BrowserCommands{diagramRasterComparison(name:string,before:string,after:string):Promise;}} +declare module "vitest/browser"{interface BrowserCommands{diagramRasterComparison(name:string,before:string,after:string):Promise;diagramRepaintParity(name:string,html:string):Promise;}} diff --git a/packages/ui-react/tests/browser/diagrams-axis.layout.tsx b/packages/ui-react/tests/browser/diagrams-axis.layout.tsx index 7c12de1a18..c1375c934e 100644 --- a/packages/ui-react/tests/browser/diagrams-axis.layout.tsx +++ b/packages/ui-react/tests/browser/diagrams-axis.layout.tsx @@ -22,7 +22,7 @@ for(const [kind,spec] of Object.entries(axisExamples))test(`${kind} real light d }); test("sequence uses readable derived phone layout and unsafe content opens the full viewer",async()=>{ setup(320);mount(JSON.stringify(axisExamples.sequence),"dark");await ready();const svg=host.querySelector('figure>svg')!;expect(svg.viewBox.baseVal.width).toBe(320);inspect(svg);expect(host.scrollWidth).toBeLessThanOrEqual(320);await expect(page.elementLocator(host)).toMatchScreenshot("axis-sequence-320-dark");await commands.diagramCapture('[data-content-renderer="diagram"]',"axis-sequence-320-dark"); - const unsafe=structuredClone(axisExamples.sequence);unsafe.nodes.push({id:"penelope",label:"Penelope"},{id:"athena",label:"Athena"});mount(JSON.stringify(unsafe),"light");await expect.poll(()=>host.querySelector('[data-diagram-summary]')).not.toBeNull();expect(host.querySelector('figure>svg')).toBeNull();const opener=[...host.querySelectorAll('[role="button"],button')].find(b=>b.textContent==="Open diagram")!;expect(opener.getBoundingClientRect().height).toBeGreaterThanOrEqual(44);await userEvent.click(opener);await expect.poll(()=>document.querySelector('[aria-label="Diagram viewer"] svg.bk-diagram')).not.toBeNull();inspect(document.querySelector('[aria-label="Diagram viewer"] svg.bk-diagram')!);await userEvent.keyboard("{Escape}"); + const unsafe=structuredClone(axisExamples.sequence);unsafe.nodes.push({id:"penelope",label:"Penelope"},{id:"athena",label:"Athena"});mount(JSON.stringify(unsafe),"light");await expect.poll(()=>host.querySelector('[data-diagram-summary]')).not.toBeNull();expect(host.querySelector('figure>svg')).toBeNull();const opener=host.querySelector('button[aria-label="Open diagram"]')!;expect(opener.getBoundingClientRect().height).toBeGreaterThanOrEqual(matchMedia("(any-pointer: coarse)").matches?44:28);await userEvent.click(opener);await expect.poll(()=>document.querySelector('[aria-label="Diagram viewer"] svg.bk-diagram')).not.toBeNull();inspect(document.querySelector('[aria-label="Diagram viewer"] svg.bk-diagram')!);await userEvent.keyboard("{Escape}"); }); test("axis handoff masks clear every step and tips attach at the boundary",async()=>{ diff --git a/packages/ui-react/tests/browser/diagrams-callouts.layout.tsx b/packages/ui-react/tests/browser/diagrams-callouts.layout.tsx index c41714f181..ad848c90d1 100644 --- a/packages/ui-react/tests/browser/diagrams-callouts.layout.tsx +++ b/packages/ui-react/tests/browser/diagrams-callouts.layout.tsx @@ -205,7 +205,7 @@ for (const theme of ["light", "dark", "print"] as const) test(`semantic-only and for (const theme of ["light", "dark"] as const) test(`summary groups all source notes and semantic explanation ${theme}`, async () => { const spec = { ...calloutsSpec, callouts: [{ target: "odysseus", text: "Prepare provisions" }, { target: "ledger", text: "Read the ledger" }, { target: "odysseus", text: "Return to Ithaca" }] }; mount(JSON.stringify(spec), 300, theme); await expect.poll(() => host.querySelector("[data-diagram-notes]")).not.toBeNull(); - expect(host.querySelectorAll("[data-diagram-notes] section")).toHaveLength(2); const rows = [...host.querySelectorAll("[data-diagram-notes] li")]; expect(rows.map(row => row.value)).toEqual([1, 3, 2]); expect(rows.map(row => row.querySelector("[data-callout-text]")!.textContent)).toEqual(["Prepare provisions", "Return to Ithaca", "Read the ledger"]); expect([...host.querySelectorAll("button,[role=button]")].some(button => button.textContent === "Open diagram")).toBe(true); + expect(host.querySelectorAll("[data-diagram-notes] section")).toHaveLength(2); const rows = [...host.querySelectorAll("[data-diagram-notes] li")]; expect(rows.map(row => row.value)).toEqual([1, 3, 2]); expect(rows.map(row => row.querySelector("[data-callout-text]")!.textContent)).toEqual(["Prepare provisions", "Return to Ithaca", "Read the ledger"]); expect(host.querySelector('button[aria-label="Open diagram"]')).not.toBeNull(); for(const row of rows){const index=row.querySelector("[data-callout-index]")!;expect(index.textContent).toBe(String(row.value));expect(index.getBoundingClientRect().width,"VISIBLE_SUMMARY_SOURCE_INDEX").toBeGreaterThan(0);expect(getComputedStyle(index).visibility).toBe("visible");} await commands.diagramCapture('[data-content-renderer="diagram"]', `callouts-summary-${theme}`); }); diff --git a/packages/ui-react/tests/browser/diagrams-export.layout.tsx b/packages/ui-react/tests/browser/diagrams-export.layout.tsx index 999aeebe8a..077eab6dee 100644 --- a/packages/ui-react/tests/browser/diagrams-export.layout.tsx +++ b/packages/ui-react/tests/browser/diagrams-export.layout.tsx @@ -20,6 +20,7 @@ test("authored literal var text survives SVG parsing",()=>{ }); test("real optional renderer writes keyless PNG and one-page PDF",async()=>{const artifacts=await commands.diagramArtifact();expect(artifacts.map(a=>a.format)).toEqual(["png","pdf"]);expect(artifacts.every(a=>a.bytes>1000)).toBe(true);expect(artifacts.find(a=>a.format==="png")!.pixelEquivalent,"EXPORTED_PNG_LOCKED_FONT_PIXEL_PARITY").toBe(true);expect(artifacts.find(a=>a.format==="pdf")!.fonts).toEqual(["JetBrainsMono","PlusJakartaSans"]);},60000); for(const theme of ["light","dark","print"] as const)test(`authored free layout ${theme} flattened paint retains exact pixels`,async()=>{const source=await commands.diagramFixture();expect(await commands.diagramRasterComparison(`export-free-${theme}`,fonts+await toStatic(source,{theme}),fonts+toFlatSvg(source,theme)),"FLATTENED_STATIC_RASTER_PARITY").toBe(true);}); +test("authored free layout capture does not depend on an earlier partial repaint",async()=>{const source=await commands.diagramFixture();expect(await commands.diagramRepaintParity("export-free-repaint",fonts+toFlatSvg(source,"light")),"PARTIAL_REPAINT_RASTER_PARITY").toBe(true);}); import {flattenPaint} from "../../../module-diagrams/src/flatten.js"; import {DIAGRAM_TOKEN_CSS,diagramInkRamp} from "../../../module-diagrams/src/skin.js"; for(const theme of ["light","dark","print"] as const)test(`${theme} all generated opaque ink ramps flatten to exact browser pixels`,async()=>{const ramps=([25,50,75,100] as const).map((step,i)=>({x:i*100,fill:diagramInkRamp(step)})),rects=(flat:boolean)=>ramps.map(({x,fill})=>``).join("");const original=`${rects(false)}`,flat=`${rects(true)}`;expect(await commands.diagramRasterComparison(`export-ramps-${theme}`,original,flat),"GENERATED_INK_RAMP_RASTER_PARITY").toBe(true);}); diff --git a/packages/ui-react/tests/browser/diagrams-frame.layout.tsx b/packages/ui-react/tests/browser/diagrams-frame.layout.tsx new file mode 100644 index 0000000000..eff422429c --- /dev/null +++ b/packages/ui-react/tests/browser/diagrams-frame.layout.tsx @@ -0,0 +1,133 @@ +// #3397: a rendered diagram is one framed content block. Its title and the +// open/share actions share a header row inside the frame, the drawing keeps its +// native width (so a 320px column still fits the authored 320px layout), and +// print strips the frame back to the paper figure. +import { afterAll, afterEach, beforeAll, expect, test } from "vitest"; +import { commands, page, userEvent } from "vitest/browser"; +import { flushSync } from "react-dom"; +import { createRoot, type Root } from "react-dom/client"; +import { DiagramContent } from "../../../module-diagrams/src/ui.js"; +import { BrainUiProvider, createBrainUiRoot, type BrainUiRoot } from "@schlessera/brain-ui-react"; +import { CONTROL_RING, ring } from "../../../ui-kit/stories/_stage.js"; + +let host: HTMLDivElement, render: Root, root: BrainUiRoot, styles: HTMLStyleElement, viewport: { width: number; height: number }, frameViewport: { width: number; height: number }; +const originalTheme = document.documentElement.dataset.theme; +const LONG = "Odysseus relays each harbour, muster and ledger to Ithaca"; // the spec's 60-character title maximum +beforeAll(async () => { + frameViewport = { width: innerWidth, height: innerHeight }; + viewport = await commands.formViewport(1400, 1700); await page.viewport(1340, 1600); + styles = document.createElement("style"); styles.dataset.diagramCaptureConsumer = ""; styles.textContent = await commands.formConsumerStyles(); document.head.append(styles); +}); +afterAll(async () => { styles?.remove(); await page.viewport(frameViewport.width, frameViewport.height); await commands.formViewport(viewport.width - 100, viewport.height - 120); }); +afterEach(async () => { await commands.mermaidMedia("screen"); if (render) flushSync(() => render.unmount()); root?.dispose(); host?.remove(); document.documentElement.dataset.theme = originalTheme; }); + +function mount(width: number, theme: "light" | "dark", source: string) { + document.documentElement.dataset.theme = theme; + root = createBrainUiRoot({ storage: null, request: async () => Response.json({ renderers: [], enabled: [] }) }); + host = document.createElement("div"); host.style.width = `${width}px`; document.body.append(host); render = createRoot(host); + flushSync(() => render.render()); +} +const parts = () => { + const figure = host.querySelector('figure[data-content-renderer="diagram"]')!; + const head = figure.querySelector(":scope > figcaption.bk-diagram-head")!; + return { + figure, head, + title: head.querySelector("[data-diagram-title]")!, + open: head.querySelector('button[aria-label="Open diagram"]')!, + share: head.querySelector('button[aria-label="Share diagram"]')!, + svg: figure.querySelector(":scope > svg.bk-diagram"), + }; +}; + +/** One frame, title left and actions right in the header, nothing overflowing. */ +function assertFrame(width: number) { + const { figure, head, title, open, share, svg } = parts(); + const frame = figure.getBoundingClientRect(), header = head.getBoundingClientRect(); + const style = getComputedStyle(figure); + expect(style.outlineStyle, "FRAME_EDGE").toBe("solid"); + expect(style.borderTopLeftRadius, "FRAME_RADIUS").toBe("12px"); + expect(figure.querySelectorAll("figure,[data-kit-code-block]"), "NO_NESTED_FRAME").toHaveLength(0); + if (svg) expect(getComputedStyle(svg.querySelector(".bk-diagram-screen-frame")!).display, "NO_DOUBLED_INNER_BORDER").toBe("none"); + expect(head, "HEADER_IS_FIRST_ROW").toBe(figure.querySelector("figcaption")); + expect(getComputedStyle(head).borderBottomStyle, "HEADER_RULE").toBe("solid"); + expect(figure.getAttribute("aria-labelledby"), "FIGURE_NAMED_BY_TITLE_ONLY").toBe(title.id); + const t = title.getBoundingClientRect(), o = open.getBoundingClientRect(), s = share.getBoundingClientRect(); + expect(t.left, "TITLE_LEFT").toBeLessThan(o.left); + expect(t.right, "TITLE_CLEARS_ACTIONS").toBeLessThanOrEqual(o.left); + expect(o.right, "OPEN_BEFORE_SHARE").toBeLessThanOrEqual(s.left); + for (const [name, r] of [["open", o], ["share", s]] as const) { + expect(r.right, `ACTION_INSIDE_FRAME ${name}`).toBeLessThanOrEqual(frame.right); + expect(r.top, `ACTION_IN_HEADER ${name}`).toBeGreaterThanOrEqual(header.top); + expect(r.bottom, `ACTION_IN_HEADER ${name}`).toBeLessThanOrEqual(header.bottom); + expect(r.height, `ACTION_TARGET ${name}`).toBeGreaterThanOrEqual(matchMedia("(any-pointer: coarse)").matches ? 44 : 28); + } + expect(frame.right - s.right, "ACTIONS_HUG_RIGHT").toBeLessThanOrEqual(8); + expect(host.scrollWidth, "NO_HORIZONTAL_OVERFLOW").toBeLessThanOrEqual(width); + expect(figure.scrollWidth, "FRAME_NO_OVERFLOW").toBeLessThanOrEqual(figure.clientWidth); + expect(head.scrollWidth, "HEADER_NO_OVERFLOW").toBeLessThanOrEqual(head.clientWidth); +} + +for (const width of [320, 1280]) for (const theme of ["light", "dark"] as const) { + test(`framed diagram at ${width}px ${theme}: one frame, header title and actions, native drawing`, async () => { + mount(width, theme, await commands.diagramFixture()); + await expect.poll(() => parts().svg).not.toBeNull(); await document.fonts.ready; + const { svg, figure } = parts(); + expect(svg!.getAttribute("width"), "NATIVE_LAYOUT_STILL_FITS").toBe(width === 320 ? "320" : "716"); + expect(svg!.getBoundingClientRect().width).toBeLessThanOrEqual(figure.getBoundingClientRect().width); + assertFrame(width); + await page.screenshot({ element: host, path: `../../.vitest-attachments/diagram-frame/${theme}-${width}.png` }); + + const spec = JSON.parse(await commands.diagramFixture()); spec.title = LONG; + flushSync(() => render.render()); + await expect.poll(() => parts().title.textContent).toBe(LONG); + assertFrame(width); + if (width === 320) expect(parts().title.getBoundingClientRect().height, "LONG_TITLE_WRAPS").toBeGreaterThan(30); + await page.screenshot({ element: host, path: `../../.vitest-attachments/diagram-frame/${theme}-${width}-long-title.png` }); + }); +} + +test("the semantic fallback keeps the same frame and header at 320px", async () => { + const spec = JSON.parse(await commands.diagramFixture()); delete spec.layouts; + mount(320, "dark", JSON.stringify(spec)); + await expect.poll(() => host.querySelector("[data-diagram-summary]")).not.toBeNull(); + expect(parts().svg).toBeNull(); + assertFrame(320); + const summary = host.querySelector("[data-diagram-summary]")!, range = document.createRange(); range.selectNodeContents(summary); + expect(range.getBoundingClientRect().left - parts().figure.getBoundingClientRect().left, "SUMMARY_TEXT_INSET").toBeGreaterThanOrEqual(12); + await page.screenshot({ element: host, path: "../../.vitest-attachments/diagram-frame/dark-320-fallback.png" }); +}); + +test("header actions are keyboard reachable with visible focus, and open and share behave as before", async () => { + mount(1280, "light", await commands.diagramFixture()); + await expect.poll(() => parts().svg).not.toBeNull(); + const before = document.createElement("button"); before.textContent = "Before"; host.prepend(before); before.focus(); + await userEvent.keyboard("{Tab}"); + const { open, share } = parts(); + expect(document.activeElement, "TAB_REACHES_OPEN").toBe(open); + expect(ring(open), "OPEN_FOCUS_RING").toEqual(CONTROL_RING); + await userEvent.keyboard("{Tab}"); + expect(document.activeElement, "TAB_REACHES_SHARE").toBe(share); + expect(ring(share), "SHARE_FOCUS_RING").toEqual(CONTROL_RING); + await userEvent.keyboard("{Enter}"); + await expect.poll(() => [...host.querySelectorAll('[role="menuitem"]')].map(item => item.textContent)).toEqual(["Image (PNG)", "PDF", "Vector (SVG)"]); + await userEvent.keyboard("{Escape}"); + await expect.poll(() => host.querySelector('[role="menu"]')).toBeNull(); + open.focus(); await userEvent.keyboard("{Enter}"); + await expect.poll(() => document.querySelector('[aria-label="Diagram viewer"] svg.bk-diagram')).not.toBeNull(); + await userEvent.keyboard("{Escape}"); + await expect.poll(() => document.querySelector('[aria-label="Diagram viewer"]')).toBeNull(); +}); + +test("print strips the frame and header actions and shows only the paper drawing", async () => { + mount(1280, "dark", await commands.diagramFixture()); + await expect.poll(() => parts().svg).not.toBeNull(); + await commands.mermaidMedia("print"); + const { figure, head, title, svg } = parts(); + expect(getComputedStyle(figure).outlineStyle, "PRINT_NO_FRAME").toBe("none"); + expect(getComputedStyle(head).borderBottomStyle, "PRINT_NO_HEADER_RULE").toBe("none"); + expect(getComputedStyle(head.querySelector(".bk-diagram-controls")!).display, "PRINT_HIDES_ACTIONS").toBe("none"); + expect(getComputedStyle(title).display, "PRINT_KEEPS_TITLE").not.toBe("none"); + expect(getComputedStyle(svg!).display, "PRINT_HIDES_SCREEN_DRAWING").toBe("none"); + expect(getComputedStyle(figure.querySelector(".bk-diagram-print")!).display, "PRINT_SHOWS_PAPER_DRAWING").toBe("block"); + expect(getComputedStyle(figure.querySelector(".bk-diagram-print svg")!).backgroundColor).toBe("rgb(255, 255, 255)"); +}); diff --git a/packages/ui-react/tests/browser/diagrams-positional.layout.tsx b/packages/ui-react/tests/browser/diagrams-positional.layout.tsx index 807f278d2b..172e905a1c 100644 --- a/packages/ui-react/tests/browser/diagrams-positional.layout.tsx +++ b/packages/ui-react/tests/browser/diagrams-positional.layout.tsx @@ -35,7 +35,7 @@ for(const [type,source]of Object.entries(examples))test(`${type}: approved skin test("linked positional node stays operable inline and in a readable 320px fallback viewer",async()=>{ const spec=JSON.parse(quadrant);spec.nodes[0].link="[[raft-build]]";const source=JSON.stringify(spec);mount(source,"light");root.stores.file.setState({wikilinkMap:{"raft-build":"notes/raft-build.md"},wikilinkLoaded:true});const paths:string[]=[];root.stores.file.setState({openFile:async(path)=>{paths.push(path);}});let svg=await drawing(); let node=svg.querySelector('[data-diagram-node="sail"]')!;node.focus();await expect.poll(()=>document.activeElement).toBe(node);expect(getComputedStyle(node.querySelector('.bk-diagram-node-focus')!).visibility).toBe("visible");await userEvent.keyboard("{Enter}");expect(paths).toEqual(["notes/raft-build.md"]);const nameBox=svg.querySelector('[data-diagram-shape="sail-label"]')!.getBoundingClientRect(),point={x:nameBox.x+nameBox.width/2,y:nameBox.y+nameBox.height/2};expect(node.contains(document.elementFromPoint(point.x,point.y)),"POSITIONAL_NAME_HIT_TARGET").toBe(true);await commands.overlayMouse(point);expect(paths,"POSITIONAL_NAME_CLICK_NAVIGATES").toEqual(["notes/raft-build.md","notes/raft-build.md"]); - host.style.width="320px";await expect.poll(()=>host.querySelector('[data-diagram-summary]')).not.toBeNull();expect(host.querySelector('figure > svg')).toBeNull();await userEvent.click([...host.querySelectorAll('button,[role="button"]')].find(button=>button.textContent==="Open diagram")!); + host.style.width="320px";await expect.poll(()=>host.querySelector('[data-diagram-summary]')).not.toBeNull();expect(host.querySelector('figure > svg')).toBeNull();await userEvent.click(host.querySelector('button[aria-label="Open diagram"]')!); await expect.poll(()=>document.querySelector('[aria-label="Diagram viewer"] svg.bk-diagram')).not.toBeNull();svg=document.querySelector('[aria-label="Diagram viewer"] svg.bk-diagram')!;expect(svg.querySelectorAll("text").length).toBeGreaterThan(0);for(const text of svg.querySelectorAll("text")){const matrix=text.getScreenCTM()!;expect(parseFloat(getComputedStyle(text).fontSize)*Math.hypot(matrix.a,matrix.b)).toBeGreaterThanOrEqual(9);}node=svg.querySelector('[data-diagram-node="sail"]')!;node.focus();await expect.poll(()=>document.activeElement).toBe(node);await userEvent.keyboard("{Enter}");expect(paths).toEqual(["notes/raft-build.md","notes/raft-build.md","notes/raft-build.md"]);await userEvent.keyboard("{Escape}"); }); diff --git a/packages/ui-react/tests/browser/diagrams-renderer.layout.tsx b/packages/ui-react/tests/browser/diagrams-renderer.layout.tsx index 55953b3343..5a87f72168 100644 --- a/packages/ui-react/tests/browser/diagrams-renderer.layout.tsx +++ b/packages/ui-react/tests/browser/diagrams-renderer.layout.tsx @@ -33,7 +33,7 @@ test("actual constrained containers select authored layout or semantic fallback, setup(720);mount();await ready();expect(screenSvg()!.dataset.diagramLayout).toBe("narrow");fontFloor(screenSvg()!); for(const width of [320,480,900]){host.style.width=`${width}px`;await expect.poll(()=>screenSvg()?.getBoundingClientRect().width).toBe(320);fontFloor(screenSvg()!);expect(host.scrollWidth).toBeLessThanOrEqual(width);} const absent=structuredClone(rendererSpec);delete (absent as {layouts?:unknown}).layouts;host.style.width="320px";mount();await expect.poll(()=>screenSvg()).toBeNull();expect(host.querySelector("[data-diagram-summary]")?.textContent).toBe(rendererSpec.desc); - const opener=[...host.querySelectorAll("[role=button],button")].find(item=>item.textContent==="Open diagram")!;expect(opener.getBoundingClientRect().height).toBeGreaterThanOrEqual(44);await userEvent.click(opener); + const opener=host.querySelector('button[aria-label="Open diagram"]')!;expect(opener.getBoundingClientRect().height).toBeGreaterThanOrEqual(matchMedia("(any-pointer: coarse)").matches?44:28);await userEvent.click(opener); await expect.poll(()=>document.querySelector('[aria-label="Diagram viewer"] svg.bk-diagram')).not.toBeNull();const drawing=document.querySelector('[aria-label="Diagram viewer"] svg.bk-diagram')!;expect([...drawing.querySelectorAll("[data-diagram-node] text")].map(text=>text.textContent),"EXPECTED_VIEWER_NODE_LABELS").toEqual(expect.arrayContaining(rendererSpec.nodes.map(node=>node.label)));fontFloor(drawing);await userEvent.keyboard("{Escape}"); }); test("keyboard nodes navigate like wiki links and incident edges and focus ring remain visible",async()=>{ @@ -72,7 +72,7 @@ test("320px viewer brings an offscreen linked keyboard target into view before n const previous=await commands.formViewport(320,720); try{ setup(320);const paths:string[]=[];root.stores.file.setState({openFile:async(path)=>{paths.push(path);}});const absent=structuredClone(rendererSpec);delete (absent as {layouts?:unknown}).layouts; - mount();await expect.poll(()=>host.querySelector("[data-diagram-summary]")).not.toBeNull();await userEvent.click(host.querySelector('[role="button"]')!); + mount();await expect.poll(()=>host.querySelector("[data-diagram-summary]")).not.toBeNull();await userEvent.click(host.querySelector('button[aria-label="Open diagram"]')!); await expect.poll(()=>document.querySelector('[aria-label="Diagram viewer"] [data-diagram-node="raft"]')).not.toBeNull(); const node=document.querySelector('[aria-label="Diagram viewer"] [data-diagram-node="raft"]')!; const stage=node.closest("svg")!.parentElement!.parentElement!;const before=node.getBoundingClientRect(),bounds=stage.getBoundingClientRect();expect(before.leftbounds.right,"CONTROL_NODE_STARTS_OFFSCREEN").toBe(true); diff --git a/packages/ui-react/tests/browser/overlay-stacking.pointer.tsx b/packages/ui-react/tests/browser/overlay-stacking.pointer.tsx index 150398ed9a..7860d1e870 100644 --- a/packages/ui-react/tests/browser/overlay-stacking.pointer.tsx +++ b/packages/ui-react/tests/browser/overlay-stacking.pointer.tsx @@ -16,6 +16,8 @@ import { FileViewerRaw } from "../../src/components/files/file-viewer-raw.js"; import { CopyButton } from "../../src/components/chat/copy-button.js"; import { MarkdownPre } from "../../src/components/chat/brain-markdown-code.js"; import { MermaidBlock } from "../../src/components/chat/mermaid-block.js"; +import { DiagramContent } from "../../../module-diagrams/src/ui.js"; +import { rendererSpec } from "../../../module-diagrams/tests/fixtures/renderer-fixture.js"; import { ZoomableImage } from "../../src/components/images/zoomable-image.js"; import { SubagentView } from "../../src/components/chat/subagent-view.js"; import { TrackChip } from "../../src/components/chat/track-chip.js"; @@ -448,6 +450,8 @@ const controls: { site: string; name: string | RegExp; view: ReactNode; row?: bo { site: "code head copy", name: "Copy", view: {output} }, { site: "image expand", name: "Open image", view: , sm: true, reveal: true }, ...["Open diagram", "Share diagram", "Show source", "Copy"].map(name => ({ site: `diagram ${name}`, name, view: , sm: true, reveal: true })), + // #3397: the framed diagram renderer's header actions. + ...["Open diagram", "Share diagram"].map(name => ({ site: `framed diagram ${name}`, name, view: , sm: true })), { site: "subagent back", name: "Back", view: ()} />, sm: true }, { site: "track retry", name: "Retry ithaca.gpx", view: }, { site: "track remove", name: "Remove ithaca.gpx", view: }, diff --git a/scripts/bound-browser-runtime-inputs.ts b/scripts/bound-browser-runtime-inputs.ts index ffdb4e954a..04dc53555c 100644 --- a/scripts/bound-browser-runtime-inputs.ts +++ b/scripts/bound-browser-runtime-inputs.ts @@ -42,10 +42,11 @@ const declarations = [ } }, { + // #2469 re-audit: the caller adds raster-parity diagnostics and a repaint command; its sole owner edge (`diagramFontCss`) and argument-free `diagramFontStyles` call are unchanged. "owner": "packages/module-diagrams/src/fonts.ts", "caller": "packages/ui-react/tests/browser/diagram-export-command.ts", "ownerHash": "e575dbabbaa452f22389e61770b02200e78b965018f61662573f985024801419", - "callerHash": "f7c3d14ccf96438bf4e28ecc1929b1208fb99520d21a9947086bb43bca933328", + "callerHash": "64674a93954a3d92ea99c9707fd2a6b693ca43fc7c4680243eff8cd2cef2fee6", "data": { "packages/module-diagrams/assets/fonts/2.ttf": "44ce4a84f20d60f24539bd0cef11f79c29e38609e0f8adf18551c9794a5d9dc3", "packages/module-diagrams/assets/fonts/4.ttf": "df54dbfafba61d4911eb3dab9bba2d20531fb009f01d64dd42fa96ab862584d8",