@pixerate/editor 0.22.0 → 0.24.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 (188) hide show
  1. package/README.md +175 -2
  2. package/THIRD_PARTY_NOTICES.md +139 -0
  3. package/dist/agent/index.cjs +87 -111
  4. package/dist/agent/index.cjs.map +1 -1
  5. package/dist/agent/index.d.cts +70 -211
  6. package/dist/agent/index.d.ts +70 -211
  7. package/dist/agent/index.js +78 -102
  8. package/dist/agent/index.js.map +1 -1
  9. package/dist/arrangeShortcuts-B8O3f8-P.d.cts +184 -0
  10. package/dist/arrangeShortcuts-sLlD2rSX.d.ts +184 -0
  11. package/dist/canvas/index.cjs +2075 -86
  12. package/dist/canvas/index.cjs.map +1 -1
  13. package/dist/canvas/index.d.cts +608 -186
  14. package/dist/canvas/index.d.ts +608 -186
  15. package/dist/canvas/index.js +2060 -71
  16. package/dist/canvas/index.js.map +1 -1
  17. package/dist/chunk-26BVFKHU.cjs +453 -0
  18. package/dist/chunk-26BVFKHU.cjs.map +1 -0
  19. package/dist/chunk-2H7ZHPEJ.js +762 -0
  20. package/dist/chunk-2H7ZHPEJ.js.map +1 -0
  21. package/dist/{chunk-DENSCKFC.js → chunk-3CN2WD3X.js} +1730 -189
  22. package/dist/chunk-3CN2WD3X.js.map +1 -0
  23. package/dist/{chunk-JJDLPEWL.js → chunk-3LV6RRPH.js} +2 -2
  24. package/dist/{chunk-MJZBNWG7.js → chunk-5S3Z4PPF.js} +78 -557
  25. package/dist/chunk-5S3Z4PPF.js.map +1 -0
  26. package/dist/chunk-664LQYFJ.js +115 -0
  27. package/dist/chunk-664LQYFJ.js.map +1 -0
  28. package/dist/chunk-7DWMJCAT.js +453 -0
  29. package/dist/chunk-7DWMJCAT.js.map +1 -0
  30. package/dist/chunk-ARRTP33I.js +101 -0
  31. package/dist/chunk-ARRTP33I.js.map +1 -0
  32. package/dist/chunk-CPOKFNBG.cjs +101 -0
  33. package/dist/chunk-CPOKFNBG.cjs.map +1 -0
  34. package/dist/{chunk-AA4ZEVCC.cjs → chunk-D27YFC46.cjs} +101 -580
  35. package/dist/chunk-D27YFC46.cjs.map +1 -0
  36. package/dist/chunk-D6FH2YAX.cjs +131 -0
  37. package/dist/chunk-D6FH2YAX.cjs.map +1 -0
  38. package/dist/{chunk-4SUNJZWB.cjs → chunk-FD4LPFAE.cjs} +48 -200
  39. package/dist/chunk-FD4LPFAE.cjs.map +1 -0
  40. package/dist/chunk-FODNLX5N.js +749 -0
  41. package/dist/chunk-FODNLX5N.js.map +1 -0
  42. package/dist/{chunk-OYXSKQFR.js → chunk-FPENXAEJ.js} +35 -187
  43. package/dist/chunk-FPENXAEJ.js.map +1 -0
  44. package/dist/chunk-G2I4QJOT.cjs +762 -0
  45. package/dist/chunk-G2I4QJOT.cjs.map +1 -0
  46. package/dist/chunk-HLIMTC6N.js +1 -0
  47. package/dist/chunk-HLIMTC6N.js.map +1 -0
  48. package/dist/{chunk-QGHGJ56O.js → chunk-ITBSKI26.js} +1483 -19
  49. package/dist/chunk-ITBSKI26.js.map +1 -0
  50. package/dist/{chunk-6M3BCTBD.cjs → chunk-MA2F5KHF.cjs} +470 -242
  51. package/dist/chunk-MA2F5KHF.cjs.map +1 -0
  52. package/dist/{chunk-SAZRENEZ.cjs → chunk-MCSJFWAO.cjs} +1733 -192
  53. package/dist/chunk-MCSJFWAO.cjs.map +1 -0
  54. package/dist/chunk-MKA3AHLV.cjs +256 -0
  55. package/dist/chunk-MKA3AHLV.cjs.map +1 -0
  56. package/dist/chunk-OLZJXL4R.cjs +749 -0
  57. package/dist/chunk-OLZJXL4R.cjs.map +1 -0
  58. package/dist/chunk-OXSV64JX.js +689 -0
  59. package/dist/chunk-OXSV64JX.js.map +1 -0
  60. package/dist/chunk-P3RQ5UJE.cjs +689 -0
  61. package/dist/chunk-P3RQ5UJE.cjs.map +1 -0
  62. package/dist/chunk-P6ODPZ4W.js +256 -0
  63. package/dist/chunk-P6ODPZ4W.js.map +1 -0
  64. package/dist/chunk-PGNZKFQS.js +685 -0
  65. package/dist/chunk-PGNZKFQS.js.map +1 -0
  66. package/dist/chunk-PL4JB3BF.cjs +1 -0
  67. package/dist/chunk-PL4JB3BF.cjs.map +1 -0
  68. package/dist/{chunk-GVSMRPHB.cjs → chunk-SBCZ6RN5.cjs} +1568 -104
  69. package/dist/chunk-SBCZ6RN5.cjs.map +1 -0
  70. package/dist/{chunk-CL37JGFW.cjs → chunk-SML64VJG.cjs} +4 -4
  71. package/dist/{chunk-CL37JGFW.cjs.map → chunk-SML64VJG.cjs.map} +1 -1
  72. package/dist/chunk-TNNJXF46.cjs +115 -0
  73. package/dist/chunk-TNNJXF46.cjs.map +1 -0
  74. package/dist/chunk-U5HZSFCS.js +131 -0
  75. package/dist/chunk-U5HZSFCS.js.map +1 -0
  76. package/dist/{chunk-RU52I7QO.js → chunk-U5KWZU4X.js} +388 -160
  77. package/dist/chunk-U5KWZU4X.js.map +1 -0
  78. package/dist/chunk-XNORY7M6.cjs +685 -0
  79. package/dist/chunk-XNORY7M6.cjs.map +1 -0
  80. package/dist/commands/index.cjs +860 -0
  81. package/dist/commands/index.cjs.map +1 -0
  82. package/dist/commands/index.d.cts +244 -0
  83. package/dist/commands/index.d.ts +244 -0
  84. package/dist/commands/index.js +860 -0
  85. package/dist/commands/index.js.map +1 -0
  86. package/dist/comment-store-BEMgVlAA.d.cts +135 -0
  87. package/dist/comment-store-BEMgVlAA.d.ts +135 -0
  88. package/dist/compare/index.cjs +15 -0
  89. package/dist/compare/index.cjs.map +1 -0
  90. package/dist/compare/index.d.cts +58 -0
  91. package/dist/compare/index.d.ts +58 -0
  92. package/dist/compare/index.js +15 -0
  93. package/dist/compare/index.js.map +1 -0
  94. package/dist/{controller-B7GIybc4.d.cts → controller-BhLLAoi8.d.cts} +119 -5
  95. package/dist/{controller-B7GIybc4.d.ts → controller-BhLLAoi8.d.ts} +119 -5
  96. package/dist/documents-BQjzJNe2.d.ts +76 -0
  97. package/dist/documents-KRTPhvst.d.cts +76 -0
  98. package/dist/extensions/index.cjs +53 -5
  99. package/dist/extensions/index.cjs.map +1 -1
  100. package/dist/extensions/index.d.cts +7 -3
  101. package/dist/extensions/index.d.ts +7 -3
  102. package/dist/extensions/index.js +52 -4
  103. package/dist/generation/index.cjs +1373 -0
  104. package/dist/generation/index.cjs.map +1 -0
  105. package/dist/generation/index.d.cts +554 -0
  106. package/dist/generation/index.d.ts +554 -0
  107. package/dist/generation/index.js +1373 -0
  108. package/dist/generation/index.js.map +1 -0
  109. package/dist/grammar/index.cjs +48 -3
  110. package/dist/grammar/index.cjs.map +1 -1
  111. package/dist/grammar/index.d.cts +322 -100
  112. package/dist/grammar/index.d.ts +322 -100
  113. package/dist/grammar/index.js +54 -9
  114. package/dist/history/index.cjs +12 -2
  115. package/dist/history/index.cjs.map +1 -1
  116. package/dist/history/index.d.cts +211 -7
  117. package/dist/history/index.d.ts +211 -7
  118. package/dist/history/index.js +13 -3
  119. package/dist/image-editor/index.cjs +2244 -38
  120. package/dist/image-editor/index.cjs.map +1 -1
  121. package/dist/image-editor/index.d.cts +742 -4
  122. package/dist/image-editor/index.d.ts +742 -4
  123. package/dist/image-editor/index.js +2222 -16
  124. package/dist/image-editor/index.js.map +1 -1
  125. package/dist/{index-CCr_z9kF.d.cts → index-BhJBSm2d.d.cts} +370 -4
  126. package/dist/{index-Ck6ajwXh.d.ts → index-fJrlkJCd.d.ts} +370 -4
  127. package/dist/index.cjs +193 -98
  128. package/dist/index.cjs.map +1 -1
  129. package/dist/index.d.cts +17 -48
  130. package/dist/index.d.ts +17 -48
  131. package/dist/index.js +198 -103
  132. package/dist/index.js.map +1 -1
  133. package/dist/migrate-iTlm3a8h.d.cts +112 -0
  134. package/dist/migrate-iTlm3a8h.d.ts +112 -0
  135. package/dist/persistence/index.cjs +676 -0
  136. package/dist/persistence/index.cjs.map +1 -0
  137. package/dist/persistence/index.d.cts +347 -0
  138. package/dist/persistence/index.d.ts +347 -0
  139. package/dist/persistence/index.js +676 -0
  140. package/dist/persistence/index.js.map +1 -0
  141. package/dist/registry-BDe-vlv3.d.ts +171 -0
  142. package/dist/registry-D32LpIc4.d.cts +354 -0
  143. package/dist/registry-DnzpgY27.d.cts +171 -0
  144. package/dist/registry-evKTP4ls.d.ts +354 -0
  145. package/dist/schema-DYDGdYL9.d.cts +41 -0
  146. package/dist/schema-DYDGdYL9.d.ts +41 -0
  147. package/dist/serializers/index.cjs +4 -3
  148. package/dist/serializers/index.cjs.map +1 -1
  149. package/dist/serializers/index.d.cts +2 -1
  150. package/dist/serializers/index.d.ts +2 -1
  151. package/dist/serializers/index.js +3 -2
  152. package/dist/sourcemap-C8AH3MBQ.d.cts +91 -0
  153. package/dist/sourcemap-DA1Evhrv.d.ts +91 -0
  154. package/dist/spreadsheet/index.cjs +53 -3
  155. package/dist/spreadsheet/index.cjs.map +1 -1
  156. package/dist/spreadsheet/index.d.cts +247 -18
  157. package/dist/spreadsheet/index.d.ts +247 -18
  158. package/dist/spreadsheet/index.js +58 -8
  159. package/dist/{tokens-CyLZmIei.d.cts → tokens-D7yXvUU6.d.cts} +15 -2
  160. package/dist/{tokens-CyLZmIei.d.ts → tokens-D7yXvUU6.d.ts} +15 -2
  161. package/dist/{track-changes-BSF58RK0.d.cts → track-changes-BK5sVf4_.d.cts} +18 -136
  162. package/dist/{track-changes-BSF58RK0.d.ts → track-changes-CDjCrwKe.d.ts} +18 -136
  163. package/dist/{types-CJ4U-HHI.d.ts → types-DX4Mh4SL.d.cts} +1 -1
  164. package/dist/{types-CJ4U-HHI.d.cts → types-DX4Mh4SL.d.ts} +1 -1
  165. package/dist/types-GT5a5YAX.d.cts +86 -0
  166. package/dist/types-GT5a5YAX.d.ts +86 -0
  167. package/package.json +23 -2
  168. package/dist/chunk-2TWGLC5K.cjs +0 -262
  169. package/dist/chunk-2TWGLC5K.cjs.map +0 -1
  170. package/dist/chunk-4SUNJZWB.cjs.map +0 -1
  171. package/dist/chunk-6M3BCTBD.cjs.map +0 -1
  172. package/dist/chunk-AA4ZEVCC.cjs.map +0 -1
  173. package/dist/chunk-AXV2ZW34.cjs +0 -118
  174. package/dist/chunk-AXV2ZW34.cjs.map +0 -1
  175. package/dist/chunk-B2ZRLN4S.js +0 -118
  176. package/dist/chunk-B2ZRLN4S.js.map +0 -1
  177. package/dist/chunk-DENSCKFC.js.map +0 -1
  178. package/dist/chunk-GVSMRPHB.cjs.map +0 -1
  179. package/dist/chunk-KAADNAPF.js +0 -262
  180. package/dist/chunk-KAADNAPF.js.map +0 -1
  181. package/dist/chunk-MJZBNWG7.js.map +0 -1
  182. package/dist/chunk-OYXSKQFR.js.map +0 -1
  183. package/dist/chunk-QGHGJ56O.js.map +0 -1
  184. package/dist/chunk-RU52I7QO.js.map +0 -1
  185. package/dist/chunk-SAZRENEZ.cjs.map +0 -1
  186. package/dist/types-BZgcDsC5.d.cts +0 -42
  187. package/dist/types-BZgcDsC5.d.ts +0 -42
  188. /package/dist/{chunk-JJDLPEWL.js.map → chunk-3LV6RRPH.js.map} +0 -0
package/dist/index.js CHANGED
@@ -1,25 +1,41 @@
1
+ import "./chunk-HLIMTC6N.js";
1
2
  import {
2
- TEMPLATE_DEPTH_ERROR,
3
- TEMPLATE_LOOP_ERROR,
3
+ FIELD_ALIASES,
4
+ MAX_DATA_SOURCE_FIELDS,
5
+ MAX_DATA_SOURCE_RECORDS,
6
+ MAX_MERGE_LENGTH,
7
+ MAX_MERGE_OUTPUTS,
4
8
  compactVariableValues,
5
- evaluatePromptTokens,
9
+ detectDelimiter,
6
10
  extractInstructionNames,
7
11
  extractTemplateNames,
8
12
  extractVariableNames,
9
13
  extractVariables,
10
- getLatestVersion,
11
- getPromptDiagnostics,
12
- getTemplateBody,
13
14
  getVariableFormFields,
14
15
  mapRawOffsetToResolved,
15
16
  mapResolvedOffsetToRaw,
16
- resolvePrompt,
17
+ matchFields,
18
+ mergeRecords,
19
+ normalizeFieldKey,
20
+ normalizeFieldNames,
21
+ parseDataSource,
22
+ recordToValues,
17
23
  resolveTemplates,
18
24
  resolveTemplatesWithMapping,
19
25
  resolveVariables,
26
+ serializeMergeOutputs
27
+ } from "./chunk-OXSV64JX.js";
28
+ import {
29
+ TEMPLATE_DEPTH_ERROR,
30
+ TEMPLATE_LOOP_ERROR,
31
+ evaluatePromptTokens,
32
+ getLatestVersion,
33
+ getPromptDiagnostics,
34
+ getTemplateBody,
35
+ resolvePrompt,
20
36
  tokenizePrompt,
21
37
  tokenizePromptWithDiagnostics
22
- } from "./chunk-OYXSKQFR.js";
38
+ } from "./chunk-FPENXAEJ.js";
23
39
  import {
24
40
  Autocorrect,
25
41
  BUILT_IN_IMPORT_ADAPTERS,
@@ -33,7 +49,13 @@ import {
33
49
  DEFAULT_ZIP_MAX_ENTRIES,
34
50
  DEFAULT_ZIP_MAX_TOTAL_SIZE,
35
51
  DOCX_MIME_TYPES,
52
+ DocumentCompare,
53
+ EMPTY_FIND_REPLACE_SNAPSHOT,
54
+ FIND_OPTION_TOGGLES,
55
+ FIND_PARAGRAPH_MARK,
36
56
  FileImport,
57
+ FindReplace,
58
+ FindReplaceStore,
37
59
  FontSize,
38
60
  Footnote,
39
61
  FootnoteReference,
@@ -43,6 +65,7 @@ import {
43
65
  ImportAdapterRegistry,
44
66
  ImportError,
45
67
  LoadingNode,
68
+ MAX_FIND_PATTERN_LENGTH,
46
69
  Markdown,
47
70
  Mention,
48
71
  Outline,
@@ -54,30 +77,41 @@ import {
54
77
  TemplateSuggestions,
55
78
  ZipArchive,
56
79
  ZipError,
80
+ applyDocumentComparison,
81
+ applyReplacements,
57
82
  autocorrectPluginKey,
58
83
  buildOutlineTree,
59
84
  capitalizeSentenceRules,
60
85
  commentsPluginKey,
86
+ compareInEditor,
87
+ compileFindPattern,
61
88
  computeOutline,
62
89
  createDocxImportAdapter,
90
+ createFindReplaceCommands,
63
91
  createImportAdapterRegistry,
64
92
  createImportContext,
65
93
  createMentionExtension,
66
94
  createOutlineStore,
67
95
  createRichTextPreset,
96
+ createSearchBudget,
68
97
  crossReferencePluginKey,
69
98
  defaultAutocorrectRules,
70
99
  defaultImportRegistry,
71
100
  documentStructureCommandItems,
72
101
  docxImportAdapter,
73
102
  docxToDocumentImport,
103
+ expandReplacement,
74
104
  fileImportPluginKey,
105
+ findAllMatches,
75
106
  findAutocorrection,
76
107
  findCommentRanges,
77
108
  findHexColors,
78
109
  findImportAdapter,
110
+ findReplacePluginKey,
111
+ foldCodePoint,
79
112
  footnotesMarkdownIt,
80
113
  footnotesPluginKey,
114
+ formatFindStatus,
81
115
  fractionRules,
82
116
  getActiveHeading,
83
117
  getBookmarks,
@@ -87,6 +121,8 @@ import {
87
121
  getCommentStore,
88
122
  getCrossReferenceTargets,
89
123
  getDocumentStructureCommandItems,
124
+ getFindReplaceState,
125
+ getFindReplaceStore,
90
126
  getFootnotes,
91
127
  getImportAccept,
92
128
  getOutline,
@@ -104,12 +140,14 @@ import {
104
140
  markdownImportAdapter,
105
141
  navigateToHeading,
106
142
  outlinePluginKey,
143
+ parseReplacement,
107
144
  plainTextImportAdapter,
108
145
  readZip,
109
146
  registerImportAdapter,
110
147
  removeImageNode,
111
148
  richClipboardPluginKey,
112
149
  rtfImportAdapter,
150
+ searchDocument,
113
151
  smartQuoteRules,
114
152
  smilieAutocorrectRules,
115
153
  symbolRules,
@@ -119,24 +157,39 @@ import {
119
157
  twoInitialCapitalsRules,
120
158
  unregisterImportAdapter,
121
159
  updateImageSrc,
160
+ validateFindPattern,
122
161
  writeRichClipboard,
123
162
  zipCrc32
124
- } from "./chunk-QGHGJ56O.js";
163
+ } from "./chunk-ITBSKI26.js";
164
+ import {
165
+ compareDocuments,
166
+ compareHtml,
167
+ diffChanges,
168
+ diffSequences
169
+ } from "./chunk-FODNLX5N.js";
125
170
  import {
126
171
  INSTRUCTION_REGEX,
127
172
  TEMPLATE_REGEX,
128
173
  VARIABLE_REGEX,
174
+ compareConditionValues,
175
+ conditionSubject,
176
+ describeConditionalTag,
129
177
  escapeVariableText,
130
178
  evaluateCondition,
179
+ evaluateConditionExpression,
180
+ formatComparisonOperand,
181
+ formatConditionalTag,
131
182
  getSuppliedValue,
132
183
  instructionRegex,
133
184
  isPromptValueSet,
134
185
  matchConditionalTags,
186
+ parseComparison,
187
+ parseConditionExpression,
135
188
  parseVariableBody,
136
189
  templateRegex,
137
190
  unescapeVariableText,
138
191
  variableRegex
139
- } from "./chunk-B2ZRLN4S.js";
192
+ } from "./chunk-P6ODPZ4W.js";
140
193
  import "./chunk-N7FG6CBO.js";
141
194
  import {
142
195
  PIXERATE_DOCUMENT_MIME,
@@ -148,12 +201,13 @@ import {
148
201
  rtfToPlainText,
149
202
  sanitizeImportedHtml,
150
203
  serializeRichClipboardPayload
151
- } from "./chunk-JJDLPEWL.js";
204
+ } from "./chunk-3LV6RRPH.js";
152
205
  import {
153
206
  DEFAULT_COLUMN_WIDTH,
154
207
  DEFAULT_ROW_HEIGHT,
155
208
  DataSourceBinder,
156
209
  DependencyGraph,
210
+ NUMBER_FORMAT_PRESETS,
157
211
  SPREADSHEET_CLIPBOARD_MIME,
158
212
  SPREADSHEET_IMPORT_ADAPTERS,
159
213
  SPREADSHEET_TABLE_ACTIONS,
@@ -162,6 +216,7 @@ import {
162
216
  applyFormulaSuggestion,
163
217
  bindSpreadsheetTableActions,
164
218
  buildSpreadsheetView,
219
+ cellFormatForNumberFormat,
165
220
  clampMenuPosition,
166
221
  columnDependencyKey,
167
222
  compareCellValues,
@@ -169,9 +224,11 @@ import {
169
224
  computeRowGroups,
170
225
  createSpreadsheetClipboardData,
171
226
  csvImportAdapter,
172
- escapeCsvField,
173
227
  extractCellDependencies,
174
228
  fillSeries,
229
+ formatCellDisplay,
230
+ formatCellForDisplay,
231
+ formatValueWithCode,
175
232
  getFillDirection,
176
233
  getFormulaCaretContext,
177
234
  getFormulaHints,
@@ -180,14 +237,14 @@ import {
180
237
  getTableSections,
181
238
  importFileIntoSpreadsheet,
182
239
  isBlankValue,
240
+ isGeneralNumberFormat,
183
241
  isSingleCellRange,
184
242
  mapFormulaReferences,
185
243
  matchesFilterRule,
186
244
  normalizeRange,
245
+ numberFormatForCellFormat,
187
246
  offsetFormulaReferences,
188
- parseCsv,
189
247
  parseHtmlTable,
190
- parseTsv,
191
248
  rangeContains,
192
249
  rangeContainsRange,
193
250
  rangesIntersect,
@@ -197,25 +254,52 @@ import {
197
254
  remapFormulaReferences,
198
255
  roundFloat,
199
256
  rowPassesFilters,
200
- serializeCsv,
257
+ runSpreadsheetMenuItem,
201
258
  serializeHtmlTable,
202
- serializeTsv,
203
259
  shiftFormulaReferences,
204
260
  toNumber,
205
261
  tsvImportAdapter
206
- } from "./chunk-RU52I7QO.js";
262
+ } from "./chunk-U5KWZU4X.js";
207
263
  import {
264
+ escapeCsvField,
265
+ parseCsv,
266
+ parseTsv,
267
+ serializeCsv,
268
+ serializeTsv
269
+ } from "./chunk-664LQYFJ.js";
270
+ import {
271
+ DirtyTracker,
208
272
  HistoryManager,
209
- createHistoryManager
210
- } from "./chunk-KAADNAPF.js";
273
+ bindDirtyToHistory,
274
+ createDirtyTracker,
275
+ createHistoryManager,
276
+ defaultIsEqual,
277
+ withoutDirty
278
+ } from "./chunk-2H7ZHPEJ.js";
279
+ import {
280
+ MARKDOWN_MENTION_SPLIT_REGEX,
281
+ MENTION_REGEX,
282
+ escapeHtml,
283
+ extractMentions,
284
+ extractMentionsFromDoc,
285
+ getEditorMarkdown,
286
+ getEditorText,
287
+ htmlToPlainText,
288
+ markdownToTipTapHtml,
289
+ parseMentionSegments,
290
+ plainTextToSlice,
291
+ plainTextToTipTapHtml,
292
+ preprocessMarkdownFileLinks,
293
+ preprocessMarkdownMentions,
294
+ sanitizeHtml,
295
+ stripMarkdownCode
296
+ } from "./chunk-PGNZKFQS.js";
211
297
  import {
212
298
  BLOCK_CHANGE_ATTRIBUTE,
213
299
  CommentStore,
214
300
  DELETION_MARK_NAME,
215
301
  FORMAT_CHANGE_MARK_NAME,
216
302
  INSERTION_MARK_NAME,
217
- MARKDOWN_MENTION_SPLIT_REGEX,
218
- MENTION_REGEX,
219
303
  TRACK_CHANGES_SKIP_META,
220
304
  TrackChanges,
221
305
  TrackChangesStore,
@@ -226,38 +310,34 @@ import {
226
310
  createReviewId,
227
311
  describeBlockChange,
228
312
  describeFormatChange,
229
- escapeHtml,
230
- extractMentions,
231
- extractMentionsFromDoc,
232
313
  formatReviewTime,
233
- getEditorMarkdown,
234
- getEditorText,
235
314
  getTrackChangesStore,
236
315
  getTrackedChangeAt,
237
316
  getTrackedChanges,
238
- htmlToPlainText,
239
317
  isTrackChangesEnabled,
240
- markdownToTipTapHtml,
241
- parseMentionSegments,
242
- plainTextToSlice,
243
- plainTextToTipTapHtml,
244
- preprocessMarkdownFileLinks,
245
- preprocessMarkdownMentions,
246
318
  resolveTrackedChanges,
247
- sanitizeHtml,
248
- stripMarkdownCode,
249
319
  trackChangesPluginKey
250
- } from "./chunk-MJZBNWG7.js";
320
+ } from "./chunk-5S3Z4PPF.js";
251
321
  import {
252
322
  FORMULA_ERRORS,
253
323
  FormulaEvaluator,
254
324
  FormulaParser,
255
325
  MAX_FORMULA_ARRAY_SIZE,
326
+ MAX_NUMBER_FORMAT_CODE_CHARS,
327
+ NumberFormat,
256
328
  WHOLE_COLUMN_END_ROW,
329
+ builtinNumberFormat,
330
+ builtinNumberFormatId,
257
331
  checkFormulaArgumentCount,
332
+ clearNumberFormatCache,
258
333
  colNameToIndex,
334
+ compareNumbers,
335
+ compareValues,
336
+ dateValueToSerial,
259
337
  describeFormulaError,
260
- formatValueWithCode,
338
+ formatGeneralFit,
339
+ formatNumberFormatValue,
340
+ formatTextFunction,
261
341
  getFormulaArgumentSpecIndex,
262
342
  getFormulaFunction,
263
343
  getFormulaSignature,
@@ -265,16 +345,22 @@ import {
265
345
  indexToColName,
266
346
  isFormulaError,
267
347
  listFormulaFunctions,
348
+ numberFormatColorToCss,
349
+ numberToText,
350
+ parseCellInput,
268
351
  parseCellReference,
269
352
  parseCriteria,
270
353
  parseFormula,
354
+ parseNumberText,
271
355
  parseRange,
272
356
  registerFormulaFunction,
273
357
  searchFormulaFunctions,
358
+ serialFromYmd,
359
+ sortCompareValues,
274
360
  tokenizeFormula,
275
361
  unregisterFormulaFunction,
276
362
  wildcardToRegExp
277
- } from "./chunk-DENSCKFC.js";
363
+ } from "./chunk-3CN2WD3X.js";
278
364
 
279
365
  // src/controller.ts
280
366
  import { Editor } from "@tiptap/core";
@@ -432,71 +518,6 @@ function createEditor(options = {}) {
432
518
  return new EditorController(options);
433
519
  }
434
520
 
435
- // src/dirty.ts
436
- function defaultIsEqual(a, b) {
437
- if (Object.is(a, b)) return true;
438
- if (typeof a !== "object" || a === null || typeof b !== "object" || b === null) {
439
- return false;
440
- }
441
- if (Array.isArray(a) && Array.isArray(b)) {
442
- if (a.length !== b.length) return false;
443
- for (let i = 0; i < a.length; i++) {
444
- if (!defaultIsEqual(a[i], b[i])) return false;
445
- }
446
- return true;
447
- }
448
- if (Array.isArray(a) !== Array.isArray(b)) {
449
- return false;
450
- }
451
- const keysA = Object.keys(a);
452
- const keysB = Object.keys(b);
453
- if (keysA.length !== keysB.length) return false;
454
- for (const key of keysA) {
455
- if (!Object.prototype.hasOwnProperty.call(b, key)) return false;
456
- if (!defaultIsEqual(a[key], b[key])) return false;
457
- }
458
- return true;
459
- }
460
- var DirtyTracker = class {
461
- baseline;
462
- isEqual;
463
- constructor(initialBaseline, options) {
464
- this.baseline = initialBaseline;
465
- if (typeof options === "function") {
466
- this.isEqual = options;
467
- } else {
468
- this.isEqual = options?.isEqual ?? defaultIsEqual;
469
- }
470
- }
471
- /**
472
- * Returns current baseline value.
473
- */
474
- getBaseline() {
475
- return this.baseline;
476
- }
477
- /**
478
- * Sets a new baseline value without triggering any dirty state.
479
- */
480
- setBaseline(value) {
481
- this.baseline = value;
482
- }
483
- /**
484
- * Checks whether the given value differs from the baseline.
485
- */
486
- isDirty(current) {
487
- return !this.isEqual(this.baseline, current);
488
- }
489
- /**
490
- * Resets the baseline to the provided current value (or clears dirty status).
491
- */
492
- reset(current) {
493
- this.baseline = current;
494
- }
495
- };
496
- function createDirtyTracker(initialBaseline, options) {
497
- return new DirtyTracker(initialBaseline, options);
498
- }
499
-
500
521
  // src/import/controller.ts
501
522
  function pickImportFiles(options = {}) {
502
523
  if (typeof document === "undefined") return Promise.resolve([]);
@@ -790,11 +811,18 @@ export {
790
811
  DataSourceBinder,
791
812
  DependencyGraph,
792
813
  DirtyTracker,
814
+ DocumentCompare,
815
+ EMPTY_FIND_REPLACE_SNAPSHOT,
793
816
  EditorController,
817
+ FIELD_ALIASES,
818
+ FIND_OPTION_TOGGLES,
819
+ FIND_PARAGRAPH_MARK,
794
820
  FORMAT_CHANGE_MARK_NAME,
795
821
  FORMULA_ERRORS,
796
822
  FileImport,
797
823
  FileImportController,
824
+ FindReplace,
825
+ FindReplaceStore,
798
826
  FontSize,
799
827
  Footnote,
800
828
  FootnoteReference,
@@ -810,10 +838,18 @@ export {
810
838
  ImportError,
811
839
  LoadingNode,
812
840
  MARKDOWN_MENTION_SPLIT_REGEX,
841
+ MAX_DATA_SOURCE_FIELDS,
842
+ MAX_DATA_SOURCE_RECORDS,
843
+ MAX_FIND_PATTERN_LENGTH,
813
844
  MAX_FORMULA_ARRAY_SIZE,
845
+ MAX_MERGE_LENGTH,
846
+ MAX_MERGE_OUTPUTS,
847
+ MAX_NUMBER_FORMAT_CODE_CHARS,
814
848
  MENTION_REGEX,
815
849
  Markdown,
816
850
  Mention,
851
+ NUMBER_FORMAT_PRESETS,
852
+ NumberFormat,
817
853
  Outline,
818
854
  PIXERATE_DOCUMENT_MIME,
819
855
  RichClipboard,
@@ -840,27 +876,43 @@ export {
840
876
  ZipArchive,
841
877
  ZipError,
842
878
  aggregateValues,
879
+ applyDocumentComparison,
843
880
  applyFormulaSuggestion,
881
+ applyReplacements,
844
882
  autocorrectPluginKey,
883
+ bindDirtyToHistory,
845
884
  bindSpreadsheetTableActions,
846
885
  buildOutlineTree,
847
886
  buildSpreadsheetView,
887
+ builtinNumberFormat,
888
+ builtinNumberFormatId,
848
889
  capitalizeSentenceRules,
890
+ cellFormatForNumberFormat,
849
891
  checkFormulaArgumentCount,
850
892
  clampMenuPosition,
893
+ clearNumberFormatCache,
851
894
  colNameToIndex,
852
895
  columnDependencyKey,
853
896
  commentsPluginKey,
854
897
  compactVariableValues,
855
898
  compareCellValues,
899
+ compareConditionValues,
900
+ compareDocuments,
901
+ compareHtml,
902
+ compareInEditor,
903
+ compareNumbers,
904
+ compareValues,
905
+ compileFindPattern,
856
906
  computeFillTarget,
857
907
  computeOutline,
858
908
  computeRowGroups,
909
+ conditionSubject,
859
910
  createCommentStore,
860
911
  createDirtyTracker,
861
912
  createDocxImportAdapter,
862
913
  createEditor,
863
914
  createFileImportController,
915
+ createFindReplaceCommands,
864
916
  createHistoryManager,
865
917
  createImportAdapterRegistry,
866
918
  createImportContext,
@@ -869,16 +921,22 @@ export {
869
921
  createPdfImportAdapter,
870
922
  createReviewId,
871
923
  createRichTextPreset,
924
+ createSearchBudget,
872
925
  createSpreadsheetClipboardData,
873
926
  createZipImportAdapter,
874
927
  crossReferencePluginKey,
875
928
  csvImportAdapter,
929
+ dateValueToSerial,
876
930
  defaultAutocorrectRules,
877
931
  defaultImportRegistry,
878
932
  defaultIsEqual,
879
933
  describeBlockChange,
934
+ describeConditionalTag,
880
935
  describeFormatChange,
881
936
  describeFormulaError,
937
+ detectDelimiter,
938
+ diffChanges,
939
+ diffSequences,
882
940
  documentStructureCommandItems,
883
941
  docxImportAdapter,
884
942
  docxToDocumentImport,
@@ -886,7 +944,9 @@ export {
886
944
  escapeHtml,
887
945
  escapeVariableText,
888
946
  evaluateCondition,
947
+ evaluateConditionExpression,
889
948
  evaluatePromptTokens,
949
+ expandReplacement,
890
950
  extractCellDependencies,
891
951
  extractInstructionNames,
892
952
  extractMentions,
@@ -896,13 +956,24 @@ export {
896
956
  extractVariables,
897
957
  fileImportPluginKey,
898
958
  fillSeries,
959
+ findAllMatches,
899
960
  findAutocorrection,
900
961
  findCommentRanges,
901
962
  findHexColors,
902
963
  findImportAdapter,
964
+ findReplacePluginKey,
965
+ foldCodePoint,
903
966
  footnotesMarkdownIt,
904
967
  footnotesPluginKey,
968
+ formatCellDisplay,
969
+ formatCellForDisplay,
970
+ formatComparisonOperand,
971
+ formatConditionalTag,
972
+ formatFindStatus,
973
+ formatGeneralFit,
974
+ formatNumberFormatValue,
905
975
  formatReviewTime,
976
+ formatTextFunction,
906
977
  formatValueWithCode,
907
978
  fractionRules,
908
979
  getActiveHeading,
@@ -917,6 +988,8 @@ export {
917
988
  getEditorMarkdown,
918
989
  getEditorText,
919
990
  getFillDirection,
991
+ getFindReplaceState,
992
+ getFindReplaceStore,
920
993
  getFootnotes,
921
994
  getFormulaArgumentSpecIndex,
922
995
  getFormulaCaretContext,
@@ -953,6 +1026,7 @@ export {
953
1026
  instructionRegex,
954
1027
  isBlankValue,
955
1028
  isFormulaError,
1029
+ isGeneralNumberFormat,
956
1030
  isInsidePromptToken,
957
1031
  isPromptValueSet,
958
1032
  isSingleCellRange,
@@ -965,18 +1039,31 @@ export {
965
1039
  markdownImportAdapter,
966
1040
  markdownToTipTapHtml,
967
1041
  matchConditionalTags,
1042
+ matchFields,
968
1043
  matchesFilterRule,
1044
+ mergeRecords,
969
1045
  navigateToHeading,
1046
+ normalizeFieldKey,
1047
+ normalizeFieldNames,
970
1048
  normalizeRange,
1049
+ numberFormatColorToCss,
1050
+ numberFormatForCellFormat,
1051
+ numberToText,
971
1052
  offsetFormulaReferences,
972
1053
  outlinePluginKey,
1054
+ parseCellInput,
973
1055
  parseCellReference,
1056
+ parseComparison,
1057
+ parseConditionExpression,
974
1058
  parseCriteria,
975
1059
  parseCsv,
1060
+ parseDataSource,
976
1061
  parseFormula,
977
1062
  parseHtmlTable,
978
1063
  parseMentionSegments,
1064
+ parseNumberText,
979
1065
  parseRange,
1066
+ parseReplacement,
980
1067
  parseRichClipboardPayload,
981
1068
  parseTsv,
982
1069
  parseVariableBody,
@@ -995,6 +1082,7 @@ export {
995
1082
  readSpreadsheetClipboard,
996
1083
  readZip,
997
1084
  rebaseClipboardRows,
1085
+ recordToValues,
998
1086
  registerFormulaFunction,
999
1087
  registerImportAdapter,
1000
1088
  registerSpreadsheetImportAdapters,
@@ -1010,16 +1098,21 @@ export {
1010
1098
  rowPassesFilters,
1011
1099
  rtfImportAdapter,
1012
1100
  rtfToPlainText,
1101
+ runSpreadsheetMenuItem,
1013
1102
  sanitizeHtml,
1014
1103
  sanitizeImportedHtml,
1104
+ searchDocument,
1015
1105
  searchFormulaFunctions,
1106
+ serialFromYmd,
1016
1107
  serializeCsv,
1017
1108
  serializeHtmlTable,
1109
+ serializeMergeOutputs,
1018
1110
  serializeRichClipboardPayload,
1019
1111
  serializeTsv,
1020
1112
  shiftFormulaReferences,
1021
1113
  smartQuoteRules,
1022
1114
  smilieAutocorrectRules,
1115
+ sortCompareValues,
1023
1116
  sortZipEntryNames,
1024
1117
  stripMarkdownCode,
1025
1118
  symbolRules,
@@ -1038,8 +1131,10 @@ export {
1038
1131
  unregisterFormulaFunction,
1039
1132
  unregisterImportAdapter,
1040
1133
  updateImageSrc,
1134
+ validateFindPattern,
1041
1135
  variableRegex,
1042
1136
  wildcardToRegExp,
1137
+ withoutDirty,
1043
1138
  writeRichClipboard,
1044
1139
  zipCrc32,
1045
1140
  zipEntryTitle,