@gridsheet/engine 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +50 -0
  3. package/dist/constants.d.ts +21 -0
  4. package/dist/constants.d.ts.map +1 -0
  5. package/dist/formula/evaluator.d.ts +135 -0
  6. package/dist/formula/evaluator.d.ts.map +1 -0
  7. package/dist/formula/formula-error.d.ts +10 -0
  8. package/dist/formula/formula-error.d.ts.map +1 -0
  9. package/dist/formula/functions/__async.d.ts +67 -0
  10. package/dist/formula/functions/__async.d.ts.map +1 -0
  11. package/dist/formula/functions/__base.d.ts +120 -0
  12. package/dist/formula/functions/__base.d.ts.map +1 -0
  13. package/dist/formula/functions/__utils.d.ts +30 -0
  14. package/dist/formula/functions/__utils.d.ts.map +1 -0
  15. package/dist/formula/functions/abs.d.ts +9 -0
  16. package/dist/formula/functions/abs.d.ts.map +1 -0
  17. package/dist/formula/functions/add.d.ts +10 -0
  18. package/dist/formula/functions/add.d.ts.map +1 -0
  19. package/dist/formula/functions/and.d.ts +9 -0
  20. package/dist/formula/functions/and.d.ts.map +1 -0
  21. package/dist/formula/functions/arrayformula.d.ts +12 -0
  22. package/dist/formula/functions/arrayformula.d.ts.map +1 -0
  23. package/dist/formula/functions/average.d.ts +9 -0
  24. package/dist/formula/functions/average.d.ts.map +1 -0
  25. package/dist/formula/functions/concat.d.ts +9 -0
  26. package/dist/formula/functions/concat.d.ts.map +1 -0
  27. package/dist/formula/functions/count.d.ts +9 -0
  28. package/dist/formula/functions/count.d.ts.map +1 -0
  29. package/dist/formula/functions/counta.d.ts +9 -0
  30. package/dist/formula/functions/counta.d.ts.map +1 -0
  31. package/dist/formula/functions/divide.d.ts +10 -0
  32. package/dist/formula/functions/divide.d.ts.map +1 -0
  33. package/dist/formula/functions/eq.d.ts +9 -0
  34. package/dist/formula/functions/eq.d.ts.map +1 -0
  35. package/dist/formula/functions/gt.d.ts +9 -0
  36. package/dist/formula/functions/gt.d.ts.map +1 -0
  37. package/dist/formula/functions/gte.d.ts +9 -0
  38. package/dist/formula/functions/gte.d.ts.map +1 -0
  39. package/dist/formula/functions/if.d.ts +9 -0
  40. package/dist/formula/functions/if.d.ts.map +1 -0
  41. package/dist/formula/functions/iferror.d.ts +10 -0
  42. package/dist/formula/functions/iferror.d.ts.map +1 -0
  43. package/dist/formula/functions/len.d.ts +9 -0
  44. package/dist/formula/functions/len.d.ts.map +1 -0
  45. package/dist/formula/functions/lt.d.ts +9 -0
  46. package/dist/formula/functions/lt.d.ts.map +1 -0
  47. package/dist/formula/functions/lte.d.ts +9 -0
  48. package/dist/formula/functions/lte.d.ts.map +1 -0
  49. package/dist/formula/functions/max.d.ts +9 -0
  50. package/dist/formula/functions/max.d.ts.map +1 -0
  51. package/dist/formula/functions/min.d.ts +9 -0
  52. package/dist/formula/functions/min.d.ts.map +1 -0
  53. package/dist/formula/functions/minus.d.ts +10 -0
  54. package/dist/formula/functions/minus.d.ts.map +1 -0
  55. package/dist/formula/functions/multiply.d.ts +9 -0
  56. package/dist/formula/functions/multiply.d.ts.map +1 -0
  57. package/dist/formula/functions/ne.d.ts +9 -0
  58. package/dist/formula/functions/ne.d.ts.map +1 -0
  59. package/dist/formula/functions/not.d.ts +9 -0
  60. package/dist/formula/functions/not.d.ts.map +1 -0
  61. package/dist/formula/functions/now.d.ts +9 -0
  62. package/dist/formula/functions/now.d.ts.map +1 -0
  63. package/dist/formula/functions/or.d.ts +9 -0
  64. package/dist/formula/functions/or.d.ts.map +1 -0
  65. package/dist/formula/functions/power.d.ts +9 -0
  66. package/dist/formula/functions/power.d.ts.map +1 -0
  67. package/dist/formula/functions/sum.d.ts +9 -0
  68. package/dist/formula/functions/sum.d.ts.map +1 -0
  69. package/dist/formula/functions/uminus.d.ts +9 -0
  70. package/dist/formula/functions/uminus.d.ts.map +1 -0
  71. package/dist/formula/mapping.d.ts +11 -0
  72. package/dist/formula/mapping.d.ts.map +1 -0
  73. package/dist/formula/solver.d.ts +39 -0
  74. package/dist/formula/solver.d.ts.map +1 -0
  75. package/dist/index.d.ts +31 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +4888 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/lib/autofill.d.ts +22 -0
  80. package/dist/lib/autofill.d.ts.map +1 -0
  81. package/dist/lib/book.d.ts +141 -0
  82. package/dist/lib/book.d.ts.map +1 -0
  83. package/dist/lib/cell.d.ts +17 -0
  84. package/dist/lib/cell.d.ts.map +1 -0
  85. package/dist/lib/coords.d.ts +22 -0
  86. package/dist/lib/coords.d.ts.map +1 -0
  87. package/dist/lib/date.d.ts +2 -0
  88. package/dist/lib/date.d.ts.map +1 -0
  89. package/dist/lib/filter.d.ts +7 -0
  90. package/dist/lib/filter.d.ts.map +1 -0
  91. package/dist/lib/label.d.ts +4 -0
  92. package/dist/lib/label.d.ts.map +1 -0
  93. package/dist/lib/operation.d.ts +31 -0
  94. package/dist/lib/operation.d.ts.map +1 -0
  95. package/dist/lib/palette.d.ts +2 -0
  96. package/dist/lib/palette.d.ts.map +1 -0
  97. package/dist/lib/reference.d.ts +19 -0
  98. package/dist/lib/reference.d.ts.map +1 -0
  99. package/dist/lib/sheet.d.ts +626 -0
  100. package/dist/lib/sheet.d.ts.map +1 -0
  101. package/dist/lib/sheet_utils.d.ts +52 -0
  102. package/dist/lib/sheet_utils.d.ts.map +1 -0
  103. package/dist/lib/spatial.d.ts +79 -0
  104. package/dist/lib/spatial.d.ts.map +1 -0
  105. package/dist/lib/time.d.ts +29 -0
  106. package/dist/lib/time.d.ts.map +1 -0
  107. package/dist/policy/core.d.ts +161 -0
  108. package/dist/policy/core.d.ts.map +1 -0
  109. package/dist/policy/percentage.d.ts +3 -0
  110. package/dist/policy/percentage.d.ts.map +1 -0
  111. package/dist/policy/thousand_separator.d.ts +4 -0
  112. package/dist/policy/thousand_separator.d.ts.map +1 -0
  113. package/dist/sentinels.d.ts +41 -0
  114. package/dist/sentinels.d.ts.map +1 -0
  115. package/dist/types.d.ts +313 -0
  116. package/dist/types.d.ts.map +1 -0
  117. package/dist/utils.d.ts +2 -0
  118. package/dist/utils.d.ts.map +1 -0
  119. package/package.json +63 -0
@@ -0,0 +1,22 @@
1
+ import { AreaType, CSSPropertiesLike, PointType, RefLike, ZoneType } from '../types';
2
+ import { Sheet } from './sheet';
3
+ type AutofillStore = {
4
+ sheetReactive: RefLike<Sheet>;
5
+ choosing: PointType;
6
+ selectingZone: ZoneType;
7
+ };
8
+ export declare class Autofill {
9
+ private readonly src;
10
+ private readonly dst;
11
+ private readonly direction;
12
+ private readonly sheet;
13
+ constructor(store: AutofillStore, draggingTo: PointType);
14
+ get applied(): Sheet;
15
+ get wholeArea(): AreaType;
16
+ getCellStyle(target: PointType): CSSPropertiesLike;
17
+ private getDestinationArea;
18
+ private suggestDirection;
19
+ private getChangePatterns;
20
+ }
21
+ export {};
22
+ //# sourceMappingURL=autofill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autofill.d.ts","sourceRoot":"","sources":["../../src/lib/autofill.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAgC,iBAAiB,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACxH,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAKhC,KAAK,aAAa,GAAG;IACnB,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B,QAAQ,EAAE,SAAS,CAAC;IACpB,aAAa,EAAE,QAAQ,CAAC;CACzB,CAAC;AAgBF,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAW;IAC/B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAW;IAC/B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IACtC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAQ;gBAClB,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS;IAYvD,IAAW,OAAO,IAAI,KAAK,CAiE1B;IAED,IAAW,SAAS,aAEnB;IAEM,YAAY,CAAC,MAAM,EAAE,SAAS;IAmErC,OAAO,CAAC,kBAAkB;IAgB1B,OAAO,CAAC,gBAAgB;IA8BxB,OAAO,CAAC,iBAAiB;CA4F1B"}
@@ -0,0 +1,141 @@
1
+ import { Pending } from '../sentinels';
2
+ import { HistoryType, RefPaletteType, SheetIdsByName, ContextsBySheetId, ZoneType, CellsByIdType, SystemsByIdType, Id, FeedbackType, EditorEvent, CursorStateType } from '../types';
3
+ import { UserSheet, Sheet } from './sheet';
4
+ import { FunctionMapping } from '../formula/functions/__base';
5
+ import { PolicyType } from '../policy/core';
6
+ export type RegistryProps = {
7
+ historyLimit?: number;
8
+ additionalFunctions?: FunctionMapping;
9
+ policies?: {
10
+ [policyName: string]: PolicyType | null;
11
+ };
12
+ onSave?: FeedbackType;
13
+ onChange?: FeedbackType;
14
+ onRemoveRows?: (args: {
15
+ sheet: UserSheet;
16
+ ys: number[];
17
+ }) => void;
18
+ onRemoveCols?: (args: {
19
+ sheet: UserSheet;
20
+ xs: number[];
21
+ }) => void;
22
+ onInsertRows?: (args: {
23
+ sheet: UserSheet;
24
+ y: number;
25
+ numRows: number;
26
+ }) => void;
27
+ onInsertCols?: (args: {
28
+ sheet: UserSheet;
29
+ x: number;
30
+ numCols: number;
31
+ }) => void;
32
+ onSelect?: FeedbackType;
33
+ onKeyUp?: (args: {
34
+ e: EditorEvent;
35
+ points: CursorStateType;
36
+ }) => void;
37
+ onInit?: (args: {
38
+ sheet: UserSheet;
39
+ }) => void;
40
+ };
41
+ export type BookProps = RegistryProps;
42
+ export declare class Registry {
43
+ sheetHead: number;
44
+ cellHead: number;
45
+ data: CellsByIdType;
46
+ systems: SystemsByIdType;
47
+ sheetIdsByName: SheetIdsByName;
48
+ contextsBySheetId: ContextsBySheetId;
49
+ choosingSheetId: number;
50
+ choosingAddress: string;
51
+ editingSheetId: number;
52
+ editingAddress: string;
53
+ paletteBySheetName: {
54
+ [sheetName: string]: RefPaletteType;
55
+ };
56
+ lastFocused: HTMLTextAreaElement | null;
57
+ solvedCaches: Map<Id, any>;
58
+ /** IDs of non-origin cells that received spilled values (populated in spill(), cleared in clearSolvedCaches()). */
59
+ lastSpilledTargetIds: Set<Id>;
60
+ /**
61
+ * Index of every cell whose formula contains at least one async function call,
62
+ * maintained by `Sheet.processFormula`. These are the only cells eager
63
+ * resolution must fire: sync formulas have no side effects and resolve on read,
64
+ * so `Sheet.resolveAll()` visits just this set instead of scanning the whole
65
+ * (possibly virtualized) matrix. Registry-wide; each entry's owning sheet is
66
+ * recoverable via `systems[id].sheetId`. Pruned lazily in `resolveAll()` when a
67
+ * cell is no longer an async formula.
68
+ */
69
+ asyncFormulaCells: Set<Id>;
70
+ /** Currently in-flight async formula Pending sentinels (keyed by cell ID). */
71
+ asyncPending: Map<string, Pending>;
72
+ /** In-flight async formulas shared by cache key (for useInflight). */
73
+ asyncInflight?: Map<string, {
74
+ pending: Pending;
75
+ expireTime?: number;
76
+ }>;
77
+ copyingSheetId: number;
78
+ copyingZone: ZoneType;
79
+ cutting: boolean;
80
+ histories: HistoryType[];
81
+ historyIndex: number;
82
+ historyLimit: number;
83
+ lastHistory?: HistoryType;
84
+ currentHistory?: HistoryType;
85
+ /** StrictMode guard: Map from action object (identity) to cached reducer result.
86
+ * Using a Map instead of a single slot allows multiple batched dispatches to coexist. */
87
+ _strictModeCache?: Map<unknown, unknown>;
88
+ /** StrictMode guard: Map from useId component key to assigned sheetId.
89
+ * Prevents double-increment of sheetHead when useState initializer runs twice in Strict Mode. */
90
+ _componentSheetIds: Map<string, number>;
91
+ ready: boolean;
92
+ functions: FunctionMapping;
93
+ policies: {
94
+ [policyName: string]: PolicyType | null;
95
+ };
96
+ onSave?: FeedbackType;
97
+ onChange?: FeedbackType;
98
+ onRemoveRows?: (args: {
99
+ sheet: UserSheet;
100
+ ys: number[];
101
+ }) => void;
102
+ onRemoveCols?: (args: {
103
+ sheet: UserSheet;
104
+ xs: number[];
105
+ }) => void;
106
+ onInsertRows?: (args: {
107
+ sheet: UserSheet;
108
+ y: number;
109
+ numRows: number;
110
+ }) => void;
111
+ onInsertCols?: (args: {
112
+ sheet: UserSheet;
113
+ x: number;
114
+ numCols: number;
115
+ }) => void;
116
+ onSelect?: FeedbackType;
117
+ onKeyUp?: (args: {
118
+ e: EditorEvent;
119
+ points: CursorStateType;
120
+ }) => void;
121
+ onInit?: (args: {
122
+ sheet: UserSheet;
123
+ }) => void;
124
+ transmit: (newBook?: TransmitProps) => void;
125
+ /** Injected by react-core / preact-core to create a store action for sheet updates. */
126
+ updateSheet: (sheet: Sheet) => {
127
+ type: number;
128
+ value: any;
129
+ };
130
+ boot(): void;
131
+ constructor({ historyLimit, additionalFunctions, policies, onSave, onChange, onRemoveRows, onRemoveCols, onInsertRows, onInsertCols, onSelect, onKeyUp, onInit, }?: RegistryProps);
132
+ }
133
+ export type TransmitProps = Partial<Registry>;
134
+ export declare const createRegistry: (props?: RegistryProps) => Registry;
135
+ /** @deprecated use createRegistry */
136
+ export declare const createBinding: (props?: RegistryProps) => Registry;
137
+ export type BookType = {
138
+ registry: Registry;
139
+ };
140
+ export declare const createBook: (props?: RegistryProps) => BookType;
141
+ //# sourceMappingURL=book.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"book.d.ts","sourceRoot":"","sources":["../../src/lib/book.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,eAAe,EAEf,EAAE,EAEF,YAAY,EACZ,WAAW,EACX,eAAe,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EA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WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,GAAG,CAAA;KAAE,CAA0C;IAE9F,IAAI;gBA2BC,EACV,YAAY,EACZ,mBAAmB,EACnB,QAAa,EACb,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,MAAM,GACP,GAAE,aAAkB;CAuBtB;AAED,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE9C,eAAO,MAAM,cAAc,GAAI,QAAO,aAAkB,aAEvD,CAAC;AAEF,qCAAqC;AACrC,eAAO,MAAM,aAAa,WALY,aAAa,aAKR,CAAC;AAE5C,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,QAAO,aAAkB,KAAG,QAEtD,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { AsyncCache, CellType, System } from '../types';
2
+ export declare const filterCellFields: (cell: CellType, ignoreFields: (keyof CellType)[]) => CellType;
3
+ /**
4
+ * Ensure that `registry.systems[id]` exists, initialising it with sensible
5
+ * defaults when missing. Any keys present in `defaults` that are absent on
6
+ * the existing System object are filled in.
7
+ * Returns the (possibly freshly-created) `System` object.
8
+ */
9
+ export declare const ensureSys: (registry: {
10
+ systems: Record<string, System>;
11
+ }, id: string, defaults?: Partial<System>) => System;
12
+ /**
13
+ * Write an `AsyncCache` entry into `cell.asyncCaches[key]`, creating the
14
+ * `asyncCaches` record if it does not yet exist.
15
+ */
16
+ export declare const setAsyncCache: (cell: CellType, key: string, ac: AsyncCache) => void;
17
+ //# sourceMappingURL=cell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../src/lib/cell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAE7D,eAAO,MAAM,gBAAgB,GAAI,MAAM,QAAQ,EAAE,cAAc,CAAC,MAAM,QAAQ,CAAC,EAAE,KAAG,QAOnF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GACpB,UAAU;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,EAC7C,IAAI,MAAM,EACV,WAAU,OAAO,CAAC,MAAM,CAAM,KAC7B,MASF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,QAAQ,EAAE,KAAK,MAAM,EAAE,IAAI,UAAU,KAAG,IAK3E,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { Address, ExtraPointType } from '../types';
2
+ export declare const x2c: (x: number) => string;
3
+ export declare const c2x: (col: string, absolute?: boolean) => number;
4
+ export declare const y2r: (y: number) => string;
5
+ export declare const r2y: (row: number | string, absolute?: boolean) => number;
6
+ export declare const p2a: ({ y, x, absX, absY }: Partial<ExtraPointType>) => string;
7
+ export declare const a2p: (address: Address) => ExtraPointType;
8
+ export declare const grantAddressAbsolute: (address: Address, absCol: boolean, absRow: boolean) => string;
9
+ /**
10
+ * Returns the row header cell address for a given row number by prepending `0`.
11
+ * e.g. rh(6) → '06', rh(1) → '01'
12
+ */
13
+ export declare const rh: (y: number) => string;
14
+ /**
15
+ * Returns the column header cell address for a given column letter or column index
16
+ * (1-based, same as point.x) by appending `0`.
17
+ * e.g. ch('A') → 'A0', ch(1) → 'A0'
18
+ */
19
+ export declare const ch: (col: string | number) => string;
20
+ export declare const stripAddressAbsolute: (address: Address) => string;
21
+ export declare const buildIdentifiedRef: (id: string, absX?: boolean, absY?: boolean) => string;
22
+ //# sourceMappingURL=coords.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coords.d.ts","sourceRoot":"","sources":["../../src/lib/coords.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAa,cAAc,EAAE,MAAM,UAAU,CAAC;AAwDnE,eAAO,MAAM,GAAG,GAAI,GAAG,MAAM,KAAG,MAM/B,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,KAAK,MAAM,EAAE,kBAAgB,KAAG,MAGnD,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,GAAG,MAAM,WAK5B,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,KAAK,MAAM,GAAG,MAAM,EAAE,kBAAgB,WAKzD,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,sBAAsB,OAAO,CAAC,cAAc,CAAC,WAOhE,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,SAAS,OAAO,KAAG,cAWtC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,SAAS,OAAO,EAAE,QAAQ,OAAO,EAAE,QAAQ,OAAO,WAOtF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,EAAE,GAAI,GAAG,MAAM,KAAG,MAAiB,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,EAAE,GAAI,KAAK,MAAM,GAAG,MAAM,KAAG,MAC0B,CAAC;AAErE,eAAO,MAAM,oBAAoB,GAAI,SAAS,OAAO,WAEpD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,IAAI,MAAM,EAAE,cAAY,EAAE,cAAY,KAAG,MAE3E,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function parseDate(value: string): Date | undefined;
2
+ //# sourceMappingURL=date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/lib/date.ts"],"names":[],"mappings":"AA+EA,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAyBzD"}
@@ -0,0 +1,7 @@
1
+ import { FilterCondition, FilterConditionMethod, FilterConfig } from '../types';
2
+ type FilterFunction = (condition: FilterCondition, cellValue: any) => boolean;
3
+ export declare const filterFunctions: Record<FilterConditionMethod, FilterFunction>;
4
+ export declare function evaluateFilterCondition(condition: FilterCondition, cellValue: any): boolean;
5
+ export declare function evaluateFilterConfig(filter: FilterConfig, cellValue: any): boolean;
6
+ export {};
7
+ //# sourceMappingURL=filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/lib/filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIrF,KAAK,cAAc,GAAG,CAAC,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,KAAK,OAAO,CAAC;AA+J9E,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,qBAAqB,EAAE,cAAc,CAWzE,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,GAAG,OAAO,CAG3F;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,GAAG,OAAO,CAUlF"}
@@ -0,0 +1,4 @@
1
+ import { PointType } from '../types';
2
+ import { UserSheet } from './sheet';
3
+ export declare const getLabel: (sheet: UserSheet, label: string | undefined, point: PointType, n: number) => string | null;
4
+ //# sourceMappingURL=label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/lib/label.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,QAAQ,GAAI,OAAO,SAAS,EAAE,OAAO,MAAM,GAAG,SAAS,EAAE,OAAO,SAAS,EAAE,GAAG,MAAM,KAAG,MAAM,GAAG,IAM5G,CAAC"}
@@ -0,0 +1,31 @@
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 SetPolicy: operations;
15
+ export declare const Sort: operations;
16
+ export declare const Filter: operations;
17
+ export declare const SetLabel: operations;
18
+ export declare const NoOperation: operations;
19
+ export declare const Move: operations;
20
+ export declare const Update: operations;
21
+ export declare const InsertRows: operations;
22
+ export declare const InsertCols: operations;
23
+ export declare const Add: operations;
24
+ export declare const Delete: operations;
25
+ export declare const ReadOnly: operations;
26
+ export declare const ColumnMenu: operations;
27
+ export declare const RowMenu: operations;
28
+ export declare const ViewOnly: operations;
29
+ export declare const hasOperation: (operation: operations | undefined, flag: operations) => boolean;
30
+ export declare const debugOperations: (prevention: operations | undefined) => string[];
31
+ //# sourceMappingURL=operation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../src/lib/operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AAEvD,eAAO,MAAM,UAAU,EAAE,UAAoE,CAAC;AAC9F,eAAO,MAAM,UAAU,EAAE,UAAoE,CAAC;AAC9F,eAAO,MAAM,eAAe,EAAE,UAAoE,CAAC;AACnG,eAAO,MAAM,eAAe,EAAE,UAAoE,CAAC;AACnG,eAAO,MAAM,cAAc,EAAE,UAAoE,CAAC;AAClG,eAAO,MAAM,eAAe,EAAE,UAAoE,CAAC;AACnG,eAAO,MAAM,QAAQ,EAAE,UAAoE,CAAC;AAC5F,eAAO,MAAM,MAAM,EAAE,UAAoE,CAAC;AAC1F,eAAO,MAAM,KAAK,EAAE,UAAoE,CAAC;AACzF,eAAO,MAAM,KAAK,EAAE,UAAoE,CAAC;AACzF,eAAO,MAAM,IAAI,EAAE,UAAoE,CAAC;AACxF,eAAO,MAAM,MAAM,EAAE,UAAoE,CAAC;AAC1F,eAAO,MAAM,SAAS,EAAE,UAAoE,CAAC;AAC7F,eAAO,MAAM,IAAI,EAAE,UAAoE,CAAC;AACxF,eAAO,MAAM,MAAM,EAAE,UAAoE,CAAC;AAC1F,eAAO,MAAM,QAAQ,EAAE,UAAoE,CAAC;AAE5F,eAAO,MAAM,WAAW,EAAE,UAAc,CAAC;AAEzC,eAAO,MAAM,IAAI,EAAE,UAA8B,CAAC;AAElD,eAAO,MAAM,MAAM,EAAE,UAAiE,CAAC;AAEvF,eAAO,MAAM,UAAU,EAAE,UAA8C,CAAC;AAExE,eAAO,MAAM,UAAU,EAAE,UAA6C,CAAC;AAEvE,eAAO,MAAM,GAAG,EAAE,UAAoC,CAAC;AAEvD,eAAO,MAAM,MAAM,EAAE,UAAoC,CAAC;AAE1D,eAAO,MAAM,QAAQ,EAAE,UAAyC,CAAC;AAEjE,eAAO,MAAM,UAAU,EAAE,UAAqC,CAAC;AAE/D,eAAO,MAAM,OAAO,EAAE,UAAoE,CAAC;AAE3F,eAAO,MAAM,QAAQ,EAAE,UAAkC,CAAC;AAE1D,eAAO,MAAM,YAAY,GAAI,WAAW,UAAU,GAAG,SAAS,EAAE,MAAM,UAAU,YAK/E,CAAC;AAGF,eAAO,MAAM,eAAe,GAAI,YAAY,UAAU,GAAG,SAAS,aAgDjE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const COLOR_PALETTE: string[];
2
+ //# sourceMappingURL=palette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../src/lib/palette.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,UAqBzB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { CellsByIdType, Id } from '../types';
2
+ import { Sheet } from './sheet';
3
+ export declare class ReferencePreserver {
4
+ map: {
5
+ [id: Id]: Id;
6
+ };
7
+ private sheet;
8
+ private dependentIds;
9
+ constructor(sheet: Sheet);
10
+ collectDependents(...ids: Id[]): void;
11
+ /**
12
+ * Compare two idMatrix snapshots (`before` and `after`) and populate
13
+ * `this.map` and collect dependents for every position where the occupying
14
+ * cell ID changed. Works for any rearrangement (sort, move, etc.).
15
+ */
16
+ buildMap(before: Id[], after: Id[]): void;
17
+ resolveDependents(operation?: 'move' | 'removeRows' | 'removeCols'): CellsByIdType;
18
+ }
19
+ //# sourceMappingURL=reference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../src/lib/reference.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,qBAAa,kBAAkB;IACtB,GAAG,EAAE;QAAE,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAA;KAAE,CAAM;IAClC,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,YAAY,CAA0B;gBAElC,KAAK,EAAE,KAAK;IAIxB,iBAAiB,CAAC,GAAG,GAAG,EAAE,EAAE,EAAE;IAQ9B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAWlC,iBAAiB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,YAAY,GAAG,aAAa;CAmBnF"}