@omniviewdev/base-ui 0.3.0 → 0.4.1
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/base-ui.css +1 -1
- package/dist/index.d.ts +47 -4
- package/dist/index.js +13327 -12862
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4109,7 +4109,7 @@ export declare interface ThemeSwitcherProps {
|
|
|
4109
4109
|
className?: string;
|
|
4110
4110
|
}
|
|
4111
4111
|
|
|
4112
|
-
declare type ThemeTokenKey = 'color.accent.soft' | 'color.accent.strong' | 'color.ansi.black' | 'color.ansi.blue' | 'color.ansi.bright.black' | 'color.ansi.bright.blue' | 'color.ansi.bright.cyan' | 'color.ansi.bright.green' | 'color.ansi.bright.magenta' | 'color.ansi.bright.red' | 'color.ansi.bright.white' | 'color.ansi.bright.yellow' | 'color.ansi.cyan' | 'color.ansi.green' | 'color.ansi.magenta' | 'color.ansi.red' | 'color.ansi.white' | 'color.ansi.yellow' | 'color.bg.base' | 'color.bg.elevated' | 'color.bg.inset' | 'color.bg.surface' | 'color.bg.surface.overlay' | 'color.bg.surface.raised' | 'color.border.default' | 'color.border.focus' | 'color.border.muted' | 'color.border.strong' | 'color.brand.300' | 'color.brand.400' | 'color.brand.500' | 'color.danger' | 'color.danger.soft' | 'color.datepicker.cell.bg' | 'color.datepicker.cell.bg.hover' | 'color.datepicker.cell.bg.selected' | 'color.datepicker.cell.bg.today' | 'color.datepicker.cell.fg' | 'color.datepicker.cell.fg.disabled' | 'color.datepicker.cell.fg.other.month' | 'color.datepicker.cell.fg.selected' | 'color.datepicker.cell.fg.today' | 'color.datepicker.header.bg' | 'color.diff.insert.bg' | 'color.diff.remove.bg' | 'color.discovery' | 'color.discovery.soft' | 'color.drawer.handle' | 'color.drawer.handle.hover' | 'color.editor.bg' | 'color.editor.bracket.1' | 'color.editor.bracket.2' | 'color.editor.bracket.3' | 'color.editor.bracket.4' | 'color.editor.bracket.5' | 'color.editor.bracket.6' | 'color.editor.bracket.match.bg' | 'color.editor.bracket.match.border' | 'color.editor.cursor' | 'color.editor.fg' | 'color.editor.find.match.bg' | 'color.editor.find.match.border' | 'color.editor.find.range.bg' | 'color.editor.group.bg' | 'color.editor.group.border' | 'color.editor.group.drop.border' | 'color.editor.group.header.bg' | 'color.editor.indent.guide' | 'color.editor.indent.guide.active' | 'color.editor.line.highlight.bg' | 'color.editor.line.highlight.border' | 'color.editor.line.number' | 'color.editor.line.number.active' | 'color.editor.link' | 'color.editor.ruler' | 'color.editor.selection.bg' | 'color.editor.selection.inactive.bg' | 'color.editor.whitespace' | 'color.fg.default' | 'color.fg.disabled' | 'color.fg.inverse' | 'color.fg.muted' | 'color.fg.subtle' | 'color.gutter.added' | 'color.gutter.bg' | 'color.gutter.deleted' | 'color.gutter.modified' | 'color.info' | 'color.info.soft' | 'color.minimap.bg' | 'color.minimap.error' | 'color.minimap.find.match' | 'color.minimap.selection' | 'color.minimap.warning' | 'color.progress.fill' | 'color.progress.track' | 'color.scrollarea.thumb' | 'color.scrollarea.thumb.hover' | 'color.scrollarea.track' | 'color.secondary' | 'color.secondary.soft' | 'color.state.focus.ring' | 'color.state.hover' | 'color.state.pressed' | 'color.state.selected' | 'color.success' | 'color.success.soft' | 'color.tab.active.bg' | 'color.tab.active.border' | 'color.tab.active.fg' | 'color.tab.bg' | 'color.tab.border' | 'color.tab.fg' | 'color.tab.hover.bg' | 'color.tab.hover.fg' | 'color.tab.inactive.bg' | 'color.tab.inactive.fg' | 'color.tab.modified.border' | 'color.terminal.bg' | 'color.terminal.border' | 'color.terminal.cursor' | 'color.terminal.fg' | 'color.terminal.selection.bg' | 'color.terminal.selection.fg' | 'color.warning' | 'color.warning.soft' | 'syntax.class' | 'syntax.comment' | 'syntax.decorator' | 'syntax.function' | 'syntax.interface' | 'syntax.keyword' | 'syntax.keyword.control' | 'syntax.keyword.operator' | 'syntax.method' | 'syntax.namespace' | 'syntax.number' | 'syntax.operator' | 'syntax.parameter' | 'syntax.property' | 'syntax.punctuation' | 'syntax.regexp' | 'syntax.string' | 'syntax.string.escape' | 'syntax.style.comment' | 'syntax.style.function' | 'syntax.style.keyword' | 'syntax.style.type' | 'syntax.type' | 'syntax.variable';
|
|
4112
|
+
declare type ThemeTokenKey = 'color.accent.soft' | 'color.accent.strong' | 'color.ansi.black' | 'color.ansi.blue' | 'color.ansi.bright.black' | 'color.ansi.bright.blue' | 'color.ansi.bright.cyan' | 'color.ansi.bright.green' | 'color.ansi.bright.magenta' | 'color.ansi.bright.red' | 'color.ansi.bright.white' | 'color.ansi.bright.yellow' | 'color.ansi.cyan' | 'color.ansi.green' | 'color.ansi.magenta' | 'color.ansi.red' | 'color.ansi.white' | 'color.ansi.yellow' | 'color.bg.base' | 'color.bg.elevated' | 'color.bg.inset' | 'color.bg.surface' | 'color.bg.surface.overlay' | 'color.bg.surface.raised' | 'color.border.control' | 'color.border.default' | 'color.border.focus' | 'color.border.muted' | 'color.border.overlay' | 'color.border.strong' | 'color.brand.300' | 'color.brand.400' | 'color.brand.500' | 'color.danger' | 'color.danger.soft' | 'color.datepicker.cell.bg' | 'color.datepicker.cell.bg.hover' | 'color.datepicker.cell.bg.selected' | 'color.datepicker.cell.bg.today' | 'color.datepicker.cell.fg' | 'color.datepicker.cell.fg.disabled' | 'color.datepicker.cell.fg.other.month' | 'color.datepicker.cell.fg.selected' | 'color.datepicker.cell.fg.today' | 'color.datepicker.header.bg' | 'color.diff.insert.bg' | 'color.diff.remove.bg' | 'color.discovery' | 'color.discovery.soft' | 'color.drawer.handle' | 'color.drawer.handle.hover' | 'color.editor.bg' | 'color.editor.bracket.1' | 'color.editor.bracket.2' | 'color.editor.bracket.3' | 'color.editor.bracket.4' | 'color.editor.bracket.5' | 'color.editor.bracket.6' | 'color.editor.bracket.match.bg' | 'color.editor.bracket.match.border' | 'color.editor.cursor' | 'color.editor.fg' | 'color.editor.find.match.bg' | 'color.editor.find.match.border' | 'color.editor.find.range.bg' | 'color.editor.group.bg' | 'color.editor.group.border' | 'color.editor.group.drop.border' | 'color.editor.group.header.bg' | 'color.editor.indent.guide' | 'color.editor.indent.guide.active' | 'color.editor.line.highlight.bg' | 'color.editor.line.highlight.border' | 'color.editor.line.number' | 'color.editor.line.number.active' | 'color.editor.link' | 'color.editor.ruler' | 'color.editor.selection.bg' | 'color.editor.selection.inactive.bg' | 'color.editor.whitespace' | 'color.fg.default' | 'color.fg.disabled' | 'color.fg.inverse' | 'color.fg.muted' | 'color.fg.subtle' | 'color.gutter.added' | 'color.gutter.bg' | 'color.gutter.deleted' | 'color.gutter.modified' | 'color.info' | 'color.info.soft' | 'color.minimap.bg' | 'color.minimap.error' | 'color.minimap.find.match' | 'color.minimap.selection' | 'color.minimap.warning' | 'color.progress.fill' | 'color.progress.track' | 'color.scrollarea.thumb' | 'color.scrollarea.thumb.hover' | 'color.scrollarea.track' | 'color.secondary' | 'color.secondary.soft' | 'color.state.focus.ring' | 'color.state.hover' | 'color.state.pressed' | 'color.state.selected' | 'color.success' | 'color.success.soft' | 'color.tab.active.bg' | 'color.tab.active.border' | 'color.tab.active.fg' | 'color.tab.bg' | 'color.tab.border' | 'color.tab.fg' | 'color.tab.hover.bg' | 'color.tab.hover.fg' | 'color.tab.inactive.bg' | 'color.tab.inactive.fg' | 'color.tab.modified.border' | 'color.terminal.bg' | 'color.terminal.border' | 'color.terminal.cursor' | 'color.terminal.fg' | 'color.terminal.selection.bg' | 'color.terminal.selection.fg' | 'color.warning' | 'color.warning.soft' | 'syntax.class' | 'syntax.comment' | 'syntax.decorator' | 'syntax.function' | 'syntax.interface' | 'syntax.keyword' | 'syntax.keyword.control' | 'syntax.keyword.operator' | 'syntax.method' | 'syntax.namespace' | 'syntax.number' | 'syntax.operator' | 'syntax.parameter' | 'syntax.property' | 'syntax.punctuation' | 'syntax.regexp' | 'syntax.string' | 'syntax.string.escape' | 'syntax.style.comment' | 'syntax.style.function' | 'syntax.style.keyword' | 'syntax.style.type' | 'syntax.type' | 'syntax.variable';
|
|
4113
4113
|
|
|
4114
4114
|
export declare class ThemeValidationError extends Error {
|
|
4115
4115
|
readonly code: ThemeValidationErrorCode;
|
|
@@ -4352,9 +4352,11 @@ declare interface TreeConfigContextValue {
|
|
|
4352
4352
|
loopFocus: boolean;
|
|
4353
4353
|
virtualized: boolean;
|
|
4354
4354
|
indentation: number;
|
|
4355
|
-
|
|
4355
|
+
indentGuide: TreeIndentGuide;
|
|
4356
4356
|
}
|
|
4357
4357
|
|
|
4358
|
+
export declare type TreeIndentGuide = 'none' | 'rail' | 'connectors';
|
|
4359
|
+
|
|
4358
4360
|
export declare interface TreeItemState {
|
|
4359
4361
|
isSelected: boolean;
|
|
4360
4362
|
isActive: boolean;
|
|
@@ -4371,6 +4373,8 @@ declare type TreeListCompound = typeof TreeListRoot & {
|
|
|
4371
4373
|
Root: typeof TreeListRoot;
|
|
4372
4374
|
Viewport: typeof TreeListViewport;
|
|
4373
4375
|
Item: typeof TreeListItem;
|
|
4376
|
+
ReorderableItem: typeof TreeListReorderableItem;
|
|
4377
|
+
ItemDragHandle: typeof TreeListItemDragHandle;
|
|
4374
4378
|
ItemIndent: typeof TreeListItemIndent;
|
|
4375
4379
|
ItemToggle: typeof TreeListItemToggle;
|
|
4376
4380
|
ItemIcon: typeof TreeListItemIcon;
|
|
@@ -4401,6 +4405,18 @@ declare interface TreeListItemBadgeProps extends HTMLAttributes<HTMLSpanElement>
|
|
|
4401
4405
|
|
|
4402
4406
|
declare const TreeListItemDescription: ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & RefAttributes<HTMLSpanElement>>;
|
|
4403
4407
|
|
|
4408
|
+
declare const TreeListItemDragHandle: ForwardRefExoticComponent<TreeListItemDragHandleProps & RefAttributes<HTMLButtonElement>>;
|
|
4409
|
+
|
|
4410
|
+
declare type TreeListItemDragHandleBaseProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'aria-label' | 'aria-labelledby' | 'type'>;
|
|
4411
|
+
|
|
4412
|
+
export declare type TreeListItemDragHandleProps = TreeListItemDragHandleBaseProps & ({
|
|
4413
|
+
'aria-label': string;
|
|
4414
|
+
'aria-labelledby'?: string;
|
|
4415
|
+
} | {
|
|
4416
|
+
'aria-label'?: string;
|
|
4417
|
+
'aria-labelledby': string;
|
|
4418
|
+
});
|
|
4419
|
+
|
|
4404
4420
|
declare const TreeListItemIcon: ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & RefAttributes<HTMLSpanElement>>;
|
|
4405
4421
|
|
|
4406
4422
|
declare const TreeListItemIndent: ForwardRefExoticComponent<TreeListItemIndentProps & RefAttributes<HTMLSpanElement>>;
|
|
@@ -4418,6 +4434,7 @@ declare const TreeListItemMeta: ForwardRefExoticComponent<HTMLAttributes<HTMLSpa
|
|
|
4418
4434
|
export declare interface TreeListItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
4419
4435
|
itemKey: Key_3;
|
|
4420
4436
|
disabled?: boolean;
|
|
4437
|
+
selectable?: boolean;
|
|
4421
4438
|
textValue?: string;
|
|
4422
4439
|
children: ReactNode;
|
|
4423
4440
|
}
|
|
@@ -4434,6 +4451,8 @@ declare interface TreeListLoadingProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
4434
4451
|
children?: ReactNode;
|
|
4435
4452
|
}
|
|
4436
4453
|
|
|
4454
|
+
declare const TreeListReorderableItem: ForwardRefExoticComponent<TreeListItemProps & RefAttributes<HTMLDivElement>>;
|
|
4455
|
+
|
|
4437
4456
|
declare const TreeListRoot: <TItem>(props: TreeListRootProps<TItem> & {
|
|
4438
4457
|
ref?: Ref<HTMLDivElement>;
|
|
4439
4458
|
}) => ReactNode;
|
|
@@ -4445,8 +4464,15 @@ export declare interface TreeListRootProps<TItem = unknown> extends Omit<HTMLAtt
|
|
|
4445
4464
|
* An empty array `[]` means "loaded, no children" and will NOT trigger `loadChildren`. */
|
|
4446
4465
|
getChildren: (item: TItem) => readonly TItem[] | undefined;
|
|
4447
4466
|
isBranch?: (item: TItem) => boolean;
|
|
4467
|
+
/** Source-level selection eligibility, including never-mounted virtualized rows.
|
|
4468
|
+
* Returning false overrides Item selectable; Item selectable=false may further restrict it. */
|
|
4469
|
+
isItemSelectable?: (item: TItem) => boolean;
|
|
4448
4470
|
getTextValue?: (item: TItem) => string;
|
|
4449
4471
|
renderItem: (item: TItem, node: TreeNodeMeta) => ReactNode;
|
|
4472
|
+
reorderable?: boolean;
|
|
4473
|
+
order?: TreeOrder;
|
|
4474
|
+
defaultOrder?: TreeOrder;
|
|
4475
|
+
onOrderChange?: (order: TreeOrder, event: TreeReorderEvent) => void;
|
|
4450
4476
|
expandedKeys?: ReadonlySet<Key_3>;
|
|
4451
4477
|
defaultExpandedKeys?: Iterable<Key_3>;
|
|
4452
4478
|
onExpandedKeysChange?: (keys: ReadonlySet<Key_3>) => void;
|
|
@@ -4474,7 +4500,8 @@ export declare interface TreeListRootProps<TItem = unknown> extends Omit<HTMLAtt
|
|
|
4474
4500
|
onFilterTextChange?: (filterText: string) => void;
|
|
4475
4501
|
filterFn?: (item: TItem, filterText: string) => boolean;
|
|
4476
4502
|
indentation?: number;
|
|
4477
|
-
|
|
4503
|
+
/** Indentation only (default), icon-centered rails, or elbow connectors. */
|
|
4504
|
+
indentGuide?: TreeIndentGuide;
|
|
4478
4505
|
loading?: boolean;
|
|
4479
4506
|
error?: ReactNode;
|
|
4480
4507
|
children?: ReactNode;
|
|
@@ -4495,6 +4522,19 @@ export declare interface TreeNodeMeta {
|
|
|
4495
4522
|
ancestorIsLast: boolean[];
|
|
4496
4523
|
}
|
|
4497
4524
|
|
|
4525
|
+
/** Sparse sibling presets; missing keys are ignored across the full entry.
|
|
4526
|
+
* Resolving a group costs O(source siblings + saved keys), without sorting.
|
|
4527
|
+
*/
|
|
4528
|
+
export declare type TreeOrder = ReadonlyMap<Key_3 | null, readonly Key_3[]>;
|
|
4529
|
+
|
|
4530
|
+
export declare interface TreeReorderEvent {
|
|
4531
|
+
activeKey: Key_3;
|
|
4532
|
+
overKey: Key_3;
|
|
4533
|
+
parentKey: Key_3 | null;
|
|
4534
|
+
fromIndex: number;
|
|
4535
|
+
toIndex: number;
|
|
4536
|
+
}
|
|
4537
|
+
|
|
4498
4538
|
declare interface TreeStore {
|
|
4499
4539
|
subscribe: (listener: () => void) => () => void;
|
|
4500
4540
|
getSnapshot: () => TreeStoreSnapshot;
|
|
@@ -4507,6 +4547,9 @@ declare interface TreeStore {
|
|
|
4507
4547
|
setLoadingKey: (key: Key_3, loading: boolean, silent?: boolean) => void;
|
|
4508
4548
|
setFlatNodes: (nodes: FlatNode[], silent?: boolean) => void;
|
|
4509
4549
|
registerTextValue: (key: Key_3, textValue: string) => void;
|
|
4550
|
+
registerSelectable: (key: Key_3, selectable: boolean) => void;
|
|
4551
|
+
setSourceNonSelectableKeys: (keys: ReadonlySet<Key_3> | undefined) => void;
|
|
4552
|
+
isSelectable: (key: Key_3) => boolean;
|
|
4510
4553
|
getTextValue: (key: Key_3) => string | undefined;
|
|
4511
4554
|
getRegisteredKeys: () => Key_3[];
|
|
4512
4555
|
/** Rebuild snapshot and notify listeners. Call from useEffect after silent updates. */
|
|
@@ -4795,7 +4838,7 @@ export declare function useTreeConfig(): TreeConfigContextValue;
|
|
|
4795
4838
|
* Unlike useListItem, this does NOT self-register — keys come from
|
|
4796
4839
|
* the flattener, not from DOM mount.
|
|
4797
4840
|
*/
|
|
4798
|
-
export declare function useTreeItem(store: TreeStore, key: Key_3, textValue?: string): TreeItemState;
|
|
4841
|
+
export declare function useTreeItem(store: TreeStore, key: Key_3, textValue?: string, selectable?: boolean): TreeItemState;
|
|
4799
4842
|
|
|
4800
4843
|
export declare function useTreeStoreContext(): TreeStore;
|
|
4801
4844
|
|