@constructive-io/ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/alert-dialog.d.ts +31 -0
- package/dist/components/alert-dialog.js +314 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/alert.d.ts +14 -0
- package/dist/components/alert.js +38 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/autocomplete.d.ts +28 -0
- package/dist/components/autocomplete.js +395 -0
- package/dist/components/autocomplete.js.map +1 -0
- package/dist/components/avatar.d.ts +13 -0
- package/dist/components/avatar.js +37 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +15 -0
- package/dist/components/badge.js +43 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/breadcrumb.d.ts +14 -0
- package/dist/components/breadcrumb.js +154 -0
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/button.d.ts +17 -0
- package/dist/components/button.js +62 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar-rac.d.ts +13 -0
- package/dist/components/calendar-rac.js +82 -0
- package/dist/components/calendar-rac.js.map +1 -0
- package/dist/components/card.d.ts +19 -0
- package/dist/components/card.js +75 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/checkbox-group.d.ts +7 -0
- package/dist/components/checkbox-group.js +16 -0
- package/dist/components/checkbox-group.js.map +1 -0
- package/dist/components/checkbox.d.ts +8 -0
- package/dist/components/checkbox.js +67 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/collapsible.d.ts +54 -0
- package/dist/components/collapsible.js +121 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/combobox.d.ts +44 -0
- package/dist/components/combobox.js +486 -0
- package/dist/components/combobox.js.map +1 -0
- package/dist/components/command.d.ts +43 -0
- package/dist/components/command.js +690 -0
- package/dist/components/command.js.map +1 -0
- package/dist/components/dialog.d.ts +35 -0
- package/dist/components/dialog.js +440 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dock.d.ts +31 -0
- package/dist/components/dock.js +111 -0
- package/dist/components/dock.js.map +1 -0
- package/dist/components/drawer.d.ts +16 -0
- package/dist/components/drawer.js +147 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +50 -0
- package/dist/components/dropdown-menu.js +380 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/field.d.ts +51 -0
- package/dist/components/field.js +115 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/flickering-grid.d.ts +15 -0
- package/dist/components/flickering-grid.js +147 -0
- package/dist/components/flickering-grid.js.map +1 -0
- package/dist/components/form-control.d.ts +15 -0
- package/dist/components/form-control.js +173 -0
- package/dist/components/form-control.js.map +1 -0
- package/dist/components/form.d.ts +37 -0
- package/dist/components/form.js +179 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/input-group.d.ts +18 -0
- package/dist/components/input-group.js +177 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input.d.ts +11 -0
- package/dist/components/input.js +60 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/json-input.d.ts +25 -0
- package/dist/components/json-input.js +351 -0
- package/dist/components/json-input.js.map +1 -0
- package/dist/components/label.d.ts +11 -0
- package/dist/components/label.js +27 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/motion-grid.d.ts +20 -0
- package/dist/components/motion-grid.js +81 -0
- package/dist/components/motion-grid.js.map +1 -0
- package/dist/components/multi-select.d.ts +198 -0
- package/dist/components/multi-select.js +882 -0
- package/dist/components/multi-select.js.map +1 -0
- package/dist/components/page-header.d.ts +17 -0
- package/dist/components/page-header.js +17 -0
- package/dist/components/page-header.js.map +1 -0
- package/dist/components/pagination.d.ts +19 -0
- package/dist/components/pagination.js +144 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/popover.d.ts +35 -0
- package/dist/components/popover.js +188 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/portal.d.ts +108 -0
- package/dist/components/portal.js +75 -0
- package/dist/components/portal.js.map +1 -0
- package/dist/components/progress.d.ts +10 -0
- package/dist/components/progress.js +30 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/progressive-blur-scroll-container.d.ts +25 -0
- package/dist/components/progressive-blur-scroll-container.js +142 -0
- package/dist/components/progressive-blur-scroll-container.js.map +1 -0
- package/dist/components/progressive-blur.d.ts +16 -0
- package/dist/components/progressive-blur.js +68 -0
- package/dist/components/progressive-blur.js.map +1 -0
- package/dist/components/radio-group.d.ts +10 -0
- package/dist/components/radio-group.js +37 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/record-picker.d.ts +16 -0
- package/dist/components/record-picker.js +366 -0
- package/dist/components/record-picker.js.map +1 -0
- package/dist/components/resizable.d.ts +11 -0
- package/dist/components/resizable.js +52 -0
- package/dist/components/resizable.js.map +1 -0
- package/dist/components/responsive-diagram.d.ts +10 -0
- package/dist/components/responsive-diagram.js +63 -0
- package/dist/components/responsive-diagram.js.map +1 -0
- package/dist/components/scroll-area.d.ts +12 -0
- package/dist/components/scroll-area.js +69 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.d.ts +47 -0
- package/dist/components/select.js +287 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +11 -0
- package/dist/components/separator.js +24 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/sheet.d.ts +112 -0
- package/dist/components/sheet.js +600 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/sidebar.d.ts +77 -0
- package/dist/components/sidebar.js +1217 -0
- package/dist/components/sidebar.js.map +1 -0
- package/dist/components/skeleton.d.ts +7 -0
- package/dist/components/skeleton.js +16 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/sonner.d.ts +10 -0
- package/dist/components/sonner.js +23 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/stack/index.d.ts +663 -0
- package/dist/components/stack/index.js +1418 -0
- package/dist/components/stack/index.js.map +1 -0
- package/dist/components/stepper.d.ts +30 -0
- package/dist/components/stepper.js +280 -0
- package/dist/components/stepper.js.map +1 -0
- package/dist/components/switch.d.ts +8 -0
- package/dist/components/switch.js +40 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +15 -0
- package/dist/components/table.js +65 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +10 -0
- package/dist/components/tabs.js +48 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/tags.d.ts +42 -0
- package/dist/components/tags.js +728 -0
- package/dist/components/tags.js.map +1 -0
- package/dist/components/textarea.d.ts +10 -0
- package/dist/components/textarea.js +54 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/toast/index.d.ts +52 -0
- package/dist/components/toast/index.js +221 -0
- package/dist/components/toast/index.js.map +1 -0
- package/dist/components/tooltip.d.ts +29 -0
- package/dist/components/tooltip.js +174 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/unlink-button.d.ts +14 -0
- package/dist/components/unlink-button.js +91 -0
- package/dist/components/unlink-button.js.map +1 -0
- package/dist/index.cjs +7692 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2157 -0
- package/dist/index.d.ts +2157 -0
- package/dist/index.js +7375 -0
- package/dist/index.js.map +1 -0
- package/package.json +490 -0
- package/src/styles/globals.css +397 -0
|
@@ -0,0 +1,663 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import { ComponentType } from 'react';
|
|
4
|
+
import * as _use_gesture_react from '@use-gesture/react';
|
|
5
|
+
import { useDrag } from '@use-gesture/react';
|
|
6
|
+
import { Variants, Transition } from 'motion/react';
|
|
7
|
+
|
|
8
|
+
type CardId = string;
|
|
9
|
+
type CardComponent<P = unknown> = ComponentType<P & CardInjectedProps>;
|
|
10
|
+
/** Configuration for the stack backdrop overlay */
|
|
11
|
+
type BackdropConfig = {
|
|
12
|
+
/** Enable backdrop blur effect (default: false) */
|
|
13
|
+
blur?: boolean;
|
|
14
|
+
/** Custom class name for full styling control */
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
/** Props injected into every card component */
|
|
18
|
+
type CardInjectedProps = {
|
|
19
|
+
card: {
|
|
20
|
+
id: CardId;
|
|
21
|
+
/**
|
|
22
|
+
* Push a new card from this card.
|
|
23
|
+
* Default: replaces all cards above this card, then pushes the new card.
|
|
24
|
+
* Use { append: true } to just push on top of the entire stack.
|
|
25
|
+
*/
|
|
26
|
+
push: <P>(card: Omit<CardSpec<P>, 'id'> & {
|
|
27
|
+
id?: CardId;
|
|
28
|
+
}, options?: CardPushOptions) => CardId;
|
|
29
|
+
close: () => void;
|
|
30
|
+
setTitle: (title?: string) => void;
|
|
31
|
+
setDescription: (description?: string) => void;
|
|
32
|
+
setWidth: (width?: string | number) => void;
|
|
33
|
+
updateProps: <P>(patch: Partial<P> | ((prev: P) => P)) => void;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
type CardSpec<P = unknown> = {
|
|
37
|
+
/** Unique identifier for this card instance */
|
|
38
|
+
id: CardId;
|
|
39
|
+
/** Display title in card header */
|
|
40
|
+
title?: string;
|
|
41
|
+
/** Display description/subtitle in card header */
|
|
42
|
+
description?: string;
|
|
43
|
+
/** Header size variant - controls title/description size, weight, and height */
|
|
44
|
+
headerSize?: 'sm' | 'md' | 'lg';
|
|
45
|
+
/** React component to render */
|
|
46
|
+
Component: CardComponent<P>;
|
|
47
|
+
/** Props passed to Component (excluding injected card props) */
|
|
48
|
+
props?: P;
|
|
49
|
+
/** Width override (CSS value) - default: 480px */
|
|
50
|
+
width?: string | number;
|
|
51
|
+
/** Custom peek offset for this card when cards stack above it (default: 24px) */
|
|
52
|
+
peekOffset?: number;
|
|
53
|
+
/**
|
|
54
|
+
* When true, this card can be fully covered by cards above it (no guaranteed peek).
|
|
55
|
+
* Use this escape hatch for cards where visibility isn't required when buried in stack.
|
|
56
|
+
* Default: false (card always peeks past cards above it)
|
|
57
|
+
*/
|
|
58
|
+
allowCover?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Show backdrop behind the stack when this card is the first card.
|
|
61
|
+
* Default: inherits from CardStackViewport's backdrop prop (true).
|
|
62
|
+
* Set to false for panel/sidebar-like cards that shouldn't obscure background.
|
|
63
|
+
* Pass an object to configure blur and styling.
|
|
64
|
+
*/
|
|
65
|
+
backdrop?: boolean | BackdropConfig;
|
|
66
|
+
/**
|
|
67
|
+
* Callback fired when this card is removed from the stack.
|
|
68
|
+
* Fires regardless of how the card was closed (swipe, backdrop, escape, api.dismiss, etc.)
|
|
69
|
+
*/
|
|
70
|
+
onClose?: () => void;
|
|
71
|
+
/** Arbitrary metadata for analytics/debugging */
|
|
72
|
+
meta?: Record<string, unknown>;
|
|
73
|
+
};
|
|
74
|
+
type CardRouteDefinition<P = unknown> = {
|
|
75
|
+
/** Component to render for this route */
|
|
76
|
+
Component: CardComponent<P>;
|
|
77
|
+
/** Generate unique ID from props (default: route key) */
|
|
78
|
+
getId?: (props?: P) => CardId;
|
|
79
|
+
/** Default title for cards opened via this route */
|
|
80
|
+
defaultTitle?: string;
|
|
81
|
+
/** Default width for cards opened via this route */
|
|
82
|
+
defaultWidth?: string | number;
|
|
83
|
+
/** Default peek offset for cards opened via this route */
|
|
84
|
+
defaultPeekOffset?: number;
|
|
85
|
+
};
|
|
86
|
+
type CardRouteMap = Record<string, CardRouteDefinition<unknown>>;
|
|
87
|
+
type LayoutMode = 'cascade' | 'side-by-side';
|
|
88
|
+
/** Options for dismiss operation */
|
|
89
|
+
type DismissOptions = {
|
|
90
|
+
/**
|
|
91
|
+
* When true (default), dismissing a card also dismisses all cards above it.
|
|
92
|
+
* When false, only the specified card is removed (escape hatch).
|
|
93
|
+
*/
|
|
94
|
+
cascade?: boolean;
|
|
95
|
+
};
|
|
96
|
+
/** Options for push operation */
|
|
97
|
+
type PushOptions = {
|
|
98
|
+
/**
|
|
99
|
+
* If provided, removes all cards above this card ID before pushing.
|
|
100
|
+
* Used internally by card.push() to implement replace-from-current behavior.
|
|
101
|
+
*/
|
|
102
|
+
replaceFrom?: CardId;
|
|
103
|
+
};
|
|
104
|
+
/** Options for push from within a card (injected card.push) */
|
|
105
|
+
type CardPushOptions = {
|
|
106
|
+
/**
|
|
107
|
+
* When true, just push on top of the entire stack (escape hatch).
|
|
108
|
+
* When false (default), replace cards above the current card first.
|
|
109
|
+
*/
|
|
110
|
+
append?: boolean;
|
|
111
|
+
};
|
|
112
|
+
type CardStackApi = {
|
|
113
|
+
/** Get the topmost card spec, or null if empty */
|
|
114
|
+
top: () => CardSpec | null;
|
|
115
|
+
/** Get the ID of the topmost card, or null if empty */
|
|
116
|
+
currentId: () => CardId | null;
|
|
117
|
+
/** Check if stack has cards that can be popped */
|
|
118
|
+
canPop: () => boolean;
|
|
119
|
+
/** Get total number of cards in stack */
|
|
120
|
+
size: () => number;
|
|
121
|
+
/** Get a specific card by ID, or null if not found */
|
|
122
|
+
get: (id: CardId) => CardSpec | null;
|
|
123
|
+
/** Get all cards in stack (bottom to top order) */
|
|
124
|
+
getAll: () => CardSpec[];
|
|
125
|
+
/** Check if a specific card exists in the stack */
|
|
126
|
+
has: (id: CardId) => boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Push a new card onto the stack. Returns the card ID.
|
|
129
|
+
* Use { replaceFrom: cardId } to remove cards above that card first.
|
|
130
|
+
*/
|
|
131
|
+
push: <P>(card: CardSpec<P>, options?: PushOptions) => CardId;
|
|
132
|
+
/** Push a card by registered route key. Returns the card ID. */
|
|
133
|
+
pushRoute: <P>(route: string, props?: P, opts?: {
|
|
134
|
+
id?: CardId;
|
|
135
|
+
title?: string;
|
|
136
|
+
width?: string | number;
|
|
137
|
+
}) => CardId;
|
|
138
|
+
/** Pop one or more cards from the stack */
|
|
139
|
+
pop: (count?: number) => void;
|
|
140
|
+
/** Pop cards until the specified ID is on top */
|
|
141
|
+
popTo: (id: CardId) => void;
|
|
142
|
+
/** Replace the top card with a new one. Returns the new card ID. */
|
|
143
|
+
replaceTop: <P>(card: CardSpec<P>) => CardId;
|
|
144
|
+
/** Reset the entire stack to a specific set of cards */
|
|
145
|
+
reset: (cards: CardSpec[]) => void;
|
|
146
|
+
/** Clear all cards from the stack */
|
|
147
|
+
clear: () => void;
|
|
148
|
+
/** Update props for a specific card */
|
|
149
|
+
updateProps: <P>(id: CardId, patch: Partial<P> | ((prev: P) => P)) => void;
|
|
150
|
+
/** Update the title for a specific card */
|
|
151
|
+
setTitle: (id: CardId, title?: string) => void;
|
|
152
|
+
/** Update the description for a specific card */
|
|
153
|
+
setDescription: (id: CardId, description?: string) => void;
|
|
154
|
+
/** Update the width for a specific card */
|
|
155
|
+
setWidth: (id: CardId, width?: string | number) => void;
|
|
156
|
+
/**
|
|
157
|
+
* Remove a card from the stack.
|
|
158
|
+
* By default (cascade: true), also removes all cards above it.
|
|
159
|
+
* Use { cascade: false } to remove only the specified card.
|
|
160
|
+
*/
|
|
161
|
+
dismiss: (id: CardId, options?: DismissOptions) => void;
|
|
162
|
+
/** Insert a card at a specific index (0 = bottom) */
|
|
163
|
+
insertAt: <P>(index: number, card: CardSpec<P>) => CardId;
|
|
164
|
+
};
|
|
165
|
+
type CardStackProviderProps = {
|
|
166
|
+
children: React.ReactNode;
|
|
167
|
+
/** Route registry for string-based navigation */
|
|
168
|
+
routes?: CardRouteMap;
|
|
169
|
+
/** Initial stack state */
|
|
170
|
+
initial?: CardSpec[];
|
|
171
|
+
/** Callback when stack changes */
|
|
172
|
+
onChange?: (stack: CardSpec[]) => void;
|
|
173
|
+
/** Z-index base for the stack (default: 100) */
|
|
174
|
+
zIndexBase?: number;
|
|
175
|
+
/**
|
|
176
|
+
* Layout mode for visible cards:
|
|
177
|
+
* - 'cascade': Cards peek behind each other with offset (default)
|
|
178
|
+
* - 'side-by-side': Second card pushed fully left, creating master-detail layout
|
|
179
|
+
*/
|
|
180
|
+
layoutMode?: LayoutMode;
|
|
181
|
+
/** Default peek offset in pixels (default: 24) */
|
|
182
|
+
defaultPeekOffset?: number;
|
|
183
|
+
/** Default card width (default: 480) */
|
|
184
|
+
defaultWidth?: string | number;
|
|
185
|
+
};
|
|
186
|
+
type AnimationConfig = {
|
|
187
|
+
/** Entry/exit duration in seconds (default: 0.2) */
|
|
188
|
+
duration?: number;
|
|
189
|
+
/** Entry easing (default: [0.32, 0.72, 0, 1]) */
|
|
190
|
+
enterEase?: number[];
|
|
191
|
+
/** Exit easing (default: [0.4, 0, 0.6, 1]) */
|
|
192
|
+
exitEase?: number[];
|
|
193
|
+
};
|
|
194
|
+
type GestureConfig = {
|
|
195
|
+
/** Enable swipe-right-to-pop gesture (default: true on mobile) */
|
|
196
|
+
swipeToPop?: boolean;
|
|
197
|
+
/** Minimum swipe distance to trigger pop (default: 35% of viewport width, min 120px) */
|
|
198
|
+
swipeThreshold?: number;
|
|
199
|
+
/** Velocity threshold for quick swipe (default: 600px/s, requires minimum distance) */
|
|
200
|
+
velocityThreshold?: number;
|
|
201
|
+
/** Auto-dismiss X position while dragging (default: 80% of viewport width) */
|
|
202
|
+
autoDismissThreshold?: number;
|
|
203
|
+
};
|
|
204
|
+
type PeekGestureConfig = {
|
|
205
|
+
/** Enable peek zone interactions (default: true) */
|
|
206
|
+
enabled?: boolean;
|
|
207
|
+
/** Enable drag-to-dismiss on peek zone (default: true) */
|
|
208
|
+
dragToDismiss?: boolean;
|
|
209
|
+
/** Hover expansion in pixels (default: 48) */
|
|
210
|
+
hoverExpansion?: number;
|
|
211
|
+
/** Minimum drag distance to trigger dismiss (default: 80px) */
|
|
212
|
+
dragThreshold?: number;
|
|
213
|
+
/** Velocity threshold for quick drag dismiss (default: 400px/s) */
|
|
214
|
+
dragVelocityThreshold?: number;
|
|
215
|
+
};
|
|
216
|
+
type MobileConfig = {
|
|
217
|
+
/** Breakpoint for mobile behavior in pixels (default: 768) */
|
|
218
|
+
breakpoint?: number;
|
|
219
|
+
/** Force full-screen cards on mobile (default: true) */
|
|
220
|
+
fullScreen?: boolean;
|
|
221
|
+
/** Gesture configuration for mobile */
|
|
222
|
+
gestures?: GestureConfig;
|
|
223
|
+
};
|
|
224
|
+
type CardStackViewportProps = {
|
|
225
|
+
/** Show backdrop behind first card (default: true). Pass object to configure blur/styling. */
|
|
226
|
+
backdrop?: boolean | BackdropConfig;
|
|
227
|
+
/** Custom backdrop element */
|
|
228
|
+
renderBackdrop?: () => React.ReactNode;
|
|
229
|
+
/** Custom header renderer per card */
|
|
230
|
+
renderHeader?: (card: CardSpec, api: CardStackApi) => React.ReactNode;
|
|
231
|
+
/** Custom empty state when stack is empty */
|
|
232
|
+
renderEmpty?: () => React.ReactNode;
|
|
233
|
+
/** Number of previous cards to render for peek effect (default: 2) */
|
|
234
|
+
peekDepth?: number;
|
|
235
|
+
/** Animation configuration */
|
|
236
|
+
animation?: AnimationConfig;
|
|
237
|
+
/** Mobile-specific configuration */
|
|
238
|
+
mobile?: MobileConfig;
|
|
239
|
+
/** Peek zone gesture configuration */
|
|
240
|
+
peekGestures?: PeekGestureConfig;
|
|
241
|
+
/** Additional class for viewport container */
|
|
242
|
+
className?: string;
|
|
243
|
+
};
|
|
244
|
+
type StackState = {
|
|
245
|
+
cards: CardSpec[];
|
|
246
|
+
};
|
|
247
|
+
type StackAction = {
|
|
248
|
+
type: 'PUSH';
|
|
249
|
+
card: CardSpec;
|
|
250
|
+
} | {
|
|
251
|
+
type: 'POP';
|
|
252
|
+
count: number;
|
|
253
|
+
} | {
|
|
254
|
+
type: 'POP_TO';
|
|
255
|
+
id: CardId;
|
|
256
|
+
} | {
|
|
257
|
+
type: 'REPLACE_TOP';
|
|
258
|
+
card: CardSpec;
|
|
259
|
+
} | {
|
|
260
|
+
type: 'RESET';
|
|
261
|
+
cards: CardSpec[];
|
|
262
|
+
} | {
|
|
263
|
+
type: 'CLEAR';
|
|
264
|
+
} | {
|
|
265
|
+
type: 'UPDATE_PROPS';
|
|
266
|
+
id: CardId;
|
|
267
|
+
patch: unknown;
|
|
268
|
+
} | {
|
|
269
|
+
type: 'SET_TITLE';
|
|
270
|
+
id: CardId;
|
|
271
|
+
title?: string;
|
|
272
|
+
} | {
|
|
273
|
+
type: 'SET_DESCRIPTION';
|
|
274
|
+
id: CardId;
|
|
275
|
+
description?: string;
|
|
276
|
+
} | {
|
|
277
|
+
type: 'SET_WIDTH';
|
|
278
|
+
id: CardId;
|
|
279
|
+
width?: string | number;
|
|
280
|
+
} | {
|
|
281
|
+
type: 'DISMISS';
|
|
282
|
+
id: CardId;
|
|
283
|
+
cascade: boolean;
|
|
284
|
+
} | {
|
|
285
|
+
type: 'INSERT_AT';
|
|
286
|
+
index: number;
|
|
287
|
+
card: CardSpec;
|
|
288
|
+
};
|
|
289
|
+
type StackContextValue = {
|
|
290
|
+
state: StackState;
|
|
291
|
+
api: CardStackApi;
|
|
292
|
+
config: {
|
|
293
|
+
routes: CardRouteMap;
|
|
294
|
+
zIndexBase: number;
|
|
295
|
+
layoutMode: LayoutMode;
|
|
296
|
+
defaultPeekOffset: number;
|
|
297
|
+
defaultWidth: string | number;
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
declare function CardStackProvider({ children, routes, initial, onChange, zIndexBase, layoutMode, defaultPeekOffset, defaultWidth, }: CardStackProviderProps): react_jsx_runtime.JSX.Element;
|
|
302
|
+
declare function useCardStack(): CardStackApi;
|
|
303
|
+
declare function useStackContext(): StackContextValue;
|
|
304
|
+
/** Hook to get current layout mode */
|
|
305
|
+
declare function useStackLayoutMode(): LayoutMode;
|
|
306
|
+
/** Hook to get stack cards (triggers re-render on change) */
|
|
307
|
+
declare function useStackCards(): CardSpec[];
|
|
308
|
+
/** Hook to check if a card is the top card */
|
|
309
|
+
declare function useIsTopCard(id: CardId): boolean;
|
|
310
|
+
/** Hook to get card index in stack */
|
|
311
|
+
declare function useCardIndex(id: CardId): number;
|
|
312
|
+
/** Create injected card props for a specific card */
|
|
313
|
+
declare function useCardInjectedProps(id: CardId): {
|
|
314
|
+
card: {
|
|
315
|
+
id: string;
|
|
316
|
+
push: <P>(card: Omit<CardSpec<P>, "id"> & {
|
|
317
|
+
id?: CardId;
|
|
318
|
+
}, options?: CardPushOptions) => CardId;
|
|
319
|
+
close: () => void;
|
|
320
|
+
setTitle: (title?: string) => void;
|
|
321
|
+
setDescription: (description?: string) => void;
|
|
322
|
+
setWidth: (width?: string | number) => void;
|
|
323
|
+
updateProps: <P>(patch: Partial<P> | ((prev: P) => P)) => void;
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* Hook to check if the card's enter animation is complete.
|
|
328
|
+
* Use this to defer data fetching until after the slide-in animation.
|
|
329
|
+
*
|
|
330
|
+
* @example
|
|
331
|
+
* ```tsx
|
|
332
|
+
* function MyCard() {
|
|
333
|
+
* const { isReady } = useCardReady();
|
|
334
|
+
*
|
|
335
|
+
* // Data query that only runs after animation completes
|
|
336
|
+
* const { data, isLoading } = useQuery({
|
|
337
|
+
* queryKey: ['myData'],
|
|
338
|
+
* queryFn: fetchData,
|
|
339
|
+
* enabled: isReady, // Don't fetch until animation done
|
|
340
|
+
* });
|
|
341
|
+
*
|
|
342
|
+
* return (
|
|
343
|
+
* <Select disabled={isLoading || !isReady}>
|
|
344
|
+
* {data?.map(item => <SelectItem key={item.id}>{item.name}</SelectItem>)}
|
|
345
|
+
* </Select>
|
|
346
|
+
* );
|
|
347
|
+
* }
|
|
348
|
+
* ```
|
|
349
|
+
*/
|
|
350
|
+
declare function useCardReady(): {
|
|
351
|
+
isReady: boolean;
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
declare function CardStackViewport({ backdrop, renderBackdrop, renderHeader, renderEmpty, peekDepth, animation, mobile, peekGestures, className, }: CardStackViewportProps): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
355
|
+
|
|
356
|
+
type StackBackdropProps = {
|
|
357
|
+
/** Additional class names */
|
|
358
|
+
className?: string;
|
|
359
|
+
/** Click handler (typically closes the stack) */
|
|
360
|
+
onClick?: () => void;
|
|
361
|
+
/** Backdrop configuration (blur, custom className) */
|
|
362
|
+
config?: BackdropConfig;
|
|
363
|
+
};
|
|
364
|
+
declare function StackBackdrop({ className, onClick, config: backdropConfig }: StackBackdropProps): react_jsx_runtime.JSX.Element;
|
|
365
|
+
|
|
366
|
+
type StackHeaderProps = {
|
|
367
|
+
/** The card spec */
|
|
368
|
+
card: CardSpec;
|
|
369
|
+
/** Close handler */
|
|
370
|
+
onClose: () => void;
|
|
371
|
+
/** Additional class names */
|
|
372
|
+
className?: string;
|
|
373
|
+
/** Custom title renderer */
|
|
374
|
+
renderTitle?: (card: CardSpec) => React$1.ReactNode;
|
|
375
|
+
};
|
|
376
|
+
declare function StackHeader({ card, onClose, className, renderTitle }: StackHeaderProps): react_jsx_runtime.JSX.Element;
|
|
377
|
+
type StackHeaderSlotProps = {
|
|
378
|
+
/** Additional class names */
|
|
379
|
+
className?: string;
|
|
380
|
+
children: React$1.ReactNode;
|
|
381
|
+
};
|
|
382
|
+
/** Slot for custom header content */
|
|
383
|
+
declare function StackHeaderSlot({ className, children }: StackHeaderSlotProps): react_jsx_runtime.JSX.Element;
|
|
384
|
+
|
|
385
|
+
type StackCardProps = {
|
|
386
|
+
/** The card specification */
|
|
387
|
+
card: CardSpec;
|
|
388
|
+
/** Index of this card in the stack */
|
|
389
|
+
index: number;
|
|
390
|
+
/** Total number of cards in the stack */
|
|
391
|
+
totalCards: number;
|
|
392
|
+
/** Width of the top card (for side-by-side calculations) */
|
|
393
|
+
topCardWidth: number;
|
|
394
|
+
/** Animation configuration */
|
|
395
|
+
animation?: AnimationConfig;
|
|
396
|
+
/** Whether this is a mobile viewport */
|
|
397
|
+
isMobile?: boolean;
|
|
398
|
+
/** Gesture configuration for mobile */
|
|
399
|
+
gestureConfig?: GestureConfig;
|
|
400
|
+
/** Peek gesture configuration */
|
|
401
|
+
peekGestureConfig?: PeekGestureConfig;
|
|
402
|
+
/** Custom header renderer */
|
|
403
|
+
renderHeader?: (card: CardSpec, api: CardStackApi) => React$1.ReactNode;
|
|
404
|
+
/** Compression ratio for responsive offset (1 = full, 0 = collapsed) */
|
|
405
|
+
compressionRatio?: number;
|
|
406
|
+
/** Adjusted peek offset after compression */
|
|
407
|
+
adjustedPeekOffset?: number;
|
|
408
|
+
/** Drag state from gesture hook (for top card swipe-to-dismiss) */
|
|
409
|
+
dragX?: number;
|
|
410
|
+
/** Gesture bind from @use-gesture/react */
|
|
411
|
+
gestureBind?: ReturnType<typeof _use_gesture_react.useDrag>;
|
|
412
|
+
/** Whether this card's peek zone is hovered (viewport-coordinated) */
|
|
413
|
+
isPeekHovered?: boolean;
|
|
414
|
+
/** Callback when peek hover starts */
|
|
415
|
+
onPeekHoverStart?: (cardIndex: number) => void;
|
|
416
|
+
/** Callback when peek hover ends */
|
|
417
|
+
onPeekHoverEnd?: (cardIndex: number) => void;
|
|
418
|
+
/** Peek drag offset applied to this card (when cards above are being dragged via peek zone) */
|
|
419
|
+
peekDragOffset?: number;
|
|
420
|
+
/** Callback when peek drag starts on this card's peek zone */
|
|
421
|
+
onPeekDragStart?: (cardIndex: number) => void;
|
|
422
|
+
/** Callback during peek drag on this card's peek zone */
|
|
423
|
+
onPeekDrag?: (cardIndex: number, offset: number) => void;
|
|
424
|
+
/** Callback when peek drag ends on this card's peek zone */
|
|
425
|
+
onPeekDragEnd?: (cardIndex: number, shouldDismiss: boolean) => void;
|
|
426
|
+
/** Whether this is the last card (for exit animation with fade) */
|
|
427
|
+
isLastCard?: boolean;
|
|
428
|
+
/** Additional class name for the card */
|
|
429
|
+
className?: string;
|
|
430
|
+
};
|
|
431
|
+
declare function StackCardInner({ card, index, totalCards, topCardWidth, animation, isMobile, renderHeader, peekGestureConfig, compressionRatio, adjustedPeekOffset, dragX, gestureBind, isPeekHovered, onPeekHoverStart, onPeekHoverEnd, peekDragOffset, onPeekDragStart, onPeekDrag, onPeekDragEnd, isLastCard, className, }: StackCardProps): react_jsx_runtime.JSX.Element;
|
|
432
|
+
declare const StackCard: React$1.MemoExoticComponent<typeof StackCardInner>;
|
|
433
|
+
|
|
434
|
+
interface DeferredCardContentProps {
|
|
435
|
+
children: React.ReactNode;
|
|
436
|
+
/** Custom placeholder while waiting for animation to complete */
|
|
437
|
+
placeholder?: React.ReactNode;
|
|
438
|
+
/** Delay in ms before showing content (default: 220, slightly after 200ms animation) */
|
|
439
|
+
delay?: number;
|
|
440
|
+
/** Whether to show content immediately (useful for edit mode where data is cached) */
|
|
441
|
+
immediate?: boolean;
|
|
442
|
+
/**
|
|
443
|
+
* Priority level for scheduling content render:
|
|
444
|
+
* - 'high': Uses half the delay for faster content display
|
|
445
|
+
* - 'normal': Standard delay with rAF (default)
|
|
446
|
+
* - 'low': Uses requestIdleCallback when available for non-critical content
|
|
447
|
+
*/
|
|
448
|
+
priority?: 'high' | 'normal' | 'low';
|
|
449
|
+
/** Callback when content becomes ready to render */
|
|
450
|
+
onReady?: () => void;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Defers rendering of heavy content until after Stack card animation completes.
|
|
454
|
+
* This prevents layout thrashing and dropped frames during the slide-in animation.
|
|
455
|
+
*
|
|
456
|
+
* Usage:
|
|
457
|
+
* ```tsx
|
|
458
|
+
* <DeferredCardContent placeholder={<MySkeleton />}>
|
|
459
|
+
* <HeavyContent />
|
|
460
|
+
* </DeferredCardContent>
|
|
461
|
+
* ```
|
|
462
|
+
*
|
|
463
|
+
* With priority:
|
|
464
|
+
* ```tsx
|
|
465
|
+
* <DeferredCardContent priority="low" placeholder={<MySkeleton />}>
|
|
466
|
+
* <NonCriticalContent />
|
|
467
|
+
* </DeferredCardContent>
|
|
468
|
+
* ```
|
|
469
|
+
*/
|
|
470
|
+
declare function DeferredCardContent({ children, placeholder, delay, immediate, priority, onReady, }: DeferredCardContentProps): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element;
|
|
471
|
+
|
|
472
|
+
type UseStackResponsiveOptions = MobileConfig;
|
|
473
|
+
type UseStackResponsiveResult = {
|
|
474
|
+
/** Whether the current viewport is mobile-sized */
|
|
475
|
+
isMobile: boolean;
|
|
476
|
+
/** Current viewport width */
|
|
477
|
+
viewportWidth: number;
|
|
478
|
+
/** The breakpoint being used */
|
|
479
|
+
breakpoint: number;
|
|
480
|
+
};
|
|
481
|
+
/**
|
|
482
|
+
* Hook to detect mobile viewport and provide responsive information.
|
|
483
|
+
*/
|
|
484
|
+
declare function useStackResponsive(options?: UseStackResponsiveOptions): UseStackResponsiveResult;
|
|
485
|
+
/**
|
|
486
|
+
* Simple hook to just get isMobile boolean.
|
|
487
|
+
*/
|
|
488
|
+
declare function useIsMobile(breakpoint?: number): boolean;
|
|
489
|
+
|
|
490
|
+
type UseStackGesturesOptions = GestureConfig & {
|
|
491
|
+
/** Whether gestures are enabled */
|
|
492
|
+
enabled?: boolean;
|
|
493
|
+
/** Callback when swipe completes and should dismiss */
|
|
494
|
+
onDismiss: () => void;
|
|
495
|
+
};
|
|
496
|
+
type UseStackGesturesResult = {
|
|
497
|
+
/** Current drag X offset */
|
|
498
|
+
dragX: number;
|
|
499
|
+
/** Whether currently dragging */
|
|
500
|
+
isDragging: boolean;
|
|
501
|
+
/** Bind function to attach to the draggable element */
|
|
502
|
+
bind: ReturnType<typeof useDrag>;
|
|
503
|
+
};
|
|
504
|
+
/**
|
|
505
|
+
* Hook for swipe-to-dismiss gesture on stack cards using @use-gesture/react.
|
|
506
|
+
*
|
|
507
|
+
* Features:
|
|
508
|
+
* - Only allows swiping to the right (positive X direction)
|
|
509
|
+
* - Ignores touches near left edge (avoids iOS Safari back gesture conflict)
|
|
510
|
+
* - Requires horizontal intent before activating (won't interfere with scroll)
|
|
511
|
+
* - Dismisses on release after distance or velocity threshold
|
|
512
|
+
* - Auto-dismisses near the end of the drag (configurable)
|
|
513
|
+
* - 1:1 finger tracking for responsive feel
|
|
514
|
+
*/
|
|
515
|
+
declare function useStackGestures(options: UseStackGesturesOptions): UseStackGesturesResult;
|
|
516
|
+
|
|
517
|
+
type UsePeekGesturesOptions = PeekGestureConfig & {
|
|
518
|
+
/** Card index in the stack */
|
|
519
|
+
cardIndex: number;
|
|
520
|
+
/** Total cards in stack */
|
|
521
|
+
totalCards: number;
|
|
522
|
+
/** Callback when click on peek zone (dismiss cards above) */
|
|
523
|
+
onPeekClick: () => void;
|
|
524
|
+
/** Callback when drag completes dismiss threshold */
|
|
525
|
+
onPeekDragDismiss: () => void;
|
|
526
|
+
/** Callback during drag to update multi-card offset */
|
|
527
|
+
onPeekDrag?: (dragOffset: number) => void;
|
|
528
|
+
/** Callback when drag ends without dismiss */
|
|
529
|
+
onPeekDragCancel?: () => void;
|
|
530
|
+
};
|
|
531
|
+
type UsePeekGesturesResult = {
|
|
532
|
+
/** Whether peek zone is hovered */
|
|
533
|
+
isHovered: boolean;
|
|
534
|
+
/** Whether actively dragging */
|
|
535
|
+
isDragging: boolean;
|
|
536
|
+
/** Current drag offset (positive = dragging right/dismiss direction) */
|
|
537
|
+
dragOffset: number;
|
|
538
|
+
/** Hover expansion amount in px */
|
|
539
|
+
hoverExpansion: number;
|
|
540
|
+
/** Handlers for the peek zone element */
|
|
541
|
+
handlers: {
|
|
542
|
+
onMouseEnter: () => void;
|
|
543
|
+
onMouseLeave: () => void;
|
|
544
|
+
onClick: (e: React.MouseEvent) => void;
|
|
545
|
+
onPointerDown: (e: React.PointerEvent) => void;
|
|
546
|
+
onPointerMove: (e: React.PointerEvent) => void;
|
|
547
|
+
onPointerUp: (e: React.PointerEvent) => void;
|
|
548
|
+
onPointerCancel: (e: React.PointerEvent) => void;
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
/**
|
|
552
|
+
* Hook for peek zone interactions: hover expansion, click-to-dismiss, drag-to-dismiss.
|
|
553
|
+
* Works on both mobile and desktop.
|
|
554
|
+
*/
|
|
555
|
+
declare function usePeekGestures(options: UsePeekGesturesOptions): UsePeekGesturesResult;
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Calculate the X offset for a card in cascade mode.
|
|
559
|
+
* Cards below the top are pushed left by (cardsAbove * peekOffset).
|
|
560
|
+
*/
|
|
561
|
+
declare function getCascadeOffset(cardIndex: number, totalCards: number, cards: CardSpec[], defaultPeekOffset: number): number;
|
|
562
|
+
/**
|
|
563
|
+
* Calculate the X offset for a card in side-by-side mode.
|
|
564
|
+
* - Top card: no offset
|
|
565
|
+
* - Second card: pushed by top card's width (fully visible side-by-side)
|
|
566
|
+
* - Deeper cards: cascade further with peekOffset increments
|
|
567
|
+
*/
|
|
568
|
+
declare function getSideBySideOffset(cardIndex: number, totalCards: number, topCardWidth: number, defaultPeekOffset: number): number;
|
|
569
|
+
/**
|
|
570
|
+
* Get the offset for a card based on layout mode.
|
|
571
|
+
*/
|
|
572
|
+
declare function getCardOffset(cardIndex: number, totalCards: number, cards: CardSpec[], layoutMode: LayoutMode, topCardWidth: number, defaultPeekOffset: number): number;
|
|
573
|
+
type ResponsiveOffsetConfig = {
|
|
574
|
+
viewportWidth: number;
|
|
575
|
+
topCardWidth: number;
|
|
576
|
+
secondCardWidth: number;
|
|
577
|
+
totalCards: number;
|
|
578
|
+
defaultPeekOffset: number;
|
|
579
|
+
layoutMode: LayoutMode;
|
|
580
|
+
};
|
|
581
|
+
type ResponsiveOffsetResult = {
|
|
582
|
+
/** Compression ratio (1 = full, 0 = fully compressed) */
|
|
583
|
+
compressionRatio: number;
|
|
584
|
+
/** Whether cards should collapse to mobile/single-card mode */
|
|
585
|
+
shouldCollapse: boolean;
|
|
586
|
+
/** Adjusted peek offset after compression */
|
|
587
|
+
adjustedPeekOffset: number;
|
|
588
|
+
/** Available space for peek offsets */
|
|
589
|
+
availableSpace: number;
|
|
590
|
+
};
|
|
591
|
+
/**
|
|
592
|
+
* Calculate responsive offset compression based on viewport width.
|
|
593
|
+
* As viewport shrinks, offsets compress until hitting mobile breakpoint.
|
|
594
|
+
*
|
|
595
|
+
* The algorithm:
|
|
596
|
+
* 1. Calculate space needed: topCardWidth + secondCardWidth (for side-by-side)
|
|
597
|
+
* 2. Calculate available space: viewportWidth - padding
|
|
598
|
+
* 3. If not enough space, compress the second card's offset
|
|
599
|
+
* 4. When compression reaches threshold, trigger collapse to mobile
|
|
600
|
+
*/
|
|
601
|
+
declare function calculateResponsiveOffset(config: ResponsiveOffsetConfig): ResponsiveOffsetResult;
|
|
602
|
+
/**
|
|
603
|
+
* Get responsive card offset that compresses based on viewport.
|
|
604
|
+
* Ensures every card has at least MIN_VISIBLE_PEEK visible past cards above it.
|
|
605
|
+
*/
|
|
606
|
+
declare function getResponsiveCardOffset(cardIndex: number, totalCards: number, cards: CardSpec[], layoutMode: LayoutMode, topCardWidth: number, adjustedPeekOffset: number, compressionRatio: number, defaultWidth?: number): number;
|
|
607
|
+
/**
|
|
608
|
+
* Normalize width to CSS value.
|
|
609
|
+
*/
|
|
610
|
+
declare function normalizeWidth(width: string | number | undefined, defaultWidth: string | number): string;
|
|
611
|
+
/**
|
|
612
|
+
* Parse width to pixels (for offset calculations).
|
|
613
|
+
* Returns undefined if width cannot be parsed to pixels.
|
|
614
|
+
*/
|
|
615
|
+
declare function parseWidthToPixels(width: string | number | undefined): number | undefined;
|
|
616
|
+
/**
|
|
617
|
+
* Calculate z-index for a card based on its position in the stack.
|
|
618
|
+
*/
|
|
619
|
+
declare function getCardZIndex(cardIndex: number, zIndexBase: number): number;
|
|
620
|
+
/**
|
|
621
|
+
* Determine which cards should be rendered based on peekDepth.
|
|
622
|
+
* Returns indices of cards that should be rendered (from bottom to top).
|
|
623
|
+
*/
|
|
624
|
+
declare function getVisibleCardIndices(totalCards: number, peekDepth: number): number[];
|
|
625
|
+
/**
|
|
626
|
+
* Check if a card should be rendered based on peekDepth.
|
|
627
|
+
*/
|
|
628
|
+
declare function isCardVisible(cardIndex: number, totalCards: number, peekDepth: number): boolean;
|
|
629
|
+
|
|
630
|
+
declare const DEFAULT_ANIMATION_CONFIG: Required<AnimationConfig>;
|
|
631
|
+
/**
|
|
632
|
+
* Create motion variants for card enter/exit animations.
|
|
633
|
+
* Uses transform-only properties for GPU compositing.
|
|
634
|
+
*/
|
|
635
|
+
declare function createCardVariants(config?: AnimationConfig): Variants;
|
|
636
|
+
/**
|
|
637
|
+
* Create transition for offset animations (when cards above change).
|
|
638
|
+
* Uses spring for playful slide-back feel when cards are dismissed.
|
|
639
|
+
*/
|
|
640
|
+
declare function createOffsetTransition(_config?: AnimationConfig): Transition;
|
|
641
|
+
declare const backdropVariants: Variants;
|
|
642
|
+
/**
|
|
643
|
+
* Create spring config for snap-back animation after cancelled swipe.
|
|
644
|
+
*/
|
|
645
|
+
declare const snapBackSpring: Transition;
|
|
646
|
+
/**
|
|
647
|
+
* Create transition for swipe-to-dismiss.
|
|
648
|
+
*/
|
|
649
|
+
declare const swipeDismissTransition: Transition;
|
|
650
|
+
/** Spring config for peek hover expansion - playful and bouncy */
|
|
651
|
+
declare const peekHoverSpring: Transition;
|
|
652
|
+
/** Spring config for peek drag - responsive during interaction */
|
|
653
|
+
declare const peekDragSpring: Transition;
|
|
654
|
+
/** Spring config for multi-card slide during peek drag */
|
|
655
|
+
declare const peekSlideSpring: Transition;
|
|
656
|
+
/**
|
|
657
|
+
* Create variants with reduced motion support.
|
|
658
|
+
* Instant transitions when user prefers reduced motion.
|
|
659
|
+
*/
|
|
660
|
+
declare function createReducedMotionVariants(): Variants;
|
|
661
|
+
declare const reducedMotionBackdropVariants: Variants;
|
|
662
|
+
|
|
663
|
+
export { type AnimationConfig, type BackdropConfig, type CardComponent, type CardId, type CardInjectedProps, type CardPushOptions, type CardRouteDefinition, type CardRouteMap, type CardSpec, type CardStackApi, CardStackProvider, type CardStackProviderProps, CardStackViewport, type CardStackViewportProps, DEFAULT_ANIMATION_CONFIG, DeferredCardContent, type DeferredCardContentProps, type DismissOptions, type GestureConfig, type LayoutMode, type MobileConfig, type PeekGestureConfig, type PushOptions, type ResponsiveOffsetConfig, type ResponsiveOffsetResult, type StackAction, StackBackdrop, type StackBackdropProps, StackCard, type StackCardProps, type StackContextValue, StackHeader, type StackHeaderProps, StackHeaderSlot, type StackHeaderSlotProps, type StackState, type UsePeekGesturesOptions, type UsePeekGesturesResult, type UseStackGesturesResult, type UseStackResponsiveResult, backdropVariants, calculateResponsiveOffset, createCardVariants, createOffsetTransition, createReducedMotionVariants, getCardOffset, getCardZIndex, getCascadeOffset, getResponsiveCardOffset, getSideBySideOffset, getVisibleCardIndices, isCardVisible, normalizeWidth, parseWidthToPixels, peekDragSpring, peekHoverSpring, peekSlideSpring, reducedMotionBackdropVariants, snapBackSpring, swipeDismissTransition, useCardIndex, useCardInjectedProps, useCardReady, useCardStack, useIsMobile, useIsTopCard, usePeekGestures, useStackCards, useStackContext, useStackGestures, useStackLayoutMode, useStackResponsive };
|