@searsuite/sear-plugin-header-highlight 0.0.0-stage → 0.0.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/LICENSE ADDED
@@ -0,0 +1,29 @@
1
+ # The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 LIZHAOTING (Eric)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ## Liability
24
+
25
+ To the maximum extent permitted by applicable law, in no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.
26
+
27
+ ## Warranty
28
+
29
+ This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
- # Temporary Holding Version
1
+ # @searsuite/sear-plugin-header-highlight
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Highlights Sheet headers based on the current selection.
4
+
5
+ [API reference](https://searsuite.com/docs/ref/#sear-plugin-header-highlight)
6
+
7
+ ## Repository
8
+
9
+ Repository: [searsuite/packages/sear-plugin-header-highlight](https://github.com/SearSuite/searsuite/tree/main/packages/sear-plugin-header-highlight).
@@ -0,0 +1,176 @@
1
+ import { SearCoreSheet } from '@searsuite/sear-assembly-core';
2
+ import { RectOTActionName, MatrixOTActionName } from '@searsuite/sear-domain-ot';
3
+ import { Plugin, PluginKey } from '@searsuite/sear-assembly-plugin';
4
+ import { ConfigUnit } from '@searsuite/sear-assembly-config';
5
+ import { Transaction } from '@searsuite/sear-domain-transaction';
6
+ import { Node } from '@searsuite/sear-render-node';
7
+ import { CellProperties } from '@searsuite/sear-render-registry';
8
+ import { SheetCornerPlugin } from '@searsuite/sear-render';
9
+ import { SheetSelectionPlugin } from '@searsuite/sear-plugin-selection';
10
+ /**
11
+ * Controls how header highlighting is computed.
12
+ *
13
+ * - `selection-range`: highlight all row/column headers covered by the selection bounding box.
14
+ * - `cross-active`: highlight only the active row and active column around the selection anchor.
15
+ */
16
+ export type SheetHeaderHighlightMode = 'selection-range' | 'cross-active';
17
+ /**
18
+ * Runtime configuration for header highlighting.
19
+ *
20
+ * These values are intentionally tuned for readability against default header colors.
21
+ */
22
+ export declare const sheetHeaderHighlightPluginConfig: {
23
+ /** Header highlight background color: slightly darkened neutral gray (no blue tint). */
24
+ headerHighlightBackgroundColor: string;
25
+ /**
26
+ * Header highlight separator color must be one step darker than
27
+ * `headerHighlightBackgroundColor`, otherwise row/column separators can visually disappear.
28
+ *
29
+ * The default header border (`rgba(220,221,229,1)`) differs from the highlight background
30
+ * by only 1-2 color levels, which is often not enough contrast in highlighted areas.
31
+ * This value intentionally uses a darker neutral gray for clearer separation.
32
+ */
33
+ headerHighlightBorderColor: string;
34
+ /** Emphasis line color (the blue bar facing the grid). */
35
+ headerHighlightActiveBorderColor: string;
36
+ /** Emphasis line thickness in px (the blue bar facing the grid). */
37
+ headerHighlightActiveBarThickness: number;
38
+ /** Logical header height used for column-header overlay rectangles. */
39
+ columnHeaderHeight: number;
40
+ /** Highlight behavior mode. */
41
+ mode: SheetHeaderHighlightMode;
42
+ };
43
+ /**
44
+ * Plugin-local state shape.
45
+ *
46
+ * This plugin is render-driven and currently does not persist extra state.
47
+ */
48
+ interface ISheetHeaderHighlight {
49
+ }
50
+ /**
51
+ * Row-header / column-header selection highlight plugin.
52
+ *
53
+ * The plugin reads selection from DataEngine during render and uses AffixCell
54
+ * nodes with explicit depths so highlights stay between header backgrounds,
55
+ * header text and the primary selection box.
56
+ */
57
+ export declare class SheetHeaderHighlightPlugin extends Plugin<SearCoreSheet, CellProperties, ISheetHeaderHighlight> {
58
+ private readonly sheetSelectionPlugin;
59
+ private readonly sheetCornerPlugin;
60
+ /** DI token for resolving SheetHeaderHighlightPlugin. */
61
+ static readonly symbol: symbol;
62
+ /** Stable plugin key for SheetHeaderHighlightPlugin. */
63
+ static readonly pluginKey: PluginKey;
64
+ /**
65
+ * Base render depth for plugin-generated nodes.
66
+ *
67
+ * The plugin places highlight background at `depth + 1.5` and emphasis bars at `depth + 3`
68
+ * to guarantee stable stacking relative to default header nodes.
69
+ */
70
+ depth: number;
71
+ /** @inheritdoc */
72
+ interestedIn: (RectOTActionName | MatrixOTActionName)[];
73
+ /** Creates a SheetHeaderHighlightPlugin instance. */
74
+ constructor(sheetSelectionPlugin: SheetSelectionPlugin, sheetCornerPlugin: SheetCornerPlugin);
75
+ /**
76
+ * Registers plugin state into the host state store.
77
+ */
78
+ registerState(): {
79
+ key: PluginKey;
80
+ state: ISheetHeaderHighlight;
81
+ };
82
+ /**
83
+ * Returns plugin-specific configuration.
84
+ *
85
+ * This plugin currently reads config directly from `configEngine` during render.
86
+ */
87
+ getPluginConfig(searCore: SearCoreSheet): null;
88
+ /**
89
+ * Registers default configuration for this plugin.
90
+ */
91
+ registerConfig(): {
92
+ key: PluginKey;
93
+ config: ConfigUnit<{
94
+ /** Header highlight background color: slightly darkened neutral gray (no blue tint). */
95
+ headerHighlightBackgroundColor: string;
96
+ /**
97
+ * Header highlight separator color must be one step darker than
98
+ * `headerHighlightBackgroundColor`, otherwise row/column separators can visually disappear.
99
+ *
100
+ * The default header border (`rgba(220,221,229,1)`) differs from the highlight background
101
+ * by only 1-2 color levels, which is often not enough contrast in highlighted areas.
102
+ * This value intentionally uses a darker neutral gray for clearer separation.
103
+ */
104
+ headerHighlightBorderColor: string;
105
+ /** Emphasis line color (the blue bar facing the grid). */
106
+ headerHighlightActiveBorderColor: string;
107
+ /** Emphasis line thickness in px (the blue bar facing the grid). */
108
+ headerHighlightActiveBarThickness: number;
109
+ /** Logical header height used for column-header overlay rectangles. */
110
+ columnHeaderHeight: number;
111
+ /** Highlight behavior mode. */
112
+ mode: SheetHeaderHighlightMode;
113
+ }>;
114
+ }[];
115
+ /** Applies a transaction to SheetHeaderHighlightPlugin state. */
116
+ apply(pluginState: ISheetHeaderHighlight, _transaction: Transaction): ISheetHeaderHighlight;
117
+ /**
118
+ * Builds highlight nodes for row and column headers based on current selection and mode.
119
+ *
120
+ * Rendering flow:
121
+ * 1. Resolve selection state from `SheetSelectionPlugin`.
122
+ * 2. Early-return when selection is empty.
123
+ * 3. Resolve table dimensions and plugin config.
124
+ * 4. Compose offsets to match header layout around the corner region.
125
+ * 5. Delegate to range/cross mode builders.
126
+ *
127
+ * @param searCore Active core sheet instance.
128
+ * @param offset World-space offset propagated by the render pipeline.
129
+ * @returns Flat list of nodes to add into the stage for this frame.
130
+ */
131
+ render(searCore: SearCoreSheet, offset?: {
132
+ x: number;
133
+ y: number;
134
+ }): Node<CellProperties>[];
135
+ /**
136
+ * Range mode: highlight headers of all selected rows and columns.
137
+ *
138
+ * The selection bounding rect already includes merged-cell expansion,
139
+ * so this method can derive a complete row/column span directly.
140
+ *
141
+ * @returns Header background nodes and emphasis-bar nodes for the selected span.
142
+ */
143
+ private buildBySelectionRange;
144
+ /**
145
+ * Cross mode (reserved): highlight row/column headers around the anchor cell.
146
+ *
147
+ * @returns Nodes for exactly one row-header strip and one column-header strip.
148
+ */
149
+ private buildByActiveCellCross;
150
+ /**
151
+ * Builds column-header highlight nodes for a closed column interval.
152
+ *
153
+ * For each covered column this method emits:
154
+ * - one background AffixCell strip in header area
155
+ * - one optional emphasis bar at the bottom edge of the full selected width
156
+ *
157
+ * @param colStart Inclusive start column index.
158
+ * @param colEnd Inclusive end column index.
159
+ */
160
+ private buildColumnHeaderHighlight;
161
+ /**
162
+ * Builds row-header highlight nodes for a closed row interval.
163
+ *
164
+ * For each covered row this method emits:
165
+ * - one background AffixCell strip in row-header area
166
+ * - one optional emphasis bar along the right edge of the full selected height
167
+ *
168
+ * @param rowStart Inclusive start row index.
169
+ * @param rowEnd Inclusive end row index.
170
+ */
171
+ private buildRowHeaderHighlight;
172
+ /** Returns the closed interval shared by a selection and the visible window. */
173
+ private intersectRange;
174
+ }
175
+ export {};
176
+ //# sourceMappingURL=SheetHeaderHighlightPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SheetHeaderHighlightPlugin.d.ts","sourceRoot":"","sources":["../../src/headerHighlight/SheetHeaderHighlightPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAa,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC5F,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAG7D,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAKnD,OAAO,EAAa,cAAc,EAAE,MA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AAQ,EAAE,aAAa,EAAE,MAAM,GAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAmB,GAAG,IAAI,CAAC,cAAc,CAAC,EAAE;IAwDjH;;;;;;;OAOG;IACH,OAAO,CAAC,qBAAqB;IA0D7B;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IA8C9B;;;;;;;;;OASG;IACH,OAAO,CAAC,0BAA0B;IA8FlC;;;;;;;;;OASG;IACH,OAAO,CAAC,uBAAuB;IAwF/B,gFAAgF;IAChF,OAAO,CAAC,cAAc;CAUvB"}
@@ -0,0 +1,409 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
9
+ return function (target, key) { decorator(target, key, paramIndex); }
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SheetHeaderHighlightPlugin = exports.sheetHeaderHighlightPluginConfig = void 0;
13
+ const sear_domain_ot_1 = require("@searsuite/sear-domain-ot");
14
+ const sear_assembly_plugin_1 = require("@searsuite/sear-assembly-plugin");
15
+ const sear_assembly_config_1 = require("@searsuite/sear-assembly-config");
16
+ const sear_foundation_di_1 = require("@searsuite/sear-foundation-di");
17
+ const sear_foundation_rect_1 = require("@searsuite/sear-foundation-rect");
18
+ const sear_plugin_alignment_1 = require("@searsuite/sear-plugin-alignment");
19
+ const sear_plugin_resize_1 = require("@searsuite/sear-plugin-resize");
20
+ const sear_render_registry_1 = require("@searsuite/sear-render-registry");
21
+ const sear_render_1 = require("@searsuite/sear-render");
22
+ const sear_plugin_selection_1 = require("@searsuite/sear-plugin-selection");
23
+ /**
24
+ * Unique plugin key used by the plugin system for registration and state/config lookup.
25
+ */
26
+ const key = new sear_assembly_plugin_1.PluginKey('SheetHeaderHighlight');
27
+ function readHeaderHighlightGeometry(dataEngine) {
28
+ const rowSizes = (0, sear_plugin_resize_1.readSheetRowSizes)(dataEngine);
29
+ const columnSizes = (0, sear_plugin_resize_1.readSheetColumnSizes)(dataEngine);
30
+ return rowSizes && columnSizes ? { rowSizes, columnSizes } : null;
31
+ }
32
+ /**
33
+ * Header cells render their background at depth 0 and their text at depth 1.
34
+ * Keep highlight layers strictly between/above those fixed layers so scroll
35
+ * re-rendering never depends on equal-depth insertion order.
36
+ */
37
+ const headerHighlightDepthOffset = {
38
+ background: 1.5,
39
+ activeBar: 3,
40
+ };
41
+ /**
42
+ * Runtime configuration for header highlighting.
43
+ *
44
+ * These values are intentionally tuned for readability against default header colors.
45
+ */
46
+ exports.sheetHeaderHighlightPluginConfig = {
47
+ /** Header highlight background color: slightly darkened neutral gray (no blue tint). */
48
+ headerHighlightBackgroundColor: 'rgba(220, 222, 228, 1)',
49
+ /**
50
+ * Header highlight separator color must be one step darker than
51
+ * `headerHighlightBackgroundColor`, otherwise row/column separators can visually disappear.
52
+ *
53
+ * The default header border (`rgba(220,221,229,1)`) differs from the highlight background
54
+ * by only 1-2 color levels, which is often not enough contrast in highlighted areas.
55
+ * This value intentionally uses a darker neutral gray for clearer separation.
56
+ */
57
+ headerHighlightBorderColor: 'rgba(189, 192, 201, 1)',
58
+ /** Emphasis line color (the blue bar facing the grid). */
59
+ headerHighlightActiveBorderColor: 'rgba(56, 110, 246, 1)',
60
+ /** Emphasis line thickness in px (the blue bar facing the grid). */
61
+ headerHighlightActiveBarThickness: 2,
62
+ /** Logical header height used for column-header overlay rectangles. */
63
+ columnHeaderHeight: 24,
64
+ /** Highlight behavior mode. */
65
+ mode: 'selection-range',
66
+ };
67
+ /**
68
+ * Row-header / column-header selection highlight plugin.
69
+ *
70
+ * The plugin reads selection from DataEngine during render and uses AffixCell
71
+ * nodes with explicit depths so highlights stay between header backgrounds,
72
+ * header text and the primary selection box.
73
+ */
74
+ let SheetHeaderHighlightPlugin = class SheetHeaderHighlightPlugin extends sear_assembly_plugin_1.Plugin {
75
+ /** Creates a SheetHeaderHighlightPlugin instance. */
76
+ constructor(sheetSelectionPlugin, sheetCornerPlugin) {
77
+ super({
78
+ key,
79
+ state: {},
80
+ });
81
+ this.sheetSelectionPlugin = sheetSelectionPlugin;
82
+ this.sheetCornerPlugin = sheetCornerPlugin;
83
+ /**
84
+ * Base render depth for plugin-generated nodes.
85
+ *
86
+ * The plugin places highlight background at `depth + 1.5` and emphasis bars at `depth + 3`
87
+ * to guarantee stable stacking relative to default header nodes.
88
+ */
89
+ this.depth = -1;
90
+ /** @inheritdoc */
91
+ this.interestedIn = [
92
+ sear_domain_ot_1.RectOTActionName.UpdateRect,
93
+ sear_domain_ot_1.MatrixOTActionName.ResizeRow,
94
+ sear_domain_ot_1.MatrixOTActionName.ResizeCol,
95
+ sear_domain_ot_1.MatrixOTActionName.RowInsert,
96
+ sear_domain_ot_1.MatrixOTActionName.RowDelete,
97
+ sear_domain_ot_1.MatrixOTActionName.RowMove,
98
+ sear_domain_ot_1.MatrixOTActionName.ColInsert,
99
+ sear_domain_ot_1.MatrixOTActionName.ColDelete,
100
+ sear_domain_ot_1.MatrixOTActionName.ColMove,
101
+ ];
102
+ }
103
+ /**
104
+ * Registers plugin state into the host state store.
105
+ */
106
+ registerState() {
107
+ return { key: this.key, state: this.getState() };
108
+ }
109
+ /**
110
+ * Returns plugin-specific configuration.
111
+ *
112
+ * This plugin currently reads config directly from `configEngine` during render.
113
+ */
114
+ getPluginConfig(searCore) {
115
+ return null;
116
+ }
117
+ /**
118
+ * Registers default configuration for this plugin.
119
+ */
120
+ registerConfig() {
121
+ return [
122
+ {
123
+ key: this.key,
124
+ config: new sear_assembly_config_1.ConfigUnit(exports.sheetHeaderHighlightPluginConfig),
125
+ },
126
+ ];
127
+ }
128
+ /** Applies a transaction to SheetHeaderHighlightPlugin state. */
129
+ apply(pluginState, _transaction) {
130
+ return pluginState;
131
+ }
132
+ /**
133
+ * Builds highlight nodes for row and column headers based on current selection and mode.
134
+ *
135
+ * Rendering flow:
136
+ * 1. Resolve selection state from `SheetSelectionPlugin`.
137
+ * 2. Early-return when selection is empty.
138
+ * 3. Resolve table dimensions and plugin config.
139
+ * 4. Compose offsets to match header layout around the corner region.
140
+ * 5. Delegate to range/cross mode builders.
141
+ *
142
+ * @param searCore Active core sheet instance.
143
+ * @param offset World-space offset propagated by the render pipeline.
144
+ * @returns Flat list of nodes to add into the stage for this frame.
145
+ */
146
+ render(searCore, offset = { x: 0, y: 0 }) {
147
+ var _a;
148
+ const dataEngine = searCore.getDataEngine();
149
+ const selectionState = dataEngine.getDataType(this.sheetSelectionPlugin.pluginKey);
150
+ if (!selectionState)
151
+ return [];
152
+ // Do not render when selection is empty ([-1,-1,-1,-1]).
153
+ if (selectionState[1].shape.join('') === sear_foundation_rect_1.Rect.Empty.join(''))
154
+ return [];
155
+ const dataState = readHeaderHighlightGeometry(dataEngine);
156
+ if (!dataState)
157
+ return [];
158
+ const pluginConfig = searCore.configEngine.getPluginConfig(this.key);
159
+ // Keep aligned with SheetGridPlugin.render:
160
+ // - shift column headers by corner.width on x
161
+ // - shift row headers by corner.height on y
162
+ const cornerConfig = this.sheetCornerPlugin.getPluginConfig(searCore);
163
+ const composedOffset = {
164
+ x: offset.x + cornerConfig.width,
165
+ y: offset.y + cornerConfig.height,
166
+ };
167
+ const mode = (_a = pluginConfig.mode) !== null && _a !== void 0 ? _a : 'selection-range';
168
+ // Header highlights are rendered as one node per row/column. Always
169
+ // intersect the selection with the shared viewport window before
170
+ // building those nodes; a full-column selection can otherwise try to
171
+ // allocate 1,048,576 row-header nodes.
172
+ const viewport = (0, sear_render_1.computeViewportRange)(searCore.renderEngine.scrollManager, dataState.rowSizes, dataState.columnSizes, offset);
173
+ if (mode === 'cross-active') {
174
+ return this.buildByActiveCellCross(searCore, selectionState, dataState, pluginConfig, composedOffset, cornerConfig, viewport);
175
+ }
176
+ return this.buildBySelectionRange(searCore, selectionState, dataState, pluginConfig, composedOffset, cornerConfig, viewport);
177
+ }
178
+ /**
179
+ * Range mode: highlight headers of all selected rows and columns.
180
+ *
181
+ * The selection bounding rect already includes merged-cell expansion,
182
+ * so this method can derive a complete row/column span directly.
183
+ *
184
+ * @returns Header background nodes and emphasis-bar nodes for the selected span.
185
+ */
186
+ buildBySelectionRange(searCore, selectionState, dataState, pluginConfig, offset, cornerConfig, viewport) {
187
+ // Use expanded bounding rect (already includes merged-cell expansion).
188
+ const bounding = selectionState[1];
189
+ const anchor = bounding.getPoint(0);
190
+ const focus = bounding.getPoint(1);
191
+ const rowStart = Math.min(anchor[0], focus[0]);
192
+ const rowEnd = Math.max(anchor[0], focus[0]);
193
+ const colStart = Math.min(anchor[1], focus[1]);
194
+ const colEnd = Math.max(anchor[1], focus[1]);
195
+ // Selection state can transiently contain header-space coordinates (for example -1).
196
+ // Clamp to data-space indices before querying row/column boundaries.
197
+ const safeRowStart = Math.max(0, rowStart);
198
+ const safeRowEnd = Math.max(0, rowEnd);
199
+ const safeColStart = Math.max(0, colStart);
200
+ const safeColEnd = Math.max(0, colEnd);
201
+ const nodes = [];
202
+ nodes.push(...this.buildColumnHeaderHighlight(searCore, dataState, pluginConfig, offset, cornerConfig, safeColStart, safeColEnd, true, void 0, viewport));
203
+ nodes.push(...this.buildRowHeaderHighlight(searCore, dataState, pluginConfig, offset, cornerConfig, safeRowStart, safeRowEnd, true, void 0, viewport));
204
+ return nodes;
205
+ }
206
+ /**
207
+ * Cross mode (reserved): highlight row/column headers around the anchor cell.
208
+ *
209
+ * @returns Nodes for exactly one row-header strip and one column-header strip.
210
+ */
211
+ buildByActiveCellCross(searCore, selectionState, dataState, pluginConfig, offset, cornerConfig, viewport) {
212
+ const anchor = selectionState[0].getPoint(0);
213
+ const row = anchor[0];
214
+ const col = anchor[1];
215
+ if (row < 0 || col < 0)
216
+ return [];
217
+ const nodes = [];
218
+ nodes.push(...this.buildColumnHeaderHighlight(searCore, dataState, pluginConfig, offset, cornerConfig, col, col, true, void 0, viewport));
219
+ nodes.push(...this.buildRowHeaderHighlight(searCore, dataState, pluginConfig, offset, cornerConfig, row, row, true, void 0, viewport));
220
+ return nodes;
221
+ }
222
+ /**
223
+ * Builds column-header highlight nodes for a closed column interval.
224
+ *
225
+ * For each covered column this method emits:
226
+ * - one background AffixCell strip in header area
227
+ * - one optional emphasis bar at the bottom edge of the full selected width
228
+ *
229
+ * @param colStart Inclusive start column index.
230
+ * @param colEnd Inclusive end column index.
231
+ */
232
+ buildColumnHeaderHighlight(searCore, dataState, pluginConfig, offset, cornerConfig, colStart, colEnd, drawActiveBar = true, activeBarThicknessOverride, viewport) {
233
+ if (colStart < 0 || colEnd < 0 || colStart > colEnd)
234
+ return [];
235
+ const visibleRange = viewport
236
+ ? this.intersectRange(colStart, colEnd, viewport.startCol, viewport.endCol)
237
+ : [colStart, colEnd];
238
+ if (!visibleRange)
239
+ return [];
240
+ [colStart, colEnd] = visibleRange;
241
+ const { columnSizes } = dataState;
242
+ const { renderCoordinatorManager } = searCore.renderEngine;
243
+ // Column header strip is on top: y aligns with corner top, height = corner.height.
244
+ const headerY = 0;
245
+ const headerHeight = cornerConfig.height;
246
+ const nodes = [];
247
+ for (let i = colStart; i <= colEnd; i++) {
248
+ // x is already shifted by offset.x (= input offset.x + corner.width).
249
+ const x = columnSizes.getDimensionLeftBoundaryByIndex(i);
250
+ const width = columnSizes.getItem(0, i) || 0;
251
+ if (!width)
252
+ continue;
253
+ const positionRect = {
254
+ x: x + offset.x,
255
+ y: headerY,
256
+ width,
257
+ height: headerHeight,
258
+ };
259
+ // Highlight background (fill only, no nested text node).
260
+ // Key: keep depth aligned with default column-header background (0), so header text
261
+ // (AffixTextNode, depth=1) remains visible above this layer.
262
+ // Also avoid passing `value` here: creating child AffixTextNode under AffixNode can
263
+ // produce orphaned nodes during rerender (not tracked by markRemovePluginNode),
264
+ // which may throw in TextNode.drawScene and interrupt later rendering.
265
+ const bgCell = renderCoordinatorManager.create({ type: sear_render_registry_1.AffixCell.symbol, value: null }, positionRect, {
266
+ type: sear_render_registry_1.AffixCell.symbol,
267
+ top: 0,
268
+ fill: pluginConfig.headerHighlightBackgroundColor,
269
+ stroke: pluginConfig.headerHighlightBorderColor,
270
+ horizontalAlign: sear_plugin_alignment_1.SheetHorizontalAlignment.Center,
271
+ depth: this.depth + headerHighlightDepthOffset.background,
272
+ skipHit: true,
273
+ });
274
+ const bg = bgCell === null || bgCell === void 0 ? void 0 : bgCell.render();
275
+ if (bg)
276
+ nodes.push(...[bg].flat());
277
+ }
278
+ // Emphasis line (only at the bottom edge of selected columns):
279
+ // a blue strip along the column-header bottom edge.
280
+ if (drawActiveBar && colEnd >= colStart) {
281
+ const xStart = columnSizes.getDimensionLeftBoundaryByIndex(colStart);
282
+ const xEnd = columnSizes.getDimensionRightBoundaryByIndex(colEnd);
283
+ const barWidth = xEnd - xStart;
284
+ const thickness = Math.max(1, activeBarThicknessOverride !== null && activeBarThicknessOverride !== void 0 ? activeBarThicknessOverride : pluginConfig.headerHighlightActiveBarThickness);
285
+ if (barWidth > 0 && thickness > 0) {
286
+ // Shift 1px toward the grid so the header indicator line tightly joins
287
+ // the primary selection border without a visible gap.
288
+ const barRect = {
289
+ x: xStart + offset.x,
290
+ y: headerY + headerHeight - thickness + 1,
291
+ width: barWidth,
292
+ height: thickness,
293
+ };
294
+ const activeCell = renderCoordinatorManager.create({ type: sear_render_registry_1.AffixCell.symbol, value: null }, barRect, {
295
+ type: sear_render_registry_1.AffixCell.symbol,
296
+ top: 0,
297
+ fill: pluginConfig.headerHighlightActiveBorderColor,
298
+ stroke: 'transparent',
299
+ horizontalAlign: sear_plugin_alignment_1.SheetHorizontalAlignment.Center,
300
+ depth: this.depth + headerHighlightDepthOffset.activeBar,
301
+ skipHit: true,
302
+ });
303
+ const active = activeCell === null || activeCell === void 0 ? void 0 : activeCell.render();
304
+ if (active)
305
+ nodes.push(...[active].flat());
306
+ }
307
+ }
308
+ return nodes;
309
+ }
310
+ /**
311
+ * Builds row-header highlight nodes for a closed row interval.
312
+ *
313
+ * For each covered row this method emits:
314
+ * - one background AffixCell strip in row-header area
315
+ * - one optional emphasis bar along the right edge of the full selected height
316
+ *
317
+ * @param rowStart Inclusive start row index.
318
+ * @param rowEnd Inclusive end row index.
319
+ */
320
+ buildRowHeaderHighlight(searCore, dataState, pluginConfig, offset, cornerConfig, rowStart, rowEnd, drawActiveBar = true, activeBarThicknessOverride, viewport) {
321
+ if (rowStart < 0 || rowEnd < 0 || rowStart > rowEnd)
322
+ return [];
323
+ const visibleRange = viewport
324
+ ? this.intersectRange(rowStart, rowEnd, viewport.startRow, viewport.endRow)
325
+ : [rowStart, rowEnd];
326
+ if (!visibleRange)
327
+ return [];
328
+ [rowStart, rowEnd] = visibleRange;
329
+ const { rowSizes } = dataState;
330
+ const { renderCoordinatorManager } = searCore.renderEngine;
331
+ // Row-header strip is on the left: x aligns with corner left, width = corner.width.
332
+ const headerX = 0;
333
+ const headerWidth = cornerConfig.width;
334
+ const nodes = [];
335
+ for (let i = rowStart; i <= rowEnd; i++) {
336
+ // y is already shifted by offset.y (= input offset.y + corner.height).
337
+ const y = rowSizes.getDimensionLeftBoundaryByIndex(i);
338
+ const height = rowSizes.getItem(0, i) || 0;
339
+ if (!height)
340
+ continue;
341
+ const positionRect = {
342
+ x: headerX,
343
+ y: y + offset.y,
344
+ width: headerWidth,
345
+ height,
346
+ };
347
+ // Same handling as column headers; see comments in buildColumnHeaderHighlight.
348
+ const bgCell = renderCoordinatorManager.create({ type: sear_render_registry_1.AffixCell.symbol, value: null }, positionRect, {
349
+ type: sear_render_registry_1.AffixCell.symbol,
350
+ left: 0,
351
+ fill: pluginConfig.headerHighlightBackgroundColor,
352
+ stroke: pluginConfig.headerHighlightBorderColor,
353
+ horizontalAlign: sear_plugin_alignment_1.SheetHorizontalAlignment.Center,
354
+ depth: this.depth + headerHighlightDepthOffset.background,
355
+ skipHit: true,
356
+ });
357
+ const bg = bgCell === null || bgCell === void 0 ? void 0 : bgCell.render();
358
+ if (bg)
359
+ nodes.push(...[bg].flat());
360
+ }
361
+ // Emphasis line: blue strip along the right edge of row headers across selected rows.
362
+ if (drawActiveBar && rowEnd >= rowStart) {
363
+ const yStart = rowSizes.getDimensionLeftBoundaryByIndex(rowStart);
364
+ const yEnd = rowSizes.getDimensionRightBoundaryByIndex(rowEnd);
365
+ const barHeight = yEnd - yStart;
366
+ const thickness = Math.max(1, activeBarThicknessOverride !== null && activeBarThicknessOverride !== void 0 ? activeBarThicknessOverride : pluginConfig.headerHighlightActiveBarThickness);
367
+ if (barHeight > 0 && thickness > 0) {
368
+ // Shift 1px toward the grid so the header indicator line tightly joins
369
+ // the primary selection border without a visible gap.
370
+ const barRect = {
371
+ x: headerX + headerWidth - thickness + 1,
372
+ y: yStart + offset.y,
373
+ width: thickness,
374
+ height: barHeight,
375
+ };
376
+ const activeCell = renderCoordinatorManager.create({ type: sear_render_registry_1.AffixCell.symbol, value: null }, barRect, {
377
+ type: sear_render_registry_1.AffixCell.symbol,
378
+ left: 0,
379
+ fill: pluginConfig.headerHighlightActiveBorderColor,
380
+ stroke: 'transparent',
381
+ horizontalAlign: sear_plugin_alignment_1.SheetHorizontalAlignment.Center,
382
+ depth: this.depth + headerHighlightDepthOffset.activeBar,
383
+ skipHit: true,
384
+ });
385
+ const active = activeCell === null || activeCell === void 0 ? void 0 : activeCell.render();
386
+ if (active)
387
+ nodes.push(...[active].flat());
388
+ }
389
+ }
390
+ return nodes;
391
+ }
392
+ /** Returns the closed interval shared by a selection and the visible window. */
393
+ intersectRange(start, end, visibleStart, visibleEnd) {
394
+ const clippedStart = Math.max(start, visibleStart);
395
+ const clippedEnd = Math.min(end, visibleEnd);
396
+ return clippedStart <= clippedEnd ? [clippedStart, clippedEnd] : null;
397
+ }
398
+ };
399
+ exports.SheetHeaderHighlightPlugin = SheetHeaderHighlightPlugin;
400
+ /** DI token for resolving SheetHeaderHighlightPlugin. */
401
+ SheetHeaderHighlightPlugin.symbol = Symbol.for('SheetHeaderHighlightPlugin');
402
+ /** Stable plugin key for SheetHeaderHighlightPlugin. */
403
+ SheetHeaderHighlightPlugin.pluginKey = key;
404
+ exports.SheetHeaderHighlightPlugin = SheetHeaderHighlightPlugin = __decorate([
405
+ (0, sear_foundation_di_1.Injectable)(),
406
+ __param(0, (0, sear_foundation_di_1.Inject)(sear_plugin_selection_1.SheetSelectionPlugin.symbol)),
407
+ __param(1, (0, sear_foundation_di_1.Inject)(sear_render_1.SheetCornerPlugin.symbol))
408
+ ], SheetHeaderHighlightPlugin);
409
+ //# sourceMappingURL=SheetHeaderHighlightPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SheetHeaderHighlightPlugin.js","sourceRoot":"","sources":["../../src/headerHighlight/SheetHeaderHighlightPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,8DAA4F;AAC5F,0EAAoE;AACpE,0EAA6D;AAC7D,sEAAmE;AACnE,0EAAoE;AAGpE,4EAA4E;AAE5E,sEAAwF;AAExF,0EAA4E;AAC5E,wDAAqG;AACrG,4EAAwE;AAExE;;GAEG;AACH,MAAM,GAAG,GAAG,IAAI,gCAAS,CAAC,sBAAsB,CAAC,CAAC;AAOlD,SAAS,2BAA2B,CAAC,UAAsB;IACzD,MAAM,QAAQ,GAAG,IAAA,sCAAiB,EAAC,UAAU,CAAC,CAAC;IAC/C,MAAM,WAAW,GAAG,IAAA,yCAAoB,EAAC,UAAU,CAAC,CAAC;IACrD,OAAO,QAAQ,IAAI,WAAW,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACpE,CAAC;AAED;;;;GAIG;AACH,MAAM,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UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QAC7C,OAAO,YAAY,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACxE,CAAC;;AAxdU,gEAA0B;AACrC,yDAAyD;AAClC,iCAAM,GAAW,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,AAAnD,CAAoD;AACjF,wDAAwD;AACjC,oCAAS,GAAG,GAAG,AAAN,CAAO;qCAJ5B,0BAA0B;IADtC,IAAA,+BAAU,GAAE;IA8BR,WAAA,IAAA,2BAAM,EAAC,4CAAoB,CAAC,MAAM,CAAC,CAAA;IAEnC,WAAA,IAAA,2BAAM,EAAC,+BAAiB,CAAC,MAAM,CAAC,CAAA;GA/BxB,0BAA0B,CAydtC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Header highlight behavior derived from Sheet selections.
3
+ *
4
+ * @packageDocumentation
5
+ */
6
+ export { SheetHeaderHighlightPlugin } from './headerHighlight/SheetHeaderHighlightPlugin';
7
+ export type { SheetHeaderHighlightMode } from './headerHighlight/SheetHeaderHighlightPlugin';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAC1F,YAAY,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * Header highlight behavior derived from Sheet selections.
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.SheetHeaderHighlightPlugin = void 0;
9
+ var SheetHeaderHighlightPlugin_1 = require("./headerHighlight/SheetHeaderHighlightPlugin");
10
+ Object.defineProperty(exports, "SheetHeaderHighlightPlugin", { enumerable: true, get: function () { return SheetHeaderHighlightPlugin_1.SheetHeaderHighlightPlugin; } });
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,2FAA0F;AAAjF,wIAAA,0BAA0B,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,59 @@
1
1
  {
2
2
  "name": "@searsuite/sear-plugin-header-highlight",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "description": "Highlights Sheet headers based on the current selection.",
4
+ "version": "0.0.1",
5
+ "license": "MIT",
6
+ "homepage": "https://searsuite.com/",
7
+ "keywords": [
8
+ "searsuite",
9
+ "spreadsheet",
10
+ "selection-highlighting",
11
+ "plugin"
12
+ ],
13
+ "main": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "dependencies": {
19
+ "@searsuite/sear-assembly-core": "0.0.1",
20
+ "@searsuite/sear-domain-matrix": "0.0.1",
21
+ "@searsuite/sear-domain-ot": "0.0.1",
22
+ "@searsuite/sear-foundation-di": "0.0.1",
23
+ "@searsuite/sear-foundation-rect": "0.0.1",
24
+ "@searsuite/sear-assembly-config": "0.0.1",
25
+ "@searsuite/sear-assembly-plugin": "0.0.1",
26
+ "@searsuite/sear-plugin-resize": "0.0.1",
27
+ "@searsuite/sear-render-engine": "0.0.1",
28
+ "@searsuite/sear-plugin-selection": "0.0.1",
29
+ "@searsuite/sear-render-registry": "0.0.1",
30
+ "@searsuite/sear-foundation-error": "0.0.1",
31
+ "@searsuite/sear-plugin-alignment": "0.0.1",
32
+ "@searsuite/sear-render-node": "0.0.1",
33
+ "@searsuite/sear-render": "0.0.1",
34
+ "@searsuite/sear-domain-transaction": "0.0.1"
35
+ },
36
+ "exports": {
37
+ ".": {
38
+ "types": "./dist/index.d.ts",
39
+ "default": "./dist/index.js"
40
+ },
41
+ "./package.json": "./package.json"
42
+ },
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "git+https://github.com/SearSuite/searsuite.git",
46
+ "directory": "packages/sear-plugin-header-highlight"
47
+ },
48
+ "bugs": {
49
+ "url": "https://github.com/SearSuite/searsuite/issues"
50
+ },
51
+ "engines": {
52
+ "node": ">=22"
53
+ },
54
+ "scripts": {
55
+ "build": "pnpm run clean && pnpm run compile",
56
+ "clean": "rimraf ./dist",
57
+ "compile": "tsc -p tsconfig.build.json"
58
+ }
6
59
  }