@dcl/playground-assets 7.0.6-4138167187.commit-c9d306a → 7.0.6-4177592674.commit-39cdc99

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 "{@"
@@ -2063,11 +2097,44 @@ export interface Position {
2063
2097
  top: PositionUnit;
2064
2098
  }
2065
2099
 
2100
+ // @public
2101
+ export type PositionShorthand = PositionUnit | `${PositionUnit} ${PositionUnit}` | `${PositionUnit} ${PositionUnit} ${PositionUnit}` | `${PositionUnit} ${PositionUnit} ${PositionUnit} ${PositionUnit}`;
2102
+
2066
2103
  // @public
2067
2104
  export type PositionType = 'absolute' | 'relative';
2068
2105
 
2069
2106
  // @public
2070
- export type PositionUnit = `${number}px` | `${number}%` | number;
2107
+ export type PositionUnit = `${number}px` | `${number}%` | number | `${number}`;
2108
+
2109
+ // 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)
2110
+ //
2111
+ // @public (undocumented)
2112
+ export enum ProcessMessageResultType {
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
+ EntityDeleted = 7,
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
+ EntityWasDeleted = 6,
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
+ NoChanges = 3,
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
+ StateOutdatedData = 4,
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
+ StateOutdatedTimestamp = 2,
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
+ StateUpdatedData = 5,
2131
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@state" is not defined in this configuration
2132
+ // Warning: (tsdoc-undefined-tag) The TSDoc tag "@reason" is not defined in this configuration
2133
+ StateUpdatedTimestamp = 1
2134
+ }
2135
+
2136
+ // @public (undocumented)
2137
+ export type PutComponentMessage = CrdtMessageHeader & PutComponentMessageBody;
2071
2138
 
2072
2139
  // Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
2073
2140
  //
@@ -2531,7 +2598,9 @@ export const UiDropdownResult: ComponentDefinition<PBUiDropdownResult>;
2531
2598
  // Warning: (tsdoc-undefined-tag) The TSDoc tag "@category" is not defined in this configuration
2532
2599
  //
2533
2600
  // @public
2534
- export function UiEntity(props: EntityPropTypes): ReactEcs.JSX.Element;
2601
+ export function UiEntity(props: EntityPropTypes & {
2602
+ uiText?: UiLabelProps;
2603
+ }): ReactEcs.JSX.Element;
2535
2604
 
2536
2605
  // @public (undocumented)
2537
2606
  export type UiFontType = 'sans-serif' | 'serif' | 'monospace';
@@ -2590,14 +2659,14 @@ export interface UiTransformProps {
2590
2659
  flexWrap?: FlexWrapType;
2591
2660
  height?: PositionUnit;
2592
2661
  justifyContent?: JustifyType;
2593
- margin?: Partial<Position>;
2662
+ margin?: Partial<Position> | PositionShorthand;
2594
2663
  maxHeight?: PositionUnit;
2595
2664
  maxWidth?: PositionUnit;
2596
2665
  minHeight?: PositionUnit;
2597
2666
  minWidth?: PositionUnit;
2598
2667
  overflow?: OverflowType;
2599
- padding?: Partial<Position>;
2600
- position?: Partial<Position>;
2668
+ padding?: Partial<Position> | PositionShorthand;
2669
+ position?: Partial<Position> | PositionShorthand;
2601
2670
  positionType?: PositionType;
2602
2671
  width?: PositionUnit;
2603
2672
  }
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-4177592674.commit-39cdc99",
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-4177592674.commit-39cdc99"
21
21
  },
22
22
  "minCliVersion": "3.12.3",
23
23
  "files": [
24
24
  "dist",
25
25
  "etc"
26
26
  ],
27
- "commit": "c9d306af4a8af8d3cf0f7da983300be92d6b3bc8"
27
+ "commit": "39cdc99ea857c63f707ec9188836116d838fa10e"
28
28
  }