@dcl/playground-assets 7.0.6-4138167187.commit-c9d306a → 7.0.6-4153633895.commit-4aad233

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.
@@ -402,13 +402,14 @@ export interface ComponentDefinition<T> {
402
402
  createOrReplace(entity: Entity, val?: T): T;
403
403
  default(): DeepReadonly<T>;
404
404
  deleteFrom(entity: Entity): T | null;
405
+ entityDeleted(entity: Entity, markAsDirty: boolean): void;
405
406
  get(entity: Entity): DeepReadonly<T>;
407
+ getCrdtUpdates(): Iterable<CrdtMessageBody>;
406
408
  getMutable(entity: Entity): T;
407
409
  getMutableOrNull(entity: Entity): T | null;
408
410
  getOrNull(entity: Entity): DeepReadonly<T> | null;
409
411
  has(entity: Entity): boolean;
410
- // (undocumented)
411
- writeToByteBuffer(entity: Entity, buffer: ByteBuffer): void;
412
+ updateFromCrdt(body: CrdtMessageBody): [null | PutComponentMessageBody | DeleteComponentMessageBody, T | null];
412
413
  }
413
414
 
414
415
  // Warning: (ae-missing-release-tag) "ComponentGetter" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
@@ -421,9 +422,21 @@ export type ComponentSchema<T extends [ComponentDefinition<any>, ...ComponentDef
421
422
  [K in keyof T]: T[K] extends ComponentDefinition<any> ? ReturnType<T[K]['getMutable']> : never;
422
423
  };
423
424
 
425
+ // @public (undocumented)
426
+ export const CRDT_MESSAGE_HEADER_LENGTH = 8;
427
+
428
+ // @public (undocumented)
429
+ export type CrdtMessage = PutComponentMessage | DeleteComponentMessage | DeleteEntityMessage;
430
+
424
431
  // @public (undocumented)
425
432
  export type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody;
426
433
 
434
+ // @public
435
+ export type CrdtMessageHeader = {
436
+ length: uint32;
437
+ type: uint32;
438
+ };
439
+
427
440
  // @public (undocumented)
428
441
  export enum CrdtMessageType {
429
442
  // (undocumented)
@@ -446,6 +459,16 @@ export function createEthereumProvider(): {
446
459
  sendAsync(message: RPCSendableMessage, callback: (error: Error | null, result?: any) => void): void;
447
460
  };
448
461
 
462
+ // Warning: (ae-missing-release-tag) "createGetCrdtMessages" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
463
+ //
464
+ // @public (undocumented)
465
+ export function createGetCrdtMessages(componentId: number, timestamps: Map<Entity, number>, dirtyIterator: Set<Entity>, schema: Pick<ISchema<any>, 'serialize'>, data: Map<Entity, unknown>): () => Generator<PutComponentMessageBody | DeleteComponentMessageBody, void, unknown>;
466
+
467
+ // Warning: (ae-missing-release-tag) "createUpdateFromCrdt" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
468
+ //
469
+ // @public (undocumented)
470
+ export function createUpdateFromCrdt(componentId: number, timestamps: Map<Entity, number>, schema: Pick<ISchema<any>, 'serialize' | 'deserialize'>, data: Map<Entity, unknown>): (msg: CrdtMessageBody) => [null | PutComponentMessageBody | DeleteComponentMessageBody, any];
471
+
449
472
  // Warning: (tsdoc-code-fence-closing-syntax) Unexpected characters after closing delimiter for code fence
450
473
  // Warning: (tsdoc-code-span-missing-delimiter) The code span is missing its closing backtick
451
474
  // Warning: (tsdoc-undefined-tag) The TSDoc tag "@params" is not defined in this configuration
@@ -470,6 +493,9 @@ export type DeepReadonlySet<T> = ReadonlySet<DeepReadonly<T>>;
470
493
  // @public
471
494
  export const DEG2RAD: number;
472
495
 
496
+ // @public (undocumented)
497
+ export type DeleteComponentMessage = CrdtMessageHeader & DeleteComponentMessageBody;
498
+
473
499
  // @public (undocumented)
474
500
  export type DeleteComponentMessageBody = {
475
501
  type: CrdtMessageType.DELETE_COMPONENT;
@@ -478,6 +504,9 @@ export type DeleteComponentMessageBody = {
478
504
  timestamp: number;
479
505
  };
480
506
 
507
+ // @public (undocumented)
508
+ export type DeleteEntityMessage = CrdtMessageHeader & DeleteEntityMessageBody;
509
+
481
510
  // @public (undocumented)
482
511
  export type DeleteEntityMessageBody = {
483
512
  type: CrdtMessageType.DELETE_ENTITY;
@@ -875,6 +904,11 @@ export type IncludeUndefined<T> = {
875
904
  [P in keyof T]: undefined extends T[P] ? P : never;
876
905
  }[keyof T];
877
906
 
907
+ // Warning: (ae-missing-release-tag) "incrementTimestamp" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
908
+ //
909
+ // @public (undocumented)
910
+ export function incrementTimestamp(entity: Entity, timestamps: Map<Entity, number>): number;
911
+
878
912
  // Warning: (tsdoc-html-tag-missing-string) The HTML element has an invalid attribute: Expecting an HTML string starting with a single-quote or double-quote character
879
913
  // Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
880
914
  // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
@@ -2069,6 +2103,36 @@ export type PositionType = 'absolute' | 'relative';
2069
2103
  // @public
2070
2104
  export type PositionUnit = `${number}px` | `${number}%` | number;
2071
2105
 
2106
+ // Warning: (ae-missing-release-tag) "ProcessMessageResultType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
2107
+ //
2108
+ // @public (undocumented)
2109
+ export enum ProcessMessageResultType {
2110
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@state" is not defined in this configuration
2111
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@reason" is not defined in this configuration
2112
+ EntityDeleted = 7,
2113
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@state" is not defined in this configuration
2114
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@reason" is not defined in this configuration
2115
+ EntityWasDeleted = 6,
2116
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@state" is not defined in this configuration
2117
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@reason" is not defined in this configuration
2118
+ NoChanges = 3,
2119
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@state" is not defined in this configuration
2120
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@reason" is not defined in this configuration
2121
+ StateOutdatedData = 4,
2122
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@state" is not defined in this configuration
2123
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@reason" is not defined in this configuration
2124
+ StateOutdatedTimestamp = 2,
2125
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@state" is not defined in this configuration
2126
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@reason" is not defined in this configuration
2127
+ StateUpdatedData = 5,
2128
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@state" is not defined in this configuration
2129
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@reason" is not defined in this configuration
2130
+ StateUpdatedTimestamp = 1
2131
+ }
2132
+
2133
+ // @public (undocumented)
2134
+ export type PutComponentMessage = CrdtMessageHeader & PutComponentMessageBody;
2135
+
2072
2136
  // Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
2073
2137
  //
2074
2138
  // @public
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/playground-assets",
3
- "version": "7.0.6-4138167187.commit-c9d306a",
3
+ "version": "7.0.6-4153633895.commit-4aad233",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "typings": "./dist/index.d.ts",
@@ -17,12 +17,12 @@
17
17
  "author": "Decentraland",
18
18
  "license": "Apache-2.0",
19
19
  "dependencies": {
20
- "@dcl/sdk": "7.0.6-4138167187.commit-c9d306a"
20
+ "@dcl/sdk": "7.0.6-4153633895.commit-4aad233"
21
21
  },
22
22
  "minCliVersion": "3.12.3",
23
23
  "files": [
24
24
  "dist",
25
25
  "etc"
26
26
  ],
27
- "commit": "c9d306af4a8af8d3cf0f7da983300be92d6b3bc8"
27
+ "commit": "4aad23359bad8cca4eebdf0c1a236a725d82b32d"
28
28
  }