@omniviewdev/base-ui 0.8.0 → 0.9.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 +128 -10
- package/dist/index.js +9598 -9423
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1731,6 +1731,8 @@ declare interface DecoratedContentProps_4 {
|
|
|
1731
1731
|
endDecorator?: ReactNode;
|
|
1732
1732
|
}
|
|
1733
1733
|
|
|
1734
|
+
export declare const DEFAULT_TAB_DRAG_TYPE: TabDragType;
|
|
1735
|
+
|
|
1734
1736
|
export declare const DescriptionList: DescriptionListCompound;
|
|
1735
1737
|
|
|
1736
1738
|
export declare type DescriptionListColumns = 1 | 2 | 3;
|
|
@@ -1757,11 +1759,18 @@ export declare interface DescriptionListProps extends HTMLAttributes<HTMLDListEl
|
|
|
1757
1759
|
|
|
1758
1760
|
declare const DescriptionListRoot: ForwardRefExoticComponent<DescriptionListProps & RefAttributes<HTMLDListElement>>;
|
|
1759
1761
|
|
|
1762
|
+
/**
|
|
1763
|
+
* Release point of a tear-off. Screen coordinates are not global in every
|
|
1764
|
+
* webview (WebKitGTK reports them relative to the native window), so hosts that
|
|
1765
|
+
* place native windows can use the client point with their own window bounds.
|
|
1766
|
+
*/
|
|
1760
1767
|
export declare type DetachCommit = {
|
|
1761
1768
|
id: TabId;
|
|
1762
1769
|
payload?: unknown;
|
|
1763
1770
|
screenX: number;
|
|
1764
1771
|
screenY: number;
|
|
1772
|
+
clientX: number;
|
|
1773
|
+
clientY: number;
|
|
1765
1774
|
};
|
|
1766
1775
|
|
|
1767
1776
|
export declare const Dialog: DialogCompound;
|
|
@@ -1870,11 +1879,15 @@ export declare interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>
|
|
|
1870
1879
|
|
|
1871
1880
|
declare const DrawerRoot: ForwardRefExoticComponent<DrawerProps & RefAttributes<HTMLDivElement>>;
|
|
1872
1881
|
|
|
1873
|
-
declare interface DropZoneRegistration {
|
|
1882
|
+
export declare interface DropZoneRegistration {
|
|
1874
1883
|
instanceId: string;
|
|
1875
1884
|
getRect: () => DOMRect | null;
|
|
1876
1885
|
getElement: () => HTMLElement | null;
|
|
1877
1886
|
onAttach: (commit: AttachCommit) => void;
|
|
1887
|
+
/** Only sessions of the same type can drop here. Defaults to `'editor-tab'`. */
|
|
1888
|
+
dragType?: TabDragType;
|
|
1889
|
+
/** Vertical padding added to the rect for the second hit-test pass. Defaults to 60. */
|
|
1890
|
+
expandY?: number;
|
|
1878
1891
|
}
|
|
1879
1892
|
|
|
1880
1893
|
export declare const EditableList: EditableListCompound;
|
|
@@ -2051,13 +2064,24 @@ export declare interface EditorTabsProps extends Omit<StyledComponentProps, 'var
|
|
|
2051
2064
|
allowReorderAcrossGroups?: boolean;
|
|
2052
2065
|
detachable?: boolean;
|
|
2053
2066
|
detachThresholdPx?: number;
|
|
2067
|
+
/** Fired when a tab is released outside the strip. In broker mode, only when it lands on no target. */
|
|
2054
2068
|
onDetachCommit?: (commit: DetachCommit) => void;
|
|
2055
2069
|
instanceId?: string;
|
|
2056
2070
|
onAttachTab?: (commit: AttachCommit) => void;
|
|
2057
2071
|
/** When true and a TabDragBrokerProvider is present, vertical detach starts a
|
|
2058
2072
|
* broker session instead of the default Phase 3 flow. */
|
|
2059
2073
|
detachToBroker?: boolean;
|
|
2074
|
+
/** Strips only exchange tabs with strips of the same type. Defaults to `'editor-tab'`. */
|
|
2075
|
+
dragType?: TabDragType;
|
|
2076
|
+
/**
|
|
2077
|
+
* Broker mode: fired once when a tab dragged from this strip was attached to
|
|
2078
|
+
* another strip (in this document or another one). Remove the tab here.
|
|
2079
|
+
*/
|
|
2080
|
+
onTabTransferred?: (commit: TabTransferCommit) => void;
|
|
2060
2081
|
className?: string;
|
|
2082
|
+
/** Accessible name of the tab list. Give one of these when a page has more than one strip. */
|
|
2083
|
+
'aria-label'?: string;
|
|
2084
|
+
'aria-labelledby'?: string;
|
|
2061
2085
|
}
|
|
2062
2086
|
|
|
2063
2087
|
declare const EditorTabsRoot: ForwardRefExoticComponent<EditorTabsProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -3631,6 +3655,31 @@ export declare interface RelationshipValidation {
|
|
|
3631
3655
|
diagnostics: readonly InspectorDiagnostic[];
|
|
3632
3656
|
}
|
|
3633
3657
|
|
|
3658
|
+
export declare type RemoteTabDragEvent = {
|
|
3659
|
+
type: 'hover';
|
|
3660
|
+
sessionId: string;
|
|
3661
|
+
payload: TabDragPayload;
|
|
3662
|
+
clientX: number;
|
|
3663
|
+
clientY: number;
|
|
3664
|
+
} | {
|
|
3665
|
+
type: 'leave';
|
|
3666
|
+
sessionId: string;
|
|
3667
|
+
} | {
|
|
3668
|
+
type: 'drop';
|
|
3669
|
+
sessionId: string;
|
|
3670
|
+
payload: TabDragPayload;
|
|
3671
|
+
clientX: number;
|
|
3672
|
+
clientY: number;
|
|
3673
|
+
respond: (result: RemoteTabDropResult) => void;
|
|
3674
|
+
} | {
|
|
3675
|
+
type: 'end';
|
|
3676
|
+
sessionId: string;
|
|
3677
|
+
};
|
|
3678
|
+
|
|
3679
|
+
export declare type RemoteTabDropResult = {
|
|
3680
|
+
targetInstanceId: string;
|
|
3681
|
+
} | null;
|
|
3682
|
+
|
|
3634
3683
|
export declare type ReorderMeta = {
|
|
3635
3684
|
id: TabId;
|
|
3636
3685
|
from: number;
|
|
@@ -4676,37 +4725,100 @@ export declare type TabDescriptor = {
|
|
|
4676
4725
|
disabled?: boolean;
|
|
4677
4726
|
closable?: boolean;
|
|
4678
4727
|
pinned?: boolean;
|
|
4728
|
+
/** Set to false to keep this tab reorder-only even when the strip is detachable. Defaults to true. */
|
|
4729
|
+
detachable?: boolean;
|
|
4679
4730
|
groupId?: TabGroupId | null;
|
|
4680
4731
|
payload?: unknown;
|
|
4681
4732
|
};
|
|
4682
4733
|
|
|
4683
|
-
export declare function TabDragBrokerProvider({ children, onCancel }: TabDragBrokerProviderProps): JSX.Element;
|
|
4734
|
+
export declare function TabDragBrokerProvider({ children, onCancel, transport, }: TabDragBrokerProviderProps): JSX.Element;
|
|
4684
4735
|
|
|
4685
|
-
declare interface TabDragBrokerProviderProps {
|
|
4736
|
+
export declare interface TabDragBrokerProviderProps {
|
|
4686
4737
|
children: ReactNode;
|
|
4687
4738
|
onCancel?: (session: TabDragSession) => void;
|
|
4739
|
+
/** Connects this document's broker to brokers in other documents (e.g. other OS windows). */
|
|
4740
|
+
transport?: TabDragTransport;
|
|
4688
4741
|
}
|
|
4689
4742
|
|
|
4690
|
-
declare interface TabDragBrokerValue {
|
|
4743
|
+
export declare interface TabDragBrokerValue {
|
|
4691
4744
|
activeSession: TabDragSession | null;
|
|
4692
|
-
beginSession: (session: TabDragSession,
|
|
4745
|
+
beginSession: (session: TabDragSession, pointer: TabDragPointer) => void;
|
|
4746
|
+
/** Ends the session as a cancel: calls `onCancel` and reports a `cancelled` outcome. */
|
|
4693
4747
|
cancelSession: () => void;
|
|
4694
|
-
/**
|
|
4748
|
+
/** Ends the session without calling onCancel or reporting an outcome. */
|
|
4695
4749
|
clearSession: () => void;
|
|
4696
4750
|
registerDropZone: (reg: DropZoneRegistration) => void;
|
|
4697
4751
|
unregisterDropZone: (instanceId: string) => void;
|
|
4752
|
+
/** Zone under the pointer, for a local session or a remote session hovering this document. */
|
|
4698
4753
|
hoverInstanceId: string | null;
|
|
4754
|
+
/** Insertion index within `hoverInstanceId`'s zone. */
|
|
4699
4755
|
hoverInsertIndex: number | null;
|
|
4700
4756
|
pointerX: number;
|
|
4701
4757
|
pointerY: number;
|
|
4702
4758
|
}
|
|
4703
4759
|
|
|
4704
|
-
|
|
4760
|
+
/** How a broker session ended, reported once to the session's source. */
|
|
4761
|
+
export declare type TabDragOutcome = {
|
|
4762
|
+
type: 'transferred';
|
|
4763
|
+
targetInstanceId: string;
|
|
4764
|
+
} | ({
|
|
4765
|
+
type: 'torn-off';
|
|
4766
|
+
} & TabDragPointer) | {
|
|
4767
|
+
type: 'cancelled';
|
|
4768
|
+
};
|
|
4769
|
+
|
|
4770
|
+
/** Serializable form of a drag session that can cross documents. `tab.icon` is always undefined. */
|
|
4771
|
+
export declare type TabDragPayload = {
|
|
4772
|
+
/** Icon stripped; the payload must be JSON-serializable. */
|
|
4773
|
+
tab: TabDescriptor;
|
|
4774
|
+
sourceInstanceId: string;
|
|
4775
|
+
dragType: TabDragType;
|
|
4776
|
+
ghostStyle?: Record<string, string>;
|
|
4777
|
+
};
|
|
4778
|
+
|
|
4779
|
+
/** Pointer position in both this document's client space and screen space. */
|
|
4780
|
+
export declare type TabDragPointer = TabDragScreenPoint & {
|
|
4781
|
+
clientX: number;
|
|
4782
|
+
clientY: number;
|
|
4783
|
+
};
|
|
4784
|
+
|
|
4785
|
+
export declare type TabDragScreenPoint = {
|
|
4786
|
+
screenX: number;
|
|
4787
|
+
screenY: number;
|
|
4788
|
+
};
|
|
4789
|
+
|
|
4790
|
+
export declare interface TabDragSession {
|
|
4705
4791
|
tab: TabDescriptor;
|
|
4706
4792
|
sourceInstanceId: string;
|
|
4793
|
+
/** Only drop zones of the same type accept the tab. Defaults to `'editor-tab'`. */
|
|
4794
|
+
dragType?: TabDragType;
|
|
4707
4795
|
ghostStyle?: React.CSSProperties;
|
|
4796
|
+
/** When true, releasing over no target ends in a `torn-off` outcome; otherwise it is a cancel. */
|
|
4797
|
+
allowTearOff?: boolean;
|
|
4798
|
+
/**
|
|
4799
|
+
* Set by the source strip. Called exactly once with how the session ended,
|
|
4800
|
+
* unless the session is dropped with `clearSession`.
|
|
4801
|
+
*/
|
|
4802
|
+
onOutcome?: (outcome: TabDragOutcome) => void;
|
|
4803
|
+
}
|
|
4804
|
+
|
|
4805
|
+
/**
|
|
4806
|
+
* Connects brokers in separate documents. The source side receives the pointer
|
|
4807
|
+
* in both client and screen space; the host decides which one maps reliably to
|
|
4808
|
+
* its other documents.
|
|
4809
|
+
*/
|
|
4810
|
+
export declare interface TabDragTransport {
|
|
4811
|
+
begin(sessionId: string, payload: TabDragPayload, pointer: TabDragPointer): void;
|
|
4812
|
+
move(sessionId: string, pointer: TabDragPointer): void;
|
|
4813
|
+
/** Ask other documents to accept the tab at `pointer`. */
|
|
4814
|
+
drop(sessionId: string, pointer: TabDragPointer): Promise<RemoteTabDropResult>;
|
|
4815
|
+
cancel(sessionId: string): void;
|
|
4816
|
+
subscribe(handler: (event: RemoteTabDragEvent) => void): () => void;
|
|
4708
4817
|
}
|
|
4709
4818
|
|
|
4819
|
+
/** Identifies which strips can exchange tabs. Strips only accept sessions of their own type. */
|
|
4820
|
+
export declare type TabDragType = string;
|
|
4821
|
+
|
|
4710
4822
|
export declare type TabGroupDescriptor = {
|
|
4711
4823
|
id: TabGroupId;
|
|
4712
4824
|
title?: string;
|
|
@@ -4845,6 +4957,12 @@ export declare type TabsTabProps = Tabs_2.Tab.Props & {
|
|
|
4845
4957
|
|
|
4846
4958
|
declare type TabsVariant = 'solid' | 'soft' | 'outline' | 'ghost' | 'flat';
|
|
4847
4959
|
|
|
4960
|
+
/** Source-side notice that a dragged tab now lives in another strip (local or in another document). */
|
|
4961
|
+
export declare type TabTransferCommit = {
|
|
4962
|
+
id: TabId;
|
|
4963
|
+
targetInstanceId: string;
|
|
4964
|
+
};
|
|
4965
|
+
|
|
4848
4966
|
export declare const TagInput: ForwardRefExoticComponent<TagInputProps & RefAttributes<HTMLDivElement>>;
|
|
4849
4967
|
|
|
4850
4968
|
export declare interface TagInputProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
@@ -5946,7 +6064,7 @@ export declare type WorkspaceActionResult = {
|
|
|
5946
6064
|
export { }
|
|
5947
6065
|
|
|
5948
6066
|
|
|
5949
|
-
declare namespace
|
|
6067
|
+
declare namespace ComboboxRoot {
|
|
5950
6068
|
var displayName: string;
|
|
5951
6069
|
}
|
|
5952
6070
|
|
|
@@ -5961,11 +6079,11 @@ declare namespace SelectRoot {
|
|
|
5961
6079
|
}
|
|
5962
6080
|
|
|
5963
6081
|
|
|
5964
|
-
declare namespace
|
|
6082
|
+
declare namespace DataTableRoot {
|
|
5965
6083
|
var displayName: string;
|
|
5966
6084
|
}
|
|
5967
6085
|
|
|
5968
6086
|
|
|
5969
|
-
declare namespace
|
|
6087
|
+
declare namespace TooltipRoot {
|
|
5970
6088
|
var displayName: string;
|
|
5971
6089
|
}
|