@opendata-ai/openchart-vue 8.4.0 → 8.5.0

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.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/BarList.ts","../src/context.ts","../src/Chart.ts","../src/ChartStory.ts","../src/composables/useChart.ts","../src/composables/useDarkMode.ts","../src/composables/useGraph.ts","../src/composables/useTable.ts","../src/composables/useTableState.ts","../src/DataTable.ts","../src/GeoMap.ts","../src/Graph.ts","../src/Sankey.ts","../src/ThemeProvider.ts","../src/TileMap.ts","../src/Visualization.ts"],"sourcesContent":["/**\n * @opendata-ai/openchart-vue\n *\n * Vue 3 adapter for openchart. Provides <Chart />, <DataTable />, <Graph />,\n * and <VizThemeProvider /> components that wrap the vanilla adapter with\n * Vue lifecycle management.\n *\n * Re-exports the full core type system and utilities so Vue consumers\n * only need a single @opendata-ai/openchart-vue 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 { BarListProps, BarListRowEvent } from './BarList';\nexport { BarList } from './BarList';\n// Components\nexport type { ChartProps } from './Chart';\nexport { Chart } from './Chart';\nexport type { ChartStoryProps } from './ChartStory';\n// Scrollytelling\nexport { ChartStory } from './ChartStory';\n// Composables\nexport type { UseChartOptions, UseChartReturn } from './composables/useChart';\nexport { useChart } from './composables/useChart';\nexport { useDarkMode } from './composables/useDarkMode';\nexport type { GraphHandle, UseGraphReturn } from './composables/useGraph';\nexport { useGraph } from './composables/useGraph';\nexport type { UseTableReturn } from './composables/useTable';\nexport { useTable } from './composables/useTable';\nexport type { UseTableStateOptions, UseTableStateReturn } from './composables/useTableState';\nexport { useTableState } from './composables/useTableState';\n// Context (injection keys and composables)\nexport { useVizDarkMode, useVizTheme, VizDarkModeKey, VizThemeKey } from './context';\nexport type { DataTableProps } from './DataTable';\nexport { DataTable } from './DataTable';\nexport type { GeoMapProps } from './GeoMap';\nexport { GeoMap } from './GeoMap';\nexport type { GraphProps } from './Graph';\nexport { Graph } from './Graph';\nexport type { SankeyProps } from './Sankey';\nexport { Sankey } from './Sankey';\nexport type { VizThemeProviderProps } from './ThemeProvider';\nexport { VizThemeProvider } from './ThemeProvider';\nexport type { TileMapProps } from './TileMap';\nexport { TileMap } from './TileMap';\nexport type { VisualizationProps } from './Visualization';\nexport { Visualization } from './Visualization';\n","/**\n * Vue BarList component: thin wrapper around the vanilla adapter.\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 defineComponent,\n h,\n inject,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch,\n} from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\n\nexport interface BarListRowEvent {\n label: string;\n value: number;\n data: Record<string, unknown>;\n}\n\nexport interface BarListProps {\n spec: BarListSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n class?: string;\n style?: string | CSSProperties;\n}\n\nexport const BarList = defineComponent({\n name: 'BarList',\n props: {\n spec: {\n type: Object as PropType<BarListSpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n },\n emits: {\n 'row-click': (_row: BarListRowEvent) => true,\n 'row-hover': (_row: BarListRowEvent | null) => true,\n },\n setup(props, { emit, expose }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: BarListInstance | null = null;\n let prevSpec = '';\n\n const contextTheme = inject(VizThemeKey, undefined);\n const contextDarkMode = inject(VizDarkModeKey, undefined);\n\n function resolveTheme(): ThemeConfig | undefined {\n return props.theme ?? contextTheme?.value;\n }\n\n function resolveDarkMode(): DarkMode | undefined {\n return props.darkMode ?? contextDarkMode?.value;\n }\n\n function mountBarList() {\n const container = containerRef.value;\n if (!container) return;\n\n const options: BarListMountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n onRowClick: (row: BarListRowEvent) => emit('row-click', row),\n onRowHover: (row: BarListRowEvent | null) => emit('row-hover', row),\n responsive: true,\n };\n\n instance = createBarList(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\n }\n\n function destroyBarList() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n expose({\n get instance() {\n return instance;\n },\n });\n\n onMounted(() => {\n mountBarList();\n });\n\n onUnmounted(() => {\n destroyBarList();\n });\n\n watch(\n () => JSON.stringify(props.spec),\n (newVal) => {\n if (!instance) return;\n if (newVal !== prevSpec) {\n prevSpec = newVal;\n instance.update(props.spec);\n }\n },\n );\n\n watch(\n [\n () => props.theme,\n () => props.darkMode,\n () => contextTheme?.value,\n () => contextDarkMode?.value,\n ],\n () => {\n if (!containerRef.value) return;\n destroyBarList();\n mountBarList();\n },\n );\n\n const rootClass = () => {\n const base = 'oc-barlist-root';\n return props.class ? `${base} ${props.class}` : base;\n };\n\n return () =>\n h('div', {\n ref: containerRef,\n class: rootClass(),\n style: props.style,\n });\n },\n});\n","/**\n * Theme injection context for Vue.\n *\n * Provides typed injection keys and composables for accessing theme\n * and dark mode from any descendant component within a VizThemeProvider.\n */\n\nimport type { DarkMode, ThemeConfig } from '@opendata-ai/openchart-core';\nimport { type ComputedRef, computed, type InjectionKey, inject, type Ref } from 'vue';\n\n/** Injection key for the theme config ref. */\nexport const VizThemeKey: InjectionKey<Ref<ThemeConfig | undefined>> = Symbol('VizTheme');\n\n/** Injection key for the dark mode ref. */\nexport const VizDarkModeKey: InjectionKey<Ref<DarkMode | undefined>> = Symbol('VizDarkMode');\n\n/**\n * Read the current theme from the nearest VizThemeProvider.\n * Returns a computed ref that stays reactive to provider changes.\n */\nexport function useVizTheme(): ComputedRef<ThemeConfig | undefined> {\n const theme = inject(VizThemeKey, undefined);\n return computed(() => theme?.value);\n}\n\n/**\n * Read the current dark mode preference from the nearest VizThemeProvider.\n * Returns a computed ref that stays reactive to provider changes.\n */\nexport function useVizDarkMode(): ComputedRef<DarkMode | undefined> {\n const darkMode = inject(VizDarkModeKey, undefined);\n return computed(() => darkMode?.value);\n}\n","/**\n * Vue 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\nimport type {\n Annotation,\n AnnotationOffset,\n ChartSpec,\n DarkMode,\n ElementEdit,\n ElementRef,\n GraphSpec,\n LayerSpec,\n MarkEvent,\n TextAnnotation,\n ThemeConfig,\n} from '@opendata-ai/openchart-core';\nimport { type ChartInstance, createChart, type MountOptions } from '@opendata-ai/openchart-vanilla';\nimport {\n type CSSProperties,\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch,\n} from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\n\nexport interface ChartProps {\n spec: ChartSpec | LayerSpec | GraphSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n /** Rendering backend for point marks; see the vanilla `MountOptions.renderer`. */\n renderer?: 'auto' | 'svg' | 'canvas';\n class?: string;\n style?: string | CSSProperties;\n}\n\nexport const Chart = defineComponent({\n name: 'Chart',\n props: {\n spec: {\n type: Object as PropType<ChartSpec | LayerSpec | GraphSpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n renderer: {\n type: String as PropType<'auto' | 'svg' | 'canvas'>,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n selectedElement: {\n type: Object as PropType<ElementRef>,\n default: undefined,\n },\n highlight: {\n type: [Array, null] as unknown as PropType<string[] | null>,\n default: undefined,\n },\n editable: {\n type: Boolean as PropType<boolean>,\n default: undefined,\n },\n },\n emits: {\n 'mark-click': (_event: MarkEvent) => true,\n 'mark-hover': (_event: MarkEvent) => true,\n 'mark-leave': () => true,\n 'legend-toggle': (_series: string, _visible: boolean) => true,\n 'annotation-click': (_annotation: Annotation, _event: MouseEvent) => true,\n 'annotation-edit': (_annotation: TextAnnotation, _updatedOffset: AnnotationOffset) => true,\n edit: (_edit: ElementEdit) => true,\n select: (_element: ElementRef) => true,\n deselect: (_element: ElementRef) => true,\n 'text-edit': (_element: ElementRef, _oldText: string, _newText: string) => true,\n 'data-point-click': (_data: Record<string, unknown>) => true,\n },\n setup(props, { emit, expose }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: ChartInstance | null = null;\n let prevSpec = '';\n\n // Inject theme/darkMode from provider as fallbacks\n const contextTheme = inject(VizThemeKey, undefined);\n const contextDarkMode = inject(VizDarkModeKey, undefined);\n\n // Check which event listeners are bound by the parent.\n // Vue 3 passes listeners as onXxx props on the component vnode.\n // We cache this at setup time since it won't change.\n const vm = getCurrentInstance();\n const vnodeProps = vm?.vnode.props ?? {};\n const hasAnnotationEditListener =\n 'onAnnotation-edit' in vnodeProps || 'onAnnotationEdit' in vnodeProps;\n const hasEditListener = 'onEdit' in vnodeProps;\n const hasSelectListener = 'onSelect' in vnodeProps;\n const hasDeselectListener = 'onDeselect' in vnodeProps;\n const hasTextEditListener = 'onText-edit' in vnodeProps || 'onTextEdit' in vnodeProps;\n\n function resolveTheme(): ThemeConfig | undefined {\n return props.theme ?? contextTheme?.value;\n }\n\n function resolveDarkMode(): DarkMode | undefined {\n return props.darkMode ?? contextDarkMode?.value;\n }\n\n function mountChart() {\n const container = containerRef.value;\n if (!container) return;\n\n const options: MountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n renderer: props.renderer,\n onDataPointClick: (data: Record<string, unknown>) => emit('data-point-click', data),\n onMarkClick: (event: MarkEvent) => emit('mark-click', event),\n onMarkHover: (event: MarkEvent) => emit('mark-hover', event),\n onMarkLeave: () => emit('mark-leave'),\n onLegendToggle: (series: string, visible: boolean) =>\n emit('legend-toggle', series, visible),\n onAnnotationClick: (annotation: Annotation, event: MouseEvent) =>\n emit('annotation-click', annotation, event),\n // Only include editing callbacks when the parent binds a listener.\n // Without this gate, every chart gets drag editing wired up.\n ...(hasAnnotationEditListener\n ? {\n onAnnotationEdit: (annotation: TextAnnotation, updatedOffset: AnnotationOffset) =>\n emit('annotation-edit', annotation, updatedOffset),\n }\n : {}),\n ...(hasEditListener ? { onEdit: (edit: ElementEdit) => emit('edit', edit) } : {}),\n ...(hasSelectListener\n ? { onSelect: (element: ElementRef) => emit('select', element) }\n : {}),\n ...(hasDeselectListener\n ? { onDeselect: (element: ElementRef) => emit('deselect', element) }\n : {}),\n ...(hasTextEditListener\n ? {\n onTextEdit: (element: ElementRef, oldText: string, newText: string) =>\n emit('text-edit', element, oldText, newText),\n }\n : {}),\n ...(props.editable != null ? { editable: props.editable } : {}),\n ...(props.selectedElement ? { selectedElement: props.selectedElement } : {}),\n responsive: true,\n };\n\n instance = createChart(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\n if (props.highlight !== undefined) {\n instance.setHighlight(props.highlight ?? null);\n }\n }\n\n function destroyChart() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n // Expose imperative methods for parent ref access\n expose({\n getSelectedElement(): ElementRef | null {\n return instance?.getSelectedElement() ?? null;\n },\n select(elementRef: ElementRef): void {\n instance?.select(elementRef);\n },\n deselect(): void {\n instance?.deselect();\n },\n get instance() {\n return instance;\n },\n });\n\n onMounted(() => {\n mountChart();\n });\n\n onUnmounted(() => {\n destroyChart();\n });\n\n // Watch spec changes: update if only spec changed, recreate if theme/darkMode changed\n watch(\n () => JSON.stringify(props.spec),\n (newVal) => {\n if (!instance) return;\n if (newVal !== prevSpec) {\n prevSpec = newVal;\n instance.update(props.spec, { selectedElement: props.selectedElement });\n }\n },\n );\n\n // Watch selectedElement prop changes\n watch(\n () => props.selectedElement,\n (newVal) => {\n if (!instance) return;\n if (newVal) {\n instance.select(newVal);\n } else {\n instance.deselect();\n }\n },\n );\n\n // Watch highlight prop changes\n watch(\n () => props.highlight,\n (newVal) => {\n if (!instance) return;\n instance.setHighlight(newVal ?? null);\n },\n );\n\n // Recreate chart when theme, darkMode, renderer, or editable change\n watch(\n [\n () => props.theme,\n () => props.darkMode,\n () => props.renderer,\n () => props.editable,\n () => contextTheme?.value,\n () => contextDarkMode?.value,\n ],\n () => {\n if (!containerRef.value) return;\n destroyChart();\n mountChart();\n },\n );\n\n const rootClass = () => {\n const base = 'oc-chart-root';\n return props.class ? `${base} ${props.class}` : base;\n };\n\n return () =>\n h('div', {\n ref: containerRef,\n class: rootClass(),\n style: props.style,\n });\n },\n});\n","/**\n * Vue scrollytelling shell around the vanilla `createChartStory`.\n *\n * Mirrors the React `<ChartStory>`: a sticky chart panel plus a scrolling\n * narrative column whose blocks advance the story. The vanilla driver owns\n * cumulative patch application, mark morphing, crossfade, and camera; this\n * component owns only Vue lifecycle and the sticky layout.\n *\n * Narrative is provided as the default slot's children (one root node per\n * step) or via the `narrative` prop (an array of vnodes/strings). Pass `step`\n * to drive it externally; omit for self-driving scroll.\n */\n\nimport type { ChartSpec, GeoMapSpec, GraphSpec, LayerSpec } 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 {\n type CSSProperties,\n defineComponent,\n h,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n type VNode,\n watch,\n} from 'vue';\n\nexport interface ChartStoryProps {\n spec: ChartSpec | LayerSpec | GraphSpec | GeoMapSpec;\n steps: ChartStoryOptions['steps'];\n narrative?: VNode[];\n step?: number;\n triggerPosition?: number;\n cameraMode?: 'step' | 'scrub';\n mountOptions?: MountOptions;\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 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\nexport const ChartStory = defineComponent({\n name: 'ChartStory',\n props: {\n spec: {\n type: Object as PropType<ChartSpec | LayerSpec | GraphSpec | GeoMapSpec>,\n required: true,\n },\n steps: {\n type: Array as PropType<ChartStoryOptions['steps']>,\n required: true,\n },\n narrative: {\n type: Array as PropType<VNode[]>,\n default: undefined,\n },\n step: {\n type: Number,\n default: undefined,\n },\n triggerPosition: {\n type: Number,\n default: undefined,\n },\n cameraMode: {\n type: String as PropType<'step' | 'scrub'>,\n default: undefined,\n },\n mountOptions: {\n type: Object as PropType<MountOptions>,\n default: undefined,\n },\n },\n setup(props, { slots, expose }) {\n const sectionRef = ref<HTMLElement | null>(null);\n const mountRef = ref<HTMLDivElement | null>(null);\n const stepEls = ref<Array<HTMLElement | null>>([]);\n let story: ChartStoryInstance | null = null;\n\n onMounted(() => {\n const mount = mountRef.value;\n if (!mount) return;\n\n const blocks = props.narrative ?? [];\n if (blocks.length > 0 && blocks.length !== props.steps.length) {\n console.warn(\n `[openchart] ChartStory: narrative length (${blocks.length}) does not match steps length (${props.steps.length}). Each step should have a corresponding narrative element.`,\n );\n }\n\n story = createChartStory(\n mount,\n {\n spec: props.spec,\n steps: props.steps,\n triggerPosition: props.triggerPosition,\n cameraMode: props.cameraMode,\n },\n props.mountOptions,\n );\n if (sectionRef.value) story.setContainer(sectionRef.value);\n stepEls.value.forEach((el, i) => {\n if (el) story?.registerStep(i, el);\n });\n if (props.step !== undefined) story.goTo(props.step);\n });\n\n watch(\n () => props.step,\n (next) => {\n if (next !== undefined) story?.goTo(next);\n },\n );\n\n onUnmounted(() => {\n story?.destroy();\n story = null;\n });\n\n expose({\n goTo(index: number) {\n story?.goTo(index);\n },\n get instance() {\n return story;\n },\n });\n\n return () => {\n // Prefer the `narrative` prop; fall back to default slot children so\n // consumers can author steps as template markup.\n const blocks = props.narrative ?? slots.default?.() ?? [];\n return h('section', { ref: sectionRef, style: sectionStyle }, [\n h(\n 'div',\n { style: { position: 'relative' } },\n blocks.map((content, i) =>\n h(\n 'div',\n {\n // Steps are a fixed ordered list, so the index is the stable\n // identity. Do not reorder or splice narrative entries at runtime\n // (that would remap step refs to the wrong content); rebuild the\n // whole story instead.\n key: i,\n ref: (el: unknown) => {\n stepEls.value[i] = el as HTMLElement | null;\n },\n 'data-oc-story-step': i,\n style: stepStyle,\n },\n [h('div', { style: { maxWidth: '36rem' } }, [content])],\n ),\n ),\n ),\n h('div', { style: panelStyle }, [h('div', { ref: mountRef, style: { width: '100%' } })]),\n ]);\n };\n },\n});\n","/**\n * useChart: composable for manual chart lifecycle control.\n *\n * Provides a template ref to attach to a container div. The chart\n * mounts automatically and updates when the spec changes.\n */\n\nimport type {\n ChartLayout,\n ChartSpec,\n DarkMode,\n GraphSpec,\n LayerSpec,\n ThemeConfig,\n} from '@opendata-ai/openchart-core';\nimport { type ChartInstance, createChart, type MountOptions } from '@opendata-ai/openchart-vanilla';\nimport { onMounted, onUnmounted, type Ref, ref, type ShallowRef, shallowRef, watch } from 'vue';\n\nexport interface UseChartOptions {\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode setting. */\n darkMode?: 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 /** Template ref to attach to the container div. */\n containerRef: Ref<HTMLDivElement | null>;\n /** The chart instance (null until mounted). */\n chart: ShallowRef<ChartInstance | null>;\n /** The current compiled layout (null until mounted). */\n layout: ShallowRef<ChartLayout | null>;\n}\n\n/**\n * Composable for manual chart lifecycle control.\n *\n * Attach the returned containerRef to a container div via `ref=\"containerRef\"`.\n * The chart mounts automatically and updates when the spec changes.\n */\nexport function useChart(\n spec: Ref<ChartSpec | LayerSpec | GraphSpec>,\n options?: UseChartOptions,\n): UseChartReturn {\n const containerRef = ref<HTMLDivElement | null>(null);\n const chart = shallowRef<ChartInstance | null>(null);\n const layout = shallowRef<ChartLayout | null>(null);\n\n function mount() {\n const container = containerRef.value;\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 instance = createChart(container, spec.value, mountOpts);\n chart.value = instance;\n layout.value = instance.layout;\n }\n\n function destroy() {\n chart.value?.destroy();\n chart.value = null;\n layout.value = null;\n }\n\n onMounted(() => {\n mount();\n });\n\n onUnmounted(() => {\n destroy();\n });\n\n // Update on spec change\n watch(spec, (newSpec) => {\n const instance = chart.value;\n if (!instance) return;\n instance.update(newSpec);\n layout.value = instance.layout;\n });\n\n return {\n containerRef,\n chart,\n layout,\n };\n}\n","/**\n * useDarkMode: composable that resolves a DarkMode preference to a boolean.\n *\n * - \"force\" -> true\n * - \"off\" -> false\n * - \"auto\" -> matches system preference (reactive to changes)\n */\n\nimport type { DarkMode } from '@opendata-ai/openchart-core';\nimport { onUnmounted, type Ref, ref, watch } from 'vue';\n\n/**\n * Resolve a DarkMode preference to a reactive boolean.\n *\n * For \"auto\" mode, watches the system `prefers-color-scheme` media query\n * and updates reactively when the user changes their OS theme.\n */\nexport function useDarkMode(mode: Ref<DarkMode | undefined>): Ref<boolean> {\n const isDark = ref(resolveInitial(mode.value));\n let cleanup: (() => void) | null = null;\n\n function setup(currentMode: DarkMode | undefined) {\n // Clean up previous listener\n cleanup?.();\n cleanup = null;\n\n if (currentMode !== 'auto') {\n isDark.value = currentMode === 'force';\n return;\n }\n\n if (typeof window === 'undefined' || !window.matchMedia) {\n isDark.value = false;\n return;\n }\n\n const mq = window.matchMedia('(prefers-color-scheme: dark)');\n isDark.value = mq.matches;\n\n const handler = (e: MediaQueryListEvent) => {\n isDark.value = e.matches;\n };\n mq.addEventListener('change', handler);\n cleanup = () => mq.removeEventListener('change', handler);\n }\n\n // Run setup for initial value\n setup(mode.value);\n\n // React to mode changes\n watch(mode, (newMode) => {\n setup(newMode);\n });\n\n onUnmounted(() => {\n cleanup?.();\n cleanup = null;\n });\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: composable for imperative graph control.\n *\n * Provides a template 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 GraphHighlightTarget,\n GraphInstance,\n GraphLegendData,\n} from '@opendata-ai/openchart-vanilla';\nimport { type Ref, ref } from 'vue';\n\n/** Camera transform components (graph-space). */\nexport type GraphCamera = { x: number; y: number; k: number };\n\n/** Handle exposed by Graph component via expose(). */\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: { x: number; y: number; k?: number }, 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\nexport interface UseGraphReturn {\n /** Template ref to pass to <Graph ref={graphRef} />. */\n graphRef: Ref<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: { x: number; y: number; k?: number }, 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/**\n * Composable for imperative graph control.\n *\n * Usage:\n * ```vue\n * <script setup>\n * const { graphRef, search, zoomToFit } = useGraph();\n * </script>\n * <template>\n * <Graph ref=\"graphRef\" :spec=\"spec\" />\n * </template>\n * ```\n */\nexport function useGraph(): UseGraphReturn {\n const graphRef = ref<GraphHandle | null>(null);\n\n function search(query: string) {\n graphRef.value?.search(query);\n }\n\n function clearSearch() {\n graphRef.value?.clearSearch();\n }\n\n function getSearchMatches(): string[] {\n return graphRef.value?.getSearchMatches() ?? [];\n }\n\n function zoomToFit(opts?: CameraFlightOptions & { padding?: number }) {\n graphRef.value?.zoomToFit(opts);\n }\n\n function zoomToNode(nodeId: string, opts?: CameraFlightOptions & { scale?: number }) {\n graphRef.value?.zoomToNode(nodeId, opts);\n }\n\n function flyTo(target: { x: number; y: number; k?: number }, opts?: CameraFlightOptions) {\n graphRef.value?.flyTo(target, opts);\n }\n\n function centerAt(x: number, y: number, opts?: CameraFlightOptions) {\n graphRef.value?.centerAt(x, y, opts);\n }\n\n function getCamera(): GraphCamera {\n return graphRef.value?.getCamera() ?? { x: 0, y: 0, k: 1 };\n }\n\n function selectNode(nodeId: string, opts?: { fly?: boolean } & CameraFlightOptions) {\n graphRef.value?.selectNode(nodeId, opts);\n }\n\n function getSelectedNodes(): string[] {\n return graphRef.value?.getSelectedNodes() ?? [];\n }\n\n function highlight(target: GraphHighlightTarget, opts?: { dimOpacity?: number }) {\n graphRef.value?.highlight(target, opts);\n }\n\n function clearHighlight() {\n graphRef.value?.clearHighlight();\n }\n\n function getHighlight(): string[] | null {\n return graphRef.value?.getHighlight() ?? null;\n }\n\n function getLegend(): GraphLegendData | null {\n return graphRef.value?.getLegend() ?? null;\n }\n\n function setActiveCategories(values: string[]) {\n graphRef.value?.setActiveCategories(values);\n }\n\n function getActiveCategories(): string[] {\n return graphRef.value?.getActiveCategories() ?? [];\n }\n\n return {\n graphRef,\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: composable 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 { onMounted, onUnmounted, type Ref, ref, type ShallowRef, shallowRef, watch } from 'vue';\n\nexport interface UseTableReturn {\n /** Template ref to attach to the container div. */\n containerRef: Ref<HTMLDivElement | null>;\n /** The table instance (null until mounted). */\n table: ShallowRef<TableInstance | null>;\n /** The current table state (sort, search, page). */\n state: Ref<TableState>;\n}\n\n/**\n * Composable for manual table lifecycle control.\n *\n * Attach the returned containerRef to a container div via `ref=\"containerRef\"`.\n * The table mounts automatically and updates when the spec changes.\n */\nexport function useTable(spec: Ref<TableSpec>, options?: TableMountOptions): UseTableReturn {\n const containerRef = ref<HTMLDivElement | null>(null);\n const table = shallowRef<TableInstance | null>(null);\n const state = ref<TableState>({\n sort: null,\n search: '',\n page: 0,\n });\n\n const originalOnStateChange = options?.onStateChange;\n\n function handleStateChange(newState: TableState) {\n state.value = newState;\n originalOnStateChange?.(newState);\n }\n\n function mount() {\n const container = containerRef.value;\n if (!container) return;\n\n const mountOpts: TableMountOptions = {\n ...options,\n onStateChange: handleStateChange,\n };\n\n const instance = createTable(container, spec.value, mountOpts);\n table.value = instance;\n state.value = instance.getState();\n }\n\n function destroy() {\n table.value?.destroy();\n table.value = null;\n }\n\n onMounted(() => {\n mount();\n });\n\n onUnmounted(() => {\n destroy();\n });\n\n // Update on spec change\n watch(spec, (newSpec) => {\n const instance = table.value;\n if (!instance) return;\n instance.update(newSpec);\n state.value = instance.getState();\n });\n\n return {\n containerRef,\n table,\n state,\n };\n}\n","/**\n * useTableState: managed state composable 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 { type Ref, ref } from 'vue';\n\nexport interface UseTableStateReturn {\n sort: Ref<SortState | null>;\n setSort: (sort: SortState | null) => void;\n search: Ref<string>;\n setSearch: (query: string) => void;\n page: Ref<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 * Composable for managing table state (sort, search, page).\n *\n * Use with the DataTable component's controlled props:\n * ```vue\n * <script setup>\n * const { sort, search, page, setSort, setSearch, setPage } = useTableState();\n * </script>\n * <template>\n * <DataTable\n * :spec=\"spec\"\n * :sort=\"sort\"\n * :search=\"search\"\n * :page=\"page\"\n * @update:sort=\"setSort\"\n * @update:search=\"setSearch\"\n * @update:page=\"setPage\"\n * />\n * </template>\n * ```\n */\nexport function useTableState(initialState?: UseTableStateOptions): UseTableStateReturn {\n const sort = ref<SortState | null>(initialState?.sort ?? null);\n const search = ref(initialState?.search ?? '');\n const page = ref(initialState?.page ?? 0);\n\n function setSort(newSort: SortState | null) {\n sort.value = newSort;\n }\n\n function setSearch(query: string) {\n search.value = query;\n }\n\n function setPage(newPage: number) {\n page.value = newPage;\n }\n\n function resetState() {\n sort.value = initialState?.sort ?? null;\n search.value = initialState?.search ?? '';\n page.value = initialState?.page ?? 0;\n }\n\n return {\n sort,\n setSort,\n search,\n setSearch,\n page,\n setPage,\n resetState,\n };\n}\n","/**\n * DataTable component: Vue 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 {\n type CSSProperties,\n defineComponent,\n h,\n inject,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch,\n} from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\n\nexport interface DataTableProps {\n spec: TableSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n class?: string;\n style?: string | CSSProperties;\n sort?: SortState | null;\n search?: string;\n page?: number;\n}\n\nexport const DataTable = defineComponent({\n name: 'DataTable',\n props: {\n spec: {\n type: Object as PropType<TableSpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n sort: {\n type: [Object, null] as PropType<SortState | null>,\n default: undefined,\n },\n search: {\n type: String,\n default: undefined,\n },\n page: {\n type: Number,\n default: undefined,\n },\n },\n emits: {\n 'row-click': (_row: Record<string, unknown>) => true,\n 'update:sort': (_sort: SortState | null) => true,\n 'update:search': (_query: string) => true,\n 'update:page': (_page: number) => true,\n },\n setup(props, { emit }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: TableInstance | null = null;\n\n // Inject theme/darkMode from provider as fallbacks\n const contextTheme = inject(VizThemeKey, undefined);\n const contextDarkMode = inject(VizDarkModeKey, undefined);\n\n function resolveTheme(): ThemeConfig | undefined {\n return props.theme ?? contextTheme?.value;\n }\n\n function resolveDarkMode(): DarkMode | undefined {\n return props.darkMode ?? contextDarkMode?.value;\n }\n\n function isControlled(): boolean {\n return props.sort !== undefined || props.search !== undefined || props.page !== undefined;\n }\n\n let prevSpec = '';\n\n function mountTable() {\n const container = containerRef.value;\n if (!container) return;\n\n const mountOptions: TableMountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n onRowClick: (row: Record<string, unknown>) => emit('row-click', row),\n responsive: true,\n onStateChange: (state) => {\n if (state.sort !== undefined) emit('update:sort', state.sort);\n if (state.search !== undefined) emit('update:search', state.search);\n if (state.page !== undefined) emit('update:page', state.page);\n },\n };\n\n if (isControlled()) {\n mountOptions.externalState = {\n sort: props.sort ?? null,\n search: props.search ?? '',\n page: props.page ?? 0,\n };\n }\n\n instance = createTable(container, props.spec, mountOptions);\n prevSpec = JSON.stringify(props.spec);\n }\n\n function destroyTable() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n onMounted(() => {\n mountTable();\n });\n\n onUnmounted(() => {\n destroyTable();\n });\n\n // Watch spec changes via JSON.stringify comparison (consistent with Chart/Graph)\n watch(\n () => JSON.stringify(props.spec),\n (newVal) => {\n if (!instance) return;\n if (newVal !== prevSpec) {\n prevSpec = newVal;\n instance.update(props.spec);\n }\n },\n );\n\n // Recreate when theme or darkMode change\n watch(\n [\n () => props.theme,\n () => props.darkMode,\n () => contextTheme?.value,\n () => contextDarkMode?.value,\n ],\n () => {\n if (!containerRef.value) return;\n destroyTable();\n mountTable();\n },\n );\n\n // Sync controlled state without remounting\n watch([() => props.sort, () => props.search, () => props.page], () => {\n if (!instance || !isControlled()) return;\n instance.setState({\n sort: props.sort ?? null,\n search: props.search ?? '',\n page: props.page ?? 0,\n });\n });\n\n const rootClass = () => {\n const base = 'oc-table-root';\n return props.class ? `${base} ${props.class}` : base;\n };\n\n return () =>\n h('div', {\n ref: containerRef,\n class: rootClass(),\n style: props.style,\n });\n },\n});\n","/**\n * Vue 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\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 defineComponent,\n h,\n inject,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch,\n} from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\n\nexport interface GeoMapProps {\n spec: GeoMapSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n class?: string;\n style?: string | CSSProperties;\n}\n\nexport const GeoMap = defineComponent({\n name: 'GeoMap',\n props: {\n spec: {\n type: Object as PropType<GeoMapSpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n },\n emits: {\n 'mark-click': (_event: GeoMapMarkEvent) => true,\n 'mark-hover': (_event: GeoMapMarkEvent | null) => true,\n },\n setup(props, { emit, expose }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: GeoMapInstance | null = null;\n let prevSpec = '';\n\n // Inject theme/darkMode from provider as fallbacks\n const contextTheme = inject(VizThemeKey, undefined);\n const contextDarkMode = inject(VizDarkModeKey, undefined);\n\n function resolveTheme(): ThemeConfig | undefined {\n return props.theme ?? contextTheme?.value;\n }\n\n function resolveDarkMode(): DarkMode | undefined {\n return props.darkMode ?? contextDarkMode?.value;\n }\n\n function mountMap() {\n const container = containerRef.value;\n if (!container) return;\n\n const options: GeoMapMountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n onMarkClick: (feature) => emit('mark-click', feature),\n onMarkHover: (feature) => emit('mark-hover', feature),\n responsive: true,\n };\n\n instance = createGeoMap(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\n }\n\n function destroyMap() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n // Expose imperative access to the instance\n expose({\n get instance() {\n return instance;\n },\n });\n\n onMounted(() => {\n mountMap();\n });\n\n onUnmounted(() => {\n destroyMap();\n });\n\n // Watch spec changes\n watch(\n () => JSON.stringify(props.spec),\n (newVal) => {\n if (!instance) return;\n if (newVal !== prevSpec) {\n prevSpec = newVal;\n instance.update(props.spec);\n }\n },\n );\n\n // Recreate map when theme or darkMode change\n watch(\n [\n () => props.theme,\n () => props.darkMode,\n () => contextTheme?.value,\n () => contextDarkMode?.value,\n ],\n () => {\n if (!containerRef.value) return;\n destroyMap();\n mountMap();\n },\n );\n\n const rootClass = () => {\n const base = 'oc-map-root';\n return props.class ? `${base} ${props.class}` : base;\n };\n\n return () =>\n h('div', {\n ref: containerRef,\n class: rootClass(),\n style: props.style,\n });\n },\n});\n","/**\n * Vue 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 * Exposes imperative methods via defineExpose for use with useGraph().\n */\n\nimport type { DarkMode, GraphSpec, ThemeConfig } from '@opendata-ai/openchart-core';\nimport {\n createGraph,\n type GraphInstance,\n type GraphMountOptions,\n type GraphTooltipFormatter,\n} from '@opendata-ai/openchart-vanilla';\nimport {\n type CSSProperties,\n defineComponent,\n h,\n inject,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch,\n} from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\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 spec: GraphSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n tooltip?: GraphTooltipProp;\n legend?: GraphLegendProp;\n fitOnLoad?: boolean;\n class?: string;\n style?: string | CSSProperties;\n}\n\n/** True when the tooltip is on (only the on/off decision gates recreation). */\nfunction tooltipOn(tooltip: GraphTooltipProp | undefined): boolean {\n return tooltip !== false;\n}\n\nexport const Graph = defineComponent({\n name: 'Graph',\n props: {\n spec: {\n type: Object as PropType<GraphSpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n tooltip: {\n type: [Boolean, Object] as PropType<GraphTooltipProp>,\n default: undefined,\n },\n legend: {\n type: [Boolean, Object] as PropType<GraphLegendProp>,\n default: undefined,\n },\n fitOnLoad: {\n type: Boolean,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n },\n emits: {\n 'node-click': (_node: Record<string, unknown>) => true,\n 'node-double-click': (_node: Record<string, unknown>) => true,\n 'node-hover': (_node: Record<string, unknown> | null) => true,\n 'edge-hover': (_edge: Record<string, unknown> | null) => true,\n 'selection-change': (_nodeIds: string[]) => true,\n 'legend-hover': (_entry: { field: string; value: string } | null) => true,\n 'legend-toggle': (_activeValues: string[]) => true,\n 'highlight-change': (_nodeIds: string[] | null) => true,\n 'camera-change': (_camera: { x: number; y: number; k: number }) => true,\n },\n setup(props, { emit, expose }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: GraphInstance | null = null;\n let prevSpec = '';\n // First mount plays the entrance; theme/darkMode-only recreations suppress it.\n let mountedOnce = false;\n\n // Inject theme/darkMode from provider as fallbacks\n const contextTheme = inject(VizThemeKey, undefined);\n const contextDarkMode = inject(VizDarkModeKey, undefined);\n\n function resolveTheme(): ThemeConfig | undefined {\n return props.theme ?? contextTheme?.value;\n }\n\n function resolveDarkMode(): DarkMode | undefined {\n return props.darkMode ?? contextDarkMode?.value;\n }\n\n // Stable tooltip formatter wrapper. Vue props are reactive, so reading\n // `props.tooltip` at CALL time always sees the latest formatter — no stale\n // closure, no recreation when the formatter changes. When the tooltip is on\n // we always hand the vanilla layer this wrapper (falling back to defaults),\n // so a formatter can be added or swapped per-render without a remount.\n const stableTooltipFormatter: GraphTooltipFormatter = (item, defaults) => {\n const t = props.tooltip;\n const fn = t && typeof t === 'object' ? t.formatter : undefined;\n return fn ? fn(item, defaults) : defaults;\n };\n\n function mountGraph() {\n const container = containerRef.value;\n if (!container) return;\n\n const tooltipOption: GraphMountOptions['tooltip'] = tooltipOn(props.tooltip)\n ? { formatter: stableTooltipFormatter }\n : false;\n\n const options: GraphMountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n tooltip: tooltipOption,\n legend: props.legend,\n fitOnLoad: props.fitOnLoad,\n onNodeClick: (node) => emit('node-click', node),\n onNodeDoubleClick: (node) => emit('node-double-click', node),\n onNodeHover: (node) => emit('node-hover', node),\n onEdgeHover: (edge) => emit('edge-hover', edge),\n onSelectionChange: (nodeIds) => emit('selection-change', nodeIds),\n onLegendHover: (entry) => emit('legend-hover', entry),\n onLegendToggle: (activeValues) => emit('legend-toggle', activeValues),\n onHighlightChange: (nodeIds) => emit('highlight-change', nodeIds),\n onCameraChange: (camera) => emit('camera-change', camera),\n responsive: true,\n suppressEntrance: mountedOnce,\n };\n\n instance = createGraph(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\n mountedOnce = true;\n }\n\n function destroyGraph() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n // Expose imperative methods for useGraph() composable. Every method forwards\n // opts to the underlying instance so consumers get the full vanilla API.\n expose({\n search(query: string) {\n instance?.search(query);\n },\n clearSearch() {\n instance?.clearSearch();\n },\n getSearchMatches(): string[] {\n return instance?.getSearchMatches() ?? [];\n },\n zoomToFit(opts?: Parameters<GraphInstance['zoomToFit']>[0]) {\n instance?.zoomToFit(opts);\n },\n zoomToNode(nodeId: string, opts?: Parameters<GraphInstance['zoomToNode']>[1]) {\n instance?.zoomToNode(nodeId, opts);\n },\n flyTo(\n target: Parameters<GraphInstance['flyTo']>[0],\n opts?: Parameters<GraphInstance['flyTo']>[1],\n ) {\n instance?.flyTo(target, opts);\n },\n centerAt(x: number, y: number, opts?: Parameters<GraphInstance['centerAt']>[2]) {\n instance?.centerAt(x, y, opts);\n },\n getCamera() {\n return instance?.getCamera() ?? { x: 0, y: 0, k: 1 };\n },\n selectNode(nodeId: string, opts?: Parameters<GraphInstance['selectNode']>[1]) {\n instance?.selectNode(nodeId, opts);\n },\n getSelectedNodes(): string[] {\n return instance?.getSelectedNodes() ?? [];\n },\n highlight(\n target: Parameters<GraphInstance['highlight']>[0],\n opts?: Parameters<GraphInstance['highlight']>[1],\n ) {\n instance?.highlight(target, opts);\n },\n clearHighlight() {\n instance?.clearHighlight();\n },\n getHighlight() {\n return instance?.getHighlight() ?? null;\n },\n getLegend() {\n return instance?.getLegend() ?? null;\n },\n setActiveCategories(values: string[]) {\n instance?.setActiveCategories(values);\n },\n getActiveCategories(): string[] {\n return instance?.getActiveCategories() ?? [];\n },\n updateVisuals(spec: GraphSpec) {\n instance?.updateVisuals(spec);\n },\n get instance() {\n return instance;\n },\n });\n\n onMounted(() => {\n mountGraph();\n });\n\n onUnmounted(() => {\n destroyGraph();\n });\n\n // Watch spec changes\n watch(\n () => JSON.stringify(props.spec),\n (newVal) => {\n if (!instance) return;\n if (newVal !== prevSpec) {\n prevSpec = newVal;\n instance.update(props.spec);\n }\n },\n );\n\n // Recreate graph when theme or darkMode change (spec unchanged). mountedOnce\n // is already true here, so mountGraph passes suppressEntrance: true and the\n // entrance does not replay.\n watch(\n [\n () => props.theme,\n () => props.darkMode,\n () => contextTheme?.value,\n () => contextDarkMode?.value,\n ],\n () => {\n if (!containerRef.value) return;\n destroyGraph();\n mountGraph();\n },\n );\n\n const rootClass = () => {\n const base = 'oc-graph-root';\n return props.class ? `${base} ${props.class}` : base;\n };\n\n return () =>\n h('div', {\n ref: containerRef,\n class: rootClass(),\n style: props.style,\n });\n },\n});\n","/**\n * Vue 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\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 defineComponent,\n h,\n inject,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch,\n} from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\n\nexport interface SankeyProps {\n spec: SankeySpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n class?: string;\n style?: string | CSSProperties;\n}\n\nexport const Sankey = defineComponent({\n name: 'Sankey',\n props: {\n spec: {\n type: Object as PropType<SankeySpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n },\n emits: {\n 'node-click': (_node: Record<string, unknown>) => true,\n 'link-click': (_link: Record<string, unknown>) => true,\n 'node-hover': (_node: Record<string, unknown> | null) => true,\n 'link-hover': (_link: Record<string, unknown> | null) => true,\n },\n setup(props, { emit, expose }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: SankeyInstance | null = null;\n let prevSpec = '';\n\n // Inject theme/darkMode from provider as fallbacks\n const contextTheme = inject(VizThemeKey, undefined);\n const contextDarkMode = inject(VizDarkModeKey, undefined);\n\n function resolveTheme(): ThemeConfig | undefined {\n return props.theme ?? contextTheme?.value;\n }\n\n function resolveDarkMode(): DarkMode | undefined {\n return props.darkMode ?? contextDarkMode?.value;\n }\n\n function mountSankey() {\n const container = containerRef.value;\n if (!container) return;\n\n const options: SankeyMountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n onNodeClick: (node: Record<string, unknown>) => emit('node-click', node),\n onLinkClick: (link: Record<string, unknown>) => emit('link-click', link),\n onNodeHover: (node: Record<string, unknown> | null) => emit('node-hover', node),\n onLinkHover: (link: Record<string, unknown> | null) => emit('link-hover', link),\n responsive: true,\n };\n\n instance = createSankey(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\n }\n\n function destroySankey() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n // Expose imperative access to the instance\n expose({\n get instance() {\n return instance;\n },\n });\n\n onMounted(() => {\n mountSankey();\n });\n\n onUnmounted(() => {\n destroySankey();\n });\n\n // Watch spec changes\n watch(\n () => JSON.stringify(props.spec),\n (newVal) => {\n if (!instance) return;\n if (newVal !== prevSpec) {\n prevSpec = newVal;\n instance.update(props.spec);\n }\n },\n );\n\n // Recreate sankey when theme or darkMode change\n watch(\n [\n () => props.theme,\n () => props.darkMode,\n () => contextTheme?.value,\n () => contextDarkMode?.value,\n ],\n () => {\n if (!containerRef.value) return;\n destroySankey();\n mountSankey();\n },\n );\n\n const rootClass = () => {\n const base = 'oc-sankey-root';\n return props.class ? `${base} ${props.class}` : base;\n };\n\n return () =>\n h('div', {\n ref: containerRef,\n class: rootClass(),\n style: props.style,\n });\n },\n});\n","/**\n * VizThemeProvider: 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 { computed, defineComponent, type PropType, provide } from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\n\nexport interface VizThemeProviderProps {\n theme: ThemeConfig | undefined;\n darkMode?: DarkMode;\n}\n\nexport const VizThemeProvider = defineComponent({\n name: 'VizThemeProvider',\n props: {\n theme: {\n type: Object as PropType<ThemeConfig | undefined>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n },\n setup(props, { slots }) {\n // Wrap in computed() so changes to props propagate reactively\n // through the injection system.\n const themeRef = computed(() => props.theme);\n const darkModeRef = computed(() => props.darkMode);\n\n provide(VizThemeKey, themeRef);\n provide(VizDarkModeKey, darkModeRef);\n\n return () => slots.default?.();\n },\n});\n","/**\n * Vue 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\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 defineComponent,\n h,\n inject,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch,\n} from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\n\nexport interface TileMapTileEvent {\n stateCode: string;\n stateName: string;\n value: number | null;\n data: Record<string, unknown>;\n}\n\nexport interface TileMapProps {\n spec: TileMapSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n class?: string;\n style?: string | CSSProperties;\n}\n\nexport const TileMap = defineComponent({\n name: 'TileMap',\n props: {\n spec: {\n type: Object as PropType<TileMapSpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n },\n emits: {\n 'tile-click': (_tile: TileMapTileEvent) => true,\n 'tile-hover': (_tile: TileMapTileEvent | null) => true,\n },\n setup(props, { emit, expose }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: TileMapInstance | null = null;\n let prevSpec = '';\n\n // Inject theme/darkMode from provider as fallbacks\n const contextTheme = inject(VizThemeKey, undefined);\n const contextDarkMode = inject(VizDarkModeKey, undefined);\n\n function resolveTheme(): ThemeConfig | undefined {\n return props.theme ?? contextTheme?.value;\n }\n\n function resolveDarkMode(): DarkMode | undefined {\n return props.darkMode ?? contextDarkMode?.value;\n }\n\n function mountTileMap() {\n const container = containerRef.value;\n if (!container) return;\n\n const options: TileMapMountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n onTileClick: (tile: TileMapTileEvent) => emit('tile-click', tile),\n onTileHover: (tile: TileMapTileEvent | null) => emit('tile-hover', tile),\n responsive: true,\n };\n\n instance = createTileMap(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\n }\n\n function destroyTileMap() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n // Expose imperative access to the instance\n expose({\n get instance() {\n return instance;\n },\n });\n\n onMounted(() => {\n mountTileMap();\n });\n\n onUnmounted(() => {\n destroyTileMap();\n });\n\n // Watch spec changes\n watch(\n () => JSON.stringify(props.spec),\n (newVal) => {\n if (!instance) return;\n if (newVal !== prevSpec) {\n prevSpec = newVal;\n instance.update(props.spec);\n }\n },\n );\n\n // Recreate tilemap when theme or darkMode change\n watch(\n [\n () => props.theme,\n () => props.darkMode,\n () => contextTheme?.value,\n () => contextDarkMode?.value,\n ],\n () => {\n if (!containerRef.value) return;\n destroyTileMap();\n mountTileMap();\n },\n );\n\n const rootClass = () => {\n const base = 'oc-tilemap-root';\n return props.class ? `${base} ${props.class}` : base;\n };\n\n return () =>\n h('div', {\n ref: containerRef,\n class: rootClass(),\n style: props.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, defineComponent, h, type PropType } from 'vue';\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 spec: VizSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n class?: string;\n style?: string | CSSProperties;\n}\n\nexport const Visualization = defineComponent({\n name: 'Visualization',\n props: {\n spec: {\n type: Object as PropType<VizSpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n },\n setup(props) {\n return () => {\n const { spec, theme, darkMode, class: className, style } = props;\n const sharedProps = { theme, darkMode, class: className, style };\n\n if (isTableSpec(spec)) {\n return h(DataTable, { ...sharedProps, spec });\n }\n if (isGraphSpec(spec)) {\n return h(Graph, { ...sharedProps, spec });\n }\n if (isSankeySpec(spec)) {\n return h(Sankey, { ...sharedProps, spec });\n }\n if (isTileMapSpec(spec)) {\n return h(TileMap, { ...sharedProps, spec });\n }\n if (isBarListSpec(spec)) {\n return h(BarList, { ...sharedProps, spec });\n }\n if (isGeoMapSpec(spec)) {\n return h(GeoMap, { ...sharedProps, spec });\n }\n return h(Chart, { ...sharedProps, spec });\n };\n },\n});\n"],"mappings":";AAeA,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;;;ACrEP;AAAA,EAGE;AAAA,OACK;AACP;AAAA,EAEE;AAAA,EACA;AAAA,EACA,UAAAA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,OACK;;;ACZP,SAA2B,UAA6B,cAAwB;AAGzE,IAAM,cAA0D,uBAAO,UAAU;AAGjF,IAAM,iBAA0D,uBAAO,aAAa;AAMpF,SAAS,cAAoD;AAClE,QAAM,QAAQ,OAAO,aAAa,MAAS;AAC3C,SAAO,SAAS,MAAM,OAAO,KAAK;AACpC;AAMO,SAAS,iBAAoD;AAClE,QAAM,WAAW,OAAO,gBAAgB,MAAS;AACjD,SAAO,SAAS,MAAM,UAAU,KAAK;AACvC;;;ADKO,IAAM,UAAU,gBAAgB;AAAA,EACrC,MAAM;AAAA,EACN,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,IACZ;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAA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GAAG;AACrB,eAAOC,GAAE,WAAW,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,MAC9C;AACA,UAAI,YAAY,IAAI,GAAG;AACrB,eAAOA,GAAE,OAAO,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,MAC1C;AACA,UAAI,aAAa,IAAI,GAAG;AACtB,eAAOA,GAAE,QAAQ,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,MAC3C;AACA,UAAI,cAAc,IAAI,GAAG;AACvB,eAAOA,GAAE,SAAS,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,MAC5C;AACA,UAAI,cAAc,IAAI,GAAG;AACvB,eAAOA,GAAE,SAAS,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,MAC5C;AACA,UAAI,aAAa,IAAI,GAAG;AACtB,eAAOA,GAAE,QAAQ,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,MAC3C;AACA,aAAOA,GAAE,OAAO,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,IAC1C;AAAA,EACF;AACF,CAAC;","names":["inject","inject","defineComponent","h","inject","onMounted","onUnmounted","ref","watch","defineComponent","ref","inject","onMounted","onUnmounted","watch","h","defineComponent","h","onMounted","onUnmounted","ref","watch","createChart","onMounted","onUnmounted","ref","watch","onUnmounted","ref","watch","ref","onMounted","onUnmounted","ref","shallowRef","watch","ref","createTable","defineComponent","h","inject","onMounted","onUnmounted","ref","watch","defineComponent","ref","inject","createTable","onMounted","onUnmounted","watch","h","defineComponent","h","inject","onMounted","onUnmounted","ref","watch","defineComponent","ref","inject","onMounted","onUnmounted","watch","h","defineComponent","h","inject","onMounted","onUnmounted","ref","watch","defineComponent","ref","inject","onMounted","onUnmounted","watch","h","defineComponent","h","inject","onMounted","onUnmounted","ref","watch","defineComponent","ref","inject","onMounted","onUnmounted","watch","h","computed","defineComponent","defineComponent","computed","defineComponent","h","inject","onMounted","onUnmounted","ref","watch","defineComponent","ref","inject","onMounted","onUnmounted","watch","h","defineComponent","h","defineComponent","h"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/BarList.ts","../src/context.ts","../src/Chart.ts","../src/ChartStory.ts","../src/composables/useChart.ts","../src/composables/useDarkMode.ts","../src/composables/useGraph.ts","../src/composables/useTable.ts","../src/composables/useTableState.ts","../src/DataTable.ts","../src/GeoMap.ts","../src/Graph.ts","../src/Sankey.ts","../src/ThemeProvider.ts","../src/TileMap.ts","../src/Visualization.ts"],"sourcesContent":["/**\n * @opendata-ai/openchart-vue\n *\n * Vue 3 adapter for openchart. Provides <Chart />, <DataTable />, <Graph />,\n * and <VizThemeProvider /> components that wrap the vanilla adapter with\n * Vue lifecycle management.\n *\n * Re-exports the full core type system and utilities so Vue consumers\n * only need a single @opendata-ai/openchart-vue 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 { BarListProps, BarListRowEvent } from './BarList';\nexport { BarList } from './BarList';\n// Components\nexport type { ChartProps } from './Chart';\nexport { Chart } from './Chart';\nexport type { ChartStoryProps } from './ChartStory';\n// Scrollytelling\nexport { ChartStory } from './ChartStory';\n// Composables\nexport type { UseChartOptions, UseChartReturn } from './composables/useChart';\nexport { useChart } from './composables/useChart';\nexport { useDarkMode } from './composables/useDarkMode';\nexport type { GraphHandle, UseGraphReturn } from './composables/useGraph';\nexport { useGraph } from './composables/useGraph';\nexport type { UseTableReturn } from './composables/useTable';\nexport { useTable } from './composables/useTable';\nexport type { UseTableStateOptions, UseTableStateReturn } from './composables/useTableState';\nexport { useTableState } from './composables/useTableState';\n// Context (injection keys and composables)\nexport { useVizDarkMode, useVizTheme, VizDarkModeKey, VizThemeKey } from './context';\nexport type { DataTableProps } from './DataTable';\nexport { DataTable } from './DataTable';\nexport type { GeoMapProps } from './GeoMap';\nexport { GeoMap } from './GeoMap';\nexport type { GraphProps } from './Graph';\nexport { Graph } from './Graph';\nexport type { SankeyProps } from './Sankey';\nexport { Sankey } from './Sankey';\nexport type { VizThemeProviderProps } from './ThemeProvider';\nexport { VizThemeProvider } from './ThemeProvider';\nexport type { TileMapProps } from './TileMap';\nexport { TileMap } from './TileMap';\nexport type { VisualizationProps } from './Visualization';\nexport { Visualization } from './Visualization';\n","/**\n * Vue BarList component: thin wrapper around the vanilla adapter.\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 defineComponent,\n h,\n inject,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch,\n} from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\n\nexport interface BarListRowEvent {\n label: string;\n value: number;\n data: Record<string, unknown>;\n}\n\nexport interface BarListProps {\n spec: BarListSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n class?: string;\n style?: string | CSSProperties;\n}\n\nexport const BarList = defineComponent({\n name: 'BarList',\n props: {\n spec: {\n type: Object as PropType<BarListSpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n },\n emits: {\n 'row-click': (_row: BarListRowEvent) => true,\n 'row-hover': (_row: BarListRowEvent | null) => true,\n },\n setup(props, { emit, expose }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: BarListInstance | null = null;\n let prevSpec = '';\n\n const contextTheme = inject(VizThemeKey, undefined);\n const contextDarkMode = inject(VizDarkModeKey, undefined);\n\n function resolveTheme(): ThemeConfig | undefined {\n return props.theme ?? contextTheme?.value;\n }\n\n function resolveDarkMode(): DarkMode | undefined {\n return props.darkMode ?? contextDarkMode?.value;\n }\n\n function mountBarList() {\n const container = containerRef.value;\n if (!container) return;\n\n const options: BarListMountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n onRowClick: (row: BarListRowEvent) => emit('row-click', row),\n onRowHover: (row: BarListRowEvent | null) => emit('row-hover', row),\n responsive: true,\n };\n\n instance = createBarList(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\n }\n\n function destroyBarList() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n expose({\n get instance() {\n return instance;\n },\n });\n\n onMounted(() => {\n mountBarList();\n });\n\n onUnmounted(() => {\n destroyBarList();\n });\n\n watch(\n () => JSON.stringify(props.spec),\n (newVal) => {\n if (!instance) return;\n if (newVal !== prevSpec) {\n prevSpec = newVal;\n instance.update(props.spec);\n }\n },\n );\n\n watch(\n [\n () => props.theme,\n () => props.darkMode,\n () => contextTheme?.value,\n () => contextDarkMode?.value,\n ],\n () => {\n if (!containerRef.value) return;\n destroyBarList();\n mountBarList();\n },\n );\n\n const rootClass = () => {\n const base = 'oc-barlist-root';\n return props.class ? `${base} ${props.class}` : base;\n };\n\n return () =>\n h('div', {\n ref: containerRef,\n class: rootClass(),\n style: props.style,\n });\n },\n});\n","/**\n * Theme injection context for Vue.\n *\n * Provides typed injection keys and composables for accessing theme\n * and dark mode from any descendant component within a VizThemeProvider.\n */\n\nimport type { DarkMode, ThemeConfig } from '@opendata-ai/openchart-core';\nimport { type ComputedRef, computed, type InjectionKey, inject, type Ref } from 'vue';\n\n/** Injection key for the theme config ref. */\nexport const VizThemeKey: InjectionKey<Ref<ThemeConfig | undefined>> = Symbol('VizTheme');\n\n/** Injection key for the dark mode ref. */\nexport const VizDarkModeKey: InjectionKey<Ref<DarkMode | undefined>> = Symbol('VizDarkMode');\n\n/**\n * Read the current theme from the nearest VizThemeProvider.\n * Returns a computed ref that stays reactive to provider changes.\n */\nexport function useVizTheme(): ComputedRef<ThemeConfig | undefined> {\n const theme = inject(VizThemeKey, undefined);\n return computed(() => theme?.value);\n}\n\n/**\n * Read the current dark mode preference from the nearest VizThemeProvider.\n * Returns a computed ref that stays reactive to provider changes.\n */\nexport function useVizDarkMode(): ComputedRef<DarkMode | undefined> {\n const darkMode = inject(VizDarkModeKey, undefined);\n return computed(() => darkMode?.value);\n}\n","/**\n * Vue 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\nimport type {\n Annotation,\n AnnotationOffset,\n ChartSpec,\n DarkMode,\n ElementEdit,\n ElementRef,\n GraphSpec,\n LayerSpec,\n MarkEvent,\n TextAnnotation,\n ThemeConfig,\n} from '@opendata-ai/openchart-core';\nimport { type ChartInstance, createChart, type MountOptions } from '@opendata-ai/openchart-vanilla';\nimport {\n type CSSProperties,\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch,\n} from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\n\nexport interface ChartProps {\n spec: ChartSpec | LayerSpec | GraphSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n /** Rendering backend for point marks; see the vanilla `MountOptions.renderer`. */\n renderer?: 'auto' | 'svg' | 'canvas';\n class?: string;\n style?: string | CSSProperties;\n}\n\nexport const Chart = defineComponent({\n name: 'Chart',\n props: {\n spec: {\n type: Object as PropType<ChartSpec | LayerSpec | GraphSpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n renderer: {\n type: String as PropType<'auto' | 'svg' | 'canvas'>,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n selectedElement: {\n type: Object as PropType<ElementRef>,\n default: undefined,\n },\n highlight: {\n type: [Array, null] as unknown as PropType<string[] | null>,\n default: undefined,\n },\n editable: {\n type: Boolean as PropType<boolean>,\n default: undefined,\n },\n },\n emits: {\n 'mark-click': (_event: MarkEvent) => true,\n 'mark-hover': (_event: MarkEvent) => true,\n 'mark-leave': () => true,\n 'legend-toggle': (_series: string, _visible: boolean) => true,\n 'annotation-click': (_annotation: Annotation, _event: MouseEvent) => true,\n 'annotation-edit': (_annotation: TextAnnotation, _updatedOffset: AnnotationOffset) => true,\n edit: (_edit: ElementEdit) => true,\n select: (_element: ElementRef) => true,\n deselect: (_element: ElementRef) => true,\n 'text-edit': (_element: ElementRef, _oldText: string, _newText: string) => true,\n 'data-point-click': (_data: Record<string, unknown>) => true,\n },\n setup(props, { emit, expose }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: ChartInstance | null = null;\n let prevSpec = '';\n\n // Inject theme/darkMode from provider as fallbacks\n const contextTheme = inject(VizThemeKey, undefined);\n const contextDarkMode = inject(VizDarkModeKey, undefined);\n\n // Check which event listeners are bound by the parent.\n // Vue 3 passes listeners as onXxx props on the component vnode.\n // We cache this at setup time since it won't change.\n const vm = getCurrentInstance();\n const vnodeProps = vm?.vnode.props ?? {};\n const hasAnnotationEditListener =\n 'onAnnotation-edit' in vnodeProps || 'onAnnotationEdit' in vnodeProps;\n const hasEditListener = 'onEdit' in vnodeProps;\n const hasSelectListener = 'onSelect' in vnodeProps;\n const hasDeselectListener = 'onDeselect' in vnodeProps;\n const hasTextEditListener = 'onText-edit' in vnodeProps || 'onTextEdit' in vnodeProps;\n\n function resolveTheme(): ThemeConfig | undefined {\n return props.theme ?? contextTheme?.value;\n }\n\n function resolveDarkMode(): DarkMode | undefined {\n return props.darkMode ?? contextDarkMode?.value;\n }\n\n function mountChart() {\n const container = containerRef.value;\n if (!container) return;\n\n const options: MountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n renderer: props.renderer,\n onDataPointClick: (data: Record<string, unknown>) => emit('data-point-click', data),\n onMarkClick: (event: MarkEvent) => emit('mark-click', event),\n onMarkHover: (event: MarkEvent) => emit('mark-hover', event),\n onMarkLeave: () => emit('mark-leave'),\n onLegendToggle: (series: string, visible: boolean) =>\n emit('legend-toggle', series, visible),\n onAnnotationClick: (annotation: Annotation, event: MouseEvent) =>\n emit('annotation-click', annotation, event),\n // Only include editing callbacks when the parent binds a listener.\n // Without this gate, every chart gets drag editing wired up.\n ...(hasAnnotationEditListener\n ? {\n onAnnotationEdit: (annotation: TextAnnotation, updatedOffset: AnnotationOffset) =>\n emit('annotation-edit', annotation, updatedOffset),\n }\n : {}),\n ...(hasEditListener ? { onEdit: (edit: ElementEdit) => emit('edit', edit) } : {}),\n ...(hasSelectListener\n ? { onSelect: (element: ElementRef) => emit('select', element) }\n : {}),\n ...(hasDeselectListener\n ? { onDeselect: (element: ElementRef) => emit('deselect', element) }\n : {}),\n ...(hasTextEditListener\n ? {\n onTextEdit: (element: ElementRef, oldText: string, newText: string) =>\n emit('text-edit', element, oldText, newText),\n }\n : {}),\n ...(props.editable != null ? { editable: props.editable } : {}),\n ...(props.selectedElement ? { selectedElement: props.selectedElement } : {}),\n responsive: true,\n };\n\n instance = createChart(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\n if (props.highlight !== undefined) {\n instance.setHighlight(props.highlight ?? null);\n }\n }\n\n function destroyChart() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n // Expose imperative methods for parent ref access\n expose({\n getSelectedElement(): ElementRef | null {\n return instance?.getSelectedElement() ?? null;\n },\n select(elementRef: ElementRef): void {\n instance?.select(elementRef);\n },\n deselect(): void {\n instance?.deselect();\n },\n get instance() {\n return instance;\n },\n });\n\n onMounted(() => {\n mountChart();\n });\n\n onUnmounted(() => {\n destroyChart();\n });\n\n // Watch spec changes: update if only spec changed, recreate if theme/darkMode changed\n watch(\n () => JSON.stringify(props.spec),\n (newVal) => {\n if (!instance) return;\n if (newVal !== prevSpec) {\n prevSpec = newVal;\n instance.update(props.spec, { selectedElement: props.selectedElement });\n }\n },\n );\n\n // Watch selectedElement prop changes\n watch(\n () => props.selectedElement,\n (newVal) => {\n if (!instance) return;\n if (newVal) {\n instance.select(newVal);\n } else {\n instance.deselect();\n }\n },\n );\n\n // Watch highlight prop changes\n watch(\n () => props.highlight,\n (newVal) => {\n if (!instance) return;\n instance.setHighlight(newVal ?? null);\n },\n );\n\n // Recreate chart when theme, darkMode, renderer, or editable change\n watch(\n [\n () => props.theme,\n () => props.darkMode,\n () => props.renderer,\n () => props.editable,\n () => contextTheme?.value,\n () => contextDarkMode?.value,\n ],\n () => {\n if (!containerRef.value) return;\n destroyChart();\n mountChart();\n },\n );\n\n const rootClass = () => {\n const base = 'oc-chart-root';\n return props.class ? `${base} ${props.class}` : base;\n };\n\n return () =>\n h('div', {\n ref: containerRef,\n class: rootClass(),\n style: props.style,\n });\n },\n});\n","/**\n * Vue scrollytelling shell around the vanilla `createChartStory`.\n *\n * Mirrors the React `<ChartStory>`: a sticky chart panel plus a scrolling\n * narrative column whose blocks advance the story. The vanilla driver owns\n * cumulative patch application, mark morphing, crossfade, and camera; this\n * component owns only Vue lifecycle and the sticky layout.\n *\n * Narrative is provided as the default slot's children (one root node per\n * step) or via the `narrative` prop (an array of vnodes/strings). Pass `step`\n * to drive it externally; omit for self-driving scroll.\n */\n\nimport type { ChartSpec, GeoMapSpec, GraphSpec, LayerSpec } 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 {\n type CSSProperties,\n defineComponent,\n h,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n type VNode,\n watch,\n} from 'vue';\n\nexport interface ChartStoryProps {\n spec: ChartSpec | LayerSpec | GraphSpec | GeoMapSpec;\n steps: ChartStoryOptions['steps'];\n narrative?: VNode[];\n step?: number;\n triggerPosition?: number;\n cameraMode?: 'step' | 'scrub';\n mountOptions?: MountOptions;\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 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\nexport const ChartStory = defineComponent({\n name: 'ChartStory',\n props: {\n spec: {\n type: Object as PropType<ChartSpec | LayerSpec | GraphSpec | GeoMapSpec>,\n required: true,\n },\n steps: {\n type: Array as PropType<ChartStoryOptions['steps']>,\n required: true,\n },\n narrative: {\n type: Array as PropType<VNode[]>,\n default: undefined,\n },\n step: {\n type: Number,\n default: undefined,\n },\n triggerPosition: {\n type: Number,\n default: undefined,\n },\n cameraMode: {\n type: String as PropType<'step' | 'scrub'>,\n default: undefined,\n },\n mountOptions: {\n type: Object as PropType<MountOptions>,\n default: undefined,\n },\n },\n setup(props, { slots, expose }) {\n const sectionRef = ref<HTMLElement | null>(null);\n const mountRef = ref<HTMLDivElement | null>(null);\n const stepEls = ref<Array<HTMLElement | null>>([]);\n let story: ChartStoryInstance | null = null;\n\n onMounted(() => {\n const mount = mountRef.value;\n if (!mount) return;\n\n const blocks = props.narrative ?? [];\n if (blocks.length > 0 && blocks.length !== props.steps.length) {\n console.warn(\n `[openchart] ChartStory: narrative length (${blocks.length}) does not match steps length (${props.steps.length}). Each step should have a corresponding narrative element.`,\n );\n }\n\n story = createChartStory(\n mount,\n {\n spec: props.spec,\n steps: props.steps,\n triggerPosition: props.triggerPosition,\n cameraMode: props.cameraMode,\n },\n props.mountOptions,\n );\n if (sectionRef.value) story.setContainer(sectionRef.value);\n stepEls.value.forEach((el, i) => {\n if (el) story?.registerStep(i, el);\n });\n if (props.step !== undefined) story.goTo(props.step);\n });\n\n watch(\n () => props.step,\n (next) => {\n if (next !== undefined) story?.goTo(next);\n },\n );\n\n onUnmounted(() => {\n story?.destroy();\n story = null;\n });\n\n expose({\n goTo(index: number) {\n story?.goTo(index);\n },\n get instance() {\n return story;\n },\n });\n\n return () => {\n // Prefer the `narrative` prop; fall back to default slot children so\n // consumers can author steps as template markup.\n const blocks = props.narrative ?? slots.default?.() ?? [];\n return h('section', { ref: sectionRef, style: sectionStyle }, [\n h(\n 'div',\n { style: { position: 'relative' } },\n blocks.map((content, i) =>\n h(\n 'div',\n {\n // Steps are a fixed ordered list, so the index is the stable\n // identity. Do not reorder or splice narrative entries at runtime\n // (that would remap step refs to the wrong content); rebuild the\n // whole story instead.\n key: i,\n ref: (el: unknown) => {\n stepEls.value[i] = el as HTMLElement | null;\n },\n 'data-oc-story-step': i,\n style: stepStyle,\n },\n [h('div', { style: { maxWidth: '36rem' } }, [content])],\n ),\n ),\n ),\n h('div', { style: panelStyle }, [h('div', { ref: mountRef, style: { width: '100%' } })]),\n ]);\n };\n },\n});\n","/**\n * useChart: composable for manual chart lifecycle control.\n *\n * Provides a template ref to attach to a container div. The chart\n * mounts automatically and updates when the spec changes.\n */\n\nimport type {\n ChartLayout,\n ChartSpec,\n DarkMode,\n GraphSpec,\n LayerSpec,\n ThemeConfig,\n} from '@opendata-ai/openchart-core';\nimport { type ChartInstance, createChart, type MountOptions } from '@opendata-ai/openchart-vanilla';\nimport { onMounted, onUnmounted, type Ref, ref, type ShallowRef, shallowRef, watch } from 'vue';\n\nexport interface UseChartOptions {\n /** Theme overrides. */\n theme?: ThemeConfig;\n /** Dark mode setting. */\n darkMode?: 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 /** Template ref to attach to the container div. */\n containerRef: Ref<HTMLDivElement | null>;\n /** The chart instance (null until mounted). */\n chart: ShallowRef<ChartInstance | null>;\n /** The current compiled layout (null until mounted). */\n layout: ShallowRef<ChartLayout | null>;\n}\n\n/**\n * Composable for manual chart lifecycle control.\n *\n * Attach the returned containerRef to a container div via `ref=\"containerRef\"`.\n * The chart mounts automatically and updates when the spec changes.\n */\nexport function useChart(\n spec: Ref<ChartSpec | LayerSpec | GraphSpec>,\n options?: UseChartOptions,\n): UseChartReturn {\n const containerRef = ref<HTMLDivElement | null>(null);\n const chart = shallowRef<ChartInstance | null>(null);\n const layout = shallowRef<ChartLayout | null>(null);\n\n function mount() {\n const container = containerRef.value;\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 instance = createChart(container, spec.value, mountOpts);\n chart.value = instance;\n layout.value = instance.layout;\n }\n\n function destroy() {\n chart.value?.destroy();\n chart.value = null;\n layout.value = null;\n }\n\n onMounted(() => {\n mount();\n });\n\n onUnmounted(() => {\n destroy();\n });\n\n // Update on spec change\n watch(spec, (newSpec) => {\n const instance = chart.value;\n if (!instance) return;\n instance.update(newSpec);\n layout.value = instance.layout;\n });\n\n return {\n containerRef,\n chart,\n layout,\n };\n}\n","/**\n * useDarkMode: composable that resolves a DarkMode preference to a boolean.\n *\n * - \"force\" -> true\n * - \"off\" -> false\n * - \"auto\" -> matches system preference (reactive to changes)\n */\n\nimport type { DarkMode } from '@opendata-ai/openchart-core';\nimport { onUnmounted, type Ref, ref, watch } from 'vue';\n\n/**\n * Resolve a DarkMode preference to a reactive boolean.\n *\n * For \"auto\" mode, watches the system `prefers-color-scheme` media query\n * and updates reactively when the user changes their OS theme.\n */\nexport function useDarkMode(mode: Ref<DarkMode | undefined>): Ref<boolean> {\n const isDark = ref(resolveInitial(mode.value));\n let cleanup: (() => void) | null = null;\n\n function setup(currentMode: DarkMode | undefined) {\n // Clean up previous listener\n cleanup?.();\n cleanup = null;\n\n if (currentMode !== 'auto') {\n isDark.value = currentMode === 'force';\n return;\n }\n\n if (typeof window === 'undefined' || !window.matchMedia) {\n isDark.value = false;\n return;\n }\n\n const mq = window.matchMedia('(prefers-color-scheme: dark)');\n isDark.value = mq.matches;\n\n const handler = (e: MediaQueryListEvent) => {\n isDark.value = e.matches;\n };\n mq.addEventListener('change', handler);\n cleanup = () => mq.removeEventListener('change', handler);\n }\n\n // Run setup for initial value\n setup(mode.value);\n\n // React to mode changes\n watch(mode, (newMode) => {\n setup(newMode);\n });\n\n onUnmounted(() => {\n cleanup?.();\n cleanup = null;\n });\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: composable for imperative graph control.\n *\n * Provides a template 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 { type Ref, ref } from 'vue';\n\n// Re-exported rather than redeclared so the 3D pose fields (`position`,\n// `target`) stay visible to typed consumers of the Vue wrapper.\nexport type { GraphCamera, GraphFlyTarget } from '@opendata-ai/openchart-vanilla';\n\n/** Handle exposed by Graph component via expose(). */\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\nexport interface UseGraphReturn {\n /** Template ref to pass to <Graph ref={graphRef} />. */\n graphRef: Ref<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/**\n * Composable for imperative graph control.\n *\n * Usage:\n * ```vue\n * <script setup>\n * const { graphRef, search, zoomToFit } = useGraph();\n * </script>\n * <template>\n * <Graph ref=\"graphRef\" :spec=\"spec\" />\n * </template>\n * ```\n */\nexport function useGraph(): UseGraphReturn {\n const graphRef = ref<GraphHandle | null>(null);\n\n function search(query: string) {\n graphRef.value?.search(query);\n }\n\n function clearSearch() {\n graphRef.value?.clearSearch();\n }\n\n function getSearchMatches(): string[] {\n return graphRef.value?.getSearchMatches() ?? [];\n }\n\n function zoomToFit(opts?: CameraFlightOptions & { padding?: number }) {\n graphRef.value?.zoomToFit(opts);\n }\n\n function zoomToNode(nodeId: string, opts?: CameraFlightOptions & { scale?: number }) {\n graphRef.value?.zoomToNode(nodeId, opts);\n }\n\n function flyTo(target: GraphFlyTarget, opts?: CameraFlightOptions) {\n graphRef.value?.flyTo(target, opts);\n }\n\n function centerAt(x: number, y: number, opts?: CameraFlightOptions) {\n graphRef.value?.centerAt(x, y, opts);\n }\n\n function getCamera(): GraphCamera {\n return graphRef.value?.getCamera() ?? { x: 0, y: 0, k: 1 };\n }\n\n function selectNode(nodeId: string, opts?: { fly?: boolean } & CameraFlightOptions) {\n graphRef.value?.selectNode(nodeId, opts);\n }\n\n function getSelectedNodes(): string[] {\n return graphRef.value?.getSelectedNodes() ?? [];\n }\n\n function highlight(target: GraphHighlightTarget, opts?: { dimOpacity?: number }) {\n graphRef.value?.highlight(target, opts);\n }\n\n function clearHighlight() {\n graphRef.value?.clearHighlight();\n }\n\n function getHighlight(): string[] | null {\n return graphRef.value?.getHighlight() ?? null;\n }\n\n function getLegend(): GraphLegendData | null {\n return graphRef.value?.getLegend() ?? null;\n }\n\n function setActiveCategories(values: string[]) {\n graphRef.value?.setActiveCategories(values);\n }\n\n function getActiveCategories(): string[] {\n return graphRef.value?.getActiveCategories() ?? [];\n }\n\n return {\n graphRef,\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: composable 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 { onMounted, onUnmounted, type Ref, ref, type ShallowRef, shallowRef, watch } from 'vue';\n\nexport interface UseTableReturn {\n /** Template ref to attach to the container div. */\n containerRef: Ref<HTMLDivElement | null>;\n /** The table instance (null until mounted). */\n table: ShallowRef<TableInstance | null>;\n /** The current table state (sort, search, page). */\n state: Ref<TableState>;\n}\n\n/**\n * Composable for manual table lifecycle control.\n *\n * Attach the returned containerRef to a container div via `ref=\"containerRef\"`.\n * The table mounts automatically and updates when the spec changes.\n */\nexport function useTable(spec: Ref<TableSpec>, options?: TableMountOptions): UseTableReturn {\n const containerRef = ref<HTMLDivElement | null>(null);\n const table = shallowRef<TableInstance | null>(null);\n const state = ref<TableState>({\n sort: null,\n search: '',\n page: 0,\n });\n\n const originalOnStateChange = options?.onStateChange;\n\n function handleStateChange(newState: TableState) {\n state.value = newState;\n originalOnStateChange?.(newState);\n }\n\n function mount() {\n const container = containerRef.value;\n if (!container) return;\n\n const mountOpts: TableMountOptions = {\n ...options,\n onStateChange: handleStateChange,\n };\n\n const instance = createTable(container, spec.value, mountOpts);\n table.value = instance;\n state.value = instance.getState();\n }\n\n function destroy() {\n table.value?.destroy();\n table.value = null;\n }\n\n onMounted(() => {\n mount();\n });\n\n onUnmounted(() => {\n destroy();\n });\n\n // Update on spec change\n watch(spec, (newSpec) => {\n const instance = table.value;\n if (!instance) return;\n instance.update(newSpec);\n state.value = instance.getState();\n });\n\n return {\n containerRef,\n table,\n state,\n };\n}\n","/**\n * useTableState: managed state composable 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 { type Ref, ref } from 'vue';\n\nexport interface UseTableStateReturn {\n sort: Ref<SortState | null>;\n setSort: (sort: SortState | null) => void;\n search: Ref<string>;\n setSearch: (query: string) => void;\n page: Ref<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 * Composable for managing table state (sort, search, page).\n *\n * Use with the DataTable component's controlled props:\n * ```vue\n * <script setup>\n * const { sort, search, page, setSort, setSearch, setPage } = useTableState();\n * </script>\n * <template>\n * <DataTable\n * :spec=\"spec\"\n * :sort=\"sort\"\n * :search=\"search\"\n * :page=\"page\"\n * @update:sort=\"setSort\"\n * @update:search=\"setSearch\"\n * @update:page=\"setPage\"\n * />\n * </template>\n * ```\n */\nexport function useTableState(initialState?: UseTableStateOptions): UseTableStateReturn {\n const sort = ref<SortState | null>(initialState?.sort ?? null);\n const search = ref(initialState?.search ?? '');\n const page = ref(initialState?.page ?? 0);\n\n function setSort(newSort: SortState | null) {\n sort.value = newSort;\n }\n\n function setSearch(query: string) {\n search.value = query;\n }\n\n function setPage(newPage: number) {\n page.value = newPage;\n }\n\n function resetState() {\n sort.value = initialState?.sort ?? null;\n search.value = initialState?.search ?? '';\n page.value = initialState?.page ?? 0;\n }\n\n return {\n sort,\n setSort,\n search,\n setSearch,\n page,\n setPage,\n resetState,\n };\n}\n","/**\n * DataTable component: Vue 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 {\n type CSSProperties,\n defineComponent,\n h,\n inject,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch,\n} from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\n\nexport interface DataTableProps {\n spec: TableSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n class?: string;\n style?: string | CSSProperties;\n sort?: SortState | null;\n search?: string;\n page?: number;\n}\n\nexport const DataTable = defineComponent({\n name: 'DataTable',\n props: {\n spec: {\n type: Object as PropType<TableSpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n sort: {\n type: [Object, null] as PropType<SortState | null>,\n default: undefined,\n },\n search: {\n type: String,\n default: undefined,\n },\n page: {\n type: Number,\n default: undefined,\n },\n },\n emits: {\n 'row-click': (_row: Record<string, unknown>) => true,\n 'update:sort': (_sort: SortState | null) => true,\n 'update:search': (_query: string) => true,\n 'update:page': (_page: number) => true,\n },\n setup(props, { emit }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: TableInstance | null = null;\n\n // Inject theme/darkMode from provider as fallbacks\n const contextTheme = inject(VizThemeKey, undefined);\n const contextDarkMode = inject(VizDarkModeKey, undefined);\n\n function resolveTheme(): ThemeConfig | undefined {\n return props.theme ?? contextTheme?.value;\n }\n\n function resolveDarkMode(): DarkMode | undefined {\n return props.darkMode ?? contextDarkMode?.value;\n }\n\n function isControlled(): boolean {\n return props.sort !== undefined || props.search !== undefined || props.page !== undefined;\n }\n\n let prevSpec = '';\n\n function mountTable() {\n const container = containerRef.value;\n if (!container) return;\n\n const mountOptions: TableMountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n onRowClick: (row: Record<string, unknown>) => emit('row-click', row),\n responsive: true,\n onStateChange: (state) => {\n if (state.sort !== undefined) emit('update:sort', state.sort);\n if (state.search !== undefined) emit('update:search', state.search);\n if (state.page !== undefined) emit('update:page', state.page);\n },\n };\n\n if (isControlled()) {\n mountOptions.externalState = {\n sort: props.sort ?? null,\n search: props.search ?? '',\n page: props.page ?? 0,\n };\n }\n\n instance = createTable(container, props.spec, mountOptions);\n prevSpec = JSON.stringify(props.spec);\n }\n\n function destroyTable() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n onMounted(() => {\n mountTable();\n });\n\n onUnmounted(() => {\n destroyTable();\n });\n\n // Watch spec changes via JSON.stringify comparison (consistent with Chart/Graph)\n watch(\n () => JSON.stringify(props.spec),\n (newVal) => {\n if (!instance) return;\n if (newVal !== prevSpec) {\n prevSpec = newVal;\n instance.update(props.spec);\n }\n },\n );\n\n // Recreate when theme or darkMode change\n watch(\n [\n () => props.theme,\n () => props.darkMode,\n () => contextTheme?.value,\n () => contextDarkMode?.value,\n ],\n () => {\n if (!containerRef.value) return;\n destroyTable();\n mountTable();\n },\n );\n\n // Sync controlled state without remounting\n watch([() => props.sort, () => props.search, () => props.page], () => {\n if (!instance || !isControlled()) return;\n instance.setState({\n sort: props.sort ?? null,\n search: props.search ?? '',\n page: props.page ?? 0,\n });\n });\n\n const rootClass = () => {\n const base = 'oc-table-root';\n return props.class ? `${base} ${props.class}` : base;\n };\n\n return () =>\n h('div', {\n ref: containerRef,\n class: rootClass(),\n style: props.style,\n });\n },\n});\n","/**\n * Vue 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\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 defineComponent,\n h,\n inject,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch,\n} from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\n\nexport interface GeoMapProps {\n spec: GeoMapSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n class?: string;\n style?: string | CSSProperties;\n}\n\nexport const GeoMap = defineComponent({\n name: 'GeoMap',\n props: {\n spec: {\n type: Object as PropType<GeoMapSpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n },\n emits: {\n 'mark-click': (_event: GeoMapMarkEvent) => true,\n 'mark-hover': (_event: GeoMapMarkEvent | null) => true,\n },\n setup(props, { emit, expose }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: GeoMapInstance | null = null;\n let prevSpec = '';\n\n // Inject theme/darkMode from provider as fallbacks\n const contextTheme = inject(VizThemeKey, undefined);\n const contextDarkMode = inject(VizDarkModeKey, undefined);\n\n function resolveTheme(): ThemeConfig | undefined {\n return props.theme ?? contextTheme?.value;\n }\n\n function resolveDarkMode(): DarkMode | undefined {\n return props.darkMode ?? contextDarkMode?.value;\n }\n\n function mountMap() {\n const container = containerRef.value;\n if (!container) return;\n\n const options: GeoMapMountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n onMarkClick: (feature) => emit('mark-click', feature),\n onMarkHover: (feature) => emit('mark-hover', feature),\n responsive: true,\n };\n\n instance = createGeoMap(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\n }\n\n function destroyMap() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n // Expose imperative access to the instance\n expose({\n get instance() {\n return instance;\n },\n });\n\n onMounted(() => {\n mountMap();\n });\n\n onUnmounted(() => {\n destroyMap();\n });\n\n // Watch spec changes\n watch(\n () => JSON.stringify(props.spec),\n (newVal) => {\n if (!instance) return;\n if (newVal !== prevSpec) {\n prevSpec = newVal;\n instance.update(props.spec);\n }\n },\n );\n\n // Recreate map when theme or darkMode change\n watch(\n [\n () => props.theme,\n () => props.darkMode,\n () => contextTheme?.value,\n () => contextDarkMode?.value,\n ],\n () => {\n if (!containerRef.value) return;\n destroyMap();\n mountMap();\n },\n );\n\n const rootClass = () => {\n const base = 'oc-map-root';\n return props.class ? `${base} ${props.class}` : base;\n };\n\n return () =>\n h('div', {\n ref: containerRef,\n class: rootClass(),\n style: props.style,\n });\n },\n});\n","/**\n * Vue 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 * Exposes imperative methods via defineExpose for use with useGraph().\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 defineComponent,\n h,\n inject,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch,\n} from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\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 spec: GraphSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n tooltip?: GraphTooltipProp;\n legend?: GraphLegendProp;\n fitOnLoad?: boolean;\n class?: string;\n style?: string | CSSProperties;\n}\n\n/** True when the tooltip is on (only the on/off decision gates recreation). */\nfunction tooltipOn(tooltip: GraphTooltipProp | undefined): boolean {\n return tooltip !== false;\n}\n\nexport const Graph = defineComponent({\n name: 'Graph',\n props: {\n spec: {\n type: Object as PropType<GraphSpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n tooltip: {\n type: [Boolean, Object] as PropType<GraphTooltipProp>,\n default: undefined,\n },\n legend: {\n type: [Boolean, Object] as PropType<GraphLegendProp>,\n default: undefined,\n },\n fitOnLoad: {\n type: Boolean,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n },\n emits: {\n 'node-click': (_node: Record<string, unknown>) => true,\n 'node-double-click': (_node: Record<string, unknown>) => true,\n 'node-hover': (_node: Record<string, unknown> | null) => true,\n 'edge-hover': (_edge: Record<string, unknown> | null) => true,\n 'selection-change': (_nodeIds: string[]) => true,\n 'legend-hover': (_entry: { field: string; value: string } | null) => true,\n 'legend-toggle': (_activeValues: string[]) => true,\n 'highlight-change': (_nodeIds: string[] | null) => true,\n 'camera-change': (_camera: GraphCamera) => true,\n },\n setup(props, { emit, expose }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: GraphInstance | null = null;\n let prevSpec = '';\n // First mount plays the entrance; theme/darkMode-only recreations suppress it.\n let mountedOnce = false;\n\n // Inject theme/darkMode from provider as fallbacks\n const contextTheme = inject(VizThemeKey, undefined);\n const contextDarkMode = inject(VizDarkModeKey, undefined);\n\n function resolveTheme(): ThemeConfig | undefined {\n return props.theme ?? contextTheme?.value;\n }\n\n function resolveDarkMode(): DarkMode | undefined {\n return props.darkMode ?? contextDarkMode?.value;\n }\n\n // Stable tooltip formatter wrapper. Vue props are reactive, so reading\n // `props.tooltip` at CALL time always sees the latest formatter — no stale\n // closure, no recreation when the formatter changes. When the tooltip is on\n // we always hand the vanilla layer this wrapper (falling back to defaults),\n // so a formatter can be added or swapped per-render without a remount.\n const stableTooltipFormatter: GraphTooltipFormatter = (item, defaults) => {\n const t = props.tooltip;\n const fn = t && typeof t === 'object' ? t.formatter : undefined;\n return fn ? fn(item, defaults) : defaults;\n };\n\n // `playEntrance` is set only by the dimension remount: 2D and 3D are\n // different renderers, so the new one should play its entrance instead of\n // being suppressed the way a theme-only recreation is.\n function mountGraph(playEntrance = false) {\n const container = containerRef.value;\n if (!container) return;\n\n const tooltipOption: GraphMountOptions['tooltip'] = tooltipOn(props.tooltip)\n ? { formatter: stableTooltipFormatter }\n : false;\n\n const options: GraphMountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n tooltip: tooltipOption,\n legend: props.legend,\n fitOnLoad: props.fitOnLoad,\n onNodeClick: (node) => emit('node-click', node),\n onNodeDoubleClick: (node) => emit('node-double-click', node),\n onNodeHover: (node) => emit('node-hover', node),\n onEdgeHover: (edge) => emit('edge-hover', edge),\n onSelectionChange: (nodeIds) => emit('selection-change', nodeIds),\n onLegendHover: (entry) => emit('legend-hover', entry),\n onLegendToggle: (activeValues) => emit('legend-toggle', activeValues),\n onHighlightChange: (nodeIds) => emit('highlight-change', nodeIds),\n onCameraChange: (camera) => emit('camera-change', camera),\n responsive: true,\n suppressEntrance: mountedOnce && !playEntrance,\n };\n\n instance = createGraph(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\n mountedOnce = true;\n }\n\n function destroyGraph() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n // Expose imperative methods for useGraph() composable. Every method forwards\n // opts to the underlying instance so consumers get the full vanilla API.\n expose({\n search(query: string) {\n instance?.search(query);\n },\n clearSearch() {\n instance?.clearSearch();\n },\n getSearchMatches(): string[] {\n return instance?.getSearchMatches() ?? [];\n },\n zoomToFit(opts?: Parameters<GraphInstance['zoomToFit']>[0]) {\n instance?.zoomToFit(opts);\n },\n zoomToNode(nodeId: string, opts?: Parameters<GraphInstance['zoomToNode']>[1]) {\n instance?.zoomToNode(nodeId, opts);\n },\n flyTo(\n target: Parameters<GraphInstance['flyTo']>[0],\n opts?: Parameters<GraphInstance['flyTo']>[1],\n ) {\n instance?.flyTo(target, opts);\n },\n centerAt(x: number, y: number, opts?: Parameters<GraphInstance['centerAt']>[2]) {\n instance?.centerAt(x, y, opts);\n },\n getCamera() {\n return instance?.getCamera() ?? { x: 0, y: 0, k: 1 };\n },\n selectNode(nodeId: string, opts?: Parameters<GraphInstance['selectNode']>[1]) {\n instance?.selectNode(nodeId, opts);\n },\n getSelectedNodes(): string[] {\n return instance?.getSelectedNodes() ?? [];\n },\n highlight(\n target: Parameters<GraphInstance['highlight']>[0],\n opts?: Parameters<GraphInstance['highlight']>[1],\n ) {\n instance?.highlight(target, opts);\n },\n clearHighlight() {\n instance?.clearHighlight();\n },\n getHighlight() {\n return instance?.getHighlight() ?? null;\n },\n getLegend() {\n return instance?.getLegend() ?? null;\n },\n setActiveCategories(values: string[]) {\n instance?.setActiveCategories(values);\n },\n getActiveCategories(): string[] {\n return instance?.getActiveCategories() ?? [];\n },\n updateVisuals(spec: GraphSpec) {\n instance?.updateVisuals(spec);\n },\n get instance() {\n return instance;\n },\n });\n\n onMounted(() => {\n mountGraph();\n });\n\n onUnmounted(() => {\n destroyGraph();\n });\n\n // A dimension change picks a different renderer, and the renderer is chosen\n // once, at mount — so it is a remount, not an update(). Registered before\n // the spec watcher so the remount runs first; mountGraph refreshes prevSpec,\n // and the spec watcher then finds nothing to apply.\n watch(\n () => props.spec.dimensions ?? 2,\n () => {\n if (!containerRef.value) return;\n destroyGraph();\n mountGraph(true);\n },\n );\n\n // Watch spec changes\n watch(\n () => JSON.stringify(props.spec),\n (newVal) => {\n if (!instance) return;\n if (newVal !== prevSpec) {\n prevSpec = newVal;\n instance.update(props.spec);\n }\n },\n );\n\n // Recreate graph when theme or darkMode change (spec unchanged). mountedOnce\n // is already true here, so mountGraph passes suppressEntrance: true and the\n // entrance does not replay.\n watch(\n [\n () => props.theme,\n () => props.darkMode,\n () => contextTheme?.value,\n () => contextDarkMode?.value,\n ],\n () => {\n if (!containerRef.value) return;\n destroyGraph();\n mountGraph();\n },\n );\n\n const rootClass = () => {\n const base = 'oc-graph-root';\n return props.class ? `${base} ${props.class}` : base;\n };\n\n return () =>\n h('div', {\n ref: containerRef,\n class: rootClass(),\n style: props.style,\n });\n },\n});\n","/**\n * Vue 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\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 defineComponent,\n h,\n inject,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch,\n} from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\n\nexport interface SankeyProps {\n spec: SankeySpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n class?: string;\n style?: string | CSSProperties;\n}\n\nexport const Sankey = defineComponent({\n name: 'Sankey',\n props: {\n spec: {\n type: Object as PropType<SankeySpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n },\n emits: {\n 'node-click': (_node: Record<string, unknown>) => true,\n 'link-click': (_link: Record<string, unknown>) => true,\n 'node-hover': (_node: Record<string, unknown> | null) => true,\n 'link-hover': (_link: Record<string, unknown> | null) => true,\n },\n setup(props, { emit, expose }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: SankeyInstance | null = null;\n let prevSpec = '';\n\n // Inject theme/darkMode from provider as fallbacks\n const contextTheme = inject(VizThemeKey, undefined);\n const contextDarkMode = inject(VizDarkModeKey, undefined);\n\n function resolveTheme(): ThemeConfig | undefined {\n return props.theme ?? contextTheme?.value;\n }\n\n function resolveDarkMode(): DarkMode | undefined {\n return props.darkMode ?? contextDarkMode?.value;\n }\n\n function mountSankey() {\n const container = containerRef.value;\n if (!container) return;\n\n const options: SankeyMountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n onNodeClick: (node: Record<string, unknown>) => emit('node-click', node),\n onLinkClick: (link: Record<string, unknown>) => emit('link-click', link),\n onNodeHover: (node: Record<string, unknown> | null) => emit('node-hover', node),\n onLinkHover: (link: Record<string, unknown> | null) => emit('link-hover', link),\n responsive: true,\n };\n\n instance = createSankey(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\n }\n\n function destroySankey() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n // Expose imperative access to the instance\n expose({\n get instance() {\n return instance;\n },\n });\n\n onMounted(() => {\n mountSankey();\n });\n\n onUnmounted(() => {\n destroySankey();\n });\n\n // Watch spec changes\n watch(\n () => JSON.stringify(props.spec),\n (newVal) => {\n if (!instance) return;\n if (newVal !== prevSpec) {\n prevSpec = newVal;\n instance.update(props.spec);\n }\n },\n );\n\n // Recreate sankey when theme or darkMode change\n watch(\n [\n () => props.theme,\n () => props.darkMode,\n () => contextTheme?.value,\n () => contextDarkMode?.value,\n ],\n () => {\n if (!containerRef.value) return;\n destroySankey();\n mountSankey();\n },\n );\n\n const rootClass = () => {\n const base = 'oc-sankey-root';\n return props.class ? `${base} ${props.class}` : base;\n };\n\n return () =>\n h('div', {\n ref: containerRef,\n class: rootClass(),\n style: props.style,\n });\n },\n});\n","/**\n * VizThemeProvider: 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 { computed, defineComponent, type PropType, provide } from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\n\nexport interface VizThemeProviderProps {\n theme: ThemeConfig | undefined;\n darkMode?: DarkMode;\n}\n\nexport const VizThemeProvider = defineComponent({\n name: 'VizThemeProvider',\n props: {\n theme: {\n type: Object as PropType<ThemeConfig | undefined>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n },\n setup(props, { slots }) {\n // Wrap in computed() so changes to props propagate reactively\n // through the injection system.\n const themeRef = computed(() => props.theme);\n const darkModeRef = computed(() => props.darkMode);\n\n provide(VizThemeKey, themeRef);\n provide(VizDarkModeKey, darkModeRef);\n\n return () => slots.default?.();\n },\n});\n","/**\n * Vue 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\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 defineComponent,\n h,\n inject,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch,\n} from 'vue';\nimport { VizDarkModeKey, VizThemeKey } from './context';\n\nexport interface TileMapTileEvent {\n stateCode: string;\n stateName: string;\n value: number | null;\n data: Record<string, unknown>;\n}\n\nexport interface TileMapProps {\n spec: TileMapSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n class?: string;\n style?: string | CSSProperties;\n}\n\nexport const TileMap = defineComponent({\n name: 'TileMap',\n props: {\n spec: {\n type: Object as PropType<TileMapSpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n },\n emits: {\n 'tile-click': (_tile: TileMapTileEvent) => true,\n 'tile-hover': (_tile: TileMapTileEvent | null) => true,\n },\n setup(props, { emit, expose }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: TileMapInstance | null = null;\n let prevSpec = '';\n\n // Inject theme/darkMode from provider as fallbacks\n const contextTheme = inject(VizThemeKey, undefined);\n const contextDarkMode = inject(VizDarkModeKey, undefined);\n\n function resolveTheme(): ThemeConfig | undefined {\n return props.theme ?? contextTheme?.value;\n }\n\n function resolveDarkMode(): DarkMode | undefined {\n return props.darkMode ?? contextDarkMode?.value;\n }\n\n function mountTileMap() {\n const container = containerRef.value;\n if (!container) return;\n\n const options: TileMapMountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n onTileClick: (tile: TileMapTileEvent) => emit('tile-click', tile),\n onTileHover: (tile: TileMapTileEvent | null) => emit('tile-hover', tile),\n responsive: true,\n };\n\n instance = createTileMap(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\n }\n\n function destroyTileMap() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n // Expose imperative access to the instance\n expose({\n get instance() {\n return instance;\n },\n });\n\n onMounted(() => {\n mountTileMap();\n });\n\n onUnmounted(() => {\n destroyTileMap();\n });\n\n // Watch spec changes\n watch(\n () => JSON.stringify(props.spec),\n (newVal) => {\n if (!instance) return;\n if (newVal !== prevSpec) {\n prevSpec = newVal;\n instance.update(props.spec);\n }\n },\n );\n\n // Recreate tilemap when theme or darkMode change\n watch(\n [\n () => props.theme,\n () => props.darkMode,\n () => contextTheme?.value,\n () => contextDarkMode?.value,\n ],\n () => {\n if (!containerRef.value) return;\n destroyTileMap();\n mountTileMap();\n },\n );\n\n const rootClass = () => {\n const base = 'oc-tilemap-root';\n return props.class ? `${base} ${props.class}` : base;\n };\n\n return () =>\n h('div', {\n ref: containerRef,\n class: rootClass(),\n style: props.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, defineComponent, h, type PropType } from 'vue';\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 spec: VizSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n class?: string;\n style?: string | CSSProperties;\n}\n\nexport const Visualization = defineComponent({\n name: 'Visualization',\n props: {\n spec: {\n type: Object as PropType<VizSpec>,\n required: true,\n },\n theme: {\n type: Object as PropType<ThemeConfig>,\n default: undefined,\n },\n darkMode: {\n type: String as PropType<DarkMode>,\n default: undefined,\n },\n class: {\n type: String,\n default: undefined,\n },\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n default: undefined,\n },\n },\n setup(props) {\n return () => {\n const { spec, theme, darkMode, class: className, style } = props;\n const sharedProps = { theme, darkMode, class: className, style };\n\n if (isTableSpec(spec)) {\n return h(DataTable, { ...sharedProps, spec });\n }\n if (isGraphSpec(spec)) {\n return h(Graph, { ...sharedProps, spec });\n }\n if (isSankeySpec(spec)) {\n return h(Sankey, { ...sharedProps, spec });\n }\n if (isTileMapSpec(spec)) {\n return h(TileMap, { ...sharedProps, spec });\n }\n if (isBarListSpec(spec)) {\n return h(BarList, { ...sharedProps, spec });\n }\n if (isGeoMapSpec(spec)) {\n return h(GeoMap, { ...sharedProps, spec });\n }\n return h(Chart, { ...sharedProps, spec });\n };\n },\n});\n"],"mappings":";AAeA,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;;;ACrEP;AAAA,EAGE;AAAA,OACK;AACP;AAAA,EAEE;AAAA,EACA;AAAA,EACA,UAAAA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,OACK;;;ACZP,SAA2B,UAA6B,cAAwB;AAGzE,IAAM,cAA0D,uBAAO,UAAU;AAGjF,IAAM,iBAA0D,uBAAO,aAAa;AAMpF,SAAS,cAAoD;AAClE,QAAM,QAAQ,OAAO,aAAa,MAAS;AAC3C,SAAO,SAAS,MAAM,OAAO,KAAK;AACpC;AAMO,SAAS,iBAAoD;AACl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,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACL,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,MAAM,OAAO;AACX,WAAO,MAAM;AACX,YAAM,EAAE,MAAM,OAAO,UAAU,OAAO,WAAW,MAAM,IAAI;AAC3D,YAAM,cAAc,EAAE,OAAO,UAAU,OAAO,WAAW,MAAM;AAE/D,UAAI,YAAY,IAAI,GAAG;AACrB,eAAOC,GAAE,WAAW,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,MAC9C;AACA,UAAI,YAAY,IAAI,GAAG;AACrB,eAAOA,GAAE,OAAO,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,MAC1C;AACA,UAAI,aAAa,IAAI,GAAG;AACtB,eAAOA,GAAE,QAAQ,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,MAC3C;AACA,UAAI,cAAc,IAAI,GAAG;AACvB,eAAOA,GAAE,SAAS,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,MAC5C;AACA,UAAI,cAAc,IAAI,GAAG;AACvB,eAAOA,GAAE,SAAS,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,MAC5C;AACA,UAAI,aAAa,IAAI,GAAG;AACtB,eAAOA,GAAE,QAAQ,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,MAC3C;AACA,aAAOA,GAAE,OAAO,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,IAC1C;AAAA,EACF;AACF,CAAC;","names":["inject","inject","defineComponent","h","inject","onMounted","onUnmounted","ref","watch","defineComponent","ref","inject","onMounted","onUnmounted","watch","h","defineComponent","h","onMounted","onUnmounted","ref","watch","createChart","onMounted","onUnmounted","ref","watch","onUnmounted","ref","watch","ref","onMounted","onUnmounted","ref","shallowRef","watch","ref","createTable","defineComponent","h","inject","onMounted","onUnmounted","ref","watch","defineComponent","ref","inject","createTable","onMounted","onUnmounted","watch","h","defineComponent","h","inject","onMounted","onUnmounted","ref","watch","defineComponent","ref","inject","onMounted","onUnmounted","watch","h","defineComponent","h","inject","onMounted","onUnmounted","ref","watch","defineComponent","ref","inject","onMounted","onUnmounted","watch","h","defineComponent","h","inject","onMounted","onUnmounted","ref","watch","defineComponent","ref","inject","onMounted","onUnmounted","watch","h","computed","defineComponent","defineComponent","computed","defineComponent","h","inject","onMounted","onUnmounted","ref","watch","defineComponent","ref","inject","onMounted","onUnmounted","watch","h","defineComponent","h","defineComponent","h"]}