@mithrl/design-system 0.1.0 → 0.3.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.
@@ -10,6 +10,8 @@ export type ButtonSize = NonNullable<VariantProps<typeof buttonVariants>["size"]
10
10
  export type ButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> & VariantProps<typeof buttonVariants> & {
11
11
  children: ReactNode;
12
12
  loading?: boolean;
13
+ /** Keeps async-action focus while guarding repeat activation with aria-disabled. */
14
+ preserveFocusWhileLoading?: boolean;
13
15
  leadingIcon?: ReactNode;
14
16
  trailingIcon?: ReactNode;
15
17
  };
@@ -23,6 +25,8 @@ export declare const Button: import("react").ForwardRefExoticComponent<Omit<Butt
23
25
  } & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
24
26
  children: ReactNode;
25
27
  loading?: boolean;
28
+ /** Keeps async-action focus while guarding repeat activation with aria-disabled. */
29
+ preserveFocusWhileLoading?: boolean;
26
30
  leadingIcon?: ReactNode;
27
31
  trailingIcon?: ReactNode;
28
32
  } & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,41 @@
1
+
2
+ export type ComposerMode = "guided" | "autopilot";
3
+ export type ComposerStatus = "idle" | "sending" | "streaming";
4
+ export type ComposerPreviewState = "hover" | "focus";
5
+ export type ComposerLabels = {
6
+ input: string;
7
+ add: string;
8
+ send: string;
9
+ stop: string;
10
+ sending: string;
11
+ guided: string;
12
+ autopilot: string;
13
+ };
14
+ export type ComposerProps = {
15
+ value?: string;
16
+ defaultValue?: string;
17
+ onValueChange?: (value: string) => void;
18
+ onSubmitPrompt?: (value: string, mode: ComposerMode) => void;
19
+ onStop?: () => void;
20
+ onAdd?: () => void;
21
+ mode?: ComposerMode;
22
+ defaultMode?: ComposerMode;
23
+ onModeChange?: (mode: ComposerMode) => void;
24
+ status?: ComposerStatus;
25
+ disabled?: boolean;
26
+ readOnly?: boolean;
27
+ required?: boolean;
28
+ autoFocus?: boolean;
29
+ name?: string;
30
+ placeholder?: string;
31
+ labels?: Partial<ComposerLabels>;
32
+ className?: string;
33
+ textareaClassName?: string;
34
+ "aria-describedby"?: string;
35
+ "data-preview-state"?: ComposerPreviewState;
36
+ };
37
+ /**
38
+ * Workspace conversation input with attachment, Guided/Autopilot selection,
39
+ * submission, generation interruption, content growth, and bounded scrolling.
40
+ */
41
+ export declare const Composer: import("react").ForwardRefExoticComponent<ComposerProps & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -0,0 +1,48 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+
3
+ type NativeComposerAttachmentViewProps = Omit<HTMLAttributes<HTMLElement>, "children" | "title">;
4
+ export type ComposerAttachmentViewProps = NativeComposerAttachmentViewProps & {
5
+ /** Accessible and visible view heading. */
6
+ heading?: ReactNode;
7
+ /** Short file-acquisition instruction below the heading. */
8
+ description?: ReactNode;
9
+ /** Product-owned browse-file and browse-folder controls. */
10
+ acquisitionActions: ReactNode;
11
+ /** Product-owned selection or drop status. */
12
+ acquisitionStatus?: ReactNode;
13
+ /** Product-owned selected resources, queue, progress, or empty state. */
14
+ children: ReactNode;
15
+ /** Product-owned Clear, Upload, retry, or equivalent actions. */
16
+ footerActions: ReactNode;
17
+ /** Reports the explicit request to return to the Composer. */
18
+ onClose: () => void;
19
+ /** Accessible name for the close action. */
20
+ closeLabel?: string;
21
+ /** Applies the approved active drop surface without owning drag events. */
22
+ dragging?: boolean;
23
+ };
24
+ /**
25
+ * Controlled visual shell for the Composer attachment view. File selection,
26
+ * queues, transport, retries, and persistence remain product-owned slots.
27
+ */
28
+ export declare const ComposerAttachmentView: import("react").ForwardRefExoticComponent<NativeComposerAttachmentViewProps & {
29
+ /** Accessible and visible view heading. */
30
+ heading?: ReactNode;
31
+ /** Short file-acquisition instruction below the heading. */
32
+ description?: ReactNode;
33
+ /** Product-owned browse-file and browse-folder controls. */
34
+ acquisitionActions: ReactNode;
35
+ /** Product-owned selection or drop status. */
36
+ acquisitionStatus?: ReactNode;
37
+ /** Product-owned selected resources, queue, progress, or empty state. */
38
+ children: ReactNode;
39
+ /** Product-owned Clear, Upload, retry, or equivalent actions. */
40
+ footerActions: ReactNode;
41
+ /** Reports the explicit request to return to the Composer. */
42
+ onClose: () => void;
43
+ /** Accessible name for the close action. */
44
+ closeLabel?: string;
45
+ /** Applies the approved active drop surface without owning drag events. */
46
+ dragging?: boolean;
47
+ } & import("react").RefAttributes<HTMLElement>>;
48
+ export {};
@@ -0,0 +1,23 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ export type ComposerView = "composer" | "attachments";
3
+ export type ComposerViewTransitionProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
4
+ /** Active view. File acquisition state remains owned by the consumer. */
5
+ view: ComposerView;
6
+ /** The production Composer instance shown at rest. */
7
+ composer: ReactNode;
8
+ /** Consumer-owned file acquisition and selection content. */
9
+ attachments: ReactNode;
10
+ };
11
+ /**
12
+ * Bottom-anchored transition between Composer and consumer-owned attachment
13
+ * content. The shared surface expands upward while both view layers move only
14
+ * 12px, preserving the approved vertical carousel behavior.
15
+ */
16
+ export declare const ComposerViewTransition: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
17
+ /** Active view. File acquisition state remains owned by the consumer. */
18
+ view: ComposerView;
19
+ /** The production Composer instance shown at rest. */
20
+ composer: ReactNode;
21
+ /** Consumer-owned file acquisition and selection content. */
22
+ attachments: ReactNode;
23
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -2,8 +2,9 @@ import { Menu } from "@base-ui/react/menu";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  import { type ComponentPropsWithoutRef, type ReactNode } from "react";
4
4
 
5
+
5
6
  export declare const dropdownMenuContentVariants: (props?: ({
6
- width?: "compact" | "default" | "maximum" | null | undefined;
7
+ width?: "compact" | "default" | "maximum" | "trigger" | null | undefined;
7
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
9
  export type DropdownMenuContentWidth = NonNullable<VariantProps<typeof dropdownMenuContentVariants>["width"]>;
9
10
  export type DropdownMenuItemTone = "neutral" | "destructive";
@@ -0,0 +1,99 @@
1
+ import { type HTMLAttributes, type MouseEvent, type MouseEventHandler, type ReactNode } from "react";
2
+
3
+ export type ExplorerUploadFileType = "data" | "structured-data" | "document" | "code" | "notebook" | "image" | "scientific-data" | "archive" | "generic";
4
+ export type ExplorerScientificOutputType = "dataset" | "report" | "figure" | "plot" | "code" | "generic";
5
+ type ExplorerResourceBase = {
6
+ /** Stable owner-defined identity. IDs are unique across the whole Explorer. */
7
+ id: string;
8
+ /** Visible single-line resource name. */
9
+ name: string;
10
+ /** Native destination. When omitted, the matching activation callback may own selection. */
11
+ href?: string;
12
+ };
13
+ export type ExplorerUploadFile = ExplorerResourceBase & {
14
+ type: "file";
15
+ fileType: ExplorerUploadFileType;
16
+ };
17
+ export type ExplorerUploadFolder = ExplorerResourceBase & {
18
+ type: "folder";
19
+ children: readonly ExplorerUploadNode[];
20
+ };
21
+ export type ExplorerUploadNode = ExplorerUploadFile | ExplorerUploadFolder;
22
+ export type ExplorerScientificOutput = ExplorerResourceBase & {
23
+ type: "output";
24
+ outputType: ExplorerScientificOutputType;
25
+ };
26
+ export type ExplorerScientificOutputFolder = ExplorerResourceBase & {
27
+ type: "folder";
28
+ children: readonly ExplorerScientificOutputNode[];
29
+ };
30
+ export type ExplorerScientificOutputNode = ExplorerScientificOutput | ExplorerScientificOutputFolder;
31
+ export type ExplorerQuestion = {
32
+ id: string;
33
+ name: string;
34
+ children: readonly ExplorerScientificOutputNode[];
35
+ };
36
+ export type ExplorerLabels = {
37
+ panel: string;
38
+ tab: string;
39
+ panelActions: string;
40
+ uploads: string;
41
+ uploadsCount: (count: number) => string;
42
+ noUploadsTitle: ReactNode;
43
+ noUploadsDescription: ReactNode;
44
+ scientificOutputs: string;
45
+ questionsCount: (count: number) => string;
46
+ noScientificOutputsTitle: ReactNode;
47
+ noScientificOutputsDescription: ReactNode;
48
+ download: (name: string) => string;
49
+ };
50
+ type ResourceClick = MouseEvent<HTMLAnchorElement | HTMLButtonElement>;
51
+ export type ExplorerProps = Omit<HTMLAttributes<HTMLElement>, "children" | "onSelect"> & {
52
+ uploads?: readonly ExplorerUploadNode[];
53
+ questions?: readonly ExplorerQuestion[];
54
+ /** Controlled expanded folder and Question identities. */
55
+ expandedIds?: readonly string[];
56
+ /** Initial expanded identities for uncontrolled use. */
57
+ defaultExpandedIds?: readonly string[];
58
+ onExpandedIdsChange?: (ids: readonly string[]) => void;
59
+ onUploadActivate?: (upload: ExplorerUploadFile, event: ResourceClick) => void;
60
+ onScientificOutputActivate?: (output: ExplorerScientificOutput, event: ResourceClick) => void;
61
+ /** Independent download action revealed on hover or keyboard focus. */
62
+ onUploadDownload?: (upload: ExplorerUploadFile, event: MouseEvent<HTMLButtonElement>) => void;
63
+ /** Independent download action revealed on hover or keyboard focus. */
64
+ onScientificOutputDownload?: (output: ExplorerScientificOutput, event: MouseEvent<HTMLButtonElement>) => void;
65
+ onPanelAction?: MouseEventHandler<HTMLButtonElement>;
66
+ /**
67
+ * Renders Explorer's standalone Panel Tab header. Set false when the owning
68
+ * SecondaryPanel supplies the shared tab collection and panel actions.
69
+ */
70
+ showHeader?: boolean;
71
+ labels?: Partial<ExplorerLabels>;
72
+ };
73
+ /**
74
+ * Secondary Workspace panel for uploaded files and generated scientific
75
+ * outputs. Product code owns loading, navigation, previews, and persistence.
76
+ */
77
+ export declare const Explorer: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children" | "onSelect"> & {
78
+ uploads?: readonly ExplorerUploadNode[];
79
+ questions?: readonly ExplorerQuestion[];
80
+ /** Controlled expanded folder and Question identities. */
81
+ expandedIds?: readonly string[];
82
+ /** Initial expanded identities for uncontrolled use. */
83
+ defaultExpandedIds?: readonly string[];
84
+ onExpandedIdsChange?: (ids: readonly string[]) => void;
85
+ onUploadActivate?: (upload: ExplorerUploadFile, event: ResourceClick) => void;
86
+ onScientificOutputActivate?: (output: ExplorerScientificOutput, event: ResourceClick) => void;
87
+ /** Independent download action revealed on hover or keyboard focus. */
88
+ onUploadDownload?: (upload: ExplorerUploadFile, event: MouseEvent<HTMLButtonElement>) => void;
89
+ /** Independent download action revealed on hover or keyboard focus. */
90
+ onScientificOutputDownload?: (output: ExplorerScientificOutput, event: MouseEvent<HTMLButtonElement>) => void;
91
+ onPanelAction?: MouseEventHandler<HTMLButtonElement>;
92
+ /**
93
+ * Renders Explorer's standalone Panel Tab header. Set false when the owning
94
+ * SecondaryPanel supplies the shared tab collection and panel actions.
95
+ */
96
+ showHeader?: boolean;
97
+ labels?: Partial<ExplorerLabels>;
98
+ } & import("react").RefAttributes<HTMLElement>>;
99
+ export {};
@@ -1,10 +1,33 @@
1
- import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type HTMLAttributes, type MouseEventHandler } from "react";
1
+ import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type HTMLAttributes, type MouseEventHandler, type ReactElement } from "react";
2
2
  import { type AccountMenuProps } from "../account-menu/AccountMenu";
3
3
  import { type DropdownMenuProps } from "../dropdown-menu/DropdownMenu";
4
4
  import { type ThemeMode } from "../switch/Switch";
5
+ import { type ProjectMenuProps } from "../project-menu/ProjectMenu";
5
6
 
6
7
  type BrandLinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "children" | "className" | "href">;
7
8
  type AccountButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-controls" | "aria-expanded" | "aria-haspopup" | "aria-label" | "children" | "className" | "onClick" | "type">;
9
+ type ProjectSelectorButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-label" | "children" | "className" | "onClick" | "title" | "type">;
10
+ export type GlobalAppBarProjectSelectorPresentation = "full" | "truncated" | "icon-only";
11
+ export type GlobalAppBarProjectSelector = {
12
+ /** Full project name preserved in the accessible name in every presentation. */
13
+ name: string;
14
+ /** Responsive presentation selected by the owning App Shell. */
15
+ presentation?: GlobalAppBarProjectSelectorPresentation;
16
+ /** Optional explicit accessible name. Defaults to `Choose project: {name}`. */
17
+ label?: string;
18
+ /** Called when project selection is requested. */
19
+ onClick?: MouseEventHandler<HTMLButtonElement>;
20
+ /** Safe native attributes for the project-selector button. */
21
+ buttonProps?: ProjectSelectorButtonProps;
22
+ /** Optional searchable menu opened by the selector trigger. */
23
+ menu?: Omit<ProjectMenuProps, "portalContainer">;
24
+ /** Controlled project-menu visibility. */
25
+ menuOpen?: DropdownMenuProps["open"];
26
+ /** Initial project-menu visibility for uncontrolled use. */
27
+ defaultMenuOpen?: DropdownMenuProps["defaultOpen"];
28
+ /** Called when project-menu visibility changes. */
29
+ onMenuOpenChange?: DropdownMenuProps["onOpenChange"];
30
+ };
8
31
  export type GlobalAppBarProps = Omit<HTMLAttributes<HTMLElement>, "children"> & {
9
32
  /** Home destination used by the official Mithrl brand action. */
10
33
  brandHref?: string;
@@ -36,11 +59,20 @@ export type GlobalAppBarProps = Omit<HTMLAttributes<HTMLElement>, "children"> &
36
59
  onAccountMenuOpenChange?: DropdownMenuProps["onOpenChange"];
37
60
  /** Additional native attributes for the account-menu button. */
38
61
  accountButtonProps?: AccountButtonProps;
62
+ /**
63
+ * Workspace-only App Shell controls. Each control keeps its own semantics;
64
+ * Global App Bar owns only their approved order and alignment.
65
+ */
66
+ workspaceControls?: {
67
+ navigationToggle: ReactElement;
68
+ projectSelector: GlobalAppBarProjectSelector;
69
+ explorerToggle: ReactElement;
70
+ };
39
71
  };
40
72
  /**
41
- * Persistent Home-level application anchor. Workspace structure, project
42
- * context, search, creation, and page-local actions intentionally stay out of
43
- * this composite.
73
+ * Persistent application anchor. Home keeps the minimal brand, theme, and
74
+ * account contract; Workspace adds structural panel controls and project
75
+ * context without introducing a second App Bar component.
44
76
  */
45
77
  export declare const GlobalAppBar: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children"> & {
46
78
  /** Home destination used by the official Mithrl brand action. */
@@ -73,5 +105,14 @@ export declare const GlobalAppBar: import("react").ForwardRefExoticComponent<Omi
73
105
  onAccountMenuOpenChange?: DropdownMenuProps["onOpenChange"];
74
106
  /** Additional native attributes for the account-menu button. */
75
107
  accountButtonProps?: AccountButtonProps;
108
+ /**
109
+ * Workspace-only App Shell controls. Each control keeps its own semantics;
110
+ * Global App Bar owns only their approved order and alignment.
111
+ */
112
+ workspaceControls?: {
113
+ navigationToggle: ReactElement;
114
+ projectSelector: GlobalAppBarProjectSelector;
115
+ explorerToggle: ReactElement;
116
+ };
76
117
  } & import("react").RefAttributes<HTMLElement>>;
77
118
  export {};
@@ -0,0 +1,47 @@
1
+ import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type MouseEventHandler } from "react";
2
+ import { type IconGlyphComponent } from "../icon/Icon";
3
+
4
+ export declare const navigationItemVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
5
+ export type NavigationItemPreviewState = "hover" | "pressed" | "focus";
6
+ type LeadingIcon = {
7
+ /** A recognized destination glyph rendered through the Icon primitive. */
8
+ leading: "icon";
9
+ icon: IconGlyphComponent;
10
+ };
11
+ type LeadingQuestion = {
12
+ /** A text-led question destination with no decorative leading marker. */
13
+ leading?: "question";
14
+ icon?: never;
15
+ };
16
+ type NavigationItemCommonProps = (LeadingIcon | LeadingQuestion) & {
17
+ /** The required visible and accessible destination name. */
18
+ label: string;
19
+ /** Controlled current/selected state supplied by the owning navigation. */
20
+ selected?: boolean;
21
+ /** Controlled active-panel state. It may coexist across multiple Questions. */
22
+ active?: boolean;
23
+ /** Shows the approved text shimmer and trailing Progress Indicator. */
24
+ loading?: boolean;
25
+ /** Adds the question-row overflow action as a sibling interactive control. */
26
+ onMenuAction?: MouseEventHandler<HTMLButtonElement>;
27
+ /** Accessible name for the optional question-row overflow action. */
28
+ menuActionLabel?: string;
29
+ /** Storybook-only hook for reviewing native CSS states. */
30
+ "data-preview-state"?: NavigationItemPreviewState;
31
+ };
32
+ type NavigationItemAnchorProps = NavigationItemCommonProps & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "aria-current" | "children" | "href"> & {
33
+ /** Stable navigation destination. Anchors are the preferred contract. */
34
+ href: string;
35
+ };
36
+ type NavigationItemButtonProps = NavigationItemCommonProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-pressed" | "children" | "disabled" | "type"> & {
37
+ /** Omit href only for an in-place Workspace selection. */
38
+ href?: never;
39
+ };
40
+ export type NavigationItemProps = NavigationItemAnchorProps | NavigationItemButtonProps;
41
+ /**
42
+ * A compact destination row for persistent product navigation. Stable routes
43
+ * render as native anchors; the button form is reserved for in-place
44
+ * selection. Routing, authorization, and panel layout remain owner concerns.
45
+ */
46
+ export declare const NavigationItem: import("react").ForwardRefExoticComponent<NavigationItemProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
47
+ export {};
@@ -16,6 +16,8 @@ export type PanelTabItem = {
16
16
  panelId?: string;
17
17
  /** Optional explicit tab ID used by the associated panel. */
18
18
  id?: string;
19
+ /** Uses the Design System Tooltip when the visible presentation is icon-only. */
20
+ tooltip?: boolean;
19
21
  };
20
22
  export type PanelTabsProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> & {
21
23
  items: readonly PanelTabItem[];
@@ -0,0 +1,8 @@
1
+ import { type HTMLAttributes } from "react";
2
+
3
+ export type PopoverSurfaceProps = HTMLAttributes<HTMLDivElement>;
4
+ /**
5
+ * Visual shell for floating content. Positioning, focus, keyboard interaction,
6
+ * dismissal, and semantic roles remain owned by the consuming behavior layer.
7
+ */
8
+ export declare const PopoverSurface: import("react").ForwardRefExoticComponent<PopoverSurfaceProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,41 @@
1
+ import { type ReactNode } from "react";
2
+ import { type DropdownMenuContentProps } from "../dropdown-menu/DropdownMenu";
3
+
4
+ export type ProjectMenuProject = {
5
+ id: string;
6
+ name: string;
7
+ disabled?: boolean;
8
+ };
9
+ export type ProjectMenuLabels = {
10
+ menu: string;
11
+ search: string;
12
+ searchPlaceholder: string;
13
+ empty: ReactNode;
14
+ browseAll: ReactNode;
15
+ };
16
+ export type ProjectMenuProps = Omit<DropdownMenuContentProps, "aria-label" | "children" | "width"> & {
17
+ projects: ProjectMenuProject[];
18
+ selectedProjectId?: string;
19
+ query?: string;
20
+ defaultQuery?: string;
21
+ onQueryChange?: (query: string) => void;
22
+ onProjectSelect?: (project: ProjectMenuProject) => void;
23
+ browseAllHref?: string;
24
+ onBrowseAll?: () => void;
25
+ labels?: Partial<ProjectMenuLabels>;
26
+ };
27
+ /**
28
+ * Searchable project-navigation content for the Global App Bar project
29
+ * selector. The external trigger and open state remain owned by Global App Bar.
30
+ */
31
+ export declare const ProjectMenu: import("react").ForwardRefExoticComponent<Omit<DropdownMenuContentProps, "aria-label" | "children" | "width"> & {
32
+ projects: ProjectMenuProject[];
33
+ selectedProjectId?: string;
34
+ query?: string;
35
+ defaultQuery?: string;
36
+ onQueryChange?: (query: string) => void;
37
+ onProjectSelect?: (project: ProjectMenuProject) => void;
38
+ browseAllHref?: string;
39
+ onBrowseAll?: () => void;
40
+ labels?: Partial<ProjectMenuLabels>;
41
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,79 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+
3
+ export type ResizablePanelDirection = "horizontal";
4
+ export type ResizablePanelMinimum = "standard" | "compact" | number;
5
+ export type ResizablePanelProps = Omit<HTMLAttributes<HTMLDivElement>, "id"> & {
6
+ /** Stable identity referenced by the splitter's aria-controls contract. */
7
+ id: string;
8
+ /** Pixel minimum or the approved Primary standard/compact policy. */
9
+ minSize: ResizablePanelMinimum;
10
+ /** Optional visible heading that names this panel region. */
11
+ labelId?: string;
12
+ };
13
+ export type ResizableHandleProps = Omit<HTMLAttributes<HTMLDivElement>, "role" | "tabIndex" | "aria-controls" | "aria-orientation" | "aria-valuemin" | "aria-valuemax" | "aria-valuenow">;
14
+ export type ResizablePanelGroupProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "dir" | "onChange"> & {
15
+ /** V1 supports only the approved horizontal Primary–Secondary layout. */
16
+ direction?: ResizablePanelDirection;
17
+ /** Primary share as a percentage of the available panel space. */
18
+ value?: number;
19
+ /** Initial Primary share for uncontrolled use. Defaults to 60. */
20
+ defaultValue?: number;
21
+ /** Reports every pointer or keyboard resize. */
22
+ onValueChange?: (value: number) => void;
23
+ /** Reports the final pointer value or each committed keyboard step. */
24
+ onValueCommit?: (value: number) => void;
25
+ /** Controlled Secondary width in pixels. Use instead of `value`. */
26
+ secondarySize?: number;
27
+ /** Initial Secondary width in pixels for uncontrolled pixel persistence. */
28
+ defaultSecondarySize?: number;
29
+ /** Reports every pointer or keyboard resize in Secondary pixels. */
30
+ onSecondarySizeChange?: (size: number) => void;
31
+ /** Reports the final pointer value or each keyboard step in pixels. */
32
+ onSecondarySizeCommit?: (size: number) => void;
33
+ /** Exactly Primary Panel, Handle, and Secondary Panel in that order. */
34
+ children: ReactNode;
35
+ };
36
+ /**
37
+ * Content-agnostic region used as the Primary or Secondary child of a
38
+ * ResizablePanelGroup. Surface, header, padding, and scroll ownership remain
39
+ * with the panel content supplied by the consumer.
40
+ */
41
+ export declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "id"> & {
42
+ /** Stable identity referenced by the splitter's aria-controls contract. */
43
+ id: string;
44
+ /** Pixel minimum or the approved Primary standard/compact policy. */
45
+ minSize: ResizablePanelMinimum;
46
+ /** Optional visible heading that names this panel region. */
47
+ labelId?: string;
48
+ } & import("react").RefAttributes<HTMLDivElement>>;
49
+ /**
50
+ * Invisible 8px window splitter. Feedback is rendered only on the two panel
51
+ * edges adjacent to the gap; the target itself never becomes a visible rail.
52
+ */
53
+ export declare const ResizableHandle: import("react").ForwardRefExoticComponent<ResizableHandleProps & import("react").RefAttributes<HTMLDivElement>>;
54
+ /**
55
+ * Horizontal two-panel layout that owns split measurement, constraints, and
56
+ * direct manipulation while leaving visibility and persistence to App Shell.
57
+ */
58
+ export declare const ResizablePanelGroup: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "dir" | "onChange"> & {
59
+ /** V1 supports only the approved horizontal Primary–Secondary layout. */
60
+ direction?: ResizablePanelDirection;
61
+ /** Primary share as a percentage of the available panel space. */
62
+ value?: number;
63
+ /** Initial Primary share for uncontrolled use. Defaults to 60. */
64
+ defaultValue?: number;
65
+ /** Reports every pointer or keyboard resize. */
66
+ onValueChange?: (value: number) => void;
67
+ /** Reports the final pointer value or each committed keyboard step. */
68
+ onValueCommit?: (value: number) => void;
69
+ /** Controlled Secondary width in pixels. Use instead of `value`. */
70
+ secondarySize?: number;
71
+ /** Initial Secondary width in pixels for uncontrolled pixel persistence. */
72
+ defaultSecondarySize?: number;
73
+ /** Reports every pointer or keyboard resize in Secondary pixels. */
74
+ onSecondarySizeChange?: (size: number) => void;
75
+ /** Reports the final pointer value or each keyboard step in pixels. */
76
+ onSecondarySizeCommit?: (size: number) => void;
77
+ /** Exactly Primary Panel, Handle, and Secondary Panel in that order. */
78
+ children: ReactNode;
79
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,69 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ import { type PanelTabItem } from "../panel-tabs/PanelTabs";
3
+
4
+ export declare const MITHRL_QUESTION_DRAG_TYPE = "application/x-mithrl-question-id";
5
+ export type SecondaryPanelTabKind = "explorer" | "question" | "resource" | "tool";
6
+ export type SecondaryPanelTab = Omit<PanelTabItem, "closable" | "tooltip"> & {
7
+ /** Controls the approved icon-led or text-only tab identity. */
8
+ kind: SecondaryPanelTabKind;
9
+ /** Explorer is persistent; all other destinations may be owner-closeable. */
10
+ closable?: boolean;
11
+ };
12
+ export type SecondaryPanelDropTarget = "secondary";
13
+ export type SecondaryPanelProps = Omit<HTMLAttributes<HTMLElement>, "children" | "onDragEnter" | "onDragLeave" | "onDragOver" | "onDrop"> & {
14
+ /** Ordered, controlled panel destinations. Explorer must remain first. */
15
+ tabs: readonly SecondaryPanelTab[];
16
+ /** Controlled active destination identity. */
17
+ activeTabId: string;
18
+ /** Product-owned content for the active destination. */
19
+ children: ReactNode;
20
+ /** Optional product-owned panel actions rendered after the tab viewport. */
21
+ headerActions?: ReactNode;
22
+ /** Shows the approved trailing-edge overflow cue over the tab viewport. */
23
+ overflowFeedback?: boolean;
24
+ /** Uses the temporary compact full-screen header presentation. */
25
+ compactMode?: boolean;
26
+ /** Visible and accessible label for the compact dismissal action. */
27
+ compactCloseLabel?: string;
28
+ /** Reports controlled tab selection. */
29
+ onTabSelect: (tabId: string) => void;
30
+ /** Reports a close request and the fallback that keeps selection aligned with focus. */
31
+ onTabClose?: (tabId: string, fallbackTabId: string) => void;
32
+ /** Enables native Question drops from Workspace Navigation. */
33
+ onQuestionDrop?: (questionId: string, target: SecondaryPanelDropTarget) => void;
34
+ /** Reports compact Secondary dismissal without unmounting owner state. */
35
+ onSecondaryOpenChange: (open: boolean) => void;
36
+ /** Visible drop feedback. Defaults to the approved action copy. */
37
+ dropFeedbackLabel?: ReactNode;
38
+ };
39
+ /**
40
+ * Controlled Secondary Workspace surface. It composes Panel Tabs, compact
41
+ * presentation, and Question drop feedback while product code retains tab,
42
+ * placement, visibility, width, content, and persistence ownership.
43
+ */
44
+ export declare const SecondaryPanel: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children" | "onDragEnter" | "onDragLeave" | "onDragOver" | "onDrop"> & {
45
+ /** Ordered, controlled panel destinations. Explorer must remain first. */
46
+ tabs: readonly SecondaryPanelTab[];
47
+ /** Controlled active destination identity. */
48
+ activeTabId: string;
49
+ /** Product-owned content for the active destination. */
50
+ children: ReactNode;
51
+ /** Optional product-owned panel actions rendered after the tab viewport. */
52
+ headerActions?: ReactNode;
53
+ /** Shows the approved trailing-edge overflow cue over the tab viewport. */
54
+ overflowFeedback?: boolean;
55
+ /** Uses the temporary compact full-screen header presentation. */
56
+ compactMode?: boolean;
57
+ /** Visible and accessible label for the compact dismissal action. */
58
+ compactCloseLabel?: string;
59
+ /** Reports controlled tab selection. */
60
+ onTabSelect: (tabId: string) => void;
61
+ /** Reports a close request and the fallback that keeps selection aligned with focus. */
62
+ onTabClose?: (tabId: string, fallbackTabId: string) => void;
63
+ /** Enables native Question drops from Workspace Navigation. */
64
+ onQuestionDrop?: (questionId: string, target: SecondaryPanelDropTarget) => void;
65
+ /** Reports compact Secondary dismissal without unmounting owner state. */
66
+ onSecondaryOpenChange: (open: boolean) => void;
67
+ /** Visible drop feedback. Defaults to the approved action copy. */
68
+ dropFeedbackLabel?: ReactNode;
69
+ } & import("react").RefAttributes<HTMLElement>>;