@sheetxl/utils-react 0.7.22 → 0.7.23-beta.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 (290) hide show
  1. package/browser/cjs/C7jPCqFJNiWyD2pr.cjs +1 -0
  2. package/browser/cjs/CyWMySHsu-RvsIGs.cjs +1 -0
  3. package/browser/cjs/DZSvmqU8nRas1uz6.cjs +1 -0
  4. package/browser/cjs/index.cjs +5 -7
  5. package/browser/esm/BlY25fmBdmHNyBqo.mjs +139 -0
  6. package/browser/esm/CQUN3sZz7IrPMYIa.mjs +2171 -0
  7. package/browser/esm/DpI3aVOBON4B0xID.mjs +390 -0
  8. package/browser/esm/index.mjs +6128 -1806
  9. package/licenses/dependencies.txt +246 -39
  10. package/node/esm/B8EaqTMia4qMXy5z.mjs +139 -0
  11. package/node/esm/D9Xo9E4JB3ReeH-J.mjs +2171 -0
  12. package/node/esm/index.mjs +5141 -1774
  13. package/package.json +8 -5
  14. package/types/index.d.ts +2 -2043
  15. package/types/src/animation/AnimationModeContext.d.ts +10 -0
  16. package/types/src/animation/AnimationModeContext.d.ts.map +1 -0
  17. package/types/src/animation/index.d.ts +3 -0
  18. package/types/src/animation/index.d.ts.map +1 -0
  19. package/types/src/animation/useAnimatedMeasure.d.ts +39 -0
  20. package/types/src/animation/useAnimatedMeasure.d.ts.map +1 -0
  21. package/types/src/command/ActivationTracker.d.ts +53 -0
  22. package/types/src/command/ActivationTracker.d.ts.map +1 -0
  23. package/types/src/command/CommandAnchorProvider.d.ts +64 -0
  24. package/types/src/command/CommandAnchorProvider.d.ts.map +1 -0
  25. package/types/src/command/CommandButtonEntryLabel.d.ts +25 -0
  26. package/types/src/command/CommandButtonEntryLabel.d.ts.map +1 -0
  27. package/types/src/command/CommandButtonRegistry.d.ts +159 -0
  28. package/types/src/command/CommandButtonRegistry.d.ts.map +1 -0
  29. package/types/src/command/CommandButtonRegistryContext.d.ts +35 -0
  30. package/types/src/command/CommandButtonRegistryContext.d.ts.map +1 -0
  31. package/types/src/command/CommandCatalog.d.ts +155 -0
  32. package/types/src/command/CommandCatalog.d.ts.map +1 -0
  33. package/types/src/command/CommandCatalogResource.d.ts +7 -0
  34. package/types/src/command/CommandCatalogResource.d.ts.map +1 -0
  35. package/types/src/command/CommandCatalogService.d.ts +61 -0
  36. package/types/src/command/CommandCatalogService.d.ts.map +1 -0
  37. package/types/src/command/CommandChainContext.d.ts +32 -0
  38. package/types/src/command/CommandChainContext.d.ts.map +1 -0
  39. package/types/src/command/CommandFallbackContext.d.ts +30 -0
  40. package/types/src/command/CommandFallbackContext.d.ts.map +1 -0
  41. package/types/src/command/CommandFocusContext.d.ts +21 -0
  42. package/types/src/command/CommandFocusContext.d.ts.map +1 -0
  43. package/types/src/command/CommandRegistry.d.ts +164 -0
  44. package/types/src/command/CommandRegistry.d.ts.map +1 -0
  45. package/types/src/command/CommandRegistryContext.d.ts +16 -0
  46. package/types/src/command/CommandRegistryContext.d.ts.map +1 -0
  47. package/types/src/command/CommandResolver.d.ts +162 -0
  48. package/types/src/command/CommandResolver.d.ts.map +1 -0
  49. package/types/src/command/CommandScope.d.ts +343 -0
  50. package/types/src/command/CommandScope.d.ts.map +1 -0
  51. package/types/src/command/CommandScopeContext.d.ts +205 -0
  52. package/types/src/command/CommandScopeContext.d.ts.map +1 -0
  53. package/types/src/command/FocusActivation.d.ts +140 -0
  54. package/types/src/command/FocusActivation.d.ts.map +1 -0
  55. package/types/src/command/ICommand.d.ts +31 -0
  56. package/types/src/command/ICommand.d.ts.map +1 -0
  57. package/types/src/command/ICommandDefinition.d.ts +82 -0
  58. package/types/src/command/ICommandDefinition.d.ts.map +1 -0
  59. package/types/src/command/KeyBindingDispatcher.d.ts +150 -0
  60. package/types/src/command/KeyBindingDispatcher.d.ts.map +1 -0
  61. package/types/src/command/LayerActivation.d.ts +45 -0
  62. package/types/src/command/LayerActivation.d.ts.map +1 -0
  63. package/types/src/command/Types.d.ts +80 -0
  64. package/types/src/command/Types.d.ts.map +1 -0
  65. package/types/src/command/createResolvedCommand.d.ts +91 -0
  66. package/types/src/command/createResolvedCommand.d.ts.map +1 -0
  67. package/types/src/command/index.d.ts +26 -0
  68. package/types/src/command/index.d.ts.map +1 -0
  69. package/types/src/command/reduceDefinitions.d.ts +33 -0
  70. package/types/src/command/reduceDefinitions.d.ts.map +1 -0
  71. package/types/src/command/useCommands.d.ts +22 -0
  72. package/types/src/command/useCommands.d.ts.map +1 -0
  73. package/types/src/command/useContributeCommands.d.ts +18 -0
  74. package/types/src/command/useContributeCommands.d.ts.map +1 -0
  75. package/types/src/components/FocusKeyNavigation.d.ts +22 -0
  76. package/types/src/components/FocusKeyNavigation.d.ts.map +1 -0
  77. package/types/src/components/ITooltip.d.ts +38 -0
  78. package/types/src/components/ITooltip.d.ts.map +1 -0
  79. package/types/src/components/RoundedTab.d.ts +26 -0
  80. package/types/src/components/RoundedTab.d.ts.map +1 -0
  81. package/types/src/components/index.d.ts +4 -0
  82. package/types/src/components/index.d.ts.map +1 -0
  83. package/types/src/error/ErrorPanel.d.ts +14 -0
  84. package/types/src/error/ErrorPanel.d.ts.map +1 -0
  85. package/types/src/error/ReactErrorBoundary.d.ts +7 -0
  86. package/types/src/error/ReactErrorBoundary.d.ts.map +1 -0
  87. package/types/src/error/UncaughtErrorBoundary.d.ts +5 -0
  88. package/types/src/error/UncaughtErrorBoundary.d.ts.map +1 -0
  89. package/types/src/error/index.d.ts +4 -0
  90. package/types/src/error/index.d.ts.map +1 -0
  91. package/types/src/float/FloatPanel.d.ts +57 -0
  92. package/types/src/float/FloatPanel.d.ts.map +1 -0
  93. package/types/src/float/FloatPopper.d.ts +85 -0
  94. package/types/src/float/FloatPopper.d.ts.map +1 -0
  95. package/types/src/float/FloatPopup.d.ts +19 -0
  96. package/types/src/float/FloatPopup.d.ts.map +1 -0
  97. package/types/src/float/FloatProvider.d.ts +60 -0
  98. package/types/src/float/FloatProvider.d.ts.map +1 -0
  99. package/types/src/float/FloatStackContext.d.ts +25 -0
  100. package/types/src/float/FloatStackContext.d.ts.map +1 -0
  101. package/types/src/float/FloatTooltip.d.ts +22 -0
  102. package/types/src/float/FloatTooltip.d.ts.map +1 -0
  103. package/types/src/float/FloatUtils.d.ts +55 -0
  104. package/types/src/float/FloatUtils.d.ts.map +1 -0
  105. package/types/src/float/_FloatUtils.d.ts +51 -0
  106. package/types/src/float/_FloatUtils.d.ts.map +1 -0
  107. package/types/src/float/index.d.ts +9 -0
  108. package/types/src/float/index.d.ts.map +1 -0
  109. package/types/src/float/useFloatStack.d.ts +92 -0
  110. package/types/src/float/useFloatStack.d.ts.map +1 -0
  111. package/types/src/hooks/LanguageState.d.ts +15 -0
  112. package/types/src/hooks/LanguageState.d.ts.map +1 -0
  113. package/types/src/hooks/index.d.ts +19 -0
  114. package/types/src/hooks/index.d.ts.map +1 -0
  115. package/types/src/hooks/useBoundSyncExternalStore.d.ts +23 -0
  116. package/types/src/hooks/useBoundSyncExternalStore.d.ts.map +1 -0
  117. package/types/src/hooks/useCallbackRef.d.ts +11 -0
  118. package/types/src/hooks/useCallbackRef.d.ts.map +1 -0
  119. package/types/src/hooks/useDevicePixelRatio.d.ts +37 -0
  120. package/types/src/hooks/useDevicePixelRatio.d.ts.map +1 -0
  121. package/types/src/hooks/useEditMode.d.ts +66 -0
  122. package/types/src/hooks/useEditMode.d.ts.map +1 -0
  123. package/types/src/hooks/useGlobalClipboard.d.ts +7 -0
  124. package/types/src/hooks/useGlobalClipboard.d.ts.map +1 -0
  125. package/types/src/hooks/useId.d.ts +9 -0
  126. package/types/src/hooks/useId.d.ts.map +1 -0
  127. package/types/src/hooks/useImperativeElement.d.ts +3 -0
  128. package/types/src/hooks/useImperativeElement.d.ts.map +1 -0
  129. package/types/src/hooks/useLanguage.d.ts +13 -0
  130. package/types/src/hooks/useLanguage.d.ts.map +1 -0
  131. package/types/src/hooks/useMouseDownAndHoldListener.d.ts +13 -0
  132. package/types/src/hooks/useMouseDownAndHoldListener.d.ts.map +1 -0
  133. package/types/src/hooks/useNotifier.d.ts +330 -0
  134. package/types/src/hooks/useNotifier.d.ts.map +1 -0
  135. package/types/src/hooks/useOnClickOrFocusAway.d.ts +8 -0
  136. package/types/src/hooks/useOnClickOrFocusAway.d.ts.map +1 -0
  137. package/types/src/hooks/useOptionalBoundSyncExternalStore.d.ts +20 -0
  138. package/types/src/hooks/useOptionalBoundSyncExternalStore.d.ts.map +1 -0
  139. package/types/src/hooks/useOptionalSyncExternalStore.d.ts +18 -0
  140. package/types/src/hooks/useOptionalSyncExternalStore.d.ts.map +1 -0
  141. package/types/src/hooks/useSynchronizedPointerHandler.d.ts +54 -0
  142. package/types/src/hooks/useSynchronizedPointerHandler.d.ts.map +1 -0
  143. package/types/src/hooks/useTextareaCaretRect.d.ts +85 -0
  144. package/types/src/hooks/useTextareaCaretRect.d.ts.map +1 -0
  145. package/types/src/hooks/useTraceUpdate.d.ts +2 -0
  146. package/types/src/hooks/useTraceUpdate.d.ts.map +1 -0
  147. package/types/src/hooks/useTranslator.d.ts +32 -0
  148. package/types/src/hooks/useTranslator.d.ts.map +1 -0
  149. package/types/src/icons/DynamicIcon.d.ts +17 -0
  150. package/types/src/icons/DynamicIcon.d.ts.map +1 -0
  151. package/types/src/icons/DynamicIconService.d.ts +39 -0
  152. package/types/src/icons/DynamicIconService.d.ts.map +1 -0
  153. package/types/src/icons/ErrorIcon.d.ts +6 -0
  154. package/types/src/icons/ErrorIcon.d.ts.map +1 -0
  155. package/types/src/icons/Types.d.ts +81 -0
  156. package/types/src/icons/Types.d.ts.map +1 -0
  157. package/types/src/icons/WalkingIcon.d.ts +27 -0
  158. package/types/src/icons/WalkingIcon.d.ts.map +1 -0
  159. package/types/src/icons/_Utils.d.ts +3 -0
  160. package/types/src/icons/_Utils.d.ts.map +1 -0
  161. package/types/src/icons/index.d.ts +5 -0
  162. package/types/src/icons/index.d.ts.map +1 -0
  163. package/types/src/icons/packs/Base.d.ts +4 -0
  164. package/types/src/icons/packs/Base.d.ts.map +1 -0
  165. package/types/src/icons/packs/Conditional.d.ts +4 -0
  166. package/types/src/icons/packs/Conditional.d.ts.map +1 -0
  167. package/types/src/index.d.ts +18 -0
  168. package/types/src/index.d.ts.map +1 -0
  169. package/types/src/loading/LoadingPanel.d.ts +31 -0
  170. package/types/src/loading/LoadingPanel.d.ts.map +1 -0
  171. package/types/src/loading/index.d.ts +2 -0
  172. package/types/src/loading/index.d.ts.map +1 -0
  173. package/types/src/persistence/InMemoryStore.d.ts +12 -0
  174. package/types/src/persistence/InMemoryStore.d.ts.map +1 -0
  175. package/types/src/persistence/LocalStorageStore.d.ts +15 -0
  176. package/types/src/persistence/LocalStorageStore.d.ts.map +1 -0
  177. package/types/src/persistence/PersistenceStateProvider.d.ts +3 -0
  178. package/types/src/persistence/PersistenceStateProvider.d.ts.map +1 -0
  179. package/types/src/persistence/Types.d.ts +95 -0
  180. package/types/src/persistence/Types.d.ts.map +1 -0
  181. package/types/src/persistence/_Context.d.ts +9 -0
  182. package/types/src/persistence/_Context.d.ts.map +1 -0
  183. package/types/src/persistence/index.d.ts +6 -0
  184. package/types/src/persistence/index.d.ts.map +1 -0
  185. package/types/src/persistence/usePersistenceState.d.ts +33 -0
  186. package/types/src/persistence/usePersistenceState.d.ts.map +1 -0
  187. package/types/src/react-resizable/Resizable.d.ts +30 -0
  188. package/types/src/react-resizable/Resizable.d.ts.map +1 -0
  189. package/types/src/react-resizable/ResizableBox.d.ts +18 -0
  190. package/types/src/react-resizable/ResizableBox.d.ts.map +1 -0
  191. package/types/src/react-resizable/index.d.ts +11 -0
  192. package/types/src/react-resizable/index.d.ts.map +1 -0
  193. package/types/src/react-resizable/propTypes.d.ts +56 -0
  194. package/types/src/react-resizable/propTypes.d.ts.map +1 -0
  195. package/types/src/react-resizable/utils.d.ts +3 -0
  196. package/types/src/react-resizable/utils.d.ts.map +1 -0
  197. package/types/src/scroll/AxisViewport.d.ts +73 -0
  198. package/types/src/scroll/AxisViewport.d.ts.map +1 -0
  199. package/types/src/scroll/IScrollPane.d.ts +63 -0
  200. package/types/src/scroll/IScrollPane.d.ts.map +1 -0
  201. package/types/src/scroll/IScrollbar.d.ts +94 -0
  202. package/types/src/scroll/IScrollbar.d.ts.map +1 -0
  203. package/types/src/scroll/NativeScrollbar.d.ts +7 -0
  204. package/types/src/scroll/NativeScrollbar.d.ts.map +1 -0
  205. package/types/src/scroll/ScrollButton.d.ts +29 -0
  206. package/types/src/scroll/ScrollButton.d.ts.map +1 -0
  207. package/types/src/scroll/ScrollPane.d.ts +4 -0
  208. package/types/src/scroll/ScrollPane.d.ts.map +1 -0
  209. package/types/src/scroll/Scrollbar.d.ts +4 -0
  210. package/types/src/scroll/Scrollbar.d.ts.map +1 -0
  211. package/types/src/scroll/TouchThumbContext.d.ts +93 -0
  212. package/types/src/scroll/TouchThumbContext.d.ts.map +1 -0
  213. package/types/src/scroll/TouchThumbHandle.d.ts +64 -0
  214. package/types/src/scroll/TouchThumbHandle.d.ts.map +1 -0
  215. package/types/src/scroll/TrackDrag.d.ts +107 -0
  216. package/types/src/scroll/TrackDrag.d.ts.map +1 -0
  217. package/types/src/scroll/Utils.d.ts +8 -0
  218. package/types/src/scroll/Utils.d.ts.map +1 -0
  219. package/types/src/scroll/Viewport.d.ts +285 -0
  220. package/types/src/scroll/Viewport.d.ts.map +1 -0
  221. package/types/src/scroll/VirtualScrollbar.d.ts +49 -0
  222. package/types/src/scroll/VirtualScrollbar.d.ts.map +1 -0
  223. package/types/src/scroll/index.d.ts +14 -0
  224. package/types/src/scroll/index.d.ts.map +1 -0
  225. package/types/src/scroll/scrollbarTheming.d.ts +27 -0
  226. package/types/src/scroll/scrollbarTheming.d.ts.map +1 -0
  227. package/types/src/scroll/useWheelScroll.d.ts +27 -0
  228. package/types/src/scroll/useWheelScroll.d.ts.map +1 -0
  229. package/types/src/scroller/Scroller.d.ts +260 -0
  230. package/types/src/scroller/Scroller.d.ts.map +1 -0
  231. package/types/src/scroller/animate.d.ts +30 -0
  232. package/types/src/scroller/animate.d.ts.map +1 -0
  233. package/types/src/scroller/index.d.ts +2 -0
  234. package/types/src/scroller/index.d.ts.map +1 -0
  235. package/types/src/singletonHook/components/SingleItemContainer.d.ts +6 -0
  236. package/types/src/singletonHook/components/SingleItemContainer.d.ts.map +1 -0
  237. package/types/src/singletonHook/components/SingletonHooksContainer.d.ts +7 -0
  238. package/types/src/singletonHook/components/SingletonHooksContainer.d.ts.map +1 -0
  239. package/types/src/singletonHook/index.d.ts +11 -0
  240. package/types/src/singletonHook/index.d.ts.map +1 -0
  241. package/types/src/singletonHook/singletonHook.d.ts +6 -0
  242. package/types/src/singletonHook/singletonHook.d.ts.map +1 -0
  243. package/types/src/singletonHook/utils/env.d.ts +4 -0
  244. package/types/src/singletonHook/utils/env.d.ts.map +1 -0
  245. package/types/src/singletonHook/utils/env.native.d.ts +1 -0
  246. package/types/src/singletonHook/utils/env.native.d.ts.map +1 -0
  247. package/types/src/singletonHook/utils/warning.d.ts +2 -0
  248. package/types/src/singletonHook/utils/warning.d.ts.map +1 -0
  249. package/types/src/splitPane/SplitPane.d.ts +91 -0
  250. package/types/src/splitPane/SplitPane.d.ts.map +1 -0
  251. package/types/src/splitPane/SplitPaneResizer.d.ts +11 -0
  252. package/types/src/splitPane/SplitPaneResizer.d.ts.map +1 -0
  253. package/types/src/splitPane/index.d.ts +3 -0
  254. package/types/src/splitPane/index.d.ts.map +1 -0
  255. package/types/src/theme/TokenTheme.d.ts +196 -0
  256. package/types/src/theme/TokenTheme.d.ts.map +1 -0
  257. package/types/src/theme/TokenThemeProvider.d.ts +97 -0
  258. package/types/src/theme/TokenThemeProvider.d.ts.map +1 -0
  259. package/types/src/theme/buildThemeCSS.d.ts +54 -0
  260. package/types/src/theme/buildThemeCSS.d.ts.map +1 -0
  261. package/types/src/theme/createThemeVars.d.ts +15 -0
  262. package/types/src/theme/createThemeVars.d.ts.map +1 -0
  263. package/types/src/theme/defaultTheme.d.ts +15 -0
  264. package/types/src/theme/defaultTheme.d.ts.map +1 -0
  265. package/types/src/theme/index.d.ts +9 -0
  266. package/types/src/theme/index.d.ts.map +1 -0
  267. package/types/src/theme/resolveTokens.d.ts +21 -0
  268. package/types/src/theme/resolveTokens.d.ts.map +1 -0
  269. package/types/src/theme/themeAttrs.d.ts +32 -0
  270. package/types/src/theme/themeAttrs.d.ts.map +1 -0
  271. package/types/src/theme/useResolvedThemeMode.d.ts +17 -0
  272. package/types/src/theme/useResolvedThemeMode.d.ts.map +1 -0
  273. package/types/src/types/Types.d.ts +71 -0
  274. package/types/src/types/Types.d.ts.map +1 -0
  275. package/types/src/types/index.d.ts +2 -0
  276. package/types/src/types/index.d.ts.map +1 -0
  277. package/types/src/utils/FullScreenPortal.d.ts +6 -0
  278. package/types/src/utils/FullScreenPortal.d.ts.map +1 -0
  279. package/types/src/utils/PinchZoom.d.ts +3 -0
  280. package/types/src/utils/PinchZoom.d.ts.map +1 -0
  281. package/types/src/utils/ReactUtils.d.ts +134 -0
  282. package/types/src/utils/ReactUtils.d.ts.map +1 -0
  283. package/types/src/utils/index.d.ts +4 -0
  284. package/types/src/utils/index.d.ts.map +1 -0
  285. package/types/src/utils/useFullScreen.d.ts +47 -0
  286. package/types/src/utils/useFullScreen.d.ts.map +1 -0
  287. package/browser/cjs/O75UN37bxYdOt58p.cjs +0 -6
  288. package/browser/esm/r7vPXPCC6zFI-B4m.mjs +0 -12
  289. package/node/assets/style.css +0 -1
  290. package/node/esm/CJ8rg6a2gULy0991.mjs +0 -12
@@ -0,0 +1,25 @@
1
+ import { FloatReference } from './useFloatStack';
2
+ /**
3
+ * Provides the current {@link FloatReference} to descendants.
4
+ *
5
+ * {@link useFloatStack} wraps its own popup content with this automatically, so
6
+ * nested popup buttons inherit their parent float. Ambient (non-popup) floats
7
+ * that render their children inline (e.g. a toolbar) should wrap those children
8
+ * with this provider explicitly.
9
+ */
10
+ export declare const FloatStackProvider: import('react').Provider<FloatReference | null>;
11
+ /**
12
+ * Returns the {@link FloatReference} of the enclosing region (i.e. the float
13
+ * this component is rendered inside), or `null` when there is no ancestor float.
14
+ *
15
+ * @remarks
16
+ * This is the float you would nest under, so from a child's perspective it is
17
+ * the "parent". A component that owns a float (via {@link useFloatStack}) gets
18
+ * its own reference from that hook; `useFloat` returns the one *above* it.
19
+ *
20
+ * Use this in any component that needs the enclosing float without owning one —
21
+ * e.g. a menu item calling `closeChild()` on hover to dismiss an open sibling
22
+ * submenu. Such components are not reached by props, only by context.
23
+ */
24
+ export declare const useFloat: () => FloatReference | null;
25
+ //# sourceMappingURL=FloatStackContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatStackContext.d.ts","sourceRoot":"","sources":["../../../../src/float/FloatStackContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAgBtD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,iDAA6B,CAAC;AAE7D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,QAAO,cAAc,GAAG,IAE5C,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { default as React } from 'react';
2
+ import { Placement } from '@floating-ui/react-dom';
3
+ import { FloatPopperPosition, FloatPopperAnchor } from './FloatPopper';
4
+ /**
5
+ * A lightweight, controlled tooltip built on {@link FloatPopper}.
6
+ *
7
+ * Unlike a hover tooltip, this is fully controlled (`open` + `anchor`) which suits
8
+ * programmatic tooltips (e.g. scroll/resize hints).
9
+ */
10
+ export interface FloatTooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
11
+ open: boolean;
12
+ title?: React.ReactNode;
13
+ /**
14
+ * @defaultValue 'top'
15
+ */
16
+ placement?: Placement;
17
+ anchorEl?: FloatPopperAnchor;
18
+ anchorPosition?: FloatPopperPosition;
19
+ offsets?: number[];
20
+ }
21
+ export declare const FloatTooltip: React.NamedExoticComponent<FloatTooltipProps & React.RefAttributes<HTMLDivElement>>;
22
+ //# sourceMappingURL=FloatTooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatTooltip.d.ts","sourceRoot":"","sources":["../../../../src/float/FloatTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAIhD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EACQ,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAC9D,MAAM,eAAe,CAAC;AAIvB;;;;;GAKG;AACH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC5F,IAAI,EAAE,OAAO,CAAC;IAEd,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAE7B,cAAc,CAAC,EAAE,mBAAmB,CAAC;IAErC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,qFAiCtB,CAAC"}
@@ -0,0 +1,55 @@
1
+ import { FloatPanelProps } from './FloatPanel';
2
+ import { FloatPopupPanelProps } from './FloatPopup';
3
+ import { RenderFloatPanel } from './useFloatStack';
4
+ import { ThemeAttrs, ThemeMode } from '../theme';
5
+ /**
6
+ * The theme a float opens with (THEMING-DESIGN §7). A float portals to a shared, theme-free container
7
+ * (`getPortalContainer()`), so it must carry its **origin instance's** theme onto its own wrapper. That
8
+ * theme rides the float-surface context: the nearest {@link FloatSurface}-providing ancestor
9
+ * ({@link FloatProvider}) decides it — the app sets one at its root; the grid deliberately sets none, so a
10
+ * grid-originated menu inherits the app's (a menu from a light grid in a dark app opens dark, following the
11
+ * app). To theme (or re-surface) floats for a subtree, drop a {@link FloatProvider} with a new theme.
12
+ */
13
+ export interface FloatThemeScope {
14
+ /**
15
+ * Scope class name(s) placed on the float wrapper so the instance's per-instance `@scope (.<class>){…}`
16
+ * rules treat the wrapper as a scope root and apply to it. Accumulated through nested providers so a float
17
+ * can resolve every ancestor instance's scoped tokens (layer order settles conflicts).
18
+ */
19
+ classes?: string[];
20
+ /** The `data-sxl-theme-surface` a float opens with. App-driven; defaults to `app`. */
21
+ surface?: string;
22
+ /** The `data-sxl-theme-mode` a float opens with — the app's resolved mode (so floats follow the app). */
23
+ mode?: ThemeMode;
24
+ }
25
+ /**
26
+ * Ambient floating-surface configuration: how the panel is rendered and any
27
+ * extra panel props to merge. Resolved most-specific-wins via {@link FloatProvider}.
28
+ */
29
+ export interface FloatSurface {
30
+ renderFloatPanel?: RenderFloatPanel;
31
+ /** Default panel-content factory, used when a float doesn't supply its own. */
32
+ createPopupPanel?: (props: FloatPopupPanelProps) => any;
33
+ propsFloatPanel?: Partial<FloatPanelProps>;
34
+ /**
35
+ * The theme floats in this subtree open with (scope class(es) + surface + mode). Carried onto the float
36
+ * wrapper by {@link FloatPopper} so a portaled float resolves the origin instance's scoped tokens. See
37
+ * {@link FloatThemeScope}.
38
+ */
39
+ themeScope?: FloatThemeScope;
40
+ }
41
+ /** The ambient {@link FloatSurface}, or `null` if none is provided. */
42
+ export declare const useFloatSurface: () => FloatSurface | null;
43
+ /**
44
+ * Turn a {@link FloatThemeScope} into the props to carry it across a portal boundary: the scope class(es)
45
+ * and the `data-sxl-theme-*` attrs to spread onto the portaled wrapper so it resolves the origin instance's
46
+ * scoped tokens (THEMING-DESIGN §7). Shared by every element that portals out of its themed subtree —
47
+ * {@link FloatPopper} (popups/menus) and the modal dialog wrapper alike, since a dialog portals to the same
48
+ * theme-free container and must carry its theme the same way. Returns an empty result (no className, no
49
+ * attrs) when the scope carries nothing, so the caller can apply its own fallback.
50
+ */
51
+ export declare const floatThemeScopeProps: (themeScope?: FloatThemeScope) => {
52
+ className?: string;
53
+ attrs: ThemeAttrs;
54
+ };
55
+ //# sourceMappingURL=FloatUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatUtils.d.ts","sourceRoot":"","sources":["../../../../src/float/FloatUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EACgC,KAAK,UAAU,EAAE,KAAK,SAAS,EACrE,MAAM,UAAU,CAAC;AAIlB;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yGAAyG;IACzG,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,GAAG,CAAC;IACxD,eAAe,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC3C;;;;OAIG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,uEAAuE;AACvE,eAAO,MAAM,eAAe,QAAO,YAAY,GAAG,IAEjD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,GAC/B,aAAa,eAAe,KAC3B;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAOzC,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { FloatReference, FloatReferenceKey } from './useFloatStack';
2
+ import { FloatSurface } from './FloatUtils';
3
+ export declare const DEFAULT_OPEN_DELAY = 120;
4
+ export declare const DEFAULT_CLOSE_DELAY = 60;
5
+ export declare const DEFAULT_CLOSE_OTHER_DELAY = 360;
6
+ /**
7
+ * Backing context for {@link useFloatSurface} / {@link FloatProvider}. Internal: consumers read the
8
+ * ambient surface via the hook and set it via the provider, never the context directly.
9
+ */
10
+ export declare const SurfaceContext: import('react').Context<FloatSurface | null>;
11
+ interface DebouncedFloat {
12
+ fn: any;
13
+ setReferences: Set<FloatReference>;
14
+ isClose: boolean;
15
+ }
16
+ /**
17
+ * The root float.
18
+ *
19
+ * In addition to being a {@link FloatReference}, the root owns the shared
20
+ * runtime state for its tree: the open-child map, the float registry, and the
21
+ * single in-flight debounce. Every float reaches it via
22
+ * {@link FloatReference.getRoot}.
23
+ *
24
+ * Previously this was a set of module-level singletons; making the root the
25
+ * state holder (seeded by {@link FloatProvider}, or a shared default) removes
26
+ * the multi-instance / SSR hazard and the app-wide single debounce.
27
+ */
28
+ export interface FloatRoot extends FloatReference {
29
+ /** parent key -> currently open child key */
30
+ readonly floatByParents: Map<FloatReferenceKey, FloatReferenceKey>;
31
+ /** float key -> live reference (registered/open floats) */
32
+ readonly statesByMovables: Map<FloatReferenceKey, FloatReference>;
33
+ /** the single in-flight open/close debounce, if any */
34
+ lastDebounced: DebouncedFloat | null;
35
+ /**
36
+ * Debounces an open/close. Only one float transition is in flight at a time;
37
+ * scheduling a new one cancels the previous.
38
+ */
39
+ debounce(delay: number | null, fn: () => any, setReferences: Set<FloatReference>, isClose: boolean): () => any;
40
+ /** The currently open child of `reference`, if any. */
41
+ getChildRef(reference: FloatReference): FloatReference | null;
42
+ /** `reference` plus its full open-child chain. */
43
+ descendants(reference: FloatReference | null): Set<FloatReference>;
44
+ }
45
+ /**
46
+ * Creates an isolated root float (a {@link FloatReference} that also holds the
47
+ * shared state for its tree).
48
+ */
49
+ export declare const createFloatRoot: () => FloatRoot;
50
+ export {};
51
+ //# sourceMappingURL=_FloatUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_FloatUtils.d.ts","sourceRoot":"","sources":["../../../../src/float/_FloatUtils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,eAAO,MAAM,kBAAkB,MAAM,CAAC;AACtC,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,cAAc,8CAA2C,CAAC;AAEvE,UAAU,cAAc;IACtB,EAAE,EAAE,GAAG,CAAC;IACR,aAAa,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,SAAU,SAAQ,cAAc;IAC/C,6CAA6C;IAC7C,QAAQ,CAAC,cAAc,EAAE,GAAG,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;IACnE,2DAA2D;IAC3D,QAAQ,CAAC,gBAAgB,EAAE,GAAG,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC;IAClE,uDAAuD;IACvD,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;IAErC;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG,EAAE,aAAa,EAAE,GAAG,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,CAAC;IAC/G,uDAAuD;IACvD,WAAW,CAAC,SAAS,EAAE,cAAc,GAAG,cAAc,GAAG,IAAI,CAAC;IAC9D,kDAAkD;IAClD,WAAW,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,GAAG,GAAG,CAAC,cAAc,CAAC,CAAC;CACpE;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAO,SAoElC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export * from './FloatUtils';
2
+ export * from './FloatPopper';
3
+ export * from './FloatPopup';
4
+ export * from './FloatPanel';
5
+ export * from './FloatTooltip';
6
+ export * from './useFloatStack';
7
+ export * from './FloatStackContext';
8
+ export * from './FloatProvider';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/float/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,iBAAiB,CAAC;AAEhC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,92 @@
1
+ import { default as React } from 'react';
2
+ import { FloatPopupPanelProps } from './FloatPopup';
3
+ import { FloatPanelProps } from './FloatPanel';
4
+ import { FloatPopperProps } from './FloatPopper';
5
+ /**
6
+ * Renders the floating panel for an open float.
7
+ */
8
+ export type RenderFloatPanel = (props: FloatPanelProps) => React.ReactElement;
9
+ export interface FloatStackOptions {
10
+ /**
11
+ * Whether the panel grabs focus when it opens. @defaultValue `true` (menus / dialogs / anything the
12
+ * user tabs through). Pass `false` for a **passive** popup — a tooltip or function/argument hint that
13
+ * must not steal focus from the field being typed in.
14
+ */
15
+ autoFocus?: boolean;
16
+ /**
17
+ * Suppress the light-dismiss (close on outside mousedown / touch / focus). @defaultValue `false`.
18
+ * - `true` — never light-dismiss; the caller drives visibility entirely (via `open`/`close`).
19
+ * - a **predicate** `(target) => boolean` — light-dismiss normally, EXCEPT when it returns `true` for the
20
+ * event target, which is then treated as "on the float" (no close). Use this to extend "not away" beyond
21
+ * the float + anchor — e.g. a caret-following formula hint keeps the click-away, but exempts clicks back
22
+ * into the editor it annotates (which the portaled float doesn't contain), so those don't close it.
23
+ */
24
+ disableClickAway?: boolean | ((target: EventTarget | null) => boolean);
25
+ anchor?: React.ReactElement | any;
26
+ label?: string;
27
+ /**
28
+ * If nesting float stacks are being used pass this from parent
29
+ */
30
+ parentFloat?: FloatReference;
31
+ onOpen?: () => void;
32
+ onClose?: () => void;
33
+ /**
34
+ * If this returns `null` then will create a registered movable stacking.
35
+ * This is done for toolbars and other permanent visible components that are integrated into the movable stack.
36
+ */
37
+ createPopupPanel?: (props: FloatPopupPanelProps) => any;
38
+ /**
39
+ * Passed to the underlying popup panel. `children` is excluded — content comes
40
+ * from `createPopupPanel`, and this keeps the option compatible with richer
41
+ * surface popper types (e.g. MUI's render-prop `children`).
42
+ */
43
+ propsPopper?: Partial<Omit<FloatPopperProps, 'children' | 'ref'>>;
44
+ /**
45
+ * Render the floating panel surface. Defaults to {@link FloatPanel}.
46
+ * Provide this to inject a custom surface (e.g. a themed card).
47
+ */
48
+ renderFloatPanel?: RenderFloatPanel;
49
+ }
50
+ export interface FloatReferenceKey {
51
+ label: string | null;
52
+ }
53
+ export interface FloatReference {
54
+ key: FloatReferenceKey;
55
+ isRoot: boolean;
56
+ parent: FloatReference | null;
57
+ open(delay?: number): void;
58
+ close: (delay?: number) => Promise<void> | null;
59
+ closeChild: (delay?: number) => Promise<void> | null;
60
+ onChildVisible: () => void;
61
+ onChildHidden: () => void;
62
+ closeAll: () => Promise<void> | null;
63
+ /** The root of this float's tree. */
64
+ getRoot: () => FloatReference;
65
+ floatElement: () => HTMLElement | null;
66
+ anchorElement: () => HTMLElement | any;
67
+ }
68
+ export interface FloatStack {
69
+ /**
70
+ * Float component to be injected
71
+ */
72
+ component: React.ReactNode;
73
+ reference: FloatReference;
74
+ /**
75
+ * Whether the float is currently open (reactive — re-renders the caller as it flips). Lets a caller that
76
+ * drives the float imperatively reconcile against its actual state — e.g. re-`open()` on a click only when
77
+ * it isn't already open, after a light-dismiss (click-away / Esc) closed it.
78
+ */
79
+ isOpen: boolean;
80
+ }
81
+ /**
82
+ * useFloatStack
83
+ *
84
+ * Keeps a list of stacked movable components. This acts like within but outside of the containment
85
+ * hierarchy.
86
+ *
87
+ * TODO - abstract out clickAway perhaps with a useFloatStack context
88
+ * TODO - abstract out FloatPanel factory into the same provider
89
+ *
90
+ */
91
+ export declare const useFloatStack: (props?: FloatStackOptions) => FloatStack;
92
+ //# sourceMappingURL=useFloatStack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFloatStack.d.ts","sourceRoot":"","sources":["../../../../src/float/useFloatStack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAgC,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACvF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAOtD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,YAAY,CAAC;AAE9E,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,KAAK,OAAO,CAAC,CAAC;IAGvE,MAAM,CAAC,EAAG,KAAK,CAAC,YAAY,GAAG,GAAG,CAAA;IAGlC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC;IAE7B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,GAAG,CAAC;IAExD;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC;IAElE;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC;AAGD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAGD,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,iBAAiB,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAEhB,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAChD,UAAU,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAErD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAErC,qCAAqC;IACrC,OAAO,EAAE,MAAM,cAAc,CAAC;IAE9B,YAAY,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;IACvC,aAAa,EAAE,MAAM,WAAW,GAAG,GAAG,CAAmB;CAC1D;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,SAAS,EAAE,cAAc,CAAC;IAE1B;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,iBAAiB,KAAG,UAgWzD,CAAA"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Persistence key for the user's UI-language preference.
3
+ *
4
+ * @remarks
5
+ * Owned via `usePersistenceState` against the surrounding `PersistenceStateProvider` (Studio, or a
6
+ * standalone host) — the mirror of `ThemeStateKey` in `@sheetxl/react`. A host that wants to read
7
+ * or seed it (e.g. the VS Code extension, whose store bridges to the extension host's state) does
8
+ * so with the same key, or by supplying its own provider/store. The value is a BCP 47 tag; absent
9
+ * means "no preference" and the pack service default stands.
10
+ */
11
+ export declare const LanguageStateKey: {
12
+ /** The user's UI-language override (`null` = no preference). */
13
+ readonly Active: "language";
14
+ };
15
+ //# sourceMappingURL=LanguageState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LanguageState.d.ts","sourceRoot":"","sources":["../../../../src/hooks/LanguageState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB;IAC3B,gEAAgE;;CAExD,CAAC"}
@@ -0,0 +1,19 @@
1
+ export * from './useNotifier';
2
+ export * from './useCallbackRef';
3
+ export * from './useOptionalSyncExternalStore';
4
+ export * from './useBoundSyncExternalStore';
5
+ export * from './useOptionalBoundSyncExternalStore';
6
+ export * from './useDevicePixelRatio';
7
+ export * from './useOnClickOrFocusAway';
8
+ export * from './useMouseDownAndHoldListener';
9
+ export * from './useSynchronizedPointerHandler';
10
+ export * from './useEditMode';
11
+ export * from './LanguageState';
12
+ export * from './useLanguage';
13
+ export * from './useTranslator';
14
+ export * from './useTextareaCaretRect';
15
+ export * from './useGlobalClipboard';
16
+ export * from './useTraceUpdate';
17
+ export * from './useId';
18
+ export * from './useImperativeElement';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAE9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAEhD,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Like {@link useSyncExternalStore}, but for a store exposed as an **object with methods** rather than
3
+ * standalone functions. It calls `store.subscribe(...)` and the snapshot selector **on the instance**,
4
+ * so a normal `this`-centric class — whose methods are NOT pre-bound — works without the caller
5
+ * detaching its methods (which would strip `this`). The model stays a plain class; the one adaptation
6
+ * into `useSyncExternalStore`'s function-value contract lives here.
7
+ *
8
+ * @remarks
9
+ * Pass the store instance and a selector that reads the snapshot off it (`s => s.getSelection()`).
10
+ * `subscribe` is memoized on the store identity so it stays a stable reference across renders (a
11
+ * changed `subscribe` would resubscribe); the snapshot selector may be an inline arrow. The selector
12
+ * doubles as the SSR snapshot.
13
+ *
14
+ * Contrast {@link useOptionalSyncExternalStore}, which takes pre-bound standalone functions and
15
+ * tolerates an absent (`null`) store.
16
+ *
17
+ * @typeParam S - The store type; must expose a `subscribe(listener)` method.
18
+ * @typeParam T - The snapshot value type.
19
+ */
20
+ export declare function useBoundSyncExternalStore<S extends {
21
+ subscribe(onStoreChange: () => void): () => void;
22
+ }, T>(store: S, getSnapshot: (store: S) => T): T;
23
+ //# sourceMappingURL=useBoundSyncExternalStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBoundSyncExternalStore.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useBoundSyncExternalStore.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS;IAAE,SAAS,CAAC,aAAa,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;CAAE,EAAE,CAAC,EACzG,KAAK,EAAE,CAAC,EACR,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAC3B,CAAC,CAOH"}
@@ -0,0 +1,11 @@
1
+ import { DependencyList } from 'react';
2
+ /**
3
+ * This is a callback hook that is similar to useCallback except in
4
+ * one important way. When it's dependencies change it does
5
+ * NOT update the callback handler itself. Useful
6
+ * in the instance where you want to pass a callback and
7
+ * want to avoid have stale values do to closure but don't
8
+ * want a re-render to occur.
9
+ */
10
+ export declare const useCallbackRef: <T extends (...args: any[]) => any>(callback: T | null | undefined, deps: DependencyList) => T;
11
+ //# sourceMappingURL=useCallbackRef.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCallbackRef.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCallbackRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAEjE;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,CAAC,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,cAAc,KAAG,CAexH,CAAA"}
@@ -0,0 +1,37 @@
1
+ export interface DevicePixelRatioOptions {
2
+ /**
3
+ * Default DPR to use if browser does not support the `devicePixelRatio`
4
+ * property, or when rendering on server
5
+ *
6
+ * @defaultValue `1`
7
+ */
8
+ defaultDpr?: number;
9
+ /**
10
+ * Whether or not to round the number down to the closest integer
11
+ *
12
+ * @defaultValue `true`
13
+ */
14
+ round?: boolean;
15
+ /**
16
+ * Maximum DPR to return (set to `2` to only generate 1 and 2)
17
+ *
18
+ * @defaultValue `3`
19
+ */
20
+ maxDpr?: number;
21
+ }
22
+ /**
23
+ * Get the device pixel ratio, potentially rounded and capped.
24
+ * Will emit new values if it changes.
25
+ *
26
+ * @param options
27
+ * @returns The current device pixel ratio, or the default if none can be resolved
28
+ */
29
+ export declare function useDevicePixelRatio(options?: DevicePixelRatioOptions): number;
30
+ /**
31
+ * Returns the current device pixel ratio (DPR) given the passed options
32
+ *
33
+ * @param options
34
+ * @returns current device pixel ratio
35
+ */
36
+ export declare function getDevicePixelRatio(options?: DevicePixelRatioOptions): number;
37
+ //# sourceMappingURL=useDevicePixelRatio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDevicePixelRatio.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDevicePixelRatio.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,uBAAuB;IACtC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,uBAAuB,UA6BpE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,uBAAuB,GAAG,MAAM,CAO7E"}
@@ -0,0 +1,66 @@
1
+ import { EditModeHandler, SetEditMode } from '@sheetxl/utils';
2
+ /**
3
+ * Publish (or clear) the active {@link EditMode} on the app-wide bus **without a hook** — the same
4
+ * write {@link useEditMode}'s `setMode` performs (fires the superseded mode's
5
+ * {@link EditMode.onModeChange}), callable from plain (non-React) code.
6
+ *
7
+ * @remarks
8
+ * Exists so a non-component owner — e.g. the cell {@link IEditable} publishing its active session —
9
+ * can drive the bus from anywhere, not only where a hook happens to be mounted. Reads (and the React
10
+ * subscription) still go through {@link useEditMode}; this is write-only. Requires the bus singleton
11
+ * to be mounted (a `SingletonHooksContainer` in the tree), exactly like the hook.
12
+ */
13
+ export declare const setEditMode: SetEditMode;
14
+ /**
15
+ * Access the application's **edit-mode bus** — the single, app-wide signal describing the
16
+ * interaction currently in effect.
17
+ *
18
+ * @returns An {@link EditModeHandler} exposing `getMode()` and `setMode()`.
19
+ *
20
+ * @remarks
21
+ * At any moment the application is in exactly one interaction mode, or none (idle). The bus holds a
22
+ * single {@link EditMode} (`{ key, description?, args?, cursor?, onModeChange? }`), and every part of
23
+ * the app reads from and writes to that one value.
24
+ *
25
+ * It exists so unrelated features can coordinate **without depending on one another**. A feature
26
+ * announces that its interaction has started by publishing a mode, and clears it when finished;
27
+ * other features react to the change. The bus is the decoupling layer between them.
28
+ *
29
+ * Typical **publishers** (set a mode while their interaction is active):
30
+ * - cell editing — a single `key: 'edit'`, exposing the live editor handle (`IEditable`) via
31
+ * {@link EditMode.args}`.editable`. The fine-grained enter-vs-edit distinction lives on that
32
+ * handle's session, not on the bus key (the status-bar label is carried in
33
+ * {@link EditMode.description}, refreshed by the publisher when it flips);
34
+ * - the copy / cut marquee — `key: 'copy'` / `'cut'`;
35
+ * - fill and drag-move/copy gestures — `key: 'fill'` / `'drag…'`, with a {@link EditMode.cursor};
36
+ * - the format painter.
37
+ *
38
+ * Typical **consumers** (read the active mode):
39
+ * - the status bar, which shows {@link EditMode.description} (and its idle label when there is none);
40
+ * - the grid, which applies {@link EditMode.cursor};
41
+ * - features that must defer to another interaction — e.g. fill is suppressed while a cell is being
42
+ * edited — by inspecting the active {@link EditMode.key}.
43
+ *
44
+ * Publishing a mode **replaces** the previous one and invokes its {@link EditMode.onModeChange}, so a
45
+ * mode can clean up when it is superseded (for instance, starting an edit supersedes a copy marquee,
46
+ * which then clears the clipboard).
47
+ *
48
+ * The bus is a singleton — one instance per application, reachable from anywhere without
49
+ * prop-threading. It is backed by `singletonHook`, so a `SingletonHooksContainer` must be mounted in
50
+ * the tree.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const editMode = useEditMode();
55
+ *
56
+ * // Publish a mode while an interaction is active, then clear it when done.
57
+ * editMode.setMode({ key: 'fill', description: 'Drag to fill', cursor: 'crosshair' });
58
+ * editMode.setMode(null);
59
+ *
60
+ * // React to the active mode.
61
+ * const mode = editMode.getMode();
62
+ * const isEditing = mode?.key === 'edit';
63
+ * ```
64
+ */
65
+ export declare const useEditMode: () => EditModeHandler;
66
+ //# sourceMappingURL=useEditMode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEditMode.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useEditMode.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAavF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,EAAE,WAQzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,eAAO,MAAM,WAAW,uBAYvB,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The app-wide clipboard singleton. Exposes the active {@link ReferenceableClipboard} (defaulting to
3
+ * `InternalClipboard.Global`) and the native copy/keystroke refs. Consumed by the clipboard
4
+ * contributor (copy writes references here; paste reads them) and the marching-ants view.
5
+ */
6
+ export declare const useGlobalClipboard: any;
7
+ //# sourceMappingURL=useGlobalClipboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGlobalClipboard.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useGlobalClipboard.ts"],"names":[],"mappings":"AA8BA;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,KAiB7B,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Uses React 18's built-in `useId()` when available, or falls back to a
3
+ * slightly less performant (requiring a double render) implementation for
4
+ * earlier React versions.
5
+ *
6
+ * @see {@link https://movable-ui.com/docs/useId}
7
+ */
8
+ export declare const useId: any;
9
+ //# sourceMappingURL=useId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useId.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useId.ts"],"names":[],"mappings":"AA2BA;;;;;;GAMG;AAEH,eAAO,MAAM,KAAK,KAA8C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { DependencyList } from 'react';
2
+ export declare function useImperativeElement<R extends T, A = any, T = HTMLElement & A>(refForwarded: React.Ref<R>, attributeFn?: () => Partial<A>, deps?: DependencyList): React.RefObject<R>;
3
+ //# sourceMappingURL=useImperativeElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useImperativeElement.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useImperativeElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACwB,KAAK,cAAc,EACjD,MAAM,OAAO,CAAC;AAUf,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,GAAC,GAAG,EAAE,CAAC,GAAC,WAAW,GAAG,CAAC,EACxE,YAAY,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAC1B,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAC9B,IAAI,GAAE,cAAyB,GAC9B,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CA2BpB"}
@@ -0,0 +1,13 @@
1
+ import { LanguageTag } from '@sheetxl/utils';
2
+ /**
3
+ * The active UI language (BCP-47 tag), as a subscription — the component re-renders on a
4
+ * language switch.
5
+ *
6
+ * Use this when you need the **tag itself** (an `Intl` formatter, `<html lang>`, a locale-keyed
7
+ * asset). For call-site (`t()`) strings use {@link useTranslator} instead: calling this hook for
8
+ * its subscription alone and discarding the tag is the pattern that made a missed subscription
9
+ * invisible (see `useTranslator`'s note). Command surfaces re-render through resolution
10
+ * (`useCommands` re-emits) and need neither hook.
11
+ */
12
+ export declare function useLanguage(): LanguageTag;
13
+ //# sourceMappingURL=useLanguage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLanguage.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useLanguage.ts"],"names":[],"mappings":"AAEA,OAAO,EAA8B,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE9E;;;;;;;;;GASG;AACH,wBAAgB,WAAW,IAAI,WAAW,CAMzC"}
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ export interface RepeatClickOptions {
3
+ timerInitial?: number;
4
+ timerContinuous?: number;
5
+ }
6
+ /**
7
+ * Simple hook that calls onMouseDown at intervals until mouse is up.
8
+ *
9
+ * @remarks
10
+ * Fires the original mouse down event so preventDefault should be ignored or treated accordingly.
11
+ */
12
+ export declare function useMouseDownAndHoldListener(onPointerDown: (event: React.PointerEvent<Element>) => boolean | void, options?: RepeatClickOptions): (event: React.PointerEvent<Element>) => void;
13
+ //# sourceMappingURL=useMouseDownAndHoldListener.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMouseDownAndHoldListener.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useMouseDownAndHoldListener.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,OAAO,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,IAAI,CAQ7L"}