@series-inc/venus-sdk 3.4.2 → 3.4.3-beta.1
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-ihIIoDSK.d.ts → AdsApi-Dt9Yx0qb.d.ts} +30 -2
- package/dist/SandboxHost-PG4SXT3M.js +1880 -0
- package/dist/SandboxHost-PG4SXT3M.js.map +1 -0
- package/dist/chunk-MQ4UC45P.js +1890 -0
- package/dist/chunk-MQ4UC45P.js.map +1 -0
- package/dist/{chunk-W74ZI2H3.js → chunk-Q7SNANYR.js} +67 -1872
- package/dist/chunk-Q7SNANYR.js.map +1 -0
- package/dist/index.d.ts +31 -4
- package/dist/index.js +2 -1
- package/dist/venus-api/index.d.ts +2 -2
- package/dist/venus-api/index.js +44 -29
- package/dist/venus-api/index.js.map +1 -1
- package/dist/vite/index.css +19 -0
- package/dist/vite/index.css.map +1 -0
- package/dist/vite/index.d.ts +100 -1
- package/dist/vite/index.js +1165 -3
- package/dist/vite/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-W74ZI2H3.js.map +0 -1
|
@@ -65,6 +65,7 @@ interface StorageApi {
|
|
|
65
65
|
clear(): Promise<void>;
|
|
66
66
|
length(): Promise<number>;
|
|
67
67
|
getAllItems(): Promise<string[]>;
|
|
68
|
+
getAllData(): Promise<Record<string, string>>;
|
|
68
69
|
setMultipleItems(items: {
|
|
69
70
|
key: string;
|
|
70
71
|
value: string;
|
|
@@ -444,7 +445,7 @@ interface GetBatchRecipeRequirements {
|
|
|
444
445
|
results: RecipeRequirementResult[];
|
|
445
446
|
}
|
|
446
447
|
interface SimulationPersonalState {
|
|
447
|
-
|
|
448
|
+
entities: Record<string, number | string>;
|
|
448
449
|
activeRuns: SimulationRunSummary[];
|
|
449
450
|
disabledRecipes: string[];
|
|
450
451
|
}
|
|
@@ -754,6 +755,9 @@ interface RoomsApi {
|
|
|
754
755
|
getRoomDataAsync(room: VenusRoom): Promise<Record<string, unknown>>;
|
|
755
756
|
sendRoomMessageAsync(room: VenusRoom, message: RoomMessageRequest): Promise<string>;
|
|
756
757
|
leaveRoomAsync(room: VenusRoom): Promise<void>;
|
|
758
|
+
kickPlayerAsync(room: VenusRoom, targetProfileId: string, options?: {
|
|
759
|
+
reason?: string;
|
|
760
|
+
}): Promise<void>;
|
|
757
761
|
startRoomGameAsync(room: VenusRoom, options?: StartRoomGameOptions): Promise<void>;
|
|
758
762
|
proposeMoveAsync(room: VenusRoom, request: ProposeMoveRequest): Promise<ProposeMoveResult>;
|
|
759
763
|
validateMoveAsync(room: VenusRoom, moveId: string, verdict: ValidateMoveVerdict): Promise<ValidateMoveResult>;
|
|
@@ -1143,7 +1147,31 @@ interface Host {
|
|
|
1143
1147
|
readonly context?: InitializationContext;
|
|
1144
1148
|
initialize(options?: InitializationOptions): Promise<InitializationContext>;
|
|
1145
1149
|
}
|
|
1146
|
-
|
|
1150
|
+
/**
|
|
1151
|
+
* Create a Host instance based on the runtime environment.
|
|
1152
|
+
*
|
|
1153
|
+
* ## Why SandboxHost uses dynamic import
|
|
1154
|
+
*
|
|
1155
|
+
* SandboxHost depends on Firebase (~200KB+ gzipped) for authentication and
|
|
1156
|
+
* Firestore. This is ONLY needed during local development when using the
|
|
1157
|
+
* Venus sandbox mode (connecting to real Firebase backend via Vite dev server).
|
|
1158
|
+
*
|
|
1159
|
+
* In production builds (H5 games deployed to Venus app):
|
|
1160
|
+
* - `window.__VENUS_SANDBOX__` is never set (Vite plugin only runs in dev)
|
|
1161
|
+
* - `isSandboxEnabled()` returns false
|
|
1162
|
+
* - SandboxHost is never instantiated
|
|
1163
|
+
*
|
|
1164
|
+
* Using a static import like `import { SandboxHost } from './SandboxHost.ts'`
|
|
1165
|
+
* would cause Rollup/Vite to bundle SandboxHost AND all its dependencies
|
|
1166
|
+
* (including Firebase) into the production bundle, even though they're unused.
|
|
1167
|
+
*
|
|
1168
|
+
* Dynamic import (`await import('./SandboxHost.ts')`) tells the bundler to
|
|
1169
|
+
* code-split SandboxHost into a separate chunk that's only loaded at runtime
|
|
1170
|
+
* when the condition is true. In production, this chunk is never loaded.
|
|
1171
|
+
*
|
|
1172
|
+
* This keeps production bundles small (~200KB+ smaller) and faster to load.
|
|
1173
|
+
*/
|
|
1174
|
+
declare function createHost(venusApi: VenusAPI, isMock: boolean): Promise<Host>;
|
|
1147
1175
|
|
|
1148
1176
|
interface Avatar3dConfig {
|
|
1149
1177
|
headAsset: string | null;
|