@toolbox-web/grid 0.2.3 → 0.2.5

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/README.md CHANGED
@@ -126,6 +126,30 @@ When the same property is set via multiple methods, higher precedence wins:
126
126
  <tbw-grid></tbw-grid>
127
127
  ```
128
128
 
129
+ ### HTML Attributes
130
+
131
+ The grid supports configuration via HTML attributes with JSON-serialized values:
132
+
133
+ | Attribute | Type | Description |
134
+ | ------------- | ------ | ------------------------------------------- |
135
+ | `rows` | JSON | Data array (JSON-serialized) |
136
+ | `columns` | JSON | Column definitions (JSON-serialized) |
137
+ | `grid-config` | JSON | Full configuration object (JSON-serialized) |
138
+ | `fit-mode` | string | Column sizing: `'stretch'` or `'fixed'` |
139
+ | `edit-on` | string | Edit trigger: `'click'` or `'dblclick'` |
140
+
141
+ **Example with HTML attributes:**
142
+
143
+ ```html
144
+ <tbw-grid
145
+ rows='[{"id":1,"name":"Alice"},{"id":2,"name":"Bob"}]'
146
+ columns='[{"field":"id","header":"ID"},{"field":"name","header":"Name"}]'
147
+ fit-mode="stretch"
148
+ edit-on="dblclick"
149
+ >
150
+ </tbw-grid>
151
+ ```
152
+
129
153
  ### Properties
130
154
 
131
155
  | Property | Type | Description |
package/all.d.ts CHANGED
@@ -1719,6 +1719,8 @@ declare interface ColumnInternal<T = any> extends ColumnConfig<T> {
1719
1719
  __autoSized?: boolean;
1720
1720
  __userResized?: boolean;
1721
1721
  __renderedWidth?: number;
1722
+ /** Original configured width (for reset on double-click) */
1723
+ __originalWidth?: number;
1722
1724
  __viewTemplate?: HTMLElement;
1723
1725
  __editorTemplate?: HTMLElement;
1724
1726
  __headerTemplate?: HTMLElement;
@@ -2025,30 +2027,31 @@ export declare class DataGridElement<T = any> extends HTMLElement implements Int
2025
2027
  #private;
2026
2028
  static readonly tagName = "tbw-grid";
2027
2029
  static readonly version: string;
2030
+ static get observedAttributes(): string[];
2028
2031
  _rows: T[];
2029
2032
  get _columns(): ColumnInternal<T>[];
2030
2033
  set _columns(value: ColumnInternal<T>[]);
2031
- get visibleColumns(): ColumnInternal<T>[];
2032
- rowPool: HTMLElement[];
2034
+ get _visibleColumns(): ColumnInternal<T>[];
2035
+ _headerRowEl: HTMLElement;
2036
+ _bodyEl: HTMLElement;
2037
+ _rowPool: HTMLElement[];
2038
+ _resizeController: ResizeController;
2039
+ _virtualization: VirtualState;
2040
+ _focusRow: number;
2041
+ _focusCol: number;
2042
+ _sortState: {
2043
+ field: string;
2044
+ direction: 1 | -1;
2045
+ } | null;
2046
+ _activeEditRows: number;
2047
+ _rowEditSnapshots: Map<number, T>;
2048
+ _changedRowIndices: Set<number>;
2049
+ _gridTemplate: string;
2033
2050
  __rowRenderEpoch: number;
2034
- activeEditRows: number;
2035
- resizeController: ResizeController;
2036
2051
  __didInitialAutoSize: boolean;
2037
2052
  __lightDomColumnsCache?: ColumnInternal[];
2038
2053
  __originalColumnNodes?: HTMLElement[];
2039
- headerRowEl: HTMLElement;
2040
- bodyEl: HTMLElement;
2041
- virtualization: VirtualState;
2042
- sortState: {
2043
- field: string;
2044
- direction: 1 | -1;
2045
- } | null;
2046
2054
  __originalOrder: T[];
2047
- focusRow: number;
2048
- focusCol: number;
2049
- gridTemplate: string;
2050
- rowEditSnapshots: Map<number, T>;
2051
- _changedRowIndices: Set<number>;
2052
2055
  get rows(): T[];
2053
2056
  set rows(value: T[]);
2054
2057
  /**
@@ -2064,82 +2067,55 @@ export declare class DataGridElement<T = any> extends HTMLElement implements Int
2064
2067
  set fitMode(value: FitMode | undefined);
2065
2068
  get editOn(): string | undefined;
2066
2069
  set editOn(value: string | undefined);
2067
- get effectiveConfig(): GridConfig<T>;
2068
- /**
2069
- * Get the disconnect signal for event listener cleanup.
2070
- * This signal is aborted when the grid disconnects from the DOM.
2071
- * Plugins and internal code can use this for automatic listener cleanup.
2072
- * @example
2073
- * element.addEventListener('click', handler, { signal: this.grid.disconnectSignal });
2074
- */
2075
- get disconnectSignal(): AbortSignal;
2070
+ /* Excluded from this release type: effectiveConfig */
2071
+ /* Excluded from this release type: disconnectSignal */
2076
2072
  constructor();
2077
- /**
2078
- * Get a plugin instance by its class.
2079
- * Used by plugins for inter-plugin communication.
2080
- */
2081
- getPlugin<P extends BaseGridPlugin>(PluginClass: new (...args: any[]) => P): P | undefined;
2082
- /**
2083
- * Get a plugin instance by its name.
2084
- * Used for loose coupling between plugins (avoids static imports).
2085
- */
2086
- getPluginByName(name: string): BaseGridPlugin | undefined;
2087
- /**
2088
- * Request a full re-render of the grid.
2089
- * Called by plugins when they need the grid to update.
2090
- * Note: This does NOT reset plugin state - just re-processes rows/columns and renders.
2091
- */
2092
- requestRender(): void;
2093
- /**
2094
- * Request a lightweight style update without rebuilding DOM.
2095
- * Called by plugins when they only need to update CSS classes/styles.
2096
- * This runs all plugin afterRender hooks without rebuilding row/column DOM.
2097
- */
2098
- requestAfterRender(): void;
2073
+ /* Excluded from this release type: getPlugin */
2074
+ /* Excluded from this release type: getPluginByName */
2075
+ /* Excluded from this release type: requestRender */
2076
+ /* Excluded from this release type: updateTemplate */
2077
+ /* Excluded from this release type: requestAfterRender */
2099
2078
  connectedCallback(): void;
2100
2079
  disconnectedCallback(): void;
2101
- emitCellCommit(detail: CellCommitDetail<T>): void;
2102
- emitRowCommit(detail: RowCommitDetail<T>): void;
2103
- emitSortChange(detail: SortChangeDetail): void;
2104
- emitColumnResize(detail: ColumnResizeDetail): void;
2105
- emitActivateCell(detail: ActivateCellDetail): void;
2106
- findHeaderRow(): HTMLElement;
2107
- findRenderedRowElement(rowIndex: number): HTMLElement | null;
2080
+ /**
2081
+ * Handle HTML attribute changes.
2082
+ * Only processes attribute values when SET (non-null).
2083
+ * Removing an attribute does NOT clear JS-set properties.
2084
+ */
2085
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
2086
+ _emitCellCommit(detail: CellCommitDetail<T>): void;
2087
+ _emitRowCommit(detail: RowCommitDetail<T>): void;
2088
+ _emitSortChange(detail: SortChangeDetail): void;
2089
+ _emitColumnResize(detail: ColumnResizeDetail): void;
2090
+ _emitActivateCell(detail: ActivateCellDetail): void;
2091
+ /* Excluded from this release type: findHeaderRow */
2092
+ /* Excluded from this release type: findRenderedRowElement */
2108
2093
  /**
2109
2094
  * Dispatch a cell click event to the plugin system.
2110
2095
  * Returns true if any plugin handled the event.
2111
2096
  */
2112
- dispatchCellClick(event: MouseEvent, rowIndex: number, colIndex: number, cellEl: HTMLElement): boolean;
2097
+ _dispatchCellClick(event: MouseEvent, rowIndex: number, colIndex: number, cellEl: HTMLElement): boolean;
2113
2098
  /**
2114
2099
  * Dispatch a header click event to the plugin system.
2115
2100
  * Returns true if any plugin handled the event.
2116
2101
  */
2117
- dispatchHeaderClick(event: MouseEvent, colIndex: number, headerEl: HTMLElement): boolean;
2102
+ _dispatchHeaderClick(event: MouseEvent, colIndex: number, headerEl: HTMLElement): boolean;
2118
2103
  /**
2119
2104
  * Dispatch a keyboard event to the plugin system.
2120
2105
  * Returns true if any plugin handled the event.
2121
2106
  */
2122
- dispatchKeyDown(event: KeyboardEvent): boolean;
2107
+ _dispatchKeyDown(event: KeyboardEvent): boolean;
2123
2108
  /**
2124
2109
  * Get horizontal scroll boundary offsets from plugins.
2125
2110
  * Used by keyboard navigation to ensure focused cells are fully visible
2126
2111
  * when plugins like pinned columns obscure part of the scroll area.
2127
2112
  */
2128
- getHorizontalScrollOffsets(rowEl?: HTMLElement, focusedCell?: HTMLElement): {
2113
+ _getHorizontalScrollOffsets(rowEl?: HTMLElement, focusedCell?: HTMLElement): {
2129
2114
  left: number;
2130
2115
  right: number;
2131
2116
  skipScroll?: boolean;
2132
2117
  };
2133
- /**
2134
- * Query all plugins with a generic query and collect responses.
2135
- * This enables inter-plugin communication without the core knowing plugin-specific concepts.
2136
- *
2137
- * @example
2138
- * // Check if any plugin vetoes moving a column
2139
- * const responses = grid.queryPlugins<boolean>({ type: PLUGIN_QUERIES.CAN_MOVE_COLUMN, context: column });
2140
- * const canMove = !responses.includes(false);
2141
- */
2142
- queryPlugins<T>(query: PluginQuery): T[];
2118
+ /* Excluded from this release type: queryPlugins */
2143
2119
  get changedRows(): T[];
2144
2120
  get changedRowIndices(): number[];
2145
2121
  resetChangedRows(silent?: boolean): Promise<void>;
@@ -2209,13 +2185,7 @@ export declare class DataGridElement<T = any> extends HTMLElement implements Int
2209
2185
  * Get the current column state.
2210
2186
  */
2211
2187
  get columnState(): GridColumnState | undefined;
2212
- /**
2213
- * Request a state change event to be emitted.
2214
- * Called internally after resize, reorder, visibility, or sort changes.
2215
- * Plugins should call this after changing their state.
2216
- * The event is debounced to avoid excessive events during drag operations.
2217
- */
2218
- requestStateChange(): void;
2188
+ /* Excluded from this release type: requestStateChange */
2219
2189
  /**
2220
2190
  * Reset column state to initial configuration.
2221
2191
  * Clears all user modifications (order, width, visibility, sort).
@@ -2263,11 +2233,7 @@ export declare class DataGridElement<T = any> extends HTMLElement implements Int
2263
2233
  * Call this after dynamically modifying <tbw-grid-header> children.
2264
2234
  */
2265
2235
  refreshShellHeader(): void;
2266
- /**
2267
- * Core virtualization routine. Chooses between bypass (small datasets), grouped window rendering,
2268
- * or standard row window rendering.
2269
- */
2270
- refreshVirtualWindow(force?: boolean): void;
2236
+ /* Excluded from this release type: refreshVirtualWindow */
2271
2237
  }
2272
2238
 
2273
2239
  /**
@@ -3464,12 +3430,12 @@ declare interface InternalGrid<T = any> extends PublicGrid<T>, GridConfig<T> {
3464
3430
  _rows: T[];
3465
3431
  _columns: ColumnInternal<T>[];
3466
3432
  /** Visible columns only (excludes hidden). Use for rendering. */
3467
- visibleColumns: ColumnInternal<T>[];
3468
- headerRowEl: HTMLElement;
3469
- bodyEl: HTMLElement;
3470
- rowPool: HTMLElement[];
3471
- resizeController: ResizeController;
3472
- sortState: {
3433
+ _visibleColumns: ColumnInternal<T>[];
3434
+ _headerRowEl: HTMLElement;
3435
+ _bodyEl: HTMLElement;
3436
+ _rowPool: HTMLElement[];
3437
+ _resizeController: ResizeController;
3438
+ _sortState: {
3473
3439
  field: string;
3474
3440
  direction: 1 | -1;
3475
3441
  } | null;
@@ -3478,12 +3444,12 @@ declare interface InternalGrid<T = any> extends PublicGrid<T>, GridConfig<T> {
3478
3444
  __didInitialAutoSize?: boolean;
3479
3445
  __lightDomColumnsCache?: ColumnInternal[];
3480
3446
  __originalColumnNodes?: HTMLElement[];
3481
- gridTemplate: string;
3482
- virtualization: VirtualState;
3483
- focusRow: number;
3484
- focusCol: number;
3485
- activeEditRows: number;
3486
- rowEditSnapshots: Map<number, T>;
3447
+ _gridTemplate: string;
3448
+ _virtualization: VirtualState;
3449
+ _focusRow: number;
3450
+ _focusCol: number;
3451
+ _activeEditRows: number;
3452
+ _rowEditSnapshots: Map<number, T>;
3487
3453
  _changedRowIndices: Set<number>;
3488
3454
  changedRows?: T[];
3489
3455
  changedRowIndices?: number[];
@@ -3495,13 +3461,13 @@ declare interface InternalGrid<T = any> extends PublicGrid<T>, GridConfig<T> {
3495
3461
  beginBulkEdit?: (rowIndex: number) => void;
3496
3462
  commitActiveRowEdit?: () => void;
3497
3463
  /** Dispatch cell click to plugin system, returns true if handled */
3498
- dispatchCellClick?: (event: MouseEvent, rowIndex: number, colIndex: number, cellEl: HTMLElement) => boolean;
3464
+ _dispatchCellClick?: (event: MouseEvent, rowIndex: number, colIndex: number, cellEl: HTMLElement) => boolean;
3499
3465
  /** Dispatch header click to plugin system, returns true if handled */
3500
- dispatchHeaderClick?: (event: MouseEvent, colIndex: number, headerEl: HTMLElement) => boolean;
3466
+ _dispatchHeaderClick?: (event: MouseEvent, colIndex: number, headerEl: HTMLElement) => boolean;
3501
3467
  /** Dispatch keydown to plugin system, returns true if handled */
3502
- dispatchKeyDown?: (event: KeyboardEvent) => boolean;
3468
+ _dispatchKeyDown?: (event: KeyboardEvent) => boolean;
3503
3469
  /** Get horizontal scroll boundary offsets from plugins (e.g., pinned columns) */
3504
- getHorizontalScrollOffsets?: (rowEl?: HTMLElement, focusedCell?: HTMLElement) => {
3470
+ _getHorizontalScrollOffsets?: (rowEl?: HTMLElement, focusedCell?: HTMLElement) => {
3505
3471
  left: number;
3506
3472
  right: number;
3507
3473
  skipScroll?: boolean;
@@ -4492,6 +4458,8 @@ export declare class ReorderPlugin extends BaseGridPlugin_2<ReorderConfig> {
4492
4458
  /** Controller managing drag-based column resize lifecycle. */
4493
4459
  declare interface ResizeController {
4494
4460
  start: (e: MouseEvent, colIndex: number, cell: HTMLElement) => void;
4461
+ /** Reset a column to its configured width (or auto-size if none configured). */
4462
+ resetColumn: (colIndex: number) => void;
4495
4463
  dispose: () => void;
4496
4464
  /** True while a resize drag is in progress (used to suppress header click/sort). */
4497
4465
  isResizing: boolean;
package/index.d.ts CHANGED
@@ -889,6 +889,8 @@ declare interface ColumnInternal<T = any> extends ColumnConfig<T> {
889
889
  __autoSized?: boolean;
890
890
  __userResized?: boolean;
891
891
  __renderedWidth?: number;
892
+ /** Original configured width (for reset on double-click) */
893
+ __originalWidth?: number;
892
894
  __viewTemplate?: HTMLElement;
893
895
  __editorTemplate?: HTMLElement;
894
896
  __headerTemplate?: HTMLElement;
@@ -977,30 +979,31 @@ export declare class DataGridElement<T = any> extends HTMLElement implements Int
977
979
  #private;
978
980
  static readonly tagName = "tbw-grid";
979
981
  static readonly version: string;
982
+ static get observedAttributes(): string[];
980
983
  _rows: T[];
981
984
  get _columns(): ColumnInternal<T>[];
982
985
  set _columns(value: ColumnInternal<T>[]);
983
- get visibleColumns(): ColumnInternal<T>[];
984
- rowPool: HTMLElement[];
986
+ get _visibleColumns(): ColumnInternal<T>[];
987
+ _headerRowEl: HTMLElement;
988
+ _bodyEl: HTMLElement;
989
+ _rowPool: HTMLElement[];
990
+ _resizeController: ResizeController;
991
+ _virtualization: VirtualState;
992
+ _focusRow: number;
993
+ _focusCol: number;
994
+ _sortState: {
995
+ field: string;
996
+ direction: 1 | -1;
997
+ } | null;
998
+ _activeEditRows: number;
999
+ _rowEditSnapshots: Map<number, T>;
1000
+ _changedRowIndices: Set<number>;
1001
+ _gridTemplate: string;
985
1002
  __rowRenderEpoch: number;
986
- activeEditRows: number;
987
- resizeController: ResizeController;
988
1003
  __didInitialAutoSize: boolean;
989
1004
  __lightDomColumnsCache?: ColumnInternal[];
990
1005
  __originalColumnNodes?: HTMLElement[];
991
- headerRowEl: HTMLElement;
992
- bodyEl: HTMLElement;
993
- virtualization: VirtualState;
994
- sortState: {
995
- field: string;
996
- direction: 1 | -1;
997
- } | null;
998
1006
  __originalOrder: T[];
999
- focusRow: number;
1000
- focusCol: number;
1001
- gridTemplate: string;
1002
- rowEditSnapshots: Map<number, T>;
1003
- _changedRowIndices: Set<number>;
1004
1007
  get rows(): T[];
1005
1008
  set rows(value: T[]);
1006
1009
  /**
@@ -1016,82 +1019,55 @@ export declare class DataGridElement<T = any> extends HTMLElement implements Int
1016
1019
  set fitMode(value: FitMode | undefined);
1017
1020
  get editOn(): string | undefined;
1018
1021
  set editOn(value: string | undefined);
1019
- get effectiveConfig(): GridConfig<T>;
1020
- /**
1021
- * Get the disconnect signal for event listener cleanup.
1022
- * This signal is aborted when the grid disconnects from the DOM.
1023
- * Plugins and internal code can use this for automatic listener cleanup.
1024
- * @example
1025
- * element.addEventListener('click', handler, { signal: this.grid.disconnectSignal });
1026
- */
1027
- get disconnectSignal(): AbortSignal;
1022
+ /* Excluded from this release type: effectiveConfig */
1023
+ /* Excluded from this release type: disconnectSignal */
1028
1024
  constructor();
1029
- /**
1030
- * Get a plugin instance by its class.
1031
- * Used by plugins for inter-plugin communication.
1032
- */
1033
- getPlugin<P extends BaseGridPlugin>(PluginClass: new (...args: any[]) => P): P | undefined;
1034
- /**
1035
- * Get a plugin instance by its name.
1036
- * Used for loose coupling between plugins (avoids static imports).
1037
- */
1038
- getPluginByName(name: string): BaseGridPlugin | undefined;
1039
- /**
1040
- * Request a full re-render of the grid.
1041
- * Called by plugins when they need the grid to update.
1042
- * Note: This does NOT reset plugin state - just re-processes rows/columns and renders.
1043
- */
1044
- requestRender(): void;
1045
- /**
1046
- * Request a lightweight style update without rebuilding DOM.
1047
- * Called by plugins when they only need to update CSS classes/styles.
1048
- * This runs all plugin afterRender hooks without rebuilding row/column DOM.
1049
- */
1050
- requestAfterRender(): void;
1025
+ /* Excluded from this release type: getPlugin */
1026
+ /* Excluded from this release type: getPluginByName */
1027
+ /* Excluded from this release type: requestRender */
1028
+ /* Excluded from this release type: updateTemplate */
1029
+ /* Excluded from this release type: requestAfterRender */
1051
1030
  connectedCallback(): void;
1052
1031
  disconnectedCallback(): void;
1053
- emitCellCommit(detail: CellCommitDetail<T>): void;
1054
- emitRowCommit(detail: RowCommitDetail<T>): void;
1055
- emitSortChange(detail: SortChangeDetail): void;
1056
- emitColumnResize(detail: ColumnResizeDetail): void;
1057
- emitActivateCell(detail: ActivateCellDetail): void;
1058
- findHeaderRow(): HTMLElement;
1059
- findRenderedRowElement(rowIndex: number): HTMLElement | null;
1032
+ /**
1033
+ * Handle HTML attribute changes.
1034
+ * Only processes attribute values when SET (non-null).
1035
+ * Removing an attribute does NOT clear JS-set properties.
1036
+ */
1037
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
1038
+ _emitCellCommit(detail: CellCommitDetail<T>): void;
1039
+ _emitRowCommit(detail: RowCommitDetail<T>): void;
1040
+ _emitSortChange(detail: SortChangeDetail): void;
1041
+ _emitColumnResize(detail: ColumnResizeDetail): void;
1042
+ _emitActivateCell(detail: ActivateCellDetail): void;
1043
+ /* Excluded from this release type: findHeaderRow */
1044
+ /* Excluded from this release type: findRenderedRowElement */
1060
1045
  /**
1061
1046
  * Dispatch a cell click event to the plugin system.
1062
1047
  * Returns true if any plugin handled the event.
1063
1048
  */
1064
- dispatchCellClick(event: MouseEvent, rowIndex: number, colIndex: number, cellEl: HTMLElement): boolean;
1049
+ _dispatchCellClick(event: MouseEvent, rowIndex: number, colIndex: number, cellEl: HTMLElement): boolean;
1065
1050
  /**
1066
1051
  * Dispatch a header click event to the plugin system.
1067
1052
  * Returns true if any plugin handled the event.
1068
1053
  */
1069
- dispatchHeaderClick(event: MouseEvent, colIndex: number, headerEl: HTMLElement): boolean;
1054
+ _dispatchHeaderClick(event: MouseEvent, colIndex: number, headerEl: HTMLElement): boolean;
1070
1055
  /**
1071
1056
  * Dispatch a keyboard event to the plugin system.
1072
1057
  * Returns true if any plugin handled the event.
1073
1058
  */
1074
- dispatchKeyDown(event: KeyboardEvent): boolean;
1059
+ _dispatchKeyDown(event: KeyboardEvent): boolean;
1075
1060
  /**
1076
1061
  * Get horizontal scroll boundary offsets from plugins.
1077
1062
  * Used by keyboard navigation to ensure focused cells are fully visible
1078
1063
  * when plugins like pinned columns obscure part of the scroll area.
1079
1064
  */
1080
- getHorizontalScrollOffsets(rowEl?: HTMLElement, focusedCell?: HTMLElement): {
1065
+ _getHorizontalScrollOffsets(rowEl?: HTMLElement, focusedCell?: HTMLElement): {
1081
1066
  left: number;
1082
1067
  right: number;
1083
1068
  skipScroll?: boolean;
1084
1069
  };
1085
- /**
1086
- * Query all plugins with a generic query and collect responses.
1087
- * This enables inter-plugin communication without the core knowing plugin-specific concepts.
1088
- *
1089
- * @example
1090
- * // Check if any plugin vetoes moving a column
1091
- * const responses = grid.queryPlugins<boolean>({ type: PLUGIN_QUERIES.CAN_MOVE_COLUMN, context: column });
1092
- * const canMove = !responses.includes(false);
1093
- */
1094
- queryPlugins<T>(query: PluginQuery): T[];
1070
+ /* Excluded from this release type: queryPlugins */
1095
1071
  get changedRows(): T[];
1096
1072
  get changedRowIndices(): number[];
1097
1073
  resetChangedRows(silent?: boolean): Promise<void>;
@@ -1161,13 +1137,7 @@ export declare class DataGridElement<T = any> extends HTMLElement implements Int
1161
1137
  * Get the current column state.
1162
1138
  */
1163
1139
  get columnState(): GridColumnState | undefined;
1164
- /**
1165
- * Request a state change event to be emitted.
1166
- * Called internally after resize, reorder, visibility, or sort changes.
1167
- * Plugins should call this after changing their state.
1168
- * The event is debounced to avoid excessive events during drag operations.
1169
- */
1170
- requestStateChange(): void;
1140
+ /* Excluded from this release type: requestStateChange */
1171
1141
  /**
1172
1142
  * Reset column state to initial configuration.
1173
1143
  * Clears all user modifications (order, width, visibility, sort).
@@ -1215,11 +1185,7 @@ export declare class DataGridElement<T = any> extends HTMLElement implements Int
1215
1185
  * Call this after dynamically modifying <tbw-grid-header> children.
1216
1186
  */
1217
1187
  refreshShellHeader(): void;
1218
- /**
1219
- * Core virtualization routine. Chooses between bypass (small datasets), grouped window rendering,
1220
- * or standard row window rendering.
1221
- */
1222
- refreshVirtualWindow(force?: boolean): void;
1188
+ /* Excluded from this release type: refreshVirtualWindow */
1223
1189
  }
1224
1190
 
1225
1191
  /**
@@ -1774,12 +1740,12 @@ declare interface InternalGrid<T = any> extends PublicGrid<T>, GridConfig<T> {
1774
1740
  _rows: T[];
1775
1741
  _columns: ColumnInternal<T>[];
1776
1742
  /** Visible columns only (excludes hidden). Use for rendering. */
1777
- visibleColumns: ColumnInternal<T>[];
1778
- headerRowEl: HTMLElement;
1779
- bodyEl: HTMLElement;
1780
- rowPool: HTMLElement[];
1781
- resizeController: ResizeController;
1782
- sortState: {
1743
+ _visibleColumns: ColumnInternal<T>[];
1744
+ _headerRowEl: HTMLElement;
1745
+ _bodyEl: HTMLElement;
1746
+ _rowPool: HTMLElement[];
1747
+ _resizeController: ResizeController;
1748
+ _sortState: {
1783
1749
  field: string;
1784
1750
  direction: 1 | -1;
1785
1751
  } | null;
@@ -1788,12 +1754,12 @@ declare interface InternalGrid<T = any> extends PublicGrid<T>, GridConfig<T> {
1788
1754
  __didInitialAutoSize?: boolean;
1789
1755
  __lightDomColumnsCache?: ColumnInternal[];
1790
1756
  __originalColumnNodes?: HTMLElement[];
1791
- gridTemplate: string;
1792
- virtualization: VirtualState;
1793
- focusRow: number;
1794
- focusCol: number;
1795
- activeEditRows: number;
1796
- rowEditSnapshots: Map<number, T>;
1757
+ _gridTemplate: string;
1758
+ _virtualization: VirtualState;
1759
+ _focusRow: number;
1760
+ _focusCol: number;
1761
+ _activeEditRows: number;
1762
+ _rowEditSnapshots: Map<number, T>;
1797
1763
  _changedRowIndices: Set<number>;
1798
1764
  changedRows?: T[];
1799
1765
  changedRowIndices?: number[];
@@ -1805,13 +1771,13 @@ declare interface InternalGrid<T = any> extends PublicGrid<T>, GridConfig<T> {
1805
1771
  beginBulkEdit?: (rowIndex: number) => void;
1806
1772
  commitActiveRowEdit?: () => void;
1807
1773
  /** Dispatch cell click to plugin system, returns true if handled */
1808
- dispatchCellClick?: (event: MouseEvent, rowIndex: number, colIndex: number, cellEl: HTMLElement) => boolean;
1774
+ _dispatchCellClick?: (event: MouseEvent, rowIndex: number, colIndex: number, cellEl: HTMLElement) => boolean;
1809
1775
  /** Dispatch header click to plugin system, returns true if handled */
1810
- dispatchHeaderClick?: (event: MouseEvent, colIndex: number, headerEl: HTMLElement) => boolean;
1776
+ _dispatchHeaderClick?: (event: MouseEvent, colIndex: number, headerEl: HTMLElement) => boolean;
1811
1777
  /** Dispatch keydown to plugin system, returns true if handled */
1812
- dispatchKeyDown?: (event: KeyboardEvent) => boolean;
1778
+ _dispatchKeyDown?: (event: KeyboardEvent) => boolean;
1813
1779
  /** Get horizontal scroll boundary offsets from plugins (e.g., pinned columns) */
1814
- getHorizontalScrollOffsets?: (rowEl?: HTMLElement, focusedCell?: HTMLElement) => {
1780
+ _getHorizontalScrollOffsets?: (rowEl?: HTMLElement, focusedCell?: HTMLElement) => {
1815
1781
  left: number;
1816
1782
  right: number;
1817
1783
  skipScroll?: boolean;
@@ -2221,6 +2187,8 @@ export declare const registerAggregator: (name: string, fn: AggregatorFn) => voi
2221
2187
  /** Controller managing drag-based column resize lifecycle. */
2222
2188
  declare interface ResizeController {
2223
2189
  start: (e: MouseEvent, colIndex: number, cell: HTMLElement) => void;
2190
+ /** Reset a column to its configured width (or auto-size if none configured). */
2191
+ resetColumn: (colIndex: number) => void;
2224
2192
  dispose: () => void;
2225
2193
  /** True while a resize drag is in progress (used to suppress header click/sort). */
2226
2194
  isResizing: boolean;