@pixerate/editor 0.21.0 → 0.22.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.
- package/README.md +20 -11
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.d.cts +2 -2
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js +2 -2
- package/dist/canvas/index.cjs +1269 -13
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +432 -6
- package/dist/canvas/index.d.ts +432 -6
- package/dist/canvas/index.js +1264 -8
- package/dist/canvas/index.js.map +1 -1
- package/dist/{chunk-U6NDQFOK.cjs → chunk-6M3BCTBD.cjs} +427 -138
- package/dist/chunk-6M3BCTBD.cjs.map +1 -0
- package/dist/{chunk-TVRC4KVT.cjs → chunk-AA4ZEVCC.cjs} +845 -90
- package/dist/chunk-AA4ZEVCC.cjs.map +1 -0
- package/dist/{chunk-LA7PEGU3.cjs → chunk-CL37JGFW.cjs} +4 -4
- package/dist/{chunk-LA7PEGU3.cjs.map → chunk-CL37JGFW.cjs.map} +1 -1
- package/dist/{chunk-A7DKIA72.js → chunk-DENSCKFC.js} +642 -69
- package/dist/chunk-DENSCKFC.js.map +1 -0
- package/dist/{chunk-4QPLEUL2.cjs → chunk-GVSMRPHB.cjs} +1046 -54
- package/dist/chunk-GVSMRPHB.cjs.map +1 -0
- package/dist/{chunk-KYRZDWM4.js → chunk-JJDLPEWL.js} +2 -2
- package/dist/{chunk-3TYMNULT.js → chunk-MJZBNWG7.js} +807 -52
- package/dist/chunk-MJZBNWG7.js.map +1 -0
- package/dist/{chunk-CYFJCKC4.js → chunk-QGHGJ56O.js} +997 -5
- package/dist/chunk-QGHGJ56O.js.map +1 -0
- package/dist/{chunk-GVW4P7BG.js → chunk-RU52I7QO.js} +305 -16
- package/dist/chunk-RU52I7QO.js.map +1 -0
- package/dist/{chunk-JYRIOFEN.cjs → chunk-SAZRENEZ.cjs} +647 -74
- package/dist/chunk-SAZRENEZ.cjs.map +1 -0
- package/dist/{controller-OUdxPY-X.d.ts → controller-B7GIybc4.d.cts} +139 -7
- package/dist/{controller-OUdxPY-X.d.cts → controller-B7GIybc4.d.ts} +139 -7
- package/dist/extensions/index.cjs +14 -4
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.d.cts +3 -3
- package/dist/extensions/index.d.ts +3 -3
- package/dist/extensions/index.js +13 -3
- package/dist/{index-k3mFbPx_.d.cts → index-CCr_z9kF.d.cts} +3 -3
- package/dist/{index-Ng1pG7JE.d.ts → index-Ck6ajwXh.d.ts} +3 -3
- package/dist/index.cjs +250 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +294 -8
- package/dist/index.d.ts +294 -8
- package/dist/index.js +241 -7
- package/dist/index.js.map +1 -1
- package/dist/{registry-iAHbqkYt.d.cts → registry-GJI4gToU.d.cts} +15 -4
- package/dist/{registry-iAHbqkYt.d.ts → registry-GJI4gToU.d.ts} +15 -4
- package/dist/serializers/index.cjs +3 -3
- package/dist/serializers/index.d.cts +1 -1
- package/dist/serializers/index.d.ts +1 -1
- package/dist/serializers/index.js +2 -2
- package/dist/spreadsheet/index.cjs +7 -3
- package/dist/spreadsheet/index.cjs.map +1 -1
- package/dist/spreadsheet/index.d.cts +33 -4
- package/dist/spreadsheet/index.d.ts +33 -4
- package/dist/spreadsheet/index.js +6 -2
- package/dist/{track-changes-G8JcWB8b.d.cts → track-changes-BSF58RK0.d.cts} +92 -9
- package/dist/{track-changes-G8JcWB8b.d.ts → track-changes-BSF58RK0.d.ts} +92 -9
- package/dist/{types-DMe0vFB1.d.cts → types-CJ4U-HHI.d.cts} +1 -1
- package/dist/{types-DMe0vFB1.d.ts → types-CJ4U-HHI.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-3TYMNULT.js.map +0 -1
- package/dist/chunk-4QPLEUL2.cjs.map +0 -1
- package/dist/chunk-A7DKIA72.js.map +0 -1
- package/dist/chunk-CYFJCKC4.js.map +0 -1
- package/dist/chunk-GVW4P7BG.js.map +0 -1
- package/dist/chunk-JYRIOFEN.cjs.map +0 -1
- package/dist/chunk-TVRC4KVT.cjs.map +0 -1
- package/dist/chunk-U6NDQFOK.cjs.map +0 -1
- /package/dist/{chunk-KYRZDWM4.js.map → chunk-JJDLPEWL.js.map} +0 -0
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* import pipelines of document apps, where each source format declares the
|
|
5
5
|
* MIME types and extensions it accepts.
|
|
6
6
|
*
|
|
7
|
-
* Built-in adapters cover markdown, HTML, plain text and
|
|
8
|
-
* `document` target.
|
|
9
|
-
* targets (e.g. CSV → `spreadsheet`) plug in
|
|
7
|
+
* Built-in adapters cover markdown, HTML, plain text, RTF and DOCX for the
|
|
8
|
+
* `document` target. PDF (`createPdfImportAdapter`), zipped exports
|
|
9
|
+
* (`zipImportAdapter`) and other targets (e.g. CSV → `spreadsheet`) plug in
|
|
10
|
+
* with `registerImportAdapter`.
|
|
10
11
|
*/
|
|
11
12
|
/** What an import produces content for. Custom targets are plain strings. */
|
|
12
13
|
type ImportTarget = "document" | "spreadsheet" | (string & {});
|
|
@@ -29,6 +30,11 @@ interface ImportContext {
|
|
|
29
30
|
readText(): Promise<string>;
|
|
30
31
|
/** Reads the input as binary data (strings are UTF-8 encoded). */
|
|
31
32
|
readArrayBuffer(): Promise<ArrayBuffer>;
|
|
33
|
+
/**
|
|
34
|
+
* The registry running the import, so container adapters (e.g. zipped
|
|
35
|
+
* exports) can import nested files with the same adapters.
|
|
36
|
+
*/
|
|
37
|
+
registry?: ImportAdapterRegistry;
|
|
32
38
|
}
|
|
33
39
|
interface ImportAdapter<TResult = unknown> {
|
|
34
40
|
/** Unique id, e.g. `markdown`, `html`, `csv`. */
|
|
@@ -67,7 +73,11 @@ interface ImportOutcome<TResult = unknown> {
|
|
|
67
73
|
mimeType?: string;
|
|
68
74
|
result: TResult;
|
|
69
75
|
}
|
|
70
|
-
type ImportErrorCode = "unsupported_type" | "unknown_adapter" | "adapter_failed"
|
|
76
|
+
type ImportErrorCode = "unsupported_type" | "unknown_adapter" | "adapter_failed"
|
|
77
|
+
/** The file is damaged or not the format its name/type claims (e.g. a `.docx` without `word/document.xml`). */
|
|
78
|
+
| "invalid_file"
|
|
79
|
+
/** A platform API the adapter needs (e.g. `DOMParser`) is missing. */
|
|
80
|
+
| "unsupported_environment";
|
|
71
81
|
declare class ImportError extends Error {
|
|
72
82
|
readonly code: ImportErrorCode;
|
|
73
83
|
readonly fileName?: string;
|
|
@@ -85,6 +95,7 @@ declare function createImportContext(input: ImportInput, details: {
|
|
|
85
95
|
fileName?: string;
|
|
86
96
|
mimeType?: string;
|
|
87
97
|
target: ImportTarget;
|
|
98
|
+
registry?: ImportAdapterRegistry;
|
|
88
99
|
}): ImportContext;
|
|
89
100
|
/**
|
|
90
101
|
* A set of import adapters with type matching. Use the default registry via
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkCL37JGFWcjs = require('../chunk-CL37JGFW.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -27,7 +27,7 @@ var _chunkLA7PEGU3cjs = require('../chunk-LA7PEGU3.cjs');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkAA4ZEVCCcjs = require('../chunk-AA4ZEVCC.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
@@ -54,5 +54,5 @@ var _chunkTVRC4KVTcjs = require('../chunk-TVRC4KVT.cjs');
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
exports.MARKDOWN_MENTION_SPLIT_REGEX =
|
|
57
|
+
exports.MARKDOWN_MENTION_SPLIT_REGEX = _chunkAA4ZEVCCcjs.MARKDOWN_MENTION_SPLIT_REGEX; exports.MENTION_REGEX = _chunkAA4ZEVCCcjs.MENTION_REGEX; exports.PIXERATE_DOCUMENT_MIME = _chunkCL37JGFWcjs.PIXERATE_DOCUMENT_MIME; exports.escapeHtml = _chunkAA4ZEVCCcjs.escapeHtml; exports.extractMentions = _chunkAA4ZEVCCcjs.extractMentions; exports.extractMentionsFromDoc = _chunkAA4ZEVCCcjs.extractMentionsFromDoc; exports.getClipboardData = _chunkCL37JGFWcjs.getClipboardData; exports.getEditorMarkdown = _chunkAA4ZEVCCcjs.getEditorMarkdown; exports.getEditorText = _chunkAA4ZEVCCcjs.getEditorText; exports.getSchemaSignature = _chunkCL37JGFWcjs.getSchemaSignature; exports.htmlToPlainText = _chunkAA4ZEVCCcjs.htmlToPlainText; exports.markdownToTipTapHtml = _chunkAA4ZEVCCcjs.markdownToTipTapHtml; exports.parseMentionSegments = _chunkAA4ZEVCCcjs.parseMentionSegments; exports.parseRichClipboardPayload = _chunkCL37JGFWcjs.parseRichClipboardPayload; exports.plainTextToParagraphHtml = _chunkCL37JGFWcjs.plainTextToParagraphHtml; exports.plainTextToSlice = _chunkAA4ZEVCCcjs.plainTextToSlice; exports.plainTextToTipTapHtml = _chunkAA4ZEVCCcjs.plainTextToTipTapHtml; exports.preprocessMarkdownFileLinks = _chunkAA4ZEVCCcjs.preprocessMarkdownFileLinks; exports.preprocessMarkdownMentions = _chunkAA4ZEVCCcjs.preprocessMarkdownMentions; exports.readRichClipboard = _chunkCL37JGFWcjs.readRichClipboard; exports.rtfToPlainText = _chunkCL37JGFWcjs.rtfToPlainText; exports.sanitizeHtml = _chunkAA4ZEVCCcjs.sanitizeHtml; exports.sanitizeImportedHtml = _chunkCL37JGFWcjs.sanitizeImportedHtml; exports.serializeRichClipboardPayload = _chunkCL37JGFWcjs.serializeRichClipboardPayload; exports.stripMarkdownCode = _chunkAA4ZEVCCcjs.stripMarkdownCode;
|
|
58
58
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema, Slice } from '@tiptap/pm/model';
|
|
2
|
-
import {
|
|
2
|
+
import { t as TrackedChangesView, h as MentionEntity } from '../track-changes-BSF58RK0.cjs';
|
|
3
3
|
import '@tiptap/core';
|
|
4
4
|
import '@tiptap/extension-mention';
|
|
5
5
|
import '@tiptap/suggestion';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema, Slice } from '@tiptap/pm/model';
|
|
2
|
-
import {
|
|
2
|
+
import { t as TrackedChangesView, h as MentionEntity } from '../track-changes-BSF58RK0.js';
|
|
3
3
|
import '@tiptap/core';
|
|
4
4
|
import '@tiptap/extension-mention';
|
|
5
5
|
import '@tiptap/suggestion';
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
rtfToPlainText,
|
|
10
10
|
sanitizeImportedHtml,
|
|
11
11
|
serializeRichClipboardPayload
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-JJDLPEWL.js";
|
|
13
13
|
import {
|
|
14
14
|
MARKDOWN_MENTION_SPLIT_REGEX,
|
|
15
15
|
MENTION_REGEX,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
preprocessMarkdownMentions,
|
|
28
28
|
sanitizeHtml,
|
|
29
29
|
stripMarkdownCode
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-MJZBNWG7.js";
|
|
31
31
|
export {
|
|
32
32
|
MARKDOWN_MENTION_SPLIT_REGEX,
|
|
33
33
|
MENTION_REGEX,
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
var _chunkU6NDQFOKcjs = require('../chunk-U6NDQFOK.cjs');
|
|
55
54
|
|
|
55
|
+
var _chunk6M3BCTBDcjs = require('../chunk-6M3BCTBD.cjs');
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
|
|
@@ -77,9 +77,9 @@ var _chunkU6NDQFOKcjs = require('../chunk-U6NDQFOK.cjs');
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
var _chunkJYRIOFENcjs = require('../chunk-JYRIOFEN.cjs');
|
|
81
80
|
|
|
82
81
|
|
|
82
|
+
var _chunkSAZRENEZcjs = require('../chunk-SAZRENEZ.cjs');
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
|
|
@@ -155,5 +155,9 @@ var _chunkJYRIOFENcjs = require('../chunk-JYRIOFEN.cjs');
|
|
|
155
155
|
|
|
156
156
|
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
exports.DEFAULT_COLUMN_WIDTH = _chunk6M3BCTBDcjs.DEFAULT_COLUMN_WIDTH; exports.DEFAULT_ROW_HEIGHT = _chunk6M3BCTBDcjs.DEFAULT_ROW_HEIGHT; exports.DataSourceBinder = _chunk6M3BCTBDcjs.DataSourceBinder; exports.DependencyGraph = _chunk6M3BCTBDcjs.DependencyGraph; exports.FORMULA_ERRORS = _chunkSAZRENEZcjs.FORMULA_ERRORS; exports.FormulaEvaluator = _chunkSAZRENEZcjs.FormulaEvaluator; exports.FormulaParser = _chunkSAZRENEZcjs.FormulaParser; exports.MAX_FORMULA_ARRAY_SIZE = _chunkSAZRENEZcjs.MAX_FORMULA_ARRAY_SIZE; exports.SPREADSHEET_CLIPBOARD_MIME = _chunk6M3BCTBDcjs.SPREADSHEET_CLIPBOARD_MIME; exports.SPREADSHEET_IMPORT_ADAPTERS = _chunk6M3BCTBDcjs.SPREADSHEET_IMPORT_ADAPTERS; exports.SPREADSHEET_TABLE_ACTIONS = _chunk6M3BCTBDcjs.SPREADSHEET_TABLE_ACTIONS; exports.SpreadsheetController = _chunk6M3BCTBDcjs.SpreadsheetController; exports.WHOLE_COLUMN_END_ROW = _chunkSAZRENEZcjs.WHOLE_COLUMN_END_ROW; exports.aggregateValues = _chunk6M3BCTBDcjs.aggregateValues; exports.applyFormulaSuggestion = _chunk6M3BCTBDcjs.applyFormulaSuggestion; exports.bindSpreadsheetTableActions = _chunk6M3BCTBDcjs.bindSpreadsheetTableActions; exports.buildSpreadsheetView = _chunk6M3BCTBDcjs.buildSpreadsheetView; exports.checkFormulaArgumentCount = _chunkSAZRENEZcjs.checkFormulaArgumentCount; exports.clampMenuPosition = _chunk6M3BCTBDcjs.clampMenuPosition; exports.colNameToIndex = _chunkSAZRENEZcjs.colNameToIndex; exports.columnDependencyKey = _chunk6M3BCTBDcjs.columnDependencyKey; exports.compareCellValues = _chunk6M3BCTBDcjs.compareCellValues; exports.computeFillTarget = _chunk6M3BCTBDcjs.computeFillTarget; exports.computeRowGroups = _chunk6M3BCTBDcjs.computeRowGroups; exports.createSpreadsheetClipboardData = _chunk6M3BCTBDcjs.createSpreadsheetClipboardData; exports.csvImportAdapter = _chunk6M3BCTBDcjs.csvImportAdapter; exports.describeFormulaError = _chunkSAZRENEZcjs.describeFormulaError; exports.escapeCsvField = _chunk6M3BCTBDcjs.escapeCsvField; exports.extractCellDependencies = _chunk6M3BCTBDcjs.extractCellDependencies; exports.fillSeries = _chunk6M3BCTBDcjs.fillSeries; exports.formatValueWithCode = _chunkSAZRENEZcjs.formatValueWithCode; exports.getFillDirection = _chunk6M3BCTBDcjs.getFillDirection; exports.getFormulaArgumentSpecIndex = _chunkSAZRENEZcjs.getFormulaArgumentSpecIndex; exports.getFormulaCaretContext = _chunk6M3BCTBDcjs.getFormulaCaretContext; exports.getFormulaFunction = _chunkSAZRENEZcjs.getFormulaFunction; exports.getFormulaHints = _chunk6M3BCTBDcjs.getFormulaHints; exports.getFormulaSignature = _chunkSAZRENEZcjs.getFormulaSignature; exports.getFormulaSignatureParts = _chunkSAZRENEZcjs.getFormulaSignatureParts; exports.getRowSection = _chunk6M3BCTBDcjs.getRowSection; exports.getSpreadsheetMenuItems = _chunk6M3BCTBDcjs.getSpreadsheetMenuItems; exports.getTableSections = _chunk6M3BCTBDcjs.getTableSections; exports.importFileIntoSpreadsheet = _chunk6M3BCTBDcjs.importFileIntoSpreadsheet; exports.indexToColName = _chunkSAZRENEZcjs.indexToColName; exports.isBlankValue = _chunk6M3BCTBDcjs.isBlankValue; exports.isFormulaError = _chunkSAZRENEZcjs.isFormulaError; exports.isSingleCellRange = _chunk6M3BCTBDcjs.isSingleCellRange; exports.listFormulaFunctions = _chunkSAZRENEZcjs.listFormulaFunctions; exports.mapFormulaReferences = _chunk6M3BCTBDcjs.mapFormulaReferences; exports.matchesFilterRule = _chunk6M3BCTBDcjs.matchesFilterRule; exports.normalizeRange = _chunk6M3BCTBDcjs.normalizeRange; exports.offsetFormulaReferences = _chunk6M3BCTBDcjs.offsetFormulaReferences; exports.parseCellReference = _chunkSAZRENEZcjs.parseCellReference; exports.parseCriteria = _chunkSAZRENEZcjs.parseCriteria; exports.parseCsv = _chunk6M3BCTBDcjs.parseCsv; exports.parseFormula = _chunkSAZRENEZcjs.parseFormula; exports.parseHtmlTable = _chunk6M3BCTBDcjs.parseHtmlTable; exports.parseRange = _chunkSAZRENEZcjs.parseRange; exports.parseTsv = _chunk6M3BCTBDcjs.parseTsv; exports.rangeContains = _chunk6M3BCTBDcjs.rangeContains; exports.rangeContainsRange = _chunk6M3BCTBDcjs.rangeContainsRange; exports.rangesIntersect = _chunk6M3BCTBDcjs.rangesIntersect; exports.readSpreadsheetClipboard = _chunk6M3BCTBDcjs.readSpreadsheetClipboard; exports.rebaseClipboardRows = _chunk6M3BCTBDcjs.rebaseClipboardRows; exports.registerFormulaFunction = _chunkSAZRENEZcjs.registerFormulaFunction; exports.registerSpreadsheetImportAdapters = _chunk6M3BCTBDcjs.registerSpreadsheetImportAdapters; exports.remapFormulaReferences = _chunk6M3BCTBDcjs.remapFormulaReferences; exports.roundFloat = _chunk6M3BCTBDcjs.roundFloat; exports.rowPassesFilters = _chunk6M3BCTBDcjs.rowPassesFilters; exports.searchFormulaFunctions = _chunkSAZRENEZcjs.searchFormulaFunctions; exports.serializeCsv = _chunk6M3BCTBDcjs.serializeCsv; exports.serializeHtmlTable = _chunk6M3BCTBDcjs.serializeHtmlTable; exports.serializeTsv = _chunk6M3BCTBDcjs.serializeTsv; exports.shiftFormulaReferences = _chunk6M3BCTBDcjs.shiftFormulaReferences; exports.toNumber = _chunk6M3BCTBDcjs.toNumber; exports.tokenizeFormula = _chunkSAZRENEZcjs.tokenizeFormula; exports.tsvImportAdapter = _chunk6M3BCTBDcjs.tsvImportAdapter; exports.unregisterFormulaFunction = _chunkSAZRENEZcjs.unregisterFormulaFunction; exports.wildcardToRegExp = _chunkSAZRENEZcjs.wildcardToRegExp;
|
|
159
163
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/spreadsheet/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;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/spreadsheet/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;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,2mKAAC","file":"/home/runner/work/editor/editor/packages/core/dist/spreadsheet/index.cjs"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as ASTNode, r as FormulaErrorCode, v as FormulaRange, G as GroupAggregate,
|
|
2
|
-
export { B as BinaryOpNode, C as CellCoordinate, a as CellData, b as CellDep, c as CellFormat, f as CellRefNode, g as CellValueReader, h as ColumnBinding, i as ColumnType, j as CsvExportOptions, k as CsvImportOptions, D as DEFAULT_COLUMN_WIDTH, l as DEFAULT_ROW_HEIGHT, m as DataSourceBinder, n as DependencyGraph, E as EvaluationContext, F as FORMULA_ERRORS, o as FilterOperator, q as FormulaDiagnostic, s as FormulaEvaluationResult, t as FormulaEvaluator, u as FormulaParser, w as FormulaToken, x as FormulaTokenType, y as FunctionCallNode, z as GroupSummary, L as LiteralNode, N as NewFilterRule, P as ParsedSpreadsheetClipboard,
|
|
3
|
-
import { I as ImportAdapterRegistry, c as ImportAdapter, h as ImportInput, a as ImportOutcome } from '../registry-
|
|
1
|
+
import { A as ASTNode, r as FormulaErrorCode, v as FormulaRange, G as GroupAggregate, O as SortDirection, e as CellRange, d as CellPosition, p as FilterRule, S as SpreadsheetController } from '../controller-B7GIybc4.cjs';
|
|
2
|
+
export { B as BinaryOpNode, C as CellCoordinate, a as CellData, b as CellDep, c as CellFormat, f as CellRefNode, g as CellValueReader, h as ColumnBinding, i as ColumnType, j as CsvExportOptions, k as CsvImportOptions, D as DEFAULT_COLUMN_WIDTH, l as DEFAULT_ROW_HEIGHT, m as DataSourceBinder, n as DependencyGraph, E as EvaluationContext, F as FORMULA_ERRORS, o as FilterOperator, q as FormulaDiagnostic, s as FormulaEvaluationResult, t as FormulaEvaluator, u as FormulaParser, w as FormulaToken, x as FormulaTokenType, y as FunctionCallNode, z as GroupSummary, L as LiteralNode, M as MAX_FORMULA_ARRAY_SIZE, N as NameNode, H as NewFilterRule, P as ParsedSpreadsheetClipboard, I as PropertyRefNode, R as RangeNode, J as RowType, K as SPREADSHEET_CLIPBOARD_MIME, Q as SortKey, T as SpillRefNode, U as SpreadsheetCellSpan, V as SpreadsheetClipboardCell, W as SpreadsheetClipboardData, X as SpreadsheetClipboardPayload, Y as SpreadsheetClipboardSource, Z as SpreadsheetColumn, _ as SpreadsheetControllerOptions, $ as SpreadsheetDataSource, a0 as SpreadsheetDataSourceField, a1 as SpreadsheetDocument, a2 as SpreadsheetFilterState, a3 as SpreadsheetGrouping, a4 as SpreadsheetRow, a5 as SpreadsheetRowGroup, a6 as SpreadsheetRowSection, a7 as SpreadsheetSpill, a8 as SpreadsheetTableSettings, a9 as SpreadsheetViewColumn, aa as SpreadsheetViewModel, ab as SpreadsheetViewRow, ac as StructuralChange, ad as UnaryOpNode, ae as WHOLE_COLUMN_END_ROW, af as buildSpreadsheetView, ag as colNameToIndex, ah as columnDependencyKey, ai as computeRowGroups, aj as createSpreadsheetClipboardData, ak as describeFormulaError, al as extractCellDependencies, am as getRowSection, an as getTableSections, ao as indexToColName, ap as isFormulaError, aq as mapFormulaReferences, ar as offsetFormulaReferences, as as parseCellReference, at as parseFormula, au as parseHtmlTable, av as parseRange, aw as readSpreadsheetClipboard, ax as rebaseClipboardRows, ay as remapFormulaReferences, az as rowPassesFilters, aA as serializeHtmlTable, aB as shiftFormulaReferences, aC as tokenizeFormula } from '../controller-B7GIybc4.cjs';
|
|
3
|
+
import { I as ImportAdapterRegistry, c as ImportAdapter, h as ImportInput, a as ImportOutcome } from '../registry-GJI4gToU.cjs';
|
|
4
4
|
|
|
5
5
|
type FormulaFunctionCategory = 'math' | 'statistical' | 'logical' | 'text' | 'lookup' | 'date' | 'information';
|
|
6
6
|
/** What an argument expects. Used for documentation, hints and messages. */
|
|
@@ -75,6 +75,14 @@ interface FormulaFunctionDefinition {
|
|
|
75
75
|
* Otherwise a group must be complete.
|
|
76
76
|
*/
|
|
77
77
|
allowTrailingArgument?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* A scalar function that is applied element by element when given arrays
|
|
80
|
+
* (dynamic arrays): `=LEN(A1:A3)` returns three lengths. `true` lifts when
|
|
81
|
+
* any argument is a multi-value array; a list of argument indices lifts
|
|
82
|
+
* only when one of those is (IF lifts on its condition). Arguments typed
|
|
83
|
+
* `range` are always passed whole.
|
|
84
|
+
*/
|
|
85
|
+
elementwise?: boolean | readonly number[];
|
|
78
86
|
evaluate(ctx: FormulaFunctionContext): any;
|
|
79
87
|
}
|
|
80
88
|
/**
|
|
@@ -337,6 +345,27 @@ interface SpreadsheetMenuItem {
|
|
|
337
345
|
separatorBefore?: boolean;
|
|
338
346
|
run: () => void;
|
|
339
347
|
}
|
|
348
|
+
/**
|
|
349
|
+
* Where to place a `position: fixed` menu opened at `point` so it stays inside
|
|
350
|
+
* the viewport: it flips to the left of / above the pointer when it would
|
|
351
|
+
* overflow the right / bottom edge, or, when the flipped menu would not fit
|
|
352
|
+
* either, slides back just enough to fit. It is kept at least `margin` px from
|
|
353
|
+
* every edge (a menu taller than the viewport is pinned to the top and should
|
|
354
|
+
* scroll, e.g. with `max-height: calc(100vh - 2 * margin)`).
|
|
355
|
+
*/
|
|
356
|
+
declare function clampMenuPosition(point: {
|
|
357
|
+
x: number;
|
|
358
|
+
y: number;
|
|
359
|
+
}, size: {
|
|
360
|
+
width: number;
|
|
361
|
+
height: number;
|
|
362
|
+
}, viewport: {
|
|
363
|
+
width: number;
|
|
364
|
+
height: number;
|
|
365
|
+
}, margin?: number): {
|
|
366
|
+
x: number;
|
|
367
|
+
y: number;
|
|
368
|
+
};
|
|
340
369
|
/**
|
|
341
370
|
* Menu items for a right-click on `cell`. When the cell is inside the
|
|
342
371
|
* selection, range actions (hide, merge, transpose) apply to the selection;
|
|
@@ -398,4 +427,4 @@ interface ImportFileIntoSpreadsheetOptions {
|
|
|
398
427
|
*/
|
|
399
428
|
declare function importFileIntoSpreadsheet(controller: SpreadsheetController, input: ImportInput, options: ImportFileIntoSpreadsheetOptions): Promise<ImportOutcome<SpreadsheetImport>>;
|
|
400
429
|
|
|
401
|
-
export { ASTNode, CellPosition, CellRange, type CsvParseOptions, type CsvSerializeOptions, type FillDirection, FilterRule, type FormulaActiveCall, type FormulaArgument, type FormulaArgumentSpec, type FormulaArgumentType, type FormulaCaretContext, type FormulaCriteriaPredicate, FormulaErrorCode, type FormulaFunctionCategory, type FormulaFunctionContext, type FormulaFunctionDefinition, type FormulaFunctionSuggestion, type FormulaHints, FormulaRange, type FormulaSignaturePart, GroupAggregate, type ImportFileIntoSpreadsheetOptions, SPREADSHEET_IMPORT_ADAPTERS, SPREADSHEET_TABLE_ACTIONS, SortDirection, SpreadsheetController, type SpreadsheetImport, type SpreadsheetImportAdapter, type SpreadsheetMenuItem, type SpreadsheetTableActionName, type SpreadsheetTableActions, aggregateValues, applyFormulaSuggestion, bindSpreadsheetTableActions, checkFormulaArgumentCount, compareCellValues, computeFillTarget, csvImportAdapter, escapeCsvField, fillSeries, formatValueWithCode, getFillDirection, getFormulaArgumentSpecIndex, getFormulaCaretContext, getFormulaFunction, getFormulaHints, getFormulaSignature, getFormulaSignatureParts, getSpreadsheetMenuItems, importFileIntoSpreadsheet, isBlankValue, isSingleCellRange, listFormulaFunctions, matchesFilterRule, normalizeRange, parseCriteria, parseCsv, parseTsv, rangeContains, rangeContainsRange, rangesIntersect, registerFormulaFunction, registerSpreadsheetImportAdapters, roundFloat, searchFormulaFunctions, serializeCsv, serializeTsv, toNumber, tsvImportAdapter, unregisterFormulaFunction, wildcardToRegExp };
|
|
430
|
+
export { ASTNode, CellPosition, CellRange, type CsvParseOptions, type CsvSerializeOptions, type FillDirection, FilterRule, type FormulaActiveCall, type FormulaArgument, type FormulaArgumentSpec, type FormulaArgumentType, type FormulaCaretContext, type FormulaCriteriaPredicate, FormulaErrorCode, type FormulaFunctionCategory, type FormulaFunctionContext, type FormulaFunctionDefinition, type FormulaFunctionSuggestion, type FormulaHints, FormulaRange, type FormulaSignaturePart, GroupAggregate, type ImportFileIntoSpreadsheetOptions, SPREADSHEET_IMPORT_ADAPTERS, SPREADSHEET_TABLE_ACTIONS, SortDirection, SpreadsheetController, type SpreadsheetImport, type SpreadsheetImportAdapter, type SpreadsheetMenuItem, type SpreadsheetTableActionName, type SpreadsheetTableActions, aggregateValues, applyFormulaSuggestion, bindSpreadsheetTableActions, checkFormulaArgumentCount, clampMenuPosition, compareCellValues, computeFillTarget, csvImportAdapter, escapeCsvField, fillSeries, formatValueWithCode, getFillDirection, getFormulaArgumentSpecIndex, getFormulaCaretContext, getFormulaFunction, getFormulaHints, getFormulaSignature, getFormulaSignatureParts, getSpreadsheetMenuItems, importFileIntoSpreadsheet, isBlankValue, isSingleCellRange, listFormulaFunctions, matchesFilterRule, normalizeRange, parseCriteria, parseCsv, parseTsv, rangeContains, rangeContainsRange, rangesIntersect, registerFormulaFunction, registerSpreadsheetImportAdapters, roundFloat, searchFormulaFunctions, serializeCsv, serializeTsv, toNumber, tsvImportAdapter, unregisterFormulaFunction, wildcardToRegExp };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as ASTNode, r as FormulaErrorCode, v as FormulaRange, G as GroupAggregate,
|
|
2
|
-
export { B as BinaryOpNode, C as CellCoordinate, a as CellData, b as CellDep, c as CellFormat, f as CellRefNode, g as CellValueReader, h as ColumnBinding, i as ColumnType, j as CsvExportOptions, k as CsvImportOptions, D as DEFAULT_COLUMN_WIDTH, l as DEFAULT_ROW_HEIGHT, m as DataSourceBinder, n as DependencyGraph, E as EvaluationContext, F as FORMULA_ERRORS, o as FilterOperator, q as FormulaDiagnostic, s as FormulaEvaluationResult, t as FormulaEvaluator, u as FormulaParser, w as FormulaToken, x as FormulaTokenType, y as FunctionCallNode, z as GroupSummary, L as LiteralNode, N as NewFilterRule, P as ParsedSpreadsheetClipboard,
|
|
3
|
-
import { I as ImportAdapterRegistry, c as ImportAdapter, h as ImportInput, a as ImportOutcome } from '../registry-
|
|
1
|
+
import { A as ASTNode, r as FormulaErrorCode, v as FormulaRange, G as GroupAggregate, O as SortDirection, e as CellRange, d as CellPosition, p as FilterRule, S as SpreadsheetController } from '../controller-B7GIybc4.js';
|
|
2
|
+
export { B as BinaryOpNode, C as CellCoordinate, a as CellData, b as CellDep, c as CellFormat, f as CellRefNode, g as CellValueReader, h as ColumnBinding, i as ColumnType, j as CsvExportOptions, k as CsvImportOptions, D as DEFAULT_COLUMN_WIDTH, l as DEFAULT_ROW_HEIGHT, m as DataSourceBinder, n as DependencyGraph, E as EvaluationContext, F as FORMULA_ERRORS, o as FilterOperator, q as FormulaDiagnostic, s as FormulaEvaluationResult, t as FormulaEvaluator, u as FormulaParser, w as FormulaToken, x as FormulaTokenType, y as FunctionCallNode, z as GroupSummary, L as LiteralNode, M as MAX_FORMULA_ARRAY_SIZE, N as NameNode, H as NewFilterRule, P as ParsedSpreadsheetClipboard, I as PropertyRefNode, R as RangeNode, J as RowType, K as SPREADSHEET_CLIPBOARD_MIME, Q as SortKey, T as SpillRefNode, U as SpreadsheetCellSpan, V as SpreadsheetClipboardCell, W as SpreadsheetClipboardData, X as SpreadsheetClipboardPayload, Y as SpreadsheetClipboardSource, Z as SpreadsheetColumn, _ as SpreadsheetControllerOptions, $ as SpreadsheetDataSource, a0 as SpreadsheetDataSourceField, a1 as SpreadsheetDocument, a2 as SpreadsheetFilterState, a3 as SpreadsheetGrouping, a4 as SpreadsheetRow, a5 as SpreadsheetRowGroup, a6 as SpreadsheetRowSection, a7 as SpreadsheetSpill, a8 as SpreadsheetTableSettings, a9 as SpreadsheetViewColumn, aa as SpreadsheetViewModel, ab as SpreadsheetViewRow, ac as StructuralChange, ad as UnaryOpNode, ae as WHOLE_COLUMN_END_ROW, af as buildSpreadsheetView, ag as colNameToIndex, ah as columnDependencyKey, ai as computeRowGroups, aj as createSpreadsheetClipboardData, ak as describeFormulaError, al as extractCellDependencies, am as getRowSection, an as getTableSections, ao as indexToColName, ap as isFormulaError, aq as mapFormulaReferences, ar as offsetFormulaReferences, as as parseCellReference, at as parseFormula, au as parseHtmlTable, av as parseRange, aw as readSpreadsheetClipboard, ax as rebaseClipboardRows, ay as remapFormulaReferences, az as rowPassesFilters, aA as serializeHtmlTable, aB as shiftFormulaReferences, aC as tokenizeFormula } from '../controller-B7GIybc4.js';
|
|
3
|
+
import { I as ImportAdapterRegistry, c as ImportAdapter, h as ImportInput, a as ImportOutcome } from '../registry-GJI4gToU.js';
|
|
4
4
|
|
|
5
5
|
type FormulaFunctionCategory = 'math' | 'statistical' | 'logical' | 'text' | 'lookup' | 'date' | 'information';
|
|
6
6
|
/** What an argument expects. Used for documentation, hints and messages. */
|
|
@@ -75,6 +75,14 @@ interface FormulaFunctionDefinition {
|
|
|
75
75
|
* Otherwise a group must be complete.
|
|
76
76
|
*/
|
|
77
77
|
allowTrailingArgument?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* A scalar function that is applied element by element when given arrays
|
|
80
|
+
* (dynamic arrays): `=LEN(A1:A3)` returns three lengths. `true` lifts when
|
|
81
|
+
* any argument is a multi-value array; a list of argument indices lifts
|
|
82
|
+
* only when one of those is (IF lifts on its condition). Arguments typed
|
|
83
|
+
* `range` are always passed whole.
|
|
84
|
+
*/
|
|
85
|
+
elementwise?: boolean | readonly number[];
|
|
78
86
|
evaluate(ctx: FormulaFunctionContext): any;
|
|
79
87
|
}
|
|
80
88
|
/**
|
|
@@ -337,6 +345,27 @@ interface SpreadsheetMenuItem {
|
|
|
337
345
|
separatorBefore?: boolean;
|
|
338
346
|
run: () => void;
|
|
339
347
|
}
|
|
348
|
+
/**
|
|
349
|
+
* Where to place a `position: fixed` menu opened at `point` so it stays inside
|
|
350
|
+
* the viewport: it flips to the left of / above the pointer when it would
|
|
351
|
+
* overflow the right / bottom edge, or, when the flipped menu would not fit
|
|
352
|
+
* either, slides back just enough to fit. It is kept at least `margin` px from
|
|
353
|
+
* every edge (a menu taller than the viewport is pinned to the top and should
|
|
354
|
+
* scroll, e.g. with `max-height: calc(100vh - 2 * margin)`).
|
|
355
|
+
*/
|
|
356
|
+
declare function clampMenuPosition(point: {
|
|
357
|
+
x: number;
|
|
358
|
+
y: number;
|
|
359
|
+
}, size: {
|
|
360
|
+
width: number;
|
|
361
|
+
height: number;
|
|
362
|
+
}, viewport: {
|
|
363
|
+
width: number;
|
|
364
|
+
height: number;
|
|
365
|
+
}, margin?: number): {
|
|
366
|
+
x: number;
|
|
367
|
+
y: number;
|
|
368
|
+
};
|
|
340
369
|
/**
|
|
341
370
|
* Menu items for a right-click on `cell`. When the cell is inside the
|
|
342
371
|
* selection, range actions (hide, merge, transpose) apply to the selection;
|
|
@@ -398,4 +427,4 @@ interface ImportFileIntoSpreadsheetOptions {
|
|
|
398
427
|
*/
|
|
399
428
|
declare function importFileIntoSpreadsheet(controller: SpreadsheetController, input: ImportInput, options: ImportFileIntoSpreadsheetOptions): Promise<ImportOutcome<SpreadsheetImport>>;
|
|
400
429
|
|
|
401
|
-
export { ASTNode, CellPosition, CellRange, type CsvParseOptions, type CsvSerializeOptions, type FillDirection, FilterRule, type FormulaActiveCall, type FormulaArgument, type FormulaArgumentSpec, type FormulaArgumentType, type FormulaCaretContext, type FormulaCriteriaPredicate, FormulaErrorCode, type FormulaFunctionCategory, type FormulaFunctionContext, type FormulaFunctionDefinition, type FormulaFunctionSuggestion, type FormulaHints, FormulaRange, type FormulaSignaturePart, GroupAggregate, type ImportFileIntoSpreadsheetOptions, SPREADSHEET_IMPORT_ADAPTERS, SPREADSHEET_TABLE_ACTIONS, SortDirection, SpreadsheetController, type SpreadsheetImport, type SpreadsheetImportAdapter, type SpreadsheetMenuItem, type SpreadsheetTableActionName, type SpreadsheetTableActions, aggregateValues, applyFormulaSuggestion, bindSpreadsheetTableActions, checkFormulaArgumentCount, compareCellValues, computeFillTarget, csvImportAdapter, escapeCsvField, fillSeries, formatValueWithCode, getFillDirection, getFormulaArgumentSpecIndex, getFormulaCaretContext, getFormulaFunction, getFormulaHints, getFormulaSignature, getFormulaSignatureParts, getSpreadsheetMenuItems, importFileIntoSpreadsheet, isBlankValue, isSingleCellRange, listFormulaFunctions, matchesFilterRule, normalizeRange, parseCriteria, parseCsv, parseTsv, rangeContains, rangeContainsRange, rangesIntersect, registerFormulaFunction, registerSpreadsheetImportAdapters, roundFloat, searchFormulaFunctions, serializeCsv, serializeTsv, toNumber, tsvImportAdapter, unregisterFormulaFunction, wildcardToRegExp };
|
|
430
|
+
export { ASTNode, CellPosition, CellRange, type CsvParseOptions, type CsvSerializeOptions, type FillDirection, FilterRule, type FormulaActiveCall, type FormulaArgument, type FormulaArgumentSpec, type FormulaArgumentType, type FormulaCaretContext, type FormulaCriteriaPredicate, FormulaErrorCode, type FormulaFunctionCategory, type FormulaFunctionContext, type FormulaFunctionDefinition, type FormulaFunctionSuggestion, type FormulaHints, FormulaRange, type FormulaSignaturePart, GroupAggregate, type ImportFileIntoSpreadsheetOptions, SPREADSHEET_IMPORT_ADAPTERS, SPREADSHEET_TABLE_ACTIONS, SortDirection, SpreadsheetController, type SpreadsheetImport, type SpreadsheetImportAdapter, type SpreadsheetMenuItem, type SpreadsheetTableActionName, type SpreadsheetTableActions, aggregateValues, applyFormulaSuggestion, bindSpreadsheetTableActions, checkFormulaArgumentCount, clampMenuPosition, compareCellValues, computeFillTarget, csvImportAdapter, escapeCsvField, fillSeries, formatValueWithCode, getFillDirection, getFormulaArgumentSpecIndex, getFormulaCaretContext, getFormulaFunction, getFormulaHints, getFormulaSignature, getFormulaSignatureParts, getSpreadsheetMenuItems, importFileIntoSpreadsheet, isBlankValue, isSingleCellRange, listFormulaFunctions, matchesFilterRule, normalizeRange, parseCriteria, parseCsv, parseTsv, rangeContains, rangeContainsRange, rangesIntersect, registerFormulaFunction, registerSpreadsheetImportAdapters, roundFloat, searchFormulaFunctions, serializeCsv, serializeTsv, toNumber, tsvImportAdapter, unregisterFormulaFunction, wildcardToRegExp };
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
applyFormulaSuggestion,
|
|
12
12
|
bindSpreadsheetTableActions,
|
|
13
13
|
buildSpreadsheetView,
|
|
14
|
+
clampMenuPosition,
|
|
14
15
|
columnDependencyKey,
|
|
15
16
|
compareCellValues,
|
|
16
17
|
computeFillTarget,
|
|
@@ -51,11 +52,12 @@ import {
|
|
|
51
52
|
shiftFormulaReferences,
|
|
52
53
|
toNumber,
|
|
53
54
|
tsvImportAdapter
|
|
54
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-RU52I7QO.js";
|
|
55
56
|
import {
|
|
56
57
|
FORMULA_ERRORS,
|
|
57
58
|
FormulaEvaluator,
|
|
58
59
|
FormulaParser,
|
|
60
|
+
MAX_FORMULA_ARRAY_SIZE,
|
|
59
61
|
WHOLE_COLUMN_END_ROW,
|
|
60
62
|
checkFormulaArgumentCount,
|
|
61
63
|
colNameToIndex,
|
|
@@ -77,7 +79,7 @@ import {
|
|
|
77
79
|
tokenizeFormula,
|
|
78
80
|
unregisterFormulaFunction,
|
|
79
81
|
wildcardToRegExp
|
|
80
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-DENSCKFC.js";
|
|
81
83
|
export {
|
|
82
84
|
DEFAULT_COLUMN_WIDTH,
|
|
83
85
|
DEFAULT_ROW_HEIGHT,
|
|
@@ -86,6 +88,7 @@ export {
|
|
|
86
88
|
FORMULA_ERRORS,
|
|
87
89
|
FormulaEvaluator,
|
|
88
90
|
FormulaParser,
|
|
91
|
+
MAX_FORMULA_ARRAY_SIZE,
|
|
89
92
|
SPREADSHEET_CLIPBOARD_MIME,
|
|
90
93
|
SPREADSHEET_IMPORT_ADAPTERS,
|
|
91
94
|
SPREADSHEET_TABLE_ACTIONS,
|
|
@@ -96,6 +99,7 @@ export {
|
|
|
96
99
|
bindSpreadsheetTableActions,
|
|
97
100
|
buildSpreadsheetView,
|
|
98
101
|
checkFormulaArgumentCount,
|
|
102
|
+
clampMenuPosition,
|
|
99
103
|
colNameToIndex,
|
|
100
104
|
columnDependencyKey,
|
|
101
105
|
compareCellValues,
|
|
@@ -168,18 +168,22 @@ declare function formatReviewTime(timestamp: number, now?: number): string;
|
|
|
168
168
|
|
|
169
169
|
declare const INSERTION_MARK_NAME = "insertion";
|
|
170
170
|
declare const DELETION_MARK_NAME = "deletion";
|
|
171
|
+
/** Mark recording a tracked formatting change (mark added/removed on existing text). */
|
|
172
|
+
declare const FORMAT_CHANGE_MARK_NAME = "formatChange";
|
|
173
|
+
/** Node attribute recording a tracked block change (type, attributes or wrapping). */
|
|
174
|
+
declare const BLOCK_CHANGE_ATTRIBUTE = "blockChange";
|
|
171
175
|
/**
|
|
172
176
|
* Set this transaction meta to `true` to apply a change without tracking it,
|
|
173
177
|
* e.g. `editor.chain().command(({ tr }) => { tr.setMeta(TRACK_CHANGES_SKIP_META, true); return true; }).setContent(…).run()`.
|
|
174
178
|
*/
|
|
175
179
|
declare const TRACK_CHANGES_SKIP_META = "trackChangesSkip";
|
|
176
|
-
type TrackedChangeType = "insertion" | "deletion";
|
|
180
|
+
type TrackedChangeType = "insertion" | "deletion" | "format" | "block";
|
|
177
181
|
/**
|
|
178
182
|
* How tracked content is rendered by serializers:
|
|
179
183
|
* - `accepted` (default): as if every change were accepted (deleted text is
|
|
180
|
-
* dropped, inserted text kept).
|
|
184
|
+
* dropped, inserted text kept, new formatting and block types kept).
|
|
181
185
|
* - `original`: as if every change were rejected.
|
|
182
|
-
* - `all`: both inserted and deleted text.
|
|
186
|
+
* - `all`: both inserted and deleted text, current formatting and blocks.
|
|
183
187
|
*/
|
|
184
188
|
type TrackedChangesView = "accepted" | "original" | "all";
|
|
185
189
|
interface TrackedChangeAttributes {
|
|
@@ -189,6 +193,40 @@ interface TrackedChangeAttributes {
|
|
|
189
193
|
authorColor: string | null;
|
|
190
194
|
createdAt: number;
|
|
191
195
|
}
|
|
196
|
+
/** A serializable mark (`mark.toJSON()`). */
|
|
197
|
+
interface TrackedMark {
|
|
198
|
+
type: string;
|
|
199
|
+
attrs?: Record<string, any>;
|
|
200
|
+
}
|
|
201
|
+
/** Attributes of the `formatChange` mark. */
|
|
202
|
+
interface TrackedFormatChangeAttributes extends TrackedChangeAttributes {
|
|
203
|
+
/** Formatting marks before the change. */
|
|
204
|
+
before: TrackedMark[];
|
|
205
|
+
/** Formatting marks after the change. */
|
|
206
|
+
after: TrackedMark[];
|
|
207
|
+
}
|
|
208
|
+
/** A textblock's type, attributes and enclosing wrappers (lists, quotes). */
|
|
209
|
+
interface TrackedBlockSnapshot {
|
|
210
|
+
type: string;
|
|
211
|
+
attrs: Record<string, any>;
|
|
212
|
+
/** Ancestors from the outermost (below the document) to the parent. */
|
|
213
|
+
wrappers: {
|
|
214
|
+
type: string;
|
|
215
|
+
attrs: Record<string, any>;
|
|
216
|
+
}[];
|
|
217
|
+
}
|
|
218
|
+
/** Value of the `blockChange` node attribute. */
|
|
219
|
+
interface TrackedBlockChangeAttributes extends TrackedChangeAttributes {
|
|
220
|
+
previous: TrackedBlockSnapshot;
|
|
221
|
+
}
|
|
222
|
+
interface TrackedFormatSummary {
|
|
223
|
+
/** Labels of added formatting, e.g. `["Bold"]`. */
|
|
224
|
+
added: string[];
|
|
225
|
+
/** Labels of removed formatting. */
|
|
226
|
+
removed: string[];
|
|
227
|
+
/** Labels of changed formatting (same mark, different attributes), e.g. `["Font size"]`. */
|
|
228
|
+
changed: string[];
|
|
229
|
+
}
|
|
192
230
|
interface TrackedChange {
|
|
193
231
|
id: string;
|
|
194
232
|
type: TrackedChangeType;
|
|
@@ -198,12 +236,24 @@ interface TrackedChange {
|
|
|
198
236
|
from: number;
|
|
199
237
|
/** End of the last range. */
|
|
200
238
|
to: number;
|
|
201
|
-
/**
|
|
239
|
+
/**
|
|
240
|
+
* A change can be split into several ranges by other marks or blocks.
|
|
241
|
+
* Block changes cover whole textblock nodes.
|
|
242
|
+
*/
|
|
202
243
|
ranges: {
|
|
203
244
|
from: number;
|
|
204
245
|
to: number;
|
|
205
246
|
}[];
|
|
206
247
|
text: string;
|
|
248
|
+
/** Human-readable summary, e.g. `Formatted: Bold` or `Changed Paragraph to Heading 2`. */
|
|
249
|
+
description: string;
|
|
250
|
+
/** Formatting changes (`type: "format"`). */
|
|
251
|
+
format?: TrackedFormatSummary;
|
|
252
|
+
/** Block changes (`type: "block"`): the first block's previous and current state. */
|
|
253
|
+
block?: {
|
|
254
|
+
previous: TrackedBlockSnapshot;
|
|
255
|
+
current: TrackedBlockSnapshot;
|
|
256
|
+
};
|
|
207
257
|
}
|
|
208
258
|
interface TrackChangesSnapshot {
|
|
209
259
|
enabled: boolean;
|
|
@@ -221,6 +271,25 @@ interface TrackChangesOptions {
|
|
|
221
271
|
generateId: () => string;
|
|
222
272
|
insertionHTMLAttributes: Record<string, any>;
|
|
223
273
|
deletionHTMLAttributes: Record<string, any>;
|
|
274
|
+
/** HTML attributes (e.g. `class`) of tracked formatting. Replaces the default dotted underline. */
|
|
275
|
+
formatChangeHTMLAttributes: Record<string, any>;
|
|
276
|
+
/** Class added to blocks with a tracked block change (margin bar by default). */
|
|
277
|
+
blockChangeClass: string;
|
|
278
|
+
/** Track mark changes (bold, links, font size, …) on existing text. Default `true`. */
|
|
279
|
+
trackFormatting: boolean;
|
|
280
|
+
/** Track textblock type/attribute and wrapping (list, quote) changes. Default `true`. */
|
|
281
|
+
trackBlocks: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* Track insertions and deletions inside code blocks by allowing the
|
|
284
|
+
* insertion/deletion marks there. Default `true`.
|
|
285
|
+
*/
|
|
286
|
+
trackCodeBlocks: boolean;
|
|
287
|
+
/** Textblock node types that can record block changes. */
|
|
288
|
+
blockTypes: string[];
|
|
289
|
+
/** Extra mark names not tracked as formatting. */
|
|
290
|
+
ignoredMarks: string[];
|
|
291
|
+
/** Node attributes ignored when comparing blocks (e.g. generated ids). */
|
|
292
|
+
ignoredBlockAttributes: string[];
|
|
224
293
|
}
|
|
225
294
|
/**
|
|
226
295
|
* External store over the editor's tracked-change state. Snapshots only
|
|
@@ -277,12 +346,24 @@ declare const TrackedInsertion: Mark<{
|
|
|
277
346
|
declare const TrackedDeletion: Mark<{
|
|
278
347
|
HTMLAttributes: Record<string, any>;
|
|
279
348
|
}, any>;
|
|
349
|
+
/**
|
|
350
|
+
* Existing text whose formatting changed while tracking was on. Stores the
|
|
351
|
+
* formatting before and after the change, rendered as
|
|
352
|
+
* `<span data-change-type="format">` (dotted underline by default).
|
|
353
|
+
*/
|
|
354
|
+
declare const TrackedFormatChange: Mark<{
|
|
355
|
+
HTMLAttributes: Record<string, any>;
|
|
356
|
+
}, any>;
|
|
357
|
+
/** Describes a formatting change, e.g. `Formatted: Bold; Removed formatting: Italic`. */
|
|
358
|
+
declare function describeFormatChange(summary: TrackedFormatSummary): string;
|
|
359
|
+
/** Describes a block change, e.g. `Changed Paragraph to Heading 2`. */
|
|
360
|
+
declare function describeBlockChange(previous: TrackedBlockSnapshot, current: TrackedBlockSnapshot, ignoredAttributes?: readonly string[]): string;
|
|
280
361
|
/**
|
|
281
362
|
* Lists tracked changes in document order. Accepts an editor, an editor
|
|
282
363
|
* state or a ProseMirror document.
|
|
283
364
|
*/
|
|
284
365
|
declare function getTrackedChanges(source: Editor | EditorState | Node | null | undefined): TrackedChange[];
|
|
285
|
-
/** The change containing `pos` (defaults to the selection start). */
|
|
366
|
+
/** The change containing `pos` (defaults to the selection start). Inline changes win over block changes. */
|
|
286
367
|
declare function getTrackedChangeAt(state: EditorState, pos?: number, changes?: readonly TrackedChange[]): TrackedChange | null;
|
|
287
368
|
declare function isTrackChangesEnabled(source: Editor | EditorState | null | undefined): boolean;
|
|
288
369
|
/** Returns the tracked-changes store of an editor using `TrackChanges`. */
|
|
@@ -296,11 +377,13 @@ declare function resolveTrackedChanges(doc: Node, view?: TrackedChangesView): No
|
|
|
296
377
|
* Suggestion mode / track changes. When enabled, typed and pasted content is
|
|
297
378
|
* marked as an insertion and deleted content is kept but marked as a
|
|
298
379
|
* deletion (struck through) until the change is accepted or rejected.
|
|
380
|
+
* Formatting changes on existing text are recorded with the `formatChange`
|
|
381
|
+
* mark, and textblock type/attribute/wrapping changes with the `blockChange`
|
|
382
|
+
* node attribute.
|
|
299
383
|
*
|
|
300
|
-
* Deleting your own insertion really deletes it.
|
|
301
|
-
*
|
|
302
|
-
* tracked. IME composition is tracked once the composition ends.
|
|
384
|
+
* Deleting your own insertion really deletes it. Paragraph splits and joins
|
|
385
|
+
* are not tracked. IME composition is tracked once the composition ends.
|
|
303
386
|
*/
|
|
304
387
|
declare const TrackChanges: Extension<TrackChangesOptions, TrackChangesStorage>;
|
|
305
388
|
|
|
306
|
-
export {
|
|
389
|
+
export { createCommentStore as A, BLOCK_CHANGE_ATTRIBUTE as B, type CommentAnchor as C, DELETION_MARK_NAME as D, createMentionExtension as E, FORMAT_CHANGE_MARK_NAME as F, createReviewId as G, describeBlockChange as H, INSERTION_MARK_NAME as I, describeFormatChange as J, formatReviewTime as K, getTrackChangesStore as L, Mention as M, getTrackedChangeAt as N, getTrackedChanges as O, isTrackChangesEnabled as P, resolveTrackedChanges as Q, type ReviewAuthor as R, type SerializedComments as S, TRACK_CHANGES_SKIP_META as T, trackChangesPluginKey as U, type CommentReply as a, CommentStore as b, type CommentStoreListener as c, type CommentStoreOptions as d, type CommentStoreSnapshot as e, type CommentThread as f, type CreateThreadInput as g, type MentionEntity as h, type MentionOptions as i, TrackChanges as j, type TrackChangesOptions as k, type TrackChangesSnapshot as l, type TrackChangesStorage as m, TrackChangesStore as n, type TrackedBlockChangeAttributes as o, type TrackedBlockSnapshot as p, type TrackedChange as q, type TrackedChangeAttributes as r, type TrackedChangeType as s, type TrackedChangesView as t, TrackedDeletion as u, TrackedFormatChange as v, type TrackedFormatChangeAttributes as w, type TrackedFormatSummary as x, TrackedInsertion as y, type TrackedMark as z };
|