@searsuite/sear-plugin-cell-fill 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 +29 -0
- package/README.md +8 -2
- package/dist/CellFillMatrix.d.ts +24 -0
- package/dist/CellFillMatrix.d.ts.map +1 -0
- package/dist/CellFillMatrix.js +52 -0
- package/dist/CellFillMatrix.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/sheetPlugin/cellFill/CellFillCommandRange.d.ts +11 -0
- package/dist/sheetPlugin/cellFill/CellFillCommandRange.d.ts.map +1 -0
- package/dist/sheetPlugin/cellFill/CellFillCommandRange.js +39 -0
- package/dist/sheetPlugin/cellFill/CellFillCommandRange.js.map +1 -0
- package/dist/sheetPlugin/cellFill/SheetCellFillCommands.d.ts +21 -0
- package/dist/sheetPlugin/cellFill/SheetCellFillCommands.d.ts.map +1 -0
- package/dist/sheetPlugin/cellFill/SheetCellFillCommands.js +27 -0
- package/dist/sheetPlugin/cellFill/SheetCellFillCommands.js.map +1 -0
- package/dist/sheetPlugin/cellFill/SheetCellFillDataField.d.ts +7 -0
- package/dist/sheetPlugin/cellFill/SheetCellFillDataField.d.ts.map +1 -0
- package/dist/sheetPlugin/cellFill/SheetCellFillDataField.js +15 -0
- package/dist/sheetPlugin/cellFill/SheetCellFillDataField.js.map +1 -0
- package/dist/sheetPlugin/cellFill/SheetCellFillPlugin.d.ts +66 -0
- package/dist/sheetPlugin/cellFill/SheetCellFillPlugin.d.ts.map +1 -0
- package/dist/sheetPlugin/cellFill/SheetCellFillPlugin.js +192 -0
- package/dist/sheetPlugin/cellFill/SheetCellFillPlugin.js.map +1 -0
- package/package.json +51 -3
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
|
-
#
|
|
1
|
+
# @searsuite/sear-plugin-cell-fill
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Adds sparse Sheet fill state, commands, visual projections, collaboration, and export.
|
|
4
|
+
|
|
5
|
+
[API reference](https://searsuite.com/docs/ref/#sear-plugin-cell-fill)
|
|
6
|
+
|
|
7
|
+
## Repository
|
|
8
|
+
|
|
9
|
+
Repository: [searsuite/packages/sear-plugin-cell-fill](https://github.com/SearSuite/searsuite/tree/main/packages/sear-plugin-cell-fill).
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CSRMatrix } from '@searsuite/sear-domain-matrix';
|
|
2
|
+
import { type HexColor } from '@searsuite/sear-foundation-utils';
|
|
3
|
+
/** A persisted cell fill color represented as a CSS-compatible hexadecimal color. */
|
|
4
|
+
export type SheetCellFill = HexColor;
|
|
5
|
+
/** Returns whether a value is a supported cell fill color. */
|
|
6
|
+
export declare function isSheetCellFill(value: unknown): value is SheetCellFill;
|
|
7
|
+
/** Asserts that a value is a supported cell fill color. */
|
|
8
|
+
export declare function assertSheetCellFill(value: unknown): asserts value is SheetCellFill;
|
|
9
|
+
/** Serialized sparse entries accepted by CellFillMatrix. */
|
|
10
|
+
export interface CellFillMatrixData {
|
|
11
|
+
readonly data: (string | null)[];
|
|
12
|
+
readonly indices: number[];
|
|
13
|
+
readonly indptr: number[];
|
|
14
|
+
}
|
|
15
|
+
/** Sparse cell-fill matrix. An absent cell has no fill. */
|
|
16
|
+
export declare class CellFillMatrix extends CSRMatrix<SheetCellFill | null> {
|
|
17
|
+
/** Creates a sparse cell-fill matrix from serialized CSR data. */
|
|
18
|
+
constructor(data?: CellFillMatrixData, shape?: [number, number]);
|
|
19
|
+
/** Stores a fill color. Null is represented by removing the sparse entry. */
|
|
20
|
+
setItem(row: number, col: number, value: SheetCellFill | null): this;
|
|
21
|
+
/** Stores a fill color through the CSR API, removing the entry for null. */
|
|
22
|
+
addItem(row: number, col: number, value: SheetCellFill | null): this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
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CellFillMatrix = void 0;
|
|
4
|
+
exports.isSheetCellFill = isSheetCellFill;
|
|
5
|
+
exports.assertSheetCellFill = assertSheetCellFill;
|
|
6
|
+
const sear_foundation_error_1 = require("@searsuite/sear-foundation-error");
|
|
7
|
+
const sear_domain_matrix_1 = require("@searsuite/sear-domain-matrix");
|
|
8
|
+
/** Returns whether a value is a supported cell fill color. */
|
|
9
|
+
function isSheetCellFill(value) {
|
|
10
|
+
return typeof value === 'string' && /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(value);
|
|
11
|
+
}
|
|
12
|
+
/** Asserts that a value is a supported cell fill color. */
|
|
13
|
+
function assertSheetCellFill(value) {
|
|
14
|
+
if (!isSheetCellFill(value)) {
|
|
15
|
+
throw new sear_foundation_error_1.SearError('Sheet cell fill must be a hexadecimal color such as #ffffff.');
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/** Sparse cell-fill matrix. An absent cell has no fill. */
|
|
19
|
+
class CellFillMatrix extends sear_domain_matrix_1.CSRMatrix {
|
|
20
|
+
/** Creates a sparse cell-fill matrix from serialized CSR data. */
|
|
21
|
+
constructor(data = { data: [], indices: [0], indptr: [] }, shape = [0, 0]) {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
super(void 0, shape);
|
|
24
|
+
for (let row = 0; row < shape[0]; row += 1) {
|
|
25
|
+
const start = (_a = data.indices[row]) !== null && _a !== void 0 ? _a : 0;
|
|
26
|
+
const end = (_b = data.indices[row + 1]) !== null && _b !== void 0 ? _b : start;
|
|
27
|
+
for (let index = start; index < end; index += 1) {
|
|
28
|
+
const value = data.data[index];
|
|
29
|
+
const column = data.indptr[index];
|
|
30
|
+
if (column !== void 0 && value !== null) {
|
|
31
|
+
assertSheetCellFill(value);
|
|
32
|
+
super.addItem(row, column, value);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/** Stores a fill color. Null is represented by removing the sparse entry. */
|
|
38
|
+
setItem(row, col, value) {
|
|
39
|
+
if (value === null) {
|
|
40
|
+
this.removeItem(row, col);
|
|
41
|
+
return this;
|
|
42
|
+
}
|
|
43
|
+
assertSheetCellFill(value);
|
|
44
|
+
return super.addItem(row, col, value);
|
|
45
|
+
}
|
|
46
|
+
/** Stores a fill color through the CSR API, removing the entry for null. */
|
|
47
|
+
addItem(row, col, value) {
|
|
48
|
+
return this.setItem(row, col, value);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.CellFillMatrix = CellFillMatrix;
|
|
52
|
+
//# sourceMappingURL=CellFillMatrix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CellFillMatrix.js","sourceRoot":"","sources":["../src/CellFillMatrix.ts"],"names":[],"mappings":";;;AAQA,0CAEC;AAGD,kDAIC;AAjBD,4EAA6D;AAC7D,sEAA0D;AAM1D,8DAA8D;AAC9D,SAAgB,eAAe,CAAC,KAAc;IAC5C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,oEAAoE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACvH,CAAC;AAED,2DAA2D;AAC3D,SAAgB,mBAAmB,CAAC,KAAc;IAChD,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,iCAAS,CAAC,8DAA8D,CAAC,CAAC;IACtF,CAAC;AACH,CAAC;AASD,2DAA2D;AAC3D,MAAa,cAAe,SAAQ,8BAA+B;IACjE,kEAAkE;IAClE,YACE,OAA2B,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EACjE,QAA0B,CAAC,CAAC,EAAE,CAAC,CAAC;;QAEhC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAA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C,CAAC;IACvC,CAAC;CACF;AAnCD,wCAmCC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sparse Sheet fill state, commands, visual projection, collaboration, and export.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export { CellFillMatrix, type CellFillMatrixData, type SheetCellFill, assertSheetCellFill, isSheetCellFill, } from './CellFillMatrix';
|
|
7
|
+
export { SheetCellFillPlugin, type SheetCellFillPluginState } from './sheetPlugin/cellFill/SheetCellFillPlugin';
|
|
8
|
+
export { SetRangeCellFillCommand, registerSheetCellFillCommand, createSetRangeCellFillOperations, type SheetSetRangeCellFillInput, type SheetCellFillCommandDataSource, } from './sheetPlugin/cellFill/SheetCellFillCommands';
|
|
9
|
+
export { readSheetCellFills, SheetCellFillFieldKey } from './sheetPlugin/cellFill/SheetCellFillDataField';
|
|
10
|
+
//# 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,EACL,cAAc,EACd,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,mBAAmB,EACnB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAChH,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,gCAAgC,EAChC,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,GACpC,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Sparse Sheet fill state, commands, visual projection, collaboration, and export.
|
|
4
|
+
*
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.SheetCellFillFieldKey = exports.readSheetCellFills = exports.createSetRangeCellFillOperations = exports.registerSheetCellFillCommand = exports.SetRangeCellFillCommand = exports.SheetCellFillPlugin = exports.isSheetCellFill = exports.assertSheetCellFill = exports.CellFillMatrix = void 0;
|
|
9
|
+
var CellFillMatrix_1 = require("./CellFillMatrix");
|
|
10
|
+
Object.defineProperty(exports, "CellFillMatrix", { enumerable: true, get: function () { return CellFillMatrix_1.CellFillMatrix; } });
|
|
11
|
+
Object.defineProperty(exports, "assertSheetCellFill", { enumerable: true, get: function () { return CellFillMatrix_1.assertSheetCellFill; } });
|
|
12
|
+
Object.defineProperty(exports, "isSheetCellFill", { enumerable: true, get: function () { return CellFillMatrix_1.isSheetCellFill; } });
|
|
13
|
+
var SheetCellFillPlugin_1 = require("./sheetPlugin/cellFill/SheetCellFillPlugin");
|
|
14
|
+
Object.defineProperty(exports, "SheetCellFillPlugin", { enumerable: true, get: function () { return SheetCellFillPlugin_1.SheetCellFillPlugin; } });
|
|
15
|
+
var SheetCellFillCommands_1 = require("./sheetPlugin/cellFill/SheetCellFillCommands");
|
|
16
|
+
Object.defineProperty(exports, "SetRangeCellFillCommand", { enumerable: true, get: function () { return SheetCellFillCommands_1.SetRangeCellFillCommand; } });
|
|
17
|
+
Object.defineProperty(exports, "registerSheetCellFillCommand", { enumerable: true, get: function () { return SheetCellFillCommands_1.registerSheetCellFillCommand; } });
|
|
18
|
+
Object.defineProperty(exports, "createSetRangeCellFillOperations", { enumerable: true, get: function () { return SheetCellFillCommands_1.createSetRangeCellFillOperations; } });
|
|
19
|
+
var SheetCellFillDataField_1 = require("./sheetPlugin/cellFill/SheetCellFillDataField");
|
|
20
|
+
Object.defineProperty(exports, "readSheetCellFills", { enumerable: true, get: function () { return SheetCellFillDataField_1.readSheetCellFills; } });
|
|
21
|
+
Object.defineProperty(exports, "SheetCellFillFieldKey", { enumerable: true, get: function () { return SheetCellFillDataField_1.SheetCellFillFieldKey; } });
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,mDAM0B;AALxB,gHAAA,cAAc,OAAA;AAGd,qHAAA,mBAAmB,OAAA;AACnB,iHAAA,eAAe,OAAA;AAEjB,kFAAgH;AAAvG,0HAAA,mBAAmB,OAAA;AAC5B,sFAMsD;AALpD,gIAAA,uBAAuB,OAAA;AACvB,qIAAA,4BAA4B,OAAA;AAC5B,yIAAA,gCAAgC,OAAA;AAIlC,wFAA0G;AAAjG,4HAAA,kBAAkB,OAAA;AAAE,+HAAA,qBAAqB,OAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type SheetRangeBounds, type SheetRangeInput } from '@searsuite/sear-assembly-commands';
|
|
2
|
+
/** Sheet dimensions required by a cell-fill range command. */
|
|
3
|
+
export interface CellFillCommandRangeDataSource {
|
|
4
|
+
getRowCount(): number;
|
|
5
|
+
getColumnCount(): number;
|
|
6
|
+
}
|
|
7
|
+
/** Normalizes and validates a cell-fill range. */
|
|
8
|
+
export declare function normalizeCellFillCommandRange(input: SheetRangeInput, dataSource: CellFillCommandRangeDataSource): SheetRangeBounds;
|
|
9
|
+
/** Visits every cell in a normalized inclusive range. */
|
|
10
|
+
export declare function forEachCellFillCell(range: SheetRangeBounds, callback: (row: number, column: number) => void): void;
|
|
11
|
+
//# sourceMappingURL=CellFillCommandRange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CellFillCommandRange.d.ts","sourceRoot":"","sources":["../../../src/sheetPlugin/cellFill/CellFillCommandRange.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAErH,8DAA8D;AAC9D,MAAM,WAAW,8BAA8B;IAC7C,WAAW,IAAI,MAAM,CAAC;IACtB,cAAc,IAAI,MAAM,CAAC;CAC1B;AAED,kDAAkD;AAClD,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,eAAe,EACtB,UAAU,EAAE,8BAA8B,GACzC,gBAAgB,CASlB;AAED,yDAAyD;AACzD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAIlH"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeCellFillCommandRange = normalizeCellFillCommandRange;
|
|
4
|
+
exports.forEachCellFillCell = forEachCellFillCell;
|
|
5
|
+
const sear_foundation_error_1 = require("@searsuite/sear-foundation-error");
|
|
6
|
+
/** Normalizes and validates a cell-fill range. */
|
|
7
|
+
function normalizeCellFillCommandRange(input, dataSource) {
|
|
8
|
+
const anchor = normalizePoint(input.anchor, 'range anchor');
|
|
9
|
+
const focus = normalizePoint(input.focus, 'range focus');
|
|
10
|
+
assertPointInBounds(anchor, dataSource, 'range anchor');
|
|
11
|
+
assertPointInBounds(focus, dataSource, 'range focus');
|
|
12
|
+
return {
|
|
13
|
+
start: [Math.min(anchor[0], focus[0]), Math.min(anchor[1], focus[1])],
|
|
14
|
+
end: [Math.max(anchor[0], focus[0]), Math.max(anchor[1], focus[1])],
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/** Visits every cell in a normalized inclusive range. */
|
|
18
|
+
function forEachCellFillCell(range, callback) {
|
|
19
|
+
for (let row = range.start[0]; row <= range.end[0]; row += 1) {
|
|
20
|
+
for (let column = range.start[1]; column <= range.end[1]; column += 1)
|
|
21
|
+
callback(row, column);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function normalizePoint(point, label) {
|
|
25
|
+
if (!Array.isArray(point) || point.length !== 2)
|
|
26
|
+
throw new sear_foundation_error_1.SearError(`${label} must be a [row, column] coordinate.`);
|
|
27
|
+
const [row, column] = point;
|
|
28
|
+
if (!Number.isInteger(row) || !Number.isInteger(column)) {
|
|
29
|
+
throw new sear_foundation_error_1.SearError(`${label} must contain integer coordinates.`);
|
|
30
|
+
}
|
|
31
|
+
return [row, column];
|
|
32
|
+
}
|
|
33
|
+
function assertPointInBounds(point, dataSource, label) {
|
|
34
|
+
const [row, column] = point;
|
|
35
|
+
if (row < 0 || column < 0 || row >= dataSource.getRowCount() || column >= dataSource.getColumnCount()) {
|
|
36
|
+
throw new sear_foundation_error_1.SearError(`${label} is outside current sheet bounds.`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=CellFillCommandRange.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CellFillCommandRange.js","sourceRoot":"","sources":["../../../src/sheetPlugin/cellFill/CellFillCommandRange.ts"],"names":[],"mappings":";;AAUA,sEAYC;AAGD,kDAIC;AA7BD,4EAA6D;AAS7D,kDAAkD;AAClD,SAAgB,6BAA6B,CAC3C,KAAsB,EACtB,UAA0C;IAE1C,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5D,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACzD,mBAAmB,CAAC,MAAM,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACxD,mBAAmB,CAAC,KAAK,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;IACtD,OAAO;QACL,KAAK,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,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C,CAAC;AACvB,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAqB,EAAE,UAA0C,EAAE,KAAa;IAC3G,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC;IAC5B,IAAI,GAAG,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,WAAW,EAAE,IAAI,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE,EAAE,CAAC;QACtG,MAAM,IAAI,iCAAS,CAAC,GAAG,KAAK,mCAAmC,CAAC,CAAC;IACnE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SheetCommandBus, type SheetRangeInput } from '@searsuite/sear-assembly-commands';
|
|
2
|
+
import { type PluginKey } from '@searsuite/sear-assembly-plugin';
|
|
3
|
+
import { type UpdateCellOTOperation } from '@searsuite/sear-domain-ot';
|
|
4
|
+
import { type SheetCellFill } from '../../CellFillMatrix';
|
|
5
|
+
import { type CellFillCommandRangeDataSource } from './CellFillCommandRange';
|
|
6
|
+
/** Public command for setting or clearing cell fill in a range. */
|
|
7
|
+
export declare const SetRangeCellFillCommand: import("@searsuite/sear-assembly-commands").SheetCommandDefinition<SheetSetRangeCellFillInput, import("@searsuite/sear-assembly-commands").SheetCommandResult>;
|
|
8
|
+
/** Public input for setting or clearing cell fill in a range. */
|
|
9
|
+
export interface SheetSetRangeCellFillInput extends SheetRangeInput {
|
|
10
|
+
readonly fill: SheetCellFill | null;
|
|
11
|
+
}
|
|
12
|
+
/** State access required by the cell-fill command. */
|
|
13
|
+
export interface SheetCellFillCommandDataSource extends CellFillCommandRangeDataSource {
|
|
14
|
+
readonly target: PluginKey;
|
|
15
|
+
readCellFill(row: number, column: number): SheetCellFill | null;
|
|
16
|
+
}
|
|
17
|
+
/** Registers the cell-fill command owned by SheetCellFillPlugin. */
|
|
18
|
+
export declare function registerSheetCellFillCommand(commands: SheetCommandBus, dataSource: SheetCellFillCommandDataSource): void;
|
|
19
|
+
/** Creates sparse update operations for a cell-fill range. */
|
|
20
|
+
export declare function createSetRangeCellFillOperations(input: SheetSetRangeCellFillInput, dataSource: SheetCellFillCommandDataSource): UpdateCellOTOperation<SheetCellFill>[];
|
|
21
|
+
//# sourceMappingURL=SheetCellFillCommands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SheetCellFillCommands.d.ts","sourceRoot":"","sources":["../../../src/sheetPlugin/cellFill/SheetCellFillCommands.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,eAAe,EAEf,KAAK,eAAe,EACrB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAA+B,KAAK,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACpG,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAGL,KAAK,8BAA8B,EACpC,MAAM,wBAAwB,CAAC;AAEhC,mEAAmE;AACnE,eAAO,MAAM,uBAAuB,gKAAsE,CAAC;AAE3G,iEAAiE;AACjE,MAAM,WAAW,0BAA2B,SAAQ,eAAe;IACjE,QAAQ,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;CACrC;AAED,sDAAsD;AACtD,MAAM,WAAW,8BAA+B,SAAQ,8BAA8B;IACpF,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAAC;CACjE;AAED,oEAAoE;AACpE,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,eAAe,EACzB,UAAU,EAAE,8BAA8B,GACzC,IAAI,CASN;AAED,8DAA8D;AAC9D,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,0BAA0B,EACjC,UAAU,EAAE,8BAA8B,GACzC,qBAAqB,CAAC,aAAa,CAAC,EAAE,CAQxC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetRangeCellFillCommand = void 0;
|
|
4
|
+
exports.registerSheetCellFillCommand = registerSheetCellFillCommand;
|
|
5
|
+
exports.createSetRangeCellFillOperations = createSetRangeCellFillOperations;
|
|
6
|
+
const sear_assembly_commands_1 = require("@searsuite/sear-assembly-commands");
|
|
7
|
+
const sear_domain_ot_1 = require("@searsuite/sear-domain-ot");
|
|
8
|
+
const CellFillMatrix_1 = require("../../CellFillMatrix");
|
|
9
|
+
const CellFillCommandRange_1 = require("./CellFillCommandRange");
|
|
10
|
+
/** Public command for setting or clearing cell fill in a range. */
|
|
11
|
+
exports.SetRangeCellFillCommand = (0, sear_assembly_commands_1.defineSheetCommand)('range.setCellFill');
|
|
12
|
+
/** Registers the cell-fill command owned by SheetCellFillPlugin. */
|
|
13
|
+
function registerSheetCellFillCommand(commands, dataSource) {
|
|
14
|
+
commands.register(exports.SetRangeCellFillCommand, (input) => new sear_assembly_commands_1.TransactionPipelineCommand(exports.SetRangeCellFillCommand.id, (0, sear_assembly_commands_1.createSheetTransaction)(dataSource.target, createSetRangeCellFillOperations(input, dataSource))));
|
|
15
|
+
}
|
|
16
|
+
/** Creates sparse update operations for a cell-fill range. */
|
|
17
|
+
function createSetRangeCellFillOperations(input, dataSource) {
|
|
18
|
+
if (input.fill !== null)
|
|
19
|
+
(0, CellFillMatrix_1.assertSheetCellFill)(input.fill);
|
|
20
|
+
const range = (0, CellFillCommandRange_1.normalizeCellFillCommandRange)(input, dataSource);
|
|
21
|
+
const operations = [];
|
|
22
|
+
(0, CellFillCommandRange_1.forEachCellFillCell)(range, (row, column) => {
|
|
23
|
+
operations.push((0, sear_domain_ot_1.createUpdateCellOTOperation)([row, column], input.fill, dataSource.readCellFill(row, column)));
|
|
24
|
+
});
|
|
25
|
+
return operations;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=SheetCellFillCommands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SheetCellFillCommands.js","sourceRoot":"","sources":["../../../src/sheetPlugin/cellFill/SheetCellFillCommands.ts"],"names":[],"mappings":";;;AA+BA,oEAYC;AAGD,4EAWC;AAzDD,8EAM2C;AAE3C,8DAAoG;AACpG,yDAA+E;AAC/E,iEAIgC;AAEhC,mEAAmE;AACtD,QAAA,uBAAuB,GAAG,IAAA,2CAAkB,EAA6B,mBAAmB,CAAC,CAAC;AAa3G,oEAAoE;AACpE,SAAgB,4BAA4B,CAC1C,QAAyB,EACzB,UAA0C;IAE1C,QAAQ,CAAC,QAAQ,CACf,+BAAuB,EACvB,CAAC,KAAK,EAAE,EAAE,CACR,IAAI,mDAA0B,CAC5B,+BAAuB,CAAC,EAAE,EAC1B,IAAA,+CAAsB,EAAC,UAAU,CAAC,MAAM,EAAE,gCAAgC,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAC/F,CACJ,CAAC;AACJ,CAAC;AAED,8DAA8D;AAC9D,SAAgB,gCAAgC,CAC9C,KAAiC,EACjC,UAA0C;IAE1C,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI;QAAE,IAAA,oCAAmB,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACzD,MAAM,KAAK,GAAG,IAAA,oDAA6B,EAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAC/D,MAAM,UAAU,GAA2C,EAAE,CAAC;IAC9D,IAAA,0CAAmB,EAAC,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;QACzC,UAAU,CAAC,IAAI,CAAC,IAAA,4CAA2B,EAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAChH,CAAC,CAAC,CAAC;IACH,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type DataEngine } from '@searsuite/sear-render-engine';
|
|
2
|
+
import { type CellFillMatrix } from '../../CellFillMatrix';
|
|
3
|
+
/** DataEngine field owned by SheetCellFillPlugin. */
|
|
4
|
+
export declare const SheetCellFillFieldKey = "sheet.cellFill";
|
|
5
|
+
/** Reads cell fills published by SheetCellFillPlugin. */
|
|
6
|
+
export declare function readSheetCellFills(dataEngine: DataEngine): CellFillMatrix | null;
|
|
7
|
+
//# sourceMappingURL=SheetCellFillDataField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SheetCellFillDataField.d.ts","sourceRoot":"","sources":["../../../src/sheetPlugin/cellFill/SheetCellFillDataField.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAA2B,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qDAAqD;AACrD,eAAO,MAAM,qBAAqB,mBAAmB,CAAC;AAEtD,yDAAyD;AACzD,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,cAAc,GAAG,IAAI,CAGhF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SheetCellFillFieldKey = void 0;
|
|
4
|
+
exports.readSheetCellFills = readSheetCellFills;
|
|
5
|
+
const sear_render_engine_1 = require("@searsuite/sear-render-engine");
|
|
6
|
+
/** DataEngine field owned by SheetCellFillPlugin. */
|
|
7
|
+
exports.SheetCellFillFieldKey = 'sheet.cellFill';
|
|
8
|
+
/** Reads cell fills published by SheetCellFillPlugin. */
|
|
9
|
+
function readSheetCellFills(dataEngine) {
|
|
10
|
+
var _a;
|
|
11
|
+
if (typeof dataEngine.readDataViewField !== 'function')
|
|
12
|
+
return null;
|
|
13
|
+
return (_a = dataEngine.readDataViewField(sear_render_engine_1.SheetDataFieldNamespace, exports.SheetCellFillFieldKey)) !== null && _a !== void 0 ? _a : null;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=SheetCellFillDataField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SheetCellFillDataField.js","sourceRoot":"","sources":["../../../src/sheetPlugin/cellFill/SheetCellFillDataField.ts"],"names":[],"mappings":";;;AAOA,gDAGC;AAVD,sEAAyF;AAGzF,qDAAqD;AACxC,QAAA,qBAAqB,GAAG,gBAAgB,CAAC;AAEtD,yDAAyD;AACzD,SAAgB,kBAAkB,CAAC,UAAsB;;IACvD,IAAI,OAAO,UAAU,CAAC,iBAAiB,KAAK,UAAU;QAAE,OAAO,IAAI,CAAC;IACpE,OAAO,MAAA,UAAU,CAAC,iBAAiB,CAAiB,4CAAuB,EAAE,6BAAqB,CAAC,mCAAI,IAAI,CAAC;AAC9G,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type SheetFormatTransferRegistry } from '@searsuite/sear-assembly-plugin';
|
|
2
|
+
import { SheetRangeMoveRegistry, SheetRangeReorderRegistry } from '@searsuite/sear-assembly-plugin';
|
|
3
|
+
import { type MatrixOTOperation } from '@searsuite/sear-domain-ot';
|
|
4
|
+
import { Plugin, PluginKey, type PluginDocumentStateContribution } from '@searsuite/sear-assembly-plugin';
|
|
5
|
+
import { Node } from '@searsuite/sear-render-node';
|
|
6
|
+
import { Transaction } from '@searsuite/sear-domain-transaction';
|
|
7
|
+
import { CellProperties, SheetCellVisualReaderRegistry } from '@searsuite/sear-render-registry';
|
|
8
|
+
import { SheetCommandBus } from '@searsuite/sear-assembly-commands';
|
|
9
|
+
import { CellFillMatrix } from '../../CellFillMatrix';
|
|
10
|
+
/** State owned by SheetCellFillPlugin. */
|
|
11
|
+
export interface SheetCellFillPluginState {
|
|
12
|
+
/** Sparse matrix containing explicit cell fill colors. */
|
|
13
|
+
cellFills: CellFillMatrix;
|
|
14
|
+
}
|
|
15
|
+
/** Plugin that owns cell fill data, commands, structural projections, and export. */
|
|
16
|
+
export declare class SheetCellFillPlugin extends Plugin<unknown, CellProperties, SheetCellFillPluginState> {
|
|
17
|
+
/** Fill state is data-only and does not use render-depth diagnostics. */
|
|
18
|
+
readonly warnOnDuplicateDepth = false;
|
|
19
|
+
/** Fill transactions share the registered MatrixOT algebra. */
|
|
20
|
+
readonly transactionOT: {
|
|
21
|
+
ownerId: string;
|
|
22
|
+
definition: import("@searsuite/sear-domain-ot").TransactionOTDefinition<MatrixOTOperation<unknown>>;
|
|
23
|
+
relations: import("@searsuite/sear-domain-ot").OTTransformRelation<MatrixOTOperation<unknown>, MatrixOTOperation<unknown>>[];
|
|
24
|
+
collaborative: boolean;
|
|
25
|
+
};
|
|
26
|
+
/** DI token for resolving the cell-fill plugin. */
|
|
27
|
+
static readonly symbol: symbol;
|
|
28
|
+
/** Stable plugin key shared by all cell-fill plugin instances. */
|
|
29
|
+
static readonly pluginKey: PluginKey;
|
|
30
|
+
/** Document-state export contribution for cell fills. */
|
|
31
|
+
static readonly documentState: PluginDocumentStateContribution<SheetCellFillPluginState, SheetCellFillPluginState>;
|
|
32
|
+
/** SheetCellFillPlugin owns its persisted state module. */
|
|
33
|
+
readonly documentState: PluginDocumentStateContribution<SheetCellFillPluginState, SheetCellFillPluginState>;
|
|
34
|
+
/** Fill follows direct updates and all sheet structure changes. */
|
|
35
|
+
interestedIn: string[];
|
|
36
|
+
/** Constructs the plugin around a shared sparse fill matrix. */
|
|
37
|
+
constructor(state: SheetCellFillPluginState);
|
|
38
|
+
/** Registers the cell-fill command owned by this plugin. */
|
|
39
|
+
registerCommands(commands: SheetCommandBus): void;
|
|
40
|
+
/** Contributes explicit fill colors to the shared Sheet cell visual pipeline. */
|
|
41
|
+
registerCellVisualReaders(registry: SheetCellVisualReaderRegistry): void;
|
|
42
|
+
/** Registers fill state for commands, projections, and collaboration. */
|
|
43
|
+
registerState(): {
|
|
44
|
+
key: PluginKey;
|
|
45
|
+
state: SheetCellFillPluginState;
|
|
46
|
+
dataEngine: {
|
|
47
|
+
dataView: {
|
|
48
|
+
viewKey: string;
|
|
49
|
+
fieldKey: string;
|
|
50
|
+
select: (state: SheetCellFillPluginState) => CellFillMatrix;
|
|
51
|
+
}[];
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
/** Contributes this owner's cell state to atomic range moves. */
|
|
55
|
+
/** Transfers only this owner's persisted formats. */
|
|
56
|
+
registerFormatTransfers(registry: SheetFormatTransferRegistry): void;
|
|
57
|
+
registerRangeMoves(registry: SheetRangeMoveRegistry): void;
|
|
58
|
+
registerRangeReorders(registry: SheetRangeReorderRegistry): void;
|
|
59
|
+
/** Applies direct fill and structural matrix operations. */
|
|
60
|
+
apply(pluginState: SheetCellFillPluginState, transaction: Transaction): SheetCellFillPluginState | null;
|
|
61
|
+
/** Cell-fill data has no render-time configuration. */
|
|
62
|
+
getPluginConfig(): null;
|
|
63
|
+
/** Cell-fill data contributes through grid cell properties, not scene nodes. */
|
|
64
|
+
render(): Node<CellProperties>[];
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=SheetCellFillPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SheetCellFillPlugin.d.ts","sourceRoot":"","sources":["../../../src/sheetPlugin/cellFill/SheetCellFillPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC/G,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAMpG,OAAO,EAcL,KAAK,iBAAiB,EAEvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAG1G,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACnD,OAAO,EAAE,WAA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AE,wBAAwB,EAAE,WAAW,EAAE,WAAW,GAAG,wBAAwB,GAAG,IAAI;IAW9G,uDAAuD;IAChD,eAAe,IAAI,IAAI;IAI9B,gFAAgF;IACzE,MAAM,IAAI,IAAI,CAAC,cAAc,CAAC,EAAE;CAGxC"}
|
|
@@ -0,0 +1,192 @@
|
|
|
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 SheetCellFillPlugin_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SheetCellFillPlugin = void 0;
|
|
11
|
+
const sear_assembly_plugin_1 = require("@searsuite/sear-assembly-plugin");
|
|
12
|
+
const sear_domain_matrix_1 = require("@searsuite/sear-domain-matrix");
|
|
13
|
+
const sear_domain_ot_1 = require("@searsuite/sear-domain-ot");
|
|
14
|
+
const sear_assembly_plugin_2 = require("@searsuite/sear-assembly-plugin");
|
|
15
|
+
const sear_domain_matrix_2 = require("@searsuite/sear-domain-matrix");
|
|
16
|
+
const sear_foundation_di_1 = require("@searsuite/sear-foundation-di");
|
|
17
|
+
const sear_render_engine_1 = require("@searsuite/sear-render-engine");
|
|
18
|
+
const CellFillMatrix_1 = require("../../CellFillMatrix");
|
|
19
|
+
const SheetCellFillCommands_1 = require("./SheetCellFillCommands");
|
|
20
|
+
const SheetCellFillDataField_1 = require("./SheetCellFillDataField");
|
|
21
|
+
const pluginKey = new sear_assembly_plugin_2.PluginKey('SheetCellFillPlugin');
|
|
22
|
+
/** Plugin that owns cell fill data, commands, structural projections, and export. */
|
|
23
|
+
let SheetCellFillPlugin = SheetCellFillPlugin_1 = class SheetCellFillPlugin extends sear_assembly_plugin_2.Plugin {
|
|
24
|
+
/** Constructs the plugin around a shared sparse fill matrix. */
|
|
25
|
+
constructor(state) {
|
|
26
|
+
super({ key: pluginKey, state });
|
|
27
|
+
/** Fill state is data-only and does not use render-depth diagnostics. */
|
|
28
|
+
this.warnOnDuplicateDepth = false;
|
|
29
|
+
/** Fill transactions share the registered MatrixOT algebra. */
|
|
30
|
+
this.transactionOT = {
|
|
31
|
+
ownerId: 'sheet.cellFill',
|
|
32
|
+
definition: sear_domain_ot_1.MatrixTransactionOT,
|
|
33
|
+
relations: [sear_domain_ot_1.MatrixTransactionOTRelation],
|
|
34
|
+
collaborative: true,
|
|
35
|
+
};
|
|
36
|
+
/** SheetCellFillPlugin owns its persisted state module. */
|
|
37
|
+
this.documentState = SheetCellFillPlugin_1.documentState;
|
|
38
|
+
/** Fill follows direct updates and all sheet structure changes. */
|
|
39
|
+
this.interestedIn = [
|
|
40
|
+
sear_domain_ot_1.MatrixOTActionName.UpdateCell,
|
|
41
|
+
sear_domain_ot_1.MatrixOTActionName.RowInsert,
|
|
42
|
+
sear_domain_ot_1.MatrixOTActionName.RowDelete,
|
|
43
|
+
sear_domain_ot_1.MatrixOTActionName.RowMove,
|
|
44
|
+
sear_domain_ot_1.MatrixOTActionName.ColInsert,
|
|
45
|
+
sear_domain_ot_1.MatrixOTActionName.ColDelete,
|
|
46
|
+
sear_domain_ot_1.MatrixOTActionName.ColMove,
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
/** Registers the cell-fill command owned by this plugin. */
|
|
50
|
+
registerCommands(commands) {
|
|
51
|
+
const plugin = this;
|
|
52
|
+
(0, SheetCellFillCommands_1.registerSheetCellFillCommand)(commands, {
|
|
53
|
+
target: this.key,
|
|
54
|
+
getRowCount: () => plugin.getState().cellFills.shape[0],
|
|
55
|
+
getColumnCount: () => plugin.getState().cellFills.shape[1],
|
|
56
|
+
readCellFill: (row, column) => plugin.getState().cellFills.getItem(row, column),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/** Contributes explicit fill colors to the shared Sheet cell visual pipeline. */
|
|
60
|
+
registerCellVisualReaders(registry) {
|
|
61
|
+
const plugin = this;
|
|
62
|
+
registry.register({
|
|
63
|
+
id: 'sheet.cell-fill',
|
|
64
|
+
properties: ['fill'],
|
|
65
|
+
read({ rowIndex, columnIndex }) {
|
|
66
|
+
const fill = plugin.getState().cellFills.getItem(rowIndex, columnIndex);
|
|
67
|
+
return fill == null ? {} : { fill };
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/** Registers fill state for commands, projections, and collaboration. */
|
|
72
|
+
registerState() {
|
|
73
|
+
return {
|
|
74
|
+
key: this.key,
|
|
75
|
+
state: this.getState(),
|
|
76
|
+
dataEngine: {
|
|
77
|
+
dataView: [
|
|
78
|
+
{
|
|
79
|
+
viewKey: sear_render_engine_1.SheetDataFieldNamespace,
|
|
80
|
+
fieldKey: SheetCellFillDataField_1.SheetCellFillFieldKey,
|
|
81
|
+
select: function selectSheetCellFills(state) {
|
|
82
|
+
return state.cellFills;
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/** Contributes this owner's cell state to atomic range moves. */
|
|
90
|
+
/** Transfers only this owner's persisted formats. */
|
|
91
|
+
registerFormatTransfers(registry) {
|
|
92
|
+
registry.register((0, sear_assembly_plugin_1.createMatrixFormatTransfer)('sheet.cellFill', this.key, () => this.getState().cellFills));
|
|
93
|
+
}
|
|
94
|
+
registerRangeMoves(registry) {
|
|
95
|
+
registry.register({
|
|
96
|
+
id: 'sheet.cellFill.rangeMove',
|
|
97
|
+
hasConflict: ({ source, destination }) => (0, sear_domain_matrix_1.hasMatrixRangeMoveConflict)(this.getState().cellFills, source, destination),
|
|
98
|
+
plan: ({ source, destination }) => [
|
|
99
|
+
{
|
|
100
|
+
target: this.key,
|
|
101
|
+
operations: (0, sear_domain_matrix_1.createMatrixRangeMoveOperations)(this.getState().cellFills, source, destination),
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
registerRangeReorders(registry) {
|
|
107
|
+
registry.register({
|
|
108
|
+
id: 'sheet.cellFill.rangeReorder',
|
|
109
|
+
plan: ({ range, destinationOf }) => [
|
|
110
|
+
{
|
|
111
|
+
target: this.key,
|
|
112
|
+
operations: (0, sear_domain_matrix_1.createMatrixRangeReorderOperations)(this.getState().cellFills, range, destinationOf),
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/** Applies direct fill and structural matrix operations. */
|
|
118
|
+
apply(pluginState, transaction) {
|
|
119
|
+
const operations = (0, sear_render_engine_1.createInvertibleProjectedOperations)(pluginState.cellFills, transaction.operations, (matrix, operation) => createCellFillOperation(matrix, operation, transaction.pluginKey === pluginKey));
|
|
120
|
+
if (operations.length === 0)
|
|
121
|
+
return null;
|
|
122
|
+
sear_domain_ot_1.MatrixOT.apply(pluginState.cellFills, operations);
|
|
123
|
+
return pluginState;
|
|
124
|
+
}
|
|
125
|
+
/** Cell-fill data has no render-time configuration. */
|
|
126
|
+
getPluginConfig() {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
/** Cell-fill data contributes through grid cell properties, not scene nodes. */
|
|
130
|
+
render() {
|
|
131
|
+
return [];
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
exports.SheetCellFillPlugin = SheetCellFillPlugin;
|
|
135
|
+
/** DI token for resolving the cell-fill plugin. */
|
|
136
|
+
SheetCellFillPlugin.symbol = Symbol.for('SheetCellFillPlugin');
|
|
137
|
+
/** Stable plugin key shared by all cell-fill plugin instances. */
|
|
138
|
+
SheetCellFillPlugin.pluginKey = pluginKey;
|
|
139
|
+
/** Document-state export contribution for cell fills. */
|
|
140
|
+
SheetCellFillPlugin.documentState = {
|
|
141
|
+
key: 'sheet.cellFills',
|
|
142
|
+
capture: (state) => ({ cellFills: state.cellFills.clone() }),
|
|
143
|
+
codec: {
|
|
144
|
+
key: 'sheet.cellFills',
|
|
145
|
+
serialize: (state) => (0, sear_domain_matrix_2.serializeSparseMatrix)(state.cellFills),
|
|
146
|
+
deserialize: (payload, path) => ({
|
|
147
|
+
cellFills: (0, sear_domain_matrix_2.deserializeSparseMatrix)(payload, CellFillMatrix_1.CellFillMatrix, path),
|
|
148
|
+
}),
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
exports.SheetCellFillPlugin = SheetCellFillPlugin = SheetCellFillPlugin_1 = __decorate([
|
|
152
|
+
(0, sear_foundation_di_1.Injectable)()
|
|
153
|
+
], SheetCellFillPlugin);
|
|
154
|
+
function createCellFillOperation(matrix, operation, direct) {
|
|
155
|
+
if ((0, sear_domain_ot_1.isUpdateCellOperation)(operation)) {
|
|
156
|
+
if (!direct)
|
|
157
|
+
return null;
|
|
158
|
+
const [row, col] = operation.p;
|
|
159
|
+
return (0, sear_domain_ot_1.createUpdateCellOTOperation)([row, col], operation.uc.value, operation.uc.prev === void 0 ? matrix.getItem(row, col) : operation.uc.prev);
|
|
160
|
+
}
|
|
161
|
+
if (!(0, sear_domain_ot_1.isMatrixStructureOperation)(operation))
|
|
162
|
+
return null;
|
|
163
|
+
if (sear_domain_ot_1.MatrixOTActionName.RowInsert in operation && operation.ri !== void 0)
|
|
164
|
+
return (0, sear_domain_ot_1.createInsertRowOTOperation)(operation.p, Array(matrix.shape[1]).fill(null));
|
|
165
|
+
if (sear_domain_ot_1.MatrixOTActionName.RowDelete in operation && operation.rd !== void 0)
|
|
166
|
+
return (0, sear_domain_ot_1.createDeleteRowOTOperation)(operation.p, readSparseRow(matrix, operation.p[0]));
|
|
167
|
+
if (sear_domain_ot_1.MatrixOTActionName.RowMove in operation && operation.rm !== void 0)
|
|
168
|
+
return (0, sear_domain_ot_1.createMoveRowOTOperation)(operation.p, operation.rm);
|
|
169
|
+
if (sear_domain_ot_1.MatrixOTActionName.ColInsert in operation && operation.ci !== void 0)
|
|
170
|
+
return (0, sear_domain_ot_1.createInsertColOTOperation)(operation.p, Array(matrix.shape[0]).fill(null));
|
|
171
|
+
if (sear_domain_ot_1.MatrixOTActionName.ColDelete in operation && operation.cd !== void 0)
|
|
172
|
+
return (0, sear_domain_ot_1.createDeleteColOTOperation)(operation.p, readSparseColumn(matrix, operation.p[0]));
|
|
173
|
+
if (sear_domain_ot_1.MatrixOTActionName.ColMove in operation && operation.cm !== void 0)
|
|
174
|
+
return (0, sear_domain_ot_1.createMoveColOTOperation)(operation.p, operation.cm);
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
function readSparseRow(matrix, rowIndex) {
|
|
178
|
+
const row = Array(matrix.shape[1]).fill(null);
|
|
179
|
+
matrix.forEachStoredInRow(rowIndex, (value, column) => {
|
|
180
|
+
row[column] = value;
|
|
181
|
+
});
|
|
182
|
+
return row;
|
|
183
|
+
}
|
|
184
|
+
function readSparseColumn(matrix, columnIndex) {
|
|
185
|
+
const column = Array(matrix.shape[0]).fill(null);
|
|
186
|
+
matrix.forEachStored((value, row, currentColumn) => {
|
|
187
|
+
if (currentColumn === columnIndex)
|
|
188
|
+
column[row] = value;
|
|
189
|
+
});
|
|
190
|
+
return column;
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=SheetCellFillPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SheetCellFillPlugin.js","sourceRoot":"","sources":["../../../src/sheetPlugin/cellFill/SheetCellFillPlugin.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,0EAA+G;AAE/G,sEAIuC;AACvC,8DAgBmC;AACnC,0EAA0G;AAC1G,sEAA+G;AAC/G,sEAA2D;AAI3D,sEAA6G;AAE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collaboration, and export.",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://searsuite.com/",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"searsuite",
|
|
9
|
+
"spreadsheet",
|
|
10
|
+
"cell-fill",
|
|
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-commands": "0.0.1",
|
|
20
|
+
"@searsuite/sear-domain-ot": "0.0.1",
|
|
21
|
+
"@searsuite/sear-foundation-di": "0.0.1",
|
|
22
|
+
"@searsuite/sear-domain-transaction": "0.0.1",
|
|
23
|
+
"@searsuite/sear-assembly-plugin": "0.0.1",
|
|
24
|
+
"@searsuite/sear-domain-matrix": "0.0.1",
|
|
25
|
+
"@searsuite/sear-foundation-error": "0.0.1",
|
|
26
|
+
"@searsuite/sear-foundation-utils": "0.0.1",
|
|
27
|
+
"@searsuite/sear-render-engine": "0.0.1",
|
|
28
|
+
"@searsuite/sear-render-registry": "0.0.1",
|
|
29
|
+
"@searsuite/sear-render-node": "0.0.1"
|
|
30
|
+
},
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"default": "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./package.json": "./package.json"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/SearSuite/searsuite.git",
|
|
41
|
+
"directory": "packages/sear-plugin-cell-fill"
|
|
42
|
+
},
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/SearSuite/searsuite/issues"
|
|
45
|
+
},
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=22"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "pnpm run clean && pnpm run compile",
|
|
51
|
+
"clean": "rimraf ./dist",
|
|
52
|
+
"compile": "tsc -p tsconfig.build.json"
|
|
53
|
+
}
|
|
6
54
|
}
|