@sheetxl/react 0.8.0-beta.7 → 1.0.0

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 (406) hide show
  1. package/LICENSE.md +8 -7
  2. package/browser/esm/2YDUWXaXpl9cdsk7.mjs +8 -0
  3. package/browser/esm/64NfoZ1s7Oe3vdpX.mjs +60 -0
  4. package/browser/esm/BJDz5J4gFUEYi1Wz.mjs +36 -0
  5. package/browser/esm/B_CI6xMNropeWGgr.mjs +134 -0
  6. package/browser/esm/BgA4Cz8iMysciFOb.mjs +45 -0
  7. package/browser/esm/BkG6VuJDmu_hfIo6.mjs +31 -0
  8. package/browser/esm/BmO7yh4NjxeJylOD.mjs +14092 -0
  9. package/browser/esm/BwFFSeqtE3TIuvtc.mjs +341 -0
  10. package/browser/esm/CENTtj0PnF_tvpST.mjs +79 -0
  11. package/browser/esm/CVY0-_x6IgpdUVNp.mjs +264 -0
  12. package/browser/esm/CdyivRoMgPXvRiiE.mjs +197 -0
  13. package/browser/esm/CiylJlRA7mt8yjPD.mjs +128 -0
  14. package/browser/esm/D9CTIGFUbVGJkeVE.mjs +401 -0
  15. package/browser/esm/D9NgFucLwPgAQNgf.mjs +19 -0
  16. package/browser/esm/DdFOaG09eksHtKwT.mjs +145 -0
  17. package/browser/esm/DdHdNjRkzo1iShOo.mjs +78 -0
  18. package/browser/esm/DfIvpHB7HDdmIYNm.mjs +9560 -0
  19. package/browser/esm/DfNDtzixfTPjmoW_.mjs +32 -0
  20. package/browser/esm/Dtb9bOBjtPdUAr8x.mjs +20 -0
  21. package/browser/esm/Dz5pGpL4XWXVdntj.mjs +323 -0
  22. package/browser/esm/SJAlYSFKC-5yNZ-C.mjs +2706 -0
  23. package/browser/esm/chart.mjs +41 -0
  24. package/browser/esm/control.mjs +217 -0
  25. package/browser/esm/group.mjs +123 -0
  26. package/browser/esm/index.mjs +22289 -13986
  27. package/browser/esm/jHqSboF5oFvzSM7a.mjs +63 -0
  28. package/browser/esm/note.mjs +112 -0
  29. package/browser/esm/oljQE8EpIzoxUjUz.mjs +323 -0
  30. package/browser/esm/picture.mjs +7 -0
  31. package/browser/esm/shape.mjs +7 -0
  32. package/browser/esm/slicer.mjs +282 -0
  33. package/browser/esm/w8MsScJSe7QxP6jL.mjs +67 -0
  34. package/browser/esm/yRqWQRSVyiR1kYh8.mjs +42 -0
  35. package/licenses/dependencies.txt +284 -565
  36. package/node/esm/1XOgrNXKQF__O9SV.mjs +8 -0
  37. package/node/esm/Aw6aaKE_YOA1Vi_V.mjs +146 -0
  38. package/node/esm/B6Oqu2Gw1pwWPf_N.mjs +328 -0
  39. package/node/esm/BizlElAhqg_Bc624.mjs +198 -0
  40. package/node/esm/C06Y1xPsbxgn3YX7.mjs +128 -0
  41. package/node/esm/C2dHN_gvhBxlFFnJ.mjs +45 -0
  42. package/node/esm/C4_5UcCdys1hzt5E.mjs +68 -0
  43. package/node/esm/CIidiDtqyubz13ys.mjs +80 -0
  44. package/node/esm/CTFb8PjwC1q6yilw.mjs +80 -0
  45. package/node/esm/C_GJPG-BTFhta8GD.mjs +265 -0
  46. package/node/esm/CdTeYrDgGp-s-KNG.mjs +134 -0
  47. package/node/esm/CeMKhq6cSxfWzN5H.mjs +2706 -0
  48. package/node/esm/DJIBAu8bEDmlVjtD.mjs +20 -0
  49. package/node/esm/DUQ1PY9P63cTe_Es.mjs +37 -0
  50. package/node/esm/Db8NRp_kZ-FfkZaO.mjs +32 -0
  51. package/node/esm/Dl2kdvb4G_ddqeDN.mjs +19 -0
  52. package/node/esm/DlDr-o5nAZgPbn6R.mjs +1697 -0
  53. package/node/esm/DvRLP1lEBfwHBrEC.mjs +63 -0
  54. package/node/esm/JVlPlE1ys7DM3yCP.mjs +35 -0
  55. package/node/esm/NSddS40Vqf1xKdDd.mjs +406 -0
  56. package/node/esm/QqwCS9GFuDnQausz.mjs +66 -0
  57. package/node/esm/chart.mjs +41 -0
  58. package/node/esm/control.mjs +217 -0
  59. package/node/esm/group.mjs +123 -0
  60. package/node/esm/index.mjs +18027 -9614
  61. package/node/esm/note.mjs +113 -0
  62. package/node/esm/picture.mjs +326 -0
  63. package/node/esm/shape.mjs +342 -0
  64. package/node/esm/slicer.mjs +284 -0
  65. package/package.json +56 -15
  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 +270 -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 +358 -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 +283 -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 +360 -2
  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 +123 -0
  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 +10 -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 +59 -18
  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 +22 -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 +101 -3
  186. package/types/src/group/GroupEditor.d.ts +25 -0
  187. package/types/src/index.d.ts +10 -1
  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 +10 -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 +40 -0
  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 +15 -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 +38 -0
  258. package/types/src/movable/MovableAdornment.d.ts +26 -0
  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 +80 -0
  262. package/types/src/movable/MovableFrame.d.ts +18 -16
  263. package/types/src/movable/MovableLayer.d.ts +30 -5
  264. package/types/src/movable/MovableRenderers.d.ts +210 -0
  265. package/types/src/movable/PlaceholderFrames.d.ts +11 -0
  266. package/types/src/movable/RotateHandle.d.ts +37 -0
  267. package/types/src/movable/connect.d.ts +16 -0
  268. package/types/src/movable/framePlacement.d.ts +72 -0
  269. package/types/src/movable/geometry.d.ts +61 -0
  270. package/types/src/movable/index.d.ts +9 -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 +15 -2
  307. package/types/src/shape/ShapeGallery.d.ts +31 -0
  308. package/types/src/shape/ShapeHandles.d.ts +28 -0
  309. package/types/src/shape/ShapeKind.d.ts +7 -0
  310. package/types/src/shape/ShapeSVG.d.ts +22 -0
  311. package/types/src/shape/ShapeText.d.ts +17 -0
  312. package/types/src/shape/icons/ShapeIcons.d.ts +16 -0
  313. package/types/src/shape/icons/_ShapeIconPack.d.ts +4 -0
  314. package/types/src/shape/index.d.ts +3 -1
  315. package/types/src/shape/shapeFrame.d.ts +50 -0
  316. package/types/src/shape/shapeStyle.d.ts +82 -0
  317. package/types/src/sheet/ISheetHeaderElement.d.ts +3 -3
  318. package/types/src/sheet/IWorksheetElement.d.ts +289 -0
  319. package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
  320. package/types/src/sheet/SheetCommandProvider.d.ts +14 -6
  321. package/types/src/sheet/SheetCommands.d.ts +18 -3
  322. package/types/src/sheet/SheetKindIcon.d.ts +14 -0
  323. package/types/src/sheet/SheetOutlineElement.d.ts +70 -0
  324. package/types/src/sheet/SheetPanels.d.ts +11 -0
  325. package/types/src/sheet/SheetScrollbar.d.ts +4 -13
  326. package/types/src/sheet/TopLeftCorner.d.ts +2 -2
  327. package/types/src/sheet/WorksheetElement.d.ts +12 -0
  328. package/types/src/sheet/_freezeAt.d.ts +10 -0
  329. package/types/src/sheet/_hyperlinkEdit.d.ts +7 -0
  330. package/types/src/sheet/_useHeaderMetrics.d.ts +11 -0
  331. package/types/src/sheet/circularReferences.d.ts +4 -4
  332. package/types/src/sheet/index.d.ts +5 -2
  333. package/types/src/sheet/useCycleHighlight.d.ts +2 -2
  334. package/types/src/slicer/SlicerCommands.d.ts +10 -0
  335. package/types/src/slicer/SlicerEditor.d.ts +8 -2
  336. package/types/src/slicer/SlicerKind.d.ts +7 -0
  337. package/types/src/slicer/SlicerStylePreview.d.ts +18 -0
  338. package/types/src/slicer/index.d.ts +2 -1
  339. package/types/src/slicer/slicerStyles.d.ts +32 -0
  340. package/types/src/sparkline/PictureCache.d.ts +37 -0
  341. package/types/src/sparkline/SparklineCommands.d.ts +23 -0
  342. package/types/src/sparkline/SparklinePictures.d.ts +7 -0
  343. package/types/src/sparkline/paint/_drawing.d.ts +24 -0
  344. package/types/src/sparkline/paint/echarts.d.ts +8 -0
  345. package/types/src/sparkline/paint/index.d.ts +8 -0
  346. package/types/src/tabStrip/SheetTab.d.ts +1 -1
  347. package/types/src/tabStrip/Sortable.d.ts +5 -5
  348. package/types/src/tabStrip/TabStrip.d.ts +13 -6
  349. package/types/src/tabStrip/TabStripItem.d.ts +15 -13
  350. package/types/src/table/TableCommands.d.ts +2 -2
  351. package/types/src/taskPane/CellControlPane.d.ts +15 -0
  352. package/types/src/taskPane/MovablePane.d.ts +15 -0
  353. package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
  354. package/types/src/taskPane/TaskPaneFrame.d.ts +4 -4
  355. package/types/src/taskPane/TaskPaneKeys.d.ts +38 -0
  356. package/types/src/taskPane/TaskPaneRegistry.d.ts +32 -12
  357. package/types/src/taskPane/_paneReasons.d.ts +7 -0
  358. package/types/src/taskPane/index.d.ts +3 -0
  359. package/types/src/taskPane/useTaskPane.d.ts +6 -3
  360. package/types/src/theme/ExplicitTokens.d.ts +18 -0
  361. package/types/src/theme/GridColorSchemeContext.d.ts +8 -0
  362. package/types/src/theme/ThemeRootStyles.d.ts +31 -0
  363. package/types/src/theme/ThemeState.d.ts +2 -2
  364. package/types/src/theme/buildDocThemeCSS.d.ts +4 -1
  365. package/types/src/theme/buildOOXMLThemeCSS.d.ts +2 -2
  366. package/types/src/theme/buildTokensCSS.d.ts +15 -0
  367. package/types/src/theme/index.d.ts +2 -4
  368. package/types/src/theme/useAppColorScheme.d.ts +4 -1
  369. package/types/src/theme/useGridColorScheme.d.ts +9 -4
  370. package/types/src/theme/useSystemColors.d.ts +1 -15
  371. package/types/src/workbook/DefaultMovableRenderers.d.ts +20 -0
  372. package/types/src/workbook/DefaultRenderers.d.ts +5 -4
  373. package/types/src/workbook/IWorkbookElement.d.ts +176 -30
  374. package/types/src/workbook/WorkbookCommands.d.ts +6 -1
  375. package/types/src/workbook/WorkbookStrip.d.ts +14 -5
  376. package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
  377. package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +0 -156
  378. package/browser/cjs/index.cjs +0 -42
  379. package/browser/esm/CwXbsCWTrl3QB1t6.mjs +0 -6286
  380. package/node/esm/CZc8rKcLzArmqJz2.mjs +0 -9
  381. package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +0 -10
  382. package/types/src/chart/templates/area-stacked-template.json.d.ts +0 -10
  383. package/types/src/chart/templates/area-template.json.d.ts +0 -9
  384. package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +0 -10
  385. package/types/src/chart/templates/bar-stacked-template.json.d.ts +0 -10
  386. package/types/src/chart/templates/bar-template.json.d.ts +0 -9
  387. package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +0 -10
  388. package/types/src/chart/templates/column-stacked-template.json.d.ts +0 -10
  389. package/types/src/chart/templates/column-template.json.d.ts +0 -9
  390. package/types/src/chart/templates/line-markers-template.json.d.ts +0 -10
  391. package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +0 -11
  392. package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +0 -11
  393. package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +0 -10
  394. package/types/src/chart/templates/line-stacked-template.json.d.ts +0 -10
  395. package/types/src/chart/templates/line-template.json.d.ts +0 -9
  396. package/types/src/chart/templates/pie-doughnut-template.json.d.ts +0 -10
  397. package/types/src/chart/templates/pie-template.json.d.ts +0 -9
  398. package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +0 -10
  399. package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +0 -10
  400. package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +0 -10
  401. package/types/src/chart/templates/scatter-lines-template.json.d.ts +0 -10
  402. package/types/src/chart/templates/scatter-markers-template.json.d.ts +0 -10
  403. package/types/src/context/SheetContext.d.ts +0 -18
  404. package/types/src/movable/MoveableBundle.d.ts +0 -4
  405. package/types/src/sheet/ISheetElement.d.ts +0 -258
  406. package/types/src/sheet/SheetElement.d.ts +0 -15
@@ -1,4 +1,5 @@
1
1
  import { IMovable } from '@sheetxl/sdk';
2
+ import { MovableGestureHost } from './MovableControl';
2
3
  /**
3
4
  * Props a movable renderer receives from its frame.
4
5
  *
@@ -24,6 +25,12 @@ export interface MovableElementProps extends React.HTMLAttributes<HTMLElement> {
24
25
  * @defaultValue 1
25
26
  */
26
27
  zoom?: number;
28
+ /**
29
+ * How to mirror the drawing within the frame: the gesture's while one is in flight, else the
30
+ * movable's own. The frame does not mirror the drawing itself, since what a mirror means is the
31
+ * drawing's (a shape keeps its text readable); content that cannot be mirrored ignores it.
32
+ */
33
+ flip?: IMovable.Flip;
27
34
  /**
28
35
  * Called when the movable is hidden from view.
29
36
  *
@@ -47,6 +54,37 @@ export interface MovableElementProps extends React.HTMLAttributes<HTMLElement> {
47
54
  * box can drag from its border and put the caret where its text is pressed.
48
55
  */
49
56
  onDragZone?: (isDragZone: (event: MouseEvent | TouchEvent) => boolean) => void;
57
+ /**
58
+ * Registers what a finger tap does on the movable while it is not selected: answer `true` to take
59
+ * the tap, and the frame leaves the movable unselected. Without one, or on `false`, the tap selects.
60
+ *
61
+ * @remarks
62
+ * A finger pressed on a movable that is not selected may be starting a pan of the sheet, so the
63
+ * content never receives that press: the frame waits for the finger to lift where it went down,
64
+ * the sheet unscrolled, and only then calls this. A link that opens on a tap is the use; the sheet
65
+ * still pans from anywhere on the movable.
66
+ */
67
+ onTap?: (tap: (event: PointerEvent) => boolean) => void;
68
+ /**
69
+ * A box above the selection chrome, placed and turned exactly as the frame is, for the content's
70
+ * own controls (a shape's adjustment handles). `null` when the movable has none.
71
+ *
72
+ * @remarks
73
+ * Render into it with a portal. It fills the frame's box and is pointer-transparent; controls opt
74
+ * back in. Drawn above the resize handles, so a control on the selection outline wins the press,
75
+ * as in Excel.
76
+ *
77
+ * While one of the content's controls is being dragged, give it the class `movable-gesture`: every
78
+ * control in the box, the layer's and the content's, hides until the class goes, as they do for a
79
+ * move or resize.
80
+ */
81
+ adornmentHost?: HTMLElement | null;
82
+ /**
83
+ * Runs a gesture of the content's own controls (a shape's adjustment handles) through the
84
+ * layer: previewed in every pane with what follows it, such as a connector glued to the shape,
85
+ * and committed as one step. Present while the movable's controls are drawn.
86
+ */
87
+ gesture?: MovableGestureHost;
50
88
  /**
51
89
  * If true then the component is disabled.
52
90
  * @defaultValue false
@@ -0,0 +1,26 @@
1
+ import { default as React } from 'react';
2
+ import { IMovable } from '@sheetxl/sdk';
3
+ import { MovablePreview } from './framePlacement';
4
+ /**
5
+ * Each adorned movable's adornment box, by movable, as the layer holds them. A container renderer
6
+ * reads it to hand each member its own box (`MovableElementProps.adornmentHost`), since a member
7
+ * has no frame of its own to be handed one through.
8
+ */
9
+ export declare const AdornmentHostsContext: React.Context<ReadonlyMap<IMovable, HTMLElement>>;
10
+ export interface MovableAdornmentProps {
11
+ movable: IMovable;
12
+ /** The gesture preview, as the frame is given it. */
13
+ preview?: MovablePreview | null;
14
+ /** Receives the box once mounted and `null` when it unmounts; the layer hands it to the content. */
15
+ onHost: (movable: IMovable, host: HTMLElement | null) => void;
16
+ /** The layer's own controls for the movable: its outline, resize and rotate handles. */
17
+ children?: React.ReactNode;
18
+ }
19
+ /**
20
+ * The box a selected movable's controls are drawn in: placed and turned as its frame is, from the
21
+ * same numbers. Its children stack in order, with no z-index of their own: the layer's controls
22
+ * come first and the content renders its own after them (see `MovableElementProps.adornmentHost`),
23
+ * so a content control paints over, and is hit before, a resize handle or outline it overlaps.
24
+ */
25
+ export declare const MovableAdornment: React.FC<MovableAdornmentProps>;
26
+ //# sourceMappingURL=MovableAdornment.d.ts.map
@@ -0,0 +1,22 @@
1
+ import { Command } from '@sheetxl/utils-react';
2
+ /** The key of a kind's ribbon tab: what a kind's own `toolbar` and the default tab are registered as. */
3
+ export declare const movableToolbarKey: (type: string) => string;
4
+ /**
5
+ * The tab a kind of movable content gets when its module brings none: the drawing groups and the
6
+ * format pane, labeled with the kind's name (`IContent.getTypeDescription()`) unless the catalog
7
+ * has a label for `${type}Toolbar`. So a new kind with no commands of its own still gets a working
8
+ * tab.
9
+ *
10
+ * @param type The content type; the tab's key is `${type}Toolbar`.
11
+ * @param label The tab's label when the catalog has none.
12
+ */
13
+ export declare function createDefaultMovableToolbar(type: string, label: string): Command.CommandButtonEntry & {
14
+ key: string;
15
+ };
16
+ /**
17
+ * Registers the drawing button groups shared by every kind's ribbon tab and by a host's drawing
18
+ * right-click menu: z-order, align and distribute, flip, group, anchor sizing, and `arrangeOptions`,
19
+ * which gathers them for the end of a tab. Their chrome is in the `movable` catalog. Idempotent.
20
+ */
21
+ export declare function registerMovableCommandGroups(): void;
22
+ //# sourceMappingURL=MovableCommandGroups.d.ts.map
@@ -1,22 +1,27 @@
1
1
  import { RemoveListener, EditModeHandler } from '@sheetxl/utils';
2
- import { ISheet } from '@sheetxl/sdk';
2
+ import { IWorksheet } from '@sheetxl/sdk';
3
3
  import { Command, IReactNotifier } from '@sheetxl/utils-react';
4
+ import { ActivateFrameOptions, ITaskPaneArea } from '../taskPane';
4
5
  /** Options for {@link contributeMovableCommands}. */
5
6
  export interface ContributeMovableCommandsOptions {
6
7
  /** Error reporting. */
7
8
  notifier?: IReactNotifier;
8
9
  /** Cleared after a drawing op. From `useEditMode()`. */
9
10
  editModeHandler?: EditModeHandler;
11
+ /** Opens a task pane; `formatMovable` opens the format pane with it. */
12
+ activateTaskPane?: (key: string, options?: ActivateFrameOptions) => void;
13
+ /** Read for whether the format pane is showing, the `formatMovable` state. */
14
+ taskPaneArea?: ITaskPaneArea;
10
15
  }
11
16
  /**
12
17
  * Contribute the movable **behavior** over `sheet`'s drawings. Each op runs `update` across the selected
13
- * movables inside one `doBatch`; the anchor/lock `state` re-contributes on selection change. Contribute on
18
+ * movables inside one `doBatch`; the anchor/lock/flip `state` follows the active movable. Contribute on
14
19
  * the **movable scope** (re-run per active sheet); tagged `noTransaction` since we own the `doBatch`, and
15
20
  * `noRepeat`. Returns a disposer.
16
21
  */
17
22
  /** The single `data` bundle {@link contributeMovableCommands} takes (the `DynamicCommandContributor` shape). */
18
23
  export interface MovableCommandData extends ContributeMovableCommandsOptions {
19
- sheet: ISheet | null;
24
+ sheet: IWorksheet | null;
20
25
  }
21
26
  export declare function contributeMovableCommands(contribution: Command.CommandContribution, data: MovableCommandData): RemoveListener;
22
27
  //# sourceMappingURL=MovableCommands.d.ts.map
@@ -0,0 +1,80 @@
1
+ import { default as React } from 'react';
2
+ import { IMovable } from '@sheetxl/sdk';
3
+ import { ResizeDirection } from './geometry';
4
+ import { MovablePreview } from './framePlacement';
5
+ /** A resize handle by its compass name, as `MovableLayerProps.resizeDirections` lists them. */
6
+ export type ResizeDirectionName = 'nw' | 'n' | 'ne' | 'w' | 'e' | 'sw' | 's' | 'se';
7
+ /** The resize cursor for a handle on a frame turned `rotation` degrees, so it follows the turn. */
8
+ export declare const resizeCursor: (direction: ResizeDirection, rotation: number) => string;
9
+ export interface MovableControlProps {
10
+ /** Compass names of the handles to draw (`nw`, `n`, … `se`). */
11
+ directions: readonly ResizeDirectionName[];
12
+ /** Degrees clockwise the frame is turned; only the cursors use it, the box turns itself. */
13
+ rotation: number;
14
+ /**
15
+ * Fade the control, as during a gesture. It stays mounted: the handle being dragged holds the
16
+ * pointer capture.
17
+ */
18
+ isDragging?: boolean;
19
+ /** A press on a handle. Return `false` to refuse the gesture. */
20
+ onResizeStart: () => boolean;
21
+ /**
22
+ * The pointer moved. `delta` is how far it is from the press, in screen pixels; `keepAspect` is
23
+ * whether Shift is held.
24
+ */
25
+ onResize: (direction: ResizeDirection, delta: readonly [number, number], keepAspect: boolean) => void;
26
+ /** The pointer was released. */
27
+ onResizeEnd: () => void;
28
+ /** The gesture was lost (`pointercancel`). */
29
+ onResizeCancel: () => void;
30
+ /**
31
+ * Draw the control as context: the frame of a group a selected member is inside, as Excel draws
32
+ * it (a dotted outline and hollow neutral handles). Its handles still resize that group.
33
+ */
34
+ context?: boolean;
35
+ /**
36
+ * A press on the move grip a frame too small for its handles shows in their place. Omit when the
37
+ * frame cannot be moved.
38
+ */
39
+ onMoveStart?: (e: PointerEvent) => void;
40
+ /** Drawn first in the control, so it hides with the handles and paints under them: the rotate handle. */
41
+ children?: React.ReactNode;
42
+ }
43
+ /**
44
+ * What the layer lets a content's own control do: run a gesture of its own through the layer's
45
+ * preview and commit loop, so it is drawn, cancelled and undone as a move or resize is.
46
+ */
47
+ export interface MovableGestureHost {
48
+ /**
49
+ * Starts a gesture on the control's movable: the layer snapshots it and readies one commit.
50
+ * `onCommit` runs on the movable inside that commit, after the previewed placement is written.
51
+ * Returns `false` when the layer refuses gestures.
52
+ */
53
+ start(description: string, onCommit?: (movable: IMovable) => void): boolean;
54
+ /** Draws the movable at a placement (absolute px) until the gesture ends. */
55
+ preview(preview: MovablePreview): void;
56
+ /** Commits what was previewed. */
57
+ finish(): void;
58
+ /** Drops the gesture with nothing written. */
59
+ cancel(): void;
60
+ }
61
+ /**
62
+ * Props of a control a content kind registers in place of the generic one (see
63
+ * `registerMovableRenderer`): the generic control's, and what a control of its own needs.
64
+ */
65
+ export interface ContentControlProps extends MovableControlProps {
66
+ movable: IMovable;
67
+ /** How the frame is mirrored: the gesture's while one is in flight, else the movable's. */
68
+ flip: IMovable.Flip;
69
+ gesture: MovableGestureHost;
70
+ }
71
+ /**
72
+ * A selected movable's outline and resize handles, drawn in its adornment box so they are placed
73
+ * and turned from the same numbers as the frame. Each handle captures the pointer for its gesture.
74
+ *
75
+ * @remarks
76
+ * A frame too small to show its handles apart (see the layer's stylesheet) hides them, still live,
77
+ * and draws a move grip below it, as Excel does.
78
+ */
79
+ export declare const MovableControl: React.FC<MovableControlProps>;
80
+ //# sourceMappingURL=MovableControl.d.ts.map
@@ -1,7 +1,9 @@
1
1
  import { default as React } from 'react';
2
- import { Bounds } from '@sheetxl/utils';
3
2
  import { IMovable } from '@sheetxl/sdk';
3
+ import { RenderSlotFn } from '@sheetxl/utils-react';
4
4
  import { MovableElementProps } from './IMovableArea';
5
+ import { MovableGestureHost } from './MovableControl';
6
+ import { MovablePreview } from './framePlacement';
5
7
  export interface MovableFrameProps extends React.HTMLAttributes<HTMLElement> {
6
8
  /**
7
9
  * The underlying model for the chart.
@@ -13,31 +15,31 @@ export interface MovableFrameProps extends React.HTMLAttributes<HTMLElement> {
13
15
  * @param props - {@link MovableElementProps}
14
16
  * @returns A React Element representing the IMovable.
15
17
  */
16
- renderMovable: (props: MovableElementProps) => React.ReactElement;
18
+ renderMovable: RenderSlotFn<MovableElementProps>;
17
19
  onRefLoad: (ref: HTMLElement) => void;
18
20
  onRefUnload: (ref: HTMLElement) => void;
19
21
  onHide: (hide: (movable: IMovable) => boolean | Promise<boolean> | void) => void;
20
22
  onShow: (show: (movable: IMovable) => void) => void;
21
- /** {@inheritDoc MovableElementProps.onDragZone} */
22
- onDragZone?: (isDragZone: (event: MouseEvent | TouchEvent) => boolean) => void;
23
+ /** {@inheritDoc MovableElementProps.adornmentHost} */
24
+ adornmentHost?: HTMLElement | null;
25
+ /** {@inheritDoc MovableElementProps.gesture} */
26
+ gesture?: MovableGestureHost;
23
27
  /**
24
- * Live drag/resize preview bounds (absolute), or null/undefined when idle. When set, the frame
25
- * renders HERE instead of at the model bounds (the model isn't touched until the gesture commits).
26
- * Surface-scoped in the parent, so it's set in every pane — that's what makes a dragged shape appear,
27
- * correctly clipped, on both sides of a freeze boundary.
28
+ * Live drag/resize/rotate preview, or null/undefined when idle. When set, the frame renders with it
29
+ * instead of the model (the model isn't touched until the gesture commits). Surface-scoped in the
30
+ * parent, so it's set in every pane — that's what makes a dragged shape appear, correctly clipped,
31
+ * on both sides of a freeze boundary.
28
32
  */
29
- overrideBounds?: Bounds | null;
30
- /**
31
- * Called after the frame repositions (scroll, keyboard nudge, drag preview, resize). The parent uses
32
- * it to re-sync the Moveable control box to the frame's new DOM rect — a nudge re-renders only this
33
- * frame, not the parent, so the parent can't detect the move on its own.
34
- */
35
- onReposition?: () => void;
33
+ preview?: MovablePreview | null;
36
34
  /**
37
35
  * Called when the final movable is unselected.
38
36
  */
39
37
  onUnFocus: () => void;
40
- dragStart(e: MouseEvent | TouchEvent, target?: EventTarget | null): void;
38
+ /**
39
+ * A press that may move the frame, after it selected. Not called for a press outside the
40
+ * content's drag zone or in an editable element.
41
+ */
42
+ dragStart(e: PointerEvent): void;
41
43
  disabled?: boolean;
42
44
  /**
43
45
  * Indicates if the frame is being dragged. Useful for styling.
@@ -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
@@ -0,0 +1,210 @@
1
+ import { default as React } from 'react';
2
+ import { IMovable, IWorksheet } from '@sheetxl/sdk';
3
+ import { Command, IReactNotifier } from '@sheetxl/utils-react';
4
+ import { ActivateFrameOptions, ITaskPaneArea } from '../taskPane';
5
+ import { MovableElementProps } from './IMovableArea';
6
+ import { ContentControlProps } from './MovableControl';
7
+ /**
8
+ * What a movable's renderer is given: the element props the movable layer hands every movable,
9
+ * with the movable itself always present.
10
+ */
11
+ export interface MovableRendererProps extends MovableElementProps {
12
+ movable: IMovable;
13
+ }
14
+ /**
15
+ * Draws the content of one kind of movable (`IMovable.IContent.getType()`) inside the frame the
16
+ * movable layer gives it.
17
+ */
18
+ export type MovableRenderer = React.ComponentType<MovableRendererProps>;
19
+ /**
20
+ * What a kind's {@link MovableRendererModule.pane} is given: the selected movable it formats and
21
+ * the sheet that holds it.
22
+ */
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
+ }
40
+ /**
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.
43
+ */
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;
113
+ /**
114
+ * What is drawn while the renderer loads.
115
+ * @defaultValue nothing — the movable's frame is there already.
116
+ */
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';
136
+ }
137
+ /**
138
+ * Registers the renderer for a kind of movable content, replacing the built-in one.
139
+ *
140
+ * @param type The content type (`picture`, `chart`, `shape`, `checkBox`, …), as registered with
141
+ * `MovableContentRegistry` in the SDK.
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).
146
+ * @returns A function that removes the registration.
147
+ *
148
+ * @example
149
+ * ```ts
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
+ * });
155
+ * ```
156
+ */
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;
195
+ /**
196
+ * The renderer for a kind of movable content: the registered one, else the built-in one, else
197
+ * `undefined`.
198
+ */
199
+ export declare function getMovableRenderer(type: string): ((props: MovableRendererProps) => React.ReactElement) | undefined;
200
+ /**
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.
207
+ * @internal
208
+ */
209
+ export declare function registerBuiltInMovableRenderer<M>(type: string, load: MovableRendererLoader<M>, options?: MovableRendererOptions<M>): void;
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
@@ -0,0 +1,37 @@
1
+ import { default as React } from 'react';
2
+ export interface RotateHandleProps {
3
+ /**
4
+ * Fade the handle, as during any gesture. It stays mounted: while it turns the frame it holds
5
+ * the pointer capture.
6
+ */
7
+ isDragging?: 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;
13
+ /**
14
+ * The pointer moved: `degrees` is the angle swept about the frame's center since the press,
15
+ * clockwise; `snap` is whether the rotation should snap (Shift).
16
+ */
17
+ onRotate: (degrees: number, snap: boolean) => void;
18
+ /** The pointer was released. */
19
+ onEnd: () => void;
20
+ /** The gesture was lost (`pointercancel`). */
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;
27
+ }
28
+ /**
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.
31
+ *
32
+ * @remarks
33
+ * The angle is measured about the center of the adornment box, which is the frame's center at any
34
+ * rotation. The pointer is captured for the gesture, so it keeps rotating outside the handle.
35
+ */
36
+ export declare const RotateHandle: React.FC<RotateHandleProps>;
37
+ //# sourceMappingURL=RotateHandle.d.ts.map
@@ -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