@sheetxl/react 0.8.0-beta.1 → 0.8.0-beta.10
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/BHjeSMaycUkS5dVL.mjs +66 -0
- package/browser/esm/BZcQ-KYwS62Ut45c.mjs +20 -0
- package/browser/esm/Bow9CzRJrYxak2i5.mjs +318 -0
- package/browser/esm/BuvXl14hs-1CvjeA.mjs +2706 -0
- package/browser/esm/BwRduT8FTrk5n72r.mjs +32 -0
- package/browser/esm/C6urN77szrYwODXF.mjs +134 -0
- package/browser/esm/CYMRbtPIr6SklGpp.mjs +775 -0
- package/browser/esm/CYoUd5KIl7W3AsxH.mjs +196 -0
- package/browser/esm/Cfe0kofqVKGxLqO6.mjs +31 -0
- package/browser/esm/CiRN-woJZWYOgTn4.mjs +36 -0
- package/browser/esm/Dd-ZybXAgoq9pgGv.mjs +45 -0
- package/browser/esm/DjiBz4H74I6nPUY6.mjs +79 -0
- package/browser/esm/DyU9UInRnfkPYYlR.mjs +63 -0
- package/browser/esm/J8cPagZBeXz86Lnd.mjs +777 -0
- package/browser/esm/Sp6PJavGKpF8SJzA.mjs +75 -0
- package/browser/esm/cYjYjqEsyd63x8t4.mjs +67 -0
- package/browser/esm/chart.mjs +60 -0
- package/browser/esm/control.mjs +216 -0
- package/browser/esm/group.mjs +123 -0
- package/browser/esm/index.mjs +14070 -9138
- package/browser/esm/note.mjs +86 -0
- package/browser/esm/picture.mjs +86 -0
- package/{node/esm/DAE_NG8D9uT50zUH.mjs → browser/esm/shape.mjs} +2 -4
- package/browser/esm/slicer.mjs +276 -0
- package/licenses/dependencies.txt +6 -599
- package/node/esm/BJ7ZZm63j5O6cvrB.mjs +134 -0
- package/node/esm/BfRn5S5V4X8xIAEa.mjs +20 -0
- package/node/esm/BpwE3HqTnrLLzE3C.mjs +775 -0
- package/node/esm/Buw-VKYJy3y5dbaJ.mjs +197 -0
- package/node/esm/CFFlJxNwgyInjEnh.mjs +45 -0
- package/node/esm/CM5BT7h-hMtST2bE.mjs +2706 -0
- package/node/esm/CV3bT3Hql74GcHoU.mjs +37 -0
- package/node/esm/C_ANM4feA1xV-pri.mjs +32 -0
- package/node/esm/D3YXHeOyFp00Xk3m.mjs +323 -0
- package/node/esm/DPN0n6MGYQ9vZ2KO.mjs +80 -0
- package/node/esm/DYosMUJKp-3MSO4q.mjs +76 -0
- package/node/esm/DhSq680c5tgMFFbj.mjs +68 -0
- package/node/esm/Dxbm6ryIDCEi26RO.mjs +66 -0
- package/node/esm/GkmuxU7OwRZtm2Rf.mjs +63 -0
- package/node/esm/chart.mjs +60 -0
- package/node/esm/control.mjs +216 -0
- package/node/esm/group.mjs +123 -0
- package/node/esm/index.mjs +16618 -11534
- package/node/esm/note.mjs +87 -0
- package/node/esm/picture.mjs +86 -0
- package/node/esm/shape.mjs +783 -0
- package/node/esm/slicer.mjs +278 -0
- package/package.json +53 -14
- package/resources/contents.json +18 -0
- package/resources/locales/contents.json +42 -0
- package/resources/locales/de/movable.cmd.json +154 -0
- package/resources/locales/de/picture.cmd.json +31 -0
- package/resources/locales/de/selection.cmd.json +8 -0
- package/resources/locales/de/shape.cmd.json +17 -0
- package/resources/locales/de/sheet.cmd.json +328 -21
- package/resources/locales/de/slicer.cmd.json +17 -0
- package/resources/locales/de/table.cmd.json +9 -1
- package/resources/locales/de/ui.msg.json +309 -3
- package/resources/locales/de/workbook.cmd.json +10 -6
- package/resources/locales/en/movable.cmd.json +154 -0
- package/resources/locales/en/picture.cmd.json +31 -0
- package/resources/locales/en/selection.cmd.json +8 -0
- package/resources/locales/en/shape.cmd.json +17 -0
- package/resources/locales/en/sheet.cmd.json +342 -22
- package/resources/locales/en/slicer.cmd.json +17 -0
- package/resources/locales/en/table.cmd.json +9 -1
- package/resources/locales/en/ui.msg.json +309 -3
- package/resources/locales/en/workbook.cmd.json +11 -7
- package/types/chart.d.ts +2 -0
- package/types/control.d.ts +2 -0
- package/types/group.d.ts +2 -0
- package/types/note.d.ts +2 -0
- package/types/picture.d.ts +2 -0
- package/types/shape.d.ts +2 -0
- package/types/slicer.d.ts +2 -0
- package/types/src/annotation/RangeAnnotations.d.ts +119 -0
- package/types/src/annotation/index.d.ts +2 -0
- package/types/src/autoFill/AutoFillPresets.d.ts +14 -0
- package/types/src/autoFill/FillMenu.d.ts +36 -0
- package/types/src/autoFill/FillSeries.d.ts +38 -0
- package/types/src/autoFill/index.d.ts +4 -0
- package/types/src/border/StaticBorderRenderer.d.ts +2 -2
- package/types/src/border/useBorders.d.ts +7 -7
- package/types/src/cell/CornerTriangle.d.ts +6 -0
- package/types/src/cell/FormulaCellRenderer.d.ts +1 -1
- package/types/src/cell/OutlineButton.d.ts +123 -0
- package/types/src/cell/SheetCellRenderer.d.ts +2 -2
- package/types/src/cell/SheetHeaderRenderer.d.ts +5 -0
- package/types/src/cell/StaticCellRenderer.d.ts +57 -0
- package/types/src/cell/index.d.ts +2 -0
- package/types/src/cell/useFormulaViewAnchor.d.ts +1 -1
- package/types/src/chart/index.d.ts +0 -1
- package/types/src/checklist/ValueChecklist.d.ts +112 -0
- package/types/src/checklist/index.d.ts +2 -0
- package/types/src/commands/ContextualToolbar.d.ts +19 -0
- package/types/src/commands/createTransactionalMiddleware.d.ts +4 -1
- package/types/src/commands/index.d.ts +1 -0
- package/types/src/comment/CommentCardRequest.d.ts +94 -0
- package/types/src/comment/CommentUtils.d.ts +43 -0
- package/types/src/comment/NoteEditor.d.ts +20 -0
- package/types/src/comment/index.d.ts +5 -0
- package/types/src/comment/useCommentThread.d.ts +37 -0
- package/types/src/comment/useSheetComments.d.ts +28 -0
- package/types/src/{sheet → conditionalFormat}/ConditionalFormatPresets.d.ts +6 -6
- package/types/src/conditionalFormat/index.d.ts +1 -0
- package/types/src/control/FormControlRenderers.d.ts +22 -0
- package/types/src/editor/FunctionPreviewPanel.d.ts +15 -1
- package/types/src/editor/NamedItemLabel.d.ts +29 -0
- package/types/src/editor/NamedItemsPanel.d.ts +13 -2
- package/types/src/editor/SheetCellEditorLayer.d.ts +3 -7
- package/types/src/editor/SheetCellEditorStartLayer.d.ts +44 -0
- package/types/src/editor/SheetCellInput.d.ts +26 -2
- package/types/src/editor/SheetEditable.d.ts +8 -2
- package/types/src/editor/formulaCaret.d.ts +39 -10
- package/types/src/editor/formulaEval.d.ts +9 -5
- package/types/src/editor/formulaLint.d.ts +36 -0
- package/types/src/editor/formulaPresentation.d.ts +7 -0
- package/types/src/editor/formulaText.d.ts +17 -5
- package/types/src/editor/functionArgs.d.ts +20 -0
- package/types/src/editor/index.d.ts +4 -1
- package/types/src/editor/pickedReference.d.ts +76 -0
- package/types/src/editor/useEditRejectedNotice.d.ts +32 -0
- package/types/src/editor/useFormulaHints.d.ts +93 -3
- package/types/src/editor/useFormulaInput.d.ts +30 -4
- package/types/src/editor/useReferenceMode.d.ts +12 -0
- package/types/src/editor/validationAlert.d.ts +24 -0
- package/types/src/externalLink/ExternalLinksPaneArgs.d.ts +23 -0
- package/types/src/externalLink/index.d.ts +2 -0
- package/types/src/form/FormulaInput.d.ts +18 -2
- package/types/src/form/FormulaInputParts.d.ts +10 -1
- package/types/src/form/useEditCommit.d.ts +23 -3
- package/types/src/form/useInputField.d.ts +2 -3
- package/types/src/frame/CommandContext.d.ts +188 -6
- package/types/src/group/GroupEditor.d.ts +25 -0
- package/types/src/index.d.ts +12 -2
- package/types/src/io/WorkbookIO.d.ts +2 -0
- package/types/src/layer/CellErrorLayer.d.ts +24 -7
- package/types/src/layer/CommentCardLayer.d.ts +43 -0
- package/types/src/layer/CommentsLayer.d.ts +35 -0
- package/types/src/layer/ConditionalIcons.d.ts +4 -4
- package/types/src/layer/FreezeDragLines.d.ts +17 -0
- package/types/src/layer/GridFreezeLayer.d.ts +11 -0
- package/types/src/layer/HeaderFreezeLayer.d.ts +12 -0
- package/types/src/layer/HeaderResizerLayer.d.ts +2 -1
- package/types/src/layer/HyperlinkLayer.d.ts +109 -0
- package/types/src/layer/MovableKindScope.d.ts +17 -0
- package/types/src/layer/ProtectionLayer.d.ts +52 -0
- package/types/src/layer/RangeAnnotationLayer.d.ts +71 -0
- package/types/src/layer/ResizeIndicator.d.ts +9 -8
- package/types/src/layer/ResizeTooltip.d.ts +13 -0
- package/types/src/layer/SheetHeaderCellLayer.d.ts +10 -1
- package/types/src/layer/SheetOutlineLayer.d.ts +40 -0
- package/types/src/layer/TableLayer.d.ts +5 -4
- package/types/src/layer/TableToolbar.d.ts +42 -0
- package/types/src/layer/ValidationDropdownLayer.d.ts +15 -5
- package/types/src/layer/ValidationIndicatorLayer.d.ts +9 -3
- package/types/src/layer/ValidationPromptLayer.d.ts +64 -0
- package/types/src/layer/_tableColor.d.ts +4 -0
- package/types/src/layer/cellTip.d.ts +13 -0
- package/types/src/layer/freezeDragState.d.ts +21 -0
- package/types/src/layer/index.d.ts +12 -1
- package/types/src/layer/resizeIndicatorState.d.ts +3 -1
- package/types/src/layer/useFreezeDrag.d.ts +22 -0
- package/types/src/layer/useValidationPicker.d.ts +35 -35
- package/types/src/layer/validationMark.d.ts +63 -0
- package/types/src/listener/useModelListener.d.ts +4 -4
- package/types/src/movable/ConnectionSites.d.ts +18 -0
- package/types/src/movable/IMovableArea.d.ts +56 -0
- package/types/src/movable/MovableAdornment.d.ts +26 -0
- package/types/src/movable/MovableCommandGroups.d.ts +40 -0
- package/types/src/movable/MovableCommands.d.ts +6 -1
- package/types/src/movable/MovableControl.d.ts +78 -0
- package/types/src/movable/MovableEdit.d.ts +22 -0
- package/types/src/movable/MovableFrame.d.ts +16 -13
- package/types/src/movable/MovableLayer.d.ts +25 -7
- package/types/src/movable/MovableRenderers.d.ts +210 -0
- package/types/src/movable/PlaceholderFrames.d.ts +11 -0
- package/types/src/movable/RotateHandle.d.ts +37 -0
- package/types/src/movable/TextBox.d.ts +34 -0
- package/types/src/movable/connect.d.ts +16 -0
- package/types/src/movable/framePlacement.d.ts +72 -0
- package/types/src/movable/geometry.d.ts +61 -0
- package/types/src/movable/index.d.ts +10 -0
- package/types/src/movable/pressTarget.d.ts +20 -0
- package/types/src/picker/PickerPanel.d.ts +52 -0
- package/types/src/picker/cellPickerOpen.d.ts +6 -0
- package/types/src/picker/index.d.ts +4 -0
- package/types/src/picker/useCellPicker.d.ts +95 -0
- package/types/src/picture/PictureCommands.d.ts +12 -0
- package/types/src/picture/PictureKind.d.ts +7 -0
- package/types/src/picture/index.d.ts +0 -1
- package/types/src/protection/ProtectionPaneArgs.d.ts +31 -0
- package/types/src/protection/index.d.ts +3 -0
- package/types/src/protection/unlockProtectedRanges.d.ts +23 -0
- package/types/src/richText/RichTextEditor.d.ts +41 -0
- package/types/src/richText/index.d.ts +2 -0
- package/types/src/selection/SheetSelectionLayer.d.ts +14 -10
- package/types/src/shape/ConnectorControl.d.ts +46 -0
- package/types/src/shape/ShapeCommands.d.ts +11 -0
- package/types/src/shape/ShapeControl.d.ts +8 -0
- package/types/src/shape/ShapeEditor.d.ts +15 -2
- package/types/src/shape/ShapeGallery.d.ts +31 -0
- package/types/src/shape/ShapeHandles.d.ts +28 -0
- package/types/src/shape/ShapeKind.d.ts +7 -0
- package/types/src/shape/ShapeSVG.d.ts +22 -0
- package/types/src/shape/ShapeText.d.ts +17 -0
- package/types/src/shape/icons/ShapeIcons.d.ts +16 -0
- package/types/src/shape/icons/_ShapeIconPack.d.ts +4 -0
- package/types/src/shape/index.d.ts +3 -1
- package/types/src/shape/shapeFrame.d.ts +50 -0
- package/types/src/shape/shapeStyle.d.ts +82 -0
- package/types/src/sheet/ISheetElement.d.ts +62 -65
- package/types/src/sheet/SheetCommandProvider.d.ts +9 -4
- package/types/src/sheet/SheetCommands.d.ts +21 -6
- package/types/src/sheet/SheetOutlineElement.d.ts +70 -0
- package/types/src/sheet/SheetScrollbar.d.ts +1 -10
- package/types/src/sheet/_freezeAt.d.ts +10 -0
- package/types/src/sheet/_useHeaderMetrics.d.ts +11 -0
- package/types/src/sheet/circularReferences.d.ts +9 -1
- package/types/src/sheet/index.d.ts +1 -1
- package/types/src/sheet/useCycleHighlight.d.ts +21 -0
- package/types/src/slicer/SlicerCommands.d.ts +10 -0
- package/types/src/slicer/SlicerEditor.d.ts +8 -2
- package/types/src/slicer/SlicerKind.d.ts +7 -0
- package/types/src/slicer/SlicerStylePreview.d.ts +18 -0
- package/types/src/slicer/index.d.ts +2 -1
- package/types/src/slicer/slicerStyles.d.ts +32 -0
- package/types/src/tabStrip/TabStrip.d.ts +7 -0
- package/types/src/taskPane/ITaskPane.d.ts +12 -1
- package/types/src/taskPane/MovablePane.d.ts +17 -0
- package/types/src/taskPane/index.d.ts +1 -0
- package/types/src/theme/ThemeState.d.ts +14 -1
- package/types/src/theme/useGridColorScheme.d.ts +1 -1
- package/types/src/workbook/DefaultMovableRenderers.d.ts +20 -0
- package/types/src/workbook/IWorkbookElement.d.ts +24 -0
- package/types/src/workbook/WorkbookCommands.d.ts +2 -4
- package/types/src/workbook/WorkbookStrip.d.ts +9 -0
- package/types/src/workbook/_followOrigin.d.ts +9 -0
- package/types/src/workbook/useWorkbookFormat.d.ts +3 -3
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
- package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +0 -156
- package/browser/cjs/index.cjs +0 -35
- package/browser/esm/SJMJzBwlXTJ9QIO5.mjs +0 -6286
- package/types/src/editor/useProtectedEditNotice.d.ts +0 -14
- package/types/src/layer/validationList.d.ts +0 -84
- package/types/src/list/SheetValueList.d.ts +0 -93
- package/types/src/list/index.d.ts +0 -2
- package/types/src/movable/MoveableBundle.d.ts +0 -4
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MovableRendererModule } from '../movable/MovableRenderers';
|
|
2
|
+
/**
|
|
3
|
+
* The picture kind, as the renderer registry loads it: one module, so a failed fetch can be
|
|
4
|
+
* imported again whole.
|
|
5
|
+
*/
|
|
6
|
+
export declare const PictureKind: MovableRendererModule;
|
|
7
|
+
//# sourceMappingURL=PictureKind.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ItemsPaneArgs } from '../taskPane';
|
|
2
|
+
/**
|
|
3
|
+
* The activation argument the **Manage Protection** pane understands.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Lives with the protection feature rather than with the task-pane primitives: `taskPane` is the
|
|
7
|
+
* generic host and knows nothing about what any particular pane shows.
|
|
8
|
+
*
|
|
9
|
+
* The pane consolidates several subjects that used to live in separate places, so every command
|
|
10
|
+
* that opens it says which one it means. Absent ⇒ the pane keeps whichever tab it is on (`sheet` on a
|
|
11
|
+
* fresh open). It is scoped to ONE activation, like every `args` payload — see
|
|
12
|
+
* `TaskPaneProps.args`.
|
|
13
|
+
*/
|
|
14
|
+
export interface ProtectionPaneArgs {
|
|
15
|
+
/** Which tab to show. */
|
|
16
|
+
tab?: ProtectionPaneArgs.Tab;
|
|
17
|
+
/**
|
|
18
|
+
* Forwarded to the Ranges list — `{ insert: true }` opens it on a NEW range anchored to
|
|
19
|
+
* the selection, which is what an "Unlock Range…" command asks for.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Kept as a nested field rather than folded into this one: it is the generic items contract, and
|
|
23
|
+
* the other tabs have nothing to do with it.
|
|
24
|
+
*/
|
|
25
|
+
items?: ItemsPaneArgs;
|
|
26
|
+
}
|
|
27
|
+
export declare namespace ProtectionPaneArgs {
|
|
28
|
+
/** In display order. `ranges` is Excel's "Allow Edit Ranges": the ranges that stay editable. */
|
|
29
|
+
type Tab = 'sheet' | 'ranges' | 'cells' | 'workbook';
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=ProtectionPaneArgs.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IProtectedRange } from '@sheetxl/sdk';
|
|
2
|
+
import { IReactNotifier } from '@sheetxl/utils-react';
|
|
3
|
+
/**
|
|
4
|
+
* Excel's **Unlock Range** dialog: asks for the password of a protected range and grants session
|
|
5
|
+
* access to it (`IProtectedRange.unlock`).
|
|
6
|
+
*
|
|
7
|
+
* @param notifier The host's notifier; without one there is no way to ask, and this resolves `false`.
|
|
8
|
+
* @param ranges The ranges in question — typically the ones covering one cell. Those that need no
|
|
9
|
+
* password, or are already unlocked, are ignored.
|
|
10
|
+
* @returns `true` when the cell is editable afterwards — every range was already open, or the
|
|
11
|
+
* password matched at least one of them. `false` on cancel.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* A wrong password keeps the dialog open with a message rather than closing it and re-asking, so
|
|
15
|
+
* the check runs inside the dialog's submit validation — where an async password derivation
|
|
16
|
+
* belongs (the dialog shows a spinner while it runs).
|
|
17
|
+
*
|
|
18
|
+
* When several password-bearing ranges cover the cell, one password is asked for and tried against
|
|
19
|
+
* all of them: ANY covering range being unlocked is what makes the cell editable (Excel's rule, and
|
|
20
|
+
* the write path's), so there is no reason to ask which.
|
|
21
|
+
*/
|
|
22
|
+
export declare const promptUnlockProtectedRanges: (notifier: IReactNotifier | null | undefined, ranges: readonly IProtectedRange[]) => Promise<boolean>;
|
|
23
|
+
//# sourceMappingURL=unlockProtectedRanges.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IRichText, IStyledFont } from '@sheetxl/sdk';
|
|
3
|
+
/**
|
|
4
|
+
* The contract of a rich text editor: text in, edited text out. A host may supply its own in place
|
|
5
|
+
* of the default {@link RichTextEditor}.
|
|
6
|
+
*/
|
|
7
|
+
export interface RichTextEditorProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
8
|
+
/**
|
|
9
|
+
* The text: plain, or formatting runs.
|
|
10
|
+
*/
|
|
11
|
+
value: IRichText.JSON | string;
|
|
12
|
+
/**
|
|
13
|
+
* Called with the edited text when the edit is committed, which is when the editor loses focus.
|
|
14
|
+
* Not called when nothing changed.
|
|
15
|
+
*/
|
|
16
|
+
onChange?: (value: IRichText.JSON | string) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Called when the person leaves the editor with Escape, after the commit.
|
|
19
|
+
*/
|
|
20
|
+
onDone?: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* If true, the text is shown but cannot be edited.
|
|
23
|
+
* @defaultValue false
|
|
24
|
+
*/
|
|
25
|
+
readOnly?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The CSS for the font properties a run sets.
|
|
28
|
+
*/
|
|
29
|
+
runStyle?: (font: IStyledFont.JSON) => React.CSSProperties | undefined;
|
|
30
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The default rich text editor: the runs drawn as they are formatted, edited in place.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* Typing keeps the formatting of the run it is in; it does not apply formatting. The edit is
|
|
37
|
+
* committed when the editor loses focus. Keystrokes and clipboard events stay in the editor, so the
|
|
38
|
+
* grid and the surrounding movable do not act on them.
|
|
39
|
+
*/
|
|
40
|
+
export declare const RichTextEditor: React.NamedExoticComponent<Omit<RichTextEditorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
//# sourceMappingURL=RichTextEditor.d.ts.map
|
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ISheet } from '@sheetxl/sdk';
|
|
3
|
-
import { IShowToolTipProperties } from '@sheetxl/utils-react';
|
|
4
3
|
import { LayerProps } from '@sheetxl/grid-react';
|
|
4
|
+
import { CommandContext } from '../frame';
|
|
5
|
+
import { SheetLocation } from '../sheet';
|
|
5
6
|
export interface SheetSelectionLayerProps extends LayerProps {
|
|
6
7
|
/** The sheet whose `getSelection()` this layer drives. */
|
|
7
8
|
sheet: ISheet;
|
|
8
9
|
/** Whether this sheet/pane is the active one (gates move/fill interaction). */
|
|
9
10
|
isActive?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
/**
|
|
12
|
+
* A right-button drag of the fill handle was released: show the fill menu at `location` and run
|
|
13
|
+
* whatever `menu` entry is chosen. The menu is chrome, so the consumer renders it (MUI in the
|
|
14
|
+
* studio); `menu` answers every question it has. Call `menu.cancel()` when the menu closes, so a
|
|
15
|
+
* dismissal ends the drag (the dashed preview stays up until it does). Omit to leave the
|
|
16
|
+
* right-drag inert.
|
|
17
|
+
*/
|
|
18
|
+
onFillMenu?: (location: SheetLocation, menu: CommandContext.FillMenu) => void;
|
|
14
19
|
}
|
|
15
20
|
/**
|
|
16
21
|
* Renders the generic grid-react {@link SelectionLayer} wired with the
|
|
17
22
|
* sheet interaction config — a {@link SheetSelection} model, the **move grip** (`onMove`: move/copy/insert
|
|
18
|
-
* with an overwrite-confirm), the **fill handle** (`onFill`: auto-fill,
|
|
19
|
-
* drag
|
|
20
|
-
*
|
|
23
|
+
* with an overwrite-confirm), the **fill handle** (`onFill`: auto-fill), the **gesture tips** (a
|
|
24
|
+
* drag-select's size, a move's destination, the value a fill would write), the drag **edit modes**
|
|
25
|
+
* (cursor/description while dragging the grip or fill), and the enable gating — and, when a command
|
|
26
|
+
* scope is present, contributes the selection nav onto it (yielding the layer's keyboard).
|
|
21
27
|
*
|
|
22
28
|
* @remarks
|
|
23
29
|
* The *smart* selection logic (merge / hidden / contentful nav, bounds) lives in the model
|
|
24
30
|
* ({@link SheetSelection} → `IRangeSelection`); this layer only wires the view-side interactions the model
|
|
25
31
|
* doesn't own.
|
|
26
|
-
* The fill preview tooltip is threaded via `onShowTooltip`/`onCloseTooltip` — a float
|
|
27
|
-
* provider would eventually replace that prop-drilling.
|
|
28
32
|
*/
|
|
29
33
|
export declare const SheetSelectionLayer: React.FC<SheetSelectionLayerProps>;
|
|
30
34
|
//# sourceMappingURL=SheetSelectionLayer.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Point } from '@sheetxl/utils';
|
|
3
|
+
import { IMovable } from '@sheetxl/sdk';
|
|
4
|
+
import { ContentControlProps } from '../movable/MovableControl';
|
|
5
|
+
/** A movable the dragged end may glue to, where it is now. */
|
|
6
|
+
export interface Candidate {
|
|
7
|
+
movable: IMovable;
|
|
8
|
+
placement: IMovable.Placement;
|
|
9
|
+
}
|
|
10
|
+
/** The site a dragged end would glue to if released now. */
|
|
11
|
+
export interface Hit {
|
|
12
|
+
target: IMovable;
|
|
13
|
+
index: number;
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The movables on the sheet a connector may glue to: every one but itself and the groups it is
|
|
19
|
+
* in. Which of them offer sites is the model's to say (a group and a connector offer none).
|
|
20
|
+
*/
|
|
21
|
+
export declare const collectCandidates: (connector: IMovable) => Candidate[];
|
|
22
|
+
/**
|
|
23
|
+
* The site the end snaps to from `point`: the nearest site of a movable the point is on (inside
|
|
24
|
+
* its frame, grown by a margin), else the nearest site within reach; `null` for none.
|
|
25
|
+
*/
|
|
26
|
+
export declare const snapToSite: (point: Point, candidates: readonly Candidate[], zoom: number) => Hit | null;
|
|
27
|
+
/**
|
|
28
|
+
* Where a dragged end goes when its direction from `from` is held to a multiple of `step` degrees:
|
|
29
|
+
* `to` projected onto the nearest allowed direction, so a level or upright line ends where the
|
|
30
|
+
* pointer is along it.
|
|
31
|
+
*/
|
|
32
|
+
export declare const constrainAngle: (from: Point, to: Point, step?: number) => Point;
|
|
33
|
+
/**
|
|
34
|
+
* A selected connector's control: a round handle at each end in place of the outline and resize
|
|
35
|
+
* handles, as Excel draws it. Dragging one runs the line from the other end to the pointer, and
|
|
36
|
+
* glues it to a movable's connection site when released on one: every movable shows its sites
|
|
37
|
+
* while the end is held (the layer's `ConnectionSites`), and the site the end would take is
|
|
38
|
+
* marked. Shift holds a free end to steps of 15 degrees about the other end; a site still wins.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* An end is a corner of the connector's frame; the frame between the two ends is what the SDK's
|
|
42
|
+
* connector placement answers, so the drag previews through the layer's resize loop and commits
|
|
43
|
+
* the placement with the glued end in one step.
|
|
44
|
+
*/
|
|
45
|
+
export declare const ConnectorControl: React.FC<ContentControlProps>;
|
|
46
|
+
//# sourceMappingURL=ConnectorControl.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Command } from '@sheetxl/utils-react';
|
|
2
|
+
import { MovableKindCommandData } from '../movable';
|
|
3
|
+
/**
|
|
4
|
+
* The shape kind's commands, for the active shape. Chrome is the `shape` catalog.
|
|
5
|
+
*
|
|
6
|
+
* `changeShape` takes what an Insert > Shapes gallery entry states (a preset name, or the entry's
|
|
7
|
+
* JSON) and makes the shape that preset, as Excel's Change Shape does. A line or connector has none:
|
|
8
|
+
* its preset is what joins its ends.
|
|
9
|
+
*/
|
|
10
|
+
export declare const contributeShapeCommands: Command.DynamicCommandContributor<MovableKindCommandData>;
|
|
11
|
+
//# sourceMappingURL=ShapeCommands.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ContentControlProps } from '../movable/MovableControl';
|
|
3
|
+
/**
|
|
4
|
+
* The selection control of a shape: a connector gets its endpoint handles, every other shape the
|
|
5
|
+
* generic outline, resize and rotate handles.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ShapeControl: React.FC<ContentControlProps>;
|
|
8
|
+
//# sourceMappingURL=ShapeControl.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { IShape } from '@sheetxl/sdk';
|
|
2
3
|
import { MovableElementProps } from '../movable';
|
|
3
4
|
export interface ShapeEditorAttributes {
|
|
4
5
|
isShapeEditor: () => true;
|
|
@@ -6,11 +7,23 @@ export interface ShapeEditorAttributes {
|
|
|
6
7
|
export interface IShapeEditorElement extends HTMLDivElement, ShapeEditorAttributes {
|
|
7
8
|
}
|
|
8
9
|
export interface ShapeEditorProps extends MovableElementProps {
|
|
9
|
-
shape:
|
|
10
|
+
shape: IShape;
|
|
11
|
+
/**
|
|
12
|
+
* Draws the geometry's text rectangle and connection sites over the shape.
|
|
13
|
+
* @defaultValue false
|
|
14
|
+
*/
|
|
15
|
+
debugGeometry?: boolean;
|
|
10
16
|
ref?: React.Ref<IShapeEditorElement>;
|
|
11
17
|
}
|
|
12
18
|
/**
|
|
13
|
-
*
|
|
19
|
+
* A shape in the sheet: its geometry as one SVG that fills the movable's frame, its text at the
|
|
20
|
+
* geometry's text rectangle, and its adjustment handles while it is selected.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* The frame owns position, size and zoom; the drawing is a `viewBox` of the movable's unzoomed
|
|
24
|
+
* bounds stretched to fill it, so a resize re-evaluates the geometry (adjust values are ratios,
|
|
25
|
+
* and the shape stretches as it does in Excel) and zoom thickens lines as Excel's does. A custom
|
|
26
|
+
* geometry is evaluated like a preset, from the definition the file states.
|
|
14
27
|
*/
|
|
15
28
|
export declare const ShapeEditor: React.NamedExoticComponent<Omit<ShapeEditorProps, "ref"> & React.RefAttributes<IShapeEditorElement>>;
|
|
16
29
|
//# sourceMappingURL=ShapeEditor.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IShape } from '@sheetxl/sdk';
|
|
2
|
+
/** One entry of the Insert > Shapes gallery: what it is called and what it inserts. */
|
|
3
|
+
export interface ShapeGalleryEntry {
|
|
4
|
+
/** Unique in the gallery: the entry's icon is `shape:<key>`, and a host remembers it by this. */
|
|
5
|
+
key: string;
|
|
6
|
+
/** The message key of its name. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** What the entry inserts, as `insertShape` takes it. */
|
|
9
|
+
json: IShape.JSON;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* One section of the Insert > Shapes gallery: its heading and its entries in display order.
|
|
13
|
+
*/
|
|
14
|
+
export interface ShapeGalleryCategory {
|
|
15
|
+
key: string;
|
|
16
|
+
label: string;
|
|
17
|
+
entries: readonly ShapeGalleryEntry[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* What a new shape of a preset states: only its intent, the preset (none for `rect`) and, for a
|
|
21
|
+
* line or connector, `type: 'connector'`. Fill, line and text come from the theme's shape style
|
|
22
|
+
* when it is written.
|
|
23
|
+
*/
|
|
24
|
+
export declare const presetShapeJSON: (preset: string) => IShape.JSON;
|
|
25
|
+
/**
|
|
26
|
+
* The Insert > Shapes gallery: Excel's sections, order and names, then a section of the presets
|
|
27
|
+
* Excel's gallery leaves out (`funnel`, the tabs, the gears, the action buttons). Every entry has
|
|
28
|
+
* an icon in the `shape` pack, under its key.
|
|
29
|
+
*/
|
|
30
|
+
export declare const ShapeGallery: readonly ShapeGalleryCategory[];
|
|
31
|
+
//# sourceMappingURL=ShapeGallery.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IGeometry } from '@sheetxl/sdk';
|
|
3
|
+
export type HandleDragPhase = 'move' | 'end' | 'cancel';
|
|
4
|
+
export interface ShapeHandlesProps {
|
|
5
|
+
/** The handles' positions, in the shape's frame. */
|
|
6
|
+
handles: readonly IGeometry.IHandle[];
|
|
7
|
+
/** The shape's frame: the overlay's `viewBox`, so a handle lands exactly on the geometry. */
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
/** Device px per shape px, for a handle that stays the same size on screen at any zoom. */
|
|
11
|
+
zoom: number;
|
|
12
|
+
/**
|
|
13
|
+
* A handle being dragged: its index and where the pointer is, in the shape's frame. `'move'`
|
|
14
|
+
* while the pointer moves, `'end'` when it is released there, `'cancel'` when the drag is lost.
|
|
15
|
+
*/
|
|
16
|
+
onDrag: (index: number, x: number, y: number, phase: HandleDragPhase) => void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The adjustment handles of a selected shape, drawn over its geometry in the same `viewBox`.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Pointer positions are mapped through the overlay's own screen matrix, which folds in the
|
|
23
|
+
* frame's size, the view's zoom and any rotation, so a drag reads in shape-local px however the
|
|
24
|
+
* frame is placed. The overlay itself is pointer-transparent; only the dots take presses, which
|
|
25
|
+
* do not bubble to the frame as a move.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ShapeHandles: React.FC<ShapeHandlesProps>;
|
|
28
|
+
//# sourceMappingURL=ShapeHandles.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MovableRendererModule } from '../movable/MovableRenderers';
|
|
2
|
+
/**
|
|
3
|
+
* The shape kind, as the renderer registry loads it: one module, so a failed fetch can be imported
|
|
4
|
+
* again whole.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ShapeKind: MovableRendererModule;
|
|
7
|
+
//# sourceMappingURL=ShapeKind.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IGeometry, IResource } from '@sheetxl/sdk';
|
|
3
|
+
import { ResolvedShapeStyle } from './shapeStyle';
|
|
4
|
+
import { DeviceGrid } from './shapeFrame';
|
|
5
|
+
/** `pointer-events` for a drawn part: hit where painted, or not at all while the frame is hidden. */
|
|
6
|
+
export type PartHit = 'visiblePainted' | 'none';
|
|
7
|
+
/** A URL an `<image>` can load a resource from: its external URI, or its bytes as a data URL. */
|
|
8
|
+
export declare const resourceUrl: (resource: IResource) => Promise<string>;
|
|
9
|
+
export interface ShapePathsProps {
|
|
10
|
+
geometry: IGeometry;
|
|
11
|
+
/** The shape's style. */
|
|
12
|
+
style: ResolvedShapeStyle;
|
|
13
|
+
zoom: number;
|
|
14
|
+
/** Where the frame lies on the device pixel grid, for the lines to land on it; `null` to draw as evaluated. */
|
|
15
|
+
grid?: DeviceGrid | null;
|
|
16
|
+
hit: PartHit;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Everything a geometry draws: the shape's paths in its style.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ShapePaths: React.FC<ShapePathsProps>;
|
|
22
|
+
//# sourceMappingURL=ShapeSVG.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ITextFrame, IStyleCollection } from '@sheetxl/sdk';
|
|
3
|
+
export interface ShapeTextProps {
|
|
4
|
+
/** The text written on the shape, by paragraph, with how its body sits in the shape. */
|
|
5
|
+
text: ITextFrame.JSON;
|
|
6
|
+
/** Resolves colors through the workbook's theme; `null` reads them without one. */
|
|
7
|
+
styles: IStyleCollection | null;
|
|
8
|
+
/** The color the shape's theme style gives its text, used where a run states none. */
|
|
9
|
+
color?: string | null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The text written on a shape: its paragraphs laid out as the body says — anchored, inset,
|
|
13
|
+
* aligned, spaced — with what formatting its runs carry. Text layout stays in the DOM; nothing
|
|
14
|
+
* here is measured.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ShapeText: React.FC<ShapeTextProps>;
|
|
17
|
+
//# sourceMappingURL=ShapeText.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The icon pack holding one 24x24 icon per preset shape, keyed by the preset name
|
|
3
|
+
* (`IGeometry.Preset`). Separate from the base pack and loaded only when one of its icons is asked
|
|
4
|
+
* for. The icons are generated from the geometry engine (`pnpm gen:shapes:icons` in the SDK).
|
|
5
|
+
*/
|
|
6
|
+
export declare const SHAPE_ICON_PACK = "shape";
|
|
7
|
+
/**
|
|
8
|
+
* The icon key of a preset shape, for `DynamicIcon` or any command or menu that takes an icon key.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <DynamicIcon iconKey={shapeIconKey(IGeometry.Preset.RoundRect)} />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare const shapeIconKey: (preset: string) => string;
|
|
16
|
+
//# sourceMappingURL=ShapeIcons.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Point } from '@sheetxl/utils';
|
|
2
|
+
/**
|
|
3
|
+
* A stroke width in shape px snapped to whole device pixels, never thinner than one: a 1 pt line
|
|
4
|
+
* is 1 px at 100% and 3 px at 200%, as Excel draws it. A width of zero is Excel's hairline, one
|
|
5
|
+
* device pixel at any zoom; a line that is not drawn has no stroke color, not a width of zero.
|
|
6
|
+
*/
|
|
7
|
+
export declare const snapStrokeWidth: (width: number, zoom: number, dpr?: number) => number;
|
|
8
|
+
/**
|
|
9
|
+
* How a shape's drawing lies on the device pixel grid: what it takes to land a line on it. The
|
|
10
|
+
* drawing is in shape px, scaled by `zoom` into the view from the frame's corner, which is on a
|
|
11
|
+
* device pixel, and mirrored about the frame's center where flipped.
|
|
12
|
+
*/
|
|
13
|
+
export interface DeviceGrid {
|
|
14
|
+
/** Device px per view px. */
|
|
15
|
+
dpr: number;
|
|
16
|
+
/** View px per shape px. */
|
|
17
|
+
zoom: number;
|
|
18
|
+
/** The frame, in shape px: what a mirrored drawing is measured from. */
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
flipH: boolean;
|
|
22
|
+
flipV: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** Where a path's end moved when it was snapped: `by`, from `at` (shape px, before the snap). */
|
|
25
|
+
export interface SnappedEnd {
|
|
26
|
+
at: Point;
|
|
27
|
+
by: Point;
|
|
28
|
+
}
|
|
29
|
+
export interface SnappedPath {
|
|
30
|
+
d: string;
|
|
31
|
+
/** The ends of the path's subpaths, for what is drawn at them (a line end) to follow. */
|
|
32
|
+
ends: SnappedEnd[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Path data with every level and upright straight line moved onto the device pixel grid, so a
|
|
36
|
+
* thin stroke along it is crisp rather than smeared over two rows of pixels, as a gridline is. A
|
|
37
|
+
* line's ends go with it, so the lines that meet it stay joined; a curve keeps its control points
|
|
38
|
+
* and bends by the fraction of a pixel its end moved. Slanted lines and curves are left alone.
|
|
39
|
+
*
|
|
40
|
+
* @param d SVG path data in shape px, as {@link IGeometry.forEachPath} gives it.
|
|
41
|
+
* @param strokeWidth The stroke's width in shape px, already snapped to whole device px.
|
|
42
|
+
*/
|
|
43
|
+
export declare const snapPathToDevice: (d: string, grid: DeviceGrid, strokeWidth: number) => SnappedPath;
|
|
44
|
+
/**
|
|
45
|
+
* Path data moved to follow snapped line ends: each subpath by the move of the nearest end in
|
|
46
|
+
* `ends`, so a line end drawn as its own path (an arrowhead) stays on the line it was drawn for.
|
|
47
|
+
* Unchanged when no end moved.
|
|
48
|
+
*/
|
|
49
|
+
export declare const followSnappedEnds: (d: string, ends: readonly SnappedEnd[]) => string;
|
|
50
|
+
//# sourceMappingURL=shapeFrame.d.ts.map
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { IFill, IResource, IShape, IStyleCollection, ShapeStyleUtils } from '@sheetxl/sdk';
|
|
2
|
+
/** A color stop as the renderer draws it. */
|
|
3
|
+
export interface ResolvedGradientStop {
|
|
4
|
+
/** `0…1` along the gradient. */
|
|
5
|
+
offset: number;
|
|
6
|
+
/** CSS color. */
|
|
7
|
+
color: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A gradient as the renderer draws it over the shape's frame: resolved colors at `0…1` offsets,
|
|
11
|
+
* and the line or the ellipse they run along, in terms of the frame.
|
|
12
|
+
*/
|
|
13
|
+
export type ResolvedGradient = {
|
|
14
|
+
kind: 'linear';
|
|
15
|
+
/**
|
|
16
|
+
* Degrees clockwise from left-to-right, DrawingML's measure (the model's is the CSS angle).
|
|
17
|
+
* With `scaled`, the direction is taken in a square and stretched to the frame, so 45° runs
|
|
18
|
+
* corner to corner (DrawingML `lin/@scaled`).
|
|
19
|
+
*/
|
|
20
|
+
angle: number;
|
|
21
|
+
scaled: boolean;
|
|
22
|
+
stops: ResolvedGradientStop[];
|
|
23
|
+
} | {
|
|
24
|
+
kind: 'radial';
|
|
25
|
+
/** The focus, as fractions of the frame's width and height. */
|
|
26
|
+
cx: number;
|
|
27
|
+
cy: number;
|
|
28
|
+
/** The radius to the farthest corner, as a fraction of the frame (an ellipse once stretched). */
|
|
29
|
+
r: number;
|
|
30
|
+
stops: ResolvedGradientStop[];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* What a shape draws with, resolved to CSS: the colors a `<path>` can take and the line
|
|
34
|
+
* properties SVG strokes natively. A gradient is resolved to its stops and its line; a pattern is
|
|
35
|
+
* reduced to its foreground for now (SHAPES-PLAN, styling depth). Which fill and line apply is the
|
|
36
|
+
* model's call (`ShapeStyleUtils`); this turns its answer into what the renderer sets.
|
|
37
|
+
*/
|
|
38
|
+
export interface ResolvedShapeStyle {
|
|
39
|
+
/**
|
|
40
|
+
* CSS color, or `null` for no fill (also when the fill is an image, see `image`). For a gradient,
|
|
41
|
+
* its first stop: what draws where a gradient cannot (see `gradient`).
|
|
42
|
+
*/
|
|
43
|
+
fill: string | null;
|
|
44
|
+
/** A gradient fill, when the fill is one the renderer can draw as such. */
|
|
45
|
+
gradient?: ResolvedGradient;
|
|
46
|
+
/** An image fill: the resource to draw and how, when the shape holds the image. */
|
|
47
|
+
image?: {
|
|
48
|
+
resource: IResource;
|
|
49
|
+
fill: IFill.ImageJSON;
|
|
50
|
+
};
|
|
51
|
+
/** CSS color, or `null` for no line. For a gradient line, its first stop (see `strokeGradient`). */
|
|
52
|
+
stroke: string | null;
|
|
53
|
+
/** A gradient line, when the line's fill is one the renderer can draw as such. */
|
|
54
|
+
strokeGradient?: ResolvedGradient;
|
|
55
|
+
/** In shape-local px (points in the model). */
|
|
56
|
+
strokeWidth: number;
|
|
57
|
+
lineJoin: 'miter' | 'round' | 'bevel';
|
|
58
|
+
lineCap: 'butt' | 'round' | 'square';
|
|
59
|
+
miterLimit: number;
|
|
60
|
+
/**
|
|
61
|
+
* Alternating dash and space lengths in line widths, or `null` for a solid line. Caps are not
|
|
62
|
+
* accounted for; see {@link toDashArray}.
|
|
63
|
+
*/
|
|
64
|
+
dash: readonly number[] | null;
|
|
65
|
+
/** The text color the theme style gives, or `null` when nothing says. */
|
|
66
|
+
textColor: string | null;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* A dash as an SVG `stroke-dasharray` for a line `strokeWidth` wide, or `undefined` for solid.
|
|
70
|
+
* A round or square cap is drawn inside the dash, as Office draws it: each dash gives up a width
|
|
71
|
+
* to its caps and each space takes it, so a round-capped dot is a circle a width across.
|
|
72
|
+
*/
|
|
73
|
+
export declare const toDashArray: (dash: readonly number[] | null, strokeWidth: number, lineCap: ResolvedShapeStyle["lineCap"]) => string | undefined;
|
|
74
|
+
/** {@inheritDoc ShapeStyleUtils.inheritedGroupFill} */
|
|
75
|
+
export declare const inheritedGroupFill: typeof ShapeStyleUtils.inheritedGroupFill;
|
|
76
|
+
/**
|
|
77
|
+
* Resolves a shape's fill, line and text color to CSS: what it states itself over what its
|
|
78
|
+
* theme style gives, over Excel's defaults for a new shape. A member that takes its group's fill
|
|
79
|
+
* draws with `groupFill`.
|
|
80
|
+
*/
|
|
81
|
+
export declare const resolveShapeStyle: (json: IShape.JSON | null | undefined, styles: IStyleCollection | null, getResource?: (resourceId: number) => IResource | null, groupFill?: IFill.JSON | null) => ResolvedShapeStyle;
|
|
82
|
+
//# sourceMappingURL=shapeStyle.d.ts.map
|