@opendata-ai/openchart-vue 6.4.1 → 6.5.1
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 +3 -3
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -764
- package/package.json +4 -4
- package/src/Chart.ts +1 -1
- package/src/DataTable.ts +1 -1
- package/src/Graph.ts +1 -1
- package/src/__tests__/Chart.test.ts +6 -6
- package/src/__tests__/DataTable.test.ts +2 -2
- package/src/__tests__/Graph.test.ts +4 -4
package/dist/index.js
CHANGED
|
@@ -189,7 +189,7 @@ var Chart = defineComponent({
|
|
|
189
189
|
}
|
|
190
190
|
);
|
|
191
191
|
const rootClass = () => {
|
|
192
|
-
const base = "
|
|
192
|
+
const base = "oc-chart-root";
|
|
193
193
|
return props.class ? `${base} ${props.class}` : base;
|
|
194
194
|
};
|
|
195
195
|
return () => h("div", {
|
|
@@ -540,7 +540,7 @@ var DataTable = defineComponent2({
|
|
|
540
540
|
});
|
|
541
541
|
});
|
|
542
542
|
const rootClass = () => {
|
|
543
|
-
const base = "
|
|
543
|
+
const base = "oc-table-root";
|
|
544
544
|
return props.class ? `${base} ${props.class}` : base;
|
|
545
545
|
};
|
|
546
546
|
return () => h2("div", {
|
|
@@ -677,7 +677,7 @@ var Graph = defineComponent3({
|
|
|
677
677
|
}
|
|
678
678
|
);
|
|
679
679
|
const rootClass = () => {
|
|
680
|
-
const base = "
|
|
680
|
+
const base = "oc-graph-root";
|
|
681
681
|
return props.class ? `${base} ${props.class}` : base;
|
|
682
682
|
};
|
|
683
683
|
return () => h3("div", {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/Chart.ts","../src/context.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/Graph.ts","../src/ThemeProvider.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 { JPGExportOptions, PNGExportOptions } from '@opendata-ai/openchart-vanilla';\nexport { exportCSV, exportJPG, exportPNG, exportSVG } 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 NormalizedChartSpec,\n NormalizedChrome,\n NormalizedGraphSpec,\n NormalizedSpec,\n NormalizedTableSpec,\n SimulationConfig,\n ValidationError,\n ValidationErrorCode,\n ValidationResult,\n} from '@opendata-ai/openchart-engine';\nexport {\n clearRenderers,\n compile,\n compileChart,\n compileGraph,\n compileTable,\n getChartRenderer,\n normalizeSpec,\n registerChartRenderer,\n validateSpec,\n} from '@opendata-ai/openchart-engine';\n\n// Components\nexport type { ChartProps } from './Chart';\nexport { Chart } from './Chart';\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 { GraphProps } from './Graph';\nexport { Graph } from './Graph';\nexport type { VizThemeProviderProps } from './ThemeProvider';\nexport { VizThemeProvider } from './ThemeProvider';\nexport type { VisualizationProps } from './Visualization';\nexport { Visualization } from './Visualization';\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 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 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 },\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 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.selectedElement ? { selectedElement: props.selectedElement } : {}),\n responsive: true,\n };\n\n instance = createChart(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\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 // Recreate chart 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 destroyChart();\n mountChart();\n },\n );\n\n const rootClass = () => {\n const base = 'viz-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 * 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 * 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}\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 };\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) for programmatic control of the graph instance.\n */\n\nimport type { GraphInstance } from '@opendata-ai/openchart-vanilla';\nimport { type Ref, ref } from 'vue';\n\n/** Handle exposed by Graph component via expose(). */\nexport interface GraphHandle {\n search: (query: string) => void;\n clearSearch: () => void;\n zoomToFit: () => void;\n zoomToNode: (nodeId: string) => void;\n selectNode: (nodeId: string) => void;\n getSelectedNodes: () => string[];\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 /** Zoom to fit all nodes in view. */\n zoomToFit: () => void;\n /** Zoom and center on a specific node. */\n zoomToNode: (nodeId: string) => void;\n /** Select a node by id. */\n selectNode: (nodeId: string) => void;\n /** Get the currently selected node ids. */\n getSelectedNodes: () => 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 zoomToFit() {\n graphRef.value?.zoomToFit();\n }\n\n function zoomToNode(nodeId: string) {\n graphRef.value?.zoomToNode(nodeId);\n }\n\n function selectNode(nodeId: string) {\n graphRef.value?.selectNode(nodeId);\n }\n\n function getSelectedNodes(): string[] {\n return graphRef.value?.getSelectedNodes() ?? [];\n }\n\n return {\n graphRef,\n search,\n clearSearch,\n zoomToFit,\n zoomToNode,\n selectNode,\n getSelectedNodes,\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 = 'viz-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 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} 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 GraphProps {\n spec: GraphSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n class?: string;\n style?: string | CSSProperties;\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 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 'selection-change': (_nodeIds: string[]) => true,\n },\n setup(props, { emit, expose }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: GraphInstance | 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 mountGraph() {\n const container = containerRef.value;\n if (!container) return;\n\n const options: GraphMountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n onNodeClick: (node: Record<string, unknown>) => emit('node-click', node),\n onNodeDoubleClick: (node: Record<string, unknown>) => emit('node-double-click', node),\n onSelectionChange: (nodeIds: string[]) => emit('selection-change', nodeIds),\n responsive: true,\n };\n\n instance = createGraph(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\n }\n\n function destroyGraph() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n // Expose imperative methods for useGraph() composable\n expose({\n search(query: string) {\n instance?.search(query);\n },\n clearSearch() {\n instance?.clearSearch();\n },\n zoomToFit() {\n instance?.zoomToFit();\n },\n zoomToNode(nodeId: string) {\n instance?.zoomToNode(nodeId);\n },\n selectNode(nodeId: string) {\n instance?.selectNode(nodeId);\n },\n getSelectedNodes(): string[] {\n return instance?.getSelectedNodes() ?? [];\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\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 = 'viz-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 * 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 * 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 { isGraphSpec, isTableSpec } from '@opendata-ai/openchart-core';\nimport { type CSSProperties, defineComponent, h, type PropType } from 'vue';\nimport { Chart } from './Chart';\nimport { DataTable } from './DataTable';\nimport { Graph } from './Graph';\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 return h(Chart, { ...sharedProps, spec });\n };\n },\n});\n"],"mappings":";AAeA,cAAc;AAOd,SAAS,WAAW,WAAW,WAAW,iBAAiB;AAsB3D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACjCP,SAA6B,mBAAsC;AACnE;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAAA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,OACK;;;ACzBP,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;;;ADYO,IAAM,QAAQ,gBAAgB;AAAA,EACnC,MAAM;AAAA,EACN,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,IACZ;AAAA,IACA,OAAO;AAAA,MACL,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,IACA,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF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UAAI,YAAY,IAAI,GAAG;AACrB,eAAOA,GAAE,OAAO,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,MAC1C;AACA,aAAOA,GAAE,OAAO,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,IAC1C;AAAA,EACF;AACF,CAAC;","names":["inject","inject","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","computed","defineComponent","defineComponent","computed","defineComponent","h","defineComponent","h"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/Chart.ts","../src/context.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/Graph.ts","../src/ThemeProvider.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 { JPGExportOptions, PNGExportOptions } from '@opendata-ai/openchart-vanilla';\nexport { exportCSV, exportJPG, exportPNG, exportSVG } 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 NormalizedChartSpec,\n NormalizedChrome,\n NormalizedGraphSpec,\n NormalizedSpec,\n NormalizedTableSpec,\n SimulationConfig,\n ValidationError,\n ValidationErrorCode,\n ValidationResult,\n} from '@opendata-ai/openchart-engine';\nexport {\n clearRenderers,\n compile,\n compileChart,\n compileGraph,\n compileTable,\n getChartRenderer,\n normalizeSpec,\n registerChartRenderer,\n validateSpec,\n} from '@opendata-ai/openchart-engine';\n\n// Components\nexport type { ChartProps } from './Chart';\nexport { Chart } from './Chart';\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 { GraphProps } from './Graph';\nexport { Graph } from './Graph';\nexport type { VizThemeProviderProps } from './ThemeProvider';\nexport { VizThemeProvider } from './ThemeProvider';\nexport type { VisualizationProps } from './Visualization';\nexport { Visualization } from './Visualization';\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 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 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 },\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 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.selectedElement ? { selectedElement: props.selectedElement } : {}),\n responsive: true,\n };\n\n instance = createChart(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\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 // Recreate chart 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 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 * 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 * 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}\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 };\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) for programmatic control of the graph instance.\n */\n\nimport type { GraphInstance } from '@opendata-ai/openchart-vanilla';\nimport { type Ref, ref } from 'vue';\n\n/** Handle exposed by Graph component via expose(). */\nexport interface GraphHandle {\n search: (query: string) => void;\n clearSearch: () => void;\n zoomToFit: () => void;\n zoomToNode: (nodeId: string) => void;\n selectNode: (nodeId: string) => void;\n getSelectedNodes: () => string[];\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 /** Zoom to fit all nodes in view. */\n zoomToFit: () => void;\n /** Zoom and center on a specific node. */\n zoomToNode: (nodeId: string) => void;\n /** Select a node by id. */\n selectNode: (nodeId: string) => void;\n /** Get the currently selected node ids. */\n getSelectedNodes: () => 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 zoomToFit() {\n graphRef.value?.zoomToFit();\n }\n\n function zoomToNode(nodeId: string) {\n graphRef.value?.zoomToNode(nodeId);\n }\n\n function selectNode(nodeId: string) {\n graphRef.value?.selectNode(nodeId);\n }\n\n function getSelectedNodes(): string[] {\n return graphRef.value?.getSelectedNodes() ?? [];\n }\n\n return {\n graphRef,\n search,\n clearSearch,\n zoomToFit,\n zoomToNode,\n selectNode,\n getSelectedNodes,\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 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} 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 GraphProps {\n spec: GraphSpec;\n theme?: ThemeConfig;\n darkMode?: DarkMode;\n class?: string;\n style?: string | CSSProperties;\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 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 'selection-change': (_nodeIds: string[]) => true,\n },\n setup(props, { emit, expose }) {\n const containerRef = ref<HTMLDivElement | null>(null);\n let instance: GraphInstance | 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 mountGraph() {\n const container = containerRef.value;\n if (!container) return;\n\n const options: GraphMountOptions = {\n theme: resolveTheme(),\n darkMode: resolveDarkMode(),\n onNodeClick: (node: Record<string, unknown>) => emit('node-click', node),\n onNodeDoubleClick: (node: Record<string, unknown>) => emit('node-double-click', node),\n onSelectionChange: (nodeIds: string[]) => emit('selection-change', nodeIds),\n responsive: true,\n };\n\n instance = createGraph(container, props.spec, options);\n prevSpec = JSON.stringify(props.spec);\n }\n\n function destroyGraph() {\n instance?.destroy();\n instance = null;\n prevSpec = '';\n }\n\n // Expose imperative methods for useGraph() composable\n expose({\n search(query: string) {\n instance?.search(query);\n },\n clearSearch() {\n instance?.clearSearch();\n },\n zoomToFit() {\n instance?.zoomToFit();\n },\n zoomToNode(nodeId: string) {\n instance?.zoomToNode(nodeId);\n },\n selectNode(nodeId: string) {\n instance?.selectNode(nodeId);\n },\n getSelectedNodes(): string[] {\n return instance?.getSelectedNodes() ?? [];\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\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 * 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 * 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 { isGraphSpec, isTableSpec } from '@opendata-ai/openchart-core';\nimport { type CSSProperties, defineComponent, h, type PropType } from 'vue';\nimport { Chart } from './Chart';\nimport { DataTable } from './DataTable';\nimport { Graph } from './Graph';\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 return h(Chart, { ...sharedProps, spec });\n };\n },\n});\n"],"mappings":";AAeA,cAAc;AAOd,SAAS,WAAW,WAAW,WAAW,iBAAiB;AAsB3D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACjCP,SAA6B,mBAAsC;AACnE;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAAA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,OACK;;;ACzBP,SAA2B,UAA6B,cAAwB;AAGzE,IAAM,cAA0D,uBAAO,UAAU;AAGjF,IAAM,iBAA0D,uBAAO,aAAa;AAMpF,SAAS,cAAo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BAAgBC,iBAAgB;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,IACZ;AAAA,IACA,OAAO;AAAA,MACL,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,aAAOA,GAAE,OAAO,EAAE,GAAG,aAAa,KAAK,CAAC;AAAA,IAC1C;AAAA,EACF;AACF,CAAC;","names":["inject","inject","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","computed","defineComponent","defineComponent","computed","defineComponent","h","defineComponent","h"]}
|
package/dist/styles.css
CHANGED
|
@@ -1,764 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @opendata-ai/core styles
|
|
3
|
-
*
|
|
4
|
-
* Plain CSS with viz- prefix for all class names.
|
|
5
|
-
* CSS custom properties for theme overrides.
|
|
6
|
-
* Dark mode via .viz-dark class on the container.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/* For optimal typography, load Inter: https://fonts.google.com/specimen/Inter */
|
|
10
|
-
|
|
11
|
-
/* ---------------------------------------------------------------------------
|
|
12
|
-
* Custom properties (light mode defaults)
|
|
13
|
-
* --------------------------------------------------------------------------- */
|
|
14
|
-
|
|
15
|
-
.viz-root,
|
|
16
|
-
.viz-chart-root,
|
|
17
|
-
.viz-table-wrapper,
|
|
18
|
-
.viz-table-root,
|
|
19
|
-
.viz-graph-wrapper,
|
|
20
|
-
.viz-graph-root {
|
|
21
|
-
--viz-font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
22
|
-
--viz-font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
|
|
23
|
-
--viz-title-size: 22px;
|
|
24
|
-
--viz-title-weight: 700;
|
|
25
|
-
--viz-title-tracking: -0.02em;
|
|
26
|
-
--viz-subtitle-size: 14px;
|
|
27
|
-
--viz-subtitle-weight: 400;
|
|
28
|
-
--viz-source-size: 12px;
|
|
29
|
-
--viz-source-weight: 400;
|
|
30
|
-
--viz-body-size: 13px;
|
|
31
|
-
--viz-bg: #ffffff;
|
|
32
|
-
--viz-text: #1d1d1d;
|
|
33
|
-
--viz-text-secondary: #5c5c5c;
|
|
34
|
-
--viz-text-muted: #999999;
|
|
35
|
-
--viz-gridline: #e8e8e8;
|
|
36
|
-
--viz-axis: #888888;
|
|
37
|
-
--viz-border: #e2e2e2;
|
|
38
|
-
--viz-border-radius: 4px;
|
|
39
|
-
--viz-focus: #3b82f6;
|
|
40
|
-
--viz-hover-bg: rgba(0, 0, 0, 0.025);
|
|
41
|
-
--viz-tooltip-bg: rgba(255, 255, 255, 0.88);
|
|
42
|
-
--viz-tooltip-border: rgba(0, 0, 0, 0.08);
|
|
43
|
-
--viz-tooltip-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.12);
|
|
44
|
-
--viz-tooltip-text: #1d1d1d;
|
|
45
|
-
--viz-legend-text: #555555;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/* ---------------------------------------------------------------------------
|
|
49
|
-
* Dark mode overrides
|
|
50
|
-
* --------------------------------------------------------------------------- */
|
|
51
|
-
|
|
52
|
-
.viz-dark {
|
|
53
|
-
--viz-bg: #1a1a2e;
|
|
54
|
-
--viz-text: #e0e0e0;
|
|
55
|
-
--viz-text-secondary: #b0b0b0;
|
|
56
|
-
--viz-text-muted: #808080;
|
|
57
|
-
--viz-gridline: #333355;
|
|
58
|
-
--viz-axis: #999999;
|
|
59
|
-
--viz-border: #444466;
|
|
60
|
-
--viz-focus: #60a5fa;
|
|
61
|
-
--viz-hover-bg: rgba(255, 255, 255, 0.05);
|
|
62
|
-
--viz-tooltip-bg: rgba(30, 30, 50, 0.85);
|
|
63
|
-
--viz-tooltip-border: rgba(255, 255, 255, 0.08);
|
|
64
|
-
--viz-tooltip-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 1px rgba(0, 0, 0, 0.4);
|
|
65
|
-
--viz-tooltip-text: #e0e0e0;
|
|
66
|
-
--viz-legend-text: #b0b0b0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/* ---------------------------------------------------------------------------
|
|
70
|
-
* Chrome (title, subtitle, source, footer)
|
|
71
|
-
* --------------------------------------------------------------------------- */
|
|
72
|
-
|
|
73
|
-
.viz-chrome {
|
|
74
|
-
font-family: var(--viz-font-family);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.viz-title {
|
|
78
|
-
font-size: var(--viz-title-size);
|
|
79
|
-
font-weight: var(--viz-title-weight);
|
|
80
|
-
letter-spacing: var(--viz-title-tracking);
|
|
81
|
-
fill: var(--viz-text);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.viz-subtitle {
|
|
85
|
-
font-size: var(--viz-subtitle-size);
|
|
86
|
-
font-weight: var(--viz-subtitle-weight);
|
|
87
|
-
fill: var(--viz-text-secondary);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.viz-source,
|
|
91
|
-
.viz-byline,
|
|
92
|
-
.viz-footer {
|
|
93
|
-
font-size: var(--viz-source-size);
|
|
94
|
-
font-weight: var(--viz-source-weight);
|
|
95
|
-
fill: var(--viz-text-muted);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/* ---------------------------------------------------------------------------
|
|
99
|
-
* Table footer chrome
|
|
100
|
-
* --------------------------------------------------------------------------- */
|
|
101
|
-
|
|
102
|
-
.viz-chrome-footer {
|
|
103
|
-
padding-top: 16px;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/* ---------------------------------------------------------------------------
|
|
107
|
-
* Tooltip
|
|
108
|
-
* --------------------------------------------------------------------------- */
|
|
109
|
-
|
|
110
|
-
.viz-tooltip {
|
|
111
|
-
position: absolute;
|
|
112
|
-
display: none;
|
|
113
|
-
pointer-events: none;
|
|
114
|
-
z-index: 1000;
|
|
115
|
-
background: var(--viz-tooltip-bg);
|
|
116
|
-
backdrop-filter: blur(12px);
|
|
117
|
-
border: 1px solid var(--viz-tooltip-border);
|
|
118
|
-
border-radius: 8px;
|
|
119
|
-
box-shadow: var(--viz-tooltip-shadow);
|
|
120
|
-
color: var(--viz-tooltip-text);
|
|
121
|
-
font-family: var(--viz-font-family);
|
|
122
|
-
font-size: 12px;
|
|
123
|
-
padding: 0;
|
|
124
|
-
max-width: 260px;
|
|
125
|
-
min-width: 140px;
|
|
126
|
-
line-height: 1.4;
|
|
127
|
-
animation: viz-tooltip-in 120ms ease-out;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
@keyframes viz-tooltip-in {
|
|
131
|
-
from {
|
|
132
|
-
opacity: 0;
|
|
133
|
-
transform: translateY(2px);
|
|
134
|
-
}
|
|
135
|
-
to {
|
|
136
|
-
opacity: 1;
|
|
137
|
-
transform: translateY(0);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.viz-tooltip-header {
|
|
142
|
-
display: flex;
|
|
143
|
-
align-items: center;
|
|
144
|
-
gap: 6px;
|
|
145
|
-
padding: 8px 12px 6px;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.viz-tooltip-dot {
|
|
149
|
-
width: 8px;
|
|
150
|
-
height: 8px;
|
|
151
|
-
border-radius: 50%;
|
|
152
|
-
flex-shrink: 0;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.viz-tooltip-title {
|
|
156
|
-
font-weight: 600;
|
|
157
|
-
font-size: 12px;
|
|
158
|
-
letter-spacing: -0.01em;
|
|
159
|
-
color: var(--viz-tooltip-text);
|
|
160
|
-
white-space: nowrap;
|
|
161
|
-
overflow: hidden;
|
|
162
|
-
text-overflow: ellipsis;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.viz-tooltip-body {
|
|
166
|
-
padding: 4px 12px 8px;
|
|
167
|
-
border-top: 1px solid var(--viz-tooltip-border);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/* Only add separator when header is present */
|
|
171
|
-
.viz-tooltip-header + .viz-tooltip-body {
|
|
172
|
-
padding-top: 6px;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/* No separator when body is the only child */
|
|
176
|
-
.viz-tooltip-body:first-child {
|
|
177
|
-
border-top: none;
|
|
178
|
-
padding-top: 8px;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.viz-tooltip-row {
|
|
182
|
-
display: flex;
|
|
183
|
-
align-items: baseline;
|
|
184
|
-
justify-content: space-between;
|
|
185
|
-
gap: 12px;
|
|
186
|
-
padding: 1px 0;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.viz-tooltip-label {
|
|
190
|
-
color: var(--viz-text-muted);
|
|
191
|
-
font-size: 11px;
|
|
192
|
-
white-space: nowrap;
|
|
193
|
-
flex-shrink: 0;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.viz-tooltip-value {
|
|
197
|
-
font-weight: 500;
|
|
198
|
-
font-size: 11px;
|
|
199
|
-
font-variant-numeric: tabular-nums;
|
|
200
|
-
text-align: right;
|
|
201
|
-
overflow: hidden;
|
|
202
|
-
text-overflow: ellipsis;
|
|
203
|
-
white-space: nowrap;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/* ---------------------------------------------------------------------------
|
|
207
|
-
* Legend
|
|
208
|
-
* --------------------------------------------------------------------------- */
|
|
209
|
-
|
|
210
|
-
.viz-legend {
|
|
211
|
-
font-family: var(--viz-font-family);
|
|
212
|
-
font-size: var(--viz-body-size);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.viz-legend-entry {
|
|
216
|
-
cursor: default;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.viz-legend text {
|
|
220
|
-
fill: var(--viz-legend-text);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
/* ---------------------------------------------------------------------------
|
|
224
|
-
* React wrapper roots
|
|
225
|
-
* --------------------------------------------------------------------------- */
|
|
226
|
-
|
|
227
|
-
.viz-chart-root {
|
|
228
|
-
width: 100%;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.viz-table-root,
|
|
232
|
-
.viz-graph-root {
|
|
233
|
-
width: 100%;
|
|
234
|
-
height: 100%;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.viz-table-root {
|
|
238
|
-
overflow: auto;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/* ---------------------------------------------------------------------------
|
|
242
|
-
* Chart container
|
|
243
|
-
* --------------------------------------------------------------------------- */
|
|
244
|
-
|
|
245
|
-
.viz-chart {
|
|
246
|
-
font-family: var(--viz-font-family);
|
|
247
|
-
display: block;
|
|
248
|
-
width: 100%;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
/* ---------------------------------------------------------------------------
|
|
252
|
-
* Screen reader only utility
|
|
253
|
-
* --------------------------------------------------------------------------- */
|
|
254
|
-
|
|
255
|
-
.viz-sr-only {
|
|
256
|
-
position: absolute;
|
|
257
|
-
width: 1px;
|
|
258
|
-
height: 1px;
|
|
259
|
-
padding: 0;
|
|
260
|
-
margin: -1px;
|
|
261
|
-
overflow: hidden;
|
|
262
|
-
clip-path: inset(50%);
|
|
263
|
-
white-space: nowrap;
|
|
264
|
-
border-width: 0;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/* ---------------------------------------------------------------------------
|
|
268
|
-
* Table base
|
|
269
|
-
* --------------------------------------------------------------------------- */
|
|
270
|
-
|
|
271
|
-
.viz-table-wrapper {
|
|
272
|
-
font-family: var(--viz-font-family);
|
|
273
|
-
color: var(--viz-text);
|
|
274
|
-
background: var(--viz-bg);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.viz-table-wrapper > .viz-chrome {
|
|
278
|
-
margin-bottom: 16px;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.viz-table-title {
|
|
282
|
-
margin-bottom: 4px;
|
|
283
|
-
font-size: var(--viz-title-computed-size, var(--viz-title-size));
|
|
284
|
-
font-weight: var(--viz-title-computed-weight, var(--viz-title-weight));
|
|
285
|
-
color: var(--viz-title-computed-color, var(--viz-text));
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.viz-table-subtitle {
|
|
289
|
-
margin-bottom: 8px;
|
|
290
|
-
font-size: var(--viz-subtitle-computed-size, var(--viz-subtitle-size));
|
|
291
|
-
font-weight: var(--viz-subtitle-computed-weight, var(--viz-subtitle-weight));
|
|
292
|
-
color: var(--viz-subtitle-computed-color, var(--viz-text-secondary));
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
.viz-table-source {
|
|
296
|
-
font-size: var(--viz-source-computed-size, var(--viz-source-size));
|
|
297
|
-
color: var(--viz-source-computed-color, var(--viz-text-muted));
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
.viz-table-footer-text {
|
|
301
|
-
font-size: var(--viz-footer-computed-size, var(--viz-source-size));
|
|
302
|
-
color: var(--viz-footer-computed-color, var(--viz-text-muted));
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.viz-table-scroll {
|
|
306
|
-
overflow-x: auto;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.viz-table-wrapper table {
|
|
310
|
-
width: 100%;
|
|
311
|
-
border-collapse: collapse;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.viz-table-wrapper th,
|
|
315
|
-
.viz-table-wrapper td {
|
|
316
|
-
padding: 10px 16px;
|
|
317
|
-
text-align: left;
|
|
318
|
-
border-bottom: 1px solid var(--viz-border);
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.viz-table-wrapper th {
|
|
322
|
-
font-weight: 600;
|
|
323
|
-
font-size: 12px;
|
|
324
|
-
text-transform: uppercase;
|
|
325
|
-
letter-spacing: 0.05em;
|
|
326
|
-
color: var(--viz-text-secondary);
|
|
327
|
-
white-space: nowrap;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
.viz-table-wrapper thead {
|
|
331
|
-
position: sticky;
|
|
332
|
-
top: 0;
|
|
333
|
-
z-index: 2;
|
|
334
|
-
background: var(--viz-bg);
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.viz-table-wrapper thead th {
|
|
338
|
-
border-bottom-width: 2px;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
.viz-table-wrapper td {
|
|
342
|
-
font-size: 14px;
|
|
343
|
-
font-variant-numeric: tabular-nums;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
/* ---------------------------------------------------------------------------
|
|
347
|
-
* Sticky first column
|
|
348
|
-
* --------------------------------------------------------------------------- */
|
|
349
|
-
|
|
350
|
-
.viz-table--sticky th:first-child,
|
|
351
|
-
.viz-table--sticky td:first-child {
|
|
352
|
-
position: sticky;
|
|
353
|
-
left: 0;
|
|
354
|
-
z-index: 1;
|
|
355
|
-
background: var(--viz-bg);
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
/* ---------------------------------------------------------------------------
|
|
359
|
-
* Sort controls
|
|
360
|
-
* --------------------------------------------------------------------------- */
|
|
361
|
-
|
|
362
|
-
.viz-table-sort-btn {
|
|
363
|
-
background: none;
|
|
364
|
-
border: none;
|
|
365
|
-
cursor: pointer;
|
|
366
|
-
padding: 2px;
|
|
367
|
-
margin-left: 6px;
|
|
368
|
-
display: inline-flex;
|
|
369
|
-
flex-direction: column;
|
|
370
|
-
align-items: center;
|
|
371
|
-
vertical-align: middle;
|
|
372
|
-
gap: 2px;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
.viz-table-sort-btn::before,
|
|
376
|
-
.viz-table-sort-btn::after {
|
|
377
|
-
content: "";
|
|
378
|
-
display: block;
|
|
379
|
-
width: 0;
|
|
380
|
-
height: 0;
|
|
381
|
-
border-left: 5px solid transparent;
|
|
382
|
-
border-right: 5px solid transparent;
|
|
383
|
-
transition:
|
|
384
|
-
opacity 0.15s,
|
|
385
|
-
border-color 0.15s;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
.viz-table-sort-btn::before {
|
|
389
|
-
border-bottom: 4.5px solid var(--viz-text-secondary);
|
|
390
|
-
opacity: 0.45;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
.viz-table-sort-btn::after {
|
|
394
|
-
border-top: 4.5px solid var(--viz-text-secondary);
|
|
395
|
-
opacity: 0.45;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
.viz-table-sort-btn:hover::before,
|
|
399
|
-
.viz-table-sort-btn:hover::after {
|
|
400
|
-
opacity: 0.75;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
th[aria-sort="ascending"] .viz-table-sort-btn::before {
|
|
404
|
-
opacity: 1;
|
|
405
|
-
border-bottom-color: var(--viz-text);
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
th[aria-sort="ascending"] .viz-table-sort-btn::after {
|
|
409
|
-
opacity: 0.15;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
th[aria-sort="descending"] .viz-table-sort-btn::after {
|
|
413
|
-
opacity: 1;
|
|
414
|
-
border-top-color: var(--viz-text);
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
th[aria-sort="descending"] .viz-table-sort-btn::before {
|
|
418
|
-
opacity: 0.15;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
/* ---------------------------------------------------------------------------
|
|
422
|
-
* Search
|
|
423
|
-
* --------------------------------------------------------------------------- */
|
|
424
|
-
|
|
425
|
-
.viz-table-search {
|
|
426
|
-
padding: 8px 0;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
.viz-table-search input {
|
|
430
|
-
width: 100%;
|
|
431
|
-
padding: 8px 12px;
|
|
432
|
-
border: 1px solid var(--viz-border);
|
|
433
|
-
border-radius: 6px;
|
|
434
|
-
font-size: 13px;
|
|
435
|
-
font-family: inherit;
|
|
436
|
-
background: var(--viz-bg);
|
|
437
|
-
color: var(--viz-text);
|
|
438
|
-
box-sizing: border-box;
|
|
439
|
-
transition: border-color 0.15s;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
.viz-table-search input::placeholder {
|
|
443
|
-
color: var(--viz-text-muted);
|
|
444
|
-
font-size: 13px;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
.viz-table-search input:focus {
|
|
448
|
-
outline: none;
|
|
449
|
-
border-color: var(--viz-focus);
|
|
450
|
-
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
/* ---------------------------------------------------------------------------
|
|
454
|
-
* Pagination
|
|
455
|
-
* --------------------------------------------------------------------------- */
|
|
456
|
-
|
|
457
|
-
.viz-table-pagination {
|
|
458
|
-
display: flex;
|
|
459
|
-
align-items: center;
|
|
460
|
-
justify-content: space-between;
|
|
461
|
-
padding: 12px 0 4px;
|
|
462
|
-
font-size: 13px;
|
|
463
|
-
color: var(--viz-text-secondary);
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
.viz-table-pagination-info {
|
|
467
|
-
font-variant-numeric: tabular-nums;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
.viz-table-pagination-btns {
|
|
471
|
-
display: flex;
|
|
472
|
-
gap: 8px;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.viz-table-pagination button {
|
|
476
|
-
padding: 6px 14px;
|
|
477
|
-
border: 1px solid var(--viz-border);
|
|
478
|
-
border-radius: 6px;
|
|
479
|
-
background: var(--viz-bg);
|
|
480
|
-
color: var(--viz-text);
|
|
481
|
-
cursor: pointer;
|
|
482
|
-
font-size: 13px;
|
|
483
|
-
font-family: inherit;
|
|
484
|
-
transition:
|
|
485
|
-
background 0.15s,
|
|
486
|
-
border-color 0.15s;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
.viz-table-pagination button:disabled {
|
|
490
|
-
opacity: 0.35;
|
|
491
|
-
cursor: not-allowed;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
.viz-table-pagination button:hover:not(:disabled) {
|
|
495
|
-
background: var(--viz-hover-bg);
|
|
496
|
-
border-color: var(--viz-axis);
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
.viz-table-pagination button:focus-visible {
|
|
500
|
-
outline: 2px solid var(--viz-focus);
|
|
501
|
-
outline-offset: 1px;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
/* ---------------------------------------------------------------------------
|
|
505
|
-
* Bar cells
|
|
506
|
-
* --------------------------------------------------------------------------- */
|
|
507
|
-
|
|
508
|
-
.viz-table-bar {
|
|
509
|
-
position: relative;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
.viz-table-bar-fill {
|
|
513
|
-
position: absolute;
|
|
514
|
-
top: 6px;
|
|
515
|
-
left: 0;
|
|
516
|
-
bottom: 6px;
|
|
517
|
-
border-radius: 2px;
|
|
518
|
-
opacity: 0.15;
|
|
519
|
-
pointer-events: none;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
.viz-table-bar-value {
|
|
523
|
-
position: relative;
|
|
524
|
-
z-index: 1;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
/* ---------------------------------------------------------------------------
|
|
528
|
-
* Sparkline cells
|
|
529
|
-
* --------------------------------------------------------------------------- */
|
|
530
|
-
|
|
531
|
-
.viz-table-sparkline {
|
|
532
|
-
display: block;
|
|
533
|
-
width: 100%;
|
|
534
|
-
position: relative;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
.viz-table-sparkline svg {
|
|
538
|
-
display: block;
|
|
539
|
-
width: 100%;
|
|
540
|
-
overflow: visible;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
.viz-table-sparkline-dot {
|
|
544
|
-
position: absolute;
|
|
545
|
-
border-radius: 50%;
|
|
546
|
-
width: 5px;
|
|
547
|
-
height: 5px;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
.viz-table-sparkline-labels {
|
|
551
|
-
display: flex;
|
|
552
|
-
justify-content: space-between;
|
|
553
|
-
font-size: 11px;
|
|
554
|
-
line-height: 1;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
/* ---------------------------------------------------------------------------
|
|
558
|
-
* Image cells
|
|
559
|
-
* --------------------------------------------------------------------------- */
|
|
560
|
-
|
|
561
|
-
.viz-table-image {
|
|
562
|
-
display: inline-block;
|
|
563
|
-
vertical-align: middle;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
.viz-table-image img {
|
|
567
|
-
object-fit: cover;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
.viz-table-image-rounded img {
|
|
571
|
-
border-radius: 50%;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
/* ---------------------------------------------------------------------------
|
|
575
|
-
* Flag cells
|
|
576
|
-
* --------------------------------------------------------------------------- */
|
|
577
|
-
|
|
578
|
-
.viz-table-flag {
|
|
579
|
-
font-size: 1.2em;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
/* ---------------------------------------------------------------------------
|
|
583
|
-
* Compact mode
|
|
584
|
-
* --------------------------------------------------------------------------- */
|
|
585
|
-
|
|
586
|
-
.viz-table--compact th,
|
|
587
|
-
.viz-table--compact td {
|
|
588
|
-
padding: 4px 8px;
|
|
589
|
-
font-size: 13px;
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
.viz-table--compact th {
|
|
593
|
-
font-size: 11px;
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
/* ---------------------------------------------------------------------------
|
|
597
|
-
* Row hover (when onRowClick is set)
|
|
598
|
-
* --------------------------------------------------------------------------- */
|
|
599
|
-
|
|
600
|
-
.viz-table--clickable tbody tr {
|
|
601
|
-
cursor: pointer;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
.viz-table--clickable tbody tr:hover {
|
|
605
|
-
background: var(--viz-hover-bg);
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
/* ---------------------------------------------------------------------------
|
|
609
|
-
* Table header keyboard focus
|
|
610
|
-
* --------------------------------------------------------------------------- */
|
|
611
|
-
|
|
612
|
-
.viz-table-wrapper th:focus {
|
|
613
|
-
outline: 2px solid var(--viz-focus);
|
|
614
|
-
outline-offset: -2px;
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
/* ---------------------------------------------------------------------------
|
|
618
|
-
* Keyboard cell focus indicator
|
|
619
|
-
* --------------------------------------------------------------------------- */
|
|
620
|
-
|
|
621
|
-
.viz-table-cell-focus {
|
|
622
|
-
outline: 2px solid var(--viz-focus);
|
|
623
|
-
outline-offset: -2px;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
/* ---------------------------------------------------------------------------
|
|
627
|
-
* Table body focus (for keyboard navigation entry)
|
|
628
|
-
* --------------------------------------------------------------------------- */
|
|
629
|
-
|
|
630
|
-
.viz-table-wrapper tbody:focus {
|
|
631
|
-
outline: none;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
/* ---------------------------------------------------------------------------
|
|
635
|
-
* Empty state
|
|
636
|
-
* --------------------------------------------------------------------------- */
|
|
637
|
-
|
|
638
|
-
.viz-table-empty {
|
|
639
|
-
padding: 32px 16px;
|
|
640
|
-
text-align: center;
|
|
641
|
-
color: var(--viz-text-secondary);
|
|
642
|
-
font-size: 14px;
|
|
643
|
-
font-style: italic;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
/* ---------------------------------------------------------------------------
|
|
647
|
-
* Reduced motion
|
|
648
|
-
* --------------------------------------------------------------------------- */
|
|
649
|
-
|
|
650
|
-
@media (prefers-reduced-motion: reduce) {
|
|
651
|
-
.viz-table-sort-btn::before,
|
|
652
|
-
.viz-table-sort-btn::after,
|
|
653
|
-
.viz-table-search input,
|
|
654
|
-
.viz-table-pagination button {
|
|
655
|
-
transition: none;
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
/* ---------------------------------------------------------------------------
|
|
660
|
-
* Graph
|
|
661
|
-
* --------------------------------------------------------------------------- */
|
|
662
|
-
|
|
663
|
-
.viz-graph-wrapper {
|
|
664
|
-
position: relative;
|
|
665
|
-
overflow: hidden;
|
|
666
|
-
background: var(--viz-bg);
|
|
667
|
-
font-family: var(--viz-font-family);
|
|
668
|
-
width: 100%;
|
|
669
|
-
height: 100%;
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
.viz-graph-canvas {
|
|
673
|
-
display: block;
|
|
674
|
-
cursor: grab;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
.viz-graph-canvas--dragging {
|
|
678
|
-
cursor: grabbing;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
.viz-graph-chrome {
|
|
682
|
-
padding: 16px 16px 8px;
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
.viz-graph-chrome .viz-title {
|
|
686
|
-
font-size: var(--viz-title-size);
|
|
687
|
-
font-weight: var(--viz-title-weight);
|
|
688
|
-
letter-spacing: var(--viz-title-tracking);
|
|
689
|
-
color: var(--viz-text);
|
|
690
|
-
margin: 0 0 4px;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
.viz-graph-chrome .viz-subtitle {
|
|
694
|
-
font-size: var(--viz-subtitle-size);
|
|
695
|
-
color: var(--viz-text-secondary);
|
|
696
|
-
margin: 0;
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
.viz-graph-legend {
|
|
700
|
-
position: absolute;
|
|
701
|
-
top: 8px;
|
|
702
|
-
right: 8px;
|
|
703
|
-
background: var(--viz-bg);
|
|
704
|
-
border: 1px solid var(--viz-border);
|
|
705
|
-
border-radius: var(--viz-border-radius);
|
|
706
|
-
padding: 8px 12px;
|
|
707
|
-
font-size: 12px;
|
|
708
|
-
color: var(--viz-text-secondary);
|
|
709
|
-
max-height: 200px;
|
|
710
|
-
overflow-y: auto;
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
.viz-graph-legend-item {
|
|
714
|
-
display: flex;
|
|
715
|
-
align-items: center;
|
|
716
|
-
gap: 6px;
|
|
717
|
-
padding: 2px 0;
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
.viz-graph-legend-swatch {
|
|
721
|
-
width: 10px;
|
|
722
|
-
height: 10px;
|
|
723
|
-
border-radius: 50%;
|
|
724
|
-
flex-shrink: 0;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
.viz-graph-search {
|
|
728
|
-
position: absolute;
|
|
729
|
-
top: 8px;
|
|
730
|
-
left: 8px;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
.viz-graph-search input {
|
|
734
|
-
font-family: var(--viz-font-family);
|
|
735
|
-
font-size: var(--viz-body-size);
|
|
736
|
-
padding: 6px 10px;
|
|
737
|
-
border: 1px solid var(--viz-border);
|
|
738
|
-
border-radius: var(--viz-border-radius);
|
|
739
|
-
background: var(--viz-bg);
|
|
740
|
-
color: var(--viz-text);
|
|
741
|
-
outline: none;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
.viz-graph-search input:focus {
|
|
745
|
-
border-color: var(--viz-focus);
|
|
746
|
-
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
/* Dark mode graph overrides (darker bg for canvas-based rendering) */
|
|
750
|
-
.viz-dark .viz-graph-wrapper,
|
|
751
|
-
.viz-graph-wrapper.viz-dark {
|
|
752
|
-
--viz-bg: #0d1117;
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
.viz-dark .viz-graph-legend,
|
|
756
|
-
.viz-dark.viz-graph-wrapper .viz-graph-legend {
|
|
757
|
-
background: rgba(13, 17, 23, 0.85);
|
|
758
|
-
border-color: rgba(255, 255, 255, 0.1);
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
.viz-dark .viz-graph-search input {
|
|
762
|
-
background: rgba(13, 17, 23, 0.85);
|
|
763
|
-
border-color: rgba(255, 255, 255, 0.1);
|
|
764
|
-
}
|
|
1
|
+
.oc-root,.oc-chart-root,.oc-table-wrapper,.oc-table-root,.oc-graph-wrapper,.oc-graph-root{--oc-font-family:Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--oc-font-mono:"JetBrains Mono", "Fira Code", "Cascadia Code", monospace;--oc-ease-smooth:linear(0, .157, .438, .64, .766, .85, .906, .941, .964, .978, .988, .994, .998, 1);--oc-ease-snappy:linear(0, .012, .048, .108, .194, .302, .426, .559, .69, .808, .905, .973, 1.013, 1.028, 1.023, 1.006, .984, .966, .957, .957, .964, .975, .986, .995, 1, 1.003, 1.002, 1, .998, .998, .999, 1);--oc-animation-duration:.5s;--oc-animation-stagger:80ms;--oc-annotation-delay:.2s;--oc-title-size:22px;--oc-title-weight:700;--oc-title-tracking:-.02em;--oc-subtitle-size:14px;--oc-subtitle-weight:400;--oc-source-size:12px;--oc-source-weight:400;--oc-body-size:13px;--oc-bg:#fff;--oc-text:#1d1d1d;--oc-text-secondary:#5c5c5c;--oc-text-muted:#999;--oc-gridline:#e8e8e8;--oc-axis:#888;--oc-border:#e2e2e2;--oc-border-radius:4px;--oc-focus:#3b82f6;--oc-hover-bg:rgba(0,0,0,.024);--oc-tooltip-bg:rgba(255,255,255,.88);--oc-tooltip-border:rgba(0,0,0,.08);--oc-tooltip-shadow:0 2px 8px rgba(0,0,0,.08), 0 0 1px rgba(0,0,0,.12);--oc-tooltip-text:#1d1d1d;--oc-legend-text:#555}.oc-dark{--oc-bg:#1a1a2e;--oc-text:#e0e0e0;--oc-text-secondary:#b0b0b0;--oc-text-muted:gray;--oc-gridline:#335;--oc-axis:#999;--oc-border:#446;--oc-focus:#60a5fa;--oc-hover-bg:rgba(255,255,255,.05);--oc-tooltip-bg:rgba(30,30,50,.85);--oc-tooltip-border:rgba(255,255,255,.08);--oc-tooltip-shadow:0 2px 8px rgba(0,0,0,.3), 0 0 1px rgba(0,0,0,.4);--oc-tooltip-text:#e0e0e0;--oc-legend-text:#b0b0b0}.oc-chart-root{width:100%}.oc-table-root,.oc-graph-root{width:100%;height:100%}.oc-table-root{overflow:auto}.oc-chart{font-family:var(--oc-font-family);width:100%;display:block}.oc-sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.oc-editable-hover{outline-offset:2px;border-radius:2px;outline:1.5px solid rgba(79,70,229,.35)}.oc-chrome{font-family:var(--oc-font-family)}.oc-title{font-size:var(--oc-title-size);font-weight:var(--oc-title-weight);letter-spacing:var(--oc-title-tracking);fill:var(--oc-text)}.oc-subtitle{font-size:var(--oc-subtitle-size);font-weight:var(--oc-subtitle-weight);fill:var(--oc-text-secondary)}.oc-source,.oc-byline,.oc-footer{font-size:var(--oc-source-size);font-weight:var(--oc-source-weight);fill:var(--oc-text-muted)}.oc-chrome-footer{padding-top:16px}.oc-tooltip{pointer-events:none;z-index:1000;background:var(--oc-tooltip-bg);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid var(--oc-tooltip-border);box-shadow:var(--oc-tooltip-shadow);color:var(--oc-tooltip-text);font-family:var(--oc-font-family);border-radius:8px;min-width:140px;max-width:260px;padding:0;font-size:12px;line-height:1.4;animation:.12s ease-out oc-tooltip-in;display:none;position:absolute}.oc-tooltip .oc-tooltip-header{align-items:center;gap:6px;padding:8px 12px 6px;display:flex}.oc-tooltip .oc-tooltip-dot{border-radius:50%;flex-shrink:0;width:8px;height:8px}.oc-tooltip .oc-tooltip-title{letter-spacing:-.01em;color:var(--oc-tooltip-text);white-space:nowrap;text-overflow:ellipsis;font-size:12px;font-weight:600;overflow:hidden}.oc-tooltip .oc-tooltip-body{border-top:1px solid var(--oc-tooltip-border);padding:4px 12px 8px}.oc-tooltip .oc-tooltip-header+.oc-tooltip-body{padding-top:6px}.oc-tooltip .oc-tooltip-body:first-child{border-top:none;padding-top:8px}.oc-tooltip .oc-tooltip-row{justify-content:space-between;align-items:baseline;gap:12px;padding:1px 0;display:flex}.oc-tooltip .oc-tooltip-label{color:var(--oc-text-muted);white-space:nowrap;flex-shrink:0;font-size:11px}.oc-tooltip .oc-tooltip-value{font-variant-numeric:tabular-nums;text-align:right;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:500;overflow:hidden}.oc-legend{font-family:var(--oc-font-family);font-size:var(--oc-body-size)}.oc-legend-entry{cursor:default}.oc-legend text{fill:var(--oc-legend-text)}.oc-table-wrapper{font-family:var(--oc-font-family);color:var(--oc-text);background:var(--oc-bg)}.oc-table-wrapper>.oc-chrome{margin-bottom:16px}.oc-table-wrapper table{border-collapse:collapse;width:100%}.oc-table-wrapper th{text-align:left;border-bottom:1px solid var(--oc-border);padding:10px 16px}.oc-table-wrapper td{text-align:left;border-bottom:1px solid var(--oc-border);padding:10px 16px}.oc-table-wrapper th{text-transform:uppercase;letter-spacing:.05em;color:var(--oc-text-secondary);white-space:nowrap;font-size:12px;font-weight:600}.oc-table-wrapper thead{z-index:2;background:var(--oc-bg);position:sticky;top:0}.oc-table-wrapper thead th{border-bottom-width:2px}.oc-table-wrapper td{font-variant-numeric:tabular-nums;font-size:14px}.oc-table-wrapper th:focus{outline:2px solid var(--oc-focus);outline-offset:-2px}.oc-table-wrapper tbody:focus{outline:none}.oc-table-title{font-size:var(--oc-title-computed-size,var(--oc-title-size));font-weight:var(--oc-title-computed-weight,var(--oc-title-weight));color:var(--oc-title-computed-color,var(--oc-text));margin-bottom:4px}.oc-table-subtitle{font-size:var(--oc-subtitle-computed-size,var(--oc-subtitle-size));font-weight:var(--oc-subtitle-computed-weight,var(--oc-subtitle-weight));color:var(--oc-subtitle-computed-color,var(--oc-text-secondary));margin-bottom:8px}.oc-table-source{font-size:var(--oc-source-computed-size,var(--oc-source-size));color:var(--oc-source-computed-color,var(--oc-text-muted))}.oc-table-footer-text{font-size:var(--oc-footer-computed-size,var(--oc-source-size));color:var(--oc-footer-computed-color,var(--oc-text-muted))}.oc-table-scroll{overflow-x:auto}.oc-table--sticky th:first-child{z-index:1;background:var(--oc-bg);position:sticky;left:0}.oc-table--sticky td:first-child{z-index:1;background:var(--oc-bg);position:sticky;left:0}.oc-table-sort-btn{cursor:pointer;vertical-align:middle;background:0 0;border:none;flex-direction:column;align-items:center;gap:2px;margin-left:6px;padding:2px;display:inline-flex}.oc-table-sort-btn:before{content:"";border-left:5px solid transparent;border-right:5px solid transparent;width:0;height:0;transition:opacity .15s,border-color .15s;display:block}.oc-table-sort-btn:after{content:"";border-left:5px solid transparent;border-right:5px solid transparent;width:0;height:0;transition:opacity .15s,border-color .15s;display:block}.oc-table-sort-btn:before{border-bottom:4.5px solid var(--oc-text-secondary);opacity:.45}.oc-table-sort-btn:after{border-top:4.5px solid var(--oc-text-secondary);opacity:.45}.oc-table-sort-btn:hover:before{opacity:.75}.oc-table-sort-btn:hover:after{opacity:.75}th[aria-sort=ascending] .oc-table-sort-btn:before{opacity:1;border-bottom-color:var(--oc-text)}th[aria-sort=ascending] .oc-table-sort-btn:after{opacity:.15}th[aria-sort=descending] .oc-table-sort-btn:after{opacity:1;border-top-color:var(--oc-text)}th[aria-sort=descending] .oc-table-sort-btn:before{opacity:.15}.oc-table-search{padding:8px 0}.oc-table-search input{border:1px solid var(--oc-border);background:var(--oc-bg);width:100%;color:var(--oc-text);box-sizing:border-box;border-radius:6px;padding:8px 12px;font-family:inherit;font-size:13px;transition:border-color .15s}.oc-table-search input::-ms-input-placeholder{color:var(--oc-text-muted);font-size:13px}.oc-table-search input::placeholder{color:var(--oc-text-muted);font-size:13px}.oc-table-search input:focus{border-color:var(--oc-focus);outline:none;box-shadow:0 0 0 3px rgba(59,130,246,.1)}.oc-table-pagination{color:var(--oc-text-secondary);justify-content:space-between;align-items:center;padding:12px 0 4px;font-size:13px;display:flex}.oc-table-pagination button{border:1px solid var(--oc-border);background:var(--oc-bg);color:var(--oc-text);cursor:pointer;border-radius:6px;padding:6px 14px;font-family:inherit;font-size:13px;transition:background .15s,border-color .15s}.oc-table-pagination button:disabled{opacity:.35;cursor:not-allowed}.oc-table-pagination button:hover:not(:disabled){background:var(--oc-hover-bg);border-color:var(--oc-axis)}.oc-table-pagination button:focus-visible{outline:2px solid var(--oc-focus);outline-offset:1px}.oc-table-pagination-info{font-variant-numeric:tabular-nums}.oc-table-pagination-btns{gap:8px;display:flex}.oc-table-bar{position:relative}.oc-table-bar-fill{opacity:.15;pointer-events:none;border-radius:2px;position:absolute;top:6px;bottom:6px;left:0}.oc-table-bar-value{z-index:1;position:relative}.oc-table-sparkline{width:100%;display:block;position:relative}.oc-table-sparkline svg{width:100%;display:block;overflow:visible}.oc-table-sparkline-dot{border-radius:50%;width:5px;height:5px;position:absolute}.oc-table-sparkline-labels{justify-content:space-between;font-size:11px;line-height:1;display:flex}.oc-table-image{vertical-align:middle;display:inline-block}.oc-table-image img{object-fit:cover}.oc-table-image-rounded img{border-radius:50%}.oc-table-flag{font-size:1.2em}.oc-table--compact th{padding:4px 8px;font-size:13px}.oc-table--compact td{padding:4px 8px;font-size:13px}.oc-table--compact th{font-size:11px}.oc-table--clickable tbody tr{cursor:pointer}.oc-table--clickable tbody tr:hover{background:var(--oc-hover-bg)}.oc-table-cell-focus{outline:2px solid var(--oc-focus);outline-offset:-2px}.oc-table-empty{text-align:center;color:var(--oc-text-secondary);padding:32px 16px;font-size:14px;font-style:italic}.oc-table-wrapper.oc-animate>.oc-chrome{animation:oc-enter-fade calc(var(--oc-animation-duration) * .6) var(--oc-animation-ease,var(--oc-ease-smooth)) both}.oc-table-wrapper.oc-animate thead{animation:oc-enter-fade-only calc(var(--oc-animation-duration) * .4) var(--oc-animation-ease,var(--oc-ease-smooth)) both}.oc-table-wrapper.oc-animate tbody tr{animation:oc-table-enter-row var(--oc-animation-duration) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-row-index,0))}.oc-table-wrapper.oc-animate tbody td{animation:oc-enter-fade-only calc(var(--oc-animation-duration) * .5) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-row-index,0))}.oc-table-wrapper.oc-animate td.oc-table-heatmap{animation:oc-enter-fade-only calc(var(--oc-animation-duration) * .7) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-row-index,0) + var(--oc-animation-duration) * .3)}.oc-table-wrapper.oc-animate td.oc-table-category{animation:oc-enter-fade-only calc(var(--oc-animation-duration) * .7) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-row-index,0) + var(--oc-animation-duration) * .3)}.oc-table-wrapper.oc-animate .oc-table-bar-fill{animation:oc-table-enter-bar-fill calc(var(--oc-animation-duration) * .8) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-row-index,0) + var(--oc-animation-duration) * .3)}.oc-table-wrapper.oc-animate .oc-table-sparkline>svg{animation:oc-enter-line calc(var(--oc-animation-duration) * .8) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-row-index,0) + var(--oc-animation-duration) * .4)}.oc-table-wrapper.oc-animate .oc-table-sparkline-dot{animation:oc-enter-fade-only calc(var(--oc-animation-duration) * .3) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-row-index,0) + var(--oc-animation-duration) * .8)}.oc-table-wrapper.oc-animate .oc-table-sparkline-labels{animation:oc-enter-fade-only calc(var(--oc-animation-duration) * .3) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-row-index,0) + var(--oc-animation-duration) * .8)}.oc-table-wrapper.oc-animate .oc-table-search{animation:oc-enter-fade-only calc(var(--oc-animation-duration) * .5) var(--oc-animation-ease,var(--oc-ease-smooth)) both}.oc-table-wrapper.oc-animate .oc-table-pagination{animation:oc-enter-fade-only calc(var(--oc-animation-duration) * .5) var(--oc-animation-ease,var(--oc-ease-smooth)) both}.oc-graph-wrapper{background:var(--oc-bg);font-family:var(--oc-font-family);width:100%;height:100%;position:relative;overflow:hidden}.oc-graph-canvas{cursor:grab;display:block}.oc-graph-canvas--dragging{cursor:grabbing}.oc-graph-chrome{padding:16px 16px 8px}.oc-graph-chrome .oc-title{font-size:var(--oc-title-size);font-weight:var(--oc-title-weight);letter-spacing:var(--oc-title-tracking);color:var(--oc-text);margin:0 0 4px}.oc-graph-chrome .oc-subtitle{font-size:var(--oc-subtitle-size);color:var(--oc-text-secondary);margin:0}.oc-graph-legend{background:var(--oc-bg);border:1px solid var(--oc-border);border-radius:var(--oc-border-radius);color:var(--oc-text-secondary);max-height:200px;padding:8px 12px;font-size:12px;position:absolute;top:8px;right:8px;overflow-y:auto}.oc-graph-legend-item{align-items:center;gap:6px;padding:2px 0;display:flex}.oc-graph-legend-swatch{border-radius:50%;flex-shrink:0;width:10px;height:10px}.oc-graph-search{position:absolute;top:8px;left:8px}.oc-graph-search input{font-family:var(--oc-font-family);font-size:var(--oc-body-size);border:1px solid var(--oc-border);border-radius:var(--oc-border-radius);background:var(--oc-bg);color:var(--oc-text);outline:none;padding:6px 10px}.oc-graph-search input:focus{border-color:var(--oc-focus);box-shadow:0 0 0 2px rgba(59,130,246,.25)}.oc-dark .oc-graph-wrapper,.oc-graph-wrapper.oc-dark{--oc-bg:#0d1117}.oc-dark .oc-graph-legend,.oc-dark.oc-graph-wrapper .oc-graph-legend,.oc-dark .oc-graph-search input{background:rgba(13,17,23,.85);border-color:rgba(255,255,255,.1)}@keyframes oc-enter-bar{0%{clip-path:inset(100% 0 0);opacity:0}75%{opacity:1}to{clip-path:inset(0);opacity:1}}@keyframes oc-enter-bar-h{0%{clip-path:inset(0 100% 0 0);opacity:0}75%{opacity:1}to{clip-path:inset(0);opacity:1}}@keyframes oc-enter-line{0%{clip-path:inset(0 100% 0 0);opacity:0}15%{opacity:1}to{clip-path:inset(0);opacity:1}}@keyframes oc-enter-point{0%{opacity:0;transform:scale(.3)}to{opacity:1;transform:scale(1)}}@keyframes oc-enter-fade-only{0%{opacity:0}to{opacity:1}}@keyframes oc-enter-fade{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes oc-table-enter-row{0%{transform:translateY(6px)}to{transform:translateY(0)}}@keyframes oc-table-enter-bar-fill{0%{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0)}}@keyframes oc-tooltip-in{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}.oc-animate .oc-mark-rect rect{animation:oc-enter-bar var(--oc-animation-duration) var(--oc-ease-smooth) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-mark-index,0))}.oc-animate .oc-mark-bar rect{animation:oc-enter-bar var(--oc-animation-duration) var(--oc-ease-smooth) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-mark-index,0))}.oc-animate .oc-mark-rect[data-orient=horizontal] rect{animation-name:oc-enter-bar-h}.oc-animate .oc-mark-bar[data-orient=horizontal] rect{animation-name:oc-enter-bar-h}.oc-animate .oc-mark-rect[data-stack-pos] rect{animation-duration:var(--oc-stack-segment-duration,.15s);animation-timing-function:linear;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-mark-index,0) + var(--oc-stack-pos,0) * var(--oc-stack-segment-duration,.15s))}.oc-animate .oc-mark-line{animation:oc-enter-line var(--oc-animation-duration) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-mark-index,0))}.oc-animate .oc-mark-area{animation:oc-enter-line var(--oc-animation-duration) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-mark-index,0))}.oc-animate .oc-mark-arc{animation:oc-enter-fade-only var(--oc-animation-duration) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-mark-index,0))}.oc-animate circle.oc-mark-point{animation:oc-enter-fade-only calc(var(--oc-animation-duration) * .4) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-mark-index,0))}.oc-animate circle.oc-mark-circle{animation:oc-enter-fade-only calc(var(--oc-animation-duration) * .4) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-mark-index,0))}.oc-animate .oc-mark-line~circle.oc-mark-point{animation-delay:calc(var(--oc-animation-duration) * .35 + var(--oc-animation-stagger) * var(--oc-mark-index,0))}.oc-animate .oc-mark-area~circle.oc-mark-point{animation-delay:calc(var(--oc-animation-duration) * .35 + var(--oc-animation-stagger) * var(--oc-mark-index,0))}.oc-animate .oc-mark-text text{animation:oc-enter-fade calc(var(--oc-animation-duration) * .6) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-mark-index,0))}.oc-animate .oc-mark-rule line{animation:oc-enter-fade calc(var(--oc-animation-duration) * .5) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-mark-index,0))}.oc-animate .oc-mark-tick line{animation:oc-enter-fade calc(var(--oc-animation-duration) * .5) var(--oc-animation-ease,var(--oc-ease-smooth)) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-mark-index,0))}.oc-animate .oc-mark-label{animation:oc-enter-fade .3s var(--oc-ease-smooth) both;animation-delay:calc(var(--oc-animation-stagger) * var(--oc-mark-index,0) + var(--oc-animation-duration) * .7)}.oc-animate .oc-annotation{animation:oc-enter-fade .4s var(--oc-ease-smooth) both;animation-delay:calc(var(--oc-animation-duration) + var(--oc-annotation-delay,.2s))}@media (prefers-reduced-motion:reduce){.oc-table-sort-btn:before,.oc-table-sort-btn:after,.oc-table-search input,.oc-table-pagination button{transition:none}.oc-animate .oc-mark-rect rect,.oc-animate .oc-mark-bar rect,.oc-animate .oc-mark-arc,.oc-animate .oc-mark-line,.oc-animate .oc-mark-area,.oc-animate circle.oc-mark-point,.oc-animate circle.oc-mark-circle,.oc-animate .oc-mark-text text,.oc-animate .oc-mark-rule line,.oc-animate .oc-mark-tick line,.oc-animate .oc-mark-label,.oc-animate .oc-annotation,.oc-table-wrapper.oc-animate>.oc-chrome,.oc-table-wrapper.oc-animate thead,.oc-table-wrapper.oc-animate tbody tr,.oc-table-wrapper.oc-animate tbody td,.oc-table-wrapper.oc-animate td.oc-table-heatmap,.oc-table-wrapper.oc-animate td.oc-table-category,.oc-table-wrapper.oc-animate .oc-table-bar-fill,.oc-table-wrapper.oc-animate .oc-table-sparkline>svg,.oc-table-wrapper.oc-animate .oc-table-sparkline-dot,.oc-table-wrapper.oc-animate .oc-table-sparkline-labels,.oc-table-wrapper.oc-animate .oc-table-search,.oc-table-wrapper.oc-animate .oc-table-pagination{animation:none}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opendata-ai/openchart-vue",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.1",
|
|
4
4
|
"description": "Vue 3 components for openchart: <Chart />, <DataTable />, <Graph />, <VizThemeProvider />",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Riley Hilliard",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"typecheck": "tsc --noEmit"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@opendata-ai/openchart-core": "6.
|
|
53
|
-
"@opendata-ai/openchart-engine": "6.
|
|
54
|
-
"@opendata-ai/openchart-vanilla": "6.
|
|
52
|
+
"@opendata-ai/openchart-core": "6.5.1",
|
|
53
|
+
"@opendata-ai/openchart-engine": "6.5.1",
|
|
54
|
+
"@opendata-ai/openchart-vanilla": "6.5.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"vue": ">=3.3.0"
|
package/src/Chart.ts
CHANGED
package/src/DataTable.ts
CHANGED
package/src/Graph.ts
CHANGED
|
@@ -67,21 +67,21 @@ describe('Chart', () => {
|
|
|
67
67
|
const wrapper = await mountChart({ spec: lineSpec });
|
|
68
68
|
const svg = wrapper.find('svg');
|
|
69
69
|
expect(svg.exists()).toBe(true);
|
|
70
|
-
expect(svg.attributes('class')).toBe('
|
|
70
|
+
expect(svg.attributes('class')).toBe('oc-chart');
|
|
71
71
|
wrapper.unmount();
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
it('renders chrome text elements', async () => {
|
|
75
75
|
const wrapper = await mountChart({ spec: lineSpec });
|
|
76
76
|
|
|
77
|
-
const title = wrapper.find('.
|
|
77
|
+
const title = wrapper.find('.oc-title');
|
|
78
78
|
expect(title.exists()).toBe(true);
|
|
79
79
|
expect(title.text()).toBe('GDP Growth');
|
|
80
80
|
|
|
81
|
-
const subtitle = wrapper.find('.
|
|
81
|
+
const subtitle = wrapper.find('.oc-subtitle');
|
|
82
82
|
expect(subtitle.text()).toBe('US vs UK over time');
|
|
83
83
|
|
|
84
|
-
const source = wrapper.find('.
|
|
84
|
+
const source = wrapper.find('.oc-source');
|
|
85
85
|
expect(source.text()).toBe('World Bank');
|
|
86
86
|
wrapper.unmount();
|
|
87
87
|
});
|
|
@@ -89,13 +89,13 @@ describe('Chart', () => {
|
|
|
89
89
|
it('spec changes trigger re-render', async () => {
|
|
90
90
|
const wrapper = await mountChart({ spec: lineSpec });
|
|
91
91
|
|
|
92
|
-
const titleBefore = wrapper.find('.
|
|
92
|
+
const titleBefore = wrapper.find('.oc-title');
|
|
93
93
|
expect(titleBefore.text()).toBe('GDP Growth');
|
|
94
94
|
|
|
95
95
|
await wrapper.setProps({ spec: barSpec });
|
|
96
96
|
await flushPromises();
|
|
97
97
|
|
|
98
|
-
const titleAfter = wrapper.find('.
|
|
98
|
+
const titleAfter = wrapper.find('.oc-title');
|
|
99
99
|
expect(titleAfter.text()).toBe('Updated Title');
|
|
100
100
|
wrapper.unmount();
|
|
101
101
|
});
|
|
@@ -79,13 +79,13 @@ describe('DataTable', () => {
|
|
|
79
79
|
it('spec changes trigger re-render', async () => {
|
|
80
80
|
const wrapper = await mountTable({ spec: tableSpec });
|
|
81
81
|
|
|
82
|
-
const titleBefore = wrapper.find('.
|
|
82
|
+
const titleBefore = wrapper.find('.oc-table-title');
|
|
83
83
|
expect(titleBefore.text()).toBe('People Table');
|
|
84
84
|
|
|
85
85
|
await wrapper.setProps({ spec: updatedSpec });
|
|
86
86
|
await flushPromises();
|
|
87
87
|
|
|
88
|
-
const titleAfter = wrapper.find('.
|
|
88
|
+
const titleAfter = wrapper.find('.oc-table-title');
|
|
89
89
|
expect(titleAfter.text()).toBe('Updated Table');
|
|
90
90
|
|
|
91
91
|
const headersAfter = wrapper.findAll('thead th');
|
|
@@ -72,11 +72,11 @@ describe('Graph', () => {
|
|
|
72
72
|
it('renders chrome text elements', async () => {
|
|
73
73
|
const wrapper = await mountGraph({ spec: basicSpec });
|
|
74
74
|
|
|
75
|
-
const title = wrapper.find('.
|
|
75
|
+
const title = wrapper.find('.oc-title');
|
|
76
76
|
expect(title.exists()).toBe(true);
|
|
77
77
|
expect(title.text()).toBe('Test Graph');
|
|
78
78
|
|
|
79
|
-
const subtitle = wrapper.find('.
|
|
79
|
+
const subtitle = wrapper.find('.oc-subtitle');
|
|
80
80
|
expect(subtitle.text()).toBe('A simple test graph');
|
|
81
81
|
wrapper.unmount();
|
|
82
82
|
});
|
|
@@ -84,13 +84,13 @@ describe('Graph', () => {
|
|
|
84
84
|
it('spec changes trigger re-render', async () => {
|
|
85
85
|
const wrapper = await mountGraph({ spec: basicSpec });
|
|
86
86
|
|
|
87
|
-
const titleBefore = wrapper.find('.
|
|
87
|
+
const titleBefore = wrapper.find('.oc-title');
|
|
88
88
|
expect(titleBefore.text()).toBe('Test Graph');
|
|
89
89
|
|
|
90
90
|
await wrapper.setProps({ spec: updatedSpec });
|
|
91
91
|
await flushPromises();
|
|
92
92
|
|
|
93
|
-
const titleAfter = wrapper.find('.
|
|
93
|
+
const titleAfter = wrapper.find('.oc-title');
|
|
94
94
|
expect(titleAfter.text()).toBe('Updated Graph');
|
|
95
95
|
wrapper.unmount();
|
|
96
96
|
});
|