@principal-ade/panel-layouts 0.2.3 → 0.2.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/index.d.ts +149 -0
- package/dist/index.esm.js +1127 -804
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -487,6 +487,36 @@ export declare interface OpenAITool {
|
|
|
487
487
|
|
|
488
488
|
export { PanelBlurEventPayload }
|
|
489
489
|
|
|
490
|
+
/**
|
|
491
|
+
* A button component for collapsing/expanding side panels.
|
|
492
|
+
*
|
|
493
|
+
* Shows appropriate icon based on panel state and side:
|
|
494
|
+
* - Left panel collapsed: PanelLeft icon (show panel)
|
|
495
|
+
* - Left panel expanded: PanelLeftClose icon (hide panel)
|
|
496
|
+
* - Right panel collapsed: PanelRight icon (show panel)
|
|
497
|
+
* - Right panel expanded: PanelRightClose icon (hide panel)
|
|
498
|
+
*/
|
|
499
|
+
export declare const PanelCollapseButton: default_2.FC<PanelCollapseButtonProps>;
|
|
500
|
+
|
|
501
|
+
export declare interface PanelCollapseButtonProps {
|
|
502
|
+
/** Whether the panel is currently collapsed */
|
|
503
|
+
isCollapsed: boolean;
|
|
504
|
+
/** Callback when the button is clicked */
|
|
505
|
+
onToggle: () => void;
|
|
506
|
+
/** Which side the panel is on */
|
|
507
|
+
side?: 'left' | 'right';
|
|
508
|
+
/** Icon size in pixels */
|
|
509
|
+
iconSize?: number;
|
|
510
|
+
/** Additional inline styles */
|
|
511
|
+
style?: default_2.CSSProperties;
|
|
512
|
+
/** Keyboard shortcut hint to show in tooltip */
|
|
513
|
+
shortcutHint?: string;
|
|
514
|
+
/** Custom title/tooltip */
|
|
515
|
+
title?: string;
|
|
516
|
+
/** Custom class name */
|
|
517
|
+
className?: string;
|
|
518
|
+
}
|
|
519
|
+
|
|
490
520
|
/**
|
|
491
521
|
* Collapsed state for panels
|
|
492
522
|
*/
|
|
@@ -500,6 +530,102 @@ export declare interface PanelCollapsed {
|
|
|
500
530
|
*/
|
|
501
531
|
export declare const panelCommands: Command[];
|
|
502
532
|
|
|
533
|
+
/**
|
|
534
|
+
* A button component for opening panel configuration/layout settings.
|
|
535
|
+
*/
|
|
536
|
+
export declare const PanelConfigureButton: default_2.FC<PanelConfigureButtonProps>;
|
|
537
|
+
|
|
538
|
+
export declare interface PanelConfigureButtonProps {
|
|
539
|
+
/** Callback when the button is clicked */
|
|
540
|
+
onConfigure: () => void;
|
|
541
|
+
/** Icon size in pixels */
|
|
542
|
+
iconSize?: number;
|
|
543
|
+
/** Additional inline styles */
|
|
544
|
+
style?: default_2.CSSProperties;
|
|
545
|
+
/** Custom title/tooltip */
|
|
546
|
+
title?: string;
|
|
547
|
+
/** Custom class name */
|
|
548
|
+
className?: string;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* A unified panel controls component that provides buttons for:
|
|
553
|
+
* - Collapsing/expanding left and right sidebars
|
|
554
|
+
* - Switching/swapping panel positions
|
|
555
|
+
* - Opening panel configuration
|
|
556
|
+
*
|
|
557
|
+
* The buttons are rendered in order:
|
|
558
|
+
* 1. Left sidebar collapse button
|
|
559
|
+
* 2. Left-middle switch button
|
|
560
|
+
* 3. Configure panels button
|
|
561
|
+
* 4. Right-middle switch button
|
|
562
|
+
* 5. Right sidebar collapse button
|
|
563
|
+
*
|
|
564
|
+
* @example
|
|
565
|
+
* ```tsx
|
|
566
|
+
* <PanelControls
|
|
567
|
+
* leftSidebarCollapsed={leftCollapsed}
|
|
568
|
+
* onToggleLeftSidebar={() => setLeftCollapsed(!leftCollapsed)}
|
|
569
|
+
* showLeftSidebarControl
|
|
570
|
+
* rightSidebarCollapsed={rightCollapsed}
|
|
571
|
+
* onToggleRightSidebar={() => setRightCollapsed(!rightCollapsed)}
|
|
572
|
+
* showRightSidebarControl
|
|
573
|
+
* onSwitchLeftMiddlePanels={handleSwitchLeftMiddle}
|
|
574
|
+
* showSwitchLeftMiddle
|
|
575
|
+
* onSwitchRightMiddlePanels={handleSwitchRightMiddle}
|
|
576
|
+
* showSwitchRightMiddle
|
|
577
|
+
* onConfigurePanels={() => setShowConfigModal(true)}
|
|
578
|
+
* showConfigureButton
|
|
579
|
+
* />
|
|
580
|
+
* ```
|
|
581
|
+
*/
|
|
582
|
+
export declare const PanelControls: default_2.FC<PanelControlsProps>;
|
|
583
|
+
|
|
584
|
+
export declare interface PanelControlsProps {
|
|
585
|
+
/** Left sidebar collapsed state */
|
|
586
|
+
leftSidebarCollapsed?: boolean;
|
|
587
|
+
/** Callback when left sidebar toggle is clicked */
|
|
588
|
+
onToggleLeftSidebar?: () => void;
|
|
589
|
+
/** Whether to show the left sidebar control */
|
|
590
|
+
showLeftSidebarControl?: boolean;
|
|
591
|
+
/** Right sidebar collapsed state */
|
|
592
|
+
rightSidebarCollapsed?: boolean;
|
|
593
|
+
/** Callback when right sidebar toggle is clicked */
|
|
594
|
+
onToggleRightSidebar?: () => void;
|
|
595
|
+
/** Whether to show the right sidebar control */
|
|
596
|
+
showRightSidebarControl?: boolean;
|
|
597
|
+
/** Callback when switch left-middle panels button is clicked */
|
|
598
|
+
onSwitchLeftMiddlePanels?: () => void;
|
|
599
|
+
/** Whether to show the switch left-middle button */
|
|
600
|
+
showSwitchLeftMiddle?: boolean;
|
|
601
|
+
/** Callback when switch right-middle panels button is clicked */
|
|
602
|
+
onSwitchRightMiddlePanels?: () => void;
|
|
603
|
+
/** Whether to show the switch right-middle button */
|
|
604
|
+
showSwitchRightMiddle?: boolean;
|
|
605
|
+
/** Callback when configure panels button is clicked */
|
|
606
|
+
onConfigurePanels?: () => void;
|
|
607
|
+
/** Whether to show the configure panels button */
|
|
608
|
+
showConfigureButton?: boolean;
|
|
609
|
+
/** Gap between buttons in pixels */
|
|
610
|
+
gap?: number;
|
|
611
|
+
/** Additional inline styles for the container */
|
|
612
|
+
style?: default_2.CSSProperties;
|
|
613
|
+
/** Custom class name for the container */
|
|
614
|
+
className?: string;
|
|
615
|
+
/** Icon size for all buttons */
|
|
616
|
+
iconSize?: number;
|
|
617
|
+
/** Props to pass to the left collapse button */
|
|
618
|
+
leftCollapseButtonProps?: Partial<Omit<PanelCollapseButtonProps, 'isCollapsed' | 'onToggle' | 'side'>>;
|
|
619
|
+
/** Props to pass to the right collapse button */
|
|
620
|
+
rightCollapseButtonProps?: Partial<Omit<PanelCollapseButtonProps, 'isCollapsed' | 'onToggle' | 'side'>>;
|
|
621
|
+
/** Props to pass to the left-middle switch button */
|
|
622
|
+
leftMiddleSwitchButtonProps?: Partial<Omit<PanelSwitchButtonProps, 'onSwitch' | 'variant'>>;
|
|
623
|
+
/** Props to pass to the right-middle switch button */
|
|
624
|
+
rightMiddleSwitchButtonProps?: Partial<Omit<PanelSwitchButtonProps, 'onSwitch' | 'variant'>>;
|
|
625
|
+
/** Props to pass to the configure button */
|
|
626
|
+
configureButtonProps?: Partial<Omit<PanelConfigureButtonProps, 'onConfigure'>>;
|
|
627
|
+
}
|
|
628
|
+
|
|
503
629
|
export { PanelDefinition }
|
|
504
630
|
|
|
505
631
|
export { PanelDefinitionWithContent }
|
|
@@ -560,6 +686,29 @@ export { PanelSlot }
|
|
|
560
686
|
*/
|
|
561
687
|
export declare type PanelSlotId = 'left' | 'middle' | 'right';
|
|
562
688
|
|
|
689
|
+
/**
|
|
690
|
+
* A button component for switching/swapping panel positions.
|
|
691
|
+
*
|
|
692
|
+
* - left-middle: Shows ArrowLeftRight icon for swapping left and middle panels
|
|
693
|
+
* - right-middle: Shows ArrowRightLeft icon for swapping right and middle panels
|
|
694
|
+
*/
|
|
695
|
+
export declare const PanelSwitchButton: default_2.FC<PanelSwitchButtonProps>;
|
|
696
|
+
|
|
697
|
+
export declare interface PanelSwitchButtonProps {
|
|
698
|
+
/** Callback when the button is clicked */
|
|
699
|
+
onSwitch: () => void;
|
|
700
|
+
/** Which panels are being switched */
|
|
701
|
+
variant?: 'left-middle' | 'right-middle';
|
|
702
|
+
/** Icon size in pixels */
|
|
703
|
+
iconSize?: number;
|
|
704
|
+
/** Additional inline styles */
|
|
705
|
+
style?: default_2.CSSProperties;
|
|
706
|
+
/** Custom title/tooltip */
|
|
707
|
+
title?: string;
|
|
708
|
+
/** Custom class name */
|
|
709
|
+
className?: string;
|
|
710
|
+
}
|
|
711
|
+
|
|
563
712
|
/**
|
|
564
713
|
* Storage adapter interface for persisting panel state
|
|
565
714
|
* Implementations can use localStorage, Electron IPC, or remote storage
|