@series-inc/rundot-game-sdk 5.14.1 → 5.14.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.
- package/dist/{AdsApi-De-UK8MW.d.ts → AdsApi-SXR3OJBu.d.ts} +18 -1
- package/dist/{chunk-LSKD3VSU.js → chunk-QEIRJ4K6.js} +41 -2
- package/dist/chunk-QEIRJ4K6.js.map +1 -0
- package/dist/{chunk-XVUFECZG.js → chunk-V2WWIX4C.js} +4 -4
- package/dist/{chunk-XVUFECZG.js.map → chunk-V2WWIX4C.js.map} +1 -1
- package/dist/index.d.ts +10 -3
- package/dist/index.js +2 -2
- package/dist/rundot-game-api/index.d.ts +2 -2
- package/dist/rundot-game-api/index.js +2 -2
- package/dist/sandbox/index.js +4 -2
- package/dist/sandbox/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-LSKD3VSU.js.map +0 -1
|
@@ -473,6 +473,7 @@ type SleepCallback = () => void;
|
|
|
473
473
|
type ResumeCallback = () => void;
|
|
474
474
|
type PauseCallback = () => void;
|
|
475
475
|
type QuitCallback = () => void;
|
|
476
|
+
type BackButtonCallback = () => void;
|
|
476
477
|
interface LifecycleApi {
|
|
477
478
|
/**
|
|
478
479
|
* Registers a callback for when the game transitions from "idle" to "active" state.
|
|
@@ -524,6 +525,20 @@ interface LifecycleApi {
|
|
|
524
525
|
* @returns Subscription object that can be used to unsubscribe from the event
|
|
525
526
|
*/
|
|
526
527
|
onQuit(callback: QuitCallback): Subscription;
|
|
528
|
+
/**
|
|
529
|
+
* Registers a callback for when the user presses the device back button (Android only).
|
|
530
|
+
*
|
|
531
|
+
* Use this to navigate back within your game's own UI or show an exit
|
|
532
|
+
* confirmation. If you want the host to perform its default quit behavior,
|
|
533
|
+
* call `RundotGameAPI.navigation.requestPopOrQuit()` from within the callback.
|
|
534
|
+
*
|
|
535
|
+
* On platforms without a hardware back button (iOS, web), this event never fires,
|
|
536
|
+
* but registering a handler is safe and acts as a no-op.
|
|
537
|
+
*
|
|
538
|
+
* @param callback - Function to execute when the back button is pressed
|
|
539
|
+
* @returns Subscription object that can be used to unsubscribe from the event
|
|
540
|
+
*/
|
|
541
|
+
onBackButton(callback: BackButtonCallback): Subscription;
|
|
527
542
|
}
|
|
528
543
|
|
|
529
544
|
interface ExecuteRecipeOptions {
|
|
@@ -1408,6 +1423,8 @@ interface UgcReportParams {
|
|
|
1408
1423
|
id: string;
|
|
1409
1424
|
reason: 'inappropriate' | 'spam' | 'harassment' | 'other';
|
|
1410
1425
|
details?: string;
|
|
1426
|
+
supportEmail?: string;
|
|
1427
|
+
metadata?: Record<string, string>;
|
|
1411
1428
|
}
|
|
1412
1429
|
interface UgcFollowCounts {
|
|
1413
1430
|
followerCount: number;
|
|
@@ -2693,4 +2710,4 @@ interface AdsApi {
|
|
|
2693
2710
|
showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
|
|
2694
2711
|
}
|
|
2695
2712
|
|
|
2696
|
-
export { type GetFutureTimeOptions as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type NotificationsApi as C, type ScheduleLocalNotification as D, type ScheduleNotificationOptions as E, type PopupsApi as F, type ShowToastOptions as G, type Host as H, type ShowInterstitialAdOptions as I, type ShowRewardedAdOptions as J, type ProfileApi as K, type DeviceApi as L, type DeviceInfo as M, type NavigationApi as N, type EnvironmentApi as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationRunSummary as S, type EnvironmentInfo as T, type SystemApi as U, type SafeArea as V, type CdnApi as W, type FetchFromCdnOptions as X, type AssetUrlResult as Y, type TimeApi as Z, type ServerTimeData as _, type RecipeRequirementResult as a, type
|
|
2713
|
+
export { type GetFutureTimeOptions as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type NotificationsApi as C, type ScheduleLocalNotification as D, type ScheduleNotificationOptions as E, type PopupsApi as F, type ShowToastOptions as G, type Host as H, type ShowInterstitialAdOptions as I, type ShowRewardedAdOptions as J, type ProfileApi as K, type DeviceApi as L, type DeviceInfo as M, type NavigationApi as N, type EnvironmentApi as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationRunSummary as S, type EnvironmentInfo as T, type SystemApi as U, type SafeArea as V, type CdnApi as W, type FetchFromCdnOptions as X, type AssetUrlResult as Y, type TimeApi as Z, type ServerTimeData as _, type RecipeRequirementResult as a, type OpenStoreResult as a$, type AiApi as a0, type AiChatCompletionRequest as a1, type AiChatCompletionData as a2, type HapticsApi as a3, HapticFeedbackStyle as a4, type FeaturesApi as a5, type Experiment as a6, type LifecycleApi as a7, type SleepCallback as a8, type Subscription as a9, type GetBatchRecipeRequirements as aA, type TriggerRecipeChainOptions as aB, type RoomDataUpdate as aC, type RoomMessageEvent as aD, type ProposedMoveEvent as aE, RundotGameTransport as aF, type RoomsApi as aG, type CreateRoomOptions as aH, type JoinOrCreateRoomOptions as aI, type JoinOrCreateResult as aJ, type ListRoomsOptions as aK, type UpdateRoomDataOptions as aL, type RoomMessageRequest as aM, type StartRoomGameOptions as aN, type ProposeMoveRequest as aO, type ProposeMoveResult as aP, type ValidateMoveVerdict as aQ, type ValidateMoveResult as aR, type RoomSubscriptionOptions as aS, type LoggingApi as aT, type IapApi as aU, type SpendCurrencyOptions as aV, type SpendCurrencyResult as aW, type SubscriptionTier as aX, type RunSubscriptionsResponse as aY, type SubscriptionInterval as aZ, type PurchaseSubscriptionResponse as a_, type AwakeCallback as aa, type PauseCallback as ab, type ResumeCallback as ac, type QuitCallback as ad, type BackButtonCallback as ae, type SimulationApi as af, type SimulationSlotValidationResult as ag, type SimulationBatchOperation as ah, type SimulationBatchOperationsResult as ai, type SimulationAvailableItem as aj, type SimulationPowerPreview as ak, type SimulationSlotMutationResult as al, type SimulationSlotContainer as am, type SimulationAssignment as an, type SimulationState as ao, type ExecuteRecipeOptions as ap, type ExecuteRecipeResponse as aq, type CollectRecipeResult as ar, type ResetStateOptions as as, type ResetStateResult as at, type GetActiveRunsOptions as au, type ExecuteScopedRecipeOptions as av, type ExecuteScopedRecipeResult as aw, type GetAvailableRecipesOptions as ax, type GetAvailableRecipesResult as ay, type Recipe as az, type RundotGameSimulationStateResponse as b, type ConnectionState as b$, type LoadEmbeddedAssetsResponse as b0, type SharedAssetsApi as b1, type LeaderboardApi as b2, type ScoreToken as b3, type SubmitScoreParams as b4, type SubmitScoreResult as b5, type GetPagedScoresOptions as b6, type PagedScoresResponse as b7, type PlayerRankOptions as b8, type PlayerRankResult as b9, type AppRole as bA, type AdminUgcBrowseParams as bB, type AdminUgcBrowseResponse as bC, type AdminUgcListReportsParams as bD, type AdminUgcListReportsResponse as bE, type AdminUgcResolveAction as bF, type AdminImageGenBrowseParams as bG, type AdminImageGenBrowseResponse as bH, type AdminImageGenListReportsParams as bI, type AdminImageGenListReportsResponse as bJ, type AdminImageGenResolveAction as bK, type Avatar3dApi as bL, type AssetManifest as bM, type Avatar3dConfig as bN, type ShowEditorOptions as bO, type Avatar3dEdits as bP, type AdsApi as bQ, type ImageGenParams as bR, type ImageGenResult as bS, type SharedStorageHostApi as bT, type MultiplayerApi as bU, type AttributionApi as bV, type InitializationContext as bW, type InitializationOptions as bX, type ServerRoom as bY, type ServerPlayer as bZ, type RoomEvents as b_, type GetPodiumScoresOptions as ba, type PodiumScoresResponse as bb, type PreloaderApi as bc, type SocialApi as bd, type ShareMetadata as be, type ShareLinkResult as bf, type SocialQRCodeOptions as bg, type QRCodeResult as bh, type ShareClickData as bi, type EntitlementApi as bj, type Entitlement as bk, type LedgerEntry as bl, type ShopApi as bm, type StorefrontResponse as bn, type StorefrontItem as bo, type ShopPurchaseResponse as bp, type ShopOrderHistoryResponse as bq, type PromptLoginResult as br, type AccessTier as bs, type AccessGateApi as bt, type ImageGenApi as bu, type UgcApi as bv, type VideoApi as bw, type AppApi as bx, type AdminUgcApi as by, type AdminImageGenApi as bz, type SimulationUpdateType as c, type Protocol as c0, type AiMessage as c1, type Asset as c2, type Category as c3, MockAvatarApi as c4, type SubPath as c5, type IsPlayerSubscribedRequest as c6, type RunSubscription as c7, type PurchaseSubscriptionRequest as c8, type GetSubscriptionsForTierRequest as c9, type SimulationRoomActiveRecipe as cA, type SimulationRoomState as cB, type SimulationBatchOperationAssign as cC, type SimulationBatchOperationRemove as cD, type SimulationBatchOperationResult as cE, RpcSharedAssetsApi as cF, type LoadEmbeddedAssetsRequest as cG, type LeaderboardModeConfig as cH, type LeaderboardPeriodType as cI, type LeaderboardPeriodConfig as cJ, type LeaderboardAntiCheatConfig as cK, type LeaderboardDisplaySettings as cL, type LeaderboardConfig as cM, type LeaderboardEntry as cN, type PodiumScoresContext as cO, type StorefrontCollectionItem as cP, type StorefrontCollection as cQ, type ShopOrder as cR, resolveCollectionItemPrice as cS, type HudInsets as cT, createHost as cU, AccessDeniedError as cV, type AdminUgcEntry as cW, type UgcReport as cX, type ImageGenEntry as cY, type ImageGenReport as cZ, type TimeIntervalTriggerInput as ca, type NotificationTriggerInput as cb, type OnRequestCallback as cc, type OnResponseCallback as cd, type OnNotificationCallback as ce, type RpcTransport as cf, type ImageGenModel as cg, type JoinRoomMatchCriteria as ch, type RoomMessageEventType as ci, type RoomMessagePayload as cj, type ProposedMovePayload as ck, ROOM_GAME_PHASES as cl, type RoomGamePhase as cm, type RundotGameRoomRulesGameState as cn, type RundotGameRoomRules as co, type RundotGameRoomCustomMetadata as cp, type RundotGameRoomPayload as cq, type RoomEnvelopeResponse as cr, type RoomsEnvelopeResponse as cs, type JoinOrCreateRoomEnvelopeResponse as ct, type InboundForKeyEntry as cu, type InboundStorageApi as cv, type InboundMethodIds as cw, RpcInboundStorageApi as cx, type RecipeInfo as cy, type SimulationPersonalState as cz, type SimulationEntityUpdate as d, type SimulationActiveRunsUpdate as e, type SimulationSnapshotUpdate as f, type SimulationUpdateData as g, type SimulationSubscribeOptions as h, type RundotGameSimulationEffect as i, type RundotGameSimulationRecipe as j, type RundotGameSimulationConfig as k, type RecipeRequirementQuery as l, type RundotGameExecuteRecipeOptions as m, type RundotGameExecuteScopedRecipeOptions as n, type RundotGameAvailableRecipe as o, type RundotGameCollectRecipeResult as p, type RundotGameExecuteRecipeResult as q, RundotGameRoom as r, type RpcRequest as s, type RpcResponse as t, type RpcNotification as u, RpcClient as v, type StorageApi as w, type NavigationStackInfo as x, type PushAppOptions as y, type NavigateToGameOptions as z };
|
|
@@ -87,6 +87,8 @@ var RundotGameMessageId = /* @__PURE__ */ ((RundotGameMessageId2) => {
|
|
|
87
87
|
RundotGameMessageId2["AWAKE"] = "AWAKE";
|
|
88
88
|
RundotGameMessageId2["SLEEP"] = "SLEEP";
|
|
89
89
|
RundotGameMessageId2["QUIT"] = "QUIT";
|
|
90
|
+
RundotGameMessageId2["BACK_BUTTON"] = "BACK_BUTTON";
|
|
91
|
+
RundotGameMessageId2["BACK_BUTTON_HANDLER_SET"] = "H5_BACK_BUTTON_HANDLER_SET";
|
|
90
92
|
RundotGameMessageId2["GET_EXPERIMENT"] = "H5_GET_EXPERIMENT";
|
|
91
93
|
RundotGameMessageId2["GET_FEATURE_FLAG"] = "H5_GET_FEATURE_FLAG";
|
|
92
94
|
RundotGameMessageId2["GET_FEATURE_GATE"] = "H5_GET_FEATURE_GATE";
|
|
@@ -1618,6 +1620,7 @@ var MockLifecycleApi = class {
|
|
|
1618
1620
|
awakeCallbacks = /* @__PURE__ */ new Set();
|
|
1619
1621
|
sleepCallbacks = /* @__PURE__ */ new Set();
|
|
1620
1622
|
quitCallbacks = /* @__PURE__ */ new Set();
|
|
1623
|
+
backButtonCallbacks = /* @__PURE__ */ new Set();
|
|
1621
1624
|
onSleep(callback) {
|
|
1622
1625
|
this.sleepCallbacks.add(callback);
|
|
1623
1626
|
return {
|
|
@@ -1683,11 +1686,25 @@ var MockLifecycleApi = class {
|
|
|
1683
1686
|
callback();
|
|
1684
1687
|
}
|
|
1685
1688
|
}
|
|
1689
|
+
onBackButton(callback) {
|
|
1690
|
+
this.backButtonCallbacks.add(callback);
|
|
1691
|
+
return {
|
|
1692
|
+
unsubscribe: () => {
|
|
1693
|
+
this.backButtonCallbacks.delete(callback);
|
|
1694
|
+
}
|
|
1695
|
+
};
|
|
1696
|
+
}
|
|
1697
|
+
triggerBackButtonCallbacks() {
|
|
1698
|
+
for (const callback of this.backButtonCallbacks) {
|
|
1699
|
+
callback();
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1686
1702
|
};
|
|
1687
1703
|
|
|
1688
1704
|
// src/lifecycles/RpcLifecycleApi.ts
|
|
1689
1705
|
var RpcLifecycleApi = class {
|
|
1690
1706
|
rpcClient;
|
|
1707
|
+
backButtonHandlerRegistered = false;
|
|
1691
1708
|
constructor(rpcClient) {
|
|
1692
1709
|
this.rpcClient = rpcClient;
|
|
1693
1710
|
}
|
|
@@ -1706,6 +1723,28 @@ var RpcLifecycleApi = class {
|
|
|
1706
1723
|
onPause(callback) {
|
|
1707
1724
|
return this.rpcClient.onNotification("PAUSE" /* PAUSE */, callback);
|
|
1708
1725
|
}
|
|
1726
|
+
onBackButton(callback) {
|
|
1727
|
+
const inner = this.rpcClient.onNotification(
|
|
1728
|
+
"BACK_BUTTON" /* BACK_BUTTON */,
|
|
1729
|
+
callback
|
|
1730
|
+
);
|
|
1731
|
+
if (!this.backButtonHandlerRegistered) {
|
|
1732
|
+
this.backButtonHandlerRegistered = true;
|
|
1733
|
+
this.rpcClient.call("H5_BACK_BUTTON_HANDLER_SET" /* BACK_BUTTON_HANDLER_SET */, { active: true }).catch(() => {
|
|
1734
|
+
});
|
|
1735
|
+
}
|
|
1736
|
+
let unsubscribed = false;
|
|
1737
|
+
return {
|
|
1738
|
+
unsubscribe: () => {
|
|
1739
|
+
if (unsubscribed) return;
|
|
1740
|
+
unsubscribed = true;
|
|
1741
|
+
inner.unsubscribe();
|
|
1742
|
+
this.backButtonHandlerRegistered = false;
|
|
1743
|
+
this.rpcClient.call("H5_BACK_BUTTON_HANDLER_SET" /* BACK_BUTTON_HANDLER_SET */, { active: false }).catch(() => {
|
|
1744
|
+
});
|
|
1745
|
+
}
|
|
1746
|
+
};
|
|
1747
|
+
}
|
|
1709
1748
|
};
|
|
1710
1749
|
|
|
1711
1750
|
// src/lifecycles/index.ts
|
|
@@ -5637,5 +5676,5 @@ var MockMultiplayerApi = class {
|
|
|
5637
5676
|
};
|
|
5638
5677
|
|
|
5639
5678
|
export { AccessDeniedError, BaseCdnApi, DEFAULT_SHARED_LIB_CDN_BASE, EMBEDDED_LIBRARIES, EMBEDDED_LIBRARY_BY_KEY, FILE_EXTENSION_PATTERN, HapticFeedbackStyle, HostCdnApi, HostDeviceApi, HostEnvironmentApi, HostProfileApi, HostSystemApi, HostTimeApi, MIN_CDN_PATH_SEGMENTS, MODULE_TO_LIBRARY_SPECIFIERS, MockAccessGateApi, MockAdminImageGenApi, MockAdminUgcApi, MockAdsApi, MockAnalyticsApi, MockAvatarApi, MockCdnApi, MockDebug, MockDeviceApi, MockEntitlementApi, MockEnvironmentApi, MockFeaturesApi, MockHapticsApi, MockIapApi, MockLifecycleApi, MockLoggingApi, MockMultiplayerApi, MockNavigationApi, MockNotificationsApi, MockPopupsApi, MockPreloaderApi, MockProfileApi, MockSharedAssetsApi, MockShopApi, MockStorageApi, MockSystemApi, MockTimeApi, MockVideoApi, ROOM_GAME_PHASES, RpcAccessGateApi, RpcAdsApi, RpcAnalyticsApi, RpcAvatarApi, RpcEntitlementApi, RpcFeaturesApi, RpcHapticsApi, RpcIapApi, RpcInboundStorageApi, RpcLifecycleApi, RpcLoggingApi, RpcNavigationApi, RpcNotificationsApi, RpcPopupsApi, RpcPreloaderApi, RpcRoomsApi, RpcSharedAssetsApi, RpcShopApi, RpcStorageApi, RpcVideoApi, RundotGameMessageId, RundotGameRoom, SandboxAppApi, SandboxProfileApi, WsMultiplayerApi, applyAccessGates, base64ToArrayBuffer, base64ToUtf8, buildFunctionsBaseUrl, createAccessGatedApi, createMockStorageApi, exchangeForCustomToken, generateId, getCloudRunUrl, getFirebaseClient, getLibraryDefinition, getSandboxConfig, hasHostedUrlStructure, initializeAccessGate, initializeAds, initializeAnalytics, initializeAvatar3d, initializeCdn, initializeEntitlements, initializeFeaturesApi, initializeHaptics, initializeIap, initializeLifecycleApi, initializeLocalNotifications, initializeLoggingApi, initializePopups, initializePreloader, initializeProfile, initializeRoomsApi, initializeShop, initializeStackNavigation, initializeStorage, initializeSystem, initializeTime, initializeVideo, isPacificDaylightTime, isSandboxEnabled, mockLog, observeFirestoreCollection, observeFirestoreDocument, parseCdnPathSegments, resolveCollectionItemPrice, setStoredAppRole, setupRoomNotifications, signInWithGoogle };
|
|
5640
|
-
//# sourceMappingURL=chunk-
|
|
5641
|
-
//# sourceMappingURL=chunk-
|
|
5679
|
+
//# sourceMappingURL=chunk-QEIRJ4K6.js.map
|
|
5680
|
+
//# sourceMappingURL=chunk-QEIRJ4K6.js.map
|