@sheetxl/react 0.8.0-beta.12 → 0.8.0-beta.14
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/{DGG1auUKsjFbAazu.mjs → 3bA4ZNVK9px28j8g.mjs} +3 -3
- package/browser/esm/{CUekkfE6uwwsdQpc.mjs → B1mBZyt2eP2CpVwp.mjs} +1 -1
- package/browser/esm/{ZoS0cpNEBcv6p-Z1.mjs → B9bUlu6d3vrRZxS-.mjs} +3 -3
- package/browser/esm/BAhJx_sa3wR4i_0q.mjs +145 -0
- package/browser/esm/{BDlpRkuBok0Uu4Hn.mjs → BCZ5elyhp4P5oEuf.mjs} +1 -1
- package/browser/esm/BLYs69szBviI7Jjh.mjs +303 -0
- package/browser/esm/{D_usN3pWuCJU2GN-.mjs → BNyPX5tVpHU3d3Vj.mjs} +2 -2
- package/browser/esm/{_6Sb6ElRcZftxMNh.mjs → BSqY5OuRUNgKmwp8.mjs} +1 -1
- package/browser/esm/{D22NJmTiky4NL8tM.mjs → Bk4hW9MxdjC3CGlC.mjs} +1 -1
- package/browser/esm/{D2GydDzPuvIjdpok.mjs → BoJ5N_Kc7V9zyftG.mjs} +1 -1
- package/browser/esm/{C_LUq-BnguetvGZz.mjs → C1yjI8GDwCp8bC1Z.mjs} +2 -2
- package/browser/esm/{LBQDhVhz7S7i6a8i.mjs → C6TgQuQt88nz0-jL.mjs} +1 -1
- package/browser/esm/{CSFORKZ8zrVL_Y0w.mjs → CAT9L5BY3HAluoJf.mjs} +1 -1
- package/browser/esm/{DxEczXCHTerDemDP.mjs → CDf6czK5WuKJhq0y.mjs} +4 -4
- package/browser/esm/CoRairrEG42TjiZk.mjs +19 -0
- package/browser/esm/CuPu7ToiaqUerd85.mjs +401 -0
- package/browser/esm/{BapujiblfiXDlu67.mjs → D0Sg0TONmNBjIlEg.mjs} +1 -1
- package/browser/esm/{Cslk_qRdBSuJIi1O.mjs → DxwO-Y_gJ9IaBQ4B.mjs} +6 -6
- package/browser/esm/{DN3lqq95KY0K6f1x.mjs → K9YyKehkJlT3axZh.mjs} +1 -1
- package/browser/esm/NG_Q0Dq4JXnEWACp.mjs +341 -0
- package/browser/esm/{B4mT3G7GHwgDYFGP.mjs → PL83wgS5ferhptps.mjs} +2 -2
- package/browser/esm/chart.mjs +3 -3
- package/browser/esm/control.mjs +74 -73
- package/browser/esm/group.mjs +3 -3
- package/browser/esm/index.mjs +3971 -3744
- package/browser/esm/{CtGhA0kS2MCfEsHN.mjs → nm3DZw1nJMIh89Dx.mjs} +3 -3
- package/browser/esm/note.mjs +5 -5
- package/browser/esm/picture.mjs +2 -81
- package/browser/esm/shape.mjs +2 -2
- package/browser/esm/slicer.mjs +112 -111
- package/browser/esm/{Ck1LbcsdSfKNi6xq.mjs → wQh060x4Bo_NqUYk.mjs} +1 -1
- package/node/esm/6VFNx4NTcuHaXbnF.mjs +146 -0
- package/node/esm/{CzN6c6KyxVmNvayz.mjs → BBm7LjTGVud73kml.mjs} +1 -1
- package/node/esm/{CH1DVfFhjdd_3pw1.mjs → BayAQ4VhPgK40T5V.mjs} +2 -2
- package/node/esm/{T5lfCrudsUnOTxEn.mjs → BgH9YejvQpQrZeHl.mjs} +1 -1
- package/node/esm/{iL9jKJcnED6oi0B4.mjs → ByTkh2-kGcBTZn9j.mjs} +1 -1
- package/node/esm/{DayGI0Bt57FDNbVF.mjs → C0HgFe1pYpEl1EgM.mjs} +1 -1
- package/node/esm/{MWges5ywL3aEdChp.mjs → CEyXz1TulkCpAv0t.mjs} +1 -1
- package/node/esm/{C0KLMCRb3sbd5Q20.mjs → CMSfxUMv1tFyNlRJ.mjs} +5 -5
- package/node/esm/{DWkPWuf5ZrLRMixG.mjs → CZfiN5xD1_Zws8z-.mjs} +15 -15
- package/node/esm/{DXiNwr6ZnXBe7TlG.mjs → D-lQa7ydREp9WwxP.mjs} +1 -1
- package/node/esm/{Bi2Jwc0zpweaNzKc.mjs → D2dDGnBtilmmDxBJ.mjs} +2 -2
- package/node/esm/{CNOLkUDURBElaaIf.mjs → DA6UdPMREzxobL8H.mjs} +3 -3
- package/node/esm/{YB_qExw23Ci4nMYy.mjs → Duu2zmr8YkGTo-iP.mjs} +2 -2
- package/node/esm/{Apcuz4_QtBHt7G47.mjs → Dztz6JUUcE4NG6sn.mjs} +1 -1
- package/node/esm/ShpbUw8_QnOxZu2h.mjs +19 -0
- package/node/esm/{DyetXBW7vFLJWB22.mjs → _OzLYz_iliC3tcW2.mjs} +1 -1
- package/node/esm/chart.mjs +2 -2
- package/node/esm/control.mjs +79 -78
- package/node/esm/eG-mlQfoOvRwAwU1.mjs +406 -0
- package/node/esm/{DKqdv5JubgVaq-g9.mjs → fhOm7EkeM-0FAdDI.mjs} +1 -1
- package/node/esm/group.mjs +3 -3
- package/node/esm/index.mjs +6469 -6242
- package/node/esm/note.mjs +18 -18
- package/node/esm/picture.mjs +269 -50
- package/node/esm/{CalVk3o4-kX79s3v.mjs → r0Bg1Uwd5WHBFQyj.mjs} +1 -1
- package/node/esm/shape.mjs +186 -580
- package/node/esm/slicer.mjs +51 -50
- package/node/esm/{bRD1KCpSpAYTEs50.mjs → wtQ7d7f37N1tuJZB.mjs} +1 -1
- package/package.json +7 -7
- package/resources/locales/de/picture.cmd.json +157 -0
- package/resources/locales/de/sheet.cmd.json +24 -2
- package/resources/locales/de/ui.msg.json +3 -0
- package/resources/locales/en/picture.cmd.json +157 -0
- package/resources/locales/en/sheet.cmd.json +24 -2
- package/resources/locales/en/ui.msg.json +3 -0
- package/types/src/chart/ChartCommands.d.ts +1 -1
- package/types/src/chart/paint/_graphics.d.ts +0 -8
- package/types/src/chart/paint/echarts.d.ts +1 -1
- package/types/src/chart/paint/index.d.ts +1 -1
- package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +1 -1
- package/types/src/chart/paint/kinds/_builtIns.d.ts +0 -9
- package/types/src/chart/paint/toEChartsOption.d.ts +1 -1
- package/types/src/layer/CircularIndicatorLayer.d.ts +1 -1
- package/types/src/layer/HyperlinkLayer.d.ts +13 -9
- package/types/src/layer/_visibleCellFeatures.d.ts +11 -0
- package/types/src/layer/useValidationPicker.d.ts +1 -1
- package/types/src/movable/useFramePreview.d.ts +17 -0
- package/types/src/picture/PictureCommands.d.ts +8 -0
- package/types/src/picture/_pictureHyperlink.d.ts +13 -0
- package/types/src/picture/pictureCrop.d.ts +32 -0
- package/types/src/sheet/_hyperlinkEdit.d.ts +7 -0
- package/types/src/sheet/circularReferences.d.ts +1 -1
- package/types/src/theme/buildDocThemeCSS.d.ts +4 -1
- package/browser/esm/BR-AiOwuQlYh5-tr.mjs +0 -730
- package/browser/esm/DhYQRc8L2kALmFNz.mjs +0 -75
- package/node/esm/Cp1DuCae46eQKzWy.mjs +0 -76
|
@@ -1039,7 +1039,7 @@
|
|
|
1039
1039
|
"description": "Insert a picture from your device.",
|
|
1040
1040
|
"groupLabels": {
|
|
1041
1041
|
"contextMenu": "Insert Image…",
|
|
1042
|
-
"
|
|
1042
|
+
"insertImageOverCellsOptions": "From Device…"
|
|
1043
1043
|
},
|
|
1044
1044
|
"icon": "InsertImage",
|
|
1045
1045
|
"tags": [
|
|
@@ -1050,7 +1050,29 @@
|
|
|
1050
1050
|
"label": "Insert Image From Web",
|
|
1051
1051
|
"description": "Insert a picture from the web.",
|
|
1052
1052
|
"groupLabels": {
|
|
1053
|
-
"
|
|
1053
|
+
"insertImageOverCellsOptions": "From the Web…"
|
|
1054
|
+
},
|
|
1055
|
+
"icon": "InsertImage",
|
|
1056
|
+
"tags": [
|
|
1057
|
+
"mutator"
|
|
1058
|
+
]
|
|
1059
|
+
},
|
|
1060
|
+
"insertImageInCellFromFile": {
|
|
1061
|
+
"label": "Insert Image in Cell",
|
|
1062
|
+
"description": "Insert a picture from your device as the value of the selected cell.",
|
|
1063
|
+
"groupLabels": {
|
|
1064
|
+
"insertImageInCellOptions": "From Device…"
|
|
1065
|
+
},
|
|
1066
|
+
"icon": "InsertImage",
|
|
1067
|
+
"tags": [
|
|
1068
|
+
"mutator"
|
|
1069
|
+
]
|
|
1070
|
+
},
|
|
1071
|
+
"insertImageInCellFromURL": {
|
|
1072
|
+
"label": "Insert Image in Cell From Web",
|
|
1073
|
+
"description": "Insert a picture from the web as the value of the selected cell.",
|
|
1074
|
+
"groupLabels": {
|
|
1075
|
+
"insertImageInCellOptions": "From the Web…"
|
|
1054
1076
|
},
|
|
1055
1077
|
"icon": "InsertImage",
|
|
1056
1078
|
"tags": [
|
|
@@ -217,6 +217,7 @@
|
|
|
217
217
|
"reason.entireRow": "Not available when entire rows are selected.",
|
|
218
218
|
"reason.freezeOrigin": "Select a cell below and/or right of where the panes should freeze.",
|
|
219
219
|
"reason.groupNeedsTwo": "Select two or more drawings to group.",
|
|
220
|
+
"reason.hyperlinkIsValue": "The link is the cell's value; change its formula to change it.",
|
|
220
221
|
"reason.mergeUnavailable": "Merge is not available for this selection.",
|
|
221
222
|
"reason.mixedSelection": "Not available for a mixed full / partial selection.",
|
|
222
223
|
"reason.noComments": "The sheet has no comments.",
|
|
@@ -237,6 +238,8 @@
|
|
|
237
238
|
"reason.notImplemented": "Not yet implemented.",
|
|
238
239
|
"reason.outlineTooDeep": "Groups can be nested no more than 7 levels deep.",
|
|
239
240
|
"reason.overlap": "Not available for an overlapping selection.",
|
|
241
|
+
"reason.pictureCropLocked": "The picture does not allow cropping.",
|
|
242
|
+
"reason.pictureNoHyperlink": "The picture has no link.",
|
|
240
243
|
"reason.protectionNotPausable": "Pausing needs a protected sheet.",
|
|
241
244
|
"reason.sheetLocked": "The sheet is locked.",
|
|
242
245
|
"reason.sheetProtected": "The sheet is protected.",
|
|
@@ -8,7 +8,7 @@ import { MovableKindCommandData } from '../movable';
|
|
|
8
8
|
* plots the other way; `chartSelectData` takes an address, or asks for one, and plots those cells;
|
|
9
9
|
* `chartAddElement` takes an element by VBA's name (`legendTop`), and the toggles are the Add Chart
|
|
10
10
|
* Element checkboxes, each with the element's state. Quick layouts, chart styles and colors wait on
|
|
11
|
-
* the style parts
|
|
11
|
+
* the style parts. Each setter is one step to undo on its own; the middleware
|
|
12
12
|
* reports an error and arms repeat.
|
|
13
13
|
*/
|
|
14
14
|
export declare const contributeChartCommands: Command.DynamicCommandContributor<MovableKindCommandData>;
|
|
@@ -16,14 +16,6 @@ export declare const strokeStyle: (stroke: Stroke | null | undefined) => Record<
|
|
|
16
16
|
export declare const lineStyle: (stroke: Stroke | null | undefined) => Record<string, unknown>;
|
|
17
17
|
/** Lines across a unit square: Excel's x, star and plus, drawn in the marker's outline color. */
|
|
18
18
|
export declare const MARKER_LINES: Readonly<Record<string, readonly [number, number, number, number][]>>;
|
|
19
|
-
/**
|
|
20
|
-
* How ECharts draws a marker of the layout's: its symbol, box and offset from the point. A marker's
|
|
21
|
-
* size is its box (measured, `probe-chart-markers.ps1`): a dash is that wide and a fifth of it tall,
|
|
22
|
-
* a dot half as wide, from the point to the right. A circle, square, dash and dot keep their outline
|
|
23
|
-
* inside the box, along a dot's height but not its width; the other symbols center it on the box.
|
|
24
|
-
* An x, star or plus is its lines; its fill, a square of the size with no outline, is
|
|
25
|
-
* {@link markerFill}'s.
|
|
26
|
-
*/
|
|
27
19
|
export declare const markerSymbol: (marker: MarkerLayout) => {
|
|
28
20
|
symbol: string;
|
|
29
21
|
symbolSize: number | [number, number];
|
|
@@ -27,7 +27,7 @@ export interface MountedChart {
|
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Paints the layout into `host`, sized at the layout's px. The host is not measured: the frame
|
|
30
|
-
* scales it
|
|
30
|
+
* scales it.
|
|
31
31
|
*/
|
|
32
32
|
export declare function mountChart(host: HTMLElement, layout: ChartLayout, options?: TranslateOptions): MountedChart;
|
|
33
33
|
//# sourceMappingURL=echarts.d.ts.map
|
|
@@ -6,7 +6,7 @@ export type ChartPaintModule = typeof import('./echarts');
|
|
|
6
6
|
/**
|
|
7
7
|
* The painter. It carries ECharts, so nothing imports it statically: it loads the first time a
|
|
8
8
|
* chart is painted or rendered to SVG, or earlier when `LazyModules.prefetch` warms the lazy
|
|
9
|
-
* modules
|
|
9
|
+
* modules.
|
|
10
10
|
*/
|
|
11
11
|
export declare const ChartPaint: import('@sheetxl/utils').LazyModule<typeof import("./echarts")>;
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -7,7 +7,7 @@ import { Bounds } from '@sheetxl/utils';
|
|
|
7
7
|
* (`ChartLayout.CustomGroupLayout`) is painted by the kind registered under `custom:<its kind>`.
|
|
8
8
|
*
|
|
9
9
|
* @remarks
|
|
10
|
-
* The painter translates the layout and decides nothing
|
|
10
|
+
* The painter translates the layout and decides nothing: a kind reads where the
|
|
11
11
|
* layout put things, in px, and says how ECharts draws them. It is given the shared vocabulary as
|
|
12
12
|
* a {@link ChartPaintKind.Context}: fills and strokes as ECharts states them, markers, text boxes,
|
|
13
13
|
* and for a group on axes the grid indexes and how a series' data is placed on them.
|
|
@@ -1,12 +1,3 @@
|
|
|
1
1
|
import { ChartPaintKind } from './ChartPaintKind';
|
|
2
|
-
/**
|
|
3
|
-
* Registers the painters the package ships, through the same door a host's kind comes in by.
|
|
4
|
-
* Called by the translation before its first use.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* The built-ins name no ECharts modules of their own: `echarts.ts`, the lazy painter, brings the
|
|
8
|
-
* series types they use when it registers ECharts' pieces, so this module and the kinds stay free
|
|
9
|
-
* of ECharts and the package index stays light (DESIGN-CHART §7).
|
|
10
|
-
*/
|
|
11
2
|
export declare function registerBuiltInPaintKinds(register: (kind: ChartPaintKind) => () => void): void;
|
|
12
3
|
//# sourceMappingURL=_builtIns.d.ts.map
|
|
@@ -31,7 +31,7 @@ export interface TranslateOptions {
|
|
|
31
31
|
* Translates a {@link ChartLayout} to an ECharts option.
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
* A translation table and nothing else
|
|
34
|
+
* A translation table and nothing else: the grid is the plot rect in px with
|
|
35
35
|
* `containLabel:false`; value axes get `min`, `max` and `interval` and a formatter that answers
|
|
36
36
|
* the layout's strings; bars get `barWidth` in px and `barGap` from the overlap; every DrawingML
|
|
37
37
|
* axis is an ECharts axis, a deleted one with `show:false`. Nothing is left for ECharts to decide.
|
|
@@ -21,7 +21,7 @@ export interface CircularIndicatorLayerProps extends LayerProps {
|
|
|
21
21
|
* A {@link CellTileDiv} fed the sheet's `Feature.Circular` regions (engine-merged blocks: a
|
|
22
22
|
* 28K-cell block downstream of one cycle is one region, not 28K nodes), so a sheet with no cycles
|
|
23
23
|
* costs one lookup per frame. Members only get the glyph — a downstream cell is `0` for the same
|
|
24
|
-
* reason
|
|
24
|
+
* reason but the fix is never there, and a column of glyphs reads
|
|
25
25
|
* as a column of problems. The tooltip (`CellErrorLayer`) still answers for downstream cells.
|
|
26
26
|
*
|
|
27
27
|
* The glyph shows in every state; an unresolved cycle — iterative calculation off, or capped
|
|
@@ -19,23 +19,25 @@ export interface LinkPreview {
|
|
|
19
19
|
* a URL (a screenshot service), a promise when it has to be looked up (a social card).
|
|
20
20
|
*/
|
|
21
21
|
export type LinkPreviewLookup = (address: string) => LinkPreview | Promise<LinkPreview | null> | null;
|
|
22
|
-
/** What a hyperlink card is handed. The actions are bound to the hovered cell. */
|
|
22
|
+
/** What a hyperlink card is handed. The actions are bound to the hovered cell or picture. */
|
|
23
23
|
export interface HyperlinkCardRenderProps {
|
|
24
24
|
sheet: IWorksheet;
|
|
25
|
-
/** The hovered cell (the card anchors to its range, a merge included). */
|
|
25
|
+
/** The hovered cell (the card anchors to its range, a merge included), or a linked picture's first. */
|
|
26
26
|
coords: CellCoords;
|
|
27
27
|
hyperlink: IHyperlink;
|
|
28
28
|
/** Follow the link. */
|
|
29
29
|
open: () => Promise<void>;
|
|
30
30
|
/** Copy the address to the clipboard. */
|
|
31
31
|
copy: () => Promise<void>;
|
|
32
|
+
/** Select the cell and open the hyperlink editor. */
|
|
33
|
+
edit: () => void;
|
|
34
|
+
/** Remove the link; the cell's text stays. */
|
|
35
|
+
remove: () => void;
|
|
32
36
|
/**
|
|
33
|
-
*
|
|
34
|
-
* ({@link IHyperlink.isReadOnly}).
|
|
37
|
+
* `true` when the link cannot be changed, so {@link edit} and {@link remove} should show disabled:
|
|
38
|
+
* it is read-only ({@link IHyperlink.isReadOnly}) or the sheet's protection refuses the change.
|
|
35
39
|
*/
|
|
36
|
-
|
|
37
|
-
/** Remove the link; the cell's text stays. Absent for a read-only link. */
|
|
38
|
-
remove?: () => void;
|
|
40
|
+
disabled: boolean;
|
|
39
41
|
/**
|
|
40
42
|
* The linked page's preview once the lookup resolved, or `null` — see
|
|
41
43
|
* {@link HyperlinkLayerProps.preview}. Draw its picture with {@link LinkPreviewImage}, which shows it
|
|
@@ -93,8 +95,9 @@ export declare const linkPreviewMShots: (address: string, width?: number) => Lin
|
|
|
93
95
|
*/
|
|
94
96
|
export declare const HyperlinkLayer: React.MemoExoticComponent<(props: HyperlinkLayerProps) => React.JSX.Element>;
|
|
95
97
|
/**
|
|
96
|
-
* The preview picture, shown
|
|
97
|
-
*
|
|
98
|
+
* The preview picture, shown once it exists and has loaded — a missing card or a failed request draws
|
|
99
|
+
* nothing, so the card never shows a broken image. A picture that has to load slides open as it arrives;
|
|
100
|
+
* one the browser already has is simply there.
|
|
98
101
|
*
|
|
99
102
|
* A screenshot service answers while it is still rendering with a **placeholder picture** (mShots
|
|
100
103
|
* does). The caller says what width it asked for (`expectedWidth`); a loaded picture of another width
|
|
@@ -107,6 +110,7 @@ export declare const LinkPreviewImage: React.FC<{
|
|
|
107
110
|
expectedWidth?: number;
|
|
108
111
|
/** The width to draw at. @defaultValue the container's */
|
|
109
112
|
width?: number | string;
|
|
113
|
+
/** Style for the picture. A margin here takes no room until the picture shows. */
|
|
110
114
|
style?: React.CSSProperties;
|
|
111
115
|
}>;
|
|
112
116
|
//# sourceMappingURL=HyperlinkLayer.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ICellRange } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Every feature a blank cell can be painted through, for the visible-cell scans.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Naming them is what visits blanks at all. The list is the whole cell state, not what the layer
|
|
7
|
+
* draws: per-cell style resolution composes table and named styles through the full intersection,
|
|
8
|
+
* so a partial list breaks effective styles.
|
|
9
|
+
*/
|
|
10
|
+
export declare const VisibleCellFeatures: readonly ICellRange.Feature[];
|
|
11
|
+
//# sourceMappingURL=_visibleCellFeatures.d.ts.map
|
|
@@ -48,7 +48,7 @@ export declare const resolveListPickerItems: (rules: readonly IDataValidation[],
|
|
|
48
48
|
*
|
|
49
49
|
* @remarks
|
|
50
50
|
* No search field: a validation list is a short set of choices, and narrowing it belongs to the cell
|
|
51
|
-
* editor's typing
|
|
51
|
+
* editor's typing.
|
|
52
52
|
*/
|
|
53
53
|
export declare const useValidationPicker: (options: ValidationPickerOptions) => CellPicker;
|
|
54
54
|
//# sourceMappingURL=useValidationPicker.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IMovable } from '@sheetxl/sdk';
|
|
2
|
+
import { MovableContentPreview } from './framePlacement';
|
|
3
|
+
/**
|
|
4
|
+
* The unzoomed, unrotated size a movable is drawn at: its frame on the canvas (for a member of a
|
|
5
|
+
* group, already mapped through the group's scale, so its line keeps its width), or the size an
|
|
6
|
+
* in-flight resize has it at, so its content is laid out again as the pointer moves rather than
|
|
7
|
+
* stretched, as Excel draws it. With it, the turn the frame is drawn at, and what an in-flight gesture
|
|
8
|
+
* draws the content as: adjust values a handle drag has it at, or the route a glued connector is
|
|
9
|
+
* taking.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useFramePreview: (movable: IMovable | undefined) => {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
rotation: number;
|
|
15
|
+
content: MovableContentPreview | null;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=useFramePreview.d.ts.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Command } from '@sheetxl/utils-react';
|
|
2
2
|
import { MovableKindCommandData } from '../movable';
|
|
3
|
+
/** Excel's Crop > Aspect Ratio, by command: width over height. */
|
|
4
|
+
export declare const PictureCropAspects: Readonly<Record<string, readonly [width: number, height: number]>>;
|
|
3
5
|
/**
|
|
4
6
|
* The picture kind's commands, for the active picture. Chrome is the `picture` catalog.
|
|
5
7
|
*
|
|
@@ -7,6 +9,12 @@ import { MovableKindCommandData } from '../movable';
|
|
|
7
9
|
* (`changePictureFromFile`, a file dialog) or from the web (`changePictureFromURL`, an input
|
|
8
10
|
* dialog). The image is read before the picture takes it, so a bad address or an unreadable file
|
|
9
11
|
* changes nothing. Dialog-driven and self-committing, so `noTransaction` / `noRepeat`.
|
|
12
|
+
*
|
|
13
|
+
* The crop commands are Excel's Crop menu: Crop to Shape takes what a shape gallery entry states,
|
|
14
|
+
* Aspect Ratio frames the picture at a ratio, and Fill and Fit place the image in the frame. A picture
|
|
15
|
+
* that locks its crop (`noCrop`) offers none of them.
|
|
16
|
+
*
|
|
17
|
+
* The link commands add, change, follow and remove the hyperlink a click on the picture follows.
|
|
10
18
|
*/
|
|
11
19
|
export declare const contributePictureCommands: Command.DynamicCommandContributor<MovableKindCommandData>;
|
|
12
20
|
//# sourceMappingURL=PictureCommands.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IPicture, IWorksheet } from '@sheetxl/sdk';
|
|
2
|
+
import { IReactNotifier } from '@sheetxl/utils-react';
|
|
3
|
+
/**
|
|
4
|
+
* The surface state that holds the linked picture under the pointer: a frame takes the pointer before
|
|
5
|
+
* the cells do, so the picture says it is hovered and the hyperlink layer draws its card.
|
|
6
|
+
*/
|
|
7
|
+
export declare const HOVERED_PICTURE_LINK = "hovered-picture-link";
|
|
8
|
+
/**
|
|
9
|
+
* Opens the hyperlink dialog on a picture. There is no text to show, so the dialog offers none; a link
|
|
10
|
+
* emptied there is removed. The dialog is read-only for a picture that cannot change.
|
|
11
|
+
*/
|
|
12
|
+
export declare const showPictureHyperlink: (picture: IPicture, sheet: IWorksheet, notifier: IReactNotifier | undefined) => void;
|
|
13
|
+
//# sourceMappingURL=_pictureHyperlink.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Bounds, Size } from '@sheetxl/utils';
|
|
2
|
+
import { IFill } from '@sheetxl/sdk';
|
|
3
|
+
/**
|
|
4
|
+
* Excel's Crop > Fill: the image covers the frame, keeping its proportions and centered. What
|
|
5
|
+
* overflows the frame is cropped; the frame stays.
|
|
6
|
+
*/
|
|
7
|
+
export declare const fillCrop: (frame: Size, natural: Size) => IFill.RectInsets;
|
|
8
|
+
/**
|
|
9
|
+
* Excel's Crop > Fit: the whole image shows in the frame, keeping its proportions and centered. Where
|
|
10
|
+
* it falls short of the frame the crop is negative; the frame stays.
|
|
11
|
+
*/
|
|
12
|
+
export declare const fitCrop: (frame: Size, natural: Size) => IFill.RectInsets;
|
|
13
|
+
/**
|
|
14
|
+
* Excel's Crop > Aspect Ratio: the largest frame of that ratio inside the frame, about the same center.
|
|
15
|
+
* The image keeps its scale and position on the sheet, so the crop takes up what the frame gave up.
|
|
16
|
+
*
|
|
17
|
+
* @param bounds The frame.
|
|
18
|
+
* @param crop The crop now.
|
|
19
|
+
* @param ratio Width over height.
|
|
20
|
+
*/
|
|
21
|
+
export declare const aspectCrop: (bounds: Bounds, crop: IFill.RectInsets, ratio: number) => {
|
|
22
|
+
bounds: Bounds;
|
|
23
|
+
crop: IFill.RectInsets;
|
|
24
|
+
};
|
|
25
|
+
/** Where the whole image lies when `crop` of it covers a box, in percentages of the box. */
|
|
26
|
+
export declare const imagePlacement: (crop: IFill.RectInsets | undefined) => {
|
|
27
|
+
left: string;
|
|
28
|
+
top: string;
|
|
29
|
+
width: string;
|
|
30
|
+
height: string;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=pictureCrop.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Whether the sheet's protection lets a hyperlink be added, changed or removed: the two options
|
|
4
|
+
* `ICellRange.setHyperlink` asks for.
|
|
5
|
+
*/
|
|
6
|
+
export declare const isHyperlinkEditAllowed: (sheet: IWorksheet) => boolean;
|
|
7
|
+
//# sourceMappingURL=_hyperlinkEdit.d.ts.map
|
|
@@ -13,7 +13,7 @@ import { IRange, IWorksheet } from '@sheetxl/sdk';
|
|
|
13
13
|
* makes a cycle a computation rather than a mistake, and its result is what the user turned the
|
|
14
14
|
* setting on for. Excel is the same and this is the measurement it comes from — its
|
|
15
15
|
* `Worksheet.CircularReference` answers `(none)` while iterating and names the cell again the
|
|
16
|
-
* moment `Iteration` is turned off
|
|
16
|
+
* moment `Iteration` is turned off. The cell keeps its marker either
|
|
17
17
|
* way, so an iterated cycle stays discoverable where it is; what goes quiet is the workbook-level
|
|
18
18
|
* alarm, which is the same line `ICell.getErrors()` draws (§7.3).
|
|
19
19
|
*/
|
|
@@ -11,6 +11,9 @@ import { ITheme } from '@sheetxl/sdk';
|
|
|
11
11
|
*
|
|
12
12
|
* Wraps the generic {@link buildThemeCSS} (utils-react) — OOXML/`--sxl-doc-*` is a react-layer concept — with
|
|
13
13
|
* the doc-color records cast to the token shape (the emitter is a generic `--sxl-*` matrix, agnostic to keys).
|
|
14
|
+
*
|
|
15
|
+
* @param defaultFontSize The document's default font size, in points.
|
|
16
|
+
* @param lineHeight A cell's line in the document font at that size, in px (`ICellStyle.measureText`).
|
|
14
17
|
*/
|
|
15
|
-
export declare const buildDocThemeCSS: (theme: ITheme, defaultFontSize
|
|
18
|
+
export declare const buildDocThemeCSS: (theme: ITheme, defaultFontSize: number, lineHeight: number, layer?: string, scope?: string) => string;
|
|
16
19
|
//# sourceMappingURL=buildDocThemeCSS.d.ts.map
|