@ricsam/formula-engine 0.2.8 → 0.2.9

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 (101) hide show
  1. package/README.md +1 -3
  2. package/dist/cjs/core/engine.cjs +515 -166
  3. package/dist/cjs/core/engine.cjs.map +3 -3
  4. package/dist/cjs/core/managers/dependency-manager.cjs.map +2 -2
  5. package/dist/cjs/core/managers/evaluation-manager.cjs.map +1 -1
  6. package/dist/cjs/core/mutation-invalidation.cjs +241 -0
  7. package/dist/cjs/core/mutation-invalidation.cjs.map +10 -0
  8. package/dist/cjs/lib.cjs +2 -13
  9. package/dist/cjs/lib.cjs.map +3 -3
  10. package/dist/cjs/package.json +1 -1
  11. package/dist/mjs/core/engine.mjs +529 -207
  12. package/dist/mjs/core/engine.mjs.map +3 -3
  13. package/dist/mjs/core/managers/dependency-manager.mjs.map +2 -2
  14. package/dist/mjs/core/managers/evaluation-manager.mjs.map +1 -1
  15. package/dist/mjs/core/mutation-invalidation.mjs +201 -0
  16. package/dist/mjs/core/mutation-invalidation.mjs.map +10 -0
  17. package/dist/mjs/lib.mjs +2 -13
  18. package/dist/mjs/lib.mjs.map +3 -3
  19. package/dist/mjs/package.json +1 -1
  20. package/dist/types/core/engine.d.ts +17 -135
  21. package/dist/types/core/managers/dependency-manager.d.ts +1 -1
  22. package/dist/types/core/managers/evaluation-manager.d.ts +1 -1
  23. package/dist/types/core/mutation-invalidation.d.ts +46 -0
  24. package/dist/types/lib.d.ts +0 -8
  25. package/package.json +1 -1
  26. package/dist/cjs/core/commands/command-executor.cjs +0 -149
  27. package/dist/cjs/core/commands/command-executor.cjs.map +0 -10
  28. package/dist/cjs/core/commands/content-commands.cjs +0 -857
  29. package/dist/cjs/core/commands/content-commands.cjs.map +0 -10
  30. package/dist/cjs/core/commands/metadata-commands.cjs +0 -160
  31. package/dist/cjs/core/commands/metadata-commands.cjs.map +0 -10
  32. package/dist/cjs/core/commands/named-expression-commands.cjs +0 -363
  33. package/dist/cjs/core/commands/named-expression-commands.cjs.map +0 -10
  34. package/dist/cjs/core/commands/structure-commands.cjs +0 -696
  35. package/dist/cjs/core/commands/structure-commands.cjs.map +0 -10
  36. package/dist/cjs/core/commands/style-commands.cjs +0 -229
  37. package/dist/cjs/core/commands/style-commands.cjs.map +0 -10
  38. package/dist/cjs/core/commands/table-commands.cjs +0 -495
  39. package/dist/cjs/core/commands/table-commands.cjs.map +0 -10
  40. package/dist/cjs/core/commands/types.cjs +0 -99
  41. package/dist/cjs/core/commands/types.cjs.map +0 -10
  42. package/dist/cjs/core/managers/schema-manager.cjs +0 -374
  43. package/dist/cjs/core/managers/schema-manager.cjs.map +0 -10
  44. package/dist/cjs/core/schema/cell-orm.cjs +0 -76
  45. package/dist/cjs/core/schema/cell-orm.cjs.map +0 -10
  46. package/dist/cjs/core/schema/grid-orm.cjs +0 -125
  47. package/dist/cjs/core/schema/grid-orm.cjs.map +0 -10
  48. package/dist/cjs/core/schema/schema-builder.cjs +0 -74
  49. package/dist/cjs/core/schema/schema-builder.cjs.map +0 -10
  50. package/dist/cjs/core/schema/schema-helpers.cjs +0 -200
  51. package/dist/cjs/core/schema/schema-helpers.cjs.map +0 -10
  52. package/dist/cjs/core/schema/schema.cjs +0 -91
  53. package/dist/cjs/core/schema/schema.cjs.map +0 -10
  54. package/dist/cjs/core/schema/table-orm.cjs +0 -189
  55. package/dist/cjs/core/schema/table-orm.cjs.map +0 -10
  56. package/dist/mjs/core/commands/command-executor.mjs +0 -109
  57. package/dist/mjs/core/commands/command-executor.mjs.map +0 -10
  58. package/dist/mjs/core/commands/content-commands.mjs +0 -821
  59. package/dist/mjs/core/commands/content-commands.mjs.map +0 -10
  60. package/dist/mjs/core/commands/metadata-commands.mjs +0 -120
  61. package/dist/mjs/core/commands/metadata-commands.mjs.map +0 -10
  62. package/dist/mjs/core/commands/named-expression-commands.mjs +0 -323
  63. package/dist/mjs/core/commands/named-expression-commands.mjs.map +0 -10
  64. package/dist/mjs/core/commands/structure-commands.mjs +0 -661
  65. package/dist/mjs/core/commands/structure-commands.mjs.map +0 -10
  66. package/dist/mjs/core/commands/style-commands.mjs +0 -189
  67. package/dist/mjs/core/commands/style-commands.mjs.map +0 -10
  68. package/dist/mjs/core/commands/table-commands.mjs +0 -459
  69. package/dist/mjs/core/commands/table-commands.mjs.map +0 -10
  70. package/dist/mjs/core/commands/types.mjs +0 -59
  71. package/dist/mjs/core/commands/types.mjs.map +0 -10
  72. package/dist/mjs/core/managers/schema-manager.mjs +0 -334
  73. package/dist/mjs/core/managers/schema-manager.mjs.map +0 -10
  74. package/dist/mjs/core/schema/cell-orm.mjs +0 -35
  75. package/dist/mjs/core/schema/cell-orm.mjs.map +0 -10
  76. package/dist/mjs/core/schema/grid-orm.mjs +0 -84
  77. package/dist/mjs/core/schema/grid-orm.mjs.map +0 -10
  78. package/dist/mjs/core/schema/schema-builder.mjs +0 -34
  79. package/dist/mjs/core/schema/schema-builder.mjs.map +0 -10
  80. package/dist/mjs/core/schema/schema-helpers.mjs +0 -160
  81. package/dist/mjs/core/schema/schema-helpers.mjs.map +0 -10
  82. package/dist/mjs/core/schema/schema.mjs +0 -51
  83. package/dist/mjs/core/schema/schema.mjs.map +0 -10
  84. package/dist/mjs/core/schema/table-orm.mjs +0 -156
  85. package/dist/mjs/core/schema/table-orm.mjs.map +0 -10
  86. package/dist/types/core/commands/command-executor.d.ts +0 -81
  87. package/dist/types/core/commands/content-commands.d.ts +0 -172
  88. package/dist/types/core/commands/metadata-commands.d.ts +0 -55
  89. package/dist/types/core/commands/named-expression-commands.d.ts +0 -130
  90. package/dist/types/core/commands/structure-commands.d.ts +0 -155
  91. package/dist/types/core/commands/style-commands.d.ts +0 -76
  92. package/dist/types/core/commands/table-commands.d.ts +0 -119
  93. package/dist/types/core/commands/types.d.ts +0 -143
  94. package/dist/types/core/managers/schema-manager.d.ts +0 -142
  95. package/dist/types/core/schema/cell-orm.d.ts +0 -33
  96. package/dist/types/core/schema/grid-orm.d.ts +0 -63
  97. package/dist/types/core/schema/schema-builder.d.ts +0 -16
  98. package/dist/types/core/schema/schema-helpers.d.ts +0 -49
  99. package/dist/types/core/schema/schema.d.ts +0 -167
  100. package/dist/types/core/schema/schema.type-test.d.ts +0 -1
  101. package/dist/types/core/schema/table-orm.d.ts +0 -46
@@ -1,172 +0,0 @@
1
- /**
2
- * Content Commands - Commands that modify cell/sheet content
3
- *
4
- * These commands all require re-evaluation after execution.
5
- */
6
- import type { WorkbookManager } from "../managers/workbook-manager";
7
- import type { CopyManager } from "../managers/copy-manager";
8
- import type { CellAddress, CopyCellsOptions, RangeAddress, SerializedCellValue } from "../types";
9
- import type { EngineCommand, EngineAction, MutationInvalidation } from "./types";
10
- /**
11
- * Command to set a single cell's content.
12
- */
13
- export declare class SetCellContentCommand implements EngineCommand {
14
- private workbookManager;
15
- private address;
16
- private newContent;
17
- readonly requiresReevaluation = true;
18
- private previousValue;
19
- private hadPreviousValue;
20
- private executeFootprint;
21
- private undoFootprint;
22
- constructor(workbookManager: WorkbookManager, address: CellAddress, newContent: SerializedCellValue);
23
- execute(): void;
24
- undo(): void;
25
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
26
- toAction(): EngineAction;
27
- }
28
- /**
29
- * Command to set an entire sheet's content.
30
- */
31
- export declare class SetSheetContentCommand implements EngineCommand {
32
- private workbookManager;
33
- private opts;
34
- private newContent;
35
- readonly requiresReevaluation = true;
36
- private previousContent;
37
- private executeFootprint;
38
- private undoFootprint;
39
- constructor(workbookManager: WorkbookManager, opts: {
40
- workbookName: string;
41
- sheetName: string;
42
- }, newContent: Map<string, SerializedCellValue>);
43
- execute(): void;
44
- undo(): void;
45
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
46
- toAction(): EngineAction;
47
- }
48
- /**
49
- * Command to clear a range of cells.
50
- */
51
- export declare class ClearRangeCommand implements EngineCommand {
52
- private workbookManager;
53
- private address;
54
- readonly requiresReevaluation = true;
55
- private clearedCells;
56
- private executeFootprint;
57
- private undoFootprint;
58
- constructor(workbookManager: WorkbookManager, address: RangeAddress);
59
- execute(): void;
60
- undo(): void;
61
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
62
- toAction(): EngineAction;
63
- }
64
- /**
65
- * Command to paste cells.
66
- */
67
- export declare class PasteCellsCommand implements EngineCommand {
68
- private workbookManager;
69
- private copyManager;
70
- private source;
71
- private target;
72
- private options;
73
- readonly requiresReevaluation = true;
74
- private targetSnapshots;
75
- private sourceSnapshots;
76
- private executeFootprint;
77
- private undoFootprint;
78
- private executedContents;
79
- constructor(workbookManager: WorkbookManager, copyManager: CopyManager, source: CellAddress[], target: CellAddress, options: CopyCellsOptions);
80
- execute(): void;
81
- undo(): void;
82
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
83
- toAction(): EngineAction;
84
- }
85
- /**
86
- * Command to fill areas with a seed range.
87
- */
88
- export declare class FillAreasCommand implements EngineCommand {
89
- private workbookManager;
90
- private copyManager;
91
- private seedRange;
92
- private targetRanges;
93
- private options;
94
- readonly requiresReevaluation = true;
95
- private targetSnapshots;
96
- private executeFootprint;
97
- private undoFootprint;
98
- private executedContents;
99
- constructor(workbookManager: WorkbookManager, copyManager: CopyManager, seedRange: RangeAddress, targetRanges: RangeAddress[], options: CopyCellsOptions);
100
- execute(): void;
101
- undo(): void;
102
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
103
- toAction(): EngineAction;
104
- }
105
- /**
106
- * Command to move a single cell.
107
- */
108
- export declare class MoveCellCommand implements EngineCommand {
109
- private workbookManager;
110
- private copyManager;
111
- private source;
112
- private target;
113
- readonly requiresReevaluation = true;
114
- private sourceSnapshot;
115
- private targetSnapshot;
116
- private executeFootprint;
117
- private undoFootprint;
118
- private executedContents;
119
- constructor(workbookManager: WorkbookManager, copyManager: CopyManager, source: CellAddress, target: CellAddress);
120
- execute(): void;
121
- undo(): void;
122
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
123
- toAction(): EngineAction;
124
- }
125
- /**
126
- * Command to move a range of cells.
127
- */
128
- export declare class MoveRangeCommand implements EngineCommand {
129
- private workbookManager;
130
- private copyManager;
131
- private sourceRange;
132
- private target;
133
- readonly requiresReevaluation = true;
134
- private sourceSnapshots;
135
- private targetSnapshots;
136
- private executeFootprint;
137
- private undoFootprint;
138
- private executedContents;
139
- constructor(workbookManager: WorkbookManager, copyManager: CopyManager, sourceRange: RangeAddress, target: CellAddress);
140
- execute(): void;
141
- undo(): void;
142
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
143
- toAction(): EngineAction;
144
- }
145
- /**
146
- * Command to auto-fill ranges based on a seed pattern.
147
- * Captures the entire affected area for undo.
148
- */
149
- export declare class AutoFillCommand implements EngineCommand {
150
- private workbookManager;
151
- private styleManager;
152
- private autoFillManager;
153
- private opts;
154
- private seedRange;
155
- private fillRanges;
156
- private direction;
157
- readonly requiresReevaluation = true;
158
- private previousContent;
159
- private previousMetadata;
160
- private executeFootprint;
161
- private undoFootprint;
162
- private touchedAddresses;
163
- private executedContents;
164
- constructor(workbookManager: WorkbookManager, styleManager: import("../managers/style-manager").StyleManager, autoFillManager: import("../autofill-utils").AutoFill, opts: {
165
- sheetName: string;
166
- workbookName: string;
167
- }, seedRange: import("../types").SpreadsheetRange, fillRanges: import("../types").SpreadsheetRange[], direction: import("@ricsam/selection-manager").FillDirection);
168
- execute(): void;
169
- undo(): void;
170
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
171
- toAction(): EngineAction;
172
- }
@@ -1,55 +0,0 @@
1
- /**
2
- * Metadata Commands - Commands that modify cell/sheet/workbook metadata
3
- *
4
- * These commands do NOT require re-evaluation after execution.
5
- * They only affect metadata, not cell values or formulas.
6
- */
7
- import type { WorkbookManager } from "../managers/workbook-manager";
8
- import type { CellAddress } from "../types";
9
- import type { EngineCommand, EngineAction } from "./types";
10
- /**
11
- * Command to set cell metadata.
12
- */
13
- export declare class SetCellMetadataCommand<TMetadata = unknown> implements EngineCommand {
14
- private workbookManager;
15
- private address;
16
- private newMetadata;
17
- readonly requiresReevaluation = false;
18
- private previousMetadata;
19
- private hadPreviousMetadata;
20
- constructor(workbookManager: WorkbookManager, address: CellAddress, newMetadata: TMetadata | undefined);
21
- execute(): void;
22
- undo(): void;
23
- toAction(): EngineAction;
24
- }
25
- /**
26
- * Command to set sheet metadata.
27
- */
28
- export declare class SetSheetMetadataCommand<TMetadata = unknown> implements EngineCommand {
29
- private workbookManager;
30
- private opts;
31
- private newMetadata;
32
- readonly requiresReevaluation = false;
33
- private previousMetadata;
34
- constructor(workbookManager: WorkbookManager, opts: {
35
- workbookName: string;
36
- sheetName: string;
37
- }, newMetadata: TMetadata);
38
- execute(): void;
39
- undo(): void;
40
- toAction(): EngineAction;
41
- }
42
- /**
43
- * Command to set workbook metadata.
44
- */
45
- export declare class SetWorkbookMetadataCommand<TMetadata = unknown> implements EngineCommand {
46
- private workbookManager;
47
- private workbookName;
48
- private newMetadata;
49
- readonly requiresReevaluation = false;
50
- private previousMetadata;
51
- constructor(workbookManager: WorkbookManager, workbookName: string, newMetadata: TMetadata);
52
- execute(): void;
53
- undo(): void;
54
- toAction(): EngineAction;
55
- }
@@ -1,130 +0,0 @@
1
- /**
2
- * Named Expression Commands - Commands that modify named expressions
3
- *
4
- * These commands all require re-evaluation after execution.
5
- */
6
- import type { NamedExpressionManager } from "../managers/named-expression-manager";
7
- import type { WorkbookManager } from "../managers/workbook-manager";
8
- import type { NamedExpression } from "../types";
9
- import type { EngineCommand, EngineAction, MutationInvalidation } from "./types";
10
- /**
11
- * Dependencies needed for named expression commands.
12
- */
13
- export interface NamedExpressionCommandDeps {
14
- namedExpressionManager: NamedExpressionManager;
15
- workbookManager: WorkbookManager;
16
- renameNamedExpressionInFormula: (formula: string, oldName: string, newName: string) => string;
17
- }
18
- /**
19
- * Command to add a named expression.
20
- */
21
- export declare class AddNamedExpressionCommand implements EngineCommand {
22
- private deps;
23
- private opts;
24
- readonly requiresReevaluation = true;
25
- private executeFootprint;
26
- private undoFootprint;
27
- constructor(deps: NamedExpressionCommandDeps, opts: {
28
- expression: string;
29
- expressionName: string;
30
- sheetName?: string;
31
- workbookName?: string;
32
- });
33
- execute(): void;
34
- undo(): void;
35
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
36
- toAction(): EngineAction;
37
- }
38
- /**
39
- * Command to remove a named expression.
40
- */
41
- export declare class RemoveNamedExpressionCommand implements EngineCommand {
42
- private deps;
43
- private opts;
44
- readonly requiresReevaluation = true;
45
- private removedExpression;
46
- private executeFootprint;
47
- private undoFootprint;
48
- constructor(deps: NamedExpressionCommandDeps, opts: {
49
- expressionName: string;
50
- sheetName?: string;
51
- workbookName?: string;
52
- });
53
- execute(): void;
54
- undo(): void;
55
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
56
- toAction(): EngineAction;
57
- }
58
- /**
59
- * Command to update a named expression.
60
- */
61
- export declare class UpdateNamedExpressionCommand implements EngineCommand {
62
- private deps;
63
- private opts;
64
- readonly requiresReevaluation = true;
65
- private previousExpression;
66
- private executeFootprint;
67
- private undoFootprint;
68
- constructor(deps: NamedExpressionCommandDeps, opts: {
69
- expression: string;
70
- expressionName: string;
71
- sheetName?: string;
72
- workbookName?: string;
73
- });
74
- execute(): void;
75
- undo(): void;
76
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
77
- toAction(): EngineAction;
78
- }
79
- /**
80
- * Command to rename a named expression.
81
- */
82
- export declare class RenameNamedExpressionCommand implements EngineCommand {
83
- private deps;
84
- private opts;
85
- readonly requiresReevaluation = true;
86
- private executeFootprint;
87
- private undoFootprint;
88
- constructor(deps: NamedExpressionCommandDeps, opts: {
89
- expressionName: string;
90
- sheetName?: string;
91
- workbookName?: string;
92
- newName: string;
93
- });
94
- execute(): void;
95
- undo(): void;
96
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
97
- toAction(): EngineAction;
98
- }
99
- /**
100
- * Options for setNamedExpressions command.
101
- */
102
- type SetNamedExpressionsOpts = ({
103
- type: "global";
104
- } | {
105
- type: "sheet";
106
- sheetName: string;
107
- workbookName: string;
108
- } | {
109
- type: "workbook";
110
- workbookName: string;
111
- }) & {
112
- expressions: Map<string, NamedExpression>;
113
- };
114
- /**
115
- * Command to set named expressions (replace all at a scope).
116
- */
117
- export declare class SetNamedExpressionsCommand implements EngineCommand {
118
- private deps;
119
- private opts;
120
- readonly requiresReevaluation = true;
121
- private previousExpressions;
122
- private executeFootprint;
123
- private undoFootprint;
124
- constructor(deps: NamedExpressionCommandDeps, opts: SetNamedExpressionsOpts);
125
- execute(): void;
126
- undo(): void;
127
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
128
- toAction(): EngineAction;
129
- }
130
- export {};
@@ -1,155 +0,0 @@
1
- /**
2
- * Structure Commands - Commands that modify workbook/sheet structure
3
- *
4
- * These commands all require re-evaluation after execution.
5
- */
6
- import type { SchemaManager } from "../managers/schema-manager";
7
- import type { NamedExpressionManager } from "../managers/named-expression-manager";
8
- import type { ReferenceManager } from "../managers/reference-manager";
9
- import type { StyleManager } from "../managers/style-manager";
10
- import type { TableManager } from "../managers/table-manager";
11
- import type { WorkbookManager } from "../managers/workbook-manager";
12
- import type { EngineAction, EngineCommand, MutationInvalidation } from "./types";
13
- /**
14
- * Dependencies needed for structure commands.
15
- */
16
- export interface StructureCommandDeps {
17
- workbookManager: WorkbookManager;
18
- namedExpressionManager: NamedExpressionManager;
19
- tableManager: TableManager;
20
- styleManager: StyleManager;
21
- referenceManager: ReferenceManager;
22
- apiSchemaManager: SchemaManager;
23
- renameSheetInFormula: (opts: {
24
- formula: string;
25
- oldSheetName: string;
26
- newSheetName: string;
27
- }) => string;
28
- renameWorkbookInFormula: (opts: {
29
- formula: string;
30
- oldWorkbookName: string;
31
- newWorkbookName: string;
32
- }) => string;
33
- }
34
- /**
35
- * Command to add a workbook.
36
- */
37
- export declare class AddWorkbookCommand implements EngineCommand {
38
- private deps;
39
- private workbookName;
40
- readonly requiresReevaluation = true;
41
- private executeFootprint;
42
- private undoFootprint;
43
- constructor(deps: StructureCommandDeps, workbookName: string);
44
- execute(): void;
45
- undo(): void;
46
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
47
- toAction(): EngineAction;
48
- }
49
- /**
50
- * Command to remove a workbook.
51
- */
52
- export declare class RemoveWorkbookCommand implements EngineCommand {
53
- private deps;
54
- private workbookName;
55
- readonly requiresReevaluation = true;
56
- private snapshot;
57
- private executeFootprint;
58
- private undoFootprint;
59
- constructor(deps: StructureCommandDeps, workbookName: string);
60
- execute(): void;
61
- undo(): void;
62
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
63
- toAction(): EngineAction;
64
- }
65
- /**
66
- * Command to rename a workbook.
67
- */
68
- export declare class RenameWorkbookCommand implements EngineCommand {
69
- private deps;
70
- private workbookName;
71
- private newWorkbookName;
72
- readonly requiresReevaluation = true;
73
- private snapshot;
74
- private executeFootprint;
75
- private undoFootprint;
76
- constructor(deps: StructureCommandDeps, workbookName: string, newWorkbookName: string);
77
- execute(): void;
78
- undo(): void;
79
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
80
- toAction(): EngineAction;
81
- }
82
- /**
83
- * Command to clone a workbook.
84
- * Undo simply removes the cloned workbook.
85
- */
86
- export declare class CloneWorkbookCommand implements EngineCommand {
87
- private deps;
88
- private fromWorkbookName;
89
- private toWorkbookName;
90
- readonly requiresReevaluation = true;
91
- private executeFootprint;
92
- private undoFootprint;
93
- constructor(deps: StructureCommandDeps, fromWorkbookName: string, toWorkbookName: string);
94
- execute(): void;
95
- undo(): void;
96
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
97
- toAction(): EngineAction;
98
- }
99
- /**
100
- * Command to add a sheet.
101
- */
102
- export declare class AddSheetCommand implements EngineCommand {
103
- private deps;
104
- private opts;
105
- readonly requiresReevaluation = true;
106
- private executeFootprint;
107
- private undoFootprint;
108
- constructor(deps: StructureCommandDeps, opts: {
109
- workbookName: string;
110
- sheetName: string;
111
- });
112
- execute(): void;
113
- undo(): void;
114
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
115
- toAction(): EngineAction;
116
- }
117
- /**
118
- * Command to remove a sheet.
119
- */
120
- export declare class RemoveSheetCommand implements EngineCommand {
121
- private deps;
122
- private opts;
123
- readonly requiresReevaluation = true;
124
- private snapshot;
125
- private executeFootprint;
126
- private undoFootprint;
127
- constructor(deps: StructureCommandDeps, opts: {
128
- workbookName: string;
129
- sheetName: string;
130
- });
131
- execute(): void;
132
- undo(): void;
133
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
134
- toAction(): EngineAction;
135
- }
136
- /**
137
- * Command to rename a sheet.
138
- */
139
- export declare class RenameSheetCommand implements EngineCommand {
140
- private deps;
141
- private opts;
142
- readonly requiresReevaluation = true;
143
- private snapshot;
144
- private executeFootprint;
145
- private undoFootprint;
146
- constructor(deps: StructureCommandDeps, opts: {
147
- workbookName: string;
148
- sheetName: string;
149
- newSheetName: string;
150
- });
151
- execute(): void;
152
- undo(): void;
153
- getInvalidationFootprint(phase: "execute" | "undo"): MutationInvalidation;
154
- toAction(): EngineAction;
155
- }
@@ -1,76 +0,0 @@
1
- /**
2
- * Style Commands - Commands that modify conditional and direct cell styles
3
- *
4
- * These commands do NOT require re-evaluation after execution.
5
- * They only affect styling, not cell values or formulas.
6
- */
7
- import type { StyleManager } from "../managers/style-manager";
8
- import type { ConditionalStyle, DirectCellStyle, RangeAddress } from "../types";
9
- import type { EngineCommand, EngineAction } from "./types";
10
- /**
11
- * Command to add a conditional style.
12
- */
13
- export declare class AddConditionalStyleCommand implements EngineCommand {
14
- private styleManager;
15
- private style;
16
- readonly requiresReevaluation = false;
17
- private addedIndex;
18
- constructor(styleManager: StyleManager, style: ConditionalStyle);
19
- execute(): void;
20
- undo(): void;
21
- toAction(): EngineAction;
22
- }
23
- /**
24
- * Command to remove a conditional style.
25
- */
26
- export declare class RemoveConditionalStyleCommand implements EngineCommand {
27
- private styleManager;
28
- private workbookName;
29
- private index;
30
- readonly requiresReevaluation = false;
31
- private removedStyle;
32
- constructor(styleManager: StyleManager, workbookName: string, index: number);
33
- execute(): void;
34
- undo(): void;
35
- toAction(): EngineAction;
36
- }
37
- /**
38
- * Command to add a direct cell style.
39
- */
40
- export declare class AddCellStyleCommand implements EngineCommand {
41
- private styleManager;
42
- private style;
43
- readonly requiresReevaluation = false;
44
- private addedIndex;
45
- constructor(styleManager: StyleManager, style: DirectCellStyle);
46
- execute(): void;
47
- undo(): void;
48
- toAction(): EngineAction;
49
- }
50
- /**
51
- * Command to remove a direct cell style.
52
- */
53
- export declare class RemoveCellStyleCommand implements EngineCommand {
54
- private styleManager;
55
- private workbookName;
56
- private index;
57
- readonly requiresReevaluation = false;
58
- private removedStyle;
59
- constructor(styleManager: StyleManager, workbookName: string, index: number);
60
- execute(): void;
61
- undo(): void;
62
- toAction(): EngineAction;
63
- }
64
- /**
65
- * Command to clear cell styles in a range.
66
- */
67
- export declare class ClearCellStylesCommand implements EngineCommand {
68
- private styleManager;
69
- private range;
70
- readonly requiresReevaluation = false;
71
- private snapshot;
72
- constructor(styleManager: StyleManager, range: RangeAddress);
73
- execute(): void;
74
- undo(): void;
75
- toAction(): EngineAction;
76
- }