epic-modals 1.0.3 → 1.0.4

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/core.d.ts CHANGED
@@ -1,68 +1,3 @@
1
- export declare function acquireModalZIndex(): number;
2
-
3
- export declare function animateModalsToPositions(moves: Map<string, Position>): void;
4
-
5
- export declare const ANIMATION_DURATIONS: {
6
- readonly minimize: 500;
7
- readonly restore: 400;
8
- readonly open: 400;
9
- readonly close: 250;
10
- readonly overlay: 200;
11
- readonly centerAfterResize: 200;
12
- readonly glowStabilize: 1000;
13
- };
14
-
15
- export declare const ANIMATION_NAMES: {
16
- readonly MINIMIZE: "modal-genie-minimize";
17
- readonly RESTORE: "modal-genie-restore";
18
- readonly OPEN: "modal-genie-restore";
19
- readonly CLOSE: "modal-close";
20
- readonly CLOSE_CENTERED: "modal-close-centered";
21
- readonly CHILD_APPEAR: "modal-child-appear";
22
- readonly CHILD_DISAPPEAR: "modal-child-disappear";
23
- };
24
-
25
- export declare interface AnimationController {
26
- getState(): AnimationState;
27
- isAnimating(): boolean;
28
- getAnimationType(): AnimationType;
29
- getTransform(): AnimationTransform | null;
30
- getPendingOpenSource(): Position | null;
31
- setPendingOpenSource(source: Position | null): void;
32
- startMinimize(customTarget?: Position, onComplete?: () => void): boolean;
33
- startRestore(storePosition: Position | undefined, modalSize: Dimensions | undefined): void;
34
- startOpen(): boolean;
35
- startClose(onComplete: () => void): boolean;
36
- forceClearMinimize(): void;
37
- destroy(): void;
38
- subscribe(callback: (state: AnimationState) => void): () => void;
39
- }
40
-
41
- export declare interface AnimationControllerOptions {
42
-
43
- getId: () => string;
44
-
45
- getElement: () => HTMLElement | null;
46
-
47
- getPosition: () => Position;
48
-
49
- setPosition: (pos: Position) => void;
50
-
51
- getHasBeenDragged: () => boolean;
52
-
53
- setHasBeenDragged: (value: boolean) => void;
54
-
55
- getHasBeenResized: () => boolean;
56
-
57
- getSize: () => Dimensions;
58
-
59
- areAnimationsEnabled?: () => boolean;
60
-
61
- onMinimizeComplete?: (position: Position, hasBeenDragged: boolean, size: Dimensions) => void;
62
-
63
- onOpenStart?: () => void;
64
- }
65
-
66
1
  export declare interface AnimationDurations {
67
2
 
68
3
  open: number;
@@ -76,16 +11,6 @@ export declare interface AnimationDurations {
76
11
  easing: string;
77
12
  }
78
13
 
79
- export declare interface AnimationEvents {
80
- change: AnimationState;
81
- animationStart: {
82
- type: AnimationType;
83
- };
84
- animationEnd: {
85
- type: AnimationType;
86
- };
87
- }
88
-
89
14
  export declare interface AnimationOverride {
90
15
  open?: number;
91
16
  close?: number;
@@ -96,12 +21,6 @@ export declare interface AnimationOverride {
96
21
 
97
22
  export declare type AnimationPhase = 'idle' | 'prepare' | 'animate' | 'complete';
98
23
 
99
- export declare interface AnimationState {
100
- type: AnimationType;
101
- isAnimating: boolean;
102
- transform: AnimationTransform | null;
103
- }
104
-
105
24
  export declare interface AnimationTransform {
106
25
  x: number;
107
26
  y: number;
@@ -109,8 +28,6 @@ export declare interface AnimationTransform {
109
28
  originY: number;
110
29
  }
111
30
 
112
- export declare type AnimationType = 'open' | 'close' | 'minimize' | 'restore' | 'attention' | 'none';
113
-
114
31
  export declare interface AppearanceConfig {
115
32
  headerLayout: HeaderLayout;
116
33
  defaultWidth: string;
@@ -127,15 +44,6 @@ export declare interface AppearanceOverride {
127
44
  minHeight?: number;
128
45
  }
129
46
 
130
- export declare function applyLayoutPositions(positions: Map<string, Position>): void;
131
-
132
- declare interface AvailableArea {
133
- x: number;
134
- y: number;
135
- width: number;
136
- height: number;
137
- }
138
-
139
47
  export declare interface BackdropConfig {
140
48
 
141
49
  visible: boolean;
@@ -170,354 +78,17 @@ export declare interface BaseModalProps {
170
78
  onClose?: () => void;
171
79
  }
172
80
 
173
- export declare function batchUpdates(callback: () => void): void;
174
-
175
81
  export declare interface Bounds extends Position, Dimensions {
176
82
  }
177
83
 
178
84
  export declare function bringToFront(id: ModalId): void;
179
85
 
180
- export declare function calculateCenteredChildPosition(parentPosition: Position, parentSize: Dimensions, childSize: Dimensions): Position;
181
-
182
- export declare function calculateChildCenterPosition(parentId: ModalId, childWidth: number, childHeight: number): Position | null;
183
-
184
- export declare function calculateChildPosition(parentPosition: Position, offset: Position): Position;
185
-
186
- export declare function calculateDockDragPosition(clientX: number, clientY: number, dragOffset: Position, dockWidth: number, dockHeight: number, padding?: number): Position;
187
-
188
- declare function calculateEqualSpaceLayout(existingModals: ModalLayoutInfo[], newModal: {
189
- id: string;
190
- width: number;
191
- height: number;
192
- } | null, options?: SmartLayoutOptions): SmartLayoutResult;
193
- export { calculateEqualSpaceLayout }
194
- export { calculateEqualSpaceLayout as calculateSmartLayout }
195
-
196
- export declare function calculateMinDistance(a: {
197
- x: number;
198
- y: number;
199
- width: number;
200
- height: number;
201
- }, b: {
202
- x: number;
203
- y: number;
204
- width: number;
205
- height: number;
206
- }): number;
207
-
208
- export declare function calculateMinimizeTransform(modalPosition: Position, modalSize: Dimensions, targetPosition: Position): AnimationTransform;
209
-
210
- export declare function calculateOffsetFromParent(childPosition: Position, parentPosition: Position): Position;
211
-
212
- export declare function calculateOpenTransform(modalPosition: Position, modalSize: Dimensions, sourcePosition: Position): AnimationTransform;
213
-
214
- export declare function calculateOverlap(a: {
215
- x: number;
216
- y: number;
217
- width: number;
218
- height: number;
219
- }, b: {
220
- x: number;
221
- y: number;
222
- width: number;
223
- height: number;
224
- }): number;
225
-
226
- export declare function calculateParentPosition(childPosition: Position, offset: Position): Position;
227
-
228
- export declare function calculateRestoreTransform(modalPosition: Position, modalSize: Dimensions, sourcePosition: Position): AnimationTransform;
229
-
230
- export declare function calculateTotalOverlap(x: number, y: number, width: number, height: number, existingModals: ModalBounds[], gap: number): number;
231
-
232
- export declare function cleanupResizeListener(): void;
233
-
234
- export declare function clearActiveAttention(id: ModalId): void;
235
-
236
- export declare function clearPendingParentAnimation(parentId: ModalId): void;
237
-
238
- export declare function clearPositionAnimation(id: ModalId): void;
239
-
240
86
  export declare function closeAllModals(exclude?: ModalId[]): void;
241
87
 
242
88
  export declare function closeModal(id: ModalId, force?: boolean): void;
243
89
 
244
- export declare function computeAvailableArea(vw: number, vh: number, margin: number, avoidBounds: ModalBounds[], avoidMargin: number): AvailableArea;
245
-
246
- export declare function computeCssClasses(input: ComputeCssClassesInput): string[];
247
-
248
- export declare interface ComputeCssClassesInput {
249
- isDragging: boolean;
250
- isResizing: boolean;
251
- hasBeenDragged: boolean;
252
- isMinimizing: boolean;
253
- isRestoring: boolean;
254
- isOpening: boolean;
255
- isClosing: boolean;
256
- showCentered: boolean;
257
- isTransparent: boolean;
258
- glowEnabled: boolean;
259
- hasChild: boolean;
260
- isChildModal: boolean;
261
- wasRestored: boolean;
262
- isVisibleByAnimation: boolean;
263
- isAwaitingRestore: boolean;
264
- isAwaitingChildOpen: boolean;
265
- isAnimatingToCenter: boolean;
266
- isAnimatingPosition: boolean;
267
- isAttentionAnimating: boolean;
268
- glowStabilizing: boolean;
269
- }
270
-
271
- export declare interface ComputedModalState {
272
- position: Position;
273
- size: Dimensions;
274
- zIndex: number;
275
- isDragging: boolean;
276
- isResizing: boolean;
277
- hasBeenDragged: boolean;
278
- hasBeenResized: boolean;
279
- isMinimizing: boolean;
280
- isRestoring: boolean;
281
- isOpening: boolean;
282
- isClosing: boolean;
283
- isAnyAnimating: boolean;
284
- animationTransform: AnimationTransform | null;
285
- isVisible: boolean;
286
- showCentered: boolean;
287
- isAwaitingRestore: boolean;
288
- isAwaitingChildOpen: boolean;
289
- isVisibleByAnimation: boolean;
290
- hasChild: boolean;
291
- isChildModal: boolean;
292
- showOverlay: boolean;
293
- isTransparent: boolean;
294
- isAttentionAnimating: boolean;
295
- glowStabilizing: boolean;
296
- isAnimatingPosition: boolean;
297
- isAnimatingToCenter: boolean;
298
- wasRestored: boolean;
299
- overlayClosing: boolean;
300
- glowEnabled: boolean;
301
- draggable: boolean;
302
- resizable: boolean;
303
- minimizable: boolean;
304
- dataState: string;
305
- dataAnimationPhase: string;
306
- style: Record<string, string | number>;
307
- cssClasses: string[];
308
- }
309
-
310
- export declare function computeStyle(input: ComputeStyleInput): Record<string, string | number>;
311
-
312
- export declare interface ComputeStyleInput {
313
- position: Position;
314
- hasBeenDragged: boolean;
315
- hasBeenResized: boolean;
316
- size: Dimensions;
317
- animationTransform: AnimationTransform | null;
318
- zIndex: number;
319
- glowEnabled: boolean;
320
- glow: ModalGlow | null;
321
- maxWidth: string | undefined;
322
- preferredHeight: string | undefined;
323
-
324
- isAnimatingPosition?: boolean;
325
- }
326
-
327
- export declare interface ConfigResolver {
328
-
329
- getEffectiveConfig: () => ModalLibraryConfig;
330
-
331
- isFeatureEnabled: (feature: keyof ModalFeatures) => boolean;
332
-
333
- getAppearance: <K extends keyof AppearanceConfig>(key: K) => AppearanceConfig[K];
334
-
335
- getAnimation: <K extends keyof AnimationDurations>(key: K) => AnimationDurations[K];
336
-
337
- getPositioning: <K extends keyof PositioningConfig>(key: K) => PositioningConfig[K];
338
-
339
- getParentChild: <K extends keyof ParentChildConfig>(key: K) => ParentChildConfig[K];
340
- }
341
-
342
- export declare interface ConfigResolverOptions {
343
-
344
- getModalConfig: () => ModalConfigOverrides | undefined;
345
-
346
- getProviderConfig: () => PartialModalLibraryConfig | undefined;
347
- }
348
-
349
- export declare function constrainDockPosition(position: Position, dockWidth: number, dockHeight: number): Position;
350
-
351
- export declare function constrainSizeToViewport(x: number, y: number, width: number, height: number, options?: ViewportConstraintOptions): Bounds;
352
-
353
- export declare function constrainToViewport(x: number, y: number, width: number, height: number, options?: ViewportConstraintOptions): Position;
354
-
355
- export declare function consumeOpenSourcePosition(id: ModalId): Position | null;
356
-
357
- export declare function consumePendingAttention(id: ModalId): void;
358
-
359
- export declare function consumePendingChildRestore(id: ModalId): void;
360
-
361
- export declare function consumePendingClose(id: ModalId): void;
362
-
363
- export declare function consumePendingForceClose(id: ModalId): void;
364
-
365
- export declare function consumePendingMinimize(id: ModalId): AnimationTransform | null;
366
-
367
- export declare function consumePendingMinimizeTarget(): AnimationTransform | null;
368
-
369
- export declare function consumePendingMinimizeWithParent(id: ModalId): void;
370
-
371
- export declare function consumePendingOpen(id: ModalId): void;
372
-
373
- export declare function consumePendingParentAnimation(id: ModalId): Position | null;
374
-
375
- export declare function consumePendingParentLink(modalId?: ModalId): {
376
- parentId: ModalId;
377
- childId: ModalId;
378
- } | null;
379
-
380
- export declare function consumePendingRestore(id: ModalId): void;
381
-
382
- export declare function containsFocus(container: HTMLElement): boolean;
383
-
384
- export declare function createAnimationController(options: AnimationControllerOptions): AnimationController;
385
-
386
- export declare function createConfigHelper(modalConfig?: DeepPartial<{
387
- features?: Partial<ModalFeatures>;
388
- appearance?: Partial<AppearanceConfig>;
389
- positioning?: Partial<PositioningConfig>;
390
- }>, providerConfig?: PartialModalLibraryConfig): ModalConfigHelper;
391
-
392
- export declare function createConfigResolver(options: ConfigResolverOptions): ConfigResolver;
393
-
394
- export declare function createDragBehavior(options?: DragBehaviorOptions): DragBehavior;
395
-
396
- export declare function createEventEmitter<T>(): {
397
-
398
- on<K extends keyof T>(event: K, callback: EventCallback<T[K]>): () => void;
399
-
400
- emit<K extends keyof T>(event: K, data: T[K]): void;
401
-
402
- off<K extends keyof T>(event?: K): void;
403
-
404
- listenerCount<K extends keyof T>(event: K): number;
405
- };
406
-
407
- export declare function createFocusTrap(container: HTMLElement): {
408
-
409
- activate(): void;
410
-
411
- deactivate(): void;
412
-
413
- handleKeyDown(event: KeyboardEvent): void;
414
-
415
- containsFocus(): boolean;
416
- };
417
-
418
90
  export declare function createModal(modal: Omit<ModalState, 'zIndex' | 'isAnimating'>): void;
419
91
 
420
- export declare function createModalController(options: ModalControllerOptions): ModalController;
421
-
422
- export declare function createModalRegistration(props: CreateModalRegistrationProps): Omit<ModalState, 'zIndex' | 'isAnimating'>;
423
-
424
- export declare interface CreateModalRegistrationProps {
425
- id: ModalId;
426
- title: string;
427
- icon?: string;
428
- autoOpen?: boolean;
429
- glow?: ModalGlow | null;
430
- }
431
-
432
- export declare function createResizeBehavior(options: ResizeBehaviorOptions): ResizeBehavior;
433
-
434
- declare const CSS_2: {
435
- readonly modal: "modal-dialog";
436
- readonly modalDragging: "modal-dragging";
437
- readonly modalResizing: "modal-resizing";
438
- readonly modalPositioned: "modal-positioned";
439
- readonly modalMinimizing: "modal-minimizing";
440
- readonly modalRestoring: "modal-restoring";
441
- readonly modalOpening: "modal-opening";
442
- readonly modalClosing: "modal-closing";
443
- readonly modalCentered: "modal-centered";
444
- readonly modalSolid: "modal-solid";
445
- readonly modalTransparent: "modal-transparent";
446
- readonly modalGlow: "modal-glow";
447
- readonly modalHasGlow: "modal-has-glow";
448
- readonly modalHasChild: "modal-has-child";
449
- readonly modalIsChild: "modal-is-child";
450
- readonly modalWasRestored: "modal-was-restored";
451
- readonly modalVisibleByAnimation: "modal-visible-by-animation";
452
- readonly modalAwaitingRestore: "modal-awaiting-restore";
453
- readonly modalAwaitingChildOpen: "modal-awaiting-child-open";
454
- readonly modalAnimatingToCenter: "modal-animating-to-center";
455
- readonly modalAnimatingPosition: "modal-animating-position";
456
- readonly modalAttention: "modal-attention";
457
- readonly modalGlowStabilizing: "modal-glow-stabilizing";
458
- readonly header: "modal-header";
459
- readonly headerDraggable: "modal-header-draggable";
460
- readonly body: "modal-body";
461
- readonly footer: "modal-footer";
462
- readonly childOverlay: "modal-child-overlay";
463
- readonly overlayClosing: "modal-overlay-closing";
464
- readonly headerTitle: "modal-header-title";
465
- readonly headerIcon: "modal-header-icon";
466
- readonly headerTitleGroup: "modal-header-title-group";
467
- readonly headerActions: "modal-header-actions";
468
- readonly headerTrafficLights: "modal-header-traffic-lights";
469
- readonly headerLight: "modal-header-light";
470
- readonly headerLightClose: "modal-header-light-close";
471
- readonly headerLightMinimize: "modal-header-light-minimize";
472
- readonly headerLightStyle: "modal-header-light-style";
473
- readonly headerLightDisabled: "modal-header-light-disabled";
474
- readonly headerMacCenter: "modal-header-mac-center";
475
- readonly headerMacSpacer: "modal-header-mac-spacer";
476
- readonly headerBtnWindows: "modal-header-btn-windows";
477
- readonly headerBtnWindowsClose: "modal-header-btn-windows-close";
478
- readonly headerBtnWindowsStyle: "modal-header-btn-windows-style";
479
- readonly headerBtnWindowsDisabled: "modal-header-btn-windows-disabled";
480
- readonly resizeHandles: "modal-resize-handles";
481
- readonly resizeHandle: "modal-resize-handle";
482
- readonly resizeN: "modal-resize-n";
483
- readonly resizeS: "modal-resize-s";
484
- readonly resizeE: "modal-resize-e";
485
- readonly resizeW: "modal-resize-w";
486
- readonly resizeNE: "modal-resize-ne";
487
- readonly resizeNW: "modal-resize-nw";
488
- readonly resizeSE: "modal-resize-se";
489
- readonly resizeSW: "modal-resize-sw";
490
- readonly resizePrefix: "modal-resize-";
491
- readonly dock: "modal-dock";
492
- readonly dockContainer: "modal-dock-container";
493
- readonly dockItem: "modal-dock-item";
494
- readonly dockItemActive: "modal-dock-item-active";
495
- readonly dockItemHasGlow: "modal-dock-item-has-glow";
496
- readonly dockItemHasChild: "modal-dock-item-has-child";
497
- readonly dockItemLabelBeside: "modal-dock-item-label-beside";
498
- readonly dockItemLabelBelow: "modal-dock-item-label-below";
499
- readonly dockItemIcon: "modal-dock-item-icon";
500
- readonly dockItemIconPlaceholder: "modal-dock-item-icon-placeholder";
501
- readonly dockItemLabel: "modal-dock-item-label";
502
- readonly dockItemGlow: "modal-dock-item-glow";
503
- readonly dockChildIndicator: "modal-dock-child-indicator";
504
- readonly dockHandle: "modal-dock-handle";
505
- readonly dockHandleDragging: "modal-dock-handle-dragging";
506
- readonly dockLeft: "modal-dock-left";
507
- readonly dockRight: "modal-dock-right";
508
- readonly dockBottom: "modal-dock-bottom";
509
- readonly dockFree: "modal-dock-free";
510
- readonly dockEmpty: "modal-dock-empty";
511
- readonly dockFreeHorizontal: "modal-dock-free-horizontal";
512
- readonly dockFreeVertical: "modal-dock-free-vertical";
513
- readonly backdrop: "modal-backdrop";
514
- readonly backdropVisible: "modal-backdrop-visible";
515
- readonly srOnly: "sr-only";
516
- readonly reactBodyContent: "react-modal-body-content";
517
- readonly reactFooterContent: "react-modal-footer-content";
518
- };
519
- export { CSS_2 as CSS }
520
-
521
92
  export declare const CSS_CLASSES: {
522
93
  readonly dialog: "modal-dialog";
523
94
  readonly dialogCentered: "modal-centered";
@@ -592,26 +163,12 @@ export declare const DATA_ATTRIBUTES: {
592
163
  readonly dockItemId: "data-dock-item-id";
593
164
  };
594
165
 
595
- export declare const DATA_ATTRS: {
596
- readonly modalId: "data-modal-id";
597
- readonly dockContainer: "data-dock-container";
598
- readonly resizeDir: "data-resize-dir";
599
- readonly modalBridge: "data-modal-bridge";
600
- };
601
-
602
166
  export declare type DeepPartial<T> = {
603
167
  [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
604
168
  };
605
169
 
606
170
  export declare const defaultConfig: ModalLibraryConfig;
607
171
 
608
- export declare const DEFAULTS: {
609
- readonly minWidth: 280;
610
- readonly minHeight: 200;
611
- readonly maxWidth: "600px";
612
- readonly zIndexBase: 1000;
613
- };
614
-
615
172
  export declare interface Dimensions {
616
173
 
617
174
  width: number;
@@ -636,78 +193,6 @@ export declare type DockOrientation = 'horizontal' | 'vertical';
636
193
 
637
194
  export declare type DockPosition = 'left' | 'right' | 'bottom' | 'free';
638
195
 
639
- export declare type DockPositionGetter = () => {
640
- x: number;
641
- y: number;
642
- width: number;
643
- height: number;
644
- };
645
-
646
- export declare interface DragBehavior {
647
- getState(): DragState;
648
- getPosition(): Position;
649
- isDragging(): boolean;
650
- hasBeenDragged(): boolean;
651
- setPosition(position: Position): void;
652
- setHasBeenDragged(value: boolean): void;
653
- reset(): void;
654
- constrainToViewport(modalSize: Dimensions): void;
655
- onPointerDown(e: PointerEvent, element: HTMLElement): void;
656
- onPointerMove(e: PointerEvent, modalSize: Dimensions): void;
657
- onPointerUp(e: PointerEvent, element: HTMLElement): void;
658
- subscribe(callback: (state: DragState) => void): () => void;
659
- destroy(): void;
660
- }
661
-
662
- export declare interface DragBehaviorOptions {
663
- initialPosition?: Position;
664
- constrain?: boolean;
665
- }
666
-
667
- export declare interface DragEvents {
668
- change: DragState;
669
- dragStart: Position;
670
- dragMove: Position;
671
- dragEnd: Position;
672
- }
673
-
674
- export declare interface DragState {
675
- isDragging: boolean;
676
- position: Position;
677
- hasBeenDragged: boolean;
678
- }
679
-
680
- export declare const DURATIONS: {
681
- readonly minimize: 500;
682
- readonly restore: 400;
683
- readonly open: 400;
684
- readonly close: 250;
685
- readonly attention: 300;
686
- readonly parentMove: 300;
687
-
688
- readonly parentRetargetInterval: 100;
689
- readonly centerAfterResize: 200;
690
- readonly glowStabilize: 1000;
691
- readonly overlayFade: 200;
692
- };
693
-
694
- export declare const EASINGS: {
695
-
696
- readonly easeOut: "ease-out";
697
-
698
- readonly easeOutCubic: "cubic-bezier(0.25, 0.1, 0.25, 1)";
699
-
700
- readonly linear: "linear";
701
-
702
- readonly easeInOut: "ease-in-out";
703
- };
704
-
705
- export declare function endAttentionAnimation(_id: ModalId): void;
706
-
707
- export declare type EventCallback<T = void> = (data: T) => void;
708
-
709
- export declare type EventEmitter<T> = ReturnType<typeof createEventEmitter<T>>;
710
-
711
196
  export declare interface ExternalElementProps {
712
197
 
713
198
  bodyElement?: HTMLElement | null;
@@ -717,212 +202,24 @@ export declare interface ExternalElementProps {
717
202
  iconElement?: HTMLElement | null;
718
203
  }
719
204
 
720
- export declare function finalizeChildMinimize(id: ModalId): void;
721
-
722
- export declare function finalizeModalClose(id: ModalId): void;
723
-
724
- export declare function findChildModalElement(childId: string): HTMLElement | null;
725
-
726
- export declare function findParentModalElement(parentId: string): HTMLElement | null;
727
-
728
- export declare function findRootAncestor(modalId: string, getParentId: (id: string) => string | undefined): string;
729
-
730
- export declare function flipAnimate(element: HTMLElement, oldPosition: Position, newPosition: Position, options?: {
731
- duration?: number;
732
- easing?: string;
733
- onComplete?: () => void;
734
- }): () => void;
735
-
736
- export declare const FOCUSABLE_SELECTORS: string;
737
-
738
- export declare function focusFirstElement(container: HTMLElement): boolean;
739
-
740
- export declare function focusLastElement(container: HTMLElement): boolean;
741
-
742
- export declare function getAncestorIds(modalId: string, getParentId: (id: string) => string | undefined): string[];
743
-
744
- export declare function getBackdropConfig(): BackdropConfig;
745
-
746
205
  export declare function getConfig(): ModalLibraryConfig;
747
206
 
748
- export declare function getConfigVersion(): number;
749
-
750
- export declare function getDefaultDockTarget(): Position;
751
-
752
- export declare function getDescendantIds(modalId: string, getChildId: (id: string) => string | undefined): string[];
753
-
754
- export declare function getDockClasses(dockPosition: 'left' | 'right' | 'bottom' | 'free', orientation: 'horizontal' | 'vertical'): string;
755
-
756
- export declare function getDockContainerClasses(dockPosition: 'left' | 'right' | 'bottom' | 'free', isEmpty: boolean): string;
757
-
758
- export declare function getDockItemElement(id: ModalId): HTMLElement | null;
759
-
760
- export declare function getDockItemPosition(modalId: string, fallback?: Position): Position;
761
-
762
- export declare function getDockOrder(): ModalId[];
763
-
764
- export declare function getDuration(type: AnimationType): number;
765
-
766
- export declare function getEasing(type: AnimationType): string;
767
-
768
- export declare function getElementBounds(selectors: string[]): ModalBounds[];
769
-
770
- export declare function getFocusableElements(container: HTMLElement): HTMLElement[];
771
-
772
- export declare function _getInternalState(): {
773
- modals: Map<string, ModalState>;
774
- pendingMinimize: string[];
775
- pendingOpen: string[];
776
- pendingClose: string[];
777
- pendingRestore: string[];
778
- dockOrder: string[];
779
- animatingModals: Set<string>;
780
- transparentModals: Set<string>;
781
- };
782
-
783
- export declare function getLayerZIndex(layer: StackingLayerName): number;
784
-
785
- export declare function getMinimizedModals(): ModalState[];
786
-
787
- export declare function getModalBounds(element: HTMLElement): {
788
- position: Position;
789
- size: Dimensions;
790
- };
791
-
792
- export declare function getModalDialogElement(id: ModalId): HTMLElement | null;
793
-
794
- export declare function getModalLayoutInfos(): ModalLayoutInfo[];
795
-
796
- export declare function getModalsStore(): Map<ModalId, ModalState>;
797
-
798
207
  export declare function getModalState(id: ModalId): ModalState | undefined;
799
208
 
800
- export declare function getModalsToClose(fromIdOrExclude: ModalId | ModalId[]): ModalId[];
801
-
802
- export declare function getOpenModalBounds(excludeId?: ModalId): ModalBounds[];
803
-
804
- export declare function getOpenModalBoundsWithIds(excludeId?: ModalId): Array<{
805
- id: string;
806
- x: number;
807
- y: number;
808
- width: number;
809
- height: number;
810
- }>;
811
-
812
- export declare function getOpenSourcePosition(id: ModalId): Position | null;
813
-
814
- export declare function getPendingParentAnimation(id: ModalId): Position | null;
815
-
816
- export declare function getPendingParentLink(): {
817
- parentId: ModalId;
818
- childId: ModalId;
819
- } | null;
820
-
821
- export declare function getStateVersion(): number;
822
-
823
- export declare function handleWindowResize(): void;
824
-
825
- export declare function hasOpenModals(): boolean;
826
-
827
- export declare function hasPendingAttention(id: ModalId): boolean;
828
-
829
- export declare function hasPendingChildRestore(id: ModalId): boolean;
830
-
831
- export declare function hasPendingClose(id: ModalId): boolean;
832
-
833
- export declare function hasPendingForceClose(id: ModalId): boolean;
834
-
835
- export declare function hasPendingMinimize(id: ModalId): boolean;
836
-
837
- export declare function hasPendingMinimizeWithParent(id: ModalId): boolean;
838
-
839
- export declare function hasPendingOpen(id: ModalId): boolean;
840
-
841
- export declare function hasPendingParentAnimation(id: ModalId): boolean;
842
-
843
- export declare function hasPendingParentLinkFor(id: ModalId): boolean;
844
-
845
- export declare function hasPendingRestore(id: ModalId): boolean;
846
-
847
209
  export declare type HeaderLayout = 'macos' | 'windows' | 'none';
848
210
 
849
- export declare function hideChildWithParent(parentId: ModalId): void;
850
-
851
- export declare function initializeResizeListener(): void;
852
-
853
- export declare function initializeStacking(): void;
854
-
855
- export declare interface InteractionConfigHelper {
856
- isFeatureEnabled: (feature: keyof ModalFeatures) => boolean;
857
- }
858
-
859
- export declare interface InteractionDragBehavior {
860
- onPointerDown: (e: PointerEvent, element: HTMLElement) => void;
861
- onPointerMove: (e: PointerEvent, modalSize: {
862
- width: number;
863
- height: number;
864
- }) => void;
865
- onPointerUp: (e: PointerEvent, element: HTMLElement) => void;
866
- isDragging: () => boolean;
867
- getPosition: () => {
868
- x: number;
869
- y: number;
870
- };
871
- hasBeenDragged: () => boolean;
872
- }
873
-
874
- export declare interface InteractionResizeBehavior {
875
- startResize: (e: PointerEvent, direction: ResizeDirection) => void;
876
- hasBeenResized: () => boolean;
877
- getSize: () => {
878
- width: number;
879
- height: number;
880
- };
881
- justFinishedResizing: () => boolean;
882
- }
883
-
884
- export declare interface InteractionState {
885
- hasChild: boolean;
886
- }
887
-
888
- export declare function isBackdropEnabled(): boolean;
889
-
890
211
  export declare function isFeatureEnabled(feature: keyof ModalFeatures): boolean;
891
212
 
892
- export declare function isModalAnimating(id: ModalId): boolean;
893
-
894
213
  export declare function isModalOpen(id: ModalId): boolean;
895
214
 
896
215
  export declare function isModalRegistered(id: ModalId): boolean;
897
216
 
898
217
  export declare function isTopModal(id: ModalId): boolean;
899
218
 
900
- export declare function linkModals(parentId: ModalId, childId: ModalId, offset: Position): void;
901
-
902
- export declare function mergeConfig(base: ModalLibraryConfig, override: PartialModalLibraryConfig): ModalLibraryConfig;
903
-
904
219
  export declare function minimizeModal(id: ModalId): void;
905
220
 
906
221
  export declare type ModalAnimationState = 'closed' | 'opening' | 'open' | 'closing' | 'minimizing' | 'minimized' | 'restoring';
907
222
 
908
- export declare interface ModalBounds {
909
- x: number;
910
- y: number;
911
- width: number;
912
- height: number;
913
- }
914
-
915
- export declare interface ModalBoundsWithId extends ModalBounds {
916
- id: string;
917
- }
918
-
919
- export declare interface ModalConfigHelper {
920
- isFeatureEnabled: (feature: keyof ModalFeatures) => boolean;
921
- getAppearance: <K extends keyof AppearanceConfig>(key: K) => AppearanceConfig[K];
922
- getPositioning: <K extends keyof PositioningConfig>(key: K) => PositioningConfig[K];
923
- getEffectiveConfig: () => ModalLibraryConfig;
924
- }
925
-
926
223
  export declare interface ModalConfigOverrides {
927
224
  features?: ModalFeaturesOverride;
928
225
  appearance?: AppearanceOverride;
@@ -931,107 +228,6 @@ export declare interface ModalConfigOverrides {
931
228
  parentChild?: ParentChildOverride;
932
229
  }
933
230
 
934
- export declare class ModalController {
935
- private id;
936
- private dataId;
937
- private options;
938
- private drag;
939
- private resize;
940
- private animation;
941
- private positioning;
942
- private lifecycle;
943
- private interactions;
944
- private stateManager;
945
- private overlayClosing;
946
- private emitter;
947
- private unsubscribeState;
948
- private cachedState;
949
- constructor(options: ModalControllerOptions);
950
-
951
- mount(element: HTMLElement): void;
952
-
953
- destroy(): void;
954
-
955
- private get element();
956
-
957
- private handleWindowResize;
958
-
959
- private register;
960
-
961
- getState(): ComputedModalState;
962
-
963
- subscribe(callback: (state: ComputedModalState) => void): () => void;
964
- private notifyStateChange;
965
-
966
- startDrag(e: PointerEvent): void;
967
-
968
- startResize(e: PointerEvent, direction: ResizeDirection): void;
969
-
970
- handlePointerMove(e: PointerEvent): void;
971
-
972
- handlePointerUp(e: PointerEvent): void;
973
-
974
- handleKeyDown(e: KeyboardEvent): void;
975
-
976
- handleTabKey(e: KeyboardEvent): void;
977
-
978
- minimize(): void;
979
-
980
- close(): void;
981
-
982
- toggleTransparency(): void;
983
-
984
- bringToFront(): void;
985
-
986
- setOpenSourcePosition(position: Position | null): void;
987
-
988
- updateGlow(glow: ModalControllerOptions['glow']): void;
989
-
990
- focusFirst(): void;
991
- private handleResizeEnd;
992
- private handleStateChange;
993
- private handlePendingStates;
994
- getId(): ModalId;
995
- getDataId(): string;
996
- getElement(): HTMLElement | null;
997
- }
998
-
999
- export declare interface ModalControllerEvents {
1000
- stateChange: ComputedModalState;
1001
- close: void;
1002
- }
1003
-
1004
- export declare interface ModalControllerOptions {
1005
-
1006
- id: ModalId;
1007
-
1008
- title: string;
1009
-
1010
- icon?: string;
1011
-
1012
- config?: ModalConfigOverrides;
1013
-
1014
- providerConfig?: Partial<ModalLibraryConfig>;
1015
-
1016
- maxWidth?: string;
1017
-
1018
- preferredHeight?: string;
1019
-
1020
- glow?: ModalGlow;
1021
-
1022
- closeOnEscape?: boolean;
1023
-
1024
- autoOpen?: boolean;
1025
-
1026
- openSourcePosition?: Position | null;
1027
-
1028
- onClose?: () => void;
1029
-
1030
- skipRegistration?: boolean;
1031
-
1032
- configHelper: ModalConfigHelper;
1033
- }
1034
-
1035
231
  export declare interface ModalFeatures {
1036
232
  dock: boolean;
1037
233
  minimize: boolean;
@@ -1076,48 +272,6 @@ export declare interface ModalHeaderBaseProps {
1076
272
 
1077
273
  export declare type ModalId = string;
1078
274
 
1079
- export declare class ModalInteractions {
1080
- private options;
1081
- constructor(options: ModalInteractionsOptions);
1082
-
1083
- startDrag(e: PointerEvent): void;
1084
-
1085
- startResize(e: PointerEvent, direction: ResizeDirection): void;
1086
-
1087
- handlePointerMove(e: PointerEvent): void;
1088
-
1089
- handlePointerUp(e: PointerEvent): void;
1090
-
1091
- handleKeyDown(e: KeyboardEvent): void;
1092
-
1093
- handleTabKey(e: KeyboardEvent): void;
1094
-
1095
- focusFirst(): void;
1096
- }
1097
-
1098
- export declare interface ModalInteractionsOptions {
1099
- id: string;
1100
- configHelper: InteractionConfigHelper;
1101
- getDragBehavior: () => InteractionDragBehavior;
1102
- getResizeBehavior: () => InteractionResizeBehavior;
1103
- getElement: () => HTMLElement | null;
1104
- getState: () => InteractionState;
1105
- onDragMove: () => void;
1106
- onDragEnd: () => void;
1107
- onClose?: () => void;
1108
- closeOnEscape?: boolean;
1109
- isTopModal: () => boolean;
1110
- }
1111
-
1112
- export declare interface ModalLayoutInfo {
1113
- id: string;
1114
- width: number;
1115
- height: number;
1116
- currentPosition: Position;
1117
-
1118
- parentId?: string;
1119
- }
1120
-
1121
275
  export declare interface ModalLibraryConfig {
1122
276
  features: ModalFeatures;
1123
277
  dock: DockConfig;
@@ -1130,61 +284,6 @@ export declare interface ModalLibraryConfig {
1130
284
  portalTarget: string | HTMLElement;
1131
285
  }
1132
286
 
1133
- export declare class ModalLifecycle {
1134
- private element;
1135
- private resizeHandler;
1136
- private options;
1137
- constructor(options?: ModalLifecycleOptions);
1138
-
1139
- mount(element: HTMLElement): void;
1140
-
1141
- destroy(): void;
1142
-
1143
- getElement(): HTMLElement | null;
1144
-
1145
- isMounted(): boolean;
1146
- }
1147
-
1148
- export declare interface ModalLifecycleOptions {
1149
- onMount?: () => void;
1150
- onDestroy?: () => void;
1151
- onWindowResize?: () => void;
1152
- }
1153
-
1154
- export declare class ModalPositioning {
1155
- private id;
1156
- private dataId;
1157
- private configHelper;
1158
- private getDragBehavior;
1159
- private getElement;
1160
- constructor(options: ModalPositioningOptions);
1161
-
1162
- constrainToViewport(size: Dimensions): void;
1163
-
1164
- shouldApplySmartPositioning(): boolean;
1165
-
1166
- applySmartPositioning(): boolean;
1167
-
1168
- scheduleSmartPositioning(): void;
1169
-
1170
- centerChildOnParent(parentId: ModalId): boolean;
1171
-
1172
- scheduleCenterChildOnParent(parentId: ModalId): void;
1173
- }
1174
-
1175
- export declare interface ModalPositioningOptions {
1176
-
1177
- id: ModalId;
1178
-
1179
- dataId: string;
1180
-
1181
- configHelper: PositioningConfigHelper;
1182
-
1183
- getDragBehavior: () => DragBehavior;
1184
-
1185
- getElement: () => HTMLElement | null;
1186
- }
1187
-
1188
287
  export declare interface ModalState {
1189
288
  id: ModalId;
1190
289
  title: string;
@@ -1211,93 +310,6 @@ export declare interface ModalState {
1211
310
  lastChildId?: ModalId;
1212
311
  }
1213
312
 
1214
- export declare class ModalStateManager {
1215
- private id;
1216
- private options;
1217
- private _isHandlingMinimize;
1218
- private _isAttentionAnimating;
1219
- private _wasRestored;
1220
- private _glowStabilizing;
1221
- private _restoreHold;
1222
- private _isAnimatingToCenter;
1223
- private _cancelParentAnimationCleanup;
1224
- private _parentFlipInFlight;
1225
- private _deferredParentTarget;
1226
- private _parentFlipStartTime;
1227
- constructor(options: ModalStateManagerOptions);
1228
-
1229
- handlePendingStates(): void;
1230
-
1231
- private handlePendingForceClose;
1232
-
1233
- private handlePendingMinimize;
1234
-
1235
- private handlePendingMinimizeWithParent;
1236
-
1237
- private handlePendingRestore;
1238
-
1239
- private handlePendingChildRestore;
1240
-
1241
- private handlePendingClose;
1242
-
1243
- private handlePendingParentLink;
1244
-
1245
- private handlePendingOpen;
1246
-
1247
- private openChildModalWithAnimation;
1248
-
1249
- private openStandaloneModalWithAnimation;
1250
-
1251
- private handlePendingAttention;
1252
-
1253
- private handlePendingParentAnimation;
1254
-
1255
- private startParentFlip;
1256
-
1257
- private handleChildCentering;
1258
- get wasRestored(): boolean;
1259
- set wasRestored(value: boolean);
1260
- get isAttentionAnimating(): boolean;
1261
- get glowStabilizing(): boolean;
1262
- set glowStabilizing(value: boolean);
1263
- get restoreHold(): boolean;
1264
- set restoreHold(value: boolean);
1265
- get isAnimatingToCenter(): boolean;
1266
- set isAnimatingToCenter(value: boolean);
1267
- get isHandlingMinimize(): boolean;
1268
- }
1269
-
1270
- export declare interface ModalStateManagerOptions {
1271
-
1272
- id: ModalId;
1273
-
1274
- options: {
1275
- glow?: unknown;
1276
- openSourcePosition?: Position | null;
1277
- onClose?: () => void;
1278
- };
1279
-
1280
- getDragBehavior: () => DragBehavior;
1281
-
1282
- getResizeBehavior: () => ResizeBehavior;
1283
-
1284
- getAnimationController: () => AnimationController;
1285
-
1286
- getElement: () => HTMLElement | null;
1287
-
1288
- getPositioning: () => StateManagerPositioning;
1289
-
1290
- onStateChange: () => void;
1291
-
1292
- focusFirst: () => void;
1293
- }
1294
-
1295
- export declare function normalizeBackdropConfig(backdrop: boolean | BackdropConfig): BackdropConfig;
1296
-
1297
- export declare function onAnimationEnd(element: HTMLElement, animationName?: string, timeout?: number): Promise<AnimationEvent>;
1298
-
1299
- export declare function openChildModal(childId: ModalId, parentId: ModalId, source: HTMLElement | Position): void;
1300
-
1301
313
  export declare function openModal(id: ModalId, source: HTMLElement | Position, options?: OpenModalOptions): void;
1302
314
 
1303
315
  export declare interface OpenModalOptions {
@@ -1335,190 +347,26 @@ export declare interface PositioningConfig {
1335
347
  avoidElements: string[];
1336
348
  }
1337
349
 
1338
- export declare interface PositioningConfigHelper {
1339
- getPositioning: <K extends keyof PositioningConfig>(key: K) => PositioningConfig[K];
1340
- }
1341
-
1342
350
  export declare interface PositioningOverride {
1343
351
  strategy?: 'centered' | 'smart';
1344
352
  modalGap?: number;
1345
353
  avoidElements?: string[];
1346
354
  }
1347
355
 
1348
- export declare function registerModal(modal: Omit<ModalState, 'zIndex' | 'isAnimating'>): void;
1349
-
1350
- export declare interface RegistryCallbacks {
1351
- mountModal: (id: ModalId) => void;
1352
- isRegisteredInRegistry: (id: ModalId) => boolean;
1353
- unmountModal: (id: ModalId) => void;
1354
- }
1355
-
1356
- export declare function reorderDock(newOrderOrFromIndex: ModalId[] | number, toIndex?: number): void;
1357
-
1358
356
  export declare function resetConfig(): void;
1359
357
 
1360
- export declare function _resetInternalState(): void;
1361
-
1362
- export declare function resetModalTransparency(id: ModalId): void;
1363
-
1364
- export declare function resetStacking(): void;
1365
-
1366
- export declare const RESIZE_DIRECTION_LABELS: Record<ResizeDirection_2, string>;
1367
-
1368
- export declare const RESIZE_DIRECTIONS: readonly ["n", "s", "e", "w", "ne", "nw", "se", "sw"];
1369
-
1370
- export declare interface ResizeBehavior {
1371
- getState(): ResizeState;
1372
- getSize(): Dimensions;
1373
- isResizing(): boolean;
1374
- hasBeenResized(): boolean;
1375
- justFinishedResizing(): boolean;
1376
- setSize(size: Dimensions): void;
1377
- reset(): void;
1378
- constrainToViewport(): void;
1379
- startResize(e: PointerEvent, direction: ResizeDirection): void;
1380
- subscribe(callback: (state: ResizeState) => void): () => void;
1381
- destroy(): void;
1382
- }
1383
-
1384
- export declare interface ResizeBehaviorOptions {
1385
- minWidth?: number;
1386
- minHeight?: number;
1387
- getPosition: () => Position;
1388
- setPosition: (pos: Position) => void;
1389
- getHasBeenDragged: () => boolean;
1390
- setHasBeenDragged: (value: boolean) => void;
1391
- getElement: () => HTMLElement | null;
1392
- getSymmetricResize?: () => boolean;
1393
- onResizeEnd?: (position: Position, size: Dimensions) => void;
1394
- }
1395
-
1396
- export declare type ResizeDirection = 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw' | '';
1397
-
1398
- declare type ResizeDirection_2 = typeof RESIZE_DIRECTIONS[number];
1399
-
1400
- export declare interface ResizeEvents {
1401
- change: ResizeState;
1402
- resizeStart: {
1403
- direction: ResizeDirection;
1404
- };
1405
- resizeMove: {
1406
- size: Dimensions;
1407
- position: Position;
1408
- };
1409
- resizeEnd: {
1410
- size: Dimensions;
1411
- position: Position;
1412
- };
1413
- }
1414
-
1415
- export declare interface ResizeState {
1416
- isResizing: boolean;
1417
- direction: ResizeDirection;
1418
- size: Dimensions;
1419
- hasBeenResized: boolean;
1420
- }
1421
-
1422
358
  export declare function restoreAllMinimizedModals(): void;
1423
359
 
1424
- export declare function restoreChildModal(id: ModalId): void;
1425
-
1426
360
  export declare function restoreModal(id: ModalId): void;
1427
361
 
1428
362
  export declare function screenCenter(): Position;
1429
363
 
1430
364
  export declare function setConfig(config: PartialModalLibraryConfig): void;
1431
365
 
1432
- export declare function setDockPositionGetterInternal(getter: DockPositionGetter | null): void;
1433
-
1434
- export declare function setModalAnimating(id: ModalId, animating: boolean): void;
1435
-
1436
- declare function setRegistryCallbacksInternal(callbacks: RegistryCallbacks | null): void;
1437
- export { setRegistryCallbacksInternal }
1438
- export { setRegistryCallbacksInternal as setRegistryFunctions }
1439
-
1440
- export declare function setupAnimationEndListener(element: HTMLElement, callback: (animationName: string) => void): () => void;
1441
-
1442
- declare function setURLCallbacks(callbacks: URLStateCallbacks | null): void;
1443
- export { setURLCallbacks }
1444
- export { setURLCallbacks as setURLStateCallbacks }
1445
-
1446
- export declare function shakeElement(element: HTMLElement): void;
1447
-
1448
- export declare function shouldChildBeVisible(parentIsOpen: boolean, parentIsMinimized: boolean, parentIsHiddenWithParent: boolean): boolean;
1449
-
1450
- export declare interface SmartLayoutOptions {
1451
-
1452
- modalGap?: number;
1453
-
1454
- viewportMargin?: number;
1455
-
1456
- avoidBounds?: ModalBounds[];
1457
-
1458
- avoidMargin?: number;
1459
- }
1460
-
1461
- export declare interface SmartLayoutResult {
1462
-
1463
- positions: Map<string, Position>;
1464
- }
1465
-
1466
- export declare interface SmartPositionOptions {
1467
-
1468
- modalGap?: number;
1469
-
1470
- margin?: number;
1471
-
1472
- gridResolution?: number;
1473
-
1474
- avoidBounds?: ModalBounds[];
1475
-
1476
- avoidMargin?: number;
1477
- }
1478
-
1479
366
  export declare type StackingLayerName = 'BASE' | 'DROPDOWN' | 'STICKY' | 'OVERLAY' | 'MODAL' | 'DOCK' | 'TOAST';
1480
367
 
1481
- export declare function startAttentionAnimation(_id: ModalId): void;
1482
-
1483
- export declare interface StateManagerPositioning {
1484
- centerChildOnParent: (parentId: ModalId) => boolean;
1485
- scheduleCenterChildOnParent: (parentId: ModalId) => void;
1486
- applySmartPositioning: () => void;
1487
- scheduleSmartPositioning: () => void;
1488
- }
1489
-
1490
- export declare function storeOpenSourcePosition(id: ModalId, position: Position): void;
1491
-
1492
- export declare function subscribe(callback: () => void): () => void;
1493
-
1494
- export declare function subscribeToConfig(callback: () => void): () => void;
1495
-
1496
- export declare function toDataId(id: ModalId): string;
1497
-
1498
- export declare function toggleModalTransparency(id: ModalId): void;
1499
-
1500
- export declare function transformToCSSVars(transform: AnimationTransform): Record<string, string>;
1501
-
1502
- export declare function trapFocus(event: KeyboardEvent, container: HTMLElement): void;
1503
-
1504
368
  export declare function triggerAttention(id: ModalId): void;
1505
369
 
1506
- export declare function triggerCascadingParentAnimations(childId: ModalId): void;
1507
-
1508
- export declare function triggerRearrangement(newModal: {
1509
- id: string;
1510
- width: number;
1511
- height: number;
1512
- } | null): void;
1513
-
1514
- export declare function triggerRejection(id: ModalId): void;
1515
-
1516
- export declare function unhideChildModal(id: ModalId): void;
1517
-
1518
- export declare function unregisterModal(id: ModalId): void;
1519
-
1520
- export declare function updateModal(id: ModalId, updates: Partial<ModalState>): void;
1521
-
1522
370
  export declare function updateModalPosition(id: ModalId, position: Position, options?: {
1523
371
  constrain?: boolean;
1524
372
  drag?: boolean;
@@ -1528,28 +376,6 @@ export declare function updateModalPosition(id: ModalId, position: Position, opt
1528
376
 
1529
377
  export declare function updateModalSize(id: ModalId, size: Dimensions): void;
1530
378
 
1531
- export declare interface URLStateCallbacks {
1532
- push: (id: ModalId) => void;
1533
- replace: (id: ModalId) => void;
1534
- pop: () => void;
1535
- }
1536
-
1537
- export declare interface ViewportConstraintOptions {
1538
-
1539
- margin?: number;
1540
-
1541
- allowPartialVisibility?: boolean;
1542
- }
1543
-
1544
- declare interface WhenDOMReadyOptions {
1545
-
1546
- timeout?: number;
1547
-
1548
- pollInterval?: number;
1549
- }
1550
-
1551
- export declare function whenHasDimensions(element: () => HTMLElement | null, options?: WhenDOMReadyOptions): Promise<HTMLElement>;
1552
-
1553
379
  export declare interface ZIndexConfig {
1554
380
 
1555
381
  base: number;