@dcl/js-runtime 7.27.1-33755622021.commit-da82bfb → 7.27.1-34101585995.commit-6eb5b5d

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 (2) hide show
  1. package/apis.d.ts +49 -4
  2. package/package.json +2 -2
package/apis.d.ts CHANGED
@@ -1303,7 +1303,14 @@ declare module "~system/RestrictedActions" {
1303
1303
  duration?: number | undefined;
1304
1304
  }
1305
1305
  export interface TeleportToRequest {
1306
- worldCoordinates: Vector2 | undefined;
1306
+ /** The parcel to land on. Omitted: the realm's default spawn (only meaningful with `realm`). */
1307
+ worldCoordinates?: Vector2 | undefined;
1308
+ /**
1309
+ * The realm the parcel belongs to: a world name (`foo.dcl.eth`) or a realm url. When set, the
1310
+ * client changes realm (a full reconnect, even to the realm the player is in) and lands on the
1311
+ * parcel there. Omitted: the parcel is in the player's current realm.
1312
+ */
1313
+ realm?: string | undefined;
1307
1314
  }
1308
1315
  export interface TriggerEmoteRequest {
1309
1316
  predefinedEmote: string;
@@ -1337,8 +1344,28 @@ declare module "~system/RestrictedActions" {
1337
1344
  export interface MovePlayerToResponse {
1338
1345
  success: boolean;
1339
1346
  }
1347
+ export interface WalkPlayerToRequest {
1348
+ newRelativePosition: Vector3 | undefined;
1349
+ stopThreshold: number;
1350
+ /** max seconds before the request is failed; not passed to the movement scene */
1351
+ timeout?: number | undefined;
1352
+ }
1353
+ export interface WalkPlayerToResponse {
1354
+ success: boolean;
1355
+ }
1340
1356
  export interface TeleportToResponse {
1341
1357
  }
1358
+ export interface SetUiFocusRequest {
1359
+ elementId: string;
1360
+ }
1361
+ export interface ClearUiFocusRequest {
1362
+ }
1363
+ export interface GetUiFocusRequest {
1364
+ }
1365
+ export interface UiFocusResponse {
1366
+ /** the element that is/was focussed */
1367
+ elementId?: string | undefined;
1368
+ }
1342
1369
  export interface CopyToClipboardRequest {
1343
1370
  text: string;
1344
1371
  }
@@ -1361,11 +1388,21 @@ declare module "~system/RestrictedActions" {
1361
1388
  * whole interpolation being completed or interrupted (e.g: by input movement)
1362
1389
  */
1363
1390
  export function movePlayerTo(body: MovePlayerToRequest): Promise<MovePlayerToResponse>;
1364
- /** TeleportTo will move the user to the specified world LAND parcel coordinates */
1391
+ /**
1392
+ * TeleportTo will move the user to the specified world LAND parcel coordinates
1393
+ * WalkPlayerTo will walk the player to a position relative to the current scene,
1394
+ * managed by the movement controller scene. Returns success when the player reaches
1395
+ * within stop_threshold distance, or false if the path is blocked, the player gets
1396
+ * stuck, the player interrupts the walk with manual input, or the optional timeout expires.
1397
+ */
1398
+ export function walkPlayerTo(body: WalkPlayerToRequest): Promise<WalkPlayerToResponse>;
1365
1399
  export function teleportTo(body: TeleportToRequest): Promise<TeleportToResponse>;
1366
1400
  /** TriggerEmote will trigger an emote in this current user */
1367
1401
  export function triggerEmote(body: TriggerEmoteRequest): Promise<TriggerEmoteResponse>;
1368
- /** ChangeRealm prompts the user to change to a specific realm */
1402
+ /**
1403
+ * @deprecated, use TeleportTo with `realm` (and no `world_coordinates` for the realm's default spawn)
1404
+ * ChangeRealm prompts the user to change to a specific realm
1405
+ */
1369
1406
  export function changeRealm(body: ChangeRealmRequest): Promise<SuccessResponse>;
1370
1407
  /** OpenExternalUrl prompts the user to open an external link */
1371
1408
  export function openExternalUrl(body: OpenExternalUrlRequest): Promise<SuccessResponse>;
@@ -1378,7 +1415,15 @@ declare module "~system/RestrictedActions" {
1378
1415
  export function setCommunicationsAdapter(body: CommsAdapterRequest): Promise<SuccessResponse>;
1379
1416
  /** TriggerSceneEmote will trigger an scene emote file in this current user */
1380
1417
  export function triggerSceneEmote(body: TriggerSceneEmoteRequest): Promise<SuccessResponse>;
1381
- /** CopyToClipboard copies the provided text into the clipboard */
1418
+ /**
1419
+ * CopyToClipboard copies the provided text into the clipboard
1420
+ * Sets the focus to a specific UI element
1421
+ */
1422
+ export function setUiFocus(body: SetUiFocusRequest): Promise<UiFocusResponse>;
1423
+ /** Clears the focus from any currently focused textentry or dropdown */
1424
+ export function clearUiFocus(body: ClearUiFocusRequest): Promise<UiFocusResponse>;
1425
+ /** Returns the element_id of any currently focused textentry or dropdown */
1426
+ export function getUiFocus(body: GetUiFocusRequest): Promise<UiFocusResponse>;
1382
1427
  export function copyToClipboard(body: CopyToClipboardRequest): Promise<EmptyResponse>;
1383
1428
  /** StopEmote will stop the current emote */
1384
1429
  export function stopEmote(body: StopEmoteRequest): Promise<SuccessResponse>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcl/js-runtime",
3
3
  "description": "JavaScript runtime definitions for Decentraland environments",
4
- "version": "7.27.1-33755622021.commit-da82bfb",
4
+ "version": "7.27.1-34101585995.commit-6eb5b5d",
5
5
  "author": "",
6
6
  "files": [
7
7
  "index.d.ts",
@@ -20,5 +20,5 @@
20
20
  },
21
21
  "types": "./index.d.ts",
22
22
  "typings": "./index.d.ts",
23
- "commit": "da82bfb0c7b437a9410e353b085ed08ad81aeff4"
23
+ "commit": "6eb5b5d604be23e8b88950e2cca42f787b44c700"
24
24
  }