@rowsncolumns/spreadsheet 10.19.3 → 10.19.5

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 (137) hide show
  1. package/dist/cjs/api/entry-selections.d.ts +91 -0
  2. package/dist/cjs/api/entry-selections.d.ts.map +1 -0
  3. package/dist/cjs/api/entry-selections.js +132 -0
  4. package/dist/cjs/atoms/cell-input-context.atom.d.ts.map +1 -1
  5. package/dist/cjs/atoms/entry-selections.atom.d.ts +11 -0
  6. package/dist/cjs/atoms/entry-selections.atom.d.ts.map +1 -0
  7. package/dist/cjs/atoms/entry-selections.atom.js +11 -0
  8. package/dist/cjs/components/advanced-filter-dialog/index.d.ts.map +1 -1
  9. package/dist/cjs/components/advanced-filter-dialog/index.js +6 -6
  10. package/dist/cjs/components/calculation-options-dialog/index.d.ts.map +1 -1
  11. package/dist/cjs/components/calculation-options-dialog/index.js +3 -3
  12. package/dist/cjs/components/canvas-grid/index.d.ts.map +1 -1
  13. package/dist/cjs/components/canvas-grid/index.js +243 -75
  14. package/dist/cjs/components/canvas-grid/typings.d.ts +12 -0
  15. package/dist/cjs/components/canvas-grid/typings.d.ts.map +1 -1
  16. package/dist/cjs/components/cell-input/formula-bar-cell-input.d.ts.map +1 -1
  17. package/dist/cjs/components/cell-input/formula-bar-cell-input.js +8 -2
  18. package/dist/cjs/components/consolidate-dialog/index.d.ts.map +1 -1
  19. package/dist/cjs/components/consolidate-dialog/index.js +12 -8
  20. package/dist/cjs/components/data-table-dialog/index.d.ts.map +1 -1
  21. package/dist/cjs/components/data-table-dialog/index.js +2 -2
  22. package/dist/cjs/components/evaluate-formula-dialog/index.d.ts.map +1 -1
  23. package/dist/cjs/components/evaluate-formula-dialog/index.js +9 -3
  24. package/dist/cjs/components/fill-series-dialog/index.d.ts.map +1 -1
  25. package/dist/cjs/components/fill-series-dialog/index.js +22 -6
  26. package/dist/cjs/components/forecast-sheet-dialog/index.d.ts.map +1 -1
  27. package/dist/cjs/components/forecast-sheet-dialog/index.js +4 -4
  28. package/dist/cjs/components/go-to-dialog/index.d.ts.map +1 -1
  29. package/dist/cjs/components/go-to-dialog/index.js +19 -6
  30. package/dist/cjs/components/goal-seek-dialog/index.d.ts.map +1 -1
  31. package/dist/cjs/components/goal-seek-dialog/index.js +5 -5
  32. package/dist/cjs/components/insert-cells-dialog/index.d.ts.map +1 -1
  33. package/dist/cjs/components/insert-cells-dialog/index.js +9 -9
  34. package/dist/cjs/components/move-chart-dialog/index.d.ts.map +1 -1
  35. package/dist/cjs/components/move-chart-dialog/index.js +4 -2
  36. package/dist/cjs/components/outline-settings-dialog/index.d.ts.map +1 -1
  37. package/dist/cjs/components/outline-settings-dialog/index.js +7 -5
  38. package/dist/cjs/components/paste-special-dialog/index.d.ts.map +1 -1
  39. package/dist/cjs/components/paste-special-dialog/index.js +22 -20
  40. package/dist/cjs/components/protect-sheet-dialog/index.d.ts.map +1 -1
  41. package/dist/cjs/components/protect-sheet-dialog/index.js +4 -3
  42. package/dist/cjs/components/remove-duplicates-dialog/index.d.ts.map +1 -1
  43. package/dist/cjs/components/remove-duplicates-dialog/index.js +5 -3
  44. package/dist/cjs/components/scenario-manager-dialog/index.d.ts.map +1 -1
  45. package/dist/cjs/components/scenario-manager-dialog/index.js +16 -11
  46. package/dist/cjs/components/solver-dialog/index.d.ts.map +1 -1
  47. package/dist/cjs/components/solver-dialog/index.js +12 -10
  48. package/dist/cjs/components/sort-range-dialog/index.d.ts.map +1 -1
  49. package/dist/cjs/components/sort-range-dialog/index.js +13 -9
  50. package/dist/cjs/components/sparkline-dialog/index.d.ts.map +1 -1
  51. package/dist/cjs/components/sparkline-dialog/index.js +4 -2
  52. package/dist/cjs/components/subtotal-dialog/index.d.ts.map +1 -1
  53. package/dist/cjs/components/subtotal-dialog/index.js +6 -5
  54. package/dist/cjs/components/text-to-columns-dialog/index.d.ts.map +1 -1
  55. package/dist/cjs/components/text-to-columns-dialog/index.js +5 -4
  56. package/dist/cjs/hooks/use-editable.d.ts +10 -3
  57. package/dist/cjs/hooks/use-editable.d.ts.map +1 -1
  58. package/dist/cjs/hooks/use-editable.js +72 -8
  59. package/dist/cjs/hooks/use-editor-change.d.ts +7 -3
  60. package/dist/cjs/hooks/use-editor-change.d.ts.map +1 -1
  61. package/dist/cjs/hooks/use-editor-change.js +12 -14
  62. package/dist/cjs/hooks/use-editor-submit.d.ts +10 -3
  63. package/dist/cjs/hooks/use-editor-submit.d.ts.map +1 -1
  64. package/dist/cjs/hooks/use-editor-submit.js +19 -6
  65. package/dist/cjs/hooks/use-selection.d.ts.map +1 -1
  66. package/dist/cjs/hooks/use-selection.js +2 -2
  67. package/dist/cjs/release-date.js +1 -1
  68. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  69. package/dist/esm/api/entry-selections.d.ts +91 -0
  70. package/dist/esm/api/entry-selections.d.ts.map +1 -0
  71. package/dist/esm/api/entry-selections.js +98 -0
  72. package/dist/esm/atoms/cell-input-context.atom.d.ts.map +1 -1
  73. package/dist/esm/atoms/entry-selections.atom.d.ts +11 -0
  74. package/dist/esm/atoms/entry-selections.atom.d.ts.map +1 -0
  75. package/dist/esm/atoms/entry-selections.atom.js +8 -0
  76. package/dist/esm/components/advanced-filter-dialog/index.d.ts.map +1 -1
  77. package/dist/esm/components/advanced-filter-dialog/index.js +7 -7
  78. package/dist/esm/components/calculation-options-dialog/index.d.ts.map +1 -1
  79. package/dist/esm/components/calculation-options-dialog/index.js +4 -4
  80. package/dist/esm/components/canvas-grid/index.d.ts.map +1 -1
  81. package/dist/esm/components/canvas-grid/index.js +208 -42
  82. package/dist/esm/components/canvas-grid/typings.d.ts +12 -0
  83. package/dist/esm/components/canvas-grid/typings.d.ts.map +1 -1
  84. package/dist/esm/components/cell-input/formula-bar-cell-input.d.ts.map +1 -1
  85. package/dist/esm/components/cell-input/formula-bar-cell-input.js +9 -3
  86. package/dist/esm/components/consolidate-dialog/index.d.ts.map +1 -1
  87. package/dist/esm/components/consolidate-dialog/index.js +13 -9
  88. package/dist/esm/components/data-table-dialog/index.d.ts.map +1 -1
  89. package/dist/esm/components/data-table-dialog/index.js +3 -3
  90. package/dist/esm/components/evaluate-formula-dialog/index.d.ts.map +1 -1
  91. package/dist/esm/components/evaluate-formula-dialog/index.js +7 -3
  92. package/dist/esm/components/fill-series-dialog/index.d.ts.map +1 -1
  93. package/dist/esm/components/fill-series-dialog/index.js +23 -7
  94. package/dist/esm/components/forecast-sheet-dialog/index.d.ts.map +1 -1
  95. package/dist/esm/components/forecast-sheet-dialog/index.js +5 -5
  96. package/dist/esm/components/go-to-dialog/index.d.ts.map +1 -1
  97. package/dist/esm/components/go-to-dialog/index.js +20 -7
  98. package/dist/esm/components/goal-seek-dialog/index.d.ts.map +1 -1
  99. package/dist/esm/components/goal-seek-dialog/index.js +6 -6
  100. package/dist/esm/components/insert-cells-dialog/index.d.ts.map +1 -1
  101. package/dist/esm/components/insert-cells-dialog/index.js +10 -10
  102. package/dist/esm/components/move-chart-dialog/index.d.ts.map +1 -1
  103. package/dist/esm/components/move-chart-dialog/index.js +5 -3
  104. package/dist/esm/components/outline-settings-dialog/index.d.ts.map +1 -1
  105. package/dist/esm/components/outline-settings-dialog/index.js +8 -6
  106. package/dist/esm/components/paste-special-dialog/index.d.ts.map +1 -1
  107. package/dist/esm/components/paste-special-dialog/index.js +23 -21
  108. package/dist/esm/components/protect-sheet-dialog/index.d.ts.map +1 -1
  109. package/dist/esm/components/protect-sheet-dialog/index.js +5 -4
  110. package/dist/esm/components/remove-duplicates-dialog/index.d.ts.map +1 -1
  111. package/dist/esm/components/remove-duplicates-dialog/index.js +6 -4
  112. package/dist/esm/components/scenario-manager-dialog/index.d.ts.map +1 -1
  113. package/dist/esm/components/scenario-manager-dialog/index.js +17 -12
  114. package/dist/esm/components/solver-dialog/index.d.ts.map +1 -1
  115. package/dist/esm/components/solver-dialog/index.js +13 -11
  116. package/dist/esm/components/sort-range-dialog/index.d.ts.map +1 -1
  117. package/dist/esm/components/sort-range-dialog/index.js +14 -10
  118. package/dist/esm/components/sparkline-dialog/index.d.ts.map +1 -1
  119. package/dist/esm/components/sparkline-dialog/index.js +5 -3
  120. package/dist/esm/components/subtotal-dialog/index.d.ts.map +1 -1
  121. package/dist/esm/components/subtotal-dialog/index.js +7 -6
  122. package/dist/esm/components/text-to-columns-dialog/index.d.ts.map +1 -1
  123. package/dist/esm/components/text-to-columns-dialog/index.js +6 -5
  124. package/dist/esm/hooks/use-editable.d.ts +10 -3
  125. package/dist/esm/hooks/use-editable.d.ts.map +1 -1
  126. package/dist/esm/hooks/use-editable.js +69 -5
  127. package/dist/esm/hooks/use-editor-change.d.ts +7 -3
  128. package/dist/esm/hooks/use-editor-change.d.ts.map +1 -1
  129. package/dist/esm/hooks/use-editor-change.js +10 -12
  130. package/dist/esm/hooks/use-editor-submit.d.ts +10 -3
  131. package/dist/esm/hooks/use-editor-submit.d.ts.map +1 -1
  132. package/dist/esm/hooks/use-editor-submit.js +19 -4
  133. package/dist/esm/hooks/use-selection.d.ts.map +1 -1
  134. package/dist/esm/hooks/use-selection.js +2 -2
  135. package/dist/esm/release-date.js +1 -1
  136. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  137. package/package.json +3 -3
@@ -7,7 +7,7 @@ import { useEditingCellCoordinate } from "../../atoms/editing-cell.atom";
7
7
  import { useFormulaLocale } from "../../atoms/sheet-context.atom";
8
8
  import { useCellEditorInstance, useFormulabarEditorValue, useFormulaBarTextFormatRuns, useSetFormulaBarEditorInstance, } from "../../atoms/formula-bar-editor-value.atom";
9
9
  import { useMergeRefs } from "../../hooks/use-merge.refs";
10
- import { isArrayFormulaCommit } from "../cell-editor/helpers";
10
+ import { isArrayFormulaCommit, isFillSelectionCommit, } from "../cell-editor/helpers";
11
11
  import { CellInput } from "./cell-input";
12
12
  export const FormulaBarInput = memo(({ activeCell, functionDescriptions, onKeyDown, sheetId, SuggestionsDropdown, editorClassName, rightToLeft = false, ...props }) => {
13
13
  const editorRef = useRef(null);
@@ -85,11 +85,17 @@ export const FormulaBarInput = memo(({ activeCell, functionDescriptions, onKeyDo
85
85
  if (editingCell) {
86
86
  // Ctrl+Shift+Enter / ⇧⌘Return from the bar enters an array, in place (Excel).
87
87
  const arrayFormula = isArrayFormulaCommit(e);
88
+ // Ctrl+Enter from the bar fills the selection, in place, as from the cell editor.
89
+ const fillSelection = isFillSelectionCommit(e);
88
90
  submitEditor?.(value, textFormatRuns, editingSheetId, editingCell,
89
91
  // `null`: an Enter that commits in place ("After pressing Enter, move selection" off).
90
- arrayFormula || direction === null
92
+ arrayFormula || fillSelection || direction === null
91
93
  ? undefined
92
- : getNextFocusableCell?.(editingSheetId, editingCell, direction), undefined, arrayFormula ? { arrayFormula: true } : undefined);
94
+ : getNextFocusableCell?.(editingSheetId, editingCell, direction), undefined, arrayFormula
95
+ ? { arrayFormula: true }
96
+ : fillSelection
97
+ ? { fillSelection: true }
98
+ : undefined);
93
99
  }
94
100
  returnFocusToSheet();
95
101
  }, [
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/consolidate-dialog/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAGtE,OAAO,EACL,KAAK,wBAAwB,EAG9B,MAAM,qCAAqC,CAAC;AAI7C,YAAY,EAAE,wBAAwB,EAAE,CAAC;AAEzC,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2DAA2D;IAC3D,gBAAgB,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACzC,+EAA+E;IAC/E,OAAO,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAAC;CAClD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,mGAOzB,sBAAsB,uBAyN1B,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;CAejC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/consolidate-dialog/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAGtE,OAAO,EACL,KAAK,wBAAwB,EAG9B,MAAM,qCAAqC,CAAC;AAI7C,YAAY,EAAE,wBAAwB,EAAE,CAAC;AAEzC,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2DAA2D;IAC3D,gBAAgB,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACzC,+EAA+E;IAC/E,OAAO,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAAC;CAClD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,mGAOzB,sBAAsB,uBA2N1B,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;CAejC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Cross1Icon } from "@rowsncolumns/icons";
2
- import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
2
+ import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
3
3
  import React, { memo, useCallback, useEffect, useState } from "react";
4
4
  import { useFocusSheet } from "../../atoms";
5
5
  import { useConsolidateDialogState, useRegisterConsolidateDialogHost, } from "../../atoms/consolidate-dialog.atom";
@@ -82,10 +82,11 @@ export const ConsolidateDialog = memo(({ open, onOpenChange, initialReference =
82
82
  React.createElement(Cross1Icon, null)),
83
83
  React.createElement(DialogBody, { className: "flex flex-col gap-3 font-system text-sm" },
84
84
  React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
85
- "Function:",
85
+ React.createElement(AccessKeyLabel, { accessKey: "f" }, "Function:"),
86
86
  React.createElement("select", { className: "h-8 rounded border border-rnc-border bg-transparent px-2 text-sm", "aria-label": "Function", value: fn, onChange: (e) => setFn(e.target.value) }, SUBTOTAL_FUNCTIONS.map((name) => (React.createElement("option", { key: name, value: name }, SUBTOTAL_FUNCTION_LABELS[name]))))),
87
87
  React.createElement("div", { className: "flex flex-col gap-1" },
88
- React.createElement("label", { className: "text-xs font-medium", htmlFor: "rnc-consolidate-reference" }, "Reference:"),
88
+ React.createElement("label", { className: "text-xs font-medium", htmlFor: "rnc-consolidate-reference" },
89
+ React.createElement(AccessKeyLabel, { accessKey: "r" }, "Reference:")),
89
90
  React.createElement("div", { className: "flex gap-2" },
90
91
  React.createElement(Input, { id: "rnc-consolidate-reference", className: "flex-1", value: reference, "aria-invalid": error ? true : undefined, "aria-describedby": error ? "rnc-consolidate-error" : undefined, onChange: (e) => setReference(e.target.value), onKeyDown: (e) => {
91
92
  if (e.key === "Enter") {
@@ -93,24 +94,27 @@ export const ConsolidateDialog = memo(({ open, onOpenChange, initialReference =
93
94
  add();
94
95
  }
95
96
  } }),
96
- React.createElement(Button, { variant: "outline", size: "sm", type: "button", onClick: add }, "Add")),
97
+ React.createElement(Button, { variant: "outline", size: "sm", type: "button", onClick: add },
98
+ React.createElement(AccessKeyLabel, { accessKey: "a" }, "Add"))),
97
99
  error ? (React.createElement("span", { id: "rnc-consolidate-error", role: "alert", className: "text-xs text-rnc-destructive" }, error)) : null),
98
100
  React.createElement("div", { className: "flex flex-col gap-1" },
99
- React.createElement("label", { className: "text-xs font-medium", htmlFor: "rnc-consolidate-all" }, "All references:"),
101
+ React.createElement("label", { className: "text-xs font-medium", htmlFor: "rnc-consolidate-all" },
102
+ React.createElement(AccessKeyLabel, { accessKey: "e" }, "All references:")),
100
103
  React.createElement("div", { className: "flex gap-2" },
101
104
  React.createElement("select", { id: "rnc-consolidate-all", size: 4, className: "flex-1 rounded border border-rnc-border bg-transparent px-1 text-sm", value: selected ?? "", onChange: (e) => setSelected(e.target.value || undefined) }, references.map((r) => (React.createElement("option", { key: r, value: r }, r)))),
102
- React.createElement(Button, { variant: "outline", size: "sm", type: "button", onClick: remove, disabled: !selected }, "Delete"))),
105
+ React.createElement(Button, { variant: "outline", size: "sm", type: "button", onClick: remove, disabled: !selected },
106
+ React.createElement(AccessKeyLabel, { accessKey: "d" }, "Delete")))),
103
107
  React.createElement("fieldset", { className: "flex flex-col gap-1 border-0 p-0 m-0" },
104
108
  React.createElement("legend", { className: "text-xs font-medium" }, "Use labels in"),
105
109
  React.createElement("label", { className: "flex items-center gap-1" },
106
110
  React.createElement("input", { type: "checkbox", checked: topRow, onChange: (e) => setTopRow(e.target.checked) }),
107
- "Top row"),
111
+ React.createElement(AccessKeyLabel, { accessKey: "t" }, "Top row")),
108
112
  React.createElement("label", { className: "flex items-center gap-1" },
109
113
  React.createElement("input", { type: "checkbox", checked: leftColumn, onChange: (e) => setLeftColumn(e.target.checked) }),
110
- "Left column")),
114
+ React.createElement(AccessKeyLabel, { accessKey: "l" }, "Left column"))),
111
115
  React.createElement("label", { className: "flex items-center gap-1" },
112
116
  React.createElement("input", { type: "checkbox", checked: createLinks, onChange: (e) => setCreateLinks(e.target.checked) }),
113
- "Create links to source data"),
117
+ React.createElement(AccessKeyLabel, { accessKey: "s" }, "Create links to source data")),
114
118
  React.createElement(Separator, null),
115
119
  React.createElement("div", { className: "flex justify-end gap-2" },
116
120
  React.createElement(Button, { variant: "outline", size: "sm", type: "button", onClick: () => onOpenChange(false) }, "Close"),
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/data-table-dialog/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,+EAA+E;AAC/E,eAAO,MAAM,wBAAwB,uCAAuC,CAAC;AAE7E,MAAM,MAAM,oBAAoB,GAAG;IACjC,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC;;;;;OAKG;IACH,OAAO,CACL,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,eAAe,EAAE,MAAM,GAAG,SAAS,GAClC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG,MAAM,GAAG,SAAS,CAAC;CACrD,CAAC;AAKF;;;;GAIG;AACH,eAAO,MAAM,eAAe,8DAA0C,oBAAoB,uBAoGxF,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/data-table-dialog/index.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,+EAA+E;AAC/E,eAAO,MAAM,wBAAwB,uCAAuC,CAAC;AAE7E,MAAM,MAAM,oBAAoB,GAAG;IACjC,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC;;;;;OAKG;IACH,OAAO,CACL,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,eAAe,EAAE,MAAM,GAAG,SAAS,GAClC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG,MAAM,GAAG,SAAS,CAAC;CACrD,CAAC;AAKF;;;;GAIG;AACH,eAAO,MAAM,eAAe,8DAA0C,oBAAoB,uBAoGxF,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Cross1Icon } from "@rowsncolumns/icons";
2
- import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
2
+ import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
3
3
  import { addressToCell } from "@rowsncolumns/utils";
4
4
  import React, { memo, useCallback, useEffect, useState } from "react";
5
5
  /** Excel's refusal for an empty dialog or a reference that is not one cell. */
@@ -55,13 +55,13 @@ export const DataTableDialog = memo(({ open, onOpenChange, onApply }) => {
55
55
  React.createElement(DialogBody, { className: "flex flex-col gap-3 font-system text-sm" },
56
56
  React.createElement("form", { className: "flex flex-col gap-3", onSubmit: submit },
57
57
  React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
58
- "Row input cell:",
58
+ React.createElement(AccessKeyLabel, { accessKey: "r" }, "Row input cell:"),
59
59
  React.createElement(Input, { autoFocus: true, value: rowInput, "aria-label": "Row input cell", onChange: (e) => {
60
60
  setRowInput(e.target.value);
61
61
  setError(undefined);
62
62
  } })),
63
63
  React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
64
- "Column input cell:",
64
+ React.createElement(AccessKeyLabel, { accessKey: "c" }, "Column input cell:"),
65
65
  React.createElement(Input, { value: columnInput, "aria-label": "Column input cell", onChange: (e) => {
66
66
  setColumnInput(e.target.value);
67
67
  setError(undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/evaluate-formula-dialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EAErB,MAAM,0BAA0B,CAAC;AAWlC,OAAO,KAAsC,MAAM,OAAO,CAAC;AAQ3D,MAAM,MAAM,0BAA0B,GAAG;IACvC,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CACxD,CAAC;AAKF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,oFAO7B,0BAA0B,uBAiG9B,CAAC;AAUF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;;CAiBrC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/evaluate-formula-dialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EAErB,MAAM,0BAA0B,CAAC;AAYlC,OAAO,KAAsC,MAAM,OAAO,CAAC;AAQ3D,MAAM,MAAM,0BAA0B,GAAG;IACvC,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CACxD,CAAC;AAKF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,oFAO7B,0BAA0B,uBAqG9B,CAAC;AAUF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;;CAiBrC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { advanceFormulaEvaluation, createFormulaEvaluation, } from "@rowsncolumns/calculator";
2
- import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, Separator, } from "@rowsncolumns/ui";
2
+ import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, Separator, } from "@rowsncolumns/ui";
3
3
  import { cellToAddress, sanitizeSheetName } from "@rowsncolumns/utils";
4
4
  import React, { memo, useCallback, useState } from "react";
5
5
  import { useEvaluateFormulaDialogState, useRegisterEvaluateFormulaDialogHost, } from "../../atoms/evaluate-formula-dialog.atom";
@@ -23,7 +23,9 @@ export const EvaluateFormulaDialog = memo(({ open, onOpenChange, reference, form
23
23
  setFailure(undefined);
24
24
  }
25
25
  catch (err) {
26
- setFailure(err instanceof Error ? err.message : "The expression could not be evaluated.");
26
+ setFailure(err instanceof Error
27
+ ? err.message
28
+ : "The expression could not be evaluated.");
27
29
  }
28
30
  finally {
29
31
  setBusy(false);
@@ -58,7 +60,9 @@ export const EvaluateFormulaDialog = memo(({ open, onOpenChange, reference, form
58
60
  React.createElement(Separator, null),
59
61
  React.createElement("div", { className: "flex justify-end gap-2" },
60
62
  React.createElement(Button, { variant: "outline", size: "sm", onClick: () => onOpenChange(false) }, "Close"),
61
- state?.done ? (React.createElement(Button, { size: "sm", onClick: restart }, "Restart")) : (React.createElement(Button, { size: "sm", onClick: step, disabled: !state || busy }, "Evaluate")))))));
63
+ state?.done ? (React.createElement(Button, { size: "sm", onClick: restart },
64
+ React.createElement(AccessKeyLabel, { accessKey: "r" }, "Restart"))) : (React.createElement(Button, { size: "sm", onClick: step, disabled: !state || busy },
65
+ React.createElement(AccessKeyLabel, { accessKey: "e" }, "Evaluate"))))))));
62
66
  });
63
67
  EvaluateFormulaDialog.displayName = "EvaluateFormulaDialog";
64
68
  const referenceOf = (request) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/fill-series-dialog/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAItE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,qBAAqB,GAAG;IAClC,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,oEAAoE;IACpE,SAAS,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IACpC,oFAAoF;IACpF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC9C,CAAC;AA0BF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,uGASxB,qBAAqB,uBA+NzB,CAAC;AAIF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;CAgBhC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/fill-series-dialog/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAItE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,qBAAqB,GAAG;IAClC,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,oEAAoE;IACpE,SAAS,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IACpC,oFAAoF;IACpF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC9C,CAAC;AAsCF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,uGASxB,qBAAqB,uBAqOzB,CAAC;AAIF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;CAgBhC,CAAC"}
@@ -1,7 +1,18 @@
1
- import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
1
+ import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
2
2
  import React, { memo, useCallback, useEffect, useState } from "react";
3
3
  import { parseSeriesStopValue } from "../../api/fill-series";
4
4
  import { useFillSeriesDialogState } from "../../atoms/fill-series-dialog.atom";
5
+ /** The letters Excel's Series dialog underlines. */
6
+ const ACCESS_KEYS = {
7
+ linear: "l",
8
+ growth: "g",
9
+ date: "d",
10
+ autofill: "f",
11
+ day: "a",
12
+ weekday: "w",
13
+ month: "m",
14
+ year: "y",
15
+ };
5
16
  const SERIES_TYPES = [
6
17
  { value: "linear", label: "Linear" },
7
18
  { value: "growth", label: "Growth" },
@@ -111,7 +122,7 @@ export const FillSeriesDialog = memo(({ open, onOpenChange, initialIn, onApply,
111
122
  React.createElement("legend", { className: "text-xs font-medium pb-1" }, "Series in"),
112
123
  ["rows", "columns"].map((value) => (React.createElement("label", { key: value, className: "flex items-center gap-2 text-xs cursor-pointer" },
113
124
  React.createElement("input", { type: "radio", name: "fillSeriesIn", value: value, checked: axis === value, onChange: () => setAxis(value) }),
114
- value === "rows" ? "Rows" : "Columns")))),
125
+ value === "rows" ? (React.createElement(AccessKeyLabel, { accessKey: "r" }, "Rows")) : (React.createElement(AccessKeyLabel, { accessKey: "c" }, "Columns")))))),
115
126
  React.createElement("fieldset", { className: "flex flex-col gap-1 border-0 p-0 m-0" },
116
127
  React.createElement("legend", { className: "text-xs font-medium pb-1" }, "Type"),
117
128
  SERIES_TYPES.map(({ value, label }) => (React.createElement("label", { key: value, className: "flex items-center gap-2 text-xs cursor-pointer" },
@@ -120,24 +131,29 @@ export const FillSeriesDialog = memo(({ open, onOpenChange, initialIn, onApply,
120
131
  disabled: trendOn && (value === "date" || value === "autofill") }),
121
132
  React.createElement("span", { className: trendOn && (value === "date" || value === "autofill")
122
133
  ? "opacity-50"
123
- : "" }, label))))),
134
+ : "" },
135
+ React.createElement(AccessKeyLabel, { accessKey: ACCESS_KEYS[value] }, label)))))),
124
136
  React.createElement("fieldset", { className: "flex flex-col gap-1 border-0 p-0 m-0", disabled: type !== "date" },
125
137
  React.createElement("legend", { className: "text-xs font-medium pb-1" }, "Date unit"),
126
138
  DATE_UNITS.map(({ value, label }) => (React.createElement("label", { key: value, className: "flex items-center gap-2 text-xs cursor-pointer disabled:opacity-50" },
127
139
  React.createElement("input", { type: "radio", name: "fillSeriesDateUnit", value: value, checked: dateUnit === value, onChange: () => setDateUnit(value), disabled: type !== "date" }),
128
- React.createElement("span", { className: type !== "date" ? "opacity-50" : "" }, label)))))),
140
+ React.createElement("span", { className: type !== "date" ? "opacity-50" : "" },
141
+ React.createElement(AccessKeyLabel, { accessKey: ACCESS_KEYS[value] }, label))))))),
129
142
  React.createElement("label", { className: "flex items-center gap-2 text-xs cursor-pointer" },
130
143
  React.createElement("input", { type: "checkbox", name: "fillSeriesTrend", checked: trendOn, disabled: !trendAllowed, onChange: (e) => setTrend(e.target.checked) }),
131
- React.createElement("span", { className: !trendAllowed ? "opacity-50" : "" }, "Trend")),
144
+ React.createElement("span", { className: !trendAllowed ? "opacity-50" : "" },
145
+ React.createElement(AccessKeyLabel, { accessKey: "t" }, "Trend"))),
132
146
  React.createElement("div", { className: "grid grid-cols-2 gap-3" },
133
147
  React.createElement("label", { className: "flex flex-col gap-1 text-xs" },
134
- "Step value",
148
+ React.createElement("span", null,
149
+ React.createElement(AccessKeyLabel, { accessKey: "s" }, "Step value")),
135
150
  React.createElement(Input, { name: "fillSeriesStep", value: step, disabled: stepStopDisabled, onChange: (e) => {
136
151
  setStep(e.target.value);
137
152
  setError(undefined);
138
153
  }, inputMode: "decimal" })),
139
154
  React.createElement("label", { className: "flex flex-col gap-1 text-xs" },
140
- "Stop value",
155
+ React.createElement("span", null,
156
+ React.createElement(AccessKeyLabel, { accessKey: "o" }, "Stop value")),
141
157
  React.createElement(Input, { name: "fillSeriesStop", value: stop, disabled: stepStopDisabled, onChange: (e) => {
142
158
  setStop(e.target.value);
143
159
  setError(undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/forecast-sheet-dialog/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAiD,MAAM,OAAO,CAAC;A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AAoB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG,MAAM,GAAG,SAAS,CAAC;CAC3F,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,mFACyB,wBAAwB,uBA6HhF,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Cross1Icon } from "@rowsncolumns/icons";
2
- import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
2
+ import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
3
3
  import React, { memo, useCallback, useEffect, useState } from "react";
4
4
  /**
5
5
  * Excel's Create Forecast Worksheet dialog: Line or Column chart, Forecast
@@ -57,22 +57,22 @@ export const ForecastSheetDialog = memo(({ open, onOpenChange, initialForecastEn
57
57
  React.createElement("input", { type: "radio", checked: chartType === t, onChange: () => setChartType(t) }),
58
58
  t === "line" ? "Line chart" : "Column chart")))),
59
59
  React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
60
- "Forecast End:",
60
+ React.createElement(AccessKeyLabel, { accessKey: "e" }, "Forecast End:"),
61
61
  React.createElement(Input, { autoFocus: true, "aria-label": "Forecast End", value: end, onChange: (e) => setEnd(e.target.value) })),
62
62
  React.createElement("div", { className: "flex items-center gap-2 text-xs" },
63
63
  React.createElement("label", { className: "flex items-center gap-2" },
64
64
  React.createElement("input", { type: "checkbox", checked: withInterval, onChange: (e) => setWithInterval(e.target.checked) }),
65
- "Confidence Interval"),
65
+ React.createElement(AccessKeyLabel, { accessKey: "c" }, "Confidence Interval")),
66
66
  React.createElement(Input, { className: "w-16", "aria-label": "Confidence Interval (%)", value: interval, disabled: !withInterval, onChange: (e) => setInterval(e.target.value) }),
67
67
  "%"),
68
68
  React.createElement("div", { className: "flex flex-col gap-1 text-xs" },
69
69
  "Seasonality",
70
70
  React.createElement("label", { className: "flex items-center gap-2" },
71
71
  React.createElement("input", { type: "radio", checked: autoSeason, onChange: () => setAutoSeason(true) }),
72
- "Detect Automatically"),
72
+ React.createElement(AccessKeyLabel, { accessKey: "a" }, "Detect Automatically")),
73
73
  React.createElement("label", { className: "flex items-center gap-2" },
74
74
  React.createElement("input", { type: "radio", checked: !autoSeason, onChange: () => setAutoSeason(false) }),
75
- "Set Manually",
75
+ React.createElement(AccessKeyLabel, { accessKey: "m" }, "Set Manually"),
76
76
  React.createElement(Input, { className: "w-16", "aria-label": "Season length", value: season, disabled: autoSeason, onChange: (e) => setSeason(e.target.value) }))),
77
77
  error ? (React.createElement("div", { role: "alert", className: "text-xs text-rnc-destructive" }, error)) : null,
78
78
  React.createElement(Separator, null),
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/go-to-dialog/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG;IAC5B,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,gFAAgF;IAChF,WAAW,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAClC,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IACnD,uEAAuE;IACvE,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,IAAI,EAAE,e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A+B1B,CAAC"}
@@ -1,9 +1,18 @@
1
- import { Button, cn, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
1
+ import { AccessKeyLabel, Button, cn, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
2
2
  import { cellToAddress } from "@rowsncolumns/utils";
3
3
  import React, { memo, useCallback, useState } from "react";
4
4
  import { resolveGoToReference } from "../../api/go-to";
5
5
  import { GO_TO_SPECIAL_OPTIONS, } from "../../api/go-to-special";
6
6
  import { useGoToDialogState, useRegisterGoToDialogHost, } from "../../atoms/go-to-dialog.atom";
7
+ /** The letters Excel's Go To Special underlines. */
8
+ const GO_TO_SPECIAL_ACCESS_KEYS = {
9
+ notes: "n",
10
+ constants: "o",
11
+ formulas: "f",
12
+ errors: "e",
13
+ blanks: "k",
14
+ visible: "y",
15
+ };
7
16
  const INVALID_REFERENCE = "Reference is not valid.";
8
17
  const NO_CELLS_FOUND = "No cells were found.";
9
18
  /**
@@ -53,14 +62,15 @@ export const GoToDialog = memo(({ open, onOpenChange, namedRanges, currentAddres
53
62
  setSpecialKind(kind);
54
63
  setError(undefined);
55
64
  } }),
56
- label)))),
65
+ React.createElement(AccessKeyLabel, { accessKey: GO_TO_SPECIAL_ACCESS_KEYS[kind] }, label))))),
57
66
  error ? (React.createElement("div", { role: "alert", className: "text-xs text-rnc-destructive" }, error)) : null,
58
67
  React.createElement(Separator, null),
59
68
  React.createElement("div", { className: "flex justify-between gap-2" },
60
69
  React.createElement(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => {
61
70
  setShowSpecial(false);
62
71
  setError(undefined);
63
- } }, "Back"),
72
+ } },
73
+ React.createElement(AccessKeyLabel, { accessKey: "b" }, "Back")),
64
74
  React.createElement("div", { className: "flex gap-2" },
65
75
  React.createElement(Button, { type: "button", variant: "outline", size: "sm", onClick: () => onOpenChange(false) }, "Cancel"),
66
76
  React.createElement(Button, { type: "submit", size: "sm" }, "OK"))))) : (React.createElement("form", { className: "flex flex-col gap-3", onSubmit: (e) => {
@@ -68,13 +78,15 @@ export const GoToDialog = memo(({ open, onOpenChange, namedRanges, currentAddres
68
78
  navigate(reference);
69
79
  } },
70
80
  React.createElement("div", { className: "flex flex-col gap-1" },
71
- React.createElement("span", { className: "text-xs font-medium" }, "Go to:"),
72
- React.createElement("div", { role: "listbox", "aria-label": "Defined names", className: "h-[140px] overflow-auto rounded border border-rnc-border text-xs" }, names.length === 0 ? (React.createElement("div", { className: "px-2 py-1.5 text-rnc-foreground/60" }, "No defined names")) : (names.map((range) => (React.createElement("div", { key: String(range.namedRangeId), role: "option", "aria-selected": reference === range.name, className: cn("px-2 py-1 cursor-default select-none hover:bg-rnc-accent", reference === range.name && "bg-rnc-accent"), onClick: () => {
81
+ React.createElement("span", { id: "rnc-go-to-names-label", className: "text-xs font-medium" },
82
+ React.createElement(AccessKeyLabel, { accessKey: "g" }, "Go to:")),
83
+ React.createElement("div", { role: "listbox", tabIndex: 0, "aria-labelledby": "rnc-go-to-names-label", className: "h-[140px] overflow-auto rounded border border-rnc-border text-xs" }, names.length === 0 ? (React.createElement("div", { className: "px-2 py-1.5 text-rnc-foreground/60" }, "No defined names")) : (names.map((range) => (React.createElement("div", { key: String(range.namedRangeId), role: "option", "aria-selected": reference === range.name, className: cn("px-2 py-1 cursor-default select-none hover:bg-rnc-accent", reference === range.name && "bg-rnc-accent"), onClick: () => {
73
84
  setReference(range.name);
74
85
  setError(undefined);
75
86
  }, onDoubleClick: () => navigate(range.name) }, range.name)))))),
76
87
  React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
77
- "Reference:",
88
+ React.createElement("span", null,
89
+ React.createElement(AccessKeyLabel, { accessKey: "r" }, "Reference:")),
78
90
  React.createElement(Input, { autoFocus: true, value: reference, placeholder: currentAddress, "aria-invalid": error ? true : undefined, onChange: (e) => {
79
91
  setReference(e.target.value);
80
92
  setError(undefined);
@@ -85,7 +97,8 @@ export const GoToDialog = memo(({ open, onOpenChange, namedRanges, currentAddres
85
97
  special ? (React.createElement(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => {
86
98
  setShowSpecial(true);
87
99
  setError(undefined);
88
- } }, "Special\u2026")) : (React.createElement("span", null)),
100
+ } },
101
+ React.createElement(AccessKeyLabel, { accessKey: "s" }, "Special\u2026"))) : (React.createElement("span", null)),
89
102
  React.createElement("div", { className: "flex gap-2" },
90
103
  React.createElement(Button, { type: "button", variant: "outline", size: "sm", onClick: () => onOpenChange(false) }, "Cancel"),
91
104
  React.createElement(Button, { type: "submit", size: "sm", disabled: !reference.trim() }, "OK")))))))));
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/goal-seek-dialog/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAM/E,OAAO,KAAK,EAEV,cAAc,EACd,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,mBAAmB,GAAG;IAChC,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,4DAA4D;IAC5D,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,OAAO,CACL,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC;IACvC,mEAAmE;IACnE,QAAQ,CAAC,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtD,CAAC;AAKF,qDAAqD;AACrD,eAAO,MAAM,kBAAkB,GAC7B,SAAS,MAAM,EACf,QAAQ,cAAc,GAAG,SAAS,KACjC,MAKF,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,wBAAwB,GAAI,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ClC,aAAa,MAAM,EACnB,SAAS,qBAAqB,KAC7B,MASF,CAAC;AAUF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,wFACmC,mBAAmB,uBA0ShF,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;CAqB9B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Cross1Icon } from "@rowsncolumns/icons";
2
- import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
2
+ import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
3
3
  import { addressToCell } from "@rowsncolumns/utils";
4
4
  import React, { memo, useCallback, useEffect, useMemo, useState } from "react";
5
5
  import { useGoalSeekDialogState, useRegisterGoalSeekDialogHost, } from "../../atoms/goal-seek-dialog.atom";
@@ -166,13 +166,13 @@ export const GoalSeekDialog = memo(({ open, onOpenChange, initialSetCell, onAppl
166
166
  React.createElement(Cross1Icon, null)),
167
167
  React.createElement(DialogBody, { className: "flex flex-col gap-3 font-system text-sm" }, outcome ? (React.createElement("div", { className: "flex flex-col gap-2", role: "status" }, renderStatus(outcome))) : (React.createElement("form", { className: "flex flex-col gap-3", onSubmit: submit },
168
168
  React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
169
- "Set cell:",
169
+ React.createElement(AccessKeyLabel, { accessKey: "e" }, "Set cell:"),
170
170
  React.createElement(Input, { autoFocus: true, value: setCell, "aria-label": "Set cell", onChange: (e) => {
171
171
  setSetCell(e.target.value);
172
172
  setError(undefined);
173
173
  } })),
174
174
  React.createElement("div", { className: "flex flex-col gap-1 text-xs font-medium" },
175
- "To value:",
175
+ React.createElement(AccessKeyLabel, { accessKey: "v" }, "To value:"),
176
176
  React.createElement("div", { className: "flex gap-2" },
177
177
  React.createElement("select", { className: "h-8 rounded border border-rnc-border bg-transparent px-2 text-sm", value: mode, "aria-label": "Target", onChange: (e) => setMode(e.target.value) }, Object.keys(MODE_LABELS).map((key) => (React.createElement("option", { key: key, value: key }, MODE_LABELS[key])))),
178
178
  React.createElement(Input, { value: target, "aria-label": "To value", inputMode: "decimal", onChange: (e) => {
@@ -180,16 +180,16 @@ export const GoalSeekDialog = memo(({ open, onOpenChange, initialSetCell, onAppl
180
180
  setError(undefined);
181
181
  } }))),
182
182
  React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
183
- "By changing cell:",
183
+ React.createElement(AccessKeyLabel, { accessKey: "c" }, "By changing cell:"),
184
184
  React.createElement(Input, { value: changingCell, "aria-label": "By changing cell", onChange: (e) => {
185
185
  setChangingCell(e.target.value);
186
186
  setError(undefined);
187
187
  } })),
188
188
  React.createElement("label", { className: "flex items-center gap-2 text-xs" },
189
189
  React.createElement("input", { type: "checkbox", checked: round, onChange: (e) => setRound(e.target.checked) }),
190
- "Round to a natural number"),
190
+ React.createElement(AccessKeyLabel, { accessKey: "n" }, "Round to a natural number")),
191
191
  beyondExcel ? (React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
192
- "Within:",
192
+ React.createElement(AccessKeyLabel, { accessKey: "w" }, "Within:"),
193
193
  React.createElement(Input, { value: tolerance, "aria-label": "Within", inputMode: "decimal", placeholder: "1% of the target", onChange: (e) => {
194
194
  setTolerance(e.target.value);
195
195
  setError(undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/insert-cells-dialog/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAoBnC,MAAM,MAAM,sBAAsB,GAC9B;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC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;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;CAyBjC,CAAC"}
@@ -1,17 +1,17 @@
1
- import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, Separator, } from "@rowsncolumns/ui";
1
+ import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, Separator, } from "@rowsncolumns/ui";
2
2
  import React, { memo, useCallback, useEffect, useState } from "react";
3
3
  import { useInsertCellsDialogState, useRegisterInsertCellsDialogHost, } from "../../atoms/insert-cells-dialog.atom";
4
4
  const INSERT_CHOICES = [
5
- { value: "shift-right", label: "Shift cells right" },
6
- { value: "shift-down", label: "Shift cells down" },
7
- { value: "entire-row", label: "Entire row" },
8
- { value: "entire-column", label: "Entire column" },
5
+ { value: "shift-right", label: "Shift cells right", accessKey: "i" },
6
+ { value: "shift-down", label: "Shift cells down", accessKey: "d" },
7
+ { value: "entire-row", label: "Entire row", accessKey: "r" },
8
+ { value: "entire-column", label: "Entire column", accessKey: "c" },
9
9
  ];
10
10
  const DELETE_CHOICES = [
11
- { value: "shift-left", label: "Shift cells left" },
12
- { value: "shift-up", label: "Shift cells up" },
13
- { value: "entire-row", label: "Entire row" },
14
- { value: "entire-column", label: "Entire column" },
11
+ { value: "shift-left", label: "Shift cells left", accessKey: "l" },
12
+ { value: "shift-up", label: "Shift cells up", accessKey: "u" },
13
+ { value: "entire-row", label: "Entire row", accessKey: "r" },
14
+ { value: "entire-column", label: "Entire column", accessKey: "c" },
15
15
  ];
16
16
  /**
17
17
  * Excel's Insert / Delete cells dialog (right-click a cell → "Insert…" /
@@ -51,7 +51,7 @@ export const InsertCellsDialog = memo((props) => {
51
51
  React.createElement("legend", { className: "text-xs font-medium mb-1" }, title),
52
52
  choices.map((entry) => (React.createElement("label", { key: entry.value, className: "flex items-center gap-2 text-xs py-0.5 cursor-pointer" },
53
53
  React.createElement("input", { type: "radio", name: `${mode}-cells-choice`, value: entry.value, checked: choice === entry.value, onChange: () => setChoice(entry.value) }),
54
- entry.label)))),
54
+ React.createElement(AccessKeyLabel, { accessKey: entry.accessKey }, entry.label))))),
55
55
  React.createElement(Separator, null),
56
56
  React.createElement("div", { className: "flex justify-end gap-2" },
57
57
  React.createElement(Button, { type: "button", variant: "outline", size: "sm", onClick: () => onOpenChange(false) }, "Cancel"),
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/move-chart-dialog/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAO3D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzE,MAAM,MAAM,oBAAoB,GAAG;IACjC,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,yEAAyE;IACzE,KAAK,EAAE,aAAa,CAAC;IACrB,wFAAwF;IACxF,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;CACzC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,8EACwB,oBAAoB,uBAgIvE,CAAC;AAIF,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,iFAAiF;IACjF,kBAAkB,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC;CAC5E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;sCAG7B,wBAAwB;;CAiB1B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/move-chart-dialog/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAO3D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzE,MAAM,MAAM,oBAAoB,GAAG;IACjC,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,yEAAyE;IACzE,KAAK,EAAE,aAAa,CAAC;IACrB,wFAAwF;IACxF,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;CACzC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,8EACwB,oBAAoB,uBAgIvE,CAAC;AAIF,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,iFAAiF;IACjF,kBAAkB,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC;CAC5E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;sCAG7B,wBAAwB;;CAiB1B,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, Separator, } from "@rowsncolumns/ui";
1
+ import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, Separator, } from "@rowsncolumns/ui";
2
2
  import React, { memo, useCallback, useState } from "react";
3
3
  import { getNextChartSheetTitle } from "../../api/chart-sheet";
4
4
  import { useMoveChartDialogState, useRegisterMoveChartDialogHost, } from "../../atoms/move-chart-dialog.atom";
@@ -56,11 +56,13 @@ export const MoveChartDialog = memo(({ open, onOpenChange, chart, sheets, onSubm
56
56
  React.createElement("legend", { className: "text-xs font-medium mb-1" }, "Choose where you want the chart to be placed:"),
57
57
  React.createElement("label", { className: "flex items-center gap-2 text-xs py-0.5 cursor-pointer" },
58
58
  React.createElement("input", { type: "radio", name: "move-chart-target", value: "newSheet", checked: mode === "newSheet", onChange: () => setMode("newSheet") }),
59
- React.createElement("span", { className: "w-20 shrink-0" }, "New sheet:"),
59
+ React.createElement("span", { className: "w-20 shrink-0" },
60
+ React.createElement(AccessKeyLabel, { accessKey: "s" }, "New sheet:")),
60
61
  React.createElement("input", { type: "text", "aria-label": "New sheet name", className: "flex-1 min-w-0 rounded border border-rnc-border bg-transparent px-2 py-1 text-xs", value: title, disabled: mode !== "newSheet", onChange: (e) => setTitle(e.target.value), onFocus: () => setMode("newSheet") })),
61
62
  React.createElement("label", { className: "flex items-center gap-2 text-xs py-0.5 cursor-pointer" },
62
63
  React.createElement("input", { type: "radio", name: "move-chart-target", value: "sheet", checked: mode === "sheet", disabled: worksheets.length === 0, onChange: () => setMode("sheet") }),
63
- React.createElement("span", { className: "w-20 shrink-0" }, "Object in:"),
64
+ React.createElement("span", { className: "w-20 shrink-0" },
65
+ React.createElement(AccessKeyLabel, { accessKey: "o" }, "Object in:")),
64
66
  React.createElement("select", { "aria-label": "Object in sheet", className: "flex-1 min-w-0 rounded border border-rnc-border bg-transparent px-2 py-1 text-xs", value: targetSheetId ?? "", disabled: mode !== "sheet" || worksheets.length === 0, onChange: (e) => setTargetSheetId(Number(e.target.value)) }, worksheets.map((sheet) => (React.createElement("option", { key: sheet.sheetId, value: sheet.sheetId }, sheet.title)))))),
65
67
  React.createElement(Separator, null),
66
68
  React.createElement("div", { className: "flex justify-end gap-2" },
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/outline-settings-dialog/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAGtE,OAAO,EACL,KAAK,sBAAsB,EAG5B,MAAM,0CAA0C,CAAC;AAElD,YAAY,EAAE,sBAAsB,EAAE,CAAC;AAEvC,eAAO,MAAM,wBAAwB,EAAE,sBAItC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,OAAO,CAAC,QAAQ,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAChD,sCAAsC;IACtC,QAAQ,CAAC,CAAC,QAAQ,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAClD,4CAA4C;IAC5C,aAAa,CAAC,CAAC,QAAQ,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACxD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,kGAQ7B,0BAA0B,uBAqG9B,CAAC;AAIF,sFAAsF;AACtF,eAAO,MAAM,yBAAyB;;;CAwBrC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/outline-settings-dialog/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAGtE,OAAO,EACL,KAAK,sBAAsB,EAG5B,MAAM,0CAA0C,CAAC;AAElD,YAAY,EAAE,sBAAsB,EAAE,CAAC;AAEvC,eAAO,MAAM,wBAAwB,EAAE,sBAItC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,OAAO,CAAC,QAAQ,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAChD,sCAAsC;IACtC,QAAQ,CAAC,CAAC,QAAQ,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAClD,4CAA4C;IAC5C,aAAa,CAAC,CAAC,QAAQ,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACxD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,kGAQ7B,0BAA0B,uBAyG9B,CAAC;AAIF,sFAAsF;AACtF,eAAO,MAAM,yBAAyB;;;CAwBrC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Cross1Icon } from "@rowsncolumns/icons";
2
- import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Separator, } from "@rowsncolumns/ui";
2
+ import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Separator, } from "@rowsncolumns/ui";
3
3
  import React, { memo, useCallback, useEffect, useState } from "react";
4
4
  import { useFocusSheet } from "../../atoms";
5
5
  import { useOutlineSettingsDialogState, useRegisterOutlineSettingsDialogHost, } from "../../atoms/outline-settings-dialog.atom";
@@ -41,17 +41,19 @@ export const OutlineSettingsDialog = memo(({ open, onOpenChange, settings = DEFA
41
41
  React.createElement("legend", { className: "text-xs font-medium" }, "Direction"),
42
42
  React.createElement("label", { className: "flex items-center gap-1" },
43
43
  React.createElement("input", { type: "checkbox", checked: choices.summaryBelow, onChange: (e) => toggle("summaryBelow")(e.target.checked) }),
44
- "Summary rows below detail"),
44
+ React.createElement(AccessKeyLabel, { accessKey: "r" }, "Summary rows below detail")),
45
45
  React.createElement("label", { className: "flex items-center gap-1" },
46
46
  React.createElement("input", { type: "checkbox", checked: choices.summaryRight, onChange: (e) => toggle("summaryRight")(e.target.checked) }),
47
- "Summary columns to right of detail")),
47
+ React.createElement(AccessKeyLabel, { accessKey: "c" }, "Summary columns to right of detail"))),
48
48
  React.createElement("label", { className: "flex items-center gap-1" },
49
49
  React.createElement("input", { type: "checkbox", checked: choices.applyStyles, onChange: (e) => toggle("applyStyles")(e.target.checked) }),
50
- "Automatic styles"),
50
+ React.createElement(AccessKeyLabel, { accessKey: "a" }, "Automatic styles")),
51
51
  React.createElement(Separator, null),
52
52
  React.createElement("div", { className: "flex flex-wrap justify-end gap-2" },
53
- onCreate ? (React.createElement(Button, { variant: "outline", size: "sm", type: "button", onClick: () => run(onCreate) }, "Create")) : null,
54
- onApplyStyles ? (React.createElement(Button, { variant: "outline", size: "sm", type: "button", onClick: () => run(onApplyStyles) }, "Apply Styles")) : null,
53
+ onCreate ? (React.createElement(Button, { variant: "outline", size: "sm", type: "button", onClick: () => run(onCreate) },
54
+ React.createElement(AccessKeyLabel, { accessKey: "e" }, "Create"))) : null,
55
+ onApplyStyles ? (React.createElement(Button, { variant: "outline", size: "sm", type: "button", onClick: () => run(onApplyStyles) },
56
+ React.createElement(AccessKeyLabel, { accessKey: "s" }, "Apply Styles"))) : null,
55
57
  React.createElement(Button, { variant: "outline", size: "sm", type: "button", onClick: () => onOpenChange(false) }, "Cancel"),
56
58
  React.createElement(Button, { size: "sm", type: "button", onClick: () => run(onApply) }, "OK"))))));
57
59
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/paste-special-dialog/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAM3D,OAAO,KAAK,EAGV,mBAAmB,EACpB,MAAM,gCAAgC,CAAC;AA+CxC,MAAM,MAAM,uBAAuB,GAAG;IACpC,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC;;;OAGG;IACH,OAAO,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;CAC7C,CAAC;AAoEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,8DACK,uBAAuB,uBAsG1D,CAAC;AAIF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;CAclC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/paste-special-dialog/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAM3D,OAAO,KAAK,EAGV,mBAAmB,EACpB,MAAM,gCAAgC,CAAC;AAmDxC,MAAM,MAAM,uBAAuB,GAAG;IACpC,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC;;;OAGG;IACH,OAAO,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;CAC7C,CAAC;AAoEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,8DACK,uBAAuB,uBAsG1D,CAAC;AAIF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;CAclC,CAAC"}