@rowsncolumns/spreadsheet 10.2.74 → 10.2.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/excel-validation-kinds.d.ts +71 -0
- package/dist/cjs/api/excel-validation-kinds.d.ts.map +1 -0
- package/dist/cjs/api/excel-validation-kinds.js +304 -0
- package/dist/cjs/api/go-to-special.d.ts +32 -0
- package/dist/cjs/api/go-to-special.d.ts.map +1 -0
- package/dist/cjs/api/go-to-special.js +111 -0
- package/dist/cjs/api/validation-tooltip.d.ts +17 -0
- package/dist/cjs/api/validation-tooltip.d.ts.map +1 -0
- package/dist/cjs/api/validation-tooltip.js +42 -0
- package/dist/cjs/atoms/advanced-filter-dialog.atom.d.ts +28 -0
- package/dist/cjs/atoms/advanced-filter-dialog.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/advanced-filter-dialog.atom.js +32 -0
- package/dist/cjs/atoms/go-to-dialog.atom.d.ts +11 -1
- package/dist/cjs/atoms/go-to-dialog.atom.d.ts.map +1 -1
- package/dist/cjs/atoms/goal-seek-dialog.atom.d.ts +29 -0
- package/dist/cjs/atoms/goal-seek-dialog.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/goal-seek-dialog.atom.js +30 -0
- package/dist/cjs/atoms/index.d.ts +1 -0
- package/dist/cjs/atoms/index.d.ts.map +1 -1
- package/dist/cjs/atoms/index.js +1 -0
- package/dist/cjs/atoms/subtotal-dialog.atom.d.ts +39 -0
- package/dist/cjs/atoms/subtotal-dialog.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/subtotal-dialog.atom.js +30 -0
- package/dist/cjs/atoms/text-to-columns-dialog.atom.d.ts +34 -0
- package/dist/cjs/atoms/text-to-columns-dialog.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/text-to-columns-dialog.atom.js +36 -0
- package/dist/cjs/atoms/watch-window.atom.d.ts +37 -0
- package/dist/cjs/atoms/watch-window.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/watch-window.atom.js +61 -0
- package/dist/cjs/components/advanced-filter-dialog/index.d.ts +28 -0
- package/dist/cjs/components/advanced-filter-dialog/index.d.ts.map +1 -0
- package/dist/cjs/components/advanced-filter-dialog/index.js +134 -0
- package/dist/cjs/components/calculation-options-dialog/index.d.ts +33 -0
- package/dist/cjs/components/calculation-options-dialog/index.d.ts.map +1 -0
- package/dist/cjs/components/calculation-options-dialog/index.js +69 -0
- package/dist/cjs/components/canvas-grid/index.d.ts.map +1 -1
- package/dist/cjs/components/canvas-grid/index.js +104 -21
- package/dist/cjs/components/canvas-grid/typings.d.ts +19 -2
- package/dist/cjs/components/canvas-grid/typings.d.ts.map +1 -1
- package/dist/cjs/components/cell/alignment.d.ts +30 -0
- package/dist/cjs/components/cell/alignment.d.ts.map +1 -1
- package/dist/cjs/components/cell/alignment.js +56 -1
- package/dist/cjs/components/cell/index.d.ts.map +1 -1
- package/dist/cjs/components/cell/index.js +15 -7
- package/dist/cjs/components/cell-diff/index.d.ts +3 -2
- package/dist/cjs/components/cell-diff/index.d.ts.map +1 -1
- package/dist/cjs/components/cell-editor/index.d.ts.map +1 -1
- package/dist/cjs/components/cell-editor/index.js +2 -1
- package/dist/cjs/components/context-menu/index.d.ts +6 -1
- package/dist/cjs/components/context-menu/index.d.ts.map +1 -1
- package/dist/cjs/components/context-menu/index.js +146 -3
- package/dist/cjs/components/embeds/embed-component.d.ts.map +1 -1
- package/dist/cjs/components/embeds/embed-component.js +16 -1
- package/dist/cjs/components/go-to-dialog/index.d.ts +11 -1
- package/dist/cjs/components/go-to-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/go-to-dialog/index.js +67 -24
- package/dist/cjs/components/goal-seek-dialog/index.d.ts +32 -0
- package/dist/cjs/components/goal-seek-dialog/index.d.ts.map +1 -0
- package/dist/cjs/components/goal-seek-dialog/index.js +149 -0
- package/dist/cjs/components/subtotal-dialog/index.d.ts +30 -0
- package/dist/cjs/components/subtotal-dialog/index.d.ts.map +1 -0
- package/dist/cjs/components/subtotal-dialog/index.js +126 -0
- package/dist/cjs/components/text-to-columns-dialog/index.d.ts +37 -0
- package/dist/cjs/components/text-to-columns-dialog/index.d.ts.map +1 -0
- package/dist/cjs/components/text-to-columns-dialog/index.js +166 -0
- package/dist/cjs/components/toolbar/background-color-selector.d.ts +13 -1
- package/dist/cjs/components/toolbar/background-color-selector.d.ts.map +1 -1
- package/dist/cjs/components/toolbar/background-color-selector.js +57 -11
- package/dist/cjs/components/toolbar/cell-style-selector.d.ts +15 -2
- package/dist/cjs/components/toolbar/cell-style-selector.d.ts.map +1 -1
- package/dist/cjs/components/toolbar/cell-style-selector.js +56 -3
- package/dist/cjs/components/toolbar/fill-selectors.d.ts +49 -0
- package/dist/cjs/components/toolbar/fill-selectors.d.ts.map +1 -0
- package/dist/cjs/components/toolbar/fill-selectors.js +196 -0
- package/dist/cjs/components/toolbar/index.d.ts +1 -0
- package/dist/cjs/components/toolbar/index.d.ts.map +1 -1
- package/dist/cjs/components/toolbar/index.js +1 -0
- package/dist/cjs/components/toolbar/text-horizontal-align-selector.d.ts +8 -0
- package/dist/cjs/components/toolbar/text-horizontal-align-selector.d.ts.map +1 -1
- package/dist/cjs/components/toolbar/text-horizontal-align-selector.js +23 -4
- package/dist/cjs/components/watch-window/index.d.ts +25 -0
- package/dist/cjs/components/watch-window/index.d.ts.map +1 -0
- package/dist/cjs/components/watch-window/index.js +63 -0
- package/dist/cjs/hooks/use-cell-renderer.d.ts.map +1 -1
- package/dist/cjs/hooks/use-cell-renderer.js +17 -6
- package/dist/cjs/hooks/use-get-tooltip.d.ts.map +1 -1
- package/dist/cjs/hooks/use-get-tooltip.js +7 -2
- package/dist/cjs/hooks/use-keyboard-handler.d.ts.map +1 -1
- package/dist/cjs/hooks/use-keyboard-handler.js +24 -12
- package/dist/cjs/index.d.ts +8 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/cjs/types.d.ts +117 -4
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/cjs/types.js +19 -1
- package/dist/esm/api/excel-validation-kinds.d.ts +71 -0
- package/dist/esm/api/excel-validation-kinds.d.ts.map +1 -0
- package/dist/esm/api/excel-validation-kinds.js +287 -0
- package/dist/esm/api/go-to-special.d.ts +32 -0
- package/dist/esm/api/go-to-special.d.ts.map +1 -0
- package/dist/esm/api/go-to-special.js +96 -0
- package/dist/esm/api/validation-tooltip.d.ts +17 -0
- package/dist/esm/api/validation-tooltip.d.ts.map +1 -0
- package/dist/esm/api/validation-tooltip.js +34 -0
- package/dist/esm/atoms/advanced-filter-dialog.atom.d.ts +28 -0
- package/dist/esm/atoms/advanced-filter-dialog.atom.d.ts.map +1 -0
- package/dist/esm/atoms/advanced-filter-dialog.atom.js +21 -0
- package/dist/esm/atoms/go-to-dialog.atom.d.ts +11 -1
- package/dist/esm/atoms/go-to-dialog.atom.d.ts.map +1 -1
- package/dist/esm/atoms/goal-seek-dialog.atom.d.ts +29 -0
- package/dist/esm/atoms/goal-seek-dialog.atom.d.ts.map +1 -0
- package/dist/esm/atoms/goal-seek-dialog.atom.js +21 -0
- package/dist/esm/atoms/index.d.ts +1 -0
- package/dist/esm/atoms/index.d.ts.map +1 -1
- package/dist/esm/atoms/index.js +1 -0
- package/dist/esm/atoms/subtotal-dialog.atom.d.ts +39 -0
- package/dist/esm/atoms/subtotal-dialog.atom.d.ts.map +1 -0
- package/dist/esm/atoms/subtotal-dialog.atom.js +21 -0
- package/dist/esm/atoms/text-to-columns-dialog.atom.d.ts +34 -0
- package/dist/esm/atoms/text-to-columns-dialog.atom.d.ts.map +1 -0
- package/dist/esm/atoms/text-to-columns-dialog.atom.js +25 -0
- package/dist/esm/atoms/watch-window.atom.d.ts +37 -0
- package/dist/esm/atoms/watch-window.atom.d.ts.map +1 -0
- package/dist/esm/atoms/watch-window.atom.js +37 -0
- package/dist/esm/components/advanced-filter-dialog/index.d.ts +28 -0
- package/dist/esm/components/advanced-filter-dialog/index.d.ts.map +1 -0
- package/dist/esm/components/advanced-filter-dialog/index.js +125 -0
- package/dist/esm/components/calculation-options-dialog/index.d.ts +33 -0
- package/dist/esm/components/calculation-options-dialog/index.d.ts.map +1 -0
- package/dist/esm/components/calculation-options-dialog/index.js +61 -0
- package/dist/esm/components/canvas-grid/index.d.ts.map +1 -1
- package/dist/esm/components/canvas-grid/index.js +99 -20
- package/dist/esm/components/canvas-grid/typings.d.ts +19 -2
- package/dist/esm/components/canvas-grid/typings.d.ts.map +1 -1
- package/dist/esm/components/cell/alignment.d.ts +30 -0
- package/dist/esm/components/cell/alignment.d.ts.map +1 -1
- package/dist/esm/components/cell/alignment.js +51 -0
- package/dist/esm/components/cell/index.d.ts.map +1 -1
- package/dist/esm/components/cell/index.js +16 -8
- package/dist/esm/components/cell-diff/index.d.ts +3 -2
- package/dist/esm/components/cell-diff/index.d.ts.map +1 -1
- package/dist/esm/components/cell-editor/index.d.ts.map +1 -1
- package/dist/esm/components/cell-editor/index.js +2 -1
- package/dist/esm/components/context-menu/index.d.ts +6 -1
- package/dist/esm/components/context-menu/index.d.ts.map +1 -1
- package/dist/esm/components/context-menu/index.js +139 -4
- package/dist/esm/components/embeds/embed-component.d.ts.map +1 -1
- package/dist/esm/components/embeds/embed-component.js +17 -1
- package/dist/esm/components/go-to-dialog/index.d.ts +11 -1
- package/dist/esm/components/go-to-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/go-to-dialog/index.js +63 -23
- package/dist/esm/components/goal-seek-dialog/index.d.ts +32 -0
- package/dist/esm/components/goal-seek-dialog/index.d.ts.map +1 -0
- package/dist/esm/components/goal-seek-dialog/index.js +125 -0
- package/dist/esm/components/subtotal-dialog/index.d.ts +30 -0
- package/dist/esm/components/subtotal-dialog/index.d.ts.map +1 -0
- package/dist/esm/components/subtotal-dialog/index.js +115 -0
- package/dist/esm/components/text-to-columns-dialog/index.d.ts +37 -0
- package/dist/esm/components/text-to-columns-dialog/index.d.ts.map +1 -0
- package/dist/esm/components/text-to-columns-dialog/index.js +147 -0
- package/dist/esm/components/toolbar/background-color-selector.d.ts +13 -1
- package/dist/esm/components/toolbar/background-color-selector.d.ts.map +1 -1
- package/dist/esm/components/toolbar/background-color-selector.js +61 -11
- package/dist/esm/components/toolbar/cell-style-selector.d.ts +15 -2
- package/dist/esm/components/toolbar/cell-style-selector.d.ts.map +1 -1
- package/dist/esm/components/toolbar/cell-style-selector.js +46 -2
- package/dist/esm/components/toolbar/fill-selectors.d.ts +49 -0
- package/dist/esm/components/toolbar/fill-selectors.d.ts.map +1 -0
- package/dist/esm/components/toolbar/fill-selectors.js +162 -0
- package/dist/esm/components/toolbar/index.d.ts +1 -0
- package/dist/esm/components/toolbar/index.d.ts.map +1 -1
- package/dist/esm/components/toolbar/index.js +1 -0
- package/dist/esm/components/toolbar/text-horizontal-align-selector.d.ts +8 -0
- package/dist/esm/components/toolbar/text-horizontal-align-selector.d.ts.map +1 -1
- package/dist/esm/components/toolbar/text-horizontal-align-selector.js +21 -5
- package/dist/esm/components/watch-window/index.d.ts +25 -0
- package/dist/esm/components/watch-window/index.d.ts.map +1 -0
- package/dist/esm/components/watch-window/index.js +54 -0
- package/dist/esm/hooks/use-cell-renderer.d.ts.map +1 -1
- package/dist/esm/hooks/use-cell-renderer.js +17 -6
- package/dist/esm/hooks/use-get-tooltip.d.ts.map +1 -1
- package/dist/esm/hooks/use-get-tooltip.js +7 -2
- package/dist/esm/hooks/use-keyboard-handler.d.ts.map +1 -1
- package/dist/esm/hooks/use-keyboard-handler.js +24 -12
- package/dist/esm/index.d.ts +8 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +8 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/types.d.ts +117 -4
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/esm/types.js +18 -0
- package/dist/spreadsheet.min.css +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell-style-selector.d.ts","sourceRoot":"","sources":["../../../../components/toolbar/cell-style-selector.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAMrD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"cell-style-selector.d.ts","sourceRoot":"","sources":["../../../../components/toolbar/cell-style-selector.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAMrD,OAAO,KAAK,EACV,UAAU,EAEV,cAAc,EAEf,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,KAAK,cAAc,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;AAClD,KAAK,aAAa,CAAC,CAAC,SAAS,MAAM,UAAU,IAAI,CAC/C,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,KACjB,IAAI,CAAC;AAEV,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,gBAAgB,CAAC;IACxB,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC;IAC3C;;;;;OAKG;IACH,eAAe,CAAC,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;IAC1C,cAAc,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IACnC,qBAAqB,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,kBAAkB,EAAE,CAClB,GAAG,IAAI,EAAE,UAAU,CAAC,cAAc,GAAG,aAAa,CAAC,MAAM,UAAU,CAAC,CAAC,KAClE,IAAI,CAAC;IACV,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B,CAAC;AAEF,KAAK,SAAS,GAAG;IACf,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,UAAU;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa;CAC5B,CAAC;AAEF,8EAA8E;AAC9E,eAAO,MAAM,yBAAyB,GACpC,iBAAiB,cAAc,EAAE,GAAG,IAAI,GAAG,SAAS,KACnD,KAAK,CAAC,cAAc,GAAG;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,CAQ7C,CAAC;AAcJ,oEAAoE;AACpE,eAAO,MAAM,wBAAwB,GACnC,QAAQ,UAAU,GAAG,SAAS,EAC9B,OAAO,gBAAgB,KACtB,KAAK,CAAC,aAqBR,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,OAAO,gBAAgB,EACvB,iBAAiB,MAAM,6BAgYxB,CAAC;AAEF,eAAO,MAAM,iBAAiB,sJAUzB,sBAAsB,uBAsO1B,CAAC"}
|
|
@@ -8,6 +8,45 @@ import React, { memo, useMemo, useRef } from "react";
|
|
|
8
8
|
import { useFocusSheet } from "../../atoms";
|
|
9
9
|
import { getCurrencySymbol } from "../../helpers";
|
|
10
10
|
import { getStringifiedColor } from "../../themes";
|
|
11
|
+
/** Named styles worth showing in the gallery (see `namedCellStyles` prop). */
|
|
12
|
+
export const getGalleryNamedCellStyles = (namedCellStyles) => (namedCellStyles ?? []).filter((style) => !style.hidden &&
|
|
13
|
+
style.builtinId !== 0 &&
|
|
14
|
+
style.name !== "Normal" &&
|
|
15
|
+
!!style.format &&
|
|
16
|
+
Object.keys(style.format).length > 0);
|
|
17
|
+
const previewBorder = (border, theme) => border
|
|
18
|
+
? `${border.width ?? 1}px ${border.style === "double" ? "double" : "solid"} ${getStringifiedColor(border.color, theme)}`
|
|
19
|
+
: undefined;
|
|
20
|
+
/** CSS preview of a named style's format for the gallery swatch. */
|
|
21
|
+
export const getNamedCellStylePreview = (format, theme) => {
|
|
22
|
+
if (!format)
|
|
23
|
+
return {};
|
|
24
|
+
const style = {};
|
|
25
|
+
if (format.backgroundColor) {
|
|
26
|
+
style.backgroundColor = getStringifiedColor(format.backgroundColor, theme);
|
|
27
|
+
}
|
|
28
|
+
const text = format.textFormat;
|
|
29
|
+
if (text?.color)
|
|
30
|
+
style.color = getStringifiedColor(text.color, theme);
|
|
31
|
+
if (text?.bold)
|
|
32
|
+
style.fontWeight = "bold";
|
|
33
|
+
if (text?.italic)
|
|
34
|
+
style.fontStyle = "italic";
|
|
35
|
+
if (text?.underline)
|
|
36
|
+
style.textDecoration = "underline";
|
|
37
|
+
if (text?.fontSize)
|
|
38
|
+
style.fontSize = text.fontSize;
|
|
39
|
+
if (text?.fontFamily)
|
|
40
|
+
style.fontFamily = text.fontFamily;
|
|
41
|
+
const borders = format.borders;
|
|
42
|
+
if (borders) {
|
|
43
|
+
style.borderTop = previewBorder(borders.top, theme);
|
|
44
|
+
style.borderBottom = previewBorder(borders.bottom, theme);
|
|
45
|
+
style.borderLeft = previewBorder(borders.left, theme);
|
|
46
|
+
style.borderRight = previewBorder(borders.right, theme);
|
|
47
|
+
}
|
|
48
|
+
return style;
|
|
49
|
+
};
|
|
11
50
|
export const getCellStyles = (theme, currencySymbol) => {
|
|
12
51
|
return new Map([
|
|
13
52
|
[
|
|
@@ -383,13 +422,14 @@ export const getCellStyles = (theme, currencySymbol) => {
|
|
|
383
422
|
],
|
|
384
423
|
]);
|
|
385
424
|
};
|
|
386
|
-
export const CellStyleSelector = memo(({ currency, locale, theme, selectedFormat, canAddCustomStyle = false, onChangeFormatting, onClearFormatting, }) => {
|
|
425
|
+
export const CellStyleSelector = memo(({ currency, locale, theme, selectedFormat, namedCellStyles, canAddCustomStyle = false, onChangeFormatting, onClearFormatting, }) => {
|
|
387
426
|
const colorIndexes = [4, 5, 6, 7, 8, 9];
|
|
388
427
|
const colorTints = [0.8, 0.6, 0.4, 0];
|
|
389
428
|
const currencySymbol = getCurrencySymbol(locale, currency);
|
|
390
429
|
const shouldFocusSheetRef = useRef(true);
|
|
391
430
|
const focusSheet = useFocusSheet();
|
|
392
431
|
const cellStyles = useMemo(() => [...getCellStyles(theme, currencySymbol).entries()], [theme, currencySymbol]);
|
|
432
|
+
const workbookStyles = useMemo(() => getGalleryNamedCellStyles(namedCellStyles), [namedCellStyles]);
|
|
393
433
|
// Number formats
|
|
394
434
|
const numberFormats = [
|
|
395
435
|
[
|
|
@@ -434,7 +474,7 @@ export const CellStyleSelector = memo(({ currency, locale, theme, selectedFormat
|
|
|
434
474
|
const gridClass = "grid grid-cols-3 md:grid-cols-6 gap-1 pb-1";
|
|
435
475
|
return (React.createElement(DropdownMenu, { modal: false },
|
|
436
476
|
React.createElement(DropdownMenuTrigger, { asChild: true },
|
|
437
|
-
React.createElement(IconButton, { size: "xl", tooltip: "Cell styles", className: "gap-1" },
|
|
477
|
+
React.createElement(IconButton, { size: "xl", tooltip: "Cell styles", "aria-label": "Cell styles", className: "gap-1" },
|
|
438
478
|
React.createElement(MdBrush, null),
|
|
439
479
|
React.createElement("div", { className: "text-xs" }, "Cell styles"),
|
|
440
480
|
React.createElement(MdOutlineArrowDropDown, null))),
|
|
@@ -448,6 +488,10 @@ export const CellStyleSelector = memo(({ currency, locale, theme, selectedFormat
|
|
|
448
488
|
shouldFocusSheetRef.current = false;
|
|
449
489
|
} },
|
|
450
490
|
React.createElement("div", { className: "max-w-dropdown md:min-w-[400px] p-2 pt-0" },
|
|
491
|
+
workbookStyles.length ? (React.createElement("div", null,
|
|
492
|
+
React.createElement("div", { className: headingClass }, "Workbook styles"),
|
|
493
|
+
React.createElement(Separator, { className: "mb-2" }),
|
|
494
|
+
React.createElement("div", { className: gridClass }, workbookStyles.map((namedStyle) => (React.createElement(DropdownMenuItem, { onClick: () => onChangeFormatting(namedStyle.format), className: hoverClass, key: `${namedStyle.name}-${namedStyle.xfId}`, style: getNamedCellStylePreview(namedStyle.format, theme) }, namedStyle.name)))))) : null,
|
|
451
495
|
cellStyles.map(([category, cellStyleList]) => {
|
|
452
496
|
return (React.createElement("div", { key: category },
|
|
453
497
|
React.createElement("div", { className: headingClass }, category),
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { CellFormat, FillPattern, GradientFill } from "../../types";
|
|
3
|
+
import type { SpreadsheetTheme } from "../canvas-grid/typings";
|
|
4
|
+
/** The fill-related slice of a cell format the fill popover authors. */
|
|
5
|
+
export type CellFill = Pick<CellFormat, "backgroundColor" | "fillPattern" | "foregroundColor" | "gradient">;
|
|
6
|
+
/** Excel's Format Cells → Fill → Pattern Style menu, in Excel's order. */
|
|
7
|
+
export declare const FILL_PATTERN_OPTIONS: ReadonlyArray<{
|
|
8
|
+
pattern: FillPattern;
|
|
9
|
+
label: string;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Excel's Fill Effects → Shading styles. `degree` follows OOXML
|
|
13
|
+
* `<gradientFill degree>`: 0 runs left → right, 90 top → bottom.
|
|
14
|
+
*/
|
|
15
|
+
export declare const GRADIENT_PRESETS: ReadonlyArray<{
|
|
16
|
+
label: string;
|
|
17
|
+
gradient: Omit<GradientFill, "stops">;
|
|
18
|
+
}>;
|
|
19
|
+
/** Two-stop gradient from a preset and two colours. */
|
|
20
|
+
export declare const buildGradientFill: (preset: Omit<GradientFill, "stops">, color1: string, color2: string) => GradientFill;
|
|
21
|
+
/**
|
|
22
|
+
* CSS preview of a gradient fill. OOXML measures the linear angle from the
|
|
23
|
+
* left→right axis; CSS from the bottom→top axis, so CSS = degree + 90.
|
|
24
|
+
*/
|
|
25
|
+
export declare const gradientToCss: (gradient: GradientFill) => string;
|
|
26
|
+
export type PatternFillPickerProps = {
|
|
27
|
+
fill?: CellFill | null;
|
|
28
|
+
theme: SpreadsheetTheme;
|
|
29
|
+
onChangeFill(fill: CellFill): void;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Pattern fill authoring (Excel: Format Cells → Fill → Pattern Color /
|
|
33
|
+
* Pattern Style). The pattern paints in `foregroundColor` over the solid
|
|
34
|
+
* `backgroundColor`; a gradient on the cell is cleared, as Excel treats the
|
|
35
|
+
* two as exclusive.
|
|
36
|
+
*/
|
|
37
|
+
export declare const PatternFillPicker: ({ fill, theme, onChangeFill, }: PatternFillPickerProps) => React.JSX.Element;
|
|
38
|
+
export type GradientFillPickerProps = {
|
|
39
|
+
fill?: CellFill | null;
|
|
40
|
+
theme: SpreadsheetTheme;
|
|
41
|
+
onChangeFill(fill: CellFill): void;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Gradient fill authoring (Excel: Fill Effects → Gradient, two colours +
|
|
45
|
+
* shading style). Picking a style applies immediately with the two colours;
|
|
46
|
+
* changing a colour re-applies when the cell already has a gradient.
|
|
47
|
+
*/
|
|
48
|
+
export declare const GradientFillPicker: ({ fill, theme, onChangeFill, }: GradientFillPickerProps) => React.JSX.Element;
|
|
49
|
+
//# sourceMappingURL=fill-selectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fill-selectors.d.ts","sourceRoot":"","sources":["../../../../components/toolbar/fill-selectors.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,wEAAwE;AACxE,MAAM,MAAM,QAAQ,GAAG,IAAI,CACzB,UAAU,EACV,iBAAiB,GAAG,aAAa,GAAG,iBAAiB,GAAG,UAAU,CACnE,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC;IAC/C,OAAO,EAAE,WAAW,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf,CAkBA,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAAa,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;CACvC,CASA,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,EACnC,QAAQ,MAAM,EACd,QAAQ,MAAM,KACb,YAMD,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,UAAU,YAAY,KAAG,MAUtD,CAAC;AAqCF,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,gBAAgB,CAAC;IACxB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;CACpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,gCAI/B,sBAAsB,sBA+ExB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,gBAAgB,CAAC;IACxB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;CACpC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,gCAIhC,uBAAuB,sBA8FzB,CAAC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { Button, ColorPicker, HexColorPicker, Stack } from "@rowsncolumns/ui";
|
|
2
|
+
import React, { useMemo, useState } from "react";
|
|
3
|
+
import { getPatternCanvas } from "../../api/fill-patterns";
|
|
4
|
+
import { getStringifiedColor, STANDARD_COLORS } from "../../themes";
|
|
5
|
+
/** Excel's Format Cells → Fill → Pattern Style menu, in Excel's order. */
|
|
6
|
+
export const FILL_PATTERN_OPTIONS = [
|
|
7
|
+
{ pattern: "gray0625", label: "6.25% Gray" },
|
|
8
|
+
{ pattern: "gray125", label: "12.5% Gray" },
|
|
9
|
+
{ pattern: "lightGray", label: "25% Gray" },
|
|
10
|
+
{ pattern: "mediumGray", label: "50% Gray" },
|
|
11
|
+
{ pattern: "darkGray", label: "75% Gray" },
|
|
12
|
+
{ pattern: "darkHorizontal", label: "Horizontal Stripe" },
|
|
13
|
+
{ pattern: "darkVertical", label: "Vertical Stripe" },
|
|
14
|
+
{ pattern: "darkDown", label: "Reverse Diagonal Stripe" },
|
|
15
|
+
{ pattern: "darkUp", label: "Diagonal Stripe" },
|
|
16
|
+
{ pattern: "darkGrid", label: "Diagonal Crosshatch" },
|
|
17
|
+
{ pattern: "darkTrellis", label: "Thick Diagonal Crosshatch" },
|
|
18
|
+
{ pattern: "lightHorizontal", label: "Thin Horizontal Stripe" },
|
|
19
|
+
{ pattern: "lightVertical", label: "Thin Vertical Stripe" },
|
|
20
|
+
{ pattern: "lightDown", label: "Thin Reverse Diagonal Stripe" },
|
|
21
|
+
{ pattern: "lightUp", label: "Thin Diagonal Stripe" },
|
|
22
|
+
{ pattern: "lightGrid", label: "Thin Horizontal Crosshatch" },
|
|
23
|
+
{ pattern: "lightTrellis", label: "Thin Diagonal Crosshatch" },
|
|
24
|
+
];
|
|
25
|
+
/**
|
|
26
|
+
* Excel's Fill Effects → Shading styles. `degree` follows OOXML
|
|
27
|
+
* `<gradientFill degree>`: 0 runs left → right, 90 top → bottom.
|
|
28
|
+
*/
|
|
29
|
+
export const GRADIENT_PRESETS = [
|
|
30
|
+
{ label: "Horizontal", gradient: { type: "linear", degree: 90 } },
|
|
31
|
+
{ label: "Vertical", gradient: { type: "linear", degree: 0 } },
|
|
32
|
+
{ label: "Diagonal up", gradient: { type: "linear", degree: 45 } },
|
|
33
|
+
{ label: "Diagonal down", gradient: { type: "linear", degree: 135 } },
|
|
34
|
+
{
|
|
35
|
+
label: "From center",
|
|
36
|
+
gradient: { type: "path", left: 0.5, right: 0.5, top: 0.5, bottom: 0.5 },
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
/** Two-stop gradient from a preset and two colours. */
|
|
40
|
+
export const buildGradientFill = (preset, color1, color2) => ({
|
|
41
|
+
...preset,
|
|
42
|
+
stops: [
|
|
43
|
+
{ position: 0, color: color1 },
|
|
44
|
+
{ position: 1, color: color2 },
|
|
45
|
+
],
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* CSS preview of a gradient fill. OOXML measures the linear angle from the
|
|
49
|
+
* left→right axis; CSS from the bottom→top axis, so CSS = degree + 90.
|
|
50
|
+
*/
|
|
51
|
+
export const gradientToCss = (gradient) => {
|
|
52
|
+
const stops = gradient.stops
|
|
53
|
+
.slice()
|
|
54
|
+
.sort((a, b) => a.position - b.position)
|
|
55
|
+
.map((stop) => `${stop.color} ${Math.round(stop.position * 100)}%`)
|
|
56
|
+
.join(", ");
|
|
57
|
+
if (gradient.type === "path") {
|
|
58
|
+
return `radial-gradient(circle, ${stops})`;
|
|
59
|
+
}
|
|
60
|
+
return `linear-gradient(${((gradient.degree ?? 0) + 90) % 360}deg, ${stops})`;
|
|
61
|
+
};
|
|
62
|
+
const DEFAULT_PATTERN_COLOR = "#000000";
|
|
63
|
+
const PatternSwatch = ({ pattern, foregroundColor, backgroundColor, label, }) => {
|
|
64
|
+
const url = useMemo(() => {
|
|
65
|
+
const canvas = getPatternCanvas(pattern, foregroundColor, backgroundColor);
|
|
66
|
+
try {
|
|
67
|
+
return canvas?.toDataURL() ?? undefined;
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
}, [pattern, foregroundColor, backgroundColor]);
|
|
73
|
+
return (React.createElement("span", { "aria-hidden": "true", className: "block w-full h-full border border-solid border-rnc-border", style: url
|
|
74
|
+
? { backgroundImage: `url(${url})`, backgroundRepeat: "repeat" }
|
|
75
|
+
: { backgroundColor }, title: label }));
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Pattern fill authoring (Excel: Format Cells → Fill → Pattern Color /
|
|
79
|
+
* Pattern Style). The pattern paints in `foregroundColor` over the solid
|
|
80
|
+
* `backgroundColor`; a gradient on the cell is cleared, as Excel treats the
|
|
81
|
+
* two as exclusive.
|
|
82
|
+
*/
|
|
83
|
+
export const PatternFillPicker = ({ fill, theme, onChangeFill, }) => {
|
|
84
|
+
const background = fill?.backgroundColor
|
|
85
|
+
? getStringifiedColor(fill.backgroundColor, theme)
|
|
86
|
+
: undefined;
|
|
87
|
+
const patternColor = fill?.foregroundColor
|
|
88
|
+
? getStringifiedColor(fill.foregroundColor, theme)
|
|
89
|
+
: DEFAULT_PATTERN_COLOR;
|
|
90
|
+
const activePattern = fill?.fillPattern &&
|
|
91
|
+
fill.fillPattern !== "none" &&
|
|
92
|
+
fill.fillPattern !== "solid"
|
|
93
|
+
? fill.fillPattern
|
|
94
|
+
: undefined;
|
|
95
|
+
const apply = (pattern, foregroundColor) => onChangeFill({
|
|
96
|
+
backgroundColor: fill?.backgroundColor ?? undefined,
|
|
97
|
+
fillPattern: pattern,
|
|
98
|
+
foregroundColor: pattern ? foregroundColor : undefined,
|
|
99
|
+
gradient: undefined,
|
|
100
|
+
});
|
|
101
|
+
return (React.createElement(Stack, { direction: "vertical", className: "gap-1" },
|
|
102
|
+
React.createElement(Button, { variant: "outline", size: "xs", tabIndex: -1, className: "justify-center py-1", onClick: () => apply(undefined, undefined) }, "No pattern"),
|
|
103
|
+
React.createElement("div", { className: "pt-2 text-xs text-left" }, "Pattern style"),
|
|
104
|
+
React.createElement("div", { role: "group", "aria-label": "Pattern style", className: "grid grid-cols-6 gap-1" }, FILL_PATTERN_OPTIONS.map(({ pattern, label }) => (React.createElement("button", { type: "button", key: pattern, "aria-label": label, "aria-pressed": activePattern === pattern, className: `w-6 h-6 p-0 border-2 border-solid rounded-sm bg-transparent cursor-pointer ${activePattern === pattern
|
|
105
|
+
? "border-rnc-primary"
|
|
106
|
+
: "border-transparent"}`, onClick: () => apply(pattern, fill?.foregroundColor ? patternColor : undefined) },
|
|
107
|
+
React.createElement(PatternSwatch, { pattern: pattern, foregroundColor: patternColor, backgroundColor: background, label: label }))))),
|
|
108
|
+
React.createElement("div", { className: "pt-2 text-xs text-left" }, "Pattern color"),
|
|
109
|
+
React.createElement(ColorPicker, { value: patternColor, colors: STANDARD_COLORS, onChange: (color) => apply(activePattern ?? "darkGray", color), className: "gap-1" }),
|
|
110
|
+
React.createElement("div", { className: "flex items-center gap-1" },
|
|
111
|
+
React.createElement(HexColorPicker, { value: patternColor, onChange: (color) => apply(activePattern ?? "darkGray", color) }))));
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Gradient fill authoring (Excel: Fill Effects → Gradient, two colours +
|
|
115
|
+
* shading style). Picking a style applies immediately with the two colours;
|
|
116
|
+
* changing a colour re-applies when the cell already has a gradient.
|
|
117
|
+
*/
|
|
118
|
+
export const GradientFillPicker = ({ fill, theme, onChangeFill, }) => {
|
|
119
|
+
const existing = fill?.gradient ?? undefined;
|
|
120
|
+
const [color1, setColor1] = useState(() => existing?.stops?.[0]?.color ??
|
|
121
|
+
(fill?.backgroundColor
|
|
122
|
+
? getStringifiedColor(fill.backgroundColor, theme)
|
|
123
|
+
: "#FFFFFF"));
|
|
124
|
+
const [color2, setColor2] = useState(() => existing?.stops?.[existing.stops.length - 1]?.color ?? "#4472C4");
|
|
125
|
+
const apply = (preset, c1 = color1, c2 = color2) => onChangeFill({
|
|
126
|
+
backgroundColor: undefined,
|
|
127
|
+
fillPattern: undefined,
|
|
128
|
+
foregroundColor: undefined,
|
|
129
|
+
gradient: buildGradientFill(preset, c1, c2),
|
|
130
|
+
});
|
|
131
|
+
const reapply = (c1, c2) => {
|
|
132
|
+
if (!existing)
|
|
133
|
+
return;
|
|
134
|
+
const { stops: _stops, ...preset } = existing;
|
|
135
|
+
apply(preset, c1, c2);
|
|
136
|
+
};
|
|
137
|
+
const isActive = (preset) => !!existing &&
|
|
138
|
+
existing.type === preset.type &&
|
|
139
|
+
(preset.type === "path" || (existing.degree ?? 0) === (preset.degree ?? 0));
|
|
140
|
+
return (React.createElement(Stack, { direction: "vertical", className: "gap-1" },
|
|
141
|
+
React.createElement(Button, { variant: "outline", size: "xs", tabIndex: -1, className: "justify-center py-1", onClick: () => onChangeFill({
|
|
142
|
+
backgroundColor: fill?.backgroundColor ?? undefined,
|
|
143
|
+
fillPattern: fill?.fillPattern ?? undefined,
|
|
144
|
+
foregroundColor: fill?.foregroundColor ?? undefined,
|
|
145
|
+
gradient: undefined,
|
|
146
|
+
}) }, "No gradient"),
|
|
147
|
+
React.createElement("div", { className: "grid grid-cols-[auto_1fr] items-center gap-2 pt-2 text-xs" },
|
|
148
|
+
React.createElement("span", null, "Color 1"),
|
|
149
|
+
React.createElement(HexColorPicker, { value: color1, onChange: (color) => {
|
|
150
|
+
setColor1(color);
|
|
151
|
+
reapply(color, color2);
|
|
152
|
+
} }),
|
|
153
|
+
React.createElement("span", null, "Color 2"),
|
|
154
|
+
React.createElement(HexColorPicker, { value: color2, onChange: (color) => {
|
|
155
|
+
setColor2(color);
|
|
156
|
+
reapply(color1, color);
|
|
157
|
+
} })),
|
|
158
|
+
React.createElement("div", { className: "pt-2 text-xs text-left" }, "Shading style"),
|
|
159
|
+
React.createElement("div", { role: "group", "aria-label": "Shading style", className: "grid grid-cols-5 gap-1" }, GRADIENT_PRESETS.map(({ label, gradient }) => (React.createElement("button", { type: "button", key: label, "aria-label": label, "aria-pressed": isActive(gradient), className: `w-8 h-6 p-0 border-2 border-solid rounded-sm cursor-pointer ${isActive(gradient) ? "border-rnc-primary" : "border-rnc-border"}`, style: {
|
|
160
|
+
backgroundImage: gradientToCss(buildGradientFill(gradient, color1, color2)),
|
|
161
|
+
}, onClick: () => apply(gradient) }))))));
|
|
162
|
+
};
|
|
@@ -4,6 +4,7 @@ export * from "./scale-selector";
|
|
|
4
4
|
export * from "./font-size-selector";
|
|
5
5
|
export * from "./text-color-selector";
|
|
6
6
|
export * from "./background-color-selector";
|
|
7
|
+
export * from "./fill-selectors";
|
|
7
8
|
export * from "./merge-cells-selector";
|
|
8
9
|
export * from "./border-selector";
|
|
9
10
|
export * from "./font-family-selector";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/toolbar/index.tsx"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/toolbar/index.tsx"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
@@ -4,6 +4,7 @@ export * from "./scale-selector";
|
|
|
4
4
|
export * from "./font-size-selector";
|
|
5
5
|
export * from "./text-color-selector";
|
|
6
6
|
export * from "./background-color-selector";
|
|
7
|
+
export * from "./fill-selectors";
|
|
7
8
|
export * from "./merge-cells-selector";
|
|
8
9
|
export * from "./border-selector";
|
|
9
10
|
export * from "./font-family-selector";
|
|
@@ -5,6 +5,14 @@ type TextHorizontalAlignSelectorProps = {
|
|
|
5
5
|
value: HorizontalAlign | undefined | null;
|
|
6
6
|
onChange(value: HorizontalAlign): void;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Excel's remaining Format Cells → Alignment → Horizontal entries. They have
|
|
10
|
+
* no toolbar glyph, so they render as labelled buttons under the icon row.
|
|
11
|
+
*/
|
|
12
|
+
export declare const EXTENDED_HORIZONTAL_ALIGNMENTS: ReadonlyArray<{
|
|
13
|
+
value: HorizontalAlign;
|
|
14
|
+
label: string;
|
|
15
|
+
}>;
|
|
8
16
|
export declare const TextHorizontalAlignSelector: ({ value, onChange, disabled, }: TextHorizontalAlignSelectorProps) => React.JSX.Element;
|
|
9
17
|
export {};
|
|
10
18
|
//# sourceMappingURL=text-horizontal-align-selector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-horizontal-align-selector.d.ts","sourceRoot":"","sources":["../../../../components/toolbar/text-horizontal-align-selector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"text-horizontal-align-selector.d.ts","sourceRoot":"","sources":["../../../../components/toolbar/text-horizontal-align-selector.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,KAAK,gCAAgC,GAAG;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,eAAe,GAAG,SAAS,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;CACxC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAE,aAAa,CAAC;IACzD,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf,CAGA,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,gCAIzC,gCAAgC,sBA6FlC,CAAC"}
|
|
@@ -1,17 +1,30 @@
|
|
|
1
|
-
import { MdFormatAlignCenter, MdFormatAlignLeft, MdFormatAlignRight, MdOutlineArrowDropDown, } from "@rowsncolumns/icons";
|
|
2
|
-
import { IconButton } from "@rowsncolumns/ui";
|
|
1
|
+
import { MdFormatAlignCenter, MdFormatAlignJustify, MdFormatAlignLeft, MdFormatAlignRight, MdOutlineArrowDropDown, } from "@rowsncolumns/icons";
|
|
2
|
+
import { Button, IconButton } from "@rowsncolumns/ui";
|
|
3
3
|
import { Popover, PopoverContent, PopoverTrigger } from "@rowsncolumns/ui";
|
|
4
4
|
import { Stack } from "@rowsncolumns/ui";
|
|
5
5
|
import React, { useState } from "react";
|
|
6
6
|
import { useFocusSheet } from "../../atoms";
|
|
7
|
+
/**
|
|
8
|
+
* Excel's remaining Format Cells → Alignment → Horizontal entries. They have
|
|
9
|
+
* no toolbar glyph, so they render as labelled buttons under the icon row.
|
|
10
|
+
*/
|
|
11
|
+
export const EXTENDED_HORIZONTAL_ALIGNMENTS = [
|
|
12
|
+
{ value: "distributed", label: "Distributed" },
|
|
13
|
+
{ value: "fill", label: "Fill" },
|
|
14
|
+
];
|
|
7
15
|
export const TextHorizontalAlignSelector = ({ value = "left", onChange, disabled, }) => {
|
|
8
16
|
const focusSheet = useFocusSheet();
|
|
9
17
|
const [isOpen, onOpenChange] = useState(false);
|
|
10
18
|
const close = () => onOpenChange(false);
|
|
19
|
+
const select = (next) => {
|
|
20
|
+
onChange(next);
|
|
21
|
+
focusSheet?.();
|
|
22
|
+
close();
|
|
23
|
+
};
|
|
11
24
|
return (React.createElement(Popover, { open: isOpen, onOpenChange: onOpenChange },
|
|
12
25
|
React.createElement(PopoverTrigger, { asChild: true },
|
|
13
|
-
React.createElement(IconButton, { size: "lg", tooltip: "Horizontal align", disabled: disabled },
|
|
14
|
-
value === "right" ? (React.createElement(MdFormatAlignRight, null)) : value === "center" ? (React.createElement(MdFormatAlignCenter, null)) : (React.createElement(MdFormatAlignLeft, null)),
|
|
26
|
+
React.createElement(IconButton, { size: "lg", tooltip: "Horizontal align", "aria-label": "Horizontal align", disabled: disabled },
|
|
27
|
+
value === "right" ? (React.createElement(MdFormatAlignRight, null)) : value === "center" || value === "centerContinuous" ? (React.createElement(MdFormatAlignCenter, null)) : value === "justify" || value === "distributed" ? (React.createElement(MdFormatAlignJustify, null)) : (React.createElement(MdFormatAlignLeft, null)),
|
|
15
28
|
React.createElement(MdOutlineArrowDropDown, null))),
|
|
16
29
|
React.createElement(PopoverContent, { align: "start" },
|
|
17
30
|
React.createElement(Stack, { direction: "horizontal", className: "gap-1 max-w-[140px] flex-wrap" },
|
|
@@ -32,5 +45,8 @@ export const TextHorizontalAlignSelector = ({ value = "left", onChange, disabled
|
|
|
32
45
|
focusSheet?.();
|
|
33
46
|
close();
|
|
34
47
|
} },
|
|
35
|
-
React.createElement(MdFormatAlignRight, null))
|
|
48
|
+
React.createElement(MdFormatAlignRight, null)),
|
|
49
|
+
React.createElement(IconButton, { size: "lg", tooltip: "Justify", "aria-label": "Justify", isActive: value === "justify", onClick: () => select("justify") },
|
|
50
|
+
React.createElement(MdFormatAlignJustify, null))),
|
|
51
|
+
React.createElement(Stack, { direction: "horizontal", className: "gap-1 pt-1 max-w-[140px]" }, EXTENDED_HORIZONTAL_ALIGNMENTS.map(({ value: option, label }) => (React.createElement(Button, { key: option, type: "button", variant: value === option ? "secondary" : "ghost", size: "xs", "aria-pressed": value === option, onClick: () => select(option) }, label)))))));
|
|
36
52
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type WatchWindowContext, type WatchWindowEntry } from "../../atoms/watch-window.atom";
|
|
3
|
+
import type { SheetCoordinate } from "../../types";
|
|
4
|
+
export type WatchWindowProps = {
|
|
5
|
+
entries: WatchWindowEntry[];
|
|
6
|
+
context: WatchWindowContext | null;
|
|
7
|
+
onRemove(cell: SheetCoordinate): void;
|
|
8
|
+
onClose(): void;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Excel's Watch Window: a floating list of cells with their sheet, address,
|
|
12
|
+
* current value and formula, refreshed with the grid. Double-click a row to
|
|
13
|
+
* jump to the cell. Presentational; {@link WatchWindowHost} wires the atoms.
|
|
14
|
+
*/
|
|
15
|
+
export declare const WatchWindow: React.MemoExoticComponent<({ entries, context, onRemove, onClose }: WatchWindowProps) => React.JSX.Element>;
|
|
16
|
+
/**
|
|
17
|
+
* Host-mounted, atom-driven Watch Window. Mount once alongside the other
|
|
18
|
+
* dialogs; the grid's context menu offers "Add to Watch Window" while a
|
|
19
|
+
* host is mounted and republishes live getters on each render.
|
|
20
|
+
*/
|
|
21
|
+
export declare const WatchWindowHost: {
|
|
22
|
+
(): React.JSX.Element | null;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/watch-window/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,EAML,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IACtC,OAAO,IAAI,IAAI,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,sEACoB,gBAAgB,uBA6E3D,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;CAgB3B,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Button, IconButton } from "@rowsncolumns/ui";
|
|
2
|
+
import { Cross1Icon } from "@rowsncolumns/icons";
|
|
3
|
+
import { cellToAddress } from "@rowsncolumns/utils";
|
|
4
|
+
import React, { memo, useCallback } from "react";
|
|
5
|
+
import { useRegisterWatchWindowHost, useRemoveWatch, useWatchWindowContext, useWatchWindowEntries, useWatchWindowOpen, } from "../../atoms/watch-window.atom";
|
|
6
|
+
/**
|
|
7
|
+
* Excel's Watch Window: a floating list of cells with their sheet, address,
|
|
8
|
+
* current value and formula, refreshed with the grid. Double-click a row to
|
|
9
|
+
* jump to the cell. Presentational; {@link WatchWindowHost} wires the atoms.
|
|
10
|
+
*/
|
|
11
|
+
export const WatchWindow = memo(({ entries, context, onRemove, onClose }) => (React.createElement("div", { role: "dialog", "aria-label": "Watch Window", className: "fixed bottom-4 right-4 z-50 w-[420px] max-w-[92vw] rounded-md border border-rnc-border bg-rnc-background text-rnc-foreground shadow-lg pointer-events-auto" },
|
|
12
|
+
React.createElement("div", { className: "flex items-center justify-between px-3 py-2 border-b border-rnc-border" },
|
|
13
|
+
React.createElement("span", { className: "text-sm font-medium" }, "Watch Window"),
|
|
14
|
+
React.createElement(IconButton, { "aria-label": "Close Watch Window", onClick: onClose },
|
|
15
|
+
React.createElement(Cross1Icon, null))),
|
|
16
|
+
entries.length === 0 ? (React.createElement("div", { className: "px-3 py-4 text-xs text-rnc-foreground/60" }, "No cells are being watched. Right-click a cell \u2192 Add to Watch Window.")) : (React.createElement("table", { className: "w-full text-xs border-collapse" },
|
|
17
|
+
React.createElement("thead", null,
|
|
18
|
+
React.createElement("tr", { className: "text-left text-rnc-foreground/70" },
|
|
19
|
+
React.createElement("th", { className: "px-3 py-1 font-medium" }, "Sheet"),
|
|
20
|
+
React.createElement("th", { className: "px-2 py-1 font-medium" }, "Cell"),
|
|
21
|
+
React.createElement("th", { className: "px-2 py-1 font-medium" }, "Value"),
|
|
22
|
+
React.createElement("th", { className: "px-2 py-1 font-medium" }, "Formula"),
|
|
23
|
+
React.createElement("th", { className: "px-2 py-1" }))),
|
|
24
|
+
React.createElement("tbody", null, entries.map((entry) => {
|
|
25
|
+
const address = cellToAddress(entry) ?? "";
|
|
26
|
+
const sheetName = context?.getSheetName?.(entry.sheetId) ?? String(entry.sheetId);
|
|
27
|
+
const value = context?.getFormattedValue(entry.sheetId, entry.rowIndex, entry.columnIndex);
|
|
28
|
+
const formula = context?.getFormula(entry.sheetId, entry.rowIndex, entry.columnIndex);
|
|
29
|
+
return (React.createElement("tr", { key: `${entry.sheetId}:${entry.rowIndex}:${entry.columnIndex}`, className: "cursor-default hover:bg-rnc-accent", onDoubleClick: () => context?.onNavigate(entry), "data-testid": "watch-row" },
|
|
30
|
+
React.createElement("td", { className: "px-3 py-1 truncate max-w-[110px]" }, sheetName),
|
|
31
|
+
React.createElement("td", { className: "px-2 py-1 font-mono" }, address),
|
|
32
|
+
React.createElement("td", { className: "px-2 py-1 truncate max-w-[120px]" }, value ?? ""),
|
|
33
|
+
React.createElement("td", { className: "px-2 py-1 font-mono truncate max-w-[140px]" }, formula ?? ""),
|
|
34
|
+
React.createElement("td", { className: "px-2 py-1 text-right" },
|
|
35
|
+
React.createElement(Button, { variant: "ghost", size: "xs", "aria-label": `Remove watch ${sheetName}!${address}`, onClick: () => onRemove(entry) }, "Delete"))));
|
|
36
|
+
})))))));
|
|
37
|
+
WatchWindow.displayName = "WatchWindow";
|
|
38
|
+
/**
|
|
39
|
+
* Host-mounted, atom-driven Watch Window. Mount once alongside the other
|
|
40
|
+
* dialogs; the grid's context menu offers "Add to Watch Window" while a
|
|
41
|
+
* host is mounted and republishes live getters on each render.
|
|
42
|
+
*/
|
|
43
|
+
export const WatchWindowHost = () => {
|
|
44
|
+
useRegisterWatchWindowHost();
|
|
45
|
+
const [entries] = useWatchWindowEntries();
|
|
46
|
+
const [open, setOpen] = useWatchWindowOpen();
|
|
47
|
+
const context = useWatchWindowContext();
|
|
48
|
+
const removeWatch = useRemoveWatch();
|
|
49
|
+
const close = useCallback(() => setOpen(false), [setOpen]);
|
|
50
|
+
if (!open)
|
|
51
|
+
return null;
|
|
52
|
+
return (React.createElement(WatchWindow, { entries: entries, context: context, onRemove: removeWatch, onClose: close }));
|
|
53
|
+
};
|
|
54
|
+
WatchWindowHost.displayName = "WatchWindowHost";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-cell-renderer.d.ts","sourceRoot":"","sources":["../../../hooks/use-cell-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"use-cell-renderer.d.ts","sourceRoot":"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sCAmE5D,iBAAiB,CAAC,CAAC,CAAC,cAwVX,aAAa,4CAuRxB,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { isNil } from "@rowsncolumns/utils";
|
|
|
3
3
|
import React, { useCallback } from "react";
|
|
4
4
|
import { getHeaderFill } from "../api/colors";
|
|
5
5
|
import { showValidationDropdownArrow } from "../api/validation";
|
|
6
|
+
import { alignmentImpliesWrap, isFillAlignment, } from "../components/cell/alignment";
|
|
6
7
|
import { CellBackground } from "../components/cell/cell-background";
|
|
7
8
|
import { CellDiff as CellDiffRenderer } from "../components/cell-diff";
|
|
8
9
|
import { CellOverlayRenderer } from "../components/cell-overlay";
|
|
@@ -50,10 +51,17 @@ export const useCellRenderer = ({ sheetId, scale, showGridLines, showZeros, isRo
|
|
|
50
51
|
// Calculated column
|
|
51
52
|
const isCalculatedColumn = isTableHeader(rowIndex, columnIndex) &&
|
|
52
53
|
isCalculatedColumnHeader(rowIndex, columnIndex);
|
|
53
|
-
// Cell overflow
|
|
54
|
+
// Cell overflow. Excel's justify / distributed alignments wrap inside
|
|
55
|
+
// the cell's own width even without `wrapStrategy: "wrap"`, and fill
|
|
56
|
+
// repeats the text to the cell edge — none of them ever spill into
|
|
57
|
+
// the neighbouring cells.
|
|
54
58
|
const wrapStrategy = effectiveCellFormat?.wrapStrategy;
|
|
55
|
-
const
|
|
56
|
-
const
|
|
59
|
+
const wrapsByAlignment = alignmentImpliesWrap(horizontalAlignment);
|
|
60
|
+
const fillsCell = isFillAlignment(horizontalAlignment);
|
|
61
|
+
const shouldWrap = wrapStrategy === "wrap" || wrapsByAlignment;
|
|
62
|
+
const isWrapEnabled = (wrapStrategy ?? "overflow") === "overflow" &&
|
|
63
|
+
!wrapsByAlignment &&
|
|
64
|
+
!fillsCell;
|
|
57
65
|
// Normalize display value for both rendering and overflow calculation
|
|
58
66
|
const displayFormattedValue = normalizeDisplayText(formattedValue, shouldWrap);
|
|
59
67
|
const shouldRecalcTextWidth = isWrapEnabled || wrapStrategy === "clip";
|
|
@@ -105,9 +113,12 @@ export const useCellRenderer = ({ sheetId, scale, showGridLines, showZeros, isRo
|
|
|
105
113
|
}
|
|
106
114
|
// shrinkToFit needs the natural text width to compare against the
|
|
107
115
|
// cell's available width; rotated text uses it to size the (unrotated)
|
|
108
|
-
// text box that gets pivoted around the cell edge
|
|
109
|
-
//
|
|
110
|
-
|
|
116
|
+
// text box that gets pivoted around the cell edge; fill alignment
|
|
117
|
+
// repeats the text `floor(cell / natural)` times. Without this, the
|
|
118
|
+
// Konva Text renders with width 0 (rotation) or a single unfilled copy.
|
|
119
|
+
const textWidth = (overflowRight && shouldRecalcTextWidth) ||
|
|
120
|
+
containsTextInside ||
|
|
121
|
+
fillsCell
|
|
111
122
|
? getTextDimension(sheetId, rowIndex, columnIndex, displayFormattedValue).width
|
|
112
123
|
: 0;
|
|
113
124
|
const enableOverflow = shouldOverflow && cellWidth > props.width;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-get-tooltip.d.ts","sourceRoot":"","sources":["../../../hooks/use-get-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAsB,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGrD,KAAK,kBAAkB,CAAC,CAAC,SAAS,QAAQ,IAAI;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,YAAY,CACV,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAClB,CAAC,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;IAC9B;;;;OAIG;IACH,iBAAiB,CACf,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,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AAC;IAChB;;;;OAIG;IACH,YAAY,CACV,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAClB,CAAC,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;IAC9B;;;;OAIG;IACH,iBAAiB,CACf,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAClB,MAAM,GAAG,SAAS,CAAC;IACtB;;;;OAIG;IACH,aAAa,CACX,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAClB,UAAU,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,OAAO,EAAE,CACP,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,KAChB,MAAM,GAAG,SAAS,CAAC;IACxB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,CAClB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,KAChB,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC;;OAEG;IACH,wBAAwB,CAAC,EAAE,CACzB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,KAChB,SAAS,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAC5C;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,QAAQ,EAAE,4IAU/C,kBAAkB,CAAC,CAAC,CAAC,iNAmBf,gBAAgB,6BAiHxB,CAAC"}
|
|
@@ -36,8 +36,13 @@ export const useGetTooltip = ({ getHyperlink, getErrorValue, getFormattedValue,
|
|
|
36
36
|
// Check if we are rendering notes
|
|
37
37
|
// Error has precedence
|
|
38
38
|
const variant = getTooltipVariant(isError, isInvalid, isHyperlink, noteEditorCell ? true : !!note, customTooltipContent ? true : false);
|
|
39
|
-
// Content
|
|
40
|
-
|
|
39
|
+
// Content. An Invalid cell whose rule supplies its own error text
|
|
40
|
+
// (`customTooltipContent`) shows that instead of the generic marker.
|
|
41
|
+
const content = isError
|
|
42
|
+
? errorValue.message
|
|
43
|
+
: isInvalid && !customTooltipContent
|
|
44
|
+
? errorValue.message
|
|
45
|
+
: undefined;
|
|
41
46
|
// Title
|
|
42
47
|
const title = isHyperlink
|
|
43
48
|
? getFormattedValue(sheetId, rowIndex, columnIndex)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-keyboard-handler.d.ts","sourceRoot":"","sources":["../../../hooks/use-keyboard-handler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AASvE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACpB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAEV,UAAU,EACV,aAAa,EAEb,KAAK,EACL,UAAU,EACX,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAuCzD,KAAK,uBAAuB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;IACnC,oBAAoB,EAAE,WAAW,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAAC,CAAC;IAC3E,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC;IAC3D,kBAAkB,EAAE,eAAe,CAAC,oBAAoB,CAAC,CAAC;IAC1D,kBAAkB,EAAE,eAA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