@opendata-ai/openchart-react 8.6.3 → 8.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -328,6 +328,8 @@ interface GraphProps {
|
|
|
328
328
|
legend?: GraphLegendProp;
|
|
329
329
|
/** Fit the graph to the viewport on the first tick. Default true. */
|
|
330
330
|
fitOnLoad?: boolean;
|
|
331
|
+
/** How much closer than the fit the opening camera sits: a multiplier on the fit (2 = twice as close), not an absolute zoom level. Default 1. Read once at mount; `zoomToFit()` still frames the whole graph. */
|
|
332
|
+
initialZoom?: number;
|
|
331
333
|
/** CSS class name for the wrapper div. */
|
|
332
334
|
className?: string;
|
|
333
335
|
/** Inline styles for the wrapper div. */
|
package/dist/index.js
CHANGED
|
@@ -647,6 +647,7 @@ var Graph = forwardRef4(function Graph2({
|
|
|
647
647
|
tooltip,
|
|
648
648
|
legend,
|
|
649
649
|
fitOnLoad,
|
|
650
|
+
initialZoom,
|
|
650
651
|
className,
|
|
651
652
|
style
|
|
652
653
|
}, ref) {
|
|
@@ -787,6 +788,8 @@ var Graph = forwardRef4(function Graph2({
|
|
|
787
788
|
tooltip: tooltipOption,
|
|
788
789
|
legend,
|
|
789
790
|
fitOnLoad,
|
|
791
|
+
// Only the opening camera reads it, so it is not a mount dep.
|
|
792
|
+
initialZoom,
|
|
790
793
|
onNodeClick: stableOnNodeClick,
|
|
791
794
|
onNodeDoubleClick: stableOnNodeDoubleClick,
|
|
792
795
|
onNodeHover: stableOnNodeHover,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/BarList.tsx","../src/ThemeContext.tsx","../src/Chart.tsx","../src/ChartStory.tsx","../src/DataTable.tsx","../src/GeoMap.tsx","../src/Graph.tsx","../src/hooks.ts","../src/hooks/useGraph.ts","../src/hooks/useTable.ts","../src/hooks/useTableState.ts","../src/Sankey.tsx","../src/TileMap.tsx","../src/Visualization.tsx"],"sourcesContent":["/**\n * @opendata-ai/openchart-react\n *\n * React adapter for openchart. Provides <Chart /> and <DataTable />\n * components that wrap the vanilla adapter with React lifecycle management.\n *\n * Re-exports the full core type system and utilities so React consumers\n * only need a single @opendata-ai/openchart-react dependency.\n */\n\n// ---------------------------------------------------------------------------\n// Core: full type system, theme, colors, locale, accessibility, helpers\n// ---------------------------------------------------------------------------\n\nexport * from '@opendata-ai/openchart-core';\n\n// ---------------------------------------------------------------------------\n// Vanilla: export utilities (SVG/PNG/JPG/CSV)\n// ---------------------------------------------------------------------------\n\nexport type {\n JPGExportOptions,\n PNGExportOptions,\n SpecSequenceOptions,\n SVGExportOptions,\n} from '@opendata-ai/openchart-vanilla';\nexport {\n exportCSV,\n exportJPG,\n exportPNG,\n exportSpecSequence,\n exportSVG,\n exportSVGWithFonts,\n} from '@opendata-ai/openchart-vanilla';\n\n// ---------------------------------------------------------------------------\n// Engine: compile API and types not covered by core\n// ---------------------------------------------------------------------------\n\nexport type {\n ChartRenderer,\n CompiledGraphEdge,\n CompiledGraphNode,\n CompileResult,\n GraphCompilation,\n NormalizedBarListSpec,\n NormalizedChartSpec,\n NormalizedChrome,\n NormalizedGeoMapSpec,\n NormalizedGraphSpec,\n NormalizedSankeySpec,\n NormalizedSpec,\n NormalizedTableSpec,\n NormalizedTileMapSpec,\n SimulationConfig,\n ValidationError,\n ValidationErrorCode,\n ValidationResult,\n} from '@opendata-ai/openchart-engine';\nexport {\n clearRenderers,\n compile,\n compileBarList,\n compileChart,\n compileGeoMap,\n compileGraph,\n compileSankey,\n compileTable,\n compileTileMap,\n getChartRenderer,\n normalizeSpec,\n registerChartRenderer,\n validateSpec,\n} from '@opendata-ai/openchart-engine';\nexport type { BarListHandle, BarListProps } from './BarList';\nexport { BarList } from './BarList';\nexport type { ChartHandle, ChartProps } from './Chart';\n// Components\nexport { Chart } from './Chart';\nexport type { ChartStoryHandle, ChartStoryProps } from './ChartStory';\n// Scrollytelling\nexport { ChartStory } from './ChartStory';\nexport type { DataTableProps } from './DataTable';\nexport { DataTable } from './DataTable';\nexport type { GeoMapHandle, GeoMapProps } from './GeoMap';\nexport { GeoMap } from './GeoMap';\nexport type { GraphProps } from './Graph';\nexport { Graph } from './Graph';\nexport type { UseChartOptions, UseChartReturn } from './hooks';\n// Hooks\nexport { useChart, useDarkMode } from './hooks';\nexport type { GraphHandle, UseGraphReturn } from './hooks/useGraph';\nexport { useGraph } from './hooks/useGraph';\nexport type { UseTableReturn } from './hooks/useTable';\nexport { useTable } from './hooks/useTable';\nexport type { UseTableStateOptions, UseTableStateReturn } from './hooks/useTableState';\nexport { useTableState } from './hooks/useTableState';\nexport type { SankeyHandle, SankeyProps } from './Sankey';\nexport { Sankey } from './Sankey';\nexport type { VizThemeProviderProps } from './ThemeContext';\n// Theme context\nexport { useVizDarkMode, useVizTheme, VizThemeProvider } from './ThemeContext';\nexport type { TileMapHandle, TileMapProps } from './TileMap';\nexport { TileMap } from './TileMap';\nexport type { VisualizationProps } from './Visualization';\nexport { Visualization } from './Visualization';\n","/**\n * React BarList component: thin wrapper around the vanilla adapter.\n *\n * Mounts a barlist instance on render, updates when spec changes,\n * and cleans up on unmount. All heavy lifting is done by the vanilla\n * createBarList() function.\n */\n\nimport type { BarListSpec, DarkMode, ThemeConfig } from '@opendata-ai/openchart-core';\nimport {\n type BarListInstance,\n type BarListMountOptions,\n createBarList,\n} from '@opendata-ai/openchart-vanilla';\nimport {\n type CSSProperties,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport { useVizDarkMode, useVizTheme } from './ThemeContext';\n\nexport interface BarListProps {\n spec: BarListSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n onRowClick?: (row: { label: string; value: number; data: Record<string, unknown> }) => void;\n onRowHover?: (\n row: {\n label: string;\n value: number;\n data: Record<string, unknown>;\n } | null,\n ) => void;\n className?: string;\n style?: CSSProperties;\n}\n\nexport interface BarListHandle {\n readonly instance: BarListInstance | null;\n}\n\nexport const BarList = forwardRef<BarListHandle, BarListProps>(function BarList(\n { spec, theme: themeProp, darkMode, onRowClick, onRowHover, className, style },\n ref,\n) {\n const contextTheme = useVizTheme();\n const contextDarkMode = useVizDarkMode();\n const theme = themeProp ?? contextTheme;\n const resolvedDarkMode = darkMode ?? contextDarkMode;\n const containerRef = useRef<HTMLDivElement>(null);\n const instanceRef = useRef<BarListInstance | null>(null);\n const specRef = useRef<string>('');\n\n const handlersRef = useRef<{\n onRowClick?: BarListProps['onRowClick'];\n onRowHover?: BarListProps['onRowHover'];\n }>({});\n handlersRef.current = { onRowClick, onRowHover };\n\n const stableOnRowClick = useCallback(\n (row: { label: string; value: number; data: Record<string, unknown> }) =>\n handlersRef.current.onRowClick?.(row),\n [],\n );\n const stableOnRowHover = useCallback(\n (row: { label: string; value: number; data: Record<string, unknown> } | null) =>\n handlersRef.current.onRowHover?.(row),\n [],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n get instance() {\n return instanceRef.current;\n },\n }),\n [],\n );\n\n // Mount barlist and recreate when theme/darkMode change.\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec intentionally excluded - spec changes handled via update() in Effect 2\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const options: BarListMountOptions = {\n theme,\n darkMode: resolvedDarkMode,\n onRowClick: stableOnRowClick,\n onRowHover: stableOnRowHover,\n responsive: true,\n };\n\n instanceRef.current = createBarList(container, spec, options);\n specRef.current = JSON.stringify(spec);\n\n return () => {\n instanceRef.current?.destroy();\n instanceRef.current = null;\n };\n }, [theme, resolvedDarkMode, stableOnRowClick, stableOnRowHover]);\n\n // Update barlist when spec changes.\n useEffect(() => {\n const instance = instanceRef.current;\n if (!instance) return;\n\n const specString = JSON.stringify(spec);\n if (specString === specRef.current) return;\n\n specRef.current = specString;\n instance.update(spec);\n }, [spec]);\n\n return (\n <div\n ref={containerRef}\n className={className ? `oc-barlist-root ${className}` : 'oc-barlist-root'}\n style={style}\n />\n );\n});\n","/**\n * Theme context: provides a theme and dark mode preference to all\n * descendant Chart, DataTable, and Graph components without prop drilling.\n *\n * Components use the context values as fallbacks when no explicit\n * `theme` or `darkMode` prop is passed.\n */\n\nimport type { DarkMode, ThemeConfig } from '@opendata-ai/openchart-core';\nimport { createContext, type ReactNode, useContext } from 'react';\n\nconst VizThemeContext = createContext<ThemeConfig | undefined>(undefined);\nconst VizDarkModeContext = createContext<DarkMode | undefined>(undefined);\n\n/** Read the current theme from the nearest VizThemeProvider. */\nexport function useVizTheme(): ThemeConfig | undefined {\n return useContext(VizThemeContext);\n}\n\n/** Read the current dark mode preference from the nearest VizThemeProvider. */\nexport function useVizDarkMode(): DarkMode | undefined {\n return useContext(VizDarkModeContext);\n}\n\nexport interface VizThemeProviderProps {\n /** Theme config to provide to descendant viz components. */\n theme: ThemeConfig | undefined;\n /** Dark mode preference to provide to descendant viz components. */\n darkMode?: DarkMode;\n children: ReactNode;\n}\n\n/** Provides a theme and dark mode preference to all nested Chart, DataTable, and Graph components. */\nexport function VizThemeProvider({ theme, darkMode, children }: VizThemeProviderProps) {\n return (\n <VizThemeContext.Provider value={theme}>\n <VizDarkModeContext.Provider value={darkMode}>{children}</VizDarkModeContext.Provider>\n </VizThemeContext.Provider>\n );\n}\n","/**\n * React Chart component: thin wrapper around the vanilla adapter.\n *\n * Mounts a chart instance on render, updates when spec changes,\n * and cleans up on unmount. All heavy lifting is done by the vanilla\n * createChart() function.\n */\n// biome-ignore-all lint/correctness/useHookAtTopLevel: Biome doesn't recognize overloaded function declarations as React components; hooks are correctly at the top level of ChartInner\n\nimport type {\n ChartEventHandlers,\n ChartSpec,\n DarkMode,\n DataRow,\n ElementRef,\n GraphSpec,\n LayerSpec,\n ThemeConfig,\n} from '@opendata-ai/openchart-core';\nimport { type ChartInstance, createChart, type MountOptions } from '@opendata-ai/openchart-vanilla';\nimport {\n type CSSProperties,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport { useVizDarkMode, useVizTheme } from './ThemeContext';\n\nexport interface ChartHandle {\n /** Get the currently selected element, or null if none. */\n getSelectedElement(): ElementRef | null;\n /** Programmatically select an element. */\n select(ref: ElementRef): void;\n /** Deselect the current element. */\n deselect(): void;\n /** The underlying chart instance (null until mounted). */\n readonly instance: ChartInstance | null;\n}\n\nexport interface ChartProps<TData extends DataRow = DataRow> extends ChartEventHandlers {\n /** The visualization spec to render. */\n spec: ChartSpec<TData> | LayerSpec<TData> | GraphSpec;\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode: \"auto\", \"force\", or \"off\". */\n darkMode?: DarkMode;\n /**\n * Rendering backend for point marks (mirrors vega-embed's `renderer`\n * option). `'auto'` (default) promotes dense scatters to canvas.\n */\n renderer?: 'auto' | 'svg' | 'canvas';\n /** Callback when a data point is clicked. @deprecated Use onMarkClick instead. */\n onDataPointClick?: (data: Record<string, unknown>) => void;\n /** The currently selected element (controlled). */\n selectedElement?: ElementRef;\n /** Highlight specific color-encoding values. Pass null to clear. */\n highlight?: string[] | null;\n /** CSS class name for the wrapper div. */\n className?: string;\n /** Inline styles for the wrapper div. */\n style?: CSSProperties;\n}\n\n/**\n * React component that renders a visualization from a spec.\n *\n * Uses the vanilla adapter internally. The spec is compiled and rendered\n * as SVG inside a wrapper div. Spec changes trigger re-renders via the\n * vanilla adapter's update() method.\n *\n * Pass a typed data row as the generic to get field autocomplete:\n * ```tsx\n * type SalesRow = { date: string; revenue: number };\n * <Chart<SalesRow> spec={{ mark: 'line', data: rows, encoding: { x: { field: 'date', ... } } }} />\n * ```\n */\n// forwardRef doesn't support generics natively in TypeScript, so we use the\n// inner function + cast pattern to preserve the generic on the public API.\nfunction ChartInner<TData extends DataRow = DataRow>(\n props: ChartProps<TData> & React.RefAttributes<ChartHandle>,\n ref: React.Ref<ChartHandle>,\n): React.ReactElement | null;\nfunction ChartInner(\n props: ChartProps & { ref?: React.Ref<ChartHandle> },\n ref: React.Ref<ChartHandle>,\n): React.ReactElement | null;\nfunction ChartInner(\n {\n spec,\n theme: themeProp,\n darkMode,\n renderer,\n onDataPointClick,\n onMarkClick,\n onMarkHover,\n onMarkLeave,\n onLegendToggle,\n onHighlightChange,\n onAnnotationClick,\n onAnnotationEdit,\n onEdit,\n onSelect,\n onDeselect,\n onTextEdit,\n onReveal,\n editable,\n selectedElement: selectedElementProp,\n highlight,\n className,\n style,\n }: ChartProps,\n ref: React.Ref<ChartHandle>,\n) {\n const contextTheme = useVizTheme();\n const contextDarkMode = useVizDarkMode();\n const theme = themeProp ?? contextTheme;\n const resolvedDarkMode = darkMode ?? contextDarkMode;\n const containerRef = useRef<HTMLDivElement>(null);\n const chartRef = useRef<ChartInstance | null>(null);\n const specRef = useRef<string>('');\n\n // Store event handlers in refs so they don't trigger chart recreation.\n // Inline arrow functions create new references every render, which would\n // destroy and recreate the entire chart instance without this pattern.\n const handlersRef = useRef<{\n onDataPointClick?: ChartProps['onDataPointClick'];\n onMarkClick?: ChartProps['onMarkClick'];\n onMarkHover?: ChartProps['onMarkHover'];\n onMarkLeave?: ChartProps['onMarkLeave'];\n onLegendToggle?: ChartProps['onLegendToggle'];\n onHighlightChange?: ChartProps['onHighlightChange'];\n onAnnotationClick?: ChartProps['onAnnotationClick'];\n onAnnotationEdit?: ChartProps['onAnnotationEdit'];\n onEdit?: ChartProps['onEdit'];\n onSelect?: ChartProps['onSelect'];\n onDeselect?: ChartProps['onDeselect'];\n onTextEdit?: ChartProps['onTextEdit'];\n onReveal?: ChartProps['onReveal'];\n }>({});\n handlersRef.current = {\n onDataPointClick,\n onMarkClick,\n onMarkHover,\n onMarkLeave,\n onLegendToggle,\n onHighlightChange,\n onAnnotationClick,\n onAnnotationEdit,\n onEdit,\n onSelect,\n onDeselect,\n onTextEdit,\n onReveal,\n };\n\n // Stable callback wrappers that read from refs\n const stableOnDataPointClick = useCallback(\n (data: Record<string, unknown>) => handlersRef.current.onDataPointClick?.(data),\n [],\n );\n const stableOnMarkClick = useCallback(\n (event: import('@opendata-ai/openchart-core').MarkEvent) =>\n handlersRef.current.onMarkClick?.(event),\n [],\n );\n const stableOnMarkHover = useCallback(\n (event: import('@opendata-ai/openchart-core').MarkEvent) =>\n handlersRef.current.onMarkHover?.(event),\n [],\n );\n const stableOnMarkLeave = useCallback(() => handlersRef.current.onMarkLeave?.(), []);\n const stableOnLegendToggle = useCallback(\n (series: string, visible: boolean) => handlersRef.current.onLegendToggle?.(series, visible),\n [],\n );\n const stableOnHighlightChange = useCallback(\n (values: string[]) => handlersRef.current.onHighlightChange?.(values),\n [],\n );\n const stableOnAnnotationClick = useCallback(\n (annotation: import('@opendata-ai/openchart-core').Annotation, event: MouseEvent) =>\n handlersRef.current.onAnnotationClick?.(annotation, event),\n [],\n );\n const stableOnAnnotationEdit = useCallback(\n (\n annotation: import('@opendata-ai/openchart-core').TextAnnotation,\n updatedOffset: import('@opendata-ai/openchart-core').AnnotationOffset,\n ) => handlersRef.current.onAnnotationEdit?.(annotation, updatedOffset),\n [],\n );\n const stableOnEdit = useCallback(\n (edit: import('@opendata-ai/openchart-core').ElementEdit) => handlersRef.current.onEdit?.(edit),\n [],\n );\n const stableOnSelect = useCallback(\n (element: ElementRef) => handlersRef.current.onSelect?.(element),\n [],\n );\n const stableOnDeselect = useCallback(\n (element: ElementRef) => handlersRef.current.onDeselect?.(element),\n [],\n );\n const stableOnTextEdit = useCallback(\n (element: ElementRef, oldText: string, newText: string) =>\n handlersRef.current.onTextEdit?.(element, oldText, newText),\n [],\n );\n const stableOnReveal = useCallback(\n (guess: Array<{ x: string | number; y: number }>) => handlersRef.current.onReveal?.(guess),\n [],\n );\n\n // Expose imperative handle for ref-based control\n useImperativeHandle(\n ref,\n () => ({\n getSelectedElement() {\n return chartRef.current?.getSelectedElement() ?? null;\n },\n select(elementRef: ElementRef) {\n chartRef.current?.select(elementRef);\n },\n deselect() {\n chartRef.current?.deselect();\n },\n get instance() {\n return chartRef.current;\n },\n }),\n [],\n );\n\n // Mount chart and recreate when theme/darkMode change.\n // Event handlers use stable refs so they don't trigger recreation.\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec intentionally excluded - spec changes handled via update() in Effect 2\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const options: MountOptions = {\n theme,\n darkMode: resolvedDarkMode,\n renderer,\n onDataPointClick: stableOnDataPointClick,\n onMarkClick: stableOnMarkClick,\n onMarkHover: stableOnMarkHover,\n onMarkLeave: stableOnMarkLeave,\n onLegendToggle: stableOnLegendToggle,\n onHighlightChange: stableOnHighlightChange,\n onAnnotationClick: stableOnAnnotationClick,\n // Only include editing callbacks when the consumer provides them.\n // The stable wrappers are always truthy, so gating on handlersRef\n // avoids adding unstable prop references to the effect deps.\n ...(handlersRef.current.onAnnotationEdit ? { onAnnotationEdit: stableOnAnnotationEdit } : {}),\n ...(handlersRef.current.onEdit ? { onEdit: stableOnEdit } : {}),\n ...(handlersRef.current.onSelect ? { onSelect: stableOnSelect } : {}),\n ...(handlersRef.current.onDeselect ? { onDeselect: stableOnDeselect } : {}),\n ...(handlersRef.current.onTextEdit ? { onTextEdit: stableOnTextEdit } : {}),\n ...(handlersRef.current.onReveal ? { onReveal: stableOnReveal } : {}),\n ...(editable != null ? { editable } : {}),\n ...(selectedElementProp ? { selectedElement: selectedElementProp } : {}),\n responsive: true,\n };\n\n chartRef.current = createChart(container, spec, options);\n specRef.current = JSON.stringify(spec);\n\n return () => {\n chartRef.current?.destroy();\n chartRef.current = null;\n };\n // Only recreate when theme or darkMode change. Event handlers use stable refs.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n theme,\n resolvedDarkMode,\n renderer,\n editable,\n stableOnAnnotationClick,\n stableOnDataPointClick,\n stableOnEdit,\n stableOnLegendToggle,\n stableOnHighlightChange,\n stableOnMarkClick,\n stableOnMarkHover,\n stableOnMarkLeave,\n stableOnAnnotationEdit,\n stableOnSelect,\n stableOnDeselect,\n stableOnTextEdit,\n stableOnReveal,\n ]);\n\n // Update chart when spec changes\n useEffect(() => {\n const chart = chartRef.current;\n if (!chart) return;\n\n const specString = JSON.stringify(spec);\n if (specString !== specRef.current) {\n specRef.current = specString;\n chart.update(spec);\n }\n }, [spec]);\n\n // Handle selectedElement prop changes separately (like Vue/Svelte adapters)\n useEffect(() => {\n const chart = chartRef.current;\n if (!chart || !chart.select) return;\n\n if (selectedElementProp) {\n chart.select(selectedElementProp);\n } else if (chart.getSelectedElement?.()) {\n chart.deselect();\n }\n }, [selectedElementProp]);\n\n // Handle highlight prop changes\n useEffect(() => {\n if (chartRef.current && highlight !== undefined) {\n chartRef.current.setHighlight(highlight);\n }\n }, [highlight]);\n\n return (\n <div\n ref={containerRef}\n className={className ? `oc-chart-root ${className}` : 'oc-chart-root'}\n style={style}\n />\n );\n}\n\n/**\n * Generic Chart component with field autocomplete support.\n *\n * Pass your data row type to get compile-time field validation:\n * ```tsx\n * type SalesRow = { date: string; revenue: number; region: string };\n * <Chart<SalesRow> spec={{ mark: 'line', data: rows, encoding: { x: { field: 'date', type: 'temporal' } } }} />\n * ```\n *\n * Without a type parameter, behaves identically to before — no migration needed.\n */\nexport const Chart = forwardRef(ChartInner) as <TData extends DataRow = DataRow>(\n props: ChartProps<TData> & { ref?: React.Ref<ChartHandle> },\n) => React.ReactElement | null;\n// Restore display name lost by the forwardRef + cast pattern\n(Chart as React.FC).displayName = 'Chart';\n","/**\n * React scrollytelling shell around the vanilla `createChartStory`.\n *\n * The chart panel is sticky-pinned; the narrative column scrolls past it and\n * each step block advances the story. The heavy lifting (cumulative patch\n * application, mark morphing, crossfade fallback, camera) lives in the vanilla\n * story driver: this component owns only React lifecycle and the sticky layout.\n *\n * Self-driving by default (the vanilla `ScrollDriver` reads step positions),\n * or controlled by passing `step={n}` to drive it externally.\n */\n\nimport type {\n ChartSpec,\n DataRow,\n GeoMapSpec,\n GraphSpec,\n LayerSpec,\n} from '@opendata-ai/openchart-core';\nimport type { MountOptions } from '@opendata-ai/openchart-vanilla';\nimport {\n type ChartStoryInstance,\n type ChartStoryOptions,\n createChartStory,\n} from '@opendata-ai/openchart-vanilla/story';\nimport type { Ref } from 'react';\nimport { type CSSProperties, type ReactNode, useEffect, useImperativeHandle, useRef } from 'react';\n\nexport interface ChartStoryHandle {\n /** Jump the story to a step index (applies patches 0..n, animates the diff). */\n goTo(index: number): void;\n /** The underlying vanilla story instance, or null before mount. */\n readonly instance: ChartStoryInstance | null;\n}\n\nexport interface ChartStoryProps<TData extends DataRow = DataRow> {\n /** Base spec the story drives. */\n spec: ChartSpec<TData> | LayerSpec<TData> | GraphSpec | GeoMapSpec;\n /** Ordered step patches. `steps[i]` is applied cumulatively onto the base. */\n steps: ChartStoryOptions<TData>['steps'];\n /**\n * Narrative content per step: `narrative[i]` renders in the scrolling column\n * beside the sticky chart and triggers step `i` when it crosses the trigger\n * line. Length should match `steps`.\n */\n narrative: ReactNode[];\n /**\n * Controlled step index. When provided, the built-in scroll driver is left\n * in place but `goTo` is called on change so an external scroller can drive.\n * Omit for self-driving scroll.\n */\n step?: number;\n /** Fraction of viewport height where the scroll trigger sits. Default 0.4. */\n triggerPosition?: number;\n /** Camera driving mode. Default 'step'. */\n cameraMode?: 'step' | 'scrub';\n /** Options forwarded to the underlying chart mount (theme, dark mode, etc.). */\n mountOptions?: MountOptions;\n /** Class on the outer section. */\n className?: string;\n /** Inline styles merged onto the outer section. */\n style?: CSSProperties;\n ref?: Ref<ChartStoryHandle>;\n}\n\nconst sectionStyle: CSSProperties = {\n position: 'relative',\n display: 'grid',\n gridTemplateColumns: 'minmax(0, 26rem) minmax(0, 1fr)',\n gap: '3rem',\n alignItems: 'start',\n};\n\nconst narrativeColumnStyle: CSSProperties = {\n position: 'relative',\n};\n\nconst stepStyle: CSSProperties = {\n minHeight: '80vh',\n display: 'flex',\n alignItems: 'center',\n};\n\nconst panelStyle: CSSProperties = {\n position: 'sticky',\n top: '2rem',\n height: 'calc(100vh - 4rem)',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n};\n\nconst chartMountStyle: CSSProperties = {\n width: '100%',\n};\n\nexport function ChartStory<TData extends DataRow = DataRow>({\n spec,\n steps,\n narrative,\n step,\n triggerPosition,\n cameraMode,\n mountOptions,\n className,\n style,\n ref,\n}: ChartStoryProps<TData>) {\n const sectionRef = useRef<HTMLElement | null>(null);\n const chartMountRef = useRef<HTMLDivElement | null>(null);\n const stepRefs = useRef<Array<HTMLDivElement | null>>([]);\n const storyRef = useRef<ChartStoryInstance | null>(null);\n\n if (narrative.length !== steps.length) {\n console.warn(\n `[openchart] ChartStory: narrative length (${narrative.length}) does not match steps length (${steps.length}). Each step should have a corresponding narrative element.`,\n );\n }\n\n // Mount once; the vanilla driver owns updates so React never re-mounts on\n // spec/step churn (matching the <Chart /> imperative-update pattern).\n const optionsRef = useRef<{\n spec: typeof spec;\n steps: typeof steps;\n triggerPosition?: number;\n cameraMode?: 'step' | 'scrub';\n mountOptions?: MountOptions;\n }>({ spec, steps, triggerPosition, cameraMode, mountOptions });\n optionsRef.current = { spec, steps, triggerPosition, cameraMode, mountOptions };\n\n useEffect(() => {\n const mount = chartMountRef.current;\n const section = sectionRef.current;\n if (!mount) return;\n\n const opts = optionsRef.current;\n const story = createChartStory(\n mount,\n {\n spec: opts.spec,\n steps: opts.steps,\n triggerPosition: opts.triggerPosition,\n cameraMode: opts.cameraMode,\n },\n opts.mountOptions,\n );\n storyRef.current = story;\n\n if (section) story.setContainer(section);\n stepRefs.current.forEach((el, i) => {\n if (el) story.registerStep(i, el);\n });\n\n return () => {\n story.destroy();\n storyRef.current = null;\n };\n // Mount-once: options are read from the ref so changing them doesn't\n // remount. Spec/step diffing at runtime is out of scope for v1.\n }, []);\n\n // Controlled mode: drive the story when `step` changes.\n useEffect(() => {\n if (step === undefined) return;\n storyRef.current?.goTo(step);\n }, [step]);\n\n useImperativeHandle(\n ref,\n () => ({\n goTo(index: number) {\n storyRef.current?.goTo(index);\n },\n get instance() {\n return storyRef.current;\n },\n }),\n [],\n );\n\n return (\n <section ref={sectionRef} className={className} style={{ ...sectionStyle, ...style }}>\n <div style={narrativeColumnStyle}>\n {narrative.map((content, i) => (\n <div\n // biome-ignore lint/suspicious/noArrayIndexKey: steps are a fixed ordered list; index is the stable identity\n key={i}\n ref={(el) => {\n stepRefs.current[i] = el;\n }}\n data-oc-story-step={i}\n style={stepStyle}\n >\n <div style={{ maxWidth: '36rem' }}>{content}</div>\n </div>\n ))}\n </div>\n <div style={panelStyle}>\n <div ref={chartMountRef} style={chartMountStyle} />\n </div>\n </section>\n );\n}\n","/**\n * DataTable component: React wrapper around the vanilla table adapter.\n *\n * Mounts a table instance on render, updates when spec changes,\n * and cleans up on unmount. Supports both controlled and uncontrolled modes\n * for sort, search, and pagination state.\n */\n\nimport type { DarkMode, SortState, TableSpec, ThemeConfig } from '@opendata-ai/openchart-core';\nimport {\n createTable,\n type TableInstance,\n type TableMountOptions,\n} from '@opendata-ai/openchart-vanilla';\nimport { type CSSProperties, useCallback, useEffect, useRef } from 'react';\nimport { useVizDarkMode, useVizTheme } from './ThemeContext';\n\nexport interface DataTableProps {\n /** The table spec to render. */\n spec: TableSpec;\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode: \"auto\", \"force\", or \"off\". */\n darkMode?: DarkMode;\n /** Row click handler. */\n onRowClick?: (row: Record<string, unknown>) => void;\n /** Callback when sort changes. */\n onSortChange?: (sort: SortState | null) => void;\n /** Callback when search changes. */\n onSearchChange?: (query: string) => void;\n /** Callback when page changes. */\n onPageChange?: (page: number) => void;\n /** CSS class name for the wrapper div. */\n className?: string;\n /** Inline styles for the wrapper div. */\n style?: CSSProperties;\n /** Controlled sort state. */\n sort?: SortState | null;\n /** Controlled search query. */\n search?: string;\n /** Controlled page number. */\n page?: number;\n}\n\n/**\n * React component that renders a data table from a TableSpec.\n *\n * Uses the vanilla adapter internally. Supports controlled and uncontrolled\n * modes for sort, search, and pagination state.\n */\nexport function DataTable({\n spec,\n theme: themeProp,\n darkMode,\n onRowClick,\n onSortChange,\n onSearchChange,\n onPageChange,\n className,\n style,\n sort,\n search,\n page,\n}: DataTableProps) {\n const contextTheme = useVizTheme();\n const contextDarkMode = useVizDarkMode();\n const theme = themeProp ?? contextTheme;\n const resolvedDarkMode = darkMode ?? contextDarkMode;\n const containerRef = useRef<HTMLDivElement>(null);\n const tableRef = useRef<TableInstance | null>(null);\n\n // Store event handlers in refs so they don't trigger table recreation.\n const handlersRef = useRef<{\n onRowClick?: DataTableProps['onRowClick'];\n onSortChange?: DataTableProps['onSortChange'];\n onSearchChange?: DataTableProps['onSearchChange'];\n onPageChange?: DataTableProps['onPageChange'];\n }>({});\n handlersRef.current = { onRowClick, onSortChange, onSearchChange, onPageChange };\n\n // Stable callback wrappers that read from refs\n const stableOnRowClick = useCallback(\n (row: Record<string, unknown>) => handlersRef.current.onRowClick?.(row),\n [],\n );\n const stableOnStateChange = useCallback(\n (state: { sort?: SortState | null; search?: string; page?: number }) => {\n if (state.sort !== undefined) handlersRef.current.onSortChange?.(state.sort);\n if (state.search !== undefined) handlersRef.current.onSearchChange?.(state.search);\n if (state.page !== undefined) handlersRef.current.onPageChange?.(state.page);\n },\n [],\n );\n\n const prevSpecRef = useRef<string>('');\n\n // Determine if we're in controlled mode\n const isControlled = sort !== undefined || search !== undefined || page !== undefined;\n\n // Effect 1: Mount/unmount. Only recreate when structural options change.\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec, sort, search, page intentionally excluded - handled via update()/setState() in Effects 2-3\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const mountOptions: TableMountOptions = {\n theme,\n darkMode: resolvedDarkMode,\n onRowClick: stableOnRowClick,\n responsive: true,\n onStateChange: stableOnStateChange,\n };\n\n if (isControlled) {\n mountOptions.externalState = {\n sort: sort ?? null,\n search: search ?? '',\n page: page ?? 0,\n };\n }\n\n tableRef.current = createTable(container, spec, mountOptions);\n prevSpecRef.current = JSON.stringify(spec);\n\n return () => {\n tableRef.current?.destroy();\n tableRef.current = null;\n };\n // Only recreate on structural option changes (theme, darkMode, onRowClick).\n // Controlled state updates are handled in Effect 2.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [theme, resolvedDarkMode, isControlled, stableOnRowClick, stableOnStateChange]);\n\n // Effect 2: Sync controlled state without remounting.\n useEffect(() => {\n const table = tableRef.current;\n if (!table || !isControlled) return;\n\n table.setState({\n sort: sort ?? null,\n search: search ?? '',\n page: page ?? 0,\n });\n }, [sort, search, page, isControlled]);\n\n // Effect 3: Sync spec changes via update().\n useEffect(() => {\n const table = tableRef.current;\n if (!table) return;\n\n const specString = JSON.stringify(spec);\n if (specString !== prevSpecRef.current) {\n prevSpecRef.current = specString;\n table.update(spec);\n }\n }, [spec]);\n\n return (\n <div\n ref={containerRef}\n className={className ? `oc-table-root ${className}` : 'oc-table-root'}\n style={style}\n />\n );\n}\n","/**\n * React Map component: thin wrapper around the vanilla adapter.\n *\n * Mounts a map instance on render, updates when spec changes,\n * and cleans up on unmount. All heavy lifting is done by the vanilla\n * createGeoMap() function.\n *\n * Supports forwardRef for imperative control via the instance getter.\n */\n\nimport type { DarkMode, GeoMapSpec, ThemeConfig } from '@opendata-ai/openchart-core';\nimport {\n createGeoMap,\n type GeoMapInstance,\n type GeoMapMarkEvent,\n type GeoMapMountOptions,\n} from '@opendata-ai/openchart-vanilla';\nimport {\n type CSSProperties,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport { useVizDarkMode, useVizTheme } from './ThemeContext';\n\nexport interface GeoMapProps {\n /** The map spec to render. */\n spec: GeoMapSpec;\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode: \"auto\", \"force\", or \"off\". */\n darkMode?: DarkMode;\n /** Callback when a map feature is clicked. */\n onMarkClick?: (feature: GeoMapMarkEvent) => void;\n /** Callback when a map feature is hovered (null when hover ends). */\n onMarkHover?: (feature: GeoMapMarkEvent | null) => void;\n /** CSS class name for the wrapper div. */\n className?: string;\n /** Inline styles for the wrapper div. */\n style?: CSSProperties;\n}\n\nexport interface GeoMapHandle {\n /** The underlying map instance (null until mounted). */\n readonly instance: GeoMapInstance | null;\n}\n\nexport const GeoMap = forwardRef<GeoMapHandle, GeoMapProps>(function GeoMap(\n { spec, theme: themeProp, darkMode, onMarkClick, onMarkHover, className, style },\n ref,\n) {\n const contextTheme = useVizTheme();\n const contextDarkMode = useVizDarkMode();\n const theme = themeProp ?? contextTheme;\n const resolvedDarkMode = darkMode ?? contextDarkMode;\n const containerRef = useRef<HTMLDivElement>(null);\n const instanceRef = useRef<GeoMapInstance | null>(null);\n const specRef = useRef<string>('');\n\n const handlersRef = useRef<{\n onMarkClick?: GeoMapProps['onMarkClick'];\n onMarkHover?: GeoMapProps['onMarkHover'];\n }>({});\n handlersRef.current = {\n onMarkClick,\n onMarkHover,\n };\n\n const stableOnMarkClick = useCallback(\n (feature: GeoMapMarkEvent) => handlersRef.current.onMarkClick?.(feature),\n [],\n );\n const stableOnMarkHover = useCallback(\n (feature: GeoMapMarkEvent | null) => handlersRef.current.onMarkHover?.(feature),\n [],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n get instance() {\n return instanceRef.current;\n },\n }),\n [],\n );\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec intentionally excluded - spec changes handled via update() in Effect 2\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const options: GeoMapMountOptions = {\n theme,\n darkMode: resolvedDarkMode,\n onMarkClick: stableOnMarkClick,\n onMarkHover: stableOnMarkHover,\n responsive: true,\n };\n\n instanceRef.current = createGeoMap(container, spec, options);\n specRef.current = JSON.stringify(spec);\n\n return () => {\n instanceRef.current?.destroy();\n instanceRef.current = null;\n };\n }, [theme, resolvedDarkMode, stableOnMarkClick, stableOnMarkHover]);\n\n useEffect(() => {\n const instance = instanceRef.current;\n if (!instance) return;\n\n const specString = JSON.stringify(spec);\n if (specString === specRef.current) return;\n\n specRef.current = specString;\n instance.update(spec);\n }, [spec]);\n\n return (\n <div\n ref={containerRef}\n className={className ? `oc-map-root ${className}` : 'oc-map-root'}\n style={style}\n />\n );\n});\n","/**\n * React Graph component: thin wrapper around the vanilla adapter.\n *\n * Mounts a graph instance on render, updates when spec changes,\n * and cleans up on unmount. All heavy lifting is done by the vanilla\n * createGraph() function.\n *\n * Supports forwardRef for imperative control via useGraph() hook.\n */\n\nimport type { DarkMode, GraphSpec, ThemeConfig } from '@opendata-ai/openchart-core';\nimport {\n createGraph,\n type GraphCamera,\n type GraphInstance,\n type GraphMountOptions,\n type GraphTooltipFormatter,\n} from '@opendata-ai/openchart-vanilla';\nimport {\n type CSSProperties,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport type { GraphHandle } from './hooks/useGraph';\nimport { useVizDarkMode, useVizTheme } from './ThemeContext';\n\n/** Tooltip prop: `false` off, `true` default, or an object with a formatter. */\nexport type GraphTooltipProp = boolean | { formatter?: GraphTooltipFormatter };\n/** Legend prop: `false` off, `true` default, or an object toggling interactivity/counts. */\nexport type GraphLegendProp = boolean | { interactive?: boolean; counts?: boolean };\n\nexport interface GraphProps {\n /** The graph spec to render. */\n spec: GraphSpec;\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode: \"auto\", \"force\", or \"off\". */\n darkMode?: DarkMode;\n /** Callback when a node is clicked. */\n onNodeClick?: (node: Record<string, unknown>) => void;\n /** Callback when a node is double-clicked. */\n onNodeDoubleClick?: (node: Record<string, unknown>) => void;\n /** Callback when a node is hovered (null when hover ends). */\n onNodeHover?: (node: Record<string, unknown> | null) => void;\n /** Callback when an edge is hovered (null when hover ends). */\n onEdgeHover?: (edge: Record<string, unknown> | null) => void;\n /** Callback when selection changes. */\n onSelectionChange?: (nodeIds: string[]) => void;\n /** Fired when the user hovers a legend entry (null on leave). */\n onLegendHover?: (entry: { field: string; value: string } | null) => void;\n /** Fired when legend toggle state changes; `activeValues` is the active set (empty = all). */\n onLegendToggle?: (activeValues: string[]) => void;\n /** Fired whenever the highlight set changes (programmatic or legend), null when cleared. */\n onHighlightChange?: (nodeIds: string[] | null) => void;\n /** Camera change callback, rAF-coalesced (fires at most once per rendered frame). */\n onCameraChange?: (camera: GraphCamera) => void;\n /**\n * Show built-in tooltip on node/edge hover. Defaults to true. Pass an object\n * with a `formatter` to customize content.\n */\n tooltip?: GraphTooltipProp;\n /**\n * Show built-in legend. Defaults to true. Pass `false` if you render your own,\n * or an object to toggle interactivity/counts.\n */\n legend?: GraphLegendProp;\n /** Fit the graph to the viewport on the first tick. Default true. */\n fitOnLoad?: boolean;\n /** CSS class name for the wrapper div. */\n className?: string;\n /** Inline styles for the wrapper div. */\n style?: CSSProperties;\n}\n\n/** Structural (serializable) tooltip shape that participates in the mount dep key. */\nfunction tooltipStructural(tooltip: GraphTooltipProp | undefined): boolean {\n // Only the on/off decision is structural; the formatter is a function carried\n // by the ref-trampoline, never pinned in the dep array (avoids stale closures).\n if (tooltip === false) return false;\n return true;\n}\n\n/** Structural (serializable) legend shape that participates in the mount dep key. */\nfunction legendStructural(legend: GraphLegendProp | undefined): string {\n if (legend === false) return 'false';\n if (legend === true || legend === undefined) return 'true';\n return JSON.stringify({ interactive: legend.interactive, counts: legend.counts });\n}\n\n/**\n * React component that renders a force-directed graph from a GraphSpec.\n *\n * Uses the vanilla adapter internally. The spec is compiled and rendered\n * on a canvas inside a wrapper div. Spec changes trigger re-renders via the\n * vanilla adapter's update() method.\n *\n * Supports ref for imperative control via useGraph() hook:\n * ```tsx\n * const { ref, search, zoomToFit } = useGraph();\n * return <Graph ref={ref} spec={spec} />;\n * ```\n */\nexport const Graph = forwardRef<GraphHandle, GraphProps>(function Graph(\n {\n spec,\n theme: themeProp,\n darkMode,\n onNodeClick,\n onNodeDoubleClick,\n onNodeHover,\n onEdgeHover,\n onSelectionChange,\n onLegendHover,\n onLegendToggle,\n onHighlightChange,\n onCameraChange,\n tooltip,\n legend,\n fitOnLoad,\n className,\n style,\n },\n ref,\n) {\n const contextTheme = useVizTheme();\n const contextDarkMode = useVizDarkMode();\n const theme = themeProp ?? contextTheme;\n const resolvedDarkMode = darkMode ?? contextDarkMode;\n const containerRef = useRef<HTMLDivElement>(null);\n const graphRef = useRef<GraphInstance | null>(null);\n const specRef = useRef<string>('');\n // Deps of the previous mount-effect run. A recreation with CHANGED deps\n // (theme/darkMode/structural-tooltip/legend — all spec-unchanged) suppresses\n // the entrance; identical deps mean a StrictMode dev replay of the same\n // mount, which must still play the entrance. A survives-cleanup boolean ref\n // can't tell those apart — it would suppress the entrance in every\n // StrictMode app.\n const prevMountDepsRef = useRef<unknown[] | null>(null);\n\n // Store event handlers AND function-valued options in refs so they don't\n // trigger graph recreation. Inline functions create new references every\n // render, which would either destroy+recreate the graph (if pinned in the dep\n // array) or go stale (if read once at mount). The trampoline gives us stable\n // wrappers whose bodies read the LATEST handler on every call.\n const handlersRef = useRef<{\n onNodeClick?: GraphProps['onNodeClick'];\n onNodeDoubleClick?: GraphProps['onNodeDoubleClick'];\n onNodeHover?: GraphProps['onNodeHover'];\n onEdgeHover?: GraphProps['onEdgeHover'];\n onSelectionChange?: GraphProps['onSelectionChange'];\n onLegendHover?: GraphProps['onLegendHover'];\n onLegendToggle?: GraphProps['onLegendToggle'];\n onHighlightChange?: GraphProps['onHighlightChange'];\n onCameraChange?: GraphProps['onCameraChange'];\n tooltipFormatter?: GraphTooltipFormatter;\n }>({});\n handlersRef.current = {\n onNodeClick,\n onNodeDoubleClick,\n onNodeHover,\n onEdgeHover,\n onSelectionChange,\n onLegendHover,\n onLegendToggle,\n onHighlightChange,\n onCameraChange,\n tooltipFormatter: typeof tooltip === 'object' ? tooltip.formatter : undefined,\n };\n\n // Stable callback wrappers that read from refs\n const stableOnNodeClick = useCallback(\n (node: Record<string, unknown>) => handlersRef.current.onNodeClick?.(node),\n [],\n );\n const stableOnNodeDoubleClick = useCallback(\n (node: Record<string, unknown>) => handlersRef.current.onNodeDoubleClick?.(node),\n [],\n );\n const stableOnNodeHover = useCallback(\n (node: Record<string, unknown> | null) => handlersRef.current.onNodeHover?.(node),\n [],\n );\n const stableOnEdgeHover = useCallback(\n (edge: Record<string, unknown> | null) => handlersRef.current.onEdgeHover?.(edge),\n [],\n );\n const stableOnSelectionChange = useCallback(\n (nodeIds: string[]) => handlersRef.current.onSelectionChange?.(nodeIds),\n [],\n );\n const stableOnLegendHover = useCallback(\n (entry: { field: string; value: string } | null) => handlersRef.current.onLegendHover?.(entry),\n [],\n );\n const stableOnLegendToggle = useCallback(\n (activeValues: string[]) => handlersRef.current.onLegendToggle?.(activeValues),\n [],\n );\n const stableOnHighlightChange = useCallback(\n (nodeIds: string[] | null) => handlersRef.current.onHighlightChange?.(nodeIds),\n [],\n );\n const stableOnCameraChange = useCallback(\n (camera: GraphCamera) => handlersRef.current.onCameraChange?.(camera),\n [],\n );\n // A stable formatter wrapper: it always calls the LATEST formatter off the ref.\n // The tooltip mount option carries this wrapper, never the raw prop function, so\n // the formatter can't go stale and can't force graph recreation.\n const stableTooltipFormatter = useCallback<GraphTooltipFormatter>(\n (item, defaults) => handlersRef.current.tooltipFormatter?.(item, defaults) ?? defaults,\n [],\n );\n\n // Expose imperative handle for useGraph() hook. Every method forwards opts to\n // the underlying instance so consumers get the full vanilla API surface.\n useImperativeHandle(\n ref,\n () => ({\n search(query) {\n graphRef.current?.search(query);\n },\n clearSearch() {\n graphRef.current?.clearSearch();\n },\n getSearchMatches() {\n return graphRef.current?.getSearchMatches() ?? [];\n },\n zoomToFit(opts) {\n graphRef.current?.zoomToFit(opts);\n },\n zoomToNode(nodeId, opts) {\n graphRef.current?.zoomToNode(nodeId, opts);\n },\n flyTo(target, opts) {\n graphRef.current?.flyTo(target, opts);\n },\n centerAt(x, y, opts) {\n graphRef.current?.centerAt(x, y, opts);\n },\n getCamera() {\n return graphRef.current?.getCamera() ?? { x: 0, y: 0, k: 1 };\n },\n selectNode(nodeId, opts) {\n graphRef.current?.selectNode(nodeId, opts);\n },\n getSelectedNodes() {\n return graphRef.current?.getSelectedNodes() ?? [];\n },\n highlight(target, opts) {\n graphRef.current?.highlight(target, opts);\n },\n clearHighlight() {\n graphRef.current?.clearHighlight();\n },\n getHighlight() {\n return graphRef.current?.getHighlight() ?? null;\n },\n getLegend() {\n return graphRef.current?.getLegend() ?? null;\n },\n setActiveCategories(values: string[]) {\n graphRef.current?.setActiveCategories(values);\n },\n getActiveCategories() {\n return graphRef.current?.getActiveCategories() ?? [];\n },\n updateVisuals(spec: GraphSpec) {\n graphRef.current?.updateVisuals(spec);\n },\n get instance() {\n return graphRef.current;\n },\n }),\n [],\n );\n\n // Structural-only parts of tooltip/legend that gate recreation. The tooltip\n // formatter (a function) is deliberately excluded — it rides the trampoline.\n const tooltipOn = tooltipStructural(tooltip);\n const legendKey = legendStructural(legend);\n // 2D and 3D are different renderers chosen once, at mount, so a dimension\n // change is a remount. It is deliberately NOT in `mountDeps`: the new\n // renderer should play its entrance rather than suppress it.\n const dimensions = spec.dimensions ?? 2;\n\n // Mount graph and recreate when theme/darkMode/structural options change.\n // Event handlers and the tooltip formatter use stable refs so they don't\n // trigger recreation.\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec intentionally excluded - spec changes handled via update() in Effect 2\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n // Rebuild the tooltip option: keep the boolean/off decision, but always pass\n // the stable formatter wrapper when tooltips are on (so a formatter can be\n // added/changed per-render without recreating the graph).\n const tooltipOption: GraphMountOptions['tooltip'] = tooltipOn\n ? { formatter: stableTooltipFormatter }\n : false;\n\n // Suppress the entrance only when a PREVIOUS mount existed and a dep\n // actually changed (theme/darkMode/structural option — spec unchanged).\n // Identical deps = StrictMode's dev remount of the same graph: play it.\n const mountDeps: unknown[] = [theme, resolvedDarkMode, tooltipOn, legendKey, fitOnLoad];\n const prevDeps = prevMountDepsRef.current;\n const suppressEntrance =\n prevDeps !== null && mountDeps.some((d, i) => !Object.is(d, prevDeps[i]));\n\n const options: GraphMountOptions = {\n theme,\n darkMode: resolvedDarkMode,\n tooltip: tooltipOption,\n legend,\n fitOnLoad,\n onNodeClick: stableOnNodeClick,\n onNodeDoubleClick: stableOnNodeDoubleClick,\n onNodeHover: stableOnNodeHover,\n onEdgeHover: stableOnEdgeHover,\n onSelectionChange: stableOnSelectionChange,\n onLegendHover: stableOnLegendHover,\n onLegendToggle: stableOnLegendToggle,\n onHighlightChange: stableOnHighlightChange,\n onCameraChange: stableOnCameraChange,\n responsive: true,\n suppressEntrance,\n };\n\n graphRef.current = createGraph(container, spec, options);\n specRef.current = JSON.stringify(spec);\n prevMountDepsRef.current = mountDeps;\n\n return () => {\n graphRef.current?.destroy();\n graphRef.current = null;\n };\n // Only recreate when theme/darkMode/structural options change. Event handlers\n // and the tooltip formatter use stable refs.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n theme,\n resolvedDarkMode,\n tooltipOn,\n legendKey,\n fitOnLoad,\n stableOnNodeClick,\n stableOnNodeDoubleClick,\n stableOnNodeHover,\n stableOnEdgeHover,\n stableOnSelectionChange,\n stableOnLegendHover,\n stableOnLegendToggle,\n stableOnHighlightChange,\n stableOnCameraChange,\n stableTooltipFormatter,\n dimensions,\n ]);\n\n // Update the graph when the spec changes. `update()` diffs prev↔next itself:\n // a visual-only change (same node/edge ids + same physics) preserves positions\n // without restarting the sim; anything structural reheats with a local impulse.\n useEffect(() => {\n const graph = graphRef.current;\n if (!graph) return;\n\n const specString = JSON.stringify(spec);\n if (specString === specRef.current) return;\n specRef.current = specString;\n\n // `update` diffs internally: same node/edge ids + same physics take the\n // position-preserving path, anything structural reheats. No wrapper-side\n // heuristic needed (the old JSON-diff silently ignored physics changes).\n graph.update(spec);\n }, [spec]);\n\n return (\n <div\n ref={containerRef}\n className={className ? `oc-graph-root ${className}` : 'oc-graph-root'}\n style={style}\n />\n );\n});\n","/**\n * React hooks for chart lifecycle and dark mode resolution.\n *\n * useChart: manual control over a chart instance (for advanced usage).\n * useDarkMode: resolves the DarkMode preference to a boolean.\n */\n\nimport type {\n ChartLayout,\n ChartSpec,\n DarkMode,\n GraphSpec,\n LayerSpec,\n} from '@opendata-ai/openchart-core';\nimport { type ChartInstance, createChart, type MountOptions } from '@opendata-ai/openchart-vanilla';\nimport { useEffect, useRef, useState } from 'react';\n\n// ---------------------------------------------------------------------------\n// useChart\n// ---------------------------------------------------------------------------\n\nexport interface UseChartOptions {\n /** Theme overrides. */\n theme?: MountOptions['theme'];\n /** Dark mode setting. */\n darkMode?: MountOptions['darkMode'];\n /** Data point click handler. */\n onDataPointClick?: MountOptions['onDataPointClick'];\n /** Enable responsive resizing. Defaults to true. */\n responsive?: boolean;\n /** Rendering backend for point marks; see the vanilla `MountOptions.renderer`. */\n renderer?: MountOptions['renderer'];\n}\n\nexport interface UseChartReturn {\n /** Ref to attach to the container div. */\n ref: React.RefObject<HTMLDivElement | null>;\n /** The chart instance (null until mounted). */\n chart: ChartInstance | null;\n /** The current compiled layout (null until mounted). */\n layout: ChartLayout | null;\n}\n\n/**\n * Hook for manual chart lifecycle control.\n *\n * Attach the returned ref to a container div. The chart mounts\n * automatically and updates when the spec changes.\n *\n * @param spec - The visualization spec.\n * @param options - Mount options.\n * @returns { ref, chart, layout }\n */\nexport function useChart(\n spec: ChartSpec | LayerSpec | GraphSpec,\n options?: UseChartOptions,\n): UseChartReturn {\n const ref = useRef<HTMLDivElement | null>(null);\n const chartRef = useRef<ChartInstance | null>(null);\n const [layout, setLayout] = useState<ChartLayout | null>(null);\n const specRef = useRef<string>('');\n\n // Mount / unmount\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec intentionally excluded - spec changes handled via update() in the update effect\n useEffect(() => {\n const container = ref.current;\n if (!container) return;\n\n const mountOpts: MountOptions = {\n theme: options?.theme,\n darkMode: options?.darkMode,\n onDataPointClick: options?.onDataPointClick,\n responsive: options?.responsive,\n renderer: options?.renderer,\n };\n\n const chart = createChart(container, spec, mountOpts);\n chartRef.current = chart;\n setLayout(chart.layout);\n specRef.current = JSON.stringify(spec);\n\n return () => {\n chart.destroy();\n chartRef.current = null;\n setLayout(null);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n options?.theme,\n options?.darkMode,\n options?.onDataPointClick,\n options?.responsive,\n options?.renderer,\n ]);\n\n // Update on spec change\n useEffect(() => {\n const chart = chartRef.current;\n if (!chart) return;\n\n const specString = JSON.stringify(spec);\n if (specString !== specRef.current) {\n specRef.current = specString;\n chart.update(spec);\n setLayout(chart.layout);\n }\n }, [spec]);\n\n return {\n ref,\n chart: chartRef.current,\n layout,\n };\n}\n\n// ---------------------------------------------------------------------------\n// useDarkMode\n// ---------------------------------------------------------------------------\n\n/**\n * Resolve a DarkMode preference to a boolean.\n *\n * - \"force\" -> true\n * - \"off\" -> false\n * - \"auto\" -> matches system preference (reactive to changes)\n *\n * @param mode - The dark mode preference.\n * @returns Whether dark mode is active.\n */\nexport function useDarkMode(mode?: DarkMode): boolean {\n const [isDark, setIsDark] = useState(() => resolveInitial(mode));\n\n useEffect(() => {\n if (mode !== 'auto') {\n setIsDark(mode === 'force');\n return;\n }\n\n if (typeof window === 'undefined' || !window.matchMedia) {\n setIsDark(false);\n return;\n }\n\n const mq = window.matchMedia('(prefers-color-scheme: dark)');\n setIsDark(mq.matches);\n\n const handler = (e: MediaQueryListEvent) => setIsDark(e.matches);\n mq.addEventListener('change', handler);\n return () => mq.removeEventListener('change', handler);\n }, [mode]);\n\n return isDark;\n}\n\nfunction resolveInitial(mode?: DarkMode): boolean {\n if (mode === 'force') return true;\n if (mode === 'off' || mode === undefined) return false;\n // \"auto\"\n if (typeof window !== 'undefined' && window.matchMedia) {\n return window.matchMedia('(prefers-color-scheme: dark)').matches;\n }\n return false;\n}\n","/**\n * useGraph: hook for imperative graph control.\n *\n * Provides a ref to pass to <Graph /> and exposes graph methods\n * (search, zoom, select, fly, highlight) for programmatic control of the\n * graph instance. The full vanilla GraphInstance API is threaded through.\n */\n\nimport type { GraphSpec } from '@opendata-ai/openchart-core';\nimport type {\n CameraFlightOptions,\n GraphCamera,\n GraphFlyTarget,\n GraphHighlightTarget,\n GraphInstance,\n GraphLegendData,\n} from '@opendata-ai/openchart-vanilla';\nimport { useCallback, useRef } from 'react';\n\n// Re-exported rather than redeclared so the 3D pose fields (`position`,\n// `target`) stay visible to typed consumers of the React wrapper.\nexport type { GraphCamera, GraphFlyTarget } from '@opendata-ai/openchart-vanilla';\n\nexport interface UseGraphReturn {\n /** Ref to pass to <Graph ref={ref} />. */\n ref: React.RefObject<GraphHandle | null>;\n /** Search for nodes matching a query string. */\n search: (query: string) => void;\n /** Clear the current search. */\n clearSearch: () => void;\n /** Node ids currently matching the active search query. */\n getSearchMatches: () => string[];\n /** Zoom to fit all nodes in view. Animated by default; `{ duration: 0 }` snaps. */\n zoomToFit: (opts?: CameraFlightOptions & { padding?: number }) => void;\n /** Fly to a node and zoom in (default scale 2). */\n zoomToNode: (nodeId: string, opts?: CameraFlightOptions & { scale?: number }) => void;\n /** Fly the camera to a graph-space target. */\n flyTo: (target: GraphFlyTarget, opts?: CameraFlightOptions) => void;\n /** Center the camera on a graph-space point (keeps current zoom). */\n centerAt: (x: number, y: number, opts?: CameraFlightOptions) => void;\n /** Current camera transform. */\n getCamera: () => GraphCamera;\n /** Select a node by id; `{ fly: true }` also flies to it. */\n selectNode: (nodeId: string, opts?: { fly?: boolean } & CameraFlightOptions) => void;\n /** Get the currently selected node ids. */\n getSelectedNodes: () => string[];\n /**\n * Emphasize a set of nodes; eased via the focus model. Layers over the\n * standing category filter rather than replacing it.\n */\n highlight: (target: GraphHighlightTarget, opts?: { dimOpacity?: number }) => void;\n /**\n * Clear the transient highlight, returning to the standing category filter.\n * Does NOT clear that filter — use `setActiveCategories([])`.\n */\n clearHighlight: () => void;\n /** The effective highlighted node ids, or null when nothing is highlighted. */\n getHighlight: () => string[] | null;\n /** Headless snapshot of the legend. */\n getLegend: () => GraphLegendData | null;\n /** Set the active category filter declaratively (replaces legend toggle state). */\n setActiveCategories: (values: string[]) => void;\n /** Current active category values (empty = all active, no filter). */\n getActiveCategories: () => string[];\n}\n\n/** Handle exposed by Graph component via forwardRef. */\nexport interface GraphHandle {\n search: (query: string) => void;\n clearSearch: () => void;\n getSearchMatches: () => string[];\n zoomToFit: (opts?: CameraFlightOptions & { padding?: number }) => void;\n zoomToNode: (nodeId: string, opts?: CameraFlightOptions & { scale?: number }) => void;\n flyTo: (target: GraphFlyTarget, opts?: CameraFlightOptions) => void;\n centerAt: (x: number, y: number, opts?: CameraFlightOptions) => void;\n getCamera: () => GraphCamera;\n selectNode: (nodeId: string, opts?: { fly?: boolean } & CameraFlightOptions) => void;\n getSelectedNodes: () => string[];\n highlight: (target: GraphHighlightTarget, opts?: { dimOpacity?: number }) => void;\n clearHighlight: () => void;\n getHighlight: () => string[] | null;\n getLegend: () => GraphLegendData | null;\n setActiveCategories: (values: string[]) => void;\n getActiveCategories: () => string[];\n /** Re-compile encoding/legend/chrome without restarting the simulation. */\n updateVisuals: (spec: GraphSpec) => void;\n /** The underlying GraphInstance from the vanilla adapter. */\n instance: GraphInstance | null;\n}\n\n/**\n * Hook for imperative graph control.\n *\n * Usage:\n * ```tsx\n * const { ref, search, zoomToFit } = useGraph();\n * return <Graph ref={ref} spec={spec} />;\n * ```\n */\nexport function useGraph(): UseGraphReturn {\n const ref = useRef<GraphHandle | null>(null);\n\n const search = useCallback((query: string) => {\n ref.current?.search(query);\n }, []);\n\n const clearSearch = useCallback(() => {\n ref.current?.clearSearch();\n }, []);\n\n const getSearchMatches = useCallback((): string[] => {\n return ref.current?.getSearchMatches() ?? [];\n }, []);\n\n const zoomToFit = useCallback((opts?: CameraFlightOptions & { padding?: number }) => {\n ref.current?.zoomToFit(opts);\n }, []);\n\n const zoomToNode = useCallback(\n (nodeId: string, opts?: CameraFlightOptions & { scale?: number }) => {\n ref.current?.zoomToNode(nodeId, opts);\n },\n [],\n );\n\n const flyTo = useCallback((target: GraphFlyTarget, opts?: CameraFlightOptions) => {\n ref.current?.flyTo(target, opts);\n }, []);\n\n const centerAt = useCallback((x: number, y: number, opts?: CameraFlightOptions) => {\n ref.current?.centerAt(x, y, opts);\n }, []);\n\n const getCamera = useCallback((): GraphCamera => {\n return ref.current?.getCamera() ?? { x: 0, y: 0, k: 1 };\n }, []);\n\n const selectNode = useCallback(\n (nodeId: string, opts?: { fly?: boolean } & CameraFlightOptions) => {\n ref.current?.selectNode(nodeId, opts);\n },\n [],\n );\n\n const getSelectedNodes = useCallback((): string[] => {\n return ref.current?.getSelectedNodes() ?? [];\n }, []);\n\n const highlight = useCallback((target: GraphHighlightTarget, opts?: { dimOpacity?: number }) => {\n ref.current?.highlight(target, opts);\n }, []);\n\n const clearHighlight = useCallback(() => {\n ref.current?.clearHighlight();\n }, []);\n\n const getHighlight = useCallback((): string[] | null => {\n return ref.current?.getHighlight() ?? null;\n }, []);\n\n const getLegend = useCallback((): GraphLegendData | null => {\n return ref.current?.getLegend() ?? null;\n }, []);\n\n const setActiveCategories = useCallback((values: string[]) => {\n ref.current?.setActiveCategories(values);\n }, []);\n\n const getActiveCategories = useCallback((): string[] => {\n return ref.current?.getActiveCategories() ?? [];\n }, []);\n\n return {\n ref,\n search,\n clearSearch,\n getSearchMatches,\n zoomToFit,\n zoomToNode,\n flyTo,\n centerAt,\n getCamera,\n selectNode,\n getSelectedNodes,\n highlight,\n clearHighlight,\n getHighlight,\n getLegend,\n setActiveCategories,\n getActiveCategories,\n };\n}\n","/**\n * useTable: hook for manual table lifecycle control.\n *\n * Attaches to a container ref, mounts a vanilla table instance,\n * and exposes the instance and current state.\n */\n\nimport type { TableSpec } from '@opendata-ai/openchart-core';\nimport {\n createTable,\n type TableInstance,\n type TableMountOptions,\n type TableState,\n} from '@opendata-ai/openchart-vanilla';\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nexport interface UseTableReturn {\n /** Ref to attach to the container div. */\n ref: React.RefObject<HTMLDivElement | null>;\n /** The table instance (null until mounted). */\n table: TableInstance | null;\n /** The current table state (sort, search, page). */\n state: TableState;\n}\n\n/**\n * Hook for manual table lifecycle control.\n *\n * Attach the returned ref to a container div. The table mounts\n * automatically and updates when the spec changes.\n *\n * @param spec - The table spec.\n * @param options - Mount options.\n * @returns { ref, table, state }\n */\nexport function useTable(spec: TableSpec, options?: TableMountOptions): UseTableReturn {\n const ref = useRef<HTMLDivElement | null>(null);\n const tableRef = useRef<TableInstance | null>(null);\n const [state, setState] = useState<TableState>({\n sort: null,\n search: '',\n page: 0,\n });\n\n const originalOnStateChange = options?.onStateChange;\n\n const handleStateChange = useCallback(\n (newState: TableState) => {\n setState(newState);\n originalOnStateChange?.(newState);\n },\n [originalOnStateChange],\n );\n\n // Mount / unmount\n useEffect(() => {\n const container = ref.current;\n if (!container) return;\n\n const mountOpts: TableMountOptions = {\n ...options,\n onStateChange: handleStateChange,\n };\n\n const table = createTable(container, spec, mountOpts);\n tableRef.current = table;\n setState(table.getState());\n\n return () => {\n table.destroy();\n tableRef.current = null;\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n options?.theme,\n options?.darkMode,\n options?.onRowClick,\n options?.responsive,\n handleStateChange,\n options,\n spec,\n ]);\n\n // Update on spec change\n useEffect(() => {\n const table = tableRef.current;\n if (!table) return;\n\n table.update(spec);\n setState(table.getState());\n }, [spec]);\n\n return {\n ref,\n table: tableRef.current,\n state,\n };\n}\n","/**\n * useTableState: managed state hook for controlled table usage.\n *\n * Provides individual sort/search/page state with setters and a\n * resetState function to return to initial values.\n */\n\nimport type { SortState } from '@opendata-ai/openchart-core';\nimport { useCallback, useState } from 'react';\n\nexport interface UseTableStateReturn {\n sort: SortState | null;\n setSort: (sort: SortState | null) => void;\n search: string;\n setSearch: (query: string) => void;\n page: number;\n setPage: (page: number) => void;\n resetState: () => void;\n}\n\nexport interface UseTableStateOptions {\n sort?: SortState | null;\n search?: string;\n page?: number;\n}\n\n/**\n * Hook for managing table state (sort, search, page).\n *\n * Use with the DataTable component's controlled props:\n * ```tsx\n * const { sort, search, page, setSort, setSearch, setPage } = useTableState();\n * <DataTable\n * spec={spec}\n * sort={sort}\n * search={search}\n * page={page}\n * onSortChange={setSort}\n * onSearchChange={setSearch}\n * onPageChange={setPage}\n * />\n * ```\n */\nexport function useTableState(initialState?: UseTableStateOptions): UseTableStateReturn {\n const [sort, setSortInternal] = useState<SortState | null>(initialState?.sort ?? null);\n const [search, setSearchInternal] = useState(initialState?.search ?? '');\n const [page, setPageInternal] = useState(initialState?.page ?? 0);\n\n const setSort = useCallback((newSort: SortState | null) => {\n setSortInternal(newSort);\n }, []);\n\n const setSearch = useCallback((query: string) => {\n setSearchInternal(query);\n }, []);\n\n const setPage = useCallback((newPage: number) => {\n setPageInternal(newPage);\n }, []);\n\n const resetState = useCallback(() => {\n setSortInternal(initialState?.sort ?? null);\n setSearchInternal(initialState?.search ?? '');\n setPageInternal(initialState?.page ?? 0);\n }, [initialState?.sort, initialState?.search, initialState?.page]);\n\n return {\n sort,\n setSort,\n search,\n setSearch,\n page,\n setPage,\n resetState,\n };\n}\n","/**\n * React Sankey component: thin wrapper around the vanilla adapter.\n *\n * Mounts a sankey instance on render, updates when spec changes,\n * and cleans up on unmount. All heavy lifting is done by the vanilla\n * createSankey() function.\n *\n * Supports forwardRef for imperative control via the instance getter.\n */\n\nimport type { DarkMode, SankeySpec, ThemeConfig } from '@opendata-ai/openchart-core';\nimport {\n createSankey,\n type SankeyInstance,\n type SankeyMountOptions,\n} from '@opendata-ai/openchart-vanilla';\nimport {\n type CSSProperties,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport { useVizDarkMode, useVizTheme } from './ThemeContext';\n\nexport interface SankeyProps {\n /** The sankey spec to render. */\n spec: SankeySpec;\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode: \"auto\", \"force\", or \"off\". */\n darkMode?: DarkMode;\n /** Callback when a node is clicked. */\n onNodeClick?: (node: Record<string, unknown>) => void;\n /** Callback when a link is clicked. */\n onLinkClick?: (link: Record<string, unknown>) => void;\n /** Callback when a node is hovered (null when hover ends). */\n onNodeHover?: (node: Record<string, unknown> | null) => void;\n /** Callback when a link is hovered (null when hover ends). */\n onLinkHover?: (link: Record<string, unknown> | null) => void;\n /** CSS class name for the wrapper div. */\n className?: string;\n /** Inline styles for the wrapper div. */\n style?: CSSProperties;\n}\n\nexport interface SankeyHandle {\n /** The underlying sankey instance (null until mounted). */\n readonly instance: SankeyInstance | null;\n}\n\n/**\n * React component that renders a sankey diagram from a SankeySpec.\n *\n * Uses the vanilla adapter internally. The spec is compiled and rendered\n * as SVG inside a wrapper div. Spec changes trigger re-renders via the\n * vanilla adapter's update() method.\n */\nexport const Sankey = forwardRef<SankeyHandle, SankeyProps>(function Sankey(\n {\n spec,\n theme: themeProp,\n darkMode,\n onNodeClick,\n onLinkClick,\n onNodeHover,\n onLinkHover,\n className,\n style,\n },\n ref,\n) {\n const contextTheme = useVizTheme();\n const contextDarkMode = useVizDarkMode();\n const theme = themeProp ?? contextTheme;\n const resolvedDarkMode = darkMode ?? contextDarkMode;\n const containerRef = useRef<HTMLDivElement>(null);\n const instanceRef = useRef<SankeyInstance | null>(null);\n const specRef = useRef<string>('');\n\n // Store event handlers in refs so they don't trigger recreation.\n const handlersRef = useRef<{\n onNodeClick?: SankeyProps['onNodeClick'];\n onLinkClick?: SankeyProps['onLinkClick'];\n onNodeHover?: SankeyProps['onNodeHover'];\n onLinkHover?: SankeyProps['onLinkHover'];\n }>({});\n handlersRef.current = {\n onNodeClick,\n onLinkClick,\n onNodeHover,\n onLinkHover,\n };\n\n // Stable callback wrappers that read from refs\n const stableOnNodeClick = useCallback(\n (node: Record<string, unknown>) => handlersRef.current.onNodeClick?.(node),\n [],\n );\n const stableOnLinkClick = useCallback(\n (link: Record<string, unknown>) => handlersRef.current.onLinkClick?.(link),\n [],\n );\n const stableOnNodeHover = useCallback(\n (node: Record<string, unknown> | null) => handlersRef.current.onNodeHover?.(node),\n [],\n );\n const stableOnLinkHover = useCallback(\n (link: Record<string, unknown> | null) => handlersRef.current.onLinkHover?.(link),\n [],\n );\n\n // Expose imperative handle\n useImperativeHandle(\n ref,\n () => ({\n get instance() {\n return instanceRef.current;\n },\n }),\n [],\n );\n\n // Mount sankey and recreate when theme/darkMode change.\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec intentionally excluded - spec changes handled via update() in Effect 2\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const options: SankeyMountOptions = {\n theme,\n darkMode: resolvedDarkMode,\n onNodeClick: stableOnNodeClick,\n onLinkClick: stableOnLinkClick,\n onNodeHover: stableOnNodeHover,\n onLinkHover: stableOnLinkHover,\n responsive: true,\n };\n\n instanceRef.current = createSankey(container, spec, options);\n specRef.current = JSON.stringify(spec);\n\n return () => {\n instanceRef.current?.destroy();\n instanceRef.current = null;\n };\n }, [\n theme,\n resolvedDarkMode,\n stableOnNodeClick,\n stableOnLinkClick,\n stableOnNodeHover,\n stableOnLinkHover,\n ]);\n\n // Update sankey when spec changes.\n useEffect(() => {\n const instance = instanceRef.current;\n if (!instance) return;\n\n const specString = JSON.stringify(spec);\n if (specString === specRef.current) return;\n\n specRef.current = specString;\n instance.update(spec);\n }, [spec]);\n\n return (\n <div\n ref={containerRef}\n className={className ? `oc-sankey-root ${className}` : 'oc-sankey-root'}\n style={style}\n />\n );\n});\n","/**\n * React TileMap component: thin wrapper around the vanilla adapter.\n *\n * Mounts a tilemap instance on render, updates when spec changes,\n * and cleans up on unmount. All heavy lifting is done by the vanilla\n * createTileMap() function.\n *\n * Supports forwardRef for imperative control via the instance getter.\n */\n\nimport type { DarkMode, ThemeConfig, TileMapSpec } from '@opendata-ai/openchart-core';\nimport {\n createTileMap,\n type TileMapInstance,\n type TileMapMountOptions,\n} from '@opendata-ai/openchart-vanilla';\nimport {\n type CSSProperties,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport { useVizDarkMode, useVizTheme } from './ThemeContext';\n\nexport interface TileMapProps {\n /** The tilemap spec to render. */\n spec: TileMapSpec;\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode: \"auto\", \"force\", or \"off\". */\n darkMode?: DarkMode;\n /** Callback when a tile is clicked. */\n onTileClick?: (tile: {\n stateCode: string;\n stateName: string;\n value: number | null;\n data: Record<string, unknown>;\n }) => void;\n /** Callback when a tile is hovered (null when hover ends). */\n onTileHover?: (\n tile: {\n stateCode: string;\n stateName: string;\n value: number | null;\n data: Record<string, unknown>;\n } | null,\n ) => void;\n /** CSS class name for the wrapper div. */\n className?: string;\n /** Inline styles for the wrapper div. */\n style?: CSSProperties;\n}\n\nexport interface TileMapHandle {\n /** The underlying tilemap instance (null until mounted). */\n readonly instance: TileMapInstance | null;\n}\n\n/**\n * React component that renders a tilemap from a TileMapSpec.\n *\n * Uses the vanilla adapter internally. The spec is compiled and rendered\n * as SVG inside a wrapper div. Spec changes trigger re-renders via the\n * vanilla adapter's update() method.\n */\nexport const TileMap = forwardRef<TileMapHandle, TileMapProps>(function TileMap(\n { spec, theme: themeProp, darkMode, onTileClick, onTileHover, className, style },\n ref,\n) {\n const contextTheme = useVizTheme();\n const contextDarkMode = useVizDarkMode();\n const theme = themeProp ?? contextTheme;\n const resolvedDarkMode = darkMode ?? contextDarkMode;\n const containerRef = useRef<HTMLDivElement>(null);\n const instanceRef = useRef<TileMapInstance | null>(null);\n const specRef = useRef<string>('');\n\n // Store event handlers in refs so they don't trigger recreation.\n const handlersRef = useRef<{\n onTileClick?: TileMapProps['onTileClick'];\n onTileHover?: TileMapProps['onTileHover'];\n }>({});\n handlersRef.current = {\n onTileClick,\n onTileHover,\n };\n\n // Stable callback wrappers that read from refs\n const stableOnTileClick = useCallback(\n (tile: {\n stateCode: string;\n stateName: string;\n value: number | null;\n data: Record<string, unknown>;\n }) => handlersRef.current.onTileClick?.(tile),\n [],\n );\n const stableOnTileHover = useCallback(\n (\n tile: {\n stateCode: string;\n stateName: string;\n value: number | null;\n data: Record<string, unknown>;\n } | null,\n ) => handlersRef.current.onTileHover?.(tile),\n [],\n );\n\n // Expose imperative handle\n useImperativeHandle(\n ref,\n () => ({\n get instance() {\n return instanceRef.current;\n },\n }),\n [],\n );\n\n // Mount tilemap and recreate when theme/darkMode change.\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec intentionally excluded - spec changes handled via update() in Effect 2\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const options: TileMapMountOptions = {\n theme,\n darkMode: resolvedDarkMode,\n onTileClick: stableOnTileClick,\n onTileHover: stableOnTileHover,\n responsive: true,\n };\n\n instanceRef.current = createTileMap(container, spec, options);\n specRef.current = JSON.stringify(spec);\n\n return () => {\n instanceRef.current?.destroy();\n instanceRef.current = null;\n };\n }, [theme, resolvedDarkMode, stableOnTileClick, stableOnTileHover]);\n\n // Update tilemap when spec changes.\n useEffect(() => {\n const instance = instanceRef.current;\n if (!instance) return;\n\n const specString = JSON.stringify(spec);\n if (specString === specRef.current) return;\n\n specRef.current = specString;\n instance.update(spec);\n }, [spec]);\n\n return (\n <div\n ref={containerRef}\n className={className ? `oc-tilemap-root ${className}` : 'oc-tilemap-root'}\n style={style}\n />\n );\n});\n","/**\n * Visualization routing component: renders Chart, DataTable, or Graph\n * based on the spec type. Use this when rendering arbitrary VizSpec values.\n *\n * For event handlers, use the specific component (Chart, DataTable, Graph) directly.\n */\n\nimport type { DarkMode, ThemeConfig, VizSpec } from '@opendata-ai/openchart-core';\nimport {\n isBarListSpec,\n isGeoMapSpec,\n isGraphSpec,\n isSankeySpec,\n isTableSpec,\n isTileMapSpec,\n} from '@opendata-ai/openchart-core';\nimport type { CSSProperties } from 'react';\nimport { BarList } from './BarList';\nimport { Chart } from './Chart';\nimport { DataTable } from './DataTable';\nimport { GeoMap } from './GeoMap';\nimport { Graph } from './Graph';\nimport { Sankey } from './Sankey';\nimport { TileMap } from './TileMap';\n\nexport interface VisualizationProps {\n /** The visualization spec to render. */\n spec: VizSpec;\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode: \"auto\", \"force\", or \"off\". */\n darkMode?: DarkMode;\n /** CSS class name for the wrapper div. */\n className?: string;\n /** Inline styles for the wrapper div. */\n style?: CSSProperties;\n}\n\n/**\n * Routes a VizSpec to the appropriate rendering component.\n *\n * Accepts any VizSpec and renders it with the correct component based on the\n * spec's type field. For event handlers, use Chart, DataTable, or Graph directly.\n */\nexport function Visualization({ spec, theme, darkMode, className, style }: VisualizationProps) {\n if (isTableSpec(spec)) {\n return (\n <DataTable\n spec={spec}\n theme={theme}\n darkMode={darkMode}\n className={className}\n style={style}\n />\n );\n }\n if (isGraphSpec(spec)) {\n return (\n <Graph spec={spec} theme={theme} darkMode={darkMode} className={className} style={style} />\n );\n }\n if (isSankeySpec(spec)) {\n return (\n <Sankey spec={spec} theme={theme} darkMode={darkMode} className={className} style={style} />\n );\n }\n if (isTileMapSpec(spec)) {\n return (\n <TileMap spec={spec} theme={theme} darkMode={darkMode} className={className} style={style} />\n );\n }\n if (isBarListSpec(spec)) {\n return (\n <BarList spec={spec} theme={theme} darkMode={darkMode} className={className} style={style} />\n );\n }\n if (isGeoMapSpec(spec)) {\n return (\n <GeoMap spec={spec} theme={theme} darkMode={darkMode} className={className} style={style} />\n );\n }\n return (\n <Chart spec={spec} theme={theme} darkMode={darkMode} className={className} style={style} />\n );\n}\n"],"mappings":";AAcA,cAAc;AAYd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA0BP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;AChEP;AAAA,EAGE;AAAA,OACK;AACP;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACZP,S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AAG,CAAC,IAAI,CAAC;AAET,SACE,gBAAAN;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,WAAW,YAAY,mBAAmB,SAAS,KAAK;AAAA,MACxD;AAAA;AAAA,EACF;AAEJ,CAAC;;;AC5JD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAgCD,gBAAAO,aAAA;AAHC,SAAS,cAAc,EAAE,MAAM,OAAO,UAAU,WAAW,MAAM,GAAuB;AAC7F,MAAI,YAAY,IAAI,GAAG;AACrB,WACE,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AACA,MAAI,YAAY,IAAI,GAAG;AACrB,WACE,gBAAAA,MAAC,SAAM,MAAY,OAAc,UAAoB,WAAsB,OAAc;AAAA,EAE7F;AACA,MAAI,aAAa,IAAI,GAAG;AACtB,WACE,gBAAAA,MAAC,UAAO,MAAY,OAAc,UAAoB,WAAsB,OAAc;AAAA,EAE9F;AACA,MAAI,cAAc,IAAI,GAAG;AACvB,WACE,gBAAAA,MAAC,WAAQ,MAAY,OAAc,UAAoB,WAAsB,OAAc;AAAA,EAE/F;AACA,MAAI,cAAc,IAAI,GAAG;AACvB,WACE,gBAAAA,MAAC,WAAQ,MAAY,OAAc,UAAoB,WAAsB,OAAc;AAAA,EAE/F;AACA,MAAI,aAAa,IAAI,GAAG;AACtB,WACE,gBAAAA,MAAC,UAAO,MAAY,OAAc,UAAoB,WAAsB,OAAc;AAAA,EAE9F;AACA,SACE,gBAAAA,MAAC,SAAM,MAAY,OAAc,UAAoB,WAAsB,OAAc;AAE7F;","names":["jsx","BarList","forwardRef","useCallback","useEffect","useImperativeHandle","useRef","jsx","useRef","useCallback","useImperativeHandle","useEffect","forwardRef","useEffect","useImperativeHandle","useRef","jsx","useCallback","useEffect","useRef","jsx","useRef","useCallback","useEffect","forwardRef","useCallback","useEffect","useImperativeHandle","useRef","jsx","forwardRef","GeoMap","useRef","useCallback","useImperativeHandle","useEffect","forwardRef","useCallback","useEffect","useImperativeHandle","useRef","jsx","forwardRef","Graph","useRef","useCallback","useImperativeHandle","spec","useEffect","createChart","useEffect","useRef","useCallback","useRef","createTable","useCallback","useEffect","useRef","useState","useCallback","useState","forwardRef","useCallback","useEffect","useImperativeHandle","useRef","jsx","forwardRef","Sankey","useRef","useCallback","useImperativeHandle","useEffect","forwardRef","useCallback","useEffect","useImperativeHandle","useRef","jsx","forwardRef","TileMap","useRef","useCallback","useImperativeHandle","useEffect","jsx"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/BarList.tsx","../src/ThemeContext.tsx","../src/Chart.tsx","../src/ChartStory.tsx","../src/DataTable.tsx","../src/GeoMap.tsx","../src/Graph.tsx","../src/hooks.ts","../src/hooks/useGraph.ts","../src/hooks/useTable.ts","../src/hooks/useTableState.ts","../src/Sankey.tsx","../src/TileMap.tsx","../src/Visualization.tsx"],"sourcesContent":["/**\n * @opendata-ai/openchart-react\n *\n * React adapter for openchart. Provides <Chart /> and <DataTable />\n * components that wrap the vanilla adapter with React lifecycle management.\n *\n * Re-exports the full core type system and utilities so React consumers\n * only need a single @opendata-ai/openchart-react dependency.\n */\n\n// ---------------------------------------------------------------------------\n// Core: full type system, theme, colors, locale, accessibility, helpers\n// ---------------------------------------------------------------------------\n\nexport * from '@opendata-ai/openchart-core';\n\n// ---------------------------------------------------------------------------\n// Vanilla: export utilities (SVG/PNG/JPG/CSV)\n// ---------------------------------------------------------------------------\n\nexport type {\n JPGExportOptions,\n PNGExportOptions,\n SpecSequenceOptions,\n SVGExportOptions,\n} from '@opendata-ai/openchart-vanilla';\nexport {\n exportCSV,\n exportJPG,\n exportPNG,\n exportSpecSequence,\n exportSVG,\n exportSVGWithFonts,\n} from '@opendata-ai/openchart-vanilla';\n\n// ---------------------------------------------------------------------------\n// Engine: compile API and types not covered by core\n// ---------------------------------------------------------------------------\n\nexport type {\n ChartRenderer,\n CompiledGraphEdge,\n CompiledGraphNode,\n CompileResult,\n GraphCompilation,\n NormalizedBarListSpec,\n NormalizedChartSpec,\n NormalizedChrome,\n NormalizedGeoMapSpec,\n NormalizedGraphSpec,\n NormalizedSankeySpec,\n NormalizedSpec,\n NormalizedTableSpec,\n NormalizedTileMapSpec,\n SimulationConfig,\n ValidationError,\n ValidationErrorCode,\n ValidationResult,\n} from '@opendata-ai/openchart-engine';\nexport {\n clearRenderers,\n compile,\n compileBarList,\n compileChart,\n compileGeoMap,\n compileGraph,\n compileSankey,\n compileTable,\n compileTileMap,\n getChartRenderer,\n normalizeSpec,\n registerChartRenderer,\n validateSpec,\n} from '@opendata-ai/openchart-engine';\nexport type { BarListHandle, BarListProps } from './BarList';\nexport { BarList } from './BarList';\nexport type { ChartHandle, ChartProps } from './Chart';\n// Components\nexport { Chart } from './Chart';\nexport type { ChartStoryHandle, ChartStoryProps } from './ChartStory';\n// Scrollytelling\nexport { ChartStory } from './ChartStory';\nexport type { DataTableProps } from './DataTable';\nexport { DataTable } from './DataTable';\nexport type { GeoMapHandle, GeoMapProps } from './GeoMap';\nexport { GeoMap } from './GeoMap';\nexport type { GraphProps } from './Graph';\nexport { Graph } from './Graph';\nexport type { UseChartOptions, UseChartReturn } from './hooks';\n// Hooks\nexport { useChart, useDarkMode } from './hooks';\nexport type { GraphHandle, UseGraphReturn } from './hooks/useGraph';\nexport { useGraph } from './hooks/useGraph';\nexport type { UseTableReturn } from './hooks/useTable';\nexport { useTable } from './hooks/useTable';\nexport type { UseTableStateOptions, UseTableStateReturn } from './hooks/useTableState';\nexport { useTableState } from './hooks/useTableState';\nexport type { SankeyHandle, SankeyProps } from './Sankey';\nexport { Sankey } from './Sankey';\nexport type { VizThemeProviderProps } from './ThemeContext';\n// Theme context\nexport { useVizDarkMode, useVizTheme, VizThemeProvider } from './ThemeContext';\nexport type { TileMapHandle, TileMapProps } from './TileMap';\nexport { TileMap } from './TileMap';\nexport type { VisualizationProps } from './Visualization';\nexport { Visualization } from './Visualization';\n","/**\n * React BarList component: thin wrapper around the vanilla adapter.\n *\n * Mounts a barlist instance on render, updates when spec changes,\n * and cleans up on unmount. All heavy lifting is done by the vanilla\n * createBarList() function.\n */\n\nimport type { BarListSpec, DarkMode, ThemeConfig } from '@opendata-ai/openchart-core';\nimport {\n type BarListInstance,\n type BarListMountOptions,\n createBarList,\n} from '@opendata-ai/openchart-vanilla';\nimport {\n type CSSProperties,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport { useVizDarkMode, useVizTheme } from './ThemeContext';\n\nexport interface BarListProps {\n spec: BarListSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n onRowClick?: (row: { label: string; value: number; data: Record<string, unknown> }) => void;\n onRowHover?: (\n row: {\n label: string;\n value: number;\n data: Record<string, unknown>;\n } | null,\n ) => void;\n className?: string;\n style?: CSSProperties;\n}\n\nexport interface BarListHandle {\n readonly instance: BarListInstance | null;\n}\n\nexport const BarList = forwardRef<BarListHandle, BarListProps>(function BarList(\n { spec, theme: themeProp, darkMode, onRowClick, onRowHover, className, style },\n ref,\n) {\n const contextTheme = useVizTheme();\n const contextDarkMode = useVizDarkMode();\n const theme = themeProp ?? contextTheme;\n const resolvedDarkMode = darkMode ?? contextDarkMode;\n const containerRef = useRef<HTMLDivElement>(null);\n const instanceRef = useRef<BarListInstance | null>(null);\n const specRef = useRef<string>('');\n\n const handlersRef = useRef<{\n onRowClick?: BarListProps['onRowClick'];\n onRowHover?: BarListProps['onRowHover'];\n }>({});\n handlersRef.current = { onRowClick, onRowHover };\n\n const stableOnRowClick = useCallback(\n (row: { label: string; value: number; data: Record<string, unknown> }) =>\n handlersRef.current.onRowClick?.(row),\n [],\n );\n const stableOnRowHover = useCallback(\n (row: { label: string; value: number; data: Record<string, unknown> } | null) =>\n handlersRef.current.onRowHover?.(row),\n [],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n get instance() {\n return instanceRef.current;\n },\n }),\n [],\n );\n\n // Mount barlist and recreate when theme/darkMode change.\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec intentionally excluded - spec changes handled via update() in Effect 2\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const options: BarListMountOptions = {\n theme,\n darkMode: resolvedDarkMode,\n onRowClick: stableOnRowClick,\n onRowHover: stableOnRowHover,\n responsive: true,\n };\n\n instanceRef.current = createBarList(container, spec, options);\n specRef.current = JSON.stringify(spec);\n\n return () => {\n instanceRef.current?.destroy();\n instanceRef.current = null;\n };\n }, [theme, resolvedDarkMode, stableOnRowClick, stableOnRowHover]);\n\n // Update barlist when spec changes.\n useEffect(() => {\n const instance = instanceRef.current;\n if (!instance) return;\n\n const specString = JSON.stringify(spec);\n if (specString === specRef.current) return;\n\n specRef.current = specString;\n instance.update(spec);\n }, [spec]);\n\n return (\n <div\n ref={containerRef}\n className={className ? `oc-barlist-root ${className}` : 'oc-barlist-root'}\n style={style}\n />\n );\n});\n","/**\n * Theme context: provides a theme and dark mode preference to all\n * descendant Chart, DataTable, and Graph components without prop drilling.\n *\n * Components use the context values as fallbacks when no explicit\n * `theme` or `darkMode` prop is passed.\n */\n\nimport type { DarkMode, ThemeConfig } from '@opendata-ai/openchart-core';\nimport { createContext, type ReactNode, useContext } from 'react';\n\nconst VizThemeContext = createContext<ThemeConfig | undefined>(undefined);\nconst VizDarkModeContext = createContext<DarkMode | undefined>(undefined);\n\n/** Read the current theme from the nearest VizThemeProvider. */\nexport function useVizTheme(): ThemeConfig | undefined {\n return useContext(VizThemeContext);\n}\n\n/** Read the current dark mode preference from the nearest VizThemeProvider. */\nexport function useVizDarkMode(): DarkMode | undefined {\n return useContext(VizDarkModeContext);\n}\n\nexport interface VizThemeProviderProps {\n /** Theme config to provide to descendant viz components. */\n theme: ThemeConfig | undefined;\n /** Dark mode preference to provide to descendant viz components. */\n darkMode?: DarkMode;\n children: ReactNode;\n}\n\n/** Provides a theme and dark mode preference to all nested Chart, DataTable, and Graph components. */\nexport function VizThemeProvider({ theme, darkMode, children }: VizThemeProviderProps) {\n return (\n <VizThemeContext.Provider value={theme}>\n <VizDarkModeContext.Provider value={darkMode}>{children}</VizDarkModeContext.Provider>\n </VizThemeContext.Provider>\n );\n}\n","/**\n * React Chart component: thin wrapper around the vanilla adapter.\n *\n * Mounts a chart instance on render, updates when spec changes,\n * and cleans up on unmount. All heavy lifting is done by the vanilla\n * createChart() function.\n */\n// biome-ignore-all lint/correctness/useHookAtTopLevel: Biome doesn't recognize overloaded function declarations as React components; hooks are correctly at the top level of ChartInner\n\nimport type {\n ChartEventHandlers,\n ChartSpec,\n DarkMode,\n DataRow,\n ElementRef,\n GraphSpec,\n LayerSpec,\n ThemeConfig,\n} from '@opendata-ai/openchart-core';\nimport { type ChartInstance, createChart, type MountOptions } from '@opendata-ai/openchart-vanilla';\nimport {\n type CSSProperties,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport { useVizDarkMode, useVizTheme } from './ThemeContext';\n\nexport interface ChartHandle {\n /** Get the currently selected element, or null if none. */\n getSelectedElement(): ElementRef | null;\n /** Programmatically select an element. */\n select(ref: ElementRef): void;\n /** Deselect the current element. */\n deselect(): void;\n /** The underlying chart instance (null until mounted). */\n readonly instance: ChartInstance | null;\n}\n\nexport interface ChartProps<TData extends DataRow = DataRow> extends ChartEventHandlers {\n /** The visualization spec to render. */\n spec: ChartSpec<TData> | LayerSpec<TData> | GraphSpec;\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode: \"auto\", \"force\", or \"off\". */\n darkMode?: DarkMode;\n /**\n * Rendering backend for point marks (mirrors vega-embed's `renderer`\n * option). `'auto'` (default) promotes dense scatters to canvas.\n */\n renderer?: 'auto' | 'svg' | 'canvas';\n /** Callback when a data point is clicked. @deprecated Use onMarkClick instead. */\n onDataPointClick?: (data: Record<string, unknown>) => void;\n /** The currently selected element (controlled). */\n selectedElement?: ElementRef;\n /** Highlight specific color-encoding values. Pass null to clear. */\n highlight?: string[] | null;\n /** CSS class name for the wrapper div. */\n className?: string;\n /** Inline styles for the wrapper div. */\n style?: CSSProperties;\n}\n\n/**\n * React component that renders a visualization from a spec.\n *\n * Uses the vanilla adapter internally. The spec is compiled and rendered\n * as SVG inside a wrapper div. Spec changes trigger re-renders via the\n * vanilla adapter's update() method.\n *\n * Pass a typed data row as the generic to get field autocomplete:\n * ```tsx\n * type SalesRow = { date: string; revenue: number };\n * <Chart<SalesRow> spec={{ mark: 'line', data: rows, encoding: { x: { field: 'date', ... } } }} />\n * ```\n */\n// forwardRef doesn't support generics natively in TypeScript, so we use the\n// inner function + cast pattern to preserve the generic on the public API.\nfunction ChartInner<TData extends DataRow = DataRow>(\n props: ChartProps<TData> & React.RefAttributes<ChartHandle>,\n ref: React.Ref<ChartHandle>,\n): React.ReactElement | null;\nfunction ChartInner(\n props: ChartProps & { ref?: React.Ref<ChartHandle> },\n ref: React.Ref<ChartHandle>,\n): React.ReactElement | null;\nfunction ChartInner(\n {\n spec,\n theme: themeProp,\n darkMode,\n renderer,\n onDataPointClick,\n onMarkClick,\n onMarkHover,\n onMarkLeave,\n onLegendToggle,\n onHighlightChange,\n onAnnotationClick,\n onAnnotationEdit,\n onEdit,\n onSelect,\n onDeselect,\n onTextEdit,\n onReveal,\n editable,\n selectedElement: selectedElementProp,\n highlight,\n className,\n style,\n }: ChartProps,\n ref: React.Ref<ChartHandle>,\n) {\n const contextTheme = useVizTheme();\n const contextDarkMode = useVizDarkMode();\n const theme = themeProp ?? contextTheme;\n const resolvedDarkMode = darkMode ?? contextDarkMode;\n const containerRef = useRef<HTMLDivElement>(null);\n const chartRef = useRef<ChartInstance | null>(null);\n const specRef = useRef<string>('');\n\n // Store event handlers in refs so they don't trigger chart recreation.\n // Inline arrow functions create new references every render, which would\n // destroy and recreate the entire chart instance without this pattern.\n const handlersRef = useRef<{\n onDataPointClick?: ChartProps['onDataPointClick'];\n onMarkClick?: ChartProps['onMarkClick'];\n onMarkHover?: ChartProps['onMarkHover'];\n onMarkLeave?: ChartProps['onMarkLeave'];\n onLegendToggle?: ChartProps['onLegendToggle'];\n onHighlightChange?: ChartProps['onHighlightChange'];\n onAnnotationClick?: ChartProps['onAnnotationClick'];\n onAnnotationEdit?: ChartProps['onAnnotationEdit'];\n onEdit?: ChartProps['onEdit'];\n onSelect?: ChartProps['onSelect'];\n onDeselect?: ChartProps['onDeselect'];\n onTextEdit?: ChartProps['onTextEdit'];\n onReveal?: ChartProps['onReveal'];\n }>({});\n handlersRef.current = {\n onDataPointClick,\n onMarkClick,\n onMarkHover,\n onMarkLeave,\n onLegendToggle,\n onHighlightChange,\n onAnnotationClick,\n onAnnotationEdit,\n onEdit,\n onSelect,\n onDeselect,\n onTextEdit,\n onReveal,\n };\n\n // Stable callback wrappers that read from refs\n const stableOnDataPointClick = useCallback(\n (data: Record<string, unknown>) => handlersRef.current.onDataPointClick?.(data),\n [],\n );\n const stableOnMarkClick = useCallback(\n (event: import('@opendata-ai/openchart-core').MarkEvent) =>\n handlersRef.current.onMarkClick?.(event),\n [],\n );\n const stableOnMarkHover = useCallback(\n (event: import('@opendata-ai/openchart-core').MarkEvent) =>\n handlersRef.current.onMarkHover?.(event),\n [],\n );\n const stableOnMarkLeave = useCallback(() => handlersRef.current.onMarkLeave?.(), []);\n const stableOnLegendToggle = useCallback(\n (series: string, visible: boolean) => handlersRef.current.onLegendToggle?.(series, visible),\n [],\n );\n const stableOnHighlightChange = useCallback(\n (values: string[]) => handlersRef.current.onHighlightChange?.(values),\n [],\n );\n const stableOnAnnotationClick = useCallback(\n (annotation: import('@opendata-ai/openchart-core').Annotation, event: MouseEvent) =>\n handlersRef.current.onAnnotationClick?.(annotation, event),\n [],\n );\n const stableOnAnnotationEdit = useCallback(\n (\n annotation: import('@opendata-ai/openchart-core').TextAnnotation,\n updatedOffset: import('@opendata-ai/openchart-core').AnnotationOffset,\n ) => handlersRef.current.onAnnotationEdit?.(annotation, updatedOffset),\n [],\n );\n const stableOnEdit = useCallback(\n (edit: import('@opendata-ai/openchart-core').ElementEdit) => handlersRef.current.onEdit?.(edit),\n [],\n );\n const stableOnSelect = useCallback(\n (element: ElementRef) => handlersRef.current.onSelect?.(element),\n [],\n );\n const stableOnDeselect = useCallback(\n (element: ElementRef) => handlersRef.current.onDeselect?.(element),\n [],\n );\n const stableOnTextEdit = useCallback(\n (element: ElementRef, oldText: string, newText: string) =>\n handlersRef.current.onTextEdit?.(element, oldText, newText),\n [],\n );\n const stableOnReveal = useCallback(\n (guess: Array<{ x: string | number; y: number }>) => handlersRef.current.onReveal?.(guess),\n [],\n );\n\n // Expose imperative handle for ref-based control\n useImperativeHandle(\n ref,\n () => ({\n getSelectedElement() {\n return chartRef.current?.getSelectedElement() ?? null;\n },\n select(elementRef: ElementRef) {\n chartRef.current?.select(elementRef);\n },\n deselect() {\n chartRef.current?.deselect();\n },\n get instance() {\n return chartRef.current;\n },\n }),\n [],\n );\n\n // Mount chart and recreate when theme/darkMode change.\n // Event handlers use stable refs so they don't trigger recreation.\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec intentionally excluded - spec changes handled via update() in Effect 2\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const options: MountOptions = {\n theme,\n darkMode: resolvedDarkMode,\n renderer,\n onDataPointClick: stableOnDataPointClick,\n onMarkClick: stableOnMarkClick,\n onMarkHover: stableOnMarkHover,\n onMarkLeave: stableOnMarkLeave,\n onLegendToggle: stableOnLegendToggle,\n onHighlightChange: stableOnHighlightChange,\n onAnnotationClick: stableOnAnnotationClick,\n // Only include editing callbacks when the consumer provides them.\n // The stable wrappers are always truthy, so gating on handlersRef\n // avoids adding unstable prop references to the effect deps.\n ...(handlersRef.current.onAnnotationEdit ? { onAnnotationEdit: stableOnAnnotationEdit } : {}),\n ...(handlersRef.current.onEdit ? { onEdit: stableOnEdit } : {}),\n ...(handlersRef.current.onSelect ? { onSelect: stableOnSelect } : {}),\n ...(handlersRef.current.onDeselect ? { onDeselect: stableOnDeselect } : {}),\n ...(handlersRef.current.onTextEdit ? { onTextEdit: stableOnTextEdit } : {}),\n ...(handlersRef.current.onReveal ? { onReveal: stableOnReveal } : {}),\n ...(editable != null ? { editable } : {}),\n ...(selectedElementProp ? { selectedElement: selectedElementProp } : {}),\n responsive: true,\n };\n\n chartRef.current = createChart(container, spec, options);\n specRef.current = JSON.stringify(spec);\n\n return () => {\n chartRef.current?.destroy();\n chartRef.current = null;\n };\n // Only recreate when theme or darkMode change. Event handlers use stable refs.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n theme,\n resolvedDarkMode,\n renderer,\n editable,\n stableOnAnnotationClick,\n stableOnDataPointClick,\n stableOnEdit,\n stableOnLegendToggle,\n stableOnHighlightChange,\n stableOnMarkClick,\n stableOnMarkHover,\n stableOnMarkLeave,\n stableOnAnnotationEdit,\n stableOnSelect,\n stableOnDeselect,\n stableOnTextEdit,\n stableOnReveal,\n ]);\n\n // Update chart when spec changes\n useEffect(() => {\n const chart = chartRef.current;\n if (!chart) return;\n\n const specString = JSON.stringify(spec);\n if (specString !== specRef.current) {\n specRef.current = specString;\n chart.update(spec);\n }\n }, [spec]);\n\n // Handle selectedElement prop changes separately (like Vue/Svelte adapters)\n useEffect(() => {\n const chart = chartRef.current;\n if (!chart || !chart.select) return;\n\n if (selectedElementProp) {\n chart.select(selectedElementProp);\n } else if (chart.getSelectedElement?.()) {\n chart.deselect();\n }\n }, [selectedElementProp]);\n\n // Handle highlight prop changes\n useEffect(() => {\n if (chartRef.current && highlight !== undefined) {\n chartRef.current.setHighlight(highlight);\n }\n }, [highlight]);\n\n return (\n <div\n ref={containerRef}\n className={className ? `oc-chart-root ${className}` : 'oc-chart-root'}\n style={style}\n />\n );\n}\n\n/**\n * Generic Chart component with field autocomplete support.\n *\n * Pass your data row type to get compile-time field validation:\n * ```tsx\n * type SalesRow = { date: string; revenue: number; region: string };\n * <Chart<SalesRow> spec={{ mark: 'line', data: rows, encoding: { x: { field: 'date', type: 'temporal' } } }} />\n * ```\n *\n * Without a type parameter, behaves identically to before — no migration needed.\n */\nexport const Chart = forwardRef(ChartInner) as <TData extends DataRow = DataRow>(\n props: ChartProps<TData> & { ref?: React.Ref<ChartHandle> },\n) => React.ReactElement | null;\n// Restore display name lost by the forwardRef + cast pattern\n(Chart as React.FC).displayName = 'Chart';\n","/**\n * React scrollytelling shell around the vanilla `createChartStory`.\n *\n * The chart panel is sticky-pinned; the narrative column scrolls past it and\n * each step block advances the story. The heavy lifting (cumulative patch\n * application, mark morphing, crossfade fallback, camera) lives in the vanilla\n * story driver: this component owns only React lifecycle and the sticky layout.\n *\n * Self-driving by default (the vanilla `ScrollDriver` reads step positions),\n * or controlled by passing `step={n}` to drive it externally.\n */\n\nimport type {\n ChartSpec,\n DataRow,\n GeoMapSpec,\n GraphSpec,\n LayerSpec,\n} from '@opendata-ai/openchart-core';\nimport type { MountOptions } from '@opendata-ai/openchart-vanilla';\nimport {\n type ChartStoryInstance,\n type ChartStoryOptions,\n createChartStory,\n} from '@opendata-ai/openchart-vanilla/story';\nimport type { Ref } from 'react';\nimport { type CSSProperties, type ReactNode, useEffect, useImperativeHandle, useRef } from 'react';\n\nexport interface ChartStoryHandle {\n /** Jump the story to a step index (applies patches 0..n, animates the diff). */\n goTo(index: number): void;\n /** The underlying vanilla story instance, or null before mount. */\n readonly instance: ChartStoryInstance | null;\n}\n\nexport interface ChartStoryProps<TData extends DataRow = DataRow> {\n /** Base spec the story drives. */\n spec: ChartSpec<TData> | LayerSpec<TData> | GraphSpec | GeoMapSpec;\n /** Ordered step patches. `steps[i]` is applied cumulatively onto the base. */\n steps: ChartStoryOptions<TData>['steps'];\n /**\n * Narrative content per step: `narrative[i]` renders in the scrolling column\n * beside the sticky chart and triggers step `i` when it crosses the trigger\n * line. Length should match `steps`.\n */\n narrative: ReactNode[];\n /**\n * Controlled step index. When provided, the built-in scroll driver is left\n * in place but `goTo` is called on change so an external scroller can drive.\n * Omit for self-driving scroll.\n */\n step?: number;\n /** Fraction of viewport height where the scroll trigger sits. Default 0.4. */\n triggerPosition?: number;\n /** Camera driving mode. Default 'step'. */\n cameraMode?: 'step' | 'scrub';\n /** Options forwarded to the underlying chart mount (theme, dark mode, etc.). */\n mountOptions?: MountOptions;\n /** Class on the outer section. */\n className?: string;\n /** Inline styles merged onto the outer section. */\n style?: CSSProperties;\n ref?: Ref<ChartStoryHandle>;\n}\n\nconst sectionStyle: CSSProperties = {\n position: 'relative',\n display: 'grid',\n gridTemplateColumns: 'minmax(0, 26rem) minmax(0, 1fr)',\n gap: '3rem',\n alignItems: 'start',\n};\n\nconst narrativeColumnStyle: CSSProperties = {\n position: 'relative',\n};\n\nconst stepStyle: CSSProperties = {\n minHeight: '80vh',\n display: 'flex',\n alignItems: 'center',\n};\n\nconst panelStyle: CSSProperties = {\n position: 'sticky',\n top: '2rem',\n height: 'calc(100vh - 4rem)',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n};\n\nconst chartMountStyle: CSSProperties = {\n width: '100%',\n};\n\nexport function ChartStory<TData extends DataRow = DataRow>({\n spec,\n steps,\n narrative,\n step,\n triggerPosition,\n cameraMode,\n mountOptions,\n className,\n style,\n ref,\n}: ChartStoryProps<TData>) {\n const sectionRef = useRef<HTMLElement | null>(null);\n const chartMountRef = useRef<HTMLDivElement | null>(null);\n const stepRefs = useRef<Array<HTMLDivElement | null>>([]);\n const storyRef = useRef<ChartStoryInstance | null>(null);\n\n if (narrative.length !== steps.length) {\n console.warn(\n `[openchart] ChartStory: narrative length (${narrative.length}) does not match steps length (${steps.length}). Each step should have a corresponding narrative element.`,\n );\n }\n\n // Mount once; the vanilla driver owns updates so React never re-mounts on\n // spec/step churn (matching the <Chart /> imperative-update pattern).\n const optionsRef = useRef<{\n spec: typeof spec;\n steps: typeof steps;\n triggerPosition?: number;\n cameraMode?: 'step' | 'scrub';\n mountOptions?: MountOptions;\n }>({ spec, steps, triggerPosition, cameraMode, mountOptions });\n optionsRef.current = { spec, steps, triggerPosition, cameraMode, mountOptions };\n\n useEffect(() => {\n const mount = chartMountRef.current;\n const section = sectionRef.current;\n if (!mount) return;\n\n const opts = optionsRef.current;\n const story = createChartStory(\n mount,\n {\n spec: opts.spec,\n steps: opts.steps,\n triggerPosition: opts.triggerPosition,\n cameraMode: opts.cameraMode,\n },\n opts.mountOptions,\n );\n storyRef.current = story;\n\n if (section) story.setContainer(section);\n stepRefs.current.forEach((el, i) => {\n if (el) story.registerStep(i, el);\n });\n\n return () => {\n story.destroy();\n storyRef.current = null;\n };\n // Mount-once: options are read from the ref so changing them doesn't\n // remount. Spec/step diffing at runtime is out of scope for v1.\n }, []);\n\n // Controlled mode: drive the story when `step` changes.\n useEffect(() => {\n if (step === undefined) return;\n storyRef.current?.goTo(step);\n }, [step]);\n\n useImperativeHandle(\n ref,\n () => ({\n goTo(index: number) {\n storyRef.current?.goTo(index);\n },\n get instance() {\n return storyRef.current;\n },\n }),\n [],\n );\n\n return (\n <section ref={sectionRef} className={className} style={{ ...sectionStyle, ...style }}>\n <div style={narrativeColumnStyle}>\n {narrative.map((content, i) => (\n <div\n // biome-ignore lint/suspicious/noArrayIndexKey: steps are a fixed ordered list; index is the stable identity\n key={i}\n ref={(el) => {\n stepRefs.current[i] = el;\n }}\n data-oc-story-step={i}\n style={stepStyle}\n >\n <div style={{ maxWidth: '36rem' }}>{content}</div>\n </div>\n ))}\n </div>\n <div style={panelStyle}>\n <div ref={chartMountRef} style={chartMountStyle} />\n </div>\n </section>\n );\n}\n","/**\n * DataTable component: React wrapper around the vanilla table adapter.\n *\n * Mounts a table instance on render, updates when spec changes,\n * and cleans up on unmount. Supports both controlled and uncontrolled modes\n * for sort, search, and pagination state.\n */\n\nimport type { DarkMode, SortState, TableSpec, ThemeConfig } from '@opendata-ai/openchart-core';\nimport {\n createTable,\n type TableInstance,\n type TableMountOptions,\n} from '@opendata-ai/openchart-vanilla';\nimport { type CSSProperties, useCallback, useEffect, useRef } from 'react';\nimport { useVizDarkMode, useVizTheme } from './ThemeContext';\n\nexport interface DataTableProps {\n /** The table spec to render. */\n spec: TableSpec;\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode: \"auto\", \"force\", or \"off\". */\n darkMode?: DarkMode;\n /** Row click handler. */\n onRowClick?: (row: Record<string, unknown>) => void;\n /** Callback when sort changes. */\n onSortChange?: (sort: SortState | null) => void;\n /** Callback when search changes. */\n onSearchChange?: (query: string) => void;\n /** Callback when page changes. */\n onPageChange?: (page: number) => void;\n /** CSS class name for the wrapper div. */\n className?: string;\n /** Inline styles for the wrapper div. */\n style?: CSSProperties;\n /** Controlled sort state. */\n sort?: SortState | null;\n /** Controlled search query. */\n search?: string;\n /** Controlled page number. */\n page?: number;\n}\n\n/**\n * React component that renders a data table from a TableSpec.\n *\n * Uses the vanilla adapter internally. Supports controlled and uncontrolled\n * modes for sort, search, and pagination state.\n */\nexport function DataTable({\n spec,\n theme: themeProp,\n darkMode,\n onRowClick,\n onSortChange,\n onSearchChange,\n onPageChange,\n className,\n style,\n sort,\n search,\n page,\n}: DataTableProps) {\n const contextTheme = useVizTheme();\n const contextDarkMode = useVizDarkMode();\n const theme = themeProp ?? contextTheme;\n const resolvedDarkMode = darkMode ?? contextDarkMode;\n const containerRef = useRef<HTMLDivElement>(null);\n const tableRef = useRef<TableInstance | null>(null);\n\n // Store event handlers in refs so they don't trigger table recreation.\n const handlersRef = useRef<{\n onRowClick?: DataTableProps['onRowClick'];\n onSortChange?: DataTableProps['onSortChange'];\n onSearchChange?: DataTableProps['onSearchChange'];\n onPageChange?: DataTableProps['onPageChange'];\n }>({});\n handlersRef.current = { onRowClick, onSortChange, onSearchChange, onPageChange };\n\n // Stable callback wrappers that read from refs\n const stableOnRowClick = useCallback(\n (row: Record<string, unknown>) => handlersRef.current.onRowClick?.(row),\n [],\n );\n const stableOnStateChange = useCallback(\n (state: { sort?: SortState | null; search?: string; page?: number }) => {\n if (state.sort !== undefined) handlersRef.current.onSortChange?.(state.sort);\n if (state.search !== undefined) handlersRef.current.onSearchChange?.(state.search);\n if (state.page !== undefined) handlersRef.current.onPageChange?.(state.page);\n },\n [],\n );\n\n const prevSpecRef = useRef<string>('');\n\n // Determine if we're in controlled mode\n const isControlled = sort !== undefined || search !== undefined || page !== undefined;\n\n // Effect 1: Mount/unmount. Only recreate when structural options change.\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec, sort, search, page intentionally excluded - handled via update()/setState() in Effects 2-3\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const mountOptions: TableMountOptions = {\n theme,\n darkMode: resolvedDarkMode,\n onRowClick: stableOnRowClick,\n responsive: true,\n onStateChange: stableOnStateChange,\n };\n\n if (isControlled) {\n mountOptions.externalState = {\n sort: sort ?? null,\n search: search ?? '',\n page: page ?? 0,\n };\n }\n\n tableRef.current = createTable(container, spec, mountOptions);\n prevSpecRef.current = JSON.stringify(spec);\n\n return () => {\n tableRef.current?.destroy();\n tableRef.current = null;\n };\n // Only recreate on structural option changes (theme, darkMode, onRowClick).\n // Controlled state updates are handled in Effect 2.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [theme, resolvedDarkMode, isControlled, stableOnRowClick, stableOnStateChange]);\n\n // Effect 2: Sync controlled state without remounting.\n useEffect(() => {\n const table = tableRef.current;\n if (!table || !isControlled) return;\n\n table.setState({\n sort: sort ?? null,\n search: search ?? '',\n page: page ?? 0,\n });\n }, [sort, search, page, isControlled]);\n\n // Effect 3: Sync spec changes via update().\n useEffect(() => {\n const table = tableRef.current;\n if (!table) return;\n\n const specString = JSON.stringify(spec);\n if (specString !== prevSpecRef.current) {\n prevSpecRef.current = specString;\n table.update(spec);\n }\n }, [spec]);\n\n return (\n <div\n ref={containerRef}\n className={className ? `oc-table-root ${className}` : 'oc-table-root'}\n style={style}\n />\n );\n}\n","/**\n * React Map component: thin wrapper around the vanilla adapter.\n *\n * Mounts a map instance on render, updates when spec changes,\n * and cleans up on unmount. All heavy lifting is done by the vanilla\n * createGeoMap() function.\n *\n * Supports forwardRef for imperative control via the instance getter.\n */\n\nimport type { DarkMode, GeoMapSpec, ThemeConfig } from '@opendata-ai/openchart-core';\nimport {\n createGeoMap,\n type GeoMapInstance,\n type GeoMapMarkEvent,\n type GeoMapMountOptions,\n} from '@opendata-ai/openchart-vanilla';\nimport {\n type CSSProperties,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport { useVizDarkMode, useVizTheme } from './ThemeContext';\n\nexport interface GeoMapProps {\n /** The map spec to render. */\n spec: GeoMapSpec;\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode: \"auto\", \"force\", or \"off\". */\n darkMode?: DarkMode;\n /** Callback when a map feature is clicked. */\n onMarkClick?: (feature: GeoMapMarkEvent) => void;\n /** Callback when a map feature is hovered (null when hover ends). */\n onMarkHover?: (feature: GeoMapMarkEvent | null) => void;\n /** CSS class name for the wrapper div. */\n className?: string;\n /** Inline styles for the wrapper div. */\n style?: CSSProperties;\n}\n\nexport interface GeoMapHandle {\n /** The underlying map instance (null until mounted). */\n readonly instance: GeoMapInstance | null;\n}\n\nexport const GeoMap = forwardRef<GeoMapHandle, GeoMapProps>(function GeoMap(\n { spec, theme: themeProp, darkMode, onMarkClick, onMarkHover, className, style },\n ref,\n) {\n const contextTheme = useVizTheme();\n const contextDarkMode = useVizDarkMode();\n const theme = themeProp ?? contextTheme;\n const resolvedDarkMode = darkMode ?? contextDarkMode;\n const containerRef = useRef<HTMLDivElement>(null);\n const instanceRef = useRef<GeoMapInstance | null>(null);\n const specRef = useRef<string>('');\n\n const handlersRef = useRef<{\n onMarkClick?: GeoMapProps['onMarkClick'];\n onMarkHover?: GeoMapProps['onMarkHover'];\n }>({});\n handlersRef.current = {\n onMarkClick,\n onMarkHover,\n };\n\n const stableOnMarkClick = useCallback(\n (feature: GeoMapMarkEvent) => handlersRef.current.onMarkClick?.(feature),\n [],\n );\n const stableOnMarkHover = useCallback(\n (feature: GeoMapMarkEvent | null) => handlersRef.current.onMarkHover?.(feature),\n [],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n get instance() {\n return instanceRef.current;\n },\n }),\n [],\n );\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec intentionally excluded - spec changes handled via update() in Effect 2\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const options: GeoMapMountOptions = {\n theme,\n darkMode: resolvedDarkMode,\n onMarkClick: stableOnMarkClick,\n onMarkHover: stableOnMarkHover,\n responsive: true,\n };\n\n instanceRef.current = createGeoMap(container, spec, options);\n specRef.current = JSON.stringify(spec);\n\n return () => {\n instanceRef.current?.destroy();\n instanceRef.current = null;\n };\n }, [theme, resolvedDarkMode, stableOnMarkClick, stableOnMarkHover]);\n\n useEffect(() => {\n const instance = instanceRef.current;\n if (!instance) return;\n\n const specString = JSON.stringify(spec);\n if (specString === specRef.current) return;\n\n specRef.current = specString;\n instance.update(spec);\n }, [spec]);\n\n return (\n <div\n ref={containerRef}\n className={className ? `oc-map-root ${className}` : 'oc-map-root'}\n style={style}\n />\n );\n});\n","/**\n * React Graph component: thin wrapper around the vanilla adapter.\n *\n * Mounts a graph instance on render, updates when spec changes,\n * and cleans up on unmount. All heavy lifting is done by the vanilla\n * createGraph() function.\n *\n * Supports forwardRef for imperative control via useGraph() hook.\n */\n\nimport type { DarkMode, GraphSpec, ThemeConfig } from '@opendata-ai/openchart-core';\nimport {\n createGraph,\n type GraphCamera,\n type GraphInstance,\n type GraphMountOptions,\n type GraphTooltipFormatter,\n} from '@opendata-ai/openchart-vanilla';\nimport {\n type CSSProperties,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport type { GraphHandle } from './hooks/useGraph';\nimport { useVizDarkMode, useVizTheme } from './ThemeContext';\n\n/** Tooltip prop: `false` off, `true` default, or an object with a formatter. */\nexport type GraphTooltipProp = boolean | { formatter?: GraphTooltipFormatter };\n/** Legend prop: `false` off, `true` default, or an object toggling interactivity/counts. */\nexport type GraphLegendProp = boolean | { interactive?: boolean; counts?: boolean };\n\nexport interface GraphProps {\n /** The graph spec to render. */\n spec: GraphSpec;\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode: \"auto\", \"force\", or \"off\". */\n darkMode?: DarkMode;\n /** Callback when a node is clicked. */\n onNodeClick?: (node: Record<string, unknown>) => void;\n /** Callback when a node is double-clicked. */\n onNodeDoubleClick?: (node: Record<string, unknown>) => void;\n /** Callback when a node is hovered (null when hover ends). */\n onNodeHover?: (node: Record<string, unknown> | null) => void;\n /** Callback when an edge is hovered (null when hover ends). */\n onEdgeHover?: (edge: Record<string, unknown> | null) => void;\n /** Callback when selection changes. */\n onSelectionChange?: (nodeIds: string[]) => void;\n /** Fired when the user hovers a legend entry (null on leave). */\n onLegendHover?: (entry: { field: string; value: string } | null) => void;\n /** Fired when legend toggle state changes; `activeValues` is the active set (empty = all). */\n onLegendToggle?: (activeValues: string[]) => void;\n /** Fired whenever the highlight set changes (programmatic or legend), null when cleared. */\n onHighlightChange?: (nodeIds: string[] | null) => void;\n /** Camera change callback, rAF-coalesced (fires at most once per rendered frame). */\n onCameraChange?: (camera: GraphCamera) => void;\n /**\n * Show built-in tooltip on node/edge hover. Defaults to true. Pass an object\n * with a `formatter` to customize content.\n */\n tooltip?: GraphTooltipProp;\n /**\n * Show built-in legend. Defaults to true. Pass `false` if you render your own,\n * or an object to toggle interactivity/counts.\n */\n legend?: GraphLegendProp;\n /** Fit the graph to the viewport on the first tick. Default true. */\n fitOnLoad?: boolean;\n /** How much closer than the fit the opening camera sits: a multiplier on the fit (2 = twice as close), not an absolute zoom level. Default 1. Read once at mount; `zoomToFit()` still frames the whole graph. */\n initialZoom?: number;\n /** CSS class name for the wrapper div. */\n className?: string;\n /** Inline styles for the wrapper div. */\n style?: CSSProperties;\n}\n\n/** Structural (serializable) tooltip shape that participates in the mount dep key. */\nfunction tooltipStructural(tooltip: GraphTooltipProp | undefined): boolean {\n // Only the on/off decision is structural; the formatter is a function carried\n // by the ref-trampoline, never pinned in the dep array (avoids stale closures).\n if (tooltip === false) return false;\n return true;\n}\n\n/** Structural (serializable) legend shape that participates in the mount dep key. */\nfunction legendStructural(legend: GraphLegendProp | undefined): string {\n if (legend === false) return 'false';\n if (legend === true || legend === undefined) return 'true';\n return JSON.stringify({ interactive: legend.interactive, counts: legend.counts });\n}\n\n/**\n * React component that renders a force-directed graph from a GraphSpec.\n *\n * Uses the vanilla adapter internally. The spec is compiled and rendered\n * on a canvas inside a wrapper div. Spec changes trigger re-renders via the\n * vanilla adapter's update() method.\n *\n * Supports ref for imperative control via useGraph() hook:\n * ```tsx\n * const { ref, search, zoomToFit } = useGraph();\n * return <Graph ref={ref} spec={spec} />;\n * ```\n */\nexport const Graph = forwardRef<GraphHandle, GraphProps>(function Graph(\n {\n spec,\n theme: themeProp,\n darkMode,\n onNodeClick,\n onNodeDoubleClick,\n onNodeHover,\n onEdgeHover,\n onSelectionChange,\n onLegendHover,\n onLegendToggle,\n onHighlightChange,\n onCameraChange,\n tooltip,\n legend,\n fitOnLoad,\n initialZoom,\n className,\n style,\n },\n ref,\n) {\n const contextTheme = useVizTheme();\n const contextDarkMode = useVizDarkMode();\n const theme = themeProp ?? contextTheme;\n const resolvedDarkMode = darkMode ?? contextDarkMode;\n const containerRef = useRef<HTMLDivElement>(null);\n const graphRef = useRef<GraphInstance | null>(null);\n const specRef = useRef<string>('');\n // Deps of the previous mount-effect run. A recreation with CHANGED deps\n // (theme/darkMode/structural-tooltip/legend — all spec-unchanged) suppresses\n // the entrance; identical deps mean a StrictMode dev replay of the same\n // mount, which must still play the entrance. A survives-cleanup boolean ref\n // can't tell those apart — it would suppress the entrance in every\n // StrictMode app.\n const prevMountDepsRef = useRef<unknown[] | null>(null);\n\n // Store event handlers AND function-valued options in refs so they don't\n // trigger graph recreation. Inline functions create new references every\n // render, which would either destroy+recreate the graph (if pinned in the dep\n // array) or go stale (if read once at mount). The trampoline gives us stable\n // wrappers whose bodies read the LATEST handler on every call.\n const handlersRef = useRef<{\n onNodeClick?: GraphProps['onNodeClick'];\n onNodeDoubleClick?: GraphProps['onNodeDoubleClick'];\n onNodeHover?: GraphProps['onNodeHover'];\n onEdgeHover?: GraphProps['onEdgeHover'];\n onSelectionChange?: GraphProps['onSelectionChange'];\n onLegendHover?: GraphProps['onLegendHover'];\n onLegendToggle?: GraphProps['onLegendToggle'];\n onHighlightChange?: GraphProps['onHighlightChange'];\n onCameraChange?: GraphProps['onCameraChange'];\n tooltipFormatter?: GraphTooltipFormatter;\n }>({});\n handlersRef.current = {\n onNodeClick,\n onNodeDoubleClick,\n onNodeHover,\n onEdgeHover,\n onSelectionChange,\n onLegendHover,\n onLegendToggle,\n onHighlightChange,\n onCameraChange,\n tooltipFormatter: typeof tooltip === 'object' ? tooltip.formatter : undefined,\n };\n\n // Stable callback wrappers that read from refs\n const stableOnNodeClick = useCallback(\n (node: Record<string, unknown>) => handlersRef.current.onNodeClick?.(node),\n [],\n );\n const stableOnNodeDoubleClick = useCallback(\n (node: Record<string, unknown>) => handlersRef.current.onNodeDoubleClick?.(node),\n [],\n );\n const stableOnNodeHover = useCallback(\n (node: Record<string, unknown> | null) => handlersRef.current.onNodeHover?.(node),\n [],\n );\n const stableOnEdgeHover = useCallback(\n (edge: Record<string, unknown> | null) => handlersRef.current.onEdgeHover?.(edge),\n [],\n );\n const stableOnSelectionChange = useCallback(\n (nodeIds: string[]) => handlersRef.current.onSelectionChange?.(nodeIds),\n [],\n );\n const stableOnLegendHover = useCallback(\n (entry: { field: string; value: string } | null) => handlersRef.current.onLegendHover?.(entry),\n [],\n );\n const stableOnLegendToggle = useCallback(\n (activeValues: string[]) => handlersRef.current.onLegendToggle?.(activeValues),\n [],\n );\n const stableOnHighlightChange = useCallback(\n (nodeIds: string[] | null) => handlersRef.current.onHighlightChange?.(nodeIds),\n [],\n );\n const stableOnCameraChange = useCallback(\n (camera: GraphCamera) => handlersRef.current.onCameraChange?.(camera),\n [],\n );\n // A stable formatter wrapper: it always calls the LATEST formatter off the ref.\n // The tooltip mount option carries this wrapper, never the raw prop function, so\n // the formatter can't go stale and can't force graph recreation.\n const stableTooltipFormatter = useCallback<GraphTooltipFormatter>(\n (item, defaults) => handlersRef.current.tooltipFormatter?.(item, defaults) ?? defaults,\n [],\n );\n\n // Expose imperative handle for useGraph() hook. Every method forwards opts to\n // the underlying instance so consumers get the full vanilla API surface.\n useImperativeHandle(\n ref,\n () => ({\n search(query) {\n graphRef.current?.search(query);\n },\n clearSearch() {\n graphRef.current?.clearSearch();\n },\n getSearchMatches() {\n return graphRef.current?.getSearchMatches() ?? [];\n },\n zoomToFit(opts) {\n graphRef.current?.zoomToFit(opts);\n },\n zoomToNode(nodeId, opts) {\n graphRef.current?.zoomToNode(nodeId, opts);\n },\n flyTo(target, opts) {\n graphRef.current?.flyTo(target, opts);\n },\n centerAt(x, y, opts) {\n graphRef.current?.centerAt(x, y, opts);\n },\n getCamera() {\n return graphRef.current?.getCamera() ?? { x: 0, y: 0, k: 1 };\n },\n selectNode(nodeId, opts) {\n graphRef.current?.selectNode(nodeId, opts);\n },\n getSelectedNodes() {\n return graphRef.current?.getSelectedNodes() ?? [];\n },\n highlight(target, opts) {\n graphRef.current?.highlight(target, opts);\n },\n clearHighlight() {\n graphRef.current?.clearHighlight();\n },\n getHighlight() {\n return graphRef.current?.getHighlight() ?? null;\n },\n getLegend() {\n return graphRef.current?.getLegend() ?? null;\n },\n setActiveCategories(values: string[]) {\n graphRef.current?.setActiveCategories(values);\n },\n getActiveCategories() {\n return graphRef.current?.getActiveCategories() ?? [];\n },\n updateVisuals(spec: GraphSpec) {\n graphRef.current?.updateVisuals(spec);\n },\n get instance() {\n return graphRef.current;\n },\n }),\n [],\n );\n\n // Structural-only parts of tooltip/legend that gate recreation. The tooltip\n // formatter (a function) is deliberately excluded — it rides the trampoline.\n const tooltipOn = tooltipStructural(tooltip);\n const legendKey = legendStructural(legend);\n // 2D and 3D are different renderers chosen once, at mount, so a dimension\n // change is a remount. It is deliberately NOT in `mountDeps`: the new\n // renderer should play its entrance rather than suppress it.\n const dimensions = spec.dimensions ?? 2;\n\n // Mount graph and recreate when theme/darkMode/structural options change.\n // Event handlers and the tooltip formatter use stable refs so they don't\n // trigger recreation.\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec intentionally excluded - spec changes handled via update() in Effect 2\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n // Rebuild the tooltip option: keep the boolean/off decision, but always pass\n // the stable formatter wrapper when tooltips are on (so a formatter can be\n // added/changed per-render without recreating the graph).\n const tooltipOption: GraphMountOptions['tooltip'] = tooltipOn\n ? { formatter: stableTooltipFormatter }\n : false;\n\n // Suppress the entrance only when a PREVIOUS mount existed and a dep\n // actually changed (theme/darkMode/structural option — spec unchanged).\n // Identical deps = StrictMode's dev remount of the same graph: play it.\n const mountDeps: unknown[] = [theme, resolvedDarkMode, tooltipOn, legendKey, fitOnLoad];\n const prevDeps = prevMountDepsRef.current;\n const suppressEntrance =\n prevDeps !== null && mountDeps.some((d, i) => !Object.is(d, prevDeps[i]));\n\n const options: GraphMountOptions = {\n theme,\n darkMode: resolvedDarkMode,\n tooltip: tooltipOption,\n legend,\n fitOnLoad,\n // Only the opening camera reads it, so it is not a mount dep.\n initialZoom,\n onNodeClick: stableOnNodeClick,\n onNodeDoubleClick: stableOnNodeDoubleClick,\n onNodeHover: stableOnNodeHover,\n onEdgeHover: stableOnEdgeHover,\n onSelectionChange: stableOnSelectionChange,\n onLegendHover: stableOnLegendHover,\n onLegendToggle: stableOnLegendToggle,\n onHighlightChange: stableOnHighlightChange,\n onCameraChange: stableOnCameraChange,\n responsive: true,\n suppressEntrance,\n };\n\n graphRef.current = createGraph(container, spec, options);\n specRef.current = JSON.stringify(spec);\n prevMountDepsRef.current = mountDeps;\n\n return () => {\n graphRef.current?.destroy();\n graphRef.current = null;\n };\n // Only recreate when theme/darkMode/structural options change. Event handlers\n // and the tooltip formatter use stable refs.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n theme,\n resolvedDarkMode,\n tooltipOn,\n legendKey,\n fitOnLoad,\n stableOnNodeClick,\n stableOnNodeDoubleClick,\n stableOnNodeHover,\n stableOnEdgeHover,\n stableOnSelectionChange,\n stableOnLegendHover,\n stableOnLegendToggle,\n stableOnHighlightChange,\n stableOnCameraChange,\n stableTooltipFormatter,\n dimensions,\n ]);\n\n // Update the graph when the spec changes. `update()` diffs prev↔next itself:\n // a visual-only change (same node/edge ids + same physics) preserves positions\n // without restarting the sim; anything structural reheats with a local impulse.\n useEffect(() => {\n const graph = graphRef.current;\n if (!graph) return;\n\n const specString = JSON.stringify(spec);\n if (specString === specRef.current) return;\n specRef.current = specString;\n\n // `update` diffs internally: same node/edge ids + same physics take the\n // position-preserving path, anything structural reheats. No wrapper-side\n // heuristic needed (the old JSON-diff silently ignored physics changes).\n graph.update(spec);\n }, [spec]);\n\n return (\n <div\n ref={containerRef}\n className={className ? `oc-graph-root ${className}` : 'oc-graph-root'}\n style={style}\n />\n );\n});\n","/**\n * React hooks for chart lifecycle and dark mode resolution.\n *\n * useChart: manual control over a chart instance (for advanced usage).\n * useDarkMode: resolves the DarkMode preference to a boolean.\n */\n\nimport type {\n ChartLayout,\n ChartSpec,\n DarkMode,\n GraphSpec,\n LayerSpec,\n} from '@opendata-ai/openchart-core';\nimport { type ChartInstance, createChart, type MountOptions } from '@opendata-ai/openchart-vanilla';\nimport { useEffect, useRef, useState } from 'react';\n\n// ---------------------------------------------------------------------------\n// useChart\n// ---------------------------------------------------------------------------\n\nexport interface UseChartOptions {\n /** Theme overrides. */\n theme?: MountOptions['theme'];\n /** Dark mode setting. */\n darkMode?: MountOptions['darkMode'];\n /** Data point click handler. */\n onDataPointClick?: MountOptions['onDataPointClick'];\n /** Enable responsive resizing. Defaults to true. */\n responsive?: boolean;\n /** Rendering backend for point marks; see the vanilla `MountOptions.renderer`. */\n renderer?: MountOptions['renderer'];\n}\n\nexport interface UseChartReturn {\n /** Ref to attach to the container div. */\n ref: React.RefObject<HTMLDivElement | null>;\n /** The chart instance (null until mounted). */\n chart: ChartInstance | null;\n /** The current compiled layout (null until mounted). */\n layout: ChartLayout | null;\n}\n\n/**\n * Hook for manual chart lifecycle control.\n *\n * Attach the returned ref to a container div. The chart mounts\n * automatically and updates when the spec changes.\n *\n * @param spec - The visualization spec.\n * @param options - Mount options.\n * @returns { ref, chart, layout }\n */\nexport function useChart(\n spec: ChartSpec | LayerSpec | GraphSpec,\n options?: UseChartOptions,\n): UseChartReturn {\n const ref = useRef<HTMLDivElement | null>(null);\n const chartRef = useRef<ChartInstance | null>(null);\n const [layout, setLayout] = useState<ChartLayout | null>(null);\n const specRef = useRef<string>('');\n\n // Mount / unmount\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec intentionally excluded - spec changes handled via update() in the update effect\n useEffect(() => {\n const container = ref.current;\n if (!container) return;\n\n const mountOpts: MountOptions = {\n theme: options?.theme,\n darkMode: options?.darkMode,\n onDataPointClick: options?.onDataPointClick,\n responsive: options?.responsive,\n renderer: options?.renderer,\n };\n\n const chart = createChart(container, spec, mountOpts);\n chartRef.current = chart;\n setLayout(chart.layout);\n specRef.current = JSON.stringify(spec);\n\n return () => {\n chart.destroy();\n chartRef.current = null;\n setLayout(null);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n options?.theme,\n options?.darkMode,\n options?.onDataPointClick,\n options?.responsive,\n options?.renderer,\n ]);\n\n // Update on spec change\n useEffect(() => {\n const chart = chartRef.current;\n if (!chart) return;\n\n const specString = JSON.stringify(spec);\n if (specString !== specRef.current) {\n specRef.current = specString;\n chart.update(spec);\n setLayout(chart.layout);\n }\n }, [spec]);\n\n return {\n ref,\n chart: chartRef.current,\n layout,\n };\n}\n\n// ---------------------------------------------------------------------------\n// useDarkMode\n// ---------------------------------------------------------------------------\n\n/**\n * Resolve a DarkMode preference to a boolean.\n *\n * - \"force\" -> true\n * - \"off\" -> false\n * - \"auto\" -> matches system preference (reactive to changes)\n *\n * @param mode - The dark mode preference.\n * @returns Whether dark mode is active.\n */\nexport function useDarkMode(mode?: DarkMode): boolean {\n const [isDark, setIsDark] = useState(() => resolveInitial(mode));\n\n useEffect(() => {\n if (mode !== 'auto') {\n setIsDark(mode === 'force');\n return;\n }\n\n if (typeof window === 'undefined' || !window.matchMedia) {\n setIsDark(false);\n return;\n }\n\n const mq = window.matchMedia('(prefers-color-scheme: dark)');\n setIsDark(mq.matches);\n\n const handler = (e: MediaQueryListEvent) => setIsDark(e.matches);\n mq.addEventListener('change', handler);\n return () => mq.removeEventListener('change', handler);\n }, [mode]);\n\n return isDark;\n}\n\nfunction resolveInitial(mode?: DarkMode): boolean {\n if (mode === 'force') return true;\n if (mode === 'off' || mode === undefined) return false;\n // \"auto\"\n if (typeof window !== 'undefined' && window.matchMedia) {\n return window.matchMedia('(prefers-color-scheme: dark)').matches;\n }\n return false;\n}\n","/**\n * useGraph: hook for imperative graph control.\n *\n * Provides a ref to pass to <Graph /> and exposes graph methods\n * (search, zoom, select, fly, highlight) for programmatic control of the\n * graph instance. The full vanilla GraphInstance API is threaded through.\n */\n\nimport type { GraphSpec } from '@opendata-ai/openchart-core';\nimport type {\n CameraFlightOptions,\n GraphCamera,\n GraphFlyTarget,\n GraphHighlightTarget,\n GraphInstance,\n GraphLegendData,\n} from '@opendata-ai/openchart-vanilla';\nimport { useCallback, useRef } from 'react';\n\n// Re-exported rather than redeclared so the 3D pose fields (`position`,\n// `target`) stay visible to typed consumers of the React wrapper.\nexport type { GraphCamera, GraphFlyTarget } from '@opendata-ai/openchart-vanilla';\n\nexport interface UseGraphReturn {\n /** Ref to pass to <Graph ref={ref} />. */\n ref: React.RefObject<GraphHandle | null>;\n /** Search for nodes matching a query string. */\n search: (query: string) => void;\n /** Clear the current search. */\n clearSearch: () => void;\n /** Node ids currently matching the active search query. */\n getSearchMatches: () => string[];\n /** Zoom to fit all nodes in view. Animated by default; `{ duration: 0 }` snaps. */\n zoomToFit: (opts?: CameraFlightOptions & { padding?: number }) => void;\n /** Fly to a node and zoom in (default scale 2). */\n zoomToNode: (nodeId: string, opts?: CameraFlightOptions & { scale?: number }) => void;\n /** Fly the camera to a graph-space target. */\n flyTo: (target: GraphFlyTarget, opts?: CameraFlightOptions) => void;\n /** Center the camera on a graph-space point (keeps current zoom). */\n centerAt: (x: number, y: number, opts?: CameraFlightOptions) => void;\n /** Current camera transform. */\n getCamera: () => GraphCamera;\n /** Select a node by id; `{ fly: true }` also flies to it. */\n selectNode: (nodeId: string, opts?: { fly?: boolean } & CameraFlightOptions) => void;\n /** Get the currently selected node ids. */\n getSelectedNodes: () => string[];\n /**\n * Emphasize a set of nodes; eased via the focus model. Layers over the\n * standing category filter rather than replacing it.\n */\n highlight: (target: GraphHighlightTarget, opts?: { dimOpacity?: number }) => void;\n /**\n * Clear the transient highlight, returning to the standing category filter.\n * Does NOT clear that filter — use `setActiveCategories([])`.\n */\n clearHighlight: () => void;\n /** The effective highlighted node ids, or null when nothing is highlighted. */\n getHighlight: () => string[] | null;\n /** Headless snapshot of the legend. */\n getLegend: () => GraphLegendData | null;\n /** Set the active category filter declaratively (replaces legend toggle state). */\n setActiveCategories: (values: string[]) => void;\n /** Current active category values (empty = all active, no filter). */\n getActiveCategories: () => string[];\n}\n\n/** Handle exposed by Graph component via forwardRef. */\nexport interface GraphHandle {\n search: (query: string) => void;\n clearSearch: () => void;\n getSearchMatches: () => string[];\n zoomToFit: (opts?: CameraFlightOptions & { padding?: number }) => void;\n zoomToNode: (nodeId: string, opts?: CameraFlightOptions & { scale?: number }) => void;\n flyTo: (target: GraphFlyTarget, opts?: CameraFlightOptions) => void;\n centerAt: (x: number, y: number, opts?: CameraFlightOptions) => void;\n getCamera: () => GraphCamera;\n selectNode: (nodeId: string, opts?: { fly?: boolean } & CameraFlightOptions) => void;\n getSelectedNodes: () => string[];\n highlight: (target: GraphHighlightTarget, opts?: { dimOpacity?: number }) => void;\n clearHighlight: () => void;\n getHighlight: () => string[] | null;\n getLegend: () => GraphLegendData | null;\n setActiveCategories: (values: string[]) => void;\n getActiveCategories: () => string[];\n /** Re-compile encoding/legend/chrome without restarting the simulation. */\n updateVisuals: (spec: GraphSpec) => void;\n /** The underlying GraphInstance from the vanilla adapter. */\n instance: GraphInstance | null;\n}\n\n/**\n * Hook for imperative graph control.\n *\n * Usage:\n * ```tsx\n * const { ref, search, zoomToFit } = useGraph();\n * return <Graph ref={ref} spec={spec} />;\n * ```\n */\nexport function useGraph(): UseGraphReturn {\n const ref = useRef<GraphHandle | null>(null);\n\n const search = useCallback((query: string) => {\n ref.current?.search(query);\n }, []);\n\n const clearSearch = useCallback(() => {\n ref.current?.clearSearch();\n }, []);\n\n const getSearchMatches = useCallback((): string[] => {\n return ref.current?.getSearchMatches() ?? [];\n }, []);\n\n const zoomToFit = useCallback((opts?: CameraFlightOptions & { padding?: number }) => {\n ref.current?.zoomToFit(opts);\n }, []);\n\n const zoomToNode = useCallback(\n (nodeId: string, opts?: CameraFlightOptions & { scale?: number }) => {\n ref.current?.zoomToNode(nodeId, opts);\n },\n [],\n );\n\n const flyTo = useCallback((target: GraphFlyTarget, opts?: CameraFlightOptions) => {\n ref.current?.flyTo(target, opts);\n }, []);\n\n const centerAt = useCallback((x: number, y: number, opts?: CameraFlightOptions) => {\n ref.current?.centerAt(x, y, opts);\n }, []);\n\n const getCamera = useCallback((): GraphCamera => {\n return ref.current?.getCamera() ?? { x: 0, y: 0, k: 1 };\n }, []);\n\n const selectNode = useCallback(\n (nodeId: string, opts?: { fly?: boolean } & CameraFlightOptions) => {\n ref.current?.selectNode(nodeId, opts);\n },\n [],\n );\n\n const getSelectedNodes = useCallback((): string[] => {\n return ref.current?.getSelectedNodes() ?? [];\n }, []);\n\n const highlight = useCallback((target: GraphHighlightTarget, opts?: { dimOpacity?: number }) => {\n ref.current?.highlight(target, opts);\n }, []);\n\n const clearHighlight = useCallback(() => {\n ref.current?.clearHighlight();\n }, []);\n\n const getHighlight = useCallback((): string[] | null => {\n return ref.current?.getHighlight() ?? null;\n }, []);\n\n const getLegend = useCallback((): GraphLegendData | null => {\n return ref.current?.getLegend() ?? null;\n }, []);\n\n const setActiveCategories = useCallback((values: string[]) => {\n ref.current?.setActiveCategories(values);\n }, []);\n\n const getActiveCategories = useCallback((): string[] => {\n return ref.current?.getActiveCategories() ?? [];\n }, []);\n\n return {\n ref,\n search,\n clearSearch,\n getSearchMatches,\n zoomToFit,\n zoomToNode,\n flyTo,\n centerAt,\n getCamera,\n selectNode,\n getSelectedNodes,\n highlight,\n clearHighlight,\n getHighlight,\n getLegend,\n setActiveCategories,\n getActiveCategories,\n };\n}\n","/**\n * useTable: hook for manual table lifecycle control.\n *\n * Attaches to a container ref, mounts a vanilla table instance,\n * and exposes the instance and current state.\n */\n\nimport type { TableSpec } from '@opendata-ai/openchart-core';\nimport {\n createTable,\n type TableInstance,\n type TableMountOptions,\n type TableState,\n} from '@opendata-ai/openchart-vanilla';\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nexport interface UseTableReturn {\n /** Ref to attach to the container div. */\n ref: React.RefObject<HTMLDivElement | null>;\n /** The table instance (null until mounted). */\n table: TableInstance | null;\n /** The current table state (sort, search, page). */\n state: TableState;\n}\n\n/**\n * Hook for manual table lifecycle control.\n *\n * Attach the returned ref to a container div. The table mounts\n * automatically and updates when the spec changes.\n *\n * @param spec - The table spec.\n * @param options - Mount options.\n * @returns { ref, table, state }\n */\nexport function useTable(spec: TableSpec, options?: TableMountOptions): UseTableReturn {\n const ref = useRef<HTMLDivElement | null>(null);\n const tableRef = useRef<TableInstance | null>(null);\n const [state, setState] = useState<TableState>({\n sort: null,\n search: '',\n page: 0,\n });\n\n const originalOnStateChange = options?.onStateChange;\n\n const handleStateChange = useCallback(\n (newState: TableState) => {\n setState(newState);\n originalOnStateChange?.(newState);\n },\n [originalOnStateChange],\n );\n\n // Mount / unmount\n useEffect(() => {\n const container = ref.current;\n if (!container) return;\n\n const mountOpts: TableMountOptions = {\n ...options,\n onStateChange: handleStateChange,\n };\n\n const table = createTable(container, spec, mountOpts);\n tableRef.current = table;\n setState(table.getState());\n\n return () => {\n table.destroy();\n tableRef.current = null;\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n options?.theme,\n options?.darkMode,\n options?.onRowClick,\n options?.responsive,\n handleStateChange,\n options,\n spec,\n ]);\n\n // Update on spec change\n useEffect(() => {\n const table = tableRef.current;\n if (!table) return;\n\n table.update(spec);\n setState(table.getState());\n }, [spec]);\n\n return {\n ref,\n table: tableRef.current,\n state,\n };\n}\n","/**\n * useTableState: managed state hook for controlled table usage.\n *\n * Provides individual sort/search/page state with setters and a\n * resetState function to return to initial values.\n */\n\nimport type { SortState } from '@opendata-ai/openchart-core';\nimport { useCallback, useState } from 'react';\n\nexport interface UseTableStateReturn {\n sort: SortState | null;\n setSort: (sort: SortState | null) => void;\n search: string;\n setSearch: (query: string) => void;\n page: number;\n setPage: (page: number) => void;\n resetState: () => void;\n}\n\nexport interface UseTableStateOptions {\n sort?: SortState | null;\n search?: string;\n page?: number;\n}\n\n/**\n * Hook for managing table state (sort, search, page).\n *\n * Use with the DataTable component's controlled props:\n * ```tsx\n * const { sort, search, page, setSort, setSearch, setPage } = useTableState();\n * <DataTable\n * spec={spec}\n * sort={sort}\n * search={search}\n * page={page}\n * onSortChange={setSort}\n * onSearchChange={setSearch}\n * onPageChange={setPage}\n * />\n * ```\n */\nexport function useTableState(initialState?: UseTableStateOptions): UseTableStateReturn {\n const [sort, setSortInternal] = useState<SortState | null>(initialState?.sort ?? null);\n const [search, setSearchInternal] = useState(initialState?.search ?? '');\n const [page, setPageInternal] = useState(initialState?.page ?? 0);\n\n const setSort = useCallback((newSort: SortState | null) => {\n setSortInternal(newSort);\n }, []);\n\n const setSearch = useCallback((query: string) => {\n setSearchInternal(query);\n }, []);\n\n const setPage = useCallback((newPage: number) => {\n setPageInternal(newPage);\n }, []);\n\n const resetState = useCallback(() => {\n setSortInternal(initialState?.sort ?? null);\n setSearchInternal(initialState?.search ?? '');\n setPageInternal(initialState?.page ?? 0);\n }, [initialState?.sort, initialState?.search, initialState?.page]);\n\n return {\n sort,\n setSort,\n search,\n setSearch,\n page,\n setPage,\n resetState,\n };\n}\n","/**\n * React Sankey component: thin wrapper around the vanilla adapter.\n *\n * Mounts a sankey instance on render, updates when spec changes,\n * and cleans up on unmount. All heavy lifting is done by the vanilla\n * createSankey() function.\n *\n * Supports forwardRef for imperative control via the instance getter.\n */\n\nimport type { DarkMode, SankeySpec, ThemeConfig } from '@opendata-ai/openchart-core';\nimport {\n createSankey,\n type SankeyInstance,\n type SankeyMountOptions,\n} from '@opendata-ai/openchart-vanilla';\nimport {\n type CSSProperties,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport { useVizDarkMode, useVizTheme } from './ThemeContext';\n\nexport interface SankeyProps {\n /** The sankey spec to render. */\n spec: SankeySpec;\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode: \"auto\", \"force\", or \"off\". */\n darkMode?: DarkMode;\n /** Callback when a node is clicked. */\n onNodeClick?: (node: Record<string, unknown>) => void;\n /** Callback when a link is clicked. */\n onLinkClick?: (link: Record<string, unknown>) => void;\n /** Callback when a node is hovered (null when hover ends). */\n onNodeHover?: (node: Record<string, unknown> | null) => void;\n /** Callback when a link is hovered (null when hover ends). */\n onLinkHover?: (link: Record<string, unknown> | null) => void;\n /** CSS class name for the wrapper div. */\n className?: string;\n /** Inline styles for the wrapper div. */\n style?: CSSProperties;\n}\n\nexport interface SankeyHandle {\n /** The underlying sankey instance (null until mounted). */\n readonly instance: SankeyInstance | null;\n}\n\n/**\n * React component that renders a sankey diagram from a SankeySpec.\n *\n * Uses the vanilla adapter internally. The spec is compiled and rendered\n * as SVG inside a wrapper div. Spec changes trigger re-renders via the\n * vanilla adapter's update() method.\n */\nexport const Sankey = forwardRef<SankeyHandle, SankeyProps>(function Sankey(\n {\n spec,\n theme: themeProp,\n darkMode,\n onNodeClick,\n onLinkClick,\n onNodeHover,\n onLinkHover,\n className,\n style,\n },\n ref,\n) {\n const contextTheme = useVizTheme();\n const contextDarkMode = useVizDarkMode();\n const theme = themeProp ?? contextTheme;\n const resolvedDarkMode = darkMode ?? contextDarkMode;\n const containerRef = useRef<HTMLDivElement>(null);\n const instanceRef = useRef<SankeyInstance | null>(null);\n const specRef = useRef<string>('');\n\n // Store event handlers in refs so they don't trigger recreation.\n const handlersRef = useRef<{\n onNodeClick?: SankeyProps['onNodeClick'];\n onLinkClick?: SankeyProps['onLinkClick'];\n onNodeHover?: SankeyProps['onNodeHover'];\n onLinkHover?: SankeyProps['onLinkHover'];\n }>({});\n handlersRef.current = {\n onNodeClick,\n onLinkClick,\n onNodeHover,\n onLinkHover,\n };\n\n // Stable callback wrappers that read from refs\n const stableOnNodeClick = useCallback(\n (node: Record<string, unknown>) => handlersRef.current.onNodeClick?.(node),\n [],\n );\n const stableOnLinkClick = useCallback(\n (link: Record<string, unknown>) => handlersRef.current.onLinkClick?.(link),\n [],\n );\n const stableOnNodeHover = useCallback(\n (node: Record<string, unknown> | null) => handlersRef.current.onNodeHover?.(node),\n [],\n );\n const stableOnLinkHover = useCallback(\n (link: Record<string, unknown> | null) => handlersRef.current.onLinkHover?.(link),\n [],\n );\n\n // Expose imperative handle\n useImperativeHandle(\n ref,\n () => ({\n get instance() {\n return instanceRef.current;\n },\n }),\n [],\n );\n\n // Mount sankey and recreate when theme/darkMode change.\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec intentionally excluded - spec changes handled via update() in Effect 2\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const options: SankeyMountOptions = {\n theme,\n darkMode: resolvedDarkMode,\n onNodeClick: stableOnNodeClick,\n onLinkClick: stableOnLinkClick,\n onNodeHover: stableOnNodeHover,\n onLinkHover: stableOnLinkHover,\n responsive: true,\n };\n\n instanceRef.current = createSankey(container, spec, options);\n specRef.current = JSON.stringify(spec);\n\n return () => {\n instanceRef.current?.destroy();\n instanceRef.current = null;\n };\n }, [\n theme,\n resolvedDarkMode,\n stableOnNodeClick,\n stableOnLinkClick,\n stableOnNodeHover,\n stableOnLinkHover,\n ]);\n\n // Update sankey when spec changes.\n useEffect(() => {\n const instance = instanceRef.current;\n if (!instance) return;\n\n const specString = JSON.stringify(spec);\n if (specString === specRef.current) return;\n\n specRef.current = specString;\n instance.update(spec);\n }, [spec]);\n\n return (\n <div\n ref={containerRef}\n className={className ? `oc-sankey-root ${className}` : 'oc-sankey-root'}\n style={style}\n />\n );\n});\n","/**\n * React TileMap component: thin wrapper around the vanilla adapter.\n *\n * Mounts a tilemap instance on render, updates when spec changes,\n * and cleans up on unmount. All heavy lifting is done by the vanilla\n * createTileMap() function.\n *\n * Supports forwardRef for imperative control via the instance getter.\n */\n\nimport type { DarkMode, ThemeConfig, TileMapSpec } from '@opendata-ai/openchart-core';\nimport {\n createTileMap,\n type TileMapInstance,\n type TileMapMountOptions,\n} from '@opendata-ai/openchart-vanilla';\nimport {\n type CSSProperties,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport { useVizDarkMode, useVizTheme } from './ThemeContext';\n\nexport interface TileMapProps {\n /** The tilemap spec to render. */\n spec: TileMapSpec;\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode: \"auto\", \"force\", or \"off\". */\n darkMode?: DarkMode;\n /** Callback when a tile is clicked. */\n onTileClick?: (tile: {\n stateCode: string;\n stateName: string;\n value: number | null;\n data: Record<string, unknown>;\n }) => void;\n /** Callback when a tile is hovered (null when hover ends). */\n onTileHover?: (\n tile: {\n stateCode: string;\n stateName: string;\n value: number | null;\n data: Record<string, unknown>;\n } | null,\n ) => void;\n /** CSS class name for the wrapper div. */\n className?: string;\n /** Inline styles for the wrapper div. */\n style?: CSSProperties;\n}\n\nexport interface TileMapHandle {\n /** The underlying tilemap instance (null until mounted). */\n readonly instance: TileMapInstance | null;\n}\n\n/**\n * React component that renders a tilemap from a TileMapSpec.\n *\n * Uses the vanilla adapter internally. The spec is compiled and rendered\n * as SVG inside a wrapper div. Spec changes trigger re-renders via the\n * vanilla adapter's update() method.\n */\nexport const TileMap = forwardRef<TileMapHandle, TileMapProps>(function TileMap(\n { spec, theme: themeProp, darkMode, onTileClick, onTileHover, className, style },\n ref,\n) {\n const contextTheme = useVizTheme();\n const contextDarkMode = useVizDarkMode();\n const theme = themeProp ?? contextTheme;\n const resolvedDarkMode = darkMode ?? contextDarkMode;\n const containerRef = useRef<HTMLDivElement>(null);\n const instanceRef = useRef<TileMapInstance | null>(null);\n const specRef = useRef<string>('');\n\n // Store event handlers in refs so they don't trigger recreation.\n const handlersRef = useRef<{\n onTileClick?: TileMapProps['onTileClick'];\n onTileHover?: TileMapProps['onTileHover'];\n }>({});\n handlersRef.current = {\n onTileClick,\n onTileHover,\n };\n\n // Stable callback wrappers that read from refs\n const stableOnTileClick = useCallback(\n (tile: {\n stateCode: string;\n stateName: string;\n value: number | null;\n data: Record<string, unknown>;\n }) => handlersRef.current.onTileClick?.(tile),\n [],\n );\n const stableOnTileHover = useCallback(\n (\n tile: {\n stateCode: string;\n stateName: string;\n value: number | null;\n data: Record<string, unknown>;\n } | null,\n ) => handlersRef.current.onTileHover?.(tile),\n [],\n );\n\n // Expose imperative handle\n useImperativeHandle(\n ref,\n () => ({\n get instance() {\n return instanceRef.current;\n },\n }),\n [],\n );\n\n // Mount tilemap and recreate when theme/darkMode change.\n // biome-ignore lint/correctness/useExhaustiveDependencies: spec intentionally excluded - spec changes handled via update() in Effect 2\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const options: TileMapMountOptions = {\n theme,\n darkMode: resolvedDarkMode,\n onTileClick: stableOnTileClick,\n onTileHover: stableOnTileHover,\n responsive: true,\n };\n\n instanceRef.current = createTileMap(container, spec, options);\n specRef.current = JSON.stringify(spec);\n\n return () => {\n instanceRef.current?.destroy();\n instanceRef.current = null;\n };\n }, [theme, resolvedDarkMode, stableOnTileClick, stableOnTileHover]);\n\n // Update tilemap when spec changes.\n useEffect(() => {\n const instance = instanceRef.current;\n if (!instance) return;\n\n const specString = JSON.stringify(spec);\n if (specString === specRef.current) return;\n\n specRef.current = specString;\n instance.update(spec);\n }, [spec]);\n\n return (\n <div\n ref={containerRef}\n className={className ? `oc-tilemap-root ${className}` : 'oc-tilemap-root'}\n style={style}\n />\n );\n});\n","/**\n * Visualization routing component: renders Chart, DataTable, or Graph\n * based on the spec type. Use this when rendering arbitrary VizSpec values.\n *\n * For event handlers, use the specific component (Chart, DataTable, Graph) directly.\n */\n\nimport type { DarkMode, ThemeConfig, VizSpec } from '@opendata-ai/openchart-core';\nimport {\n isBarListSpec,\n isGeoMapSpec,\n isGraphSpec,\n isSankeySpec,\n isTableSpec,\n isTileMapSpec,\n} from '@opendata-ai/openchart-core';\nimport type { CSSProperties } from 'react';\nimport { BarList } from './BarList';\nimport { Chart } from './Chart';\nimport { DataTable } from './DataTable';\nimport { GeoMap } from './GeoMap';\nimport { Graph } from './Graph';\nimport { Sankey } from './Sankey';\nimport { TileMap } from './TileMap';\n\nexport interface VisualizationProps {\n /** The visualization spec to render. */\n spec: VizSpec;\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode: \"auto\", \"force\", or \"off\". */\n darkMode?: DarkMode;\n /** CSS class name for the wrapper div. */\n className?: string;\n /** Inline styles for the wrapper div. */\n style?: CSSProperties;\n}\n\n/**\n * Routes a VizSpec to the appropriate rendering component.\n *\n * Accepts any VizSpec and renders it with the correct component based on the\n * spec's type field. For event handlers, use Chart, DataTable, or Graph directly.\n */\nexport function Visualization({ spec, theme, darkMode, className, style }: VisualizationProps) {\n if (isTableSpec(spec)) {\n return (\n <DataTable\n spec={spec}\n theme={theme}\n darkMode={darkMode}\n className={className}\n style={style}\n />\n );\n }\n if (isGraphSpec(spec)) {\n return (\n <Graph spec={spec} theme={theme} darkMode={darkMode} className={className} style={style} />\n );\n }\n if (isSankeySpec(spec)) {\n return (\n <Sankey spec={spec} theme={theme} darkMode={darkMode} className={className} style={style} />\n );\n }\n if (isTileMapSpec(spec)) {\n return (\n <TileMap spec={spec} theme={theme} darkMode={darkMode} className={className} style={style} />\n );\n }\n if (isBarListSpec(spec)) {\n return (\n <BarList spec={spec} theme={theme} darkMode={darkMode} className={className} style={style} />\n );\n }\n if (isGeoMapSpec(spec)) {\n return (\n <GeoMap spec={spec} theme={theme} darkMode={darkMode} className={className} style={style} />\n );\n }\n return (\n <Chart spec={spec} theme={theme} darkMode={darkMode} className={className} style={style} />\n );\n}\n"],"mappings":";AAcA,cAAc;AAYd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA0BP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;AChEP;AAAA,EAGE;AAAA,OACK;AACP;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACZP,SAAS,eAA+B,kBAAkB;AA2BpD;AAzBN,IAAM,kBAAkB,cAAuC,MAAS;AACxE,IAAM,qBAAqB,cAAoC,MAAS;AAGjE,SAAS,cAAuC;AACrD,SAAO,WAAW,eAAe;AACnC;AAGO,SAAS,iBAAuC;AACrD,SAAO,WAAW,kBAAkB;AACtC;AAWO,SAAS,iBAAiB,EAAE,OAAO,UAAU,SAAS,GAA0B;AACrF,SACE,oBAAC,gBAAgB,UAAhB,EAAyB,OAAO,OAC/B,8BAAC,mBAAmB,UAAnB,EAA4B,OAAO,UAAW,UAAS,GAC1D;AAEJ;;;ADgFI,gBAAAA,YAAA;AA3EG,IAAM,UAAU,WAAwC,SAASC,SACtE,EAAE,MAAM,OAAO,WAAW,UAAU,YAAY,YAAY,WAAW,MAAM,GAC7E,KACA;AACA,QAAM,eAAe,YAAY;AACjC,QAAM,kBAAkB,eAAe;AACvC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BAAAA,MAAC,SAAM,MAAY,OAAc,UAAoB,WAAsB,OAAc;AAAA,EAE7F;AACA,MAAI,aAAa,IAAI,GAAG;AACtB,WACE,gBAAAA,MAAC,UAAO,MAAY,OAAc,UAAoB,WAAsB,OAAc;AAAA,EAE9F;AACA,MAAI,cAAc,IAAI,GAAG;AACvB,WACE,gBAAAA,MAAC,WAAQ,MAAY,OAAc,UAAoB,WAAsB,OAAc;AAAA,EAE/F;AACA,MAAI,cAAc,IAAI,GAAG;AACvB,WACE,gBAAAA,MAAC,WAAQ,MAAY,OAAc,UAAoB,WAAsB,OAAc;AAAA,EAE/F;AACA,MAAI,aAAa,IAAI,GAAG;AACtB,WACE,gBAAAA,MAAC,UAAO,MAAY,OAAc,UAAoB,WAAsB,OAAc;AAAA,EAE9F;AACA,SACE,gBAAAA,MAAC,SAAM,MAAY,OAAc,UAAoB,WAAsB,OAAc;AAE7F;","names":["jsx","BarList","forwardRef","useCallback","useEffect","useImperativeHandle","useRef","jsx","useRef","useCallback","useImperativeHandle","useEffect","forwardRef","useEffect","useImperativeHandle","useRef","jsx","useCallback","useEffect","useRef","jsx","useRef","useCallback","useEffect","forwardRef","useCallback","useEffect","useImperativeHandle","useRef","jsx","forwardRef","GeoMap","useRef","useCallback","useImperativeHandle","useEffect","forwardRef","useCallback","useEffect","useImperativeHandle","useRef","jsx","forwardRef","Graph","useRef","useCallback","useImperativeHandle","spec","useEffect","createChart","useEffect","useRef","useCallback","useRef","createTable","useCallback","useEffect","useRef","useState","useCallback","useState","forwardRef","useCallback","useEffect","useImperativeHandle","useRef","jsx","forwardRef","Sankey","useRef","useCallback","useImperativeHandle","useEffect","forwardRef","useCallback","useEffect","useImperativeHandle","useRef","jsx","forwardRef","TileMap","useRef","useCallback","useImperativeHandle","useEffect","jsx"]}
|
package/dist/styles.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"AAWA,iBCEE,mzEIFA,6lBLAF,eQNE,mIAeA,6BAQA,u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LAAA,kLAaA,iIAUA,0LAYA,uDAKA,uGAOA,2DAIA,oDAIA,gDAUA,6CAIA,kEASF,2EASA,oHSzkBA,qIASA,kEAOA,2CAQA,gFAOA,yBAIA,0EAMA,4GASE,8bAkBA,2RAaF,wRAgBA,qLAiBA,6EAIE,kEAIA,+FAOF,4CAIA,iCAIA,0HAOA,+EAQA,sEAMA,sDAKE,2QAUE,2GPrKJ,2GAIA,8IAOA,oGIdA,mEAYA,4EAIA,uCACE,6DVhBJ,oBSJI,4JAMA,4JAOA,8NAOA,yOAOA,wRAAA,yRAcA,4RAaA,uRAYA,4RAAA,+RAaA,uKAAA,2KM/EF,8GAgBA,kHAgBA,iHAeA,4FAoBA,8IAaA,iGAaA,yDAUA,sGAaA,uFAWA,yFAaA,iKAgBA,sGCzJE,mMAAA,kMAOA,+FAAA,8FASA,8RAYA,8MAOA,8MASA,kNAUA,qOAAA,sOAQA,+JAAA,+JAWA,8NAOA,8NAOA,8NAOA,kMAWA,uKAOA,wJAQA,gLASA,8JAKA,+EAKA,2KAQA,mQAYA,0NAQA,8PAYA,uLAMA,6KAeF,wJhBvMF,yBiBDE,uCACE,6LAAA,+LAAA,qMAAA","sources":["../src/styles/index.css","../src/styles/you-draw-it.css","../src/styles/tokens.css","../src/styles/chrome.css","../src/styles/dark.css","../src/styles/table.css","../src/styles/sankey.css","../src/styles/tooltip.css","../src/styles/base.css","../src/styles/table-animation.css","../src/styles/graph.css","../src/styles/legend.css","../src/styles/interaction.css","../src/styles/sparkline.css","../src/styles/series-search.css","../src/styles/keyframes.css","../src/styles/animation.css","../src/styles/reduced-motion.css"],"sourcesContent":["/**\n * @opendata-ai/openchart-core styles\n *\n * CSS with oc- prefix for all class names.\n * CSS custom properties for theme overrides.\n * Dark mode via .oc-dark class on the container.\n * Cascade layers: oc.tokens, oc.base, oc.components, oc.animation, oc.reduced-motion.\n */\n\n/* For optimal typography, load Inter: https://fonts.google.com/specimen/Inter */\n\n@layer oc.tokens, oc.base, oc.components, oc.animation, oc.reduced-motion;\n\n@import \"./tokens.css\";\n@import \"./dark.css\";\n@import \"./base.css\";\n@import \"./chrome.css\";\n@import \"./tooltip.css\";\n@import \"./legend.css\";\n@import \"./interaction.css\";\n@import \"./series-search.css\";\n@import \"./you-draw-it.css\";\n@import \"./table.css\";\n@import \"./table-animation.css\";\n@import \"./graph.css\";\n@import \"./sankey.css\";\n@import \"./sparkline.css\";\n@import \"./keyframes.css\";\n@import \"./animation.css\";\n@import \"./reduced-motion.css\";\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * You draw it (youDrawIt)\n *\n * NYT-style draw-then-reveal. SVG-space elements (hatched region, guess path,\n * reveal clip) render inside the chart SVG; the prompt + skip-to-reveal button\n * are an absolutely-positioned HTML overlay the vanilla adapter sizes over the\n * drawing region (inline left/top/width/height). All colors come from --oc-*\n * tokens so they flip in .oc-dark.\n * --------------------------------------------------------------------------- */\n\n /* Hatched \"draw here\" region. Fill comes from an SVG <pattern> (line color =\n * the target series color); this only governs overall opacity + fade-out. */\n .oc-ydi-region {\n opacity: 0.35;\n transition: opacity 0.4s ease;\n }\n\n .oc-ydi-region[data-ydi-hidden=\"true\"] {\n opacity: 0;\n }\n\n /* The vertical rule at `from` where drawing begins. */\n .oc-ydi-boundary {\n stroke: var(--oc-text-muted);\n stroke-width: 1;\n stroke-dasharray: 3 3;\n stroke-opacity: 0.6;\n }\n\n /* Reader's guess: a distinct pen-like stroke that reads as \"yours\" against the\n * solid real line. Dashed + focus-blue so it stays legible in both modes. */\n .oc-ydi-guess {\n stroke: var(--oc-focus);\n stroke-width: 2.5;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-dasharray: 1 6;\n }\n\n /* Host-supplied comparison line (\"what everyone else guessed\"). Muted so it\n * sits behind the reader's guess and the real line. */\n .oc-ydi-comparison {\n stroke: var(--oc-text-muted);\n stroke-width: 1.5;\n stroke-opacity: 0.5;\n stroke-dasharray: 4 4;\n }\n\n /* Reveal clip rect: the width animates from the `from` boundary to the full\n * area on reveal, wiping the real line in left-to-right. The vanilla adapter\n * adds .oc-ydi-clip-animate right before setting the final width; reduced\n * motion skips the class so the width snaps. */\n .oc-ydi-clip-rect.oc-ydi-clip-animate {\n transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);\n }\n\n /* HTML controls overlay: prompt (top) + reveal button (bottom-right). */\n .oc-ydi-controls {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: flex-end;\n pointer-events: none;\n font-family: var(--oc-font-family);\n padding: 8px;\n box-sizing: border-box;\n z-index: 10;\n }\n\n .oc-ydi-prompt {\n align-self: center;\n max-width: 100%;\n padding: 6px 12px;\n border-radius: var(--oc-radius-md);\n background: var(--oc-card);\n border: 1px solid var(--oc-border);\n color: var(--oc-text-secondary);\n font-size: 13px;\n font-weight: 500;\n line-height: 16px;\n text-align: center;\n box-shadow: var(--oc-tooltip-shadow);\n }\n\n .oc-ydi-controls.oc-ydi-revealed .oc-ydi-prompt {\n display: none;\n }\n\n /* Skip-to-reveal button. pointer-events re-enabled (the overlay disables it)\n * so it stays clickable and keyboard-reachable. Min height enforced inline by\n * the adapter (>= 24px effective touch target). */\n .oc-ydi-reveal-button {\n pointer-events: auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 6px 14px;\n border: 1px solid var(--oc-border);\n border-radius: var(--oc-radius-md);\n background: var(--oc-bg);\n color: var(--oc-text);\n font-family: inherit;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n box-shadow: var(--oc-tooltip-shadow);\n transition:\n background-color 0.15s,\n border-color 0.15s;\n }\n\n .oc-ydi-reveal-button:hover {\n background: var(--oc-hover-bg);\n }\n\n .oc-ydi-reveal-button:focus-visible {\n outline: 2px solid var(--oc-focus);\n outline-offset: 2px;\n }\n\n .oc-ydi-reveal-button:disabled {\n opacity: 0.5;\n cursor: default;\n }\n}\n","/* GENERATED FILE — do not edit. Source: packages/core/src/styles/token-definitions.ts. Regenerate: bun run generate:tokens */\n\n@layer oc.tokens {\n /* ---------------------------------------------------------------------------\n * Custom properties (light mode defaults)\n *\n * These are FALLBACK defaults. At runtime, the JS theme engine stamps the\n * resolved theme as inline --oc-* custom properties on each .oc-root\n * container (see packages/vanilla/src/theme-tokens.ts). These CSS values\n * serve as fallbacks for contexts where JS hasn't mounted yet (SSR, static\n * HTML examples).\n * --------------------------------------------------------------------------- */\n\n .oc-root,\n .oc-chart-root,\n .oc-table-wrapper,\n .oc-table-root,\n .oc-graph-wrapper,\n .oc-graph-root,\n .oc-sankey-root,\n .oc-tilemap-root,\n .oc-barlist-root,\n .oc-map-root {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n /* Opt out of iOS text auto-inflation so measured widths match rendered text. */\n -webkit-text-size-adjust: 100%;\n text-size-adjust: 100%;\n\n --oc-font-family:\n \"Inter Variable\", Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n --oc-font-mono: \"JetBrains Mono\", \"Fira Code\", \"Cascadia Code\", monospace;\n\n /* Animation easing presets via CSS linear() */\n --oc-ease-smooth: linear(\n 0,\n 0.157,\n 0.438,\n 0.64,\n 0.766,\n 0.85,\n 0.906,\n 0.941,\n 0.964,\n 0.978,\n 0.988,\n 0.994,\n 0.998,\n 1\n );\n --oc-ease-snappy: linear(\n 0,\n 0.012,\n 0.048,\n 0.108,\n 0.194,\n 0.302,\n 0.426,\n 0.559,\n 0.69,\n 0.808,\n 0.905,\n 0.973,\n 1.013,\n 1.028,\n 1.023,\n 1.006,\n 0.984,\n 0.966,\n 0.957,\n 0.957,\n 0.964,\n 0.975,\n 0.986,\n 0.995,\n 1,\n 1.003,\n 1.002,\n 1,\n 0.998,\n 0.998,\n 0.999,\n 1\n );\n\n /* Animation timing defaults */\n --oc-animation-duration: 450ms;\n --oc-animation-stagger: 30ms;\n --oc-annotation-delay: 150ms;\n\n /* Typography scale (editorial design system) */\n --oc-title-size: 26px;\n --oc-title-weight: 600; /* one ladder: 400 regular / 500 medium / 600 semibold / 700 bold */\n --oc-title-tracking: -0.022em;\n --oc-subtitle-size: 14px;\n --oc-subtitle-weight: 400;\n --oc-source-size: 11px;\n --oc-source-weight: 400;\n --oc-body-size: 13px;\n --oc-eyebrow-size: 11px;\n --oc-eyebrow-weight: 500;\n --oc-eyebrow-tracking: 0.08em;\n\n /* Surfaces (light mode defaults) */\n --oc-bg: #ffffff;\n --oc-card: #ffffff;\n --oc-secondary: #f4f4f5; /* zinc-100, raised surface */\n\n /*\n * Text levels. Names invert across modes: in light mode \"muted\" sits at\n * a lighter zinc step than \"subtle\" because both are picked relative to\n * the active background, not from a fixed lightness ladder. The intent\n * is \"muted = first step away from primary text\"; \"subtle = next step\n * down\"; etc.\n *\n * Light mode: text=zinc-950, secondary=zinc-700, muted=zinc-500,\n * subtle=zinc-400, faint=zinc-300\n * Dark mode (dark.css): inverts the surface tokens but keeps the same\n * muted -> subtle -> faint progression away from primary.\n */\n --oc-text: #09090b;\n --oc-text-secondary: #3f3f46;\n --oc-text-muted: #71717a;\n --oc-text-faint: #d4d4d8;\n\n /*\n * Derived neutral ramp. Named by the share of *text* in a text-toward-\n * background mix: 100 is nearly the background, 800 is nearly the text.\n * These static values are the mix against the default surfaces; mounts\n * restamp them from ResolvedTheme.colors.neutral, which a custom warm or\n * cool theme derives from its own text/background pair.\n */\n --oc-gray-100: #f0f0f0;\n --oc-gray-200: #e1e1e2;\n --oc-gray-300: #c9c9c9;\n --oc-gray-400: #9d9d9d;\n --oc-gray-600: #787879;\n --oc-gray-800: #474748;\n\n /* Lines */\n --oc-gridline: rgba(0, 0, 0, 0.08);\n --oc-axis: rgba(0, 0, 0, 0.14); /* hairline = theme.colors.hairline, not the tick-label ink */\n --oc-border: rgba(0, 0, 0, 0.08);\n --oc-border-radius: 8px; /* containers and tooltips; marks use --oc-radius-sm */\n\n /* Radius ladder */\n --oc-radius-sm: 2px;\n --oc-radius-md: 6px;\n --oc-radius-lg: var(--oc-border-radius);\n --oc-radius-full: 999px;\n\n /* Brand and semantic */\n --oc-accent: #06b6d4;\n --oc-accent-strong: #0891b2; /* darker cyan for line strokes on light bg */\n /* kept equal to DEFAULT_THEME.colors.positive (token-theme-parity test) */\n --oc-positive: #15803d;\n --oc-negative: #dc2626;\n /* delta chip background */\n --oc-positive-tint: color-mix(in srgb, var(--oc-positive) 10%, var(--oc-bg));\n --oc-negative-tint: color-mix(in srgb, var(--oc-negative) 10%, var(--oc-bg));\n --oc-focus: #3b82f6;\n /* static, intentionally NOT derived from --oc-focus and NOT flipped in dark mode */\n --oc-focus-ring: rgba(59, 130, 246, 0.1);\n --oc-focus-ring-strong: rgba(59, 130, 246, 0.25);\n --oc-editable-hover: rgba(79, 70, 229, 0.35); /* edit-mode hover outline, indigo one-off */\n\n /* Spacing scale (4px base) — only --oc-space-2/4 are consumed (JS-stamped) */\n --oc-space-2: 8px;\n --oc-space-4: 16px;\n\n /*\n * Hover language. The hovered element goes to full ink; the rest of its\n * group drops to --oc-hover-dim over --oc-hover-duration. Maps override the\n * dim locally (3000 county paths at 0.3 reads as a blackout, not a hint).\n */\n --oc-hover-dim: 0.3;\n --oc-hover-duration: 140ms;\n --oc-map-hover-dim: 0.75;\n\n /* Interactive states */\n --oc-hover-bg: rgba(0, 0, 0, 0.025);\n --oc-tooltip-bg: rgba(255, 255, 255, 0.88);\n --oc-tooltip-border: rgba(0, 0, 0, 0.08);\n --oc-tooltip-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.12);\n --oc-tooltip-text: #09090b;\n --oc-legend-text: #3f3f46;\n }\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Chrome (eyebrow, title, subtitle, source, byline, footer, brand)\n * --------------------------------------------------------------------------- */\n\n .oc-chrome {\n font-family: var(--oc-font-family);\n }\n\n .oc-eyebrow {\n font-size: var(--oc-eyebrow-size);\n font-weight: var(--oc-eyebrow-weight);\n letter-spacing: var(--oc-eyebrow-tracking);\n text-transform: uppercase;\n fill: var(--oc-accent);\n }\n\n .oc-title {\n font-size: var(--oc-title-size);\n font-weight: var(--oc-title-weight);\n letter-spacing: var(--oc-title-tracking);\n fill: var(--oc-text);\n }\n\n .oc-subtitle {\n font-size: var(--oc-subtitle-size);\n font-weight: var(--oc-subtitle-weight);\n fill: var(--oc-text-muted);\n }\n\n .oc-source,\n .oc-byline,\n .oc-footer {\n font-size: var(--oc-source-size);\n font-weight: var(--oc-source-weight);\n fill: var(--oc-text-muted);\n }\n\n .oc-brand {\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.02em;\n fill: var(--oc-text-faint);\n }\n\n .oc-brand-dot {\n fill: var(--oc-accent);\n }\n\n .oc-eyebrow-dot {\n fill: var(--oc-accent);\n }\n\n /* ---------------------------------------------------------------------------\n * Metric bar (.oc-metrics) — optional row of label/value cells above chart\n * --------------------------------------------------------------------------- */\n\n .oc-metrics {\n font-family: var(--oc-font-family);\n }\n\n .oc-metric-label {\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n fill: var(--oc-text-muted);\n }\n\n .oc-metric-value {\n font-size: 22px;\n font-weight: 600;\n letter-spacing: -0.02em;\n fill: var(--oc-text);\n font-variant-numeric: tabular-nums;\n }\n\n .oc-metric-delta-up {\n fill: var(--oc-positive);\n font-size: 12px;\n font-weight: 500;\n }\n\n .oc-metric-delta-down {\n fill: var(--oc-negative);\n font-size: 12px;\n font-weight: 500;\n }\n\n /* A multiplier or a run-rate is context, not a positive signal: the green\n that belonged here made every secondary read as good news. */\n .oc-metric-secondary {\n fill: var(--oc-text-muted);\n font-size: 12px;\n font-weight: 400;\n }\n\n /* ---------------------------------------------------------------------------\n * Axis tick labels — inline variant sits above each gridline at the\n * chart-area left edge (no left gutter). Used by line/area y-axes.\n * --------------------------------------------------------------------------- */\n\n .oc-axis-tick-inline {\n font-size: 11px;\n font-weight: 400;\n fill: var(--oc-text-muted);\n }\n\n /* ---------------------------------------------------------------------------\n * Endpoint labels (right-side per-series column for line/area charts)\n *\n * Swatch idiom: a thicker colored stroke segment with an optional thinner\n * lighter strip below. Mirrors the refreshed traditional legend swatch so a\n * single chart never shows two swatch idioms (mock-2 alignment). Per-series\n * color is stamped inline by the renderer; CSS tokens here cover the muted\n * value text and the leader line so theme overrides flow through naturally.\n * --------------------------------------------------------------------------- */\n\n .oc-endpoint-labels {\n font-family: var(--oc-font-family);\n }\n\n .oc-endpoint-label {\n /* Color set inline per series; this fallback only kicks in if the renderer\n ever omits the inline fill. */\n fill: var(--oc-endpoint-label-color, var(--oc-text));\n }\n\n .oc-endpoint-value {\n fill: var(--oc-endpoint-value-color, var(--oc-text-muted));\n }\n\n .oc-endpoint-leader {\n stroke: var(--oc-endpoint-leader-color, currentColor);\n }\n\n /* .oc-endpoint-marker — fill/stroke set inline (open-ring style: bg fill, series stroke). */\n /* .oc-endpoint-swatch — color set inline per series. */\n\n /* ---------------------------------------------------------------------------\n * Annotation dot + subtitle (text-annotation extensions)\n * --------------------------------------------------------------------------- */\n\n /* .oc-annotation-dot — fill/stroke resolved by the engine (open-ring default = bg fill, series stroke). */\n\n .oc-annotation-subtitle {\n fill: var(--oc-annotation-subtitle-color, var(--oc-text-muted));\n }\n\n /* ---------------------------------------------------------------------------\n * Table footer chrome\n * --------------------------------------------------------------------------- */\n\n /* Footer row: source/footer text on the left, brand watermark on the right,\n * sharing a single baseline. gap keeps them apart if the row gets narrow. */\n .oc-table-footer-row {\n display: flex;\n align-items: baseline;\n gap: 16px;\n padding: 16px 16px 4px;\n }\n\n /* Chrome block sits inside the flex row now, so it no longer owns the\n * footer's top padding or horizontal inset (the row provides both). */\n .oc-chrome-footer {\n padding-top: 0;\n }\n\n /* Brand watermark: pushed to the right edge (margin-left:auto holds it there\n * even when the source text is absent), never shrinks below its own text. */\n .oc-table-footer-row .oc-table-ref {\n margin-left: auto;\n flex-shrink: 0;\n text-align: right;\n }\n}\n","/* GENERATED FILE — do not edit. Source: packages/core/src/styles/token-definitions.ts. Regenerate: bun run generate:tokens */\n\n@layer oc.tokens {\n /* ---------------------------------------------------------------------------\n * Dark mode overrides (fallback defaults)\n *\n * At runtime, the JS theme engine stamps dark-adapted --oc-* custom\n * properties on each .oc-root container. These CSS values serve as\n * fallbacks for contexts where JS hasn't mounted yet.\n * --------------------------------------------------------------------------- */\n\n .oc-dark {\n /* Surfaces (zinc-based achromatic ramp) */\n --oc-bg: #09090b;\n --oc-card: #111113;\n --oc-secondary: #27272a;\n\n /* Text levels — see tokens.css for the cross-mode naming rationale */\n --oc-text: #f7f8f8;\n --oc-text-secondary: #d0d6e0;\n --oc-text-muted: #a1a1aa;\n --oc-text-faint: #52525b;\n\n /* Lines */\n --oc-gridline: rgba(255, 255, 255, 0.06);\n --oc-axis: rgba(255, 255, 255, 0.14);\n --oc-border: rgba(255, 255, 255, 0.1);\n\n /* Brand and semantic — accent stays cyan (no darkening on dark bg) */\n --oc-accent: #06b6d4;\n --oc-accent-strong: #06b6d4;\n --oc-positive: #4ade80;\n --oc-negative: #f87171;\n --oc-focus: #60a5fa;\n\n /* Interactive states */\n --oc-hover-bg: rgba(255, 255, 255, 0.05);\n --oc-tooltip-bg: rgba(17, 17, 19, 0.92);\n --oc-tooltip-border: rgba(255, 255, 255, 0.08);\n --oc-tooltip-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 1px rgba(0, 0, 0, 0.4);\n --oc-tooltip-text: #f7f8f8;\n --oc-legend-text: #d0d6e0;\n }\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Table base\n * --------------------------------------------------------------------------- */\n\n .oc-table-wrapper {\n font-family: var(--oc-font-family);\n color: var(--oc-text);\n background: var(--oc-bg);\n\n & > .oc-chrome {\n margin-bottom: 16px;\n padding-left: 16px;\n padding-right: 16px;\n }\n\n & > .oc-chrome:first-child {\n padding-top: 4px;\n }\n\n & table {\n width: 100%;\n border-collapse: collapse;\n }\n\n & th,\n & td {\n /* 12 + 24 + 12 = 48px rows. Condensed and relaxed keep the same\n line box and change only the padding, so the ladder is 40/48/56. */\n padding: 12px 16px;\n line-height: 24px;\n text-align: left;\n border-bottom: 1px solid var(--oc-border);\n /* Column widths from the engine already sum to the container width;\n without border-box the padding pushes each cell wider than its\n computed width and auto layout rescales the whole row. */\n box-sizing: border-box;\n }\n\n & th {\n font-weight: 500;\n font-size: 12px;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--oc-text-muted);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n }\n\n & thead {\n position: sticky;\n top: 0;\n z-index: 2;\n background: var(--oc-bg);\n }\n\n /* A hairline, like every other rule in the table. The old 2px header rule\n was the heaviest line on the page and drew the eye away from the data. */\n & thead th {\n border-bottom-width: 1px;\n }\n\n & td {\n font-size: 14px;\n font-variant-numeric: tabular-nums;\n }\n\n & th:focus {\n outline: 2px solid var(--oc-focus);\n outline-offset: -2px;\n }\n\n & tbody:focus {\n outline: none;\n }\n }\n\n .oc-table-title {\n margin-bottom: 4px;\n font-size: var(--oc-title-computed-size, var(--oc-title-size));\n font-weight: var(--oc-title-computed-weight, var(--oc-title-weight));\n color: var(--oc-title-computed-color, var(--oc-text));\n }\n\n .oc-table-subtitle {\n margin-bottom: 8px;\n font-size: var(--oc-subtitle-computed-size, var(--oc-subtitle-size));\n font-weight: var(--oc-subtitle-computed-weight, var(--oc-subtitle-weight));\n color: var(--oc-subtitle-computed-color, var(--oc-text-secondary));\n }\n\n .oc-table-source {\n font-size: var(--oc-source-computed-size, var(--oc-source-size));\n color: var(--oc-source-computed-color, var(--oc-text-muted));\n }\n\n .oc-table-footer-text {\n font-size: var(--oc-footer-computed-size, var(--oc-source-size));\n color: var(--oc-footer-computed-color, var(--oc-text-muted));\n }\n\n .oc-table-scroll {\n overflow-x: auto;\n }\n\n /* ---------------------------------------------------------------------------\n * Sticky first column\n * --------------------------------------------------------------------------- */\n\n .oc-table--sticky {\n & th:first-child,\n & td:first-child {\n position: sticky;\n left: 0;\n z-index: 1;\n background: var(--oc-bg);\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Sort controls\n * --------------------------------------------------------------------------- */\n\n .oc-table-sort-btn {\n background: none;\n border: none;\n cursor: pointer;\n padding: 2px;\n margin-left: 6px;\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n vertical-align: middle;\n gap: 2px;\n\n &::before,\n &::after {\n content: \"\";\n display: block;\n width: 0;\n height: 0;\n border-left: 5px solid transparent;\n border-right: 5px solid transparent;\n transition:\n opacity 0.15s,\n border-color 0.15s;\n }\n\n &::before {\n border-bottom: 4.5px solid var(--oc-text-secondary);\n opacity: 0.35;\n }\n\n &::after {\n border-top: 4.5px solid var(--oc-text-secondary);\n opacity: 0.35;\n }\n\n &:hover::before,\n &:hover::after {\n opacity: 0.75;\n }\n }\n\n th[aria-sort=\"ascending\"] .oc-table-sort-btn {\n &::before {\n opacity: 1;\n border-bottom-color: var(--oc-text);\n }\n\n &::after {\n opacity: 0.15;\n }\n }\n\n th[aria-sort=\"descending\"] .oc-table-sort-btn {\n &::after {\n opacity: 1;\n border-top-color: var(--oc-text);\n }\n\n &::before {\n opacity: 0.15;\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Search\n * --------------------------------------------------------------------------- */\n\n /* Shared search-input skin (table + series-search).\n Padding excluded: it diverges (table: 8px 12px; series: 0 10px 0 28px)\n and series-search.css is imported before table.css — a padding declaration\n here would beat the series-search override by source order. */\n .oc-table-search input,\n .oc-series-search-input {\n width: 100%;\n border: 1px solid var(--oc-border);\n border-radius: var(--oc-radius-md);\n font-size: 13px;\n font-family: inherit;\n background: var(--oc-bg);\n color: var(--oc-text);\n box-sizing: border-box;\n transition: border-color 0.15s;\n }\n\n .oc-table-search input::placeholder,\n .oc-series-search-input::placeholder {\n color: var(--oc-text-muted);\n font-size: 13px;\n }\n\n .oc-table-search input:focus,\n .oc-series-search-input:focus {\n outline: none;\n border-color: var(--oc-focus);\n box-shadow: 0 0 0 3px var(--oc-focus-ring);\n }\n\n .oc-table-search {\n padding: 8px 0;\n\n & input {\n padding: 8px 12px;\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Pagination\n * --------------------------------------------------------------------------- */\n\n .oc-table-pagination {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 0 4px;\n font-size: 13px;\n color: var(--oc-text-secondary);\n\n & button {\n padding: 6px 14px;\n border: 1px solid var(--oc-border);\n border-radius: var(--oc-radius-md);\n background: var(--oc-bg);\n color: var(--oc-text);\n cursor: pointer;\n font-size: 13px;\n font-family: inherit;\n transition:\n background 0.15s,\n border-color 0.15s;\n\n &:disabled {\n opacity: 0.35;\n cursor: not-allowed;\n }\n\n &:hover:not(:disabled) {\n background: var(--oc-hover-bg);\n border-color: var(--oc-axis);\n }\n\n &:focus-visible {\n outline: 2px solid var(--oc-focus);\n outline-offset: 1px;\n }\n }\n }\n\n .oc-table-pagination-info {\n font-variant-numeric: tabular-nums;\n }\n\n .oc-table-pagination-btns {\n display: flex;\n gap: 8px;\n }\n\n /* ---------------------------------------------------------------------------\n * Bar cells\n * --------------------------------------------------------------------------- */\n\n .oc-table-bar {\n position: relative;\n }\n\n .oc-table-bar-fill {\n position: absolute;\n top: 8px;\n left: 0;\n bottom: 8px;\n border-radius: var(--oc-radius-sm);\n opacity: 0.18;\n pointer-events: none;\n }\n\n .oc-table-bar-value {\n position: relative;\n z-index: 1;\n }\n\n /* ---------------------------------------------------------------------------\n * Sparkline cells\n * --------------------------------------------------------------------------- */\n\n .oc-table-sparkline {\n display: block;\n width: 100%;\n position: relative;\n\n & svg {\n display: block;\n width: 100%;\n overflow: visible;\n }\n }\n\n .oc-table-sparkline-dot {\n position: absolute;\n border-radius: 50%;\n width: 5px;\n height: 5px;\n }\n\n .oc-table-sparkline-labels {\n display: flex;\n justify-content: space-between;\n font-size: 11px;\n line-height: 1;\n }\n\n /* ---------------------------------------------------------------------------\n * Image cells\n * --------------------------------------------------------------------------- */\n\n .oc-table-image {\n display: inline-block;\n vertical-align: middle;\n\n & img {\n object-fit: cover;\n }\n }\n\n .oc-table-image-rounded img {\n border-radius: 50%;\n }\n\n /* ---------------------------------------------------------------------------\n * Flag cells\n * --------------------------------------------------------------------------- */\n\n .oc-table-flag {\n font-size: 1.2em;\n }\n\n /* ---------------------------------------------------------------------------\n * Density\n *\n * regular 48px rows (base), condensed 40px, relaxed 56px. `.oc-table--compact`\n * is the deprecated alias for condensed, kept one release.\n * --------------------------------------------------------------------------- */\n\n .oc-table--condensed,\n .oc-table--compact {\n & th,\n & td {\n padding: 8px 12px;\n line-height: 24px;\n font-size: 13px;\n }\n\n & th {\n font-size: 11px;\n }\n\n & .oc-table-bar-fill {\n top: 5px;\n bottom: 5px;\n }\n }\n\n .oc-table--relaxed {\n & th,\n & td {\n padding: 16px 20px;\n line-height: 24px;\n }\n\n & .oc-table-bar-fill {\n top: 12px;\n bottom: 12px;\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Striping\n * --------------------------------------------------------------------------- */\n\n .oc-table--striped tbody tr:nth-child(even) {\n background: color-mix(in srgb, var(--oc-text) 3%, transparent);\n }\n\n /* ---------------------------------------------------------------------------\n * Delta chips\n * --------------------------------------------------------------------------- */\n\n .oc-table-delta {\n display: inline-flex;\n align-items: baseline;\n gap: 4px;\n padding: 2px 8px;\n border-radius: var(--oc-radius-md);\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n line-height: 16px;\n }\n\n .oc-table-delta-arrow {\n font-size: 0.8em;\n line-height: 1;\n }\n\n .oc-table-delta--positive {\n color: var(--oc-positive);\n background: var(--oc-positive-tint);\n }\n\n .oc-table-delta--negative {\n color: var(--oc-negative);\n background: var(--oc-negative-tint);\n }\n\n .oc-table-delta--neutral {\n color: var(--oc-text-muted);\n background: color-mix(in srgb, var(--oc-text) 6%, transparent);\n }\n\n /* Category chips: the engine supplies the tint, ink and dot color inline. */\n .oc-table-chip {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 2px 8px;\n border-radius: var(--oc-radius-full);\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n white-space: nowrap;\n }\n\n .oc-table-chip-dot {\n flex: none;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n }\n\n /* ---------------------------------------------------------------------------\n * Totals footer\n * --------------------------------------------------------------------------- */\n\n tfoot.oc-table-total {\n position: sticky;\n bottom: 0;\n z-index: 2;\n background: var(--oc-bg);\n\n & td {\n font-weight: 600;\n border-bottom: none;\n border-top: 1px solid var(--oc-border);\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Cards mode (below 400px)\n *\n * Rows become two-column grids with the header printed per cell. `display:\n * grid` drops the implicit table roles, so the renderer stamps explicit ARIA\n * roles on every element; `display: contents` is deliberately NOT used —\n * it removes the row box the grid needs and breaks the semantics further.\n * --------------------------------------------------------------------------- */\n\n .oc-table--cards {\n & .oc-table-scroll {\n overflow-x: hidden;\n }\n\n & table {\n table-layout: fixed;\n }\n\n & thead {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n }\n\n & tbody tr,\n & tfoot tr {\n display: grid;\n /* Two equal halves keep every label/value pair the same width; an\n auto first column makes the third cell in a row narrower than the\n second and the card reads ragged. */\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 2px 12px;\n align-items: baseline;\n padding: 10px 12px;\n border-bottom: 1px solid var(--oc-border);\n }\n\n & td {\n display: block;\n width: auto;\n max-width: 100%;\n padding: 0;\n border-bottom: none;\n overflow-wrap: anywhere;\n text-align: right;\n }\n\n & td::before {\n content: attr(data-label);\n display: block;\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--oc-text-muted);\n text-align: left;\n }\n\n /* A column with no header (flags, logos) prints no label either. */\n & td[data-label=\"\"]::before {\n content: none;\n }\n\n /* Priority 1 leads the card on its own line, label suppressed. */\n & td[data-priority=\"1\"] {\n grid-column: 1 / -1;\n font-size: 15px;\n font-weight: 600;\n text-align: left;\n }\n\n & td[data-priority=\"1\"]::before {\n content: none;\n }\n\n & td[data-priority=\"3\"] {\n display: none;\n }\n\n & .oc-table-sparkline {\n width: 100%;\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Row hover (when onRowClick is set)\n * --------------------------------------------------------------------------- */\n\n .oc-table--clickable tbody {\n & tr {\n cursor: pointer;\n }\n\n & tr:hover {\n background: var(--oc-hover-bg);\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Keyboard cell focus indicator\n * --------------------------------------------------------------------------- */\n\n .oc-table-cell-focus {\n outline: 2px solid var(--oc-focus);\n outline-offset: -2px;\n }\n\n /* ---------------------------------------------------------------------------\n * Empty state\n * --------------------------------------------------------------------------- */\n\n .oc-table-empty {\n padding: 32px 16px;\n text-align: center;\n color: var(--oc-text-secondary);\n font-size: 14px;\n font-style: italic;\n }\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Sankey\n *\n * Hovering a node (or a link) traces the whole path through it: everything\n * upstream and everything downstream stays lit, the rest drops back. The mount\n * writes the opacities; this file only owns how they move, using the shared\n * hover duration so a sankey fades on the same clock as a bar chart.\n *\n * The transitions are switched off during the entrance (`.oc-animate`), where\n * the keyframes own opacity and a competing transition would smear them.\n * --------------------------------------------------------------------------- */\n\n .oc-sankey:not(.oc-animate) .oc-sankey-link path {\n transition: fill-opacity var(--oc-hover-duration) ease-out;\n }\n\n .oc-sankey:not(.oc-animate) .oc-sankey-node,\n .oc-sankey:not(.oc-animate) .oc-sankey-label {\n transition: opacity var(--oc-hover-duration) ease-out;\n }\n\n /* Labels are decoration over the flow: never a text cursor, never a selection\n * drag that eats the hover. */\n .oc-sankey-label {\n pointer-events: none;\n user-select: none;\n }\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Tooltip\n * Editorial card matching the new design system: zinc surface, cyan accent,\n * Inter Variable, mono numerics. Sized for a slice tooltip that lists every\n * series at the snapped x.\n * --------------------------------------------------------------------------- */\n\n .oc-tooltip {\n position: absolute;\n display: none;\n pointer-events: none;\n z-index: 1000;\n background: var(--oc-tooltip-bg);\n backdrop-filter: blur(14px);\n border: 1px solid var(--oc-tooltip-border);\n border-radius: var(--oc-radius-lg);\n box-shadow: var(--oc-tooltip-shadow);\n color: var(--oc-tooltip-text);\n font-family: var(--oc-font-family);\n font-size: 12px;\n padding: 0;\n max-width: 280px;\n min-width: 140px;\n line-height: 1.4;\n animation: oc-tooltip-in 120ms ease-out;\n transition:\n left 100ms ease-in-out,\n top 100ms ease-in-out;\n\n & .oc-tooltip-header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 10px 6px;\n }\n\n & .oc-tooltip-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n }\n\n & .oc-tooltip-title {\n font-weight: 600;\n font-size: 11px;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--oc-text-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n & .oc-tooltip-body {\n padding: 6px 10px 8px;\n border-top: 1px solid var(--oc-tooltip-border);\n }\n\n /* No separator when body is the only child */\n & .oc-tooltip-body:first-child {\n border-top: none;\n padding-top: 10px;\n }\n\n & .oc-tooltip-row {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 16px;\n padding: 2px 0;\n }\n\n & .oc-tooltip-row-swatch {\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n margin-right: 6px;\n flex-shrink: 0;\n transform: translateY(-1px);\n }\n\n & .oc-tooltip-label {\n color: var(--oc-text-secondary);\n font-size: 12px;\n font-weight: 400;\n white-space: nowrap;\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n }\n\n & .oc-tooltip-value {\n font-weight: 500;\n font-size: 12px;\n font-variant-numeric: tabular-nums;\n color: var(--oc-tooltip-text);\n text-align: right;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n /* The series the pointer is nearest to in a shared tooltip. */\n & .oc-tooltip-row--emphasis .oc-tooltip-label {\n color: var(--oc-tooltip-text);\n font-weight: 600;\n }\n\n & .oc-tooltip-row--emphasis .oc-tooltip-value {\n font-weight: 600;\n }\n\n /* Stack sum, set below a hairline so it reads as a summary of the rows\n * above rather than one more series. */\n & .oc-tooltip-row--total {\n margin-top: 4px;\n padding-top: 5px;\n border-top: 1px solid var(--oc-tooltip-border);\n }\n\n & .oc-tooltip-row--total .oc-tooltip-label {\n color: var(--oc-tooltip-text);\n font-weight: 500;\n }\n\n & .oc-tooltip-row--total .oc-tooltip-value {\n font-weight: 600;\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Crosshair guideline + per-series snap dots (line/area charts)\n * Animate the snap between adjacent points so the indicator slides instead\n * of jumping. ~50ms ease-in-out keeps the motion crisp without lagging.\n * --------------------------------------------------------------------------- */\n\n .oc-crosshair {\n pointer-events: none;\n transition:\n x1 50ms ease-in-out,\n x2 50ms ease-in-out;\n }\n\n .oc-snap-dots circle {\n pointer-events: none;\n transition:\n cx 50ms ease-in-out,\n cy 50ms ease-in-out;\n }\n}\n","@layer oc.base {\n /* ---------------------------------------------------------------------------\n * Wrapper roots\n * --------------------------------------------------------------------------- */\n\n .oc-chart-root {\n width: 100%;\n height: 100%;\n }\n\n .oc-table-root,\n .oc-graph-root,\n .oc-sankey-root,\n .oc-barlist-root,\n .oc-tilemap-root,\n .oc-map-root {\n width: 100%;\n height: 100%;\n }\n\n .oc-table-root {\n overflow: auto;\n }\n\n /* ---------------------------------------------------------------------------\n * Chart container\n * --------------------------------------------------------------------------- */\n\n .oc-chart {\n font-family: var(--oc-font-family);\n font-variant-numeric: tabular-nums;\n display: block;\n width: 100%;\n }\n\n /* ---------------------------------------------------------------------------\n * BarList SVG container\n * --------------------------------------------------------------------------- */\n\n .oc-tilemap,\n .oc-map {\n display: block;\n width: 100%;\n height: auto;\n }\n\n .oc-map-feature {\n transition:\n opacity var(--oc-hover-duration) ease-out,\n stroke-width 140ms ease-out;\n }\n\n .oc-barlist {\n display: block;\n width: 100%;\n }\n\n /* ---------------------------------------------------------------------------\n * Screen reader only utility\n * --------------------------------------------------------------------------- */\n\n /* `overflow: clip`, not `hidden` — see applySrOnlyStyles in\n packages/vanilla/src/dom-helpers.ts for why. Keep the two in sync. */\n .oc-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: clip;\n clip-path: inset(50%);\n white-space: nowrap;\n border-width: 0;\n }\n\n /* ---------------------------------------------------------------------------\n * Editable hover feedback\n * --------------------------------------------------------------------------- */\n\n .oc-editable-hover {\n outline: 1.5px solid var(--oc-editable-hover);\n outline-offset: 2px;\n border-radius: var(--oc-radius-sm);\n }\n\n /* ---------------------------------------------------------------------------\n * Keyboard focus indicators\n *\n * --oc-focus carries a light value in tokens.css and a dark value in\n * dark.css, so both rings stay visible in either mode.\n * --------------------------------------------------------------------------- */\n\n /* Container ring when the chart itself receives keyboard focus. */\n .oc-root:focus-visible {\n outline: 2px solid var(--oc-focus);\n outline-offset: 2px;\n }\n\n /* Mark ring during arrow-key navigation (see wireKeyboardNav). Outline on\n * SVG elements draws around the mark's bounding box, same technique as\n * .oc-editable-hover above. */\n .oc-mark-focused {\n outline: 2px solid var(--oc-focus);\n outline-offset: 1px;\n border-radius: var(--oc-radius-sm);\n }\n}\n","@layer oc.animation {\n /* ---------------------------------------------------------------------------\n * Table entrance animations (.oc-table-wrapper.oc-animate)\n * --------------------------------------------------------------------------- */\n\n .oc-table-wrapper.oc-animate {\n /* Chrome (title/subtitle): fade + slide up */\n & > .oc-chrome {\n animation: oc-enter-fade calc(var(--oc-animation-duration) * 0.6)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n }\n\n /* Table header: quick fade before rows start */\n & thead {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.4)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n }\n\n /* Row entrance: slide up only, no opacity (cells handle their own fading\n to avoid opacity compounding between row and cell animations) */\n & tbody tr {\n animation: oc-table-enter-row var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-row-index, 0));\n }\n\n /* Cell text: fade in synced with row slide */\n & tbody td {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.5)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-row-index, 0));\n }\n\n /* Heatmap/category cell backgrounds: longer fade, delayed after row appears */\n & td.oc-table-heatmap,\n & td.oc-table-category {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.7)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(\n var(--oc-animation-stagger) *\n var(--oc-row-index, 0) +\n var(--oc-animation-duration) *\n 0.3\n );\n }\n\n /* Bar fill: clip-path grow only (no opacity change to preserve resting\n opacity: 0.15 from table.css) */\n & .oc-table-bar-fill {\n animation: oc-table-enter-bar-fill calc(var(--oc-animation-duration) * 0.8)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(\n var(--oc-animation-stagger) *\n var(--oc-row-index, 0) +\n var(--oc-animation-duration) *\n 0.3\n );\n }\n\n /* Sparkline SVG: clip-path reveal left-to-right. Targets the SVG directly\n (not the wrapper) to avoid clipping absolutely-positioned dots and labels. */\n & .oc-table-sparkline > svg {\n animation: oc-enter-line calc(var(--oc-animation-duration) * 0.8)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(\n var(--oc-animation-stagger) *\n var(--oc-row-index, 0) +\n var(--oc-animation-duration) *\n 0.4\n );\n }\n\n /* Sparkline dots and labels: fade in after the line draws through */\n & .oc-table-sparkline-dot,\n & .oc-table-sparkline-labels {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.3)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(\n var(--oc-animation-stagger) *\n var(--oc-row-index, 0) +\n var(--oc-animation-duration) *\n 0.8\n );\n }\n\n /* Search and pagination: quick fade on mount */\n & .oc-table-search,\n & .oc-table-pagination {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.5)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n }\n }\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Graph\n * --------------------------------------------------------------------------- */\n\n .oc-graph-wrapper {\n position: relative;\n overflow: hidden;\n background: var(--oc-bg);\n font-family: var(--oc-font-family);\n width: 100%;\n height: 100%;\n }\n\n .oc-graph-canvas {\n display: block;\n width: 100%;\n height: 100%;\n cursor: grab;\n }\n\n .oc-graph-canvas--dragging {\n cursor: grabbing;\n }\n\n /* 3D surface. 3d-force-graph builds its own `div.scene-container` inside the\n * element it is handed and sizes the WebGL canvas imperatively, so the slot\n * has to fill the same box the 2D canvas fills or the first measurement is\n * zero-height. */\n .oc-graph-3d,\n .oc-graph-3d .scene-container {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .oc-graph-3d {\n cursor: grab;\n }\n\n .oc-graph-3d .scene-container canvas {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .oc-graph-chrome {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n z-index: 2;\n padding: 16px 16px 8px;\n pointer-events: none;\n\n & .oc-title {\n font-size: var(--oc-title-size);\n font-weight: var(--oc-title-weight);\n letter-spacing: var(--oc-title-tracking);\n color: var(--oc-text);\n margin: 0 0 4px;\n --_stroke: color-mix(in srgb, var(--oc-bg) 80%, transparent);\n text-shadow:\n -2px -2px 0 var(--_stroke),\n 2px -2px 0 var(--_stroke),\n -2px 2px 0 var(--_stroke),\n 2px 2px 0 var(--_stroke),\n 0 -2px 0 var(--_stroke),\n 0 2px 0 var(--_stroke),\n -2px 0 0 var(--_stroke),\n 2px 0 0 var(--_stroke);\n }\n\n & .oc-subtitle {\n font-size: var(--oc-subtitle-size);\n color: var(--oc-text-secondary);\n margin: 0;\n --_stroke: color-mix(in srgb, var(--oc-bg) 80%, transparent);\n text-shadow:\n -1px -1px 0 var(--_stroke),\n 1px -1px 0 var(--_stroke),\n -1px 1px 0 var(--_stroke),\n 1px 1px 0 var(--_stroke);\n }\n }\n\n .oc-graph-legend {\n position: absolute;\n top: 12px;\n right: 12px;\n /* Slightly translucent so the graph reads as continuous underneath, in\n * whatever surface the mount stamped on the wrapper. */\n background: color-mix(in srgb, var(--oc-bg) 88%, transparent);\n border: 1px solid var(--oc-border);\n border-radius: var(--oc-radius-lg);\n padding: 8px 12px;\n font-size: 12px;\n color: var(--oc-text-secondary);\n max-height: 200px;\n overflow-y: auto;\n }\n\n .oc-graph-legend-item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n /* Button reset for interactive rows (rendered as <button>). */\n width: 100%;\n margin: 0;\n background: none;\n border: none;\n font: inherit;\n color: inherit;\n text-align: left;\n cursor: default;\n }\n\n /* Interactive legend rows are buttons; give them affordance + a focus ring. */\n button.oc-graph-legend-item {\n cursor: pointer;\n border-radius: var(--oc-radius-sm);\n\n &:hover {\n background: var(--oc-focus-ring);\n }\n\n &:focus-visible {\n outline: 2px solid var(--oc-focus);\n outline-offset: 1px;\n }\n }\n\n /* De-emphasized (toggled-off) category. */\n .oc-graph-legend-item--inactive {\n opacity: 0.45;\n }\n\n .oc-graph-legend-label {\n flex: 1 1 auto;\n }\n\n .oc-graph-legend-count {\n color: var(--oc-text-secondary);\n font-variant-numeric: tabular-nums;\n margin-left: auto;\n padding-left: 8px;\n }\n\n .oc-graph-legend-swatch {\n width: 10px;\n height: 10px;\n border-radius: 50%;\n flex-shrink: 0;\n }\n\n /* Edge-legend swatches render as a short line, not a dot. */\n .oc-graph-legend-swatch--line {\n width: 12px;\n height: 3px;\n border-radius: 1px;\n }\n\n .oc-graph-search {\n position: absolute;\n top: 12px;\n left: 12px;\n\n & input {\n font-family: var(--oc-font-family);\n font-size: var(--oc-body-size);\n padding: 6px 10px;\n border: 1px solid var(--oc-border);\n border-radius: var(--oc-radius-md);\n background: color-mix(in srgb, var(--oc-bg) 88%, transparent);\n color: var(--oc-text);\n outline: none;\n\n &:focus {\n border-color: var(--oc-focus);\n box-shadow: 0 0 0 2px var(--oc-focus-ring-strong);\n }\n }\n }\n\n /*\n * No dark-mode canvas override lives here. graph-mount stamps the resolved\n * theme surface on the wrapper (--oc-bg), so dark graphs sit on the same\n * --oc-bg the rest of the library uses instead of a private GitHub-dark hex,\n * and the legend/search panels mix against whatever that surface is.\n */\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Legend\n * --------------------------------------------------------------------------- */\n\n /* Font size and text fill are set inline by the renderer's applyTextStyle\n * from the engine-computed legend layout, which is authoritative (11px).\n * Only the family, which nothing computes per-entry, lives here. */\n .oc-legend {\n font-family: var(--oc-font-family);\n }\n\n .oc-legend-entry {\n cursor: default;\n }\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Hover language\n *\n * One vocabulary for mark hover, legend hover and the crosshair. Emphasis is\n * always a CLASS, never an inline style: a class beats the renderer's\n * `opacity` attributes (suppressed points under endpoint markers keep their\n * opacity=\"0\") and loses to the transition driver's per-frame inline\n * `style.opacity`, which is exactly the precedence a hover during a data\n * update needs.\n * --------------------------------------------------------------------------- */\n\n .oc-marks.oc-hover-active .oc-mark--dim:not([opacity=\"0\"]) {\n opacity: var(--oc-hover-dim);\n }\n\n /* Single-series register: outline the hovered mark instead of dimming eleven\n * others. Scoped per mark type -- an inherited stroke on a line or area group\n * would repaint the series in the text color. */\n .oc-marks.oc-hover-active .oc-mark-rect.oc-mark--hover > *,\n .oc-marks.oc-hover-active .oc-mark-arc.oc-mark--hover > *,\n .oc-marks.oc-hover-active circle.oc-mark-point.oc-mark--hover {\n stroke: var(--oc-text);\n stroke-width: 1;\n }\n\n /* The fade is switched off while the rAF transition driver owns opacity: an\n * unscoped 140ms transition would smear every frame of an update tween.\n * `.oc-animate` is excluded for the same reason during the entrance.\n *\n * It is NOT scoped to `.oc-hover-active`: dropping the class on mouseleave\n * would drop the transition with it, so the dim faded in and snapped back. */\n .oc-chart:not(.oc-animate):not(.oc-transitioning) .oc-marks .oc-mark {\n transition: opacity var(--oc-hover-duration) ease-out;\n }\n\n /* ---------------------------------------------------------------------------\n * Legend hover-link\n *\n * The swatch dims; the label text stays at full contrast so the list is still\n * readable while one series is raised.\n * --------------------------------------------------------------------------- */\n\n .oc-legend-entry--dim .oc-legend-swatch-line,\n .oc-legend-entry--dim .oc-legend-swatch-rect,\n .oc-legend-entry--dim > circle {\n opacity: var(--oc-hover-dim);\n transition: opacity var(--oc-hover-duration) ease-out;\n }\n\n .oc-legend-hit {\n fill: transparent;\n }\n\n .oc-legend-entry:focus {\n outline: none;\n }\n\n /* Focus ring on the 24px hit rect, drawn as a stroke: `outline` on an SVG\n * group is inconsistent across browsers, a stroke is not. */\n .oc-legend-entry:focus-visible .oc-legend-hit {\n stroke: var(--oc-focus);\n stroke-width: 2;\n }\n\n /* ---------------------------------------------------------------------------\n * Endpoint-label hover-link\n * --------------------------------------------------------------------------- */\n\n .oc-endpoint-label-entry {\n cursor: default;\n }\n\n /* ---------------------------------------------------------------------------\n * Map hover\n *\n * Feature hover is outline + raise, never dim-the-rest: toggling opacity on\n * three thousand county paths every time the pointer crosses a border is a\n * repaint storm, and the wave of fades reads as a flicker. Datawrapper and the\n * FT outline too. `non-scaling-stroke` keeps the outline 1.5px through the\n * camera's zoom transform, which otherwise scales stroke width with geometry.\n * --------------------------------------------------------------------------- */\n\n .oc-map-feature--hover {\n stroke: var(--oc-text);\n stroke-width: 1.5;\n vector-effect: non-scaling-stroke;\n }\n\n /* Legend-bin hover IS where dim-the-rest belongs: pointing at one class is a\n * deliberate \"show me these\" gesture, and the answer is the set of features in\n * that class. Static rules per class index keep it to one attribute write on\n * the group rather than a class toggle per feature. */\n .oc-map-features[data-hover] .oc-map-feature {\n transition: opacity var(--oc-hover-duration) ease-out;\n }\n\n .oc-map-features[data-hover=\"0\"] .oc-map-feature:not([data-bin-index=\"0\"]),\n .oc-map-features[data-hover=\"1\"] .oc-map-feature:not([data-bin-index=\"1\"]),\n .oc-map-features[data-hover=\"2\"] .oc-map-feature:not([data-bin-index=\"2\"]),\n .oc-map-features[data-hover=\"3\"] .oc-map-feature:not([data-bin-index=\"3\"]),\n .oc-map-features[data-hover=\"4\"] .oc-map-feature:not([data-bin-index=\"4\"]),\n .oc-map-features[data-hover=\"5\"] .oc-map-feature:not([data-bin-index=\"5\"]),\n .oc-map-features[data-hover=\"6\"] .oc-map-feature:not([data-bin-index=\"6\"]),\n .oc-map-features[data-hover=\"7\"] .oc-map-feature:not([data-bin-index=\"7\"]),\n .oc-map-features[data-hover=\"8\"] .oc-map-feature:not([data-bin-index=\"8\"]),\n .oc-map-features[data-hover=\"9\"] .oc-map-feature:not([data-bin-index=\"9\"]),\n .oc-map-features[data-hover=\"10\"] .oc-map-feature:not([data-bin-index=\"10\"]),\n .oc-map-features[data-hover=\"11\"] .oc-map-feature:not([data-bin-index=\"11\"]) {\n opacity: var(--oc-map-hover-dim);\n }\n\n .oc-legend-bin {\n cursor: default;\n }\n\n /* ---------------------------------------------------------------------------\n * Tile hover\n *\n * A tile grid is 51 rects, not 3000 paths, and every tile is the same size --\n * so here the full hover language applies: the hovered tile takes an outline\n * and the rest drop back.\n * --------------------------------------------------------------------------- */\n\n .oc-tilemap-tiles.oc-hover-active .oc-tilemap-tile {\n transition: opacity var(--oc-hover-duration) ease-out;\n }\n\n .oc-tilemap-tiles.oc-hover-active .oc-tilemap-tile:not(.oc-tilemap-tile--hover) {\n opacity: var(--oc-hover-dim);\n }\n\n .oc-tilemap-tile--hover > rect {\n stroke: var(--oc-text);\n stroke-width: 1.5;\n }\n}\n","@layer oc.components {\n /**\n * Sparkline display mode.\n *\n * Stamped on the SVG root as data-display=\"sparkline\" by the renderer when\n * the spec sets display: 'sparkline'. Strips any inherited padding/margin\n * so the mark renders truly edge-to-edge in tight container layouts (KPI\n * cards, table cells, dashboard tiles).\n */\n\n .oc-chart[data-display=\"sparkline\"] {\n display: block;\n margin: 0;\n padding: 0;\n }\n\n /**\n * Data-arrival pulse. The update driver stamps `oc-pulse` on the sparkline's\n * terminator dot when a transition finishes and strips it 600ms later.\n * Deliberately not scoped under `.oc-animate`: that class only exists during\n * the entrance window, and this fires on updates.\n */\n .oc-chart[data-display=\"sparkline\"] .oc-pulse {\n animation: oc-pulse 600ms ease-out;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .oc-chart[data-display=\"sparkline\"] .oc-pulse {\n animation: none;\n }\n }\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Series search (seriesSearch)\n *\n * DOM combobox overlaid on the SVG band the engine reserves below chrome.\n * The wrapper is absolutely positioned by the vanilla adapter (inline\n * left/top/width/height), so everything here is visual only. All colors come\n * from --oc-* tokens, which flip in .oc-dark.\n * --------------------------------------------------------------------------- */\n\n .oc-series-search {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n font-family: var(--oc-font-family);\n z-index: 10;\n }\n\n /* Chips: removable filter tokens for the current selection. They flow to the\n * left of the input and scroll horizontally rather than wrapping over the\n * chart when a reader picks many series. */\n .oc-series-search-chips {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n overflow-x: auto;\n scrollbar-width: none;\n }\n\n .oc-series-search-chips::-webkit-scrollbar {\n display: none;\n }\n\n .oc-series-search-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 4px 3px 10px;\n border: 1px solid var(--oc-border);\n border-radius: var(--oc-radius-full);\n background: var(--oc-secondary);\n color: var(--oc-text-secondary);\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n white-space: nowrap;\n }\n\n .oc-series-search-chip-remove {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n /* 16px glyph, but a >=24px hit area (WCAG 2.5.5 target size) via padding\n pulled back with negative margin so the chip layout stays tight. */\n width: 16px;\n height: 16px;\n padding: 4px;\n margin: -4px -2px -4px -4px;\n border: none;\n border-radius: 50%;\n background: transparent;\n color: var(--oc-text-muted);\n cursor: pointer;\n transition:\n color 0.15s,\n background-color 0.15s;\n }\n\n .oc-series-search-chip-remove:hover {\n color: var(--oc-text);\n background: var(--oc-hover-bg);\n }\n\n .oc-series-search-chip-remove:focus-visible {\n outline: 2px solid var(--oc-focus);\n outline-offset: 1px;\n }\n\n .oc-series-search-chip-remove svg {\n display: block;\n }\n\n /* Combobox: input + popup listbox. Styling matches the table search input\n * (border, radius, focus ring) so the two search surfaces read as one system. */\n .oc-series-search-box {\n position: relative;\n flex: 0 1 220px;\n min-width: 120px;\n }\n\n .oc-series-search-icon {\n position: absolute;\n left: 9px;\n top: 50%;\n transform: translateY(-50%);\n color: var(--oc-text-muted);\n pointer-events: none;\n }\n\n /* Shared skin provided by the grouped rule in table.css.\n Only divergent props live here. */\n .oc-series-search-input {\n height: 32px;\n padding: 0 10px 0 28px;\n }\n\n .oc-series-search-listbox {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n min-width: 100%;\n max-height: 240px;\n overflow-y: auto;\n margin: 0;\n padding: 4px;\n list-style: none;\n border: 1px solid var(--oc-border);\n border-radius: var(--oc-radius-lg);\n background: var(--oc-card);\n box-shadow: var(--oc-tooltip-shadow);\n z-index: 20;\n }\n\n .oc-series-search-option {\n padding: 6px 10px;\n border-radius: var(--oc-radius-sm);\n font-size: 13px;\n color: var(--oc-text);\n cursor: pointer;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .oc-series-search-option[aria-selected=\"true\"],\n .oc-series-search-option:hover {\n background: var(--oc-hover-bg);\n }\n\n /* The typed substring within each suggestion. */\n .oc-series-search-match {\n font-weight: 600;\n }\n\n .oc-series-search-empty {\n padding: 6px 10px;\n font-size: 12px;\n color: var(--oc-text-muted);\n }\n}\n","@layer oc.animation {\n /* ---------------------------------------------------------------------------\n * Animation keyframes\n * --------------------------------------------------------------------------- */\n\n /* Bar entrance: clip-path reveal bottom-to-top + fade in (vertical columns).\n Bars grow upward from baseline with a soft opacity fade. */\n @keyframes oc-enter-bar {\n from {\n clip-path: inset(100% 0 0 0);\n opacity: 0;\n }\n 75% {\n opacity: 1;\n }\n to {\n clip-path: inset(0 0 0 0);\n opacity: 1;\n }\n }\n\n /* Bar entrance: clip-path reveal left-to-right + fade in (horizontal bars).\n Bars grow rightward from axis with a soft opacity fade. */\n @keyframes oc-enter-bar-h {\n from {\n clip-path: inset(0 100% 0 0);\n opacity: 0;\n }\n 75% {\n opacity: 1;\n }\n to {\n clip-path: inset(0 0 0 0);\n opacity: 1;\n }\n }\n\n /* Line/area entrance: clip-path reveal left-to-right + fade in.\n Lines draw in following reading direction with a soft lead-in. */\n @keyframes oc-enter-line {\n from {\n clip-path: inset(0 100% 0 0);\n opacity: 0;\n }\n 15% {\n opacity: 1;\n }\n to {\n clip-path: inset(0 0 0 0);\n opacity: 1;\n }\n }\n\n /* Point/arc entrance: scale up + fade in from center */\n @keyframes oc-enter-point {\n from {\n opacity: 0;\n transform: scale(0.3);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n /* Map feature entrance: fade in while transitioning fill from a neutral base\n to the data-driven color stored in --oc-feature-fill. The target opacity is\n --oc-feature-target-opacity (default 1) so features under a focus dim\n animate straight to their dimmed rest opacity instead of hitting 1 and then\n snapping down when the dim is applied post-animation.\n Non-interpolable fills (the url(#pattern) hatch on no-data features) do not\n transition: the browser holds the neutral and flips to the pattern when the\n eased progress passes 50%, so those features fade in rather than\n cross-fade. */\n @keyframes oc-enter-map-fill {\n from {\n fill: var(--oc-secondary);\n opacity: 0;\n }\n to {\n fill: var(--oc-feature-fill);\n opacity: var(--oc-feature-target-opacity, 1);\n }\n }\n\n /* Map point pop-in: gentle scale from 0.75 + fade. Uses transform-origin to\n scale from the circle's own center (cx/cy) rather than the SVG origin. */\n @keyframes oc-enter-map-point {\n from {\n opacity: 0;\n transform: scale(0.75);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n /* Pure opacity fade (no transform). Safe for elements with existing transforms\n like arc groups that use translate() for positioning. */\n @keyframes oc-enter-fade-only {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n /* Fade + subtle slide up for text, rule, tick, annotations */\n @keyframes oc-enter-fade {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n /* Table row entrance: slide up only, no opacity (cells fade independently\n to avoid opacity compounding between row and cell animations) */\n @keyframes oc-table-enter-row {\n from {\n transform: translateY(6px);\n }\n to {\n transform: translateY(0);\n }\n }\n\n /* Table bar fill entrance: clip-path grow only, no opacity\n (preserves resting opacity: 0.15 from table.css) */\n @keyframes oc-table-enter-bar-fill {\n from {\n clip-path: inset(0 100% 0 0);\n }\n to {\n clip-path: inset(0 0 0 0);\n }\n }\n\n /* Live-tile pulse: the terminator dot of a sparkline swells once when new\n data lands, so a glance at a wall of tiles catches which one just moved.\n `r` is animated as a presentation attribute (SVG geometry properties are\n animatable in CSS); the fallback is simply no swell. */\n @keyframes oc-pulse {\n 0% {\n r: var(--oc-pulse-r, 4px);\n fill-opacity: 1;\n }\n 45% {\n r: calc(var(--oc-pulse-r, 4px) * 1.8);\n fill-opacity: 0.5;\n }\n 100% {\n r: var(--oc-pulse-r, 4px);\n fill-opacity: 1;\n }\n }\n\n /* Tooltip entrance */\n @keyframes oc-tooltip-in {\n from {\n opacity: 0;\n transform: translateY(2px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n}\n","@layer oc.animation {\n /* ---------------------------------------------------------------------------\n * Animation scoped rules (.oc-animate enables animation on the chart root)\n * --------------------------------------------------------------------------- */\n\n .oc-animate {\n /* Vertical bars (default): smooth ease-out, no overshoot.\n oc-mark-bar is reserved for future mark type aliases.\n A bar with a value-end radius draws as <path> rather than <rect>\n (SVG rx rounds all four corners or none), so both shapes match. */\n & .oc-mark-rect :is(rect, path),\n & .oc-mark-bar :is(rect, path) {\n animation: oc-enter-bar var(--oc-animation-duration) var(--oc-ease-smooth) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Horizontal bars (data-orient is on the mark group, not the SVG root) */\n & .oc-mark-rect[data-orient=\"horizontal\"] :is(rect, path),\n & .oc-mark-bar[data-orient=\"horizontal\"] :is(rect, path) {\n animation-name: oc-enter-bar-h;\n }\n\n /* Stacked bar/column segments: chain sequentially so each segment starts\n right when the previous one finishes, creating one fluid reveal.\n Uses linear easing so handoffs between segments are seamless (no\n deceleration/acceleration stutter at segment boundaries). */\n & .oc-mark-rect[data-stack-pos] :is(rect, path) {\n animation-duration: var(--oc-stack-segment-duration, 150ms);\n animation-timing-function: linear;\n animation-delay: calc(\n var(--oc-animation-stagger) *\n var(--oc-mark-index, 0) +\n var(--oc-stack-pos, 0) *\n var(--oc-stack-segment-duration, 150ms)\n );\n }\n\n /* Line marks: entire group clips left-to-right (no WAAPI needed) */\n & .oc-mark-line {\n animation: oc-enter-line var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Area marks: entire group clips left-to-right + fades in */\n & .oc-mark-area {\n animation: oc-enter-line var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Arc marks (pie/donut slices): simple fade in.\n Scale transforms break arc positioning because arcs use translate()\n on parent groups. A clean fade is more elegant for pie/donut anyway. */\n & .oc-mark-arc {\n animation: oc-enter-fade-only var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Point marks (scatter, dot).\n Points render as bare <circle> elements with class oc-mark-point directly,\n not wrapped in a group, so we target circle.oc-mark-point (not descendant).\n Duration is 40% of the configured duration (quick pop-in relative to other marks). */\n & circle.oc-mark-point,\n & circle.oc-mark-circle {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.4)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Points on line/area charts: delay so they pop in as the line draws through. */\n & .oc-mark-line ~ circle.oc-mark-point,\n & .oc-mark-area ~ circle.oc-mark-point {\n animation-delay: calc(\n var(--oc-animation-duration) *\n 0.35 +\n var(--oc-animation-stagger) *\n var(--oc-mark-index, 0)\n );\n }\n\n /* Text marks: fade + slight slide up */\n & .oc-mark-text text {\n animation: oc-enter-fade calc(var(--oc-animation-duration) * 0.6)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Rule marks: fade in */\n & .oc-mark-rule line {\n animation: oc-enter-fade calc(var(--oc-animation-duration) * 0.5)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Tick marks: fade in */\n & .oc-mark-tick line {\n animation: oc-enter-fade calc(var(--oc-animation-duration) * 0.5)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Data labels: fade after their parent mark */\n & .oc-mark-label {\n animation: oc-enter-fade 250ms var(--oc-ease-smooth) both;\n animation-delay: calc(\n var(--oc-animation-stagger) *\n var(--oc-mark-index, 0) +\n var(--oc-animation-duration) *\n 0.7\n );\n }\n\n /* Annotations: fade in after marks finish */\n & .oc-annotation {\n animation: oc-enter-fade 300ms var(--oc-ease-smooth) both;\n animation-delay: calc(var(--oc-animation-duration) + var(--oc-annotation-delay, 150ms));\n }\n\n /* Tilemap tiles: fade in with jittered stagger for organic feel.\n Per-tile delay is computed in the renderer with pseudo-random variation. */\n & .oc-tilemap-tile {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.35) ease-in both;\n animation-delay: var(--oc-tile-delay, 0ms);\n }\n\n /* Map features: fill color reveal with shuffled stagger.\n Per-feature --oc-map-delay is computed in the renderer via a seeded\n Fisher-Yates shuffle so features pop in organically. */\n & .oc-map-feature {\n animation: oc-enter-map-fill var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: var(--oc-map-delay, 0ms);\n }\n\n /* Bulk mode: high feature counts (counties, ~3k+) get a single group\n fade instead of per-feature fill animations. opacity is GPU-compositable\n so this stays smooth regardless of child count. */\n & .oc-map-features[data-bulk-animate] {\n animation: oc-enter-fade-only var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n }\n\n & .oc-map-features[data-bulk-animate] .oc-map-feature {\n animation: none;\n }\n\n /* Map borders: fade in near the end of the feature sweep */\n & .oc-map-borders path {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.4) ease-in both;\n animation-delay: calc(var(--oc-animation-duration) * 0.7);\n }\n\n /* Map points: gentle scale (0.75->1) + fade pop-in after borders.\n transform-origin set per-circle in the renderer so scale happens\n around each circle's own center, not the SVG origin. */\n & .oc-map-point {\n animation: oc-enter-map-point calc(var(--oc-animation-duration) * 0.4)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(\n var(--oc-animation-duration) *\n 0.8 +\n var(--oc-mark-index, 0) *\n var(--oc-point-stagger, 60ms)\n );\n }\n\n /* Sankey nodes: fade in with stagger by column depth (left-to-right) */\n & .oc-sankey-node rect {\n animation: oc-enter-fade-only var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Sankey links: fade in after nodes, with stagger.\n Links delay by 30% of duration so nodes appear first, then links flow in. */\n & .oc-sankey-link path {\n animation: oc-enter-fade-only var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(\n var(--oc-animation-duration) *\n 0.3 +\n var(--oc-animation-stagger) *\n var(--oc-mark-index, 0)\n );\n }\n\n /* Barlist rows: fade + slide up per row, bars grow left-to-right */\n & .oc-barlist-row {\n animation: oc-enter-fade calc(var(--oc-animation-duration) * 0.6)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: var(--oc-row-delay, 0ms);\n }\n\n & .oc-barlist-bar {\n animation: oc-enter-bar-h var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: var(--oc-row-delay, 0ms);\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Sparkline mode: pair the line/area reveal with a stronger ease-out so it\n * doesn't read as a uniform left-to-right swipe. cubic-bezier(0.16, 1, 0.3, 1)\n * is \"expo-out\" — fast initial draw that decelerates noticeably at the end,\n * giving the trend a hand-drawn feel. Duration is bumped via the engine\n * (compile.ts) so the cleanup timer stays in sync.\n * --------------------------------------------------------------------------- */\n\n .oc-animate[data-display=\"sparkline\"] .oc-mark-line,\n .oc-animate[data-display=\"sparkline\"] .oc-mark-area {\n animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);\n }\n}\n","/* ---------------------------------------------------------------------------\n * Reduced motion\n *\n * Catch-all: last-declared layer beats every earlier layer regardless of\n * specificity. No !important, no hand-maintained selector mirror.\n *\n * Selector list matches CSS_TOKEN_ROOT_SELECTORS in token-definitions.ts.\n * --------------------------------------------------------------------------- */\n\n@layer oc.reduced-motion {\n @media (prefers-reduced-motion: reduce) {\n :is(\n .oc-root,\n .oc-chart-root,\n .oc-table-wrapper,\n .oc-table-root,\n .oc-graph-wrapper,\n .oc-graph-root,\n .oc-sankey-root,\n .oc-tilemap-root,\n .oc-barlist-root,\n .oc-map-root\n ),\n :is(\n .oc-root,\n .oc-chart-root,\n .oc-table-wrapper,\n .oc-table-root,\n .oc-graph-wrapper,\n .oc-graph-root,\n .oc-sankey-root,\n .oc-tilemap-root,\n .oc-barlist-root,\n .oc-map-root\n )\n *,\n :is(\n .oc-root,\n .oc-chart-root,\n .oc-table-wrapper,\n .oc-table-root,\n .oc-graph-wrapper,\n .oc-graph-root,\n .oc-sankey-root,\n .oc-tilemap-root,\n .oc-barlist-root,\n .oc-map-root\n )\n *::before,\n :is(\n .oc-root,\n .oc-chart-root,\n .oc-table-wrapper,\n .oc-table-root,\n .oc-graph-wrapper,\n .oc-graph-root,\n .oc-sankey-root,\n .oc-tilemap-root,\n .oc-barlist-root,\n .oc-map-root\n )\n *::after {\n animation: none;\n transition: none;\n }\n }\n}\n"],"names":[]}
|
|
1
|
+
{"version":3,"mappings":"AAWA,iBEEE,mzEIFA,6lBNAF,eUNE,mIAeA,6BAQA,uGAWA,yDAOA,iGAMA,qCAWA,8IAgBA,qHAcA,4EAQA,yGV1FF,qBWNE,6CAIA,2KAQA,wIAOA,+GAMA,+HAQA,wFAOA,oDAYA,8CAIA,wHAQA,4HAQA,2EAMA,6EAQA,8EAWA,8EAgBA,sDAIA,sEAMA,4EAIA,wEAaA,sFAUA,sFASA,gCAMA,mFIlKA,4fAsBE,4FAOA,iFAOA,gMAWA,gGAMA,0EAKA,mHAQA,yJAUA,oKAUA,uMAYA,qGAKA,wEAMA,gHAMA,kGAKA,qEAWF,qFAOA,4FH1IA,6CAIA,gCEAA,uFAOA,sNAaA,0HAWA,wMAOA,gCAIA,oCAMA,sFASA,wCAcA,iGAUA,kGAIA,w6BAeA,8BAYA,wGAIA,4GAIA,sEE1HA,kJAaA,iHASA,wDAIA,sSAeA,6RAoBA,uFAKA,iGAKA,gDAMA,qEAMA,oIAWA,0DAKA,2SAiBA,yLAWA,0GAMA,wCAIA,mFftIA,kDAKA,+CAKA,qGASA,wHAUA,yGAWA,qFAKA,0MAYA,oSAeA,6DAOA,mYAoBA,0DAIA,yFAKA,yDIpHA,iGAKE,qFAMA,yDAIA,4DAKA,uIAAA,uIAcA,kLAUA,gFASA,mDAIA,sEAKA,iFAKA,2CAKF,sNAOA,kPAOA,2IAKA,gJAKA,iCASE,0FAAA,0FAaF,oLAYE,mLAAA,kLAaA,yFAKA,qFAKA,4CAAA,2CAOA,+FAKA,6DAMA,4FAKA,+DAaF,iQAaA,wFAAA,8EAAA,yFAAA,+EAMA,+IAOA,+BAGE,wCASF,oJAQE,6PAaE,oEAKA,2GAKA,+FAOJ,4DAIA,+CASA,gCAIA,iIAUA,gDASA,+DAKE,kEAOF,iFAOA,mGAWA,2DAIE,qCAKF,8CAQA,+BAaE,iGAAA,iGAOA,+DAIA,mFAOA,yDAAA,yDAMA,2DAUF,wGAQA,sLAWA,mDAKA,sFAKA,sFAKA,kHAMA,qLAYA,oEAWA,gFAME,iGAiBA,oDAIA,0CAIA,sHASA,kLAAA,kLAaA,iIAUA,0LAYA,uDAKA,uGAOA,2DAIA,oDAIA,gDAUA,6CAIA,kEASF,2EASA,oHGzkBA,qIASA,kEAOA,2CAQA,gFAOA,yBAIA,0EAMA,4GASE,8bAkBA,2RAaF,wRAgBA,qLAiBA,6EAIE,kEAIA,+FAOF,4CAIA,iCAIA,0HAOA,+EAQA,sEAMA,sDAKE,2QAUE,2GLrKJ,2GAIA,8IAOA,oGIdA,mEAYA,4EAIA,uCACE,6DPhBJ,oBIJI,4JAMA,4JAOA,8NAOA,yOAOA,wRAAA,yRAcA,4RAaA,uRAYA,4RAAA,+RAaA,uKAAA,2KK/EF,8GAgBA,kHAgBA,iHAeA,4FAoBA,8IAaA,iGAaA,yDAUA,sGAaA,uFAWA,yFAaA,iKAgBA,sGIzJE,mMAAA,kMAOA,+FAAA,8FASA,8RAYA,8MAOA,8MASA,kNAUA,qOAAA,sOAQA,+JAAA,+JAWA,8NAOA,8NAOA,8NAOA,kMAWA,uKAOA,wJAQA,gLASA,8JAKA,+EAKA,2KAQA,mQAYA,0NAQA,8PAYA,uLAMA,6KAeF,wJbvMF,yBiBDE,uCACE,6LAAA,+LAAA,qMAAA","sources":["../src/styles/index.css","../src/styles/you-draw-it.css","../src/styles/tokens.css","../src/styles/sankey.css","../src/styles/table-animation.css","../src/styles/table.css","../src/styles/dark.css","../src/styles/sparkline.css","../src/styles/graph.css","../src/styles/keyframes.css","../src/styles/base.css","../src/styles/chrome.css","../src/styles/legend.css","../src/styles/tooltip.css","../src/styles/interaction.css","../src/styles/series-search.css","../src/styles/animation.css","../src/styles/reduced-motion.css"],"sourcesContent":["/**\n * @opendata-ai/openchart-core styles\n *\n * CSS with oc- prefix for all class names.\n * CSS custom properties for theme overrides.\n * Dark mode via .oc-dark class on the container.\n * Cascade layers: oc.tokens, oc.base, oc.components, oc.animation, oc.reduced-motion.\n */\n\n/* For optimal typography, load Inter: https://fonts.google.com/specimen/Inter */\n\n@layer oc.tokens, oc.base, oc.components, oc.animation, oc.reduced-motion;\n\n@import \"./tokens.css\";\n@import \"./dark.css\";\n@import \"./base.css\";\n@import \"./chrome.css\";\n@import \"./tooltip.css\";\n@import \"./legend.css\";\n@import \"./interaction.css\";\n@import \"./series-search.css\";\n@import \"./you-draw-it.css\";\n@import \"./table.css\";\n@import \"./table-animation.css\";\n@import \"./graph.css\";\n@import \"./sankey.css\";\n@import \"./sparkline.css\";\n@import \"./keyframes.css\";\n@import \"./animation.css\";\n@import \"./reduced-motion.css\";\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * You draw it (youDrawIt)\n *\n * NYT-style draw-then-reveal. SVG-space elements (hatched region, guess path,\n * reveal clip) render inside the chart SVG; the prompt + skip-to-reveal button\n * are an absolutely-positioned HTML overlay the vanilla adapter sizes over the\n * drawing region (inline left/top/width/height). All colors come from --oc-*\n * tokens so they flip in .oc-dark.\n * --------------------------------------------------------------------------- */\n\n /* Hatched \"draw here\" region. Fill comes from an SVG <pattern> (line color =\n * the target series color); this only governs overall opacity + fade-out. */\n .oc-ydi-region {\n opacity: 0.35;\n transition: opacity 0.4s ease;\n }\n\n .oc-ydi-region[data-ydi-hidden=\"true\"] {\n opacity: 0;\n }\n\n /* The vertical rule at `from` where drawing begins. */\n .oc-ydi-boundary {\n stroke: var(--oc-text-muted);\n stroke-width: 1;\n stroke-dasharray: 3 3;\n stroke-opacity: 0.6;\n }\n\n /* Reader's guess: a distinct pen-like stroke that reads as \"yours\" against the\n * solid real line. Dashed + focus-blue so it stays legible in both modes. */\n .oc-ydi-guess {\n stroke: var(--oc-focus);\n stroke-width: 2.5;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-dasharray: 1 6;\n }\n\n /* Host-supplied comparison line (\"what everyone else guessed\"). Muted so it\n * sits behind the reader's guess and the real line. */\n .oc-ydi-comparison {\n stroke: var(--oc-text-muted);\n stroke-width: 1.5;\n stroke-opacity: 0.5;\n stroke-dasharray: 4 4;\n }\n\n /* Reveal clip rect: the width animates from the `from` boundary to the full\n * area on reveal, wiping the real line in left-to-right. The vanilla adapter\n * adds .oc-ydi-clip-animate right before setting the final width; reduced\n * motion skips the class so the width snaps. */\n .oc-ydi-clip-rect.oc-ydi-clip-animate {\n transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);\n }\n\n /* HTML controls overlay: prompt (top) + reveal button (bottom-right). */\n .oc-ydi-controls {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: flex-end;\n pointer-events: none;\n font-family: var(--oc-font-family);\n padding: 8px;\n box-sizing: border-box;\n z-index: 10;\n }\n\n .oc-ydi-prompt {\n align-self: center;\n max-width: 100%;\n padding: 6px 12px;\n border-radius: var(--oc-radius-md);\n background: var(--oc-card);\n border: 1px solid var(--oc-border);\n color: var(--oc-text-secondary);\n font-size: 13px;\n font-weight: 500;\n line-height: 16px;\n text-align: center;\n box-shadow: var(--oc-tooltip-shadow);\n }\n\n .oc-ydi-controls.oc-ydi-revealed .oc-ydi-prompt {\n display: none;\n }\n\n /* Skip-to-reveal button. pointer-events re-enabled (the overlay disables it)\n * so it stays clickable and keyboard-reachable. Min height enforced inline by\n * the adapter (>= 24px effective touch target). */\n .oc-ydi-reveal-button {\n pointer-events: auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 6px 14px;\n border: 1px solid var(--oc-border);\n border-radius: var(--oc-radius-md);\n background: var(--oc-bg);\n color: var(--oc-text);\n font-family: inherit;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n box-shadow: var(--oc-tooltip-shadow);\n transition:\n background-color 0.15s,\n border-color 0.15s;\n }\n\n .oc-ydi-reveal-button:hover {\n background: var(--oc-hover-bg);\n }\n\n .oc-ydi-reveal-button:focus-visible {\n outline: 2px solid var(--oc-focus);\n outline-offset: 2px;\n }\n\n .oc-ydi-reveal-button:disabled {\n opacity: 0.5;\n cursor: default;\n }\n}\n","/* GENERATED FILE — do not edit. Source: packages/core/src/styles/token-definitions.ts. Regenerate: bun run generate:tokens */\n\n@layer oc.tokens {\n /* ---------------------------------------------------------------------------\n * Custom properties (light mode defaults)\n *\n * These are FALLBACK defaults. At runtime, the JS theme engine stamps the\n * resolved theme as inline --oc-* custom properties on each .oc-root\n * container (see packages/vanilla/src/theme-tokens.ts). These CSS values\n * serve as fallbacks for contexts where JS hasn't mounted yet (SSR, static\n * HTML examples).\n * --------------------------------------------------------------------------- */\n\n .oc-root,\n .oc-chart-root,\n .oc-table-wrapper,\n .oc-table-root,\n .oc-graph-wrapper,\n .oc-graph-root,\n .oc-sankey-root,\n .oc-tilemap-root,\n .oc-barlist-root,\n .oc-map-root {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n /* Opt out of iOS text auto-inflation so measured widths match rendered text. */\n -webkit-text-size-adjust: 100%;\n text-size-adjust: 100%;\n\n --oc-font-family:\n \"Inter Variable\", Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n --oc-font-mono: \"JetBrains Mono\", \"Fira Code\", \"Cascadia Code\", monospace;\n\n /* Animation easing presets via CSS linear() */\n --oc-ease-smooth: linear(\n 0,\n 0.157,\n 0.438,\n 0.64,\n 0.766,\n 0.85,\n 0.906,\n 0.941,\n 0.964,\n 0.978,\n 0.988,\n 0.994,\n 0.998,\n 1\n );\n --oc-ease-snappy: linear(\n 0,\n 0.012,\n 0.048,\n 0.108,\n 0.194,\n 0.302,\n 0.426,\n 0.559,\n 0.69,\n 0.808,\n 0.905,\n 0.973,\n 1.013,\n 1.028,\n 1.023,\n 1.006,\n 0.984,\n 0.966,\n 0.957,\n 0.957,\n 0.964,\n 0.975,\n 0.986,\n 0.995,\n 1,\n 1.003,\n 1.002,\n 1,\n 0.998,\n 0.998,\n 0.999,\n 1\n );\n\n /* Animation timing defaults */\n --oc-animation-duration: 450ms;\n --oc-animation-stagger: 30ms;\n --oc-annotation-delay: 150ms;\n\n /* Typography scale (editorial design system) */\n --oc-title-size: 26px;\n --oc-title-weight: 600; /* one ladder: 400 regular / 500 medium / 600 semibold / 700 bold */\n --oc-title-tracking: -0.022em;\n --oc-subtitle-size: 14px;\n --oc-subtitle-weight: 400;\n --oc-source-size: 11px;\n --oc-source-weight: 400;\n --oc-body-size: 13px;\n --oc-eyebrow-size: 11px;\n --oc-eyebrow-weight: 500;\n --oc-eyebrow-tracking: 0.08em;\n\n /* Surfaces (light mode defaults) */\n --oc-bg: #ffffff;\n --oc-card: #ffffff;\n --oc-secondary: #f4f4f5; /* zinc-100, raised surface */\n\n /*\n * Text levels. Names invert across modes: in light mode \"muted\" sits at\n * a lighter zinc step than \"subtle\" because both are picked relative to\n * the active background, not from a fixed lightness ladder. The intent\n * is \"muted = first step away from primary text\"; \"subtle = next step\n * down\"; etc.\n *\n * Light mode: text=zinc-950, secondary=zinc-700, muted=zinc-500,\n * subtle=zinc-400, faint=zinc-300\n * Dark mode (dark.css): inverts the surface tokens but keeps the same\n * muted -> subtle -> faint progression away from primary.\n */\n --oc-text: #09090b;\n --oc-text-secondary: #3f3f46;\n --oc-text-muted: #71717a;\n --oc-text-faint: #d4d4d8;\n\n /*\n * Derived neutral ramp. Named by the share of *text* in a text-toward-\n * background mix: 100 is nearly the background, 800 is nearly the text.\n * These static values are the mix against the default surfaces; mounts\n * restamp them from ResolvedTheme.colors.neutral, which a custom warm or\n * cool theme derives from its own text/background pair.\n */\n --oc-gray-100: #f0f0f0;\n --oc-gray-200: #e1e1e2;\n --oc-gray-300: #c9c9c9;\n --oc-gray-400: #9d9d9d;\n --oc-gray-600: #787879;\n --oc-gray-800: #474748;\n\n /* Lines */\n --oc-gridline: rgba(0, 0, 0, 0.08);\n --oc-axis: rgba(0, 0, 0, 0.14); /* hairline = theme.colors.hairline, not the tick-label ink */\n --oc-border: rgba(0, 0, 0, 0.08);\n --oc-border-radius: 8px; /* containers and tooltips; marks use --oc-radius-sm */\n\n /* Radius ladder */\n --oc-radius-sm: 2px;\n --oc-radius-md: 6px;\n --oc-radius-lg: var(--oc-border-radius);\n --oc-radius-full: 999px;\n\n /* Brand and semantic */\n --oc-accent: #06b6d4;\n --oc-accent-strong: #0891b2; /* darker cyan for line strokes on light bg */\n /* kept equal to DEFAULT_THEME.colors.positive (token-theme-parity test) */\n --oc-positive: #15803d;\n --oc-negative: #dc2626;\n /* delta chip background */\n --oc-positive-tint: color-mix(in srgb, var(--oc-positive) 10%, var(--oc-bg));\n --oc-negative-tint: color-mix(in srgb, var(--oc-negative) 10%, var(--oc-bg));\n --oc-focus: #3b82f6;\n /* static, intentionally NOT derived from --oc-focus and NOT flipped in dark mode */\n --oc-focus-ring: rgba(59, 130, 246, 0.1);\n --oc-focus-ring-strong: rgba(59, 130, 246, 0.25);\n --oc-editable-hover: rgba(79, 70, 229, 0.35); /* edit-mode hover outline, indigo one-off */\n\n /* Spacing scale (4px base) — only --oc-space-2/4 are consumed (JS-stamped) */\n --oc-space-2: 8px;\n --oc-space-4: 16px;\n\n /*\n * Hover language. The hovered element goes to full ink; the rest of its\n * group drops to --oc-hover-dim over --oc-hover-duration. Maps override the\n * dim locally (3000 county paths at 0.3 reads as a blackout, not a hint).\n */\n --oc-hover-dim: 0.3;\n --oc-hover-duration: 140ms;\n --oc-map-hover-dim: 0.75;\n\n /* Interactive states */\n --oc-hover-bg: rgba(0, 0, 0, 0.025);\n --oc-tooltip-bg: rgba(255, 255, 255, 0.88);\n --oc-tooltip-border: rgba(0, 0, 0, 0.08);\n --oc-tooltip-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.12);\n --oc-tooltip-text: #09090b;\n --oc-legend-text: #3f3f46;\n }\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Sankey\n *\n * Hovering a node (or a link) traces the whole path through it: everything\n * upstream and everything downstream stays lit, the rest drops back. The mount\n * writes the opacities; this file only owns how they move, using the shared\n * hover duration so a sankey fades on the same clock as a bar chart.\n *\n * The transitions are switched off during the entrance (`.oc-animate`), where\n * the keyframes own opacity and a competing transition would smear them.\n * --------------------------------------------------------------------------- */\n\n .oc-sankey:not(.oc-animate) .oc-sankey-link path {\n transition: fill-opacity var(--oc-hover-duration) ease-out;\n }\n\n .oc-sankey:not(.oc-animate) .oc-sankey-node,\n .oc-sankey:not(.oc-animate) .oc-sankey-label {\n transition: opacity var(--oc-hover-duration) ease-out;\n }\n\n /* Labels are decoration over the flow: never a text cursor, never a selection\n * drag that eats the hover. */\n .oc-sankey-label {\n pointer-events: none;\n user-select: none;\n }\n}\n","@layer oc.animation {\n /* ---------------------------------------------------------------------------\n * Table entrance animations (.oc-table-wrapper.oc-animate)\n * --------------------------------------------------------------------------- */\n\n .oc-table-wrapper.oc-animate {\n /* Chrome (title/subtitle): fade + slide up */\n & > .oc-chrome {\n animation: oc-enter-fade calc(var(--oc-animation-duration) * 0.6)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n }\n\n /* Table header: quick fade before rows start */\n & thead {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.4)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n }\n\n /* Row entrance: slide up only, no opacity (cells handle their own fading\n to avoid opacity compounding between row and cell animations) */\n & tbody tr {\n animation: oc-table-enter-row var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-row-index, 0));\n }\n\n /* Cell text: fade in synced with row slide */\n & tbody td {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.5)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-row-index, 0));\n }\n\n /* Heatmap/category cell backgrounds: longer fade, delayed after row appears */\n & td.oc-table-heatmap,\n & td.oc-table-category {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.7)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(\n var(--oc-animation-stagger) *\n var(--oc-row-index, 0) +\n var(--oc-animation-duration) *\n 0.3\n );\n }\n\n /* Bar fill: clip-path grow only (no opacity change to preserve resting\n opacity: 0.15 from table.css) */\n & .oc-table-bar-fill {\n animation: oc-table-enter-bar-fill calc(var(--oc-animation-duration) * 0.8)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(\n var(--oc-animation-stagger) *\n var(--oc-row-index, 0) +\n var(--oc-animation-duration) *\n 0.3\n );\n }\n\n /* Sparkline SVG: clip-path reveal left-to-right. Targets the SVG directly\n (not the wrapper) to avoid clipping absolutely-positioned dots and labels. */\n & .oc-table-sparkline > svg {\n animation: oc-enter-line calc(var(--oc-animation-duration) * 0.8)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(\n var(--oc-animation-stagger) *\n var(--oc-row-index, 0) +\n var(--oc-animation-duration) *\n 0.4\n );\n }\n\n /* Sparkline dots and labels: fade in after the line draws through */\n & .oc-table-sparkline-dot,\n & .oc-table-sparkline-labels {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.3)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(\n var(--oc-animation-stagger) *\n var(--oc-row-index, 0) +\n var(--oc-animation-duration) *\n 0.8\n );\n }\n\n /* Search and pagination: quick fade on mount */\n & .oc-table-search,\n & .oc-table-pagination {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.5)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n }\n }\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Table base\n * --------------------------------------------------------------------------- */\n\n .oc-table-wrapper {\n font-family: var(--oc-font-family);\n color: var(--oc-text);\n background: var(--oc-bg);\n\n & > .oc-chrome {\n margin-bottom: 16px;\n padding-left: 16px;\n padding-right: 16px;\n }\n\n & > .oc-chrome:first-child {\n padding-top: 4px;\n }\n\n & table {\n width: 100%;\n border-collapse: collapse;\n }\n\n & th,\n & td {\n /* 12 + 24 + 12 = 48px rows. Condensed and relaxed keep the same\n line box and change only the padding, so the ladder is 40/48/56. */\n padding: 12px 16px;\n line-height: 24px;\n text-align: left;\n border-bottom: 1px solid var(--oc-border);\n /* Column widths from the engine already sum to the container width;\n without border-box the padding pushes each cell wider than its\n computed width and auto layout rescales the whole row. */\n box-sizing: border-box;\n }\n\n & th {\n font-weight: 500;\n font-size: 12px;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--oc-text-muted);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n }\n\n & thead {\n position: sticky;\n top: 0;\n z-index: 2;\n background: var(--oc-bg);\n }\n\n /* A hairline, like every other rule in the table. The old 2px header rule\n was the heaviest line on the page and drew the eye away from the data. */\n & thead th {\n border-bottom-width: 1px;\n }\n\n & td {\n font-size: 14px;\n font-variant-numeric: tabular-nums;\n }\n\n & th:focus {\n outline: 2px solid var(--oc-focus);\n outline-offset: -2px;\n }\n\n & tbody:focus {\n outline: none;\n }\n }\n\n .oc-table-title {\n margin-bottom: 4px;\n font-size: var(--oc-title-computed-size, var(--oc-title-size));\n font-weight: var(--oc-title-computed-weight, var(--oc-title-weight));\n color: var(--oc-title-computed-color, var(--oc-text));\n }\n\n .oc-table-subtitle {\n margin-bottom: 8px;\n font-size: var(--oc-subtitle-computed-size, var(--oc-subtitle-size));\n font-weight: var(--oc-subtitle-computed-weight, var(--oc-subtitle-weight));\n color: var(--oc-subtitle-computed-color, var(--oc-text-secondary));\n }\n\n .oc-table-source {\n font-size: var(--oc-source-computed-size, var(--oc-source-size));\n color: var(--oc-source-computed-color, var(--oc-text-muted));\n }\n\n .oc-table-footer-text {\n font-size: var(--oc-footer-computed-size, var(--oc-source-size));\n color: var(--oc-footer-computed-color, var(--oc-text-muted));\n }\n\n .oc-table-scroll {\n overflow-x: auto;\n }\n\n /* ---------------------------------------------------------------------------\n * Sticky first column\n * --------------------------------------------------------------------------- */\n\n .oc-table--sticky {\n & th:first-child,\n & td:first-child {\n position: sticky;\n left: 0;\n z-index: 1;\n background: var(--oc-bg);\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Sort controls\n * --------------------------------------------------------------------------- */\n\n .oc-table-sort-btn {\n background: none;\n border: none;\n cursor: pointer;\n padding: 2px;\n margin-left: 6px;\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n vertical-align: middle;\n gap: 2px;\n\n &::before,\n &::after {\n content: \"\";\n display: block;\n width: 0;\n height: 0;\n border-left: 5px solid transparent;\n border-right: 5px solid transparent;\n transition:\n opacity 0.15s,\n border-color 0.15s;\n }\n\n &::before {\n border-bottom: 4.5px solid var(--oc-text-secondary);\n opacity: 0.35;\n }\n\n &::after {\n border-top: 4.5px solid var(--oc-text-secondary);\n opacity: 0.35;\n }\n\n &:hover::before,\n &:hover::after {\n opacity: 0.75;\n }\n }\n\n th[aria-sort=\"ascending\"] .oc-table-sort-btn {\n &::before {\n opacity: 1;\n border-bottom-color: var(--oc-text);\n }\n\n &::after {\n opacity: 0.15;\n }\n }\n\n th[aria-sort=\"descending\"] .oc-table-sort-btn {\n &::after {\n opacity: 1;\n border-top-color: var(--oc-text);\n }\n\n &::before {\n opacity: 0.15;\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Search\n * --------------------------------------------------------------------------- */\n\n /* Shared search-input skin (table + series-search).\n Padding excluded: it diverges (table: 8px 12px; series: 0 10px 0 28px)\n and series-search.css is imported before table.css — a padding declaration\n here would beat the series-search override by source order. */\n .oc-table-search input,\n .oc-series-search-input {\n width: 100%;\n border: 1px solid var(--oc-border);\n border-radius: var(--oc-radius-md);\n font-size: 13px;\n font-family: inherit;\n background: var(--oc-bg);\n color: var(--oc-text);\n box-sizing: border-box;\n transition: border-color 0.15s;\n }\n\n .oc-table-search input::placeholder,\n .oc-series-search-input::placeholder {\n color: var(--oc-text-muted);\n font-size: 13px;\n }\n\n .oc-table-search input:focus,\n .oc-series-search-input:focus {\n outline: none;\n border-color: var(--oc-focus);\n box-shadow: 0 0 0 3px var(--oc-focus-ring);\n }\n\n .oc-table-search {\n padding: 8px 0;\n\n & input {\n padding: 8px 12px;\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Pagination\n * --------------------------------------------------------------------------- */\n\n .oc-table-pagination {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 0 4px;\n font-size: 13px;\n color: var(--oc-text-secondary);\n\n & button {\n padding: 6px 14px;\n border: 1px solid var(--oc-border);\n border-radius: var(--oc-radius-md);\n background: var(--oc-bg);\n color: var(--oc-text);\n cursor: pointer;\n font-size: 13px;\n font-family: inherit;\n transition:\n background 0.15s,\n border-color 0.15s;\n\n &:disabled {\n opacity: 0.35;\n cursor: not-allowed;\n }\n\n &:hover:not(:disabled) {\n background: var(--oc-hover-bg);\n border-color: var(--oc-axis);\n }\n\n &:focus-visible {\n outline: 2px solid var(--oc-focus);\n outline-offset: 1px;\n }\n }\n }\n\n .oc-table-pagination-info {\n font-variant-numeric: tabular-nums;\n }\n\n .oc-table-pagination-btns {\n display: flex;\n gap: 8px;\n }\n\n /* ---------------------------------------------------------------------------\n * Bar cells\n * --------------------------------------------------------------------------- */\n\n .oc-table-bar {\n position: relative;\n }\n\n .oc-table-bar-fill {\n position: absolute;\n top: 8px;\n left: 0;\n bottom: 8px;\n border-radius: var(--oc-radius-sm);\n opacity: 0.18;\n pointer-events: none;\n }\n\n .oc-table-bar-value {\n position: relative;\n z-index: 1;\n }\n\n /* ---------------------------------------------------------------------------\n * Sparkline cells\n * --------------------------------------------------------------------------- */\n\n .oc-table-sparkline {\n display: block;\n width: 100%;\n position: relative;\n\n & svg {\n display: block;\n width: 100%;\n overflow: visible;\n }\n }\n\n .oc-table-sparkline-dot {\n position: absolute;\n border-radius: 50%;\n width: 5px;\n height: 5px;\n }\n\n .oc-table-sparkline-labels {\n display: flex;\n justify-content: space-between;\n font-size: 11px;\n line-height: 1;\n }\n\n /* ---------------------------------------------------------------------------\n * Image cells\n * --------------------------------------------------------------------------- */\n\n .oc-table-image {\n display: inline-block;\n vertical-align: middle;\n\n & img {\n object-fit: cover;\n }\n }\n\n .oc-table-image-rounded img {\n border-radius: 50%;\n }\n\n /* ---------------------------------------------------------------------------\n * Flag cells\n * --------------------------------------------------------------------------- */\n\n .oc-table-flag {\n font-size: 1.2em;\n }\n\n /* ---------------------------------------------------------------------------\n * Density\n *\n * regular 48px rows (base), condensed 40px, relaxed 56px. `.oc-table--compact`\n * is the deprecated alias for condensed, kept one release.\n * --------------------------------------------------------------------------- */\n\n .oc-table--condensed,\n .oc-table--compact {\n & th,\n & td {\n padding: 8px 12px;\n line-height: 24px;\n font-size: 13px;\n }\n\n & th {\n font-size: 11px;\n }\n\n & .oc-table-bar-fill {\n top: 5px;\n bottom: 5px;\n }\n }\n\n .oc-table--relaxed {\n & th,\n & td {\n padding: 16px 20px;\n line-height: 24px;\n }\n\n & .oc-table-bar-fill {\n top: 12px;\n bottom: 12px;\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Striping\n * --------------------------------------------------------------------------- */\n\n .oc-table--striped tbody tr:nth-child(even) {\n background: color-mix(in srgb, var(--oc-text) 3%, transparent);\n }\n\n /* ---------------------------------------------------------------------------\n * Delta chips\n * --------------------------------------------------------------------------- */\n\n .oc-table-delta {\n display: inline-flex;\n align-items: baseline;\n gap: 4px;\n padding: 2px 8px;\n border-radius: var(--oc-radius-md);\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n line-height: 16px;\n }\n\n .oc-table-delta-arrow {\n font-size: 0.8em;\n line-height: 1;\n }\n\n .oc-table-delta--positive {\n color: var(--oc-positive);\n background: var(--oc-positive-tint);\n }\n\n .oc-table-delta--negative {\n color: var(--oc-negative);\n background: var(--oc-negative-tint);\n }\n\n .oc-table-delta--neutral {\n color: var(--oc-text-muted);\n background: color-mix(in srgb, var(--oc-text) 6%, transparent);\n }\n\n /* Category chips: the engine supplies the tint, ink and dot color inline. */\n .oc-table-chip {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 2px 8px;\n border-radius: var(--oc-radius-full);\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n white-space: nowrap;\n }\n\n .oc-table-chip-dot {\n flex: none;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n }\n\n /* ---------------------------------------------------------------------------\n * Totals footer\n * --------------------------------------------------------------------------- */\n\n tfoot.oc-table-total {\n position: sticky;\n bottom: 0;\n z-index: 2;\n background: var(--oc-bg);\n\n & td {\n font-weight: 600;\n border-bottom: none;\n border-top: 1px solid var(--oc-border);\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Cards mode (below 400px)\n *\n * Rows become two-column grids with the header printed per cell. `display:\n * grid` drops the implicit table roles, so the renderer stamps explicit ARIA\n * roles on every element; `display: contents` is deliberately NOT used —\n * it removes the row box the grid needs and breaks the semantics further.\n * --------------------------------------------------------------------------- */\n\n .oc-table--cards {\n & .oc-table-scroll {\n overflow-x: hidden;\n }\n\n & table {\n table-layout: fixed;\n }\n\n & thead {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n }\n\n & tbody tr,\n & tfoot tr {\n display: grid;\n /* Two equal halves keep every label/value pair the same width; an\n auto first column makes the third cell in a row narrower than the\n second and the card reads ragged. */\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 2px 12px;\n align-items: baseline;\n padding: 10px 12px;\n border-bottom: 1px solid var(--oc-border);\n }\n\n & td {\n display: block;\n width: auto;\n max-width: 100%;\n padding: 0;\n border-bottom: none;\n overflow-wrap: anywhere;\n text-align: right;\n }\n\n & td::before {\n content: attr(data-label);\n display: block;\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--oc-text-muted);\n text-align: left;\n }\n\n /* A column with no header (flags, logos) prints no label either. */\n & td[data-label=\"\"]::before {\n content: none;\n }\n\n /* Priority 1 leads the card on its own line, label suppressed. */\n & td[data-priority=\"1\"] {\n grid-column: 1 / -1;\n font-size: 15px;\n font-weight: 600;\n text-align: left;\n }\n\n & td[data-priority=\"1\"]::before {\n content: none;\n }\n\n & td[data-priority=\"3\"] {\n display: none;\n }\n\n & .oc-table-sparkline {\n width: 100%;\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Row hover (when onRowClick is set)\n * --------------------------------------------------------------------------- */\n\n .oc-table--clickable tbody {\n & tr {\n cursor: pointer;\n }\n\n & tr:hover {\n background: var(--oc-hover-bg);\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Keyboard cell focus indicator\n * --------------------------------------------------------------------------- */\n\n .oc-table-cell-focus {\n outline: 2px solid var(--oc-focus);\n outline-offset: -2px;\n }\n\n /* ---------------------------------------------------------------------------\n * Empty state\n * --------------------------------------------------------------------------- */\n\n .oc-table-empty {\n padding: 32px 16px;\n text-align: center;\n color: var(--oc-text-secondary);\n font-size: 14px;\n font-style: italic;\n }\n}\n","/* GENERATED FILE — do not edit. Source: packages/core/src/styles/token-definitions.ts. Regenerate: bun run generate:tokens */\n\n@layer oc.tokens {\n /* ---------------------------------------------------------------------------\n * Dark mode overrides (fallback defaults)\n *\n * At runtime, the JS theme engine stamps dark-adapted --oc-* custom\n * properties on each .oc-root container. These CSS values serve as\n * fallbacks for contexts where JS hasn't mounted yet.\n * --------------------------------------------------------------------------- */\n\n .oc-dark {\n /* Surfaces (zinc-based achromatic ramp) */\n --oc-bg: #09090b;\n --oc-card: #111113;\n --oc-secondary: #27272a;\n\n /* Text levels — see tokens.css for the cross-mode naming rationale */\n --oc-text: #f7f8f8;\n --oc-text-secondary: #d0d6e0;\n --oc-text-muted: #a1a1aa;\n --oc-text-faint: #52525b;\n\n /* Lines */\n --oc-gridline: rgba(255, 255, 255, 0.06);\n --oc-axis: rgba(255, 255, 255, 0.14);\n --oc-border: rgba(255, 255, 255, 0.1);\n\n /* Brand and semantic — accent stays cyan (no darkening on dark bg) */\n --oc-accent: #06b6d4;\n --oc-accent-strong: #06b6d4;\n --oc-positive: #4ade80;\n --oc-negative: #f87171;\n --oc-focus: #60a5fa;\n\n /* Interactive states */\n --oc-hover-bg: rgba(255, 255, 255, 0.05);\n --oc-tooltip-bg: rgba(17, 17, 19, 0.92);\n --oc-tooltip-border: rgba(255, 255, 255, 0.08);\n --oc-tooltip-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 1px rgba(0, 0, 0, 0.4);\n --oc-tooltip-text: #f7f8f8;\n --oc-legend-text: #d0d6e0;\n }\n}\n","@layer oc.components {\n /**\n * Sparkline display mode.\n *\n * Stamped on the SVG root as data-display=\"sparkline\" by the renderer when\n * the spec sets display: 'sparkline'. Strips any inherited padding/margin\n * so the mark renders truly edge-to-edge in tight container layouts (KPI\n * cards, table cells, dashboard tiles).\n */\n\n .oc-chart[data-display=\"sparkline\"] {\n display: block;\n margin: 0;\n padding: 0;\n }\n\n /**\n * Data-arrival pulse. The update driver stamps `oc-pulse` on the sparkline's\n * terminator dot when a transition finishes and strips it 600ms later.\n * Deliberately not scoped under `.oc-animate`: that class only exists during\n * the entrance window, and this fires on updates.\n */\n .oc-chart[data-display=\"sparkline\"] .oc-pulse {\n animation: oc-pulse 600ms ease-out;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .oc-chart[data-display=\"sparkline\"] .oc-pulse {\n animation: none;\n }\n }\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Graph\n * --------------------------------------------------------------------------- */\n\n .oc-graph-wrapper {\n position: relative;\n overflow: hidden;\n background: var(--oc-bg);\n font-family: var(--oc-font-family);\n width: 100%;\n height: 100%;\n }\n\n .oc-graph-canvas {\n display: block;\n width: 100%;\n height: 100%;\n cursor: grab;\n }\n\n .oc-graph-canvas--dragging {\n cursor: grabbing;\n }\n\n /* 3D surface. 3d-force-graph builds its own `div.scene-container` inside the\n * element it is handed and sizes the WebGL canvas imperatively, so the slot\n * has to fill the same box the 2D canvas fills or the first measurement is\n * zero-height. */\n .oc-graph-3d,\n .oc-graph-3d .scene-container {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .oc-graph-3d {\n cursor: grab;\n }\n\n .oc-graph-3d .scene-container canvas {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .oc-graph-chrome {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n z-index: 2;\n padding: 16px 16px 8px;\n pointer-events: none;\n\n & .oc-title {\n font-size: var(--oc-title-size);\n font-weight: var(--oc-title-weight);\n letter-spacing: var(--oc-title-tracking);\n color: var(--oc-text);\n margin: 0 0 4px;\n --_stroke: color-mix(in srgb, var(--oc-bg) 80%, transparent);\n text-shadow:\n -2px -2px 0 var(--_stroke),\n 2px -2px 0 var(--_stroke),\n -2px 2px 0 var(--_stroke),\n 2px 2px 0 var(--_stroke),\n 0 -2px 0 var(--_stroke),\n 0 2px 0 var(--_stroke),\n -2px 0 0 var(--_stroke),\n 2px 0 0 var(--_stroke);\n }\n\n & .oc-subtitle {\n font-size: var(--oc-subtitle-size);\n color: var(--oc-text-secondary);\n margin: 0;\n --_stroke: color-mix(in srgb, var(--oc-bg) 80%, transparent);\n text-shadow:\n -1px -1px 0 var(--_stroke),\n 1px -1px 0 var(--_stroke),\n -1px 1px 0 var(--_stroke),\n 1px 1px 0 var(--_stroke);\n }\n }\n\n .oc-graph-legend {\n position: absolute;\n top: 12px;\n right: 12px;\n /* Slightly translucent so the graph reads as continuous underneath, in\n * whatever surface the mount stamped on the wrapper. */\n background: color-mix(in srgb, var(--oc-bg) 88%, transparent);\n border: 1px solid var(--oc-border);\n border-radius: var(--oc-radius-lg);\n padding: 8px 12px;\n font-size: 12px;\n color: var(--oc-text-secondary);\n max-height: 200px;\n overflow-y: auto;\n }\n\n .oc-graph-legend-item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n /* Button reset for interactive rows (rendered as <button>). */\n width: 100%;\n margin: 0;\n background: none;\n border: none;\n font: inherit;\n color: inherit;\n text-align: left;\n cursor: default;\n }\n\n /* Interactive legend rows are buttons; give them affordance + a focus ring. */\n button.oc-graph-legend-item {\n cursor: pointer;\n border-radius: var(--oc-radius-sm);\n\n &:hover {\n background: var(--oc-focus-ring);\n }\n\n &:focus-visible {\n outline: 2px solid var(--oc-focus);\n outline-offset: 1px;\n }\n }\n\n /* De-emphasized (toggled-off) category. */\n .oc-graph-legend-item--inactive {\n opacity: 0.45;\n }\n\n .oc-graph-legend-label {\n flex: 1 1 auto;\n }\n\n .oc-graph-legend-count {\n color: var(--oc-text-secondary);\n font-variant-numeric: tabular-nums;\n margin-left: auto;\n padding-left: 8px;\n }\n\n .oc-graph-legend-swatch {\n width: 10px;\n height: 10px;\n border-radius: 50%;\n flex-shrink: 0;\n }\n\n /* Edge-legend swatches render as a short line, not a dot. */\n .oc-graph-legend-swatch--line {\n width: 12px;\n height: 3px;\n border-radius: 1px;\n }\n\n .oc-graph-search {\n position: absolute;\n top: 12px;\n left: 12px;\n\n & input {\n font-family: var(--oc-font-family);\n font-size: var(--oc-body-size);\n padding: 6px 10px;\n border: 1px solid var(--oc-border);\n border-radius: var(--oc-radius-md);\n background: color-mix(in srgb, var(--oc-bg) 88%, transparent);\n color: var(--oc-text);\n outline: none;\n\n &:focus {\n border-color: var(--oc-focus);\n box-shadow: 0 0 0 2px var(--oc-focus-ring-strong);\n }\n }\n }\n\n /*\n * No dark-mode canvas override lives here. graph-mount stamps the resolved\n * theme surface on the wrapper (--oc-bg), so dark graphs sit on the same\n * --oc-bg the rest of the library uses instead of a private GitHub-dark hex,\n * and the legend/search panels mix against whatever that surface is.\n */\n}\n","@layer oc.animation {\n /* ---------------------------------------------------------------------------\n * Animation keyframes\n * --------------------------------------------------------------------------- */\n\n /* Bar entrance: clip-path reveal bottom-to-top + fade in (vertical columns).\n Bars grow upward from baseline with a soft opacity fade. */\n @keyframes oc-enter-bar {\n from {\n clip-path: inset(100% 0 0 0);\n opacity: 0;\n }\n 75% {\n opacity: 1;\n }\n to {\n clip-path: inset(0 0 0 0);\n opacity: 1;\n }\n }\n\n /* Bar entrance: clip-path reveal left-to-right + fade in (horizontal bars).\n Bars grow rightward from axis with a soft opacity fade. */\n @keyframes oc-enter-bar-h {\n from {\n clip-path: inset(0 100% 0 0);\n opacity: 0;\n }\n 75% {\n opacity: 1;\n }\n to {\n clip-path: inset(0 0 0 0);\n opacity: 1;\n }\n }\n\n /* Line/area entrance: clip-path reveal left-to-right + fade in.\n Lines draw in following reading direction with a soft lead-in. */\n @keyframes oc-enter-line {\n from {\n clip-path: inset(0 100% 0 0);\n opacity: 0;\n }\n 15% {\n opacity: 1;\n }\n to {\n clip-path: inset(0 0 0 0);\n opacity: 1;\n }\n }\n\n /* Point/arc entrance: scale up + fade in from center */\n @keyframes oc-enter-point {\n from {\n opacity: 0;\n transform: scale(0.3);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n /* Map feature entrance: fade in while transitioning fill from a neutral base\n to the data-driven color stored in --oc-feature-fill. The target opacity is\n --oc-feature-target-opacity (default 1) so features under a focus dim\n animate straight to their dimmed rest opacity instead of hitting 1 and then\n snapping down when the dim is applied post-animation.\n Non-interpolable fills (the url(#pattern) hatch on no-data features) do not\n transition: the browser holds the neutral and flips to the pattern when the\n eased progress passes 50%, so those features fade in rather than\n cross-fade. */\n @keyframes oc-enter-map-fill {\n from {\n fill: var(--oc-secondary);\n opacity: 0;\n }\n to {\n fill: var(--oc-feature-fill);\n opacity: var(--oc-feature-target-opacity, 1);\n }\n }\n\n /* Map point pop-in: gentle scale from 0.75 + fade. Uses transform-origin to\n scale from the circle's own center (cx/cy) rather than the SVG origin. */\n @keyframes oc-enter-map-point {\n from {\n opacity: 0;\n transform: scale(0.75);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n /* Pure opacity fade (no transform). Safe for elements with existing transforms\n like arc groups that use translate() for positioning. */\n @keyframes oc-enter-fade-only {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n /* Fade + subtle slide up for text, rule, tick, annotations */\n @keyframes oc-enter-fade {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n /* Table row entrance: slide up only, no opacity (cells fade independently\n to avoid opacity compounding between row and cell animations) */\n @keyframes oc-table-enter-row {\n from {\n transform: translateY(6px);\n }\n to {\n transform: translateY(0);\n }\n }\n\n /* Table bar fill entrance: clip-path grow only, no opacity\n (preserves resting opacity: 0.15 from table.css) */\n @keyframes oc-table-enter-bar-fill {\n from {\n clip-path: inset(0 100% 0 0);\n }\n to {\n clip-path: inset(0 0 0 0);\n }\n }\n\n /* Live-tile pulse: the terminator dot of a sparkline swells once when new\n data lands, so a glance at a wall of tiles catches which one just moved.\n `r` is animated as a presentation attribute (SVG geometry properties are\n animatable in CSS); the fallback is simply no swell. */\n @keyframes oc-pulse {\n 0% {\n r: var(--oc-pulse-r, 4px);\n fill-opacity: 1;\n }\n 45% {\n r: calc(var(--oc-pulse-r, 4px) * 1.8);\n fill-opacity: 0.5;\n }\n 100% {\n r: var(--oc-pulse-r, 4px);\n fill-opacity: 1;\n }\n }\n\n /* Tooltip entrance */\n @keyframes oc-tooltip-in {\n from {\n opacity: 0;\n transform: translateY(2px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n}\n","@layer oc.base {\n /* ---------------------------------------------------------------------------\n * Wrapper roots\n * --------------------------------------------------------------------------- */\n\n .oc-chart-root {\n width: 100%;\n height: 100%;\n }\n\n .oc-table-root,\n .oc-graph-root,\n .oc-sankey-root,\n .oc-barlist-root,\n .oc-tilemap-root,\n .oc-map-root {\n width: 100%;\n height: 100%;\n }\n\n .oc-table-root {\n overflow: auto;\n }\n\n /* ---------------------------------------------------------------------------\n * Chart container\n * --------------------------------------------------------------------------- */\n\n .oc-chart {\n font-family: var(--oc-font-family);\n font-variant-numeric: tabular-nums;\n display: block;\n width: 100%;\n }\n\n /* ---------------------------------------------------------------------------\n * BarList SVG container\n * --------------------------------------------------------------------------- */\n\n .oc-tilemap,\n .oc-map {\n display: block;\n width: 100%;\n height: auto;\n }\n\n .oc-map-feature {\n transition:\n opacity var(--oc-hover-duration) ease-out,\n stroke-width 140ms ease-out;\n }\n\n .oc-barlist {\n display: block;\n width: 100%;\n }\n\n /* ---------------------------------------------------------------------------\n * Screen reader only utility\n * --------------------------------------------------------------------------- */\n\n /* `overflow: clip`, not `hidden` — see applySrOnlyStyles in\n packages/vanilla/src/dom-helpers.ts for why. Keep the two in sync. */\n .oc-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: clip;\n clip-path: inset(50%);\n white-space: nowrap;\n border-width: 0;\n }\n\n /* ---------------------------------------------------------------------------\n * Editable hover feedback\n * --------------------------------------------------------------------------- */\n\n .oc-editable-hover {\n outline: 1.5px solid var(--oc-editable-hover);\n outline-offset: 2px;\n border-radius: var(--oc-radius-sm);\n }\n\n /* ---------------------------------------------------------------------------\n * Keyboard focus indicators\n *\n * --oc-focus carries a light value in tokens.css and a dark value in\n * dark.css, so both rings stay visible in either mode.\n * --------------------------------------------------------------------------- */\n\n /* Container ring when the chart itself receives keyboard focus. */\n .oc-root:focus-visible {\n outline: 2px solid var(--oc-focus);\n outline-offset: 2px;\n }\n\n /* Mark ring during arrow-key navigation (see wireKeyboardNav). Outline on\n * SVG elements draws around the mark's bounding box, same technique as\n * .oc-editable-hover above. */\n .oc-mark-focused {\n outline: 2px solid var(--oc-focus);\n outline-offset: 1px;\n border-radius: var(--oc-radius-sm);\n }\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Chrome (eyebrow, title, subtitle, source, byline, footer, brand)\n * --------------------------------------------------------------------------- */\n\n .oc-chrome {\n font-family: var(--oc-font-family);\n }\n\n .oc-eyebrow {\n font-size: var(--oc-eyebrow-size);\n font-weight: var(--oc-eyebrow-weight);\n letter-spacing: var(--oc-eyebrow-tracking);\n text-transform: uppercase;\n fill: var(--oc-accent);\n }\n\n .oc-title {\n font-size: var(--oc-title-size);\n font-weight: var(--oc-title-weight);\n letter-spacing: var(--oc-title-tracking);\n fill: var(--oc-text);\n }\n\n .oc-subtitle {\n font-size: var(--oc-subtitle-size);\n font-weight: var(--oc-subtitle-weight);\n fill: var(--oc-text-muted);\n }\n\n .oc-source,\n .oc-byline,\n .oc-footer {\n font-size: var(--oc-source-size);\n font-weight: var(--oc-source-weight);\n fill: var(--oc-text-muted);\n }\n\n .oc-brand {\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.02em;\n fill: var(--oc-text-faint);\n }\n\n .oc-brand-dot {\n fill: var(--oc-accent);\n }\n\n .oc-eyebrow-dot {\n fill: var(--oc-accent);\n }\n\n /* ---------------------------------------------------------------------------\n * Metric bar (.oc-metrics) — optional row of label/value cells above chart\n * --------------------------------------------------------------------------- */\n\n .oc-metrics {\n font-family: var(--oc-font-family);\n }\n\n .oc-metric-label {\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n fill: var(--oc-text-muted);\n }\n\n .oc-metric-value {\n font-size: 22px;\n font-weight: 600;\n letter-spacing: -0.02em;\n fill: var(--oc-text);\n font-variant-numeric: tabular-nums;\n }\n\n .oc-metric-delta-up {\n fill: var(--oc-positive);\n font-size: 12px;\n font-weight: 500;\n }\n\n .oc-metric-delta-down {\n fill: var(--oc-negative);\n font-size: 12px;\n font-weight: 500;\n }\n\n /* A multiplier or a run-rate is context, not a positive signal: the green\n that belonged here made every secondary read as good news. */\n .oc-metric-secondary {\n fill: var(--oc-text-muted);\n font-size: 12px;\n font-weight: 400;\n }\n\n /* ---------------------------------------------------------------------------\n * Axis tick labels — inline variant sits above each gridline at the\n * chart-area left edge (no left gutter). Used by line/area y-axes.\n * --------------------------------------------------------------------------- */\n\n .oc-axis-tick-inline {\n font-size: 11px;\n font-weight: 400;\n fill: var(--oc-text-muted);\n }\n\n /* ---------------------------------------------------------------------------\n * Endpoint labels (right-side per-series column for line/area charts)\n *\n * Swatch idiom: a thicker colored stroke segment with an optional thinner\n * lighter strip below. Mirrors the refreshed traditional legend swatch so a\n * single chart never shows two swatch idioms (mock-2 alignment). Per-series\n * color is stamped inline by the renderer; CSS tokens here cover the muted\n * value text and the leader line so theme overrides flow through naturally.\n * --------------------------------------------------------------------------- */\n\n .oc-endpoint-labels {\n font-family: var(--oc-font-family);\n }\n\n .oc-endpoint-label {\n /* Color set inline per series; this fallback only kicks in if the renderer\n ever omits the inline fill. */\n fill: var(--oc-endpoint-label-color, var(--oc-text));\n }\n\n .oc-endpoint-value {\n fill: var(--oc-endpoint-value-color, var(--oc-text-muted));\n }\n\n .oc-endpoint-leader {\n stroke: var(--oc-endpoint-leader-color, currentColor);\n }\n\n /* .oc-endpoint-marker — fill/stroke set inline (open-ring style: bg fill, series stroke). */\n /* .oc-endpoint-swatch — color set inline per series. */\n\n /* ---------------------------------------------------------------------------\n * Annotation dot + subtitle (text-annotation extensions)\n * --------------------------------------------------------------------------- */\n\n /* .oc-annotation-dot — fill/stroke resolved by the engine (open-ring default = bg fill, series stroke). */\n\n .oc-annotation-subtitle {\n fill: var(--oc-annotation-subtitle-color, var(--oc-text-muted));\n }\n\n /* ---------------------------------------------------------------------------\n * Table footer chrome\n * --------------------------------------------------------------------------- */\n\n /* Footer row: source/footer text on the left, brand watermark on the right,\n * sharing a single baseline. gap keeps them apart if the row gets narrow. */\n .oc-table-footer-row {\n display: flex;\n align-items: baseline;\n gap: 16px;\n padding: 16px 16px 4px;\n }\n\n /* Chrome block sits inside the flex row now, so it no longer owns the\n * footer's top padding or horizontal inset (the row provides both). */\n .oc-chrome-footer {\n padding-top: 0;\n }\n\n /* Brand watermark: pushed to the right edge (margin-left:auto holds it there\n * even when the source text is absent), never shrinks below its own text. */\n .oc-table-footer-row .oc-table-ref {\n margin-left: auto;\n flex-shrink: 0;\n text-align: right;\n }\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Legend\n * --------------------------------------------------------------------------- */\n\n /* Font size and text fill are set inline by the renderer's applyTextStyle\n * from the engine-computed legend layout, which is authoritative (11px).\n * Only the family, which nothing computes per-entry, lives here. */\n .oc-legend {\n font-family: var(--oc-font-family);\n }\n\n .oc-legend-entry {\n cursor: default;\n }\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Tooltip\n * Editorial card matching the new design system: zinc surface, cyan accent,\n * Inter Variable, mono numerics. Sized for a slice tooltip that lists every\n * series at the snapped x.\n * --------------------------------------------------------------------------- */\n\n .oc-tooltip {\n position: absolute;\n display: none;\n pointer-events: none;\n z-index: 1000;\n background: var(--oc-tooltip-bg);\n backdrop-filter: blur(14px);\n border: 1px solid var(--oc-tooltip-border);\n border-radius: var(--oc-radius-lg);\n box-shadow: var(--oc-tooltip-shadow);\n color: var(--oc-tooltip-text);\n font-family: var(--oc-font-family);\n font-size: 12px;\n padding: 0;\n max-width: 280px;\n min-width: 140px;\n line-height: 1.4;\n animation: oc-tooltip-in 120ms ease-out;\n transition:\n left 100ms ease-in-out,\n top 100ms ease-in-out;\n\n & .oc-tooltip-header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 10px 6px;\n }\n\n & .oc-tooltip-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n }\n\n & .oc-tooltip-title {\n font-weight: 600;\n font-size: 11px;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--oc-text-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n & .oc-tooltip-body {\n padding: 6px 10px 8px;\n border-top: 1px solid var(--oc-tooltip-border);\n }\n\n /* No separator when body is the only child */\n & .oc-tooltip-body:first-child {\n border-top: none;\n padding-top: 10px;\n }\n\n & .oc-tooltip-row {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 16px;\n padding: 2px 0;\n }\n\n & .oc-tooltip-row-swatch {\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n margin-right: 6px;\n flex-shrink: 0;\n transform: translateY(-1px);\n }\n\n & .oc-tooltip-label {\n color: var(--oc-text-secondary);\n font-size: 12px;\n font-weight: 400;\n white-space: nowrap;\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n }\n\n & .oc-tooltip-value {\n font-weight: 500;\n font-size: 12px;\n font-variant-numeric: tabular-nums;\n color: var(--oc-tooltip-text);\n text-align: right;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n /* The series the pointer is nearest to in a shared tooltip. */\n & .oc-tooltip-row--emphasis .oc-tooltip-label {\n color: var(--oc-tooltip-text);\n font-weight: 600;\n }\n\n & .oc-tooltip-row--emphasis .oc-tooltip-value {\n font-weight: 600;\n }\n\n /* Stack sum, set below a hairline so it reads as a summary of the rows\n * above rather than one more series. */\n & .oc-tooltip-row--total {\n margin-top: 4px;\n padding-top: 5px;\n border-top: 1px solid var(--oc-tooltip-border);\n }\n\n & .oc-tooltip-row--total .oc-tooltip-label {\n color: var(--oc-tooltip-text);\n font-weight: 500;\n }\n\n & .oc-tooltip-row--total .oc-tooltip-value {\n font-weight: 600;\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Crosshair guideline + per-series snap dots (line/area charts)\n * Animate the snap between adjacent points so the indicator slides instead\n * of jumping. ~50ms ease-in-out keeps the motion crisp without lagging.\n * --------------------------------------------------------------------------- */\n\n .oc-crosshair {\n pointer-events: none;\n transition:\n x1 50ms ease-in-out,\n x2 50ms ease-in-out;\n }\n\n .oc-snap-dots circle {\n pointer-events: none;\n transition:\n cx 50ms ease-in-out,\n cy 50ms ease-in-out;\n }\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Hover language\n *\n * One vocabulary for mark hover, legend hover and the crosshair. Emphasis is\n * always a CLASS, never an inline style: a class beats the renderer's\n * `opacity` attributes (suppressed points under endpoint markers keep their\n * opacity=\"0\") and loses to the transition driver's per-frame inline\n * `style.opacity`, which is exactly the precedence a hover during a data\n * update needs.\n * --------------------------------------------------------------------------- */\n\n .oc-marks.oc-hover-active .oc-mark--dim:not([opacity=\"0\"]) {\n opacity: var(--oc-hover-dim);\n }\n\n /* Single-series register: outline the hovered mark instead of dimming eleven\n * others. Scoped per mark type -- an inherited stroke on a line or area group\n * would repaint the series in the text color. */\n .oc-marks.oc-hover-active .oc-mark-rect.oc-mark--hover > *,\n .oc-marks.oc-hover-active .oc-mark-arc.oc-mark--hover > *,\n .oc-marks.oc-hover-active circle.oc-mark-point.oc-mark--hover {\n stroke: var(--oc-text);\n stroke-width: 1;\n }\n\n /* The fade is switched off while the rAF transition driver owns opacity: an\n * unscoped 140ms transition would smear every frame of an update tween.\n * `.oc-animate` is excluded for the same reason during the entrance.\n *\n * It is NOT scoped to `.oc-hover-active`: dropping the class on mouseleave\n * would drop the transition with it, so the dim faded in and snapped back. */\n .oc-chart:not(.oc-animate):not(.oc-transitioning) .oc-marks .oc-mark {\n transition: opacity var(--oc-hover-duration) ease-out;\n }\n\n /* ---------------------------------------------------------------------------\n * Legend hover-link\n *\n * The swatch dims; the label text stays at full contrast so the list is still\n * readable while one series is raised.\n * --------------------------------------------------------------------------- */\n\n .oc-legend-entry--dim .oc-legend-swatch-line,\n .oc-legend-entry--dim .oc-legend-swatch-rect,\n .oc-legend-entry--dim > circle {\n opacity: var(--oc-hover-dim);\n transition: opacity var(--oc-hover-duration) ease-out;\n }\n\n .oc-legend-hit {\n fill: transparent;\n }\n\n .oc-legend-entry:focus {\n outline: none;\n }\n\n /* Focus ring on the 24px hit rect, drawn as a stroke: `outline` on an SVG\n * group is inconsistent across browsers, a stroke is not. */\n .oc-legend-entry:focus-visible .oc-legend-hit {\n stroke: var(--oc-focus);\n stroke-width: 2;\n }\n\n /* ---------------------------------------------------------------------------\n * Endpoint-label hover-link\n * --------------------------------------------------------------------------- */\n\n .oc-endpoint-label-entry {\n cursor: default;\n }\n\n /* ---------------------------------------------------------------------------\n * Map hover\n *\n * Feature hover is outline + raise, never dim-the-rest: toggling opacity on\n * three thousand county paths every time the pointer crosses a border is a\n * repaint storm, and the wave of fades reads as a flicker. Datawrapper and the\n * FT outline too. `non-scaling-stroke` keeps the outline 1.5px through the\n * camera's zoom transform, which otherwise scales stroke width with geometry.\n * --------------------------------------------------------------------------- */\n\n .oc-map-feature--hover {\n stroke: var(--oc-text);\n stroke-width: 1.5;\n vector-effect: non-scaling-stroke;\n }\n\n /* Legend-bin hover IS where dim-the-rest belongs: pointing at one class is a\n * deliberate \"show me these\" gesture, and the answer is the set of features in\n * that class. Static rules per class index keep it to one attribute write on\n * the group rather than a class toggle per feature. */\n .oc-map-features[data-hover] .oc-map-feature {\n transition: opacity var(--oc-hover-duration) ease-out;\n }\n\n .oc-map-features[data-hover=\"0\"] .oc-map-feature:not([data-bin-index=\"0\"]),\n .oc-map-features[data-hover=\"1\"] .oc-map-feature:not([data-bin-index=\"1\"]),\n .oc-map-features[data-hover=\"2\"] .oc-map-feature:not([data-bin-index=\"2\"]),\n .oc-map-features[data-hover=\"3\"] .oc-map-feature:not([data-bin-index=\"3\"]),\n .oc-map-features[data-hover=\"4\"] .oc-map-feature:not([data-bin-index=\"4\"]),\n .oc-map-features[data-hover=\"5\"] .oc-map-feature:not([data-bin-index=\"5\"]),\n .oc-map-features[data-hover=\"6\"] .oc-map-feature:not([data-bin-index=\"6\"]),\n .oc-map-features[data-hover=\"7\"] .oc-map-feature:not([data-bin-index=\"7\"]),\n .oc-map-features[data-hover=\"8\"] .oc-map-feature:not([data-bin-index=\"8\"]),\n .oc-map-features[data-hover=\"9\"] .oc-map-feature:not([data-bin-index=\"9\"]),\n .oc-map-features[data-hover=\"10\"] .oc-map-feature:not([data-bin-index=\"10\"]),\n .oc-map-features[data-hover=\"11\"] .oc-map-feature:not([data-bin-index=\"11\"]) {\n opacity: var(--oc-map-hover-dim);\n }\n\n .oc-legend-bin {\n cursor: default;\n }\n\n /* ---------------------------------------------------------------------------\n * Tile hover\n *\n * A tile grid is 51 rects, not 3000 paths, and every tile is the same size --\n * so here the full hover language applies: the hovered tile takes an outline\n * and the rest drop back.\n * --------------------------------------------------------------------------- */\n\n .oc-tilemap-tiles.oc-hover-active .oc-tilemap-tile {\n transition: opacity var(--oc-hover-duration) ease-out;\n }\n\n .oc-tilemap-tiles.oc-hover-active .oc-tilemap-tile:not(.oc-tilemap-tile--hover) {\n opacity: var(--oc-hover-dim);\n }\n\n .oc-tilemap-tile--hover > rect {\n stroke: var(--oc-text);\n stroke-width: 1.5;\n }\n}\n","@layer oc.components {\n /* ---------------------------------------------------------------------------\n * Series search (seriesSearch)\n *\n * DOM combobox overlaid on the SVG band the engine reserves below chrome.\n * The wrapper is absolutely positioned by the vanilla adapter (inline\n * left/top/width/height), so everything here is visual only. All colors come\n * from --oc-* tokens, which flip in .oc-dark.\n * --------------------------------------------------------------------------- */\n\n .oc-series-search {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n font-family: var(--oc-font-family);\n z-index: 10;\n }\n\n /* Chips: removable filter tokens for the current selection. They flow to the\n * left of the input and scroll horizontally rather than wrapping over the\n * chart when a reader picks many series. */\n .oc-series-search-chips {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n overflow-x: auto;\n scrollbar-width: none;\n }\n\n .oc-series-search-chips::-webkit-scrollbar {\n display: none;\n }\n\n .oc-series-search-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 4px 3px 10px;\n border: 1px solid var(--oc-border);\n border-radius: var(--oc-radius-full);\n background: var(--oc-secondary);\n color: var(--oc-text-secondary);\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n white-space: nowrap;\n }\n\n .oc-series-search-chip-remove {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n /* 16px glyph, but a >=24px hit area (WCAG 2.5.5 target size) via padding\n pulled back with negative margin so the chip layout stays tight. */\n width: 16px;\n height: 16px;\n padding: 4px;\n margin: -4px -2px -4px -4px;\n border: none;\n border-radius: 50%;\n background: transparent;\n color: var(--oc-text-muted);\n cursor: pointer;\n transition:\n color 0.15s,\n background-color 0.15s;\n }\n\n .oc-series-search-chip-remove:hover {\n color: var(--oc-text);\n background: var(--oc-hover-bg);\n }\n\n .oc-series-search-chip-remove:focus-visible {\n outline: 2px solid var(--oc-focus);\n outline-offset: 1px;\n }\n\n .oc-series-search-chip-remove svg {\n display: block;\n }\n\n /* Combobox: input + popup listbox. Styling matches the table search input\n * (border, radius, focus ring) so the two search surfaces read as one system. */\n .oc-series-search-box {\n position: relative;\n flex: 0 1 220px;\n min-width: 120px;\n }\n\n .oc-series-search-icon {\n position: absolute;\n left: 9px;\n top: 50%;\n transform: translateY(-50%);\n color: var(--oc-text-muted);\n pointer-events: none;\n }\n\n /* Shared skin provided by the grouped rule in table.css.\n Only divergent props live here. */\n .oc-series-search-input {\n height: 32px;\n padding: 0 10px 0 28px;\n }\n\n .oc-series-search-listbox {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n min-width: 100%;\n max-height: 240px;\n overflow-y: auto;\n margin: 0;\n padding: 4px;\n list-style: none;\n border: 1px solid var(--oc-border);\n border-radius: var(--oc-radius-lg);\n background: var(--oc-card);\n box-shadow: var(--oc-tooltip-shadow);\n z-index: 20;\n }\n\n .oc-series-search-option {\n padding: 6px 10px;\n border-radius: var(--oc-radius-sm);\n font-size: 13px;\n color: var(--oc-text);\n cursor: pointer;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .oc-series-search-option[aria-selected=\"true\"],\n .oc-series-search-option:hover {\n background: var(--oc-hover-bg);\n }\n\n /* The typed substring within each suggestion. */\n .oc-series-search-match {\n font-weight: 600;\n }\n\n .oc-series-search-empty {\n padding: 6px 10px;\n font-size: 12px;\n color: var(--oc-text-muted);\n }\n}\n","@layer oc.animation {\n /* ---------------------------------------------------------------------------\n * Animation scoped rules (.oc-animate enables animation on the chart root)\n * --------------------------------------------------------------------------- */\n\n .oc-animate {\n /* Vertical bars (default): smooth ease-out, no overshoot.\n oc-mark-bar is reserved for future mark type aliases.\n A bar with a value-end radius draws as <path> rather than <rect>\n (SVG rx rounds all four corners or none), so both shapes match. */\n & .oc-mark-rect :is(rect, path),\n & .oc-mark-bar :is(rect, path) {\n animation: oc-enter-bar var(--oc-animation-duration) var(--oc-ease-smooth) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Horizontal bars (data-orient is on the mark group, not the SVG root) */\n & .oc-mark-rect[data-orient=\"horizontal\"] :is(rect, path),\n & .oc-mark-bar[data-orient=\"horizontal\"] :is(rect, path) {\n animation-name: oc-enter-bar-h;\n }\n\n /* Stacked bar/column segments: chain sequentially so each segment starts\n right when the previous one finishes, creating one fluid reveal.\n Uses linear easing so handoffs between segments are seamless (no\n deceleration/acceleration stutter at segment boundaries). */\n & .oc-mark-rect[data-stack-pos] :is(rect, path) {\n animation-duration: var(--oc-stack-segment-duration, 150ms);\n animation-timing-function: linear;\n animation-delay: calc(\n var(--oc-animation-stagger) *\n var(--oc-mark-index, 0) +\n var(--oc-stack-pos, 0) *\n var(--oc-stack-segment-duration, 150ms)\n );\n }\n\n /* Line marks: entire group clips left-to-right (no WAAPI needed) */\n & .oc-mark-line {\n animation: oc-enter-line var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Area marks: entire group clips left-to-right + fades in */\n & .oc-mark-area {\n animation: oc-enter-line var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Arc marks (pie/donut slices): simple fade in.\n Scale transforms break arc positioning because arcs use translate()\n on parent groups. A clean fade is more elegant for pie/donut anyway. */\n & .oc-mark-arc {\n animation: oc-enter-fade-only var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Point marks (scatter, dot).\n Points render as bare <circle> elements with class oc-mark-point directly,\n not wrapped in a group, so we target circle.oc-mark-point (not descendant).\n Duration is 40% of the configured duration (quick pop-in relative to other marks). */\n & circle.oc-mark-point,\n & circle.oc-mark-circle {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.4)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Points on line/area charts: delay so they pop in as the line draws through. */\n & .oc-mark-line ~ circle.oc-mark-point,\n & .oc-mark-area ~ circle.oc-mark-point {\n animation-delay: calc(\n var(--oc-animation-duration) *\n 0.35 +\n var(--oc-animation-stagger) *\n var(--oc-mark-index, 0)\n );\n }\n\n /* Text marks: fade + slight slide up */\n & .oc-mark-text text {\n animation: oc-enter-fade calc(var(--oc-animation-duration) * 0.6)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Rule marks: fade in */\n & .oc-mark-rule line {\n animation: oc-enter-fade calc(var(--oc-animation-duration) * 0.5)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Tick marks: fade in */\n & .oc-mark-tick line {\n animation: oc-enter-fade calc(var(--oc-animation-duration) * 0.5)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Data labels: fade after their parent mark */\n & .oc-mark-label {\n animation: oc-enter-fade 250ms var(--oc-ease-smooth) both;\n animation-delay: calc(\n var(--oc-animation-stagger) *\n var(--oc-mark-index, 0) +\n var(--oc-animation-duration) *\n 0.7\n );\n }\n\n /* Annotations: fade in after marks finish */\n & .oc-annotation {\n animation: oc-enter-fade 300ms var(--oc-ease-smooth) both;\n animation-delay: calc(var(--oc-animation-duration) + var(--oc-annotation-delay, 150ms));\n }\n\n /* Tilemap tiles: fade in with jittered stagger for organic feel.\n Per-tile delay is computed in the renderer with pseudo-random variation. */\n & .oc-tilemap-tile {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.35) ease-in both;\n animation-delay: var(--oc-tile-delay, 0ms);\n }\n\n /* Map features: fill color reveal with shuffled stagger.\n Per-feature --oc-map-delay is computed in the renderer via a seeded\n Fisher-Yates shuffle so features pop in organically. */\n & .oc-map-feature {\n animation: oc-enter-map-fill var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: var(--oc-map-delay, 0ms);\n }\n\n /* Bulk mode: high feature counts (counties, ~3k+) get a single group\n fade instead of per-feature fill animations. opacity is GPU-compositable\n so this stays smooth regardless of child count. */\n & .oc-map-features[data-bulk-animate] {\n animation: oc-enter-fade-only var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n }\n\n & .oc-map-features[data-bulk-animate] .oc-map-feature {\n animation: none;\n }\n\n /* Map borders: fade in near the end of the feature sweep */\n & .oc-map-borders path {\n animation: oc-enter-fade-only calc(var(--oc-animation-duration) * 0.4) ease-in both;\n animation-delay: calc(var(--oc-animation-duration) * 0.7);\n }\n\n /* Map points: gentle scale (0.75->1) + fade pop-in after borders.\n transform-origin set per-circle in the renderer so scale happens\n around each circle's own center, not the SVG origin. */\n & .oc-map-point {\n animation: oc-enter-map-point calc(var(--oc-animation-duration) * 0.4)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(\n var(--oc-animation-duration) *\n 0.8 +\n var(--oc-mark-index, 0) *\n var(--oc-point-stagger, 60ms)\n );\n }\n\n /* Sankey nodes: fade in with stagger by column depth (left-to-right) */\n & .oc-sankey-node rect {\n animation: oc-enter-fade-only var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(var(--oc-animation-stagger) * var(--oc-mark-index, 0));\n }\n\n /* Sankey links: fade in after nodes, with stagger.\n Links delay by 30% of duration so nodes appear first, then links flow in. */\n & .oc-sankey-link path {\n animation: oc-enter-fade-only var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: calc(\n var(--oc-animation-duration) *\n 0.3 +\n var(--oc-animation-stagger) *\n var(--oc-mark-index, 0)\n );\n }\n\n /* Barlist rows: fade + slide up per row, bars grow left-to-right */\n & .oc-barlist-row {\n animation: oc-enter-fade calc(var(--oc-animation-duration) * 0.6)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: var(--oc-row-delay, 0ms);\n }\n\n & .oc-barlist-bar {\n animation: oc-enter-bar-h var(--oc-animation-duration)\n var(--oc-animation-ease, var(--oc-ease-smooth)) both;\n animation-delay: var(--oc-row-delay, 0ms);\n }\n }\n\n /* ---------------------------------------------------------------------------\n * Sparkline mode: pair the line/area reveal with a stronger ease-out so it\n * doesn't read as a uniform left-to-right swipe. cubic-bezier(0.16, 1, 0.3, 1)\n * is \"expo-out\" — fast initial draw that decelerates noticeably at the end,\n * giving the trend a hand-drawn feel. Duration is bumped via the engine\n * (compile.ts) so the cleanup timer stays in sync.\n * --------------------------------------------------------------------------- */\n\n .oc-animate[data-display=\"sparkline\"] .oc-mark-line,\n .oc-animate[data-display=\"sparkline\"] .oc-mark-area {\n animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);\n }\n}\n","/* ---------------------------------------------------------------------------\n * Reduced motion\n *\n * Catch-all: last-declared layer beats every earlier layer regardless of\n * specificity. No !important, no hand-maintained selector mirror.\n *\n * Selector list matches CSS_TOKEN_ROOT_SELECTORS in token-definitions.ts.\n * --------------------------------------------------------------------------- */\n\n@layer oc.reduced-motion {\n @media (prefers-reduced-motion: reduce) {\n :is(\n .oc-root,\n .oc-chart-root,\n .oc-table-wrapper,\n .oc-table-root,\n .oc-graph-wrapper,\n .oc-graph-root,\n .oc-sankey-root,\n .oc-tilemap-root,\n .oc-barlist-root,\n .oc-map-root\n ),\n :is(\n .oc-root,\n .oc-chart-root,\n .oc-table-wrapper,\n .oc-table-root,\n .oc-graph-wrapper,\n .oc-graph-root,\n .oc-sankey-root,\n .oc-tilemap-root,\n .oc-barlist-root,\n .oc-map-root\n )\n *,\n :is(\n .oc-root,\n .oc-chart-root,\n .oc-table-wrapper,\n .oc-table-root,\n .oc-graph-wrapper,\n .oc-graph-root,\n .oc-sankey-root,\n .oc-tilemap-root,\n .oc-barlist-root,\n .oc-map-root\n )\n *::before,\n :is(\n .oc-root,\n .oc-chart-root,\n .oc-table-wrapper,\n .oc-table-root,\n .oc-graph-wrapper,\n .oc-graph-root,\n .oc-sankey-root,\n .oc-tilemap-root,\n .oc-barlist-root,\n .oc-map-root\n )\n *::after {\n animation: none;\n transition: none;\n }\n }\n}\n"],"names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opendata-ai/openchart-react",
|
|
3
|
-
"version": "8.6.
|
|
3
|
+
"version": "8.6.4",
|
|
4
4
|
"description": "React components for openchart: <Chart />, <DataTable />, <VizThemeProvider />",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Riley Hilliard",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"typecheck": "tsc --noEmit"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@opendata-ai/openchart-core": "8.6.
|
|
57
|
-
"@opendata-ai/openchart-engine": "8.6.
|
|
58
|
-
"@opendata-ai/openchart-vanilla": "8.6.
|
|
56
|
+
"@opendata-ai/openchart-core": "8.6.4",
|
|
57
|
+
"@opendata-ai/openchart-engine": "8.6.4",
|
|
58
|
+
"@opendata-ai/openchart-vanilla": "8.6.4"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"react": ">=18.0.0",
|