@dcl/playground-assets 7.29.0 → 7.29.1-35039347300.commit-dffaede

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)
@@ -908,10 +939,10 @@ export type Coords = {
908
939
  export const CRDT_MESSAGE_HEADER_LENGTH = 8;
909
940
 
910
941
  // @public (undocumented)
911
- export type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
942
+ export type CrdtMessage = PutComponentMessage | AuthoritativePutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
912
943
 
913
944
  // @public (undocumented)
914
- export type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
945
+ export type CrdtMessageBody = PutComponentMessageBody | AuthoritativePutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
915
946
 
916
947
  // @public
917
948
  export type CrdtMessageHeader = {
@@ -932,6 +963,8 @@ export enum CrdtMessageType {
932
963
  // (undocumented)
933
964
  APPEND_VALUE = 4,
934
965
  // (undocumented)
966
+ AUTHORITATIVE_PUT_COMPONENT = 8,
967
+ // (undocumented)
935
968
  DELETE_COMPONENT = 2,
936
969
  // (undocumented)
937
970
  DELETE_COMPONENT_NETWORK = 6,
@@ -940,7 +973,7 @@ export enum CrdtMessageType {
940
973
  // (undocumented)
941
974
  DELETE_ENTITY_NETWORK = 7,
942
975
  // (undocumented)
943
- MAX_MESSAGE_TYPE = 8,
976
+ MAX_MESSAGE_TYPE = 9,
944
977
  // (undocumented)
945
978
  PUT_COMPONENT = 1,
946
979
  // (undocumented)
@@ -952,6 +985,11 @@ export enum CrdtMessageType {
952
985
  // @public (undocumented)
953
986
  export type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
954
987
 
988
+ // 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)
989
+ //
990
+ // @public (undocumented)
991
+ export const CreatedBy: ICreatedBy;
992
+
955
993
  // @public (undocumented)
956
994
  export function createEntityContainer(opts?: {
957
995
  reservedStaticEntities: number;
@@ -1441,6 +1479,19 @@ export interface GrowOnlyValueSetComponentDefinition<T> extends BaseComponent<T>
1441
1479
  // @public (undocumented)
1442
1480
  export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
1443
1481
 
1482
+ // 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)
1483
+ //
1484
+ // @public (undocumented)
1485
+ export type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
1486
+
1487
+ // 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)
1488
+ //
1489
+ // @public (undocumented)
1490
+ export interface ICreatedByType {
1491
+ // (undocumented)
1492
+ address: string;
1493
+ }
1494
+
1444
1495
  // @public (undocumented)
1445
1496
  export interface IEngine {
1446
1497
  addEntity(): Entity;
@@ -1694,6 +1745,20 @@ export const enum InteractionType {
1694
1745
  PROXIMITY = 1
1695
1746
  }
1696
1747
 
1748
+ // 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)
1749
+ //
1750
+ // @public
1751
+ export interface InternalBaseComponent<T> extends BaseComponent<T> {
1752
+ __dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
1753
+ // (undocumented)
1754
+ __onChangeCallbacks(entity: Entity, value: T): void;
1755
+ // (undocumented)
1756
+ __run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
1757
+ // (undocumented)
1758
+ dirtyIterator(): Iterable<Entity>;
1759
+ iterator(): Iterable<[Entity, any]>;
1760
+ }
1761
+
1697
1762
  // @public (undocumented)
1698
1763
  export interface ISchema<T = any> {
1699
1764
  // (undocumented)
@@ -5292,6 +5357,7 @@ export type Transport = {
5292
5357
  onmessage?(message: Uint8Array): void;
5293
5358
  filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
5294
5359
  type?: string;
5360
+ allowReservedEntities?: boolean;
5295
5361
  };
5296
5362
 
5297
5363
  // @public (undocumented)
@@ -5590,6 +5656,17 @@ export interface UiTransformProps {
5590
5656
  // @public (undocumented)
5591
5657
  export type Unpacked<T> = T extends (infer U)[] ? U : T;
5592
5658
 
5659
+ // 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)
5660
+ //
5661
+ // @public (undocumented)
5662
+ export type ValidateCallback<T> = (value: {
5663
+ entity: Entity;
5664
+ currentValue: T | undefined;
5665
+ newValue: T | undefined;
5666
+ senderAddress: string;
5667
+ createdBy: string;
5668
+ }) => boolean;
5669
+
5593
5670
  // @public (undocumented)
5594
5671
  export type ValueSetOptions<T> = {
5595
5672
  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.29.0",
4
+ "version": "7.29.1-35039347300.commit-dffaede",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
- "@dcl/js-runtime": "7.29.0",
8
- "@dcl/sdk": "7.29.0"
7
+ "@dcl/js-runtime": "7.29.1-35039347300.commit-dffaede",
8
+ "@dcl/sdk": "7.29.1-35039347300.commit-dffaede"
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": "d2f06b5eb1a2ab3377a3f99d045f957ae979c051"
36
+ "commit": "dffaede67b4ff56bdfc4af6e6d5d729ee1308767"
36
37
  }