@bixlab/mtone 0.13.2 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +87 -6
- package/dist/index.js +2684 -2085
- package/dist/styles.css +1 -1
- package/llms.txt +151 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -390,6 +390,8 @@ interface TabItem {
|
|
|
390
390
|
forceRender?: boolean;
|
|
391
391
|
destroyOnHidden?: boolean;
|
|
392
392
|
}
|
|
393
|
+
/** Shared tab item height presets for Tabs and Panel. */
|
|
394
|
+
type TabsSize = "sm" | "md" | "lg";
|
|
393
395
|
/** A theme accent preset, or any valid CSS color value. */
|
|
394
396
|
type TabsIndicatorColor = MtoneAccent | (string & {});
|
|
395
397
|
interface TabsProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "children"> {
|
|
@@ -401,7 +403,8 @@ interface TabsProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>,
|
|
|
401
403
|
placement?: "top" | "bottom" | "start" | "end";
|
|
402
404
|
/** Attached connects to the panel at top; other placements use line styling. */
|
|
403
405
|
variant?: "line" | "card" | "editable-card" | "attached";
|
|
404
|
-
size
|
|
406
|
+
/** Tab item height preset; the legacy size names only vary typography. */
|
|
407
|
+
size?: TabsSize | "small" | "medium" | "large";
|
|
405
408
|
/** Color of the selected line indicator; defaults to currentColor. */
|
|
406
409
|
indicatorColor?: TabsIndicatorColor;
|
|
407
410
|
centered?: boolean;
|
|
@@ -541,13 +544,13 @@ interface SliderProps extends Common, ValueProps<number> {
|
|
|
541
544
|
step?: number;
|
|
542
545
|
}
|
|
543
546
|
declare function Slider({ label, className, ...props }: SliderProps): React__default.JSX.Element;
|
|
544
|
-
interface NumberInputProps extends Common, Omit<ValueProps<number | null>, "defaultValue"> {
|
|
547
|
+
interface NumberInputProps extends Common, Omit<ValueProps<number | null>, "defaultValue">, Pick<React__default.AriaAttributes, "aria-labelledby" | "aria-describedby"> {
|
|
545
548
|
defaultValue?: number;
|
|
546
549
|
min?: number;
|
|
547
550
|
max?: number;
|
|
548
551
|
step?: number;
|
|
549
552
|
}
|
|
550
|
-
declare function NumberInput({ label, className, ...props }: NumberInputProps): React__default.JSX.Element;
|
|
553
|
+
declare function NumberInput({ label, className, "aria-labelledby": labelledBy, "aria-describedby": describedBy, ...props }: NumberInputProps): React__default.JSX.Element;
|
|
551
554
|
|
|
552
555
|
interface MenuItem {
|
|
553
556
|
type?: "item";
|
|
@@ -1277,6 +1280,11 @@ type TreeNodeInfo = {
|
|
|
1277
1280
|
checked: boolean;
|
|
1278
1281
|
loading: boolean;
|
|
1279
1282
|
};
|
|
1283
|
+
/** An independent control at the logical end of a tree row. */
|
|
1284
|
+
interface TreeAction {
|
|
1285
|
+
content: React.ReactNode;
|
|
1286
|
+
visibility?: "always" | "hover" | "active";
|
|
1287
|
+
}
|
|
1280
1288
|
type TreeDropInfo = {
|
|
1281
1289
|
event: React.DragEvent;
|
|
1282
1290
|
node: TreeItem;
|
|
@@ -1354,6 +1362,8 @@ interface TreeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "draggabl
|
|
|
1354
1362
|
gap?: number;
|
|
1355
1363
|
/** Renders separate display content at the logical end of each row. */
|
|
1356
1364
|
endContent?: (info: TreeNodeInfo) => React.ReactNode;
|
|
1365
|
+
/** Renders independent trailing controls for enabled nodes. */
|
|
1366
|
+
actions?: (info: TreeNodeInfo) => TreeAction | readonly TreeAction[] | null | undefined;
|
|
1357
1367
|
filterTreeNode?: (node: TreeItem) => boolean;
|
|
1358
1368
|
loadData?: (node: TreeItem) => Promise<unknown>;
|
|
1359
1369
|
loadedKeys?: TreeKey[];
|
|
@@ -1363,6 +1373,7 @@ interface TreeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "draggabl
|
|
|
1363
1373
|
}) => void;
|
|
1364
1374
|
onLoadError?: (error: unknown, node: TreeItem) => void;
|
|
1365
1375
|
height?: number;
|
|
1376
|
+
/** Actual row height in pixels, excluding the gap. Defaults to 32, minimum 24. */
|
|
1366
1377
|
itemHeight?: number;
|
|
1367
1378
|
virtual?: boolean;
|
|
1368
1379
|
draggable?: boolean | ((node: TreeItem) => boolean);
|
|
@@ -1452,9 +1463,17 @@ type UploadProps = {
|
|
|
1452
1463
|
};
|
|
1453
1464
|
declare function Upload({ upload, accept, maxSize, multiple, disabled, onChange, className, children, }: UploadProps): React.JSX.Element;
|
|
1454
1465
|
|
|
1466
|
+
interface SidebarResizeOptions {
|
|
1467
|
+
/** Initial width in pixels (read when the split mounts). */
|
|
1468
|
+
defaultWidth?: number;
|
|
1469
|
+
minWidth?: number;
|
|
1470
|
+
maxWidth?: number;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1455
1473
|
type AdminLayoutProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
1456
1474
|
hasSider?: boolean;
|
|
1457
1475
|
fullHeight?: boolean;
|
|
1476
|
+
sidebarResize?: boolean | SidebarResizeOptions;
|
|
1458
1477
|
/** Optional banner above the sidebar and main area, outside their scroll regions. */
|
|
1459
1478
|
notice?: React.ReactNode;
|
|
1460
1479
|
};
|
|
@@ -1478,7 +1497,7 @@ type AdminLayoutContentProps = React.HTMLAttributes<HTMLElement> & {
|
|
|
1478
1497
|
};
|
|
1479
1498
|
declare function AdminLayoutContent({ as: Element, className, ...props }: AdminLayoutContentProps): React.JSX.Element;
|
|
1480
1499
|
declare function AdminLayoutFooter({ className, ...props }: React.HTMLAttributes<HTMLElement>): React.JSX.Element;
|
|
1481
|
-
declare function AdminLayoutRoot({ hasSider, fullHeight, className, children, notice, ...props }: AdminLayoutProps): React.JSX.Element;
|
|
1500
|
+
declare function AdminLayoutRoot({ hasSider, fullHeight, sidebarResize, className, children, notice, ...props }: AdminLayoutProps): React.JSX.Element;
|
|
1482
1501
|
/** Compose nested layouts with the familiar AdminLayout.Sider/Header/Content/Footer API. */
|
|
1483
1502
|
declare const AdminLayout: typeof AdminLayoutRoot & {
|
|
1484
1503
|
Sider: typeof AdminLayoutSider;
|
|
@@ -1517,6 +1536,7 @@ interface PageLayoutProps extends Omit<React.ComponentPropsWithRef<"div">, "titl
|
|
|
1517
1536
|
sidebar?: React.ReactNode;
|
|
1518
1537
|
/** Physical side of the main column when there is room. */
|
|
1519
1538
|
sidebarPosition?: "left" | "right";
|
|
1539
|
+
sidebarResize?: boolean | SidebarResizeOptions;
|
|
1520
1540
|
/** Span both columns with the header and tabs ("full"), only the header
|
|
1521
1541
|
* ("header"), or keep both in the main column ("main"). */
|
|
1522
1542
|
headerSpan?: "full" | "header" | "main";
|
|
@@ -1524,7 +1544,23 @@ interface PageLayoutProps extends Omit<React.ComponentPropsWithRef<"div">, "titl
|
|
|
1524
1544
|
/** Center the entire layout in its parent, with a preset or maximum pixel width. */
|
|
1525
1545
|
maxWidth?: keyof typeof pageLayoutWidths | number;
|
|
1526
1546
|
}
|
|
1527
|
-
declare function PageLayout({ title, subtitle, icon, actions, description, extra, tabs, children, sidebar, sidebarPosition, headerSpan, headingLevel, maxWidth, className, style, ...rootProps }: PageLayoutProps): React.JSX.Element;
|
|
1547
|
+
declare function PageLayout({ title, subtitle, icon, actions, description, extra, tabs, children, sidebar, sidebarPosition, sidebarResize, headerSpan, headingLevel, maxWidth, className, style, ...rootProps }: PageLayoutProps): React.JSX.Element;
|
|
1548
|
+
|
|
1549
|
+
type PanelTab = Pick<TabItem, "value" | "label" | "content" | "disabled" | "icon">;
|
|
1550
|
+
interface PanelProps extends Omit<React__default.ComponentPropsWithRef<"div">, "children" | "defaultValue" | "onChange">, Pick<TabsProps, "label" | "value" | "defaultValue" | "onValueChange"> {
|
|
1551
|
+
items: PanelTab[];
|
|
1552
|
+
actions?: React__default.ReactNode;
|
|
1553
|
+
/** Tab item height, independent of external panel sizing. Defaults to md. */
|
|
1554
|
+
size?: TabsSize;
|
|
1555
|
+
/** Physical edge of the tab bar, independent of the surrounding layout. */
|
|
1556
|
+
tabPlacement?: "top" | "bottom" | "left" | "right";
|
|
1557
|
+
collapsed?: boolean;
|
|
1558
|
+
defaultCollapsed?: boolean;
|
|
1559
|
+
/** Activate the open tab to collapse, or any tab to reopen. Defaults to true. */
|
|
1560
|
+
collapseOnTabClick?: boolean;
|
|
1561
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
1562
|
+
}
|
|
1563
|
+
declare function Panel({ items, actions, size, tabPlacement, collapsed, defaultCollapsed, collapseOnTabClick, onCollapsedChange, className, ref, onFocusCapture, onBlurCapture, ...props }: PanelProps): React__default.JSX.Element;
|
|
1528
1564
|
|
|
1529
1565
|
type SectionGroupProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
1530
1566
|
/** Show a separator between sections. */
|
|
@@ -1541,6 +1577,44 @@ declare const SectionGroup: typeof SectionGroupRoot & {
|
|
|
1541
1577
|
Section: typeof Section;
|
|
1542
1578
|
};
|
|
1543
1579
|
|
|
1580
|
+
interface SettingRowControlProps {
|
|
1581
|
+
"aria-labelledby": string;
|
|
1582
|
+
"aria-describedby"?: string;
|
|
1583
|
+
}
|
|
1584
|
+
interface SettingRowProps extends Omit<React__default.ComponentPropsWithoutRef<"div">, "title" | "children"> {
|
|
1585
|
+
title: React__default.ReactNode;
|
|
1586
|
+
description?: React__default.ReactNode;
|
|
1587
|
+
shortcut?: React__default.ReactNode;
|
|
1588
|
+
control: React__default.ReactNode | ((attributes: SettingRowControlProps) => React__default.ReactNode);
|
|
1589
|
+
}
|
|
1590
|
+
type SettingRowGroupProps = React__default.ComponentPropsWithoutRef<"div">;
|
|
1591
|
+
declare function SettingRowRoot({ title, description, shortcut, control, className, ...props }: SettingRowProps): React__default.JSX.Element;
|
|
1592
|
+
declare function Group({ className, ...props }: SettingRowGroupProps): React__default.JSX.Element;
|
|
1593
|
+
declare const SettingRow: typeof SettingRowRoot & {
|
|
1594
|
+
Group: typeof Group;
|
|
1595
|
+
};
|
|
1596
|
+
|
|
1597
|
+
interface SettingsDialogCategory {
|
|
1598
|
+
value: string;
|
|
1599
|
+
label: React.ReactNode;
|
|
1600
|
+
icon?: React.ReactNode;
|
|
1601
|
+
content: React.ReactNode;
|
|
1602
|
+
}
|
|
1603
|
+
interface SettingsDialogSearchContext {
|
|
1604
|
+
selectCategory: (value: string) => void;
|
|
1605
|
+
}
|
|
1606
|
+
interface SettingsDialogProps extends Omit<DialogProps, "children"> {
|
|
1607
|
+
/** Unique categories, in navigation order. */
|
|
1608
|
+
categories: readonly SettingsDialogCategory[];
|
|
1609
|
+
value?: string;
|
|
1610
|
+
defaultValue?: string;
|
|
1611
|
+
onValueChange?: (value: string) => void;
|
|
1612
|
+
categoriesLabel?: string;
|
|
1613
|
+
/** Optional caller-owned search UI. No index or filtering is performed. */
|
|
1614
|
+
search?: React.ReactNode | ((context: SettingsDialogSearchContext) => React.ReactNode);
|
|
1615
|
+
}
|
|
1616
|
+
declare function SettingsDialog({ categories, value, defaultValue, onValueChange, categoriesLabel, search, className, onOpenChange, ...dialogProps }: SettingsDialogProps): React.JSX.Element;
|
|
1617
|
+
|
|
1544
1618
|
interface SpotlightAction {
|
|
1545
1619
|
/** Unique within this Spotlight. */
|
|
1546
1620
|
id: string;
|
|
@@ -2743,4 +2817,11 @@ declare function ShortcutScope({ children, active, priority }: ShortcutScopeProp
|
|
|
2743
2817
|
/** Registers one exact chord or alternatives in the nearest active shortcut scope. */
|
|
2744
2818
|
declare function useShortcut(shortcut: Shortcut, callback: Callback, options?: ShortcutOptions): void;
|
|
2745
2819
|
|
|
2746
|
-
|
|
2820
|
+
interface HoverMarqueeProps extends React__default.ComponentPropsWithRef<"span"> {
|
|
2821
|
+
/** Short text or non-interactive inline content on a single line. */
|
|
2822
|
+
children: React__default.ReactNode;
|
|
2823
|
+
}
|
|
2824
|
+
/** Reveal clipped text without changing the space allotted by the surrounding layout. */
|
|
2825
|
+
declare function HoverMarquee({ children, className, tabIndex, ref, onBlur, onPointerLeave, ...props }: HoverMarqueeProps): React__default.JSX.Element;
|
|
2826
|
+
|
|
2827
|
+
export { AdminLayout, type AdminLayoutContentProps, type AdminLayoutHeaderProps, type AdminLayoutProps, type AdminLayoutSiderProps, Affix, type AffixProps, type AiActivityProps, type AiActivityStatus, type AiActivityStep, AiChat, type AiChatProps, AiCheckpoint, type AiCheckpointProps, AiConfirmation, type AiConfirmationProps, AiContext, type AiContextProps, type AiEvidenceAppearance, type AiFileNode, AiFileTree, type AiFileTreeProps, AiInlineCitation, type AiInlineCitationProps, AiMessage, type AiMessageProps, type AiModelOption, AiModelSelector, type AiModelSelectorProps, AiPlan, type AiPlanProps, type AiPromptAttachment, AiPromptInput, type AiPromptInputProps, type AiPromptStatus, type AiPromptSubmission, AiQueue, type AiQueueProps, AiReasoning, type AiReasoningProps, type AiSource, AiSources, type AiSourcesProps, type AiStackFrame, AiStackTrace, type AiStackTraceProps, AiSubagent, type AiSubagentProps, AiSuggestion, type AiSuggestionProps, AiTask, type AiTaskProps, AiTerminal, type AiTerminalProps, type AiTerminalStatus, type AiTestResult, AiTestResults, type AiTestResultsProps, type AiTestStatus, AiTool, type AiToolProps, Alert, AutoComplete, type AutoCompleteGroup, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarBreakpoint, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Blockquote, type BlockquoteProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonToggleOptions, Calendar, type CalendarCellInfo, type CalendarHeaderInfo, type CalendarMode, type CalendarProps, type CalendarSelectInfo, type CalendarSemanticSlot, Card, type CardGridProps, CardGroup, type CardGroupBreakpoint, type CardGroupItemProps, type CardGroupProps, type CardGroupResponsive, type CardMetaProps, type CardMetaSemantic, type CardProps, type CardSemantic, type CardTabItem, type CardTokens, Cascader, type CascaderKey, type CascaderOption, CascaderPanel, type CascaderPanelProps, type CascaderPath, type CascaderProps, CheckCard, type CheckCardGroupProps, type CheckCardOption, type CheckCardProps, type CheckCardSize, Checkbox, type CheckboxProps, ConfirmDialog, type ConfirmDialogProps, ContextMenu, DataList, type DataListBatchContext, type DataListExpansion, type DataListKey, type DataListLocalPagination, type DataListPagination, type DataListProps, type DataListRemotePagination, type DataListSearch, type DataListSearchProps, type DataListSelection, type DataListSelectionProps, DataTable, type DataTableClassNames, type DataTableColumn, type DataTableColumnTitleProps, type DataTableColumnsType, type DataTableExpandableConfig, type DataTableFilterDropdownProps, type DataTableFilterItem, type DataTableFilterValue, type DataTableFilters, type DataTableLocale, type DataTablePagination, type DataTableProps, type DataTableRef, type DataTableRowSelection, type DataTableSelectionType, type DataTableSortOrder, type DataTableSortResult, type DataTableState, type DataTableStyles, DatePicker, type DatePickerProps, Dialog, type DialogProps, Divider, type DividerProps, DocumentCard, type DocumentItem, DocumentList, Drawer, Empty, Fieldset, type FieldsetProps, FloatingWindow, type FloatingWindowProps, Form, type FormFieldProps, type FormInstance, type FormProps, type FormRule, type FormValidateTrigger, type FormValidationError, type FormValues, GlobalNotice, type GlobalNoticeProps, HoverCard, type HoverCardProps, HoverMarquee, type HoverMarqueeProps, Image, ImageGroup, type ImageGroupProps, type ImageItem, ImagePreview, type ImagePreviewProps, type ImageProps, Input, type InputControlSize, type InputOTPProps, type InputPasswordProps, type InputProps, type InputSearchProps, type InputTextAreaProps, type InputVariant, Link, type LinkProps, List, type ListHandle, ListItem, type ListItemProps, type ListProps, type ListScrollTarget, type ListSortHandleProps, LoadingOverlay, type LoadingOverlayProps, type Locale, type MentionOption, Mentions, type MentionsProps, type MentionsRef, type MentionsSemantic, Menu, type MenuCheckboxItem, type MenuDivider, type MenuEntry, type MenuGroup, type MenuItem, type MenuProps, type MenuRadioGroup, Menubar, type MenubarMenu, type MenubarProps, type MtoneAccent, MtoneProvider, type MtoneProviderProps, MtoneScope, type MtoneScopeProps, type MtoneTheme, NavGroup, type NavGroupProps, NavItem, type NavItemAction, type NavItemButtonProps, type NavItemLinkProps, type NavItemProps, NavSubmenu, type NavSubmenuProps, NumberInput, type NumberInputProps, type OpenProps, type Option, PageLayout, type PageLayoutProps, Pagination, type PaginationProps, Panel, type PanelProps, Paragraph, type ParagraphProps, Popconfirm, type PopconfirmPlacement, type PopconfirmProps, Popover, type PopoverMenuProps, type PopoverProps, Progress, type ProgressColor, type ProgressProps, type ProgressStatus, type ProgressType, PropertyItem, PropertyList, Questionnaire, type QuestionnaireAnswer, type QuestionnaireAnswers, type QuestionnaireChoice, type QuestionnaireItem, type QuestionnaireProps, RadioGroup, type RadioGroupProps, Rate, type RateCharacterInfo, type RateProps, Result, type ResultProps, type ResultSemantic, type ResultStatus, SectionGroup, type SectionGroupProps, type SectionGroupSectionProps, Select, type SelectMultipleProps, type SelectOption, type SelectOptionGroup, type SelectPopupSearchProps, type SelectProps, type SelectSingleProps, type SelectTagsProps, SettingRow, type SettingRowControlProps, type SettingRowGroupProps, type SettingRowProps, SettingsDialog, type SettingsDialogCategory, type SettingsDialogProps, type SettingsDialogSearchContext, type ShortcutOptions, ShortcutScope, type ShortcutScopeProps, ShortcutsProvider, type ShortcutsProviderProps, Sidebar, type SidebarProps, type SidebarResizeOptions, type SidebarTabsOptions, Skeleton, Slider, type SliderProps, Spinner, Splitter, type SplitterPanelProps, type SplitterProps, type SplitterSize, Spotlight, type SpotlightAction, type SpotlightProps, Status, Switch, type TabItem, Table, TableOfContents, type TableOfContentsHandle, type TableOfContentsItem, type TableOfContentsProps, type TableProps, Tabs, type TabsIndicatorColor, type TabsProps, type TabsSize, Tag, type TagProps, TagSelect, type TagSelectOption, type TagSelectProps, Text, type TextProps, Timeline, type TimelineItem, type TimelinePlacement, type TimelineProps, type TimelineSemantic, Title, type TitleProps, type ToastOptions, type ToastPosition, type ToastPromiseOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToastUpdateOptions, type Tokens, type Tone, Toolbar, type ToolbarProps, Tooltip, type TooltipPart, type TooltipProps, TooltipProvider, type TooltipProviderProps, type TooltipTrigger, Transfer, type TransferDirection, type TransferItem, type TransferListContext, type TransferProps, Tree, type TreeAction, type TreeCheckedKeys, type TreeDropInfo, type TreeItem, type TreeKey, type TreeNode, type TreeNodeInfo, type TreeProps, type TreeRef, TreeSelect, type TreeSelectCommonProps, type TreeSelectProps, Typography, type TypographyCodeProps, type TypographyCopyable, type TypographyEditable, type TypographyEllipsis, type TypographyTone, Upload, type UploadAdapter, type UploadContext, type UploadFile, type UploadProps, cn, formatShortcut, getMentions, useMtone, useShortcut, useToast };
|