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