@teambit/compositions 1.0.675 → 1.0.676

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.
@@ -11,8 +11,11 @@ export declare class CompositionsPreview {
11
11
  * preview extension.
12
12
  */
13
13
  preview: PreviewPreview);
14
+ private cache;
14
15
  render(componentId: ComponentID, envId: string, modules: PreviewModule, otherPreviewDefs: any, context: RenderingContext): void;
15
- /** gets relevant information for this preview to render */
16
+ private renderAsync;
17
+ /** Accepts modules or loader functions and returns an array of module objects. */
18
+ private normalizeEntries;
16
19
  selectPreviewModel(componentFullName: string, previewModule: PreviewModule): any;
17
20
  getMetadata(componentFullName: string, previewModule: PreviewModule): CompositionBrowserMetadataObject | undefined;
18
21
  private getActiveComposition;
@@ -36,30 +36,64 @@ class CompositionsPreview {
36
36
  */
37
37
  preview) {
38
38
  this.preview = preview;
39
+ _defineProperty(this, "cache", new Map());
39
40
  }
40
41
  render(componentId, envId, modules, otherPreviewDefs, context) {
41
42
  if (!modules.componentMap[componentId.fullName]) return;
42
- const compositions = this.selectPreviewModel(componentId.fullName, modules);
43
- const metadata = this.getMetadata(componentId.fullName, modules);
44
- const active = this.getActiveComposition(compositions, metadata);
43
+ void this.renderAsync(componentId.fullName, envId, modules, modules.componentMap[componentId.fullName], context);
44
+ }
45
+ async renderAsync(compKey, envId, modules, entries, context) {
46
+ const files = await this.normalizeEntries(entries);
47
+ const combined = Object.assign({}, ...files);
48
+ this.cache.set(compKey, combined);
49
+ const metadata = this.getMetadata(compKey, modules);
50
+ const active = this.getActiveComposition(combined, metadata);
45
51
  const mainModule = modules.modulesMap[envId] || modules.modulesMap.default;
46
52
  let defaultExports = mainModule.default;
47
53
  // Sometime when using ESM (package.json with type:"module") the default export is nested under "default"
48
54
  if (typeof defaultExports !== 'function' && defaultExports.default) {
49
55
  defaultExports = defaultExports.default;
50
56
  }
51
-
52
- // @ts-ignore Gilad - to fix.
53
- defaultExports(active, context);
57
+ if (typeof defaultExports === 'function') {
58
+ try {
59
+ // @ts-ignore Gilad - to fix.
60
+ defaultExports(active, context);
61
+ } catch (err) {
62
+ // last-resort log – loaders already logged their own failures
63
+ // eslint-disable-next-line no-console
64
+ console.error('[preview][render:fail]', compKey, err);
65
+ }
66
+ }
54
67
  }
55
68
 
56
- /** gets relevant information for this preview to render */
69
+ /** Accepts modules or loader functions and returns an array of module objects. */
70
+ async normalizeEntries(entries) {
71
+ const tasks = (entries || []).map(item => {
72
+ try {
73
+ if (typeof item === 'function') {
74
+ const p = item();
75
+ if (p && typeof p.then === 'function') return p.catch(() => ({}));
76
+ return Promise.resolve(p || {});
77
+ }
78
+ return Promise.resolve(item || {});
79
+ } catch {
80
+ return Promise.resolve({});
81
+ }
82
+ });
83
+ try {
84
+ return await Promise.all(tasks);
85
+ } catch {
86
+ return [];
87
+ }
88
+ }
57
89
  selectPreviewModel(componentFullName, previewModule) {
58
- const files = previewModule.componentMap[componentFullName] || [];
90
+ // Prefer the combined result produced during renderAsync (if already run)
91
+ const cached = this.cache.get(componentFullName);
92
+ if (cached) return cached;
59
93
 
60
- // allow compositions to come from many files. It is assumed they will have unique named
61
- const combined = Object.assign({}, ...files);
62
- return combined;
94
+ // Fallback: best-effort sync combine of whatever is there (ignore loader functions)
95
+ const files = (previewModule.componentMap[componentFullName] || []).filter(x => typeof x !== 'function');
96
+ return Object.assign({}, ...files);
63
97
  }
64
98
  getMetadata(componentFullName, previewModule) {
65
99
  const metadata = previewModule?.componentMapMetadata ? previewModule.componentMapMetadata[componentFullName] : undefined;
@@ -1 +1 @@
1
- {"version":3,"names":["_preview","data","require","_lodash","_interopRequireDefault","_compositions","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","CompositionsPreview","constructor","preview","render","componentId","envId","modules","otherPreviewDefs","context","componentMap","fullName","compositions","selectPreviewModel","metadata","getMetadata","active","getActiveComposition","mainModule","modulesMap","defaultExports","componentFullName","previewModule","files","combined","assign","componentMapMetadata","undefined","module","firstQueryParam","window","location","hash","split","query","getQuery","compositionId","getParam","first","head","firstId","identifier","values","provider","compPreview","registerPreview","name","bind","exports","PreviewRuntime","PreviewAspect","CompositionsAspect","addRuntime"],"sources":["compositions.preview.runtime.ts"],"sourcesContent":["import type { ComponentID } from '@teambit/component-id';\nimport type { PreviewPreview, RenderingContext, PreviewModule, ModuleFile } from '@teambit/preview';\nimport { PreviewAspect, PreviewRuntime } from '@teambit/preview';\nimport head from 'lodash.head';\nimport type { 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 let defaultExports = mainModule.default;\n // Sometime when using ESM (package.json with type:\"module\") the default export is nested under \"default\"\n if (typeof defaultExports !== 'function' && defaultExports.default) {\n defaultExports = defaultExports.default;\n }\n\n // @ts-ignore Gilad - to fix.\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":";;;;;;AAEA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,cAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA2D,SAAAG,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EA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C;MACzC,MAAM4B,OAAO,GAAGF,KAAK,EAAEG,UAAU;MACjC,IAAID,OAAO,IAAIZ,MAAM,CAACY,OAAO,CAAC,EAAE;QAC9B,OAAOZ,MAAM,CAACY,OAAO,CAAC;MACxB;IACF;IAEA,MAAMF,KAAK,GAAG,IAAAC,iBAAI,EAACpD,MAAM,CAACuD,MAAM,CAACd,MAAM,CAAC,CAAC;IACzC,OAAOU,KAAK;EACd;EAMA,aAAaK,QAAQA,CAAC,CAACxC,OAAO,CAAmB,EAAE;IACjD,MAAMyC,WAAW,GAAG,IAAI3C,mBAAmB,CAACE,OAAO,CAAC;IACpDA,OAAO,CAAC0C,eAAe,CAAC;MACtBC,IAAI,EAAE,cAAc;MACpB1C,MAAM,EAAEwC,WAAW,CAACxC,MAAM,CAAC2C,IAAI,CAACH,WAAW,CAAC;MAC5C/B,kBAAkB,EAAE+B,WAAW,CAAC/B,kBAAkB,CAACkC,IAAI,CAACH,WAAW,CAAC;MACpE9D,OAAO,EAAE;IACX,CAAC,CAAC;IAEF,OAAO8D,WAAW;EACpB;AACF;AAACI,OAAA,CAAA/C,mBAAA,GAAAA,mBAAA;AAAAlB,eAAA,CAjFYkB,mBAAmB,aAkEbgD,yBAAc;AAAAlE,eAAA,CAlEpBkB,mBAAmB,kBAoER,CAACiD,wBAAa,CAAC;AAevCC,kCAAkB,CAACC,UAAU,CAACnD,mBAAmB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_preview","data","require","_lodash","_interopRequireDefault","_compositions","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","CompositionsPreview","constructor","preview","Map","render","componentId","envId","modules","otherPreviewDefs","context","componentMap","fullName","renderAsync","compKey","entries","files","normalizeEntries","combined","assign","cache","set","metadata","getMetadata","active","getActiveComposition","mainModule","modulesMap","defaultExports","err","console","error","tasks","map","item","p","then","catch","Promise","resolve","all","selectPreviewModel","componentFullName","previewModule","cached","get","filter","x","componentMapMetadata","undefined","module","firstQueryParam","window","location","hash","split","query","getQuery","compositionId","getParam","compositions","first","head","firstId","identifier","values","provider","compPreview","registerPreview","name","bind","exports","PreviewRuntime","PreviewAspect","CompositionsAspect","addRuntime"],"sources":["compositions.preview.runtime.ts"],"sourcesContent":["import type { ComponentID } from '@teambit/component-id';\nimport type { PreviewPreview, RenderingContext, PreviewModule, ModuleFile } from '@teambit/preview';\nimport { PreviewAspect, PreviewRuntime } from '@teambit/preview';\nimport head from 'lodash.head';\nimport type { CompositionBrowserMetadataObject } from './composition';\nimport { CompositionsAspect } from './compositions.aspect';\n\nexport class CompositionsPreview {\n constructor(\n /**\n * preview extension.\n */\n private preview: PreviewPreview\n ) {}\n\n private cache = new Map<string, ModuleFile>();\n\n render(componentId: ComponentID, envId: string, modules: PreviewModule, otherPreviewDefs, context: RenderingContext) {\n if (!modules.componentMap[componentId.fullName]) return;\n void this.renderAsync(componentId.fullName, envId, modules, modules.componentMap[componentId.fullName], context);\n }\n\n private async renderAsync(\n compKey: string,\n envId: string,\n modules: PreviewModule,\n entries: any[],\n context: RenderingContext\n ) {\n const files = await this.normalizeEntries(entries);\n const combined = Object.assign({}, ...files);\n this.cache.set(compKey, combined);\n\n const metadata = this.getMetadata(compKey, modules);\n const active = this.getActiveComposition(combined, metadata);\n\n const mainModule = modules.modulesMap[envId] || modules.modulesMap.default;\n let defaultExports = mainModule.default;\n // Sometime when using ESM (package.json with type:\"module\") the default export is nested under \"default\"\n if (typeof defaultExports !== 'function' && defaultExports.default) {\n defaultExports = defaultExports.default;\n }\n\n if (typeof defaultExports === 'function') {\n try {\n // @ts-ignore Gilad - to fix.\n defaultExports(active, context);\n } catch (err) {\n // last-resort log – loaders already logged their own failures\n // eslint-disable-next-line no-console\n console.error('[preview][render:fail]', compKey, err);\n }\n }\n }\n\n /** Accepts modules or loader functions and returns an array of module objects. */\n private async normalizeEntries(entries: any[]): Promise<any[]> {\n const tasks = (entries || []).map((item) => {\n try {\n if (typeof item === 'function') {\n const p = item();\n if (p && typeof p.then === 'function') return p.catch(() => ({}));\n return Promise.resolve(p || {});\n }\n return Promise.resolve(item || {});\n } catch {\n return Promise.resolve({});\n }\n });\n try {\n return await Promise.all(tasks);\n } catch {\n return [];\n }\n }\n\n selectPreviewModel(componentFullName: string, previewModule: PreviewModule) {\n // Prefer the combined result produced during renderAsync (if already run)\n const cached = this.cache.get(componentFullName);\n if (cached) return cached;\n\n // Fallback: best-effort sync combine of whatever is there (ignore loader functions)\n const files = (previewModule.componentMap[componentFullName] || []).filter((x) => typeof x !== 'function');\n return Object.assign({}, ...files);\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":";;;;;;AAEA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAA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WAAW,GAAG,IAAIlE,mBAAmB,CAACE,OAAO,CAAC;IACpDA,OAAO,CAACiE,eAAe,CAAC;MACtBC,IAAI,EAAE,cAAc;MACpBhE,MAAM,EAAE8D,WAAW,CAAC9D,MAAM,CAACiE,IAAI,CAACH,WAAW,CAAC;MAC5C1B,kBAAkB,EAAE0B,WAAW,CAAC1B,kBAAkB,CAAC6B,IAAI,CAACH,WAAW,CAAC;MACpErF,OAAO,EAAE;IACX,CAAC,CAAC;IAEF,OAAOqF,WAAW;EACpB;AACF;AAACI,OAAA,CAAAtE,mBAAA,GAAAA,mBAAA;AAAAlB,eAAA,CA7HYkB,mBAAmB,aA8GbuE,yBAAc;AAAAzF,eAAA,CA9GpBkB,mBAAmB,kBAgHR,CAACwE,wBAAa,CAAC;AAevCC,kCAAkB,CAACC,UAAU,CAAC1E,mBAAmB,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compositions_compositions@1.0.675/dist/compositions.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compositions_compositions@1.0.675/dist/compositions.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compositions_compositions@1.0.676/dist/compositions.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compositions_compositions@1.0.676/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,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/compositions",
3
- "version": "1.0.675",
3
+ "version": "1.0.676",
4
4
  "homepage": "https://bit.cloud/teambit/compositions/compositions",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.compositions",
8
8
  "name": "compositions",
9
- "version": "1.0.675"
9
+ "version": "1.0.676"
10
10
  },
11
11
  "dependencies": {
12
12
  "graphql-tag": "2.12.1",
@@ -54,16 +54,16 @@
54
54
  "@teambit/design.inputs.text-area": "0.0.19",
55
55
  "@teambit/design.inputs.toggle-switch": "0.0.7",
56
56
  "@teambit/design.ui.input.color-picker": "0.0.56",
57
- "@teambit/component": "1.0.675",
58
- "@teambit/graphql": "1.0.675",
59
- "@teambit/dev-files": "1.0.675",
60
- "@teambit/envs": "1.0.675",
61
- "@teambit/preview": "1.0.675",
62
- "@teambit/schema": "1.0.675",
63
- "@teambit/scope": "1.0.675",
64
- "@teambit/workspace": "1.0.675",
65
- "@teambit/component-compare": "1.0.675",
66
- "@teambit/ui": "1.0.675"
57
+ "@teambit/component": "1.0.676",
58
+ "@teambit/graphql": "1.0.676",
59
+ "@teambit/dev-files": "1.0.676",
60
+ "@teambit/envs": "1.0.676",
61
+ "@teambit/preview": "1.0.676",
62
+ "@teambit/schema": "1.0.676",
63
+ "@teambit/scope": "1.0.676",
64
+ "@teambit/workspace": "1.0.676",
65
+ "@teambit/component-compare": "1.0.676",
66
+ "@teambit/ui": "1.0.676"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/lodash": "4.14.165",