@teambit/compositions 0.0.958 → 0.0.960

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.
@@ -9,8 +9,8 @@ export declare class CompositionPreviewDefinition implements PreviewDefinition {
9
9
  readonly prefix = "compositions";
10
10
  readonly includePeers = true;
11
11
  constructor(compositions: CompositionsMain);
12
- renderTemplatePath(context: ExecutionContext): Promise<string>;
13
- renderTemplatePathByEnv(env: Environment): Promise<any>;
12
+ renderTemplatePath(context: ExecutionContext): Promise<string | undefined>;
13
+ renderTemplatePathByEnv(env: Environment): Promise<string | undefined>;
14
14
  getModuleMap(components: Component[]): Promise<ComponentMap<AbstractVinyl[]>>;
15
15
  getMetadata(component: Component): Promise<CompositionBrowserMetadataObject>;
16
16
  }
@@ -13,6 +13,13 @@ function _defineProperty2() {
13
13
  };
14
14
  return data;
15
15
  }
16
+ function _lodash() {
17
+ const data = require("lodash");
18
+ _lodash = function () {
19
+ return data;
20
+ };
21
+ return data;
22
+ }
16
23
  class CompositionPreviewDefinition {
17
24
  constructor(compositions) {
18
25
  this.compositions = compositions;
@@ -23,9 +30,10 @@ class CompositionPreviewDefinition {
23
30
  return this.renderTemplatePathByEnv(context.env);
24
31
  }
25
32
  async renderTemplatePathByEnv(env) {
26
- const mounter = env.getMounter();
27
- if (!mounter) return undefined;
28
- return env.getMounter();
33
+ if (env.getMounter && (0, _lodash().isFunction)(env.getMounter)) {
34
+ return env.getMounter();
35
+ }
36
+ return undefined;
29
37
  }
30
38
  async getModuleMap(components) {
31
39
  const map = this.compositions.getPreviewFiles(components);
@@ -1 +1 @@
1
- {"version":3,"names":["CompositionPreviewDefinition","constructor","compositions","renderTemplatePath","context","renderTemplatePathByEnv","env","mounter","getMounter","undefined","getModuleMap","components","map","getPreviewFiles","getMetadata","component","getCompositions","composition","displayName","identifier"],"sources":["compositions.preview-definition.ts"],"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';\nimport { CompositionBrowserMetadataObject } from './composition';\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 const mounter = env.getMounter();\n if (!mounter) return undefined;\n return env.getMounter();\n }\n\n async getModuleMap(components: Component[]): Promise<ComponentMap<AbstractVinyl[]>> {\n const map = this.compositions.getPreviewFiles(components);\n return map;\n }\n\n async getMetadata(component: Component): Promise<CompositionBrowserMetadataObject> {\n const compositions = this.compositions\n .getCompositions(component)\n .map((composition) => ({ displayName: composition.displayName, identifier: composition.identifier }));\n return {\n compositions,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAQO,MAAMA,4BAA4B,CAA8B;EAIrEC,WAAW,CAASC,YAA8B,EAAE;IAAA,KAAhCA,YAA8B,GAA9BA,YAA8B;IAAA,gDAHhC,cAAc;IAAA,sDACR,IAAI;EAEyB;EAErD,MAAMC,kBAAkB,CAACC,OAAyB,EAAmB;IACnE,OAAO,IAAI,CAACC,uBAAuB,CAACD,OAAO,CAACE,GAAG,CAAC;EAClD;EAEA,MAAMD,uBAAuB,CAACC,GAAgB,EAAE;IAC9C,MAAMC,OAAO,GAAGD,GAAG,CAACE,UAAU,EAAE;IAChC,IAAI,CAACD,OAAO,EAAE,OAAOE,SAAS;IAC9B,OAAOH,GAAG,CAACE,UAAU,EAAE;EACzB;EAEA,MAAME,YAAY,CAACC,UAAuB,EAA0C;IAClF,MAAMC,GAAG,GAAG,IAAI,CAACV,YAAY,CAACW,eAAe,CAACF,UAAU,CAAC;IACzD,OAAOC,GAAG;EACZ;EAEA,MAAME,WAAW,CAACC,SAAoB,EAA6C;IACjF,MAAMb,YAAY,GAAG,IAAI,CAACA,YAAY,CACnCc,eAAe,CAACD,SAAS,CAAC,CAC1BH,GAAG,CAAEK,WAAW,KAAM;MAAEC,WAAW,EAAED,WAAW,CAACC,WAAW;MAAEC,UAAU,EAAEF,WAAW,CAACE;IAAW,CAAC,CAAC,CAAC;IACvG,OAAO;MACLjB;IACF,CAAC;EACH;AACF;AAAC"}
1
+ {"version":3,"names":["CompositionPreviewDefinition","constructor","compositions","renderTemplatePath","context","renderTemplatePathByEnv","env","getMounter","isFunction","undefined","getModuleMap","components","map","getPreviewFiles","getMetadata","component","getCompositions","composition","displayName","identifier"],"sources":["compositions.preview-definition.ts"],"sourcesContent":["import { Component, ComponentMap } from '@teambit/component';\nimport type { ExecutionContext, Environment } from '@teambit/envs';\nimport { PreviewDefinition } from '@teambit/preview';\nimport { isFunction } from 'lodash';\nimport { AbstractVinyl } from '@teambit/legacy/dist/consumer/component/sources';\n\nimport { CompositionsMain } from './compositions.main.runtime';\nimport { CompositionBrowserMetadataObject } from './composition';\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 | undefined> {\n return this.renderTemplatePathByEnv(context.env);\n }\n\n async renderTemplatePathByEnv(env: Environment): Promise<string | undefined> {\n if (env.getMounter && isFunction(env.getMounter)){\n return env.getMounter();\n }\n return undefined;\n }\n\n async getModuleMap(components: Component[]): Promise<ComponentMap<AbstractVinyl[]>> {\n const map = this.compositions.getPreviewFiles(components);\n return map;\n }\n\n async getMetadata(component: Component): Promise<CompositionBrowserMetadataObject> {\n const compositions = this.compositions\n .getCompositions(component)\n .map((composition) => ({ displayName: composition.displayName, identifier: composition.identifier }));\n return {\n compositions,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAMO,MAAMA,4BAA4B,CAA8B;EAIrEC,WAAW,CAASC,YAA8B,EAAE;IAAA,KAAhCA,YAA8B,GAA9BA,YAA8B;IAAA,gDAHhC,cAAc;IAAA,sDACR,IAAI;EAEyB;EAErD,MAAMC,kBAAkB,CAACC,OAAyB,EAA+B;IAC/E,OAAO,IAAI,CAACC,uBAAuB,CAACD,OAAO,CAACE,GAAG,CAAC;EAClD;EAEA,MAAMD,uBAAuB,CAACC,GAAgB,EAAgC;IAC5E,IAAIA,GAAG,CAACC,UAAU,IAAI,IAAAC,oBAAU,EAACF,GAAG,CAACC,UAAU,CAAC,EAAC;MAC/C,OAAOD,GAAG,CAACC,UAAU,EAAE;IACzB;IACA,OAAOE,SAAS;EAClB;EAEA,MAAMC,YAAY,CAACC,UAAuB,EAA0C;IAClF,MAAMC,GAAG,GAAG,IAAI,CAACV,YAAY,CAACW,eAAe,CAACF,UAAU,CAAC;IACzD,OAAOC,GAAG;EACZ;EAEA,MAAME,WAAW,CAACC,SAAoB,EAA6C;IACjF,MAAMb,YAAY,GAAG,IAAI,CAACA,YAAY,CACnCc,eAAe,CAACD,SAAS,CAAC,CAC1BH,GAAG,CAAEK,WAAW,KAAM;MAAEC,WAAW,EAAED,WAAW,CAACC,WAAW;MAAEC,UAAU,EAAEF,WAAW,CAACE;IAAW,CAAC,CAAC,CAAC;IACvG,OAAO;MACLjB;IACF,CAAC;EACH;AACF;AAAC"}
@@ -11,7 +11,7 @@ export declare class CompositionsPreview {
11
11
  * preview extension.
12
12
  */
13
13
  preview: PreviewPreview);
14
- render(componentId: ComponentID, modules: PreviewModule, otherPreviewDefs: any, context: RenderingContext): void;
14
+ render(componentId: ComponentID, envId: string, modules: PreviewModule, otherPreviewDefs: any, context: RenderingContext): void;
15
15
  /** gets relevant information for this preview to render */
16
16
  selectPreviewModel(componentFullName: string, previewModule: PreviewModule): any;
17
17
  getMetadata(componentFullName: string, previewModule: PreviewModule): CompositionBrowserMetadataObject | undefined;
@@ -44,12 +44,14 @@ class CompositionsPreview {
44
44
  preview) {
45
45
  this.preview = preview;
46
46
  }
47
- render(componentId, modules, otherPreviewDefs, context) {
47
+ render(componentId, envId, modules, otherPreviewDefs, context) {
48
48
  if (!modules.componentMap[componentId.fullName]) return;
49
49
  const compositions = this.selectPreviewModel(componentId.fullName, modules);
50
50
  const metadata = this.getMetadata(componentId.fullName, modules);
51
51
  const active = this.getActiveComposition(compositions, metadata);
52
- modules.mainModule.default(active, context);
52
+ const mainModule = modules.modulesMap[envId] || modules.modulesMap.default;
53
+ const defaultExports = mainModule.default;
54
+ defaultExports(active, context);
53
55
  }
54
56
 
55
57
  /** gets relevant information for this preview to render */
@@ -1 +1 @@
1
- {"version":3,"names":["CompositionsPreview","constructor","preview","render","componentId","modules","otherPreviewDefs","context","componentMap","fullName","compositions","selectPreviewModel","metadata","getMetadata","active","getActiveComposition","mainModule","default","componentFullName","previewModule","files","combined","Object","assign","componentMapMetadata","undefined","module","firstQueryParam","window","location","hash","split","query","getQuery","compositionId","getParam","first","head","firstId","identifier","values","provider","compPreview","registerPreview","name","bind","PreviewRuntime","PreviewAspect","CompositionsAspect","addRuntime"],"sources":["compositions.preview.runtime.ts"],"sourcesContent":["import { ComponentID } from '@teambit/component-id';\nimport {\n PreviewAspect,\n PreviewPreview,\n RenderingContext,\n PreviewRuntime,\n PreviewModule,\n ModuleFile,\n} from '@teambit/preview';\nimport head from 'lodash.head';\nimport { CompositionBrowserMetadataObject } from './composition';\n\nimport { CompositionsAspect } from './compositions.aspect';\n\nexport class CompositionsPreview {\n constructor(\n /**\n * preview extension.\n */\n private preview: PreviewPreview\n ) {}\n\n render(componentId: ComponentID, modules: PreviewModule, otherPreviewDefs, context: RenderingContext) {\n if (!modules.componentMap[componentId.fullName]) return;\n\n const compositions = this.selectPreviewModel(componentId.fullName, modules);\n const metadata = this.getMetadata(componentId.fullName, modules);\n const active = this.getActiveComposition(compositions, metadata);\n\n modules.mainModule.default(active, context);\n }\n\n /** gets relevant information for this preview to render */\n selectPreviewModel(componentFullName: string, previewModule: PreviewModule) {\n const files = previewModule.componentMap[componentFullName] || [];\n\n // allow compositions to come from many files. It is assumed they will have unique named\n const combined = Object.assign({}, ...files);\n return combined;\n }\n\n getMetadata(componentFullName: string, previewModule: PreviewModule): CompositionBrowserMetadataObject | undefined {\n const metadata = previewModule?.componentMapMetadata\n ? previewModule.componentMapMetadata[componentFullName]\n : undefined;\n if (metadata) {\n return metadata as CompositionBrowserMetadataObject;\n }\n return undefined;\n }\n\n private getActiveComposition(module: ModuleFile, metadata?: CompositionBrowserMetadataObject) {\n const firstQueryParam = window.location.hash.split('&')[1];\n const query = this.preview.getQuery();\n const compositionId = this.preview.getParam(query, 'name') || firstQueryParam;\n\n if (compositionId && module[compositionId]) {\n return module[compositionId];\n }\n\n if (metadata && metadata.compositions) {\n const first = head(metadata.compositions);\n const firstId = first?.identifier;\n if (firstId && module[firstId]) {\n return module[firstId];\n }\n }\n\n const first = head(Object.values(module));\n return first;\n }\n\n static runtime = PreviewRuntime;\n\n static dependencies = [PreviewAspect];\n\n static async provider([preview]: [PreviewPreview]) {\n const compPreview = new CompositionsPreview(preview);\n preview.registerPreview({\n name: 'compositions',\n render: compPreview.render.bind(compPreview),\n selectPreviewModel: compPreview.selectPreviewModel.bind(compPreview),\n default: true,\n });\n\n return compPreview;\n }\n}\n\nCompositionsAspect.addRuntime(CompositionsPreview);\n"],"mappings":";;;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAQA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,mBAAmB,CAAC;EAC/BC,WAAW;EACT;AACJ;AACA;EACYC,OAAuB,EAC/B;IAAA,KADQA,OAAuB,GAAvBA,OAAuB;EAC9B;EAEHC,MAAM,CAACC,WAAwB,EAAEC,OAAsB,EAAEC,gBAAgB,EAAEC,OAAyB,EAAE;IACpG,IAAI,CAACF,OA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IL,eAAe;IAE7E,IAAIO,aAAa,IAAIR,MAAM,CAACQ,aAAa,CAAC,EAAE;MAC1C,OAAOR,MAAM,CAACQ,aAAa,CAAC;IAC9B;IAEA,IAAItB,QAAQ,IAAIA,QAAQ,CAACF,YAAY,EAAE;MACrC,MAAM0B,KAAK,GAAG,IAAAC,iBAAI,EAACzB,QAAQ,CAACF,YAAY,CAAC;MACzC,MAAM4B,OAAO,GAAGF,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEG,UAAU;MACjC,IAAID,OAAO,IAAIZ,MAAM,CAACY,OAAO,CAAC,EAAE;QAC9B,OAAOZ,MAAM,CAACY,OAAO,CAAC;MACxB;IACF;IAEA,MAAMF,KAAK,GAAG,IAAAC,iBAAI,EAACf,MAAM,CAACkB,MAAM,CAACd,MAAM,CAAC,CAAC;IACzC,OAAOU,KAAK;EACd;EAMA,aAAaK,QAAQ,CAAC,CAACvC,OAAO,CAAmB,EAAE;IACjD,MAAMwC,WAAW,GAAG,IAAI1C,mBAAmB,CAACE,OAAO,CAAC;IACpDA,OAAO,CAACyC,eAAe,CAAC;MACtBC,IAAI,EAAE,cAAc;MACpBzC,MAAM,EAAEuC,WAAW,CAACvC,MAAM,CAAC0C,IAAI,CAACH,WAAW,CAAC;MAC5C/B,kBAAkB,EAAE+B,WAAW,CAAC/B,kBAAkB,CAACkC,IAAI,CAACH,WAAW,CAAC;MACpEzB,OAAO,EAAE;IACX,CAAC,CAAC;IAEF,OAAOyB,WAAW;EACpB;AACF;AAAC;AAAA,gCAzEY1C,mBAAmB,aA0Db8C,yBAAc;AAAA,gCA1DpB9C,mBAAmB,kBA4DR,CAAC+C,wBAAa,CAAC;AAevCC,kCAAkB,CAACC,UAAU,CAACjD,mBAAmB,CAAC"}
1
+ {"version":3,"names":["CompositionsPreview","constructor","preview","render","componentId","envId","modules","otherPreviewDefs","context","componentMap","fullName","compositions","selectPreviewModel","metadata","getMetadata","active","getActiveComposition","mainModule","modulesMap","default","defaultExports","componentFullName","previewModule","files","combined","Object","assign","componentMapMetadata","undefined","module","firstQueryParam","window","location","hash","split","query","getQuery","compositionId","getParam","first","head","firstId","identifier","values","provider","compPreview","registerPreview","name","bind","PreviewRuntime","PreviewAspect","CompositionsAspect","addRuntime"],"sources":["compositions.preview.runtime.ts"],"sourcesContent":["import { ComponentID } from '@teambit/component-id';\nimport {\n PreviewAspect,\n PreviewPreview,\n RenderingContext,\n PreviewRuntime,\n PreviewModule,\n ModuleFile,\n} from '@teambit/preview';\nimport head from 'lodash.head';\nimport { CompositionBrowserMetadataObject } from './composition';\n\nimport { CompositionsAspect } from './compositions.aspect';\n\nexport class CompositionsPreview {\n constructor(\n /**\n * preview extension.\n */\n private preview: PreviewPreview\n ) {}\n\n render(componentId: ComponentID, envId: string, modules: PreviewModule, otherPreviewDefs, context: RenderingContext) {\n if (!modules.componentMap[componentId.fullName]) return;\n\n const compositions = this.selectPreviewModel(componentId.fullName, modules);\n const metadata = this.getMetadata(componentId.fullName, modules);\n const active = this.getActiveComposition(compositions, metadata);\n\n const mainModule = modules.modulesMap[envId] || modules.modulesMap.default;\n const defaultExports = mainModule.default;\n\n defaultExports(active, context);\n }\n\n /** gets relevant information for this preview to render */\n selectPreviewModel(componentFullName: string, previewModule: PreviewModule) {\n const files = previewModule.componentMap[componentFullName] || [];\n\n // allow compositions to come from many files. It is assumed they will have unique named\n const combined = Object.assign({}, ...files);\n return combined;\n }\n\n getMetadata(componentFullName: string, previewModule: PreviewModule): CompositionBrowserMetadataObject | undefined {\n const metadata = previewModule?.componentMapMetadata\n ? previewModule.componentMapMetadata[componentFullName]\n : undefined;\n if (metadata) {\n return metadata as CompositionBrowserMetadataObject;\n }\n return undefined;\n }\n\n private getActiveComposition(module: ModuleFile, metadata?: CompositionBrowserMetadataObject) {\n const firstQueryParam = window.location.hash.split('&')[1];\n const query = this.preview.getQuery();\n const compositionId = this.preview.getParam(query, 'name') || firstQueryParam;\n\n if (compositionId && module[compositionId]) {\n return module[compositionId];\n }\n\n if (metadata && metadata.compositions) {\n const first = head(metadata.compositions);\n const firstId = first?.identifier;\n if (firstId && module[firstId]) {\n return module[firstId];\n }\n }\n\n const first = head(Object.values(module));\n return first;\n }\n\n static runtime = PreviewRuntime;\n\n static dependencies = [PreviewAspect];\n\n static async provider([preview]: [PreviewPreview]) {\n const compPreview = new CompositionsPreview(preview);\n preview.registerPreview({\n name: 'compositions',\n render: compPreview.render.bind(compPreview),\n selectPreviewModel: compPreview.selectPreviewModel.bind(compPreview),\n default: true,\n });\n\n return compPreview;\n }\n}\n\nCompositionsAspect.addRuntime(CompositionsPreview);\n"],"mappings":";;;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAQA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,mBAAmB,CAAC;EAC/BC,WAAW;EACT;AACJ;AACA;EACYC,OAAuB,EAC/B;IAAA,KADQA,OAAuB,GAAvBA,OAAuB;EAC9B;EAEHC,MAAM,CAACC,WAAwB,EAAEC,KAAa,EAAEC,OAAsB,EAAEC,gBAAgB,EAAEC,OAAyB,EAAE;IACnH,IAAI,CAACF,OAAO,CAACG,YAAY,CAACL,WAAW,CAACM,QAAQ,CAAC,EAAE;IAEjD,MAAMC,YAAY,GAAG,IAAI,CAACC,kBAAkB,CAACR,WAAW,CAACM,QAAQ,EAAEJ,OAAO,CAAC;IAC3E,MAAMO,QAAQ,GAAG,IAAI,CAACC,WAAW,CAACV,WAAW,CAACM,QAAQ,EAAEJ,OAAO,CAAC;IAChE,MAAMS,MAAM,GAAG,IAAI,CAACC,oBAAoB,CAACL,YAAY,EAAEE,QAAQ,CAAC;IAEhE,MAAMI,UAAU,GAAGX,OAAO,CAACY,UAAU,CAACb,KAAK,CAAC,IAAIC,OAAO,CAACY,UAAU,CAACC,OAAO;IAC1E,MAAMC,cAAc,GAAGH,UAAU,CAACE,OAAO;IAEzCC,cAAc,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OAAO,CAAC,EAAE;QAC9B,OAAOZ,MAAM,CAACY,OAAO,CAAC;MACxB;IACF;IAEA,MAAMF,KAAK,GAAG,IAAAC,iBAAI,EAACf,MAAM,CAACkB,MAAM,CAACd,MAAM,CAAC,CAAC;IACzC,OAAOU,KAAK;EACd;EAMA,aAAaK,QAAQ,CAAC,CAAC1C,OAAO,CAAmB,EAAE;IACjD,MAAM2C,WAAW,GAAG,IAAI7C,mBAAmB,CAACE,OAAO,CAAC;IACpDA,OAAO,CAAC4C,eAAe,CAAC;MACtBC,IAAI,EAAE,cAAc;MACpB5C,MAAM,EAAE0C,WAAW,CAAC1C,MAAM,CAAC6C,IAAI,CAACH,WAAW,CAAC;MAC5CjC,kBAAkB,EAAEiC,WAAW,CAACjC,kBAAkB,CAACoC,IAAI,CAACH,WAAW,CAAC;MACpE1B,OAAO,EAAE;IACX,CAAC,CAAC;IAEF,OAAO0B,WAAW;EACpB;AACF;AAAC;AAAA,gCA5EY7C,mBAAmB,aA6DbiD,yBAAc;AAAA,gCA7DpBjD,mBAAmB,kBA+DR,CAACkD,wBAAa,CAAC;AAevCC,kCAAkB,CAACC,UAAU,CAACpD,mBAAmB,CAAC"}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compositions_compositions@0.0.958/dist/compositions.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compositions_compositions@0.0.958/dist/compositions.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compositions_compositions@0.0.960/dist/compositions.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compositions_compositions@0.0.960/dist/compositions.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@teambit/compositions",
3
- "version": "0.0.958",
3
+ "version": "0.0.960",
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.958"
9
+ "version": "0.0.960"
10
10
  },
11
11
  "dependencies": {
12
12
  "graphql-tag": "2.12.1",
13
+ "lodash": "4.17.21",
13
14
  "lodash.head": "4.0.1",
14
15
  "query-string": "7.0.0",
15
16
  "classnames": "2.2.6",
@@ -25,36 +26,37 @@
25
26
  "@teambit/documenter.ui.heading": "4.1.1",
26
27
  "@teambit/documenter.ui.property-table": "4.1.3",
27
28
  "@teambit/evangelist.elements.icon": "1.0.2",
28
- "@teambit/component": "0.0.958",
29
+ "@teambit/component": "0.0.960",
29
30
  "@teambit/compositions.model.composition-id": "0.0.496",
30
- "@teambit/graphql": "0.0.958",
31
- "@teambit/cli": "0.0.642",
32
- "@teambit/dev-files": "0.0.958",
33
- "@teambit/envs": "0.0.958",
34
- "@teambit/preview": "0.0.958",
35
- "@teambit/schema": "0.0.958",
31
+ "@teambit/graphql": "0.0.960",
32
+ "@teambit/cli": "0.0.643",
33
+ "@teambit/dev-files": "0.0.960",
34
+ "@teambit/envs": "0.0.960",
35
+ "@teambit/preview": "0.0.960",
36
+ "@teambit/schema": "0.0.960",
36
37
  "@teambit/toolbox.path.match-patterns": "0.0.9",
37
- "@teambit/workspace": "0.0.958",
38
+ "@teambit/workspace": "0.0.960",
38
39
  "@teambit/ui-foundation.ui.constants.z-indexes": "0.0.498",
39
40
  "@teambit/component-id": "0.0.425",
40
41
  "@teambit/compositions.ui.compositions-menu-bar": "0.0.172",
41
42
  "@teambit/compositions.ui.hooks.use-composition": "0.0.172",
42
- "@teambit/design.ui.alert-card": "0.0.26",
43
- "@teambit/design.ui.empty-box": "0.0.363",
44
- "@teambit/design.ui.surfaces.status-message-card": "0.0.17",
43
+ "@teambit/design.ui.alert-card": "0.0.27",
44
+ "@teambit/design.ui.empty-box": "0.0.364",
45
+ "@teambit/design.ui.surfaces.status-message-card": "0.0.18",
45
46
  "@teambit/docs.ui.queries.get-docs": "0.0.498",
46
- "@teambit/mdx.ui.mdx-layout": "0.0.512",
47
- "@teambit/panels": "0.0.643",
48
- "@teambit/preview.ui.component-preview": "0.0.510",
47
+ "@teambit/mdx.ui.mdx-layout": "0.0.513",
48
+ "@teambit/panels": "0.0.644",
49
+ "@teambit/preview.ui.component-preview": "0.0.511",
49
50
  "@teambit/ui-foundation.ui.buttons.collapser": "0.0.206",
50
51
  "@teambit/ui-foundation.ui.hooks.use-is-mobile": "0.0.188",
51
- "@teambit/component-compare": "0.0.206",
52
+ "@teambit/component-compare": "0.0.208",
52
53
  "@teambit/compositions.ui.composition-compare-section": "0.0.2",
53
54
  "@teambit/compositions.ui.composition-compare": "0.0.141",
54
- "@teambit/ui": "0.0.958"
55
+ "@teambit/ui": "0.0.960"
55
56
  },
56
57
  "devDependencies": {
57
58
  "@types/react": "^17.0.8",
59
+ "@types/lodash": "4.14.165",
58
60
  "@types/lodash.head": "4.0.6",
59
61
  "@types/classnames": "2.2.11",
60
62
  "@types/mocha": "9.1.0",
@@ -62,7 +64,7 @@
62
64
  "@types/react-dom": "^17.0.5",
63
65
  "@types/jest": "^26.0.0",
64
66
  "@types/testing-library__jest-dom": "5.9.5",
65
- "@teambit/compositions.aspect-docs.compositions": "0.0.150"
67
+ "@teambit/compositions.aspect-docs.compositions": "0.0.151"
66
68
  },
67
69
  "peerDependencies": {
68
70
  "react-router-dom": "^6.0.0",