@pixerate/editor 0.26.1 → 0.27.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 (64) hide show
  1. package/README.md +8 -2
  2. package/dist/agent/index.cjs +56 -6
  3. package/dist/agent/index.cjs.map +1 -1
  4. package/dist/agent/index.d.cts +6 -4
  5. package/dist/agent/index.d.ts +6 -4
  6. package/dist/agent/index.js +51 -1
  7. package/dist/agent/index.js.map +1 -1
  8. package/dist/{builtins-Chj6zv_O.d.ts → builtins-haN82vjT.d.ts} +33 -3
  9. package/dist/{builtins-CdPcLwwF.d.cts → builtins-nMXh9sT3.d.cts} +33 -3
  10. package/dist/canvas/index.cjs +372 -8
  11. package/dist/canvas/index.cjs.map +1 -1
  12. package/dist/canvas/index.d.cts +72 -4
  13. package/dist/canvas/index.d.ts +72 -4
  14. package/dist/canvas/index.js +368 -4
  15. package/dist/canvas/index.js.map +1 -1
  16. package/dist/{chunk-UBCFIABU.js → chunk-5H2OPMXZ.js} +183 -6
  17. package/dist/chunk-5H2OPMXZ.js.map +1 -0
  18. package/dist/{chunk-XQFHLT53.js → chunk-6IO7WUSU.js} +17 -3
  19. package/dist/chunk-6IO7WUSU.js.map +1 -0
  20. package/dist/{chunk-LN2POBHT.cjs → chunk-AGR7EVRW.cjs} +24 -10
  21. package/dist/chunk-AGR7EVRW.cjs.map +1 -0
  22. package/dist/chunk-HXDMZQTD.cjs +497 -0
  23. package/dist/chunk-HXDMZQTD.cjs.map +1 -0
  24. package/dist/chunk-IB3ZHQAX.js +497 -0
  25. package/dist/chunk-IB3ZHQAX.js.map +1 -0
  26. package/dist/{chunk-X7HXL2SB.js → chunk-JT7AXQTE.js} +336 -10
  27. package/dist/chunk-JT7AXQTE.js.map +1 -0
  28. package/dist/{chunk-HDYMLS3X.cjs → chunk-MC2LQN5S.cjs} +196 -19
  29. package/dist/chunk-MC2LQN5S.cjs.map +1 -0
  30. package/dist/{chunk-NQF32I6Z.cjs → chunk-YK5TATOF.cjs} +461 -135
  31. package/dist/chunk-YK5TATOF.cjs.map +1 -0
  32. package/dist/commands/index.cjs +30 -410
  33. package/dist/commands/index.cjs.map +1 -1
  34. package/dist/commands/index.d.cts +1 -1
  35. package/dist/commands/index.d.ts +1 -1
  36. package/dist/commands/index.js +17 -397
  37. package/dist/commands/index.js.map +1 -1
  38. package/dist/{controller-CxXGOEmy.d.cts → controller-w6eRTjF8.d.cts} +67 -2
  39. package/dist/{controller-CxXGOEmy.d.ts → controller-w6eRTjF8.d.ts} +67 -2
  40. package/dist/extensions/index.cjs +21 -3
  41. package/dist/extensions/index.cjs.map +1 -1
  42. package/dist/extensions/index.d.cts +1 -1
  43. package/dist/extensions/index.d.ts +1 -1
  44. package/dist/extensions/index.js +21 -3
  45. package/dist/{index-jcJwmBYt.d.cts → index-C6gaQRH0.d.cts} +53 -4
  46. package/dist/{index-B273Zllk.d.ts → index-DXAv_R08.d.ts} +53 -4
  47. package/dist/index.cjs +47 -9
  48. package/dist/index.cjs.map +1 -1
  49. package/dist/index.d.cts +7 -5
  50. package/dist/index.d.ts +7 -5
  51. package/dist/index.js +42 -4
  52. package/dist/index.js.map +1 -1
  53. package/dist/spreadsheet/index.cjs +22 -2
  54. package/dist/spreadsheet/index.cjs.map +1 -1
  55. package/dist/spreadsheet/index.d.cts +76 -3
  56. package/dist/spreadsheet/index.d.ts +76 -3
  57. package/dist/spreadsheet/index.js +21 -1
  58. package/package.json +1 -1
  59. package/dist/chunk-HDYMLS3X.cjs.map +0 -1
  60. package/dist/chunk-LN2POBHT.cjs.map +0 -1
  61. package/dist/chunk-NQF32I6Z.cjs.map +0 -1
  62. package/dist/chunk-UBCFIABU.js.map +0 -1
  63. package/dist/chunk-X7HXL2SB.js.map +0 -1
  64. package/dist/chunk-XQFHLT53.js.map +0 -1
@@ -129,7 +129,17 @@
129
129
 
130
130
 
131
131
 
132
- var _chunkNQF32I6Zcjs = require('../chunk-NQF32I6Z.cjs');
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+ var _chunkYK5TATOFcjs = require('../chunk-YK5TATOF.cjs');
133
143
 
134
144
 
135
145
 
@@ -363,5 +373,15 @@ var _chunkEWCOFSCQcjs = require('../chunk-EWCOFSCQ.cjs');
363
373
 
364
374
 
365
375
 
366
- exports.CONDITIONAL_FORMAT_ICON_SETS = _chunkNQF32I6Zcjs.CONDITIONAL_FORMAT_ICON_SETS; exports.CONDITIONAL_FORMAT_PRESETS = _chunkNQF32I6Zcjs.CONDITIONAL_FORMAT_PRESETS; exports.CONDITIONAL_FORMAT_STYLE_PRESETS = _chunkNQF32I6Zcjs.CONDITIONAL_FORMAT_STYLE_PRESETS; exports.CONDITIONAL_FORMAT_TIME_PERIODS = _chunkNQF32I6Zcjs.CONDITIONAL_FORMAT_TIME_PERIODS; exports.ConditionalFormatEngine = _chunkNQF32I6Zcjs.ConditionalFormatEngine; exports.DATA_VALIDATION_ERROR_STYLE_OPTIONS = _chunkNQF32I6Zcjs.DATA_VALIDATION_ERROR_STYLE_OPTIONS; exports.DATA_VALIDATION_OPERATOR_OPTIONS = _chunkNQF32I6Zcjs.DATA_VALIDATION_OPERATOR_OPTIONS; exports.DATA_VALIDATION_TYPE_OPTIONS = _chunkNQF32I6Zcjs.DATA_VALIDATION_TYPE_OPTIONS; exports.DEFAULT_COLUMN_WIDTH = _chunkNQF32I6Zcjs.DEFAULT_COLUMN_WIDTH; exports.DEFAULT_CONDITIONAL_FORMAT_STYLE = _chunkNQF32I6Zcjs.DEFAULT_CONDITIONAL_FORMAT_STYLE; exports.DEFAULT_DATA_VALIDATION_MESSAGE = _chunkNQF32I6Zcjs.DEFAULT_DATA_VALIDATION_MESSAGE; exports.DEFAULT_DATA_VALIDATION_TITLE = _chunkNQF32I6Zcjs.DEFAULT_DATA_VALIDATION_TITLE; exports.DEFAULT_ROW_HEIGHT = _chunkNQF32I6Zcjs.DEFAULT_ROW_HEIGHT; exports.DataSourceBinder = _chunkNQF32I6Zcjs.DataSourceBinder; exports.DependencyGraph = _chunkNQF32I6Zcjs.DependencyGraph; exports.EMPTY_CONDITIONAL_FORMAT_OVERLAY = _chunkNQF32I6Zcjs.EMPTY_CONDITIONAL_FORMAT_OVERLAY; exports.FORMULA_ERRORS = _chunkEWCOFSCQcjs.FORMULA_ERRORS; exports.FormulaEvaluator = _chunkEWCOFSCQcjs.FormulaEvaluator; exports.FormulaLambda = _chunkEWCOFSCQcjs.FormulaLambda; exports.FormulaParser = _chunkEWCOFSCQcjs.FormulaParser; exports.IntervalIndex = _chunkNQF32I6Zcjs.IntervalIndex; exports.MAX_DEFINED_NAME_LENGTH = _chunkNQF32I6Zcjs.MAX_DEFINED_NAME_LENGTH; exports.MAX_FORMULA_ARRAY_SIZE = _chunkEWCOFSCQcjs.MAX_FORMULA_ARRAY_SIZE; exports.MAX_LAMBDA_DEPTH = _chunkEWCOFSCQcjs.MAX_LAMBDA_DEPTH; exports.MAX_NUMBER_FORMAT_CODE_CHARS = _chunkEWCOFSCQcjs.MAX_NUMBER_FORMAT_CODE_CHARS; exports.MAX_SHEET_NAME_LENGTH = _chunkNQF32I6Zcjs.MAX_SHEET_NAME_LENGTH; exports.NUMBER_FORMAT_PRESETS = _chunkNQF32I6Zcjs.NUMBER_FORMAT_PRESETS; exports.NumberFormat = _chunkEWCOFSCQcjs.NumberFormat; exports.SPREADSHEET_CLIPBOARD_MIME = _chunkNQF32I6Zcjs.SPREADSHEET_CLIPBOARD_MIME; exports.SPREADSHEET_COLUMN_HEADER_HEIGHT = _chunkNQF32I6Zcjs.SPREADSHEET_COLUMN_HEADER_HEIGHT; exports.SPREADSHEET_DEFAULT_VIEWPORT = _chunkNQF32I6Zcjs.SPREADSHEET_DEFAULT_VIEWPORT; exports.SPREADSHEET_GROUP_ROW_HEIGHT = _chunkNQF32I6Zcjs.SPREADSHEET_GROUP_ROW_HEIGHT; exports.SPREADSHEET_IMPORT_ADAPTERS = _chunkNQF32I6Zcjs.SPREADSHEET_IMPORT_ADAPTERS; exports.SPREADSHEET_ROW_HEADER_WIDTH = _chunkNQF32I6Zcjs.SPREADSHEET_ROW_HEADER_WIDTH; exports.SPREADSHEET_TABLE_ACTIONS = _chunkNQF32I6Zcjs.SPREADSHEET_TABLE_ACTIONS; exports.SPREADSHEET_VIRTUAL_COLUMN_THRESHOLD = _chunkNQF32I6Zcjs.SPREADSHEET_VIRTUAL_COLUMN_THRESHOLD; exports.SPREADSHEET_VIRTUAL_ROW_THRESHOLD = _chunkNQF32I6Zcjs.SPREADSHEET_VIRTUAL_ROW_THRESHOLD; exports.SpreadsheetController = _chunkNQF32I6Zcjs.SpreadsheetController; exports.WHOLE_COLUMN_END_ROW = _chunkEWCOFSCQcjs.WHOLE_COLUMN_END_ROW; exports.adjustRangeForStructuralChange = _chunkNQF32I6Zcjs.adjustRangeForStructuralChange; exports.adjustRangesForStructuralChange = _chunkNQF32I6Zcjs.adjustRangesForStructuralChange; exports.aggregateValues = _chunkNQF32I6Zcjs.aggregateValues; exports.applyFormulaSuggestion = _chunkNQF32I6Zcjs.applyFormulaSuggestion; exports.bindSpreadsheetTableActions = _chunkNQF32I6Zcjs.bindSpreadsheetTableActions; exports.blendConditionalFormatColors = _chunkNQF32I6Zcjs.blendConditionalFormatColors; exports.buildSpreadsheetView = _chunkNQF32I6Zcjs.buildSpreadsheetView; exports.builtinNumberFormat = _chunkEWCOFSCQcjs.builtinNumberFormat; exports.builtinNumberFormatId = _chunkEWCOFSCQcjs.builtinNumberFormatId; exports.cellFormatForNumberFormat = _chunkNQF32I6Zcjs.cellFormatForNumberFormat; exports.checkFormulaArgumentCount = _chunkEWCOFSCQcjs.checkFormulaArgumentCount; exports.clampMenuPosition = _chunkNQF32I6Zcjs.clampMenuPosition; exports.clearNumberFormatCache = _chunkEWCOFSCQcjs.clearNumberFormatCache; exports.colNameToIndex = _chunkEWCOFSCQcjs.colNameToIndex; exports.columnDependencyKey = _chunkNQF32I6Zcjs.columnDependencyKey; exports.compareCellValues = _chunkNQF32I6Zcjs.compareCellValues; exports.compareNumbers = _chunkEWCOFSCQcjs.compareNumbers; exports.compareValues = _chunkEWCOFSCQcjs.compareValues; exports.computeFillTarget = _chunkNQF32I6Zcjs.computeFillTarget; exports.computeRowGroups = _chunkNQF32I6Zcjs.computeRowGroups; exports.conditionalFormatContrastColor = _chunkNQF32I6Zcjs.conditionalFormatContrastColor; exports.conditionalFormatIconCount = _chunkNQF32I6Zcjs.conditionalFormatIconCount; exports.conditionalFormatNumber = _chunkNQF32I6Zcjs.conditionalFormatNumber; exports.conditionalFormatStyleString = _chunkNQF32I6Zcjs.conditionalFormatStyleString; exports.copySheetName = _chunkNQF32I6Zcjs.copySheetName; exports.createConditionalFormatRule = _chunkNQF32I6Zcjs.createConditionalFormatRule; exports.createSpreadsheetClipboardData = _chunkNQF32I6Zcjs.createSpreadsheetClipboardData; exports.csvImportAdapter = _chunkNQF32I6Zcjs.csvImportAdapter; exports.dateValueToSerial = _chunkEWCOFSCQcjs.dateValueToSerial; exports.defaultIconThresholds = _chunkNQF32I6Zcjs.defaultIconThresholds; exports.deleteSheetInFormula = _chunkNQF32I6Zcjs.deleteSheetInFormula; exports.describeConditionalFormat = _chunkNQF32I6Zcjs.describeConditionalFormat; exports.describeDataValidation = _chunkNQF32I6Zcjs.describeDataValidation; exports.describeFormulaError = _chunkEWCOFSCQcjs.describeFormulaError; exports.escapeCsvField = _chunkTNNJXF46cjs.escapeCsvField; exports.evaluateConditionalFormats = _chunkNQF32I6Zcjs.evaluateConditionalFormats; exports.extractCellDependencies = _chunkNQF32I6Zcjs.extractCellDependencies; exports.extractNameDependencies = _chunkNQF32I6Zcjs.extractNameDependencies; exports.extractReferenceDependencies = _chunkNQF32I6Zcjs.extractReferenceDependencies; exports.fillSeries = _chunkNQF32I6Zcjs.fillSeries; exports.findDataValidation = _chunkNQF32I6Zcjs.findDataValidation; exports.findInvalidCells = _chunkNQF32I6Zcjs.findInvalidCells; exports.forEachRangeCell = _chunkNQF32I6Zcjs.forEachRangeCell; exports.formatCellDisplay = _chunkNQF32I6Zcjs.formatCellDisplay; exports.formatCellForDisplay = _chunkNQF32I6Zcjs.formatCellForDisplay; exports.formatGeneralFit = _chunkEWCOFSCQcjs.formatGeneralFit; exports.formatNumberFormatValue = _chunkEWCOFSCQcjs.formatNumberFormatValue; exports.formatRuleRanges = _chunkNQF32I6Zcjs.formatRuleRanges; exports.formatSheetPrefix = _chunkNQF32I6Zcjs.formatSheetPrefix; exports.formatTextFunction = _chunkEWCOFSCQcjs.formatTextFunction; exports.formatValueWithCode = _chunkNQF32I6Zcjs.formatValueWithCode; exports.formulaIdentifiers = _chunkNQF32I6Zcjs.formulaIdentifiers; exports.fullSpreadsheetViewWindow = _chunkNQF32I6Zcjs.fullSpreadsheetViewWindow; exports.getConditionalFormatCss = _chunkNQF32I6Zcjs.getConditionalFormatCss; exports.getConditionalFormatIcon = _chunkNQF32I6Zcjs.getConditionalFormatIcon; exports.getDataBarCss = _chunkNQF32I6Zcjs.getDataBarCss; exports.getFillDirection = _chunkNQF32I6Zcjs.getFillDirection; exports.getFormulaArgumentSpecIndex = _chunkEWCOFSCQcjs.getFormulaArgumentSpecIndex; exports.getFormulaCaretContext = _chunkNQF32I6Zcjs.getFormulaCaretContext; exports.getFormulaFunction = _chunkEWCOFSCQcjs.getFormulaFunction; exports.getFormulaHints = _chunkNQF32I6Zcjs.getFormulaHints; exports.getFormulaSignature = _chunkEWCOFSCQcjs.getFormulaSignature; exports.getFormulaSignatureParts = _chunkEWCOFSCQcjs.getFormulaSignatureParts; exports.getNameManagerRows = _chunkNQF32I6Zcjs.getNameManagerRows; exports.getRowSection = _chunkNQF32I6Zcjs.getRowSection; exports.getSheetTabMenuItems = _chunkNQF32I6Zcjs.getSheetTabMenuItems; exports.getSpreadsheetMenuItems = _chunkNQF32I6Zcjs.getSpreadsheetMenuItems; exports.getSpreadsheetScrollToCell = _chunkNQF32I6Zcjs.getSpreadsheetScrollToCell; exports.getSpreadsheetViewWindow = _chunkNQF32I6Zcjs.getSpreadsheetViewWindow; exports.getTableSections = _chunkNQF32I6Zcjs.getTableSections; exports.getValidationListValues = _chunkNQF32I6Zcjs.getValidationListValues; exports.importFileIntoSpreadsheet = _chunkNQF32I6Zcjs.importFileIntoSpreadsheet; exports.indexToColName = _chunkEWCOFSCQcjs.indexToColName; exports.isBlankValue = _chunkNQF32I6Zcjs.isBlankValue; exports.isFormulaError = _chunkEWCOFSCQcjs.isFormulaError; exports.isFormulaLambda = _chunkEWCOFSCQcjs.isFormulaLambda; exports.isGeneralNumberFormat = _chunkNQF32I6Zcjs.isGeneralNumberFormat; exports.isLambdaDefinition = _chunkNQF32I6Zcjs.isLambdaDefinition; exports.isSingleCellRange = _chunkNQF32I6Zcjs.isSingleCellRange; exports.listFormulaFunctions = _chunkEWCOFSCQcjs.listFormulaFunctions; exports.mapFormulaReferences = _chunkNQF32I6Zcjs.mapFormulaReferences; exports.matchesFilterRule = _chunkNQF32I6Zcjs.matchesFilterRule; exports.matchesTimePeriod = _chunkNQF32I6Zcjs.matchesTimePeriod; exports.measureSpreadsheetView = _chunkNQF32I6Zcjs.measureSpreadsheetView; exports.nextSheetName = _chunkNQF32I6Zcjs.nextSheetName; exports.normalizeRange = _chunkNQF32I6Zcjs.normalizeRange; exports.numberFormatColorToCss = _chunkEWCOFSCQcjs.numberFormatColorToCss; exports.numberFormatForCellFormat = _chunkNQF32I6Zcjs.numberFormatForCellFormat; exports.numberToText = _chunkEWCOFSCQcjs.numberToText; exports.offsetFormulaReferences = _chunkNQF32I6Zcjs.offsetFormulaReferences; exports.parseCellInput = _chunkEWCOFSCQcjs.parseCellInput; exports.parseCellReference = _chunkEWCOFSCQcjs.parseCellReference; exports.parseCriteria = _chunkEWCOFSCQcjs.parseCriteria; exports.parseCsv = _chunkTNNJXF46cjs.parseCsv; exports.parseFormula = _chunkEWCOFSCQcjs.parseFormula; exports.parseHtmlTable = _chunkNQF32I6Zcjs.parseHtmlTable; exports.parseNumberText = _chunkEWCOFSCQcjs.parseNumberText; exports.parseRange = _chunkEWCOFSCQcjs.parseRange; exports.parseRuleRanges = _chunkNQF32I6Zcjs.parseRuleRanges; exports.parseTsv = _chunkTNNJXF46cjs.parseTsv; exports.quoteSheetName = _chunkNQF32I6Zcjs.quoteSheetName; exports.rangeContains = _chunkNQF32I6Zcjs.rangeContains; exports.rangeContainsRange = _chunkNQF32I6Zcjs.rangeContainsRange; exports.rangeDependencyKey = _chunkNQF32I6Zcjs.rangeDependencyKey; exports.rangesContain = _chunkNQF32I6Zcjs.rangesContain; exports.rangesIntersect = _chunkNQF32I6Zcjs.rangesIntersect; exports.readSpreadsheetClipboard = _chunkNQF32I6Zcjs.readSpreadsheetClipboard; exports.rebaseClipboardRows = _chunkNQF32I6Zcjs.rebaseClipboardRows; exports.registerFormulaFunction = _chunkEWCOFSCQcjs.registerFormulaFunction; exports.registerSpreadsheetImportAdapters = _chunkNQF32I6Zcjs.registerSpreadsheetImportAdapters; exports.remapFormulaReferences = _chunkNQF32I6Zcjs.remapFormulaReferences; exports.renameNameInFormula = _chunkNQF32I6Zcjs.renameNameInFormula; exports.renameSheetInFormula = _chunkNQF32I6Zcjs.renameSheetInFormula; exports.roundFloat = _chunkNQF32I6Zcjs.roundFloat; exports.rowPassesFilters = _chunkNQF32I6Zcjs.rowPassesFilters; exports.ruleAnchor = _chunkNQF32I6Zcjs.ruleAnchor; exports.ruleFormulaAt = _chunkNQF32I6Zcjs.ruleFormulaAt; exports.runSpreadsheetMenuItem = _chunkNQF32I6Zcjs.runSpreadsheetMenuItem; exports.sameSpreadsheetViewWindow = _chunkNQF32I6Zcjs.sameSpreadsheetViewWindow; exports.searchFormulaFunctions = _chunkEWCOFSCQcjs.searchFormulaFunctions; exports.serialFromYmd = _chunkEWCOFSCQcjs.serialFromYmd; exports.serializeCsv = _chunkTNNJXF46cjs.serializeCsv; exports.serializeHtmlTable = _chunkNQF32I6Zcjs.serializeHtmlTable; exports.serializeTsv = _chunkTNNJXF46cjs.serializeTsv; exports.sheetDropIndex = _chunkNQF32I6Zcjs.sheetDropIndex; exports.sheetNameNeedsQuotes = _chunkNQF32I6Zcjs.sheetNameNeedsQuotes; exports.shiftFormulaReferences = _chunkNQF32I6Zcjs.shiftFormulaReferences; exports.shiftRuleFormula = _chunkNQF32I6Zcjs.shiftRuleFormula; exports.shouldVirtualizeSpreadsheet = _chunkNQF32I6Zcjs.shouldVirtualizeSpreadsheet; exports.sortCompareValues = _chunkEWCOFSCQcjs.sortCompareValues; exports.subtractRange = _chunkNQF32I6Zcjs.subtractRange; exports.subtractRangeFromRanges = _chunkNQF32I6Zcjs.subtractRangeFromRanges; exports.toNumber = _chunkNQF32I6Zcjs.toNumber; exports.tokenizeFormula = _chunkEWCOFSCQcjs.tokenizeFormula; exports.tsvImportAdapter = _chunkNQF32I6Zcjs.tsvImportAdapter; exports.unregisterFormulaFunction = _chunkEWCOFSCQcjs.unregisterFormulaFunction; exports.validateCellInput = _chunkNQF32I6Zcjs.validateCellInput; exports.validateDefinedName = _chunkNQF32I6Zcjs.validateDefinedName; exports.validateSheetName = _chunkNQF32I6Zcjs.validateSheetName; exports.wildcardToRegExp = _chunkEWCOFSCQcjs.wildcardToRegExp;
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+ exports.CONDITIONAL_FORMAT_ICON_SETS = _chunkYK5TATOFcjs.CONDITIONAL_FORMAT_ICON_SETS; exports.CONDITIONAL_FORMAT_PRESETS = _chunkYK5TATOFcjs.CONDITIONAL_FORMAT_PRESETS; exports.CONDITIONAL_FORMAT_STYLE_PRESETS = _chunkYK5TATOFcjs.CONDITIONAL_FORMAT_STYLE_PRESETS; exports.CONDITIONAL_FORMAT_TIME_PERIODS = _chunkYK5TATOFcjs.CONDITIONAL_FORMAT_TIME_PERIODS; exports.ConditionalFormatEngine = _chunkYK5TATOFcjs.ConditionalFormatEngine; exports.DATA_VALIDATION_ERROR_STYLE_OPTIONS = _chunkYK5TATOFcjs.DATA_VALIDATION_ERROR_STYLE_OPTIONS; exports.DATA_VALIDATION_OPERATOR_OPTIONS = _chunkYK5TATOFcjs.DATA_VALIDATION_OPERATOR_OPTIONS; exports.DATA_VALIDATION_TYPE_OPTIONS = _chunkYK5TATOFcjs.DATA_VALIDATION_TYPE_OPTIONS; exports.DEFAULT_COLUMN_WIDTH = _chunkYK5TATOFcjs.DEFAULT_COLUMN_WIDTH; exports.DEFAULT_CONDITIONAL_FORMAT_STYLE = _chunkYK5TATOFcjs.DEFAULT_CONDITIONAL_FORMAT_STYLE; exports.DEFAULT_DATA_VALIDATION_MESSAGE = _chunkYK5TATOFcjs.DEFAULT_DATA_VALIDATION_MESSAGE; exports.DEFAULT_DATA_VALIDATION_TITLE = _chunkYK5TATOFcjs.DEFAULT_DATA_VALIDATION_TITLE; exports.DEFAULT_ROW_HEIGHT = _chunkYK5TATOFcjs.DEFAULT_ROW_HEIGHT; exports.DataSourceBinder = _chunkYK5TATOFcjs.DataSourceBinder; exports.DependencyGraph = _chunkYK5TATOFcjs.DependencyGraph; exports.EMPTY_CONDITIONAL_FORMAT_OVERLAY = _chunkYK5TATOFcjs.EMPTY_CONDITIONAL_FORMAT_OVERLAY; exports.FORMULA_ERRORS = _chunkEWCOFSCQcjs.FORMULA_ERRORS; exports.FormulaEvaluator = _chunkEWCOFSCQcjs.FormulaEvaluator; exports.FormulaLambda = _chunkEWCOFSCQcjs.FormulaLambda; exports.FormulaParser = _chunkEWCOFSCQcjs.FormulaParser; exports.IntervalIndex = _chunkYK5TATOFcjs.IntervalIndex; exports.MAX_DEFINED_NAME_LENGTH = _chunkYK5TATOFcjs.MAX_DEFINED_NAME_LENGTH; exports.MAX_FORMULA_ARRAY_SIZE = _chunkEWCOFSCQcjs.MAX_FORMULA_ARRAY_SIZE; exports.MAX_LAMBDA_DEPTH = _chunkEWCOFSCQcjs.MAX_LAMBDA_DEPTH; exports.MAX_NUMBER_FORMAT_CODE_CHARS = _chunkEWCOFSCQcjs.MAX_NUMBER_FORMAT_CODE_CHARS; exports.MAX_SHEET_NAME_LENGTH = _chunkYK5TATOFcjs.MAX_SHEET_NAME_LENGTH; exports.NUMBER_FORMAT_PRESETS = _chunkYK5TATOFcjs.NUMBER_FORMAT_PRESETS; exports.NumberFormat = _chunkEWCOFSCQcjs.NumberFormat; exports.SPREADSHEET_CLIPBOARD_MIME = _chunkYK5TATOFcjs.SPREADSHEET_CLIPBOARD_MIME; exports.SPREADSHEET_COLUMN_HEADER_HEIGHT = _chunkYK5TATOFcjs.SPREADSHEET_COLUMN_HEADER_HEIGHT; exports.SPREADSHEET_DEFAULT_VIEWPORT = _chunkYK5TATOFcjs.SPREADSHEET_DEFAULT_VIEWPORT; exports.SPREADSHEET_GROUP_ROW_HEIGHT = _chunkYK5TATOFcjs.SPREADSHEET_GROUP_ROW_HEIGHT; exports.SPREADSHEET_IMPORT_ADAPTERS = _chunkYK5TATOFcjs.SPREADSHEET_IMPORT_ADAPTERS; exports.SPREADSHEET_ROW_HEADER_WIDTH = _chunkYK5TATOFcjs.SPREADSHEET_ROW_HEADER_WIDTH; exports.SPREADSHEET_TABLE_ACTIONS = _chunkYK5TATOFcjs.SPREADSHEET_TABLE_ACTIONS; exports.SPREADSHEET_VIRTUAL_COLUMN_THRESHOLD = _chunkYK5TATOFcjs.SPREADSHEET_VIRTUAL_COLUMN_THRESHOLD; exports.SPREADSHEET_VIRTUAL_ROW_THRESHOLD = _chunkYK5TATOFcjs.SPREADSHEET_VIRTUAL_ROW_THRESHOLD; exports.SpreadsheetController = _chunkYK5TATOFcjs.SpreadsheetController; exports.WHOLE_COLUMN_END_ROW = _chunkEWCOFSCQcjs.WHOLE_COLUMN_END_ROW; exports.adjustRangeForStructuralChange = _chunkYK5TATOFcjs.adjustRangeForStructuralChange; exports.adjustRangesForStructuralChange = _chunkYK5TATOFcjs.adjustRangesForStructuralChange; exports.aggregateValues = _chunkYK5TATOFcjs.aggregateValues; exports.applyFormulaSuggestion = _chunkYK5TATOFcjs.applyFormulaSuggestion; exports.bindSpreadsheetTableActions = _chunkYK5TATOFcjs.bindSpreadsheetTableActions; exports.blendConditionalFormatColors = _chunkYK5TATOFcjs.blendConditionalFormatColors; exports.buildSpreadsheetView = _chunkYK5TATOFcjs.buildSpreadsheetView; exports.builtinNumberFormat = _chunkEWCOFSCQcjs.builtinNumberFormat; exports.builtinNumberFormatId = _chunkEWCOFSCQcjs.builtinNumberFormatId; exports.cellFormatForNumberFormat = _chunkYK5TATOFcjs.cellFormatForNumberFormat; exports.checkFormulaArgumentCount = _chunkEWCOFSCQcjs.checkFormulaArgumentCount; exports.clampMenuPosition = _chunkYK5TATOFcjs.clampMenuPosition; exports.clearNumberFormatCache = _chunkEWCOFSCQcjs.clearNumberFormatCache; exports.colNameToIndex = _chunkEWCOFSCQcjs.colNameToIndex; exports.columnDependencyKey = _chunkYK5TATOFcjs.columnDependencyKey; exports.compareCellValues = _chunkYK5TATOFcjs.compareCellValues; exports.compareNumbers = _chunkEWCOFSCQcjs.compareNumbers; exports.compareValues = _chunkEWCOFSCQcjs.compareValues; exports.computeFillTarget = _chunkYK5TATOFcjs.computeFillTarget; exports.computeRowGroups = _chunkYK5TATOFcjs.computeRowGroups; exports.conditionalFormatContrastColor = _chunkYK5TATOFcjs.conditionalFormatContrastColor; exports.conditionalFormatIconCount = _chunkYK5TATOFcjs.conditionalFormatIconCount; exports.conditionalFormatNumber = _chunkYK5TATOFcjs.conditionalFormatNumber; exports.conditionalFormatStyleString = _chunkYK5TATOFcjs.conditionalFormatStyleString; exports.copySheetName = _chunkYK5TATOFcjs.copySheetName; exports.createConditionalFormatRule = _chunkYK5TATOFcjs.createConditionalFormatRule; exports.createSpreadsheetClipboardData = _chunkYK5TATOFcjs.createSpreadsheetClipboardData; exports.csvImportAdapter = _chunkYK5TATOFcjs.csvImportAdapter; exports.dateValueToSerial = _chunkEWCOFSCQcjs.dateValueToSerial; exports.defaultIconThresholds = _chunkYK5TATOFcjs.defaultIconThresholds; exports.deleteSheetInFormula = _chunkYK5TATOFcjs.deleteSheetInFormula; exports.describeConditionalFormat = _chunkYK5TATOFcjs.describeConditionalFormat; exports.describeDataValidation = _chunkYK5TATOFcjs.describeDataValidation; exports.describeFormulaError = _chunkEWCOFSCQcjs.describeFormulaError; exports.escapeCsvField = _chunkTNNJXF46cjs.escapeCsvField; exports.evaluateConditionalFormats = _chunkYK5TATOFcjs.evaluateConditionalFormats; exports.extractCellDependencies = _chunkYK5TATOFcjs.extractCellDependencies; exports.extractNameDependencies = _chunkYK5TATOFcjs.extractNameDependencies; exports.extractReferenceDependencies = _chunkYK5TATOFcjs.extractReferenceDependencies; exports.fillSeries = _chunkYK5TATOFcjs.fillSeries; exports.findDataValidation = _chunkYK5TATOFcjs.findDataValidation; exports.findInvalidCells = _chunkYK5TATOFcjs.findInvalidCells; exports.forEachRangeCell = _chunkYK5TATOFcjs.forEachRangeCell; exports.formatCellDisplay = _chunkYK5TATOFcjs.formatCellDisplay; exports.formatCellForDisplay = _chunkYK5TATOFcjs.formatCellForDisplay; exports.formatGeneralFit = _chunkEWCOFSCQcjs.formatGeneralFit; exports.formatNumberFormatValue = _chunkEWCOFSCQcjs.formatNumberFormatValue; exports.formatRuleRanges = _chunkYK5TATOFcjs.formatRuleRanges; exports.formatSheetPrefix = _chunkYK5TATOFcjs.formatSheetPrefix; exports.formatTextFunction = _chunkEWCOFSCQcjs.formatTextFunction; exports.formatValueWithCode = _chunkYK5TATOFcjs.formatValueWithCode; exports.formulaIdentifiers = _chunkYK5TATOFcjs.formulaIdentifiers; exports.fullSpreadsheetViewWindow = _chunkYK5TATOFcjs.fullSpreadsheetViewWindow; exports.getConditionalFormatCss = _chunkYK5TATOFcjs.getConditionalFormatCss; exports.getConditionalFormatIcon = _chunkYK5TATOFcjs.getConditionalFormatIcon; exports.getDataBarCss = _chunkYK5TATOFcjs.getDataBarCss; exports.getFillDirection = _chunkYK5TATOFcjs.getFillDirection; exports.getFormulaArgumentSpecIndex = _chunkEWCOFSCQcjs.getFormulaArgumentSpecIndex; exports.getFormulaCaretContext = _chunkYK5TATOFcjs.getFormulaCaretContext; exports.getFormulaFunction = _chunkEWCOFSCQcjs.getFormulaFunction; exports.getFormulaHints = _chunkYK5TATOFcjs.getFormulaHints; exports.getFormulaSignature = _chunkEWCOFSCQcjs.getFormulaSignature; exports.getFormulaSignatureParts = _chunkEWCOFSCQcjs.getFormulaSignatureParts; exports.getNameManagerRows = _chunkYK5TATOFcjs.getNameManagerRows; exports.getRowSection = _chunkYK5TATOFcjs.getRowSection; exports.getSheetTabMenuItems = _chunkYK5TATOFcjs.getSheetTabMenuItems; exports.getSpreadsheetMenuItems = _chunkYK5TATOFcjs.getSpreadsheetMenuItems; exports.getSpreadsheetScrollToCell = _chunkYK5TATOFcjs.getSpreadsheetScrollToCell; exports.getSpreadsheetViewWindow = _chunkYK5TATOFcjs.getSpreadsheetViewWindow; exports.getTableSections = _chunkYK5TATOFcjs.getTableSections; exports.getValidationListValues = _chunkYK5TATOFcjs.getValidationListValues; exports.importFileIntoSpreadsheet = _chunkYK5TATOFcjs.importFileIntoSpreadsheet; exports.indexToColName = _chunkEWCOFSCQcjs.indexToColName; exports.isBlankValue = _chunkYK5TATOFcjs.isBlankValue; exports.isFormulaError = _chunkEWCOFSCQcjs.isFormulaError; exports.isFormulaLambda = _chunkEWCOFSCQcjs.isFormulaLambda; exports.isGeneralNumberFormat = _chunkYK5TATOFcjs.isGeneralNumberFormat; exports.isLambdaDefinition = _chunkYK5TATOFcjs.isLambdaDefinition; exports.isSingleCellRange = _chunkYK5TATOFcjs.isSingleCellRange; exports.listFormulaFunctions = _chunkEWCOFSCQcjs.listFormulaFunctions; exports.mapConditionalFormatFormulas = _chunkYK5TATOFcjs.mapConditionalFormatFormulas; exports.mapDataValidationFormulas = _chunkYK5TATOFcjs.mapDataValidationFormulas; exports.mapFormulaReferences = _chunkYK5TATOFcjs.mapFormulaReferences; exports.matchesFilterRule = _chunkYK5TATOFcjs.matchesFilterRule; exports.matchesTimePeriod = _chunkYK5TATOFcjs.matchesTimePeriod; exports.measureSpreadsheetView = _chunkYK5TATOFcjs.measureSpreadsheetView; exports.mergeRuleRanges = _chunkYK5TATOFcjs.mergeRuleRanges; exports.nextSheetName = _chunkYK5TATOFcjs.nextSheetName; exports.normalizeRange = _chunkYK5TATOFcjs.normalizeRange; exports.numberFormatColorToCss = _chunkEWCOFSCQcjs.numberFormatColorToCss; exports.numberFormatForCellFormat = _chunkYK5TATOFcjs.numberFormatForCellFormat; exports.numberToText = _chunkEWCOFSCQcjs.numberToText; exports.offsetFormulaReferences = _chunkYK5TATOFcjs.offsetFormulaReferences; exports.parseCellInput = _chunkEWCOFSCQcjs.parseCellInput; exports.parseCellReference = _chunkEWCOFSCQcjs.parseCellReference; exports.parseCriteria = _chunkEWCOFSCQcjs.parseCriteria; exports.parseCsv = _chunkTNNJXF46cjs.parseCsv; exports.parseFormula = _chunkEWCOFSCQcjs.parseFormula; exports.parseHtmlTable = _chunkYK5TATOFcjs.parseHtmlTable; exports.parseNumberText = _chunkEWCOFSCQcjs.parseNumberText; exports.parseRange = _chunkEWCOFSCQcjs.parseRange; exports.parseRuleRanges = _chunkYK5TATOFcjs.parseRuleRanges; exports.parseTsv = _chunkTNNJXF46cjs.parseTsv; exports.quoteSheetName = _chunkYK5TATOFcjs.quoteSheetName; exports.rangeContains = _chunkYK5TATOFcjs.rangeContains; exports.rangeContainsRange = _chunkYK5TATOFcjs.rangeContainsRange; exports.rangeDependencyKey = _chunkYK5TATOFcjs.rangeDependencyKey; exports.rangesContain = _chunkYK5TATOFcjs.rangesContain; exports.rangesIntersect = _chunkYK5TATOFcjs.rangesIntersect; exports.readSpreadsheetClipboard = _chunkYK5TATOFcjs.readSpreadsheetClipboard; exports.reanchorRuleFormula = _chunkYK5TATOFcjs.reanchorRuleFormula; exports.rebaseClipboardRows = _chunkYK5TATOFcjs.rebaseClipboardRows; exports.registerFormulaFunction = _chunkEWCOFSCQcjs.registerFormulaFunction; exports.registerSpreadsheetImportAdapters = _chunkYK5TATOFcjs.registerSpreadsheetImportAdapters; exports.remapFormulaReferences = _chunkYK5TATOFcjs.remapFormulaReferences; exports.renameNameInFormula = _chunkYK5TATOFcjs.renameNameInFormula; exports.renameSheetInFormula = _chunkYK5TATOFcjs.renameSheetInFormula; exports.roundFloat = _chunkYK5TATOFcjs.roundFloat; exports.rowPassesFilters = _chunkYK5TATOFcjs.rowPassesFilters; exports.ruleAnchor = _chunkYK5TATOFcjs.ruleAnchor; exports.ruleFormulaAt = _chunkYK5TATOFcjs.ruleFormulaAt; exports.runSpreadsheetMenuItem = _chunkYK5TATOFcjs.runSpreadsheetMenuItem; exports.sameSpreadsheetViewWindow = _chunkYK5TATOFcjs.sameSpreadsheetViewWindow; exports.searchFormulaFunctions = _chunkEWCOFSCQcjs.searchFormulaFunctions; exports.serialFromYmd = _chunkEWCOFSCQcjs.serialFromYmd; exports.serializeCsv = _chunkTNNJXF46cjs.serializeCsv; exports.serializeHtmlTable = _chunkYK5TATOFcjs.serializeHtmlTable; exports.serializeTsv = _chunkTNNJXF46cjs.serializeTsv; exports.sheetDropIndex = _chunkYK5TATOFcjs.sheetDropIndex; exports.sheetNameNeedsQuotes = _chunkYK5TATOFcjs.sheetNameNeedsQuotes; exports.shiftFormulaReferences = _chunkYK5TATOFcjs.shiftFormulaReferences; exports.shiftRuleFormula = _chunkYK5TATOFcjs.shiftRuleFormula; exports.shouldVirtualizeSpreadsheet = _chunkYK5TATOFcjs.shouldVirtualizeSpreadsheet; exports.sortCompareValues = _chunkEWCOFSCQcjs.sortCompareValues; exports.sortRuleRanges = _chunkYK5TATOFcjs.sortRuleRanges; exports.sortRules = _chunkYK5TATOFcjs.sortRules; exports.subtractRange = _chunkYK5TATOFcjs.subtractRange; exports.subtractRangeFromRanges = _chunkYK5TATOFcjs.subtractRangeFromRanges; exports.toNumber = _chunkYK5TATOFcjs.toNumber; exports.tokenizeFormula = _chunkEWCOFSCQcjs.tokenizeFormula; exports.transposeFormulaReferences = _chunkYK5TATOFcjs.transposeFormulaReferences; exports.transposeRuleFormula = _chunkYK5TATOFcjs.transposeRuleFormula; exports.transposeRuleRanges = _chunkYK5TATOFcjs.transposeRuleRanges; exports.transposeRules = _chunkYK5TATOFcjs.transposeRules; exports.tsvImportAdapter = _chunkYK5TATOFcjs.tsvImportAdapter; exports.unregisterFormulaFunction = _chunkEWCOFSCQcjs.unregisterFormulaFunction; exports.validateCellInput = _chunkYK5TATOFcjs.validateCellInput; exports.validateDefinedName = _chunkYK5TATOFcjs.validateDefinedName; exports.validateSheetName = _chunkYK5TATOFcjs.validateSheetName; exports.wildcardToRegExp = _chunkEWCOFSCQcjs.wildcardToRegExp;
367
387
  //# 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;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;AACA;AACF,yDAA8B;AAC9B;AACE;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;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;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;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,g6YAAC","file":"/home/runner/work/editor/editor/packages/core/dist/spreadsheet/index.cjs"}
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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;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;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;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;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,glaAAC","file":"/home/runner/work/editor/editor/packages/core/dist/spreadsheet/index.cjs"}
@@ -1,5 +1,5 @@
1
- import { A as ASTNode, P as FormulaErrorCode, V as FormulaRange, a as CellData, c as CellFormat, p as ConditionalFormatSheet, n as ConditionalFormatOverlay, o as ConditionalFormatRule, j as ConditionalCellFormat, t as ConditionalFormatValue, l as ConditionalFormatIconSet, F as DataValidationRule, q as ConditionalFormatStyle, r as ConditionalFormatTimePeriod, e as CellRange, y as DataValidationErrorStyle, z as DataValidationOperator, H as DataValidationType, a8 as NewConditionalFormatRule, G as DataValidationSheet, d as CellPosition, E as DataValidationResult, $ as GroupAggregate, aj as SortDirection, N as FilterRule, S as SpreadsheetController, aw as SpreadsheetDefinedName, aP as StructuralChange, aM as SpreadsheetViewModel } from '../controller-CxXGOEmy.cjs';
2
- export { B as BinaryOpNode, C as CellCoordinate, b as CellDep, f as CellRefNode, g as CellValueReader, h as ColumnBinding, i as ColumnType, k as ConditionalFormatCondition, m as ConditionalFormatOperator, s as ConditionalFormatType, u as CsvExportOptions, v as CsvImportOptions, D as DEFAULT_COLUMN_WIDTH, w as DEFAULT_ROW_HEIGHT, x as DataSourceBinder, I as DependencyGraph, J as DependencyIndexStats, K as EvaluationContext, L as FORMULA_ERRORS, M as FilterOperator, O as FormulaDiagnostic, Q as FormulaEvaluationResult, R as FormulaEvaluator, T as FormulaNameDefinition, U as FormulaParser, W as FormulaReferenceFilter, X as FormulaReferenceInfo, Y as FormulaToken, Z as FormulaTokenType, _ as FunctionCallNode, a0 as GroupSummary, a1 as IntervalIndex, a2 as InvokeNode, a3 as LiteralNode, a4 as MAX_FORMULA_ARRAY_SIZE, a5 as MissingNode, a6 as NameDep, a7 as NameNode, a9 as NewDataValidationRule, aa as NewFilterRule, ab as ParsedSpreadsheetClipboard, ac as PropertyRefNode, ad as RangeNode, ae as RangeResolveOptions, af as ReferenceDep, ag as RowType, ah as SPREADSHEET_CLIPBOARD_MIME, ai as SheetQualifier, ak as SortKey, al as SpillRefNode, am as SpreadsheetCellSpan, an as SpreadsheetClipboardCell, ao as SpreadsheetClipboardData, ap as SpreadsheetClipboardPayload, aq as SpreadsheetClipboardSource, ar as SpreadsheetColumn, as as SpreadsheetCommitResult, at as SpreadsheetControllerOptions, au as SpreadsheetDataSource, av as SpreadsheetDataSourceField, ax as SpreadsheetDocument, ay as SpreadsheetFilterState, az as SpreadsheetGrouping, aA as SpreadsheetNameInfo, aB as SpreadsheetNameScope, aC as SpreadsheetRecalculationStats, aD as SpreadsheetRow, aE as SpreadsheetRowGroup, aF as SpreadsheetRowSection, aG as SpreadsheetSheetInfo, aH as SpreadsheetSpill, aI as SpreadsheetTableSettings, aJ as SpreadsheetValidationAction, aK as SpreadsheetValidationPrompt, aL as SpreadsheetViewColumn, aN as SpreadsheetViewRow, aO as SpreadsheetWorkbook, aQ as UnaryOpNode, aR as WHOLE_COLUMN_END_ROW, aS as buildSpreadsheetView, aT as colNameToIndex, aU as columnDependencyKey, aV as compareNumbers, aW as compareValues, aX as computeRowGroups, aY as createSpreadsheetClipboardData, aZ as deleteSheetInFormula, a_ as describeFormulaError, a$ as extractCellDependencies, b0 as extractNameDependencies, b1 as extractReferenceDependencies, b2 as formatSheetPrefix, b3 as formulaIdentifiers, b4 as getRowSection, b5 as getTableSections, b6 as indexToColName, b7 as isFormulaError, b8 as mapFormulaReferences, b9 as numberToText, ba as offsetFormulaReferences, bb as parseCellReference, bc as parseFormula, bd as parseHtmlTable, be as parseRange, bf as quoteSheetName, bg as rangeDependencyKey, bh as readSpreadsheetClipboard, bi as rebaseClipboardRows, bj as remapFormulaReferences, bk as renameNameInFormula, bl as renameSheetInFormula, bm as rowPassesFilters, bn as serializeHtmlTable, bo as sheetNameNeedsQuotes, bp as shiftFormulaReferences, bq as sortCompareValues, br as tokenizeFormula } from '../controller-CxXGOEmy.cjs';
1
+ import { A as ASTNode, P as FormulaErrorCode, V as FormulaRange, a as CellData, c as CellFormat, p as ConditionalFormatSheet, n as ConditionalFormatOverlay, o as ConditionalFormatRule, j as ConditionalCellFormat, t as ConditionalFormatValue, l as ConditionalFormatIconSet, F as DataValidationRule, q as ConditionalFormatStyle, r as ConditionalFormatTimePeriod, e as CellRange, y as DataValidationErrorStyle, z as DataValidationOperator, H as DataValidationType, a8 as NewConditionalFormatRule, G as DataValidationSheet, d as CellPosition, E as DataValidationResult, $ as GroupAggregate, aj as SortDirection, N as FilterRule, S as SpreadsheetController, aw as SpreadsheetDefinedName, aP as StructuralChange, aM as SpreadsheetViewModel } from '../controller-w6eRTjF8.cjs';
2
+ export { B as BinaryOpNode, C as CellCoordinate, b as CellDep, f as CellRefNode, g as CellValueReader, h as ColumnBinding, i as ColumnType, k as ConditionalFormatCondition, m as ConditionalFormatOperator, s as ConditionalFormatType, u as CsvExportOptions, v as CsvImportOptions, D as DEFAULT_COLUMN_WIDTH, w as DEFAULT_ROW_HEIGHT, x as DataSourceBinder, I as DependencyGraph, J as DependencyIndexStats, K as EvaluationContext, L as FORMULA_ERRORS, M as FilterOperator, O as FormulaDiagnostic, Q as FormulaEvaluationResult, R as FormulaEvaluator, T as FormulaNameDefinition, U as FormulaParser, W as FormulaReferenceFilter, X as FormulaReferenceInfo, Y as FormulaToken, Z as FormulaTokenType, _ as FunctionCallNode, a0 as GroupSummary, a1 as IntervalIndex, a2 as InvokeNode, a3 as LiteralNode, a4 as MAX_FORMULA_ARRAY_SIZE, a5 as MissingNode, a6 as NameDep, a7 as NameNode, a9 as NewDataValidationRule, aa as NewFilterRule, ab as ParsedSpreadsheetClipboard, ac as PropertyRefNode, ad as RangeNode, ae as RangeResolveOptions, af as ReferenceDep, ag as RowType, ah as SPREADSHEET_CLIPBOARD_MIME, ai as SheetQualifier, ak as SortKey, al as SpillRefNode, am as SpreadsheetCellSpan, an as SpreadsheetClipboardCell, ao as SpreadsheetClipboardData, ap as SpreadsheetClipboardPayload, aq as SpreadsheetClipboardSource, ar as SpreadsheetColumn, as as SpreadsheetCommitResult, at as SpreadsheetControllerOptions, au as SpreadsheetDataSource, av as SpreadsheetDataSourceField, ax as SpreadsheetDocument, ay as SpreadsheetFilterState, az as SpreadsheetGrouping, aA as SpreadsheetNameInfo, aB as SpreadsheetNameScope, aC as SpreadsheetRecalculationStats, aD as SpreadsheetRow, aE as SpreadsheetRowGroup, aF as SpreadsheetRowSection, aG as SpreadsheetSheetInfo, aH as SpreadsheetSpill, aI as SpreadsheetTableSettings, aJ as SpreadsheetValidationAction, aK as SpreadsheetValidationPrompt, aL as SpreadsheetViewColumn, aN as SpreadsheetViewRow, aO as SpreadsheetWorkbook, aQ as UnaryOpNode, aR as WHOLE_COLUMN_END_ROW, aS as buildSpreadsheetView, aT as colNameToIndex, aU as columnDependencyKey, aV as compareNumbers, aW as compareValues, aX as computeRowGroups, aY as createSpreadsheetClipboardData, aZ as deleteSheetInFormula, a_ as describeFormulaError, a$ as extractCellDependencies, b0 as extractNameDependencies, b1 as extractReferenceDependencies, b2 as formatSheetPrefix, b3 as formulaIdentifiers, b4 as getRowSection, b5 as getTableSections, b6 as indexToColName, b7 as isFormulaError, b8 as mapFormulaReferences, b9 as numberToText, ba as offsetFormulaReferences, bb as parseCellReference, bc as parseFormula, bd as parseHtmlTable, be as parseRange, bf as quoteSheetName, bg as rangeDependencyKey, bh as readSpreadsheetClipboard, bi as rebaseClipboardRows, bj as remapFormulaReferences, bk as renameNameInFormula, bl as renameSheetInFormula, bm as rowPassesFilters, bn as serializeHtmlTable, bo as sheetNameNeedsQuotes, bp as shiftFormulaReferences, bq as sortCompareValues, br as tokenizeFormula, bs as transposeFormulaReferences } from '../controller-w6eRTjF8.cjs';
3
3
  import { I as ImportAdapterRegistry, b as ImportAdapter, h as ImportInput, a as ImportOutcome } from '../registry-CEgwXED1.cjs';
4
4
 
5
5
  /**
@@ -1075,6 +1075,79 @@ declare function forEachRangeCell(ranges: CellRange[], rowCount: number, colCoun
1075
1075
  declare function formatRuleRanges(ranges: CellRange[]): string;
1076
1076
  /** Parses `A1:B5, D2` (commas, semicolons or spaces between ranges; `$` ignored). Null when any part is not a cell or range. */
1077
1077
  declare function parseRuleRanges(text: string): CellRange[] | null;
1078
+ /**
1079
+ * Joins ranges that touch or overlap into fewer rectangles: ranges with the
1080
+ * same columns and adjacent rows, then ranges with the same rows and
1081
+ * adjacent columns. The result is sorted by row, then column.
1082
+ */
1083
+ declare function mergeRuleRanges(ranges: CellRange[]): CellRange[];
1084
+ /**
1085
+ * Rule ranges after sorting the rows of `block` (`newRowOf(oldRow)` gives a
1086
+ * sorted row's new index), following Excel: the part of a range that spans
1087
+ * every sorted row applies to the column and stays; the cells of a range
1088
+ * covering only some of the sorted rows move with their rows. Returns null
1089
+ * when no range changes.
1090
+ */
1091
+ declare function sortRuleRanges(ranges: CellRange[], block: CellRange, newRowOf: (row: number) => number): CellRange[] | null;
1092
+ /**
1093
+ * Rule ranges after transposing `block` in place around its top-left cell
1094
+ * (the transposed block is `target`): the cells inside the block move to
1095
+ * their transposed positions (`inside`), cells elsewhere stay (`outside`),
1096
+ * except those under the transposed block, which it replaces. Null when
1097
+ * the rule touches neither.
1098
+ */
1099
+ declare function transposeRuleRanges(ranges: CellRange[], block: CellRange, target: CellRange): {
1100
+ inside: CellRange[];
1101
+ outside: CellRange[];
1102
+ } | null;
1103
+ /**
1104
+ * Rewrites a rule formula written for `from` so it means the same when
1105
+ * written for `to` (rules are written for their first range's top-left
1106
+ * cell, which can change when ranges move). Keeps the caller's leading `=`
1107
+ * (or its absence).
1108
+ */
1109
+ declare function reanchorRuleFormula(formula: string, from: {
1110
+ row: number;
1111
+ col: number;
1112
+ }, to: {
1113
+ row: number;
1114
+ col: number;
1115
+ }): string;
1116
+ /**
1117
+ * Transposes a rule formula written for `anchor` (a cell of `block`): see
1118
+ * `transposeFormulaReferences`. The result is written for the transposed
1119
+ * anchor. Keeps the caller's leading `=` (or its absence).
1120
+ */
1121
+ declare function transposeRuleFormula(formula: string, anchor: {
1122
+ row: number;
1123
+ col: number;
1124
+ }, block: CellRange): string;
1125
+ /** Applies `fn` to every formula of a conditional format (expression, `=` values, formula anchors). */
1126
+ declare function mapConditionalFormatFormulas(rule: ConditionalFormatRule, fn: (formula: string) => string): ConditionalFormatRule;
1127
+ /** Applies `fn` to the `=` formulas of a data validation rule. */
1128
+ declare function mapDataValidationFormulas(rule: DataValidationRule, fn: (formula: string) => string): DataValidationRule;
1129
+ type RuleFormulaMapper<R> = (rule: R, fn: (formula: string) => string) => R;
1130
+ /**
1131
+ * Conditional formats or validations after a sort of `block` (see
1132
+ * `sortRuleRanges`). Rules whose first cell changes get their formulas
1133
+ * re-anchored, so relative references keep meaning "this row". Returns the
1134
+ * same array when nothing changes.
1135
+ */
1136
+ declare function sortRules<R extends {
1137
+ ranges: CellRange[];
1138
+ }>(rules: R[], block: CellRange, newRowOf: (row: number) => number, mapFormulas: RuleFormulaMapper<R>): R[];
1139
+ /**
1140
+ * Conditional formats or validations after transposing `block` in place
1141
+ * (see `transposeRuleRanges`). Formulas of the moved part are transposed
1142
+ * (`transposeRuleFormula`). A rule with formulas that is only partly inside
1143
+ * the block is split, since one formula can't serve both layouts: the moved
1144
+ * part becomes a new rule (id from `newId`) right after it. Rules left
1145
+ * without ranges are dropped. Returns the same array when nothing changes.
1146
+ */
1147
+ declare function transposeRules<R extends {
1148
+ id: string;
1149
+ ranges: CellRange[];
1150
+ }>(rules: R[], block: CellRange, target: CellRange, mapFormulas: RuleFormulaMapper<R>, newId: () => string): R[];
1078
1151
 
1079
1152
  /**
1080
1153
  * Virtualised rendering of large sheets: which displayed rows and columns
@@ -1179,4 +1252,4 @@ declare function getSpreadsheetScrollToCell(metrics: SpreadsheetViewMetrics, vie
1179
1252
  /** Whether two windows render the same rows and columns. */
1180
1253
  declare function sameSpreadsheetViewWindow(a: SpreadsheetViewWindow, b: SpreadsheetViewWindow): boolean;
1181
1254
 
1182
- export { ASTNode, CONDITIONAL_FORMAT_ICON_SETS, CONDITIONAL_FORMAT_PRESETS, CONDITIONAL_FORMAT_STYLE_PRESETS, CONDITIONAL_FORMAT_TIME_PERIODS, CellData, CellFormat, type CellInputFormatKind, CellPosition, CellRange, ConditionalCellFormat, type ConditionalFormatCss, ConditionalFormatEngine, type ConditionalFormatIconGlyph, ConditionalFormatIconSet, ConditionalFormatOverlay, type ConditionalFormatPresetField, type ConditionalFormatPresetInfo, type ConditionalFormatPresetInput, type ConditionalFormatPresetKind, ConditionalFormatRule, ConditionalFormatSheet, ConditionalFormatStyle, ConditionalFormatTimePeriod, ConditionalFormatValue, type CsvParseOptions, type CsvSerializeOptions, DATA_VALIDATION_ERROR_STYLE_OPTIONS, DATA_VALIDATION_OPERATOR_OPTIONS, DATA_VALIDATION_TYPE_OPTIONS, DEFAULT_CONDITIONAL_FORMAT_STYLE, DEFAULT_DATA_VALIDATION_MESSAGE, DEFAULT_DATA_VALIDATION_TITLE, DataValidationErrorStyle, DataValidationOperator, DataValidationResult, DataValidationRule, DataValidationSheet, DataValidationType, EMPTY_CONDITIONAL_FORMAT_OVERLAY, type FillDirection, FilterRule, type FormattedNumberValue, type FormulaActiveCall, type FormulaArgument, type FormulaArgumentSpec, type FormulaArgumentType, type FormulaCaretContext, type FormulaCriteriaPredicate, type FormulaEnvironment, FormulaErrorCode, type FormulaFunctionCategory, type FormulaFunctionContext, type FormulaFunctionDefinition, type FormulaFunctionSuggestion, type FormulaHints, FormulaLambda, type FormulaNameSuggestionSource, FormulaRange, type FormulaSignaturePart, GroupAggregate, type ImportFileIntoSpreadsheetOptions, MAX_DEFINED_NAME_LENGTH, MAX_LAMBDA_DEPTH, MAX_NUMBER_FORMAT_CODE_CHARS, MAX_SHEET_NAME_LENGTH, NUMBER_FORMAT_PRESETS, NewConditionalFormatRule, NumberFormat, type NumberFormatColor, type NumberFormatKind, type NumberFormatPreset, type ParsedCellInput, SPREADSHEET_COLUMN_HEADER_HEIGHT, SPREADSHEET_DEFAULT_VIEWPORT, SPREADSHEET_GROUP_ROW_HEIGHT, SPREADSHEET_IMPORT_ADAPTERS, SPREADSHEET_ROW_HEADER_WIDTH, SPREADSHEET_TABLE_ACTIONS, SPREADSHEET_VIRTUAL_COLUMN_THRESHOLD, SPREADSHEET_VIRTUAL_ROW_THRESHOLD, SortDirection, SpreadsheetController, SpreadsheetDefinedName, type SpreadsheetImport, type SpreadsheetImportAdapter, type SpreadsheetMenuItem, type SpreadsheetNameRow, type SpreadsheetPanelId, type SpreadsheetTableActionName, type SpreadsheetTableActions, type SpreadsheetViewMetrics, SpreadsheetViewModel, type SpreadsheetViewWindow, type SpreadsheetViewWindowOptions, type SpreadsheetViewport, StructuralChange, adjustRangeForStructuralChange, adjustRangesForStructuralChange, aggregateValues, applyFormulaSuggestion, bindSpreadsheetTableActions, blendConditionalFormatColors, builtinNumberFormat, builtinNumberFormatId, cellFormatForNumberFormat, checkFormulaArgumentCount, clampMenuPosition, clearNumberFormatCache, compareCellValues, computeFillTarget, conditionalFormatContrastColor, conditionalFormatIconCount, conditionalFormatNumber, conditionalFormatStyleString, copySheetName, createConditionalFormatRule, csvImportAdapter, dateValueToSerial, defaultIconThresholds, describeConditionalFormat, describeDataValidation, escapeCsvField, evaluateConditionalFormats, fillSeries, findDataValidation, findInvalidCells, forEachRangeCell, formatCellDisplay, formatCellForDisplay, formatGeneralFit, formatNumberFormatValue, formatRuleRanges, formatTextFunction, formatValueWithCode, fullSpreadsheetViewWindow, getConditionalFormatCss, getConditionalFormatIcon, getDataBarCss, getFillDirection, getFormulaArgumentSpecIndex, getFormulaCaretContext, getFormulaFunction, getFormulaHints, getFormulaSignature, getFormulaSignatureParts, getNameManagerRows, getSheetTabMenuItems, getSpreadsheetMenuItems, getSpreadsheetScrollToCell, getSpreadsheetViewWindow, getValidationListValues, importFileIntoSpreadsheet, isBlankValue, isFormulaLambda, isGeneralNumberFormat, isLambdaDefinition, isSingleCellRange, listFormulaFunctions, matchesFilterRule, matchesTimePeriod, measureSpreadsheetView, nextSheetName, normalizeRange, numberFormatColorToCss, numberFormatForCellFormat, parseCellInput, parseCriteria, parseCsv, parseNumberText, parseRuleRanges, parseTsv, rangeContains, rangeContainsRange, rangesContain, rangesIntersect, registerFormulaFunction, registerSpreadsheetImportAdapters, roundFloat, ruleAnchor, ruleFormulaAt, runSpreadsheetMenuItem, sameSpreadsheetViewWindow, searchFormulaFunctions, serialFromYmd, serializeCsv, serializeTsv, sheetDropIndex, shiftRuleFormula, shouldVirtualizeSpreadsheet, subtractRange, subtractRangeFromRanges, toNumber, tsvImportAdapter, unregisterFormulaFunction, validateCellInput, validateDefinedName, validateSheetName, wildcardToRegExp };
1255
+ export { ASTNode, CONDITIONAL_FORMAT_ICON_SETS, CONDITIONAL_FORMAT_PRESETS, CONDITIONAL_FORMAT_STYLE_PRESETS, CONDITIONAL_FORMAT_TIME_PERIODS, CellData, CellFormat, type CellInputFormatKind, CellPosition, CellRange, ConditionalCellFormat, type ConditionalFormatCss, ConditionalFormatEngine, type ConditionalFormatIconGlyph, ConditionalFormatIconSet, ConditionalFormatOverlay, type ConditionalFormatPresetField, type ConditionalFormatPresetInfo, type ConditionalFormatPresetInput, type ConditionalFormatPresetKind, ConditionalFormatRule, ConditionalFormatSheet, ConditionalFormatStyle, ConditionalFormatTimePeriod, ConditionalFormatValue, type CsvParseOptions, type CsvSerializeOptions, DATA_VALIDATION_ERROR_STYLE_OPTIONS, DATA_VALIDATION_OPERATOR_OPTIONS, DATA_VALIDATION_TYPE_OPTIONS, DEFAULT_CONDITIONAL_FORMAT_STYLE, DEFAULT_DATA_VALIDATION_MESSAGE, DEFAULT_DATA_VALIDATION_TITLE, DataValidationErrorStyle, DataValidationOperator, DataValidationResult, DataValidationRule, DataValidationSheet, DataValidationType, EMPTY_CONDITIONAL_FORMAT_OVERLAY, type FillDirection, FilterRule, type FormattedNumberValue, type FormulaActiveCall, type FormulaArgument, type FormulaArgumentSpec, type FormulaArgumentType, type FormulaCaretContext, type FormulaCriteriaPredicate, type FormulaEnvironment, FormulaErrorCode, type FormulaFunctionCategory, type FormulaFunctionContext, type FormulaFunctionDefinition, type FormulaFunctionSuggestion, type FormulaHints, FormulaLambda, type FormulaNameSuggestionSource, FormulaRange, type FormulaSignaturePart, GroupAggregate, type ImportFileIntoSpreadsheetOptions, MAX_DEFINED_NAME_LENGTH, MAX_LAMBDA_DEPTH, MAX_NUMBER_FORMAT_CODE_CHARS, MAX_SHEET_NAME_LENGTH, NUMBER_FORMAT_PRESETS, NewConditionalFormatRule, NumberFormat, type NumberFormatColor, type NumberFormatKind, type NumberFormatPreset, type ParsedCellInput, SPREADSHEET_COLUMN_HEADER_HEIGHT, SPREADSHEET_DEFAULT_VIEWPORT, SPREADSHEET_GROUP_ROW_HEIGHT, SPREADSHEET_IMPORT_ADAPTERS, SPREADSHEET_ROW_HEADER_WIDTH, SPREADSHEET_TABLE_ACTIONS, SPREADSHEET_VIRTUAL_COLUMN_THRESHOLD, SPREADSHEET_VIRTUAL_ROW_THRESHOLD, SortDirection, SpreadsheetController, SpreadsheetDefinedName, type SpreadsheetImport, type SpreadsheetImportAdapter, type SpreadsheetMenuItem, type SpreadsheetNameRow, type SpreadsheetPanelId, type SpreadsheetTableActionName, type SpreadsheetTableActions, type SpreadsheetViewMetrics, SpreadsheetViewModel, type SpreadsheetViewWindow, type SpreadsheetViewWindowOptions, type SpreadsheetViewport, StructuralChange, adjustRangeForStructuralChange, adjustRangesForStructuralChange, aggregateValues, applyFormulaSuggestion, bindSpreadsheetTableActions, blendConditionalFormatColors, builtinNumberFormat, builtinNumberFormatId, cellFormatForNumberFormat, checkFormulaArgumentCount, clampMenuPosition, clearNumberFormatCache, compareCellValues, computeFillTarget, conditionalFormatContrastColor, conditionalFormatIconCount, conditionalFormatNumber, conditionalFormatStyleString, copySheetName, createConditionalFormatRule, csvImportAdapter, dateValueToSerial, defaultIconThresholds, describeConditionalFormat, describeDataValidation, escapeCsvField, evaluateConditionalFormats, fillSeries, findDataValidation, findInvalidCells, forEachRangeCell, formatCellDisplay, formatCellForDisplay, formatGeneralFit, formatNumberFormatValue, formatRuleRanges, formatTextFunction, formatValueWithCode, fullSpreadsheetViewWindow, getConditionalFormatCss, getConditionalFormatIcon, getDataBarCss, getFillDirection, getFormulaArgumentSpecIndex, getFormulaCaretContext, getFormulaFunction, getFormulaHints, getFormulaSignature, getFormulaSignatureParts, getNameManagerRows, getSheetTabMenuItems, getSpreadsheetMenuItems, getSpreadsheetScrollToCell, getSpreadsheetViewWindow, getValidationListValues, importFileIntoSpreadsheet, isBlankValue, isFormulaLambda, isGeneralNumberFormat, isLambdaDefinition, isSingleCellRange, listFormulaFunctions, mapConditionalFormatFormulas, mapDataValidationFormulas, matchesFilterRule, matchesTimePeriod, measureSpreadsheetView, mergeRuleRanges, nextSheetName, normalizeRange, numberFormatColorToCss, numberFormatForCellFormat, parseCellInput, parseCriteria, parseCsv, parseNumberText, parseRuleRanges, parseTsv, rangeContains, rangeContainsRange, rangesContain, rangesIntersect, reanchorRuleFormula, registerFormulaFunction, registerSpreadsheetImportAdapters, roundFloat, ruleAnchor, ruleFormulaAt, runSpreadsheetMenuItem, sameSpreadsheetViewWindow, searchFormulaFunctions, serialFromYmd, serializeCsv, serializeTsv, sheetDropIndex, shiftRuleFormula, shouldVirtualizeSpreadsheet, sortRuleRanges, sortRules, subtractRange, subtractRangeFromRanges, toNumber, transposeRuleFormula, transposeRuleRanges, transposeRules, tsvImportAdapter, unregisterFormulaFunction, validateCellInput, validateDefinedName, validateSheetName, wildcardToRegExp };
@@ -1,5 +1,5 @@
1
- import { A as ASTNode, P as FormulaErrorCode, V as FormulaRange, a as CellData, c as CellFormat, p as ConditionalFormatSheet, n as ConditionalFormatOverlay, o as ConditionalFormatRule, j as ConditionalCellFormat, t as ConditionalFormatValue, l as ConditionalFormatIconSet, F as DataValidationRule, q as ConditionalFormatStyle, r as ConditionalFormatTimePeriod, e as CellRange, y as DataValidationErrorStyle, z as DataValidationOperator, H as DataValidationType, a8 as NewConditionalFormatRule, G as DataValidationSheet, d as CellPosition, E as DataValidationResult, $ as GroupAggregate, aj as SortDirection, N as FilterRule, S as SpreadsheetController, aw as SpreadsheetDefinedName, aP as StructuralChange, aM as SpreadsheetViewModel } from '../controller-CxXGOEmy.js';
2
- export { B as BinaryOpNode, C as CellCoordinate, b as CellDep, f as CellRefNode, g as CellValueReader, h as ColumnBinding, i as ColumnType, k as ConditionalFormatCondition, m as ConditionalFormatOperator, s as ConditionalFormatType, u as CsvExportOptions, v as CsvImportOptions, D as DEFAULT_COLUMN_WIDTH, w as DEFAULT_ROW_HEIGHT, x as DataSourceBinder, I as DependencyGraph, J as DependencyIndexStats, K as EvaluationContext, L as FORMULA_ERRORS, M as FilterOperator, O as FormulaDiagnostic, Q as FormulaEvaluationResult, R as FormulaEvaluator, T as FormulaNameDefinition, U as FormulaParser, W as FormulaReferenceFilter, X as FormulaReferenceInfo, Y as FormulaToken, Z as FormulaTokenType, _ as FunctionCallNode, a0 as GroupSummary, a1 as IntervalIndex, a2 as InvokeNode, a3 as LiteralNode, a4 as MAX_FORMULA_ARRAY_SIZE, a5 as MissingNode, a6 as NameDep, a7 as NameNode, a9 as NewDataValidationRule, aa as NewFilterRule, ab as ParsedSpreadsheetClipboard, ac as PropertyRefNode, ad as RangeNode, ae as RangeResolveOptions, af as ReferenceDep, ag as RowType, ah as SPREADSHEET_CLIPBOARD_MIME, ai as SheetQualifier, ak as SortKey, al as SpillRefNode, am as SpreadsheetCellSpan, an as SpreadsheetClipboardCell, ao as SpreadsheetClipboardData, ap as SpreadsheetClipboardPayload, aq as SpreadsheetClipboardSource, ar as SpreadsheetColumn, as as SpreadsheetCommitResult, at as SpreadsheetControllerOptions, au as SpreadsheetDataSource, av as SpreadsheetDataSourceField, ax as SpreadsheetDocument, ay as SpreadsheetFilterState, az as SpreadsheetGrouping, aA as SpreadsheetNameInfo, aB as SpreadsheetNameScope, aC as SpreadsheetRecalculationStats, aD as SpreadsheetRow, aE as SpreadsheetRowGroup, aF as SpreadsheetRowSection, aG as SpreadsheetSheetInfo, aH as SpreadsheetSpill, aI as SpreadsheetTableSettings, aJ as SpreadsheetValidationAction, aK as SpreadsheetValidationPrompt, aL as SpreadsheetViewColumn, aN as SpreadsheetViewRow, aO as SpreadsheetWorkbook, aQ as UnaryOpNode, aR as WHOLE_COLUMN_END_ROW, aS as buildSpreadsheetView, aT as colNameToIndex, aU as columnDependencyKey, aV as compareNumbers, aW as compareValues, aX as computeRowGroups, aY as createSpreadsheetClipboardData, aZ as deleteSheetInFormula, a_ as describeFormulaError, a$ as extractCellDependencies, b0 as extractNameDependencies, b1 as extractReferenceDependencies, b2 as formatSheetPrefix, b3 as formulaIdentifiers, b4 as getRowSection, b5 as getTableSections, b6 as indexToColName, b7 as isFormulaError, b8 as mapFormulaReferences, b9 as numberToText, ba as offsetFormulaReferences, bb as parseCellReference, bc as parseFormula, bd as parseHtmlTable, be as parseRange, bf as quoteSheetName, bg as rangeDependencyKey, bh as readSpreadsheetClipboard, bi as rebaseClipboardRows, bj as remapFormulaReferences, bk as renameNameInFormula, bl as renameSheetInFormula, bm as rowPassesFilters, bn as serializeHtmlTable, bo as sheetNameNeedsQuotes, bp as shiftFormulaReferences, bq as sortCompareValues, br as tokenizeFormula } from '../controller-CxXGOEmy.js';
1
+ import { A as ASTNode, P as FormulaErrorCode, V as FormulaRange, a as CellData, c as CellFormat, p as ConditionalFormatSheet, n as ConditionalFormatOverlay, o as ConditionalFormatRule, j as ConditionalCellFormat, t as ConditionalFormatValue, l as ConditionalFormatIconSet, F as DataValidationRule, q as ConditionalFormatStyle, r as ConditionalFormatTimePeriod, e as CellRange, y as DataValidationErrorStyle, z as DataValidationOperator, H as DataValidationType, a8 as NewConditionalFormatRule, G as DataValidationSheet, d as CellPosition, E as DataValidationResult, $ as GroupAggregate, aj as SortDirection, N as FilterRule, S as SpreadsheetController, aw as SpreadsheetDefinedName, aP as StructuralChange, aM as SpreadsheetViewModel } from '../controller-w6eRTjF8.js';
2
+ export { B as BinaryOpNode, C as CellCoordinate, b as CellDep, f as CellRefNode, g as CellValueReader, h as ColumnBinding, i as ColumnType, k as ConditionalFormatCondition, m as ConditionalFormatOperator, s as ConditionalFormatType, u as CsvExportOptions, v as CsvImportOptions, D as DEFAULT_COLUMN_WIDTH, w as DEFAULT_ROW_HEIGHT, x as DataSourceBinder, I as DependencyGraph, J as DependencyIndexStats, K as EvaluationContext, L as FORMULA_ERRORS, M as FilterOperator, O as FormulaDiagnostic, Q as FormulaEvaluationResult, R as FormulaEvaluator, T as FormulaNameDefinition, U as FormulaParser, W as FormulaReferenceFilter, X as FormulaReferenceInfo, Y as FormulaToken, Z as FormulaTokenType, _ as FunctionCallNode, a0 as GroupSummary, a1 as IntervalIndex, a2 as InvokeNode, a3 as LiteralNode, a4 as MAX_FORMULA_ARRAY_SIZE, a5 as MissingNode, a6 as NameDep, a7 as NameNode, a9 as NewDataValidationRule, aa as NewFilterRule, ab as ParsedSpreadsheetClipboard, ac as PropertyRefNode, ad as RangeNode, ae as RangeResolveOptions, af as ReferenceDep, ag as RowType, ah as SPREADSHEET_CLIPBOARD_MIME, ai as SheetQualifier, ak as SortKey, al as SpillRefNode, am as SpreadsheetCellSpan, an as SpreadsheetClipboardCell, ao as SpreadsheetClipboardData, ap as SpreadsheetClipboardPayload, aq as SpreadsheetClipboardSource, ar as SpreadsheetColumn, as as SpreadsheetCommitResult, at as SpreadsheetControllerOptions, au as SpreadsheetDataSource, av as SpreadsheetDataSourceField, ax as SpreadsheetDocument, ay as SpreadsheetFilterState, az as SpreadsheetGrouping, aA as SpreadsheetNameInfo, aB as SpreadsheetNameScope, aC as SpreadsheetRecalculationStats, aD as SpreadsheetRow, aE as SpreadsheetRowGroup, aF as SpreadsheetRowSection, aG as SpreadsheetSheetInfo, aH as SpreadsheetSpill, aI as SpreadsheetTableSettings, aJ as SpreadsheetValidationAction, aK as SpreadsheetValidationPrompt, aL as SpreadsheetViewColumn, aN as SpreadsheetViewRow, aO as SpreadsheetWorkbook, aQ as UnaryOpNode, aR as WHOLE_COLUMN_END_ROW, aS as buildSpreadsheetView, aT as colNameToIndex, aU as columnDependencyKey, aV as compareNumbers, aW as compareValues, aX as computeRowGroups, aY as createSpreadsheetClipboardData, aZ as deleteSheetInFormula, a_ as describeFormulaError, a$ as extractCellDependencies, b0 as extractNameDependencies, b1 as extractReferenceDependencies, b2 as formatSheetPrefix, b3 as formulaIdentifiers, b4 as getRowSection, b5 as getTableSections, b6 as indexToColName, b7 as isFormulaError, b8 as mapFormulaReferences, b9 as numberToText, ba as offsetFormulaReferences, bb as parseCellReference, bc as parseFormula, bd as parseHtmlTable, be as parseRange, bf as quoteSheetName, bg as rangeDependencyKey, bh as readSpreadsheetClipboard, bi as rebaseClipboardRows, bj as remapFormulaReferences, bk as renameNameInFormula, bl as renameSheetInFormula, bm as rowPassesFilters, bn as serializeHtmlTable, bo as sheetNameNeedsQuotes, bp as shiftFormulaReferences, bq as sortCompareValues, br as tokenizeFormula, bs as transposeFormulaReferences } from '../controller-w6eRTjF8.js';
3
3
  import { I as ImportAdapterRegistry, b as ImportAdapter, h as ImportInput, a as ImportOutcome } from '../registry-CEgwXED1.js';
4
4
 
5
5
  /**
@@ -1075,6 +1075,79 @@ declare function forEachRangeCell(ranges: CellRange[], rowCount: number, colCoun
1075
1075
  declare function formatRuleRanges(ranges: CellRange[]): string;
1076
1076
  /** Parses `A1:B5, D2` (commas, semicolons or spaces between ranges; `$` ignored). Null when any part is not a cell or range. */
1077
1077
  declare function parseRuleRanges(text: string): CellRange[] | null;
1078
+ /**
1079
+ * Joins ranges that touch or overlap into fewer rectangles: ranges with the
1080
+ * same columns and adjacent rows, then ranges with the same rows and
1081
+ * adjacent columns. The result is sorted by row, then column.
1082
+ */
1083
+ declare function mergeRuleRanges(ranges: CellRange[]): CellRange[];
1084
+ /**
1085
+ * Rule ranges after sorting the rows of `block` (`newRowOf(oldRow)` gives a
1086
+ * sorted row's new index), following Excel: the part of a range that spans
1087
+ * every sorted row applies to the column and stays; the cells of a range
1088
+ * covering only some of the sorted rows move with their rows. Returns null
1089
+ * when no range changes.
1090
+ */
1091
+ declare function sortRuleRanges(ranges: CellRange[], block: CellRange, newRowOf: (row: number) => number): CellRange[] | null;
1092
+ /**
1093
+ * Rule ranges after transposing `block` in place around its top-left cell
1094
+ * (the transposed block is `target`): the cells inside the block move to
1095
+ * their transposed positions (`inside`), cells elsewhere stay (`outside`),
1096
+ * except those under the transposed block, which it replaces. Null when
1097
+ * the rule touches neither.
1098
+ */
1099
+ declare function transposeRuleRanges(ranges: CellRange[], block: CellRange, target: CellRange): {
1100
+ inside: CellRange[];
1101
+ outside: CellRange[];
1102
+ } | null;
1103
+ /**
1104
+ * Rewrites a rule formula written for `from` so it means the same when
1105
+ * written for `to` (rules are written for their first range's top-left
1106
+ * cell, which can change when ranges move). Keeps the caller's leading `=`
1107
+ * (or its absence).
1108
+ */
1109
+ declare function reanchorRuleFormula(formula: string, from: {
1110
+ row: number;
1111
+ col: number;
1112
+ }, to: {
1113
+ row: number;
1114
+ col: number;
1115
+ }): string;
1116
+ /**
1117
+ * Transposes a rule formula written for `anchor` (a cell of `block`): see
1118
+ * `transposeFormulaReferences`. The result is written for the transposed
1119
+ * anchor. Keeps the caller's leading `=` (or its absence).
1120
+ */
1121
+ declare function transposeRuleFormula(formula: string, anchor: {
1122
+ row: number;
1123
+ col: number;
1124
+ }, block: CellRange): string;
1125
+ /** Applies `fn` to every formula of a conditional format (expression, `=` values, formula anchors). */
1126
+ declare function mapConditionalFormatFormulas(rule: ConditionalFormatRule, fn: (formula: string) => string): ConditionalFormatRule;
1127
+ /** Applies `fn` to the `=` formulas of a data validation rule. */
1128
+ declare function mapDataValidationFormulas(rule: DataValidationRule, fn: (formula: string) => string): DataValidationRule;
1129
+ type RuleFormulaMapper<R> = (rule: R, fn: (formula: string) => string) => R;
1130
+ /**
1131
+ * Conditional formats or validations after a sort of `block` (see
1132
+ * `sortRuleRanges`). Rules whose first cell changes get their formulas
1133
+ * re-anchored, so relative references keep meaning "this row". Returns the
1134
+ * same array when nothing changes.
1135
+ */
1136
+ declare function sortRules<R extends {
1137
+ ranges: CellRange[];
1138
+ }>(rules: R[], block: CellRange, newRowOf: (row: number) => number, mapFormulas: RuleFormulaMapper<R>): R[];
1139
+ /**
1140
+ * Conditional formats or validations after transposing `block` in place
1141
+ * (see `transposeRuleRanges`). Formulas of the moved part are transposed
1142
+ * (`transposeRuleFormula`). A rule with formulas that is only partly inside
1143
+ * the block is split, since one formula can't serve both layouts: the moved
1144
+ * part becomes a new rule (id from `newId`) right after it. Rules left
1145
+ * without ranges are dropped. Returns the same array when nothing changes.
1146
+ */
1147
+ declare function transposeRules<R extends {
1148
+ id: string;
1149
+ ranges: CellRange[];
1150
+ }>(rules: R[], block: CellRange, target: CellRange, mapFormulas: RuleFormulaMapper<R>, newId: () => string): R[];
1078
1151
 
1079
1152
  /**
1080
1153
  * Virtualised rendering of large sheets: which displayed rows and columns
@@ -1179,4 +1252,4 @@ declare function getSpreadsheetScrollToCell(metrics: SpreadsheetViewMetrics, vie
1179
1252
  /** Whether two windows render the same rows and columns. */
1180
1253
  declare function sameSpreadsheetViewWindow(a: SpreadsheetViewWindow, b: SpreadsheetViewWindow): boolean;
1181
1254
 
1182
- export { ASTNode, CONDITIONAL_FORMAT_ICON_SETS, CONDITIONAL_FORMAT_PRESETS, CONDITIONAL_FORMAT_STYLE_PRESETS, CONDITIONAL_FORMAT_TIME_PERIODS, CellData, CellFormat, type CellInputFormatKind, CellPosition, CellRange, ConditionalCellFormat, type ConditionalFormatCss, ConditionalFormatEngine, type ConditionalFormatIconGlyph, ConditionalFormatIconSet, ConditionalFormatOverlay, type ConditionalFormatPresetField, type ConditionalFormatPresetInfo, type ConditionalFormatPresetInput, type ConditionalFormatPresetKind, ConditionalFormatRule, ConditionalFormatSheet, ConditionalFormatStyle, ConditionalFormatTimePeriod, ConditionalFormatValue, type CsvParseOptions, type CsvSerializeOptions, DATA_VALIDATION_ERROR_STYLE_OPTIONS, DATA_VALIDATION_OPERATOR_OPTIONS, DATA_VALIDATION_TYPE_OPTIONS, DEFAULT_CONDITIONAL_FORMAT_STYLE, DEFAULT_DATA_VALIDATION_MESSAGE, DEFAULT_DATA_VALIDATION_TITLE, DataValidationErrorStyle, DataValidationOperator, DataValidationResult, DataValidationRule, DataValidationSheet, DataValidationType, EMPTY_CONDITIONAL_FORMAT_OVERLAY, type FillDirection, FilterRule, type FormattedNumberValue, type FormulaActiveCall, type FormulaArgument, type FormulaArgumentSpec, type FormulaArgumentType, type FormulaCaretContext, type FormulaCriteriaPredicate, type FormulaEnvironment, FormulaErrorCode, type FormulaFunctionCategory, type FormulaFunctionContext, type FormulaFunctionDefinition, type FormulaFunctionSuggestion, type FormulaHints, FormulaLambda, type FormulaNameSuggestionSource, FormulaRange, type FormulaSignaturePart, GroupAggregate, type ImportFileIntoSpreadsheetOptions, MAX_DEFINED_NAME_LENGTH, MAX_LAMBDA_DEPTH, MAX_NUMBER_FORMAT_CODE_CHARS, MAX_SHEET_NAME_LENGTH, NUMBER_FORMAT_PRESETS, NewConditionalFormatRule, NumberFormat, type NumberFormatColor, type NumberFormatKind, type NumberFormatPreset, type ParsedCellInput, SPREADSHEET_COLUMN_HEADER_HEIGHT, SPREADSHEET_DEFAULT_VIEWPORT, SPREADSHEET_GROUP_ROW_HEIGHT, SPREADSHEET_IMPORT_ADAPTERS, SPREADSHEET_ROW_HEADER_WIDTH, SPREADSHEET_TABLE_ACTIONS, SPREADSHEET_VIRTUAL_COLUMN_THRESHOLD, SPREADSHEET_VIRTUAL_ROW_THRESHOLD, SortDirection, SpreadsheetController, SpreadsheetDefinedName, type SpreadsheetImport, type SpreadsheetImportAdapter, type SpreadsheetMenuItem, type SpreadsheetNameRow, type SpreadsheetPanelId, type SpreadsheetTableActionName, type SpreadsheetTableActions, type SpreadsheetViewMetrics, SpreadsheetViewModel, type SpreadsheetViewWindow, type SpreadsheetViewWindowOptions, type SpreadsheetViewport, StructuralChange, adjustRangeForStructuralChange, adjustRangesForStructuralChange, aggregateValues, applyFormulaSuggestion, bindSpreadsheetTableActions, blendConditionalFormatColors, builtinNumberFormat, builtinNumberFormatId, cellFormatForNumberFormat, checkFormulaArgumentCount, clampMenuPosition, clearNumberFormatCache, compareCellValues, computeFillTarget, conditionalFormatContrastColor, conditionalFormatIconCount, conditionalFormatNumber, conditionalFormatStyleString, copySheetName, createConditionalFormatRule, csvImportAdapter, dateValueToSerial, defaultIconThresholds, describeConditionalFormat, describeDataValidation, escapeCsvField, evaluateConditionalFormats, fillSeries, findDataValidation, findInvalidCells, forEachRangeCell, formatCellDisplay, formatCellForDisplay, formatGeneralFit, formatNumberFormatValue, formatRuleRanges, formatTextFunction, formatValueWithCode, fullSpreadsheetViewWindow, getConditionalFormatCss, getConditionalFormatIcon, getDataBarCss, getFillDirection, getFormulaArgumentSpecIndex, getFormulaCaretContext, getFormulaFunction, getFormulaHints, getFormulaSignature, getFormulaSignatureParts, getNameManagerRows, getSheetTabMenuItems, getSpreadsheetMenuItems, getSpreadsheetScrollToCell, getSpreadsheetViewWindow, getValidationListValues, importFileIntoSpreadsheet, isBlankValue, isFormulaLambda, isGeneralNumberFormat, isLambdaDefinition, isSingleCellRange, listFormulaFunctions, matchesFilterRule, matchesTimePeriod, measureSpreadsheetView, nextSheetName, normalizeRange, numberFormatColorToCss, numberFormatForCellFormat, parseCellInput, parseCriteria, parseCsv, parseNumberText, parseRuleRanges, parseTsv, rangeContains, rangeContainsRange, rangesContain, rangesIntersect, registerFormulaFunction, registerSpreadsheetImportAdapters, roundFloat, ruleAnchor, ruleFormulaAt, runSpreadsheetMenuItem, sameSpreadsheetViewWindow, searchFormulaFunctions, serialFromYmd, serializeCsv, serializeTsv, sheetDropIndex, shiftRuleFormula, shouldVirtualizeSpreadsheet, subtractRange, subtractRangeFromRanges, toNumber, tsvImportAdapter, unregisterFormulaFunction, validateCellInput, validateDefinedName, validateSheetName, wildcardToRegExp };
1255
+ export { ASTNode, CONDITIONAL_FORMAT_ICON_SETS, CONDITIONAL_FORMAT_PRESETS, CONDITIONAL_FORMAT_STYLE_PRESETS, CONDITIONAL_FORMAT_TIME_PERIODS, CellData, CellFormat, type CellInputFormatKind, CellPosition, CellRange, ConditionalCellFormat, type ConditionalFormatCss, ConditionalFormatEngine, type ConditionalFormatIconGlyph, ConditionalFormatIconSet, ConditionalFormatOverlay, type ConditionalFormatPresetField, type ConditionalFormatPresetInfo, type ConditionalFormatPresetInput, type ConditionalFormatPresetKind, ConditionalFormatRule, ConditionalFormatSheet, ConditionalFormatStyle, ConditionalFormatTimePeriod, ConditionalFormatValue, type CsvParseOptions, type CsvSerializeOptions, DATA_VALIDATION_ERROR_STYLE_OPTIONS, DATA_VALIDATION_OPERATOR_OPTIONS, DATA_VALIDATION_TYPE_OPTIONS, DEFAULT_CONDITIONAL_FORMAT_STYLE, DEFAULT_DATA_VALIDATION_MESSAGE, DEFAULT_DATA_VALIDATION_TITLE, DataValidationErrorStyle, DataValidationOperator, DataValidationResult, DataValidationRule, DataValidationSheet, DataValidationType, EMPTY_CONDITIONAL_FORMAT_OVERLAY, type FillDirection, FilterRule, type FormattedNumberValue, type FormulaActiveCall, type FormulaArgument, type FormulaArgumentSpec, type FormulaArgumentType, type FormulaCaretContext, type FormulaCriteriaPredicate, type FormulaEnvironment, FormulaErrorCode, type FormulaFunctionCategory, type FormulaFunctionContext, type FormulaFunctionDefinition, type FormulaFunctionSuggestion, type FormulaHints, FormulaLambda, type FormulaNameSuggestionSource, FormulaRange, type FormulaSignaturePart, GroupAggregate, type ImportFileIntoSpreadsheetOptions, MAX_DEFINED_NAME_LENGTH, MAX_LAMBDA_DEPTH, MAX_NUMBER_FORMAT_CODE_CHARS, MAX_SHEET_NAME_LENGTH, NUMBER_FORMAT_PRESETS, NewConditionalFormatRule, NumberFormat, type NumberFormatColor, type NumberFormatKind, type NumberFormatPreset, type ParsedCellInput, SPREADSHEET_COLUMN_HEADER_HEIGHT, SPREADSHEET_DEFAULT_VIEWPORT, SPREADSHEET_GROUP_ROW_HEIGHT, SPREADSHEET_IMPORT_ADAPTERS, SPREADSHEET_ROW_HEADER_WIDTH, SPREADSHEET_TABLE_ACTIONS, SPREADSHEET_VIRTUAL_COLUMN_THRESHOLD, SPREADSHEET_VIRTUAL_ROW_THRESHOLD, SortDirection, SpreadsheetController, SpreadsheetDefinedName, type SpreadsheetImport, type SpreadsheetImportAdapter, type SpreadsheetMenuItem, type SpreadsheetNameRow, type SpreadsheetPanelId, type SpreadsheetTableActionName, type SpreadsheetTableActions, type SpreadsheetViewMetrics, SpreadsheetViewModel, type SpreadsheetViewWindow, type SpreadsheetViewWindowOptions, type SpreadsheetViewport, StructuralChange, adjustRangeForStructuralChange, adjustRangesForStructuralChange, aggregateValues, applyFormulaSuggestion, bindSpreadsheetTableActions, blendConditionalFormatColors, builtinNumberFormat, builtinNumberFormatId, cellFormatForNumberFormat, checkFormulaArgumentCount, clampMenuPosition, clearNumberFormatCache, compareCellValues, computeFillTarget, conditionalFormatContrastColor, conditionalFormatIconCount, conditionalFormatNumber, conditionalFormatStyleString, copySheetName, createConditionalFormatRule, csvImportAdapter, dateValueToSerial, defaultIconThresholds, describeConditionalFormat, describeDataValidation, escapeCsvField, evaluateConditionalFormats, fillSeries, findDataValidation, findInvalidCells, forEachRangeCell, formatCellDisplay, formatCellForDisplay, formatGeneralFit, formatNumberFormatValue, formatRuleRanges, formatTextFunction, formatValueWithCode, fullSpreadsheetViewWindow, getConditionalFormatCss, getConditionalFormatIcon, getDataBarCss, getFillDirection, getFormulaArgumentSpecIndex, getFormulaCaretContext, getFormulaFunction, getFormulaHints, getFormulaSignature, getFormulaSignatureParts, getNameManagerRows, getSheetTabMenuItems, getSpreadsheetMenuItems, getSpreadsheetScrollToCell, getSpreadsheetViewWindow, getValidationListValues, importFileIntoSpreadsheet, isBlankValue, isFormulaLambda, isGeneralNumberFormat, isLambdaDefinition, isSingleCellRange, listFormulaFunctions, mapConditionalFormatFormulas, mapDataValidationFormulas, matchesFilterRule, matchesTimePeriod, measureSpreadsheetView, mergeRuleRanges, nextSheetName, normalizeRange, numberFormatColorToCss, numberFormatForCellFormat, parseCellInput, parseCriteria, parseCsv, parseNumberText, parseRuleRanges, parseTsv, rangeContains, rangeContainsRange, rangesContain, rangesIntersect, reanchorRuleFormula, registerFormulaFunction, registerSpreadsheetImportAdapters, roundFloat, ruleAnchor, ruleFormulaAt, runSpreadsheetMenuItem, sameSpreadsheetViewWindow, searchFormulaFunctions, serialFromYmd, serializeCsv, serializeTsv, sheetDropIndex, shiftRuleFormula, shouldVirtualizeSpreadsheet, sortRuleRanges, sortRules, subtractRange, subtractRangeFromRanges, toNumber, transposeRuleFormula, transposeRuleRanges, transposeRules, tsvImportAdapter, unregisterFormulaFunction, validateCellInput, validateDefinedName, validateSheetName, wildcardToRegExp };
@@ -88,10 +88,13 @@ import {
88
88
  isGeneralNumberFormat,
89
89
  isLambdaDefinition,
90
90
  isSingleCellRange,
91
+ mapConditionalFormatFormulas,
92
+ mapDataValidationFormulas,
91
93
  mapFormulaReferences,
92
94
  matchesFilterRule,
93
95
  matchesTimePeriod,
94
96
  measureSpreadsheetView,
97
+ mergeRuleRanges,
95
98
  nextSheetName,
96
99
  normalizeRange,
97
100
  numberFormatForCellFormat,
@@ -105,6 +108,7 @@ import {
105
108
  rangesContain,
106
109
  rangesIntersect,
107
110
  readSpreadsheetClipboard,
111
+ reanchorRuleFormula,
108
112
  rebaseClipboardRows,
109
113
  registerSpreadsheetImportAdapters,
110
114
  remapFormulaReferences,
@@ -122,14 +126,20 @@ import {
122
126
  shiftFormulaReferences,
123
127
  shiftRuleFormula,
124
128
  shouldVirtualizeSpreadsheet,
129
+ sortRuleRanges,
130
+ sortRules,
125
131
  subtractRange,
126
132
  subtractRangeFromRanges,
127
133
  toNumber,
134
+ transposeFormulaReferences,
135
+ transposeRuleFormula,
136
+ transposeRuleRanges,
137
+ transposeRules,
128
138
  tsvImportAdapter,
129
139
  validateCellInput,
130
140
  validateDefinedName,
131
141
  validateSheetName
132
- } from "../chunk-X7HXL2SB.js";
142
+ } from "../chunk-JT7AXQTE.js";
133
143
  import {
134
144
  escapeCsvField,
135
145
  parseCsv,
@@ -303,10 +313,13 @@ export {
303
313
  isLambdaDefinition,
304
314
  isSingleCellRange,
305
315
  listFormulaFunctions,
316
+ mapConditionalFormatFormulas,
317
+ mapDataValidationFormulas,
306
318
  mapFormulaReferences,
307
319
  matchesFilterRule,
308
320
  matchesTimePeriod,
309
321
  measureSpreadsheetView,
322
+ mergeRuleRanges,
310
323
  nextSheetName,
311
324
  normalizeRange,
312
325
  numberFormatColorToCss,
@@ -330,6 +343,7 @@ export {
330
343
  rangesContain,
331
344
  rangesIntersect,
332
345
  readSpreadsheetClipboard,
346
+ reanchorRuleFormula,
333
347
  rebaseClipboardRows,
334
348
  registerFormulaFunction,
335
349
  registerSpreadsheetImportAdapters,
@@ -353,10 +367,16 @@ export {
353
367
  shiftRuleFormula,
354
368
  shouldVirtualizeSpreadsheet,
355
369
  sortCompareValues,
370
+ sortRuleRanges,
371
+ sortRules,
356
372
  subtractRange,
357
373
  subtractRangeFromRanges,
358
374
  toNumber,
359
375
  tokenizeFormula,
376
+ transposeFormulaReferences,
377
+ transposeRuleFormula,
378
+ transposeRuleRanges,
379
+ transposeRules,
360
380
  tsvImportAdapter,
361
381
  unregisterFormulaFunction,
362
382
  validateCellInput,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.26.1",
3
+ "version": "0.27.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/chunk-HDYMLS3X.cjs","../src/extensions/table/extension.ts","../src/extensions/table/actions.ts"],"names":[],"mappings":"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","file":"/home/runner/work/editor/editor/packages/core/dist/chunk-HDYMLS3X.cjs","sourcesContent":[null,"import { getHTMLFromFragment, type Extensions } from \"@tiptap/core\";\nimport { Fragment, type Node as ProsemirrorNode } from \"@tiptap/pm/model\";\nimport * as _Table from \"@tiptap/extension-table\";\nimport * as _TableRow from \"@tiptap/extension-table-row\";\nimport * as _TableHeader from \"@tiptap/extension-table-header\";\nimport * as _TableCell from \"@tiptap/extension-table-cell\";\n\nconst resolveExt = (mod: any, name: string) =>\n mod?.[name] || mod?.default?.[name] || mod?.default?.default || mod?.default || mod;\n\nconst BaseTable = resolveExt(_Table, \"Table\");\nconst BaseTableRow = resolveExt(_TableRow, \"TableRow\");\nconst BaseTableHeader = resolveExt(_TableHeader, \"TableHeader\");\nconst BaseTableCell = resolveExt(_TableCell, \"TableCell\");\n\n/** Horizontal alignment of a table cell (`align` attribute). */\nexport type TableCellAlignment = \"left\" | \"center\" | \"right\" | \"justify\";\n\nconst ALIGNMENTS = new Set<TableCellAlignment>([\"left\", \"center\", \"right\", \"justify\"]);\n\n/** Returns a valid cell alignment, or `null`. */\nexport function normalizeTableCellAlignment(value: unknown): TableCellAlignment | null {\n const v = typeof value === \"string\" ? value.trim().toLowerCase() : \"\";\n return ALIGNMENTS.has(v as TableCellAlignment) ? (v as TableCellAlignment) : null;\n}\n\n/**\n * Color values allowed as a cell background: hex, `rgb()/rgba()/hsl()/hsla()`\n * with numeric arguments, or a CSS color keyword. Anything else (e.g.\n * `url(...)`, `expression(...)`, `;`) is rejected because the value ends up in\n * a `style` attribute.\n */\nconst COLOR_REGEX =\n /^(?:#[0-9a-f]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[-0-9.%\\s,/deg]+\\)|[a-z]{3,20})$/i;\n\n/** Returns a safe CSS color for a cell background, or `null`. */\nexport function normalizeTableCellColor(value: unknown): string | null {\n const v = typeof value === \"string\" ? value.trim() : \"\";\n if (!v || v.length > 64 || !COLOR_REGEX.test(v)) return null;\n if (/^(?:inherit|initial|unset|revert|transparent)$/i.test(v)) return null;\n return v;\n}\n\n/** Cell attributes added on top of TipTap's `colspan` / `rowspan` / `colwidth`. */\nconst cellAttributes = () => ({\n align: {\n default: null,\n parseHTML: (element: HTMLElement) =>\n normalizeTableCellAlignment(element.style?.textAlign || element.getAttribute(\"align\")),\n renderHTML: (attrs: Record<string, any>) => {\n const align = normalizeTableCellAlignment(attrs.align);\n return align ? { style: `text-align: ${align}` } : {};\n },\n },\n backgroundColor: {\n default: null,\n parseHTML: (element: HTMLElement) =>\n normalizeTableCellColor(\n element.getAttribute(\"data-background-color\") ||\n element.style?.backgroundColor ||\n element.getAttribute(\"bgcolor\"),\n ),\n renderHTML: (attrs: Record<string, any>) => {\n const color = normalizeTableCellColor(attrs.backgroundColor);\n return color ? { style: `background-color: ${color}`, \"data-background-color\": color } : {};\n },\n },\n});\n\n// ---------------------------------------------------------------------------\n// Markdown (tiptap-markdown)\n// ---------------------------------------------------------------------------\n\nconst children = (node: ProsemirrorNode) => {\n const list: ProsemirrorNode[] = [];\n node.forEach((child) => list.push(child));\n return list;\n};\n\nconst hasSpan = (cell: ProsemirrorNode) => (cell.attrs.colspan ?? 1) > 1 || (cell.attrs.rowspan ?? 1) > 1;\n\n/**\n * Whether a table can be written as a GFM pipe table: the first row is all\n * header cells, the other rows have none, no cell spans rows or columns, and\n * every cell holds a single paragraph.\n */\nexport function isGfmTable(node: ProsemirrorNode): boolean {\n const rows = children(node);\n if (rows.length === 0) return false;\n const width = rows[0].childCount;\n return rows.every(\n (row, r) =>\n row.childCount === width &&\n children(row).every(\n (cell) =>\n (r === 0 ? cell.type.name === \"tableHeader\" : cell.type.name === \"tableCell\") &&\n !hasSpan(cell) &&\n cell.childCount === 1 &&\n cell.firstChild!.type.name === \"paragraph\",\n ),\n );\n}\n\nconst DELIMITERS: Record<string, string> = { left: \":---\", center: \":---:\", right: \"---:\" };\n\n/**\n * tiptap-markdown serializer for tables: GFM pipe tables (with column\n * alignment from the header cells and `|` escaped) when `isGfmTable`, HTML\n * otherwise (spans, header columns, multi-paragraph cells).\n */\nfunction serializeTableMarkdown(state: any, node: ProsemirrorNode) {\n if (!isGfmTable(node)) {\n const html = getHTMLFromFragment(Fragment.from(node), node.type.schema);\n // An HTML block must start on its own line and contain no blank lines.\n state.write(html.replace(/\\n{2,}/g, \"\\n\"));\n state.closeBlock(node);\n return;\n }\n const previous = state.inTable;\n state.inTable = true;\n children(node).forEach((row, r) => {\n if (r) state.ensureNewLine();\n state.write(\"| \");\n children(row).forEach((cell, c) => {\n if (c) state.write(\" | \");\n const paragraph = cell.firstChild!;\n // Render in place (mid-line, so no block prefix is added), then escape\n // the cell's pipes and line breaks, which would end the cell or row.\n const start = state.out.length;\n if (paragraph.childCount) state.renderInline(paragraph);\n const text: string = state.out.slice(start);\n state.out = state.out.slice(0, start) + text.replace(/\\n/g, \" \").replace(/\\|/g, \"\\\\|\");\n });\n state.write(\" |\");\n if (r === 0) {\n const delimiter = children(row).map((cell) => DELIMITERS[cell.attrs.align] ?? \"---\");\n state.ensureNewLine();\n state.write(`| ${delimiter.join(\" | \")} |`);\n }\n });\n state.inTable = previous;\n state.closeBlock(node);\n}\n\n// ---------------------------------------------------------------------------\n// Extensions\n// ---------------------------------------------------------------------------\n\nexport interface RichTextTableOptions {\n /** Drag column borders to resize columns (stored as `colwidth`). Default `true`. */\n resizable: boolean;\n /** Width of the resize handle in pixels. Default 5. */\n handleWidth: number;\n /** Minimum cell width in pixels. Default 25. */\n cellMinWidth: number;\n /** Whether the last column can be resized. Default `true`. */\n lastColumnResizable: boolean;\n /** Allow selecting the whole table as a node (click its border, Esc from a cell selection). Default `true`. */\n allowTableNodeSelection: boolean;\n /** HTML attributes of the `<table>` element. */\n HTMLAttributes: Record<string, any>;\n /** HTML attributes of `<td>` elements. */\n cellHTMLAttributes: Record<string, any>;\n /** HTML attributes of `<th>` elements. */\n headerHTMLAttributes: Record<string, any>;\n /** HTML attributes of `<tr>` elements. */\n rowHTMLAttributes: Record<string, any>;\n}\n\nexport const DEFAULT_TABLE_OPTIONS: RichTextTableOptions = {\n resizable: true,\n handleWidth: 5,\n cellMinWidth: 25,\n lastColumnResizable: true,\n allowTableNodeSelection: true,\n HTMLAttributes: { class: \"pixerate-table\" },\n cellHTMLAttributes: {},\n headerHTMLAttributes: {},\n rowHTMLAttributes: {},\n};\n\n/** TipTap's `Table` with the GFM-aware markdown serializer. */\nexport const Table = BaseTable.extend({\n addStorage() {\n return { markdown: { serialize: serializeTableMarkdown } };\n },\n});\n\nexport const TableRow = BaseTableRow;\n\n/** TipTap's `TableCell` plus `align` and `backgroundColor` attributes. */\nexport const TableCell = BaseTableCell.extend({\n addAttributes() {\n return { ...this.parent?.(), ...cellAttributes() };\n },\n});\n\n/** TipTap's `TableHeader` plus `align` and `backgroundColor` attributes. */\nexport const TableHeader = BaseTableHeader.extend({\n addAttributes() {\n return { ...this.parent?.(), ...cellAttributes() };\n },\n});\n\n/**\n * The table extensions (`table`, `tableRow`, `tableHeader`, `tableCell`)\n * configured for rich documents: resizable columns, header rows, columns and\n * cells, `colspan` / `rowspan` from imported HTML, cell alignment and\n * background, table node selection and GFM markdown. `createRichTextPreset`\n * adds them unless `table: false`.\n */\nexport function createTableExtensions(options: Partial<RichTextTableOptions> = {}): Extensions {\n const o = { ...DEFAULT_TABLE_OPTIONS, ...options };\n return [\n Table.configure({\n resizable: o.resizable,\n handleWidth: o.handleWidth,\n cellMinWidth: o.cellMinWidth,\n lastColumnResizable: o.lastColumnResizable,\n allowTableNodeSelection: o.allowTableNodeSelection,\n HTMLAttributes: o.HTMLAttributes,\n }),\n TableRow.configure({ HTMLAttributes: o.rowHTMLAttributes }),\n TableHeader.configure({ HTMLAttributes: o.headerHTMLAttributes }),\n TableCell.configure({ HTMLAttributes: o.cellHTMLAttributes }),\n ];\n}\n","import type { Editor } from \"@tiptap/core\";\nimport type { EditorState } from \"@tiptap/pm/state\";\nimport { CellSelection, isInTable, selectedRect } from \"@tiptap/pm/tables\";\nimport { isTrackChangesEnabled } from \"../track-changes\";\nimport {\n normalizeTableCellAlignment,\n normalizeTableCellColor,\n type TableCellAlignment,\n} from \"./extension\";\n\n/** Table operations shared by the command registry, the toolbars and agent tools. */\nexport type TableAction =\n | \"insertTable\"\n | \"addRowBefore\"\n | \"addRowAfter\"\n | \"deleteRow\"\n | \"addColumnBefore\"\n | \"addColumnAfter\"\n | \"deleteColumn\"\n | \"deleteTable\"\n | \"mergeCells\"\n | \"splitCell\"\n | \"toggleHeaderRow\"\n | \"toggleHeaderColumn\"\n | \"toggleHeaderCell\"\n | \"goToNextCell\"\n | \"goToPreviousCell\"\n | \"setCellAlignment\"\n | \"setCellBackground\";\n\n/** Parameters of `insertTable`, `setCellAlignment` and `setCellBackground`. */\nexport interface TableActionParams {\n /** `insertTable`: number of rows (1–100, default 3). */\n rows?: number;\n /** `insertTable`: number of columns (1–50, default 3). */\n cols?: number;\n /** `insertTable`: make the first row a header row (default `true`). */\n withHeaderRow?: boolean;\n /** `setCellAlignment`: `left`, `center`, `right`, `justify`, or `null` to clear. */\n align?: TableCellAlignment | null;\n /** `setCellBackground`: a CSS color, or `null` to clear. */\n color?: string | null;\n}\n\nexport interface TableActionInfo {\n action: TableAction;\n label: string;\n description: string;\n keywords: readonly string[];\n}\n\n/** Every table action with its label, in toolbar order. */\nexport const TABLE_ACTIONS: readonly TableActionInfo[] = [\n { action: \"insertTable\", label: \"Insert Table\", description: \"Inserts a table (rows, cols, withHeaderRow) at the cursor.\", keywords: [\"table\", \"grid\", \"new\"] },\n { action: \"addRowBefore\", label: \"Insert Row Above\", description: \"Adds a row above the current row.\", keywords: [\"row\", \"add\", \"above\"] },\n { action: \"addRowAfter\", label: \"Insert Row Below\", description: \"Adds a row below the current row.\", keywords: [\"row\", \"add\", \"below\"] },\n { action: \"deleteRow\", label: \"Delete Row\", description: \"Deletes the selected rows.\", keywords: [\"row\", \"remove\"] },\n { action: \"addColumnBefore\", label: \"Insert Column Left\", description: \"Adds a column left of the current column.\", keywords: [\"column\", \"add\", \"left\", \"before\"] },\n { action: \"addColumnAfter\", label: \"Insert Column Right\", description: \"Adds a column right of the current column.\", keywords: [\"column\", \"add\", \"right\", \"after\"] },\n { action: \"deleteColumn\", label: \"Delete Column\", description: \"Deletes the selected columns.\", keywords: [\"column\", \"remove\"] },\n { action: \"deleteTable\", label: \"Delete Table\", description: \"Deletes the table around the cursor.\", keywords: [\"table\", \"remove\"] },\n { action: \"mergeCells\", label: \"Merge Cells\", description: \"Merges the selected cells into one.\", keywords: [\"combine\", \"join\", \"span\"] },\n { action: \"splitCell\", label: \"Split Cell\", description: \"Splits a merged cell back into single cells.\", keywords: [\"unmerge\", \"span\"] },\n { action: \"toggleHeaderRow\", label: \"Toggle Header Row\", description: \"Turns the first row into header cells, or back.\", keywords: [\"header\", \"row\", \"th\"] },\n { action: \"toggleHeaderColumn\", label: \"Toggle Header Column\", description: \"Turns the first column into header cells, or back.\", keywords: [\"header\", \"column\", \"th\"] },\n { action: \"toggleHeaderCell\", label: \"Toggle Header Cell\", description: \"Turns the selected cells into header cells, or back.\", keywords: [\"header\", \"cell\", \"th\"] },\n { action: \"goToNextCell\", label: \"Next Cell\", description: \"Moves the cursor to the next cell.\", keywords: [\"tab\", \"navigate\"] },\n { action: \"goToPreviousCell\", label: \"Previous Cell\", description: \"Moves the cursor to the previous cell.\", keywords: [\"shift tab\", \"navigate\"] },\n { action: \"setCellAlignment\", label: \"Align Cells…\", description: \"Sets the horizontal alignment (align: left | center | right | justify | null) of the selected cells.\", keywords: [\"align\", \"left\", \"center\", \"right\"] },\n { action: \"setCellBackground\", label: \"Cell Background…\", description: \"Sets the background color (color: CSS color or null) of the selected cells.\", keywords: [\"shading\", \"fill\", \"color\"] },\n];\n\n/** A button of the table toolbars (`TableToolbar` in React and Svelte). */\nexport interface TableToolbarItem {\n /** Unique id (also the button's `data-action`). */\n id: string;\n action: TableAction;\n params?: TableActionParams;\n /** Short button text. */\n label: string;\n /** Accessible name and tooltip. */\n title: string;\n /** Items of one group are separated from the next group. */\n group: string;\n /** Toggle buttons: whether the button shows as pressed. */\n active?: (state: TableState) => boolean;\n}\n\n/** The default table toolbar: rows, columns, cells, headers, alignment, delete. */\nexport const DEFAULT_TABLE_TOOLBAR: readonly TableToolbarItem[] = [\n { id: \"addRowBefore\", action: \"addRowBefore\", label: \"+ Row ↑\", title: \"Insert row above\", group: \"rows\" },\n { id: \"addRowAfter\", action: \"addRowAfter\", label: \"+ Row ↓\", title: \"Insert row below\", group: \"rows\" },\n { id: \"deleteRow\", action: \"deleteRow\", label: \"− Row\", title: \"Delete row\", group: \"rows\" },\n { id: \"addColumnBefore\", action: \"addColumnBefore\", label: \"+ Col ←\", title: \"Insert column left\", group: \"columns\" },\n { id: \"addColumnAfter\", action: \"addColumnAfter\", label: \"+ Col →\", title: \"Insert column right\", group: \"columns\" },\n { id: \"deleteColumn\", action: \"deleteColumn\", label: \"− Col\", title: \"Delete column\", group: \"columns\" },\n { id: \"mergeCells\", action: \"mergeCells\", label: \"Merge\", title: \"Merge cells\", group: \"cells\" },\n { id: \"splitCell\", action: \"splitCell\", label: \"Split\", title: \"Split cell\", group: \"cells\" },\n { id: \"toggleHeaderRow\", action: \"toggleHeaderRow\", label: \"Header row\", title: \"Toggle header row\", group: \"headers\", active: (s) => s.headerRow },\n { id: \"toggleHeaderColumn\", action: \"toggleHeaderColumn\", label: \"Header col\", title: \"Toggle header column\", group: \"headers\", active: (s) => s.headerColumn },\n { id: \"toggleHeaderCell\", action: \"toggleHeaderCell\", label: \"Header cell\", title: \"Toggle header cell\", group: \"headers\", active: (s) => s.headerCell },\n { id: \"alignLeft\", action: \"setCellAlignment\", params: { align: \"left\" }, label: \"Left\", title: \"Align cell left\", group: \"align\", active: (s) => s.cellAlignment === \"left\" },\n { id: \"alignCenter\", action: \"setCellAlignment\", params: { align: \"center\" }, label: \"Center\", title: \"Align cell center\", group: \"align\", active: (s) => s.cellAlignment === \"center\" },\n { id: \"alignRight\", action: \"setCellAlignment\", params: { align: \"right\" }, label: \"Right\", title: \"Align cell right\", group: \"align\", active: (s) => s.cellAlignment === \"right\" },\n { id: \"deleteTable\", action: \"deleteTable\", label: \"Delete table\", title: \"Delete table\", group: \"table\" },\n];\n\nexport const MAX_TABLE_ROWS = 100;\nexport const MAX_TABLE_COLUMNS = 50;\n\nconst live = (editor: Editor | null | undefined): editor is Editor => !!editor && !editor.isDestroyed;\n\n/** Whether the editor's schema has the table nodes (`createRichTextPreset({ table })`). */\nexport function isTableEnabled(editor: Editor | null | undefined): boolean {\n return live(editor) && !!editor.schema.nodes.table && !!editor.schema.nodes.tableRow;\n}\n\n/** Whether the selection (cursor, text or cell selection) is inside a table. */\nexport function isSelectionInTable(state: EditorState): boolean {\n if (!state.schema.nodes.table) return false;\n return state.selection instanceof CellSelection || isInTable(state);\n}\n\n/**\n * `shouldShow` for a table bubble menu (TipTap's `BubbleMenuPlugin`): shown\n * while an editable editor's selection is in a table, even a collapsed cursor.\n */\nexport function shouldShowTableBubbleMenu({ editor, state }: { editor: Editor; state: EditorState }): boolean {\n return editor.isEditable && isSelectionInTable(state);\n}\n\nconst isInt = (value: unknown, min: number, max: number) =>\n typeof value === \"number\" && Number.isInteger(value) && value >= min && value <= max;\n\nconst can = (editor: Editor, run: (chain: any) => any): boolean => {\n try {\n return !!run(editor.can().chain()).run();\n } catch {\n return false;\n }\n};\n\n/**\n * Whether a table action can run: `true`, or the reason it cannot (e.g.\n * \"Place the cursor in a table first.\").\n */\nexport function getTableActionState(\n editor: Editor | null | undefined,\n action: TableAction,\n params: TableActionParams = {},\n): true | string {\n if (!live(editor)) return \"The editor is not available.\";\n if (!isTableEnabled(editor)) return \"Tables are not enabled in this editor.\";\n if (!editor.isEditable) return \"The editor is read-only.\";\n const state = editor.state;\n const inTable = isSelectionInTable(state);\n\n if (action === \"insertTable\") {\n if (inTable) return \"Tables cannot be nested: move the cursor out of the table first.\";\n if (params.rows !== undefined && !isInt(params.rows, 1, MAX_TABLE_ROWS)) {\n return `Rows must be a whole number from 1 to ${MAX_TABLE_ROWS}.`;\n }\n if (params.cols !== undefined && !isInt(params.cols, 1, MAX_TABLE_COLUMNS)) {\n return `Columns must be a whole number from 1 to ${MAX_TABLE_COLUMNS}.`;\n }\n return can(editor, (c) => c.insertTable({ rows: 1, cols: 1 })) ? true : \"A table cannot be inserted here.\";\n }\n\n if (!inTable) return \"Place the cursor in a table first.\";\n\n switch (action) {\n case \"mergeCells\":\n case \"splitCell\": {\n if (isTrackChangesEnabled(editor)) {\n return `${action === \"mergeCells\" ? \"Merging\" : \"Splitting\"} cells cannot be tracked: turn off Track Changes first.`;\n }\n if (action === \"mergeCells\") {\n return can(editor, (c) => c.mergeCells()) ? true : \"Select two or more adjacent cells to merge.\";\n }\n return can(editor, (c) => c.splitCell()) ? true : \"Only a merged cell can be split.\";\n }\n case \"deleteRow\":\n case \"deleteColumn\": {\n // prosemirror-tables only refuses to delete every row/column when dispatching.\n const rect = selectedRect(state);\n const all = action === \"deleteRow\"\n ? rect.top === 0 && rect.bottom === rect.map.height\n : rect.left === 0 && rect.right === rect.map.width;\n const what = action === \"deleteRow\" ? \"rows\" : \"columns\";\n if (all || !can(editor, (c) => c[action]())) return `These are all the ${what}: delete the table instead.`;\n return true;\n }\n case \"goToNextCell\":\n return can(editor, (c) => c.goToNextCell()) ? true : \"This is the last cell.\";\n case \"goToPreviousCell\":\n return can(editor, (c) => c.goToPreviousCell()) ? true : \"This is the first cell.\";\n case \"setCellAlignment\":\n if (params.align !== undefined && params.align !== null && !normalizeTableCellAlignment(params.align)) {\n return 'Alignment must be \"left\", \"center\", \"right\", \"justify\" or null.';\n }\n if (!editor.schema.nodes.tableCell?.spec.attrs?.align) return \"Cell alignment is not supported by this schema.\";\n return true;\n case \"setCellBackground\":\n if (params.color !== undefined && params.color !== null && !normalizeTableCellColor(params.color)) {\n return \"Color must be a CSS color such as #fde68a, rgb(…) or a color name, or null.\";\n }\n if (!editor.schema.nodes.tableCell?.spec.attrs?.backgroundColor) return \"Cell backgrounds are not supported by this schema.\";\n return true;\n default:\n return can(editor, (c) => c[action]()) ? true : \"This table action is not available here.\";\n }\n}\n\nexport interface RunTableActionOptions {\n /** Focus the editor (toolbars). Default `false`. */\n focus?: boolean;\n}\n\n/**\n * Runs a table action. Returns `false` (and changes nothing) when it cannot\n * run; check `getTableActionState` for the reason.\n */\nexport function runTableAction(\n editor: Editor | null | undefined,\n action: TableAction,\n params: TableActionParams = {},\n options: RunTableActionOptions = {},\n): boolean {\n if (getTableActionState(editor, action, params) !== true) return false;\n const ed = editor as Editor;\n let chain: any = ed.chain();\n if (options.focus) chain = chain.focus();\n switch (action) {\n case \"insertTable\":\n chain = chain.insertTable({\n rows: params.rows ?? 3,\n cols: params.cols ?? 3,\n withHeaderRow: params.withHeaderRow ?? true,\n });\n break;\n case \"setCellAlignment\":\n chain = chain.setCellAttribute(\"align\", normalizeTableCellAlignment(params.align));\n break;\n case \"setCellBackground\":\n chain = chain.setCellAttribute(\"backgroundColor\", normalizeTableCellColor(params.color));\n break;\n default:\n chain = chain[action]();\n }\n return !!chain.run();\n}\n\nexport interface TableActionStatus {\n enabled: boolean;\n /** Why the action cannot run (only when `enabled` is false). */\n reason?: string;\n}\n\n/** The table at the selection and what can be done there. */\nexport interface TableState {\n /** The schema has tables. */\n enabled: boolean;\n /** The selection is inside a table. */\n inTable: boolean;\n /** Cells are selected (a `CellSelection`). */\n cellSelection: boolean;\n /** Size of the table (0 outside a table). */\n rows: number;\n columns: number;\n /** Row and column (0-based) of the selection's first cell, or -1. */\n row: number;\n column: number;\n /** The first row / first column are all header cells. */\n headerRow: boolean;\n headerColumn: boolean;\n /** The cell at the selection is a header cell. */\n headerCell: boolean;\n /** Alignment / background of the cell at the selection. */\n cellAlignment: TableCellAlignment | null;\n cellBackground: string | null;\n /** Enablement of every action (with the default params). */\n actions: Record<TableAction, TableActionStatus>;\n}\n\nconst NO_ACTIONS = Object.fromEntries(\n TABLE_ACTIONS.map(({ action }) => [action, { enabled: false, reason: \"The editor is not available.\" }]),\n) as Record<TableAction, TableActionStatus>;\n\nexport const EMPTY_TABLE_STATE: TableState = Object.freeze({\n enabled: false,\n inTable: false,\n cellSelection: false,\n rows: 0,\n columns: 0,\n row: -1,\n column: -1,\n headerRow: false,\n headerColumn: false,\n headerCell: false,\n cellAlignment: null,\n cellBackground: null,\n actions: NO_ACTIONS,\n}) as TableState;\n\n/** Computes the table state at the editor's selection. */\nexport function getTableState(editor: Editor | null | undefined): TableState {\n if (!live(editor)) return EMPTY_TABLE_STATE;\n const actions = Object.fromEntries(\n TABLE_ACTIONS.map(({ action }) => {\n const result = getTableActionState(editor, action);\n return [action, result === true ? { enabled: true } : { enabled: false, reason: result }];\n }),\n ) as Record<TableAction, TableActionStatus>;\n const state = editor.state;\n const base: TableState = { ...EMPTY_TABLE_STATE, enabled: isTableEnabled(editor), actions };\n if (!base.enabled || !isSelectionInTable(state)) return base;\n try {\n const rect = selectedRect(state);\n const { map, table } = rect;\n const cellAt = (row: number, col: number) => table.nodeAt(map.map[row * map.width + col]);\n const allHeaders = (positions: number[]) =>\n positions.length > 0 && positions.every((pos) => table.nodeAt(pos)?.type.name === \"tableHeader\");\n const firstRow = map.cellsInRect({ left: 0, right: map.width, top: 0, bottom: 1 });\n const firstColumn = map.cellsInRect({ left: 0, right: 1, top: 0, bottom: map.height });\n const cell = cellAt(rect.top, rect.left);\n return {\n ...base,\n inTable: true,\n cellSelection: state.selection instanceof CellSelection,\n rows: map.height,\n columns: map.width,\n row: rect.top,\n column: rect.left,\n headerRow: allHeaders(firstRow),\n headerColumn: allHeaders(firstColumn),\n headerCell: cell?.type.name === \"tableHeader\",\n cellAlignment: normalizeTableCellAlignment(cell?.attrs.align),\n cellBackground: normalizeTableCellColor(cell?.attrs.backgroundColor),\n };\n } catch {\n return { ...base, inTable: true };\n }\n}\n\nconst stateKey = (state: TableState) => JSON.stringify(state);\n\nexport interface TableStore {\n getSnapshot(): TableState;\n subscribe(listener: () => void): () => void;\n destroy(): void;\n}\n\n/**\n * An external store of `getTableState(editor)` for UI bindings (React's\n * `useSyncExternalStore`, Svelte runes). The snapshot object only changes\n * when the state does, and the store listens to the editor only while it\n * has subscribers.\n */\nexport function createTableStore(editor: Editor | null | undefined): TableStore {\n const listeners = new Set<() => void>();\n let snapshot = getTableState(editor);\n let key = stateKey(snapshot);\n\n const update = () => {\n const next = getTableState(editor);\n const nextKey = stateKey(next);\n if (nextKey === key) return;\n snapshot = next;\n key = nextKey;\n listeners.forEach((listener) => listener());\n };\n const detach = () => {\n editor?.off(\"transaction\", update);\n editor?.off(\"update\", update);\n editor?.off(\"focus\", update);\n editor?.off(\"destroy\", update);\n };\n\n return {\n getSnapshot: () => {\n if (!listeners.size) {\n const next = getTableState(editor);\n const nextKey = stateKey(next);\n if (nextKey !== key) {\n snapshot = next;\n key = nextKey;\n }\n }\n return snapshot;\n },\n subscribe(listener) {\n if (!listeners.size && editor) {\n update();\n editor.on(\"transaction\", update);\n // `setEditable` emits `update` without a transaction.\n editor.on(\"update\", update);\n editor.on(\"focus\", update);\n editor.on(\"destroy\", update);\n }\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n if (!listeners.size) detach();\n };\n },\n destroy() {\n detach();\n listeners.clear();\n },\n };\n}\n"]}