{"src/lib/components/SeqViz.react.js":{"description":"SeqViz is a Dash wrapper for the seqviz JavaScript library.\nIt provides DNA, RNA, and protein sequence visualization with\ncircular and linear viewers, annotations, primers, and more.","displayName":"SeqViz","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"seq":{"type":{"name":"string"},"required":false,"description":"The sequence to render. Can be DNA, RNA, or amino acid sequence."},"name":{"type":{"name":"string"},"required":false,"description":"The name of the sequence/plasmid. Shown at the center of the circular viewer."},"viewer":{"type":{"name":"enum","value":[{"value":"'linear'","computed":false},{"value":"'circular'","computed":false},{"value":"'both'","computed":false},{"value":"'both_flip'","computed":false}]},"required":false,"description":"The type and orientation of the sequence viewers.\nOptions: \"linear\", \"circular\", \"both\", \"both_flip\"","defaultValue":{"value":"'both'","computed":false}},"annotations":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"start":{"name":"number","required":true},"end":{"name":"number","required":true},"name":{"name":"string","required":true},"direction":{"name":"number","required":false},"color":{"name":"string","required":false}}}},"required":false,"description":"Array of annotation objects to render.\nEach annotation: { start: number, end: number, name: string, direction?: number, color?: string }","defaultValue":{"value":"[]","computed":false}},"primers":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"start":{"name":"number","required":true},"end":{"name":"number","required":true},"name":{"name":"string","required":true},"direction":{"name":"number","required":true},"color":{"name":"string","required":false}}}},"required":false,"description":"Array of primer objects to render.\nEach primer: { start: number, end: number, name: string, direction: number, color?: string }","defaultValue":{"value":"[]","computed":false}},"highlights":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"start":{"name":"number","required":true},"end":{"name":"number","required":true},"color":{"name":"string","required":false}}}},"required":false,"description":"Array of highlight objects.\nEach highlight: { start: number, end: number, color?: string }","defaultValue":{"value":"[]","computed":false}},"translations":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"start":{"name":"number","required":true},"end":{"name":"number","required":true},"direction":{"name":"number","required":true},"name":{"name":"string","required":false},"color":{"name":"string","required":false}}}},"required":false,"description":"Array of translation objects.\nEach translation: { start: number, end: number, direction: number, name?: string, color?: string }","defaultValue":{"value":"[]","computed":false}},"enzymes":{"type":{"name":"arrayOf","value":{"name":"union","value":[{"name":"string"},{"name":"shape","value":{"name":{"name":"string","required":true},"rseq":{"name":"string","required":true},"fcut":{"name":"number","required":true},"rcut":{"name":"number","required":true},"color":{"name":"string","required":false},"range":{"name":"shape","value":{"start":{"name":"number","required":false},"end":{"name":"number","required":false}},"required":false}}}]}},"required":false,"description":"Array of restriction enzymes.\nCan be enzyme names (strings) or custom enzyme objects.","defaultValue":{"value":"[]","computed":false}},"search":{"type":{"name":"shape","value":{"query":{"name":"string","required":true},"mismatch":{"name":"number","required":false}}},"required":false,"description":"Search configuration object.\n{ query: string, mismatch?: number }"},"selection":{"type":{"name":"shape","value":{"start":{"name":"number","required":true},"end":{"name":"number","required":true},"clockwise":{"name":"bool","required":false}}},"required":false,"description":"Selection state object.\n{ start: number, end: number, clockwise?: boolean }"},"colors":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Array of colors for annotations, translations, and highlights.","defaultValue":{"value":"[]","computed":false}},"bp_colors":{"type":{"name":"object"},"required":false,"description":"Object mapping base pairs or indexes to custom colors.","defaultValue":{"value":"{}","computed":false}},"style":{"type":{"name":"object"},"required":false,"description":"CSS styles for the outer container div."},"zoom":{"type":{"name":"shape","value":{"linear":{"name":"number","required":false}}},"required":false,"description":"Zoom configuration object.\nCurrently supports: { linear: number } (0-100)","defaultValue":{"value":"{ linear: 50 }","computed":false}},"show_complement":{"type":{"name":"bool"},"required":false,"description":"Whether to show the complement sequence.","defaultValue":{"value":"true","computed":false}},"rotate_on_scroll":{"type":{"name":"bool"},"required":false,"description":"Whether the circular viewer rotates on scroll.","defaultValue":{"value":"true","computed":false}},"disable_external_fonts":{"type":{"name":"bool"},"required":false,"description":"Whether to disable downloading external fonts.","defaultValue":{"value":"false","computed":false}},"on_selection":{"type":{"name":"func"},"required":false,"description":"Callback function for selection events."},"on_search":{"type":{"name":"func"},"required":false,"description":"Callback function for search events."},"enable_copy_event":{"type":{"name":"bool"},"required":false,"description":"When false, disables the default copyEvent (ctrl/cmd + C).","defaultValue":{"value":"true","computed":false}},"enable_select_all_event":{"type":{"name":"bool"},"required":false,"description":"When false, disables the default selectAllEvent (ctrl/cmd + A).","defaultValue":{"value":"true","computed":false}},"search_results":{"type":{"name":"array"},"required":false,"description":"Search results emitted by seqviz (read-only for Dash usage)."},"export_request":{"type":{"name":"object"},"required":false,"description":"Write prop to trigger a figure export. Set it to an object like\n{ format: \"svg\" | \"png\", scale?: number, token?: any }; the component\nserializes the current viewer and puts a data URI in `export_result`.\nInclude a changing `token` (e.g. an n_clicks counter) so repeated\nexports of the same format re-fire. `scale` (PNG only, default 2) sets\nthe raster resolution multiplier."},"export_result":{"type":{"name":"string"},"required":false,"description":"Read-only. The most recent export as a data URI (`data:image/svg+xml,\u2026`\nor `data:image/png;base64,\u2026`). Feed it to a download, e.g. set it as\nthe href of an html.A(download=...) via a callback."},"max_seq_length":{"type":{"name":"number"},"required":false,"description":"Guard for very long sequences. seqviz's linear viewer renders per-base\nDOM and can hang the tab on multi-megabase input. When set and the\nsequence length exceeds this value, the component renders a lightweight\nplaceholder instead of mounting the viewer. Omit (default) for no\nguard. For very long sequences that must render, prefer\nviewer=\"circular\"."},"aria_label":{"type":{"name":"string"},"required":false,"description":"Accessible name for the viewer. seqviz renders an unlabeled SVG, so the\ncomponent gives its container role=\"group\" with this label (and labels\nthe circular SVG as role=\"img\"). Defaults to an auto-generated summary\n(\"Sequence viewer: <name>, <N> bp, <M> annotations\"). Note: seqviz\nprovides no keyboard navigation of individual features, so this is\nscreen-reader labeling only."},"clicked_element":{"type":{"name":"object"},"required":false,"description":"Read-only. The most recently clicked feature (annotation, primer,\nenzyme, translation, highlight, or search hit), as\n{ type, name, start, end, direction, id, color }. Updated only when a\nfeature is clicked (bare sequence selections leave it unchanged), so a\ncallback with Input(\"id\", \"clicked_element\") gets clean feature-click\nevents. Use it to drive linked views (e.g. highlight a table row when\nits annotation is clicked).\n\nNote: seqviz exposes no hover or rotation/center-index callbacks, so\nthose are not available as props."},"legend":{"type":{"name":"union","value":[{"name":"bool"},{"name":"object"}]},"required":false,"description":"Built-in interactive legend. Set to a dict (or True for defaults) to\nrender a Plotly-style legend around the viewer; omit for none. Options\nfollow Dash Mantine conventions. Keys:\n- show (bool): render the legend (default True when `legend` is given).\n- title (str): optional heading above the sections.\n- position (\"top\" | \"right\" | \"bottom\" | \"left\"): which side of the\n  viewer to place the legend on. Default \"bottom\".\n- direction (\"vertical\" | \"horizontal\"): item flow. Defaults to\n  horizontal for top/bottom and vertical for left/right.\n- align (\"start\" | \"center\" | \"end\"): cross-axis alignment of items.\n- size (\"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"): text + swatch scale.\n  Default \"sm\".\n- spacing, radius (\"xs\"..\"xl\" or a number of px): gap between items, and\n  the swatch + container corner radius.\n- withBorder (bool): wrap the legend in a bordered surface.\n- p (\"xs\"..\"xl\" or number): inner padding, applied when withBorder.\n- categories (list of str): which element types to include, any of\n  \"annotations\", \"translations\", \"primers\", \"highlights\". Default: every\n  type that has items.\n\nInteraction mirrors Plotly legends: single-click an item to hide/show it,\ndouble-click to isolate it (hide the others), and double-click the\nisolated item again to restore all. Swatch colors match what the viewer\nrenders (theme palettes included)."},"hidden_elements":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Read/write. Keys of the legend items currently toggled off (hidden from\nthe viewer), each formatted \"<category>:<name>\" (or \"<category>:<index>\"\nfor unnamed items such as highlights). The component updates this as the\nuser clicks the legend, so a callback can observe which elements are\nhidden; set it from a callback to control visibility programmatically.","defaultValue":{"value":"[]","computed":false}},"tooltip":{"type":{"name":"union","value":[{"name":"bool"},{"name":"object"}]},"required":false,"description":"Annotation hover tooltip (Plotly-style). Set to a dict (or True for\ndefaults) to show text when the user hovers an annotation; omit / False\nfor none. Keys:\n- show (bool): enable the tooltip (default True when `tooltip` is given).\n- hovertemplate (str): the hover text, with Plotly-style %{field}\n  placeholders filled per annotation. Use <br> (or a newline) for line\n  breaks; the first line is emphasized. Available fields: %{name},\n  %{start}, %{end}, %{length} (bp), %{direction} (\"forward\" | \"reverse\" |\n  \"none\"), %{color}, %{type}. Default hovertemplate:\n  \"%{name}<br>%{start}..%{end} (%{length} bp)\".\n\n  Custom data: reference the `customdata` prop (a list parallel to\n  `annotations`) the way Plotly does, indexed positionally, e.g.\n  %{customdata[0]}. See the `customdata` prop.\n\nSubstituted values are rendered as plain text (never HTML), so element\nnames and custom data cannot inject markup."},"customdata":{"type":{"name":"array"},"required":false,"description":"Extra per-annotation data for the hover tooltip, mirroring Plotly's\ncustomdata. A list parallel to `annotations`: customdata[i] holds the\ndata for annotations[i] (usually itself a list), referenced in the\ntooltip hovertemplate by position, e.g. %{customdata[0]}, %{customdata[1]}.\nExample: annotations=[{...}, {...}], customdata=[[\"b0344\", \"lacZ\"],\n[\"b0345\", \"lacY\"]] with hovertemplate \"%{name} (%{customdata[0]})\"."},"font":{"type":{"name":"object"},"required":false,"description":"Viewer typography, using Dash Mantine's font style-prop keys:\n- ff (str): font-family for the viewer text (sequence, labels, legend,\n  tooltip). A CSS font stack. Use a monospace family for the linear\n  sequence to stay aligned; a proportional family affects letter spacing.\n- fw (number | str): font-weight.\nExample: font={\"ff\": \"IBM Plex Mono, monospace\", \"fw\": 500}.\n\nApplied via a scoped style override (seqviz sets its font inline). Font\n*size* is not exposed here -- seqviz derives it so bases align with the\nruler and feature blocks; use `zoom` to scale the linear view instead.\n`style` remains for the container box (height, width, background)."},"theme":{"type":{"name":"enum","value":[{"value":"'light'","computed":false},{"value":"'dark'","computed":false},{"value":"'auto'","computed":false},{"value":"'xkcd'","computed":false},{"value":"'xkcd-light'","computed":false},{"value":"'xkcd-dark'","computed":false},{"value":"'okabe-ito-light'","computed":false},{"value":"'okabe-ito-dark'","computed":false},{"value":"'colorbrewer-light'","computed":false},{"value":"'colorbrewer-dark'","computed":false},{"value":"'tol-light'","computed":false},{"value":"'tol-dark'","computed":false}]},"required":false,"description":"Visual theme. The underlying seqviz library hardcodes dark-gray text,\nso this prop applies CSS overrides (shipped with dash_seqviz) scoped\nto a data-dash-seqviz-theme attribute on the wrapper, and \u2014 for the\ncolorblind themes \u2014 injects a CVD-safe qualitative palette into the\n`colors` prop when the user hasn't supplied their own.\n\nAvailable themes:\n- \"light\" (default) \u2014 seqviz default.\n- \"dark\" \u2014 adjusts text/tick/selector colors for dark backgrounds.\n- \"auto\" \u2014 follow the page color scheme (Mantine\n  data-mantine-color-scheme, else prefers-color-scheme), updating live.\n- \"okabe-ito-light\", \"okabe-ito-dark\" \u2014 Okabe & Ito's 7-color CVD-safe\n  palette. The de facto standard for categorical CVD-safe data viz.\n- \"colorbrewer-light\", \"colorbrewer-dark\" \u2014 ColorBrewer Set2 (light) /\n  Dark2 (dark). CVD-safe qualitative palettes with pastel (Set2) or\n  saturated (Dark2) tones.\n- \"tol-light\", \"tol-dark\" \u2014 Paul Tol's Bright. 7 colors engineered\n  for CVD distinction across deuteranopia, protanopia, tritanopia.\n\nPer-annotation `color` values supplied by the user always override\nthe theme palette, so explicit color choices are preserved.\n\nWire this to a theme switcher via a Dash callback \u2014 e.g. with\ndash-mantine-components, read the `colorScheme` and push \"dark\" or\n\"light\" to this prop.","defaultValue":{"value":"'light'","computed":false}},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback that should be called to report property changes\nto Dash, to make them available for callbacks."}}}}