arthub-table 0.2.63 → 0.2.64-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,6 +26,10 @@ export interface PreprocessedRow {
26
26
  _searchMatch: SearchMatchResult;
27
27
  _cellBgColors: Record<string, string>;
28
28
  _bgColor?: string;
29
+ /** CP 行高亮标记 */
30
+ _cpHighLight?: boolean;
31
+ /** CP 高亮行中需要使用高亮文字色的列 key */
32
+ _cpHighLightFields?: string[];
29
33
  _isTopLevelEntity?: boolean;
30
34
  _isEmpty?: boolean;
31
35
  _isGroup?: boolean;
@@ -173,6 +173,10 @@ export interface ThemeTokens {
173
173
  bgTopLevelEntity: string;
174
174
  /** 顶层实体行 hover 背景色 */
175
175
  bgTopLevelEntityHover: string;
176
+ /** CP 高亮行背景色 */
177
+ bgCpHighlight: string;
178
+ /** CP 高亮行文字色 */
179
+ textCpHighlight: string;
176
180
  /** 需求变更-新增需求背景色 */
177
181
  bgDemandChangeAdd: string;
178
182
  /** 需求变更-新增需求 hover 背景色 */
@@ -8,6 +8,17 @@
8
8
  import type { CellViewer, ViewerRenderContext, TaskNodeViewerData } from './types';
9
9
  declare class TaskNodeViewer implements CellViewer<TaskNodeViewerData> {
10
10
  readonly type = "task-node";
11
+ /**
12
+ * draw 时每个 cell 内所有 tag 的几何与"是否截断"信息缓存。
13
+ * 二级结构 WeakMap<scope, Map<`${rowIndex}-${colIndex}`, NameOverflowInfo[]>>:
14
+ * - 外层 scope 区分 DataGrid 与内部 NestedGrid,避免内外层相同 rowIndex/colIndex 互相覆盖
15
+ * - 作用域实例被 GC 后 WeakMap 自动释放,无需主动清理
16
+ *
17
+ * 写入:draw 末尾覆盖式写入
18
+ * 读取:getTooltip 用 localX/localY 命中后查询
19
+ * 清理策略:依赖 draw 自动刷新(每次重绘同 key 覆盖),不主动清理。
20
+ */
21
+ private _nameOverflowCache;
11
22
  private imageManager;
12
23
  /** 记录加载失败的图标 URL,避免反复重试 */
13
24
  private failedIcons;
@@ -112,5 +123,14 @@ declare class TaskNodeViewer implements CellViewer<TaskNodeViewerData> {
112
123
  * 文本截断,超出宽度时显示省略号
113
124
  */
114
125
  private truncateText;
126
+ getTooltip(context: ViewerRenderContext, _data: TaskNodeViewerData, localX: number, localY: number): {
127
+ text: string;
128
+ bounds: {
129
+ x: number;
130
+ y: number;
131
+ width: number;
132
+ height: number;
133
+ };
134
+ } | null;
115
135
  }
116
136
  export default TaskNodeViewer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arthub-table",
3
- "version": "0.2.63",
3
+ "version": "0.2.64-next.0",
4
4
  "description": "High-performance canvas-based table/grid component for Vue 3 with TypeScript support, featuring virtual scrolling, cell viewers, grouped rows, and nested grids.",
5
5
  "main": "dist/arthub-table.common.js",
6
6
  "module": "dist/arthub-table.umd.min.js",