@teambit/compositions 0.0.621 → 0.0.629

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.
@@ -0,0 +1 @@
1
+ export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compositions_compositions@0.0.629/dist/compositions.docs.mdx')]
@@ -1,12 +1,14 @@
1
1
  import { Component, ComponentMap } from '@teambit/component';
2
- import { ExecutionContext } from '@teambit/envs';
2
+ import type { ExecutionContext, Environment } from '@teambit/envs';
3
3
  import { PreviewDefinition } from '@teambit/preview';
4
4
  import { AbstractVinyl } from '@teambit/legacy/dist/consumer/component/sources';
5
5
  import { CompositionsMain } from './compositions.main.runtime';
6
6
  export declare class CompositionPreviewDefinition implements PreviewDefinition {
7
7
  private compositions;
8
8
  readonly prefix = "compositions";
9
+ readonly includePeers = true;
9
10
  constructor(compositions: CompositionsMain);
10
11
  renderTemplatePath(context: ExecutionContext): Promise<string>;
12
+ renderTemplatePathByEnv(env: Environment): Promise<any>;
11
13
  getModuleMap(components: Component[]): Promise<ComponentMap<AbstractVinyl[]>>;
12
14
  }
@@ -23,10 +23,15 @@ class CompositionPreviewDefinition {
23
23
  constructor(compositions) {
24
24
  this.compositions = compositions;
25
25
  (0, _defineProperty2().default)(this, "prefix", 'compositions');
26
+ (0, _defineProperty2().default)(this, "includePeers", true);
26
27
  }
27
28
 
28
29
  async renderTemplatePath(context) {
29
- return context.env.getMounter();
30
+ return this.renderTemplatePathByEnv(context.env);
31
+ }
32
+
33
+ async renderTemplatePathByEnv(env) {
34
+ return env.getMounter();
30
35
  }
31
36
 
32
37
  async getModuleMap(components) {
@@ -1 +1 @@
1
- {"version":3,"sources":["compositions.preview-definition.ts"],"names":["CompositionPreviewDefinition","constructor","compositions","renderTemplatePath","context","env","getMounter","getModuleMap","components","map","getPreviewFiles","filter","value","length"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOO,MAAMA,4BAAN,CAAgE;AAGrEC,EAAAA,WAAW,CAASC,YAAT,EAAyC;AAAA,SAAhCA,YAAgC,GAAhCA,YAAgC;AAAA,oDAFlC,cAEkC;AAAE;;AAE9B,QAAlBC,kBAAkB,CAACC,OAAD,EAA6C;AACnE,WAAOA,OAAO,CAACC,GAAR,CAAYC,UAAZ,EAAP;AACD;;AAEiB,QAAZC,YAAY,CAACC,UAAD,EAAkE;AAClF,UAAMC,GAAG,GAAG,KAAKP,YAAL,CAAkBQ,eAAlB,CAAkCF,UAAlC,CAAZ;AACA,WAAOC,GAAG,CAACE,MAAJ,CAAYC,KAAD,IAAWA,KAAK,CAACC,MAAN,KAAiB,CAAvC,CAAP;AACD;;AAZoE","sourcesContent":["import { Component, ComponentMap } from '@teambit/component';\nimport { ExecutionContext } from '@teambit/envs';\nimport { PreviewDefinition } from '@teambit/preview';\nimport { AbstractVinyl } from '@teambit/legacy/dist/consumer/component/sources';\n\nimport { CompositionsMain } from './compositions.main.runtime';\n\nexport class CompositionPreviewDefinition implements PreviewDefinition {\n readonly prefix = 'compositions';\n\n constructor(private compositions: CompositionsMain) {}\n\n async renderTemplatePath(context: ExecutionContext): Promise<string> {\n return context.env.getMounter();\n }\n\n async getModuleMap(components: Component[]): Promise<ComponentMap<AbstractVinyl[]>> {\n const map = this.compositions.getPreviewFiles(components);\n return map.filter((value) => value.length !== 0);\n }\n}\n"]}
1
+ {"version":3,"sources":["compositions.preview-definition.ts"],"names":["CompositionPreviewDefinition","constructor","compositions","renderTemplatePath","context","renderTemplatePathByEnv","env","getMounter","getModuleMap","components","map","getPreviewFiles","filter","value","length"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOO,MAAMA,4BAAN,CAAgE;AAIrEC,EAAAA,WAAW,CAASC,YAAT,EAAyC;AAAA,SAAhCA,YAAgC,GAAhCA,YAAgC;AAAA,oDAHlC,cAGkC;AAAA,0DAF5B,IAE4B;AAAE;;AAE9B,QAAlBC,kBAAkB,CAACC,OAAD,EAA6C;AACnE,WAAO,KAAKC,uBAAL,CAA6BD,OAAO,CAACE,GAArC,CAAP;AACD;;AAE4B,QAAvBD,uBAAuB,CAACC,GAAD,EAAmB;AAC9C,WAAOA,GAAG,CAACC,UAAJ,EAAP;AACD;;AAEiB,QAAZC,YAAY,CAACC,UAAD,EAAkE;AAClF,UAAMC,GAAG,GAAG,KAAKR,YAAL,CAAkBS,eAAlB,CAAkCF,UAAlC,CAAZ;AACA,WAAOC,GAAG,CAACE,MAAJ,CAAYC,KAAD,IAAWA,KAAK,CAACC,MAAN,KAAiB,CAAvC,CAAP;AACD;;AAjBoE","sourcesContent":["import { Component, ComponentMap } from '@teambit/component';\nimport type { ExecutionContext, Environment } from '@teambit/envs';\nimport { PreviewDefinition } from '@teambit/preview';\nimport { AbstractVinyl } from '@teambit/legacy/dist/consumer/component/sources';\n\nimport { CompositionsMain } from './compositions.main.runtime';\n\nexport class CompositionPreviewDefinition implements PreviewDefinition {\n readonly prefix = 'compositions';\n readonly includePeers = true;\n\n constructor(private compositions: CompositionsMain) {}\n\n async renderTemplatePath(context: ExecutionContext): Promise<string> {\n return this.renderTemplatePathByEnv(context.env);\n }\n\n async renderTemplatePathByEnv(env: Environment) {\n return env.getMounter();\n }\n\n async getModuleMap(components: Component[]): Promise<ComponentMap<AbstractVinyl[]>> {\n const map = this.compositions.getPreviewFiles(components);\n return map.filter((value) => value.length !== 0);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/compositions",
3
- "version": "0.0.621",
3
+ "version": "0.0.629",
4
4
  "homepage": "https://bit.dev/teambit/compositions/compositions",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.compositions",
8
8
  "name": "compositions",
9
- "version": "0.0.621"
9
+ "version": "0.0.629"
10
10
  },
11
11
  "dependencies": {
12
12
  "@teambit/harmony": "0.2.11",
@@ -23,16 +23,16 @@
23
23
  "@teambit/documenter.ui.heading": "4.1.1",
24
24
  "@teambit/documenter.ui.property-table": "4.1.3",
25
25
  "@teambit/evangelist.elements.icon": "1.0.2",
26
- "@teambit/component": "0.0.621",
26
+ "@teambit/component": "0.0.629",
27
27
  "@teambit/compositions.model.composition-id": "0.0.485",
28
- "@teambit/graphql": "0.0.621",
29
- "@teambit/cli": "0.0.427",
30
- "@teambit/dev-files": "0.0.621",
31
- "@teambit/preview": "0.0.621",
32
- "@teambit/schema": "0.0.621",
33
- "@teambit/workspace": "0.0.621",
28
+ "@teambit/graphql": "0.0.629",
29
+ "@teambit/cli": "0.0.433",
30
+ "@teambit/dev-files": "0.0.629",
31
+ "@teambit/preview": "0.0.629",
32
+ "@teambit/schema": "0.0.629",
33
+ "@teambit/workspace": "0.0.629",
34
34
  "@teambit/ui-foundation.ui.constants.z-indexes": "0.0.486",
35
- "@teambit/envs": "0.0.621",
35
+ "@teambit/envs": "0.0.629",
36
36
  "@teambit/compositions.ui.compositions-menu-bar": "0.0.162",
37
37
  "@teambit/compositions.ui.hooks.use-composition": "0.0.162",
38
38
  "@teambit/design.ui.alert-card": "0.0.14",
@@ -42,11 +42,11 @@
42
42
  "@teambit/design.ui.surfaces.status-message-card": "0.0.7",
43
43
  "@teambit/docs.ui.queries.get-docs": "0.0.485",
44
44
  "@teambit/mdx.ui.mdx-layout": "0.0.493",
45
- "@teambit/panels": "0.0.427",
46
- "@teambit/preview.ui.component-preview": "0.0.485",
45
+ "@teambit/panels": "0.0.433",
46
+ "@teambit/preview.ui.component-preview": "0.0.487",
47
47
  "@teambit/ui-foundation.ui.buttons.collapser": "0.0.192",
48
48
  "@teambit/ui-foundation.ui.hooks.use-is-mobile": "0.0.178",
49
- "@teambit/ui": "0.0.621",
49
+ "@teambit/ui": "0.0.629",
50
50
  "@teambit/compositions.model.composition-type": "0.0.486",
51
51
  "@teambit/compositions.ui.composition-card": "0.0.492"
52
52
  },
@@ -62,7 +62,7 @@
62
62
  "@teambit/compositions.aspect-docs.compositions": "0.0.131"
63
63
  },
64
64
  "peerDependencies": {
65
- "@teambit/legacy": "1.0.206",
65
+ "@teambit/legacy": "1.0.209",
66
66
  "react-dom": "^16.8.0 || ^17.0.0",
67
67
  "react": "^16.8.0 || ^17.0.0"
68
68
  },
@@ -90,7 +90,7 @@
90
90
  "react": "-"
91
91
  },
92
92
  "peerDependencies": {
93
- "@teambit/legacy": "1.0.206",
93
+ "@teambit/legacy": "1.0.209",
94
94
  "react-dom": "^16.8.0 || ^17.0.0",
95
95
  "react": "^16.8.0 || ^17.0.0"
96
96
  }