@sheetxl/utils-react 0.7.21 → 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.
- package/browser/cjs/C7jPCqFJNiWyD2pr.cjs +1 -0
- package/browser/cjs/CyWMySHsu-RvsIGs.cjs +1 -0
- package/browser/cjs/DZSvmqU8nRas1uz6.cjs +1 -0
- package/browser/cjs/index.cjs +5 -7
- package/browser/esm/BlY25fmBdmHNyBqo.mjs +139 -0
- package/browser/esm/CQUN3sZz7IrPMYIa.mjs +2171 -0
- package/browser/esm/DpI3aVOBON4B0xID.mjs +390 -0
- package/browser/esm/index.mjs +6127 -1795
- package/licenses/dependencies.txt +246 -39
- package/node/esm/B8EaqTMia4qMXy5z.mjs +139 -0
- package/node/esm/D9Xo9E4JB3ReeH-J.mjs +2171 -0
- package/node/esm/index.mjs +5140 -1763
- package/package.json +8 -5
- package/types/index.d.ts +2 -1969
- package/types/src/animation/AnimationModeContext.d.ts +10 -0
- package/types/src/animation/AnimationModeContext.d.ts.map +1 -0
- package/types/src/animation/index.d.ts +3 -0
- package/types/src/animation/index.d.ts.map +1 -0
- package/types/src/animation/useAnimatedMeasure.d.ts +39 -0
- package/types/src/animation/useAnimatedMeasure.d.ts.map +1 -0
- package/types/src/command/ActivationTracker.d.ts +53 -0
- package/types/src/command/ActivationTracker.d.ts.map +1 -0
- package/types/src/command/CommandAnchorProvider.d.ts +64 -0
- package/types/src/command/CommandAnchorProvider.d.ts.map +1 -0
- package/types/src/command/CommandButtonEntryLabel.d.ts +25 -0
- package/types/src/command/CommandButtonEntryLabel.d.ts.map +1 -0
- package/types/src/command/CommandButtonRegistry.d.ts +159 -0
- package/types/src/command/CommandButtonRegistry.d.ts.map +1 -0
- package/types/src/command/CommandButtonRegistryContext.d.ts +35 -0
- package/types/src/command/CommandButtonRegistryContext.d.ts.map +1 -0
- package/types/src/command/CommandCatalog.d.ts +155 -0
- package/types/src/command/CommandCatalog.d.ts.map +1 -0
- package/types/src/command/CommandCatalogResource.d.ts +7 -0
- package/types/src/command/CommandCatalogResource.d.ts.map +1 -0
- package/types/src/command/CommandCatalogService.d.ts +61 -0
- package/types/src/command/CommandCatalogService.d.ts.map +1 -0
- package/types/src/command/CommandChainContext.d.ts +32 -0
- package/types/src/command/CommandChainContext.d.ts.map +1 -0
- package/types/src/command/CommandFallbackContext.d.ts +30 -0
- package/types/src/command/CommandFallbackContext.d.ts.map +1 -0
- package/types/src/command/CommandFocusContext.d.ts +21 -0
- package/types/src/command/CommandFocusContext.d.ts.map +1 -0
- package/types/src/command/CommandRegistry.d.ts +164 -0
- package/types/src/command/CommandRegistry.d.ts.map +1 -0
- package/types/src/command/CommandRegistryContext.d.ts +16 -0
- package/types/src/command/CommandRegistryContext.d.ts.map +1 -0
- package/types/src/command/CommandResolver.d.ts +162 -0
- package/types/src/command/CommandResolver.d.ts.map +1 -0
- package/types/src/command/CommandScope.d.ts +343 -0
- package/types/src/command/CommandScope.d.ts.map +1 -0
- package/types/src/command/CommandScopeContext.d.ts +205 -0
- package/types/src/command/CommandScopeContext.d.ts.map +1 -0
- package/types/src/command/FocusActivation.d.ts +140 -0
- package/types/src/command/FocusActivation.d.ts.map +1 -0
- package/types/src/command/ICommand.d.ts +31 -0
- package/types/src/command/ICommand.d.ts.map +1 -0
- package/types/src/command/ICommandDefinition.d.ts +82 -0
- package/types/src/command/ICommandDefinition.d.ts.map +1 -0
- package/types/src/command/KeyBindingDispatcher.d.ts +150 -0
- package/types/src/command/KeyBindingDispatcher.d.ts.map +1 -0
- package/types/src/command/LayerActivation.d.ts +45 -0
- package/types/src/command/LayerActivation.d.ts.map +1 -0
- package/types/src/command/Types.d.ts +80 -0
- package/types/src/command/Types.d.ts.map +1 -0
- package/types/src/command/createResolvedCommand.d.ts +91 -0
- package/types/src/command/createResolvedCommand.d.ts.map +1 -0
- package/types/src/command/index.d.ts +26 -0
- package/types/src/command/index.d.ts.map +1 -0
- package/types/src/command/reduceDefinitions.d.ts +33 -0
- package/types/src/command/reduceDefinitions.d.ts.map +1 -0
- package/types/src/command/useCommands.d.ts +22 -0
- package/types/src/command/useCommands.d.ts.map +1 -0
- package/types/src/command/useContributeCommands.d.ts +18 -0
- package/types/src/command/useContributeCommands.d.ts.map +1 -0
- package/types/src/components/FocusKeyNavigation.d.ts +22 -0
- package/types/src/components/FocusKeyNavigation.d.ts.map +1 -0
- package/types/src/components/ITooltip.d.ts +38 -0
- package/types/src/components/ITooltip.d.ts.map +1 -0
- package/types/src/components/RoundedTab.d.ts +26 -0
- package/types/src/components/RoundedTab.d.ts.map +1 -0
- package/types/src/components/index.d.ts +4 -0
- package/types/src/components/index.d.ts.map +1 -0
- package/types/src/error/ErrorPanel.d.ts +14 -0
- package/types/src/error/ErrorPanel.d.ts.map +1 -0
- package/types/src/error/ReactErrorBoundary.d.ts +7 -0
- package/types/src/error/ReactErrorBoundary.d.ts.map +1 -0
- package/types/src/error/UncaughtErrorBoundary.d.ts +5 -0
- package/types/src/error/UncaughtErrorBoundary.d.ts.map +1 -0
- package/types/src/error/index.d.ts +4 -0
- package/types/src/error/index.d.ts.map +1 -0
- package/types/src/float/FloatPanel.d.ts +57 -0
- package/types/src/float/FloatPanel.d.ts.map +1 -0
- package/types/src/float/FloatPopper.d.ts +85 -0
- package/types/src/float/FloatPopper.d.ts.map +1 -0
- package/types/src/float/FloatPopup.d.ts +19 -0
- package/types/src/float/FloatPopup.d.ts.map +1 -0
- package/types/src/float/FloatProvider.d.ts +60 -0
- package/types/src/float/FloatProvider.d.ts.map +1 -0
- package/types/src/float/FloatStackContext.d.ts +25 -0
- package/types/src/float/FloatStackContext.d.ts.map +1 -0
- package/types/src/float/FloatTooltip.d.ts +22 -0
- package/types/src/float/FloatTooltip.d.ts.map +1 -0
- package/types/src/float/FloatUtils.d.ts +55 -0
- package/types/src/float/FloatUtils.d.ts.map +1 -0
- package/types/src/float/_FloatUtils.d.ts +51 -0
- package/types/src/float/_FloatUtils.d.ts.map +1 -0
- package/types/src/float/index.d.ts +9 -0
- package/types/src/float/index.d.ts.map +1 -0
- package/types/src/float/useFloatStack.d.ts +92 -0
- package/types/src/float/useFloatStack.d.ts.map +1 -0
- package/types/src/hooks/LanguageState.d.ts +15 -0
- package/types/src/hooks/LanguageState.d.ts.map +1 -0
- package/types/src/hooks/index.d.ts +19 -0
- package/types/src/hooks/index.d.ts.map +1 -0
- package/types/src/hooks/useBoundSyncExternalStore.d.ts +23 -0
- package/types/src/hooks/useBoundSyncExternalStore.d.ts.map +1 -0
- package/types/src/hooks/useCallbackRef.d.ts +11 -0
- package/types/src/hooks/useCallbackRef.d.ts.map +1 -0
- package/types/src/hooks/useDevicePixelRatio.d.ts +37 -0
- package/types/src/hooks/useDevicePixelRatio.d.ts.map +1 -0
- package/types/src/hooks/useEditMode.d.ts +66 -0
- package/types/src/hooks/useEditMode.d.ts.map +1 -0
- package/types/src/hooks/useGlobalClipboard.d.ts +7 -0
- package/types/src/hooks/useGlobalClipboard.d.ts.map +1 -0
- package/types/src/hooks/useId.d.ts +9 -0
- package/types/src/hooks/useId.d.ts.map +1 -0
- package/types/src/hooks/useImperativeElement.d.ts +3 -0
- package/types/src/hooks/useImperativeElement.d.ts.map +1 -0
- package/types/src/hooks/useLanguage.d.ts +13 -0
- package/types/src/hooks/useLanguage.d.ts.map +1 -0
- package/types/src/hooks/useMouseDownAndHoldListener.d.ts +13 -0
- package/types/src/hooks/useMouseDownAndHoldListener.d.ts.map +1 -0
- package/types/src/hooks/useNotifier.d.ts +330 -0
- package/types/src/hooks/useNotifier.d.ts.map +1 -0
- package/types/src/hooks/useOnClickOrFocusAway.d.ts +8 -0
- package/types/src/hooks/useOnClickOrFocusAway.d.ts.map +1 -0
- package/types/src/hooks/useOptionalBoundSyncExternalStore.d.ts +20 -0
- package/types/src/hooks/useOptionalBoundSyncExternalStore.d.ts.map +1 -0
- package/types/src/hooks/useOptionalSyncExternalStore.d.ts +18 -0
- package/types/src/hooks/useOptionalSyncExternalStore.d.ts.map +1 -0
- package/types/src/hooks/useSynchronizedPointerHandler.d.ts +54 -0
- package/types/src/hooks/useSynchronizedPointerHandler.d.ts.map +1 -0
- package/types/src/hooks/useTextareaCaretRect.d.ts +85 -0
- package/types/src/hooks/useTextareaCaretRect.d.ts.map +1 -0
- package/types/src/hooks/useTraceUpdate.d.ts +2 -0
- package/types/src/hooks/useTraceUpdate.d.ts.map +1 -0
- package/types/src/hooks/useTranslator.d.ts +32 -0
- package/types/src/hooks/useTranslator.d.ts.map +1 -0
- package/types/src/icons/DynamicIcon.d.ts +17 -0
- package/types/src/icons/DynamicIcon.d.ts.map +1 -0
- package/types/src/icons/DynamicIconService.d.ts +39 -0
- package/types/src/icons/DynamicIconService.d.ts.map +1 -0
- package/types/src/icons/ErrorIcon.d.ts +6 -0
- package/types/src/icons/ErrorIcon.d.ts.map +1 -0
- package/types/src/icons/Types.d.ts +81 -0
- package/types/src/icons/Types.d.ts.map +1 -0
- package/types/src/icons/WalkingIcon.d.ts +27 -0
- package/types/src/icons/WalkingIcon.d.ts.map +1 -0
- package/types/src/icons/_Utils.d.ts +3 -0
- package/types/src/icons/_Utils.d.ts.map +1 -0
- package/types/src/icons/index.d.ts +5 -0
- package/types/src/icons/index.d.ts.map +1 -0
- package/types/src/icons/packs/Base.d.ts +4 -0
- package/types/src/icons/packs/Base.d.ts.map +1 -0
- package/types/src/icons/packs/Conditional.d.ts +4 -0
- package/types/src/icons/packs/Conditional.d.ts.map +1 -0
- package/types/src/index.d.ts +18 -0
- package/types/src/index.d.ts.map +1 -0
- package/types/src/loading/LoadingPanel.d.ts +31 -0
- package/types/src/loading/LoadingPanel.d.ts.map +1 -0
- package/types/src/loading/index.d.ts +2 -0
- package/types/src/loading/index.d.ts.map +1 -0
- package/types/src/persistence/InMemoryStore.d.ts +12 -0
- package/types/src/persistence/InMemoryStore.d.ts.map +1 -0
- package/types/src/persistence/LocalStorageStore.d.ts +15 -0
- package/types/src/persistence/LocalStorageStore.d.ts.map +1 -0
- package/types/src/persistence/PersistenceStateProvider.d.ts +3 -0
- package/types/src/persistence/PersistenceStateProvider.d.ts.map +1 -0
- package/types/src/persistence/Types.d.ts +95 -0
- package/types/src/persistence/Types.d.ts.map +1 -0
- package/types/src/persistence/_Context.d.ts +9 -0
- package/types/src/persistence/_Context.d.ts.map +1 -0
- package/types/src/persistence/index.d.ts +6 -0
- package/types/src/persistence/index.d.ts.map +1 -0
- package/types/src/persistence/usePersistenceState.d.ts +33 -0
- package/types/src/persistence/usePersistenceState.d.ts.map +1 -0
- package/types/src/react-resizable/Resizable.d.ts +30 -0
- package/types/src/react-resizable/Resizable.d.ts.map +1 -0
- package/types/src/react-resizable/ResizableBox.d.ts +18 -0
- package/types/src/react-resizable/ResizableBox.d.ts.map +1 -0
- package/types/src/react-resizable/index.d.ts +11 -0
- package/types/src/react-resizable/index.d.ts.map +1 -0
- package/types/src/react-resizable/propTypes.d.ts +56 -0
- package/types/src/react-resizable/propTypes.d.ts.map +1 -0
- package/types/src/react-resizable/utils.d.ts +3 -0
- package/types/src/react-resizable/utils.d.ts.map +1 -0
- package/types/src/scroll/AxisViewport.d.ts +73 -0
- package/types/src/scroll/AxisViewport.d.ts.map +1 -0
- package/types/src/scroll/IScrollPane.d.ts +63 -0
- package/types/src/scroll/IScrollPane.d.ts.map +1 -0
- package/types/src/scroll/IScrollbar.d.ts +94 -0
- package/types/src/scroll/IScrollbar.d.ts.map +1 -0
- package/types/src/scroll/NativeScrollbar.d.ts +7 -0
- package/types/src/scroll/NativeScrollbar.d.ts.map +1 -0
- package/types/src/scroll/ScrollButton.d.ts +29 -0
- package/types/src/scroll/ScrollButton.d.ts.map +1 -0
- package/types/src/scroll/ScrollPane.d.ts +4 -0
- package/types/src/scroll/ScrollPane.d.ts.map +1 -0
- package/types/src/scroll/Scrollbar.d.ts +4 -0
- package/types/src/scroll/Scrollbar.d.ts.map +1 -0
- package/types/src/scroll/TouchThumbContext.d.ts +93 -0
- package/types/src/scroll/TouchThumbContext.d.ts.map +1 -0
- package/types/src/scroll/TouchThumbHandle.d.ts +64 -0
- package/types/src/scroll/TouchThumbHandle.d.ts.map +1 -0
- package/types/src/scroll/TrackDrag.d.ts +107 -0
- package/types/src/scroll/TrackDrag.d.ts.map +1 -0
- package/types/src/scroll/Utils.d.ts +8 -0
- package/types/src/scroll/Utils.d.ts.map +1 -0
- package/types/src/scroll/Viewport.d.ts +285 -0
- package/types/src/scroll/Viewport.d.ts.map +1 -0
- package/types/src/scroll/VirtualScrollbar.d.ts +49 -0
- package/types/src/scroll/VirtualScrollbar.d.ts.map +1 -0
- package/types/src/scroll/index.d.ts +14 -0
- package/types/src/scroll/index.d.ts.map +1 -0
- package/types/src/scroll/scrollbarTheming.d.ts +27 -0
- package/types/src/scroll/scrollbarTheming.d.ts.map +1 -0
- package/types/src/scroll/useWheelScroll.d.ts +27 -0
- package/types/src/scroll/useWheelScroll.d.ts.map +1 -0
- package/types/src/scroller/Scroller.d.ts +260 -0
- package/types/src/scroller/Scroller.d.ts.map +1 -0
- package/types/src/scroller/animate.d.ts +30 -0
- package/types/src/scroller/animate.d.ts.map +1 -0
- package/types/src/scroller/index.d.ts +2 -0
- package/types/src/scroller/index.d.ts.map +1 -0
- package/types/src/singletonHook/components/SingleItemContainer.d.ts +6 -0
- package/types/src/singletonHook/components/SingleItemContainer.d.ts.map +1 -0
- package/types/src/singletonHook/components/SingletonHooksContainer.d.ts +7 -0
- package/types/src/singletonHook/components/SingletonHooksContainer.d.ts.map +1 -0
- package/types/src/singletonHook/index.d.ts +11 -0
- package/types/src/singletonHook/index.d.ts.map +1 -0
- package/types/src/singletonHook/singletonHook.d.ts +6 -0
- package/types/src/singletonHook/singletonHook.d.ts.map +1 -0
- package/types/src/singletonHook/utils/env.d.ts +4 -0
- package/types/src/singletonHook/utils/env.d.ts.map +1 -0
- package/types/src/singletonHook/utils/env.native.d.ts +1 -0
- package/types/src/singletonHook/utils/env.native.d.ts.map +1 -0
- package/types/src/singletonHook/utils/warning.d.ts +2 -0
- package/types/src/singletonHook/utils/warning.d.ts.map +1 -0
- package/types/src/splitPane/SplitPane.d.ts +91 -0
- package/types/src/splitPane/SplitPane.d.ts.map +1 -0
- package/types/src/splitPane/SplitPaneResizer.d.ts +11 -0
- package/types/src/splitPane/SplitPaneResizer.d.ts.map +1 -0
- package/types/src/splitPane/index.d.ts +3 -0
- package/types/src/splitPane/index.d.ts.map +1 -0
- package/types/src/theme/TokenTheme.d.ts +196 -0
- package/types/src/theme/TokenTheme.d.ts.map +1 -0
- package/types/src/theme/TokenThemeProvider.d.ts +97 -0
- package/types/src/theme/TokenThemeProvider.d.ts.map +1 -0
- package/types/src/theme/buildThemeCSS.d.ts +54 -0
- package/types/src/theme/buildThemeCSS.d.ts.map +1 -0
- package/types/src/theme/createThemeVars.d.ts +15 -0
- package/types/src/theme/createThemeVars.d.ts.map +1 -0
- package/types/src/theme/defaultTheme.d.ts +15 -0
- package/types/src/theme/defaultTheme.d.ts.map +1 -0
- package/types/src/theme/index.d.ts +9 -0
- package/types/src/theme/index.d.ts.map +1 -0
- package/types/src/theme/resolveTokens.d.ts +21 -0
- package/types/src/theme/resolveTokens.d.ts.map +1 -0
- package/types/src/theme/themeAttrs.d.ts +32 -0
- package/types/src/theme/themeAttrs.d.ts.map +1 -0
- package/types/src/theme/useResolvedThemeMode.d.ts +17 -0
- package/types/src/theme/useResolvedThemeMode.d.ts.map +1 -0
- package/types/src/types/Types.d.ts +71 -0
- package/types/src/types/Types.d.ts.map +1 -0
- package/types/src/types/index.d.ts +2 -0
- package/types/src/types/index.d.ts.map +1 -0
- package/types/src/utils/FullScreenPortal.d.ts +6 -0
- package/types/src/utils/FullScreenPortal.d.ts.map +1 -0
- package/types/src/utils/PinchZoom.d.ts +3 -0
- package/types/src/utils/PinchZoom.d.ts.map +1 -0
- package/types/src/utils/ReactUtils.d.ts +134 -0
- package/types/src/utils/ReactUtils.d.ts.map +1 -0
- package/types/src/utils/index.d.ts +4 -0
- package/types/src/utils/index.d.ts.map +1 -0
- package/types/src/utils/useFullScreen.d.ts +47 -0
- package/types/src/utils/useFullScreen.d.ts.map +1 -0
- package/browser/cjs/BA9O-cekHrH5qrOm.cjs +0 -6
- package/browser/esm/DTq8GPy7DLZm2D6S.mjs +0 -12
- package/node/assets/style.css +0 -1
- package/node/esm/4mSSJ5fhNdMhHCE6.mjs +0 -12
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
export interface ScrollerCallback {
|
|
2
|
+
(left: number, top: number, zoom: number): void;
|
|
3
|
+
}
|
|
4
|
+
export interface ScrollerOptions {
|
|
5
|
+
/** Enable scrolling on x-axis */
|
|
6
|
+
scrollingX?: boolean;
|
|
7
|
+
/** Enable scrolling on y-axis */
|
|
8
|
+
scrollingY?: boolean;
|
|
9
|
+
/** Enable animations for deceleration, snap back, zooming and scrolling */
|
|
10
|
+
animating?: boolean;
|
|
11
|
+
/** duration for animations triggered by scrollTo/zoomTo */
|
|
12
|
+
animationDuration?: number;
|
|
13
|
+
/** Enable bouncing (content can be slowly moved outside and jumps back after releasing) */
|
|
14
|
+
bouncing?: boolean;
|
|
15
|
+
/** Enable locking to the main axis if user moves only slightly on one of them at start */
|
|
16
|
+
locking?: boolean;
|
|
17
|
+
/** Enable pagination mode (switching between full page content panes) */
|
|
18
|
+
paging?: boolean;
|
|
19
|
+
/** Enable snapping of content to a configured pixel grid */
|
|
20
|
+
snapping?: boolean;
|
|
21
|
+
/** Enable zooming of content via API, fingers and mouse wheel */
|
|
22
|
+
zooming?: boolean;
|
|
23
|
+
/** Minimum zoom level */
|
|
24
|
+
minZoom?: number;
|
|
25
|
+
/** Maximum zoom level */
|
|
26
|
+
maxZoom?: number;
|
|
27
|
+
/** Multiply or decrease scrolling speed **/
|
|
28
|
+
speedMultiplier?: number;
|
|
29
|
+
/** Callback that is fired on the later of touch end or deceleration end,
|
|
30
|
+
provided that another scrolling action has not begun. Used to know
|
|
31
|
+
when to fade out a scrollbar. */
|
|
32
|
+
scrollingComplete?: () => void;
|
|
33
|
+
/** This configures the amount of change applied to deceleration when reaching boundaries **/
|
|
34
|
+
penetrationDeceleration?: number;
|
|
35
|
+
/** This configures the amount of change applied to acceleration when reaching boundaries **/
|
|
36
|
+
penetrationAcceleration?: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Scroller class for 'virtual' scrolling/zooming.
|
|
40
|
+
*/
|
|
41
|
+
export declare class Scroller {
|
|
42
|
+
/** {Boolean} Whether only a single finger is used in touch handling */
|
|
43
|
+
__isSingleTouch: boolean;
|
|
44
|
+
/** {Boolean} Whether a touch event sequence is in progress */
|
|
45
|
+
__isTracking: boolean;
|
|
46
|
+
/** {Boolean} Whether a deceleration animation went to completion. */
|
|
47
|
+
__didDecelerationComplete: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* {Boolean} Whether a gesture zoom/rotate event is in progress. Activates when
|
|
50
|
+
* a gestureStart event happens. This has higher priority than dragging.
|
|
51
|
+
*/
|
|
52
|
+
__isGesturing: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* {Boolean} Whether the user has moved by such a distance that we have enabled
|
|
55
|
+
* dragging mode. Hint: It's only enabled after some pixels of movement to
|
|
56
|
+
* not interrupt with clicks etc.
|
|
57
|
+
*/
|
|
58
|
+
__isDragging: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* {Boolean} Not touching and dragging anymore, and smoothly animating the
|
|
61
|
+
* touch sequence using deceleration.
|
|
62
|
+
*/
|
|
63
|
+
__isDecelerating: number;
|
|
64
|
+
/**
|
|
65
|
+
* {Boolean} Smoothly animating the currently configured change
|
|
66
|
+
*/
|
|
67
|
+
__isAnimating: number;
|
|
68
|
+
__interruptedAnimation: boolean;
|
|
69
|
+
__lastScale: number;
|
|
70
|
+
__enableScrollX: boolean;
|
|
71
|
+
__enableScrollY: boolean;
|
|
72
|
+
/** {Integer} Viewport left boundary */
|
|
73
|
+
__clientLeft: number;
|
|
74
|
+
/** {Integer} Viewport right boundary */
|
|
75
|
+
__clientTop: number;
|
|
76
|
+
/** {Integer} Viewport width */
|
|
77
|
+
__clientWidth: number;
|
|
78
|
+
/** {Integer} Viewport height */
|
|
79
|
+
__clientHeight: number;
|
|
80
|
+
/** {Integer} Full content's width */
|
|
81
|
+
__contentWidth: number;
|
|
82
|
+
/** {Integer} Full content's height */
|
|
83
|
+
__contentHeight: number;
|
|
84
|
+
/** {Integer} Snapping width for content */
|
|
85
|
+
__snapWidth: number;
|
|
86
|
+
/** {Integer} Snapping height for content */
|
|
87
|
+
__snapHeight: number;
|
|
88
|
+
/** {Number} Zoom level */
|
|
89
|
+
__zoomLevel: number;
|
|
90
|
+
/** {Number} Scroll position on x-axis */
|
|
91
|
+
__scrollLeft: number;
|
|
92
|
+
/** {Number} Scroll position on y-axis */
|
|
93
|
+
__scrollTop: number;
|
|
94
|
+
/** {Integer} Maximum allowed scroll position on x-axis */
|
|
95
|
+
__maxScrollLeft: number;
|
|
96
|
+
/** {Integer} Maximum allowed scroll position on y-axis */
|
|
97
|
+
__maxScrollTop: number;
|
|
98
|
+
__scheduledLeft: number;
|
|
99
|
+
__scheduledTop: number;
|
|
100
|
+
__scheduledZoom: number;
|
|
101
|
+
/** {Number} Left position of finger at start */
|
|
102
|
+
__lastTouchLeft: number;
|
|
103
|
+
/** {Number} Top position of finger at start */
|
|
104
|
+
__lastTouchTop: number;
|
|
105
|
+
/** {Date} Timestamp of last move of finger. Used to limit tracking range for deceleration speed. */
|
|
106
|
+
__lastTouchMove: number;
|
|
107
|
+
/** {Array} List of positions, uses three indexes for each state: left, top, timestamp */
|
|
108
|
+
__positions: Array<number>;
|
|
109
|
+
__initialTouchLeft: number;
|
|
110
|
+
__initialTouchTop: number;
|
|
111
|
+
__zoomLevelStart: number;
|
|
112
|
+
/** {Integer} Minimum left scroll position during deceleration */
|
|
113
|
+
__minDecelerationScrollLeft: number;
|
|
114
|
+
/** {Integer} Minimum top scroll position during deceleration */
|
|
115
|
+
__minDecelerationScrollTop: number;
|
|
116
|
+
/** {Integer} Maximum left scroll position during deceleration */
|
|
117
|
+
__maxDecelerationScrollLeft: number;
|
|
118
|
+
/** {Integer} Maximum top scroll position during deceleration */
|
|
119
|
+
__maxDecelerationScrollTop: number;
|
|
120
|
+
/** {Number} Current factor to modify horizontal scroll position with on every step */
|
|
121
|
+
__decelerationVelocityX: number;
|
|
122
|
+
/** {Number} Current factor to modify vertical scroll position with on every step */
|
|
123
|
+
__decelerationVelocityY: number;
|
|
124
|
+
__callback: ScrollerCallback;
|
|
125
|
+
__zoomComplete: (() => void) | null;
|
|
126
|
+
options: ScrollerOptions;
|
|
127
|
+
constructor(callback: ScrollerCallback, options: ScrollerOptions);
|
|
128
|
+
/**
|
|
129
|
+
* Configures the dimensions of the client (outer) and content (inner) elements.
|
|
130
|
+
* Requires the available space for the outer element and the outer size of the inner element.
|
|
131
|
+
* All values which are falsy (null or zero etc.) are ignored and the old value is kept.
|
|
132
|
+
*
|
|
133
|
+
* @param clientWidth {Integer ? null} Inner width of outer element
|
|
134
|
+
* @param clientHeight {Integer ? null} Inner height of outer element
|
|
135
|
+
* @param contentWidth {Integer ? null} Outer width of inner element
|
|
136
|
+
* @param contentHeight {Integer ? null} Outer height of inner element
|
|
137
|
+
*/
|
|
138
|
+
setDimensions(clientWidth: number, clientHeight: number, contentWidth: number, contentHeight: number): void;
|
|
139
|
+
/**
|
|
140
|
+
* Sets the client coordinates in relation to the document.
|
|
141
|
+
*
|
|
142
|
+
* @param left {Integer ? 0} Left position of outer element
|
|
143
|
+
* @param top {Integer ? 0} Top position of outer element
|
|
144
|
+
*/
|
|
145
|
+
setPosition(left: number, top: number): void;
|
|
146
|
+
/**
|
|
147
|
+
* Configures the snapping (when snapping is active)
|
|
148
|
+
*
|
|
149
|
+
* @param width {Integer} Snapping width
|
|
150
|
+
* @param height {Integer} Snapping height
|
|
151
|
+
*/
|
|
152
|
+
setSnapSize(width: number, height: number): void;
|
|
153
|
+
/**
|
|
154
|
+
* Returns the scroll position and zooming values
|
|
155
|
+
*
|
|
156
|
+
* @returns `left` and `top` scroll position and `zoom` level
|
|
157
|
+
*/
|
|
158
|
+
getValues(): {
|
|
159
|
+
left: number;
|
|
160
|
+
top: number;
|
|
161
|
+
right: number;
|
|
162
|
+
bottom: number;
|
|
163
|
+
zoom: number;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Get point in in content space from scroll coordinates.
|
|
167
|
+
*/
|
|
168
|
+
getPoint(scrollLeft: number, scrollTop: number): {
|
|
169
|
+
left: number;
|
|
170
|
+
top: number;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Returns the maximum scroll values
|
|
174
|
+
*
|
|
175
|
+
* @returns `left` and `top` maximum scroll values
|
|
176
|
+
*/
|
|
177
|
+
getScrollMax(): {
|
|
178
|
+
left: number;
|
|
179
|
+
top: number;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Zooms to the given level. Supports optional animation. Zooms
|
|
183
|
+
* the center when no coordinates are given.
|
|
184
|
+
*
|
|
185
|
+
* @param level {Number} Level to zoom to
|
|
186
|
+
* @param isAnimated {Boolean ? false} Whether to use animation
|
|
187
|
+
* @param fixedLeft {Number ? undefined} Stationary point's left coordinate (vector in client space)
|
|
188
|
+
* @param fixedTop {Number ? undefined} Stationary point's top coordinate (vector in client space)
|
|
189
|
+
* @param callback {Function ? null} A callback that gets fired when the zoom is complete.
|
|
190
|
+
*/
|
|
191
|
+
zoomTo(level: number, isAnimated?: boolean, fixedLeft?: number, fixedTop?: number, callback?: () => void): void;
|
|
192
|
+
/**
|
|
193
|
+
* Zooms the content by the given factor.
|
|
194
|
+
*
|
|
195
|
+
* @param factor {Number} Zoom by given factor
|
|
196
|
+
* @param isAnimated {Boolean ? false} Whether to use animation
|
|
197
|
+
* @param originLeft {Number ? 0} Zoom in at given left coordinate
|
|
198
|
+
* @param originTop {Number ? 0} Zoom in at given top coordinate
|
|
199
|
+
* @param callback {Function ? null} A callback that gets fired when the zoom is complete.
|
|
200
|
+
*/
|
|
201
|
+
zoomBy(factor: number, isAnimated?: boolean, originLeft?: number, originTop?: number, callback?: () => void): void;
|
|
202
|
+
/**
|
|
203
|
+
* Scrolls to the given position. Respect limitations and snapping automatically.
|
|
204
|
+
*
|
|
205
|
+
* @param left {Number?null} Horizontal scroll position, keeps current if value is <code>null</code>
|
|
206
|
+
* @param top {Number?null} Vertical scroll position, keeps current if value is <code>null</code>
|
|
207
|
+
* @param isAnimated {Boolean?false} Whether the scrolling should happen using an animation
|
|
208
|
+
* @param zoom {Number} [1.0] Zoom level to go to
|
|
209
|
+
*/
|
|
210
|
+
scrollTo(left: number, top: number, isAnimated?: boolean, zoom?: number): void;
|
|
211
|
+
/**
|
|
212
|
+
* Scroll by the given offset
|
|
213
|
+
*
|
|
214
|
+
* @param left {Number ? 0} Scroll x-axis by given offset
|
|
215
|
+
* @param top {Number ? 0} Scroll x-axis by given offset
|
|
216
|
+
* @param isAnimated {Boolean ? false} Whether to animate the given change
|
|
217
|
+
*/
|
|
218
|
+
scrollBy(left?: number, top?: number, isAnimated?: boolean): void;
|
|
219
|
+
/**
|
|
220
|
+
* Mouse wheel handler for zooming support
|
|
221
|
+
*/
|
|
222
|
+
doMouseZoom(wheelDelta: number, timeStamp: number, pageX: number, pageY: number): void;
|
|
223
|
+
/**
|
|
224
|
+
* Touch start handler for scrolling support
|
|
225
|
+
*/
|
|
226
|
+
doTouchStart(touches: TouchList, timeStamp: number | Date): void;
|
|
227
|
+
/**
|
|
228
|
+
* Touch move handler for scrolling support
|
|
229
|
+
* @param {Number} [1.0] scale - ....
|
|
230
|
+
*/
|
|
231
|
+
doTouchMove(touches: TouchList, timeStamp: number | Date, scale?: number): void;
|
|
232
|
+
/**
|
|
233
|
+
* Touch end handler for scrolling support
|
|
234
|
+
*/
|
|
235
|
+
doTouchEnd(timeStamp: number | Date): void;
|
|
236
|
+
/**
|
|
237
|
+
* Applies the scroll position to the content element
|
|
238
|
+
*
|
|
239
|
+
* @param left {Number} Left scroll position
|
|
240
|
+
* @param top {Number} Top scroll position
|
|
241
|
+
* @param isAnimated {Boolean?false} Whether animation should be used to move to the new coordinates
|
|
242
|
+
*/
|
|
243
|
+
protected __publish(left: number, top: number, zoom: number, isAnimated?: boolean): void;
|
|
244
|
+
/**
|
|
245
|
+
* Recomputes scroll minimum values based on client dimensions and content dimensions.
|
|
246
|
+
*/
|
|
247
|
+
protected __computeScrollMax(zoomLevel?: number): void;
|
|
248
|
+
/**
|
|
249
|
+
* Called when a touch sequence end and the speed of the finger was high enough
|
|
250
|
+
* to switch into deceleration mode.
|
|
251
|
+
*/
|
|
252
|
+
protected __startDeceleration(timeStamp: number): void;
|
|
253
|
+
/**
|
|
254
|
+
* Called on every step of the animation
|
|
255
|
+
*
|
|
256
|
+
* @param render Whether to not render the current step, but keep it in memory only. Used internally only!
|
|
257
|
+
*/
|
|
258
|
+
protected __stepThroughDeceleration(render: boolean): void;
|
|
259
|
+
}
|
|
260
|
+
//# sourceMappingURL=Scroller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Scroller.d.ts","sourceRoot":"","sources":["../../../../src/scroller/Scroller.ts"],"names":[],"mappings":"AA4CA,MAAM,WAAW,gBAAgB;IAC/B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACjD;AAED,MAAM,WAAW,eAAe;IAC9B,iCAAiC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,iCAAiC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,0FAA0F;IAC1F,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,yEAAyE;IACzE,MAAM,CAAC,EAAE,OAAO,CAAC;IAE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AU,EAChB,GAAG,GAAE,MAAU,EACf,UAAU,GAAE,OAAe,GAC1B,IAAI;IAcP;;OAEG;IACH,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAOtF;;OAEG;IACH,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,GAAC,IAAI,GAAG,IAAI;IA2F9D;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,GAAC,IAAI,EAAE,KAAK,GAAE,MAAY,GAAG,IAAI;IA+IlF;;OAEG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAC,IAAI,GAAG,IAAI;IAuFxC;;;;;;OAMG;IACH,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,GAAE,OAAe,GAAG,IAAI;IAqF/F;;OAEG;IACH,SAAS,CAAC,kBAAkB,CAAC,SAAS,GAAE,MAAyB,GAAG,IAAI;IAaxE;;;OAGG;IACH,SAAS,CAAC,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAqDtD;;;;OAIG;IACH,SAAS,CAAC,yBAAyB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;CA+F3D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stops the given animation.
|
|
3
|
+
*
|
|
4
|
+
* @param id Unique animation ID
|
|
5
|
+
* @returns Whether the animation was stopped (aka, was running before)
|
|
6
|
+
*/
|
|
7
|
+
export declare const stop: (id: number) => boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Whether the given animation is still running.
|
|
10
|
+
*
|
|
11
|
+
* @param id Unique animation ID
|
|
12
|
+
* @returns Whether the animation is still running
|
|
13
|
+
*/
|
|
14
|
+
export declare const isRunning: (id: number) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Start the animation.
|
|
17
|
+
*
|
|
18
|
+
* @param stepCallback {Function} Pointer to function which is executed on every step.
|
|
19
|
+
* Signature of the method should be `function(percent, now, virtual) { return continueWithAnimation; }`
|
|
20
|
+
* @param verifyCallback {Function} Executed before every animation step.
|
|
21
|
+
* Signature of the method should be `function() { return continueWithAnimation; }`
|
|
22
|
+
* @param completedCallback {Function}
|
|
23
|
+
* Signature of the method should be `function(droppedFrames, finishedAnimation, optional wasFinished) {}`
|
|
24
|
+
* @param duration {Integer} Milliseconds to run the animation
|
|
25
|
+
* @param easingMethod {Function} Pointer to easing function
|
|
26
|
+
* Signature of the method should be `function(percent) { return modifiedValue; }`
|
|
27
|
+
* @returns Identifier of animation. Can be used to stop it any time.
|
|
28
|
+
*/
|
|
29
|
+
export declare const start: (stepCallback: (percent: number, now: number, virtual?: boolean) => boolean | void, verifyCallback: (id: number) => boolean, completedCallback: (droppedFrames: number, finishedAnimation: number, wasFinished?: boolean) => void, duration?: number, easingMethod?: (percent: number) => number) => number;
|
|
30
|
+
//# sourceMappingURL=animate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animate.d.ts","sourceRoot":"","sources":["../../../../src/scroller/animate.ts"],"names":[],"mappings":"AA+BA;;;;;GAKG;AACH,eAAO,MAAM,IAAI,GAAI,IAAI,MAAM,KAAG,OAMjC,CAAC;AAGF;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,IAAI,MAAM,KAAG,OAEtC,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAO,KAAK,GACjB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,GAAG,IAAI,EACjF,gBAAgB,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,EACvC,mBAAmB,CAAC,aAAa,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,OAAO,KAAK,IAAI,EACpG,WAAU,MAAQ,EAClB,eAAe,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,KACzC,MAyFF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/scroller/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SingleItemContainer.d.ts","sourceRoot":"","sources":["../../../../../src/singletonHook/components/SingleItemContainer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,GAAI,8CAA8C;IAChF,SAAS,EAAE,GAAG,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,CAAC;IACvB,gBAAgB,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;CACtC,SAgBA,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const SingletonHooksContainer: ({ automaticContainerInternalUseOnly }: {
|
|
3
|
+
automaticContainerInternalUseOnly?: boolean;
|
|
4
|
+
}) => React.JSX.Element;
|
|
5
|
+
export declare const addHook: (hook: any) => () => void;
|
|
6
|
+
export declare const resetLocalStateForTests: () => void;
|
|
7
|
+
//# sourceMappingURL=SingletonHooksContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SingletonHooksContainer.d.ts","sourceRoot":"","sources":["../../../../../src/singletonHook/components/SingletonHooksContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqB/B,eAAO,MAAM,uBAAuB,GAAI,uCAAuC;IAC7E,iCAAiC,CAAC,EAAE,OAAO,CAAC;CAC7C,sBA6CA,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,MAAM,GAAG,eAgBhC,CAAC;AAEF,eAAO,MAAM,uBAAuB,YAKnC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { singletonHook } from './singletonHook';
|
|
2
|
+
import { SingletonHooksContainer } from './components/SingletonHooksContainer';
|
|
3
|
+
export { singletonHook, SingletonHooksContainer };
|
|
4
|
+
declare const ReactSingletonHook: {
|
|
5
|
+
singletonHook: <T = any, S = any>(initValue: T, useHookBody: () => S, options?: import('./singletonHook').SingletonHookOptions) => React.SetStateAction<S>;
|
|
6
|
+
SingletonHooksContainer: ({ automaticContainerInternalUseOnly }: {
|
|
7
|
+
automaticContainerInternalUseOnly?: boolean;
|
|
8
|
+
}) => import("react").JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
export default ReactSingletonHook;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/singletonHook/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,EACL,aAAa,EACb,uBAAuB,EACxB,CAAC;AAEF,QAAA,MAAM,kBAAkB;;;yCAfK,CAAC;;CAkB7B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SingletonHookOptions {
|
|
3
|
+
unmountIfNoConsumers?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const singletonHook: <T = any, S = any>(initValue: T, useHookBody: () => S, options?: SingletonHookOptions) => React.SetStateAction<S>;
|
|
6
|
+
//# sourceMappingURL=singletonHook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"singletonHook.d.ts","sourceRoot":"","sources":["../../../../src/singletonHook/singletonHook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,oBAAoB;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAuED,eAAO,MAAM,aAAa,EAAC,CAAC,CAAC,GAAC,GAAG,EAAE,CAAC,GAAC,GAAG,EACtC,SAAS,EAAE,CAAC,EACZ,WAAW,EAAE,MAAM,CAAC,EACpB,OAAO,CAAC,EAAE,oBAAoB,KAC3B,KAAK,CAAC,cAAc,CAAC,CAAC,CAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../../../src/singletonHook/utils/env.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,IAAI,SAAgC,CAAC;AACrE,eAAO,MAAM,KAAK,GAAI,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,SAUhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=env.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.native.d.ts","sourceRoot":"","sources":["../../../../../src/singletonHook/utils/env.native.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warning.d.ts","sourceRoot":"","sources":["../../../../../src/singletonHook/utils/warning.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,GAAI,SAAS,GAAG,SAInC,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SplitPaneResizerProps } from './SplitPaneResizer';
|
|
3
|
+
export interface SplitPaneAttributes {
|
|
4
|
+
/**
|
|
5
|
+
* Programmatic api to set the position. Can be either a string with px or %.
|
|
6
|
+
* If it is a number it will be interpreted based on whether there is a fixed pane or not.
|
|
7
|
+
* @param position - Pixels as `string` or a percent as a `number`.
|
|
8
|
+
*/
|
|
9
|
+
setPosition: (position: string | number) => void;
|
|
10
|
+
isSplitPane: () => true;
|
|
11
|
+
}
|
|
12
|
+
export interface ISplitPaneElement extends HTMLDivElement, SplitPaneAttributes {
|
|
13
|
+
}
|
|
14
|
+
export interface SplitPaneProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
15
|
+
/**
|
|
16
|
+
* The elementBefore the divider.
|
|
17
|
+
*/
|
|
18
|
+
elementBefore?: React.ReactElement<any>;
|
|
19
|
+
/**
|
|
20
|
+
* The element after the divider.
|
|
21
|
+
*/
|
|
22
|
+
elementAfter?: React.ReactElement<any>;
|
|
23
|
+
/**
|
|
24
|
+
* If the fixedPane is set resizing will keep one the sizes.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* When set the default position to be interpreted as pixels.
|
|
28
|
+
*/
|
|
29
|
+
fixedPane?: 'before' | 'after' | null;
|
|
30
|
+
/**
|
|
31
|
+
* The position. Can be either a string with px or %.
|
|
32
|
+
* If it is a number it will be interpreted based on whether there is a fixed pane or not.
|
|
33
|
+
*/
|
|
34
|
+
position?: number | string;
|
|
35
|
+
/**
|
|
36
|
+
* The minimum size. Can be either a string with px or %.
|
|
37
|
+
* If it is a number it will be interpreted based on whether there is a fixed pane or not.
|
|
38
|
+
*/
|
|
39
|
+
minBefore?: number | string;
|
|
40
|
+
/**
|
|
41
|
+
* The minimum size. Can be either a string with px or %.
|
|
42
|
+
* If it is a number it will be interpreted based on whether there is a fixed pane or not.
|
|
43
|
+
*/
|
|
44
|
+
maxBefore?: number | string;
|
|
45
|
+
/**
|
|
46
|
+
* The minimum size. Can be either a string with px or %.
|
|
47
|
+
* If it is a number it will be interpreted based on whether there is a fixed pane or not.
|
|
48
|
+
*/
|
|
49
|
+
minAfter?: number | string;
|
|
50
|
+
/**
|
|
51
|
+
* The minimum size. Can be either a string with px or %.
|
|
52
|
+
* If it is a number it will be interpreted based on whether there is a fixed pane or not.
|
|
53
|
+
*/
|
|
54
|
+
maxAfter?: number | string;
|
|
55
|
+
/**
|
|
56
|
+
* When the position has been changed.
|
|
57
|
+
* @remarks This is not fired during drag.
|
|
58
|
+
* @param position
|
|
59
|
+
*/
|
|
60
|
+
onPositionChange?: (position: {
|
|
61
|
+
pixels: number;
|
|
62
|
+
percent: number;
|
|
63
|
+
}) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Determine the direction of the scrollPane
|
|
66
|
+
*/
|
|
67
|
+
splitDirection?: 'row' | 'column';
|
|
68
|
+
disabled?: boolean;
|
|
69
|
+
propsResizer?: SplitPaneResizerProps;
|
|
70
|
+
propsPane?: React.HTMLAttributes<HTMLElement>;
|
|
71
|
+
propsPaneBefore?: React.HTMLAttributes<HTMLElement>;
|
|
72
|
+
propsPaneAfter?: React.HTMLAttributes<HTMLElement>;
|
|
73
|
+
onDragStart?: () => void;
|
|
74
|
+
onDragResize?: (position: number) => void;
|
|
75
|
+
onDragFinish?: (position: number) => void;
|
|
76
|
+
renderResizer?: (props: SplitPaneResizerProps) => React.ReactElement;
|
|
77
|
+
/**
|
|
78
|
+
* A ref that points to the HTMLDivElement.
|
|
79
|
+
*/
|
|
80
|
+
ref?: React.Ref<ISplitPaneElement>;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* SplitPane
|
|
84
|
+
* A component can have two children and will add a resizer between the two.
|
|
85
|
+
* @remarks
|
|
86
|
+
*
|
|
87
|
+
* Because this component measures the elements (both panes and the resizer) it is important
|
|
88
|
+
* that none of these have margins or paddings. If these are required then use a nested element.
|
|
89
|
+
*/
|
|
90
|
+
export declare const SplitPane: React.NamedExoticComponent<Omit<SplitPaneProps, "ref"> & React.RefAttributes<ISplitPaneElement>>;
|
|
91
|
+
//# sourceMappingURL=SplitPane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SplitPane.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OAAO,CAAC;IAEnB,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC9C,eAAe,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IACpD,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAEnD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAE1C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,KAAK,CAAC,YAAY,CAAC;IAErE;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;CACpC;AA2JD;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,kGA2SpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SplitPaneResizerProps extends React.HTMLAttributes<HTMLDivElement>, React.Attributes {
|
|
3
|
+
splitDirection?: 'row' | 'column';
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
paddingBefore?: number;
|
|
6
|
+
paddingAfter?: number;
|
|
7
|
+
propsHitArea?: React.HTMLAttributes<HTMLDivElement>;
|
|
8
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
9
|
+
}
|
|
10
|
+
export declare const SplitPaneResizer: (props: SplitPaneResizerProps) => React.ReactElement;
|
|
11
|
+
//# sourceMappingURL=SplitPaneResizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SplitPaneResizer.d.ts","sourceRoot":"","sources":["../../../../src/splitPane/SplitPaneResizer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,WAAW,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,UAAU;IACnG,cAAc,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IAEpD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,KAAG,KAAK,CAAC,YA4CrE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/splitPane/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
|