@dcl/playground-assets 7.23.4-26770223094.commit-52b9415 → 7.24.0

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcl/sdk",
3
3
  "description": "",
4
- "version": "7.23.4-26770223094.commit-52b9415",
4
+ "version": "7.24.0",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
7
  "@dcl/ecs": "file:../ecs",
@@ -35,5 +35,5 @@
35
35
  },
36
36
  "types": "./index.d.ts",
37
37
  "typings": "./index.d.ts",
38
- "commit": "52b9415ebab8c77313e9fbc0725fd2e5f916d3c3"
38
+ "commit": "5d040fd6fe9e018eb005a5c2a85e3419e1ea87a4"
39
39
  }
@@ -1488,14 +1488,16 @@ export declare namespace Composite {
1488
1488
  /** @public */
1489
1489
  export function toBinary(composite: Composite.Definition): Uint8Array;
1490
1490
  /**
1491
- * Instance a composite and returns its root entity
1492
- * @param compositeData - state serialized by the CRDT protocol
1493
- * @param getNextAvailableEntity - function that gives unused entities
1494
- * @param rootEntity - (optional) suggested mapped rootEntity for the composite
1491
+ * Instance a composite and return its root entity.
1492
+ * @param engine - the engine that will own the new entities
1493
+ * @param compositeData - the composite resource to instance
1494
+ * @param compositeProvider - provider used to resolve nested composite references
1495
+ * @param options - instancing options (`rootEntity`, `entityMapping`, `alreadyRequestedSrc`)
1496
+ * @returns the root entity of the instanced composite
1495
1497
  *
1496
1498
  * @public
1497
1499
  */
1498
- export function instance(engine: IEngine, compositeData: Composite.Resource, compositeProvider: CompositeProvider, options?: InstanceCompositeOptions): void;
1500
+ export function instance(engine: IEngine, compositeData: Composite.Resource, compositeProvider: CompositeProvider, options?: InstanceCompositeOptions): Entity;
1499
1501
  /**
1500
1502
  * Resolve and normalize a composite path
1501
1503
  * @param src - the source path
@@ -1568,6 +1570,11 @@ export declare namespace CompositeDefinition {
1568
1570
  */
1569
1571
  export declare type CompositeProvider = {
1570
1572
  getCompositeOrNull(src: string): CompositeResource | null;
1573
+ loadComposite?: (src: string) => Promise<CompositeResource>;
1574
+ schemas?: Iterable<{
1575
+ name: string;
1576
+ jsonSchema: any;
1577
+ }>;
1571
1578
  };
1572
1579
 
1573
1580
  /**
@@ -2276,6 +2283,13 @@ export declare function getComponentEntityTree<T>(engine: Pick<IEngine, 'getEnti
2276
2283
  parent?: Entity;
2277
2284
  }>): Generator<Entity>;
2278
2285
 
2286
+ /**
2287
+ * Get the composite provider registered via setCompositeProvider. Returns null if
2288
+ * no provider has been set.
2289
+ * @public
2290
+ */
2291
+ export declare function getCompositeProvider(): CompositeProvider | null;
2292
+
2279
2293
  /**
2280
2294
  * @public
2281
2295
  * @deprecated composite is not being supported so far, please do not use this feature
@@ -8589,6 +8603,14 @@ export declare namespace Schemas {
8589
8603
  */
8590
8604
  export declare function ScreenInsetArea(props: UiScreenInsetAreaProps): ReactEcs.JSX.Element;
8591
8605
 
8606
+ /**
8607
+ * Register the composite provider used to resolve composite files. Also registers
8608
+ * any `provider.schemas` on the engine pre-seal so composites that reference those
8609
+ * components can be instanced without further setup.
8610
+ * @public
8611
+ */
8612
+ export declare function setCompositeProvider(engine: IEngine, provider: CompositeProvider): void;
8613
+
8592
8614
  /**
8593
8615
  * Sets a globalThis property as a polyfill (only if undefined/null).
8594
8616
  * @public
@@ -15043,7 +15043,7 @@
15043
15043
  {
15044
15044
  "kind": "Function",
15045
15045
  "canonicalReference": "@dcl/playground-assets!Composite.instance:function(1)",
15046
- "docComment": "/**\n * Instance a composite and returns its root entity\n *\n * @param compositeData - state serialized by the CRDT protocol\n *\n * @param getNextAvailableEntity - function that gives unused entities\n *\n * @param rootEntity - (optional) suggested mapped rootEntity for the composite\n *\n * @public\n */\n",
15046
+ "docComment": "/**\n * Instance a composite and return its root entity.\n *\n * @param engine - the engine that will own the new entities\n *\n * @param compositeData - the composite resource to instance\n *\n * @param compositeProvider - provider used to resolve nested composite references\n *\n * @param options - instancing options (`rootEntity`, `entityMapping`, `alreadyRequestedSrc`)\n *\n * @returns the root entity of the instanced composite\n *\n * @public\n */\n",
15047
15047
  "excerptTokens": [
15048
15048
  {
15049
15049
  "kind": "Content",
@@ -15087,7 +15087,12 @@
15087
15087
  },
15088
15088
  {
15089
15089
  "kind": "Content",
15090
- "text": "void"
15090
+ "text": "import(\"../engine\")."
15091
+ },
15092
+ {
15093
+ "kind": "Reference",
15094
+ "text": "Entity",
15095
+ "canonicalReference": "@dcl/playground-assets!Entity:type"
15091
15096
  },
15092
15097
  {
15093
15098
  "kind": "Content",
@@ -15096,7 +15101,7 @@
15096
15101
  ],
15097
15102
  "returnTypeTokenRange": {
15098
15103
  "startIndex": 9,
15099
- "endIndex": 10
15104
+ "endIndex": 11
15100
15105
  },
15101
15106
  "releaseTag": "Public",
15102
15107
  "overloadIndex": 1,
@@ -16378,7 +16383,34 @@
16378
16383
  },
16379
16384
  {
16380
16385
  "kind": "Content",
16381
- "text": " | null;\n}"
16386
+ "text": " | null;\n loadComposite?: (src: string) => "
16387
+ },
16388
+ {
16389
+ "kind": "Reference",
16390
+ "text": "Promise",
16391
+ "canonicalReference": "!Promise:interface"
16392
+ },
16393
+ {
16394
+ "kind": "Content",
16395
+ "text": "<"
16396
+ },
16397
+ {
16398
+ "kind": "Reference",
16399
+ "text": "CompositeResource",
16400
+ "canonicalReference": "@dcl/playground-assets!CompositeResource:type"
16401
+ },
16402
+ {
16403
+ "kind": "Content",
16404
+ "text": ">;\n schemas?: "
16405
+ },
16406
+ {
16407
+ "kind": "Reference",
16408
+ "text": "Iterable",
16409
+ "canonicalReference": "!Iterable:interface"
16410
+ },
16411
+ {
16412
+ "kind": "Content",
16413
+ "text": "<{\n name: string;\n jsonSchema: any;\n }>;\n}"
16382
16414
  },
16383
16415
  {
16384
16416
  "kind": "Content",
@@ -16390,7 +16422,7 @@
16390
16422
  "name": "CompositeProvider",
16391
16423
  "typeTokenRange": {
16392
16424
  "startIndex": 1,
16393
- "endIndex": 4
16425
+ "endIndex": 10
16394
16426
  }
16395
16427
  },
16396
16428
  {
@@ -21747,6 +21779,39 @@
21747
21779
  ],
21748
21780
  "name": "getComponentEntityTree"
21749
21781
  },
21782
+ {
21783
+ "kind": "Function",
21784
+ "canonicalReference": "@dcl/playground-assets!getCompositeProvider:function(1)",
21785
+ "docComment": "/**\n * Get the composite provider registered via setCompositeProvider. Returns null if no provider has been set.\n *\n * @public\n */\n",
21786
+ "excerptTokens": [
21787
+ {
21788
+ "kind": "Content",
21789
+ "text": "export declare function getCompositeProvider(): "
21790
+ },
21791
+ {
21792
+ "kind": "Reference",
21793
+ "text": "CompositeProvider",
21794
+ "canonicalReference": "@dcl/playground-assets!CompositeProvider:type"
21795
+ },
21796
+ {
21797
+ "kind": "Content",
21798
+ "text": " | null"
21799
+ },
21800
+ {
21801
+ "kind": "Content",
21802
+ "text": ";"
21803
+ }
21804
+ ],
21805
+ "fileUrlPath": "../ecs/dist/composite/provider-registry.d.ts",
21806
+ "returnTypeTokenRange": {
21807
+ "startIndex": 1,
21808
+ "endIndex": 3
21809
+ },
21810
+ "releaseTag": "Public",
21811
+ "overloadIndex": 1,
21812
+ "parameters": [],
21813
+ "name": "getCompositeProvider"
21814
+ },
21750
21815
  {
21751
21816
  "kind": "Function",
21752
21817
  "canonicalReference": "@dcl/playground-assets!getCompositeRootComponent:function(1)",
@@ -82097,6 +82162,69 @@
82097
82162
  ],
82098
82163
  "name": "ScreenInsetArea"
82099
82164
  },
82165
+ {
82166
+ "kind": "Function",
82167
+ "canonicalReference": "@dcl/playground-assets!setCompositeProvider:function(1)",
82168
+ "docComment": "/**\n * Register the composite provider used to resolve composite files. Also registers any `provider.schemas` on the engine pre-seal so composites that reference those components can be instanced without further setup.\n *\n * @public\n */\n",
82169
+ "excerptTokens": [
82170
+ {
82171
+ "kind": "Content",
82172
+ "text": "export declare function setCompositeProvider(engine: "
82173
+ },
82174
+ {
82175
+ "kind": "Reference",
82176
+ "text": "IEngine",
82177
+ "canonicalReference": "@dcl/playground-assets!IEngine:interface"
82178
+ },
82179
+ {
82180
+ "kind": "Content",
82181
+ "text": ", provider: "
82182
+ },
82183
+ {
82184
+ "kind": "Reference",
82185
+ "text": "CompositeProvider",
82186
+ "canonicalReference": "@dcl/playground-assets!CompositeProvider:type"
82187
+ },
82188
+ {
82189
+ "kind": "Content",
82190
+ "text": "): "
82191
+ },
82192
+ {
82193
+ "kind": "Content",
82194
+ "text": "void"
82195
+ },
82196
+ {
82197
+ "kind": "Content",
82198
+ "text": ";"
82199
+ }
82200
+ ],
82201
+ "fileUrlPath": "../ecs/dist/composite/provider-registry.d.ts",
82202
+ "returnTypeTokenRange": {
82203
+ "startIndex": 5,
82204
+ "endIndex": 6
82205
+ },
82206
+ "releaseTag": "Public",
82207
+ "overloadIndex": 1,
82208
+ "parameters": [
82209
+ {
82210
+ "parameterName": "engine",
82211
+ "parameterTypeTokenRange": {
82212
+ "startIndex": 1,
82213
+ "endIndex": 2
82214
+ },
82215
+ "isOptional": false
82216
+ },
82217
+ {
82218
+ "parameterName": "provider",
82219
+ "parameterTypeTokenRange": {
82220
+ "startIndex": 3,
82221
+ "endIndex": 4
82222
+ },
82223
+ "isOptional": false
82224
+ }
82225
+ ],
82226
+ "name": "setCompositeProvider"
82227
+ },
82100
82228
  {
82101
82229
  "kind": "Function",
82102
82230
  "canonicalReference": "@dcl/playground-assets!setGlobalPolyfill:function(1)",
@@ -764,7 +764,7 @@ export namespace Composite {
764
764
  export function fromBinary(buffer: Uint8Array): Composite.Definition;
765
765
  // (undocumented)
766
766
  export function fromJson(object: any): Composite.Definition;
767
- export function instance(engine: IEngine, compositeData: Composite.Resource, compositeProvider: CompositeProvider, options?: InstanceCompositeOptions): void;
767
+ export function instance(engine: IEngine, compositeData: Composite.Resource, compositeProvider: CompositeProvider, options?: InstanceCompositeOptions): Entity;
768
768
  // (undocumented)
769
769
  export type Provider = CompositeProvider;
770
770
  export function resolveAndNormalizePath(src: string, cwd?: string): string;
@@ -841,6 +841,11 @@ export namespace CompositeDefinition {
841
841
  // @public (undocumented)
842
842
  export type CompositeProvider = {
843
843
  getCompositeOrNull(src: string): CompositeResource | null;
844
+ loadComposite?: (src: string) => Promise<CompositeResource>;
845
+ schemas?: Iterable<{
846
+ name: string;
847
+ jsonSchema: any;
848
+ }>;
844
849
  };
845
850
 
846
851
  // @public (undocumented)
@@ -1306,6 +1311,9 @@ export function getComponentEntityTree<T>(engine: Pick<IEngine, 'getEntitiesWith
1306
1311
  parent?: Entity;
1307
1312
  }>): Generator<Entity>;
1308
1313
 
1314
+ // @public
1315
+ export function getCompositeProvider(): CompositeProvider | null;
1316
+
1309
1317
  // @public @deprecated (undocumented)
1310
1318
  export function getCompositeRootComponent(engine: IEngine): LastWriteWinElementSetComponentDefinition<CompositeRootType>;
1311
1319
 
@@ -4762,6 +4770,9 @@ export namespace Schemas {
4762
4770
  // @public
4763
4771
  export function ScreenInsetArea(props: UiScreenInsetAreaProps): ReactEcs.JSX.Element;
4764
4772
 
4773
+ // @public
4774
+ export function setCompositeProvider(engine: IEngine, provider: CompositeProvider): void;
4775
+
4765
4776
  // @public
4766
4777
  export function setGlobalPolyfill<T>(key: string, value: T): void;
4767
4778
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@dcl/playground-assets",
3
3
  "description": "",
4
- "version": "7.23.4-26770223094.commit-52b9415",
4
+ "version": "7.24.0",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
- "@dcl/js-runtime": "7.23.4-26770223094.commit-52b9415",
8
- "@dcl/sdk": "7.23.4-26770223094.commit-52b9415"
7
+ "@dcl/js-runtime": "7.24.0",
8
+ "@dcl/sdk": "7.24.0"
9
9
  },
10
10
  "devDependencies": {
11
11
  "@microsoft/api-extractor": "^7.33.8"
@@ -32,5 +32,5 @@
32
32
  },
33
33
  "types": "./dist/index.d.ts",
34
34
  "typings": "./dist/index.d.ts",
35
- "commit": "52b9415ebab8c77313e9fbc0725fd2e5f916d3c3"
35
+ "commit": "5d040fd6fe9e018eb005a5c2a85e3419e1ea87a4"
36
36
  }