@opendata-ai/openchart-vue 9.6.1 → 9.7.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.d.ts CHANGED
@@ -91,7 +91,7 @@ interface ChartProps {
91
91
  revision?: string | number;
92
92
  /** Interaction mode; inferred from listeners when omitted. Changes switch modes in place. */
93
93
  interaction?: InteractionMode;
94
- /** Selection outline color. Changing it recreates the chart, like theme. */
94
+ /** Selection outline color. Changing it recreates the chart. */
95
95
  selectionColor?: string;
96
96
  /** Reports engine changes to the armed placement tool. */
97
97
  onPlacementToolChange?: (tool: AnnotationPlacementTool | null) => void;
package/dist/index.js CHANGED
@@ -383,16 +383,17 @@ var Chart = /* @__PURE__ */ defineComponent2({
383
383
  }
384
384
  );
385
385
  watch2([() => props.reader, () => props.readerSelection], () => syncReader(), { deep: false });
386
+ watch2(
387
+ // Structural, so an inline theme object that is re-created each render does not re-apply.
388
+ [() => JSON.stringify(resolveTheme()), () => resolveDarkMode()],
389
+ () => instance?.setTheme({ theme: resolveTheme(), darkMode: resolveDarkMode() })
390
+ );
386
391
  watch2(
387
392
  [
388
393
  () => props.rowHover,
389
394
  () => props.autoResize,
390
- () => props.theme,
391
- () => props.darkMode,
392
395
  () => props.renderer,
393
- () => props.selectionColor,
394
- () => contextTheme?.value,
395
- () => contextDarkMode?.value
396
+ () => props.selectionColor
396
397
  ],
397
398
  () => {
398
399
  if (!containerRef.value) return;
@@ -915,16 +916,10 @@ var DataTable = /* @__PURE__ */ defineComponent4({
915
916
  }
916
917
  );
917
918
  watch7(
918
- [
919
- () => props.theme,
920
- () => props.darkMode,
921
- () => contextTheme?.value,
922
- () => contextDarkMode?.value
923
- ],
919
+ // Structural, so an inline theme object that is re-created each render does not re-apply.
920
+ [() => JSON.stringify(resolveTheme()), () => resolveDarkMode()],
924
921
  () => {
925
- if (!containerRef.value) return;
926
- destroyTable();
927
- mountTable();
922
+ instance?.setTheme({ theme: resolveTheme(), darkMode: resolveDarkMode() });
928
923
  }
929
924
  );
930
925
  watch7([() => props.sort, () => props.search, () => props.page], () => {
@@ -1072,16 +1067,10 @@ var GeoMap = /* @__PURE__ */ defineComponent5({
1072
1067
  );
1073
1068
  watch8([() => props.reader, () => props.readerSelection], () => syncReader(), { deep: false });
1074
1069
  watch8(
1075
- [
1076
- () => props.theme,
1077
- () => props.darkMode,
1078
- () => contextTheme?.value,
1079
- () => contextDarkMode?.value
1080
- ],
1070
+ // Structural, so an inline theme object that is re-created each render does not re-apply.
1071
+ [() => JSON.stringify(resolveTheme()), () => resolveDarkMode()],
1081
1072
  () => {
1082
- if (!containerRef.value) return;
1083
- destroyMap();
1084
- mountMap();
1073
+ instance?.setTheme({ theme: resolveTheme(), darkMode: resolveDarkMode() });
1085
1074
  }
1086
1075
  );
1087
1076
  const rootClass = () => {