@dcl/playground-assets 7.30.1 → 7.30.2-37807847179.commit-24c42ea

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.
@@ -136,6 +136,29 @@ export interface AudioStreamComponentDefinitionExtended extends LastWriteWinElem
136
136
  getAudioState(entity: Entity): PBAudioEvent | undefined;
137
137
  }
138
138
 
139
+ // @public (undocumented)
140
+ export type AuthoritativePutComponentMessage = CrdtMessageHeader & AuthoritativePutComponentMessageBody;
141
+
142
+ // Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
143
+ //
144
+ // @public
145
+ export type AuthoritativePutComponentMessageBody = {
146
+ type: CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT;
147
+ entityId: Entity;
148
+ componentId: number;
149
+ timestamp: number;
150
+ data: Uint8Array;
151
+ };
152
+
153
+ // @public (undocumented)
154
+ export namespace AuthoritativePutComponentOperation {
155
+ const // (undocumented)
156
+ MESSAGE_HEADER_LENGTH = 16;
157
+ // (undocumented)
158
+ export function read(buf: ByteBuffer): AuthoritativePutComponentMessage | null;
159
+ export function write(entity: Entity, timestamp: number, componentId: number, data: Uint8Array, buf: ByteBuffer): void;
160
+ }
161
+
139
162
  // @public (undocumented)
140
163
  export const enum AvatarAnchorPointType {
141
164
  // (undocumented)
@@ -263,12 +286,20 @@ export interface BaseComponent<T> {
263
286
  dumpCrdtStateToBuffer(buffer: ByteBuffer, filterEntity?: (entity: Entity) => boolean): void;
264
287
  entityDeleted(entity: Entity, markAsDirty: boolean): void;
265
288
  get(entity: Entity): any;
289
+ getCrdtState(entity: Entity): {
290
+ data: Uint8Array;
291
+ timestamp: number;
292
+ } | null;
266
293
  getCrdtUpdates(): Iterable<CrdtMessageBody>;
267
294
  has(entity: Entity): boolean;
268
295
  onChange(entity: Entity, cb: (value: T | undefined) => void): void;
269
296
  // (undocumented)
270
297
  readonly schema: ISchema<T>;
271
298
  updateFromCrdt(body: CrdtMessageBody): [null | ConflictResolutionMessage, T | undefined];
299
+ // (undocumented)
300
+ validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
301
+ // (undocumented)
302
+ validateBeforeChange(cb: ValidateCallback<T>): void;
272
303
  }
273
304
 
274
305
  // @public (undocumented)
@@ -909,10 +940,10 @@ export type Coords = {
909
940
  export const CRDT_MESSAGE_HEADER_LENGTH = 8;
910
941
 
911
942
  // @public (undocumented)
912
- export type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
943
+ export type CrdtMessage = PutComponentMessage | AuthoritativePutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
913
944
 
914
945
  // @public (undocumented)
915
- export type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
946
+ export type CrdtMessageBody = PutComponentMessageBody | AuthoritativePutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
916
947
 
917
948
  // @public
918
949
  export type CrdtMessageHeader = {
@@ -933,6 +964,8 @@ export enum CrdtMessageType {
933
964
  // (undocumented)
934
965
  APPEND_VALUE = 4,
935
966
  // (undocumented)
967
+ AUTHORITATIVE_PUT_COMPONENT = 8,
968
+ // (undocumented)
936
969
  DELETE_COMPONENT = 2,
937
970
  // (undocumented)
938
971
  DELETE_COMPONENT_NETWORK = 6,
@@ -941,7 +974,7 @@ export enum CrdtMessageType {
941
974
  // (undocumented)
942
975
  DELETE_ENTITY_NETWORK = 7,
943
976
  // (undocumented)
944
- MAX_MESSAGE_TYPE = 8,
977
+ MAX_MESSAGE_TYPE = 9,
945
978
  // (undocumented)
946
979
  PUT_COMPONENT = 1,
947
980
  // (undocumented)
@@ -953,6 +986,11 @@ export enum CrdtMessageType {
953
986
  // @public (undocumented)
954
987
  export type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
955
988
 
989
+ // 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)
990
+ //
991
+ // @public (undocumented)
992
+ export const CreatedBy: ICreatedBy;
993
+
956
994
  // @public (undocumented)
957
995
  export function createEntityContainer(opts?: {
958
996
  reservedStaticEntities: number;
@@ -1446,6 +1484,19 @@ export interface GrowOnlyValueSetComponentDefinition<T> extends BaseComponent<T>
1446
1484
  // @public (undocumented)
1447
1485
  export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
1448
1486
 
1487
+ // 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)
1488
+ //
1489
+ // @public (undocumented)
1490
+ export type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
1491
+
1492
+ // 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)
1493
+ //
1494
+ // @public (undocumented)
1495
+ export interface ICreatedByType {
1496
+ // (undocumented)
1497
+ address: string;
1498
+ }
1499
+
1449
1500
  // @public (undocumented)
1450
1501
  export interface IEngine {
1451
1502
  addEntity(): Entity;
@@ -1702,6 +1753,20 @@ export const enum InteractionType {
1702
1753
  PROXIMITY = 1
1703
1754
  }
1704
1755
 
1756
+ // 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)
1757
+ //
1758
+ // @public
1759
+ export interface InternalBaseComponent<T> extends BaseComponent<T> {
1760
+ __dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
1761
+ // (undocumented)
1762
+ __onChangeCallbacks(entity: Entity, value: T): void;
1763
+ // (undocumented)
1764
+ __run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
1765
+ // (undocumented)
1766
+ dirtyIterator(): Iterable<Entity>;
1767
+ iterator(): Iterable<[Entity, any]>;
1768
+ }
1769
+
1705
1770
  // @public (undocumented)
1706
1771
  export interface ISchema<T = any> {
1707
1772
  // (undocumented)
@@ -5364,6 +5429,7 @@ export type Transport = {
5364
5429
  onmessage?(message: Uint8Array): void;
5365
5430
  filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
5366
5431
  type?: string;
5432
+ allowReservedEntities?: boolean;
5367
5433
  };
5368
5434
 
5369
5435
  // @public (undocumented)
@@ -5662,6 +5728,17 @@ export interface UiTransformProps {
5662
5728
  // @public (undocumented)
5663
5729
  export type Unpacked<T> = T extends (infer U)[] ? U : T;
5664
5730
 
5731
+ // 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)
5732
+ //
5733
+ // @public (undocumented)
5734
+ export type ValidateCallback<T> = (value: {
5735
+ entity: Entity;
5736
+ currentValue: T | undefined;
5737
+ newValue: T | undefined;
5738
+ senderAddress: string;
5739
+ createdBy: string;
5740
+ }) => boolean;
5741
+
5665
5742
  // @public (undocumented)
5666
5743
  export type ValueSetOptions<T> = {
5667
5744
  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.30.1",
4
+ "version": "7.30.2-37807847179.commit-24c42ea",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
- "@dcl/js-runtime": "7.30.1",
8
- "@dcl/sdk": "7.30.1"
7
+ "@dcl/js-runtime": "7.30.2-37807847179.commit-24c42ea",
8
+ "@dcl/sdk": "7.30.2-37807847179.commit-24c42ea"
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": "52fa56cf45d32d36140b5740d229f513fad15f5e"
36
+ "commit": "24c42ea8e31e33815f98d9d436acc3507569de11"
36
37
  }