@dxos/plugin-sheet 0.6.14-staging.9e90729 → 0.6.14-staging.c117501

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 (117) hide show
  1. package/dist/lib/browser/{SheetContainer-JBB7W52Y.mjs → SheetContainer-P3NF5KEI.mjs} +60 -48
  2. package/dist/lib/browser/SheetContainer-P3NF5KEI.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-XXDHBYZQ.mjs → chunk-4LKIURJA.mjs} +337 -122
  4. package/dist/lib/browser/chunk-4LKIURJA.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-3QWIMZZJ.mjs → chunk-BVUN7SHF.mjs} +5 -3
  6. package/dist/lib/browser/chunk-BVUN7SHF.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-D3QTX46O.mjs → chunk-RABELMEQ.mjs} +3 -2
  8. package/dist/lib/browser/{chunk-D3QTX46O.mjs.map → chunk-RABELMEQ.mjs.map} +3 -3
  9. package/dist/lib/browser/{chunk-2ZK3YMZG.mjs → chunk-VMSX6Z4X.mjs} +58 -20
  10. package/dist/lib/browser/chunk-VMSX6Z4X.mjs.map +7 -0
  11. package/dist/lib/browser/{compute-graph-ZQKB6QVP.mjs → compute-graph-GGWUX644.mjs} +4 -4
  12. package/dist/lib/browser/index.mjs +48 -21
  13. package/dist/lib/browser/index.mjs.map +3 -3
  14. package/dist/lib/browser/meta.json +1 -1
  15. package/dist/lib/browser/meta.mjs +1 -1
  16. package/dist/lib/browser/types.mjs +2 -2
  17. package/dist/lib/node/{SheetContainer-L37HUFCF.cjs → SheetContainer-MPFKXY26.cjs} +72 -63
  18. package/dist/lib/node/SheetContainer-MPFKXY26.cjs.map +7 -0
  19. package/dist/lib/node/{chunk-QIFIGEKV.cjs → chunk-2ZVZI2KJ.cjs} +6 -5
  20. package/dist/lib/node/{chunk-QIFIGEKV.cjs.map → chunk-2ZVZI2KJ.cjs.map} +3 -3
  21. package/dist/lib/node/{chunk-V7E5JZBD.cjs → chunk-AWKOWDMI.cjs} +9 -7
  22. package/dist/lib/node/chunk-AWKOWDMI.cjs.map +7 -0
  23. package/dist/lib/node/{chunk-QNFMTK3X.cjs → chunk-O7XR4R7Y.cjs} +69 -29
  24. package/dist/lib/node/chunk-O7XR4R7Y.cjs.map +7 -0
  25. package/dist/lib/node/{chunk-7AWAC3R3.cjs → chunk-OO24XJBV.cjs} +353 -139
  26. package/dist/lib/node/chunk-OO24XJBV.cjs.map +7 -0
  27. package/dist/lib/node/{compute-graph-RJB6OVW6.cjs → compute-graph-KGWA2QLE.cjs} +21 -21
  28. package/dist/lib/node/{compute-graph-RJB6OVW6.cjs.map → compute-graph-KGWA2QLE.cjs.map} +2 -2
  29. package/dist/lib/node/index.cjs +74 -46
  30. package/dist/lib/node/index.cjs.map +3 -3
  31. package/dist/lib/node/meta.cjs +3 -3
  32. package/dist/lib/node/meta.cjs.map +1 -1
  33. package/dist/lib/node/meta.json +1 -1
  34. package/dist/lib/node/types.cjs +7 -7
  35. package/dist/lib/node/types.cjs.map +1 -1
  36. package/dist/lib/node-esm/{SheetContainer-CLKFEM35.mjs → SheetContainer-22IOAW3B.mjs} +60 -48
  37. package/dist/lib/node-esm/SheetContainer-22IOAW3B.mjs.map +7 -0
  38. package/dist/lib/node-esm/{chunk-VCYJWE3O.mjs → chunk-BM2Q3FFC.mjs} +3 -2
  39. package/dist/lib/node-esm/{chunk-VCYJWE3O.mjs.map → chunk-BM2Q3FFC.mjs.map} +3 -3
  40. package/dist/lib/node-esm/{chunk-3JYJEOCF.mjs → chunk-BW36PM2Y.mjs} +337 -122
  41. package/dist/lib/node-esm/chunk-BW36PM2Y.mjs.map +7 -0
  42. package/dist/lib/node-esm/{chunk-JBTORSST.mjs → chunk-CR4K75EL.mjs} +58 -20
  43. package/dist/lib/node-esm/chunk-CR4K75EL.mjs.map +7 -0
  44. package/dist/lib/node-esm/{chunk-SPQFLYC2.mjs → chunk-UIBWRHW7.mjs} +5 -3
  45. package/dist/lib/node-esm/chunk-UIBWRHW7.mjs.map +7 -0
  46. package/dist/lib/node-esm/{compute-graph-VKRG526N.mjs → compute-graph-2SCZT7N5.mjs} +4 -4
  47. package/dist/lib/node-esm/index.mjs +48 -21
  48. package/dist/lib/node-esm/index.mjs.map +3 -3
  49. package/dist/lib/node-esm/meta.json +1 -1
  50. package/dist/lib/node-esm/meta.mjs +1 -1
  51. package/dist/lib/node-esm/types.mjs +2 -2
  52. package/dist/types/src/SheetPlugin.d.ts.map +1 -1
  53. package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts.map +1 -1
  54. package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +1 -1
  55. package/dist/types/src/components/GridSheet/util.d.ts +2 -2
  56. package/dist/types/src/components/GridSheet/util.d.ts.map +1 -1
  57. package/dist/types/src/components/RangeList/RangeList.d.ts +2 -4
  58. package/dist/types/src/components/RangeList/RangeList.d.ts.map +1 -1
  59. package/dist/types/src/components/SheetContainer/SheetContainer.d.ts +6 -3
  60. package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +1 -1
  61. package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +1 -1
  62. package/dist/types/src/components/Toolbar/Toolbar.d.ts +6 -3
  63. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
  64. package/dist/types/src/components/index.d.ts +4 -2
  65. package/dist/types/src/components/index.d.ts.map +1 -1
  66. package/dist/types/src/compute-graph/compute-graph.d.ts +2 -2
  67. package/dist/types/src/compute-graph/compute-graph.d.ts.map +1 -1
  68. package/dist/types/src/compute-graph/functions/async-function.d.ts.map +1 -1
  69. package/dist/types/src/compute-graph/functions/edge-function.d.ts.map +1 -1
  70. package/dist/types/src/defs/sheet-range-types.d.ts +2 -2
  71. package/dist/types/src/defs/sheet-range-types.d.ts.map +1 -1
  72. package/dist/types/src/defs/util.d.ts +1 -1
  73. package/dist/types/src/defs/util.d.ts.map +1 -1
  74. package/dist/types/src/integrations/thread-ranges.d.ts +1 -2
  75. package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
  76. package/dist/types/src/meta.d.ts +1 -0
  77. package/dist/types/src/meta.d.ts.map +1 -1
  78. package/dist/types/src/model/sheet-model.d.ts +12 -5
  79. package/dist/types/src/model/sheet-model.d.ts.map +1 -1
  80. package/dist/types/src/translations.d.ts +12 -3
  81. package/dist/types/src/translations.d.ts.map +1 -1
  82. package/dist/types/src/types.d.ts +33 -3
  83. package/dist/types/src/types.d.ts.map +1 -1
  84. package/package.json +37 -36
  85. package/src/SheetPlugin.tsx +27 -7
  86. package/src/components/FunctionEditor/FunctionEditor.tsx +1 -5
  87. package/src/components/GridSheet/GridSheet.tsx +107 -42
  88. package/src/components/GridSheet/util.ts +26 -16
  89. package/src/components/RangeList/RangeList.tsx +27 -12
  90. package/src/components/SheetContainer/SheetContainer.stories.tsx +4 -2
  91. package/src/components/SheetContainer/SheetContainer.tsx +19 -12
  92. package/src/components/Toolbar/Toolbar.tsx +72 -59
  93. package/src/compute-graph/compute-graph.ts +22 -7
  94. package/src/compute-graph/functions/async-function.ts +1 -0
  95. package/src/compute-graph/functions/edge-function.ts +5 -3
  96. package/src/defs/sheet-range-types.ts +8 -6
  97. package/src/defs/util.ts +1 -0
  98. package/src/integrations/thread-ranges.ts +3 -3
  99. package/src/meta.ts +1 -0
  100. package/src/model/sheet-model.test.ts +5 -3
  101. package/src/model/sheet-model.ts +93 -21
  102. package/src/translations.ts +12 -3
  103. package/src/types.ts +21 -1
  104. package/dist/lib/browser/SheetContainer-JBB7W52Y.mjs.map +0 -7
  105. package/dist/lib/browser/chunk-2ZK3YMZG.mjs.map +0 -7
  106. package/dist/lib/browser/chunk-3QWIMZZJ.mjs.map +0 -7
  107. package/dist/lib/browser/chunk-XXDHBYZQ.mjs.map +0 -7
  108. package/dist/lib/node/SheetContainer-L37HUFCF.cjs.map +0 -7
  109. package/dist/lib/node/chunk-7AWAC3R3.cjs.map +0 -7
  110. package/dist/lib/node/chunk-QNFMTK3X.cjs.map +0 -7
  111. package/dist/lib/node/chunk-V7E5JZBD.cjs.map +0 -7
  112. package/dist/lib/node-esm/SheetContainer-CLKFEM35.mjs.map +0 -7
  113. package/dist/lib/node-esm/chunk-3JYJEOCF.mjs.map +0 -7
  114. package/dist/lib/node-esm/chunk-JBTORSST.mjs.map +0 -7
  115. package/dist/lib/node-esm/chunk-SPQFLYC2.mjs.map +0 -7
  116. /package/dist/lib/browser/{compute-graph-ZQKB6QVP.mjs.map → compute-graph-GGWUX644.mjs.map} +0 -0
  117. /package/dist/lib/node-esm/{compute-graph-VKRG526N.mjs.map → compute-graph-2SCZT7N5.mjs.map} +0 -0
@@ -18,13 +18,14 @@ import {
18
18
  isFormula,
19
19
  rangeFromIndex,
20
20
  rangeToA1Notation
21
- } from "./chunk-JBTORSST.mjs";
21
+ } from "./chunk-CR4K75EL.mjs";
22
22
  import {
23
- Range
24
- } from "./chunk-SPQFLYC2.mjs";
23
+ Range,
24
+ SheetAction
25
+ } from "./chunk-UIBWRHW7.mjs";
25
26
  import {
26
27
  SHEET_PLUGIN
27
- } from "./chunk-VCYJWE3O.mjs";
28
+ } from "./chunk-BM2Q3FFC.mjs";
28
29
 
29
30
  // packages/plugins/plugin-sheet/src/components/ComputeGraph/ComputeGraphContextProvider.tsx
30
31
  import React, { createContext, useContext } from "react";
@@ -284,21 +285,39 @@ import { Grid, useGridContext } from "@dxos/react-ui-grid";
284
285
  // packages/plugins/plugin-sheet/src/model/sheet-model.ts
285
286
  import { Event } from "@dxos/async";
286
287
  import { Resource } from "@dxos/context";
287
- import { getTypename } from "@dxos/echo-schema";
288
+ import { getTypename, FormatEnum, TypeEnum } from "@dxos/echo-schema";
288
289
  import { invariant as invariant2 } from "@dxos/invariant";
289
290
  import { PublicKey } from "@dxos/keys";
290
291
  import { log } from "@dxos/log";
291
- import { FieldValueType } from "@dxos/schema";
292
292
  import { DetailedCellError, ExportedCellChange } from "#hyperformula";
293
293
  var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-sheet/src/model/sheet-model.ts";
294
294
  var typeMap = {
295
- BOOLEAN: FieldValueType.Boolean,
296
- NUMBER_RAW: FieldValueType.Number,
297
- NUMBER_PERCENT: FieldValueType.Percent,
298
- NUMBER_CURRENCY: FieldValueType.Currency,
299
- NUMBER_DATETIME: FieldValueType.DateTime,
300
- NUMBER_DATE: FieldValueType.Date,
301
- NUMBER_TIME: FieldValueType.Time
295
+ BOOLEAN: {
296
+ type: TypeEnum.Boolean
297
+ },
298
+ NUMBER_RAW: {
299
+ type: TypeEnum.Number
300
+ },
301
+ NUMBER_PERCENT: {
302
+ type: TypeEnum.Number,
303
+ format: FormatEnum.Percent
304
+ },
305
+ NUMBER_CURRENCY: {
306
+ type: TypeEnum.Number,
307
+ format: FormatEnum.Currency
308
+ },
309
+ NUMBER_DATETIME: {
310
+ type: TypeEnum.String,
311
+ format: FormatEnum.DateTime
312
+ },
313
+ NUMBER_DATE: {
314
+ type: TypeEnum.String,
315
+ format: FormatEnum.Date
316
+ },
317
+ NUMBER_TIME: {
318
+ type: TypeEnum.String,
319
+ format: FormatEnum.Time
320
+ }
302
321
  };
303
322
  var getTopLeft = (range) => {
304
323
  const to = range.to ?? range.from;
@@ -348,11 +367,16 @@ var SheetModel = class extends Resource {
348
367
  id: this.id
349
368
  }, {
350
369
  F: __dxlog_file,
351
- L: 111,
370
+ L: 113,
352
371
  S: this,
353
372
  C: (f, a) => f(...a)
354
373
  });
355
374
  initialize(this._sheet);
375
+ this._graph.update.on((event) => {
376
+ if (event.type === "functionsUpdated") {
377
+ this.reset();
378
+ }
379
+ });
356
380
  this._node = this._graph.getOrCreateNode(createSheetName({
357
381
  type: getTypename(this._sheet),
358
382
  id: this._sheet.id
@@ -370,7 +394,7 @@ var SheetModel = class extends Resource {
370
394
  reset() {
371
395
  invariant2(this._node, void 0, {
372
396
  F: __dxlog_file,
373
- L: 131,
397
+ L: 139,
374
398
  S: this,
375
399
  A: [
376
400
  "this._node",
@@ -381,7 +405,7 @@ var SheetModel = class extends Resource {
381
405
  Object.entries(this._sheet.cells).forEach(([key, { value }]) => {
382
406
  invariant2(this._node, void 0, {
383
407
  F: __dxlog_file,
384
- L: 134,
408
+ L: 142,
385
409
  S: this,
386
410
  A: [
387
411
  "this._node",
@@ -390,7 +414,12 @@ var SheetModel = class extends Resource {
390
414
  });
391
415
  const { col, row } = addressFromIndex(this._sheet, key);
392
416
  if (isFormula(value)) {
393
- value = this._graph.mapFormulaToNative(this._graph.mapFunctionBindingFromId(this.mapFormulaIndicesToRefs(value)));
417
+ const binding = this._graph.mapFunctionBindingFromId(this.mapFormulaIndicesToRefs(value));
418
+ if (binding) {
419
+ value = this._graph.mapFormulaToNative(binding);
420
+ } else {
421
+ value = "";
422
+ }
394
423
  }
395
424
  this._node.graph.hf.setCellContents({
396
425
  sheet: this._node.sheetId,
@@ -410,11 +439,79 @@ var SheetModel = class extends Resource {
410
439
  this._node?.graph.hf.rebuildAndRecalculate();
411
440
  }
412
441
  insertRows(i, n = 1) {
413
- insertIndices(this._sheet.rows, i, n, MAX_ROWS);
442
+ const idx = insertIndices(this._sheet.rows, i, n, MAX_ROWS);
414
443
  this.reset();
444
+ return idx;
415
445
  }
416
446
  insertColumns(i, n = 1) {
417
- insertIndices(this._sheet.columns, i, n, MAX_COLUMNS);
447
+ const idx = insertIndices(this._sheet.columns, i, n, MAX_COLUMNS);
448
+ this.reset();
449
+ return idx;
450
+ }
451
+ dropRow(rowIndex) {
452
+ const range = {
453
+ from: addressFromIndex(this._sheet, `${this._sheet.columns[0]}@${rowIndex}`),
454
+ to: addressFromIndex(this._sheet, `${this._sheet.columns[this._sheet.columns.length - 1]}@${rowIndex}`)
455
+ };
456
+ const values = this.getCellValues(range).flat();
457
+ const index = this._sheet.rows.indexOf(rowIndex);
458
+ this.clear(range);
459
+ this._sheet.rows.splice(index, 1);
460
+ delete this._sheet.rowMeta[rowIndex];
461
+ this.reset();
462
+ return {
463
+ axis: "row",
464
+ index,
465
+ axisIndex: rowIndex,
466
+ axisMeta: this._sheet.rowMeta[rowIndex],
467
+ values
468
+ };
469
+ }
470
+ dropColumn(colIndex) {
471
+ const range = {
472
+ from: addressFromIndex(this._sheet, `${colIndex}@${this._sheet.rows[0]}`),
473
+ to: addressFromIndex(this._sheet, `${colIndex}@${this._sheet.rows[this._sheet.rows.length - 1]}`)
474
+ };
475
+ const values = this.getCellValues(range).flat();
476
+ const index = this._sheet.columns.indexOf(colIndex);
477
+ this.clear(range);
478
+ this._sheet.columns.splice(index, 1);
479
+ delete this._sheet.columnMeta[colIndex];
480
+ this.reset();
481
+ return {
482
+ axis: "col",
483
+ index,
484
+ axisIndex: colIndex,
485
+ axisMeta: this._sheet.rowMeta[colIndex],
486
+ values
487
+ };
488
+ }
489
+ restoreRow({ index, axisIndex, axisMeta, values }) {
490
+ this._sheet.rows.splice(index, 0, axisIndex);
491
+ values.forEach((value, col) => {
492
+ if (value) {
493
+ this._sheet.cells[`${this._sheet.columns[col]}@${axisIndex}`] = {
494
+ value
495
+ };
496
+ }
497
+ });
498
+ if (axisMeta) {
499
+ this._sheet.rowMeta[axisIndex] = axisMeta;
500
+ }
501
+ this.reset();
502
+ }
503
+ restoreColumn({ index, axisIndex, axisMeta, values }) {
504
+ this._sheet.columns.splice(index, 0, axisIndex);
505
+ values.forEach((value, row) => {
506
+ if (value) {
507
+ this._sheet.cells[`${axisIndex}@${this._sheet.rows[row]}`] = {
508
+ value
509
+ };
510
+ }
511
+ });
512
+ if (axisMeta) {
513
+ this._sheet.columnMeta[axisIndex] = axisMeta;
514
+ }
418
515
  this.reset();
419
516
  }
420
517
  //
@@ -427,7 +524,7 @@ var SheetModel = class extends Resource {
427
524
  clear(range) {
428
525
  invariant2(this._node, void 0, {
429
526
  F: __dxlog_file,
430
- L: 176,
527
+ L: 245,
431
528
  S: this,
432
529
  A: [
433
530
  "this._node",
@@ -445,7 +542,7 @@ var SheetModel = class extends Resource {
445
542
  cut(range) {
446
543
  invariant2(this._node, void 0, {
447
544
  F: __dxlog_file,
448
- L: 187,
545
+ L: 256,
449
546
  S: this,
450
547
  A: [
451
548
  "this._node",
@@ -461,7 +558,7 @@ var SheetModel = class extends Resource {
461
558
  copy(range) {
462
559
  invariant2(this._node, void 0, {
463
560
  F: __dxlog_file,
464
- L: 196,
561
+ L: 265,
465
562
  S: this,
466
563
  A: [
467
564
  "this._node",
@@ -473,7 +570,7 @@ var SheetModel = class extends Resource {
473
570
  paste(cell) {
474
571
  invariant2(this._node, void 0, {
475
572
  F: __dxlog_file,
476
- L: 201,
573
+ L: 270,
477
574
  S: this,
478
575
  A: [
479
576
  "this._node",
@@ -500,7 +597,7 @@ var SheetModel = class extends Resource {
500
597
  undo() {
501
598
  invariant2(this._node, void 0, {
502
599
  F: __dxlog_file,
503
- L: 216,
600
+ L: 285,
504
601
  S: this,
505
602
  A: [
506
603
  "this._node",
@@ -514,7 +611,7 @@ var SheetModel = class extends Resource {
514
611
  redo() {
515
612
  invariant2(this._node, void 0, {
516
613
  F: __dxlog_file,
517
- L: 224,
614
+ L: 293,
518
615
  S: this,
519
616
  A: [
520
617
  "this._node",
@@ -558,15 +655,25 @@ var SheetModel = class extends Resource {
558
655
  getValue(cell) {
559
656
  invariant2(this._node, void 0, {
560
657
  F: __dxlog_file,
561
- L: 267,
658
+ L: 336,
562
659
  S: this,
563
660
  A: [
564
661
  "this._node",
565
662
  ""
566
663
  ]
567
664
  });
568
- const value = this._node.graph.hf.getCellValue(toSimpleCellAddress(this._node.sheetId, cell));
665
+ const address = toSimpleCellAddress(this._node.sheetId, cell);
666
+ const value = this._node.graph.hf.getCellValue(address);
569
667
  if (value instanceof DetailedCellError) {
668
+ log.info("cell error", {
669
+ cell,
670
+ error: value
671
+ }, {
672
+ F: __dxlog_file,
673
+ L: 341,
674
+ S: this,
675
+ C: (f, a) => f(...a)
676
+ });
570
677
  return value.toString();
571
678
  }
572
679
  return value;
@@ -574,10 +681,10 @@ var SheetModel = class extends Resource {
574
681
  /**
575
682
  * Get value type.
576
683
  */
577
- getValueType(cell) {
684
+ getValueDescription(cell) {
578
685
  invariant2(this._node, void 0, {
579
686
  F: __dxlog_file,
580
- L: 280,
687
+ L: 352,
581
688
  S: this,
582
689
  A: [
583
690
  "this._node",
@@ -594,7 +701,7 @@ var SheetModel = class extends Resource {
594
701
  setValue(cell, value) {
595
702
  invariant2(this._node, void 0, {
596
703
  F: __dxlog_file,
597
- L: 290,
704
+ L: 362,
598
705
  S: this,
599
706
  A: [
600
707
  "this._node",
@@ -691,7 +798,7 @@ var SheetModel = class extends Resource {
691
798
  mapFormulaRefsToIndices(formula) {
692
799
  invariant2(isFormula(formula), void 0, {
693
800
  F: __dxlog_file,
694
- L: 379,
801
+ L: 451,
695
802
  S: this,
696
803
  A: [
697
804
  "isFormula(formula)",
@@ -708,7 +815,7 @@ var SheetModel = class extends Resource {
708
815
  mapFormulaIndicesToRefs(formula) {
709
816
  invariant2(isFormula(formula), void 0, {
710
817
  F: __dxlog_file,
711
- L: 389,
818
+ L: 461,
712
819
  S: this,
713
820
  A: [
714
821
  "isFormula(formula)",
@@ -734,7 +841,7 @@ var SheetModel = class extends Resource {
734
841
  toDateTime(num) {
735
842
  invariant2(this._node, void 0, {
736
843
  F: __dxlog_file,
737
- L: 410,
844
+ L: 482,
738
845
  S: this,
739
846
  A: [
740
847
  "this._node",
@@ -746,7 +853,7 @@ var SheetModel = class extends Resource {
746
853
  toDate(num) {
747
854
  invariant2(this._node, void 0, {
748
855
  F: __dxlog_file,
749
- L: 415,
856
+ L: 487,
750
857
  S: this,
751
858
  A: [
752
859
  "this._node",
@@ -758,7 +865,7 @@ var SheetModel = class extends Resource {
758
865
  toTime(num) {
759
866
  invariant2(this._node, void 0, {
760
867
  F: __dxlog_file,
761
- L: 420,
868
+ L: 492,
762
869
  S: this,
763
870
  A: [
764
871
  "this._node",
@@ -868,20 +975,21 @@ var SheetProvider = ({ children, graph, sheet, readonly, onInfo }) => {
868
975
  };
869
976
 
870
977
  // packages/plugins/plugin-sheet/src/components/GridSheet/GridSheet.tsx
871
- import React4, { useCallback as useCallback3, useMemo as useMemo2, useRef, useState as useState4 } from "react";
872
- import { DropdownMenu, Icon, useTranslation } from "@dxos/react-ui";
978
+ import React4, { useCallback as useCallback4, useMemo as useMemo2, useRef, useState as useState4 } from "react";
979
+ import { useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
980
+ import { DropdownMenu, Icon, useTranslation as useTranslation2 } from "@dxos/react-ui";
873
981
  import { useAttention } from "@dxos/react-ui-attention";
874
- import { closestCell, editorKeys, Grid as Grid2, GridCellEditor } from "@dxos/react-ui-grid";
982
+ import { closestCell, defaultSizeRow, editorKeys, Grid as Grid2, GridCellEditor } from "@dxos/react-ui-grid";
875
983
 
876
984
  // packages/plugins/plugin-sheet/src/components/GridSheet/util.ts
877
- import { useEffect as useEffect3, useLayoutEffect, useState as useState3 } from "react";
985
+ import { useEffect as useEffect3, useState as useState3 } from "react";
878
986
  import { createDocAccessor, fullyQualifiedId as fullyQualifiedId3 } from "@dxos/react-client/echo";
879
987
  import { parseValue, cellClassesForFieldType } from "@dxos/react-ui-data";
880
988
  import { colToA1Notation, rowToA1Notation, commentedClassName } from "@dxos/react-ui-grid";
881
989
  import { mx as mx2 } from "@dxos/react-ui-theme";
882
990
 
883
991
  // packages/plugins/plugin-sheet/src/integrations/thread-ranges.ts
884
- import { useCallback as useCallback2, useEffect as useEffect2, useMemo } from "react";
992
+ import { useCallback as useCallback3, useEffect as useEffect2, useMemo } from "react";
885
993
  import { LayoutAction, useIntentDispatcher, useIntentResolver } from "@dxos/app-framework";
886
994
  import { debounce as debounce2 } from "@dxos/async";
887
995
  import { fullyQualifiedId as fullyQualifiedId2 } from "@dxos/react-client/echo";
@@ -890,32 +998,46 @@ import { fullyQualifiedId as fullyQualifiedId2 } from "@dxos/react-client/echo";
890
998
  import { lazy } from "react";
891
999
 
892
1000
  // packages/plugins/plugin-sheet/src/components/RangeList/RangeList.tsx
893
- import React3 from "react";
1001
+ import React3, { useCallback as useCallback2 } from "react";
894
1002
  import { S } from "@dxos/echo-schema";
1003
+ import { useTranslation } from "@dxos/react-ui";
895
1004
  import { List } from "@dxos/react-ui-list";
896
1005
  import { ghostHover } from "@dxos/react-ui-theme";
897
- var RangeList = ({ sheet, onSelect, onDelete }) => {
898
- return /* @__PURE__ */ React3.createElement("div", {
899
- className: "flex flex-col"
900
- }, /* @__PURE__ */ React3.createElement(List.Root, {
1006
+ var RangeList = ({ sheet }) => {
1007
+ const { t } = useTranslation(SHEET_PLUGIN);
1008
+ const handleSelectRange = (range) => {
1009
+ };
1010
+ const handleDeleteRange = useCallback2((range) => {
1011
+ const index = sheet.ranges.findIndex((sheetRange) => sheetRange === range);
1012
+ sheet.ranges.splice(index, 1);
1013
+ }, [
1014
+ sheet
1015
+ ]);
1016
+ return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement("h2", {
1017
+ className: "p-2 text-sm font-semibold"
1018
+ }, t("range list heading")), /* @__PURE__ */ React3.createElement(List.Root, {
901
1019
  items: sheet.ranges,
902
1020
  isItem: S.is(Range)
903
- }, ({ items }) => items.map((item, i) => /* @__PURE__ */ React3.createElement(List.Item, {
1021
+ }, ({ items: ranges }) => ranges.map((range, i) => /* @__PURE__ */ React3.createElement(List.Item, {
904
1022
  key: i,
905
- item,
1023
+ item: range,
906
1024
  classNames: [
907
1025
  "p-2",
908
1026
  ghostHover
909
1027
  ]
910
1028
  }, /* @__PURE__ */ React3.createElement(List.ItemDragHandle, null), /* @__PURE__ */ React3.createElement(List.ItemTitle, {
911
- onClick: () => onSelect?.(item)
912
- }, rangeToA1Notation(rangeFromIndex(sheet, item.range))), onDelete && /* @__PURE__ */ React3.createElement(List.ItemDeleteButton, {
913
- onClick: () => onDelete(item)
1029
+ onClick: () => handleSelectRange(range)
1030
+ }, t("range title", {
1031
+ position: rangeToA1Notation(rangeFromIndex(sheet, range.range)),
1032
+ key: t(`range key ${range.key} label`),
1033
+ value: t(`range value ${range.value} label`)
1034
+ })), /* @__PURE__ */ React3.createElement(List.ItemDeleteButton, {
1035
+ onClick: () => handleDeleteRange(range)
914
1036
  })))));
915
1037
  };
916
1038
 
917
1039
  // packages/plugins/plugin-sheet/src/components/index.ts
918
- var SheetContainer = lazy(() => import("./SheetContainer-CLKFEM35.mjs"));
1040
+ var SheetContainer = lazy(() => import("./SheetContainer-22IOAW3B.mjs"));
919
1041
 
920
1042
  // packages/plugins/plugin-sheet/src/integrations/thread-ranges.ts
921
1043
  var completeCellRangeToThreadCursor = (range) => {
@@ -941,7 +1063,7 @@ var parseThreadAnchorAsCellRange = (cursor) => {
941
1063
  };
942
1064
  var useUpdateFocusedCellOnThreadSelection = (grid) => {
943
1065
  const { model, setActiveRefs } = useSheetContext();
944
- const handleScrollIntoView = useCallback2(({ action, data }) => {
1066
+ const handleScrollIntoView = useCallback3(({ action, data }) => {
945
1067
  switch (action) {
946
1068
  case LayoutAction.SCROLL_INTO_VIEW: {
947
1069
  if (!data?.id || data?.cursor === void 0 || data?.id !== fullyQualifiedId2(model.sheet)) {
@@ -949,7 +1071,7 @@ var useUpdateFocusedCellOnThreadSelection = (grid) => {
949
1071
  }
950
1072
  setActiveRefs(data.thread);
951
1073
  const range = parseThreadAnchorAsCellRange(data.cursor);
952
- range && grid.current?.setFocus({
1074
+ range && grid?.setFocus({
953
1075
  ...range.to,
954
1076
  plane: "grid"
955
1077
  }, true);
@@ -968,7 +1090,7 @@ var useSelectThreadOnCellFocus = () => {
968
1090
  // TODO(thure): Surely we can find a better dependency for this…
969
1091
  JSON.stringify(model.sheet.threads)
970
1092
  ]);
971
- const selectClosestThread = useCallback2((cellAddress) => {
1093
+ const selectClosestThread = useCallback3((cellAddress) => {
972
1094
  if (!cellAddress || !threads) {
973
1095
  return;
974
1096
  }
@@ -1055,11 +1177,20 @@ var projectCellProps = (model, col, row) => {
1055
1177
  const range = thread?.anchor && parseThreadAnchorAsCellRange(thread.anchor);
1056
1178
  return thread && range ? inRange(range, address) : false;
1057
1179
  }).map((thread) => fullyQualifiedId3(thread)).join(" ");
1058
- const type = model.getValueType(address);
1180
+ const description = model.getValueDescription(address);
1181
+ const type = description?.type;
1182
+ const format = description?.format;
1059
1183
  const classNames = ranges?.map(cellClassNameForRange).reverse();
1060
1184
  return {
1061
- value: parseValue(type, rawValue),
1062
- className: mx2(cellClassesForFieldType(type), threadRefs && commentedClassName, classNames),
1185
+ value: parseValue({
1186
+ type,
1187
+ format,
1188
+ value: rawValue
1189
+ }),
1190
+ className: mx2(cellClassesForFieldType({
1191
+ type,
1192
+ format
1193
+ }), threadRefs && commentedClassName, classNames),
1063
1194
  dataRefs: threadRefs
1064
1195
  };
1065
1196
  };
@@ -1082,11 +1213,12 @@ var gridCellGetter = (model) => {
1082
1213
  };
1083
1214
  var rowLabelCell = (row) => ({
1084
1215
  value: rowToA1Notation(row),
1085
- className: "text-end !pie-1",
1216
+ className: "text-end !pie-1 text-subdued",
1086
1217
  resizeHandle: "row"
1087
1218
  });
1088
1219
  var colLabelCell = (col) => ({
1089
1220
  value: colToA1Notation(col),
1221
+ className: "text-subdued",
1090
1222
  resizeHandle: "col"
1091
1223
  });
1092
1224
  var cellGetter = (model) => {
@@ -1116,23 +1248,28 @@ var cellGetter = (model) => {
1116
1248
  }
1117
1249
  };
1118
1250
  };
1119
- var useSheetModelDxGridProps = (dxGridRef, model) => {
1251
+ var useSheetModelDxGridProps = (dxGrid, model) => {
1120
1252
  const [columns, setColumns] = useState3(createDxGridColumns(model));
1121
- const [rows, setRows] = useState3(createDxGridColumns(model));
1122
- useLayoutEffect(() => {
1253
+ const [rows, setRows] = useState3(createDxGridRows(model));
1254
+ useEffect3(() => {
1123
1255
  const cellsAccessor = createDocAccessor(model.sheet, [
1124
1256
  "cells"
1125
1257
  ]);
1126
- if (dxGridRef.current) {
1127
- dxGridRef.current.getCells = cellGetter(model);
1258
+ if (dxGrid) {
1259
+ dxGrid.getCells = cellGetter(model);
1128
1260
  }
1129
1261
  const handleCellsUpdate = () => {
1130
- dxGridRef.current?.requestUpdate("initialCells");
1262
+ dxGrid?.requestUpdate("initialCells");
1131
1263
  };
1132
1264
  cellsAccessor.handle.addListener("change", handleCellsUpdate);
1133
- return () => cellsAccessor.handle.removeListener("change", handleCellsUpdate);
1265
+ const unsubscribe = model.graph.update.on(handleCellsUpdate);
1266
+ return () => {
1267
+ cellsAccessor.handle.removeListener("change", handleCellsUpdate);
1268
+ unsubscribe();
1269
+ };
1134
1270
  }, [
1135
- model
1271
+ model,
1272
+ dxGrid
1136
1273
  ]);
1137
1274
  useEffect3(() => {
1138
1275
  const columnMetaAccessor = createDocAccessor(model.sheet, [
@@ -1154,7 +1291,8 @@ var useSheetModelDxGridProps = (dxGridRef, model) => {
1154
1291
  rowMetaAccessor.handle.removeListener("change", handleRowMetaUpdate);
1155
1292
  };
1156
1293
  }, [
1157
- model
1294
+ model,
1295
+ dxGrid
1158
1296
  ]);
1159
1297
  return {
1160
1298
  columns,
@@ -1189,11 +1327,11 @@ var frozen = {
1189
1327
  };
1190
1328
  var sheetRowDefault = {
1191
1329
  frozenRowsStart: {
1192
- size: 32,
1330
+ size: defaultSizeRow,
1193
1331
  readonly: true
1194
1332
  },
1195
1333
  grid: {
1196
- size: 32,
1334
+ size: defaultSizeRow,
1197
1335
  resizeable: true
1198
1336
  }
1199
1337
  };
@@ -1208,57 +1346,65 @@ var sheetColDefault = {
1208
1346
  }
1209
1347
  };
1210
1348
  var GridSheet = () => {
1211
- const { t } = useTranslation(SHEET_PLUGIN);
1212
- const { id, model, editing, setEditing, setCursor, setRange, cursor, cursorFallbackRange, activeRefs } = useSheetContext();
1213
- const dxGrid = useRef(null);
1349
+ const { t } = useTranslation2(SHEET_PLUGIN);
1350
+ const { id, model, editing, setCursor, setRange, cursor, cursorFallbackRange, activeRefs } = useSheetContext();
1351
+ const [dxGrid, setDxGrid] = useState4(null);
1352
+ const [extraplanarFocus, setExtraplanarFocus] = useState4(null);
1353
+ const dispatch = useIntentDispatcher2();
1214
1354
  const rangeController = useRef();
1215
1355
  const { hasAttention } = useAttention(id);
1216
- const handleFocus = useCallback3((event) => {
1356
+ const handleFocus = useCallback4((event) => {
1217
1357
  if (!editing) {
1218
1358
  const cell = closestCell(event.target);
1219
- if (cell && cell.plane === "grid") {
1220
- setCursor({
1221
- col: cell.col,
1222
- row: cell.row
1223
- });
1359
+ if (cell) {
1360
+ if (cell.plane === "grid") {
1361
+ setCursor({
1362
+ col: cell.col,
1363
+ row: cell.row
1364
+ });
1365
+ setExtraplanarFocus(null);
1366
+ } else {
1367
+ setExtraplanarFocus(cell);
1368
+ }
1369
+ } else {
1370
+ setExtraplanarFocus(null);
1224
1371
  }
1225
1372
  }
1226
1373
  }, [
1227
1374
  editing
1228
1375
  ]);
1229
- const handleClose = useCallback3((value, { key, shift }) => {
1230
- if (value !== void 0) {
1231
- model.setValue(dxGridCellIndexToSheetCellAddress(editing.index), value);
1376
+ const handleClose = useCallback4((_value, event) => {
1377
+ if (event) {
1378
+ const { key, shift } = event;
1379
+ const axis = [
1380
+ "Enter",
1381
+ "ArrowUp",
1382
+ "ArrowDown"
1383
+ ].includes(key) ? "row" : [
1384
+ "Tab",
1385
+ "ArrowLeft",
1386
+ "ArrowRight"
1387
+ ].includes(key) ? "col" : void 0;
1388
+ const delta = key.startsWith("Arrow") ? [
1389
+ "ArrowUp",
1390
+ "ArrowLeft"
1391
+ ].includes(key) ? -1 : 1 : shift ? -1 : 1;
1392
+ dxGrid?.refocus(axis, delta);
1232
1393
  }
1233
- setEditing(null);
1234
- const axis = [
1235
- "Enter",
1236
- "ArrowUp",
1237
- "ArrowDown"
1238
- ].includes(key) ? "row" : [
1239
- "Tab",
1240
- "ArrowLeft",
1241
- "ArrowRight"
1242
- ].includes(key) ? "col" : void 0;
1243
- const delta = key.startsWith("Arrow") ? [
1244
- "ArrowUp",
1245
- "ArrowLeft"
1246
- ].includes(key) ? -1 : 1 : shift ? -1 : 1;
1247
- dxGrid.current?.refocus(axis, delta);
1248
1394
  }, [
1249
1395
  model,
1250
- editing
1396
+ editing,
1397
+ dxGrid
1251
1398
  ]);
1252
- const handleBlur = useCallback3((value) => {
1399
+ const handleBlur = useCallback4((value) => {
1253
1400
  if (value !== void 0) {
1254
1401
  model.setValue(dxGridCellIndexToSheetCellAddress(editing.index), value);
1255
1402
  }
1256
- setEditing(null);
1257
1403
  }, [
1258
1404
  model,
1259
1405
  editing
1260
1406
  ]);
1261
- const handleAxisResize = useCallback3(({ axis, size, index: numericIndex }) => {
1407
+ const handleAxisResize = useCallback4(({ axis, size, index: numericIndex }) => {
1262
1408
  if (axis === "row") {
1263
1409
  const rowId = model.sheet.rows[parseInt(numericIndex)];
1264
1410
  model.sheet.rowMeta[rowId] ??= {};
@@ -1271,7 +1417,7 @@ var GridSheet = () => {
1271
1417
  }, [
1272
1418
  model
1273
1419
  ]);
1274
- const handleSelect = useCallback3(({ minCol, maxCol, minRow, maxRow }) => {
1420
+ const handleSelect = useCallback4(({ minCol, maxCol, minRow, maxRow }) => {
1275
1421
  const range = {
1276
1422
  from: {
1277
1423
  col: minCol,
@@ -1292,19 +1438,70 @@ var GridSheet = () => {
1292
1438
  }, [
1293
1439
  editing
1294
1440
  ]);
1295
- const handleWheel = useCallback3((event) => {
1441
+ const handleWheel = useCallback4((event) => {
1296
1442
  if (!hasAttention) {
1297
1443
  event.stopPropagation();
1298
1444
  }
1299
1445
  }, [
1300
1446
  hasAttention
1301
1447
  ]);
1302
- const handleKeyDown = useCallback3((event) => {
1448
+ const selectEntireAxis = useCallback4((pos) => {
1449
+ switch (pos.plane) {
1450
+ case "frozenRowsStart":
1451
+ return dxGrid?.setSelection({
1452
+ start: {
1453
+ col: pos.col,
1454
+ row: 0,
1455
+ plane: "grid"
1456
+ },
1457
+ end: {
1458
+ col: pos.col,
1459
+ row: model.sheet.rows.length - 1,
1460
+ plane: "grid"
1461
+ }
1462
+ });
1463
+ case "frozenColsStart":
1464
+ return dxGrid?.setSelection({
1465
+ start: {
1466
+ row: pos.row,
1467
+ col: 0,
1468
+ plane: "grid"
1469
+ },
1470
+ end: {
1471
+ row: pos.row,
1472
+ col: model.sheet.columns.length - 1,
1473
+ plane: "grid"
1474
+ }
1475
+ });
1476
+ }
1477
+ }, [
1478
+ dxGrid,
1479
+ model.sheet
1480
+ ]);
1481
+ const handleClick = useCallback4((event) => {
1482
+ const cell = closestCell(event.target);
1483
+ if (cell) {
1484
+ selectEntireAxis(cell);
1485
+ }
1486
+ }, [
1487
+ selectEntireAxis
1488
+ ]);
1489
+ const handleKeyDown = useCallback4((event) => {
1303
1490
  switch (event.key) {
1304
1491
  case "Backspace":
1305
1492
  case "Delete":
1306
1493
  event.preventDefault();
1307
1494
  return cursorFallbackRange && model.clear(cursorFallbackRange);
1495
+ case "Enter":
1496
+ case "Space":
1497
+ if (dxGrid && extraplanarFocus) {
1498
+ switch (extraplanarFocus.plane) {
1499
+ case "frozenRowsStart":
1500
+ case "frozenColsStart":
1501
+ event.preventDefault();
1502
+ return selectEntireAxis(extraplanarFocus);
1503
+ }
1504
+ }
1308
1505
  }
1309
1506
  if (event.metaKey || event.ctrlKey) {
1310
1507
  switch (event.key) {
@@ -1332,12 +1529,14 @@ var GridSheet = () => {
1332
1529
  }, [
1333
1530
  cursorFallbackRange,
1334
1531
  model,
1335
- cursor
1532
+ cursor,
1533
+ extraplanarFocus,
1534
+ selectEntireAxis
1336
1535
  ]);
1337
1536
  const contextMenuAnchorRef = useRef(null);
1338
1537
  const [contextMenuOpen, setContextMenuOpen] = useState4(null);
1339
1538
  const contextMenuAxis = contextMenuOpen?.plane.startsWith("frozenRows") ? "col" : "row";
1340
- const handleContextMenu = useCallback3((event) => {
1539
+ const handleContextMenu = useCallback4((event) => {
1341
1540
  const cell = closestCell(event.target);
1342
1541
  if (cell && cell.plane.startsWith("frozen")) {
1343
1542
  event.preventDefault();
@@ -1345,18 +1544,34 @@ var GridSheet = () => {
1345
1544
  setContextMenuOpen(cell);
1346
1545
  }
1347
1546
  }, []);
1348
- const handleAxisMenuAction = useCallback3((operation) => {
1547
+ const handleAxisMenuAction = useCallback4((operation) => {
1349
1548
  switch (operation) {
1350
- case "add-before":
1351
- case "add-after":
1352
- model[contextMenuAxis === "col" ? "insertColumns" : "insertRows"](contextMenuOpen[contextMenuAxis] + (operation === "add-before" ? 0 : 1), 1);
1549
+ case "insert-before":
1550
+ case "insert-after":
1551
+ return dispatch({
1552
+ action: SheetAction.INSERT_AXIS,
1553
+ data: {
1554
+ model,
1555
+ axis: contextMenuAxis,
1556
+ index: contextMenuOpen[contextMenuAxis] + (operation === "insert-before" ? 0 : 1)
1557
+ }
1558
+ });
1353
1559
  break;
1354
- case "remove":
1560
+ case "drop":
1561
+ return dispatch({
1562
+ action: SheetAction.DROP_AXIS,
1563
+ data: {
1564
+ model,
1565
+ axis: contextMenuAxis,
1566
+ axisIndex: model.sheet[contextMenuAxis === "row" ? "rows" : "columns"][contextMenuOpen[contextMenuAxis]]
1567
+ }
1568
+ });
1355
1569
  }
1356
1570
  }, [
1357
1571
  contextMenuAxis,
1358
1572
  contextMenuOpen,
1359
- model
1573
+ model,
1574
+ dispatch
1360
1575
  ]);
1361
1576
  const { columns, rows } = useSheetModelDxGridProps(dxGrid, model);
1362
1577
  const extension = useMemo2(() => [
@@ -1372,8 +1587,8 @@ var GridSheet = () => {
1372
1587
  rangeExtension({
1373
1588
  onInit: (fn) => rangeController.current = fn,
1374
1589
  onStateChange: (state) => {
1375
- if (dxGrid.current) {
1376
- dxGrid.current.mode = typeof state.activeRange === "undefined" ? "edit" : "edit-select";
1590
+ if (dxGrid) {
1591
+ dxGrid.mode = typeof state.activeRange === "undefined" ? "edit" : "edit-select";
1377
1592
  }
1378
1593
  }
1379
1594
  })
@@ -1382,7 +1597,7 @@ var GridSheet = () => {
1382
1597
  handleClose,
1383
1598
  editing
1384
1599
  ]);
1385
- const getCellContent = useCallback3((index) => {
1600
+ const getCellContent = useCallback4((index) => {
1386
1601
  const cell = dxGridCellIndexToSheetCellAddress(index);
1387
1602
  return model.getCellText(cell);
1388
1603
  }, [
@@ -1409,10 +1624,11 @@ var GridSheet = () => {
1409
1624
  onWheelCapture: handleWheel,
1410
1625
  onKeyDown: handleKeyDown,
1411
1626
  onContextMenu: handleContextMenu,
1412
- overscroll: "inline",
1413
- className: "[--dx-grid-base:var(--surface-bg)]",
1627
+ onClick: handleClick,
1628
+ overscroll: "trap",
1629
+ className: "[--dx-grid-base:var(--surface-bg)] [&_.dx-grid]:border-bs [&_.dx-grid]:border-separator",
1414
1630
  activeRefs,
1415
- ref: dxGrid
1631
+ ref: setDxGrid
1416
1632
  }), /* @__PURE__ */ React4.createElement(DropdownMenu.Root, {
1417
1633
  modal: false,
1418
1634
  open: !!contextMenuOpen,
@@ -1424,18 +1640,17 @@ var GridSheet = () => {
1424
1640
  sideOffset: 4,
1425
1641
  collisionPadding: 8
1426
1642
  }, /* @__PURE__ */ React4.createElement(DropdownMenu.Viewport, null, /* @__PURE__ */ React4.createElement(DropdownMenu.Item, {
1427
- onClick: () => handleAxisMenuAction("add-before")
1643
+ onClick: () => handleAxisMenuAction("insert-before")
1428
1644
  }, /* @__PURE__ */ React4.createElement(Icon, {
1429
1645
  size: 5,
1430
1646
  icon: contextMenuAxis === "col" ? "ph--columns-plus-left--regular" : "ph--rows-plus-top--regular"
1431
1647
  }), /* @__PURE__ */ React4.createElement("span", null, t(`add ${contextMenuAxis} before label`))), /* @__PURE__ */ React4.createElement(DropdownMenu.Item, {
1432
- onClick: () => handleAxisMenuAction("add-after")
1648
+ onClick: () => handleAxisMenuAction("insert-after")
1433
1649
  }, /* @__PURE__ */ React4.createElement(Icon, {
1434
1650
  size: 5,
1435
1651
  icon: contextMenuAxis === "col" ? "ph--columns-plus-right--regular" : "ph--rows-plus-bottom--regular"
1436
1652
  }), /* @__PURE__ */ React4.createElement("span", null, t(`add ${contextMenuAxis} after label`))), /* @__PURE__ */ React4.createElement(DropdownMenu.Item, {
1437
- disabled: true,
1438
- onClick: () => handleAxisMenuAction("remove")
1653
+ onClick: () => handleAxisMenuAction("drop")
1439
1654
  }, /* @__PURE__ */ React4.createElement(Icon, {
1440
1655
  size: 5,
1441
1656
  icon: "ph--backspace--regular"
@@ -1453,4 +1668,4 @@ export {
1453
1668
  RangeList,
1454
1669
  SheetContainer
1455
1670
  };
1456
- //# sourceMappingURL=chunk-3JYJEOCF.mjs.map
1671
+ //# sourceMappingURL=chunk-BW36PM2Y.mjs.map