@sheetxl/react 0.8.0-beta.10 → 0.8.0-beta.12
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/browser/esm/B4mT3G7GHwgDYFGP.mjs +128 -0
- package/browser/esm/{BwRduT8FTrk5n72r.mjs → BDlpRkuBok0Uu4Hn.mjs} +1 -1
- package/browser/esm/BR-AiOwuQlYh5-tr.mjs +730 -0
- package/browser/esm/{BuvXl14hs-1CvjeA.mjs → BapujiblfiXDlu67.mjs} +1 -1
- package/browser/esm/{DyU9UInRnfkPYYlR.mjs → CSFORKZ8zrVL_Y0w.mjs} +1 -1
- package/browser/esm/CUekkfE6uwwsdQpc.mjs +36 -0
- package/browser/esm/C_LUq-BnguetvGZz.mjs +23561 -0
- package/browser/esm/{BZcQ-KYwS62Ut45c.mjs → Ck1LbcsdSfKNi6xq.mjs} +1 -1
- package/browser/esm/{CYoUd5KIl7W3AsxH.mjs → Cslk_qRdBSuJIi1O.mjs} +24 -23
- package/browser/esm/CtGhA0kS2MCfEsHN.mjs +262 -0
- package/browser/esm/D22NJmTiky4NL8tM.mjs +8 -0
- package/browser/esm/D2GydDzPuvIjdpok.mjs +42 -0
- package/browser/esm/DGG1auUKsjFbAazu.mjs +60 -0
- package/browser/esm/{Cfe0kofqVKGxLqO6.mjs → DN3lqq95KY0K6f1x.mjs} +1 -1
- package/browser/esm/{DjiBz4H74I6nPUY6.mjs → D_usN3pWuCJU2GN-.mjs} +2 -2
- package/browser/esm/{Sp6PJavGKpF8SJzA.mjs → DhYQRc8L2kALmFNz.mjs} +1 -1
- package/browser/esm/{Bow9CzRJrYxak2i5.mjs → DxEczXCHTerDemDP.mjs} +113 -108
- package/browser/esm/{Dd-ZybXAgoq9pgGv.mjs → LBQDhVhz7S7i6a8i.mjs} +1 -1
- package/browser/esm/{C6urN77szrYwODXF.mjs → ZoS0cpNEBcv6p-Z1.mjs} +1 -1
- package/browser/esm/{cYjYjqEsyd63x8t4.mjs → _6Sb6ElRcZftxMNh.mjs} +1 -1
- package/browser/esm/chart.mjs +33 -52
- package/browser/esm/control.mjs +2 -2
- package/browser/esm/group.mjs +3 -3
- package/browser/esm/index.mjs +8074 -5647
- package/browser/esm/note.mjs +73 -47
- package/browser/esm/picture.mjs +41 -41
- package/browser/esm/shape.mjs +2 -2
- package/browser/esm/slicer.mjs +5 -5
- package/licenses/dependencies.txt +313 -1
- package/node/esm/{Dxbm6ryIDCEi26RO.mjs → Apcuz4_QtBHt7G47.mjs} +1 -1
- package/node/esm/Bi2Jwc0zpweaNzKc.mjs +1697 -0
- package/node/esm/{Buw-VKYJy3y5dbaJ.mjs → C0KLMCRb3sbd5Q20.mjs} +23 -22
- package/node/esm/CH1DVfFhjdd_3pw1.mjs +128 -0
- package/node/esm/{BJ7ZZm63j5O6cvrB.mjs → CNOLkUDURBElaaIf.mjs} +1 -1
- package/node/esm/{DhSq680c5tgMFFbj.mjs → CalVk3o4-kX79s3v.mjs} +1 -1
- package/node/esm/{DYosMUJKp-3MSO4q.mjs → Cp1DuCae46eQKzWy.mjs} +1 -1
- package/node/esm/CzN6c6KyxVmNvayz.mjs +8 -0
- package/node/esm/DKqdv5JubgVaq-g9.mjs +35 -0
- package/node/esm/DWkPWuf5ZrLRMixG.mjs +328 -0
- package/node/esm/{BfRn5S5V4X8xIAEa.mjs → DXiNwr6ZnXBe7TlG.mjs} +1 -1
- package/node/esm/DayGI0Bt57FDNbVF.mjs +37 -0
- package/node/esm/{CM5BT7h-hMtST2bE.mjs → DyetXBW7vFLJWB22.mjs} +1 -1
- package/node/esm/{CFFlJxNwgyInjEnh.mjs → MWges5ywL3aEdChp.mjs} +1 -1
- package/node/esm/{DPN0n6MGYQ9vZ2KO.mjs → T5lfCrudsUnOTxEn.mjs} +1 -1
- package/node/esm/YB_qExw23Ci4nMYy.mjs +263 -0
- package/node/esm/{GkmuxU7OwRZtm2Rf.mjs → bRD1KCpSpAYTEs50.mjs} +1 -1
- package/node/esm/chart.mjs +32 -51
- package/node/esm/control.mjs +2 -2
- package/node/esm/group.mjs +3 -3
- package/node/esm/{C_ANM4feA1xV-pri.mjs → iL9jKJcnED6oi0B4.mjs} +1 -1
- package/node/esm/index.mjs +10998 -8556
- package/node/esm/note.mjs +86 -60
- package/node/esm/picture.mjs +41 -41
- package/node/esm/shape.mjs +285 -332
- package/node/esm/slicer.mjs +15 -15
- package/package.json +8 -6
- package/resources/contents.json +6 -0
- package/resources/locales/contents.json +14 -0
- package/resources/locales/de/chart.cmd.json +82 -0
- package/resources/locales/de/sheet.cmd.json +32 -0
- package/resources/locales/de/table.cmd.json +1 -1
- package/resources/locales/de/ui.msg.json +12 -0
- package/resources/locales/de/workbook.cmd.json +11 -0
- package/resources/locales/en/chart.cmd.json +82 -0
- package/resources/locales/en/sheet.cmd.json +32 -0
- package/resources/locales/en/table.cmd.json +1 -1
- package/resources/locales/en/ui.msg.json +14 -0
- package/resources/locales/en/workbook.cmd.json +11 -0
- package/types/src/autoFill/FillMenu.d.ts +2 -2
- package/types/src/autoFill/FillSeries.d.ts +2 -2
- package/types/src/border/StaticBorderRenderer.d.ts +18 -1
- package/types/src/border/useBorders.d.ts +76 -3
- package/types/src/cell/CellCheckboxRenderer.d.ts +20 -0
- package/types/src/cell/CellContent.d.ts +68 -0
- package/types/src/cell/CellControlContext.d.ts +37 -0
- package/types/src/cell/{FormulaCellRenderer.d.ts → CellFormulaRenderer.d.ts} +10 -7
- package/types/src/cell/CellImageRenderer.d.ts +11 -0
- package/types/src/cell/CellRenderers.d.ts +190 -0
- package/types/src/cell/{SheetCellRenderer.d.ts → CellTextRenderer.d.ts} +9 -6
- package/types/src/cell/ColumnButton.d.ts +3 -3
- package/types/src/cell/OutlineButton.d.ts +4 -4
- package/types/src/cell/SheetHeaderRenderer.d.ts +1 -1
- package/types/src/cell/index.d.ts +8 -2
- package/types/src/cell/useFormulaViewAnchor.d.ts +3 -3
- package/types/src/cell/useInsertableCellControls.d.ts +25 -0
- package/types/src/chart/ChartCommands.d.ts +15 -0
- package/types/src/chart/ChartEditor.d.ts +12 -2
- package/types/src/chart/ChartElement.d.ts +122 -0
- package/types/src/chart/ChartKind.d.ts +7 -0
- package/types/src/chart/PresetChartTypeDescriptors.d.ts +3 -1
- package/types/src/chart/index.d.ts +2 -0
- package/types/src/chart/paint/_fills.d.ts +24 -0
- package/types/src/chart/paint/_graphics.d.ts +46 -0
- package/types/src/chart/paint/_mode.d.ts +6 -0
- package/types/src/chart/paint/echarts.d.ts +33 -0
- package/types/src/chart/paint/index.d.ts +12 -0
- package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +140 -0
- package/types/src/chart/paint/kinds/_Area.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_BoxWhisker.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bubble.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Funnel.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Histogram.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Line.d.ts +10 -0
- package/types/src/chart/paint/kinds/_OfPie.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Pie.d.ts +21 -0
- package/types/src/chart/paint/kinds/_Placeholder.d.ts +7 -0
- package/types/src/chart/paint/kinds/_Radar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Scatter.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Sunburst.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Surface.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Treemap.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Waterfall.d.ts +3 -0
- package/types/src/chart/paint/kinds/_builtIns.d.ts +12 -0
- package/types/src/chart/paint/toEChartsOption.d.ts +42 -0
- package/types/src/clipboard/ClipboardCommands.d.ts +3 -3
- package/types/src/clipboard/SheetClipboardLayer.d.ts +2 -2
- package/types/src/comment/CommentCardRequest.d.ts +9 -9
- package/types/src/comment/useSheetComments.d.ts +2 -2
- package/types/src/context/WorksheetContext.d.ts +18 -0
- package/types/src/context/index.d.ts +1 -1
- package/types/src/editableLabel/EditableLabel.d.ts +3 -1
- package/types/src/editor/EditorCommands.d.ts +3 -3
- package/types/src/editor/SheetCellEditorLayer.d.ts +2 -2
- package/types/src/editor/SheetCellEditorStartLayer.d.ts +22 -5
- package/types/src/editor/SheetEditable.d.ts +6 -6
- package/types/src/editor/SheetReferenceHeaderLayer.d.ts +1 -1
- package/types/src/editor/SheetReferenceLayer.d.ts +4 -4
- package/types/src/editor/VirtualKeyboardLayer.d.ts +49 -0
- package/types/src/editor/formulaAnchor.d.ts +12 -0
- package/types/src/editor/index.d.ts +1 -0
- package/types/src/editor/pickedReference.d.ts +3 -3
- package/types/src/editor/useEditRejectedNotice.d.ts +3 -3
- package/types/src/editor/useFormulaHints.d.ts +3 -3
- package/types/src/editor/validationAlert.d.ts +3 -3
- package/types/src/frame/CommandContext.d.ts +7 -7
- package/types/src/index.d.ts +2 -0
- package/types/src/layer/BorderLayer.d.ts +2 -2
- package/types/src/layer/CellErrorLayer.d.ts +5 -4
- package/types/src/layer/CellFillLayer.d.ts +2 -2
- package/types/src/layer/CellIndicatorLayer.d.ts +31 -0
- package/types/src/layer/CellInsertLayer.d.ts +71 -0
- package/types/src/layer/CircularIndicatorLayer.d.ts +2 -2
- package/types/src/layer/CommentCardLayer.d.ts +2 -2
- package/types/src/layer/CommentsLayer.d.ts +2 -2
- package/types/src/layer/ConditionalBarLayer.d.ts +2 -2
- package/types/src/layer/ConditionalIconsLayer.d.ts +2 -2
- package/types/src/layer/ContextMenuLayer.d.ts +2 -2
- package/types/src/layer/GridFreezeLayer.d.ts +2 -2
- package/types/src/layer/HeaderSelectionLayer.d.ts +4 -4
- package/types/src/layer/HyperlinkLayer.d.ts +11 -8
- package/types/src/layer/MovableKindScope.d.ts +2 -2
- package/types/src/layer/ProtectionLayer.d.ts +4 -5
- package/types/src/layer/RangeAnnotationLayer.d.ts +2 -2
- package/types/src/layer/ResizeIndicator.d.ts +2 -2
- package/types/src/layer/SheetBackgroundLayer.d.ts +3 -3
- package/types/src/layer/SheetCellLayer.d.ts +15 -8
- package/types/src/layer/SheetColumnButtonLayer.d.ts +2 -2
- package/types/src/layer/SheetGridLineLayer.d.ts +11 -13
- package/types/src/layer/SheetLayers.d.ts +115 -0
- package/types/src/layer/SheetMovableLayer.d.ts +4 -3
- package/types/src/layer/SheetOutlineLayer.d.ts +3 -3
- package/types/src/layer/SheetTableCommandLayer.d.ts +2 -2
- package/types/src/layer/SpillLayer.d.ts +2 -2
- package/types/src/layer/TableLayer.d.ts +3 -3
- package/types/src/layer/TableToolbar.d.ts +4 -4
- package/types/src/layer/ValidationDropdownLayer.d.ts +2 -2
- package/types/src/layer/ValidationIndicatorLayer.d.ts +2 -2
- package/types/src/layer/ValidationPromptLayer.d.ts +21 -8
- package/types/src/layer/_tableColor.d.ts +2 -2
- package/types/src/layer/index.d.ts +3 -0
- package/types/src/layer/useFreezeDrag.d.ts +2 -2
- package/types/src/layer/useNormalBorderLines.d.ts +15 -0
- package/types/src/layer/useSheetFeatureRegions.d.ts +2 -2
- package/types/src/layer/useSheetVisibleCells.d.ts +2 -2
- package/types/src/layer/useSheetVisibleDecorations.d.ts +2 -2
- package/types/src/layer/useTableHeaderCells.d.ts +2 -2
- package/types/src/layer/useValidationPicker.d.ts +2 -2
- package/types/src/layer/useVisibleTables.d.ts +2 -2
- package/types/src/layer/validationMark.d.ts +3 -3
- package/types/src/listener/index.d.ts +5 -0
- package/types/src/listener/useCell.d.ts +29 -0
- package/types/src/listener/useCellRange.d.ts +23 -0
- package/types/src/listener/useCellValue.d.ts +26 -0
- package/types/src/listener/useModelListener.d.ts +4 -4
- package/types/src/listener/useRangeListener.d.ts +13 -7
- package/types/src/listener/useRangeSnapshot.d.ts +35 -0
- package/types/src/listener/useTable.d.ts +26 -0
- package/types/src/movable/DefaultMovable.d.ts +8 -0
- package/types/src/movable/MovableCommands.d.ts +2 -2
- package/types/src/movable/MovableControl.d.ts +3 -1
- package/types/src/movable/MovableFrame.d.ts +2 -1
- package/types/src/movable/MovableLayer.d.ts +6 -3
- package/types/src/movable/MovableRenderers.d.ts +3 -3
- package/types/src/movable/index.d.ts +1 -0
- package/types/src/picker/cellPickerOpen.d.ts +3 -3
- package/types/src/picker/useCellPicker.d.ts +2 -2
- package/types/src/richText/RichTextEditor.d.ts +2 -2
- package/types/src/selection/SelectionCommands.d.ts +2 -2
- package/types/src/selection/SheetSelectionLayer.d.ts +2 -2
- package/types/src/sheet/ISheetHeaderElement.d.ts +3 -3
- package/types/src/sheet/{ISheetElement.d.ts → IWorksheetElement.d.ts} +64 -32
- package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
- package/types/src/sheet/SheetCommandProvider.d.ts +5 -2
- package/types/src/sheet/SheetCommands.d.ts +2 -2
- package/types/src/sheet/SheetKindIcon.d.ts +14 -0
- package/types/src/sheet/SheetOutlineElement.d.ts +6 -6
- package/types/src/sheet/SheetPanels.d.ts +11 -0
- package/types/src/sheet/SheetScrollbar.d.ts +3 -3
- package/types/src/sheet/TopLeftCorner.d.ts +2 -2
- package/types/src/sheet/WorksheetElement.d.ts +12 -0
- package/types/src/sheet/_freezeAt.d.ts +2 -2
- package/types/src/sheet/circularReferences.d.ts +3 -3
- package/types/src/sheet/index.d.ts +5 -2
- package/types/src/sheet/useCycleHighlight.d.ts +2 -2
- package/types/src/tabStrip/SheetTab.d.ts +1 -1
- package/types/src/tabStrip/Sortable.d.ts +5 -5
- package/types/src/tabStrip/TabStrip.d.ts +6 -6
- package/types/src/tabStrip/TabStripItem.d.ts +15 -13
- package/types/src/table/TableCommands.d.ts +2 -2
- package/types/src/taskPane/CellControlPane.d.ts +17 -0
- package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
- package/types/src/taskPane/index.d.ts +1 -0
- package/types/src/taskPane/useTaskPane.d.ts +6 -3
- package/types/src/theme/buildOOXMLThemeCSS.d.ts +2 -2
- package/types/src/theme/useGridColorScheme.d.ts +1 -1
- package/types/src/theme/useSystemColors.d.ts +2 -2
- package/types/src/workbook/DefaultRenderers.d.ts +5 -4
- package/types/src/workbook/IWorkbookElement.d.ts +76 -22
- package/types/src/workbook/WorkbookStrip.d.ts +5 -5
- package/browser/esm/BHjeSMaycUkS5dVL.mjs +0 -66
- package/browser/esm/CYMRbtPIr6SklGpp.mjs +0 -775
- package/browser/esm/CiRN-woJZWYOgTn4.mjs +0 -36
- package/browser/esm/J8cPagZBeXz86Lnd.mjs +0 -777
- package/node/esm/BpwE3HqTnrLLzE3C.mjs +0 -775
- package/node/esm/CV3bT3Hql74GcHoU.mjs +0 -37
- package/node/esm/D3YXHeOyFp00Xk3m.mjs +0 -323
- package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-template.json.d.ts +0 -9
- package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-template.json.d.ts +0 -9
- package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-template.json.d.ts +0 -9
- package/types/src/chart/templates/line-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-template.json.d.ts +0 -9
- package/types/src/chart/templates/pie-doughnut-template.json.d.ts +0 -10
- package/types/src/chart/templates/pie-template.json.d.ts +0 -9
- package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-markers-template.json.d.ts +0 -10
- package/types/src/context/SheetContext.d.ts +0 -18
- package/types/src/sheet/SheetElement.d.ts +0 -15
package/node/esm/note.mjs
CHANGED
|
@@ -1,87 +1,113 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { t as e } from "./
|
|
8
|
-
import { t } from "./
|
|
9
|
-
import { t
|
|
10
|
-
import { Color as
|
|
11
|
-
import { forwardRef as
|
|
12
|
-
import { jsx as
|
|
13
|
-
import { useImperativeElement as
|
|
14
|
-
var
|
|
15
|
-
if (
|
|
16
|
-
return e.
|
|
7
|
+
import { t as e } from "./MWges5ywL3aEdChp.mjs";
|
|
8
|
+
import { t as o } from "./bRD1KCpSpAYTEs50.mjs";
|
|
9
|
+
import { t } from "./T5lfCrudsUnOTxEn.mjs";
|
|
10
|
+
import { Color as r, IColor as n, IFont as i, IFontStyle as l, IStroke as a } from "@sheetxl/sdk";
|
|
11
|
+
import { forwardRef as s, memo as d, useReducer as c } from "react";
|
|
12
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
13
|
+
import { useImperativeElement as m } from "@sheetxl/utils-react";
|
|
14
|
+
var p = new r(n.Named.InfoBk).toCSS("adaptive"), S = new r(n.Named.InfoText).toCSS("adaptive"), u = (e, o) => {
|
|
15
|
+
if (o) try {
|
|
16
|
+
return e.getWorksheet().getStyles().parseColor(o)?.toCSS("adaptive");
|
|
17
17
|
} catch {
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
},
|
|
21
|
-
let
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
24
|
-
|
|
20
|
+
}, b = (e, o) => {
|
|
21
|
+
let t = o.family;
|
|
22
|
+
if (t === l.ThemeFamily.Heading || t === l.ThemeFamily.Body) {
|
|
23
|
+
const o = e.getWorksheet().getStyles().getTheme().getFontScheme();
|
|
24
|
+
t = (t === l.ThemeFamily.Heading ? o.getMajorFont() : o.getMinorFont()) ?? void 0;
|
|
25
25
|
}
|
|
26
|
-
if (
|
|
27
|
-
},
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
},
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
if (t) return [t, ...o.fallbacks ?? []].map((e) => e.includes(" ") ? `"${e}"` : e).join(", ");
|
|
27
|
+
}, h = (e) => {
|
|
28
|
+
const o = [], t = e.underline;
|
|
29
|
+
if (t && t !== i.UnderlineStyle.None && o.push("underline"), e.strike && e.strike !== i.StrikeStyle.None && o.push("line-through"), 0 === o.length) return;
|
|
30
|
+
const r = t === i.UnderlineStyle.Double || t === i.UnderlineStyle.DoubleAccounting;
|
|
31
|
+
return o.join(" ") + (r ? " double" : "");
|
|
32
|
+
}, f = (e) => {
|
|
33
|
+
const o = {
|
|
34
|
+
borderWidth: "1px",
|
|
35
|
+
borderStyle: "solid",
|
|
36
|
+
borderColor: `var(--sxl-note-border-color, ${S})`,
|
|
37
|
+
backgroundColor: `var(--sxl-note-background-color, ${p})`
|
|
38
|
+
}, t = e.getStyle(), r = t?.toJSON();
|
|
39
|
+
if (!t || !r) return o;
|
|
40
|
+
try {
|
|
41
|
+
if (r.fill && (delete o.backgroundColor, Object.assign(o, t.getFill().toCSS("adaptive"))), r.stroke) {
|
|
42
|
+
const e = t.getStroke();
|
|
43
|
+
if (e.isVisible()) {
|
|
44
|
+
const { borderWidth: t, borderStyle: r, borderColor: n } = e.toCSS("adaptive");
|
|
45
|
+
Object.assign(o, {
|
|
46
|
+
borderWidth: t,
|
|
47
|
+
borderStyle: r,
|
|
48
|
+
borderColor: n
|
|
49
|
+
}), e.getCompound() !== a.Compound.Single && (o.borderStyle = "double");
|
|
50
|
+
} else o.borderStyle = "none";
|
|
51
|
+
}
|
|
52
|
+
} catch {}
|
|
53
|
+
return o;
|
|
54
|
+
}, y = d(s((r, n) => {
|
|
55
|
+
const { children: i, disabled: l, style: a, note: s, movable: d, zoom: p = 1, isDragging: y, onHide: v, onShow: C, onDragZone: x, adornmentHost: k, flip: N, gesture: j, ...F } = r, [, z] = c((e) => e + 1, 0);
|
|
56
|
+
e(s, {
|
|
57
|
+
onContentChange: () => {
|
|
58
|
+
z();
|
|
59
|
+
},
|
|
60
|
+
onAnyChange: () => {
|
|
61
|
+
z();
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
const D = m(n, () => ({ isNoteEditor: () => !0 }), []);
|
|
65
|
+
if (!s.isDeleted() && s.isNote()) return g(o, {
|
|
39
66
|
className: "note-editor",
|
|
40
|
-
...
|
|
41
|
-
ref:
|
|
42
|
-
movable:
|
|
67
|
+
...F,
|
|
68
|
+
ref: D,
|
|
69
|
+
movable: d,
|
|
43
70
|
onContextMenu: (e) => {
|
|
44
71
|
e.stopPropagation();
|
|
45
72
|
},
|
|
46
|
-
onDragZone:
|
|
47
|
-
disabled:
|
|
73
|
+
onDragZone: x,
|
|
74
|
+
disabled: l,
|
|
48
75
|
style: {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
color: `var(--sxl-note-color, ${g})`,
|
|
76
|
+
...f(s),
|
|
77
|
+
color: `var(--sxl-note-color, ${S})`,
|
|
52
78
|
fontFamily: "Tahoma, sans-serif",
|
|
53
79
|
fontSize: "9pt",
|
|
54
|
-
zoom:
|
|
80
|
+
zoom: p,
|
|
55
81
|
boxShadow: y ? "1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))" : void 0,
|
|
56
|
-
...
|
|
82
|
+
...a
|
|
57
83
|
},
|
|
58
84
|
contentStyle: { padding: "0px 1px" },
|
|
59
|
-
children:
|
|
60
|
-
value:
|
|
61
|
-
readOnly:
|
|
62
|
-
runStyle: (e) => ((e,
|
|
63
|
-
if (!
|
|
64
|
-
const
|
|
65
|
-
let
|
|
66
|
-
return
|
|
67
|
-
fontFamily:
|
|
68
|
-
fontSize:
|
|
69
|
-
fontWeight:
|
|
70
|
-
fontStyle:
|
|
71
|
-
textDecoration:
|
|
72
|
-
verticalAlign:
|
|
73
|
-
letterSpacing: void 0 !==
|
|
74
|
-
color:
|
|
85
|
+
children: g(t, {
|
|
86
|
+
value: s.getRichContent() ?? s.getContent(),
|
|
87
|
+
readOnly: l,
|
|
88
|
+
runStyle: (e) => ((e, o) => {
|
|
89
|
+
if (!o) return;
|
|
90
|
+
const t = !!o.baseline;
|
|
91
|
+
let r = void 0 !== o.size ? `${o.size}pt` : void 0;
|
|
92
|
+
return t && (r = void 0 !== o.size ? .66 * o.size + "pt" : "smaller"), {
|
|
93
|
+
fontFamily: b(e, o),
|
|
94
|
+
fontSize: r,
|
|
95
|
+
fontWeight: o.weight,
|
|
96
|
+
fontStyle: o.style,
|
|
97
|
+
textDecoration: h(o),
|
|
98
|
+
verticalAlign: t ? o.baseline > 0 ? "super" : "sub" : void 0,
|
|
99
|
+
letterSpacing: void 0 !== o.letterSpacing ? `${o.letterSpacing}px` : void 0,
|
|
100
|
+
color: u(e, o.color)
|
|
75
101
|
};
|
|
76
|
-
})(
|
|
102
|
+
})(s, e),
|
|
77
103
|
onChange: (e) => {
|
|
78
|
-
|
|
104
|
+
s.setContent(e);
|
|
79
105
|
},
|
|
80
106
|
onDone: () => {
|
|
81
|
-
|
|
107
|
+
d?.unselect();
|
|
82
108
|
}
|
|
83
109
|
})
|
|
84
110
|
});
|
|
85
111
|
}));
|
|
86
|
-
|
|
87
|
-
export {
|
|
112
|
+
y.displayName = "NoteEditor";
|
|
113
|
+
export { y as NoteEditor };
|
package/node/esm/picture.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { t as o } from "./
|
|
7
|
+
import { t as o } from "./MWges5ywL3aEdChp.mjs";
|
|
8
8
|
import { forwardRef as r, memo as t, useEffect as e, useMemo as i, useReducer as n, useState as l } from "react";
|
|
9
9
|
import { jsx as a, jsxs as f } from "react/jsx-runtime";
|
|
10
|
-
import { useImperativeElement as x } from "@sheetxl/utils-react";
|
|
11
|
-
var
|
|
12
|
-
const { children:
|
|
13
|
-
o(
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
import { useImperativeElement as x, usePendingRender as c } from "@sheetxl/utils-react";
|
|
11
|
+
var d = "data:image/webp;base64,UklGRhIPAABXRUJQVlA4TAYPAAAv/8F/EM8HIZJtWU0fdlTh3wRCIMlkE+EqkiTFyt57/KQ8/zKeEf5iaseNJClS1DGDxWcwvhfuCo5tW88SHw8Xh5ypbC3tnf8QHEfOB/D97w4PuFHBIx6MHJ74zvj/0aLdlH9AYWEjHiwOJR5M7Q+FAigmTRQOJRqczrVUKABQSMYgoAFFAhIwBkgaYEkBSABowDGgcYakUZirArQhRMUIIHGLBIAEEoDRfyokIAEAMhrSRmEOSPyS/jvR+BYFIWkUhLQhCpLGGQ2rhPiCOKPxDIVQmAZQDMYIjCTfNQXVJv8pnQqhuAonnczGDPv0VwFw/w+uGiAwQYjJXxffaJzROKPHoArGAPA+6o9AtiIj4XgAWGKCwAQBVNMSHQNEjTMqOSWPQEFRHOVl4vp/nnhI/DB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1x2e+DzScQ6fTAsmZ2xtTz+n5juS5bGlM+m66meSZPl7Y2dnUnjLtmaIsSpxVEdSerkuvwiTmOedIMV38uKUcHfXqwFSflVL4zPDeJxhV3uyBB2/cnx4+sK8QJahqm47Y8PNg9c0JItRedyM2PAxMWqZQVakyrgZMeFg7y8PsS7VeuO70P4bxP3ZRaUGWZ6OmVv9oSk63llBVqkLh4Zt9IaW1Tt6tjfIYhWRY86YGCKH/WWGmUOWraaHxzw1yV2DMxQ2zHq51Tmyfl2o99bI25Jig2vP54ljDp9ykLWsdj3fkO9vvWPKtL8wndo7YeztOy8bcKh5OVncyhq2XNrd96ZpLrjy5/qYb/l8S7q2r1NJlj/bf7b/bP/Z/rP9Z/vP9p/tP9t/tv9s//3djwA=", u = t(r((r, t) => {
|
|
12
|
+
const { children: u, disabled: s, style: p, picture: P, zoom: g, description: h, tile: v, offsetX: Z = 0, offsetY: O = 0, isDragging: m, onHide: b, onShow: w, onDragZone: y, adornmentHost: C, flip: F, onKeyDownCapture: k, onFocus: z, onBlur: Q, loadingPanel: S, ...Y } = r, [j, X] = l(!1), [W, A] = l(null), [R, q] = l(null), [D, G] = l(null), [H, V] = n((o) => o + 1, 0);
|
|
13
|
+
o(P, { onAnyChange: V }), c(!j && (v ? !R : !W)), e(() => {
|
|
14
|
+
q(null), P.getDetails().then((o) => {
|
|
15
|
+
X(!1), q(o.asUrl()), G(o.asSVGText?.() || null);
|
|
16
16
|
}).catch((o) => {
|
|
17
|
-
console.warn(o),
|
|
17
|
+
console.warn(o), X(!0), q(d), G(null);
|
|
18
18
|
});
|
|
19
|
-
}, [
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
backgroundPosition: `${
|
|
23
|
-
backgroundImage: `url(${
|
|
19
|
+
}, [P, H]);
|
|
20
|
+
const J = x(t, () => ({ isPictureEditor: () => !0 }), []), M = i(() => {
|
|
21
|
+
if (R || D) return v ? a("div", { style: {
|
|
22
|
+
backgroundPosition: `${Z}px ${O}px`,
|
|
23
|
+
backgroundImage: `url(${R})`,
|
|
24
24
|
backgroundRepeat: "repeat",
|
|
25
25
|
backgroundSize: "auto",
|
|
26
26
|
width: "100%",
|
|
@@ -31,56 +31,56 @@ var c = "data:image/webp;base64,UklGRhIPAABXRUJQVlA4TAYPAAAv/8F/EM8HIZJtWU0fdlTh
|
|
|
31
31
|
flex: "1",
|
|
32
32
|
width: "100%",
|
|
33
33
|
height: "100%",
|
|
34
|
-
border:
|
|
35
|
-
backgroundColor:
|
|
36
|
-
boxShadow:
|
|
37
|
-
objectFit:
|
|
38
|
-
opacity:
|
|
34
|
+
border: j ? "var(--sxl-color-neutral, grey) solid 1px" : void 0,
|
|
35
|
+
backgroundColor: j ? "var(--sxl-color-base-100, white)" : void 0,
|
|
36
|
+
boxShadow: j ? "0px 0px 3px var(--sxl-color-error, red)" : void 0,
|
|
37
|
+
objectFit: j ? "contain" : void 0,
|
|
38
|
+
opacity: W ? 1 : 0,
|
|
39
39
|
filter: "var(--sxl-image-filter)"
|
|
40
40
|
},
|
|
41
41
|
draggable: !1,
|
|
42
|
-
src:
|
|
42
|
+
src: R ?? void 0,
|
|
43
43
|
onLoad: () => {
|
|
44
|
-
|
|
44
|
+
A(!0);
|
|
45
45
|
},
|
|
46
46
|
onError: ({ currentTarget: o }) => {
|
|
47
|
-
console.log("error"), o.onerror = null,
|
|
47
|
+
console.log("error"), o.onerror = null, q(d), X(!0);
|
|
48
48
|
},
|
|
49
|
-
alt:
|
|
49
|
+
alt: h ?? `${P.getType()}`
|
|
50
50
|
});
|
|
51
51
|
}, [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
h,
|
|
52
|
+
W,
|
|
53
|
+
P,
|
|
54
|
+
R,
|
|
55
|
+
D,
|
|
56
|
+
m,
|
|
58
57
|
v,
|
|
59
|
-
Z
|
|
58
|
+
Z,
|
|
59
|
+
O
|
|
60
60
|
]);
|
|
61
|
-
if (
|
|
62
|
-
const
|
|
61
|
+
if (P.isDeleted()) return;
|
|
62
|
+
const I = F && (F.horizontal || F.vertical) ? `scale(${F.horizontal ? -1 : 1}, ${F.vertical ? -1 : 1})` : void 0;
|
|
63
63
|
return f("div", {
|
|
64
64
|
className: "picture-editor",
|
|
65
65
|
style: {
|
|
66
66
|
position: "relative",
|
|
67
67
|
display: "flex",
|
|
68
68
|
flex: "1 1 100%",
|
|
69
|
-
filter:
|
|
70
|
-
transform:
|
|
69
|
+
filter: m ? "drop-shadow(1px 1px 1.5px var(--sxl-color-shadow, rgba(0, 0, 0, .25)))" : void 0,
|
|
70
|
+
transform: I,
|
|
71
71
|
transformOrigin: "center",
|
|
72
|
-
...
|
|
72
|
+
...p,
|
|
73
73
|
width: "100%",
|
|
74
74
|
height: "100%"
|
|
75
75
|
},
|
|
76
76
|
tabIndex: 0,
|
|
77
|
-
...
|
|
77
|
+
...Y,
|
|
78
78
|
onKeyDownCapture: (o) => {
|
|
79
|
-
|
|
79
|
+
k?.(o);
|
|
80
80
|
},
|
|
81
|
-
ref:
|
|
82
|
-
children: [
|
|
81
|
+
ref: J,
|
|
82
|
+
children: [W || j ? void 0 : S, M]
|
|
83
83
|
});
|
|
84
84
|
}));
|
|
85
|
-
|
|
86
|
-
export {
|
|
85
|
+
u.displayName = "PictureEditor";
|
|
86
|
+
export { u as PictureEditor };
|