@gridsheet/preact-core 3.0.0-rc.7 → 3.0.0-rc.8

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 (115) hide show
  1. package/dist/hooks-hS8l-fYa.mjs +1440 -0
  2. package/dist/hooks-hS8l-fYa.mjs.map +1 -0
  3. package/dist/index.d.ts +3 -34
  4. package/dist/index.js +358 -9246
  5. package/dist/index.js.map +1 -1
  6. package/dist/{components → react-core/src/components}/FunctionGuide.d.ts +2 -2
  7. package/dist/{components → react-core/src/components}/useAutocomplete.d.ts +3 -3
  8. package/dist/react-core/src/index.d.ts +17 -0
  9. package/dist/{lib → react-core/src/lib}/clipboard.d.ts +1 -1
  10. package/dist/{components → react-core/src/lib}/hooks.d.ts +2 -0
  11. package/dist/{lib → react-core/src/lib}/menu.d.ts +1 -1
  12. package/dist/react-core/src/lib/style.d.ts +12 -0
  13. package/dist/react-core/src/policy/checkbox.d.ts +3 -0
  14. package/dist/react-core/src/spellbook.d.ts +6 -0
  15. package/dist/{store → react-core/src/store}/actions.d.ts +1 -1
  16. package/dist/{store/dispatchers.d.ts → react-core/src/store/applyers.d.ts} +1 -1
  17. package/dist/{store → react-core/src/store}/helpers.d.ts +1 -2
  18. package/dist/react-core/src/types.d.ts +104 -0
  19. package/dist/spellbook.d.ts +2 -0
  20. package/dist/spellbook.js +10 -0
  21. package/dist/spellbook.js.map +1 -0
  22. package/package.json +18 -2
  23. package/dist/constants.d.ts +0 -21
  24. package/dist/formula/evaluator.d.ts +0 -134
  25. package/dist/formula/formula-error.d.ts +0 -10
  26. package/dist/formula/functions/__async.d.ts +0 -67
  27. package/dist/formula/functions/__base.d.ts +0 -112
  28. package/dist/formula/functions/__utils.d.ts +0 -23
  29. package/dist/formula/functions/abs.d.ts +0 -9
  30. package/dist/formula/functions/add.d.ts +0 -10
  31. package/dist/formula/functions/and.d.ts +0 -9
  32. package/dist/formula/functions/arrayformula.d.ts +0 -12
  33. package/dist/formula/functions/average.d.ts +0 -9
  34. package/dist/formula/functions/concat.d.ts +0 -9
  35. package/dist/formula/functions/count.d.ts +0 -9
  36. package/dist/formula/functions/counta.d.ts +0 -9
  37. package/dist/formula/functions/divide.d.ts +0 -10
  38. package/dist/formula/functions/eq.d.ts +0 -9
  39. package/dist/formula/functions/gt.d.ts +0 -9
  40. package/dist/formula/functions/gte.d.ts +0 -9
  41. package/dist/formula/functions/if.d.ts +0 -9
  42. package/dist/formula/functions/iferror.d.ts +0 -10
  43. package/dist/formula/functions/len.d.ts +0 -9
  44. package/dist/formula/functions/lt.d.ts +0 -9
  45. package/dist/formula/functions/lte.d.ts +0 -9
  46. package/dist/formula/functions/max.d.ts +0 -9
  47. package/dist/formula/functions/min.d.ts +0 -9
  48. package/dist/formula/functions/minus.d.ts +0 -10
  49. package/dist/formula/functions/multiply.d.ts +0 -9
  50. package/dist/formula/functions/ne.d.ts +0 -9
  51. package/dist/formula/functions/not.d.ts +0 -9
  52. package/dist/formula/functions/now.d.ts +0 -9
  53. package/dist/formula/functions/or.d.ts +0 -9
  54. package/dist/formula/functions/power.d.ts +0 -9
  55. package/dist/formula/functions/sum.d.ts +0 -9
  56. package/dist/formula/functions/uminus.d.ts +0 -9
  57. package/dist/formula/mapping.d.ts +0 -11
  58. package/dist/formula/solver.d.ts +0 -39
  59. package/dist/lib/autofill.d.ts +0 -17
  60. package/dist/lib/book.d.ts +0 -127
  61. package/dist/lib/cell.d.ts +0 -17
  62. package/dist/lib/coords.d.ts +0 -22
  63. package/dist/lib/date.d.ts +0 -2
  64. package/dist/lib/dom.d.ts +0 -7
  65. package/dist/lib/filter.d.ts +0 -7
  66. package/dist/lib/input.d.ts +0 -24
  67. package/dist/lib/label.d.ts +0 -4
  68. package/dist/lib/operation.d.ts +0 -31
  69. package/dist/lib/palette.d.ts +0 -2
  70. package/dist/lib/popup.d.ts +0 -24
  71. package/dist/lib/reference.d.ts +0 -19
  72. package/dist/lib/sheet.d.ts +0 -508
  73. package/dist/lib/sheet_utils.d.ts +0 -55
  74. package/dist/lib/spatial.d.ts +0 -79
  75. package/dist/lib/time.d.ts +0 -29
  76. package/dist/lib/virtualization.d.ts +0 -22
  77. package/dist/policy/checkbox.d.ts +0 -3
  78. package/dist/policy/core.d.ts +0 -164
  79. package/dist/policy/thousand_separator.d.ts +0 -4
  80. package/dist/sentinels.d.ts +0 -40
  81. package/dist/styles/embedder.d.ts +0 -2
  82. package/dist/styles/minified.d.ts +0 -3
  83. package/dist/styles/utils.d.ts +0 -52
  84. package/dist/types.d.ts +0 -369
  85. package/dist/utils.d.ts +0 -2
  86. /package/dist/{components → react-core/src/components}/Cell.d.ts +0 -0
  87. /package/dist/{components → react-core/src/components}/CellStateOverlay.d.ts +0 -0
  88. /package/dist/{components → react-core/src/components}/ColumnMenu.d.ts +0 -0
  89. /package/dist/{components → react-core/src/components}/ColumnMenuFilterSection.d.ts +0 -0
  90. /package/dist/{components → react-core/src/components}/ColumnMenuLabelSection.d.ts +0 -0
  91. /package/dist/{components → react-core/src/components}/ColumnMenuSortSection.d.ts +0 -0
  92. /package/dist/{components → react-core/src/components}/ContextMenu.d.ts +0 -0
  93. /package/dist/{components → react-core/src/components}/Editor.d.ts +0 -0
  94. /package/dist/{components → react-core/src/components}/EditorOptions.d.ts +0 -0
  95. /package/dist/{components → react-core/src/components}/Emitter.d.ts +0 -0
  96. /package/dist/{components → react-core/src/components}/Fixed.d.ts +0 -0
  97. /package/dist/{components → react-core/src/components}/FormulaBar.d.ts +0 -0
  98. /package/dist/{components → react-core/src/components}/GridSheet.d.ts +0 -0
  99. /package/dist/{components → react-core/src/components}/HeaderCellLeft.d.ts +0 -0
  100. /package/dist/{components → react-core/src/components}/HeaderCellTop.d.ts +0 -0
  101. /package/dist/{components → react-core/src/components}/MenuItem.d.ts +0 -0
  102. /package/dist/{components → react-core/src/components}/PluginBase.d.ts +0 -0
  103. /package/dist/{components → react-core/src/components}/Resizer.d.ts +0 -0
  104. /package/dist/{components → react-core/src/components}/RowMenu.d.ts +0 -0
  105. /package/dist/{components → react-core/src/components}/ScrollHandle.d.ts +0 -0
  106. /package/dist/{components → react-core/src/components}/SearchBar.d.ts +0 -0
  107. /package/dist/{components → react-core/src/components}/StoreObserver.d.ts +0 -0
  108. /package/dist/{components → react-core/src/components}/Tabular.d.ts +0 -0
  109. /package/dist/{components → react-core/src/components}/svg/AddIcon.d.ts +0 -0
  110. /package/dist/{components → react-core/src/components}/svg/Base.d.ts +0 -0
  111. /package/dist/{components → react-core/src/components}/svg/CloseIcon.d.ts +0 -0
  112. /package/dist/{components → react-core/src/components}/svg/SearchIcon.d.ts +0 -0
  113. /package/dist/{lib → react-core/src/lib}/events.d.ts +0 -0
  114. /package/dist/{lib → react-core/src/lib}/paste.d.ts +0 -0
  115. /package/dist/{store → react-core/src/store}/index.d.ts +0 -0
@@ -1,23 +0,0 @@
1
- import { Sheet } from '../../lib/sheet';
2
- import { Id, PointType } from '../../types';
3
- export declare const gt: (left: any, right: any) => boolean;
4
- export declare const gte: (left: any, right: any) => boolean;
5
- export declare const lt: (left: any, right: any) => boolean;
6
- export declare const lte: (left: any, right: any) => boolean;
7
- export declare const eq: (left: any, right: any) => boolean;
8
- export declare const ne: (left: any, right: any) => boolean;
9
- export type EnsureNumberOptions = {
10
- alternative?: number;
11
- ignore?: boolean;
12
- };
13
- export type EnsureBooleanOptions = {
14
- alternative?: boolean;
15
- ignore?: boolean;
16
- };
17
- export declare const ensureNumber: (value: any, options?: EnsureNumberOptions) => number;
18
- export declare const ensureString: (value: any) => string;
19
- export declare const ensureBoolean: (value: any, options?: EnsureBooleanOptions) => boolean;
20
- export declare const check: (value: any, condition: string) => boolean;
21
- export declare const eachMatrix: (value: any, callback: (v: any, relativePoint: PointType) => void, at: Id) => void;
22
- export declare const createBooleanMask: (sheets: Sheet[], conditions: string[], at: Id) => boolean[][];
23
- //# sourceMappingURL=__utils.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class AbsFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(value: any): number;
8
- }
9
- //# sourceMappingURL=abs.d.ts.map
@@ -1,10 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- import { Time } from '../../lib/time';
3
- export declare class AddFunction extends BaseFunction {
4
- example: string;
5
- description: string;
6
- defs: FunctionArgumentDefinition[];
7
- category: FunctionCategory;
8
- protected main(v1: number | Date | Time, v2: number | Date | Time): number | Date;
9
- }
10
- //# sourceMappingURL=add.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class AndFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(...values: any[]): boolean;
8
- }
9
- //# sourceMappingURL=and.d.ts.map
@@ -1,12 +0,0 @@
1
- import { Spilling } from '../../sentinels';
2
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
3
- export declare class ArrayformulaFunction extends BaseFunction {
4
- autoSpilling: boolean;
5
- example: string;
6
- description: string;
7
- defs: FunctionArgumentDefinition[];
8
- category: FunctionCategory;
9
- protected broadcastDisabled: boolean;
10
- protected main(value: any): any[] | Spilling;
11
- }
12
- //# sourceMappingURL=arrayformula.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class AverageFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(...values: any[]): number;
8
- }
9
- //# sourceMappingURL=average.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class ConcatFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(v1: any, v2: any): string;
8
- }
9
- //# sourceMappingURL=concat.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class CountFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(...values: any[]): number;
8
- }
9
- //# sourceMappingURL=count.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class CountaFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(...values: any[]): number;
8
- }
9
- //# sourceMappingURL=counta.d.ts.map
@@ -1,10 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class DivideFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected validate(args: any[]): any[];
8
- protected main(divided: number, divisor: number): number;
9
- }
10
- //# sourceMappingURL=divide.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class EqFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(v1: any, v2: any): boolean;
8
- }
9
- //# sourceMappingURL=eq.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class GtFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(v1: any, v2: any): boolean;
8
- }
9
- //# sourceMappingURL=gt.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class GteFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(v1: any, v2: any): boolean;
8
- }
9
- //# sourceMappingURL=gte.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class IfFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(condition: any, v1: any, v2?: any): any;
8
- }
9
- //# sourceMappingURL=if.d.ts.map
@@ -1,10 +0,0 @@
1
- import { FunctionArgumentDefinition, BaseFunction, FunctionCategory } from './__base';
2
- export declare class IfErrorFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected broadcastDisabled: boolean;
8
- protected main(value: any, valueIfError?: any): any;
9
- }
10
- //# sourceMappingURL=iferror.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class LenFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(text: any): number;
8
- }
9
- //# sourceMappingURL=len.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class LtFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(v1: any, v2: any): boolean;
8
- }
9
- //# sourceMappingURL=lt.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class LteFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(v1: any, v2: any): boolean;
8
- }
9
- //# sourceMappingURL=lte.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class MaxFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(...values: any[]): number;
8
- }
9
- //# sourceMappingURL=max.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class MinFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(...values: any[]): number;
8
- }
9
- //# sourceMappingURL=min.d.ts.map
@@ -1,10 +0,0 @@
1
- import { Time } from '../../lib/time';
2
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
3
- export declare class MinusFunction extends BaseFunction {
4
- example: string;
5
- description: string;
6
- defs: FunctionArgumentDefinition[];
7
- category: FunctionCategory;
8
- protected main(v1: number | Date | Time, v2: number | Date | Time): number | Date | Time;
9
- }
10
- //# sourceMappingURL=minus.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class MultiplyFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(v1: any, v2: any): number;
8
- }
9
- //# sourceMappingURL=multiply.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class NeFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(v1: number, v2: number): boolean;
8
- }
9
- //# sourceMappingURL=ne.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class NotFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(v1: any): boolean;
8
- }
9
- //# sourceMappingURL=not.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class NowFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(): Date;
8
- }
9
- //# sourceMappingURL=now.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class OrFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(...values: any[]): boolean;
8
- }
9
- //# sourceMappingURL=or.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class PowerFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(base: any, exponent: any): number;
8
- }
9
- //# sourceMappingURL=power.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class SumFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(...values: any[]): number;
8
- }
9
- //# sourceMappingURL=sum.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseFunction, FunctionCategory, FunctionArgumentDefinition } from './__base';
2
- export declare class UminusFunction extends BaseFunction {
3
- example: string;
4
- description: string;
5
- defs: FunctionArgumentDefinition[];
6
- category: FunctionCategory;
7
- protected main(v1: any): number;
8
- }
9
- //# sourceMappingURL=uminus.d.ts.map
@@ -1,11 +0,0 @@
1
- import { FunctionCategory, FunctionMapping, FunctionArgumentDefinition } from './functions/__base';
2
- export declare const functions: FunctionMapping;
3
- export type FunctionHelp = {
4
- name: string;
5
- category: FunctionCategory;
6
- example: string;
7
- description: string;
8
- defs: FunctionArgumentDefinition[];
9
- };
10
- export declare const getFunctionHelps: (customFunctions?: FunctionMapping) => FunctionHelp[];
11
- //# sourceMappingURL=mapping.d.ts.map
@@ -1,39 +0,0 @@
1
- import { Sheet } from '../lib/sheet';
2
- import { Id, MatrixType, PointType, Resolution } from '../types';
3
- export type SolveOptions = {
4
- raise?: boolean;
5
- resolution?: Resolution;
6
- };
7
- type SolveFormulaProps = {
8
- value: any;
9
- sheet: Sheet;
10
- point: PointType;
11
- raise?: boolean;
12
- resolution?: Resolution;
13
- at?: Id;
14
- };
15
- /**
16
- * Evaluates a single cell value (formula or literal) within the context of a sheet.
17
- * Handles caching, circular reference detection, spilling, and async pending states.
18
- * Returns the resolved scalar value (or error) for the given cell.
19
- */
20
- export declare const solveFormula: ({ value, sheet, point, raise, resolution, at }: SolveFormulaProps) => any;
21
- export type SolveSheetProps = {
22
- sheet: Sheet;
23
- raise?: boolean;
24
- at?: Id;
25
- };
26
- /**
27
- * Evaluates all cells in a Sheet and returns the results as a 2D array (MatrixType).
28
- * Each cell formula is resolved in order, with caching to avoid redundant computation.
29
- * Use this when you need the full evaluated contents of a range.
30
- */
31
- export declare const solveSheet: ({ sheet, raise, at }: SolveSheetProps) => MatrixType;
32
- export type StripSheetProps = {
33
- value: any;
34
- at?: Id;
35
- raise?: boolean;
36
- };
37
- export declare const stripSheet: ({ value, at, raise }: StripSheetProps) => any;
38
- export {};
39
- //# sourceMappingURL=solver.d.ts.map
@@ -1,17 +0,0 @@
1
- import { AreaType, PointType, StoreType } from '../types';
2
- import { Sheet } from './sheet';
3
- import { CSSProperties } from 'react';
4
- export declare class Autofill {
5
- private readonly src;
6
- private readonly dst;
7
- private readonly direction;
8
- private readonly sheet;
9
- constructor(store: StoreType, draggingTo: PointType);
10
- get applied(): Sheet;
11
- get wholeArea(): AreaType;
12
- getCellStyle(target: PointType): CSSProperties;
13
- private getDestinationArea;
14
- private suggestDirection;
15
- private getChangePatterns;
16
- }
17
- //# sourceMappingURL=autofill.d.ts.map
@@ -1,127 +0,0 @@
1
- import { Pending } from '../sentinels';
2
- import { HistoryType, RefPaletteType, SheetIdsByName, ContextsBySheetId, ZoneType, CellsByIdType, SystemsByIdType, Id, FeedbackType, EditorEvent, CursorStateType } from '../types';
3
- import { UserSheet } 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
- /** Currently in-flight async formula Pending sentinels (keyed by cell ID). */
61
- asyncPending: Map<string, Pending>;
62
- /** In-flight async formulas shared by cache key (for useInflight). */
63
- asyncInflight?: Map<string, {
64
- pending: Pending;
65
- expireTime?: number;
66
- }>;
67
- copyingSheetId: number;
68
- copyingZone: ZoneType;
69
- cutting: boolean;
70
- histories: HistoryType[];
71
- historyIndex: number;
72
- historyLimit: number;
73
- lastHistory?: HistoryType;
74
- currentHistory?: HistoryType;
75
- /** StrictMode guard: Map from action object (identity) to cached reducer result.
76
- * Using a Map instead of a single slot allows multiple batched dispatches to coexist. */
77
- _strictModeCache?: Map<unknown, unknown>;
78
- /** StrictMode guard: Map from useId component key to assigned sheetId.
79
- * Prevents double-increment of sheetHead when useState initializer runs twice in Strict Mode. */
80
- _componentSheetIds: Map<string, number>;
81
- ready: boolean;
82
- functions: FunctionMapping;
83
- policies: {
84
- [policyName: string]: PolicyType | null;
85
- };
86
- onSave?: FeedbackType;
87
- onChange?: FeedbackType;
88
- onRemoveRows?: (args: {
89
- sheet: UserSheet;
90
- ys: number[];
91
- }) => void;
92
- onRemoveCols?: (args: {
93
- sheet: UserSheet;
94
- xs: number[];
95
- }) => void;
96
- onInsertRows?: (args: {
97
- sheet: UserSheet;
98
- y: number;
99
- numRows: number;
100
- }) => void;
101
- onInsertCols?: (args: {
102
- sheet: UserSheet;
103
- x: number;
104
- numCols: number;
105
- }) => void;
106
- onSelect?: FeedbackType;
107
- onKeyUp?: (args: {
108
- e: EditorEvent;
109
- points: CursorStateType;
110
- }) => void;
111
- onInit?: (args: {
112
- sheet: UserSheet;
113
- }) => void;
114
- transmit: (newBook?: TransmitProps) => void;
115
- boot(): void;
116
- constructor({ historyLimit, additionalFunctions, policies, onSave, onChange, onRemoveRows, onRemoveCols, onInsertRows, onInsertCols, onSelect, onKeyUp, onInit, }?: RegistryProps);
117
- }
118
- export type TransmitProps = Partial<Registry>;
119
- export declare const createRegistry: (props?: RegistryProps) => Registry;
120
- /** @deprecated use createRegistry */
121
- export declare const createBinding: (props?: RegistryProps) => Registry;
122
- export type BookType = {
123
- registry: Registry;
124
- };
125
- export declare const createBook: (props?: RegistryProps) => BookType;
126
- export declare const useBook: (props?: RegistryProps) => BookType;
127
- //# sourceMappingURL=book.d.ts.map
@@ -1,17 +0,0 @@
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
@@ -1,22 +0,0 @@
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
@@ -1,2 +0,0 @@
1
- export declare function parseDate(value: string): Date | undefined;
2
- //# sourceMappingURL=date.d.ts.map
package/dist/lib/dom.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export declare const focus: (el: HTMLElement | null | undefined) => void;
2
- /**
3
- * Prevents Safari elastic bounce (rubber-band) at scroll boundaries.
4
- * No-op on non-Safari browsers. Returns a cleanup function to remove the listeners.
5
- */
6
- export declare const preventSafariBounce: (el: HTMLDivElement) => (() => void);
7
- //# sourceMappingURL=dom.d.ts.map
@@ -1,7 +0,0 @@
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
@@ -1,24 +0,0 @@
1
- import { PointType } from '../types';
2
- import { Sheet } from './sheet';
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, sheet: Sheet, point: PointType) => void;
13
- export declare const isFocus: (input: HTMLTextAreaElement | null) => boolean;
14
- /**
15
- * Handles auto-close behavior for double quotes in formula editing.
16
- * - Typing `"` inserts `""` and places cursor between them.
17
- * - Typing `"` when cursor is right before an auto-closed `"` skips over it.
18
- * - Backspace between empty `""` deletes both quotes.
19
- *
20
- * Returns true if the event was handled (caller should preventDefault), false otherwise.
21
- */
22
- export declare const handleFormulaQuoteAutoClose: (e: React.KeyboardEvent<HTMLTextAreaElement>, inputting: string) => boolean;
23
- export {};
24
- //# sourceMappingURL=input.d.ts.map
@@ -1,4 +0,0 @@
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