@dcl/playground-assets 7.32.0 → 7.32.1-41669733463.commit-b1b1d79

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)
@@ -940,10 +971,10 @@ export type Coords = {
940
971
  export const CRDT_MESSAGE_HEADER_LENGTH = 8;
941
972
 
942
973
  // @public (undocumented)
943
- export type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
974
+ export type CrdtMessage = PutComponentMessage | AuthoritativePutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
944
975
 
945
976
  // @public (undocumented)
946
- export type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
977
+ export type CrdtMessageBody = PutComponentMessageBody | AuthoritativePutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
947
978
 
948
979
  // @public
949
980
  export type CrdtMessageHeader = {
@@ -964,6 +995,8 @@ export enum CrdtMessageType {
964
995
  // (undocumented)
965
996
  APPEND_VALUE = 4,
966
997
  // (undocumented)
998
+ AUTHORITATIVE_PUT_COMPONENT = 8,
999
+ // (undocumented)
967
1000
  DELETE_COMPONENT = 2,
968
1001
  // (undocumented)
969
1002
  DELETE_COMPONENT_NETWORK = 6,
@@ -972,7 +1005,7 @@ export enum CrdtMessageType {
972
1005
  // (undocumented)
973
1006
  DELETE_ENTITY_NETWORK = 7,
974
1007
  // (undocumented)
975
- MAX_MESSAGE_TYPE = 8,
1008
+ MAX_MESSAGE_TYPE = 9,
976
1009
  // (undocumented)
977
1010
  PUT_COMPONENT = 1,
978
1011
  // (undocumented)
@@ -984,6 +1017,11 @@ export enum CrdtMessageType {
984
1017
  // @public (undocumented)
985
1018
  export type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
986
1019
 
1020
+ // 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)
1021
+ //
1022
+ // @public (undocumented)
1023
+ export const CreatedBy: ICreatedBy;
1024
+
987
1025
  // @public (undocumented)
988
1026
  export function createEntityContainer(opts?: {
989
1027
  reservedStaticEntities: number;
@@ -1480,6 +1518,19 @@ export interface GrowOnlyValueSetComponentDefinition<T> extends BaseComponent<T>
1480
1518
  // @public (undocumented)
1481
1519
  export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
1482
1520
 
1521
+ // 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)
1522
+ //
1523
+ // @public (undocumented)
1524
+ export type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
1525
+
1526
+ // 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)
1527
+ //
1528
+ // @public (undocumented)
1529
+ export interface ICreatedByType {
1530
+ // (undocumented)
1531
+ address: string;
1532
+ }
1533
+
1483
1534
  // @public (undocumented)
1484
1535
  export interface IEngine {
1485
1536
  addEntity(): Entity;
@@ -1736,6 +1787,20 @@ export const enum InteractionType {
1736
1787
  PROXIMITY = 1
1737
1788
  }
1738
1789
 
1790
+ // 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)
1791
+ //
1792
+ // @public
1793
+ export interface InternalBaseComponent<T> extends BaseComponent<T> {
1794
+ __dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
1795
+ // (undocumented)
1796
+ __onChangeCallbacks(entity: Entity, value: T): void;
1797
+ // (undocumented)
1798
+ __run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
1799
+ // (undocumented)
1800
+ dirtyIterator(): Iterable<Entity>;
1801
+ iterator(): Iterable<[Entity, any]>;
1802
+ }
1803
+
1739
1804
  // @public (undocumented)
1740
1805
  export interface ISchema<T = any> {
1741
1806
  // (undocumented)
@@ -5445,7 +5510,6 @@ export interface TouchScreenControlsComponentDefinitionExtended extends LastWrit
5445
5510
  setMainAction(action: InputAction): void;
5446
5511
  showAll(): void;
5447
5512
  showCrosshair(): void;
5448
- showDefault(): void;
5449
5513
  showJoystick(): void;
5450
5514
  }
5451
5515
 
@@ -5502,6 +5566,7 @@ export type Transport = {
5502
5566
  onmessage?(message: Uint8Array): void;
5503
5567
  filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
5504
5568
  type?: string;
5569
+ allowReservedEntities?: boolean;
5505
5570
  };
5506
5571
 
5507
5572
  // @public (undocumented)
@@ -5801,6 +5866,17 @@ export interface UiTransformProps {
5801
5866
  // @public (undocumented)
5802
5867
  export type Unpacked<T> = T extends (infer U)[] ? U : T;
5803
5868
 
5869
+ // 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)
5870
+ //
5871
+ // @public (undocumented)
5872
+ export type ValidateCallback<T> = (value: {
5873
+ entity: Entity;
5874
+ currentValue: T | undefined;
5875
+ newValue: T | undefined;
5876
+ senderAddress: string;
5877
+ createdBy: string;
5878
+ }) => boolean;
5879
+
5804
5880
  // @public (undocumented)
5805
5881
  export type ValueSetOptions<T> = {
5806
5882
  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.32.0",
4
+ "version": "7.32.1-41669733463.commit-b1b1d79",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
- "@dcl/js-runtime": "7.32.0",
8
- "@dcl/sdk": "7.32.0"
7
+ "@dcl/js-runtime": "7.31.1-41669733463.commit-b1b1d79",
8
+ "@dcl/sdk": "7.31.1-41669733463.commit-b1b1d79"
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 scene-insights tail"
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": "c7c08464f277fd6df22e7c20b0c21a9855c3077d"
36
+ "commit": "b1b1d7963076769f826f5f64ed249dd0a4bdf54a"
36
37
  }