@gridkitjs/core 0.0.0-dev-20261112195815 → 0.0.0-dev-20261112200523

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.
@@ -379,6 +379,10 @@ declare function formatGroupValue<Row>(value: unknown, column: ColumnDefinition<
379
379
  * the app's to choose. Nor is formatting — dates and numbers follow
380
380
  * `locale`, and so do the counts the defaults print: "1,204 of 10,000 rows"
381
381
  * under `"en"`, "1.204 of 10.000 rows" under `"de-DE"`.
382
+ *
383
+ * A minor release may add keys. The `messages` option takes a partial set
384
+ * laid over the defaults, so a translation without a new key shows its
385
+ * English default until it gains one.
382
386
  */
383
387
  interface GridMessages {
384
388
  /** The pager's accessible name. */
@@ -1117,6 +1121,7 @@ type GridCommandTarget = {
1117
1121
  /**
1118
1122
  * Where a command was run from: a context menu, the toolbar, a renderer's
1119
1123
  * API, or a column's filter menu — its sort entries and its "Clear filter".
1124
+ * A minor release may add a source, so a `switch` over it needs a `default`.
1120
1125
  */
1121
1126
  type GridCommandSource = "contextMenu" | "toolbar" | "api" | "filterMenu";
1122
1127
  /** What `onCommand` is told of a command, or an inline menu item, that ran. */
@@ -1129,13 +1134,15 @@ interface GridCommandEvent {
1129
1134
  }
1130
1135
  /**
1131
1136
  * The panels a command can ask a renderer to open: the column chooser, and
1132
- * a column's filter menu, which opens on a header target only.
1137
+ * a column's filter menu, which opens on a header target only. A minor
1138
+ * release may add a panel, so a `switch` over it needs a `default`.
1133
1139
  */
1134
1140
  type GridPanelKind = "columnChooser" | "filter";
1135
1141
  /**
1136
1142
  * What a command needs that only a renderer has: a DOM to measure, panels to
1137
1143
  * open, a live region to speak through. A caller with none of these — a test,
1138
- * a script in Node — passes members that do nothing.
1144
+ * a script in Node — passes members that do nothing. A member added in a
1145
+ * minor release is optional, so a host built by hand keeps compiling.
1139
1146
  */
1140
1147
  interface GridCommandHost {
1141
1148
  /** Sizes each column to fit its content, as double-clicking its resize handle does. */
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { G as GridControllerOptions, a as GridController, b as GridCommandTarget, c as GridMessages, d as GridCommandHost, e as GridCommandContext, f as GridCommand, M as MenuEntry, R as ResolvedMenuEntry, g as GridToolbarTarget, T as ToolbarItemAttributes, h as ToolbarEntry, i as ResolvedToolbarItem, C as ColumnType, j as ColumnSortState, S as SortDirection, k as ResolvedRow, D as DataColumn, F as FilterState, l as FieldPath, m as ResolvedColumn, n as SelectedCellRef, o as SelectedCell, p as SelectedColumn, P as PaginationUnit, q as DisplayRow, r as PaginationState, A as AggregateState, s as AggregateResults, t as GroupByState, u as GroupAggregateDisplay, v as ColumnVisibilityState, w as ColumnDefinition, x as GridViewInput, y as GridView, z as GridState, B as SerializedGridState, E as ExportTable, H as ExportSource, I as ExportWriter, J as GridExportOptions, K as ExportFile } from './filterEditor-Buy3CLup.js';
2
- export { L as ALL_COLLAPSED, N as ALL_EXPANDED, O as AggregateFn, Q as AggregateSpec, U as Borders, V as BuiltInAggregate, W as BuiltInCommandIcon, X as BuiltInCommandId, Y as CellSelectEvent, Z as CellSelectionChangeEvent, _ as CellSelectionMode, $ as CellSelectionState, a0 as CellTemplateContext, a1 as ColumnAlignment, a2 as ColumnConstraints, a3 as ColumnFilterMenuOptions, a4 as ColumnOrderEvent, a5 as ColumnOrderState, a6 as ColumnResizeEvent, a7 as ColumnResolveOptions, a8 as ColumnSelectEvent, a9 as ColumnSelectionChangeEvent, aa as ColumnSizeDefaults, ab as ColumnSizingState, ac as ColumnSortEntry, ad as ColumnSortEvent, ae as ColumnVisibilityEvent, af as ColumnWrapConfig, ag as ColumnsSelectEvent, ah as ContextMenuOpenChangeEvent, ai as CopyContent, aj as CsvOptions, ak as DEFAULT_COLUMN_SIZES, al as DEFAULT_FILTER_VALUE_LIMIT, am as ExportCell, an as ExportColumn, ao as ExportDataRow, ap as ExportGroupRow, aq as ExportGroupSummaryRow, ar as ExportOptions, as as ExportRow, at as ExportScalar, au as ExportTotalRow, av as ExportWriteContext, aw as FilterChangeEvent, ax as FilterEntry, ay as FilterMenuUi, az as FilterOperator, aA as FilterOperatorFamily, aB as FilterPredicate, aC as FilterScalar, aD as FooterTemplateContext, aE as FormatLocale, aF as GridCommandActions, aG as GridCommandEvent, aH as GridCommandSource, aI as GridContextMenuArea, aJ as GridContextMenuEntries, aK as GridContextMenuOptions, aL as GridContextMenuRequest, aM as GridContextMenuTarget, aN as GridFilterMenuOptions, aO as GridFocus, aP as GridOptions, aQ as GridPanelKind, aR as GridToolbarOptions, aS as GridViewOptions, aT as GridViewState, aU as GroupByBarVisibility, aV as GroupByEntry, aW as GroupByEvent, aX as GroupExpansionEvent, aY as GroupExpansionState, aZ as GroupFilterEntry, a_ as HoverableConfig, a$ as JsonOptions, b0 as MenuItemEntry, b1 as MenuSubmenuEntry, b2 as OperatorFilterEntry, b3 as PaginationChangeEvent, b4 as PredicateFilterEntry, b5 as PrintDocument, b6 as PrintOptions, b7 as PrintOrientation, b8 as PrintPage, b9 as PrintSource, ba as ResizeMode, bb as ResolvedGroupRow, bc as ResolvedGroupSummaryRow, bd as ResolvedMenuItem, be as ResolvedMenuSeparator, bf as ResolvedMenuSubmenu, bg as ResolvedToolbarButton, bh as ResolvedToolbarCustom, bi as ResolvedToolbarMenu, bj as ResolvedToolbarSearch, bk as ResolvedToolbarSpacer, bl as RowPointerEvent, bm as RowProps, bn as RowSelectEvent, bo as RowSelectionChangeEvent, bp as RowsSelectEvent, bq as SelectIntent, br as SelectableConfig, bs as SelectionCallbacks, bt as SelectionDiff, bu as SelectionDiffEvent, bv as SelectionMode, bw as SelectionState, bx as SerializedFilterEntry, by as SerializedFilterScalar, bz as SerializedFilterState, bA as SerializedGroupFilterEntry, bB as SerializedOperatorFilterEntry, bC as SerializedValueFilterEntry, bD as TextFilterEntry, bE as ToolbarCustomEntry, bF as ValueFilterEntry, bG as accessDotted, bH as alignmentForType, bI as applyColumnOrder, bJ as applySelectionIntent, bK as bodyFocus, bL as buildExportTable, bM as builtInCommands, bN as clearSelection, bO as collapseAllGroups, bP as contextMenuEntries, bQ as createDefaultMessages, bR as csvWriter, bS as defaultContextMenu, bT as defaultFilterOperators, bU as defaultMessages, bV as defaultToolbar, bW as defineColumnsFromRows, bX as expandAllGroups, bY as exportPrintDocument, bZ as formatAggregateValue, b_ as formatCellValue, b$ as formatGroupValue, c0 as getColumnId, c1 as groupRowId, c2 as groupRows, c3 as headerFocus, c4 as isColumnFiltered, c5 as isGroupExpanded, c6 as isSameCell, c7 as jsonWriter, c8 as moveColumnBefore, c9 as moveGroupByBefore, ca as resolveColumnHeaderText, cb as resolveColumnLabel, cc as resolveColumnWidths, cd as resolveDataColumns, ce as resolveExportWriters, cf as resolveMessages, cg as resolveRowId, ch as selectAll, ci as selectCell, cj as selectOnly, ck as selectRange, cl as toCsv, cm as toJson, cn as toggleCellSelection, co as toggleGroupExpansion, cp as toggleSelection, cq as toolbarEntries } from './filterEditor-Buy3CLup.js';
1
+ import { G as GridControllerOptions, a as GridController, b as GridCommandTarget, c as GridMessages, d as GridCommandHost, e as GridCommandContext, f as GridCommand, M as MenuEntry, R as ResolvedMenuEntry, g as GridToolbarTarget, T as ToolbarItemAttributes, h as ToolbarEntry, i as ResolvedToolbarItem, C as ColumnType, j as ColumnSortState, S as SortDirection, k as ResolvedRow, D as DataColumn, F as FilterState, l as FieldPath, m as ResolvedColumn, n as SelectedCellRef, o as SelectedCell, p as SelectedColumn, P as PaginationUnit, q as DisplayRow, r as PaginationState, A as AggregateState, s as AggregateResults, t as GroupByState, u as GroupAggregateDisplay, v as ColumnVisibilityState, w as ColumnDefinition, x as GridViewInput, y as GridView, z as GridState, B as SerializedGridState, E as ExportTable, H as ExportSource, I as ExportWriter, J as GridExportOptions, K as ExportFile } from './filterEditor-9hncygVf.js';
2
+ export { L as ALL_COLLAPSED, N as ALL_EXPANDED, O as AggregateFn, Q as AggregateSpec, U as Borders, V as BuiltInAggregate, W as BuiltInCommandIcon, X as BuiltInCommandId, Y as CellSelectEvent, Z as CellSelectionChangeEvent, _ as CellSelectionMode, $ as CellSelectionState, a0 as CellTemplateContext, a1 as ColumnAlignment, a2 as ColumnConstraints, a3 as ColumnFilterMenuOptions, a4 as ColumnOrderEvent, a5 as ColumnOrderState, a6 as ColumnResizeEvent, a7 as ColumnResolveOptions, a8 as ColumnSelectEvent, a9 as ColumnSelectionChangeEvent, aa as ColumnSizeDefaults, ab as ColumnSizingState, ac as ColumnSortEntry, ad as ColumnSortEvent, ae as ColumnVisibilityEvent, af as ColumnWrapConfig, ag as ColumnsSelectEvent, ah as ContextMenuOpenChangeEvent, ai as CopyContent, aj as CsvOptions, ak as DEFAULT_COLUMN_SIZES, al as DEFAULT_FILTER_VALUE_LIMIT, am as ExportCell, an as ExportColumn, ao as ExportDataRow, ap as ExportGroupRow, aq as ExportGroupSummaryRow, ar as ExportOptions, as as ExportRow, at as ExportScalar, au as ExportTotalRow, av as ExportWriteContext, aw as FilterChangeEvent, ax as FilterEntry, ay as FilterMenuUi, az as FilterOperator, aA as FilterOperatorFamily, aB as FilterPredicate, aC as FilterScalar, aD as FooterTemplateContext, aE as FormatLocale, aF as GridCommandActions, aG as GridCommandEvent, aH as GridCommandSource, aI as GridContextMenuArea, aJ as GridContextMenuEntries, aK as GridContextMenuOptions, aL as GridContextMenuRequest, aM as GridContextMenuTarget, aN as GridFilterMenuOptions, aO as GridFocus, aP as GridOptions, aQ as GridPanelKind, aR as GridToolbarOptions, aS as GridViewOptions, aT as GridViewState, aU as GroupByBarVisibility, aV as GroupByEntry, aW as GroupByEvent, aX as GroupExpansionEvent, aY as GroupExpansionState, aZ as GroupFilterEntry, a_ as HoverableConfig, a$ as JsonOptions, b0 as MenuItemEntry, b1 as MenuSubmenuEntry, b2 as OperatorFilterEntry, b3 as PaginationChangeEvent, b4 as PredicateFilterEntry, b5 as PrintDocument, b6 as PrintOptions, b7 as PrintOrientation, b8 as PrintPage, b9 as PrintSource, ba as ResizeMode, bb as ResolvedGroupRow, bc as ResolvedGroupSummaryRow, bd as ResolvedMenuItem, be as ResolvedMenuSeparator, bf as ResolvedMenuSubmenu, bg as ResolvedToolbarButton, bh as ResolvedToolbarCustom, bi as ResolvedToolbarMenu, bj as ResolvedToolbarSearch, bk as ResolvedToolbarSpacer, bl as RowPointerEvent, bm as RowProps, bn as RowSelectEvent, bo as RowSelectionChangeEvent, bp as RowsSelectEvent, bq as SelectIntent, br as SelectableConfig, bs as SelectionCallbacks, bt as SelectionDiff, bu as SelectionDiffEvent, bv as SelectionMode, bw as SelectionState, bx as SerializedFilterEntry, by as SerializedFilterScalar, bz as SerializedFilterState, bA as SerializedGroupFilterEntry, bB as SerializedOperatorFilterEntry, bC as SerializedValueFilterEntry, bD as TextFilterEntry, bE as ToolbarCustomEntry, bF as ValueFilterEntry, bG as accessDotted, bH as alignmentForType, bI as applyColumnOrder, bJ as applySelectionIntent, bK as bodyFocus, bL as buildExportTable, bM as builtInCommands, bN as clearSelection, bO as collapseAllGroups, bP as contextMenuEntries, bQ as createDefaultMessages, bR as csvWriter, bS as defaultContextMenu, bT as defaultFilterOperators, bU as defaultMessages, bV as defaultToolbar, bW as defineColumnsFromRows, bX as expandAllGroups, bY as exportPrintDocument, bZ as formatAggregateValue, b_ as formatCellValue, b$ as formatGroupValue, c0 as getColumnId, c1 as groupRowId, c2 as groupRows, c3 as headerFocus, c4 as isColumnFiltered, c5 as isGroupExpanded, c6 as isSameCell, c7 as jsonWriter, c8 as moveColumnBefore, c9 as moveGroupByBefore, ca as resolveColumnHeaderText, cb as resolveColumnLabel, cc as resolveColumnWidths, cd as resolveDataColumns, ce as resolveExportWriters, cf as resolveMessages, cg as resolveRowId, ch as selectAll, ci as selectCell, cj as selectOnly, ck as selectRange, cl as toCsv, cm as toJson, cn as toggleCellSelection, co as toggleGroupExpansion, cp as toggleSelection, cq as toolbarEntries } from './filterEditor-9hncygVf.js';
3
3
 
4
4
  /**
5
5
  * Creates the state container for one grid — see `GridController`. Hold one
package/dist/index.js CHANGED
@@ -86,7 +86,7 @@ import {
86
86
  unknownDisplayRow,
87
87
  unknownFilterEntry,
88
88
  withGroupAggregates
89
- } from "./chunk-NA6KXHPE.js";
89
+ } from "./chunk-AHDALZCY.js";
90
90
 
91
91
  // src/util/memoize.ts
92
92
  function memoizeLast(compute) {
@@ -1,5 +1,5 @@
1
- import { R as ResolvedMenuEntry, i as ResolvedToolbarItem, F as FilterState, D as DataColumn, v as ColumnVisibilityState, cr as SelectAllState, az as FilterOperator, b2 as OperatorFilterEntry, cs as ColumnFilterShape, C as ColumnType, ct as ColumnValueQuery, cu as ColumnValueOptions, aC as FilterScalar, cv as ValuesDraft } from './filterEditor-Buy3CLup.js';
2
- export { cw as ColumnResizeSession, cx as ColumnValueOption, cy as ConditionsDraft, cz as CopyRequest, cA as CopySource, cB as DropSide, cC as FilterEditorAction, cD as FilterEditorDraft, cE as FilterEditorDraftBase, cF as KEYBOARD_STEP, cG as KeyShortcutCapabilities, cH as NavigationModifiers, cI as ResolvedColumnFilterMenu, cJ as applyColumnResize, cK as beginColumnResize, cL as buildKeyShortcuts, cM as buildPrintDocument, cN as clampColumnWidth, cO as clampFocus, cP as columnValueOptions, cQ as copyContent, cR as describeColumnFilter, cS as diffSelection, cT as draftToFilter, cU as filterDraftChanged, cV as filterEditorReducer, cW as filterOperandArity, cX as filterOperatorFamily, cY as fitColumnsToWidth, cZ as formatFilterOperand, c_ as hasContextMenu, c$ as initialFilterEditorDraft, d0 as intentOf, d1 as movesColumn, d2 as movesGroupBy, d3 as nextFocusForKey, d4 as parseFilterOperand, d5 as resolveColumnConstraints, d6 as resolveColumnFilterMenu, d7 as resolveDropBefore, d8 as resolveKeyboardDropTarget, d9 as revertColumnSize, da as selectAllState, db as sizeColumnToContent, dc as toConditionsDraft, dd as toValuesDraft, de as totalColumnWidth, df as visibleFilterOptions } from './filterEditor-Buy3CLup.js';
1
+ import { R as ResolvedMenuEntry, i as ResolvedToolbarItem, F as FilterState, D as DataColumn, v as ColumnVisibilityState, cr as SelectAllState, az as FilterOperator, b2 as OperatorFilterEntry, cs as ColumnFilterShape, C as ColumnType, ct as ColumnValueQuery, cu as ColumnValueOptions, aC as FilterScalar, cv as ValuesDraft } from './filterEditor-9hncygVf.js';
2
+ export { cw as ColumnResizeSession, cx as ColumnValueOption, cy as ConditionsDraft, cz as CopyRequest, cA as CopySource, cB as DropSide, cC as FilterEditorAction, cD as FilterEditorDraft, cE as FilterEditorDraftBase, cF as KEYBOARD_STEP, cG as KeyShortcutCapabilities, cH as NavigationModifiers, cI as ResolvedColumnFilterMenu, cJ as applyColumnResize, cK as beginColumnResize, cL as buildKeyShortcuts, cM as buildPrintDocument, cN as clampColumnWidth, cO as clampFocus, cP as columnValueOptions, cQ as copyContent, cR as describeColumnFilter, cS as diffSelection, cT as draftToFilter, cU as filterDraftChanged, cV as filterEditorReducer, cW as filterOperandArity, cX as filterOperatorFamily, cY as fitColumnsToWidth, cZ as formatFilterOperand, c_ as hasContextMenu, c$ as initialFilterEditorDraft, d0 as intentOf, d1 as movesColumn, d2 as movesGroupBy, d3 as nextFocusForKey, d4 as parseFilterOperand, d5 as resolveColumnConstraints, d6 as resolveColumnFilterMenu, d7 as resolveDropBefore, d8 as resolveKeyboardDropTarget, d9 as revertColumnSize, da as selectAllState, db as sizeColumnToContent, dc as toConditionsDraft, dd as toValuesDraft, de as totalColumnWidth, df as visibleFilterOptions } from './filterEditor-9hncygVf.js';
3
3
 
4
4
  /** Where an arrow, Home or End key moves a menu's focus. */
5
5
  type MenuMove = "next" | "previous" | "first" | "last";
package/dist/renderer.js CHANGED
@@ -44,7 +44,7 @@ import {
44
44
  totalColumnWidth,
45
45
  touchesColumn,
46
46
  visibleFilterOptions
47
- } from "./chunk-NA6KXHPE.js";
47
+ } from "./chunk-AHDALZCY.js";
48
48
 
49
49
  // src/menu/navigation.ts
50
50
  function startIndex(count, from, move) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridkitjs/core",
3
- "version": "0.0.0-dev-20261112195815",
3
+ "version": "0.0.0-dev-20261112200523",
4
4
  "description": "Framework-agnostic data-grid logic: column resolution, alignment and sizing.",
5
5
  "license": "MIT",
6
6
  "author": "Blagoja Blazhevski",