import type { Point, Rect } from '@nvidia-elements/core/internal'; import type { WorkspaceLayout } from '../model/layout.utils.js'; import type { WorkspaceDestination } from '../model/operations.utils.js'; import type { WorkspacePlacementPlan } from '../placement/planner.utils.js'; import type { WorkspacePlacementScope } from '../placement/scope.utils.js'; import type { WorkspaceSeamPreview } from '../presentation/offers.utils.js'; type TabDestination = Omit & { position: 'tab'; }; type SplitDestination = Omit & { position: Exclude; }; export type WorkspaceDropIntent = { kind: 'tab'; destination: TabDestination; } | { kind: 'split' | 'order'; destination: SplitDestination; } | { kind: 'insert'; destination: SplitDestination; } | { kind: 'invalid'; }; export interface WorkspaceDragCue { rect: Rect; kind: 'tab' | 'group'; } interface PreviewPresentation { seams?: WorkspaceSeamPreview; scope?: WorkspacePlacementScope; source: string[]; point?: Point; cue: WorkspaceDragCue; } interface AttachedPreview extends PreviewPresentation { phase: 'attached'; intent: { kind: 'invalid'; }; blocked: false; } export type WorkspaceDragAllocation = { allocation: 'overlay' | 'committed'; } | { allocation: 'reserved'; layout: WorkspaceLayout; }; export type WorkspaceDragOffer = { cue: WorkspaceDragCue; feasible: boolean; seams?: WorkspaceSeamPreview; scope?: WorkspacePlacementScope; } & WorkspaceDragAllocation; type DetachedPreview = PreviewPresentation & WorkspaceDragAllocation & { phase: 'detached'; intent: WorkspaceDropIntent; blocked: boolean; }; export type WorkspaceDragPreview = AttachedPreview | DetachedPreview | (PreviewPresentation & WorkspaceDragAllocation & { phase: 'returning-attached' | 'returning-detached'; intent: { kind: 'invalid'; }; blocked: false; }); export interface WorkspacePlacementAcquisition { plan: WorkspacePlacementPlan; rect: Rect; } export interface WorkspaceOfferContext { selected?: WorkspaceDragPreview; acquisition?: WorkspacePlacementAcquisition & { point: Point; }; } export declare function clipCue(rect: Rect, bounds: Rect): Rect; export declare function matchesPlacementIntent(a: WorkspaceDropIntent, b: WorkspaceDropIntent): boolean; export {};