@sheetxl/react 0.8.0-beta.9 → 1.0.2

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 (398) hide show
  1. package/LICENSE.md +8 -7
  2. package/browser/esm/5B9ljQwRo4GZv5e3.mjs +264 -0
  3. package/browser/esm/B7K16Rzv-QXeNhTf.mjs +197 -0
  4. package/browser/esm/BD3e6d1xxwWiZvhM.mjs +78 -0
  5. package/browser/esm/{Dk6274Lic6AOmEAq.mjs → BIlvSwHzLhtyrkCm.mjs} +84 -2
  6. package/browser/esm/BTkVpKUjjBXs7S4h.mjs +128 -0
  7. package/browser/esm/B_X-eExTurXNj2s6.mjs +134 -0
  8. package/browser/esm/BaXKIZ-EbNXalsn9.mjs +32 -0
  9. package/browser/esm/ByiwVTu3Ax65JzsV.mjs +36 -0
  10. package/browser/esm/CBwGe_8NQ_Zwkd9c.mjs +67 -0
  11. package/browser/esm/CLM5O7S-zDkLuyx4.mjs +323 -0
  12. package/browser/esm/CN3fS0Je4N_gmPLR.mjs +145 -0
  13. package/browser/esm/Cb3fQ74AG3ha3Lbb.mjs +31 -0
  14. package/browser/esm/CyK8M1od0A1rs3IZ.mjs +14092 -0
  15. package/browser/esm/D-wXCKrEuZsj9YPV.mjs +60 -0
  16. package/browser/esm/D3h177x5aS9wsvay.mjs +8 -0
  17. package/browser/esm/DIle1Uzx1TRzW_kQ.mjs +42 -0
  18. package/browser/esm/DLCK6iNnpw8XUOy8.mjs +79 -0
  19. package/browser/esm/DS_YUf92NUAjr5M9.mjs +9560 -0
  20. package/browser/esm/DYLAfjgirgwGJkJo.mjs +20 -0
  21. package/browser/esm/D_KHWbW4C9PQ7G8l.mjs +401 -0
  22. package/browser/esm/DclFKNTfrIjTUqZW.mjs +341 -0
  23. package/browser/esm/DeZNNHG8-BP0qop0.mjs +323 -0
  24. package/browser/esm/WUqAXqTxytEPWXNZ.mjs +63 -0
  25. package/browser/esm/Xab6qjmPHkjnBlcs.mjs +45 -0
  26. package/browser/esm/chart.mjs +41 -0
  27. package/browser/esm/control.mjs +217 -0
  28. package/browser/esm/group.mjs +123 -0
  29. package/browser/esm/index.mjs +21677 -15289
  30. package/browser/esm/note.mjs +112 -0
  31. package/browser/esm/picture.mjs +7 -0
  32. package/browser/esm/shape.mjs +7 -0
  33. package/browser/esm/slicer.mjs +282 -0
  34. package/browser/esm/xismu7oIPMRpfRZN.mjs +19 -0
  35. package/licenses/dependencies.txt +327 -53
  36. package/node/esm/3O4W5uO7Ei1RSamd.mjs +328 -0
  37. package/node/esm/BEmcxv9Cg5uinTCr.mjs +80 -0
  38. package/node/esm/BWuHuJ2nm8MKaUpL.mjs +1697 -0
  39. package/node/esm/Bb39ZMFsvPRb6_sU.mjs +20 -0
  40. package/node/esm/Btwf2pH6R5DrzLlO.mjs +32 -0
  41. package/node/esm/C3_B2QUtmUAAoAbQ.mjs +37 -0
  42. package/node/esm/CIHXrDGerZpH_kWI.mjs +19 -0
  43. package/node/esm/CbEtd-l94dqcicGz.mjs +66 -0
  44. package/node/esm/D06Yw2XsMkKhhpbZ.mjs +406 -0
  45. package/node/esm/D6pwBrfHwDwzCkt6.mjs +128 -0
  46. package/node/esm/DKBxWraRN4fQGsFy.mjs +63 -0
  47. package/node/esm/DPp00qgyktTqWeEp.mjs +68 -0
  48. package/node/esm/Ddz6TmyZPfCk-PXM.mjs +134 -0
  49. package/node/esm/Djwke9rsxOR1tTNb.mjs +8 -0
  50. package/node/esm/DmdPWNpf3d05AFgU.mjs +80 -0
  51. package/node/esm/DsUEK1CBM3dZfY2X.mjs +198 -0
  52. package/node/esm/{B-5p0wwNM6Y5jlI2.mjs → DsgT7qY3nHxDGSws.mjs} +84 -2
  53. package/node/esm/L7XZPzd6aXI7OzdI.mjs +146 -0
  54. package/node/esm/X9lgoicxH_z9hlaw.mjs +45 -0
  55. package/node/esm/chart.mjs +41 -0
  56. package/node/esm/control.mjs +217 -0
  57. package/node/esm/group.mjs +123 -0
  58. package/node/esm/index.mjs +16970 -10477
  59. package/node/esm/note.mjs +113 -0
  60. package/node/esm/oliuGGZGkPQdm6vE.mjs +35 -0
  61. package/node/esm/picture.mjs +326 -0
  62. package/node/esm/s7q4H_VlspTpP2kg.mjs +265 -0
  63. package/node/esm/shape.mjs +342 -0
  64. package/node/esm/slicer.mjs +284 -0
  65. package/package.json +56 -14
  66. package/resources/contents.json +36 -0
  67. package/resources/locales/contents.json +84 -0
  68. package/resources/locales/de/chart.cmd.json +82 -0
  69. package/resources/locales/de/movable.cmd.json +68 -0
  70. package/resources/locales/de/picture.cmd.json +188 -0
  71. package/resources/locales/de/pivot.cmd.json +79 -0
  72. package/resources/locales/de/shape.cmd.json +17 -0
  73. package/resources/locales/de/sheet.cmd.json +169 -16
  74. package/resources/locales/de/slicer.cmd.json +17 -0
  75. package/resources/locales/de/sparkline.cmd.json +301 -0
  76. package/resources/locales/de/table.cmd.json +13 -2
  77. package/resources/locales/de/ui.msg.json +353 -2
  78. package/resources/locales/de/workbook.cmd.json +8 -1
  79. package/resources/locales/en/chart.cmd.json +82 -0
  80. package/resources/locales/en/movable.cmd.json +68 -0
  81. package/resources/locales/en/picture.cmd.json +188 -0
  82. package/resources/locales/en/pivot.cmd.json +79 -0
  83. package/resources/locales/en/shape.cmd.json +17 -0
  84. package/resources/locales/en/sheet.cmd.json +170 -17
  85. package/resources/locales/en/slicer.cmd.json +17 -0
  86. package/resources/locales/en/sparkline.cmd.json +301 -0
  87. package/resources/locales/en/table.cmd.json +13 -2
  88. package/resources/locales/en/ui.msg.json +195 -3
  89. package/resources/locales/en/workbook.cmd.json +8 -1
  90. package/types/chart.d.ts +2 -0
  91. package/types/control.d.ts +2 -0
  92. package/types/group.d.ts +2 -0
  93. package/types/note.d.ts +2 -0
  94. package/types/picture.d.ts +2 -0
  95. package/types/shape.d.ts +2 -0
  96. package/types/slicer.d.ts +2 -0
  97. package/types/src/annotation/RangeAnnotationLayer.d.ts +110 -0
  98. package/types/src/annotation/RangeAnnotationTag.d.ts +23 -0
  99. package/types/src/annotation/RangeAnnotations.d.ts +180 -0
  100. package/types/src/annotation/index.d.ts +4 -0
  101. package/types/src/autoFill/FillMenu.d.ts +2 -2
  102. package/types/src/autoFill/FillSeries.d.ts +2 -2
  103. package/types/src/border/StaticBorderRenderer.d.ts +18 -1
  104. package/types/src/border/useBorders.d.ts +95 -3
  105. package/types/src/cell/CellCheckboxRenderer.d.ts +20 -0
  106. package/types/src/cell/CellContent.d.ts +68 -0
  107. package/types/src/cell/CellControlContext.d.ts +37 -0
  108. package/types/src/cell/{FormulaCellRenderer.d.ts → CellFormulaRenderer.d.ts} +10 -7
  109. package/types/src/cell/CellImageRenderer.d.ts +11 -0
  110. package/types/src/cell/CellRenderers.d.ts +190 -0
  111. package/types/src/cell/{SheetCellRenderer.d.ts → CellTextRenderer.d.ts} +11 -8
  112. package/types/src/cell/ColumnButton.d.ts +3 -3
  113. package/types/src/cell/CornerTriangle.d.ts +2 -1
  114. package/types/src/cell/OutlineButton.d.ts +4 -4
  115. package/types/src/cell/PivotButton.d.ts +55 -0
  116. package/types/src/cell/SheetHeaderRenderer.d.ts +1 -1
  117. package/types/src/cell/StaticCellRenderer.d.ts +3 -3
  118. package/types/src/cell/_DropdownFace.d.ts +29 -0
  119. package/types/src/cell/index.d.ts +9 -2
  120. package/types/src/cell/useFormulaViewAnchor.d.ts +3 -3
  121. package/types/src/cell/useInsertableCellControls.d.ts +25 -0
  122. package/types/src/chart/ChartCommands.d.ts +15 -0
  123. package/types/src/chart/ChartEditor.d.ts +12 -2
  124. package/types/src/chart/ChartElement.d.ts +122 -0
  125. package/types/src/chart/ChartKind.d.ts +7 -0
  126. package/types/src/chart/PresetChartTypeDescriptors.d.ts +3 -1
  127. package/types/src/chart/index.d.ts +2 -1
  128. package/types/src/chart/paint/_fills.d.ts +24 -0
  129. package/types/src/chart/paint/_graphics.d.ts +38 -0
  130. package/types/src/chart/paint/_mode.d.ts +6 -0
  131. package/types/src/chart/paint/echarts.d.ts +33 -0
  132. package/types/src/chart/paint/index.d.ts +12 -0
  133. package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +140 -0
  134. package/types/src/chart/paint/kinds/_Area.d.ts +3 -0
  135. package/types/src/chart/paint/kinds/_Bar.d.ts +3 -0
  136. package/types/src/chart/paint/kinds/_BoxWhisker.d.ts +3 -0
  137. package/types/src/chart/paint/kinds/_Bubble.d.ts +3 -0
  138. package/types/src/chart/paint/kinds/_Funnel.d.ts +3 -0
  139. package/types/src/chart/paint/kinds/_Histogram.d.ts +3 -0
  140. package/types/src/chart/paint/kinds/_Line.d.ts +10 -0
  141. package/types/src/chart/paint/kinds/_OfPie.d.ts +3 -0
  142. package/types/src/chart/paint/kinds/_Pie.d.ts +21 -0
  143. package/types/src/chart/paint/kinds/_Placeholder.d.ts +7 -0
  144. package/types/src/chart/paint/kinds/_Radar.d.ts +3 -0
  145. package/types/src/chart/paint/kinds/_Scatter.d.ts +3 -0
  146. package/types/src/chart/paint/kinds/_Sunburst.d.ts +3 -0
  147. package/types/src/chart/paint/kinds/_Surface.d.ts +3 -0
  148. package/types/src/chart/paint/kinds/_Treemap.d.ts +3 -0
  149. package/types/src/chart/paint/kinds/_Waterfall.d.ts +3 -0
  150. package/types/src/chart/paint/kinds/_builtIns.d.ts +3 -0
  151. package/types/src/chart/paint/toEChartsOption.d.ts +42 -0
  152. package/types/src/checklist/ValueChecklist.d.ts +44 -15
  153. package/types/src/clipboard/ClipboardCommands.d.ts +3 -3
  154. package/types/src/clipboard/SheetClipboardLayer.d.ts +2 -2
  155. package/types/src/commands/ContextualToolbar.d.ts +19 -0
  156. package/types/src/commands/createTransactionalMiddleware.d.ts +4 -1
  157. package/types/src/commands/index.d.ts +1 -0
  158. package/types/src/comment/CommentCardRequest.d.ts +9 -9
  159. package/types/src/comment/index.d.ts +0 -1
  160. package/types/src/comment/useSheetComments.d.ts +2 -2
  161. package/types/src/conditionalFormat/ConditionalFormatPresets.d.ts +6 -6
  162. package/types/src/context/WorksheetContext.d.ts +18 -0
  163. package/types/src/context/index.d.ts +1 -1
  164. package/types/src/control/FormControlRenderers.d.ts +8 -0
  165. package/types/src/editableLabel/EditableLabel.d.ts +3 -1
  166. package/types/src/editor/EditorCommands.d.ts +3 -3
  167. package/types/src/editor/SheetCellEditorLayer.d.ts +2 -7
  168. package/types/src/editor/SheetCellEditorStartLayer.d.ts +22 -5
  169. package/types/src/editor/SheetCellInput.d.ts +14 -0
  170. package/types/src/editor/SheetEditable.d.ts +6 -6
  171. package/types/src/editor/SheetReferenceHeaderLayer.d.ts +1 -1
  172. package/types/src/editor/SheetReferenceLayer.d.ts +4 -4
  173. package/types/src/editor/VirtualKeyboardLayer.d.ts +50 -0
  174. package/types/src/editor/formulaAnchor.d.ts +12 -0
  175. package/types/src/editor/formulaPresentation.d.ts +4 -3
  176. package/types/src/editor/index.d.ts +2 -0
  177. package/types/src/editor/pickedReference.d.ts +3 -3
  178. package/types/src/editor/useEditRejectedNotice.d.ts +3 -3
  179. package/types/src/editor/useFormulaHints.d.ts +3 -3
  180. package/types/src/editor/useFormulaInput.d.ts +6 -3
  181. package/types/src/editor/validationAlert.d.ts +24 -0
  182. package/types/src/form/FormulaInput.d.ts +5 -2
  183. package/types/src/form/useEditCommit.d.ts +23 -3
  184. package/types/src/form/useInputField.d.ts +2 -3
  185. package/types/src/frame/CommandContext.d.ts +74 -3
  186. package/types/src/group/GroupEditor.d.ts +25 -0
  187. package/types/src/index.d.ts +10 -2
  188. package/types/src/layer/BorderLayer.d.ts +5 -2
  189. package/types/src/layer/CellErrorLayer.d.ts +18 -7
  190. package/types/src/layer/CellFillLayer.d.ts +2 -2
  191. package/types/src/layer/CellIndicatorLayer.d.ts +31 -0
  192. package/types/src/layer/CellInsertLayer.d.ts +71 -0
  193. package/types/src/layer/CircularIndicatorLayer.d.ts +3 -3
  194. package/types/src/layer/CommentCardLayer.d.ts +7 -9
  195. package/types/src/layer/CommentsLayer.d.ts +2 -2
  196. package/types/src/layer/ConditionalBarLayer.d.ts +2 -2
  197. package/types/src/layer/ConditionalIcons.d.ts +4 -4
  198. package/types/src/layer/ConditionalIconsLayer.d.ts +2 -2
  199. package/types/src/layer/ContextMenuLayer.d.ts +2 -2
  200. package/types/src/layer/FreezeDragLines.d.ts +17 -0
  201. package/types/src/layer/GridFreezeLayer.d.ts +11 -0
  202. package/types/src/layer/HeaderFreezeLayer.d.ts +12 -0
  203. package/types/src/layer/HeaderResizerLayer.d.ts +2 -1
  204. package/types/src/layer/HeaderSelectionLayer.d.ts +4 -4
  205. package/types/src/layer/HyperlinkLayer.d.ts +116 -0
  206. package/types/src/layer/MovableKindScope.d.ts +17 -0
  207. package/types/src/layer/PivotLayer.d.ts +47 -0
  208. package/types/src/layer/PivotToolbar.d.ts +29 -0
  209. package/types/src/layer/ProtectionLayer.d.ts +4 -5
  210. package/types/src/layer/RangeToolbar.d.ts +75 -0
  211. package/types/src/layer/ResizeIndicator.d.ts +11 -10
  212. package/types/src/layer/ResizeTooltip.d.ts +13 -0
  213. package/types/src/layer/SheetBackgroundLayer.d.ts +3 -3
  214. package/types/src/layer/SheetCellLayer.d.ts +15 -8
  215. package/types/src/layer/SheetColumnButtonLayer.d.ts +2 -2
  216. package/types/src/layer/SheetGridLineLayer.d.ts +25 -15
  217. package/types/src/layer/SheetHeaderCellLayer.d.ts +1 -1
  218. package/types/src/layer/SheetLayers.d.ts +171 -0
  219. package/types/src/layer/SheetMovableLayer.d.ts +4 -3
  220. package/types/src/layer/SheetOutlineLayer.d.ts +3 -3
  221. package/types/src/layer/SheetPivotCommandLayer.d.ts +13 -0
  222. package/types/src/layer/SheetSparklineCommandLayer.d.ts +14 -0
  223. package/types/src/layer/SheetTableCommandLayer.d.ts +2 -2
  224. package/types/src/layer/SparklineLayer.d.ts +32 -0
  225. package/types/src/layer/SpillLayer.d.ts +2 -2
  226. package/types/src/layer/TableLayer.d.ts +6 -5
  227. package/types/src/layer/TableToolbar.d.ts +23 -0
  228. package/types/src/layer/ValidationDropdownLayer.d.ts +2 -2
  229. package/types/src/layer/ValidationIndicatorLayer.d.ts +2 -2
  230. package/types/src/layer/ValidationPromptLayer.d.ts +47 -16
  231. package/types/src/layer/_sheetBorders.d.ts +6 -0
  232. package/types/src/layer/_tableColor.d.ts +6 -0
  233. package/types/src/layer/_visibleCellFeatures.d.ts +11 -0
  234. package/types/src/layer/cellTip.d.ts +13 -0
  235. package/types/src/layer/freezeDragState.d.ts +21 -0
  236. package/types/src/layer/index.d.ts +14 -0
  237. package/types/src/layer/resizeIndicatorState.d.ts +3 -1
  238. package/types/src/layer/useFreezeDrag.d.ts +22 -0
  239. package/types/src/layer/useNormalBorderLines.d.ts +15 -0
  240. package/types/src/layer/useSheetFeatureRegions.d.ts +2 -2
  241. package/types/src/layer/useSheetVisibleCells.d.ts +5 -6
  242. package/types/src/layer/useSheetVisibleDecorations.d.ts +2 -2
  243. package/types/src/layer/useTableHeaderCells.d.ts +2 -2
  244. package/types/src/layer/useValidationPicker.d.ts +3 -3
  245. package/types/src/layer/useVisibleTables.d.ts +2 -2
  246. package/types/src/layer/validationMark.d.ts +3 -3
  247. package/types/src/listener/index.d.ts +5 -0
  248. package/types/src/listener/useCell.d.ts +29 -0
  249. package/types/src/listener/useCellRange.d.ts +23 -0
  250. package/types/src/listener/useCellValue.d.ts +26 -0
  251. package/types/src/listener/useModelListener.d.ts +4 -4
  252. package/types/src/listener/useRangeListener.d.ts +13 -7
  253. package/types/src/listener/useRangeSnapshot.d.ts +35 -0
  254. package/types/src/listener/useTable.d.ts +26 -0
  255. package/types/src/movable/ConnectionSites.d.ts +18 -0
  256. package/types/src/movable/DefaultMovable.d.ts +8 -0
  257. package/types/src/movable/IMovableArea.d.ts +28 -0
  258. package/types/src/movable/MovableAdornment.d.ts +9 -3
  259. package/types/src/movable/MovableCommandGroups.d.ts +22 -0
  260. package/types/src/movable/MovableCommands.d.ts +8 -3
  261. package/types/src/movable/MovableControl.d.ts +49 -1
  262. package/types/src/movable/MovableFrame.d.ts +5 -1
  263. package/types/src/movable/MovableLayer.d.ts +30 -5
  264. package/types/src/movable/MovableRenderers.d.ts +166 -11
  265. package/types/src/movable/PlaceholderFrames.d.ts +11 -0
  266. package/types/src/movable/RotateHandle.d.ts +12 -4
  267. package/types/src/movable/connect.d.ts +16 -0
  268. package/types/src/movable/framePlacement.d.ts +44 -1
  269. package/types/src/movable/geometry.d.ts +13 -3
  270. package/types/src/movable/index.d.ts +8 -0
  271. package/types/src/movable/pressTarget.d.ts +20 -0
  272. package/types/src/movable/useFramePreview.d.ts +17 -0
  273. package/types/src/picker/cellPickerOpen.d.ts +3 -3
  274. package/types/src/picker/useCellPicker.d.ts +7 -5
  275. package/types/src/picture/PictureCommands.d.ts +20 -0
  276. package/types/src/picture/PictureKind.d.ts +7 -0
  277. package/types/src/picture/_pictureHyperlink.d.ts +13 -0
  278. package/types/src/picture/index.d.ts +0 -1
  279. package/types/src/picture/pictureCrop.d.ts +32 -0
  280. package/types/src/pivot/PivotAreas.d.ts +16 -0
  281. package/types/src/pivot/PivotChip.d.ts +33 -0
  282. package/types/src/pivot/PivotChipMenu.d.ts +74 -0
  283. package/types/src/pivot/PivotCommands.d.ts +24 -0
  284. package/types/src/pivot/PivotFieldList.d.ts +14 -0
  285. package/types/src/pivot/PivotFields.d.ts +47 -0
  286. package/types/src/pivot/PivotFieldsModel.d.ts +143 -0
  287. package/types/src/pivot/PivotTablePane.d.ts +47 -0
  288. package/types/src/pivot/_PivotFieldsContext.d.ts +41 -0
  289. package/types/src/pivot/_pivotNew.d.ts +12 -0
  290. package/types/src/pivot/_pivotRegion.d.ts +14 -0
  291. package/types/src/pivot/index.d.ts +9 -0
  292. package/types/src/pivot/usePivotFields.d.ts +17 -0
  293. package/types/src/presence/PresenceCommands.d.ts +35 -0
  294. package/types/src/presence/PresenceHost.d.ts +58 -0
  295. package/types/src/presence/PresenceMessages.d.ts +42 -0
  296. package/types/src/presence/PresenceStore.d.ts +165 -0
  297. package/types/src/presence/PresenceTypes.d.ts +78 -0
  298. package/types/src/presence/index.d.ts +7 -0
  299. package/types/src/presence/usePresence.d.ts +20 -0
  300. package/types/src/richText/RichTextEditor.d.ts +2 -2
  301. package/types/src/selection/SelectionCommands.d.ts +2 -2
  302. package/types/src/selection/SheetSelectionLayer.d.ts +6 -12
  303. package/types/src/shape/ConnectorControl.d.ts +46 -0
  304. package/types/src/shape/ShapeCommands.d.ts +11 -0
  305. package/types/src/shape/ShapeControl.d.ts +8 -0
  306. package/types/src/shape/ShapeEditor.d.ts +2 -3
  307. package/types/src/shape/ShapeGallery.d.ts +21 -6
  308. package/types/src/shape/ShapeKind.d.ts +7 -0
  309. package/types/src/shape/ShapeSVG.d.ts +6 -8
  310. package/types/src/shape/index.d.ts +0 -1
  311. package/types/src/shape/shapeFrame.d.ts +46 -2
  312. package/types/src/shape/shapeStyle.d.ts +59 -8
  313. package/types/src/sheet/ISheetHeaderElement.d.ts +3 -3
  314. package/types/src/sheet/{ISheetElement.d.ts → IWorksheetElement.d.ts} +110 -86
  315. package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
  316. package/types/src/sheet/SheetCommandProvider.d.ts +14 -6
  317. package/types/src/sheet/SheetCommands.d.ts +18 -3
  318. package/types/src/sheet/SheetKindIcon.d.ts +14 -0
  319. package/types/src/sheet/SheetOutlineElement.d.ts +6 -6
  320. package/types/src/sheet/SheetPanels.d.ts +11 -0
  321. package/types/src/sheet/SheetScrollbar.d.ts +4 -13
  322. package/types/src/sheet/TopLeftCorner.d.ts +2 -2
  323. package/types/src/sheet/WorksheetElement.d.ts +12 -0
  324. package/types/src/sheet/_freezeAt.d.ts +10 -0
  325. package/types/src/sheet/_hyperlinkEdit.d.ts +7 -0
  326. package/types/src/sheet/_useHeaderMetrics.d.ts +11 -0
  327. package/types/src/sheet/circularReferences.d.ts +4 -4
  328. package/types/src/sheet/index.d.ts +5 -2
  329. package/types/src/sheet/useCycleHighlight.d.ts +2 -2
  330. package/types/src/slicer/SlicerCommands.d.ts +10 -0
  331. package/types/src/slicer/SlicerEditor.d.ts +8 -2
  332. package/types/src/slicer/SlicerKind.d.ts +7 -0
  333. package/types/src/slicer/SlicerStylePreview.d.ts +18 -0
  334. package/types/src/slicer/index.d.ts +2 -1
  335. package/types/src/slicer/slicerStyles.d.ts +32 -0
  336. package/types/src/sparkline/PictureCache.d.ts +37 -0
  337. package/types/src/sparkline/SparklineCommands.d.ts +23 -0
  338. package/types/src/sparkline/SparklinePictures.d.ts +7 -0
  339. package/types/src/sparkline/paint/_drawing.d.ts +24 -0
  340. package/types/src/sparkline/paint/echarts.d.ts +8 -0
  341. package/types/src/sparkline/paint/index.d.ts +8 -0
  342. package/types/src/tabStrip/SheetTab.d.ts +1 -1
  343. package/types/src/tabStrip/Sortable.d.ts +5 -5
  344. package/types/src/tabStrip/TabStrip.d.ts +13 -6
  345. package/types/src/tabStrip/TabStripItem.d.ts +15 -13
  346. package/types/src/table/TableCommands.d.ts +2 -2
  347. package/types/src/taskPane/CellControlPane.d.ts +15 -0
  348. package/types/src/taskPane/MovablePane.d.ts +15 -0
  349. package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
  350. package/types/src/taskPane/TaskPaneFrame.d.ts +4 -4
  351. package/types/src/taskPane/TaskPaneKeys.d.ts +38 -0
  352. package/types/src/taskPane/TaskPaneRegistry.d.ts +32 -12
  353. package/types/src/taskPane/_paneReasons.d.ts +7 -0
  354. package/types/src/taskPane/index.d.ts +3 -0
  355. package/types/src/taskPane/useTaskPane.d.ts +6 -3
  356. package/types/src/theme/ExplicitTokens.d.ts +18 -0
  357. package/types/src/theme/GridColorSchemeContext.d.ts +8 -0
  358. package/types/src/theme/ThemeRootStyles.d.ts +31 -0
  359. package/types/src/theme/ThemeState.d.ts +2 -2
  360. package/types/src/theme/buildDocThemeCSS.d.ts +4 -1
  361. package/types/src/theme/buildOOXMLThemeCSS.d.ts +2 -2
  362. package/types/src/theme/buildTokensCSS.d.ts +15 -0
  363. package/types/src/theme/index.d.ts +2 -4
  364. package/types/src/theme/useAppColorScheme.d.ts +4 -1
  365. package/types/src/theme/useGridColorScheme.d.ts +9 -4
  366. package/types/src/theme/useSystemColors.d.ts +1 -15
  367. package/types/src/workbook/DefaultMovableRenderers.d.ts +19 -1
  368. package/types/src/workbook/DefaultRenderers.d.ts +5 -4
  369. package/types/src/workbook/IWorkbookElement.d.ts +176 -30
  370. package/types/src/workbook/WorkbookCommands.d.ts +6 -1
  371. package/types/src/workbook/WorkbookStrip.d.ts +14 -5
  372. package/browser/cjs/index.cjs +0 -43
  373. package/browser/cjs/xuAfpHmA2W4MFa_0.cjs +0 -1
  374. package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +0 -10
  375. package/types/src/chart/templates/area-stacked-template.json.d.ts +0 -10
  376. package/types/src/chart/templates/area-template.json.d.ts +0 -9
  377. package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +0 -10
  378. package/types/src/chart/templates/bar-stacked-template.json.d.ts +0 -10
  379. package/types/src/chart/templates/bar-template.json.d.ts +0 -9
  380. package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +0 -10
  381. package/types/src/chart/templates/column-stacked-template.json.d.ts +0 -10
  382. package/types/src/chart/templates/column-template.json.d.ts +0 -9
  383. package/types/src/chart/templates/line-markers-template.json.d.ts +0 -10
  384. package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +0 -11
  385. package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +0 -11
  386. package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +0 -10
  387. package/types/src/chart/templates/line-stacked-template.json.d.ts +0 -10
  388. package/types/src/chart/templates/line-template.json.d.ts +0 -9
  389. package/types/src/chart/templates/pie-doughnut-template.json.d.ts +0 -10
  390. package/types/src/chart/templates/pie-template.json.d.ts +0 -9
  391. package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +0 -10
  392. package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +0 -10
  393. package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +0 -10
  394. package/types/src/chart/templates/scatter-lines-template.json.d.ts +0 -10
  395. package/types/src/chart/templates/scatter-markers-template.json.d.ts +0 -10
  396. package/types/src/context/SheetContext.d.ts +0 -18
  397. package/types/src/control/index.d.ts +0 -2
  398. package/types/src/sheet/SheetElement.d.ts +0 -15
@@ -1,6 +1,9 @@
1
1
  import { default as React } from 'react';
2
+ import { Bounds } from '@sheetxl/utils';
2
3
  import { IMovableCollection, IMovableSelection, IMovable } from '@sheetxl/sdk';
4
+ import { RenderSlotFn } from '@sheetxl/utils-react';
3
5
  import { MovableElementProps } from './IMovableArea';
6
+ import { ResizeDirectionName } from './MovableControl';
4
7
  export interface MovableLayerAttributes {
5
8
  /**
6
9
  * Will put focus on the the movable object.
@@ -15,22 +18,36 @@ export interface MovableLayerAttributes {
15
18
  }
16
19
  export interface IMovableLayerElement extends HTMLDivElement, MovableLayerAttributes {
17
20
  }
21
+ /**
22
+ * The in-flight frame gesture passed to {@link MovableLayerProps.renderTip}: what the frame would be
23
+ * if released now.
24
+ */
25
+ export interface MovableGesture {
26
+ /** `move` keeps the size, `resize` changes it, `rotate` turns the frame. */
27
+ kind: 'move' | 'resize' | 'rotate';
28
+ /** The grabbed movable (the first selected one when several move together). */
29
+ movable: IMovable;
30
+ /** The unrotated frame, absolute. */
31
+ bounds: Bounds;
32
+ /** Degrees, clockwise. */
33
+ rotation: number;
34
+ }
18
35
  export interface MovableLayerProps extends React.HTMLAttributes<HTMLDivElement> {
19
36
  /**
20
37
  * The container to retrieve movable objects
21
38
  */
22
39
  movables: IMovableCollection;
23
40
  /**
24
- * The container view to retrieve selection information about the movables.
41
+ * The selection of the movables.
25
42
  */
26
- movablesView: IMovableSelection;
43
+ movableSelection: IMovableSelection;
27
44
  /**
28
45
  * Callback to render the movable.
29
46
  *
30
47
  * @param props MovableElementProps
31
48
  * @returns A React Element representing the IMovable.
32
49
  */
33
- renderMovable: (props: MovableElementProps) => React.ReactElement;
50
+ renderMovable: RenderSlotFn<MovableElementProps>;
34
51
  /**
35
52
  * Called when the final movable is unselected.
36
53
  */
@@ -57,17 +74,25 @@ export interface MovableLayerProps extends React.HTMLAttributes<HTMLDivElement>
57
74
  */
58
75
  disableResize?: boolean;
59
76
  /**
60
- * Provider the anchor element to render.
77
+ * The resize handles to show, by compass name.
78
+ * @defaultValue all eight
61
79
  */
62
- renderDirections?: string[];
80
+ resizeDirections?: ResizeDirectionName[];
63
81
  /**
64
82
  * Called after the first render of a movable.
65
83
  */
66
84
  onFirstRender?: () => void;
85
+ /**
86
+ * Render a readout while a frame is moved, resized or rotated — a {@link GestureTip} under the frame.
87
+ * Return an empty node for none.
88
+ */
89
+ renderTip?: (gesture: MovableGesture) => React.ReactNode;
67
90
  /**
68
91
  * Forwards the ref to the underlying element.
69
92
  */
70
93
  ref?: React.Ref<IMovableLayerElement>;
71
94
  }
95
+ /** The shadow under a selected movable's frame; content that shades itself draws the same along its outline. */
96
+ export declare const SELECTION_SHADOW = "1px 1px 2px 2px var(--sxl-color-shadow, rgba(0, 0, 0, 0.15))";
72
97
  export declare const MovableLayer: React.NamedExoticComponent<Omit<MovableLayerProps, "ref"> & React.RefAttributes<IMovableLayerElement>>;
73
98
  //# sourceMappingURL=MovableLayer.d.ts.map
@@ -1,6 +1,9 @@
1
1
  import { default as React } from 'react';
2
- import { IMovable } from '@sheetxl/sdk';
2
+ import { IMovable, IWorksheet } from '@sheetxl/sdk';
3
+ import { Command, IReactNotifier } from '@sheetxl/utils-react';
4
+ import { ActivateFrameOptions, ITaskPaneArea } from '../taskPane';
3
5
  import { MovableElementProps } from './IMovableArea';
6
+ import { ContentControlProps } from './MovableControl';
4
7
  /**
5
8
  * What a movable's renderer is given: the element props the movable layer hands every movable,
6
9
  * with the movable itself always present.
@@ -14,42 +17,194 @@ export interface MovableRendererProps extends MovableElementProps {
14
17
  */
15
18
  export type MovableRenderer = React.ComponentType<MovableRendererProps>;
16
19
  /**
17
- * Resolves a renderer, as a dynamic `import()` does. Called the first time a movable of the kind
18
- * is drawn, never before, so a kind that never appears costs nothing.
20
+ * What a kind's {@link MovableRendererModule.pane} is given: the selected movable it formats and
21
+ * the sheet that holds it.
19
22
  */
20
- export type MovableRendererLoader = () => Promise<MovableRenderer>;
23
+ export interface MovablePaneProps {
24
+ movable: IMovable;
25
+ sheet: IWorksheet;
26
+ }
27
+ /**
28
+ * The `data` a kind's {@link MovableRendererModule.commands} contributor is handed while a movable of
29
+ * the kind is the active selection. The contributor runs again, with fresh data, whenever another
30
+ * movable of the kind becomes the active one, so it never tracks the selection itself.
31
+ */
32
+ export interface MovableKindCommandData {
33
+ sheet: IWorksheet;
34
+ /** The active selected movable, always of this kind. */
35
+ movable: IMovable;
36
+ notifier?: IReactNotifier;
37
+ activateTaskPane?: (key: string, options?: ActivateFrameOptions) => void;
38
+ taskPaneArea?: ITaskPaneArea;
39
+ }
21
40
  /**
22
- * How a renderer is registered.
41
+ * What a kind's loader resolves to when the kind brings more than a renderer: the renderer and
42
+ * whichever of its selection control, commands, ribbon tab and format pane it has.
23
43
  */
24
- export interface MovableRendererOptions {
44
+ export interface MovableRendererModule {
45
+ /** Draws a movable of the kind. */
46
+ renderer: MovableRenderer;
47
+ /**
48
+ * The kind's own selection control: what replaces the outline, resize and rotate handles when a
49
+ * movable of the kind is selected (a connector's two endpoint handles). It is handed the generic
50
+ * control's props and may render the generic control itself for the movables it has nothing
51
+ * special for. Omit it for a kind the generic control serves.
52
+ */
53
+ control?: React.ComponentType<ContentControlProps>;
54
+ /**
55
+ * The kind's command behavior, contributed into a scope named for the content type while a
56
+ * movable of the kind is the active selection. The scope's chrome comes from the catalog
57
+ * registered under the content type.
58
+ */
59
+ commands?: Command.DynamicCommandContributor<MovableKindCommandData>;
60
+ /**
61
+ * The kind's contextual ribbon tab, shown while a movable of the kind is the active selection.
62
+ * By convention keyed `${type}Toolbar` and contributing into the main toolbar strip.
63
+ */
64
+ toolbar?: Command.CommandButtonEntry & {
65
+ key: string;
66
+ };
67
+ /**
68
+ * The body the format pane shows while a movable of the kind is the active selection. A host can
69
+ * supply it without re-registering the renderer, with {@link registerMovablePane}.
70
+ */
71
+ pane?: React.ComponentType<MovablePaneProps>;
72
+ }
73
+ /**
74
+ * A kind's slots once its module has loaded: everything {@link MovableRendererModule} carries but
75
+ * the renderer, with the pane taken from {@link registerMovablePane} when a host supplied one.
76
+ */
77
+ export interface MovableKind {
78
+ /** The content type. */
79
+ type: string;
80
+ control?: React.ComponentType<ContentControlProps>;
81
+ commands?: Command.DynamicCommandContributor<MovableKindCommandData>;
82
+ toolbar?: Command.CommandButtonEntry & {
83
+ key: string;
84
+ };
85
+ pane?: React.ComponentType<MovablePaneProps>;
86
+ }
87
+ /** Resolves a kind's format pane body, as a dynamic `import()` does. */
88
+ export type MovablePaneLoader = () => Promise<React.ComponentType<MovablePaneProps>>;
89
+ /**
90
+ * Imports a kind's module: one dynamic `import()`, resolving to the module itself, with what the
91
+ * kind needs picked by {@link MovableRendererOptions.select}. After a failed fetch the module is
92
+ * imported again without the loader, so the loader must not pick an export itself. Called the first
93
+ * time a movable of the kind is drawn, or ahead of use by `LazyModules.prefetch`
94
+ * (`@sheetxl/utils`); a movable is drawn before it can be selected, so the control arrives with the
95
+ * renderer and is in hand by the first selection.
96
+ */
97
+ export type MovableRendererLoader<M = MovableRenderer | MovableRendererModule> = () => Promise<M>;
98
+ /**
99
+ * How a renderer is registered: what the layer needs to know before the kind's module has loaded.
100
+ */
101
+ export interface MovableRendererOptions<M = MovableRenderer | MovableRendererModule> {
102
+ /**
103
+ * Picks the kind's renderer, or its renderer and control together ({@link MovableRendererModule}),
104
+ * from the imported module.
105
+ * @defaultValue the module itself, for a loader that resolves to the renderer or the record
106
+ */
107
+ select?: (module: M) => MovableRenderer | MovableRendererModule;
108
+ /**
109
+ * Whether the kind may be loaded ahead of use (`LazyModules.prefetch` in `@sheetxl/utils`).
110
+ * @defaultValue true
111
+ */
112
+ prefetch?: boolean;
25
113
  /**
26
114
  * What is drawn while the renderer loads.
27
115
  * @defaultValue nothing — the movable's frame is there already.
28
116
  */
29
117
  fallback?: React.ReactNode;
118
+ /**
119
+ * Whether the layer shades a selected movable of the kind with a shadow on its frame. A kind
120
+ * that shades what it paints itself, as a shape does along its outline, says `false`.
121
+ * @defaultValue true
122
+ */
123
+ selectionShadow?: boolean;
124
+ /**
125
+ * What a press on the movable hits.
126
+ *
127
+ * - `'frame'`: the whole frame, as a plain `div` is. The renderer draws whatever it likes inside a
128
+ * box that fills the frame and takes the presses.
129
+ * - `'content'`: only what the renderer marks. It applies `props.style` to its root, which carries
130
+ * the layer's `pointerEvents`, and may set `none` on the parts a press should pass through, as an
131
+ * unfilled shape does for its interior.
132
+ *
133
+ * @defaultValue `'frame'`
134
+ */
135
+ hitArea?: 'frame' | 'content';
30
136
  }
31
137
  /**
32
138
  * Registers the renderer for a kind of movable content, replacing the built-in one.
33
139
  *
34
140
  * @param type The content type (`picture`, `chart`, `shape`, `checkBox`, …), as registered with
35
141
  * `MovableContentRegistry` in the SDK.
36
- * @param load Resolves the renderer when first needed.
142
+ * @param load Imports the kind's module when first needed ({@link MovableRendererLoader}).
143
+ * @param options How the kind is drawn before it loads, and `select` to pick from the module the
144
+ * component, or a record with the component and the kind's other slots (selection control,
145
+ * commands, ribbon tab, format pane).
37
146
  * @returns A function that removes the registration.
38
147
  *
39
148
  * @example
40
149
  * ```ts
41
- * registerMovableRenderer('map', () => import('./MapRenderer').then((module) => module.MapRenderer));
150
+ * registerMovableRenderer('map', () => import('./MapRenderer'), { select: (m) => m.MapRenderer });
151
+ * // With a selection control of its own:
152
+ * registerMovableRenderer('map', () => import('./MapRenderer'), {
153
+ * select: (m) => ({ renderer: m.MapRenderer, control: m.MapControl })
154
+ * });
42
155
  * ```
43
156
  */
44
- export declare function registerMovableRenderer(type: string, load: MovableRendererLoader, options?: MovableRendererOptions): () => void;
157
+ export declare function registerMovableRenderer<M>(type: string, load: MovableRendererLoader<M>, options?: MovableRendererOptions<M>): () => void;
158
+ /**
159
+ * Supplies the format pane body for a kind of movable content, in place of the one its module
160
+ * carries, without touching the kind's renderer. This is how a host with its own widgets gives a
161
+ * built-in kind a pane.
162
+ *
163
+ * @param type The content type.
164
+ * @param load Resolves the body; called once, when the kind's slots are first asked for.
165
+ * @returns A function that removes the registration.
166
+ */
167
+ export declare function registerMovablePane(type: string, load: MovablePaneLoader): () => void;
168
+ /**
169
+ * The slots of a kind of movable content, or `undefined` while its module has not loaded (or for
170
+ * a type with no renderer). A pane registered with {@link registerMovablePane} wins over the
171
+ * module's; while it is still loading the record has no pane.
172
+ */
173
+ export declare function getMovableKind(type: string): MovableKind | undefined;
174
+ /**
175
+ * Resolves with the slots of a kind of movable content ({@link getMovableKind}) once its module,
176
+ * and any pane registered for it, have loaded; loads them if nothing has yet. Resolves `undefined`
177
+ * for a type with no renderer, or when a load fails.
178
+ */
179
+ export declare function whenMovableKindLoaded(type: string): Promise<MovableKind | undefined>;
180
+ /**
181
+ * Calls `listener` whenever what {@link getMovableKind} answers may have changed: a kind or pane
182
+ * registered or removed, or a module or pane finished loading.
183
+ *
184
+ * @returns A function that removes the listener.
185
+ */
186
+ export declare function addMovableKindListener(listener: () => void): () => void;
187
+ /** Whether the layer shades a selected movable of the kind with a shadow on its frame. */
188
+ export declare function hasSelectionShadow(type: string): boolean;
189
+ /**
190
+ * The selection control a kind of movable content brings for itself, or `undefined` for the
191
+ * generic one. Until the kind's module has loaded this is a component that draws the generic
192
+ * control, and the kind's own once the module arrives.
193
+ */
194
+ export declare function getMovableControl(type: string): React.ComponentType<ContentControlProps> | undefined;
45
195
  /**
46
196
  * The renderer for a kind of movable content: the registered one, else the built-in one, else
47
197
  * `undefined`.
48
198
  */
49
199
  export declare function getMovableRenderer(type: string): ((props: MovableRendererProps) => React.ReactElement) | undefined;
50
200
  /**
51
- * Registers a built-in renderer. A registered renderer always wins over it.
201
+ * The content types with a renderer, built-in or registered, loaded or not.
202
+ */
203
+ export declare function getMovableRendererTypes(): string[];
204
+ /**
205
+ * Registers a built-in renderer. A registered renderer always wins over it, and a built-in that
206
+ * one has replaced is not loaded ahead of use.
52
207
  * @internal
53
208
  */
54
- export declare function registerBuiltInMovableRenderer(type: string, load: MovableRendererLoader, options?: MovableRendererOptions): void;
209
+ export declare function registerBuiltInMovableRenderer<M>(type: string, load: MovableRendererLoader<M>, options?: MovableRendererOptions<M>): void;
55
210
  //# sourceMappingURL=MovableRenderers.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { MovableRendererProps } from './MovableRenderers';
3
+ /**
4
+ * Draws a movable whose content could not be made ({@link IErrorContent}): which kind, and why.
5
+ */
6
+ export declare const ErrorContentFrame: React.MemoExoticComponent<(props: MovableRendererProps) => React.ReactElement>;
7
+ /**
8
+ * Draws a movable whose content's type has no renderer.
9
+ */
10
+ export declare const UnsupportedContentFrame: React.MemoExoticComponent<(props: MovableRendererProps) => React.ReactElement>;
11
+ //# sourceMappingURL=PlaceholderFrames.d.ts.map
@@ -5,8 +5,11 @@ export interface RotateHandleProps {
5
5
  * the pointer capture.
6
6
  */
7
7
  isDragging?: boolean;
8
- /** A press on the handle. Return `false` to refuse the gesture. */
9
- onStart: () => boolean;
8
+ /**
9
+ * A press on the handle. `radius` is the handle's distance from the frame's center (px). Return
10
+ * `false` to refuse the gesture.
11
+ */
12
+ onStart: (radius: number) => boolean;
10
13
  /**
11
14
  * The pointer moved: `degrees` is the angle swept about the frame's center since the press,
12
15
  * clockwise; `snap` is whether the rotation should snap (Shift).
@@ -16,10 +19,15 @@ export interface RotateHandleProps {
16
19
  onEnd: () => void;
17
20
  /** The gesture was lost (`pointercancel`). */
18
21
  onCancel: () => void;
22
+ /**
23
+ * Draw the handle below the bottom edge: the frame is mirrored top to bottom, so its top is
24
+ * drawn there, as Excel draws it.
25
+ */
26
+ below?: boolean;
19
27
  }
20
28
  /**
21
- * The handle that turns a selected frame, drawn in its adornment box above the top edge so it
22
- * turns with the frame. Its size and offset are set by the movable layer's stylesheet.
29
+ * The handle that turns a selected frame, drawn in its adornment box above the top edge (below
30
+ * the bottom one when the frame is mirrored top to bottom) so it turns with the frame. Its size and offset are set by the movable layer's stylesheet.
23
31
  *
24
32
  * @remarks
25
33
  * The angle is measured about the center of the adornment box, which is the frame's center at any
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The surface state a connector's end drag publishes, under {@link CONNECT_STATE_KEY}: every shape
3
+ * drawn on the surface shows its connection sites while it is set, and the site the end would
4
+ * glue to if released now is marked.
5
+ */
6
+ export interface ConnectState {
7
+ /** The movable whose end is being dragged, by id. */
8
+ connector: string;
9
+ /** The movable the end would glue to, by id; `null` when it would be free. */
10
+ target: string | null;
11
+ /** The site on that movable, numbered as `IShape.IConnectorFormat` takes it. */
12
+ index: number | null;
13
+ }
14
+ /** The surface state key of {@link ConnectState}; `null` while no end is dragged. */
15
+ export declare const CONNECT_STATE_KEY = "movable-connect";
16
+ //# sourceMappingURL=connect.d.ts.map
@@ -1,6 +1,7 @@
1
- import { Bounds } from '@sheetxl/utils';
1
+ import { Bounds, Point } from '@sheetxl/utils';
2
2
  import { IMovable } from '@sheetxl/sdk';
3
3
  import { IGridPane } from '@sheetxl/grid-react';
4
+ import { ResizeDirection } from './geometry';
4
5
  /** Where a movable's frame sits in a pane: its pane box and its turn about the box's center. */
5
6
  export interface FramePlacement {
6
7
  left: number;
@@ -9,6 +10,8 @@ export interface FramePlacement {
9
10
  height: number;
10
11
  /** Degrees, clockwise. */
11
12
  rotation: number;
13
+ /** How the content is mirrored within the box. */
14
+ flip: IMovable.Flip;
12
15
  }
13
16
  /**
14
17
  * An in-flight gesture's view of one movable, drawn in place of the model until the gesture
@@ -19,11 +22,51 @@ export interface MovablePreview {
19
22
  bounds?: Bounds;
20
23
  /** Degrees, clockwise. */
21
24
  rotation?: number;
25
+ /** How the content is mirrored within the frame. */
26
+ flip?: IMovable.Flip;
27
+ /** What the gesture holds — a handle, or for a move the point of the frame it was grabbed by. */
28
+ grip?: MovableGrip;
29
+ /** What the content draws in place of its own until the gesture commits. */
30
+ content?: MovableContentPreview;
22
31
  }
32
+ /**
33
+ * A content's own state as a gesture previews it: a shape's adjust values while one of its handles
34
+ * is dragged, or the route a glued connector takes while the shape it is glued to moves.
35
+ */
36
+ export interface MovableContentPreview {
37
+ /** A shape's preset, as `IShape.getShapeType` answers. */
38
+ shapeType?: string;
39
+ /** A shape's adjust values; `null` for the preset's defaults. */
40
+ adjustments?: Readonly<Record<string, number>> | null;
41
+ }
42
+ /**
43
+ * What an in-flight gesture holds, so the readout can sit by it wherever the frame has turned: a resize
44
+ * handle by its direction, the rotate handle by its distance from the frame's center (pane px) and
45
+ * whether it is drawn below the frame (mirrored top to bottom), a move by where it was grabbed — the
46
+ * press's offset from the unrotated frame's top-left (pane px), which a move never changes, so it stays
47
+ * under the pointer.
48
+ */
49
+ export type MovableGrip = {
50
+ kind: 'resize';
51
+ direction: ResizeDirection;
52
+ } | {
53
+ kind: 'rotate';
54
+ radius: number;
55
+ below: boolean;
56
+ } | {
57
+ kind: 'move';
58
+ at: Point;
59
+ };
23
60
  /**
24
61
  * The placement of a movable's frame in `pane`, from the drag preview when there is one, else the
25
62
  * model. The frame and everything drawn in register with it (adornments) use this, so they cannot
26
63
  * disagree.
64
+ *
65
+ * @remarks
66
+ * The frame's corner sits on a device pixel, as Excel places a drawing and as the grid places a
67
+ * fill: a drawing that lands its lines on the device grid (a shape's thin strokes) then needs only
68
+ * the zoom and the device pixel ratio to do so, and the frame scrolls under it by whole device
69
+ * pixels. The size is not snapped; the drawing's zoom stays exact.
27
70
  */
28
71
  export declare const framePlacement: (movable: IMovable, pane: IGridPane, preview?: MovablePreview | null) => FramePlacement;
29
72
  //# sourceMappingURL=framePlacement.d.ts.map
@@ -4,6 +4,16 @@ import { Bounds } from '@sheetxl/utils';
4
4
  * `0` neither (an edge handle on the other axis).
5
5
  */
6
6
  export type ResizeDirection = readonly [number, number];
7
+ /** What dragging a resize handle made of a frame. */
8
+ export interface ResizedFrame {
9
+ /** The unrotated frame, turned by the same rotation about its own center as the start frame. */
10
+ bounds: Bounds;
11
+ /**
12
+ * Per axis, whether the dragged side was pulled through the held one, so the frame now lies on
13
+ * the other side of it: what mirrors the content, as in Excel.
14
+ */
15
+ crossed: readonly [boolean, boolean];
16
+ }
7
17
  /**
8
18
  * The frame after dragging a resize handle, with the opposite edge or corner held still on screen.
9
19
  *
@@ -13,12 +23,12 @@ export type ResizeDirection = readonly [number, number];
13
23
  * whichever side is dragged. An axis the handle does not drag is ignored.
14
24
  * @param rotation - Degrees clockwise the frame is turned about its center.
15
25
  * @param keepAspect - Keep `start`'s aspect ratio. Only a corner drag keeps it.
16
- * @returns The unrotated frame, turned by `rotation` about its own center like `start`.
17
26
  *
18
27
  * @remarks
19
- * A size is never negative: a frame dragged past its opposite edge stops there.
28
+ * A handle dragged through the held side keeps going: the frame is then the box between the held
29
+ * side and the pointer, and that axis is reported crossed. The frame's size is never negative.
20
30
  */
21
- export declare const resizeFrame: (start: Bounds, direction: ResizeDirection, dist: readonly [number, number], rotation: number, keepAspect: boolean) => Bounds;
31
+ export declare const resizeFrame: (start: Bounds, direction: ResizeDirection, dist: readonly [number, number], rotation: number, keepAspect: boolean) => ResizedFrame;
22
32
  /**
23
33
  * How much a resize handle's drag grows its frame, the `dist` that `resizeFrame` takes.
24
34
  *
@@ -1,7 +1,15 @@
1
1
  export * from './IMovableArea';
2
2
  export * from './MovableLayer';
3
+ export * from './MovableAdornment';
4
+ export * from './framePlacement';
5
+ export * from './connect';
6
+ export * from './MovableControl';
7
+ export * from './pressTarget';
3
8
  export * from './MovableEdit';
4
9
  export * from './EmptyFrame';
5
10
  export * from './TextBox';
6
11
  export * from './MovableRenderers';
12
+ export * from './DefaultMovable';
13
+ export * from './MovableCommandGroups';
14
+ export * from './ConnectionSites';
7
15
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,20 @@
1
+ import { IMovable } from '@sheetxl/sdk';
2
+ /**
3
+ * The attribute a container renderer puts on each member's box (with the member's id), so a press
4
+ * inside a group's frame finds the member it landed on.
5
+ */
6
+ export declare const MEMBER_ATTRIBUTE = "data-movable-id";
7
+ /** The movable at the top of `movable`'s parent chain: itself when it has no parent. */
8
+ export declare const rootOf: (movable: IMovable) => IMovable;
9
+ /**
10
+ * The movable a press on `root`'s frame selects, as Excel's two-step: the first press selects the
11
+ * root; a press while the root is selected selects the member under the pointer; a press while a
12
+ * member is selected selects the member at that depth under the pointer, or one deeper when the
13
+ * selected member is the one pressed into.
14
+ *
15
+ * @param root The movable whose frame was pressed.
16
+ * @param target The element the press landed on.
17
+ * @param frame The frame's element, where the walk up stops.
18
+ */
19
+ export declare const resolvePressedMovable: (root: IMovable, target: Element | null, frame: Element) => IMovable;
20
+ //# sourceMappingURL=pressTarget.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,6 +1,6 @@
1
- import { ISheet } from '@sheetxl/sdk';
1
+ import { IWorksheet } from '@sheetxl/sdk';
2
2
  /** Record that `sheet`'s picker opened, or (`null`) that the open one closed. */
3
- export declare const setCellPickerOpen: (sheet: ISheet | null) => void;
3
+ export declare const setCellPickerOpen: (sheet: IWorksheet | null) => void;
4
4
  /** Whether `sheet` has a cell picker open (reactive). */
5
- export declare const useCellPickerOpen: (sheet: ISheet) => boolean;
5
+ export declare const useCellPickerOpen: (sheet: IWorksheet) => boolean;
6
6
  //# sourceMappingURL=cellPickerOpen.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
- import { CellCoords } from '@sheetxl/utils';
3
- import { ISheet } from '@sheetxl/sdk';
2
+ import { CellCoords, MaybePromise } from '@sheetxl/utils';
3
+ import { IWorksheet } from '@sheetxl/sdk';
4
4
  import { GridAnchor, IEditable } from '@sheetxl/grid-react';
5
5
  import { PickerItem } from './PickerPanel';
6
6
  /**
@@ -10,7 +10,7 @@ import { PickerItem } from './PickerPanel';
10
10
  */
11
11
  export interface CellPickerOptions {
12
12
  /** The sheet the cell is on: its `Normal` font, its current text, and the open flag. */
13
- sheet: ISheet;
13
+ sheet: IWorksheet;
14
14
  /**
15
15
  * The editable a default choice is entered through — the same path as typing the item's text, so
16
16
  * the value coerces and formats as a typed one does. Not needed when {@link onChoose} is given.
@@ -73,9 +73,11 @@ export interface CellPicker {
73
73
  * Enter `text` into `cell` as a typed entry: an edit session seeded with the text and committed at
74
74
  * once, so the value coerces, formats and is checked exactly as if it had been typed.
75
75
  *
76
- * @returns Whether the entry was written. A refused entry leaves the cell as it was.
76
+ * @returns Whether the entry was written, or a promise of that while the entry is checked. A refused
77
+ * entry leaves the cell as it was; a pick that opened its own edit closes it, and the alert it raised
78
+ * stays up.
77
79
  */
78
- export declare const commitListPick: (editable: IEditable<any, string, any>, cell: CellCoords, text: string) => boolean;
80
+ export declare const commitListPick: (editable: IEditable<any, string, any>, cell: CellCoords, text: string) => MaybePromise<boolean>;
79
81
  /**
80
82
  * A **cell picker** — a menu through the shared float stack (so it gets the portal, stacking,
81
83
  * light-dismiss and Escape every other popup in the app has), positioned by the grid on the cell it is
@@ -0,0 +1,20 @@
1
+ import { Command } from '@sheetxl/utils-react';
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]>>;
5
+ /**
6
+ * The picture kind's commands, for the active picture. Chrome is the `picture` catalog.
7
+ *
8
+ * Change Picture shows another image in the same frame, as Excel's does: from a file
9
+ * (`changePictureFromFile`, a file dialog) or from the web (`changePictureFromURL`, an input
10
+ * dialog). The image is read before the picture takes it, so a bad address or an unreadable file
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.
18
+ */
19
+ export declare const contributePictureCommands: Command.DynamicCommandContributor<MovableKindCommandData>;
20
+ //# sourceMappingURL=PictureCommands.d.ts.map
@@ -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,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
@@ -1,3 +1,2 @@
1
1
  export type * from './IPictureEditor';
2
- export * from './PictureEditor';
3
2
  //# sourceMappingURL=index.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