@dcl/playground-assets 7.29.1-36863326504.commit-aa54c50 → 7.30.0

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.
@@ -1285,7 +1285,7 @@ declare module "~system/RestrictedActions" {
1285
1285
  export enum OpenExplorerUiResult {
1286
1286
  UNSPECIFIED = 0,
1287
1287
  OPENED = 1,
1288
- /** WAS_ALREADY_OPEN - a fullscreen panel is already open */
1288
+ /** WAS_ALREADY_OPEN - the slot the requested panel occupies is already in use; panels sharing a slot exclude each other */
1289
1289
  WAS_ALREADY_OPEN = 2,
1290
1290
  /** REJECTED_NOT_CURRENT_SCENE - the standard restricted-actions current-scene gate rejected the call */
1291
1291
  REJECTED_NOT_CURRENT_SCENE = 3,
@@ -1355,6 +1355,15 @@ declare module "~system/RestrictedActions" {
1355
1355
  }
1356
1356
  export interface OpenExplorerUiRequest {
1357
1357
  ui: import('../ecs').ExplorerUi;
1358
+ /**
1359
+ * Echoed back in the events this request produces, so they can be matched to their call.
1360
+ * Unset means no correlation, and 0 is reserved for the same meaning on the result, so ids start at 1.
1361
+ */
1362
+ requestId?: number | undefined;
1363
+ itemPurchase?: OpenExplorerUiRequest_ItemPurchaseParams | undefined;
1364
+ }
1365
+ export interface OpenExplorerUiRequest_ItemPurchaseParams {
1366
+ urn: string;
1358
1367
  }
1359
1368
  export interface OpenExplorerUiResponse {
1360
1369
  /** Carries only the verdict of the open action. */
@@ -1392,7 +1401,7 @@ declare module "~system/RestrictedActions" {
1392
1401
  export function copyToClipboard(body: CopyToClipboardRequest): Promise<EmptyResponse>;
1393
1402
  /** StopEmote will stop the current emote */
1394
1403
  export function stopEmote(body: StopEmoteRequest): Promise<SuccessResponse>;
1395
- /** OpenExplorerUi opens a specific fullscreen explorer panel and returns the open verdict. */
1404
+ /** OpenExplorerUi opens an explorer panel, fullscreen or modal, and returns the open verdict. */
1396
1405
  export function openExplorerUi(body: OpenExplorerUiRequest): Promise<OpenExplorerUiResponse>;
1397
1406
 
1398
1407
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcl/sdk",
3
3
  "description": "",
4
- "version": "7.29.1-36863326504.commit-aa54c50",
4
+ "version": "7.30.0",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
7
  "@dcl/ecs": "file:../ecs",
@@ -33,5 +33,5 @@
33
33
  },
34
34
  "types": "./index.d.ts",
35
35
  "typings": "./index.d.ts",
36
- "commit": "aa54c508d64b518bf772287608b3de1c409be04f"
36
+ "commit": "ab46c8191eddd44d23a8e01bdf5fc7d7b7141986"
37
37
  }
@@ -245,42 +245,6 @@ export declare interface AudioStreamComponentDefinitionExtended extends LastWrit
245
245
  getAudioState(entity: Entity): PBAudioEvent | undefined;
246
246
  }
247
247
 
248
- /**
249
- * @public
250
- */
251
- export declare type AuthoritativePutComponentMessage = CrdtMessageHeader & AuthoritativePutComponentMessageBody;
252
-
253
- /**
254
- * Server authoritative message - identical to PutComponentMessageBody but with forced processing
255
- * Min. length = header (8 bytes) + 16 bytes = 24 bytes
256
- *
257
- * @param entity - Uint32 number of the entity
258
- * @param componentId - Uint32 number of id
259
- * @param timestamp - Uint32 Lamport timestamp (server's authoritative timestamp)
260
- * @param data - Uint8[] data of component => length(4 bytes) + block of bytes[0..length-1]
261
- * @public
262
- */
263
- export declare type AuthoritativePutComponentMessageBody = {
264
- type: CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT;
265
- entityId: Entity;
266
- componentId: number;
267
- timestamp: number;
268
- data: Uint8Array;
269
- };
270
-
271
- /**
272
- * @public
273
- */
274
- export declare namespace AuthoritativePutComponentOperation {
275
- const MESSAGE_HEADER_LENGTH = 16;
276
- /**
277
- * Call this function for an optimal writing data passing the ByteBuffer
278
- * already allocated
279
- */
280
- export function write(entity: Entity, timestamp: number, componentId: number, data: Uint8Array, buf: ByteBuffer): void;
281
- export function read(buf: ByteBuffer): AuthoritativePutComponentMessage | null;
282
- }
283
-
284
248
  /** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */
285
249
  /**
286
250
  * @public
@@ -456,22 +420,6 @@ export declare interface BaseComponent<T> {
456
420
  * If the value is undefined, the component was deleted.
457
421
  */
458
422
  onChange(entity: Entity, cb: (value: T | undefined) => void): void;
459
- /**
460
- * @public
461
- *
462
- */
463
- validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
464
- validateBeforeChange(cb: ValidateCallback<T>): void;
465
- /**
466
- * Get the CRDT state for an entity (serialized data and timestamp)
467
- * @param entity - Entity to get the CRDT state for
468
- * @returns Object with serialized data and timestamp, or null if entity doesn't have the component
469
- * @public
470
- */
471
- getCrdtState(entity: Entity): {
472
- data: Uint8Array;
473
- timestamp: number;
474
- } | null;
475
423
  }
476
424
 
477
425
  /** @public */
@@ -1505,6 +1453,7 @@ export declare const componentDefinitionByName: {
1505
1453
  "core::CameraMode": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraMode>>;
1506
1454
  "core::CameraModeArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraModeArea>>;
1507
1455
  "core::EngineInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEngineInfo>>;
1456
+ "core::ExplorerItemPurchaseResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBExplorerItemPurchaseResult>>;
1508
1457
  "core::ExplorerUiEventsResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBExplorerUiEventsResult>>;
1509
1458
  "core::GltfContainer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
1510
1459
  "core::GltfContainerLoadingState": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
@@ -1714,12 +1663,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
1714
1663
  /**
1715
1664
  * @public
1716
1665
  */
1717
- export declare type CrdtMessage = PutComponentMessage | AuthoritativePutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
1666
+ export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
1718
1667
 
1719
1668
  /**
1720
1669
  * @public
1721
1670
  */
1722
- export declare type CrdtMessageBody = PutComponentMessageBody | AuthoritativePutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
1671
+ export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
1723
1672
 
1724
1673
  /**
1725
1674
  * Min length = 8 bytes
@@ -1774,8 +1723,7 @@ export declare enum CrdtMessageType {
1774
1723
  PUT_COMPONENT_NETWORK = 5,
1775
1724
  DELETE_COMPONENT_NETWORK = 6,
1776
1725
  DELETE_ENTITY_NETWORK = 7,
1777
- AUTHORITATIVE_PUT_COMPONENT = 8,
1778
- MAX_MESSAGE_TYPE = 9
1726
+ MAX_MESSAGE_TYPE = 8
1779
1727
  }
1780
1728
 
1781
1729
  /**
@@ -1783,8 +1731,6 @@ export declare enum CrdtMessageType {
1783
1731
  */
1784
1732
  export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
1785
1733
 
1786
- export declare const CreatedBy: ICreatedBy;
1787
-
1788
1734
  /**
1789
1735
  * @public
1790
1736
  */
@@ -2261,8 +2207,11 @@ export declare type ExcludeUndefined<T> = {
2261
2207
  */
2262
2208
  export declare const executeTask: (task: Task<unknown>) => void;
2263
2209
 
2210
+ /** @public */
2211
+ export declare const ExplorerItemPurchaseResult: GrowOnlyValueSetComponentDefinition<PBExplorerItemPurchaseResult>;
2212
+
2264
2213
  /**
2265
- * Identifies which fullscreen explorer panel OpenExplorerUi targets.
2214
+ * Identifies which explorer panel OpenExplorerUi targets. Panels are not all fullscreen.
2266
2215
  * EU_SETTINGS holds 0 so an unset `ui` field defaults to the least-intrusive panel.
2267
2216
  */
2268
2217
  /**
@@ -2275,7 +2224,9 @@ export declare const enum ExplorerUi {
2275
2224
  EU_CAMERA_REEL = 3,
2276
2225
  EU_COMMUNITIES = 4,
2277
2226
  EU_PLACES = 5,
2278
- EU_EVENTS = 6
2227
+ EU_EVENTS = 6,
2228
+ /** EU_ITEM_PURCHASE - the item-purchase confirmation modal; see OpenExplorerUi for its parameters and result component */
2229
+ EU_ITEM_PURCHASE = 7
2279
2230
  }
2280
2231
 
2281
2232
  /** @public */
@@ -2556,12 +2507,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
2556
2507
 
2557
2508
  export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
2558
2509
 
2559
- export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
2560
-
2561
- export declare interface ICreatedByType {
2562
- address: string;
2563
- }
2564
-
2565
2510
  /**
2566
2511
  * @public
2567
2512
  */
@@ -3048,35 +2993,6 @@ export declare const enum InteractionType {
3048
2993
  PROXIMITY = 1
3049
2994
  }
3050
2995
 
3051
- /**
3052
- * Internal component interface that exposes all internal methods for SDK use
3053
- * This is not exposed to users, only for internal SDK operations
3054
- */
3055
- export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
3056
- /**
3057
- * @public
3058
- * Dry run update to check if a CRDT message would be accepted without actually applying it
3059
- */
3060
- __dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
3061
- /**
3062
- * @public
3063
- * Get the iterator to every entity has the component
3064
- */
3065
- iterator(): Iterable<[Entity, any]>;
3066
- /**
3067
- * @public
3068
- */
3069
- dirtyIterator(): Iterable<Entity>;
3070
- /**
3071
- * @public
3072
- */
3073
- __onChangeCallbacks(entity: Entity, value: T): void;
3074
- /**
3075
- * @public
3076
- */
3077
- __run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
3078
- }
3079
-
3080
2996
  /**
3081
2997
  * @public
3082
2998
  */
@@ -5364,7 +5280,82 @@ export declare namespace PBEngineInfo {
5364
5280
  }
5365
5281
 
5366
5282
  /**
5367
- * PBExplorerUiEventsResult transports the lifecycle events of fullscreen explorer panels — a panel was
5283
+ * Grow-only value set appended to the scene root entity.
5284
+ * Reports the outcome of an EU_ITEM_PURCHASE flow triggered via OpenExplorerUi.
5285
+ */
5286
+ /**
5287
+ * @public
5288
+ */
5289
+ export declare interface PBExplorerItemPurchaseResult {
5290
+ urn: string;
5291
+ /** The scene tick when the event occurred */
5292
+ timestamp: number;
5293
+ /** The OpenExplorerUiRequest.request_id that caused this event; 0 when the request carried none */
5294
+ requestId: number;
5295
+ status?: {
5296
+ $case: "purchased";
5297
+ purchased: PBExplorerItemPurchaseResult_Purchased;
5298
+ } | {
5299
+ $case: "dismissed";
5300
+ dismissed: PBExplorerItemPurchaseResult_Dismissed;
5301
+ } | {
5302
+ $case: "failed";
5303
+ failed: PBExplorerItemPurchaseResult_Failed;
5304
+ } | undefined;
5305
+ }
5306
+
5307
+ /**
5308
+ * @public
5309
+ */
5310
+ export declare namespace PBExplorerItemPurchaseResult {
5311
+ export function encode(message: PBExplorerItemPurchaseResult, writer?: _m0.Writer): _m0.Writer;
5312
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBExplorerItemPurchaseResult;
5313
+ }
5314
+
5315
+ /**
5316
+ * @public
5317
+ */
5318
+ export declare interface PBExplorerItemPurchaseResult_Dismissed {
5319
+ }
5320
+
5321
+ /**
5322
+ * @public
5323
+ */
5324
+ export declare namespace PBExplorerItemPurchaseResult_Dismissed {
5325
+ export function encode(_: PBExplorerItemPurchaseResult_Dismissed, writer?: _m0.Writer): _m0.Writer;
5326
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBExplorerItemPurchaseResult_Dismissed;
5327
+ }
5328
+
5329
+ /**
5330
+ * @public
5331
+ */
5332
+ export declare interface PBExplorerItemPurchaseResult_Failed {
5333
+ }
5334
+
5335
+ /**
5336
+ * @public
5337
+ */
5338
+ export declare namespace PBExplorerItemPurchaseResult_Failed {
5339
+ export function encode(_: PBExplorerItemPurchaseResult_Failed, writer?: _m0.Writer): _m0.Writer;
5340
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBExplorerItemPurchaseResult_Failed;
5341
+ }
5342
+
5343
+ /**
5344
+ * @public
5345
+ */
5346
+ export declare interface PBExplorerItemPurchaseResult_Purchased {
5347
+ }
5348
+
5349
+ /**
5350
+ * @public
5351
+ */
5352
+ export declare namespace PBExplorerItemPurchaseResult_Purchased {
5353
+ export function encode(_: PBExplorerItemPurchaseResult_Purchased, writer?: _m0.Writer): _m0.Writer;
5354
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBExplorerItemPurchaseResult_Purchased;
5355
+ }
5356
+
5357
+ /**
5358
+ * PBExplorerUiEventsResult transports the lifecycle events of explorer UI panels — a panel was
5368
5359
  * opened, a panel was closed. It is a grow only value set appended to the scene root entity, so every
5369
5360
  * event of a tick is delivered and none overwrites another.
5370
5361
  */
@@ -5376,6 +5367,8 @@ export declare interface PBExplorerUiEventsResult {
5376
5367
  ui: ExplorerUi;
5377
5368
  /** The scene tick when the event occurred */
5378
5369
  timestamp: number;
5370
+ /** The OpenExplorerUiRequest.request_id that caused this event; 0 when the request carried none */
5371
+ requestId: number;
5379
5372
  event?: {
5380
5373
  $case: "opened";
5381
5374
  opened: PBExplorerUiEventsResult_UiOpened;
@@ -5393,7 +5386,7 @@ export declare namespace PBExplorerUiEventsResult {
5393
5386
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBExplorerUiEventsResult;
5394
5387
  }
5395
5388
 
5396
- /** Emitted when a fullscreen explorer panel is closed. */
5389
+ /** Emitted when an explorer panel is closed. */
5397
5390
  /**
5398
5391
  * @public
5399
5392
  */
@@ -5408,7 +5401,10 @@ export declare namespace PBExplorerUiEventsResult_UiClosed {
5408
5401
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBExplorerUiEventsResult_UiClosed;
5409
5402
  }
5410
5403
 
5411
- /** Emitted when a fullscreen explorer panel is opened. */
5404
+ /**
5405
+ * Emitted when an explorer panel is opened. The OpenExplorerUi response carries the same fact,
5406
+ * but it reaches only the caller; this channel is scene wide.
5407
+ */
5412
5408
  /**
5413
5409
  * @public
5414
5410
  */
@@ -9537,16 +9533,6 @@ export declare type Transport = {
9537
9533
  onmessage?(message: Uint8Array): void;
9538
9534
  filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
9539
9535
  type?: string;
9540
- /**
9541
- * Whether this transport is allowed to mutate reserved-range entities
9542
- * (root/player/camera + avatars, entity number below `RESERVED_STATIC_ENTITIES`).
9543
- * Only the trusted host/renderer transport sets this. An inbound DELETE_ENTITY
9544
- * or component operation (PUT_COMPONENT, DELETE_COMPONENT, APPEND_VALUE,
9545
- * AUTHORITATIVE_PUT_COMPONENT) on a reserved entity from a transport without
9546
- * this flag (a comms peer, or any scene-added transport) is rejected — see
9547
- * `receiveMessages`.
9548
- */
9549
- allowReservedEntities?: boolean;
9550
9536
  };
9551
9537
 
9552
9538
  /**
@@ -10126,14 +10112,6 @@ export declare interface UiTransformProps {
10126
10112
  */
10127
10113
  export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
10128
10114
 
10129
- export declare type ValidateCallback<T> = (value: {
10130
- entity: Entity;
10131
- currentValue: T | undefined;
10132
- newValue: T | undefined;
10133
- senderAddress: string;
10134
- createdBy: string;
10135
- }) => boolean;
10136
-
10137
10115
  /**
10138
10116
  * @public
10139
10117
  */
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.59.3"
8
+ "packageVersion": "7.59.4"
9
9
  }
10
10
  ]
11
11
  }