Teleport picker grid
The teleport picker's tiles in both apps: tabs, app and window tiles with their icon and preview sources, and the arrow keys.
The teleport picker's tiles in both apps: tabs, app and window tiles with their icon and preview sources, and the arrow keys.
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.
app_picker_app_grid, app_picker_window_grid and app_picker_remote_grid build each tab's tiles; an app tile previews its frontmost window. app_picker_grid_step moves the selection for the arrow keys and app_picker_grid_tabs names the tabs.
AppPickerGrid record#Returned by app_picker_app_grid, app_picker_remote_grid, app_picker_window_grid.
| Field | Type | Default | Description |
|---|---|---|---|
sections | Vec<AppPickerTileSection> | Sections, in order. | |
empty_text / emptyText | Option<String> | When there are no tiles: "No apps match." and the like. |
AppPickerGridPrimary record#Returned by app_picker_grid_primary.
| Field | Type | Default | Description |
|---|---|---|---|
label | String | The label. | |
enabled | bool | Enabled. |
AppPickerGridTabItem record#Returned by app_picker_grid_tabs.
| Field | Type | Default | Description |
|---|---|---|---|
tab | AppPickerGridTab | Which tab. | |
label | String | Its label. |
AppPickerTile record#| Field | Type | Default | Description |
|---|---|---|---|
id | String | The catalog entry id (Apps) or the window id. | |
title | String | One line: the app's name, or the window's title. | |
help | String | The tooltip: what the app can take, why not, or the full title. | |
disabled | bool | Dimmed and not choosable. | |
selected | bool | Highlighted (keyboard or click). | |
icon | AppPickerTileIcon | The icon. | |
thumbnail | AppPickerTileThumbnail | The preview. |
AppPickerTileSection record#| Field | Type | Default | Description |
|---|---|---|---|
title | String | Title, empty for none. | |
tiles | Vec<AppPickerTile> | Tiles, in order. |
AppPickerGridTab enum#.apps
.windows
.space| Variant | Description |
|---|---|
Apps | The app catalog. |
Windows | This machine's open windows. |
Space | The Space's windows. |
AppPickerTileIcon enum#.host(path: String)
.guest(appName: String, appId: String, pid: UInt32)
.none| Variant | Description |
|---|---|
Host | This machine's app at path (the SDK's Teleport.appIconPng). Fields: path: String |
Guest | A Space's app (the SDK's Space.appIcons). Fields: app_name: String, app_id: String, pid: u32 |
None | No icon to show. |
AppPickerTileThumbnail enum#.hostWindow(windowId: UInt32)
.guestWindow(windowId: String, epoch: UInt64)
.none| Variant | Description |
|---|---|
HostWindow | One of this machine's windows (the window-drag preview source, the SDK's Teleport.captureWindowThumbnail). Fields: window_id: u32 |
GuestWindow | One of the Space's windows (the SDK's Space.windowThumbnail). Fields: window_id: String, epoch: u64 |
None | No window to preview (the tile shows the icon large). |
app_picker_app_grid#The picker's Apps tab as tiles (windows: this machine's, front to back,
for each app's frontmost-window preview).
func appPickerAppGrid(state: AppPickerState, windows: [AppOpenWindow]) -> AppPickerGrid| Parameter | Type | Default |
|---|---|---|
state | AppPickerState | required |
windows | Vec<AppOpenWindow> | required |
Returns AppPickerGrid
app_picker_grid_primary#The picker grid's primary button for a tab ("Continue", "Teleport to <Space>", "Stream to This Mac"), live with a choosable tile selected.
func appPickerGridPrimary(tab: AppPickerGridTab, spaceName: String, grid: AppPickerGrid) -> AppPickerGridPrimary| Parameter | Type | Default |
|---|---|---|
tab | AppPickerGridTab | required |
space_name | String | required |
grid | AppPickerGrid | required |
Returns AppPickerGridPrimary
app_picker_grid_step#Arrow keys over a picker grid: the tile delta choosable places away.
func appPickerGridStep(grid: AppPickerGrid, selected: String?, delta: Int32) -> String?| Parameter | Type | Default |
|---|---|---|
grid | AppPickerGrid | required |
selected | Option<String> | required |
delta | i32 | required |
Returns Option<String>
app_picker_grid_tabs#The teleport picker's tab strip.
func appPickerGridTabs(spaceName: String) -> [AppPickerGridTabItem]| Parameter | Type | Default |
|---|---|---|
space_name | String | required |
Returns Vec<AppPickerGridTabItem>
app_picker_remote_grid#The picker's From <Space> tab.
func appPickerRemoteGrid(windows: [AppRemoteWindow], query: String, selected: String?) -> AppPickerGrid| Parameter | Type | Default |
|---|---|---|
windows | Vec<AppRemoteWindow> | required |
query | String | required |
selected | Option<String> | required |
Returns AppPickerGrid
app_picker_window_grid#The picker's Open windows tab.
func appPickerWindowGrid(windows: [AppOpenWindow], query: String, selected: String?) -> AppPickerGrid| Parameter | Type | Default |
|---|---|---|
windows | Vec<AppOpenWindow> | required |
query | String | required |
selected | Option<String> | required |
Returns AppPickerGrid