From 9493d40db5ce1e53f1faa1cdfe1395cfcd63a196 Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Wed, 3 Jun 2026 11:40:30 +0800 Subject: [PATCH] fix: restore package build against VChart theme contracts VChart 2.x keeps tooltip mark/dimension on the component theme contract. Use IComponentTheme indexed access types to match the public API without changing theme content. Constraint: @visactor/vchart@2.0.22 exposes component theme contracts via IComponentTheme Rejected: Remove tooltip mark/dimension | VChart still consumes them from component.tooltip Confidence: high Scope-risk: narrow Directive: Type tooltip as IComponentTheme['tooltip'] when mark/dimension are present Tested: node common/scripts/install-run-rush.js build --only tag:package Tested: git diff --check --- .gitignore | 1 + packages/vchart-aurora-theme/src/common/component/tooltip.ts | 4 ++-- .../vchart-theme/src/mobile/common/component/map-label.ts | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index bc6d16b..f6277a9 100644 --- a/.gitignore +++ b/.gitignore @@ -96,3 +96,4 @@ tsconfig.tsbuildinfo common/scripts/pre-commit .vite +.omx/ diff --git a/packages/vchart-aurora-theme/src/common/component/tooltip.ts b/packages/vchart-aurora-theme/src/common/component/tooltip.ts index 80cfc12..6efa7e4 100644 --- a/packages/vchart-aurora-theme/src/common/component/tooltip.ts +++ b/packages/vchart-aurora-theme/src/common/component/tooltip.ts @@ -1,6 +1,6 @@ -import type { ITooltipTheme } from '@visactor/vchart'; +import type { IComponentTheme } from '@visactor/vchart'; -export const tooltip: ITooltipTheme = { +export const tooltip: IComponentTheme['tooltip'] = { panel: { border: { radius: 8 diff --git a/packages/vchart-theme/src/mobile/common/component/map-label.ts b/packages/vchart-theme/src/mobile/common/component/map-label.ts index 00700cd..98d9dea 100644 --- a/packages/vchart-theme/src/mobile/common/component/map-label.ts +++ b/packages/vchart-theme/src/mobile/common/component/map-label.ts @@ -1,6 +1,6 @@ -import type { IMapLabelTheme } from '@visactor/vchart'; +import type { IComponentTheme } from '@visactor/vchart'; -export const mapLabel: IMapLabelTheme = { +export const mapLabel: IComponentTheme['mapLabel'] = { visible: true, offset: 12, position: 'top',