@ishibashi0112/spreadsheet-grid 1.12.0 → 1.14.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.
Files changed (54) hide show
  1. package/API_REFERENCE.md +223 -13
  2. package/README.md +4 -2
  3. package/dist/GridShell.d.ts +1 -1
  4. package/dist/ai/useGridAgentTools.d.ts +8 -0
  5. package/dist/ai.cjs +1 -1
  6. package/dist/ai.d.ts +4 -0
  7. package/dist/ai.js +186 -125
  8. package/dist/common.d.ts +1 -1
  9. package/dist/features/diffView.d.ts +2 -0
  10. package/dist/features/rangeDecorations.d.ts +2 -0
  11. package/dist/features/types.d.ts +17 -0
  12. package/dist/hooks/useGridStore.d.ts +1 -1
  13. package/dist/hooks/useServerSideRowModel.d.ts +2 -1
  14. package/dist/index.cjs +13 -12
  15. package/dist/index.js +4387 -4042
  16. package/dist/lite/createSpreadsheetGrid-Bn5cneMS.js +5440 -0
  17. package/dist/lite/createSpreadsheetGrid-Di5iNqyu.cjs +13 -0
  18. package/dist/lite/createSpreadsheetGrid.cjs +1 -1
  19. package/dist/lite/createSpreadsheetGrid.js +1 -1
  20. package/dist/lite/diffView-Dpyl8usm.cjs +1 -0
  21. package/dist/lite/diffView-mFClK416.js +68 -0
  22. package/dist/lite/features/diffView.cjs +1 -0
  23. package/dist/lite/features/diffView.js +2 -0
  24. package/dist/lite/features/rangeDecorations.cjs +1 -0
  25. package/dist/lite/features/rangeDecorations.js +2 -0
  26. package/dist/lite/features/rowDrag.cjs +1 -1
  27. package/dist/lite/features/rowDrag.js +1 -1
  28. package/dist/lite/features/serverSide.cjs +1 -1
  29. package/dist/lite/features/serverSide.js +1 -1
  30. package/dist/lite/rangeDecorations-wiKlfXLc.js +40 -0
  31. package/dist/lite/rangeDecorations-wnAx2LgH.cjs +1 -0
  32. package/dist/lite/rowDrag-Cn5fud6W.cjs +1 -0
  33. package/dist/lite/{rowDrag-DVqgwSaj.js → rowDrag-e6TC1gsM.js} +19 -18
  34. package/dist/lite/{serverSide-CLb4dLUK.js → serverSide-BWZPpSkL.js} +1 -0
  35. package/dist/lite/serverSide-BXmZ_co8.cjs +1 -0
  36. package/dist/lite.cjs +1 -1
  37. package/dist/lite.d.ts +2 -0
  38. package/dist/lite.js +19 -17
  39. package/dist/style.css +1 -1
  40. package/dist/style.layer.css +1 -1
  41. package/dist/themes/astryx.css +4 -0
  42. package/dist/themes/heroui.css +4 -0
  43. package/dist/themes/mantine.css +4 -0
  44. package/dist/themes/shadcn.css +4 -0
  45. package/dist/view/DefaultGridBottomBar.d.ts +3 -1
  46. package/dist/view/GridBodyLayer.d.ts +8 -1
  47. package/dist/view/GridDiffBar.d.ts +13 -0
  48. package/dist/view/GridRangeDecorations.d.ts +9 -0
  49. package/package.json +2 -2
  50. package/skills/spreadsheet-grid/SKILL.md +6 -2
  51. package/dist/lite/createSpreadsheetGrid-C2k5e4f7.js +0 -5185
  52. package/dist/lite/createSpreadsheetGrid-D3TsGHNb.cjs +0 -12
  53. package/dist/lite/rowDrag--lPuW0-D.cjs +0 -1
  54. package/dist/lite/serverSide-COYBN6Pt.cjs +0 -1
package/dist/common.d.ts CHANGED
@@ -2,6 +2,6 @@ export { numberFormatter } from '@ishibashi0112/spreadsheet-grid-core/internal/l
2
2
  export { numberParser } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/valueParsers';
3
3
  export { restoreColumnsFromState } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/gridState';
4
4
  export { preloadGridPopups } from './view/lazyPopups.js';
5
- export type { SpreadsheetGridProps, GridColumn, GridColumnPinned, GridColumnEditor, EditorCommitDirection, EditorEnterMove, CellEditorContext, GridSelectEditorOption, GridSelectLoadOptionsParams, GridSelectFillRowContext, GridValidationMode, CellValidationContext, CellValidationResult, GridInvalidCell, EditorCommitResult, GridChanges, GridChangedRow, GridChangesSummary, GridChangesSavedTarget, GridAddedRow, GridRemovedRow, GridTrackChangesOptions, GridTreeDataOptions, GridTreeRow, CellTreeContext, CellTreeState, TreeRowOpenChangeParams, GridRevealRowOptions, GridRowKey, GridAggFuncName, GridAggFuncParams, GridAggFunc, GridGroupRow, GridSelectFilterOption, GetFilterOptionsParams, GetFilterOptionsResult, ColumnFilterTypeOption, ColumnFilterUiType, CellRenderContext, HeaderRenderContext, GridColumnGroup, GridColumnGroupCollapsible, ColumnGroupHeaderRenderContext, ColumnGroupOpenChangeParams, GridExportColumnGroup, CellStyleContext, CanEditCellContext, GridConditionalFormat, RowStyleContext, DetailRowOptions, GridClassNames, GridSlotProps, GridFrameworkTypes, ReactGridTypes, DetailRowRenderContext, CellDetailContext, LabelRowOptions, LabelRowRenderContext, GridLabelRow, LabelRowSortMode, TotalRowOptions, TotalRowCellContext, TotalRowCellKind, FillHandleOptions, GridFillValueParams, GridFillDirection, GridFillKind, RowDragContext, RowMoveParams, RowDropParams, GridCellRef, GridCellEventParams, GridCellDoubleClickParams, CellValueFormatter, CellValueFormatterParams, SpreadsheetGridSlotContext, SpreadsheetGridDerivedSummary, SpreadsheetGridSelectionStats, GridLocaleText, GridLocaleTextTemplate, GridVerticalAlign, GridTextEditorEnterKey, GlobalFilterStatus, GridSelectionAggregates, CellCoord, CellRange, GridSelection, GridSortState, GridSortEntry, GridSortDirection, ColumnFilterValue, GridFilterState, SetColumnFilterValue, NumberColumnFilterValue, NumberSetColumnFilterValue, ParsedNumberFilter, TextSetColumnFilterValue, ParsedTextFilter, DateSetColumnFilterValue, ParsedDateFilter, DateFilterPreset, DateFilterPresetOption, CustomDateFilterPreset, DateFilterPresetRange, FilterDateInputContext, TextColumnFilterValue, DateColumnFilterValue, SelectColumnFilterValue, CustomColumnFilterValue, ServerSideDataSource, ServerSideQuery, ServerSideGetRowsParams, ServerSideGetRowsResult, ServerSideLoadErrorParams, ServerSideCellChange, ServerSideRowUpdate, ServerSideUpdateRowsParams, ServerSideUpdateRowsResult, ServerSideWriteErrorParams, RowModel, SpreadsheetGridHandle, RowSelectionModel, RowSelectionMode, ScrollAlign, GridScrollPosition, GridScrollEventParams, CsvExportScope, CsvExportOptions, GridExportOptions, GridExportCell, GridExportData, GridState, GridStatePatch, GridColumnState, GridDensity, GridTheme, UndoRedoState, GridMotion, GridPopupContainer, GridGlobalFilterMatch, GridPasteSkippedCell, GridPasteSkippedParams, GridExcelShortcutsOptions, GridNewRowOptions, GridApplyRowsOptions, GridPinnedRowPosition, FindOptions, FindChangeParams, GridFindOpenOptions, GridFindReplaceResult, GridDataBarFormat, GridColorScaleFormat, GridChipTone, GridChipSpec, GridChipMap, AutoSizeColumnsMode, GridContextMenuTarget, GridContextMenuParams, GridContextMenuItem, GridContextMenuActionItem, GridContextMenuLabelItem, GridContextMenuSeparatorItem, GridContextMenuCustomItem, ScrollHintOptions, ScrollHintTrigger, ScrollHintRenderArgs, } from './model/gridTypes.js';
5
+ export type { SpreadsheetGridProps, GridColumn, GridColumnPinned, GridColumnEditor, EditorCommitDirection, EditorEnterMove, CellEditorContext, GridSelectEditorOption, GridSelectLoadOptionsParams, GridSelectFillRowContext, GridValidationMode, CellValidationContext, CellValidationResult, GridInvalidCell, EditorCommitResult, GridChanges, GridChangedRow, GridChangesSummary, GridChangesSavedTarget, GridAddedRow, GridRemovedRow, GridTrackChangesOptions, GridRangeDecoration, GridTreeDataOptions, GridTreeRow, CellTreeContext, CellTreeState, TreeRowOpenChangeParams, GridRevealRowOptions, GridRowKey, GridAggFuncName, GridAggFuncParams, GridAggFunc, GridGroupRow, GridSelectFilterOption, GetFilterOptionsParams, GetFilterOptionsResult, ColumnFilterTypeOption, ColumnFilterUiType, CellRenderContext, HeaderRenderContext, GridColumnGroup, GridColumnGroupCollapsible, ColumnGroupHeaderRenderContext, ColumnGroupOpenChangeParams, GridExportColumnGroup, CellStyleContext, CanEditCellContext, GridConditionalFormat, RowStyleContext, DetailRowOptions, GridClassNames, GridSlotProps, GridFrameworkTypes, ReactGridTypes, DetailRowRenderContext, CellDetailContext, LabelRowOptions, LabelRowRenderContext, GridLabelRow, LabelRowSortMode, TotalRowOptions, TotalRowCellContext, TotalRowCellKind, FillHandleOptions, GridFillValueParams, GridFillDirection, GridFillKind, RowDragContext, RowMoveParams, RowDropParams, GridCellRef, GridCellEventParams, GridCellDoubleClickParams, CellValueFormatter, CellValueFormatterParams, SpreadsheetGridSlotContext, SpreadsheetGridDerivedSummary, SpreadsheetGridSelectionStats, GridLocaleText, GridLocaleTextTemplate, GridVerticalAlign, GridTextEditorEnterKey, GlobalFilterStatus, GridSelectionAggregates, CellCoord, CellRange, GridSelection, GridSortState, GridSortEntry, GridSortDirection, ColumnFilterValue, GridFilterState, SetColumnFilterValue, NumberColumnFilterValue, NumberSetColumnFilterValue, ParsedNumberFilter, TextSetColumnFilterValue, ParsedTextFilter, DateSetColumnFilterValue, ParsedDateFilter, DateFilterPreset, DateFilterPresetOption, CustomDateFilterPreset, DateFilterPresetRange, FilterDateInputContext, TextColumnFilterValue, DateColumnFilterValue, SelectColumnFilterValue, CustomColumnFilterValue, ServerSideDataSource, ServerSideQuery, ServerSideGetRowsParams, ServerSideGetRowsResult, ServerSideLoadErrorParams, ServerSideCellChange, ServerSideRowUpdate, ServerSideUpdateRowsParams, ServerSideUpdateRowsResult, ServerSideWriteErrorParams, RowModel, SpreadsheetGridHandle, RowSelectionModel, RowSelectionMode, ScrollAlign, GridScrollPosition, GridScrollEventParams, CsvExportScope, CsvExportOptions, GridExportOptions, GridExportCell, GridExportData, GridState, GridStatePatch, GridColumnState, GridDensity, GridTheme, UndoRedoState, GridMotion, GridPopupContainer, GridGlobalFilterMatch, GridPasteSkippedCell, GridPasteSkippedParams, GridExcelShortcutsOptions, GridNewRowOptions, GridApplyRowsOptions, GridCellValueEdit, GridCellValueSkip, GridCellValueSkipReason, GridCellValueMarked, GridSetCellValuesOptions, GridSetCellValuesResult, GridRowCounts, GridPinnedRowPosition, FindOptions, FindChangeParams, GridFindOpenOptions, GridFindReplaceResult, GridDataBarFormat, GridColorScaleFormat, GridChipTone, GridChipSpec, GridChipMap, AutoSizeColumnsMode, GridContextMenuTarget, GridContextMenuParams, GridContextMenuItem, GridContextMenuActionItem, GridContextMenuLabelItem, GridContextMenuSeparatorItem, GridContextMenuCustomItem, ScrollHintOptions, ScrollHintTrigger, ScrollHintRenderArgs, } from './model/gridTypes.js';
6
6
  export type { NumberFormatterOptions } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/valueFormatters';
7
7
  export type { NumberParserOptions } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/valueParsers';
@@ -0,0 +1,2 @@
1
+ import type { GridFeature } from './types.js';
2
+ export declare const diffViewFeature: GridFeature<"diffView">;
@@ -0,0 +1,2 @@
1
+ import type { GridFeature } from './types.js';
2
+ export declare const rangeDecorationsFeature: GridFeature<"rangeDecorations">;
@@ -13,6 +13,8 @@ import type { DateRolloverStore } from '@ishibashi0112/spreadsheet-grid-core/int
13
13
  import type { RowOrder } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/filtering';
14
14
  import type { buildRevertMenuItems, describeUnsavedCell, formatUnsavedSummary } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/changeTracking';
15
15
  import type { ResolvedGridLocaleText } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText';
16
+ import type { createRangeDecorationResolver } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/rangeDecorations';
17
+ import type { describeChangeNavTarget, describeDiffCell, formatDiffOriginalText, formatDiffSummaryParts, nextChangeNavAnnouncement } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/diffView';
16
18
  import type { resolveNewRowPlaceholder } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/newRow';
17
19
  import type { GridUiAction } from '@ishibashi0112/spreadsheet-grid-core/internal/model/gridActions';
18
20
  import type { ColumnPane, GridPaneLayout } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/geometry';
@@ -28,6 +30,8 @@ import type { SearchSelectCellEditor } from '../editors/SearchSelectCellEditor.j
28
30
  import type { DateTimeCellEditor } from '../editors/DateTimeCellEditor.js';
29
31
  import type { MultiSelectCellEditor } from '../editors/MultiSelectCellEditor.js';
30
32
  import type { GridMultiSelectChips } from '../view/GridMultiSelectChips.js';
33
+ import type { GridRangeDecorationFrames } from '../view/GridRangeDecorations.js';
34
+ import type { GridDiffBarChip } from '../view/GridDiffBar.js';
31
35
  import type { resolveMultiSelectChipLabels, splitRangesByChips } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/multiSelect';
32
36
  import type { GridTreeAggregateValue, GridTreeCellPrefix } from '../view/GridTreeCell.js';
33
37
  import type { GridBodyLabelRow } from '../view/GridBodyLabelRow.js';
@@ -176,6 +180,7 @@ export type RowDragFeatureArgs<T> = Omit<UseRowDragControllerArgs, 'getRowDragLa
176
180
  resolveRowKey: (row: T, index: number) => GridRowKey;
177
181
  hasRowKeys: boolean;
178
182
  localeTexts: ResolvedGridLocaleText;
183
+ blockedByRemovedRows?: boolean | undefined;
179
184
  };
180
185
  export type RowDragFeatureResult<T> = {
181
186
  renderHandleCell: (row: T, rowIndex: number) => ReactNode;
@@ -305,6 +310,18 @@ export type ReactGridFeatures = {
305
310
  formatUnsavedSummary: typeof formatUnsavedSummary;
306
311
  buildRevertMenuItems: typeof buildRevertMenuItems;
307
312
  } | undefined;
313
+ diffView?: NonNullable<GridCoreFeatures['diffView']> & FeatureLocaleDefaults & {
314
+ describeDiffCell: typeof describeDiffCell;
315
+ formatDiffOriginalText: typeof formatDiffOriginalText;
316
+ formatDiffSummaryParts: typeof formatDiffSummaryParts;
317
+ describeChangeNavTarget: typeof describeChangeNavTarget;
318
+ nextChangeNavAnnouncement: typeof nextChangeNavAnnouncement;
319
+ DiffBarChip: typeof GridDiffBarChip;
320
+ } | undefined;
321
+ rangeDecorations?: {
322
+ createRangeDecorationResolver: typeof createRangeDecorationResolver;
323
+ RangeDecorationFrames: typeof GridRangeDecorationFrames;
324
+ } | undefined;
308
325
  excelShortcuts?: NonNullable<GridCoreFeatures['excelShortcuts']> | undefined;
309
326
  newRow?: NonNullable<GridCoreFeatures['newRow']> & FeatureLocaleDefaults & {
310
327
  resolveNewRowPlaceholder: typeof resolveNewRowPlaceholder;
@@ -2,6 +2,6 @@ import { type GridStore, type GridViewState, type Updater } from '@ishibashi0112
2
2
  import type { GridUiState } from '../model/gridTypes.js';
3
3
  export declare function useGridStore(store: GridStore): [GridUiState, GridStore['dispatch']];
4
4
  export type GridViewStateSetters = {
5
- [K in Exclude<keyof GridViewState, 'maxBodyPx' | 'newRowDraft'> as `set${Capitalize<K>}`]-?: (next: Updater<Exclude<GridViewState[K], undefined>>) => void;
5
+ [K in Exclude<keyof GridViewState, 'maxBodyPx' | 'newRowDraft' | 'changeNavRowKey' | 'changeNavActiveCell' | 'changeNavAnnouncement'> as `set${Capitalize<K>}`]-?: (next: Updater<Exclude<GridViewState[K], undefined>>) => void;
6
6
  };
7
7
  export declare function useGridViewState(store: GridStore): [GridViewState, GridViewStateSetters];
@@ -11,8 +11,9 @@ export type UseServerSideRowModelResult<T> = {
11
11
  refresh: () => void;
12
12
  loadError: ServerSideLoadErrorState | null;
13
13
  retryFailedBlocks: () => void;
14
+ isLoading: () => boolean;
14
15
  canUpdateRows: boolean;
15
- applyCellEdits: (edits: ServerSideCellEditInput<T>[]) => number;
16
+ applyCellEdits: (edits: ServerSideCellEditInput<T>[], onSettled?: (saved: boolean) => void) => number;
16
17
  writeError: ServerSideWriteErrorState | null;
17
18
  refetching: boolean;
18
19
  };