@dcl/playground-assets 7.24.3 → 7.24.4-28592331167.commit-697ce9e

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.
@@ -119,6 +119,29 @@ export interface AudioStreamComponentDefinitionExtended extends LastWriteWinElem
119
119
  getAudioState(entity: Entity): PBAudioEvent | undefined;
120
120
  }
121
121
 
122
+ // @public (undocumented)
123
+ export type AuthoritativePutComponentMessage = CrdtMessageHeader & AuthoritativePutComponentMessageBody;
124
+
125
+ // Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
126
+ //
127
+ // @public
128
+ export type AuthoritativePutComponentMessageBody = {
129
+ type: CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT;
130
+ entityId: Entity;
131
+ componentId: number;
132
+ timestamp: number;
133
+ data: Uint8Array;
134
+ };
135
+
136
+ // @public (undocumented)
137
+ export namespace AuthoritativePutComponentOperation {
138
+ const // (undocumented)
139
+ MESSAGE_HEADER_LENGTH = 16;
140
+ // (undocumented)
141
+ export function read(buf: ByteBuffer): AuthoritativePutComponentMessage | null;
142
+ export function write(entity: Entity, timestamp: number, componentId: number, data: Uint8Array, buf: ByteBuffer): void;
143
+ }
144
+
122
145
  // @public (undocumented)
123
146
  export const enum AvatarAnchorPointType {
124
147
  // (undocumented)
@@ -236,12 +259,20 @@ export interface BaseComponent<T> {
236
259
  dumpCrdtStateToBuffer(buffer: ByteBuffer, filterEntity?: (entity: Entity) => boolean): void;
237
260
  entityDeleted(entity: Entity, markAsDirty: boolean): void;
238
261
  get(entity: Entity): any;
262
+ getCrdtState(entity: Entity): {
263
+ data: Uint8Array;
264
+ timestamp: number;
265
+ } | null;
239
266
  getCrdtUpdates(): Iterable<CrdtMessageBody>;
240
267
  has(entity: Entity): boolean;
241
268
  onChange(entity: Entity, cb: (value: T | undefined) => void): void;
242
269
  // (undocumented)
243
270
  readonly schema: ISchema<T>;
244
271
  updateFromCrdt(body: CrdtMessageBody): [null | ConflictResolutionMessage, T | undefined];
272
+ // (undocumented)
273
+ validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
274
+ // (undocumented)
275
+ validateBeforeChange(cb: ValidateCallback<T>): void;
245
276
  }
246
277
 
247
278
  // @public (undocumented)
@@ -877,10 +908,10 @@ export type Coords = {
877
908
  export const CRDT_MESSAGE_HEADER_LENGTH = 8;
878
909
 
879
910
  // @public (undocumented)
880
- export type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
911
+ export type CrdtMessage = PutComponentMessage | AuthoritativePutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
881
912
 
882
913
  // @public (undocumented)
883
- export type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
914
+ export type CrdtMessageBody = PutComponentMessageBody | AuthoritativePutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
884
915
 
885
916
  // @public
886
917
  export type CrdtMessageHeader = {
@@ -901,6 +932,8 @@ export enum CrdtMessageType {
901
932
  // (undocumented)
902
933
  APPEND_VALUE = 4,
903
934
  // (undocumented)
935
+ AUTHORITATIVE_PUT_COMPONENT = 8,
936
+ // (undocumented)
904
937
  DELETE_COMPONENT = 2,
905
938
  // (undocumented)
906
939
  DELETE_COMPONENT_NETWORK = 6,
@@ -909,7 +942,7 @@ export enum CrdtMessageType {
909
942
  // (undocumented)
910
943
  DELETE_ENTITY_NETWORK = 7,
911
944
  // (undocumented)
912
- MAX_MESSAGE_TYPE = 8,
945
+ MAX_MESSAGE_TYPE = 9,
913
946
  // (undocumented)
914
947
  PUT_COMPONENT = 1,
915
948
  // (undocumented)
@@ -921,6 +954,11 @@ export enum CrdtMessageType {
921
954
  // @public (undocumented)
922
955
  export type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
923
956
 
957
+ // Warning: (ae-missing-release-tag) "CreatedBy" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
958
+ //
959
+ // @public (undocumented)
960
+ export const CreatedBy: ICreatedBy;
961
+
924
962
  // @public (undocumented)
925
963
  export function createEntityContainer(opts?: {
926
964
  reservedStaticEntities: number;
@@ -1379,6 +1417,19 @@ export interface GrowOnlyValueSetComponentDefinition<T> extends BaseComponent<T>
1379
1417
  // @public (undocumented)
1380
1418
  export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
1381
1419
 
1420
+ // Warning: (ae-missing-release-tag) "ICreatedBy" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
1421
+ //
1422
+ // @public (undocumented)
1423
+ export type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
1424
+
1425
+ // Warning: (ae-missing-release-tag) "ICreatedByType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
1426
+ //
1427
+ // @public (undocumented)
1428
+ export interface ICreatedByType {
1429
+ // (undocumented)
1430
+ address: string;
1431
+ }
1432
+
1382
1433
  // @public (undocumented)
1383
1434
  export interface IEngine {
1384
1435
  addEntity(): Entity;
@@ -1627,6 +1678,20 @@ export const enum InteractionType {
1627
1678
  PROXIMITY = 1
1628
1679
  }
1629
1680
 
1681
+ // Warning: (ae-missing-release-tag) "InternalBaseComponent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
1682
+ //
1683
+ // @public
1684
+ export interface InternalBaseComponent<T> extends BaseComponent<T> {
1685
+ __dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
1686
+ // (undocumented)
1687
+ __onChangeCallbacks(entity: Entity, value: T): void;
1688
+ // (undocumented)
1689
+ __run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
1690
+ // (undocumented)
1691
+ dirtyIterator(): Iterable<Entity>;
1692
+ iterator(): Iterable<[Entity, any]>;
1693
+ }
1694
+
1630
1695
  // @public (undocumented)
1631
1696
  export interface ISchema<T = any> {
1632
1697
  // (undocumented)
@@ -5378,6 +5443,17 @@ export interface UiTransformProps {
5378
5443
  // @public (undocumented)
5379
5444
  export type Unpacked<T> = T extends (infer U)[] ? U : T;
5380
5445
 
5446
+ // Warning: (ae-missing-release-tag) "ValidateCallback" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
5447
+ //
5448
+ // @public (undocumented)
5449
+ export type ValidateCallback<T> = (value: {
5450
+ entity: Entity;
5451
+ currentValue: T | undefined;
5452
+ newValue: T | undefined;
5453
+ senderAddress: string;
5454
+ createdBy: string;
5455
+ }) => boolean;
5456
+
5381
5457
  // @public (undocumented)
5382
5458
  export type ValueSetOptions<T> = {
5383
5459
  timestampFunction: (value: DeepReadonly<T>) => number;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@dcl/playground-assets",
3
3
  "description": "",
4
- "version": "7.24.3",
4
+ "version": "7.24.4-28592331167.commit-697ce9e",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
- "@dcl/js-runtime": "7.24.3",
8
- "@dcl/sdk": "7.24.3"
7
+ "@dcl/js-runtime": "7.24.4-28592331167.commit-697ce9e",
8
+ "@dcl/sdk": "7.24.4-28592331167.commit-697ce9e"
9
9
  },
10
10
  "devDependencies": {
11
11
  "@microsoft/api-extractor": "^7.33.8"
@@ -25,12 +25,13 @@
25
25
  "scripts": {
26
26
  "build": "npm run build-playground && node_modules/.bin/api-extractor run",
27
27
  "build-local": "npm run build-playground && node_modules/.bin/api-extractor run --local --verbose --diagnostics",
28
- "build-playground": "./../sdk-commands/dist/index.js build --production --emitDeclaration --customEntryPoint"
28
+ "build-playground": "./../sdk-commands/dist/index.js build --production --emitDeclaration --customEntryPoint",
29
+ "server-logs": "sdk-commands sdk-server-logs"
29
30
  },
30
31
  "tsdoc": {
31
32
  "tsdocFlavor": "AEDoc"
32
33
  },
33
34
  "types": "./dist/index.d.ts",
34
35
  "typings": "./dist/index.d.ts",
35
- "commit": "3df0a22399b70665da37e40712b3eb22d5f7a193"
36
+ "commit": "697ce9e4c717549d30c0a0bc927a173df5d0febf"
36
37
  }