@pixerate/editor 0.24.0 → 0.26.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 (162) hide show
  1. package/README.md +101 -1
  2. package/THIRD_PARTY_NOTICES.md +40 -0
  3. package/dist/agent/index.cjs +175 -11
  4. package/dist/agent/index.cjs.map +1 -1
  5. package/dist/agent/index.d.cts +18 -4
  6. package/dist/agent/index.d.ts +18 -4
  7. package/dist/agent/index.js +168 -4
  8. package/dist/agent/index.js.map +1 -1
  9. package/dist/{arrangeShortcuts-B8O3f8-P.d.cts → arrange-BICutYPk.d.cts} +243 -29
  10. package/dist/{arrangeShortcuts-sLlD2rSX.d.ts → arrange-BICutYPk.d.ts} +243 -29
  11. package/dist/builtins-CdPcLwwF.d.cts +176 -0
  12. package/dist/builtins-Chj6zv_O.d.ts +176 -0
  13. package/dist/canvas/index.cjs +8588 -1857
  14. package/dist/canvas/index.cjs.map +1 -1
  15. package/dist/canvas/index.d.cts +1847 -9
  16. package/dist/canvas/index.d.ts +1847 -9
  17. package/dist/canvas/index.js +8577 -1846
  18. package/dist/canvas/index.js.map +1 -1
  19. package/dist/chunk-3CC7OPUQ.cjs +831 -0
  20. package/dist/chunk-3CC7OPUQ.cjs.map +1 -0
  21. package/dist/chunk-4BVP64JJ.cjs +1406 -0
  22. package/dist/chunk-4BVP64JJ.cjs.map +1 -0
  23. package/dist/chunk-BVP3TSLH.cjs +69 -0
  24. package/dist/chunk-BVP3TSLH.cjs.map +1 -0
  25. package/dist/{chunk-OLZJXL4R.cjs → chunk-CS6NZWWA.cjs} +59 -25
  26. package/dist/chunk-CS6NZWWA.cjs.map +1 -0
  27. package/dist/{chunk-MCSJFWAO.cjs → chunk-EWCOFSCQ.cjs} +685 -100
  28. package/dist/chunk-EWCOFSCQ.cjs.map +1 -0
  29. package/dist/chunk-HDYMLS3X.cjs +409 -0
  30. package/dist/chunk-HDYMLS3X.cjs.map +1 -0
  31. package/dist/chunk-HRMEDT2L.js +1406 -0
  32. package/dist/chunk-HRMEDT2L.js.map +1 -0
  33. package/dist/{chunk-D27YFC46.cjs → chunk-IFHKKVXH.cjs} +382 -63
  34. package/dist/chunk-IFHKKVXH.cjs.map +1 -0
  35. package/dist/{chunk-PGNZKFQS.js → chunk-JOIREKL7.js} +137 -58
  36. package/dist/chunk-JOIREKL7.js.map +1 -0
  37. package/dist/chunk-KRGXUQ2Y.js +1696 -0
  38. package/dist/chunk-KRGXUQ2Y.js.map +1 -0
  39. package/dist/{chunk-3LV6RRPH.js → chunk-MHEPLBFB.js} +2 -2
  40. package/dist/chunk-MR2764X2.js +831 -0
  41. package/dist/chunk-MR2764X2.js.map +1 -0
  42. package/dist/{chunk-XNORY7M6.cjs → chunk-NFVBT3UZ.cjs} +166 -87
  43. package/dist/chunk-NFVBT3UZ.cjs.map +1 -0
  44. package/dist/chunk-NQF32I6Z.cjs +6478 -0
  45. package/dist/chunk-NQF32I6Z.cjs.map +1 -0
  46. package/dist/chunk-O5RYH2PG.js +69 -0
  47. package/dist/chunk-O5RYH2PG.js.map +1 -0
  48. package/dist/{chunk-ITBSKI26.js → chunk-Q2OHWD2A.js} +1064 -360
  49. package/dist/chunk-Q2OHWD2A.js.map +1 -0
  50. package/dist/{chunk-FODNLX5N.js → chunk-QJSOZFCZ.js} +38 -4
  51. package/dist/chunk-QJSOZFCZ.js.map +1 -0
  52. package/dist/{chunk-SML64VJG.cjs → chunk-RRREAOVM.cjs} +4 -4
  53. package/dist/{chunk-SML64VJG.cjs.map → chunk-RRREAOVM.cjs.map} +1 -1
  54. package/dist/{chunk-5S3Z4PPF.js → chunk-SWE3NPOU.js} +347 -28
  55. package/dist/chunk-SWE3NPOU.js.map +1 -0
  56. package/dist/chunk-TXXNBDQX.cjs +1696 -0
  57. package/dist/chunk-TXXNBDQX.cjs.map +1 -0
  58. package/dist/chunk-UBCFIABU.js +409 -0
  59. package/dist/chunk-UBCFIABU.js.map +1 -0
  60. package/dist/chunk-X7HXL2SB.js +6478 -0
  61. package/dist/chunk-X7HXL2SB.js.map +1 -0
  62. package/dist/{chunk-SBCZ6RN5.cjs → chunk-YOMYSFJU.cjs} +1163 -459
  63. package/dist/chunk-YOMYSFJU.cjs.map +1 -0
  64. package/dist/{chunk-3CN2WD3X.js → chunk-ZRNHGAQT.js} +661 -76
  65. package/dist/chunk-ZRNHGAQT.js.map +1 -0
  66. package/dist/commands/index.cjs +425 -4
  67. package/dist/commands/index.cjs.map +1 -1
  68. package/dist/commands/index.d.cts +39 -77
  69. package/dist/commands/index.d.ts +39 -77
  70. package/dist/commands/index.js +424 -3
  71. package/dist/commands/index.js.map +1 -1
  72. package/dist/compare/index.cjs +3 -3
  73. package/dist/compare/index.d.cts +1 -1
  74. package/dist/compare/index.d.ts +1 -1
  75. package/dist/compare/index.js +2 -2
  76. package/dist/controller-CxXGOEmy.d.cts +2038 -0
  77. package/dist/controller-CxXGOEmy.d.ts +2038 -0
  78. package/dist/{documents-BQjzJNe2.d.ts → documents-CHT1U5Vs.d.ts} +10 -0
  79. package/dist/{documents-KRTPhvst.d.cts → documents-Gp7wb0Me.d.cts} +10 -0
  80. package/dist/export/index.cjs +36 -0
  81. package/dist/export/index.cjs.map +1 -0
  82. package/dist/export/index.d.cts +243 -0
  83. package/dist/export/index.d.ts +243 -0
  84. package/dist/export/index.js +36 -0
  85. package/dist/export/index.js.map +1 -0
  86. package/dist/extensions/index.cjs +101 -6
  87. package/dist/extensions/index.cjs.map +1 -1
  88. package/dist/extensions/index.d.cts +18 -5
  89. package/dist/extensions/index.d.ts +18 -5
  90. package/dist/extensions/index.js +101 -6
  91. package/dist/generation/index.cjs +1013 -69
  92. package/dist/generation/index.cjs.map +1 -1
  93. package/dist/generation/index.d.cts +474 -13
  94. package/dist/generation/index.d.ts +474 -13
  95. package/dist/generation/index.js +976 -32
  96. package/dist/generation/index.js.map +1 -1
  97. package/dist/image-editor/index.cjs +3385 -1275
  98. package/dist/image-editor/index.cjs.map +1 -1
  99. package/dist/image-editor/index.d.cts +693 -128
  100. package/dist/image-editor/index.d.ts +693 -128
  101. package/dist/image-editor/index.js +3325 -1215
  102. package/dist/image-editor/index.js.map +1 -1
  103. package/dist/{index-fJrlkJCd.d.ts → index-B273Zllk.d.ts} +500 -7
  104. package/dist/{index-BhJBSm2d.d.cts → index-jcJwmBYt.d.cts} +500 -7
  105. package/dist/index.cjs +1603 -45
  106. package/dist/index.cjs.map +1 -1
  107. package/dist/index.d.cts +154 -27
  108. package/dist/index.d.ts +154 -27
  109. package/dist/index.js +1584 -26
  110. package/dist/index.js.map +1 -1
  111. package/dist/mention-text-CDnCFd3c.d.cts +53 -0
  112. package/dist/mention-text-CDnCFd3c.d.ts +53 -0
  113. package/dist/model-C1zApQM8.d.cts +219 -0
  114. package/dist/model-C1zApQM8.d.ts +219 -0
  115. package/dist/persistence/index.d.cts +3 -120
  116. package/dist/persistence/index.d.ts +3 -120
  117. package/dist/registry-CED5C0lA.d.cts +204 -0
  118. package/dist/registry-CED5C0lA.d.ts +204 -0
  119. package/dist/{registry-GJI4gToU.d.cts → registry-CEgwXED1.d.cts} +12 -1
  120. package/dist/{registry-GJI4gToU.d.ts → registry-CEgwXED1.d.ts} +12 -1
  121. package/dist/{registry-D32LpIc4.d.cts → registry-D0GADKc7.d.cts} +1 -1
  122. package/dist/{registry-evKTP4ls.d.ts → registry-DhVUZioj.d.ts} +1 -1
  123. package/dist/serializers/index.cjs +12 -4
  124. package/dist/serializers/index.cjs.map +1 -1
  125. package/dist/serializers/index.d.cts +41 -13
  126. package/dist/serializers/index.d.ts +41 -13
  127. package/dist/serializers/index.js +12 -4
  128. package/dist/spreadsheet/index.cjs +157 -3
  129. package/dist/spreadsheet/index.cjs.map +1 -1
  130. package/dist/spreadsheet/index.d.cts +534 -11
  131. package/dist/spreadsheet/index.d.ts +534 -11
  132. package/dist/spreadsheet/index.js +157 -3
  133. package/dist/storage-BpFfspHm.d.cts +120 -0
  134. package/dist/storage-BpFfspHm.d.ts +120 -0
  135. package/dist/tokens/index.cjs +115 -0
  136. package/dist/tokens/index.cjs.map +1 -0
  137. package/dist/tokens/index.d.cts +212 -0
  138. package/dist/tokens/index.d.ts +212 -0
  139. package/dist/tokens/index.js +115 -0
  140. package/dist/tokens/index.js.map +1 -0
  141. package/dist/{track-changes-BK5sVf4_.d.cts → track-changes-D_VAPELi.d.cts} +95 -11
  142. package/dist/{track-changes-CDjCrwKe.d.ts → track-changes-Db_fGEvx.d.ts} +95 -11
  143. package/package.json +15 -1
  144. package/dist/chunk-3CN2WD3X.js.map +0 -1
  145. package/dist/chunk-5S3Z4PPF.js.map +0 -1
  146. package/dist/chunk-D27YFC46.cjs.map +0 -1
  147. package/dist/chunk-FODNLX5N.js.map +0 -1
  148. package/dist/chunk-ITBSKI26.js.map +0 -1
  149. package/dist/chunk-MA2F5KHF.cjs +0 -3223
  150. package/dist/chunk-MA2F5KHF.cjs.map +0 -1
  151. package/dist/chunk-MCSJFWAO.cjs.map +0 -1
  152. package/dist/chunk-OLZJXL4R.cjs.map +0 -1
  153. package/dist/chunk-PGNZKFQS.js.map +0 -1
  154. package/dist/chunk-SBCZ6RN5.cjs.map +0 -1
  155. package/dist/chunk-U5KWZU4X.js +0 -3223
  156. package/dist/chunk-U5KWZU4X.js.map +0 -1
  157. package/dist/chunk-XNORY7M6.cjs.map +0 -1
  158. package/dist/controller-BhLLAoi8.d.cts +0 -1000
  159. package/dist/controller-BhLLAoi8.d.ts +0 -1000
  160. package/dist/types-DX4Mh4SL.d.cts +0 -217
  161. package/dist/types-DX4Mh4SL.d.ts +0 -217
  162. /package/dist/{chunk-3LV6RRPH.js.map → chunk-MHEPLBFB.js.map} +0 -0
@@ -1,16 +1,40 @@
1
1
  import {
2
+ CONDITIONAL_FORMAT_ICON_SETS,
3
+ CONDITIONAL_FORMAT_PRESETS,
4
+ CONDITIONAL_FORMAT_STYLE_PRESETS,
5
+ CONDITIONAL_FORMAT_TIME_PERIODS,
6
+ ConditionalFormatEngine,
7
+ DATA_VALIDATION_ERROR_STYLE_OPTIONS,
8
+ DATA_VALIDATION_OPERATOR_OPTIONS,
9
+ DATA_VALIDATION_TYPE_OPTIONS,
2
10
  DEFAULT_COLUMN_WIDTH,
11
+ DEFAULT_CONDITIONAL_FORMAT_STYLE,
12
+ DEFAULT_DATA_VALIDATION_MESSAGE,
13
+ DEFAULT_DATA_VALIDATION_TITLE,
3
14
  DEFAULT_ROW_HEIGHT,
4
15
  DataSourceBinder,
5
16
  DependencyGraph,
17
+ EMPTY_CONDITIONAL_FORMAT_OVERLAY,
18
+ IntervalIndex,
19
+ MAX_DEFINED_NAME_LENGTH,
20
+ MAX_SHEET_NAME_LENGTH,
6
21
  NUMBER_FORMAT_PRESETS,
7
22
  SPREADSHEET_CLIPBOARD_MIME,
23
+ SPREADSHEET_COLUMN_HEADER_HEIGHT,
24
+ SPREADSHEET_DEFAULT_VIEWPORT,
25
+ SPREADSHEET_GROUP_ROW_HEIGHT,
8
26
  SPREADSHEET_IMPORT_ADAPTERS,
27
+ SPREADSHEET_ROW_HEADER_WIDTH,
9
28
  SPREADSHEET_TABLE_ACTIONS,
29
+ SPREADSHEET_VIRTUAL_COLUMN_THRESHOLD,
30
+ SPREADSHEET_VIRTUAL_ROW_THRESHOLD,
10
31
  SpreadsheetController,
32
+ adjustRangeForStructuralChange,
33
+ adjustRangesForStructuralChange,
11
34
  aggregateValues,
12
35
  applyFormulaSuggestion,
13
36
  bindSpreadsheetTableActions,
37
+ blendConditionalFormatColors,
14
38
  buildSpreadsheetView,
15
39
  cellFormatForNumberFormat,
16
40
  clampMenuPosition,
@@ -18,44 +42,94 @@ import {
18
42
  compareCellValues,
19
43
  computeFillTarget,
20
44
  computeRowGroups,
45
+ conditionalFormatContrastColor,
46
+ conditionalFormatIconCount,
47
+ conditionalFormatNumber,
48
+ conditionalFormatStyleString,
49
+ copySheetName,
50
+ createConditionalFormatRule,
21
51
  createSpreadsheetClipboardData,
22
52
  csvImportAdapter,
53
+ defaultIconThresholds,
54
+ deleteSheetInFormula,
55
+ describeConditionalFormat,
56
+ describeDataValidation,
57
+ evaluateConditionalFormats,
23
58
  extractCellDependencies,
59
+ extractNameDependencies,
60
+ extractReferenceDependencies,
24
61
  fillSeries,
62
+ findDataValidation,
63
+ findInvalidCells,
64
+ forEachRangeCell,
25
65
  formatCellDisplay,
26
66
  formatCellForDisplay,
67
+ formatRuleRanges,
68
+ formatSheetPrefix,
27
69
  formatValueWithCode,
70
+ formulaIdentifiers,
71
+ fullSpreadsheetViewWindow,
72
+ getConditionalFormatCss,
73
+ getConditionalFormatIcon,
74
+ getDataBarCss,
28
75
  getFillDirection,
29
76
  getFormulaCaretContext,
30
77
  getFormulaHints,
78
+ getNameManagerRows,
31
79
  getRowSection,
80
+ getSheetTabMenuItems,
32
81
  getSpreadsheetMenuItems,
82
+ getSpreadsheetScrollToCell,
83
+ getSpreadsheetViewWindow,
33
84
  getTableSections,
85
+ getValidationListValues,
34
86
  importFileIntoSpreadsheet,
35
87
  isBlankValue,
36
88
  isGeneralNumberFormat,
89
+ isLambdaDefinition,
37
90
  isSingleCellRange,
38
91
  mapFormulaReferences,
39
92
  matchesFilterRule,
93
+ matchesTimePeriod,
94
+ measureSpreadsheetView,
95
+ nextSheetName,
40
96
  normalizeRange,
41
97
  numberFormatForCellFormat,
42
98
  offsetFormulaReferences,
43
99
  parseHtmlTable,
100
+ parseRuleRanges,
101
+ quoteSheetName,
44
102
  rangeContains,
45
103
  rangeContainsRange,
104
+ rangeDependencyKey,
105
+ rangesContain,
46
106
  rangesIntersect,
47
107
  readSpreadsheetClipboard,
48
108
  rebaseClipboardRows,
49
109
  registerSpreadsheetImportAdapters,
50
110
  remapFormulaReferences,
111
+ renameNameInFormula,
112
+ renameSheetInFormula,
51
113
  roundFloat,
52
114
  rowPassesFilters,
115
+ ruleAnchor,
116
+ ruleFormulaAt,
53
117
  runSpreadsheetMenuItem,
118
+ sameSpreadsheetViewWindow,
54
119
  serializeHtmlTable,
120
+ sheetDropIndex,
121
+ sheetNameNeedsQuotes,
55
122
  shiftFormulaReferences,
123
+ shiftRuleFormula,
124
+ shouldVirtualizeSpreadsheet,
125
+ subtractRange,
126
+ subtractRangeFromRanges,
56
127
  toNumber,
57
- tsvImportAdapter
58
- } from "../chunk-U5KWZU4X.js";
128
+ tsvImportAdapter,
129
+ validateCellInput,
130
+ validateDefinedName,
131
+ validateSheetName
132
+ } from "../chunk-X7HXL2SB.js";
59
133
  import {
60
134
  escapeCsvField,
61
135
  parseCsv,
@@ -66,8 +140,10 @@ import {
66
140
  import {
67
141
  FORMULA_ERRORS,
68
142
  FormulaEvaluator,
143
+ FormulaLambda,
69
144
  FormulaParser,
70
145
  MAX_FORMULA_ARRAY_SIZE,
146
+ MAX_LAMBDA_DEPTH,
71
147
  MAX_NUMBER_FORMAT_CODE_CHARS,
72
148
  NumberFormat,
73
149
  WHOLE_COLUMN_END_ROW,
@@ -89,6 +165,7 @@ import {
89
165
  getFormulaSignatureParts,
90
166
  indexToColName,
91
167
  isFormulaError,
168
+ isFormulaLambda,
92
169
  listFormulaFunctions,
93
170
  numberFormatColorToCss,
94
171
  numberToText,
@@ -105,27 +182,53 @@ import {
105
182
  tokenizeFormula,
106
183
  unregisterFormulaFunction,
107
184
  wildcardToRegExp
108
- } from "../chunk-3CN2WD3X.js";
185
+ } from "../chunk-ZRNHGAQT.js";
109
186
  export {
187
+ CONDITIONAL_FORMAT_ICON_SETS,
188
+ CONDITIONAL_FORMAT_PRESETS,
189
+ CONDITIONAL_FORMAT_STYLE_PRESETS,
190
+ CONDITIONAL_FORMAT_TIME_PERIODS,
191
+ ConditionalFormatEngine,
192
+ DATA_VALIDATION_ERROR_STYLE_OPTIONS,
193
+ DATA_VALIDATION_OPERATOR_OPTIONS,
194
+ DATA_VALIDATION_TYPE_OPTIONS,
110
195
  DEFAULT_COLUMN_WIDTH,
196
+ DEFAULT_CONDITIONAL_FORMAT_STYLE,
197
+ DEFAULT_DATA_VALIDATION_MESSAGE,
198
+ DEFAULT_DATA_VALIDATION_TITLE,
111
199
  DEFAULT_ROW_HEIGHT,
112
200
  DataSourceBinder,
113
201
  DependencyGraph,
202
+ EMPTY_CONDITIONAL_FORMAT_OVERLAY,
114
203
  FORMULA_ERRORS,
115
204
  FormulaEvaluator,
205
+ FormulaLambda,
116
206
  FormulaParser,
207
+ IntervalIndex,
208
+ MAX_DEFINED_NAME_LENGTH,
117
209
  MAX_FORMULA_ARRAY_SIZE,
210
+ MAX_LAMBDA_DEPTH,
118
211
  MAX_NUMBER_FORMAT_CODE_CHARS,
212
+ MAX_SHEET_NAME_LENGTH,
119
213
  NUMBER_FORMAT_PRESETS,
120
214
  NumberFormat,
121
215
  SPREADSHEET_CLIPBOARD_MIME,
216
+ SPREADSHEET_COLUMN_HEADER_HEIGHT,
217
+ SPREADSHEET_DEFAULT_VIEWPORT,
218
+ SPREADSHEET_GROUP_ROW_HEIGHT,
122
219
  SPREADSHEET_IMPORT_ADAPTERS,
220
+ SPREADSHEET_ROW_HEADER_WIDTH,
123
221
  SPREADSHEET_TABLE_ACTIONS,
222
+ SPREADSHEET_VIRTUAL_COLUMN_THRESHOLD,
223
+ SPREADSHEET_VIRTUAL_ROW_THRESHOLD,
124
224
  SpreadsheetController,
125
225
  WHOLE_COLUMN_END_ROW,
226
+ adjustRangeForStructuralChange,
227
+ adjustRangesForStructuralChange,
126
228
  aggregateValues,
127
229
  applyFormulaSuggestion,
128
230
  bindSpreadsheetTableActions,
231
+ blendConditionalFormatColors,
129
232
  buildSpreadsheetView,
130
233
  builtinNumberFormat,
131
234
  builtinNumberFormatId,
@@ -140,19 +243,42 @@ export {
140
243
  compareValues,
141
244
  computeFillTarget,
142
245
  computeRowGroups,
246
+ conditionalFormatContrastColor,
247
+ conditionalFormatIconCount,
248
+ conditionalFormatNumber,
249
+ conditionalFormatStyleString,
250
+ copySheetName,
251
+ createConditionalFormatRule,
143
252
  createSpreadsheetClipboardData,
144
253
  csvImportAdapter,
145
254
  dateValueToSerial,
255
+ defaultIconThresholds,
256
+ deleteSheetInFormula,
257
+ describeConditionalFormat,
258
+ describeDataValidation,
146
259
  describeFormulaError,
147
260
  escapeCsvField,
261
+ evaluateConditionalFormats,
148
262
  extractCellDependencies,
263
+ extractNameDependencies,
264
+ extractReferenceDependencies,
149
265
  fillSeries,
266
+ findDataValidation,
267
+ findInvalidCells,
268
+ forEachRangeCell,
150
269
  formatCellDisplay,
151
270
  formatCellForDisplay,
152
271
  formatGeneralFit,
153
272
  formatNumberFormatValue,
273
+ formatRuleRanges,
274
+ formatSheetPrefix,
154
275
  formatTextFunction,
155
276
  formatValueWithCode,
277
+ formulaIdentifiers,
278
+ fullSpreadsheetViewWindow,
279
+ getConditionalFormatCss,
280
+ getConditionalFormatIcon,
281
+ getDataBarCss,
156
282
  getFillDirection,
157
283
  getFormulaArgumentSpecIndex,
158
284
  getFormulaCaretContext,
@@ -160,18 +286,28 @@ export {
160
286
  getFormulaHints,
161
287
  getFormulaSignature,
162
288
  getFormulaSignatureParts,
289
+ getNameManagerRows,
163
290
  getRowSection,
291
+ getSheetTabMenuItems,
164
292
  getSpreadsheetMenuItems,
293
+ getSpreadsheetScrollToCell,
294
+ getSpreadsheetViewWindow,
165
295
  getTableSections,
296
+ getValidationListValues,
166
297
  importFileIntoSpreadsheet,
167
298
  indexToColName,
168
299
  isBlankValue,
169
300
  isFormulaError,
301
+ isFormulaLambda,
170
302
  isGeneralNumberFormat,
303
+ isLambdaDefinition,
171
304
  isSingleCellRange,
172
305
  listFormulaFunctions,
173
306
  mapFormulaReferences,
174
307
  matchesFilterRule,
308
+ matchesTimePeriod,
309
+ measureSpreadsheetView,
310
+ nextSheetName,
175
311
  normalizeRange,
176
312
  numberFormatColorToCss,
177
313
  numberFormatForCellFormat,
@@ -185,29 +321,47 @@ export {
185
321
  parseHtmlTable,
186
322
  parseNumberText,
187
323
  parseRange,
324
+ parseRuleRanges,
188
325
  parseTsv,
326
+ quoteSheetName,
189
327
  rangeContains,
190
328
  rangeContainsRange,
329
+ rangeDependencyKey,
330
+ rangesContain,
191
331
  rangesIntersect,
192
332
  readSpreadsheetClipboard,
193
333
  rebaseClipboardRows,
194
334
  registerFormulaFunction,
195
335
  registerSpreadsheetImportAdapters,
196
336
  remapFormulaReferences,
337
+ renameNameInFormula,
338
+ renameSheetInFormula,
197
339
  roundFloat,
198
340
  rowPassesFilters,
341
+ ruleAnchor,
342
+ ruleFormulaAt,
199
343
  runSpreadsheetMenuItem,
344
+ sameSpreadsheetViewWindow,
200
345
  searchFormulaFunctions,
201
346
  serialFromYmd,
202
347
  serializeCsv,
203
348
  serializeHtmlTable,
204
349
  serializeTsv,
350
+ sheetDropIndex,
351
+ sheetNameNeedsQuotes,
205
352
  shiftFormulaReferences,
353
+ shiftRuleFormula,
354
+ shouldVirtualizeSpreadsheet,
206
355
  sortCompareValues,
356
+ subtractRange,
357
+ subtractRangeFromRanges,
207
358
  toNumber,
208
359
  tokenizeFormula,
209
360
  tsvImportAdapter,
210
361
  unregisterFormulaFunction,
362
+ validateCellInput,
363
+ validateDefinedName,
364
+ validateSheetName,
211
365
  wildcardToRegExp
212
366
  };
213
367
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Key/value storage adapters for autosave and crash recovery. Every adapter is
3
+ * async, stores strings, feature-detects its backend (an unavailable backend
4
+ * rejects every call with `StorageUnavailableError` instead of throwing at
5
+ * construction, so SSR and old browsers are safe) and accepts an injectable
6
+ * failure mode for tests.
7
+ */
8
+ type StorageOperation = "get" | "set" | "remove";
9
+ /**
10
+ * Injected failure: return `true` (or an `Error`) to make that operation fail.
11
+ * Example: `failure: (op) => op === "set"` simulates a full disk.
12
+ */
13
+ type StorageFailureMode = (operation: StorageOperation, key: string) => boolean | Error | undefined | void;
14
+ interface StorageAdapter {
15
+ /** Short backend name, e.g. `"memory"`, `"localStorage"`, `"indexedDB"`, `"opfs"`. */
16
+ readonly kind: string;
17
+ /** Whether the backend was found. When `false`, every call rejects. */
18
+ readonly available: boolean;
19
+ get(key: string): Promise<string | null>;
20
+ set(key: string, value: string): Promise<void>;
21
+ remove(key: string): Promise<void>;
22
+ }
23
+ interface StorageAdapterOptions {
24
+ failure?: StorageFailureMode;
25
+ }
26
+ declare class StorageUnavailableError extends Error {
27
+ constructor(kind: string);
28
+ }
29
+ declare class InjectedStorageError extends Error {
30
+ constructor(operation: StorageOperation, key: string);
31
+ }
32
+ /** Wraps an adapter so `failure` can make any of its operations fail. */
33
+ declare function withStorageFailures(inner: StorageAdapter, failure: StorageFailureMode): StorageAdapter;
34
+ interface MemoryStorage extends StorageAdapter {
35
+ /** The underlying map (inspect it in tests). */
36
+ readonly entries: Map<string, string>;
37
+ }
38
+ /** In-memory storage (tests, SSR, or a session-only fallback). */
39
+ declare function createMemoryStorage(options?: StorageAdapterOptions & {
40
+ initial?: Record<string, string>;
41
+ }): MemoryStorage;
42
+ /** Minimal `Storage` surface used by the localStorage adapter. */
43
+ interface WebStorageLike {
44
+ getItem(key: string): string | null;
45
+ setItem(key: string, value: string): void;
46
+ removeItem(key: string): void;
47
+ }
48
+ interface LocalStorageAdapterOptions extends StorageAdapterOptions {
49
+ /** Storage to use (default `globalThis.localStorage`, e.g. pass `sessionStorage`). */
50
+ storage?: WebStorageLike;
51
+ }
52
+ /** Whether `localStorage` can be used (it throws when site data is blocked). */
53
+ declare function isLocalStorageAvailable(): boolean;
54
+ /**
55
+ * `localStorage` adapter; every key is prefixed with `prefix`. Writes are
56
+ * synchronous under the hood, so they complete even inside `pagehide`.
57
+ * A full quota rejects the `set` (`QuotaExceededError`).
58
+ */
59
+ declare function createLocalStorageAdapter(prefix?: string, options?: LocalStorageAdapterOptions): StorageAdapter;
60
+ /** Minimal `IDBFactory` surface (the real `indexedDB`, or a fake in tests). */
61
+ interface IdbFactoryLike {
62
+ open(name: string, version?: number): any;
63
+ }
64
+ interface IndexedDbAdapterOptions extends StorageAdapterOptions {
65
+ /** Object store name (default `"kv"`). */
66
+ store?: string;
67
+ /** Factory to use (default `globalThis.indexedDB`). */
68
+ indexedDB?: IdbFactoryLike;
69
+ }
70
+ /** Whether `indexedDB` exists in this environment. */
71
+ declare function isIndexedDbAvailable(): boolean;
72
+ /**
73
+ * IndexedDB adapter: one database `name` with a single key/value object store.
74
+ * A `set` resolves when its transaction completes (not merely when the request
75
+ * succeeds), so a resolved write is durable.
76
+ */
77
+ declare function createIndexedDbAdapter(name?: string, options?: IndexedDbAdapterOptions): StorageAdapter;
78
+ /** Minimal `FileSystemDirectoryHandle` surface used by the OPFS adapter. */
79
+ interface OpfsDirectoryLike {
80
+ getDirectoryHandle(name: string, options?: {
81
+ create?: boolean;
82
+ }): Promise<OpfsDirectoryLike>;
83
+ getFileHandle(name: string, options?: {
84
+ create?: boolean;
85
+ }): Promise<OpfsFileLike>;
86
+ removeEntry(name: string): Promise<void>;
87
+ }
88
+ interface OpfsFileLike {
89
+ getFile(): Promise<{
90
+ text(): Promise<string>;
91
+ }>;
92
+ createWritable?(): Promise<{
93
+ write(data: string): Promise<void>;
94
+ close(): Promise<void>;
95
+ }>;
96
+ /** Rename in place (Chromium, Safari). Used for temp-file + rename writes. */
97
+ move?(name: string): Promise<void>;
98
+ }
99
+ interface OpfsAdapterOptions extends StorageAdapterOptions {
100
+ /** Root directory (default `navigator.storage.getDirectory()`). */
101
+ root?: () => Promise<OpfsDirectoryLike>;
102
+ /** Force the write-then-pointer-swap strategy even when `move` exists. */
103
+ disableRename?: boolean;
104
+ }
105
+ /** Whether the Origin Private File System exists (`navigator.storage.getDirectory`). */
106
+ declare function isOpfsAvailable(): boolean;
107
+ /**
108
+ * Origin Private File System adapter. Values are files in `dir` (created on
109
+ * demand), named after the URI-encoded key.
110
+ *
111
+ * Writes never leave a half-written value behind: where file handles support
112
+ * `move`, the value is written to `<file>.tmp` and renamed over `<file>`;
113
+ * otherwise it alternates between two slots (`<file>.a` / `<file>.b`) and then
114
+ * swaps a pointer file (`<file>.ptr`), so a crash mid-write keeps the previous
115
+ * value. Main-thread writes need `createWritable` (missing in some Safari
116
+ * versions); without it, `set` rejects with `StorageUnavailableError`.
117
+ */
118
+ declare function createOpfsAdapter(dir?: string, options?: OpfsAdapterOptions): StorageAdapter;
119
+
120
+ export { type IdbFactoryLike as I, type LocalStorageAdapterOptions as L, type MemoryStorage as M, type OpfsAdapterOptions as O, type StorageAdapter as S, type WebStorageLike as W, type IndexedDbAdapterOptions as a, InjectedStorageError as b, type OpfsDirectoryLike as c, type OpfsFileLike as d, type StorageAdapterOptions as e, type StorageFailureMode as f, type StorageOperation as g, StorageUnavailableError as h, createIndexedDbAdapter as i, createLocalStorageAdapter as j, createMemoryStorage as k, createOpfsAdapter as l, isIndexedDbAvailable as m, isLocalStorageAvailable as n, isOpfsAvailable as o, withStorageFailures as w };
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Key/value storage adapters for autosave and crash recovery. Every adapter is
3
+ * async, stores strings, feature-detects its backend (an unavailable backend
4
+ * rejects every call with `StorageUnavailableError` instead of throwing at
5
+ * construction, so SSR and old browsers are safe) and accepts an injectable
6
+ * failure mode for tests.
7
+ */
8
+ type StorageOperation = "get" | "set" | "remove";
9
+ /**
10
+ * Injected failure: return `true` (or an `Error`) to make that operation fail.
11
+ * Example: `failure: (op) => op === "set"` simulates a full disk.
12
+ */
13
+ type StorageFailureMode = (operation: StorageOperation, key: string) => boolean | Error | undefined | void;
14
+ interface StorageAdapter {
15
+ /** Short backend name, e.g. `"memory"`, `"localStorage"`, `"indexedDB"`, `"opfs"`. */
16
+ readonly kind: string;
17
+ /** Whether the backend was found. When `false`, every call rejects. */
18
+ readonly available: boolean;
19
+ get(key: string): Promise<string | null>;
20
+ set(key: string, value: string): Promise<void>;
21
+ remove(key: string): Promise<void>;
22
+ }
23
+ interface StorageAdapterOptions {
24
+ failure?: StorageFailureMode;
25
+ }
26
+ declare class StorageUnavailableError extends Error {
27
+ constructor(kind: string);
28
+ }
29
+ declare class InjectedStorageError extends Error {
30
+ constructor(operation: StorageOperation, key: string);
31
+ }
32
+ /** Wraps an adapter so `failure` can make any of its operations fail. */
33
+ declare function withStorageFailures(inner: StorageAdapter, failure: StorageFailureMode): StorageAdapter;
34
+ interface MemoryStorage extends StorageAdapter {
35
+ /** The underlying map (inspect it in tests). */
36
+ readonly entries: Map<string, string>;
37
+ }
38
+ /** In-memory storage (tests, SSR, or a session-only fallback). */
39
+ declare function createMemoryStorage(options?: StorageAdapterOptions & {
40
+ initial?: Record<string, string>;
41
+ }): MemoryStorage;
42
+ /** Minimal `Storage` surface used by the localStorage adapter. */
43
+ interface WebStorageLike {
44
+ getItem(key: string): string | null;
45
+ setItem(key: string, value: string): void;
46
+ removeItem(key: string): void;
47
+ }
48
+ interface LocalStorageAdapterOptions extends StorageAdapterOptions {
49
+ /** Storage to use (default `globalThis.localStorage`, e.g. pass `sessionStorage`). */
50
+ storage?: WebStorageLike;
51
+ }
52
+ /** Whether `localStorage` can be used (it throws when site data is blocked). */
53
+ declare function isLocalStorageAvailable(): boolean;
54
+ /**
55
+ * `localStorage` adapter; every key is prefixed with `prefix`. Writes are
56
+ * synchronous under the hood, so they complete even inside `pagehide`.
57
+ * A full quota rejects the `set` (`QuotaExceededError`).
58
+ */
59
+ declare function createLocalStorageAdapter(prefix?: string, options?: LocalStorageAdapterOptions): StorageAdapter;
60
+ /** Minimal `IDBFactory` surface (the real `indexedDB`, or a fake in tests). */
61
+ interface IdbFactoryLike {
62
+ open(name: string, version?: number): any;
63
+ }
64
+ interface IndexedDbAdapterOptions extends StorageAdapterOptions {
65
+ /** Object store name (default `"kv"`). */
66
+ store?: string;
67
+ /** Factory to use (default `globalThis.indexedDB`). */
68
+ indexedDB?: IdbFactoryLike;
69
+ }
70
+ /** Whether `indexedDB` exists in this environment. */
71
+ declare function isIndexedDbAvailable(): boolean;
72
+ /**
73
+ * IndexedDB adapter: one database `name` with a single key/value object store.
74
+ * A `set` resolves when its transaction completes (not merely when the request
75
+ * succeeds), so a resolved write is durable.
76
+ */
77
+ declare function createIndexedDbAdapter(name?: string, options?: IndexedDbAdapterOptions): StorageAdapter;
78
+ /** Minimal `FileSystemDirectoryHandle` surface used by the OPFS adapter. */
79
+ interface OpfsDirectoryLike {
80
+ getDirectoryHandle(name: string, options?: {
81
+ create?: boolean;
82
+ }): Promise<OpfsDirectoryLike>;
83
+ getFileHandle(name: string, options?: {
84
+ create?: boolean;
85
+ }): Promise<OpfsFileLike>;
86
+ removeEntry(name: string): Promise<void>;
87
+ }
88
+ interface OpfsFileLike {
89
+ getFile(): Promise<{
90
+ text(): Promise<string>;
91
+ }>;
92
+ createWritable?(): Promise<{
93
+ write(data: string): Promise<void>;
94
+ close(): Promise<void>;
95
+ }>;
96
+ /** Rename in place (Chromium, Safari). Used for temp-file + rename writes. */
97
+ move?(name: string): Promise<void>;
98
+ }
99
+ interface OpfsAdapterOptions extends StorageAdapterOptions {
100
+ /** Root directory (default `navigator.storage.getDirectory()`). */
101
+ root?: () => Promise<OpfsDirectoryLike>;
102
+ /** Force the write-then-pointer-swap strategy even when `move` exists. */
103
+ disableRename?: boolean;
104
+ }
105
+ /** Whether the Origin Private File System exists (`navigator.storage.getDirectory`). */
106
+ declare function isOpfsAvailable(): boolean;
107
+ /**
108
+ * Origin Private File System adapter. Values are files in `dir` (created on
109
+ * demand), named after the URI-encoded key.
110
+ *
111
+ * Writes never leave a half-written value behind: where file handles support
112
+ * `move`, the value is written to `<file>.tmp` and renamed over `<file>`;
113
+ * otherwise it alternates between two slots (`<file>.a` / `<file>.b`) and then
114
+ * swaps a pointer file (`<file>.ptr`), so a crash mid-write keeps the previous
115
+ * value. Main-thread writes need `createWritable` (missing in some Safari
116
+ * versions); without it, `set` rejects with `StorageUnavailableError`.
117
+ */
118
+ declare function createOpfsAdapter(dir?: string, options?: OpfsAdapterOptions): StorageAdapter;
119
+
120
+ export { type IdbFactoryLike as I, type LocalStorageAdapterOptions as L, type MemoryStorage as M, type OpfsAdapterOptions as O, type StorageAdapter as S, type WebStorageLike as W, type IndexedDbAdapterOptions as a, InjectedStorageError as b, type OpfsDirectoryLike as c, type OpfsFileLike as d, type StorageAdapterOptions as e, type StorageFailureMode as f, type StorageOperation as g, StorageUnavailableError as h, createIndexedDbAdapter as i, createLocalStorageAdapter as j, createMemoryStorage as k, createOpfsAdapter as l, isIndexedDbAvailable as m, isLocalStorageAvailable as n, isOpfsAvailable as o, withStorageFailures as w };
@@ -0,0 +1,115 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+ var _chunk4BVP64JJcjs = require('../chunk-4BVP64JJ.cjs');
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+ exports.EMPTY_TOKEN_STATE = _chunk4BVP64JJcjs.EMPTY_TOKEN_STATE; exports.TOKEN_SCOPES_BY_TYPE = _chunk4BVP64JJcjs.TOKEN_SCOPES_BY_TYPE; exports.TOKEN_TYPES = _chunk4BVP64JJcjs.TOKEN_TYPES; exports.TokenError = _chunk4BVP64JJcjs.TokenError; exports.TokenStore = _chunk4BVP64JJcjs.TokenStore; exports.W3C_TOKENS_EXTENSION = _chunk4BVP64JJcjs.W3C_TOKENS_EXTENSION; exports.addTokenMode = _chunk4BVP64JJcjs.addTokenMode; exports.checkTokenAlias = _chunk4BVP64JJcjs.checkTokenAlias; exports.coerceTokenLiteral = _chunk4BVP64JJcjs.coerceTokenLiteral; exports.createTokenCollection = _chunk4BVP64JJcjs.createTokenCollection; exports.createTokenStore = _chunk4BVP64JJcjs.createTokenStore; exports.createTokenVariable = _chunk4BVP64JJcjs.createTokenVariable; exports.cssString = _chunk4BVP64JJcjs.cssString; exports.defaultTokenId = _chunk4BVP64JJcjs.defaultTokenId; exports.defaultTokenValue = _chunk4BVP64JJcjs.defaultTokenValue; exports.deleteTokenCollection = _chunk4BVP64JJcjs.deleteTokenCollection; exports.deleteTokenVariables = _chunk4BVP64JJcjs.deleteTokenVariables; exports.exportTokensCss = _chunk4BVP64JJcjs.exportTokensCss; exports.exportW3CTokens = _chunk4BVP64JJcjs.exportW3CTokens; exports.exportW3CTokensJson = _chunk4BVP64JJcjs.exportW3CTokensJson; exports.findTokenCollection = _chunk4BVP64JJcjs.findTokenCollection; exports.findTokenMode = _chunk4BVP64JJcjs.findTokenMode; exports.findTokenVariable = _chunk4BVP64JJcjs.findTokenVariable; exports.formatTokenCssValue = _chunk4BVP64JJcjs.formatTokenCssValue; exports.formatTokenValue = _chunk4BVP64JJcjs.formatTokenValue; exports.getCollectionVariables = _chunk4BVP64JJcjs.getCollectionVariables; exports.getCurrentMode = _chunk4BVP64JJcjs.getCurrentMode; exports.getDefaultMode = _chunk4BVP64JJcjs.getDefaultMode; exports.getTokenCollection = _chunk4BVP64JJcjs.getTokenCollection; exports.getTokenCssName = _chunk4BVP64JJcjs.getTokenCssName; exports.getTokenCssVariables = _chunk4BVP64JJcjs.getTokenCssVariables; exports.getTokenVariable = _chunk4BVP64JJcjs.getTokenVariable; exports.hexToRgba = _chunk4BVP64JJcjs.hexToRgba; exports.importW3CTokens = _chunk4BVP64JJcjs.importW3CTokens; exports.isTokenAlias = _chunk4BVP64JJcjs.isTokenAlias; exports.isTokenInScope = _chunk4BVP64JJcjs.isTokenInScope; exports.isTokenScopeKnown = _chunk4BVP64JJcjs.isTokenScopeKnown; exports.literalTokenType = _chunk4BVP64JJcjs.literalTokenType; exports.moveTokenMode = _chunk4BVP64JJcjs.moveTokenMode; exports.normalizeTokenColor = _chunk4BVP64JJcjs.normalizeTokenColor; exports.normalizeTokenName = _chunk4BVP64JJcjs.normalizeTokenName; exports.normalizeTokenScopes = _chunk4BVP64JJcjs.normalizeTokenScopes; exports.parseTokenState = _chunk4BVP64JJcjs.parseTokenState; exports.prepareTokenValue = _chunk4BVP64JJcjs.prepareTokenValue; exports.removeTokenMode = _chunk4BVP64JJcjs.removeTokenMode; exports.renameTokenCollection = _chunk4BVP64JJcjs.renameTokenCollection; exports.renameTokenMode = _chunk4BVP64JJcjs.renameTokenMode; exports.renameTokenVariable = _chunk4BVP64JJcjs.renameTokenVariable; exports.resolveToken = _chunk4BVP64JJcjs.resolveToken; exports.resolveTokenInMode = _chunk4BVP64JJcjs.resolveTokenInMode; exports.resolveTokenValue = _chunk4BVP64JJcjs.resolveTokenValue; exports.rgbaToHex = _chunk4BVP64JJcjs.rgbaToHex; exports.setTokenValue = _chunk4BVP64JJcjs.setTokenValue; exports.tokenSlug = _chunk4BVP64JJcjs.tokenSlug; exports.updateTokenVariable = _chunk4BVP64JJcjs.updateTokenVariable;
115
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/tokens/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,43GAAC","file":"/home/runner/work/editor/editor/packages/core/dist/tokens/index.cjs"}