Teleport transfer and drag
The overlays that show a teleport in progress: the transfer overlay and drag-and-drop onto a Space.
The overlays that show a teleport in progress: the transfer overlay and drag-and-drop onto a Space.
These APIs are part of the Cua Spaces app export for building Spaces UIs. They are source-available under FSL-1.1-MIT and ship for Swift only (import CuaSpacesFFI); the Rust tab shows the cua-spaces-ffi crate they come from. The open source SDK packages for Python, TypeScript and Kotlin do not include them.
The transfer overlay follows a running teleport step by step; the drag overlay shows a file or app dragged onto a Space.
AppDragOverlayState record#| Field | Type | Default | Description |
|---|---|---|---|
phase | AppDragOverlayPhase | Phase. | |
window_id / windowId | Option<u32> | CoreGraphics id of the dragged window. | |
app_name / appName | Option<String> | The dragged app's name. | |
target_space_id / targetSpaceId | Option<String> | The tile under the cursor (selector only). | |
ghost | Option<String> | The captured ghost (a data URL or a shell-local image key). |
AppDragOverlayTransition record#| Field | Type | Default | Description |
|---|---|---|---|
state | AppDragOverlayState | New state. | |
effects | Vec<AppDragOverlayEffect> | Effects. |
AppTransferOverlayState record#Returned by app_transfer_reduce.
| Field | Type | Default | Description |
|---|---|---|---|
phase | AppTransferPhase | Phase. | |
app_name / appName | String | App being teleported. | |
message | Option<String> | Failure reason. | |
sent_bytes / sentBytes | Option<f64> | Bytes sent. | |
total_bytes / totalBytes | Option<f64> | Total bytes. |
AppTransferSignal record#| Field | Type | Default | Description |
|---|---|---|---|
status | AppTransferStatus | Status. | |
app_name / appName | Option<String> | App name. | |
message | Option<String> | Message. | |
sent_bytes / sentBytes | Option<f64> | Bytes sent. | |
total_bytes / totalBytes | Option<f64> | Total bytes. |
AppDragOverlayEffect enum#.capture(windowId: UInt32?)
.commit(spaceId: String)| Variant | Description |
|---|---|
Capture | Capture the ghost (needs Screen Recording; none is fine). Fields: window_id: Option<u32> |
Commit | Teleport to this Space. Fields: space_id: String |
AppDragOverlayEvent enum#.start(windowId: UInt32?, appName: String?)
.enterNotch
.leaveNotch
.over(spaceId: String)
.out
.ghostReady(ghost: String?)
.drop(spaceId: String?)
.cancel| Variant | Description |
|---|---|
Start | A supported window drag began. Fields: window_id: Option<u32>, app_name: Option<String> |
EnterNotch | The cursor reached the notch box. |
LeaveNotch | The cursor left the selector. |
Over | Over a Space tile. Fields: space_id: String |
Out | Off every tile. |
GhostReady | The ghost capture finished. Fields: ghost: Option<String> |
Drop | Released; the tile under the cursor, if any. Fields: space_id: Option<String> |
Cancel | Abort. |
AppDragOverlayPhase enum#.idle
.prompt
.selector| Variant | Description |
|---|---|
Idle | Nothing showing. |
Prompt | The "Teleport to Cua" box. |
Selector | The Space tiles as drop targets. |
AppTransferPhase enum#.active
.error| Variant | Description |
|---|---|
Active | Uploading. |
Error | Failed. |
AppTransferStatus enum#.start
.progress
.done
.error| Variant | Description |
|---|---|
Start | Began (or retried). |
Progress | Bytes moved. |
Done | Finished. |
Error | Failed. |
app_transfer_reduce#Advances the transfer overlay (None hides it).
func appTransferReduce(state: AppTransferOverlayState?, signal: AppTransferSignal) -> AppTransferOverlayState?| Parameter | Type | Default |
|---|---|---|
state | Option<AppTransferOverlayState> | required |
signal | AppTransferSignal | required |
Returns Option<AppTransferOverlayState>
app_transfer_title#The transfer overlay's title.
func appTransferTitle(state: AppTransferOverlayState) -> String| Parameter | Type | Default |
|---|---|---|
state | AppTransferOverlayState | required |
Returns String