@air-jam/sdk 0.9.0 → 0.9.2

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.
Files changed (84) hide show
  1. package/dist/arcade/bridge/controller.cjs +1 -1
  2. package/dist/arcade/bridge/controller.js +2 -2
  3. package/dist/arcade/bridge/host.cjs +1 -1
  4. package/dist/arcade/bridge/host.js +2 -2
  5. package/dist/arcade/bridge/iframe.cjs +1 -1
  6. package/dist/arcade/bridge/iframe.js +5 -5
  7. package/dist/arcade/bridge.cjs +1 -1
  8. package/dist/arcade/bridge.js +8 -8
  9. package/dist/arcade/host.cjs +0 -7
  10. package/dist/arcade/host.cjs.map +1 -1
  11. package/dist/arcade/host.js +4 -3
  12. package/dist/arcade/url.cjs +183 -2
  13. package/dist/arcade/url.cjs.map +1 -1
  14. package/dist/arcade/url.d.cts +1 -1
  15. package/dist/arcade/url.d.ts +1 -1
  16. package/dist/arcade/url.js +5 -4
  17. package/dist/arcade.cjs +184 -12
  18. package/dist/arcade.cjs.map +1 -1
  19. package/dist/arcade.d.cts +1 -1
  20. package/dist/arcade.d.ts +1 -1
  21. package/dist/arcade.js +22 -21
  22. package/dist/{chunk-2432OL7L.js → chunk-6CMB356F.js} +2 -2
  23. package/dist/{chunk-Y4RAPKKB.js → chunk-7OTQTT6H.js} +2 -2
  24. package/dist/{chunk-VDRNNGHX.js → chunk-CVYR5RJT.js} +9 -9
  25. package/dist/{chunk-VDRNNGHX.js.map → chunk-CVYR5RJT.js.map} +1 -1
  26. package/dist/{chunk-CQUG24WX.js → chunk-DY67S3LR.js} +2 -2
  27. package/dist/{chunk-NU5W6VAV.js → chunk-E5PVHEAX.js} +3 -3
  28. package/dist/{chunk-XLUWV45V.js → chunk-EDRQIOCV.js} +2 -2
  29. package/dist/{chunk-2J65FXEP.js → chunk-JO2HR5PV.js} +6 -4
  30. package/dist/chunk-JO2HR5PV.js.map +1 -0
  31. package/dist/{chunk-MKBASO6X.js → chunk-KOB73SPD.js} +2 -2
  32. package/dist/{chunk-VN5LDWVN.js → chunk-M4DKOI42.js} +2 -2
  33. package/dist/{chunk-HFWRZVZ3.js → chunk-NUJBMV3O.js} +13 -16
  34. package/dist/chunk-NUJBMV3O.js.map +1 -0
  35. package/dist/{chunk-D3X4MN4U.js → chunk-Q4UALQO4.js} +2 -2
  36. package/dist/chunk-UWJOIVON.js +369 -0
  37. package/dist/chunk-UWJOIVON.js.map +1 -0
  38. package/dist/index.cjs +515 -123
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/index.d.cts +9 -2
  41. package/dist/index.d.ts +9 -2
  42. package/dist/index.js +175 -102
  43. package/dist/index.js.map +1 -1
  44. package/dist/preview.cjs +22 -11
  45. package/dist/preview.cjs.map +1 -1
  46. package/dist/preview.d.cts +1 -1
  47. package/dist/preview.d.ts +1 -1
  48. package/dist/preview.js +12 -12
  49. package/dist/preview.js.map +1 -1
  50. package/dist/runtime-topology.cjs +405 -0
  51. package/dist/runtime-topology.cjs.map +1 -0
  52. package/dist/runtime-topology.d.cts +59 -0
  53. package/dist/runtime-topology.d.ts +59 -0
  54. package/dist/runtime-topology.js +31 -0
  55. package/dist/runtime-topology.js.map +1 -0
  56. package/dist/ui.cjs +341 -30
  57. package/dist/ui.cjs.map +1 -1
  58. package/dist/ui.d.cts +11 -1
  59. package/dist/ui.d.ts +11 -1
  60. package/dist/ui.js +110 -32
  61. package/dist/ui.js.map +1 -1
  62. package/package.json +10 -3
  63. package/src/arcade/url.ts +2 -2
  64. package/src/components/join-qr-overlay.tsx +115 -31
  65. package/src/context/air-jam-context.tsx +2 -2
  66. package/src/dev/browser-log-sink.ts +1 -1
  67. package/src/hooks/use-host-audio-mute-preference.ts +99 -0
  68. package/src/index.ts +4 -0
  69. package/src/preview/ownership.ts +1 -1
  70. package/src/runtime/air-jam-config.ts +1 -1
  71. package/src/runtime/create-air-jam-app.tsx +2 -2
  72. package/src/runtime/embedded-runtime-adapters.ts +1 -1
  73. package/src/runtime/runtime-session-params.ts +2 -2
  74. package/src/runtime-topology.ts +569 -0
  75. package/dist/chunk-2J65FXEP.js.map +0 -1
  76. package/dist/chunk-HFWRZVZ3.js.map +0 -1
  77. /package/dist/{chunk-2432OL7L.js.map → chunk-6CMB356F.js.map} +0 -0
  78. /package/dist/{chunk-Y4RAPKKB.js.map → chunk-7OTQTT6H.js.map} +0 -0
  79. /package/dist/{chunk-CQUG24WX.js.map → chunk-DY67S3LR.js.map} +0 -0
  80. /package/dist/{chunk-NU5W6VAV.js.map → chunk-E5PVHEAX.js.map} +0 -0
  81. /package/dist/{chunk-XLUWV45V.js.map → chunk-EDRQIOCV.js.map} +0 -0
  82. /package/dist/{chunk-MKBASO6X.js.map → chunk-KOB73SPD.js.map} +0 -0
  83. /package/dist/{chunk-VN5LDWVN.js.map → chunk-M4DKOI42.js.map} +0 -0
  84. /package/dist/{chunk-D3X4MN4U.js.map → chunk-Q4UALQO4.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -9,7 +9,7 @@ import { h as HostControllerActionAck, c as HostRegistrationAck, n as HostSessio
9
9
  import { C as ControllerPresenceNotice } from './notices-NyDM5Mtz.cjs';
10
10
  import { h as HapticSignalPayload, T as ToastSignalPayload, i as AirJamActionActorRole, A as AirJamActionInvocationResult, k as AirJamActionPayload } from './sync-B6QsNrXz.cjs';
11
11
  export { m as AirJamActionAccepted, n as AirJamActionRejected, S as SignalPayload, g as SignalType } from './sync-B6QsNrXz.cjs';
12
- import { RuntimeTopologyInput, ResolvedAirJamRuntimeTopology, SurfaceRole } from '@air-jam/runtime-topology';
12
+ import { RuntimeTopologyInput, ResolvedAirJamRuntimeTopology, SurfaceRole } from './runtime-topology.cjs';
13
13
  import { A as AirJamAgentContract } from './agent-tooling-BSMGBix9.cjs';
14
14
  export { j as AirJamAgentActionContract, b as AirJamAgentActionCustomOptions, c as AirJamAgentActionOptions, d as AirJamAgentActionPayloadKind, e as AirJamAgentActionPayloadMetadata, k as AirJamAgentActionTarget, l as AirJamAgentContractActionOptions, m as AirJamAgentContractPayloadKind, n as AirJamAgentContractPayloadMetadata, o as AirJamAgentJsonObject, p as AirJamAgentResolvedActionContract, q as AirJamAgentSnapshotContext, r as AirJamAgentStoreDeclaration, s as AirJamAgentStoreDeclarations, t as AirJamAgentStores, u as AnyAirJamAgentContract, I as InferAirJamAgentActionInputPayload, v as InferAirJamAgentStores, f as agentAction, a as agentActionInput, g as agentStore, h as defineAirJamAgentContract, i as defineAirJamAgentStores } from './agent-tooling-BSMGBix9.cjs';
15
15
  import { AirJamGameCapabilityManifest } from './capabilities.cjs';
@@ -605,6 +605,13 @@ interface HostTickOptions {
605
605
  */
606
606
  declare const useHostTick: (options: HostTickOptions) => void;
607
607
 
608
+ interface HostAudioMutePreference {
609
+ muted: boolean;
610
+ setMuted: (muted: boolean) => void;
611
+ toggleMuted: () => void;
612
+ }
613
+ declare const useHostAudioMutePreference: (scope: string, defaultMuted?: boolean) => HostAudioMutePreference;
614
+
608
615
  declare const useInputWriter: () => ((input: ControllerInputPayload) => boolean);
609
616
 
610
617
  declare const usePlayers: () => PlayerProfile[];
@@ -1153,4 +1160,4 @@ interface ElementWithFullscreen extends HTMLElement {
1153
1160
  msRequestFullscreen?: () => Promise<void>;
1154
1161
  }
1155
1162
 
1156
- export { AIR_JAM_RUNTIME_INSPECTION_KEY, type AirJamActionAcceptance, type AirJamActionContext, AirJamActionInvocationResult, type AirJamActionRejection, AirJamAgentContract, type AirJamApp, type AirJamAppErrorBoundaryOptions, type AirJamControllerApi, type AirJamControllerOptions, AirJamControllerRuntime, type AirJamControllerRuntimeProps, type AirJamControllerState, type AirJamDiagnostic, type AirJamDiagnosticCode, type AirJamDiagnosticSeverity, AirJamErrorBoundary, type AirJamErrorBoundaryProps, type AirJamErrorFallbackRenderProps, type AirJamErrorFallbackRenderer, type AirJamHostActionEvent, type AirJamHostActionListener, type AirJamHostActionSubscriptionOptions, type AirJamHostApi, type AirJamHostOptions, AirJamHostRuntime, type AirJamHostRuntimeProps, type AirJamHostState, type AirJamRuntimeErrorBoundaryOptions, type AirJamRuntimeRole, type AirJamSyncedStoreHook, type AudioHandle, AudioRuntime, type AudioRuntimeControls, type AudioRuntimeProps, type AudioRuntimeStatus, type AudioVolumeCategory, ConnectionStatus, ControllerOrientation, type ControllerRuntimeInspectionContract, ControllerStatePayload, type ControllerTickInfo, type ControllerTickOptions, type ControllerToast, ControllerUpdatePlayerProfileAck, type CreateAirJamAppOptions, type CreateAirJamStoreOptions, type DocumentWithFullscreen, type ElementWithFullscreen, HapticSignalPayload, type HostFrameInfo, type HostRuntimeInspectionContract, type HostTickInfo, type HostTickOptions, type JoinUrlStatus, MusicPlaylist, type MusicPlaylistProps, type PlayOptions, PlayerProfile, PlayerProfilePatch, RoomCode, type RoomState, RunMode, type RuntimeInspectionContract, RuntimeState, type SendSignalFn, type SoundCategory, type SoundConfig, type SoundManifest, ToastSignalPayload, type UseControllerToastsOptions, acceptAirJamAction, createAirJamApp, createAirJamStore, createControllerRuntimeInspectionContract, createHostRuntimeInspectionContract, env, onAirJamDiagnostic, publishRuntimeInspectionContract, readRuntimeInspectionContract, rejectAirJamAction, resolveAirJamBrowserRouterBasename, setAirJamDiagnosticsEnabled, useAirJamController, useAirJamHost, useAudio, useAudioCategoryVolume, useAudioRuntimeControls, useAudioRuntimeStatus, useConnectionStatus, useControllerRuntimeInspectionContract, useControllerTick, useControllerToasts, useGetInput, useHostRuntimeInspectionContract, useHostTick, useInputWriter, useMusicVolume, usePlayers, useRoom, useSendSignal };
1163
+ export { AIR_JAM_RUNTIME_INSPECTION_KEY, type AirJamActionAcceptance, type AirJamActionContext, AirJamActionInvocationResult, type AirJamActionRejection, AirJamAgentContract, type AirJamApp, type AirJamAppErrorBoundaryOptions, type AirJamControllerApi, type AirJamControllerOptions, AirJamControllerRuntime, type AirJamControllerRuntimeProps, type AirJamControllerState, type AirJamDiagnostic, type AirJamDiagnosticCode, type AirJamDiagnosticSeverity, AirJamErrorBoundary, type AirJamErrorBoundaryProps, type AirJamErrorFallbackRenderProps, type AirJamErrorFallbackRenderer, type AirJamHostActionEvent, type AirJamHostActionListener, type AirJamHostActionSubscriptionOptions, type AirJamHostApi, type AirJamHostOptions, AirJamHostRuntime, type AirJamHostRuntimeProps, type AirJamHostState, type AirJamRuntimeErrorBoundaryOptions, type AirJamRuntimeRole, type AirJamSyncedStoreHook, type AudioHandle, AudioRuntime, type AudioRuntimeControls, type AudioRuntimeProps, type AudioRuntimeStatus, type AudioVolumeCategory, ConnectionStatus, ControllerOrientation, type ControllerRuntimeInspectionContract, ControllerStatePayload, type ControllerTickInfo, type ControllerTickOptions, type ControllerToast, ControllerUpdatePlayerProfileAck, type CreateAirJamAppOptions, type CreateAirJamStoreOptions, type DocumentWithFullscreen, type ElementWithFullscreen, HapticSignalPayload, type HostAudioMutePreference, type HostFrameInfo, type HostRuntimeInspectionContract, type HostTickInfo, type HostTickOptions, type JoinUrlStatus, MusicPlaylist, type MusicPlaylistProps, type PlayOptions, PlayerProfile, PlayerProfilePatch, RoomCode, type RoomState, RunMode, type RuntimeInspectionContract, RuntimeState, type SendSignalFn, type SoundCategory, type SoundConfig, type SoundManifest, ToastSignalPayload, type UseControllerToastsOptions, acceptAirJamAction, createAirJamApp, createAirJamStore, createControllerRuntimeInspectionContract, createHostRuntimeInspectionContract, env, onAirJamDiagnostic, publishRuntimeInspectionContract, readRuntimeInspectionContract, rejectAirJamAction, resolveAirJamBrowserRouterBasename, setAirJamDiagnosticsEnabled, useAirJamController, useAirJamHost, useAudio, useAudioCategoryVolume, useAudioRuntimeControls, useAudioRuntimeStatus, useConnectionStatus, useControllerRuntimeInspectionContract, useControllerTick, useControllerToasts, useGetInput, useHostAudioMutePreference, useHostRuntimeInspectionContract, useHostTick, useInputWriter, useMusicVolume, usePlayers, useRoom, useSendSignal };
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ import { h as HostControllerActionAck, c as HostRegistrationAck, n as HostSessio
9
9
  import { C as ControllerPresenceNotice } from './notices-CnGaaS8B.js';
10
10
  import { h as HapticSignalPayload, T as ToastSignalPayload, i as AirJamActionActorRole, A as AirJamActionInvocationResult, k as AirJamActionPayload } from './sync-B6QsNrXz.js';
11
11
  export { m as AirJamActionAccepted, n as AirJamActionRejected, S as SignalPayload, g as SignalType } from './sync-B6QsNrXz.js';
12
- import { RuntimeTopologyInput, ResolvedAirJamRuntimeTopology, SurfaceRole } from '@air-jam/runtime-topology';
12
+ import { RuntimeTopologyInput, ResolvedAirJamRuntimeTopology, SurfaceRole } from './runtime-topology.js';
13
13
  import { A as AirJamAgentContract } from './agent-tooling-BSMGBix9.js';
14
14
  export { j as AirJamAgentActionContract, b as AirJamAgentActionCustomOptions, c as AirJamAgentActionOptions, d as AirJamAgentActionPayloadKind, e as AirJamAgentActionPayloadMetadata, k as AirJamAgentActionTarget, l as AirJamAgentContractActionOptions, m as AirJamAgentContractPayloadKind, n as AirJamAgentContractPayloadMetadata, o as AirJamAgentJsonObject, p as AirJamAgentResolvedActionContract, q as AirJamAgentSnapshotContext, r as AirJamAgentStoreDeclaration, s as AirJamAgentStoreDeclarations, t as AirJamAgentStores, u as AnyAirJamAgentContract, I as InferAirJamAgentActionInputPayload, v as InferAirJamAgentStores, f as agentAction, a as agentActionInput, g as agentStore, h as defineAirJamAgentContract, i as defineAirJamAgentStores } from './agent-tooling-BSMGBix9.js';
15
15
  import { AirJamGameCapabilityManifest } from './capabilities.js';
@@ -605,6 +605,13 @@ interface HostTickOptions {
605
605
  */
606
606
  declare const useHostTick: (options: HostTickOptions) => void;
607
607
 
608
+ interface HostAudioMutePreference {
609
+ muted: boolean;
610
+ setMuted: (muted: boolean) => void;
611
+ toggleMuted: () => void;
612
+ }
613
+ declare const useHostAudioMutePreference: (scope: string, defaultMuted?: boolean) => HostAudioMutePreference;
614
+
608
615
  declare const useInputWriter: () => ((input: ControllerInputPayload) => boolean);
609
616
 
610
617
  declare const usePlayers: () => PlayerProfile[];
@@ -1153,4 +1160,4 @@ interface ElementWithFullscreen extends HTMLElement {
1153
1160
  msRequestFullscreen?: () => Promise<void>;
1154
1161
  }
1155
1162
 
1156
- export { AIR_JAM_RUNTIME_INSPECTION_KEY, type AirJamActionAcceptance, type AirJamActionContext, AirJamActionInvocationResult, type AirJamActionRejection, AirJamAgentContract, type AirJamApp, type AirJamAppErrorBoundaryOptions, type AirJamControllerApi, type AirJamControllerOptions, AirJamControllerRuntime, type AirJamControllerRuntimeProps, type AirJamControllerState, type AirJamDiagnostic, type AirJamDiagnosticCode, type AirJamDiagnosticSeverity, AirJamErrorBoundary, type AirJamErrorBoundaryProps, type AirJamErrorFallbackRenderProps, type AirJamErrorFallbackRenderer, type AirJamHostActionEvent, type AirJamHostActionListener, type AirJamHostActionSubscriptionOptions, type AirJamHostApi, type AirJamHostOptions, AirJamHostRuntime, type AirJamHostRuntimeProps, type AirJamHostState, type AirJamRuntimeErrorBoundaryOptions, type AirJamRuntimeRole, type AirJamSyncedStoreHook, type AudioHandle, AudioRuntime, type AudioRuntimeControls, type AudioRuntimeProps, type AudioRuntimeStatus, type AudioVolumeCategory, ConnectionStatus, ControllerOrientation, type ControllerRuntimeInspectionContract, ControllerStatePayload, type ControllerTickInfo, type ControllerTickOptions, type ControllerToast, ControllerUpdatePlayerProfileAck, type CreateAirJamAppOptions, type CreateAirJamStoreOptions, type DocumentWithFullscreen, type ElementWithFullscreen, HapticSignalPayload, type HostFrameInfo, type HostRuntimeInspectionContract, type HostTickInfo, type HostTickOptions, type JoinUrlStatus, MusicPlaylist, type MusicPlaylistProps, type PlayOptions, PlayerProfile, PlayerProfilePatch, RoomCode, type RoomState, RunMode, type RuntimeInspectionContract, RuntimeState, type SendSignalFn, type SoundCategory, type SoundConfig, type SoundManifest, ToastSignalPayload, type UseControllerToastsOptions, acceptAirJamAction, createAirJamApp, createAirJamStore, createControllerRuntimeInspectionContract, createHostRuntimeInspectionContract, env, onAirJamDiagnostic, publishRuntimeInspectionContract, readRuntimeInspectionContract, rejectAirJamAction, resolveAirJamBrowserRouterBasename, setAirJamDiagnosticsEnabled, useAirJamController, useAirJamHost, useAudio, useAudioCategoryVolume, useAudioRuntimeControls, useAudioRuntimeStatus, useConnectionStatus, useControllerRuntimeInspectionContract, useControllerTick, useControllerToasts, useGetInput, useHostRuntimeInspectionContract, useHostTick, useInputWriter, useMusicVolume, usePlayers, useRoom, useSendSignal };
1163
+ export { AIR_JAM_RUNTIME_INSPECTION_KEY, type AirJamActionAcceptance, type AirJamActionContext, AirJamActionInvocationResult, type AirJamActionRejection, AirJamAgentContract, type AirJamApp, type AirJamAppErrorBoundaryOptions, type AirJamControllerApi, type AirJamControllerOptions, AirJamControllerRuntime, type AirJamControllerRuntimeProps, type AirJamControllerState, type AirJamDiagnostic, type AirJamDiagnosticCode, type AirJamDiagnosticSeverity, AirJamErrorBoundary, type AirJamErrorBoundaryProps, type AirJamErrorFallbackRenderProps, type AirJamErrorFallbackRenderer, type AirJamHostActionEvent, type AirJamHostActionListener, type AirJamHostActionSubscriptionOptions, type AirJamHostApi, type AirJamHostOptions, AirJamHostRuntime, type AirJamHostRuntimeProps, type AirJamHostState, type AirJamRuntimeErrorBoundaryOptions, type AirJamRuntimeRole, type AirJamSyncedStoreHook, type AudioHandle, AudioRuntime, type AudioRuntimeControls, type AudioRuntimeProps, type AudioRuntimeStatus, type AudioVolumeCategory, ConnectionStatus, ControllerOrientation, type ControllerRuntimeInspectionContract, ControllerStatePayload, type ControllerTickInfo, type ControllerTickOptions, type ControllerToast, ControllerUpdatePlayerProfileAck, type CreateAirJamAppOptions, type CreateAirJamStoreOptions, type DocumentWithFullscreen, type ElementWithFullscreen, HapticSignalPayload, type HostAudioMutePreference, type HostFrameInfo, type HostRuntimeInspectionContract, type HostTickInfo, type HostTickOptions, type JoinUrlStatus, MusicPlaylist, type MusicPlaylistProps, type PlayOptions, PlayerProfile, PlayerProfilePatch, RoomCode, type RoomState, RunMode, type RuntimeInspectionContract, RuntimeState, type SendSignalFn, type SoundCategory, type SoundConfig, type SoundManifest, ToastSignalPayload, type UseControllerToastsOptions, acceptAirJamAction, createAirJamApp, createAirJamStore, createControllerRuntimeInspectionContract, createHostRuntimeInspectionContract, env, onAirJamDiagnostic, publishRuntimeInspectionContract, readRuntimeInspectionContract, rejectAirJamAction, resolveAirJamBrowserRouterBasename, setAirJamDiagnosticsEnabled, useAirJamController, useAirJamHost, useAudio, useAudioCategoryVolume, useAudioRuntimeControls, useAudioRuntimeStatus, useConnectionStatus, useControllerRuntimeInspectionContract, useControllerTick, useControllerToasts, useGetInput, useHostAudioMutePreference, useHostRuntimeInspectionContract, useHostTick, useInputWriter, useMusicVolume, usePlayers, useRoom, useSendSignal };