@air-jam/sdk 0.9.1 → 0.9.3
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/README.md +25 -45
- package/dist/{agent-tooling-BSMGBix9.d.cts → agent-contract-CD2QnbBJ.d.cts} +1 -1
- package/dist/{agent-tooling-BSMGBix9.d.ts → agent-contract-CD2QnbBJ.d.ts} +1 -1
- package/dist/agent-tooling.cjs +139 -0
- package/dist/agent-tooling.cjs.map +1 -1
- package/dist/agent-tooling.d.cts +25 -1
- package/dist/agent-tooling.d.ts +25 -1
- package/dist/agent-tooling.js +138 -0
- package/dist/agent-tooling.js.map +1 -1
- package/dist/air-jam-context-BlLPvCup.d.cts +175 -0
- package/dist/air-jam-context-DTsxF-tP.d.ts +175 -0
- package/dist/arcade/bridge/controller.cjs +214 -194
- package/dist/arcade/bridge/controller.cjs.map +1 -1
- package/dist/arcade/bridge/controller.d.cts +2 -2
- package/dist/arcade/bridge/controller.d.ts +2 -2
- package/dist/arcade/bridge/controller.js +6 -4
- package/dist/arcade/bridge/host.cjs +1 -1
- package/dist/arcade/bridge/host.cjs.map +1 -1
- package/dist/arcade/bridge/host.d.cts +3 -3
- package/dist/arcade/bridge/host.d.ts +3 -3
- package/dist/arcade/bridge/host.js +4 -3
- package/dist/arcade/bridge/iframe.cjs +1 -1
- package/dist/arcade/bridge/iframe.cjs.map +1 -1
- package/dist/arcade/bridge/iframe.d.cts +2 -2
- package/dist/arcade/bridge/iframe.d.ts +2 -2
- package/dist/arcade/bridge/iframe.js +4 -4
- package/dist/arcade/bridge.cjs +251 -231
- package/dist/arcade/bridge.cjs.map +1 -1
- package/dist/arcade/bridge.d.cts +4 -4
- package/dist/arcade/bridge.d.ts +4 -4
- package/dist/arcade/bridge.js +9 -7
- package/dist/arcade/host.cjs +145 -122
- package/dist/arcade/host.cjs.map +1 -1
- package/dist/arcade/host.d.cts +5 -4
- package/dist/arcade/host.d.ts +5 -4
- package/dist/arcade/host.js +6 -5
- package/dist/arcade/runtime.cjs +6499 -0
- package/dist/arcade/runtime.cjs.map +1 -0
- package/dist/arcade/runtime.d.cts +22 -0
- package/dist/arcade/runtime.d.ts +22 -0
- package/dist/arcade/runtime.js +32 -0
- package/dist/arcade/runtime.js.map +1 -0
- package/dist/arcade/surface.cjs +9 -0
- package/dist/arcade/surface.cjs.map +1 -1
- package/dist/arcade/surface.d.cts +6 -1
- package/dist/arcade/surface.d.ts +6 -1
- package/dist/arcade/surface.js +6 -2
- package/dist/arcade/url.d.cts +4 -4
- package/dist/arcade/url.d.ts +4 -4
- package/dist/arcade/url.js +5 -5
- package/dist/arcade.cjs +322 -292
- package/dist/arcade.cjs.map +1 -1
- package/dist/arcade.d.cts +6 -6
- package/dist/arcade.d.ts +6 -6
- package/dist/arcade.js +35 -29
- package/dist/{chunk-CEJ5RFSG.js → chunk-2SZ2YYGJ.js} +8 -16
- package/dist/chunk-2SZ2YYGJ.js.map +1 -0
- package/dist/{chunk-VKBMZHMQ.js → chunk-32RSSFSF.js} +10 -12
- package/dist/chunk-32RSSFSF.js.map +1 -0
- package/dist/chunk-3YMUAKPU.js +10 -0
- package/dist/chunk-3YMUAKPU.js.map +1 -0
- package/dist/chunk-56DM2KEW.js +14 -0
- package/dist/chunk-56DM2KEW.js.map +1 -0
- package/dist/chunk-CM53YLT5.js +59 -0
- package/dist/chunk-CM53YLT5.js.map +1 -0
- package/dist/{chunk-JEHV5C2X.js → chunk-CV3PBXPT.js} +3 -3
- package/dist/chunk-D4VDEVTZ.js +80 -0
- package/dist/chunk-D4VDEVTZ.js.map +1 -0
- package/dist/{chunk-W3YA5BWR.js → chunk-FUA6EMSJ.js} +24 -60
- package/dist/chunk-FUA6EMSJ.js.map +1 -0
- package/dist/chunk-GMLU7RI5.js +70 -0
- package/dist/chunk-GMLU7RI5.js.map +1 -0
- package/dist/{chunk-NCL6WJCL.js → chunk-IG6GZZSS.js} +32 -1
- package/dist/chunk-IG6GZZSS.js.map +1 -0
- package/dist/{chunk-EDRQIOCV.js → chunk-ITMQSBTH.js} +3 -2
- package/dist/chunk-ITMQSBTH.js.map +1 -0
- package/dist/{chunk-32NYL7XI.js → chunk-J5MCII33.js} +189 -108
- package/dist/chunk-J5MCII33.js.map +1 -0
- package/dist/{chunk-ZLPL2R3R.js → chunk-K4OZ54UD.js} +7 -34
- package/dist/chunk-K4OZ54UD.js.map +1 -0
- package/dist/{chunk-KXAFI5OP.js → chunk-LIHEEAVE.js} +9 -11
- package/dist/chunk-LIHEEAVE.js.map +1 -0
- package/dist/{chunk-FAT2KJ3K.js → chunk-MIMPMB7O.js} +2 -2
- package/dist/{chunk-NUJBMV3O.js → chunk-O6X7FJ6N.js} +29 -32
- package/dist/chunk-O6X7FJ6N.js.map +1 -0
- package/dist/chunk-PSUYTD2L.js +16 -0
- package/dist/chunk-PSUYTD2L.js.map +1 -0
- package/dist/{chunk-7UXSWCZZ.js → chunk-QO4KFUEI.js} +2 -2
- package/dist/chunk-QTLYZADF.js +125 -0
- package/dist/chunk-QTLYZADF.js.map +1 -0
- package/dist/chunk-TTQDHKXL.js +3017 -0
- package/dist/chunk-TTQDHKXL.js.map +1 -0
- package/dist/chunk-UCPY7UJC.js +8 -0
- package/dist/chunk-UCPY7UJC.js.map +1 -0
- package/dist/{chunk-JO2HR5PV.js → chunk-UPV6YWT5.js} +4 -4
- package/dist/chunk-X35LLCWV.js +65 -0
- package/dist/chunk-X35LLCWV.js.map +1 -0
- package/dist/{controller-DxVchfiA.d.ts → controller-PZEM_1cH.d.ts} +6 -2
- package/dist/{controller-Bod8YYr1.d.cts → controller-vj82tKm4.d.cts} +6 -2
- package/dist/{dev-log-events-CVAM29hx.d.cts → dev-log-events-BCJKmygo.d.cts} +0 -3
- package/dist/{dev-log-events-CVAM29hx.d.ts → dev-log-events-BCJKmygo.d.ts} +0 -3
- package/dist/{host-8hmq_Sgc.d.cts → host-B9pRy0Aa.d.cts} +20 -7
- package/dist/{host-Cw-N6e-5.d.ts → host-DylGsX7p.d.ts} +20 -7
- package/dist/index.cjs +4275 -3813
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -642
- package/dist/index.d.ts +40 -642
- package/dist/index.js +1032 -3658
- package/dist/index.js.map +1 -1
- package/dist/metadata.cjs.map +1 -1
- package/dist/metadata.d.cts +2 -3
- package/dist/metadata.d.ts +2 -3
- package/dist/metadata.js.map +1 -1
- package/dist/{notices-CnGaaS8B.d.ts → notices-C4bao3oi.d.ts} +1 -1
- package/dist/{notices-NyDM5Mtz.d.cts → notices-DNdOjwtj.d.cts} +1 -1
- package/dist/platform-machine.cjs +115 -15
- package/dist/platform-machine.cjs.map +1 -1
- package/dist/platform-machine.d.cts +1338 -65
- package/dist/platform-machine.d.ts +1338 -65
- package/dist/platform-machine.js +88 -15
- package/dist/platform-machine.js.map +1 -1
- package/dist/{platform-settings-cuor3i11.d.cts → platform-settings-DUWs4JTy.d.cts} +1 -1
- package/dist/{platform-settings-cuor3i11.d.ts → platform-settings-DUWs4JTy.d.ts} +1 -1
- package/dist/preview.cjs +301 -253
- package/dist/preview.cjs.map +1 -1
- package/dist/preview.d.cts +6 -4
- package/dist/preview.d.ts +6 -4
- package/dist/preview.js +31 -21
- package/dist/preview.js.map +1 -1
- package/dist/protocol.cjs +282 -167
- package/dist/protocol.cjs.map +1 -1
- package/dist/protocol.d.cts +74 -21
- package/dist/protocol.d.ts +74 -21
- package/dist/protocol.js +28 -10
- package/dist/release.cjs +37 -0
- package/dist/release.cjs.map +1 -1
- package/dist/release.d.cts +27 -1
- package/dist/release.d.ts +27 -1
- package/dist/release.js +13 -1
- package/dist/runtime-control.cjs +46 -0
- package/dist/runtime-control.cjs.map +1 -0
- package/dist/runtime-control.d.cts +17 -0
- package/dist/runtime-control.d.ts +17 -0
- package/dist/runtime-control.js +8 -0
- package/dist/runtime-control.js.map +1 -0
- package/dist/runtime-inspection.cjs +655 -0
- package/dist/runtime-inspection.cjs.map +1 -0
- package/dist/runtime-inspection.d.cts +47 -0
- package/dist/runtime-inspection.d.ts +47 -0
- package/dist/runtime-inspection.js +30 -0
- package/dist/runtime-inspection.js.map +1 -0
- package/dist/runtime-reporting-pe-eryVz.d.cts +27 -0
- package/dist/runtime-reporting-pe-eryVz.d.ts +27 -0
- package/dist/signals-ZHftIKuc.d.cts +33 -0
- package/dist/signals-ZHftIKuc.d.ts +33 -0
- package/dist/{standard-match-phase-BucA5dYo.d.ts → standard-match-phase-BzSgBYFg.d.ts} +2 -2
- package/dist/{standard-match-phase-U2ra8J-0.d.cts → standard-match-phase-CvJUW8Oe.d.cts} +2 -2
- package/dist/{sync-B6QsNrXz.d.cts → sync-xtPfWhif.d.cts} +1 -45
- package/dist/{sync-B6QsNrXz.d.ts → sync-xtPfWhif.d.ts} +1 -45
- package/dist/ui.cjs +689 -629
- package/dist/ui.cjs.map +1 -1
- package/dist/ui.d.cts +14 -4
- package/dist/ui.d.ts +14 -4
- package/dist/ui.js +117 -35
- package/dist/ui.js.map +1 -1
- package/dist/use-air-jam-host-COLy8t4s.d.ts +403 -0
- package/dist/use-air-jam-host-DM-ybB3C.d.cts +403 -0
- package/package.json +55 -21
- package/src/agent/agent-contract-conformance.ts +201 -0
- package/src/agent-tooling.ts +5 -0
- package/src/arcade/runtime.ts +6 -0
- package/src/arcade/surface.ts +1 -0
- package/src/components/join-qr-overlay.tsx +115 -31
- package/src/context/air-jam-context.tsx +8 -8
- package/src/context/socket-manager.ts +0 -7
- package/src/dev/browser-log-sink.ts +12 -15
- package/src/events.ts +0 -5
- package/src/hooks/internal/use-controller-runtime-api.ts +110 -21
- package/src/hooks/internal/use-host-runtime-api.ts +306 -49
- package/src/hooks/use-air-jam-controller.ts +9 -9
- package/src/hooks/use-air-jam-host.ts +7 -7
- package/src/hooks/use-get-input.ts +1 -1
- package/src/hooks/use-host-arcade-restore.ts +6 -1
- package/src/hooks/use-host-audio-mute-preference.ts +99 -0
- package/src/index.ts +6 -21
- package/src/metadata/manifest.ts +2 -3
- package/src/platform-machine.ts +109 -12
- package/src/preview/workspace.tsx +48 -29
- package/src/protocol/arcade-platform-actions.ts +19 -1
- package/src/protocol/controller.ts +8 -2
- package/src/protocol/dev-log-events.ts +0 -3
- package/src/protocol/host-grant.ts +58 -140
- package/src/protocol/host.ts +21 -9
- package/src/protocol/runtime-reporting.ts +32 -0
- package/src/protocol/signed-envelope.ts +176 -0
- package/src/protocol/socket-events.ts +8 -10
- package/src/protocol/sync.ts +0 -16
- package/src/protocol.ts +2 -0
- package/src/release.ts +32 -0
- package/src/runtime/admission-retry.ts +62 -0
- package/src/runtime/air-jam-config.ts +6 -16
- package/src/runtime/air-jam-error-boundary.tsx +46 -2
- package/src/runtime/bridge-envelope-args.ts +21 -0
- package/src/runtime/connected-runtime-error-boundary.tsx +31 -0
- package/src/runtime/contracts/control.ts +107 -59
- package/src/runtime/controller-bridge.ts +12 -24
- package/src/runtime/controller-identity.ts +55 -27
- package/src/runtime/controller-realtime-client.ts +8 -47
- package/src/runtime/create-air-jam-app.tsx +21 -13
- package/src/runtime/host-bridge.ts +16 -24
- package/src/runtime/local-reference-game-identity.ts +13 -0
- package/src/runtime/runtime-session-params.ts +4 -64
- package/src/runtime-control.ts +3 -8
- package/src/settings/platform-settings-runtime.tsx +1 -6
- package/src/settings/platform-settings.ts +7 -38
- package/src/state/connection-store.ts +13 -6
- package/src/store/create-air-jam-store.ts +59 -7
- package/src/utils/ids.ts +32 -5
- package/dist/capabilities.cjs +0 -39
- package/dist/capabilities.cjs.map +0 -1
- package/dist/capabilities.d.cts +0 -31
- package/dist/capabilities.d.ts +0 -31
- package/dist/capabilities.js +0 -12
- package/dist/capabilities.js.map +0 -1
- package/dist/chunk-32NYL7XI.js.map +0 -1
- package/dist/chunk-CABEUV65.js +0 -184
- package/dist/chunk-CABEUV65.js.map +0 -1
- package/dist/chunk-CEJ5RFSG.js.map +0 -1
- package/dist/chunk-EDRQIOCV.js.map +0 -1
- package/dist/chunk-KXAFI5OP.js.map +0 -1
- package/dist/chunk-NCL6WJCL.js.map +0 -1
- package/dist/chunk-NUJBMV3O.js.map +0 -1
- package/dist/chunk-VKBMZHMQ.js.map +0 -1
- package/dist/chunk-W3YA5BWR.js.map +0 -1
- package/dist/chunk-ZLPL2R3R.js.map +0 -1
- package/dist/chunk-ZTQ5SP4H.js +0 -9
- package/dist/chunk-ZTQ5SP4H.js.map +0 -1
- package/src/capabilities/manifest.ts +0 -71
- package/src/capabilities.ts +0 -12
- package/src/hooks/internal/use-runtime-control-contract.ts +0 -15
- package/src/hooks/internal/use-runtime-observability-contract.ts +0 -24
- package/src/runtime/contracts/observability.ts +0 -94
- package/src/runtime-observability.ts +0 -9
- /package/dist/{chunk-JEHV5C2X.js.map → chunk-CV3PBXPT.js.map} +0 -0
- /package/dist/{chunk-FAT2KJ3K.js.map → chunk-MIMPMB7O.js.map} +0 -0
- /package/dist/{chunk-7UXSWCZZ.js.map → chunk-QO4KFUEI.js.map} +0 -0
- /package/dist/{chunk-JO2HR5PV.js.map → chunk-UPV6YWT5.js.map} +0 -0
package/dist/preview.d.cts
CHANGED
|
@@ -2,10 +2,10 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { ResolvedAirJamRuntimeTopology } from './runtime-topology.cjs';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode, PointerEvent } from 'react';
|
|
5
|
-
import { C as ControllerPresenceNotice } from './notices-
|
|
6
|
-
import {
|
|
5
|
+
import { C as ControllerPresenceNotice } from './notices-DNdOjwtj.cjs';
|
|
6
|
+
import { d as ControllerOrientation } from './controller-vj82tKm4.cjs';
|
|
7
7
|
import 'zod';
|
|
8
|
-
import './platform-settings-
|
|
8
|
+
import './platform-settings-DUWs4JTy.cjs';
|
|
9
9
|
|
|
10
10
|
type HostPreviewControllerWorkspaceEnabled = boolean | "auto";
|
|
11
11
|
interface ResolveHostPreviewControllerWorkspaceEnabledOptions {
|
|
@@ -30,9 +30,11 @@ interface PreviewControllerWorkspaceProps {
|
|
|
30
30
|
dockAccessory?: ReactNode;
|
|
31
31
|
maxControllers?: number;
|
|
32
32
|
launcherLabel?: string;
|
|
33
|
+
launcherVariant?: "full" | "compact";
|
|
34
|
+
showLauncherWhenIdle?: boolean;
|
|
33
35
|
waitingLabel?: string;
|
|
34
36
|
}
|
|
35
|
-
declare const PreviewControllerWorkspace: ({ joinUrl, embedOrigin, controllers, onRemoveController, onResetRoom, enabled, highContrast, onActiveOpacityChange, className, dockAccessory, maxControllers, launcherLabel, waitingLabel, }: PreviewControllerWorkspaceProps) => react.ReactPortal | null;
|
|
37
|
+
declare const PreviewControllerWorkspace: ({ joinUrl, embedOrigin, controllers, onRemoveController, onResetRoom, enabled, highContrast, onActiveOpacityChange, className, dockAccessory, maxControllers, launcherLabel, launcherVariant, showLauncherWhenIdle, waitingLabel, }: PreviewControllerWorkspaceProps) => react.ReactPortal | null;
|
|
36
38
|
|
|
37
39
|
type HostPreviewControllerWorkspaceProps = Omit<PreviewControllerWorkspaceProps, "enabled" | "joinUrl"> & {
|
|
38
40
|
enabled?: HostPreviewControllerWorkspaceEnabled;
|
package/dist/preview.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { ResolvedAirJamRuntimeTopology } from './runtime-topology.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode, PointerEvent } from 'react';
|
|
5
|
-
import { C as ControllerPresenceNotice } from './notices-
|
|
6
|
-
import {
|
|
5
|
+
import { C as ControllerPresenceNotice } from './notices-C4bao3oi.js';
|
|
6
|
+
import { d as ControllerOrientation } from './controller-PZEM_1cH.js';
|
|
7
7
|
import 'zod';
|
|
8
|
-
import './platform-settings-
|
|
8
|
+
import './platform-settings-DUWs4JTy.js';
|
|
9
9
|
|
|
10
10
|
type HostPreviewControllerWorkspaceEnabled = boolean | "auto";
|
|
11
11
|
interface ResolveHostPreviewControllerWorkspaceEnabledOptions {
|
|
@@ -30,9 +30,11 @@ interface PreviewControllerWorkspaceProps {
|
|
|
30
30
|
dockAccessory?: ReactNode;
|
|
31
31
|
maxControllers?: number;
|
|
32
32
|
launcherLabel?: string;
|
|
33
|
+
launcherVariant?: "full" | "compact";
|
|
34
|
+
showLauncherWhenIdle?: boolean;
|
|
33
35
|
waitingLabel?: string;
|
|
34
36
|
}
|
|
35
|
-
declare const PreviewControllerWorkspace: ({ joinUrl, embedOrigin, controllers, onRemoveController, onResetRoom, enabled, highContrast, onActiveOpacityChange, className, dockAccessory, maxControllers, launcherLabel, waitingLabel, }: PreviewControllerWorkspaceProps) => react.ReactPortal | null;
|
|
37
|
+
declare const PreviewControllerWorkspace: ({ joinUrl, embedOrigin, controllers, onRemoveController, onResetRoom, enabled, highContrast, onActiveOpacityChange, className, dockAccessory, maxControllers, launcherLabel, launcherVariant, showLauncherWhenIdle, waitingLabel, }: PreviewControllerWorkspaceProps) => react.ReactPortal | null;
|
|
36
38
|
|
|
37
39
|
type HostPreviewControllerWorkspaceProps = Omit<PreviewControllerWorkspaceProps, "enabled" | "joinUrl"> & {
|
|
38
40
|
enabled?: HostPreviewControllerWorkspaceEnabled;
|
package/dist/preview.js
CHANGED
|
@@ -15,33 +15,37 @@ import {
|
|
|
15
15
|
isPreviewControllerSearchParams,
|
|
16
16
|
normalizePreviewDeviceId,
|
|
17
17
|
readPreviewControllerDeviceIdFromLocation,
|
|
18
|
-
readPreviewControllerDeviceIdFromSearchParams
|
|
18
|
+
readPreviewControllerDeviceIdFromSearchParams
|
|
19
|
+
} from "./chunk-FUA6EMSJ.js";
|
|
20
|
+
import {
|
|
19
21
|
useAirJamHost
|
|
20
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-CM53YLT5.js";
|
|
21
23
|
import {
|
|
22
24
|
useOptionalPlatformSettingsOwnerApi,
|
|
23
25
|
useResolvedPlatformSettingsSnapshot
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import
|
|
26
|
+
} from "./chunk-2SZ2YYGJ.js";
|
|
27
|
+
import "./chunk-3YMUAKPU.js";
|
|
28
|
+
import {
|
|
29
|
+
parseOptionalArcadeSurfaceFromSearchParams
|
|
30
|
+
} from "./chunk-BE6Z4SIT.js";
|
|
31
|
+
import "./chunk-MIMPMB7O.js";
|
|
32
|
+
import "./chunk-CV3PBXPT.js";
|
|
27
33
|
import {
|
|
28
34
|
useAirJamConfig
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-LIXPF4P6.js";
|
|
31
|
-
import "./chunk-ZLPL2R3R.js";
|
|
32
|
-
import "./chunk-32NYL7XI.js";
|
|
35
|
+
} from "./chunk-O6X7FJ6N.js";
|
|
33
36
|
import "./chunk-W2VK36RO.js";
|
|
34
37
|
import {
|
|
35
38
|
isLocalDevControlSurfaceRuntimeMode
|
|
36
39
|
} from "./chunk-UWJOIVON.js";
|
|
40
|
+
import "./chunk-LIXPF4P6.js";
|
|
41
|
+
import "./chunk-J5MCII33.js";
|
|
37
42
|
import {
|
|
38
43
|
appendRuntimeQueryParams,
|
|
39
44
|
getRuntimeUrlOrigin,
|
|
40
45
|
normalizeRuntimeUrl
|
|
41
46
|
} from "./chunk-3USU7GY2.js";
|
|
42
|
-
import
|
|
43
|
-
|
|
44
|
-
} from "./chunk-BE6Z4SIT.js";
|
|
47
|
+
import "./chunk-K4OZ54UD.js";
|
|
48
|
+
import "./chunk-UCPY7UJC.js";
|
|
45
49
|
|
|
46
50
|
// src/preview/ownership.ts
|
|
47
51
|
var readDevelopmentRuntime = () => {
|
|
@@ -1103,7 +1107,7 @@ var PreviewControllerWindow = ({
|
|
|
1103
1107
|
};
|
|
1104
1108
|
|
|
1105
1109
|
// src/preview/workspace.tsx
|
|
1106
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1110
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1107
1111
|
var getControllerSourceLabel = (source) => {
|
|
1108
1112
|
if (source === "virtual") {
|
|
1109
1113
|
return "Agent";
|
|
@@ -1132,6 +1136,8 @@ var PreviewControllerWorkspace = ({
|
|
|
1132
1136
|
dockAccessory,
|
|
1133
1137
|
maxControllers = 2,
|
|
1134
1138
|
launcherLabel = "Controllers",
|
|
1139
|
+
launcherVariant = "full",
|
|
1140
|
+
showLauncherWhenIdle = true,
|
|
1135
1141
|
waitingLabel = "Waiting for room"
|
|
1136
1142
|
}) => {
|
|
1137
1143
|
const [mounted, setMounted] = useState3(false);
|
|
@@ -1206,6 +1212,7 @@ var PreviewControllerWorkspace = ({
|
|
|
1206
1212
|
() => sessions.filter((session) => !session.minimized),
|
|
1207
1213
|
[sessions]
|
|
1208
1214
|
);
|
|
1215
|
+
const launcherVisible = showLauncherWhenIdle || launcherOpen || sessions.length > 0;
|
|
1209
1216
|
const sortedControllers = useMemo(
|
|
1210
1217
|
() => [...controllers].sort(
|
|
1211
1218
|
(left, right) => left.controllerId.localeCompare(right.controllerId)
|
|
@@ -1403,27 +1410,30 @@ var PreviewControllerWorkspace = ({
|
|
|
1403
1410
|
style: { pointerEvents: "auto" },
|
|
1404
1411
|
children: [
|
|
1405
1412
|
dockAccessory,
|
|
1406
|
-
/* @__PURE__ */ jsxs2(
|
|
1413
|
+
launcherVisible ? /* @__PURE__ */ jsxs2(
|
|
1407
1414
|
Button,
|
|
1408
1415
|
{
|
|
1409
1416
|
type: "button",
|
|
1410
1417
|
variant: "ghost",
|
|
1411
|
-
size: "sm",
|
|
1418
|
+
size: launcherVariant === "compact" ? "icon-sm" : "sm",
|
|
1412
1419
|
className: cn(
|
|
1413
|
-
"rounded-full border border-white/25 bg-black/35
|
|
1420
|
+
"relative rounded-full border border-white/25 bg-black/35 text-white backdrop-blur-sm hover:bg-black/55 disabled:border-white/10 disabled:bg-black/25 disabled:text-white/40",
|
|
1421
|
+
launcherVariant === "compact" ? "h-9 w-9 p-0" : "gap-2 px-3"
|
|
1414
1422
|
),
|
|
1415
1423
|
"aria-expanded": launcherOpen,
|
|
1416
|
-
"aria-label": launcherOpen ?
|
|
1424
|
+
"aria-label": launcherOpen ? `Hide ${launcherLabel.toLowerCase()}` : `Show ${launcherLabel.toLowerCase()}`,
|
|
1417
1425
|
title: !joinUrl ? waitingLabel : launcherLabel,
|
|
1418
1426
|
onClick: () => setLauncherOpen((current) => !current),
|
|
1419
1427
|
children: [
|
|
1420
1428
|
/* @__PURE__ */ jsx2(MonitorSmartphone2, { className: "h-4 w-4" }),
|
|
1421
|
-
/* @__PURE__ */
|
|
1422
|
-
|
|
1423
|
-
|
|
1429
|
+
launcherVariant === "full" ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1430
|
+
/* @__PURE__ */ jsx2("span", { className: "text-[11px] font-semibold tracking-[0.16em] uppercase", children: launcherLabel }),
|
|
1431
|
+
sessions.length > 0 ? /* @__PURE__ */ jsx2("span", { className: "rounded-full border border-white/12 bg-white/6 px-1.5 py-0.5 text-[10px] leading-none font-semibold text-white/88", children: sessions.length }) : null,
|
|
1432
|
+
launcherOpen ? /* @__PURE__ */ jsx2(ChevronUp, { className: "h-4 w-4 text-white/60" }) : /* @__PURE__ */ jsx2(ChevronDown, { className: "h-4 w-4 text-white/60" })
|
|
1433
|
+
] }) : sessions.length > 0 ? /* @__PURE__ */ jsx2("span", { className: "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full border border-white/25 bg-slate-950 px-1 text-[9px] leading-none font-semibold text-white", children: sessions.length }) : null
|
|
1424
1434
|
]
|
|
1425
1435
|
}
|
|
1426
|
-
)
|
|
1436
|
+
) : null
|
|
1427
1437
|
]
|
|
1428
1438
|
}
|
|
1429
1439
|
),
|