jbrowse-plugin-graphgenomeviewer 7.1.2 → 7.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{GraphGenomeView-NJ5XCREB.js → GraphGenomeView-LX7GDEDM.js} +2 -2
- package/dist/chunks/{LinearGraphDisplay-TXTKAACH.js → LinearGraphDisplay-QLPIRKPR.js} +2 -2
- package/dist/chunks/{WalkTabixSyntenyAdapter-U53JLYVU.js → WalkTabixSyntenyAdapter-GH6NYQTF.js} +2 -2
- package/dist/chunks/{WalkTabixSyntenyAdapter-U53JLYVU.js.map → WalkTabixSyntenyAdapter-GH6NYQTF.js.map} +1 -1
- package/dist/chunks/{chunk-NWJYLP6Z.js → chunk-6PC7WKLS.js} +2 -2
- package/dist/chunks/chunk-BHSELHTZ.js +2 -0
- package/dist/chunks/chunk-BHSELHTZ.js.map +7 -0
- package/dist/chunks/{chunk-WEGWTC52.js → chunk-LBY7U6OJ.js} +2 -2
- package/dist/chunks/{chunk-WEGWTC52.js.map → chunk-LBY7U6OJ.js.map} +4 -4
- package/dist/chunks/chunk-LVQUQSAH.js +3 -0
- package/dist/chunks/chunk-LVQUQSAH.js.map +7 -0
- package/dist/chunks/chunk-PJ43KEV6.js +2 -0
- package/dist/chunks/chunk-PJ43KEV6.js.map +7 -0
- package/dist/chunks/renderSvg-GGJXJHCS.js +2 -0
- package/dist/chunks/renderSvg-GGJXJHCS.js.map +7 -0
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js +3 -3
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js.map +4 -4
- package/package.json +1 -1
- package/src/GbzBaseSyntenyAdapter/configSchema.ts +2 -2
- package/src/GetSubgraph.ts +1 -1
- package/src/GraphGenomeView/components/Legend.tsx +3 -121
- package/src/GraphGenomeView/components/LegendSwatch.tsx +237 -0
- package/src/GraphGenomeView/components/PaneSvg.tsx +2 -189
- package/src/GraphGenomeView/components/WalkStrip.tsx +1 -1
- package/src/GraphTrack/index.ts +2 -2
- package/src/LinearGraphDisplay/denseWindow.ts +0 -14
- package/src/LinearGraphDisplay/model.ts +2 -1
- package/src/WalkTabixSyntenyAdapter/WalkTabixSyntenyAdapter.ts +1 -1
- package/src/nodeLimitError.ts +12 -0
- package/src/version.ts +1 -1
- package/dist/chunks/chunk-2MCOY3YG.js +0 -3
- package/dist/chunks/chunk-2MCOY3YG.js.map +0 -7
- package/dist/chunks/chunk-MURN3JPK.js +0 -2
- package/dist/chunks/chunk-MURN3JPK.js.map +0 -7
- package/dist/chunks/chunk-WCGVUZWP.js +0 -2
- package/dist/chunks/chunk-WCGVUZWP.js.map +0 -7
- package/dist/chunks/renderSvg-KSQI5DH6.js +0 -2
- package/dist/chunks/renderSvg-KSQI5DH6.js.map +0 -7
- /package/dist/chunks/{GraphGenomeView-NJ5XCREB.js.map → GraphGenomeView-LX7GDEDM.js.map} +0 -0
- /package/dist/chunks/{LinearGraphDisplay-TXTKAACH.js.map → LinearGraphDisplay-QLPIRKPR.js.map} +0 -0
- /package/dist/chunks/{chunk-NWJYLP6Z.js.map → chunk-6PC7WKLS.js.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["host:@jbrowse/render-core/useRenderingBackend", "../../src/GraphGenomeView/components/HoverLayer.tsx", "../../src/GraphGenomeView/components/legendStyles.ts", "../../src/GraphGenomeView/components/Legend.tsx", "../../node_modules/.pnpm/@jbrowse+bandage-core@10.2.6/node_modules/@jbrowse/bandage-core/dist/chunks/chunk-TDQLINVI.js", "../../src/GraphGenomeView/components/usePaneGestures.ts", "../../src/GraphGenomeView/components/FacetPanels.tsx", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._be9a1cae12a24c212d9554fb2bd39b80/node_modules/@mui/icons-material/CropFree.mjs", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._be9a1cae12a24c212d9554fb2bd39b80/node_modules/@mui/icons-material/ZoomIn.mjs", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._be9a1cae12a24c212d9554fb2bd39b80/node_modules/@mui/icons-material/ZoomOut.mjs", "../../src/GraphGenomeView/components/ColorSchemeSelect.tsx", "../../src/GraphGenomeView/components/GraphStats.tsx", "../../src/GraphGenomeView/components/LayoutSelect.tsx", "../../src/GraphGenomeView/components/RepeatSelect.tsx", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._be9a1cae12a24c212d9554fb2bd39b80/node_modules/@mui/icons-material/Close.mjs", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._be9a1cae12a24c212d9554fb2bd39b80/node_modules/@mui/icons-material/MoreVert.mjs", "../../src/GraphGenomeView/components/SettingsMenu.tsx", "../../src/GraphGenomeView/components/WalkSelect.tsx", "../../src/GraphGenomeView/components/GraphToolbar.tsx", "../../src/GraphGenomeView/components/HoverTooltip.tsx", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._be9a1cae12a24c212d9554fb2bd39b80/node_modules/@mui/icons-material/FilterList.mjs", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._be9a1cae12a24c212d9554fb2bd39b80/node_modules/@mui/icons-material/FilterListOff.mjs", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._be9a1cae12a24c212d9554fb2bd39b80/node_modules/@mui/icons-material/Info.mjs", "../../src/GraphGenomeView/components/PaneContextMenu.tsx", "../../src/GraphGenomeView/components/WalkStrip.tsx", "../../src/GraphGenomeView/components/WalkStripLocator.tsx", "../../src/GraphGenomeView/renderer/GraphRenderer.ts", "../../src/GraphGenomeView/components/GraphCanvas.tsx"],
|
|
4
|
+
"sourcesContent": ["const host = JBrowseExports[\"@jbrowse/render-core/useRenderingBackend\"]\nconst read = name =>\n host != null && name in Object(host)\n ? host[name]\n : Object.assign(\n function () {\n throw new Error(\n \"This JBrowse does not provide '\" + name + \"' from '\" + \"@jbrowse/render-core/useRenderingBackend\" + \"' to plugins: GraphGenomeView was built for a different JBrowse version, so update the plugin or JBrowse\",\n )\n },\n { jbrowseHostMissing: name },\n )\nexport const CONTEXT_LOST_REPORT_GRACE_MS = /* @__PURE__ */ read(\"CONTEXT_LOST_REPORT_GRACE_MS\")\nexport const OFFSCREEN_RELEASE_BAND = /* @__PURE__ */ read(\"OFFSCREEN_RELEASE_BAND\")\nexport const createGpuContextLostError = /* @__PURE__ */ read(\"createGpuContextLostError\")\nexport const createGpuDeviceLostError = /* @__PURE__ */ read(\"createGpuDeviceLostError\")\nexport const createGpuSurfaceLostError = /* @__PURE__ */ read(\"createGpuSurfaceLostError\")\nexport const isGpuContextLostError = /* @__PURE__ */ read(\"isGpuContextLostError\")\nexport const useRenderingBackend = /* @__PURE__ */ read(\"useRenderingBackend\")\nexport default host && host.__esModule ? host.default : host", "import { useEffect, useState } from 'react'\n\nimport { Canvas2DRenderer } from '@jbrowse/bandage-core/renderer/Canvas2DRenderer'\nimport { autorun } from 'mobx'\n\nimport { paneLayerStyle } from './PaneLayer'\n\nimport type { GraphPaneModel } from '../model'\n\nexport const hoverLayerStyle = paneLayerStyle(1)\n\n// The pane's hover, on a transparent canvas over its drawing and tube map\nexport default function HoverLayer({ model }: { model: GraphPaneModel }) {\n const [canvas, setCanvas] = useState<HTMLCanvasElement | null>(null)\n useEffect(() => {\n if (!canvas) {\n return undefined\n }\n const renderer = new Canvas2DRenderer(canvas)\n const dispose = autorun(() => {\n renderer.resize(model.paneWidth, model.canvasHeight)\n model.paintHover(renderer, model.drawnBatch)\n })\n return () => {\n dispose()\n renderer.dispose()\n }\n }, [canvas, model])\n return (\n <canvas\n ref={setCanvas}\n data-testid=\"graph-hover-layer\"\n style={hoverLayerStyle}\n />\n )\n}\n", "// A key's section of the legend panel, and one row in it: a swatch beside its\n// words\nexport const legendBoxStyle = {\n background: 'rgba(255,255,255,0.82)',\n padding: '3px 6px',\n fontSize: 11,\n lineHeight: '15px',\n whiteSpace: 'nowrap' as const,\n}\n\nexport const legendRowStyle = { display: 'flex', alignItems: 'center', gap: 5 }\n\n// A line with no swatch, such as what the drawing folded away\nexport const legendNoteStyle = { color: '#666' }\n", "import type { ReactNode } from 'react'\n\nimport { observer } from 'mobx-react'\n\nimport { LegendSwatchView } from './LegendSwatch'\nimport { legendBoxStyle, legendNoteStyle, legendRowStyle } from './legendStyles'\nimport { legendSections } from '../legendSections'\n\nimport type { LegendRow } from '../legendSections'\nimport type { GraphPaneModel } from '../model'\n\n// One row: its swatch then its words, or a note with neither. `at`, where\n// the hovered node sits on a walk, stands in for the line under it.\nexport function LegendRowView({\n row,\n at,\n hint,\n after,\n}: {\n row: LegendRow\n at?: string\n hint?: string\n after?: ReactNode\n}) {\n return row.swatch ? (\n <div title={[row.title, hint].filter(Boolean).join(' \u00B7 ') || undefined}>\n <div style={legendRowStyle}>\n <LegendSwatchView swatch={row.swatch} />\n <span>\n {row.strong ? <strong>{row.strong}</strong> : null}\n {row.label}\n </span>\n {after}\n </div>\n {at ? (\n <div data-testid=\"graph-walk-at\">{at}</div>\n ) : row.under ? (\n <div>{row.under}</div>\n ) : null}\n </div>\n ) : (\n <div style={legendNoteStyle}>{row.label}</div>\n )\n}\n\nconst closeStyle = {\n pointerEvents: 'auto' as const,\n cursor: 'pointer',\n border: 'none',\n background: 'none',\n padding: '0 2px',\n font: 'inherit',\n textDecoration: 'underline',\n}\n\n// Every key the drawing needs, a section each\nexport const LegendPanel = observer(function LegendPanel({\n model,\n}: {\n model: GraphPaneModel\n}) {\n return (\n <>\n {legendSections(model).map(({ testid, rows }) => (\n <div key={testid} style={legendBoxStyle} data-testid={testid}>\n {rows.map(row => (\n <LegendRowView\n key={row.key}\n row={row}\n at={row.walk ? model.hoveredOn(row.walk) : undefined}\n after={\n row.closesBubble ? (\n <button\n type=\"button\"\n style={closeStyle}\n data-testid=\"graph-close-bubble\"\n onClick={() => {\n model.closeBubbles()\n }}\n >\n close\n </button>\n ) : null\n }\n />\n ))}\n </div>\n ))}\n </>\n )\n})\n", "// src/util/wheelZoom.ts\nvar ZOOM_PER_NOTCH = 1.1;\nvar NOTCH_PX = 100;\nvar LINE_PX = 40;\nvar PAGE_PX = 800;\nvar PINCH_GAIN = 10;\nvar MAX_NOTCHES_PER_EVENT = 2;\nfunction wheelZoomFactor(e) {\n const px = e.deltaY * (e.deltaMode === 1 ? LINE_PX : e.deltaMode === 2 ? PAGE_PX : 1);\n const notches = (e.ctrlKey ? PINCH_GAIN : 1) * px / NOTCH_PX;\n return ZOOM_PER_NOTCH ** -Math.max(-MAX_NOTCHES_PER_EVENT, Math.min(MAX_NOTCHES_PER_EVENT, notches));\n}\n\nexport {\n wheelZoomFactor\n};\n", "import { useEffect, useRef, useState } from 'react'\n\nimport {\n findHoveredEdge,\n findHoveredNode,\n} from '@jbrowse/bandage-core/util/hitDetection'\nimport { wheelZoomFactor } from '@jbrowse/bandage-core/util/wheelZoom'\nimport { screenToLayout } from '@jbrowse/bandage-core/viewport'\nimport { isAlive } from '@jbrowse/mobx-state-tree'\n\nimport { chipReadoutAt } from './LabelLayer'\n\nimport type { PaneContextAt } from './PaneContextMenu'\nimport type { GraphPaneModel } from '../model'\n\n// wheel events need passive:false to call preventDefault \u2014 React registers\n// wheel listeners as passive, so we must add this imperatively\nexport function useWheelZoom(\n canvas: HTMLCanvasElement | null | undefined,\n model: GraphPaneModel,\n) {\n useEffect(() => {\n if (!canvas) {\n return undefined\n }\n const handleWheel = (e: WheelEvent) => {\n if (model.hostPlacesX) {\n return\n }\n if (model.host) {\n e.stopPropagation()\n }\n e.preventDefault()\n const rect = canvas.getBoundingClientRect()\n model.zoom(\n wheelZoomFactor(e),\n e.clientX - rect.left,\n e.clientY - rect.top,\n )\n }\n canvas.addEventListener('wheel', handleWheel, { passive: false })\n return () => {\n canvas.removeEventListener('wheel', handleWheel)\n }\n }, [canvas, model])\n}\n\nconst CLICK_SLOP_PX = 3\n\n// The pointer on a canvas drawing the pane's transform: the pane's own, or any\n// facet panel, since the panels share it. Coordinates are read against the\n// canvas the event is on.\nexport function usePaneGestures(model: GraphPaneModel) {\n // Where the pointer was last, and whether it has travelled since mousedown \u2014\n // per-gesture scratch that nothing renders from, which is what a ref is for.\n // Whether a drag is in progress is model state (`isPanning`/`draggingNode`),\n // because the cursor renders from it.\n const lastMouseRef = useRef({ x: 0, y: 0 })\n const downRef = useRef({ x: 0, y: 0 })\n const hasMovedRef = useRef(false)\n // A pan and a hover are applied once per frame, not once per mousemove:\n // mousemove fires in bursts well above the frame rate, and each pan step\n // repainted the canvas and re-placed every overlay label, while each hover\n // step ran both hit indexes. The pending pan is the summed delta; the pending\n // hover is the last pointer position, since only the last one can be right.\n const pendingRef = useRef<{\n frame: number\n pan: { dx: number; dy: number } | null\n hover: { x: number; y: number } | null\n }>({ frame: 0, pan: null, hover: null })\n useEffect(\n () => () => {\n cancelAnimationFrame(pendingRef.current.frame)\n },\n [],\n )\n const [contextMenu, setContextMenu] = useState<PaneContextAt>()\n const [hoveredChip, setHoveredChip] =\n useState<ReturnType<typeof chipReadoutAt>>(undefined)\n\n // the event's point in pane px, against the canvas it is on\n function pointerAt(e: React.MouseEvent) {\n const rect = (e.currentTarget as HTMLCanvasElement).getBoundingClientRect()\n return { x: e.clientX - rect.left, y: e.clientY - rect.top }\n }\n\n // The node at a pane point, which mousedown, mousemove and click all need.\n // Takes the point rather than the event so a caller that already has one\n // does not pay for a second getBoundingClientRect.\n function nodeAt(sx: number, sy: number) {\n if (model.layoutResult?.tubeMap) {\n return model.tubeMapNodeAt(sx, sy)\n }\n const onStrip = model.referenceStripNodeAt(sx, sy)\n if (onStrip) {\n return onStrip\n }\n const { nodePositions } = model\n if (!nodePositions) {\n return null\n }\n const { x, y } = screenToLayout(sx, sy, model, model.axisScale)\n return findHoveredNode(\n nodePositions,\n x,\n y,\n model.axisScale,\n model.positionsVersion,\n model.nodeInk,\n )\n }\n\n function edgeAt(sx: number, sy: number) {\n const { nodePositions, graph } = model\n if (!nodePositions || !graph) {\n return null\n }\n const { x, y } = screenToLayout(sx, sy, model, model.axisScale)\n return findHoveredEdge(\n nodePositions,\n graph,\n x,\n y,\n model.axisScale,\n // resolved, so the hit index bounds the ribbons that are actually\n // drawn \u2014 see effectiveDrawPaths. Facet panels draw none.\n model.effectiveDrawPaths && !model.facetPanels,\n model.positionsVersion,\n model.deletionEdgeIndexes,\n model.hiddenEdgeIndexes,\n model.deletionRoutes,\n model.layoutResult?.stranded,\n )\n }\n\n // The linear view drags by mouse events, so a hosted pane that pans itself\n // keeps the mousedown from it; the gesture itself is the pointer's\n function onMouseDown(e: React.MouseEvent) {\n if (e.button === 0) {\n e.preventDefault()\n if (model.host && !model.hostPlacesX) {\n e.stopPropagation()\n }\n }\n }\n\n // Captured, so a drag keeps going over a bubble chip or the gap between\n // facet panels, and a finger drags as a mouse does\n function onPointerDown(e: React.PointerEvent) {\n if (e.button === 0) {\n hasMovedRef.current = false\n downRef.current = { x: e.clientX, y: e.clientY }\n if (model.hostPlacesX) {\n return\n }\n e.currentTarget.setPointerCapture(e.pointerId)\n const { x, y } = pointerAt(e)\n // a tube map's boxes are the layout's, and the strip's are bp, not\n // positions to drag\n const node =\n model.layoutResult?.tubeMap ||\n e.nativeEvent.offsetY < model.referenceStripZonePx\n ? null\n : nodeAt(x, y)\n if (node) {\n model.setDraggingNode(node)\n } else {\n model.setPanning(true)\n }\n lastMouseRef.current = { x: e.clientX, y: e.clientY }\n }\n }\n\n function applyPending() {\n const pending = pendingRef.current\n const { pan, hover } = pending\n pending.frame = 0\n pending.pan = null\n pending.hover = null\n if (pan) {\n model.setTransform(\n model.scale,\n model.translateX + pan.dx,\n model.translateY + pan.dy,\n )\n }\n if (!hover) {\n return\n }\n const { x: sx, y: sy } = hover\n const chip = model.facetPanels\n ? undefined\n : chipReadoutAt(model.overlayLabels, sx, sy)\n setHoveredChip(was =>\n was?.label === chip?.label && was?.readout === chip?.readout ? was : chip,\n )\n const bars = model.walkRowBars\n if (bars) {\n const i = model.walkRowAt(sx, sy)\n model.setHoveredWalkRow(\n i === undefined ? null : [bars.reference, ...bars.rows][i]!.name,\n )\n }\n if (model.nodePositions && model.graph) {\n const node = nodeAt(sx, sy)\n model.setHoveredPanel(model.tubeMapPanelAt(sy))\n model.setHoveredNode(node, { x: sx, y: sy })\n model.setHoveredTube(\n node === null && model.layoutResult?.tubeMap\n ? model.tubeAt(sx, sy)\n : null,\n )\n model.setHoveredEdge(\n node || model.layoutResult?.tubeMap || !model.hoverLightsEverything\n ? null\n : edgeAt(sx, sy),\n )\n }\n }\n\n function scheduleFrame() {\n if (!pendingRef.current.frame) {\n pendingRef.current.frame = requestAnimationFrame(applyPending)\n }\n }\n\n function dropPending() {\n const pending = pendingRef.current\n cancelAnimationFrame(pending.frame)\n pending.frame = 0\n pending.pan = null\n pending.hover = null\n }\n\n function onPointerMove(e: React.PointerEvent) {\n const dx = e.clientX - lastMouseRef.current.x\n const dy = e.clientY - lastMouseRef.current.y\n lastMouseRef.current = { x: e.clientX, y: e.clientY }\n\n // from where the button went down, not per event: a slow drag moves a\n // pixel at a time\n if (\n Math.hypot(e.clientX - downRef.current.x, e.clientY - downRef.current.y) >\n CLICK_SLOP_PX\n ) {\n hasMovedRef.current = true\n }\n\n const pending = pendingRef.current\n if (model.draggingNode) {\n model.moveNode(model.draggingNode, dx / model.scaleX, dy / model.scaleY)\n } else if (model.isPanning) {\n pending.pan = {\n dx: (pending.pan?.dx ?? 0) + dx,\n dy: (pending.pan?.dy ?? 0) + dy,\n }\n scheduleFrame()\n } else {\n const rect = (\n e.currentTarget as HTMLCanvasElement\n ).getBoundingClientRect()\n pending.hover = { x: e.clientX - rect.left, y: e.clientY - rect.top }\n scheduleFrame()\n }\n }\n\n // also the end of a capture the browser took back\n function onPointerUp() {\n if (isAlive(model)) {\n model.stopDragging()\n }\n }\n\n // also fired by the canvas unmounting under a resting pointer, after the\n // view closing it has destroyed the model\n function onPointerLeave() {\n dropPending()\n setHoveredChip(undefined)\n if (!isAlive(model)) {\n return\n }\n model.stopDragging()\n model.clearHover()\n }\n\n // Right-clicking a node is the gesture that asks \"where is this?\", and until\n // now the graph had no answer: a node named an assembly and an offset in its\n // tags that nothing surfaced. The items come from the model's launch targets,\n // so what is offered is what can actually be opened.\n function onContextMenu(e: React.MouseEvent) {\n const { x, y } = pointerAt(e)\n const node = nodeAt(x, y)\n const { clientX, clientY } = e\n if (node) {\n e.preventDefault()\n setContextMenu({ clientX, clientY, nodeId: node })\n return\n }\n const row = model.walkRowAt(x, y)\n if (row !== undefined) {\n e.preventDefault()\n setContextMenu({ clientX, clientY, row })\n }\n }\n\n function onClick(e: React.MouseEvent) {\n // a click that ended a drag selects nothing\n if (!hasMovedRef.current) {\n const { x, y } = pointerAt(e)\n const node = nodeAt(x, y)\n model.setSelectedNode(node)\n if (node) {\n model.showNodeDetails(node)\n }\n }\n }\n\n const canvasStyle: React.CSSProperties = {\n cursor: model.isPanning || model.draggingNode ? 'grabbing' : 'grab',\n // a pane the linear view drags leaves a finger its scroll\n touchAction: model.hostPlacesX ? 'auto' : 'none',\n overscrollBehavior: 'contain',\n }\n\n return {\n canvasStyle,\n handlers: {\n onMouseDown,\n onPointerDown,\n onPointerMove,\n onPointerUp,\n onPointerCancel: onPointerUp,\n onLostPointerCapture: onPointerUp,\n onPointerLeave,\n onClick,\n onContextMenu,\n },\n contextMenu,\n hoveredChip,\n closeContextMenu: () => {\n setContextMenu(undefined)\n },\n }\n}\n\nexport type PaneHandlers = ReturnType<typeof usePaneGestures>['handlers']\n", "import { useEffect, useState } from 'react'\n\nimport { FACET_GAP_PX, FACET_TITLE_PX } from '@jbrowse/bandage-core/facetGrid'\nimport { Canvas2DRenderer } from '@jbrowse/bandage-core/renderer/Canvas2DRenderer'\nimport { autorun, computed } from 'mobx'\nimport { observer } from 'mobx-react'\n\nimport { hoverLayerStyle } from './HoverLayer'\nimport { LegendRowView } from './Legend'\nimport { useWheelZoom } from './usePaneGestures'\nimport { facetKeyRows, walkKeyRow } from '../legendSections'\nimport { FACET_KEY_ROW_PX } from '../pane/fitViews'\nimport { PAPER_CSS } from '../pane/paneBase'\n\nimport type { PaneHandlers } from './usePaneGestures'\nimport type { GraphPaneModel } from '../model'\nimport type { WalkLift } from '@jbrowse/bandage-core/walkHighlight'\n\n// The pane faceted by walk: the same layout drawn once per lifted walk, each\n// panel with that walk alone shading along itself, so walks compare by where\n// they go rather than by which lane is which colour. The panels share the\n// pane's transform, so a pan, zoom or hover in one is in all of them.\n\nconst gridStyle = {\n position: 'absolute' as const,\n left: 0,\n top: 0,\n zIndex: 4,\n display: 'grid',\n gap: FACET_GAP_PX,\n lineHeight: 'normal',\n}\n\nconst titleStyle = {\n height: FACET_TITLE_PX,\n padding: '2px 6px',\n boxSizing: 'border-box' as const,\n fontFamily: 'inherit',\n fontSize: 11,\n color: 'inherit',\n cursor: 'pointer',\n border: 'none',\n background: 'none',\n textAlign: 'left' as const,\n display: 'block',\n}\n\nconst panelStyle = { position: 'relative' as const }\n\nconst keyStyle = {\n gridColumn: '1 / -1',\n height: FACET_KEY_ROW_PX,\n padding: '2px 6px',\n boxSizing: 'border-box' as const,\n display: 'flex',\n gap: 14,\n fontSize: 11,\n lineHeight: '15px',\n}\n\nconst FacetPanel = observer(function FacetPanel({\n model,\n lift,\n width,\n height,\n cell,\n handlers,\n canvasStyle,\n}: {\n model: GraphPaneModel\n lift: WalkLift\n width: number\n height: number\n cell: { gridRow: number; gridColumn: number }\n handlers: PaneHandlers\n canvasStyle: React.CSSProperties\n}) {\n const [canvas, setCanvas] = useState<HTMLCanvasElement | null>(null)\n const [hoverCanvas, setHoverCanvas] = useState<HTMLCanvasElement | null>(null)\n const walk = lift.walks[0]!\n useWheelZoom(canvas, model)\n\n useEffect(() => {\n if (!canvas || !hoverCanvas) {\n return undefined\n }\n const renderer = new Canvas2DRenderer(canvas)\n const hover = new Canvas2DRenderer(hoverCanvas)\n const drawing = computed(() => model.buildDrawing(lift, false))\n let uploaded: ReturnType<typeof model.buildDrawing>\n const disposers = [\n autorun(() => {\n const grid = model.facetGrid\n if (grid) {\n renderer.resize(grid.width, grid.height)\n }\n const built = drawing.get()\n if (!built) {\n return\n }\n if (built !== uploaded) {\n renderer.uploadGeometry(built.batch)\n uploaded = built\n }\n model.applySelection(renderer)\n model.paint(renderer)\n }),\n autorun(() => {\n const grid = model.facetGrid\n if (grid) {\n hover.resize(grid.width, grid.height)\n }\n const built = drawing.get()\n if (built) {\n model.paintHover(hover, built.batch)\n }\n }),\n ]\n return () => {\n for (const dispose of disposers) {\n dispose()\n }\n renderer.dispose()\n hover.dispose()\n }\n }, [canvas, hoverCanvas, model, lift])\n\n const label = model.walkLabel(walk.name)\n return (\n <div style={cell}>\n <button\n type=\"button\"\n style={titleStyle}\n data-testid=\"graph-facet-title\"\n onClick={() => {\n model.liftWalks([walk.name])\n model.setFacet('')\n }}\n >\n <LegendRowView\n row={walkKeyRow(model, walk)}\n hint={`click to lift ${label} alone`}\n at={model.hoveredOn(walk)}\n />\n </button>\n <div style={panelStyle}>\n <canvas\n ref={setCanvas}\n data-testid=\"graph-facet-canvas\"\n style={{ ...canvasStyle, width, height, display: 'block' }}\n {...handlers}\n />\n <canvas ref={setHoverCanvas} style={hoverLayerStyle} />\n </div>\n </div>\n )\n})\n\nconst FacetPanels = observer(function FacetPanels({\n model,\n handlers,\n canvasStyle,\n}: {\n model: GraphPaneModel\n handlers: PaneHandlers\n canvasStyle: React.CSSProperties\n}) {\n const panels = model.facetPanels\n const grid = model.facetGrid\n const place = model.facetPlacement\n if (!panels || !grid || !place) {\n return null\n }\n const { columns, width, height } = grid\n return (\n <div\n data-testid=\"graph-facet-panels\"\n style={{\n ...gridStyle,\n width: model.paneWidth,\n minHeight: model.canvasHeight,\n gridTemplateColumns: `repeat(${columns}, ${width}px)`,\n background: PAPER_CSS,\n }}\n >\n {panels.map((lift, i) => (\n <FacetPanel\n key={lift.walks[0]!.name}\n model={model}\n lift={lift}\n width={width}\n height={height}\n cell={{\n gridRow: Math.floor(place.cells[i]! / columns) + 1,\n gridColumn: (place.cells[i]! % columns) + 1,\n }}\n handlers={handlers}\n canvasStyle={canvasStyle}\n />\n ))}\n <div\n style={{\n ...keyStyle,\n gridRow: Math.floor(Math.max(...place.cells) / columns) + 2,\n }}\n data-testid=\"graph-facet-key\"\n >\n {facetKeyRows(model).map(row => (\n <LegendRowView key={row.key} row={row} />\n ))}\n </div>\n </div>\n )\n})\n\nexport default FacetPanels\n", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2m2 10H3v4c0 1.1.9 2 2 2h4v-2H5zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2\"\n}), 'CropFree');", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon([/*#__PURE__*/_jsx(\"path\", {\n d: \"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14\"\n}, \"0\"), /*#__PURE__*/_jsx(\"path\", {\n d: \"M12 10h-2v2H9v-2H7V9h2V7h1v2h2z\"\n}, \"1\")], 'ZoomIn');", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14M7 9h5v1H7z\"\n}), 'ZoomOut');", "import { COLOR_SCHEMES } from '@jbrowse/bandage-core/colorSchemes'\nimport { observer } from 'mobx-react'\n\nimport LabelledSelect from './LabelledSelect'\n\nimport type { GraphPaneModel } from '../model'\n\nconst ColorSchemeSelect = observer(function ColorSchemeSelect({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const fixed = model.colorSchemeLock\n return (\n <LabelledSelect\n label=\"Color\"\n size=\"small\"\n sx={{ minWidth: 100 }}\n disabled={fixed !== undefined}\n title={fixed?.why}\n shown={fixed?.value}\n value={model.chosenColorScheme}\n options={COLOR_SCHEMES}\n onChange={scheme => {\n model.setColorScheme(scheme)\n }}\n />\n )\n})\n\nexport default ColorSchemeSelect\n", "import { Typography } from '@mui/material'\nimport { observer } from 'mobx-react'\nimport { makeStyles } from 'tss-react/mui'\n\nimport type { GraphPaneModel } from '../model'\n\nconst useStyles = makeStyles()({\n stats: {\n marginLeft: 'auto',\n },\n perf: {\n color: '#888',\n fontVariantNumeric: 'tabular-nums',\n },\n})\n\nfunction fmtMs(ms: number | undefined) {\n return ms === undefined ? '\u2013' : `${Math.round(ms)}ms`\n}\n\n// The perf READOUT, off by default: it sat in the toolbar of every published\n// graph figure, where one machine's fetch time is a number a reader has to work\n// out is not about them. `showPerf` is in the settings menu.\n//\n// The numbers themselves are not conditional \u2014 they ride the stats element's\n// data-* attributes either way (see GraphStats), so a browser test asserting a\n// timing budget never depends on a display setting, and turning the text off\n// costs no coverage. They live there rather than on this element so that\n// switching the text off leaves no empty node behind to carry them.\nconst GraphPerf = observer(function GraphPerf({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const { classes } = useStyles()\n const { lastFetchMs, lastLayoutMs, lastGeometryMs } = model\n const hasMetrics =\n lastFetchMs !== undefined ||\n lastLayoutMs !== undefined ||\n lastGeometryMs !== undefined\n return model.showPerf && hasMetrics ? (\n <Typography\n variant=\"caption\"\n className={classes.perf}\n data-testid=\"graph-perf-stats\"\n >\n fetch {fmtMs(lastFetchMs)} \u00B7 layout {fmtMs(lastLayoutMs)} \u00B7 geom{' '}\n {fmtMs(lastGeometryMs)}\n </Typography>\n ) : null\n})\n\nconst GraphStats = observer(function GraphStats({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const { classes } = useStyles()\n return (\n <div\n className={classes.stats}\n data-testid=\"graph-stats\"\n data-node-count={model.nodeCount}\n data-edge-count={model.edgeCount}\n data-path-count={model.pathCount}\n // unconditional, whatever `showPerf` is doing to the text beside them \u2014\n // see GraphPerf\n data-fetch-ms={model.lastFetchMs ?? ''}\n data-layout-ms={model.lastLayoutMs ?? ''}\n data-geometry-ms={model.lastGeometryMs ?? ''}\n data-geometry-strokes={model.lastGeometryStrokeCount ?? ''}\n >\n <Typography variant=\"body2\" component=\"span\">\n {model.nodeCount} nodes, {model.edgeCount} edges\n {model.pathCount > 0 ? `, ${model.pathCount} paths` : ''}\n </Typography>{' '}\n <GraphPerf model={model} />\n </div>\n )\n})\n\nexport default GraphStats\n", "import { LAYOUT_MODES } from '@jbrowse/bandage-core/layoutModes'\nimport { observer } from 'mobx-react'\n\nimport LabelledSelect from './LabelledSelect'\n\nimport type { GraphPaneModel } from '../model'\n\nconst LayoutSelect = observer(function LayoutSelect({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const { graph } = model\n return (\n <LabelledSelect\n label=\"Layout\"\n size=\"small\"\n sx={{ minWidth: 140 }}\n testId=\"graph-layout-select\"\n value={model.chosenLayoutMode}\n options={LAYOUT_MODES.map(({ value, label, description, available }) => ({\n value,\n label,\n description,\n disabled: graph ? !available(graph) : false,\n }))}\n onChange={mode => {\n void model.switchLayout(mode)\n }}\n />\n )\n})\n\nexport default LayoutSelect\n", "import { observer } from 'mobx-react'\n\nimport LabelledSelect from './LabelledSelect'\n\nimport type { GraphPaneModel } from '../model'\n\n// Which tandem repeat array walk rows slice each walk by and tile, or the\n// whole window\nconst RepeatSelect = observer(function RepeatSelect({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const { repeatChoices } = model\n if (model.chosenLayoutMode !== 'walkrows' || repeatChoices.length === 0) {\n return null\n }\n return (\n <LabelledSelect\n label=\"Repeat\"\n size=\"small\"\n sx={{ minWidth: 130, maxWidth: 260 }}\n testId=\"graph-repeat-select\"\n value={model.selectedRepeat?.key ?? ''}\n options={[\n { value: '', label: 'Whole window' },\n ...repeatChoices.map(({ key, name, unit }) => ({\n value: key,\n label: `${name} \u00B7 ${unit.toLocaleString()} bp unit`,\n })),\n ]}\n onChange={key => {\n model.setRepeatKey(key)\n }}\n />\n )\n})\n\nexport default RepeatSelect\n", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Close');", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2\"\n}), 'MoreVert');", "import { CascadingMenuButton } from '@jbrowse/core/ui'\nimport { getSession } from '@jbrowse/core/util'\nimport CloseIcon from '@mui/icons-material/Close'\nimport MoreVertIcon from '@mui/icons-material/MoreVert'\nimport RouteIcon from '@mui/icons-material/Route'\nimport SettingsIcon from '@mui/icons-material/Settings'\nimport VisibilityIcon from '@mui/icons-material/Visibility'\nimport { observer } from 'mobx-react'\n\nimport GraphSettingsDialog from './GraphSettingsDialog'\n\nimport type { GraphPaneModel } from '../model'\n\nconst SettingsMenu = observer(function SettingsMenu({\n model,\n}: {\n model: GraphPaneModel\n}) {\n // the toolbar beside this menu picks the walks and the repeat\n const haplotypes = model.highlightMenuItems({ picks: false })\n\n return (\n <CascadingMenuButton\n size=\"small\"\n tooltip=\"Graph options\"\n menuItems={[\n ...(haplotypes.length > 0\n ? [{ label: 'Haplotypes', icon: RouteIcon, subMenu: haplotypes }]\n : []),\n ...model.layoutOptionMenuItems({ repeat: false }),\n {\n label: 'Show...',\n icon: VisibilityIcon,\n subMenu: [\n ...model.showMenuItems(),\n ...(model.modeDrawsNodes && model.walkChoices.length > 1\n ? [\n {\n type: 'checkbox' as const,\n label: 'Show walk rows under the graph',\n checked: model.walkStrip,\n onClick: () => {\n model.setWalkStrip(!model.walkStrip)\n },\n },\n ]\n : []),\n {\n type: 'checkbox' as const,\n label: 'Show timings',\n checked: model.showPerf,\n onClick: () => {\n model.setShowPerf(!model.showPerf)\n },\n },\n ],\n },\n { type: 'divider' as const },\n {\n label: 'Graph settings...',\n icon: SettingsIcon,\n helpText:\n 'Subgraph node limit; node width and path colors; the force-directed layout engine',\n onClick: () => {\n getSession(model).queueDialog(onClose => [\n GraphSettingsDialog,\n { model, open: true, onClose },\n ])\n },\n },\n { type: 'divider' as const },\n {\n label: 'Close graph',\n icon: CloseIcon,\n onClick: () => {\n model.clearGraph()\n },\n },\n ]}\n >\n <MoreVertIcon />\n </CascadingMenuButton>\n )\n})\n\nexport default SettingsMenu\n", "import { useId } from 'react'\n\nimport { getSession } from '@jbrowse/core/util'\nimport {\n Button,\n Checkbox,\n FormControl,\n InputLabel,\n ListItemText,\n MenuItem,\n Select,\n} from '@mui/material'\nimport { observer } from 'mobx-react'\nimport { makeStyles } from 'tss-react/mui'\n\nimport { ChooseWalksDialog, WALK_MENU_ITEMS } from '../pane/paneBase'\n\nimport type { GraphPaneModel } from '../model'\n\nconst useStyles = makeStyles()({\n formControl: {\n minWidth: 130,\n maxWidth: 260,\n },\n})\n\n// Which walks to lift out of the drawing: Bandage's path highlight, for as many\n// of the haplotypes a GBZ cut carries as the reader picks. Absent from a graph\n// with no walks, and from a tube map, whose tubes are the walks.\nconst WalkSelect = observer(function WalkSelect({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const { classes } = useStyles()\n const labelId = useId()\n const { walkChoices } = model\n if (walkChoices.length === 0 || !model.liftsWalks) {\n return null\n }\n const names = new Set(walkChoices.map(c => c.name))\n const labels = new Map(walkChoices.map(c => [c.name, c.label]))\n const picked = model.walkLayers\n .map(layer => layer.walk)\n .filter(name => names.has(name))\n if (walkChoices.length > WALK_MENU_ITEMS) {\n return (\n <Button\n size=\"small\"\n variant=\"outlined\"\n color=\"inherit\"\n data-testid=\"graph-walk-choose\"\n onClick={() => {\n getSession(model).queueDialog(onClose => [\n ChooseWalksDialog,\n { model, onClose },\n ])\n }}\n >\n {picked.length > 0\n ? `${picked.length} of ${walkChoices.length} haplotypes`\n : 'Highlight haplotypes...'}\n </Button>\n )\n }\n return (\n <FormControl size=\"small\" className={classes.formControl}>\n <InputLabel id={labelId}>Highlight</InputLabel>\n <Select\n labelId={labelId}\n multiple\n value={picked}\n label=\"Highlight\"\n data-testid=\"graph-walk-select\"\n renderValue={selected => selected.map(n => labels.get(n)).join(', ')}\n onChange={e => {\n const { value } = e.target\n model.liftWalks(typeof value === 'string' ? value.split(',') : value)\n }}\n >\n {walkChoices.map(({ name, label }) => (\n <MenuItem key={name} value={name} dense>\n <Checkbox size=\"small\" checked={picked.includes(name)} />\n <ListItemText primary={label} />\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n )\n})\n\nexport default WalkSelect\n", "import CropFreeIcon from '@mui/icons-material/CropFree'\nimport ZoomInIcon from '@mui/icons-material/ZoomIn'\nimport ZoomOutIcon from '@mui/icons-material/ZoomOut'\nimport { IconButton, Tooltip, Typography } from '@mui/material'\nimport { observer } from 'mobx-react'\nimport { makeStyles } from 'tss-react/mui'\n\nimport ColorSchemeSelect from './ColorSchemeSelect'\nimport GraphStats from './GraphStats'\nimport LayoutSelect from './LayoutSelect'\nimport RepeatSelect from './RepeatSelect'\nimport SettingsMenu from './SettingsMenu'\nimport WalkSelect from './WalkSelect'\n\nimport type { GraphPaneModel } from '../model'\n\nconst useStyles = makeStyles()({\n toolbar: {\n display: 'flex',\n alignItems: 'center',\n gap: 4,\n padding: '2px 4px',\n borderBottom: '1px solid #ddd',\n },\n})\n\nconst ZoomDisplay = observer(function ZoomDisplay({\n model,\n}: {\n model: GraphPaneModel\n}) {\n return <Typography variant=\"body2\">{model.zoomPercent}</Typography>\n})\n\nconst GraphToolbar = observer(function GraphToolbar({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const { classes } = useStyles()\n const zoomAboutCentre = (factor: number) => {\n model.zoom(factor, model.viewBox.width / 2, model.viewBox.height / 2)\n }\n return (\n <div className={classes.toolbar}>\n <LayoutSelect model={model} />\n <ColorSchemeSelect model={model} />\n <WalkSelect model={model} />\n <RepeatSelect model={model} />\n <Tooltip title=\"Zoom in\">\n <IconButton\n size=\"small\"\n onClick={() => {\n zoomAboutCentre(1.5)\n }}\n >\n <ZoomInIcon />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Zoom out\">\n <IconButton\n size=\"small\"\n onClick={() => {\n zoomAboutCentre(1 / 1.5)\n }}\n >\n <ZoomOutIcon />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Zoom to fit\">\n <IconButton\n size=\"small\"\n onClick={() => {\n model.refitView()\n }}\n >\n <CropFreeIcon />\n </IconButton>\n </Tooltip>\n <ZoomDisplay model={model} />\n <GraphStats model={model} />\n <SettingsMenu model={model} />\n </div>\n )\n})\n\nexport default GraphToolbar\n", "import type { ReactNode } from 'react'\n\nimport { edgeHoverText, regionLabel } from '@jbrowse/bandage-core/hoverText'\nimport { observer } from 'mobx-react'\n\nimport { nodeOwnLocation } from '../../launchFromGraph/contributors'\nimport { TOOLTIP_INSET_PX } from '../pane/fitViews'\n\nimport type { chipReadoutAt } from './LabelLayer'\nimport type { GraphPaneModel } from '../model'\n\n// Bottom right of the canvas, clear of the row labels on the left edge and of\n// a walk strip under the canvas. Where the legend reaches down to it, it moves\n// left of the legend.\nconst tooltipStyle = {\n position: 'absolute' as const,\n bottom: TOOLTIP_INSET_PX,\n lineHeight: 'normal',\n background: 'rgba(0,0,0,0.75)',\n color: 'white',\n padding: '4px 8px',\n borderRadius: 4,\n fontSize: 12,\n pointerEvents: 'none' as const,\n zIndex: 6,\n}\n\ntype Readout = NonNullable<ReturnType<typeof chipReadoutAt>>\n\nfunction labelled({ label, readout }: Readout) {\n return (\n <>\n <strong>{label}</strong> \u2014 {readout}\n </>\n )\n}\n\n// What the pointer is on, the most specific first: a gene chip, a node, an\n// edge, then a walk row or a tube\nfunction hoverTip(\n model: GraphPaneModel,\n chip: Readout | undefined,\n): { testId?: string; body: ReactNode } | undefined {\n if (chip) {\n return { testId: 'graph-chip-tooltip', body: labelled(chip) }\n }\n const node = model.hoveredNode\n ? model.hoverNodeById?.get(model.hoveredNode)\n : undefined\n if (node) {\n const merged = model.hoverDrawing?.members.get(node.id)\n const own = nodeOwnLocation(node)\n return {\n body: (\n <>\n <strong>{node.name}</strong>\n {merged ? ` and ${merged.length - 1} more` : ''} \u2014{' '}\n {node.length.toLocaleString()} bp, depth {node.depth.toFixed(1)}\n {/* the assembly that contributed the segment, and where on it */}\n {own ? (\n <>\n <br />\n {own.sample} {regionLabel(own)} (rank {node.stable?.rank})\n </>\n ) : null}\n </>\n ),\n }\n }\n const edge =\n model.hoveredEdge === null\n ? undefined\n : model.graph?.edges[model.hoveredEdge]\n if (edge) {\n const text = edgeHoverText(\n edge,\n model.deletions.find(d => d.edgeIndex === model.hoveredEdge),\n id => model.nodeById?.get(id)?.name ?? id,\n )\n // a deletion edge skips backbone that some haplotype lacks, so its\n // readout gives the bp skipped\n return {\n body: text.deletion ? (\n <>\n <strong>Deletion</strong> {text.deletion.bp}\n <br />\n {text.deletion.where}\n </>\n ) : (\n <>Edge: {text.ends}</>\n ),\n }\n }\n const walkRow = model.hoveredWalkRowText\n if (walkRow) {\n return { testId: 'graph-walk-row-tooltip', body: labelled(walkRow) }\n }\n const tube = model.hoveredTubeText\n return tube\n ? { testId: 'graph-tube-tooltip', body: labelled(tube) }\n : undefined\n}\n\nconst HoverTooltip = observer(function HoverTooltip({\n model,\n chip,\n}: {\n model: GraphPaneModel\n chip: Readout | undefined\n}) {\n const tip = hoverTip(model, chip)\n return tip ? (\n <div\n style={{ ...tooltipStyle, right: model.tooltipRightPx }}\n data-testid={tip.testId}\n >\n {tip.body}\n </div>\n ) : null\n})\n\nexport default HoverTooltip\n", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z\"\n}), 'FilterList');", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z\"\n}), 'FilterListOff');", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z\"\n}), 'Info');", "import { regionLabel } from '@jbrowse/bandage-core/hoverText'\nimport { ContextMenu } from '@jbrowse/core/ui'\nimport FilterListIcon from '@mui/icons-material/FilterList'\nimport FilterListOffIcon from '@mui/icons-material/FilterListOff'\nimport InfoIcon from '@mui/icons-material/Info'\nimport LineStyleIcon from '@mui/icons-material/LineStyle'\n\nimport { nodeLaunchMenuItems } from '../../launchFromGraph/graphMenuItems'\n\nimport type { GraphPaneModel } from '../model'\nimport type { WalkRows } from '@jbrowse/bandage-core/layout/walkRows'\nimport type { ContextMenuAnchor, MenuItem } from '@jbrowse/core/ui'\n\n// What a right-click landed on: a node, or a row of `bars`, walk rows' own\n// unless a strip's\nexport type PaneContextAt = ContextMenuAnchor &\n ({ nodeId: string } | { row: number; bars?: WalkRows })\n\nconst AT_POINTER = { x: 0, y: 0 }\n\n// Flat rather than under a \"Launch view\" submenu, since its two or three items\n// are all about the node just clicked\nfunction nodeMenuItems(model: GraphPaneModel, nodeId: string): MenuItem[] {\n const { own, reference, highlight } = model.nodeLaunchTargets(nodeId)\n return [\n {\n label: 'Node details',\n icon: InfoIcon,\n onClick: () => {\n model.showNodeDetails(nodeId)\n },\n },\n ...nodeLaunchMenuItems({\n own,\n reference,\n highlight,\n onShowLinear: target => {\n model.showInLinearView(target)\n },\n onHighlight: model.canHighlightInLinearView\n ? target => {\n model.highlightInLinearView(target)\n }\n : undefined,\n }),\n ]\n}\n\n// A walk row's bar stands for a span of its haplotype's own contig, so the\n// question a right-click asks is answered by a linear view on that assembly,\n// with its genes\nfunction walkRowMenuItems(\n model: GraphPaneModel,\n row: number,\n bars: WalkRows | undefined,\n): MenuItem[] {\n const rows = bars ?? model.walkRowBars\n const target = model.walkRowLaunchTarget(row, rows)\n const assembly = target?.assembly\n const walk = row > 0 ? rows?.rows[row - 1] : undefined\n const sample = walk?.sample\n // the strip's rows are not walk rows', and take no sample filter\n const filters = !bars && model.walkRowBars\n const shown = model.walkRowSamples\n return [\n target && assembly\n ? {\n label: `Linear genome view \u2014 ${assembly} ${regionLabel(target.location)}`,\n icon: LineStyleIcon,\n onClick: () => {\n model.showInLinearView({ location: target.location, assembly })\n },\n }\n : {\n label: 'Linear genome view',\n icon: LineStyleIcon,\n disabled: true,\n disabledHelpText: target\n ? `No assembly in this session is ${target.location.haplotype ?? target.label}`\n : 'This walk states no contig coordinates',\n onClick: () => {},\n },\n ...(walk && model.liftsWalks && model.modeDrawsNodes\n ? [\n {\n type: 'checkbox' as const,\n label: `Highlight ${walk.label}`,\n checked: model.walkLayers.some(l => l.walk === walk.name),\n onClick: () => {\n model.toggleWalk(walk.name)\n },\n },\n ]\n : []),\n ...(filters && sample && !(shown?.length === 1 && shown[0] === sample)\n ? [\n {\n label: `Show only ${sample}`,\n icon: FilterListIcon,\n onClick: () => {\n model.setWalkRowSamples([sample])\n },\n },\n ]\n : []),\n ...(filters && shown\n ? [\n {\n label: 'Show every sample',\n icon: FilterListOffIcon,\n onClick: () => {\n model.setWalkRowSamples(undefined)\n },\n },\n ]\n : []),\n ]\n}\n\n// core's context menu, opened at the pointer itself rather than beside it\nexport default function PaneContextMenu({\n model,\n at,\n onClose,\n}: {\n model: GraphPaneModel\n at: PaneContextAt | undefined\n onClose: () => void\n}) {\n return (\n <ContextMenu\n anchor={at}\n offset={AT_POINTER}\n onClose={onClose}\n menuItems={() =>\n at === undefined\n ? []\n : 'nodeId' in at\n ? nodeMenuItems(model, at.nodeId)\n : walkRowMenuItems(model, at.row, at.bars)\n }\n />\n )\n}\n", "import { useMemo, useState } from 'react'\n\nimport {\n walkRowReadout,\n walkRowsKey,\n walkRowsTree,\n} from '@jbrowse/bandage-core/layout/walkRowDraw'\nimport {\n stripGeneGaps,\n stripRowAt,\n walkMarksTree,\n walkStripLabelsTree,\n} from '@jbrowse/bandage-core/layout/walkStrip'\nimport { RAMP_GRADIENT_CSS } from '@jbrowse/bandage-core/referenceRampCss'\nimport { isAlive } from '@jbrowse/mobx-state-tree'\nimport { observer } from 'mobx-react'\n\nimport ElTree, { useSvgId } from './ElTree'\nimport { LegendSwatchView } from './LegendSwatch'\nimport PaneContextMenu from './PaneContextMenu'\nimport { legendRowStyle } from './legendStyles'\nimport { walkRowSwatch } from '../legendSections'\n\nimport type { GraphPaneModel } from '../model'\nimport type { RowGene } from '@jbrowse/bandage-core/layout/walkRowDraw'\nimport type { WalkRows } from '@jbrowse/bandage-core/layout/walkRows'\nimport type { StripFrame } from '@jbrowse/bandage-core/layout/walkStrip'\n\n// Walk rows under a layout that draws nodes, each haplotype's walk on its own\n// bp, linked to the drawing above: the hovered node ticks every bar where its\n// walk passes it, and a point on a bar lights its node, ringed, above. The\n// bars share the drawing's colours, so under the reference-position ramp a hue\n// in the drawing is the same hue on each bar. Every row is shown; rows too\n// thin to letter say who they are on hover.\n\nconst keyStyle = {\n display: 'flex',\n flexWrap: 'wrap' as const,\n gap: '2px 14px',\n padding: '2px 8px 6px',\n fontSize: 11,\n color: '#333',\n}\n\nconst tipStyle = {\n position: 'absolute' as const,\n pointerEvents: 'none' as const,\n background: 'rgba(255,255,255,0.92)',\n border: '1px solid #ccc',\n borderRadius: 3,\n padding: '1px 6px',\n fontSize: 11,\n whiteSpace: 'nowrap' as const,\n zIndex: 4,\n}\n\n// The bars, built once per rows, frame, colouring and genes rather than per\n// hover\nconst StripBars = observer(function StripBars({\n bars,\n frame,\n ramp,\n rowGenes,\n}: {\n bars: WalkRows\n frame: StripFrame\n ramp: { start: number; end: number } | undefined\n rowGenes: Map<string, RowGene[]> | undefined\n}) {\n const idPrefix = useSvgId()\n const tree = useMemo(\n () => walkRowsTree(bars, frame, { ramp, rowGenes, idPrefix }),\n [bars, frame, ramp, rowGenes, idPrefix],\n )\n return <ElTree el={tree} />\n})\n\n// The hovered row's readout where the rows are too thin to letter, at the\n// pointer's place on its bar. Its own observer, so a move along a bar redraws\n// the tip and not the strip.\nexport const StripTip = observer(function StripTip({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const bars = model.walkStripRows\n const frame = model.walkStripFrame\n const hover = model.stripHover\n const all = bars ? [bars.reference, ...bars.rows] : []\n const index = hover ? all.findIndex(r => r.name === hover.row) : -1\n const row = all[index]\n if (!bars || !frame || frame.labelled || !hover || !row) {\n return null\n }\n return (\n <div\n data-testid=\"graph-walk-strip-tip\"\n style={{\n ...tipStyle,\n left:\n (bars.origin + hover.offset) * frame.scaleX + frame.translateX + 12,\n top: index * frame.rowPx + frame.translateY - 18,\n }}\n >\n {row.label} \u00B7{' '}\n {walkRowReadout(row, index === 0 ? undefined : bars.reference)}\n </div>\n )\n})\n\nconst WalkStrip = observer(function WalkStrip({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const bars = model.walkStripRows\n const frame = model.walkStripFrame\n const [menu, setMenu] = useState<{\n clientX: number\n clientY: number\n row: number\n }>()\n if (!bars || !frame) {\n return null\n }\n const hit = (e: React.MouseEvent<SVGSVGElement>) => {\n const box = e.currentTarget.getBoundingClientRect()\n return stripRowAt(bars, frame, e.clientX - box.left, e.clientY - box.top)\n }\n const key = walkRowsKey(bars, {\n ramp: model.referenceRampDomain,\n rampCss: RAMP_GRADIENT_CSS,\n genes: stripGeneGaps(frame, model.walkRowGenes, model.walkRowGeneGaps),\n })\n return (\n <div\n data-testid=\"graph-walk-strip\"\n style={{ position: 'relative', borderTop: '1px solid #ddd' }}\n onMouseEnter={() => {\n model.setPointerInPane(true)\n }}\n onMouseLeave={() => {\n if (isAlive(model)) {\n model.setPointerInPane(false)\n model.setStripHover(null)\n }\n }}\n >\n <svg\n width={frame.width}\n height={frame.height}\n style={{ display: 'block' }}\n onMouseMove={e => {\n const at = hit(e)\n e.currentTarget.style.cursor = at && at.index > 0 ? 'pointer' : ''\n model.setStripHover(\n at ? { row: at.row.name, offset: at.offset } : null,\n )\n }}\n onClick={e => {\n const at = hit(e)\n if (at && at.index > 0) {\n model.toggleWalk(at.row.name)\n }\n }}\n onContextMenu={e => {\n const at = hit(e)\n if (at) {\n e.preventDefault()\n setMenu({ clientX: e.clientX, clientY: e.clientY, row: at.index })\n }\n }}\n >\n <title>\n Ticks mark where each walk passes the node under the pointer. Click a\n bar to lift its walk.\n </title>\n <StripBars\n bars={bars}\n frame={frame}\n ramp={model.referenceRampDomain}\n rowGenes={model.walkRowGenes}\n />\n <ElTree el={walkMarksTree(bars, frame, model.walkStripMarks)} />\n <ElTree\n el={walkStripLabelsTree(\n bars,\n frame,\n new Set(model.walkLayers.map(l => l.walk)),\n )}\n />\n </svg>\n <StripTip model={model} />\n <div style={keyStyle} data-testid=\"graph-walk-strip-key\">\n {key.map(entry => (\n <div key={entry.label} style={legendRowStyle}>\n <LegendSwatchView swatch={walkRowSwatch(entry.swatch)} />\n <span>{entry.label}</span>\n </div>\n ))}\n </div>\n <PaneContextMenu\n model={model}\n at={menu && { ...menu, bars }}\n onClose={() => {\n setMenu(undefined)\n }}\n />\n </div>\n )\n})\n\nexport default WalkStrip\n", "import { observer } from 'mobx-react'\n\nimport { PaneSvgLayer } from './PaneLayer'\n\nimport type { GraphPaneModel } from '../model'\n\n// A ring round the node a point on the walk strip lights, so a one-bp node\n// can be found in a hairball\nconst WalkStripLocator = observer(function WalkStripLocator({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const at = model.walkStripLocator\n return at ? (\n <PaneSvgLayer\n model={model}\n zIndex={4}\n overflow=\"visible\"\n testId=\"graph-walk-strip-locator\"\n >\n <circle\n cx={at.x}\n cy={at.y}\n r={11}\n fill=\"none\"\n stroke=\"white\"\n strokeWidth={4}\n />\n <circle\n cx={at.x}\n cy={at.y}\n r={11}\n fill=\"none\"\n stroke=\"#111\"\n strokeWidth={1.75}\n />\n </PaneSvgLayer>\n ) : null\n})\n\nexport default WalkStripLocator\n", "import { Canvas2DRenderer } from '@jbrowse/bandage-core/renderer/Canvas2DRenderer'\n\n// Canvas2D only, and deliberately not through render-core's GPU ladder. The\n// batch is strokes and arrowheads in layout units, and stroking them batched by\n// colour is inside a frame budget at the node counts this view caps itself at\n// (agent-docs/reference/GRAPH_SCALE_AND_LOD.md), so a GPU backend would buy a few\n// milliseconds for ~30 KB of bundled HAL and a shader toolchain. If one is ever\n// wanted, it should take the same `Renderer` interface and draw the batch as\n// instances \u2014 a capsule per node segment, a bezier ribbon per edge stroke \u2014\n// rather than reviving a triangle mesh; agent-docs/ideas/waiting-on-a-number scopes it.\nexport function createGraphRenderer(canvas: HTMLCanvasElement) {\n return Promise.resolve(new Canvas2DRenderer(canvas))\n}\n", "import { useEffect, useRef } from 'react'\n\nimport { LEGEND_INSET_PX } from '@jbrowse/bandage-core/labelLayout'\nimport { ErrorBanner, LoadingOverlay } from '@jbrowse/core/ui'\nimport { isAlive } from '@jbrowse/mobx-state-tree'\nimport { useRenderingBackend } from '@jbrowse/render-core/useRenderingBackend'\nimport { observer } from 'mobx-react'\n\nimport BubbleHalos from './BubbleHalos'\nimport FacetPanels from './FacetPanels'\nimport GenePins from './GenePins'\nimport GraphToolbar from './GraphToolbar'\nimport HoverLayer from './HoverLayer'\nimport HoverTooltip from './HoverTooltip'\nimport LabelLayer from './LabelLayer'\nimport { LegendPanel } from './Legend'\nimport PaneContextMenu from './PaneContextMenu'\nimport { PaneSvgLayer } from './PaneLayer'\nimport ReferenceStripOverlay from './ReferenceStripOverlay'\nimport TubeMapOverlay from './TubeMapOverlay'\nimport WalkRowsOverlay from './WalkRowsOverlay'\nimport WalkStrip from './WalkStrip'\nimport WalkStripLocator from './WalkStripLocator'\nimport { usePaneGestures, useWheelZoom } from './usePaneGestures'\nimport { PAPER_CSS } from '../pane/paneBase'\nimport { createGraphRenderer } from '../renderer/GraphRenderer'\n\nimport type { GraphPaneModel } from '../model'\n\nconst wrapperStyle = { position: 'relative' as const }\n\n// The overlay origin has to be the canvas, not the wrapper: the wrapper also\n// holds the toolbar, so anything positioned against it is offset by the\n// toolbar's height, and a row label lands a whole row off the row it names.\nconst canvasAreaStyle = {\n position: 'relative' as const,\n lineHeight: 0,\n isolation: 'isolate' as const,\n}\n\n// Under a transparent canvas, from below the reference strip down, so the\n// linear view's gridlines show only behind the strip\nconst paperStyle = {\n position: 'absolute' as const,\n left: 0,\n right: 0,\n bottom: 0,\n zIndex: 0,\n}\n\n// Above the labels, pins and legends drawn over the canvas, and with the line\n// height the canvas area zeroes, which would collapse the overlay's label\nconst loadingLayerStyle = {\n position: 'absolute' as const,\n inset: 0,\n zIndex: 10,\n lineHeight: 'normal',\n pointerEvents: 'none' as const,\n}\n\nconst rowLabelStyle = {\n position: 'absolute' as const,\n left: 6,\n transform: 'translateY(-50%)',\n background: 'rgba(255,255,255,0.82)',\n padding: '0 4px',\n borderRadius: 3,\n fontSize: 11,\n // explicit, because the canvas container zeroes line-height to kill the\n // inline-block gap under the canvas. Inherited, that collapses the label to a\n // zero-height box: it still paints, but it has no layout, so anything asking\n // whether it is visible (a screenshot spec's waitForVisible, a11y tooling)\n // is told no.\n lineHeight: '16px',\n whiteSpace: 'nowrap' as const,\n pointerEvents: 'none' as const,\n zIndex: 4,\n}\n\n// Names the rows of a row-structured layout (anchored, sample rows). Without\n// them the layout draws real structure that cannot be read: a stack of bars\n// where every row means something and nothing says what.\n//\n// Positioned from the layout's own `rowLabels` through the same transform the\n// canvas draws with, so a label tracks its row across pan and zoom instead of\n// sitting at a measured pixel. It therefore has to be mounted in the canvas's\n// own positioning context (canvasAreaStyle) \u2014 against the wrapper it picks up\n// the toolbar's height and names the wrong row. Pinned to the left edge rather\n// than to the row's own x, because a row's leftmost node is wherever its first\n// allele happens to branch.\n//\n// Keyed on the row, not on the label: two rows can have the same words. The\n// sample-row layout names row 0 for the assembly the backbone comes from and\n// the rows below it for the samples contributing alleles, and a diploid\n// reference is in both lists \u2014 one haplotype is the reference path, the other\n// walks alleles of its own, and `parsePanSN` reduces both to one sample name.\nconst RowLabels = observer(function RowLabels({\n model,\n}: {\n model: GraphPaneModel\n}) {\n return (\n <>\n {model.visibleRowLabels.map(({ label, y, top }) => (\n <div\n key={y}\n data-testid=\"graph-row-label\"\n style={{ ...rowLabelStyle, top }}\n >\n {label}\n </div>\n ))}\n </>\n )\n})\n\n// Top RIGHT: the row labels own the left edge and the hover tooltip owns the\n// bottom right, so this is the one corner nothing else claims. Every key\n// stretches to the widest, so together they read as one panel. It takes the\n// pointer, for its rows' titles and its close button.\nconst legendStackStyle = {\n position: 'absolute' as const,\n top: LEGEND_INSET_PX,\n right: LEGEND_INSET_PX,\n display: 'flex',\n flexDirection: 'column' as const,\n borderRadius: 3,\n overflow: 'hidden' as const,\n zIndex: 4,\n}\n\nconst nodeLabelStyle = {\n position: 'absolute' as const,\n transform: 'translate(-50%, -50%)',\n background: 'rgba(255,255,255,0.78)',\n padding: '0 3px',\n borderRadius: 3,\n fontSize: 10,\n lineHeight: '13px',\n whiteSpace: 'nowrap' as const,\n pointerEvents: 'none' as const,\n zIndex: 3,\n}\n\n// Matches EDGE_DELETION_COLOR, so the words and the arc they name are one thing.\nconst deletionLabelStyle = {\n ...nodeLabelStyle,\n color: '#18181c',\n fontWeight: 600,\n}\n\n// Measures itself for the model, so no label is placed under a legend and\n// none gives way to one that is not drawn.\n//\n// At rest only: the walk keys' hover readout would otherwise refit the view,\n// and the refit clears the hover that grew it\nconst Legends = observer(function Legends({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const ref = useRef<HTMLDivElement>(null)\n useEffect(() => {\n const el = ref.current\n if (!el) {\n return\n }\n // the last callback can land after the track is closed\n const observer = new ResizeObserver(() => {\n if (isAlive(model) && model.hoveredNode === null) {\n model.setLegendSize({ width: el.offsetWidth, height: el.offsetHeight })\n }\n })\n observer.observe(el)\n return () => {\n observer.disconnect()\n }\n }, [model])\n return (\n <div\n ref={ref}\n style={{\n ...legendStackStyle,\n top: LEGEND_INSET_PX + model.referenceStripZonePx,\n }}\n >\n <LegendPanel model={model} />\n </div>\n )\n})\n\n// Writes each drawn thing's size onto it, which is what Bandage's Length label\n// does and what the tooltip alone could not: a graph you have to hover to read\n// is a graph nobody reads. graphLabels applies the same transform the canvas\n// draws with \u2014 so a label tracks its node across pan and zoom \u2014 and decides\n// which labels fit; this only paints them, mounted in the canvas's own\n// positioning context for the reason RowLabels is.\nconst GraphSizeLabels = observer(function GraphSizeLabels({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const labels = model.overlayLabels.sizes\n // A label too wide for the arc it names is placed clear of it and tethered\n // back; nothing else in the drawing carries one.\n const leaders = labels.flatMap(({ key, leader }) =>\n leader ? [{ key, ...leader }] : [],\n )\n return (\n <>\n {/* under the labels (z 3), so a leader runs beneath the text it points\n from; the placement culls a label past the canvas edge, so the\n layer leaves overflow visible */}\n {leaders.length > 0 ? (\n <PaneSvgLayer model={model} zIndex={2} overflow=\"visible\">\n {leaders.map(({ key, arcX, arcY, labelX, labelY }) => (\n <line\n key={key}\n data-testid=\"graph-label-leader\"\n x1={arcX}\n y1={arcY}\n x2={labelX}\n y2={labelY}\n stroke=\"#18181c\"\n strokeWidth={1}\n />\n ))}\n </PaneSvgLayer>\n ) : null}\n {labels.map(({ key, text, x, y, kind }) => (\n <div\n key={key}\n data-testid=\"graph-size-label\"\n style={{\n ...(kind === 'deletion' ? deletionLabelStyle : nodeLabelStyle),\n left: x,\n top: y,\n }}\n >\n {text}\n </div>\n ))}\n </>\n )\n})\n\n// `ownChrome` false for a pane inside a track, whose controls, loading state\n// and errors are the track's. A hosted pane whose x the host places takes no pan or wheel of its\n// own: those are the linear view's, as on any other track. One drawing its\n// own coordinates inside a track keeps them, and keeps them from the view.\nconst GraphCanvas = observer(function GraphCanvas({\n model,\n ownChrome = true,\n}: {\n model: GraphPaneModel\n ownChrome?: boolean\n}) {\n const {\n canvasRef,\n canvas,\n error: renderError,\n retry: retryRender,\n } = useRenderingBackend(createGraphRenderer, model)\n const { handlers, canvasStyle, contextMenu, closeContextMenu, hoveredChip } =\n usePaneGestures(model)\n useWheelZoom(canvas, model)\n const faceted = model.facetPanels !== undefined\n\n return (\n <div style={wrapperStyle}>\n {ownChrome ? <GraphToolbar model={model} /> : null}\n\n <div\n style={canvasAreaStyle}\n onMouseEnter={() => {\n model.setPointerInPane(true)\n }}\n onMouseLeave={() => {\n if (isAlive(model)) {\n model.setPointerInPane(false)\n }\n }}\n >\n {model.referenceStripShown ? (\n <div\n style={{\n ...paperStyle,\n top: model.referenceStripZonePx,\n background: PAPER_CSS,\n }}\n />\n ) : null}\n <canvas\n ref={canvasRef}\n data-testid=\"graph-genome-canvas\"\n style={{\n ...canvasStyle,\n width: model.paneWidth,\n height: model.canvasHeight,\n display: 'block',\n position: 'relative',\n zIndex: 1,\n }}\n {...handlers}\n />\n\n {faceted ? (\n <FacetPanels\n model={model}\n handlers={handlers}\n canvasStyle={canvasStyle}\n />\n ) : (\n <>\n <TubeMapOverlay model={model} />\n <HoverLayer model={model} />\n <ReferenceStripOverlay model={model} />\n <RowLabels model={model} />\n <GraphSizeLabels model={model} />\n <BubbleHalos model={model} />\n <GenePins model={model} />\n <LabelLayer model={model} />\n <WalkRowsOverlay model={model} />\n <WalkStripLocator model={model} />\n <Legends model={model} />\n </>\n )}\n\n {ownChrome ? (\n <div style={loadingLayerStyle}>\n <LoadingOverlay\n isVisible={model.isLoading}\n immediate={!model.layoutResult}\n statusMessage={model.statusMessage}\n onCancel={\n model.canCancelLoad\n ? () => {\n model.cancelLoad()\n }\n : undefined\n }\n />\n </div>\n ) : null}\n\n <HoverTooltip model={model} chip={hoveredChip} />\n </div>\n\n {model.walkStripShown ? <WalkStrip model={model} /> : null}\n\n <PaneContextMenu\n model={model}\n at={contextMenu}\n onClose={closeContextMenu}\n />\n\n {renderError ? (\n <ErrorBanner error={renderError} onReset={retryRender} />\n ) : null}\n\n {ownChrome && model.error ? (\n <ErrorBanner\n error={model.error}\n onReset={\n model.canRetryLoad\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,MAAOnD,EAAO,EAC1BC,EAACmD,GAAA,CAAsB,MAAOpD,EAAO,EACrCC,EAACH,GAAA,CAAU,MAAOE,EAAO,EACzBC,EAACgB,GAAA,CAAgB,MAAOjB,EAAO,EAC/BC,EAACoD,GAAA,CAAY,MAAOrD,EAAO,EAC3BC,EAACqD,GAAA,CAAS,MAAOtD,EAAO,EACxBC,EAACsD,GAAA,CAAW,MAAOvD,EAAO,EAC1BC,EAACuD,GAAA,CAAgB,MAAOxD,EAAO,EAC/BC,EAACwD,GAAA,CAAiB,MAAOzD,EAAO,EAChCC,EAACS,GAAA,CAAQ,MAAOV,EAAO,GACzB,EAGDgC,EACC/B,EAAC,OAAI,MAAOL,GACV,SAAAK,EAACyD,GAAA,CACC,UAAW1D,EAAM,UACjB,UAAW,CAACA,EAAM,aAClB,cAAeA,EAAM,cACrB,SACEA,EAAM,cACF,IAAM,CACJA,EAAM,WAAW,CACnB,EACA,OAER,EACF,EACE,KAEJC,EAAC0D,GAAA,CAAa,MAAO3D,EAAO,KAAM2C,EAAa,GACjD,EAEC3C,EAAM,eAAiBC,EAAC2D,GAAA,CAAU,MAAO5D,EAAO,EAAK,KAEtDC,EAAC4D,EAAA,CACC,MAAO7D,EACP,GAAIyC,EACJ,QAASC,EACX,EAECP,EACClC,EAAC6D,GAAA,CAAY,MAAO3B,EAAa,QAASC,EAAa,EACrD,KAEHJ,GAAahC,EAAM,MAClBC,EAAC6D,GAAA,CACC,MAAO9D,EAAM,MACb,QACEA,EAAM,aACF,IAAM,CACJA,EAAM,UAAU,CAClB,EACA,OAER,EACE,MACN,CAEJ,CAAC,EAEM+D,GAAQhC",
|
|
6
|
+
"names": ["host", "read", "name", "useRenderingBackend", "read", "useRenderingBackend_default", "host", "hoverLayerStyle", "paneLayerStyle", "HoverLayer", "model", "canvas", "setCanvas", "useState", "useEffect", "renderer", "Canvas2DRenderer", "dispose", "autorun", "jsx", "legendBoxStyle", "legendRowStyle", "legendNoteStyle", "LegendRowView", "row", "at", "hint", "after", "jsxs", "legendRowStyle", "jsx", "LegendSwatchView", "legendNoteStyle", "closeStyle", "LegendPanel", "observer", "model", "Fragment", "legendSections", "testid", "rows", "legendBoxStyle", "ZOOM_PER_NOTCH", "NOTCH_PX", "LINE_PX", "PAGE_PX", "PINCH_GAIN", "MAX_NOTCHES_PER_EVENT", "wheelZoomFactor", "e", "px", "notches", "useWheelZoom", "canvas", "model", "useEffect", "handleWheel", "e", "rect", "wheelZoomFactor", "CLICK_SLOP_PX", "usePaneGestures", "lastMouseRef", "useRef", "downRef", "hasMovedRef", "pendingRef", "contextMenu", "setContextMenu", "useState", "hoveredChip", "setHoveredChip", "pointerAt", "nodeAt", "sx", "sy", "onStrip", "nodePositions", "x", "y", "screenToLayout", "findHoveredNode", "edgeAt", "graph", "findHoveredEdge", "onMouseDown", "onPointerDown", "node", "applyPending", "pending", "pan", "hover", "chip", "chipReadoutAt", "was", "bars", "i", "scheduleFrame", "dropPending", "onPointerMove", "dx", "dy", "onPointerUp", "isAlive", "onPointerLeave", "onContextMenu", "clientX", "clientY", "row", "onClick", "gridStyle", "FACET_GAP_PX", "titleStyle", "FACET_TITLE_PX", "panelStyle", "keyStyle", "FACET_KEY_ROW_PX", "FacetPanel", "observer", "model", "lift", "width", "height", "cell", "handlers", "canvasStyle", "canvas", "setCanvas", "useState", "hoverCanvas", "setHoverCanvas", "walk", "useWheelZoom", "useEffect", "renderer", "Canvas2DRenderer", "hover", "drawing", "computed", "uploaded", "disposers", "autorun", "grid", "built", "dispose", "label", "jsxs", "jsx", "LegendRowView", "walkKeyRow", "hoverLayerStyle", "FacetPanels", "panels", "place", "columns", "PAPER_CSS", "i", "facetKeyRows", "row", "FacetPanels_default", "CropFree_default", "createSvgIcon", "jsx", "ZoomIn_default", "createSvgIcon", "jsx", "ZoomOut_default", "createSvgIcon", "jsx", "ColorSchemeSelect", "observer", "model", "fixed", "jsx", "LabelledSelect", "COLOR_SCHEMES", "scheme", "ColorSchemeSelect_default", "useStyles", "makeStyles", "fmtMs", "ms", "GraphPerf", "observer", "model", "classes", "lastFetchMs", "lastLayoutMs", "lastGeometryMs", "hasMetrics", "jsxs", "Typography", "GraphStats", "jsx", "GraphStats_default", "LayoutSelect", "observer", "model", "graph", "jsx", "LabelledSelect", "LAYOUT_MODES", "value", "label", "description", "available", "mode", "LayoutSelect_default", "RepeatSelect", "observer", "model", "repeatChoices", "jsx", "LabelledSelect", "key", "name", "unit", "RepeatSelect_default", "Close_default", "createSvgIcon", "jsx", "MoreVert_default", "createSvgIcon", "jsx", "SettingsMenu", "observer", "model", "haplotypes", "jsx", "CascadingMenuButton", "Route_default", "Visibility_default", "Settings_default", "getSession", "onClose", "GraphSettingsDialog_default", "Close_default", "MoreVert_default", "SettingsMenu_default", "useStyles", "makeStyles", "WalkSelect", "observer", "model", "classes", "labelId", "useId", "walkChoices", "names", "c", "labels", "picked", "layer", "name", "WALK_MENU_ITEMS", "jsx", "Button", "getSession", "onClose", "ChooseWalksDialog", "jsxs", "FormControl", "InputLabel", "Select", "selected", "n", "e", "value", "label", "MenuItem", "Checkbox", "ListItemText", "WalkSelect_default", "useStyles", "makeStyles", "ZoomDisplay", "observer", "model", "jsx", "Typography", "GraphToolbar", "classes", "zoomAboutCentre", "factor", "jsxs", "LayoutSelect_default", "ColorSchemeSelect_default", "WalkSelect_default", "RepeatSelect_default", "Tooltip", "IconButton", "ZoomIn_default", "ZoomOut_default", "CropFree_default", "GraphStats_default", "SettingsMenu_default", "GraphToolbar_default", "tooltipStyle", "TOOLTIP_INSET_PX", "labelled", "label", "readout", "jsxs", "Fragment", "jsx", "hoverTip", "model", "chip", "node", "merged", "own", "nodeOwnLocation", "regionLabel", "edge", "text", "edgeHoverText", "d", "id", "walkRow", "tube", "HoverTooltip", "observer", "tip", "HoverTooltip_default", "FilterList_default", "createSvgIcon", "jsx", "FilterListOff_default", "createSvgIcon", "jsx", "Info_default", "createSvgIcon", "jsx", "AT_POINTER", "nodeMenuItems", "model", "nodeId", "own", "reference", "highlight", "Info_default", "nodeLaunchMenuItems", "target", "walkRowMenuItems", "row", "bars", "rows", "assembly", "walk", "sample", "filters", "shown", "regionLabel", "LineStyle_default", "l", "FilterList_default", "FilterListOff_default", "PaneContextMenu", "at", "onClose", "jsx", "ContextMenu", "keyStyle", "tipStyle", "StripBars", "observer", "bars", "frame", "ramp", "rowGenes", "idPrefix", "useSvgId", "tree", "useMemo", "walkRowsTree", "jsx", "ElTree", "StripTip", "model", "hover", "all", "index", "r", "row", "jsxs", "walkRowReadout", "WalkStrip", "menu", "setMenu", "useState", "hit", "e", "box", "stripRowAt", "key", "walkRowsKey", "RAMP_GRADIENT_CSS", "stripGeneGaps", "isAlive", "at", "walkMarksTree", "walkStripLabelsTree", "l", "entry", "legendRowStyle", "LegendSwatchView", "walkRowSwatch", "PaneContextMenu", "WalkStrip_default", "WalkStripLocator", "observer", "model", "at", "jsxs", "PaneSvgLayer", "jsx", "WalkStripLocator_default", "createGraphRenderer", "canvas", "Canvas2DRenderer", "wrapperStyle", "canvasAreaStyle", "paperStyle", "loadingLayerStyle", "rowLabelStyle", "RowLabels", "observer", "model", "jsx", "Fragment", "label", "y", "top", "legendStackStyle", "LEGEND_INSET_PX", "nodeLabelStyle", "deletionLabelStyle", "Legends", "ref", "useRef", "useEffect", "el", "isAlive", "LegendPanel", "GraphSizeLabels", "labels", "leaders", "key", "leader", "jsxs", "PaneSvgLayer", "arcX", "arcY", "labelX", "labelY", "text", "x", "kind", "GraphCanvas", "ownChrome", "canvasRef", "canvas", "renderError", "retryRender", "useRenderingBackend", "createGraphRenderer", "handlers", "canvasStyle", "contextMenu", "closeContextMenu", "hoveredChip", "usePaneGestures", "useWheelZoom", "faceted", "GraphToolbar_default", "PAPER_CSS", "FacetPanels_default", "TubeMapOverlay_default", "HoverLayer", "ReferenceStripOverlay_default", "BubbleHalos_default", "GenePins_default", "LabelLayer_default", "WalkRowsOverlay_default", "WalkStripLocator_default", "LoadingOverlay", "HoverTooltip_default", "WalkStrip_default", "PaneContextMenu", "ErrorBanner", "GraphCanvas_default"]
|
|
7
|
+
}
|