@principal-ade/panel-layouts 0.2.3 → 0.2.5
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 +182 -0
- package/dist/index.esm.js +1252 -774
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -390,11 +390,32 @@ export declare function getGlobalCommandRegistry(): CommandRegistryService;
|
|
|
390
390
|
*/
|
|
391
391
|
export declare function getPanelCommands(): Command[];
|
|
392
392
|
|
|
393
|
+
/**
|
|
394
|
+
* Tool: Get Panel State
|
|
395
|
+
*
|
|
396
|
+
* Query the current state of a specific panel.
|
|
397
|
+
* Panels must implement a getState function to support this.
|
|
398
|
+
*/
|
|
399
|
+
export declare const getPanelStateTool: PanelTool;
|
|
400
|
+
|
|
393
401
|
/**
|
|
394
402
|
* Utility to extract parameter information for UI rendering.
|
|
395
403
|
*/
|
|
396
404
|
export declare function getToolParameterInfo(tool: RegisteredTool): ToolParameterInfo[];
|
|
397
405
|
|
|
406
|
+
/**
|
|
407
|
+
* Tool: Get Visible Panels
|
|
408
|
+
*
|
|
409
|
+
* Query which panels are currently visible and their state.
|
|
410
|
+
* Returns layout slot info including collapsed state and active panel IDs.
|
|
411
|
+
*/
|
|
412
|
+
export declare const getVisiblePanelsTool: PanelTool;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Layout action tools only (for selective registration).
|
|
416
|
+
*/
|
|
417
|
+
export declare const layoutActionTools: PanelTool[];
|
|
418
|
+
|
|
398
419
|
/**
|
|
399
420
|
* All layout tools exported as an array.
|
|
400
421
|
*
|
|
@@ -428,6 +449,13 @@ export declare const layoutToolsMetadata: {
|
|
|
428
449
|
tools: PanelTool[];
|
|
429
450
|
};
|
|
430
451
|
|
|
452
|
+
/**
|
|
453
|
+
* Tool: List Panels With State
|
|
454
|
+
*
|
|
455
|
+
* Get a list of all panels that support state queries.
|
|
456
|
+
*/
|
|
457
|
+
export declare const listPanelsWithStateTool: PanelTool;
|
|
458
|
+
|
|
431
459
|
/**
|
|
432
460
|
* Default localStorage-based persistence adapter for web applications
|
|
433
461
|
*/
|
|
@@ -487,6 +515,36 @@ export declare interface OpenAITool {
|
|
|
487
515
|
|
|
488
516
|
export { PanelBlurEventPayload }
|
|
489
517
|
|
|
518
|
+
/**
|
|
519
|
+
* A button component for collapsing/expanding side panels.
|
|
520
|
+
*
|
|
521
|
+
* Shows appropriate icon based on panel state and side:
|
|
522
|
+
* - Left panel collapsed: PanelLeft icon (show panel)
|
|
523
|
+
* - Left panel expanded: PanelLeftClose icon (hide panel)
|
|
524
|
+
* - Right panel collapsed: PanelRight icon (show panel)
|
|
525
|
+
* - Right panel expanded: PanelRightClose icon (hide panel)
|
|
526
|
+
*/
|
|
527
|
+
export declare const PanelCollapseButton: default_2.FC<PanelCollapseButtonProps>;
|
|
528
|
+
|
|
529
|
+
export declare interface PanelCollapseButtonProps {
|
|
530
|
+
/** Whether the panel is currently collapsed */
|
|
531
|
+
isCollapsed: boolean;
|
|
532
|
+
/** Callback when the button is clicked */
|
|
533
|
+
onToggle: () => void;
|
|
534
|
+
/** Which side the panel is on */
|
|
535
|
+
side?: 'left' | 'right';
|
|
536
|
+
/** Icon size in pixels */
|
|
537
|
+
iconSize?: number;
|
|
538
|
+
/** Additional inline styles */
|
|
539
|
+
style?: default_2.CSSProperties;
|
|
540
|
+
/** Keyboard shortcut hint to show in tooltip */
|
|
541
|
+
shortcutHint?: string;
|
|
542
|
+
/** Custom title/tooltip */
|
|
543
|
+
title?: string;
|
|
544
|
+
/** Custom class name */
|
|
545
|
+
className?: string;
|
|
546
|
+
}
|
|
547
|
+
|
|
490
548
|
/**
|
|
491
549
|
* Collapsed state for panels
|
|
492
550
|
*/
|
|
@@ -500,6 +558,102 @@ export declare interface PanelCollapsed {
|
|
|
500
558
|
*/
|
|
501
559
|
export declare const panelCommands: Command[];
|
|
502
560
|
|
|
561
|
+
/**
|
|
562
|
+
* A button component for opening panel configuration/layout settings.
|
|
563
|
+
*/
|
|
564
|
+
export declare const PanelConfigureButton: default_2.FC<PanelConfigureButtonProps>;
|
|
565
|
+
|
|
566
|
+
export declare interface PanelConfigureButtonProps {
|
|
567
|
+
/** Callback when the button is clicked */
|
|
568
|
+
onConfigure: () => void;
|
|
569
|
+
/** Icon size in pixels */
|
|
570
|
+
iconSize?: number;
|
|
571
|
+
/** Additional inline styles */
|
|
572
|
+
style?: default_2.CSSProperties;
|
|
573
|
+
/** Custom title/tooltip */
|
|
574
|
+
title?: string;
|
|
575
|
+
/** Custom class name */
|
|
576
|
+
className?: string;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* A unified panel controls component that provides buttons for:
|
|
581
|
+
* - Collapsing/expanding left and right sidebars
|
|
582
|
+
* - Switching/swapping panel positions
|
|
583
|
+
* - Opening panel configuration
|
|
584
|
+
*
|
|
585
|
+
* The buttons are rendered in order:
|
|
586
|
+
* 1. Left sidebar collapse button
|
|
587
|
+
* 2. Left-middle switch button
|
|
588
|
+
* 3. Configure panels button
|
|
589
|
+
* 4. Right-middle switch button
|
|
590
|
+
* 5. Right sidebar collapse button
|
|
591
|
+
*
|
|
592
|
+
* @example
|
|
593
|
+
* ```tsx
|
|
594
|
+
* <PanelControls
|
|
595
|
+
* leftSidebarCollapsed={leftCollapsed}
|
|
596
|
+
* onToggleLeftSidebar={() => setLeftCollapsed(!leftCollapsed)}
|
|
597
|
+
* showLeftSidebarControl
|
|
598
|
+
* rightSidebarCollapsed={rightCollapsed}
|
|
599
|
+
* onToggleRightSidebar={() => setRightCollapsed(!rightCollapsed)}
|
|
600
|
+
* showRightSidebarControl
|
|
601
|
+
* onSwitchLeftMiddlePanels={handleSwitchLeftMiddle}
|
|
602
|
+
* showSwitchLeftMiddle
|
|
603
|
+
* onSwitchRightMiddlePanels={handleSwitchRightMiddle}
|
|
604
|
+
* showSwitchRightMiddle
|
|
605
|
+
* onConfigurePanels={() => setShowConfigModal(true)}
|
|
606
|
+
* showConfigureButton
|
|
607
|
+
* />
|
|
608
|
+
* ```
|
|
609
|
+
*/
|
|
610
|
+
export declare const PanelControls: default_2.FC<PanelControlsProps>;
|
|
611
|
+
|
|
612
|
+
export declare interface PanelControlsProps {
|
|
613
|
+
/** Left sidebar collapsed state */
|
|
614
|
+
leftSidebarCollapsed?: boolean;
|
|
615
|
+
/** Callback when left sidebar toggle is clicked */
|
|
616
|
+
onToggleLeftSidebar?: () => void;
|
|
617
|
+
/** Whether to show the left sidebar control */
|
|
618
|
+
showLeftSidebarControl?: boolean;
|
|
619
|
+
/** Right sidebar collapsed state */
|
|
620
|
+
rightSidebarCollapsed?: boolean;
|
|
621
|
+
/** Callback when right sidebar toggle is clicked */
|
|
622
|
+
onToggleRightSidebar?: () => void;
|
|
623
|
+
/** Whether to show the right sidebar control */
|
|
624
|
+
showRightSidebarControl?: boolean;
|
|
625
|
+
/** Callback when switch left-middle panels button is clicked */
|
|
626
|
+
onSwitchLeftMiddlePanels?: () => void;
|
|
627
|
+
/** Whether to show the switch left-middle button */
|
|
628
|
+
showSwitchLeftMiddle?: boolean;
|
|
629
|
+
/** Callback when switch right-middle panels button is clicked */
|
|
630
|
+
onSwitchRightMiddlePanels?: () => void;
|
|
631
|
+
/** Whether to show the switch right-middle button */
|
|
632
|
+
showSwitchRightMiddle?: boolean;
|
|
633
|
+
/** Callback when configure panels button is clicked */
|
|
634
|
+
onConfigurePanels?: () => void;
|
|
635
|
+
/** Whether to show the configure panels button */
|
|
636
|
+
showConfigureButton?: boolean;
|
|
637
|
+
/** Gap between buttons in pixels */
|
|
638
|
+
gap?: number;
|
|
639
|
+
/** Additional inline styles for the container */
|
|
640
|
+
style?: default_2.CSSProperties;
|
|
641
|
+
/** Custom class name for the container */
|
|
642
|
+
className?: string;
|
|
643
|
+
/** Icon size for all buttons */
|
|
644
|
+
iconSize?: number;
|
|
645
|
+
/** Props to pass to the left collapse button */
|
|
646
|
+
leftCollapseButtonProps?: Partial<Omit<PanelCollapseButtonProps, 'isCollapsed' | 'onToggle' | 'side'>>;
|
|
647
|
+
/** Props to pass to the right collapse button */
|
|
648
|
+
rightCollapseButtonProps?: Partial<Omit<PanelCollapseButtonProps, 'isCollapsed' | 'onToggle' | 'side'>>;
|
|
649
|
+
/** Props to pass to the left-middle switch button */
|
|
650
|
+
leftMiddleSwitchButtonProps?: Partial<Omit<PanelSwitchButtonProps, 'onSwitch' | 'variant'>>;
|
|
651
|
+
/** Props to pass to the right-middle switch button */
|
|
652
|
+
rightMiddleSwitchButtonProps?: Partial<Omit<PanelSwitchButtonProps, 'onSwitch' | 'variant'>>;
|
|
653
|
+
/** Props to pass to the configure button */
|
|
654
|
+
configureButtonProps?: Partial<Omit<PanelConfigureButtonProps, 'onConfigure'>>;
|
|
655
|
+
}
|
|
656
|
+
|
|
503
657
|
export { PanelDefinition }
|
|
504
658
|
|
|
505
659
|
export { PanelDefinitionWithContent }
|
|
@@ -560,6 +714,29 @@ export { PanelSlot }
|
|
|
560
714
|
*/
|
|
561
715
|
export declare type PanelSlotId = 'left' | 'middle' | 'right';
|
|
562
716
|
|
|
717
|
+
/**
|
|
718
|
+
* A button component for switching/swapping panel positions.
|
|
719
|
+
*
|
|
720
|
+
* - left-middle: Shows ArrowLeftRight icon for swapping left and middle panels
|
|
721
|
+
* - right-middle: Shows ArrowRightLeft icon for swapping right and middle panels
|
|
722
|
+
*/
|
|
723
|
+
export declare const PanelSwitchButton: default_2.FC<PanelSwitchButtonProps>;
|
|
724
|
+
|
|
725
|
+
export declare interface PanelSwitchButtonProps {
|
|
726
|
+
/** Callback when the button is clicked */
|
|
727
|
+
onSwitch: () => void;
|
|
728
|
+
/** Which panels are being switched */
|
|
729
|
+
variant?: 'left-middle' | 'right-middle';
|
|
730
|
+
/** Icon size in pixels */
|
|
731
|
+
iconSize?: number;
|
|
732
|
+
/** Additional inline styles */
|
|
733
|
+
style?: default_2.CSSProperties;
|
|
734
|
+
/** Custom title/tooltip */
|
|
735
|
+
title?: string;
|
|
736
|
+
/** Custom class name */
|
|
737
|
+
className?: string;
|
|
738
|
+
}
|
|
739
|
+
|
|
563
740
|
/**
|
|
564
741
|
* Storage adapter interface for persisting panel state
|
|
565
742
|
* Implementations can use localStorage, Electron IPC, or remote storage
|
|
@@ -625,6 +802,11 @@ export { ResponsiveConfigurablePanelLayout }
|
|
|
625
802
|
|
|
626
803
|
export { ResponsiveConfigurablePanelLayoutProps }
|
|
627
804
|
|
|
805
|
+
/**
|
|
806
|
+
* State query tools only (for selective registration).
|
|
807
|
+
*/
|
|
808
|
+
export declare const stateQueryTools: PanelTool[];
|
|
809
|
+
|
|
628
810
|
/**
|
|
629
811
|
* Tool: Switch Panel
|
|
630
812
|
*
|