@dcl/playground-assets 7.23.3 → 7.23.4-26106700711.commit-2afa13b

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)
@@ -873,10 +904,10 @@ export type Coords = {
873
904
  export const CRDT_MESSAGE_HEADER_LENGTH = 8;
874
905
 
875
906
  // @public (undocumented)
876
- export type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
907
+ export type CrdtMessage = PutComponentMessage | AuthoritativePutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
877
908
 
878
909
  // @public (undocumented)
879
- export type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
910
+ export type CrdtMessageBody = PutComponentMessageBody | AuthoritativePutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
880
911
 
881
912
  // @public
882
913
  export type CrdtMessageHeader = {
@@ -897,6 +928,8 @@ export enum CrdtMessageType {
897
928
  // (undocumented)
898
929
  APPEND_VALUE = 4,
899
930
  // (undocumented)
931
+ AUTHORITATIVE_PUT_COMPONENT = 8,
932
+ // (undocumented)
900
933
  DELETE_COMPONENT = 2,
901
934
  // (undocumented)
902
935
  DELETE_COMPONENT_NETWORK = 6,
@@ -905,7 +938,7 @@ export enum CrdtMessageType {
905
938
  // (undocumented)
906
939
  DELETE_ENTITY_NETWORK = 7,
907
940
  // (undocumented)
908
- MAX_MESSAGE_TYPE = 8,
941
+ MAX_MESSAGE_TYPE = 9,
909
942
  // (undocumented)
910
943
  PUT_COMPONENT = 1,
911
944
  // (undocumented)
@@ -917,6 +950,11 @@ export enum CrdtMessageType {
917
950
  // @public (undocumented)
918
951
  export type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
919
952
 
953
+ // 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)
954
+ //
955
+ // @public (undocumented)
956
+ export const CreatedBy: ICreatedBy;
957
+
920
958
  // @public (undocumented)
921
959
  export function createEntityContainer(opts?: {
922
960
  reservedStaticEntities: number;
@@ -1372,6 +1410,19 @@ export interface GrowOnlyValueSetComponentDefinition<T> extends BaseComponent<T>
1372
1410
  // @public (undocumented)
1373
1411
  export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
1374
1412
 
1413
+ // 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)
1414
+ //
1415
+ // @public (undocumented)
1416
+ export type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
1417
+
1418
+ // 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)
1419
+ //
1420
+ // @public (undocumented)
1421
+ export interface ICreatedByType {
1422
+ // (undocumented)
1423
+ address: string;
1424
+ }
1425
+
1375
1426
  // @public (undocumented)
1376
1427
  export interface IEngine {
1377
1428
  addEntity(): Entity;
@@ -1620,6 +1671,20 @@ export const enum InteractionType {
1620
1671
  PROXIMITY = 1
1621
1672
  }
1622
1673
 
1674
+ // 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)
1675
+ //
1676
+ // @public
1677
+ export interface InternalBaseComponent<T> extends BaseComponent<T> {
1678
+ __dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
1679
+ // (undocumented)
1680
+ __onChangeCallbacks(entity: Entity, value: T): void;
1681
+ // (undocumented)
1682
+ __run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
1683
+ // (undocumented)
1684
+ dirtyIterator(): Iterable<Entity>;
1685
+ iterator(): Iterable<[Entity, any]>;
1686
+ }
1687
+
1623
1688
  // @public (undocumented)
1624
1689
  export interface ISchema<T = any> {
1625
1690
  // (undocumented)
@@ -5354,6 +5419,17 @@ export interface UiTransformProps {
5354
5419
  // @public (undocumented)
5355
5420
  export type Unpacked<T> = T extends (infer U)[] ? U : T;
5356
5421
 
5422
+ // 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)
5423
+ //
5424
+ // @public (undocumented)
5425
+ export type ValidateCallback<T> = (value: {
5426
+ entity: Entity;
5427
+ currentValue: T | undefined;
5428
+ newValue: T | undefined;
5429
+ senderAddress: string;
5430
+ createdBy: string;
5431
+ }) => boolean;
5432
+
5357
5433
  // @public (undocumented)
5358
5434
  export type ValueSetOptions<T> = {
5359
5435
  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.23.3",
4
+ "version": "7.23.4-26106700711.commit-2afa13b",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
- "@dcl/js-runtime": "7.23.3",
8
- "@dcl/sdk": "7.23.3"
7
+ "@dcl/js-runtime": "7.23.4-26106700711.commit-2afa13b",
8
+ "@dcl/sdk": "7.23.4-26106700711.commit-2afa13b"
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": "04270ca53739efce812dbb00973a070c002c8171"
36
+ "commit": "2afa13b8e15ada6f90af741de1248c348f136a38"
36
37
  }