@dcl/playground-assets 7.1.4-4601317654.commit-d2ae6e4 → 7.1.4-4619170473.commit-d3a4f9f

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.
package/dist/alpha.d.ts CHANGED
@@ -1178,17 +1178,19 @@ export declare type Composite = CompositeDefinition;
1178
1178
  */
1179
1179
  export declare namespace Composite {
1180
1180
  /** @public */
1181
- export type Type = CompositeDefinition;
1181
+ export type Definition = CompositeDefinition;
1182
+ /** @public */
1183
+ export type Resource = CompositeResource;
1182
1184
  /** @public */
1183
1185
  export type Provider = CompositeProvider;
1184
1186
  /** @public */
1185
- export function fromJson(object: any): Composite.Type;
1187
+ export function fromJson(object: any): Composite.Definition;
1186
1188
  /** @public */
1187
- export function fromBinary(buffer: Uint8Array): Composite.Type;
1189
+ export function fromBinary(buffer: Uint8Array): Composite.Definition;
1188
1190
  /** @public */
1189
- export function toJson(composite: Composite.Type): any;
1191
+ export function toJson(composite: Composite.Definition): any;
1190
1192
  /** @public */
1191
- export function toBinary(composite: Composite.Type): Uint8Array;
1193
+ export function toBinary(composite: Composite.Definition): Uint8Array;
1192
1194
  /**
1193
1195
  * Instance a composite and returns its root entity
1194
1196
  * @param compositeData - state serialized by the CRDT protocol
@@ -1197,7 +1199,16 @@ export declare namespace Composite {
1197
1199
  *
1198
1200
  * @public
1199
1201
  */
1200
- export function instance(engine: IEngine, compositeData: Composite.Type, compositeProvider: CompositeProvider, options?: InstanceCompositeOptions): void;
1202
+ export function instance(engine: IEngine, compositeData: Composite.Resource, compositeProvider: CompositeProvider, options?: InstanceCompositeOptions): void;
1203
+ /**
1204
+ * Resolve and normalize a composite path
1205
+ * @param src - the source path
1206
+ * @param cwd - the directory from the resolve should start to resolve
1207
+ *
1208
+ * @returns the absolute resolved path without slash at the beginning
1209
+ * @public
1210
+ */
1211
+ export function resolveAndNormalizePath(src: string, cwd?: string): string;
1201
1212
  }
1202
1213
 
1203
1214
  /**
@@ -1221,15 +1232,24 @@ export declare interface CompositeComponent_DataEntry {
1221
1232
  * @public
1222
1233
  */
1223
1234
  export declare interface CompositeDefinition {
1224
- id: string;
1235
+ version: number;
1225
1236
  components: CompositeComponent[];
1226
1237
  }
1227
1238
 
1228
1239
  /**
1240
+ * @param src - the source path of the composite
1229
1241
  * @public
1230
1242
  */
1231
1243
  export declare type CompositeProvider = {
1232
- getCompositeOrNull(id: string): CompositeDefinition | null;
1244
+ getCompositeOrNull(src: string): CompositeResource | null;
1245
+ };
1246
+
1247
+ /**
1248
+ * @public
1249
+ */
1250
+ export declare type CompositeResource = {
1251
+ src: string;
1252
+ composite: CompositeDefinition;
1233
1253
  };
1234
1254
 
1235
1255
  /**
@@ -1237,7 +1257,7 @@ export declare type CompositeProvider = {
1237
1257
  * @deprecated composite is not being supported so far, please do not use this feature
1238
1258
  */
1239
1259
  export declare type CompositeRootType = {
1240
- id: string;
1260
+ src: string;
1241
1261
  entities: {
1242
1262
  src: Entity;
1243
1263
  dest: Entity;
@@ -2108,7 +2128,7 @@ export declare type InstanceCompositeOptions = {
2108
2128
  getCompositeEntity: (compositeEntity: Entity | number) => Entity;
2109
2129
  };
2110
2130
  rootEntity?: Entity;
2111
- alreadyRequestedId?: Set<string>;
2131
+ alreadyRequestedSrc?: Set<string>;
2112
2132
  };
2113
2133
 
2114
2134
  /**
package/dist/beta.d.ts CHANGED
@@ -1178,17 +1178,19 @@ export declare type Composite = CompositeDefinition;
1178
1178
  */
1179
1179
  export declare namespace Composite {
1180
1180
  /** @public */
1181
- export type Type = CompositeDefinition;
1181
+ export type Definition = CompositeDefinition;
1182
+ /** @public */
1183
+ export type Resource = CompositeResource;
1182
1184
  /** @public */
1183
1185
  export type Provider = CompositeProvider;
1184
1186
  /** @public */
1185
- export function fromJson(object: any): Composite.Type;
1187
+ export function fromJson(object: any): Composite.Definition;
1186
1188
  /** @public */
1187
- export function fromBinary(buffer: Uint8Array): Composite.Type;
1189
+ export function fromBinary(buffer: Uint8Array): Composite.Definition;
1188
1190
  /** @public */
1189
- export function toJson(composite: Composite.Type): any;
1191
+ export function toJson(composite: Composite.Definition): any;
1190
1192
  /** @public */
1191
- export function toBinary(composite: Composite.Type): Uint8Array;
1193
+ export function toBinary(composite: Composite.Definition): Uint8Array;
1192
1194
  /**
1193
1195
  * Instance a composite and returns its root entity
1194
1196
  * @param compositeData - state serialized by the CRDT protocol
@@ -1197,7 +1199,16 @@ export declare namespace Composite {
1197
1199
  *
1198
1200
  * @public
1199
1201
  */
1200
- export function instance(engine: IEngine, compositeData: Composite.Type, compositeProvider: CompositeProvider, options?: InstanceCompositeOptions): void;
1202
+ export function instance(engine: IEngine, compositeData: Composite.Resource, compositeProvider: CompositeProvider, options?: InstanceCompositeOptions): void;
1203
+ /**
1204
+ * Resolve and normalize a composite path
1205
+ * @param src - the source path
1206
+ * @param cwd - the directory from the resolve should start to resolve
1207
+ *
1208
+ * @returns the absolute resolved path without slash at the beginning
1209
+ * @public
1210
+ */
1211
+ export function resolveAndNormalizePath(src: string, cwd?: string): string;
1201
1212
  }
1202
1213
 
1203
1214
  /**
@@ -1221,15 +1232,24 @@ export declare interface CompositeComponent_DataEntry {
1221
1232
  * @public
1222
1233
  */
1223
1234
  export declare interface CompositeDefinition {
1224
- id: string;
1235
+ version: number;
1225
1236
  components: CompositeComponent[];
1226
1237
  }
1227
1238
 
1228
1239
  /**
1240
+ * @param src - the source path of the composite
1229
1241
  * @public
1230
1242
  */
1231
1243
  export declare type CompositeProvider = {
1232
- getCompositeOrNull(id: string): CompositeDefinition | null;
1244
+ getCompositeOrNull(src: string): CompositeResource | null;
1245
+ };
1246
+
1247
+ /**
1248
+ * @public
1249
+ */
1250
+ export declare type CompositeResource = {
1251
+ src: string;
1252
+ composite: CompositeDefinition;
1233
1253
  };
1234
1254
 
1235
1255
  /**
@@ -1237,7 +1257,7 @@ export declare type CompositeProvider = {
1237
1257
  * @deprecated composite is not being supported so far, please do not use this feature
1238
1258
  */
1239
1259
  export declare type CompositeRootType = {
1240
- id: string;
1260
+ src: string;
1241
1261
  entities: {
1242
1262
  src: Entity;
1243
1263
  dest: Entity;
@@ -2104,7 +2124,7 @@ export declare type InstanceCompositeOptions = {
2104
2124
  getCompositeEntity: (compositeEntity: Entity | number) => Entity;
2105
2125
  };
2106
2126
  rootEntity?: Entity;
2107
- alreadyRequestedId?: Set<string>;
2127
+ alreadyRequestedSrc?: Set<string>;
2108
2128
  };
2109
2129
 
2110
2130
  /**
@@ -1178,17 +1178,19 @@ export declare type Composite = CompositeDefinition;
1178
1178
  */
1179
1179
  export declare namespace Composite {
1180
1180
  /** @public */
1181
- export type Type = CompositeDefinition;
1181
+ export type Definition = CompositeDefinition;
1182
+ /** @public */
1183
+ export type Resource = CompositeResource;
1182
1184
  /** @public */
1183
1185
  export type Provider = CompositeProvider;
1184
1186
  /** @public */
1185
- export function fromJson(object: any): Composite.Type;
1187
+ export function fromJson(object: any): Composite.Definition;
1186
1188
  /** @public */
1187
- export function fromBinary(buffer: Uint8Array): Composite.Type;
1189
+ export function fromBinary(buffer: Uint8Array): Composite.Definition;
1188
1190
  /** @public */
1189
- export function toJson(composite: Composite.Type): any;
1191
+ export function toJson(composite: Composite.Definition): any;
1190
1192
  /** @public */
1191
- export function toBinary(composite: Composite.Type): Uint8Array;
1193
+ export function toBinary(composite: Composite.Definition): Uint8Array;
1192
1194
  /**
1193
1195
  * Instance a composite and returns its root entity
1194
1196
  * @param compositeData - state serialized by the CRDT protocol
@@ -1197,7 +1199,16 @@ export declare namespace Composite {
1197
1199
  *
1198
1200
  * @public
1199
1201
  */
1200
- export function instance(engine: IEngine, compositeData: Composite.Type, compositeProvider: CompositeProvider, options?: InstanceCompositeOptions): void;
1202
+ export function instance(engine: IEngine, compositeData: Composite.Resource, compositeProvider: CompositeProvider, options?: InstanceCompositeOptions): void;
1203
+ /**
1204
+ * Resolve and normalize a composite path
1205
+ * @param src - the source path
1206
+ * @param cwd - the directory from the resolve should start to resolve
1207
+ *
1208
+ * @returns the absolute resolved path without slash at the beginning
1209
+ * @public
1210
+ */
1211
+ export function resolveAndNormalizePath(src: string, cwd?: string): string;
1201
1212
  }
1202
1213
 
1203
1214
  /**
@@ -1221,15 +1232,24 @@ export declare interface CompositeComponent_DataEntry {
1221
1232
  * @public
1222
1233
  */
1223
1234
  export declare interface CompositeDefinition {
1224
- id: string;
1235
+ version: number;
1225
1236
  components: CompositeComponent[];
1226
1237
  }
1227
1238
 
1228
1239
  /**
1240
+ * @param src - the source path of the composite
1229
1241
  * @public
1230
1242
  */
1231
1243
  export declare type CompositeProvider = {
1232
- getCompositeOrNull(id: string): CompositeDefinition | null;
1244
+ getCompositeOrNull(src: string): CompositeResource | null;
1245
+ };
1246
+
1247
+ /**
1248
+ * @public
1249
+ */
1250
+ export declare type CompositeResource = {
1251
+ src: string;
1252
+ composite: CompositeDefinition;
1233
1253
  };
1234
1254
 
1235
1255
  /**
@@ -1237,7 +1257,7 @@ export declare type CompositeProvider = {
1237
1257
  * @deprecated composite is not being supported so far, please do not use this feature
1238
1258
  */
1239
1259
  export declare type CompositeRootType = {
1240
- id: string;
1260
+ src: string;
1241
1261
  entities: {
1242
1262
  src: Entity;
1243
1263
  dest: Entity;
@@ -2104,7 +2124,7 @@ export declare type InstanceCompositeOptions = {
2104
2124
  getCompositeEntity: (compositeEntity: Entity | number) => Entity;
2105
2125
  };
2106
2126
  rootEntity?: Entity;
2107
- alreadyRequestedId?: Set<string>;
2127
+ alreadyRequestedSrc?: Set<string>;
2108
2128
  };
2109
2129
 
2110
2130
  /**