@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.
Files changed (248) hide show
  1. package/browser/esm/BHjeSMaycUkS5dVL.mjs +66 -0
  2. package/browser/esm/BZcQ-KYwS62Ut45c.mjs +20 -0
  3. package/browser/esm/Bow9CzRJrYxak2i5.mjs +318 -0
  4. package/browser/esm/BuvXl14hs-1CvjeA.mjs +2706 -0
  5. package/browser/esm/BwRduT8FTrk5n72r.mjs +32 -0
  6. package/browser/esm/C6urN77szrYwODXF.mjs +134 -0
  7. package/browser/esm/CYMRbtPIr6SklGpp.mjs +775 -0
  8. package/browser/esm/CYoUd5KIl7W3AsxH.mjs +196 -0
  9. package/browser/esm/Cfe0kofqVKGxLqO6.mjs +31 -0
  10. package/browser/esm/CiRN-woJZWYOgTn4.mjs +36 -0
  11. package/browser/esm/Dd-ZybXAgoq9pgGv.mjs +45 -0
  12. package/browser/esm/DjiBz4H74I6nPUY6.mjs +79 -0
  13. package/browser/esm/DyU9UInRnfkPYYlR.mjs +63 -0
  14. package/browser/esm/J8cPagZBeXz86Lnd.mjs +777 -0
  15. package/browser/esm/Sp6PJavGKpF8SJzA.mjs +75 -0
  16. package/browser/esm/cYjYjqEsyd63x8t4.mjs +67 -0
  17. package/browser/esm/chart.mjs +60 -0
  18. package/browser/esm/control.mjs +216 -0
  19. package/browser/esm/group.mjs +123 -0
  20. package/browser/esm/index.mjs +14070 -9138
  21. package/browser/esm/note.mjs +86 -0
  22. package/browser/esm/picture.mjs +86 -0
  23. package/{node/esm/DAE_NG8D9uT50zUH.mjs → browser/esm/shape.mjs} +2 -4
  24. package/browser/esm/slicer.mjs +276 -0
  25. package/licenses/dependencies.txt +6 -599
  26. package/node/esm/BJ7ZZm63j5O6cvrB.mjs +134 -0
  27. package/node/esm/BfRn5S5V4X8xIAEa.mjs +20 -0
  28. package/node/esm/BpwE3HqTnrLLzE3C.mjs +775 -0
  29. package/node/esm/Buw-VKYJy3y5dbaJ.mjs +197 -0
  30. package/node/esm/CFFlJxNwgyInjEnh.mjs +45 -0
  31. package/node/esm/CM5BT7h-hMtST2bE.mjs +2706 -0
  32. package/node/esm/CV3bT3Hql74GcHoU.mjs +37 -0
  33. package/node/esm/C_ANM4feA1xV-pri.mjs +32 -0
  34. package/node/esm/D3YXHeOyFp00Xk3m.mjs +323 -0
  35. package/node/esm/DPN0n6MGYQ9vZ2KO.mjs +80 -0
  36. package/node/esm/DYosMUJKp-3MSO4q.mjs +76 -0
  37. package/node/esm/DhSq680c5tgMFFbj.mjs +68 -0
  38. package/node/esm/Dxbm6ryIDCEi26RO.mjs +66 -0
  39. package/node/esm/GkmuxU7OwRZtm2Rf.mjs +63 -0
  40. package/node/esm/chart.mjs +60 -0
  41. package/node/esm/control.mjs +216 -0
  42. package/node/esm/group.mjs +123 -0
  43. package/node/esm/index.mjs +16618 -11534
  44. package/node/esm/note.mjs +87 -0
  45. package/node/esm/picture.mjs +86 -0
  46. package/node/esm/shape.mjs +783 -0
  47. package/node/esm/slicer.mjs +278 -0
  48. package/package.json +53 -14
  49. package/resources/contents.json +18 -0
  50. package/resources/locales/contents.json +42 -0
  51. package/resources/locales/de/movable.cmd.json +154 -0
  52. package/resources/locales/de/picture.cmd.json +31 -0
  53. package/resources/locales/de/selection.cmd.json +8 -0
  54. package/resources/locales/de/shape.cmd.json +17 -0
  55. package/resources/locales/de/sheet.cmd.json +328 -21
  56. package/resources/locales/de/slicer.cmd.json +17 -0
  57. package/resources/locales/de/table.cmd.json +9 -1
  58. package/resources/locales/de/ui.msg.json +309 -3
  59. package/resources/locales/de/workbook.cmd.json +10 -6
  60. package/resources/locales/en/movable.cmd.json +154 -0
  61. package/resources/locales/en/picture.cmd.json +31 -0
  62. package/resources/locales/en/selection.cmd.json +8 -0
  63. package/resources/locales/en/shape.cmd.json +17 -0
  64. package/resources/locales/en/sheet.cmd.json +342 -22
  65. package/resources/locales/en/slicer.cmd.json +17 -0
  66. package/resources/locales/en/table.cmd.json +9 -1
  67. package/resources/locales/en/ui.msg.json +309 -3
  68. package/resources/locales/en/workbook.cmd.json +11 -7
  69. package/types/chart.d.ts +2 -0
  70. package/types/control.d.ts +2 -0
  71. package/types/group.d.ts +2 -0
  72. package/types/note.d.ts +2 -0
  73. package/types/picture.d.ts +2 -0
  74. package/types/shape.d.ts +2 -0
  75. package/types/slicer.d.ts +2 -0
  76. package/types/src/annotation/RangeAnnotations.d.ts +119 -0
  77. package/types/src/annotation/index.d.ts +2 -0
  78. package/types/src/autoFill/AutoFillPresets.d.ts +14 -0
  79. package/types/src/autoFill/FillMenu.d.ts +36 -0
  80. package/types/src/autoFill/FillSeries.d.ts +38 -0
  81. package/types/src/autoFill/index.d.ts +4 -0
  82. package/types/src/border/StaticBorderRenderer.d.ts +2 -2
  83. package/types/src/border/useBorders.d.ts +7 -7
  84. package/types/src/cell/CornerTriangle.d.ts +6 -0
  85. package/types/src/cell/FormulaCellRenderer.d.ts +1 -1
  86. package/types/src/cell/OutlineButton.d.ts +123 -0
  87. package/types/src/cell/SheetCellRenderer.d.ts +2 -2
  88. package/types/src/cell/SheetHeaderRenderer.d.ts +5 -0
  89. package/types/src/cell/StaticCellRenderer.d.ts +57 -0
  90. package/types/src/cell/index.d.ts +2 -0
  91. package/types/src/cell/useFormulaViewAnchor.d.ts +1 -1
  92. package/types/src/chart/index.d.ts +0 -1
  93. package/types/src/checklist/ValueChecklist.d.ts +112 -0
  94. package/types/src/checklist/index.d.ts +2 -0
  95. package/types/src/commands/ContextualToolbar.d.ts +19 -0
  96. package/types/src/commands/createTransactionalMiddleware.d.ts +4 -1
  97. package/types/src/commands/index.d.ts +1 -0
  98. package/types/src/comment/CommentCardRequest.d.ts +94 -0
  99. package/types/src/comment/CommentUtils.d.ts +43 -0
  100. package/types/src/comment/NoteEditor.d.ts +20 -0
  101. package/types/src/comment/index.d.ts +5 -0
  102. package/types/src/comment/useCommentThread.d.ts +37 -0
  103. package/types/src/comment/useSheetComments.d.ts +28 -0
  104. package/types/src/{sheet → conditionalFormat}/ConditionalFormatPresets.d.ts +6 -6
  105. package/types/src/conditionalFormat/index.d.ts +1 -0
  106. package/types/src/control/FormControlRenderers.d.ts +22 -0
  107. package/types/src/editor/FunctionPreviewPanel.d.ts +15 -1
  108. package/types/src/editor/NamedItemLabel.d.ts +29 -0
  109. package/types/src/editor/NamedItemsPanel.d.ts +13 -2
  110. package/types/src/editor/SheetCellEditorLayer.d.ts +3 -7
  111. package/types/src/editor/SheetCellEditorStartLayer.d.ts +44 -0
  112. package/types/src/editor/SheetCellInput.d.ts +26 -2
  113. package/types/src/editor/SheetEditable.d.ts +8 -2
  114. package/types/src/editor/formulaCaret.d.ts +39 -10
  115. package/types/src/editor/formulaEval.d.ts +9 -5
  116. package/types/src/editor/formulaLint.d.ts +36 -0
  117. package/types/src/editor/formulaPresentation.d.ts +7 -0
  118. package/types/src/editor/formulaText.d.ts +17 -5
  119. package/types/src/editor/functionArgs.d.ts +20 -0
  120. package/types/src/editor/index.d.ts +4 -1
  121. package/types/src/editor/pickedReference.d.ts +76 -0
  122. package/types/src/editor/useEditRejectedNotice.d.ts +32 -0
  123. package/types/src/editor/useFormulaHints.d.ts +93 -3
  124. package/types/src/editor/useFormulaInput.d.ts +30 -4
  125. package/types/src/editor/useReferenceMode.d.ts +12 -0
  126. package/types/src/editor/validationAlert.d.ts +24 -0
  127. package/types/src/externalLink/ExternalLinksPaneArgs.d.ts +23 -0
  128. package/types/src/externalLink/index.d.ts +2 -0
  129. package/types/src/form/FormulaInput.d.ts +18 -2
  130. package/types/src/form/FormulaInputParts.d.ts +10 -1
  131. package/types/src/form/useEditCommit.d.ts +23 -3
  132. package/types/src/form/useInputField.d.ts +2 -3
  133. package/types/src/frame/CommandContext.d.ts +188 -6
  134. package/types/src/group/GroupEditor.d.ts +25 -0
  135. package/types/src/index.d.ts +12 -2
  136. package/types/src/io/WorkbookIO.d.ts +2 -0
  137. package/types/src/layer/CellErrorLayer.d.ts +24 -7
  138. package/types/src/layer/CommentCardLayer.d.ts +43 -0
  139. package/types/src/layer/CommentsLayer.d.ts +35 -0
  140. package/types/src/layer/ConditionalIcons.d.ts +4 -4
  141. package/types/src/layer/FreezeDragLines.d.ts +17 -0
  142. package/types/src/layer/GridFreezeLayer.d.ts +11 -0
  143. package/types/src/layer/HeaderFreezeLayer.d.ts +12 -0
  144. package/types/src/layer/HeaderResizerLayer.d.ts +2 -1
  145. package/types/src/layer/HyperlinkLayer.d.ts +109 -0
  146. package/types/src/layer/MovableKindScope.d.ts +17 -0
  147. package/types/src/layer/ProtectionLayer.d.ts +52 -0
  148. package/types/src/layer/RangeAnnotationLayer.d.ts +71 -0
  149. package/types/src/layer/ResizeIndicator.d.ts +9 -8
  150. package/types/src/layer/ResizeTooltip.d.ts +13 -0
  151. package/types/src/layer/SheetHeaderCellLayer.d.ts +10 -1
  152. package/types/src/layer/SheetOutlineLayer.d.ts +40 -0
  153. package/types/src/layer/TableLayer.d.ts +5 -4
  154. package/types/src/layer/TableToolbar.d.ts +42 -0
  155. package/types/src/layer/ValidationDropdownLayer.d.ts +15 -5
  156. package/types/src/layer/ValidationIndicatorLayer.d.ts +9 -3
  157. package/types/src/layer/ValidationPromptLayer.d.ts +64 -0
  158. package/types/src/layer/_tableColor.d.ts +4 -0
  159. package/types/src/layer/cellTip.d.ts +13 -0
  160. package/types/src/layer/freezeDragState.d.ts +21 -0
  161. package/types/src/layer/index.d.ts +12 -1
  162. package/types/src/layer/resizeIndicatorState.d.ts +3 -1
  163. package/types/src/layer/useFreezeDrag.d.ts +22 -0
  164. package/types/src/layer/useValidationPicker.d.ts +35 -35
  165. package/types/src/layer/validationMark.d.ts +63 -0
  166. package/types/src/listener/useModelListener.d.ts +4 -4
  167. package/types/src/movable/ConnectionSites.d.ts +18 -0
  168. package/types/src/movable/IMovableArea.d.ts +56 -0
  169. package/types/src/movable/MovableAdornment.d.ts +26 -0
  170. package/types/src/movable/MovableCommandGroups.d.ts +40 -0
  171. package/types/src/movable/MovableCommands.d.ts +6 -1
  172. package/types/src/movable/MovableControl.d.ts +78 -0
  173. package/types/src/movable/MovableEdit.d.ts +22 -0
  174. package/types/src/movable/MovableFrame.d.ts +16 -13
  175. package/types/src/movable/MovableLayer.d.ts +25 -7
  176. package/types/src/movable/MovableRenderers.d.ts +210 -0
  177. package/types/src/movable/PlaceholderFrames.d.ts +11 -0
  178. package/types/src/movable/RotateHandle.d.ts +37 -0
  179. package/types/src/movable/TextBox.d.ts +34 -0
  180. package/types/src/movable/connect.d.ts +16 -0
  181. package/types/src/movable/framePlacement.d.ts +72 -0
  182. package/types/src/movable/geometry.d.ts +61 -0
  183. package/types/src/movable/index.d.ts +10 -0
  184. package/types/src/movable/pressTarget.d.ts +20 -0
  185. package/types/src/picker/PickerPanel.d.ts +52 -0
  186. package/types/src/picker/cellPickerOpen.d.ts +6 -0
  187. package/types/src/picker/index.d.ts +4 -0
  188. package/types/src/picker/useCellPicker.d.ts +95 -0
  189. package/types/src/picture/PictureCommands.d.ts +12 -0
  190. package/types/src/picture/PictureKind.d.ts +7 -0
  191. package/types/src/picture/index.d.ts +0 -1
  192. package/types/src/protection/ProtectionPaneArgs.d.ts +31 -0
  193. package/types/src/protection/index.d.ts +3 -0
  194. package/types/src/protection/unlockProtectedRanges.d.ts +23 -0
  195. package/types/src/richText/RichTextEditor.d.ts +41 -0
  196. package/types/src/richText/index.d.ts +2 -0
  197. package/types/src/selection/SheetSelectionLayer.d.ts +14 -10
  198. package/types/src/shape/ConnectorControl.d.ts +46 -0
  199. package/types/src/shape/ShapeCommands.d.ts +11 -0
  200. package/types/src/shape/ShapeControl.d.ts +8 -0
  201. package/types/src/shape/ShapeEditor.d.ts +15 -2
  202. package/types/src/shape/ShapeGallery.d.ts +31 -0
  203. package/types/src/shape/ShapeHandles.d.ts +28 -0
  204. package/types/src/shape/ShapeKind.d.ts +7 -0
  205. package/types/src/shape/ShapeSVG.d.ts +22 -0
  206. package/types/src/shape/ShapeText.d.ts +17 -0
  207. package/types/src/shape/icons/ShapeIcons.d.ts +16 -0
  208. package/types/src/shape/icons/_ShapeIconPack.d.ts +4 -0
  209. package/types/src/shape/index.d.ts +3 -1
  210. package/types/src/shape/shapeFrame.d.ts +50 -0
  211. package/types/src/shape/shapeStyle.d.ts +82 -0
  212. package/types/src/sheet/ISheetElement.d.ts +62 -65
  213. package/types/src/sheet/SheetCommandProvider.d.ts +9 -4
  214. package/types/src/sheet/SheetCommands.d.ts +21 -6
  215. package/types/src/sheet/SheetOutlineElement.d.ts +70 -0
  216. package/types/src/sheet/SheetScrollbar.d.ts +1 -10
  217. package/types/src/sheet/_freezeAt.d.ts +10 -0
  218. package/types/src/sheet/_useHeaderMetrics.d.ts +11 -0
  219. package/types/src/sheet/circularReferences.d.ts +9 -1
  220. package/types/src/sheet/index.d.ts +1 -1
  221. package/types/src/sheet/useCycleHighlight.d.ts +21 -0
  222. package/types/src/slicer/SlicerCommands.d.ts +10 -0
  223. package/types/src/slicer/SlicerEditor.d.ts +8 -2
  224. package/types/src/slicer/SlicerKind.d.ts +7 -0
  225. package/types/src/slicer/SlicerStylePreview.d.ts +18 -0
  226. package/types/src/slicer/index.d.ts +2 -1
  227. package/types/src/slicer/slicerStyles.d.ts +32 -0
  228. package/types/src/tabStrip/TabStrip.d.ts +7 -0
  229. package/types/src/taskPane/ITaskPane.d.ts +12 -1
  230. package/types/src/taskPane/MovablePane.d.ts +17 -0
  231. package/types/src/taskPane/index.d.ts +1 -0
  232. package/types/src/theme/ThemeState.d.ts +14 -1
  233. package/types/src/theme/useGridColorScheme.d.ts +1 -1
  234. package/types/src/workbook/DefaultMovableRenderers.d.ts +20 -0
  235. package/types/src/workbook/IWorkbookElement.d.ts +24 -0
  236. package/types/src/workbook/WorkbookCommands.d.ts +2 -4
  237. package/types/src/workbook/WorkbookStrip.d.ts +9 -0
  238. package/types/src/workbook/_followOrigin.d.ts +9 -0
  239. package/types/src/workbook/useWorkbookFormat.d.ts +3 -3
  240. package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
  241. package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +0 -156
  242. package/browser/cjs/index.cjs +0 -35
  243. package/browser/esm/SJMJzBwlXTJ9QIO5.mjs +0 -6286
  244. package/types/src/editor/useProtectedEditNotice.d.ts +0 -14
  245. package/types/src/layer/validationList.d.ts +0 -84
  246. package/types/src/list/SheetValueList.d.ts +0 -93
  247. package/types/src/list/index.d.ts +0 -2
  248. package/types/src/movable/MoveableBundle.d.ts +0 -4
@@ -56,9 +56,8 @@ export interface InputFieldApi {
56
56
  /** `true` when the text differs from the committed value's text. */
57
57
  dirty: boolean;
58
58
  /**
59
- * `true` while an edit SESSION is open — for a plain field that means focused (or edited while
60
- * focus stayed after a commit), and it is what the modal ✓/✗ adornments key off. A done key ends
61
- * the session even though focus stays, exactly like the formula field's engagement.
59
+ * `true` while an edit SESSION is open — for a plain field, while it is focused. A done key ends the
60
+ * session and, focus staying, a fresh one starts — exactly like the formula field's engagement.
62
61
  */
63
62
  engaged: boolean;
64
63
  /** Restore the committed value's text (the field-level Escape). */
@@ -1,4 +1,4 @@
1
- import { IRange, ICell, ICellRanges, ICellRange, IColor, ITable, INamedCollection, IStyleCollection, IStyle, IBorder, ITheme, IThemeCollection, IFunction, IFunctionCollection, IWorkbook } from '@sheetxl/sdk';
1
+ import { IRange, ICell, ICellRanges, ICellRange, IColor, ITable, INamedCollection, IStyleCollection, ICellStyle, IBorders, ITheme, IThemeCollection, IFunction, IFunctionCollection, IWorkbook, ISlicer } from '@sheetxl/sdk';
2
2
  /**
3
3
  * For providing Adjustable Color Commands additional rendering capabilities.
4
4
  *
@@ -18,14 +18,14 @@ export interface Color {
18
18
  }
19
19
  export interface Border {
20
20
  readonly autoColor: IColor;
21
- readonly autoStyle: IBorder.StrokeStyle;
22
- readonly quickBorder?: Partial<IBorder.Properties>;
21
+ readonly autoStyle: IBorders.StrokeStyle;
22
+ readonly quickBorder?: Partial<IBorders.Properties>;
23
23
  readonly schemeLookup: IColor.SchemeLookup;
24
- createBorder: (update: IBorder.Properties) => IBorder;
25
- onBorderSelect: (border: Partial<IBorder.Properties>) => void;
24
+ createBorder: (update: IBorders.Properties) => IBorders;
25
+ onBorderSelect: (border: Partial<IBorders.Properties>) => void;
26
26
  }
27
27
  export interface NamedStyle {
28
- readonly named: () => IStyle.INamed;
28
+ readonly named: () => ICellStyle.INamed;
29
29
  readonly styles: () => IStyleCollection;
30
30
  createCell: (update: ICell.Update) => ICell;
31
31
  }
@@ -46,6 +46,19 @@ export interface Table {
46
46
  */
47
47
  resolveRanges: (address: ICellRanges.Address) => ICellRanges;
48
48
  }
49
+ /** What a slicer-style gallery draws its previews with. */
50
+ export interface Slicer {
51
+ readonly slicer: () => ISlicer;
52
+ readonly styles: () => IStyleCollection;
53
+ }
54
+ /**
55
+ * What the Insert Slicer gallery draws with: the workbook's styles, and the slicers a picked style
56
+ * restyles. With none, a pick inserts a slicer in that style.
57
+ */
58
+ export interface SlicerStyles {
59
+ readonly styles: () => IStyleCollection;
60
+ readonly slicers?: () => readonly ISlicer[];
61
+ }
49
62
  export interface Theme {
50
63
  readonly theme: ITheme;
51
64
  readonly themes: IThemeCollection;
@@ -74,14 +87,183 @@ export interface ResizeHeaderContext {
74
87
  toUnits?(value: number): number;
75
88
  toPixels?(value: number): number;
76
89
  }
90
+ /**
91
+ * The one group a Show / Hide Detail command acts on, named by its summary header; without it the
92
+ * command acts on the selection.
93
+ */
94
+ export interface OutlineTarget {
95
+ axis: IRange.Axis;
96
+ /** The summary row or column, zero-based. */
97
+ index: number;
98
+ }
99
+ /** A gutter button's press: expand (`show`) or collapse the group whose summary this is. */
100
+ export interface OutlineToggle extends OutlineTarget {
101
+ show: boolean;
102
+ }
103
+ /** The level a level button shows: `level` on `axis`. */
104
+ export interface OutlineLevel {
105
+ axis: IRange.Axis;
106
+ level: number;
107
+ }
108
+ /** The outline settings window's value. */
109
+ export interface OutlineSettings {
110
+ /** Summary rows below their details (else above). */
111
+ summaryBelow: boolean;
112
+ /** Summary columns to the right of their details (else to the left). */
113
+ summaryRight: boolean;
114
+ /** Apply the automatic outline styles. */
115
+ automaticStyles: boolean;
116
+ }
77
117
  export interface NewTable {
78
118
  ranges: ICellRanges;
79
119
  hasHeader?: boolean;
120
+ /** The table's name. When omitted the next free default name is used. */
121
+ name?: string;
80
122
  }
81
123
  export interface SelectedRange {
82
124
  range: ICellRange;
83
125
  cell?: ICell.Address;
84
126
  }
127
+ /**
128
+ * What the Series dialog produces — a {@link IAutoFill.Preset} named by id, the direction it runs,
129
+ * and the fields the chosen type declares.
130
+ *
131
+ * @remarks
132
+ * The preset is named rather than passed because this crosses a command boundary: the id survives
133
+ * into a transaction's operation params and back, where a filler instance would not.
134
+ */
135
+ export interface FillSeriesOptions {
136
+ /** {@link IAutoFill.Preset.id} of the chosen fill type. */
137
+ presetId: string;
138
+ /** Which way the series runs through the selection. Always `Down` or `Right` from a selection. */
139
+ direction: IRange.Direction;
140
+ /** Fit the series to the values rather than stepping from them. */
141
+ trend?: boolean;
142
+ /** {@link IAutoFill.Options.stepValue} — meaningless, and hidden, unless the type declares it. */
143
+ stepValue?: number;
144
+ /** {@link IAutoFill.Options.stopValue} */
145
+ stopValue?: number;
146
+ }
147
+ /**
148
+ * The two ranges a fill actually runs over — what it reads, and what it writes.
149
+ *
150
+ * @remarks
151
+ * Worth showing, because they are not the selection and not obvious from it: the template is the
152
+ * selection's leading CONTENTFUL part, so typing a second seed value changes what the fill reads.
153
+ * Excel keeps this hidden and always seeds from the first cell, which is why nobody can tell what
154
+ * its dialog is about to do.
155
+ */
156
+ export interface FillSeriesRanges {
157
+ /** Address of the cells the series is read from. */
158
+ template: string;
159
+ /** Address of the cells the fill covers — the selection. */
160
+ destination: string;
161
+ /** How many cells deep the template is along the fill direction. */
162
+ templateSize: number;
163
+ /** How many cells deep the destination is — the template included. */
164
+ size: number;
165
+ }
166
+ /**
167
+ * Everything the Series dialog needs to offer, preview and describe a fill, without reaching into
168
+ * the model itself.
169
+ *
170
+ * @remarks
171
+ * The dialog is presentation: which types apply, what a setting would produce, and where the fill
172
+ * would land are all questions about the sheet, and they are answered here so the dialog does not
173
+ * have to iterate cells to ask them.
174
+ */
175
+ export interface FillSeries {
176
+ /** The selection the fill runs over — the dialog shows its address. */
177
+ readonly range: ICellRange;
178
+ /**
179
+ * The direction the selection's own shape implies, and the dialog's initial value.
180
+ *
181
+ * @remarks
182
+ * A single column runs down and a single row runs across; a block is ambiguous and Excel's own
183
+ * default (down) is taken, which is why the dialog still offers the choice.
184
+ */
185
+ readonly direction: IRange.Direction;
186
+ /**
187
+ * The preset ids that can be offered for `direction`, in registry order.
188
+ *
189
+ * @remarks
190
+ * A preset applies when it applies to ANY line of the selection — a selection holding a column of
191
+ * dates beside a column of numbers offers the date fills, and the numeric column falls back to a
192
+ * copy rather than the entry being greyed for both.
193
+ */
194
+ offered: (direction: IRange.Direction) => readonly string[];
195
+ /**
196
+ * The addresses a fill in `direction` would read and write, or `null` where there is nothing to
197
+ * fill — which is also how a surface knows a direction is not on offer at all.
198
+ */
199
+ resolve: (direction: IRange.Direction) => FillSeriesRanges | null;
200
+ /**
201
+ * A projection of what `options` would fill, or `null` where there is nothing to fill.
202
+ *
203
+ * @remarks
204
+ * Nothing is committed and no undo entry is created; the cells are computed on demand, so reading
205
+ * the handful the dialog shows costs that handful. See {@link ICellRange.AutoFillOptions.preview}.
206
+ */
207
+ preview: (options: FillSeriesOptions) => ICellRange | null;
208
+ }
209
+ /**
210
+ * A fill the fill menu can run — a chosen entry, as data.
211
+ *
212
+ * @remarks
213
+ * The entries are presets plus a content selector: *Copy Cells* is the `copy` preset, *Fill
214
+ * Formatting Only* is `Formats` with no preset (no series is read), *Fill Without Formatting* is
215
+ * the `series` preset with `Values`.
216
+ */
217
+ export interface FillMenuOptions {
218
+ /**
219
+ * {@link IAutoFill.Preset.id} of the fill type. Omit for a formatting-only fill, which reads no
220
+ * series at all.
221
+ */
222
+ presetId?: string;
223
+ /**
224
+ * {@link ICellRange.AutoFillOptions.type} — `Formats` for *Fill Formatting Only*, `Values` for
225
+ * *Fill Without Formatting*; omitted for everything.
226
+ */
227
+ type?: ICell.Content;
228
+ }
229
+ /**
230
+ * Everything the fill menu — the right-drag of the fill handle — needs to offer and run a fill.
231
+ *
232
+ * @remarks
233
+ * The drag has already decided what is read, what is covered and which way, so unlike
234
+ * {@link FillSeries} nothing here is asked per direction. The menu is presentation: it lists the
235
+ * entries it wants in the order it wants, greys those not in `offered`, and calls back.
236
+ */
237
+ export interface FillMenu {
238
+ /** The cells the fill reads — the selection the handle was dragged from. */
239
+ readonly template: ICellRange;
240
+ /** The cells the fill covers, the template included — where the handle was released. */
241
+ readonly destination: ICellRange;
242
+ /** Which way the drag went. */
243
+ readonly direction: IRange.Direction;
244
+ /**
245
+ * The {@link IAutoFill.Preset.id}s that can be offered for the template, in registry order — see
246
+ * {@link IAutoFill.DefaultCriteria.offered}. Empty for a template with nothing in it.
247
+ */
248
+ readonly offered: readonly string[];
249
+ /**
250
+ * Run the chosen fill and select the destination, as a left-drag would. A refused fill (a merge
251
+ * the destination cannot hold) is reported, not thrown.
252
+ */
253
+ fill: (options: FillMenuOptions) => Promise<void>;
254
+ /** Open the Series dialog on the drag's template, destination and direction. */
255
+ series: () => void;
256
+ /**
257
+ * The menu closed without choosing — the drag is over and nothing is filled.
258
+ *
259
+ * @remarks
260
+ * The grid keeps the drag's dashed preview up while a choice is pending, since it shows which
261
+ * cells the menu is about; this is what lets it go. A no-op once {@link fill} or {@link series}
262
+ * was called — those settle the drag themselves, the dialog included — so a menu can call it
263
+ * from every close path without caring which one it was.
264
+ */
265
+ cancel: () => void;
266
+ }
85
267
  /**
86
268
  * The function-discovery context the `insertFunction` command carries — everything a picker (the
87
269
  * category menus, and the Insert Function dialog) needs to browse the workbook's functions, built-in
@@ -0,0 +1,25 @@
1
+ import { default as React } from 'react';
2
+ import { IMovable } from '@sheetxl/sdk';
3
+ import { MovableElementProps } from '../movable';
4
+ export interface GroupEditorProps extends MovableElementProps {
5
+ /** The content of a movable that holds movables ({@link IMovable.getMovables}): a group. */
6
+ container: IMovable.IContent;
7
+ ref?: React.Ref<HTMLDivElement>;
8
+ }
9
+ /**
10
+ * Content that holds movables, in the sheet: a container that draws each member with the
11
+ * renderer of its own kind, where the member says it is drawn.
12
+ *
13
+ * @remarks
14
+ * A member answers its placement on the canvas, so the members are laid out in canvas pixels in
15
+ * one box whose transform takes the canvas back into the frame: it undoes the frame's turn and
16
+ * mirror about the frame's center. While the group itself is in a gesture, the same transform
17
+ * maps the committed frame onto the gesture's, so the members follow it before it commits (a plain
18
+ * stretch, without the quadrant rule, until the drop). A member's box carries its id, so a press
19
+ * on it reaches the member (Excel's two-step), and a member's own gesture draws its preview here.
20
+ * Nothing here is a hit target but what the members paint and, while the group is selected, its
21
+ * edge: a group paints nothing of its own, so its outline is where a press grabs the group itself
22
+ * rather than a member, as Excel drags a selected group by its frame.
23
+ */
24
+ export declare const GroupEditor: React.NamedExoticComponent<Omit<GroupEditorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
25
+ //# sourceMappingURL=GroupEditor.d.ts.map
@@ -2,21 +2,31 @@ export { LicenseManager, type LicenseDetails } from '@sheetxl/sdk';
2
2
  export * from './context';
3
3
  export * from './cell';
4
4
  export * from './editor';
5
- export * from './list';
6
5
  export * from './selection';
7
6
  export * from './border';
8
7
  export * from './sheet';
9
8
  export * from './picture';
9
+ export * from './slicer';
10
10
  export * from './shape';
11
11
  export * from './chart';
12
- export * from './slicer';
12
+ export * from './comment';
13
+ export * from './annotation';
14
+ export * from './richText';
13
15
  export * from './movable';
14
16
  export * from './form';
15
17
  export * from './editableLabel';
16
18
  export * from './tabStrip';
17
19
  export * from './icons';
18
20
  export * from './layer/ConditionalIcons';
21
+ export * from './layer/RangeAnnotationLayer';
22
+ export * from './layer/HyperlinkLayer';
23
+ export type { TableToolbarRenderProps } from './layer/TableToolbar';
24
+ export * from './picker';
25
+ export * from './checklist';
19
26
  export * from './conditionalFormat';
27
+ export * from './autoFill';
28
+ export * from './protection';
29
+ export * from './externalLink';
20
30
  export * from './clipboard';
21
31
  export * from './commands';
22
32
  export * from './undo';
@@ -42,6 +42,8 @@ export declare class _WorkbookIO implements IWorkbookIO {
42
42
  addListeners(listeners: IWorkbookIO.Listeners, _options?: IListener.Options): IListener.Remove;
43
43
  /** @inheritdoc IWorkbookIO.addCommitListener */
44
44
  addCommitListener(listener: ITransaction.ICommitSource.IListeners): IListener.Remove;
45
+ /** {@inheritDoc IWorkbookIO.isIWorkbookIO} */
46
+ get isIWorkbookIO(): true;
45
47
  }
46
48
  /**
47
49
  * A Singleton instance that lazy wraps '@sheetxl/io/WorkbookIO'.
@@ -2,14 +2,22 @@ import { default as React } from 'react';
2
2
  import { RangeCoords } from '@sheetxl/utils';
3
3
  import { ICalculation, IRange, ISheet } from '@sheetxl/sdk';
4
4
  import { StickyState, GridPlacement, LayerProps } from '@sheetxl/grid-react';
5
+ import { ValidationMark } from './validationMark';
5
6
  /** The kind of annotation a cell carries (drives the default tip styling). */
6
- export type CellErrorKind = 'error' | 'warning' | 'circular';
7
+ export type CellErrorKind = 'error' | 'warning' | 'circular' | 'validation';
7
8
  /** The active hovered annotation passed to a custom {@link CellErrorLayerProps.renderTip}. */
8
9
  export interface CellErrorTip {
9
10
  /** The hovered cell as a range (the tip's anchor). */
10
11
  range: RangeCoords;
11
12
  /** `getErrors()` (preferred) or `getWarnings()` joined by newline. */
12
13
  message: string;
14
+ /**
15
+ * The error the cell shows (`#DIV/0!`, as displayed), when its value is one. `kind === 'error'` only;
16
+ * `message` is then the error's own message, empty when it carries none.
17
+ */
18
+ code?: string;
19
+ /** What that kind of error means, in general — not this cell's particulars. With {@link code}. */
20
+ description?: string;
13
21
  /** Which list the message came from. */
14
22
  kind: CellErrorKind;
15
23
  /** The resolved sticky state (e.g. `state.scrollIntoView()` to reveal the cell). */
@@ -23,6 +31,11 @@ export interface CellErrorTip {
23
31
  path?: readonly IRange.CellCoords[];
24
32
  /** The cycle's representative — where a downstream cell is pointed. `kind === 'circular'` only. */
25
33
  representative?: IRange.CellCoords | null;
34
+ /**
35
+ * How the value fails its data validations, the mark this tip explains. `kind === 'validation'`
36
+ * only; `message` is then the answering rule's alert, or its description when it has none.
37
+ */
38
+ validation?: ValidationMark;
26
39
  }
27
40
  /**
28
41
  * Props for {@link CellErrorLayer}.
@@ -32,11 +45,14 @@ export interface CellErrorLayerProps extends Omit<LayerProps, 'children'> {
32
45
  className?: string;
33
46
  /** The sheet whose cells are probed for `getErrors()` / `getCircularReference()` / `getWarnings()`. */
34
47
  sheet: ISheet;
35
- /** Which side of the cell the tip attaches to. @defaultValue `{ side: 'r', align: 'start' }` */
48
+ /** Which side of the cell the tip attaches to. @defaultValue `{ side: 'b', align: 'start' }`, as the input prompt's */
36
49
  placement?: GridPlacement;
37
50
  /** Gap (px) between the cell edge and the tip. @defaultValue 6 */
38
51
  offset?: number;
39
- /** Offset (px) along the cell edge — only applies to `start` / `end` align (inset from the corner). @defaultValue 2 */
52
+ /**
53
+ * Offset (px) along the cell edge, from the corner `align` names. Omitted, the tip starts `offset`
54
+ * past the cell's right edge, as the input prompt does.
55
+ */
40
56
  alignOffset?: number;
41
57
  /** Dwell (ms) before the tip shows. @defaultValue 300 */
42
58
  openDelay?: number;
@@ -44,15 +60,16 @@ export interface CellErrorLayerProps extends Omit<LayerProps, 'children'> {
44
60
  closeDelay?: number;
45
61
  /**
46
62
  * Optional custom tip renderer. Spread `tipProps` (from context via `useSticky`, or reuse the
47
- * default) onto the returned element to keep the tip open while hovered. Omit for the default pill.
63
+ * default) onto the returned element to keep the tip open while hovered. Omit for the default card.
48
64
  */
49
65
  renderTip?: (tip: CellErrorTip) => React.ReactNode;
50
66
  }
51
67
  /**
52
68
  * A grid layer that shows a **hover tooltip on cells carrying errors / warnings**. A thin
53
- * {@link HoverTipLayer} whose probe asks the sheet — `getErrors()`, then
54
- * `getCircularReference()`, then `getWarnings()` — and anchors on the cell's own range; the tip
55
- * stays open while hovered. `getComments()` is not yet wired (unimplemented in the model).
69
+ * {@link RangeTooltipLayer} whose probe asks the sheet — `getErrors()`, then
70
+ * `getCircularReference()`, then the data validations the value fails, then `getWarnings()` — and
71
+ * anchors on the cell's own range; the tip stays open while hovered. `getComments()` is not yet
72
+ * wired (unimplemented in the model).
56
73
  *
57
74
  * @remarks
58
75
  * A cell in a reference cycle, or downstream of one, is a third source (`kind: 'circular'`)
@@ -0,0 +1,43 @@
1
+ import { default as React } from 'react';
2
+ import { ISheet } from '@sheetxl/sdk';
3
+ import { LayerProps } from '@sheetxl/grid-react';
4
+ import { CommentCardRenderProps } from '../comment/CommentCardRequest';
5
+ export interface CommentCardLayerProps extends Omit<LayerProps, 'children'> {
6
+ /** Class for the floated card container. */
7
+ className?: string;
8
+ /** Style for the floated card container. */
9
+ style?: React.CSSProperties;
10
+ /** The sheet whose threads are shown. */
11
+ sheet: ISheet;
12
+ /**
13
+ * Renders the card. The layer places it, keeps it open and keeps its keystrokes and presses from
14
+ * the grid; what it looks like is the renderer's.
15
+ */
16
+ renderCard: (props: CommentCardRenderProps) => React.ReactNode;
17
+ /**
18
+ * The task pane that lists the sheet's threads. While it is the active pane the cards are shown
19
+ * there and this layer shows none.
20
+ * @defaultValue 'comments'
21
+ */
22
+ paneKey?: string;
23
+ /** Gap (px) between the cell's right edge and the card. @defaultValue 18 */
24
+ offset?: number;
25
+ /** Dwell (ms) on a thread's cell before its card shows. @defaultValue 300 */
26
+ openDelay?: number;
27
+ /** Grace (ms) after leaving the cell and its card before the card hides. @defaultValue 250 */
28
+ closeDelay?: number;
29
+ }
30
+ /**
31
+ * The **comment card** beside a cell — a {@link RangeFloatLayer} showing the thread of the cell the
32
+ * pointer rests on, and the card a command asked for (`requestCommentCard`): a draft on a
33
+ * cell with no thread, or the thread a command went to. Selecting a cell shows nothing by itself,
34
+ * as in Excel.
35
+ *
36
+ * @remarks
37
+ * A note has a box of its own and is not shown here. The card of a requested cell stays until the
38
+ * selection leaves the cell or the card is dismissed. The card is a `'focus'` float: while it holds the
39
+ * caret it stays on its thread whatever the pointer does, Escape or a press outside it closes it (focus
40
+ * back to the grid), and none of its events reach the grid.
41
+ */
42
+ export declare const CommentCardLayer: React.MemoExoticComponent<(props: CommentCardLayerProps) => React.JSX.Element>;
43
+ //# sourceMappingURL=CommentCardLayer.d.ts.map
@@ -0,0 +1,35 @@
1
+ import { default as React } from 'react';
2
+ import { ISheet } from '@sheetxl/sdk';
3
+ import { LayerProps } from '@sheetxl/grid-react';
4
+ export interface CommentsLayerProps extends LayerProps {
5
+ /** Class for the layer (devtools identification). */
6
+ className?: string;
7
+ /** Style for the indicators host box. */
8
+ style?: React.CSSProperties;
9
+ /** The sheet whose comments are indicated. */
10
+ sheet: ISheet;
11
+ /** Size (px, unzoomed) of the corner indicator. @defaultValue 7 */
12
+ markSize?: number;
13
+ /** Dwell (ms) on a note's cell before its box shows. @defaultValue 300 */
14
+ openDelay?: number;
15
+ /** Grace (ms) after leaving the cell and its box before the box hides. @defaultValue 150 */
16
+ closeDelay?: number;
17
+ }
18
+ /**
19
+ * The sheet's **comments** on the grid: the corner indicator on every commented cell in view, the
20
+ * box of a note while the pointer rests on its cell, and the leader line from a note's cell to its
21
+ * box for every box on the sheet.
22
+ *
23
+ * @remarks
24
+ * The indicators are {@link CellTileDiv} snapshots that survive scroll, colored by what the cell
25
+ * carries: a note, a thread, or a resolved thread. They are a property of the cell and not of its
26
+ * value, which is why they are not the cell renderer's: an empty cell can carry a note.
27
+ *
28
+ * The box itself is the note's movable and is drawn by the movable layer with the regular handles.
29
+ * This layer only says which box the pointer is on — through the surface's `movable-hover` state,
30
+ * after the dwell — and keeps saying so while the pointer is on the cell, the box or the leader
31
+ * between them. Clicking the box selects it, and a selected box stays whether the pointer is on it
32
+ * or not.
33
+ */
34
+ export declare const CommentsLayer: React.MemoExoticComponent<(props: CommentsLayerProps) => React.JSX.Element | null>;
35
+ //# sourceMappingURL=CommentsLayer.d.ts.map
@@ -1,4 +1,4 @@
1
- import { IStyle, IConditionalFormat } from '@sheetxl/sdk';
1
+ import { ICellStyle, IConditionalFormat } from '@sheetxl/sdk';
2
2
  /**
3
3
  * One icon of a conditional-format icon set: which shape to draw and what to tint it.
4
4
  */
@@ -47,11 +47,11 @@ export type ConditionalIconTone = keyof typeof Tone;
47
47
  * `set` is asked per cell rather than per rule because a rule may borrow each band's icon from a
48
48
  * different set — see `IConditionalFormat.IconSetDecoration`.
49
49
  */
50
- export declare const getConditionalIcon: (set: IStyle.IconSet, index: number) => ConditionalIconSpec | null;
50
+ export declare const getConditionalIcon: (set: ICellStyle.IconSet, index: number) => ConditionalIconSpec | null;
51
51
  /**
52
52
  * Returns every icon of a built-in set, band 0 first — for a picker previewing the set.
53
53
  */
54
- export declare const getConditionalIconSet: (set: IStyle.IconSet) => readonly ConditionalIconSpec[];
54
+ export declare const getConditionalIconSet: (set: ICellStyle.IconSet) => readonly ConditionalIconSpec[];
55
55
  /**
56
56
  * The icon each band of a rule draws — the set's own, or the band's override — lowest band first.
57
57
  *
@@ -78,7 +78,7 @@ export declare const describeConditionalIcon: (spec: ConditionalIconSpec) => {
78
78
  */
79
79
  export interface ConditionalIconCatalogEntry {
80
80
  /** The set the icon is borrowed from — what `IConditionalFormat.IconSet.icon` holds. */
81
- set: IStyle.IconSet;
81
+ set: ICellStyle.IconSet;
82
82
  /** The icon's index within that set. */
83
83
  id: number;
84
84
  spec: ConditionalIconSpec;
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ export interface FreezeDragLinesProps {
3
+ /**
4
+ * Also draw the line at the grid's start while a grip is active (hovered, pressed or dragged) with
5
+ * nothing frozen on its axis — where the grid has no freeze line of its own to highlight. For the main
6
+ * grid; a header has the grip's bar there instead.
7
+ */
8
+ showStart?: boolean;
9
+ }
10
+ /**
11
+ * The lines of an in-progress freeze drag: solid at the boundary the drop would freeze at, dashed at the
12
+ * pointer while it is over the grid. Reads the drag from `useSurfaceState` (published by
13
+ * {@link useFreezeDrag}) and draws this pane's clipped slice, so it mounts in the headers and the main
14
+ * grid alike.
15
+ */
16
+ export declare const FreezeDragLines: React.MemoExoticComponent<(props: FreezeDragLinesProps) => React.JSX.Element>;
17
+ //# sourceMappingURL=FreezeDragLines.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { ISheet } from '@sheetxl/sdk';
2
+ import { LayerProps } from '@sheetxl/grid-react';
3
+ export interface GridFreezeLayerProps extends Omit<LayerProps, 'children'> {
4
+ sheet: ISheet;
5
+ }
6
+ /**
7
+ * The main grid's freeze grips (one per frozen axis, on its freeze line) and its slice of the drag lines.
8
+ * The mirror of {@link HeaderFreezeLayer}; both share one drag.
9
+ */
10
+ export declare const GridFreezeLayer: import('react').MemoExoticComponent<(props: GridFreezeLayerProps) => import("react").JSX.Element>;
11
+ //# sourceMappingURL=GridFreezeLayer.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { ISheetHeader } from '@sheetxl/sdk';
2
+ import { LayerProps } from '@sheetxl/grid-react';
3
+ export interface HeaderFreezeLayerProps extends Omit<LayerProps, 'children'> {
4
+ sheetHeader: ISheetHeader;
5
+ }
6
+ /**
7
+ * The freeze grip in a header, and the header's slice of the drag lines. Dragging the grip moves the
8
+ * freeze to the nearest header boundary on screen; the main grid draws its slice of the lines from the
9
+ * same shared state.
10
+ */
11
+ export declare const HeaderFreezeLayer: import('react').MemoExoticComponent<(props: HeaderFreezeLayerProps) => import("react").JSX.Element>;
12
+ //# sourceMappingURL=HeaderFreezeLayer.d.ts.map
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { ISheetHeader } from '@sheetxl/sdk';
3
- export interface HeaderResizerLayerProps {
3
+ import { LayerProps } from '@sheetxl/grid-react';
4
+ export interface HeaderResizerLayerProps extends Omit<LayerProps, 'children'> {
4
5
  sheetHeader: ISheetHeader;
5
6
  isColumn: boolean;
6
7
  oppositeSize?: number;
@@ -0,0 +1,109 @@
1
+ import { default as React } from 'react';
2
+ import { CellCoords } from '@sheetxl/utils';
3
+ import { IHyperlink, ISheet } from '@sheetxl/sdk';
4
+ import { StickyState, GridPlacement, HoverTipProps, LayerProps } from '@sheetxl/grid-react';
5
+ /** What a link preview service found for a page. Every field is optional; an empty one shows nothing. */
6
+ export interface LinkPreview {
7
+ /** The page's picture: its social card (`og:image`) or a screenshot. */
8
+ image?: string;
9
+ /**
10
+ * The width the picture was asked for. A screenshot service answers with a placeholder while it
11
+ * renders; a loaded picture of another width IS that placeholder, and the card asks again.
12
+ */
13
+ imageWidth?: number;
14
+ title?: string;
15
+ description?: string;
16
+ }
17
+ /**
18
+ * Finds a {@link LinkPreview} for an address, or `null` for none. Synchronous when the preview is only
19
+ * a URL (a screenshot service), a promise when it has to be looked up (a social card).
20
+ */
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. */
23
+ export interface HyperlinkCardRenderProps {
24
+ sheet: ISheet;
25
+ /** The hovered cell (the card anchors to its range, a merge included). */
26
+ coords: CellCoords;
27
+ hyperlink: IHyperlink;
28
+ /** Follow the link. */
29
+ open: () => Promise<void>;
30
+ /** Copy the address to the clipboard. */
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;
36
+ /**
37
+ * The linked page's preview once the lookup resolved, or `null` — see
38
+ * {@link HyperlinkLayerProps.preview}. Draw its picture with {@link LinkPreviewImage}, which shows it
39
+ * only once it exists.
40
+ */
41
+ preview: LinkPreview | null;
42
+ /** Spread onto the card root (keeps the card open while hovered; registers it with the tooltip group). */
43
+ tipProps: HoverTipProps;
44
+ state: StickyState;
45
+ }
46
+ /**
47
+ * Props for {@link HyperlinkLayer}.
48
+ */
49
+ export interface HyperlinkLayerProps extends Omit<LayerProps, 'children'> {
50
+ sheet: ISheet;
51
+ /** The card. @defaultValue the plain card: address · copy · edit · remove */
52
+ renderCard?: (props: HyperlinkCardRenderProps) => React.ReactNode;
53
+ /**
54
+ * Looks up a preview of the linked page to show under the actions. Off by default: it is a request to
55
+ * a third party per hovered web link. {@link linkPreviewMicrolink} (the page's social card) and
56
+ * {@link linkPreviewMShots} (a screenshot) are two free ones; results are kept per address for the
57
+ * session.
58
+ */
59
+ preview?: LinkPreviewLookup;
60
+ /** Where the card attaches. @defaultValue `{ side: 'b', align: 'start' }` */
61
+ placement?: GridPlacement;
62
+ /** Gap (px) between the cell and the card. @defaultValue 4 */
63
+ offset?: number;
64
+ className?: string;
65
+ }
66
+ /**
67
+ * A page's **social card** through [microlink](https://microlink.io): the `og:image`, title and
68
+ * description the page declares — what a chat app unfurls. Free without a key, rate limited (25 requests
69
+ * a window, so hovering many distinct links in a burst runs dry until it resets); allows browser calls.
70
+ * Web addresses only.
71
+ */
72
+ export declare const linkPreviewMicrolink: (address: string) => Promise<LinkPreview | null>;
73
+ /**
74
+ * A **screenshot** of the page through WordPress's free mShots service. No key, no quota stated. The
75
+ * address goes in the path as is (percent-encoding it is refused). While the shot is being taken the
76
+ * service redirects to a 400×300 placeholder, so `width` must not be 400 — {@link LinkPreviewImage}
77
+ * tells the placeholder from the shot by its width and asks again. Web addresses only.
78
+ */
79
+ export declare const linkPreviewMShots: (address: string, width?: number) => LinkPreview | null;
80
+ /**
81
+ * The **hyperlink card** — hover a cell carrying a link and a card offers its address (click to follow),
82
+ * copy, edit and remove, as Excel Online does. A {@link RangeTooltipLayer} whose probe asks the cell for
83
+ * its hyperlink; the card is the tooltip group's one open tip, interactive, and closes on any press
84
+ * outside it. What the card looks like is the host's (`renderCard`); the plain default draws with the
85
+ * grid's tokens.
86
+ *
87
+ * @remarks
88
+ * Edit goes through the sheet's `updateHyperlink` command, which acts on the selection — so it selects
89
+ * the hovered cell first, as Excel Online does. Remove is the link's own `delete()`.
90
+ */
91
+ export declare const HyperlinkLayer: React.MemoExoticComponent<(props: HyperlinkLayerProps) => React.JSX.Element>;
92
+ /**
93
+ * The preview picture, shown only once it exists and has loaded — a missing card or a failed request
94
+ * draws nothing, so the card never shows a broken image.
95
+ *
96
+ * A screenshot service answers while it is still rendering with a **placeholder picture** (mShots
97
+ * does). The caller says what width it asked for (`expectedWidth`); a loaded picture of another width
98
+ * is the placeholder, so it stays hidden and the request repeats every {@link PREVIEW_POLL_MS} until the
99
+ * shot arrives. The polling stops with the card.
100
+ */
101
+ export declare const LinkPreviewImage: React.FC<{
102
+ src: string;
103
+ /** The width the service was asked for; a loaded picture of another width is its placeholder. */
104
+ expectedWidth?: number;
105
+ /** The width to draw at. @defaultValue the container's */
106
+ width?: number | string;
107
+ style?: React.CSSProperties;
108
+ }>;
109
+ //# sourceMappingURL=HyperlinkLayer.d.ts.map