@gridsheet/preact-core 3.0.0-rc.0 → 3.0.0-rc.10
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 +190 -0
- package/dist/hooks-DPIr6WaL.mjs +1434 -0
- package/dist/hooks-DPIr6WaL.mjs.map +1 -0
- package/dist/index.d.ts +3 -31
- package/dist/index.js +3413 -11188
- package/dist/index.js.map +1 -1
- package/dist/react-core/src/components/ColumnMenuFilterSection.d.ts +5 -0
- package/dist/react-core/src/components/ColumnMenuLabelSection.d.ts +5 -0
- package/dist/react-core/src/components/ColumnMenuSortSection.d.ts +5 -0
- package/dist/react-core/src/components/ContextMenu.d.ts +2 -0
- package/dist/react-core/src/components/EditorOptions.d.ts +11 -0
- package/dist/react-core/src/components/FunctionGuide.d.ts +19 -0
- package/dist/react-core/src/components/GridSheet.d.ts +7 -0
- package/dist/react-core/src/components/MenuItem.d.ts +18 -0
- package/dist/{components → react-core/src/components}/PluginBase.d.ts +2 -2
- package/dist/react-core/src/components/StoreObserver.d.ts +14 -0
- package/dist/react-core/src/components/useAutocomplete.d.ts +23 -0
- package/dist/react-core/src/index.d.ts +17 -0
- package/dist/react-core/src/lib/clipboard.d.ts +18 -0
- package/dist/{components → react-core/src/lib}/hooks.d.ts +2 -0
- package/dist/react-core/src/lib/menu.d.ts +99 -0
- package/dist/react-core/src/lib/style.d.ts +12 -0
- package/dist/react-core/src/policy/checkbox.d.ts +3 -0
- package/dist/react-core/src/spellbook.d.ts +6 -0
- package/dist/{store → react-core/src/store}/actions.d.ts +15 -3
- package/dist/react-core/src/store/applyers.d.ts +40 -0
- package/dist/react-core/src/store/helpers.d.ts +33 -0
- package/dist/react-core/src/types.d.ts +101 -0
- package/dist/spellbook.d.ts +2 -0
- package/dist/spellbook.js +10 -0
- package/dist/spellbook.js.map +1 -0
- package/package.json +26 -10
- package/dist/components/ContextMenu.d.ts +0 -20
- package/dist/components/GridSheet.d.ts +0 -5
- package/dist/components/StoreObserver.d.ts +0 -11
- package/dist/constants.d.ts +0 -30
- package/dist/formula/evaluator.d.ts +0 -136
- package/dist/formula/functions/__async.d.ts +0 -59
- package/dist/formula/functions/__base.d.ts +0 -31
- package/dist/formula/functions/__utils.d.ts +0 -19
- package/dist/formula/functions/abs.d.ts +0 -12
- package/dist/formula/functions/acos.d.ts +0 -12
- package/dist/formula/functions/add.d.ts +0 -13
- package/dist/formula/functions/and.d.ts +0 -19
- package/dist/formula/functions/asin.d.ts +0 -12
- package/dist/formula/functions/atan.d.ts +0 -12
- package/dist/formula/functions/atan2.d.ts +0 -12
- package/dist/formula/functions/average.d.ts +0 -19
- package/dist/formula/functions/col.d.ts +0 -13
- package/dist/formula/functions/concat.d.ts +0 -12
- package/dist/formula/functions/concatenate.d.ts +0 -19
- package/dist/formula/functions/cos.d.ts +0 -12
- package/dist/formula/functions/count.d.ts +0 -19
- package/dist/formula/functions/counta.d.ts +0 -19
- package/dist/formula/functions/countif.d.ts +0 -13
- package/dist/formula/functions/divide.d.ts +0 -12
- package/dist/formula/functions/eq.d.ts +0 -12
- package/dist/formula/functions/exp.d.ts +0 -12
- package/dist/formula/functions/gt.d.ts +0 -12
- package/dist/formula/functions/gte.d.ts +0 -12
- package/dist/formula/functions/hlookup.d.ts +0 -18
- package/dist/formula/functions/if.d.ts +0 -17
- package/dist/formula/functions/iferror.d.ts +0 -20
- package/dist/formula/functions/index.d.ts +0 -18
- package/dist/formula/functions/len.d.ts +0 -12
- package/dist/formula/functions/lenb.d.ts +0 -12
- package/dist/formula/functions/ln.d.ts +0 -12
- package/dist/formula/functions/log.d.ts +0 -12
- package/dist/formula/functions/log10.d.ts +0 -12
- package/dist/formula/functions/lt.d.ts +0 -12
- package/dist/formula/functions/lte.d.ts +0 -12
- package/dist/formula/functions/match.d.ts +0 -18
- package/dist/formula/functions/match.test.d.ts +0 -2
- package/dist/formula/functions/max.d.ts +0 -19
- package/dist/formula/functions/min.d.ts +0 -19
- package/dist/formula/functions/minus.d.ts +0 -13
- package/dist/formula/functions/mod.d.ts +0 -12
- package/dist/formula/functions/multiply.d.ts +0 -12
- package/dist/formula/functions/ne.d.ts +0 -12
- package/dist/formula/functions/not.d.ts +0 -12
- package/dist/formula/functions/now.d.ts +0 -9
- package/dist/formula/functions/or.d.ts +0 -19
- package/dist/formula/functions/pi.d.ts +0 -9
- package/dist/formula/functions/power.d.ts +0 -12
- package/dist/formula/functions/product.d.ts +0 -19
- package/dist/formula/functions/radians.d.ts +0 -12
- package/dist/formula/functions/rand.d.ts +0 -9
- package/dist/formula/functions/round.d.ts +0 -17
- package/dist/formula/functions/rounddown.d.ts +0 -17
- package/dist/formula/functions/roundup.d.ts +0 -17
- package/dist/formula/functions/row.d.ts +0 -13
- package/dist/formula/functions/sin.d.ts +0 -12
- package/dist/formula/functions/sqrt.d.ts +0 -12
- package/dist/formula/functions/sum.d.ts +0 -19
- package/dist/formula/functions/sumif.d.ts +0 -18
- package/dist/formula/functions/tan.d.ts +0 -12
- package/dist/formula/functions/uminus.d.ts +0 -12
- package/dist/formula/functions/vlookup.d.ts +0 -18
- package/dist/formula/mapping.d.ts +0 -3
- package/dist/formula/solver.d.ts +0 -26
- package/dist/lib/autofill.d.ts +0 -17
- package/dist/lib/cell.d.ts +0 -3
- package/dist/lib/clipboard.d.ts +0 -3
- package/dist/lib/coords.d.ts +0 -10
- package/dist/lib/date.d.ts +0 -2
- package/dist/lib/filter.d.ts +0 -7
- package/dist/lib/hub.d.ts +0 -132
- package/dist/lib/input.d.ts +0 -15
- package/dist/lib/operation.d.ts +0 -34
- package/dist/lib/palette.d.ts +0 -2
- package/dist/lib/reference.d.ts +0 -13
- package/dist/lib/sheet.d.ts +0 -3
- package/dist/lib/spatial.d.ts +0 -92
- package/dist/lib/table.d.ts +0 -458
- package/dist/lib/time.d.ts +0 -25
- package/dist/lib/virtualization.d.ts +0 -22
- package/dist/parsers/core.d.ts +0 -38
- package/dist/policy/core.d.ts +0 -47
- package/dist/renderers/checkbox.d.ts +0 -5
- package/dist/renderers/core.d.ts +0 -66
- package/dist/renderers/thousand_separator.d.ts +0 -3
- package/dist/store/dispatchers.d.ts +0 -34
- package/dist/store/helpers.d.ts +0 -31
- package/dist/styles/embedder.d.ts +0 -2
- package/dist/styles/minified.d.ts +0 -3
- package/dist/styles/utils.d.ts +0 -52
- package/dist/types.d.ts +0 -355
- package/dist/utils.d.ts +0 -2
- /package/dist/{components → react-core/src/components}/Cell.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/CellStateOverlay.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/ColumnMenu.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/Editor.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/Emitter.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/Fixed.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/FormulaBar.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/HeaderCellLeft.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/HeaderCellTop.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/Resizer.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/RowMenu.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/ScrollHandle.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/SearchBar.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/Tabular.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/svg/AddIcon.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/svg/Base.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/svg/CloseIcon.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/svg/SearchIcon.d.ts +0 -0
- /package/dist/{lib → react-core/src/lib}/events.d.ts +0 -0
- /package/dist/{lib → react-core/src/lib}/paste.d.ts +0 -0
- /package/dist/{store → react-core/src/store}/index.d.ts +0 -0
package/dist/lib/hub.d.ts
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { Pending } from '../constants';
|
|
2
|
-
import { HistoryType, RefPaletteType, SheetIdsByName, ContextsBySheetId, ZoneType, CellsByIdType, Id, System, FeedbackType, EditorEvent, CursorStateType } from '../types';
|
|
3
|
-
import { UserTable, Table } from './table';
|
|
4
|
-
import { FunctionMapping } from '../formula/functions/__base';
|
|
5
|
-
import { PolicyType } from '../policy/core';
|
|
6
|
-
import { RendererType } from '../renderers/core';
|
|
7
|
-
import { ParserType } from '../parsers/core';
|
|
8
|
-
export type WireProps = {
|
|
9
|
-
historyLimit?: number;
|
|
10
|
-
additionalFunctions?: FunctionMapping;
|
|
11
|
-
renderers?: {
|
|
12
|
-
[rendererName: string]: RendererType | null;
|
|
13
|
-
};
|
|
14
|
-
parsers?: {
|
|
15
|
-
[parserName: string]: ParserType | null;
|
|
16
|
-
};
|
|
17
|
-
labelers?: {
|
|
18
|
-
[labelerName: string]: ((n: number) => string) | null;
|
|
19
|
-
};
|
|
20
|
-
policies?: {
|
|
21
|
-
[policyName: string]: PolicyType | null;
|
|
22
|
-
};
|
|
23
|
-
onSave?: FeedbackType;
|
|
24
|
-
onChange?: FeedbackType;
|
|
25
|
-
onRemoveRows?: (args: {
|
|
26
|
-
table: UserTable;
|
|
27
|
-
ys: number[];
|
|
28
|
-
}) => void;
|
|
29
|
-
onRemoveCols?: (args: {
|
|
30
|
-
table: UserTable;
|
|
31
|
-
xs: number[];
|
|
32
|
-
}) => void;
|
|
33
|
-
onInsertRows?: (args: {
|
|
34
|
-
table: UserTable;
|
|
35
|
-
y: number;
|
|
36
|
-
numRows: number;
|
|
37
|
-
}) => void;
|
|
38
|
-
onInsertCols?: (args: {
|
|
39
|
-
table: UserTable;
|
|
40
|
-
x: number;
|
|
41
|
-
numCols: number;
|
|
42
|
-
}) => void;
|
|
43
|
-
onSelect?: FeedbackType;
|
|
44
|
-
onKeyUp?: (args: {
|
|
45
|
-
e: EditorEvent;
|
|
46
|
-
points: CursorStateType;
|
|
47
|
-
}) => void;
|
|
48
|
-
onInit?: (args: {
|
|
49
|
-
table: UserTable;
|
|
50
|
-
}) => void;
|
|
51
|
-
};
|
|
52
|
-
export type HubProps = WireProps;
|
|
53
|
-
export declare class Wire {
|
|
54
|
-
sheetHead: number;
|
|
55
|
-
cellHead: number;
|
|
56
|
-
data: CellsByIdType;
|
|
57
|
-
sheetIdsByName: SheetIdsByName;
|
|
58
|
-
contextsBySheetId: ContextsBySheetId;
|
|
59
|
-
choosingSheetId: number;
|
|
60
|
-
choosingAddress: string;
|
|
61
|
-
editingSheetId: number;
|
|
62
|
-
editingAddress: string;
|
|
63
|
-
paletteBySheetName: {
|
|
64
|
-
[sheetName: string]: RefPaletteType;
|
|
65
|
-
};
|
|
66
|
-
lastFocused: HTMLTextAreaElement | null;
|
|
67
|
-
solvedCaches: Map<Id, any>;
|
|
68
|
-
/** Currently in-flight async formula Pending sentinels (keyed by cell ID). */
|
|
69
|
-
asyncPending: Map<string, Pending>;
|
|
70
|
-
copyingSheetId: number;
|
|
71
|
-
copyingZone: ZoneType;
|
|
72
|
-
cutting: boolean;
|
|
73
|
-
histories: HistoryType[];
|
|
74
|
-
historyIndex: number;
|
|
75
|
-
historyLimit: number;
|
|
76
|
-
lastHistory?: HistoryType;
|
|
77
|
-
currentHistory?: HistoryType;
|
|
78
|
-
ready: boolean;
|
|
79
|
-
functions: FunctionMapping;
|
|
80
|
-
renderers: {
|
|
81
|
-
[rendererName: string]: RendererType | null;
|
|
82
|
-
};
|
|
83
|
-
parsers: {
|
|
84
|
-
[parserName: string]: ParserType | null;
|
|
85
|
-
};
|
|
86
|
-
labelers: {
|
|
87
|
-
[labelerName: string]: ((n: number) => string) | null;
|
|
88
|
-
};
|
|
89
|
-
policies: {
|
|
90
|
-
[policyName: string]: PolicyType | null;
|
|
91
|
-
};
|
|
92
|
-
onSave?: FeedbackType;
|
|
93
|
-
onChange?: FeedbackType;
|
|
94
|
-
onRemoveRows?: (args: {
|
|
95
|
-
table: UserTable;
|
|
96
|
-
ys: number[];
|
|
97
|
-
}) => void;
|
|
98
|
-
onRemoveCols?: (args: {
|
|
99
|
-
table: UserTable;
|
|
100
|
-
xs: number[];
|
|
101
|
-
}) => void;
|
|
102
|
-
onInsertRows?: (args: {
|
|
103
|
-
table: UserTable;
|
|
104
|
-
y: number;
|
|
105
|
-
numRows: number;
|
|
106
|
-
}) => void;
|
|
107
|
-
onInsertCols?: (args: {
|
|
108
|
-
table: UserTable;
|
|
109
|
-
x: number;
|
|
110
|
-
numCols: number;
|
|
111
|
-
}) => void;
|
|
112
|
-
onSelect?: FeedbackType;
|
|
113
|
-
onKeyUp?: (args: {
|
|
114
|
-
e: EditorEvent;
|
|
115
|
-
points: CursorStateType;
|
|
116
|
-
}) => void;
|
|
117
|
-
onInit?: (args: {
|
|
118
|
-
table: UserTable;
|
|
119
|
-
}) => void;
|
|
120
|
-
transmit: (newHub?: TransmitProps) => void;
|
|
121
|
-
identifyFormula(): void;
|
|
122
|
-
getSystem(id: Id, table: Table): System;
|
|
123
|
-
constructor({ historyLimit, additionalFunctions, renderers, parsers, labelers, policies, onSave, onChange, onRemoveRows, onRemoveCols, onInsertRows, onInsertCols, onSelect, onKeyUp, onInit, }?: WireProps);
|
|
124
|
-
}
|
|
125
|
-
export type TransmitProps = Partial<Wire>;
|
|
126
|
-
export declare const createWire: (props?: WireProps) => Wire;
|
|
127
|
-
export type HubType = {
|
|
128
|
-
wire: Wire;
|
|
129
|
-
};
|
|
130
|
-
export declare const createHub: (props?: WireProps) => HubType;
|
|
131
|
-
export declare const useHub: (props?: WireProps) => HubType;
|
|
132
|
-
//# sourceMappingURL=hub.d.ts.map
|
package/dist/lib/input.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PointType } from '../types';
|
|
2
|
-
import { Table } from './table';
|
|
3
|
-
export declare const insertTextAtCursor: (input: HTMLTextAreaElement, text: string) => void;
|
|
4
|
-
type InsertRefProps = {
|
|
5
|
-
input: HTMLTextAreaElement | null;
|
|
6
|
-
ref: string;
|
|
7
|
-
dryRun?: boolean;
|
|
8
|
-
};
|
|
9
|
-
export declare const insertRef: ({ input, ref, dryRun }: InsertRefProps) => boolean;
|
|
10
|
-
export declare const isRefInsertable: (input: HTMLTextAreaElement | null) => boolean;
|
|
11
|
-
export declare const expandInput: (input: HTMLTextAreaElement | null) => void;
|
|
12
|
-
export declare const resetInput: (input: HTMLTextAreaElement | null, table: Table, point: PointType) => void;
|
|
13
|
-
export declare const isFocus: (input: HTMLTextAreaElement | null) => boolean;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=input.d.ts.map
|
package/dist/lib/operation.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { OperationType as operations } from '../types';
|
|
2
|
-
export declare const RemoveRows: operations;
|
|
3
|
-
export declare const RemoveCols: operations;
|
|
4
|
-
export declare const InsertRowsAbove: operations;
|
|
5
|
-
export declare const InsertRowsBelow: operations;
|
|
6
|
-
export declare const InsertColsLeft: operations;
|
|
7
|
-
export declare const InsertColsRight: operations;
|
|
8
|
-
export declare const MoveFrom: operations;
|
|
9
|
-
export declare const MoveTo: operations;
|
|
10
|
-
export declare const Write: operations;
|
|
11
|
-
export declare const Style: operations;
|
|
12
|
-
export declare const Copy: operations;
|
|
13
|
-
export declare const Resize: operations;
|
|
14
|
-
export declare const SetRenderer: operations;
|
|
15
|
-
export declare const SetParser: operations;
|
|
16
|
-
export declare const SetPolicy: operations;
|
|
17
|
-
export declare const Sort: operations;
|
|
18
|
-
export declare const Filter: operations;
|
|
19
|
-
export declare const SetLabel: operations;
|
|
20
|
-
export declare const SetLabeler: operations;
|
|
21
|
-
export declare const NoOperation: operations;
|
|
22
|
-
export declare const Move: operations;
|
|
23
|
-
export declare const Update: operations;
|
|
24
|
-
export declare const InsertRows: operations;
|
|
25
|
-
export declare const InsertCols: operations;
|
|
26
|
-
export declare const Add: operations;
|
|
27
|
-
export declare const Delete: operations;
|
|
28
|
-
export declare const ReadOnly: operations;
|
|
29
|
-
export declare const ColumnMenu: operations;
|
|
30
|
-
export declare const RowMenu: operations;
|
|
31
|
-
export declare const ViewOnly: operations;
|
|
32
|
-
export declare const hasOperation: (operation: operations | undefined, flag: operations) => boolean;
|
|
33
|
-
export declare const debugOperations: (prevention: operations | undefined) => string[];
|
|
34
|
-
//# sourceMappingURL=operation.d.ts.map
|
package/dist/lib/palette.d.ts
DELETED
package/dist/lib/reference.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CellsByIdType, Id } from '../types';
|
|
2
|
-
import { Table } from './table';
|
|
3
|
-
export declare class ReferencePreserver {
|
|
4
|
-
map: {
|
|
5
|
-
[id: Id]: Id;
|
|
6
|
-
};
|
|
7
|
-
private table;
|
|
8
|
-
private dependentIds;
|
|
9
|
-
constructor(table: Table);
|
|
10
|
-
addTheDependents(...ids: Id[]): void;
|
|
11
|
-
resolveDependents(operation?: 'move' | 'removeRows' | 'removeCols'): CellsByIdType;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=reference.d.ts.map
|
package/dist/lib/sheet.d.ts
DELETED
package/dist/lib/spatial.d.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { MatrixType, AreaType, ZoneType, RangeType, PointType, Y, X, CellsByAddressType, ShapeType, MatricesByAddress, CellType, Address } from '../types';
|
|
2
|
-
export declare const slideArea: (area: AreaType, y: Y, x: X) => AreaType;
|
|
3
|
-
export declare const superposeArea: (srcArea: AreaType, dstArea: AreaType) => ShapeType;
|
|
4
|
-
export declare const concatAreas: (area1: AreaType, area2: AreaType) => AreaType;
|
|
5
|
-
export declare const zoneToArea: (zone: ZoneType) => AreaType;
|
|
6
|
-
export declare const areaToZone: (area: AreaType) => ZoneType;
|
|
7
|
-
export declare const areaToRange: (area: AreaType) => string;
|
|
8
|
-
export declare const between: (range: RangeType, index: number) => boolean;
|
|
9
|
-
export declare const among: (area: AreaType, point: PointType) => boolean;
|
|
10
|
-
type ShapeExtension = {
|
|
11
|
-
base?: number;
|
|
12
|
-
};
|
|
13
|
-
export declare const zoneShape: ({ base, ...zone }: ZoneType & ShapeExtension) => ShapeType;
|
|
14
|
-
export declare const areaShape: ({ base, ...area }: AreaType & ShapeExtension) => ShapeType;
|
|
15
|
-
export declare const matrixShape: ({ base, matrix }: {
|
|
16
|
-
matrix: MatrixType;
|
|
17
|
-
} & ShapeExtension) => ShapeType;
|
|
18
|
-
export declare const makeSequence: (start: number, stop: number, step?: number) => number[];
|
|
19
|
-
export declare const oa2aa: (oa: {
|
|
20
|
-
[s: string]: any;
|
|
21
|
-
}[], fields: string[]) => MatrixType;
|
|
22
|
-
export declare const aa2oa: (aa: MatrixType, fields: string[]) => {
|
|
23
|
-
[s: string]: any;
|
|
24
|
-
}[];
|
|
25
|
-
type PutMatrixFilterProps<T = any> = {
|
|
26
|
-
srcValue: T;
|
|
27
|
-
dstValue: T;
|
|
28
|
-
srcPoint: PointType;
|
|
29
|
-
dstPoint: PointType;
|
|
30
|
-
};
|
|
31
|
-
export declare const putMatrix: <T = any>(dst: T[][], src: T[][], dstArea: AreaType, filter?: (arg: PutMatrixFilterProps) => boolean) => MatricesByAddress<T>;
|
|
32
|
-
export declare const createMatrix: <T = any>(numRows: number, numCols: number, fill?: T) => T[][];
|
|
33
|
-
export declare const cropMatrix: <T = any>(matrix: T[][], area: AreaType) => T[][];
|
|
34
|
-
export declare const buildInitialCellsFromOrigin: ({ cells, ensured, matrix, flattenAs, origin, }: {
|
|
35
|
-
cells?: CellsByAddressType;
|
|
36
|
-
ensured?: {
|
|
37
|
-
numRows?: number;
|
|
38
|
-
numCols?: number;
|
|
39
|
-
};
|
|
40
|
-
flattenAs?: keyof CellType;
|
|
41
|
-
matrix?: MatrixType;
|
|
42
|
-
origin?: Address;
|
|
43
|
-
}) => CellsByAddressType;
|
|
44
|
-
export declare const buildInitialCells: ({ cells, ensured, matrices, flattenAs, }?: {
|
|
45
|
-
cells?: CellsByAddressType;
|
|
46
|
-
ensured?: {
|
|
47
|
-
numRows?: number;
|
|
48
|
-
numCols?: number;
|
|
49
|
-
};
|
|
50
|
-
flattenAs?: keyof CellType;
|
|
51
|
-
matrices?: MatricesByAddress<any>;
|
|
52
|
-
}) => CellsByAddressType;
|
|
53
|
-
export declare const buildCells: <T>({ cells, matrices, flattenAs, }: {
|
|
54
|
-
cells?: CellsByAddressType;
|
|
55
|
-
flattenAs?: keyof CellType;
|
|
56
|
-
matrices?: MatricesByAddress<T>;
|
|
57
|
-
}) => CellsByAddressType;
|
|
58
|
-
export declare const getMaxSizesFromCells: (cells?: CellsByAddressType) => {
|
|
59
|
-
numRows: number;
|
|
60
|
-
numCols: number;
|
|
61
|
-
};
|
|
62
|
-
export declare const range: (start: number, end: number) => number[];
|
|
63
|
-
export declare const complementSelectingArea: (selectingArea: AreaType, choosing: PointType) => AreaType;
|
|
64
|
-
export declare const isSameArea: (area1: AreaType, area2: AreaType) => boolean;
|
|
65
|
-
export declare const expandRange: (range: string) => Address[];
|
|
66
|
-
export declare const restrictZone: (zone: ZoneType) => ZoneType;
|
|
67
|
-
export type BinarySearchPredicate = (mid: number) => boolean;
|
|
68
|
-
export declare const binarySearch: (low: number, high: number, predicate: BinarySearchPredicate, lessThan: boolean) => number;
|
|
69
|
-
export declare const moveKey: (obj: any, keyFrom: string, keyTo: string) => void;
|
|
70
|
-
export declare const invertObject: (obj: {
|
|
71
|
-
[key: string]: string;
|
|
72
|
-
}) => {
|
|
73
|
-
[value: string]: string;
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* Convert a list of addresses into an array of bounding areas.
|
|
77
|
-
* Adjacent cells (4-connected: up/down/left/right) are grouped into the same area.
|
|
78
|
-
* Each resulting AreaType is the bounding rectangle of one connected group.
|
|
79
|
-
*/
|
|
80
|
-
export declare const addressesToAreas: (addresses: Address[]) => AreaType[];
|
|
81
|
-
/**
|
|
82
|
-
* Extract unique column indices (x) from a list of addresses, ignoring row information.
|
|
83
|
-
* @param asc - true: ascending, false: descending, null: insertion order
|
|
84
|
-
*/
|
|
85
|
-
export declare const addressesToCols: (addresses: Address[], asc?: boolean | null) => number[];
|
|
86
|
-
/**
|
|
87
|
-
* Extract unique row indices (y) from a list of addresses, ignoring column information.
|
|
88
|
-
* @param asc - true: ascending, false: descending, null: insertion order
|
|
89
|
-
*/
|
|
90
|
-
export declare const addressesToRows: (addresses: Address[], asc?: boolean | null) => number[];
|
|
91
|
-
export {};
|
|
92
|
-
//# sourceMappingURL=spatial.d.ts.map
|