@teambit/preview 1.0.473 → 1.0.475

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,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="1" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.preview/preview@1.0.473" tests="1" failures="0" errors="0" skipped="0">
4
- <testcase classname="dist/bundler/create-peer-link.spec.js" name="should output snapshot" time="0.003"/>
3
+ <testsuite name="teambit.preview/preview@1.0.475" tests="1" failures="0" errors="0" skipped="0">
4
+ <testcase classname="dist/bundler/create-peer-link.spec.js" name="should output snapshot" time="0.004"/>
5
5
  </testsuite>
6
6
  </testsuites>
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.preview/preview-preview"]=t():e["teambit.preview/preview-preview"]=t()}(self,(()=>(()=>{"use strict";var e={28721:(e,t,n)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return o.default}});var o=r(n(43064));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.preview/aspect-docs/preview@0.0.168",homepage:"https://bit.cloud/teambit/preview/aspect-docs/preview",exported:!0}},43064:(e,t,n)=>{var o={id:"teambit.preview/aspect-docs/preview@0.0.168",homepage:"https://bit.cloud/teambit/preview/aspect-docs/preview",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=m,a(n(41594));var r=n(5016),i=["components"];function a(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(null,arguments)}function p(e,t){if(null==e)return{};var n,o,r=l(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function l(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}a.__bit_component=o,s.__bit_component=o,p.__bit_component=o,l.__bit_component=o;var d={},c="wrapper";function m(e){var t=e.components,n=p(e,i);return(0,r.mdx)(c,s({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("p",null,"The Preview aspect handles the bundling and rendering of component compositions and documentation, for the Workspace UI and Scope UI."),(0,r.mdx)("p",null,"Preview is used to display components in development (on ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit start"),") as well as in their released versions (assets for the release version are generated as part of the build process)."),(0,r.mdx)("p",null,"The Preview aspect handles each component according to the configurations set by the environment that is used by that component. That means both the documentation and the component compositions will be bundled and displayed differently for different environments."),(0,r.mdx)("h2",null,"Rational"),(0,r.mdx)("p",null,"In a standard web application, UI components ",(0,r.mdx)("em",{parentName:"p"},"serving the same application")," are bundled together to produce the necessary assets to make them renderable by the browser."),(0,r.mdx)("p",null,"Components in a Bit workspace are not all in the service of the same application. Each component is authored, tagged and exported as an independent component.\nThat means a few things:"),(0,r.mdx)("ol",null,(0,r.mdx)("li",{parentName:"ol"},(0,r.mdx)("p",{parentName:"li"},"Components in a Bit workspace are not consumed ,directly or indirectly, by a single entry file (e.g, the app's ",(0,r.mdx)("inlineCode",{parentName:"p"},"index.js"),"). That makes it impossible for the bundler to follow the files needed to be bundled.")),(0,r.mdx)("li",{parentName:"ol"},(0,r.mdx)("p",{parentName:"li"},"Different components in a single workspace may be implemented using different technologies and bundled using different configurations or even different bundlers."))),(0,r.mdx)("p",null,"Preview solves the above challenges by creating a temporary entry file for each group of components using the same environment.\nIt then serves this file to the Bundler, to be bundled according to the environment and the purpose of bundling. That is, to display components in development or to display the components' release versions (for a \"production-level\" exhibition of the component's documentation and compositions)."),(0,r.mdx)("h2",null,"Usage"),(0,r.mdx)("h3",null,"Extending the Preview aspect"),(0,r.mdx)("p",null,"The preview aspect can be extended to generate other renderable artifacts , either when running Bit's development server or as part of the build pipeline (for a component's tagged version).\nThese artifacts can present additional information that assists in inspecting a component (for example, showing the results of accessibility tests)."))}m.__bit_component=o,m.isMDXComponent=!0},3848:(e,t,n)=>{var o={id:"teambit.preview/preview@1.0.473",homepage:"https://bit.cloud/teambit/preview/preview",exported:!0};function r(){const e=i(n(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=o,i.__bit_component=o;const a=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/preview.svg"}));a.__bit_component=o,t.Logo=a},5016:e=>{e.exports=MdxJsReact},41594:e=>{e.exports=React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};n.r(o),n.d(o,{compositions:()=>f,compositions_metadata:()=>b,overview:()=>v});var r={};n.r(r),n.d(r,{default:()=>u});var i=n(3848),a=(n(41594),n(5016));const s=TeambitMdxUiMdxScopeContext;var p=n(28721),l=["components"];function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},d.apply(null,arguments)}var c={},m="wrapper";function u(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,l);return(0,a.mdx)(m,d({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)(s.MDXScopeProvider,{components:{Preview:p.l},mdxType:"MDXScopeProvider"},(0,a.mdx)(p.l,{mdxType:"Preview"})))}u.isMDXComponent=!0;const f=[i],v=[r],b={compositions:[{displayName:"Logo",identifier:"Logo"}]};return o})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.preview/preview-preview"]=t():e["teambit.preview/preview-preview"]=t()}(self,(()=>(()=>{"use strict";var e={28721:(e,t,n)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return o.default}});var o=r(n(43064));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.preview/aspect-docs/preview@0.0.168",homepage:"https://bit.cloud/teambit/preview/aspect-docs/preview",exported:!0}},43064:(e,t,n)=>{var o={id:"teambit.preview/aspect-docs/preview@0.0.168",homepage:"https://bit.cloud/teambit/preview/aspect-docs/preview",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=m,a(n(41594));var r=n(5016),i=["components"];function a(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(null,arguments)}function p(e,t){if(null==e)return{};var n,o,r=l(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function l(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}a.__bit_component=o,s.__bit_component=o,p.__bit_component=o,l.__bit_component=o;var d={},c="wrapper";function m(e){var t=e.components,n=p(e,i);return(0,r.mdx)(c,s({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("p",null,"The Preview aspect handles the bundling and rendering of component compositions and documentation, for the Workspace UI and Scope UI."),(0,r.mdx)("p",null,"Preview is used to display components in development (on ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit start"),") as well as in their released versions (assets for the release version are generated as part of the build process)."),(0,r.mdx)("p",null,"The Preview aspect handles each component according to the configurations set by the environment that is used by that component. That means both the documentation and the component compositions will be bundled and displayed differently for different environments."),(0,r.mdx)("h2",null,"Rational"),(0,r.mdx)("p",null,"In a standard web application, UI components ",(0,r.mdx)("em",{parentName:"p"},"serving the same application")," are bundled together to produce the necessary assets to make them renderable by the browser."),(0,r.mdx)("p",null,"Components in a Bit workspace are not all in the service of the same application. Each component is authored, tagged and exported as an independent component.\nThat means a few things:"),(0,r.mdx)("ol",null,(0,r.mdx)("li",{parentName:"ol"},(0,r.mdx)("p",{parentName:"li"},"Components in a Bit workspace are not consumed ,directly or indirectly, by a single entry file (e.g, the app's ",(0,r.mdx)("inlineCode",{parentName:"p"},"index.js"),"). That makes it impossible for the bundler to follow the files needed to be bundled.")),(0,r.mdx)("li",{parentName:"ol"},(0,r.mdx)("p",{parentName:"li"},"Different components in a single workspace may be implemented using different technologies and bundled using different configurations or even different bundlers."))),(0,r.mdx)("p",null,"Preview solves the above challenges by creating a temporary entry file for each group of components using the same environment.\nIt then serves this file to the Bundler, to be bundled according to the environment and the purpose of bundling. That is, to display components in development or to display the components' release versions (for a \"production-level\" exhibition of the component's documentation and compositions)."),(0,r.mdx)("h2",null,"Usage"),(0,r.mdx)("h3",null,"Extending the Preview aspect"),(0,r.mdx)("p",null,"The preview aspect can be extended to generate other renderable artifacts , either when running Bit's development server or as part of the build pipeline (for a component's tagged version).\nThese artifacts can present additional information that assists in inspecting a component (for example, showing the results of accessibility tests)."))}m.__bit_component=o,m.isMDXComponent=!0},41982:(e,t,n)=>{var o={id:"teambit.preview/preview@1.0.475",homepage:"https://bit.cloud/teambit/preview/preview",exported:!0};function r(){const e=i(n(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=o,i.__bit_component=o;const a=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/preview.svg"}));a.__bit_component=o,t.Logo=a},5016:e=>{e.exports=MdxJsReact},41594:e=>{e.exports=React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};n.r(o),n.d(o,{compositions:()=>f,compositions_metadata:()=>b,overview:()=>v});var r={};n.r(r),n.d(r,{default:()=>u});var i=n(41982),a=(n(41594),n(5016));const s=TeambitMdxUiMdxScopeContext;var p=n(28721),l=["components"];function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},d.apply(null,arguments)}var c={},m="wrapper";function u(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,l);return(0,a.mdx)(m,d({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)(s.MDXScopeProvider,{components:{Preview:p.l},mdxType:"MDXScopeProvider"},(0,a.mdx)(p.l,{mdxType:"Preview"})))}u.isMDXComponent=!0;const f=[i],v=[r],b={compositions:[{displayName:"Logo",identifier:"Logo"}]};return o})()));
@@ -249,7 +249,7 @@
249
249
  "_legacy": {
250
250
  "scope": "teambit.preview",
251
251
  "name": "preview",
252
- "version": "1.0.473"
252
+ "version": "1.0.475"
253
253
  },
254
254
  "_scope": "teambit.preview"
255
255
  }
@@ -271,14 +271,14 @@
271
271
  "__schema": "InterfaceSchema",
272
272
  "location": {
273
273
  "filePath": "preview-env.ts",
274
- "line": 8,
274
+ "line": 9,
275
275
  "character": 1
276
276
  },
277
277
  "doc": {
278
278
  "__schema": "DocSchema",
279
279
  "location": {
280
280
  "filePath": "preview-env.ts",
281
- "line": 4,
281
+ "line": 5,
282
282
  "character": 1
283
283
  },
284
284
  "raw": "/**\n * interface for implementing component previews\n * using bit's development environments.\n */",
@@ -292,7 +292,7 @@
292
292
  "__schema": "FunctionLikeSchema",
293
293
  "location": {
294
294
  "filePath": "preview-env.ts",
295
- "line": 9,
295
+ "line": 10,
296
296
  "character": 3
297
297
  },
298
298
  "signature": "(method) PreviewEnv.preview(): EnvHandler<Preview>",
@@ -302,7 +302,7 @@
302
302
  "__schema": "TypeRefSchema",
303
303
  "location": {
304
304
  "filePath": "preview-env.ts",
305
- "line": 9,
305
+ "line": 10,
306
306
  "character": 14
307
307
  },
308
308
  "name": "EnvHandler",
@@ -311,7 +311,7 @@
311
311
  "__schema": "TypeRefSchema",
312
312
  "location": {
313
313
  "filePath": "preview-env.ts",
314
- "line": 9,
314
+ "line": 10,
315
315
  "character": 25
316
316
  },
317
317
  "name": "Preview"
@@ -331,22 +331,22 @@
331
331
  "line": 4,
332
332
  "character": 27
333
333
  },
334
- "signature": "type Preview = {\n getMounter: () => string;\n getDocsTemplate: () => string;\n getDevServer: (context: DevServerContext) => EnvHandler<DevServer> | AsyncEnvHandler<DevServer>;\n getBundler: (context: BundlerContext) => EnvHandler<Bundler> | AsyncEnvHandler<Bundler>;\n getDevEnvId: () => string;\n getHostDependencies: () => string[];\n}",
334
+ "signature": "type Preview = {\n getMounter: () => string;\n getDocsTemplate: () => string;\n getDevServer: (context: DevServerContext) => EnvHandler<DevServer> | AsyncEnvHandler<DevServer>;\n getBundler: (context: BundlerContext) => EnvHandler<Bundler> | AsyncEnvHandler<Bundler>;\n getDevEnvId: () => string;\n getHostDependencies: () => string[];\n getPreviewConfig: () => EnvPreviewConfig;\n}",
335
335
  "name": "Preview",
336
336
  "exportNode": {
337
337
  "__schema": "TypeSchema",
338
338
  "location": {
339
339
  "filePath": "preview-env.ts",
340
- "line": 12,
340
+ "line": 13,
341
341
  "character": 1
342
342
  },
343
- "signature": "type Preview = {\n getMounter: () => string;\n getDocsTemplate: () => string;\n getDevServer: (context: DevServerContext) => EnvHandler<DevServer> | AsyncEnvHandler<DevServer>;\n getBundler: (context: BundlerContext) => EnvHandler<Bundler> | AsyncEnvHandler<Bundler>;\n getDevEnvId: () => string;\n getHostDependencies: () => string[];\n}",
343
+ "signature": "type Preview = {\n getMounter: () => string;\n getDocsTemplate: () => string;\n getDevServer: (context: DevServerContext) => EnvHandler<DevServer> | AsyncEnvHandler<DevServer>;\n getBundler: (context: BundlerContext) => EnvHandler<Bundler> | AsyncEnvHandler<Bundler>;\n getDevEnvId: () => string;\n getHostDependencies: () => string[];\n getPreviewConfig: () => EnvPreviewConfig;\n}",
344
344
  "name": "Preview",
345
345
  "type": {
346
346
  "__schema": "TypeLiteralSchema",
347
347
  "location": {
348
348
  "filePath": "preview-env.ts",
349
- "line": 12,
349
+ "line": 13,
350
350
  "character": 23
351
351
  },
352
352
  "members": [
@@ -354,14 +354,14 @@
354
354
  "__schema": "VariableLikeSchema",
355
355
  "location": {
356
356
  "filePath": "preview-env.ts",
357
- "line": 16,
357
+ "line": 17,
358
358
  "character": 3
359
359
  },
360
360
  "doc": {
361
361
  "__schema": "DocSchema",
362
362
  "location": {
363
363
  "filePath": "preview-env.ts",
364
- "line": 13,
364
+ "line": 14,
365
365
  "character": 3
366
366
  },
367
367
  "raw": "/**\n * return an instance of a mounter.\n */",
@@ -374,7 +374,7 @@
374
374
  "__schema": "FunctionLikeSchema",
375
375
  "location": {
376
376
  "filePath": "preview-env.ts",
377
- "line": 16,
377
+ "line": 17,
378
378
  "character": 15
379
379
  },
380
380
  "signature": "(): string",
@@ -384,7 +384,7 @@
384
384
  "__schema": "KeywordTypeSchema",
385
385
  "location": {
386
386
  "filePath": "preview-env.ts",
387
- "line": 16,
387
+ "line": 17,
388
388
  "character": 21
389
389
  },
390
390
  "name": "string"
@@ -397,14 +397,14 @@
397
397
  "__schema": "VariableLikeSchema",
398
398
  "location": {
399
399
  "filePath": "preview-env.ts",
400
- "line": 21,
400
+ "line": 22,
401
401
  "character": 3
402
402
  },
403
403
  "doc": {
404
404
  "__schema": "DocSchema",
405
405
  "location": {
406
406
  "filePath": "preview-env.ts",
407
- "line": 18,
407
+ "line": 19,
408
408
  "character": 3
409
409
  },
410
410
  "raw": "/**\n * return a path to a docs template.\n */",
@@ -417,7 +417,7 @@
417
417
  "__schema": "FunctionLikeSchema",
418
418
  "location": {
419
419
  "filePath": "preview-env.ts",
420
- "line": 21,
420
+ "line": 22,
421
421
  "character": 20
422
422
  },
423
423
  "signature": "(): string",
@@ -427,7 +427,7 @@
427
427
  "__schema": "KeywordTypeSchema",
428
428
  "location": {
429
429
  "filePath": "preview-env.ts",
430
- "line": 21,
430
+ "line": 22,
431
431
  "character": 26
432
432
  },
433
433
  "name": "string"
@@ -440,14 +440,14 @@
440
440
  "__schema": "VariableLikeSchema",
441
441
  "location": {
442
442
  "filePath": "preview-env.ts",
443
- "line": 26,
443
+ "line": 27,
444
444
  "character": 3
445
445
  },
446
446
  "doc": {
447
447
  "__schema": "DocSchema",
448
448
  "location": {
449
449
  "filePath": "preview-env.ts",
450
- "line": 23,
450
+ "line": 24,
451
451
  "character": 3
452
452
  },
453
453
  "raw": "/**\n * return a dev server instance to use for previews.\n */",
@@ -460,7 +460,7 @@
460
460
  "__schema": "FunctionLikeSchema",
461
461
  "location": {
462
462
  "filePath": "preview-env.ts",
463
- "line": 26,
463
+ "line": 27,
464
464
  "character": 17
465
465
  },
466
466
  "signature": "(context: DevServerContext): EnvHandler<DevServer> | AsyncEnvHandler<DevServer>",
@@ -470,7 +470,7 @@
470
470
  "__schema": "ParameterSchema",
471
471
  "location": {
472
472
  "filePath": "preview-env.ts",
473
- "line": 26,
473
+ "line": 27,
474
474
  "character": 18
475
475
  },
476
476
  "name": "context",
@@ -478,7 +478,7 @@
478
478
  "__schema": "TypeRefSchema",
479
479
  "location": {
480
480
  "filePath": "preview-env.ts",
481
- "line": 26,
481
+ "line": 27,
482
482
  "character": 27
483
483
  },
484
484
  "name": "DevServerContext"
@@ -491,7 +491,7 @@
491
491
  "__schema": "TypeUnionSchema",
492
492
  "location": {
493
493
  "filePath": "preview-env.ts",
494
- "line": 26,
494
+ "line": 27,
495
495
  "character": 48
496
496
  },
497
497
  "types": [
@@ -499,7 +499,7 @@
499
499
  "__schema": "TypeRefSchema",
500
500
  "location": {
501
501
  "filePath": "preview-env.ts",
502
- "line": 26,
502
+ "line": 27,
503
503
  "character": 48
504
504
  },
505
505
  "name": "EnvHandler",
@@ -508,7 +508,7 @@
508
508
  "__schema": "TypeRefSchema",
509
509
  "location": {
510
510
  "filePath": "preview-env.ts",
511
- "line": 26,
511
+ "line": 27,
512
512
  "character": 59
513
513
  },
514
514
  "name": "DevServer"
@@ -519,7 +519,7 @@
519
519
  "__schema": "TypeRefSchema",
520
520
  "location": {
521
521
  "filePath": "preview-env.ts",
522
- "line": 26,
522
+ "line": 27,
523
523
  "character": 72
524
524
  },
525
525
  "name": "AsyncEnvHandler",
@@ -528,7 +528,7 @@
528
528
  "__schema": "TypeRefSchema",
529
529
  "location": {
530
530
  "filePath": "preview-env.ts",
531
- "line": 26,
531
+ "line": 27,
532
532
  "character": 88
533
533
  },
534
534
  "name": "DevServer"
@@ -545,14 +545,14 @@
545
545
  "__schema": "VariableLikeSchema",
546
546
  "location": {
547
547
  "filePath": "preview-env.ts",
548
- "line": 31,
548
+ "line": 32,
549
549
  "character": 3
550
550
  },
551
551
  "doc": {
552
552
  "__schema": "DocSchema",
553
553
  "location": {
554
554
  "filePath": "preview-env.ts",
555
- "line": 28,
555
+ "line": 29,
556
556
  "character": 3
557
557
  },
558
558
  "raw": "/**\n * return an instance for a preview bundler.\n */",
@@ -565,7 +565,7 @@
565
565
  "__schema": "FunctionLikeSchema",
566
566
  "location": {
567
567
  "filePath": "preview-env.ts",
568
- "line": 31,
568
+ "line": 32,
569
569
  "character": 15
570
570
  },
571
571
  "signature": "(context: BundlerContext): EnvHandler<Bundler> | AsyncEnvHandler<Bundler>",
@@ -575,7 +575,7 @@
575
575
  "__schema": "ParameterSchema",
576
576
  "location": {
577
577
  "filePath": "preview-env.ts",
578
- "line": 31,
578
+ "line": 32,
579
579
  "character": 16
580
580
  },
581
581
  "name": "context",
@@ -583,7 +583,7 @@
583
583
  "__schema": "TypeRefSchema",
584
584
  "location": {
585
585
  "filePath": "preview-env.ts",
586
- "line": 31,
586
+ "line": 32,
587
587
  "character": 25
588
588
  },
589
589
  "name": "BundlerContext"
@@ -596,7 +596,7 @@
596
596
  "__schema": "TypeUnionSchema",
597
597
  "location": {
598
598
  "filePath": "preview-env.ts",
599
- "line": 31,
599
+ "line": 32,
600
600
  "character": 44
601
601
  },
602
602
  "types": [
@@ -604,7 +604,7 @@
604
604
  "__schema": "TypeRefSchema",
605
605
  "location": {
606
606
  "filePath": "preview-env.ts",
607
- "line": 31,
607
+ "line": 32,
608
608
  "character": 44
609
609
  },
610
610
  "name": "EnvHandler",
@@ -613,7 +613,7 @@
613
613
  "__schema": "TypeRefSchema",
614
614
  "location": {
615
615
  "filePath": "preview-env.ts",
616
- "line": 31,
616
+ "line": 32,
617
617
  "character": 55
618
618
  },
619
619
  "name": "Bundler"
@@ -624,7 +624,7 @@
624
624
  "__schema": "TypeRefSchema",
625
625
  "location": {
626
626
  "filePath": "preview-env.ts",
627
- "line": 31,
627
+ "line": 32,
628
628
  "character": 66
629
629
  },
630
630
  "name": "AsyncEnvHandler",
@@ -633,7 +633,7 @@
633
633
  "__schema": "TypeRefSchema",
634
634
  "location": {
635
635
  "filePath": "preview-env.ts",
636
- "line": 31,
636
+ "line": 32,
637
637
  "character": 82
638
638
  },
639
639
  "name": "Bundler"
@@ -650,14 +650,14 @@
650
650
  "__schema": "VariableLikeSchema",
651
651
  "location": {
652
652
  "filePath": "preview-env.ts",
653
- "line": 37,
653
+ "line": 38,
654
654
  "character": 3
655
655
  },
656
656
  "doc": {
657
657
  "__schema": "DocSchema",
658
658
  "location": {
659
659
  "filePath": "preview-env.ts",
660
- "line": 33,
660
+ "line": 34,
661
661
  "character": 3
662
662
  },
663
663
  "raw": "/**\n * return the id of the dev server.\n * used for deduplication of dev servers\n */",
@@ -670,7 +670,7 @@
670
670
  "__schema": "FunctionLikeSchema",
671
671
  "location": {
672
672
  "filePath": "preview-env.ts",
673
- "line": 37,
673
+ "line": 38,
674
674
  "character": 16
675
675
  },
676
676
  "signature": "(): string",
@@ -680,7 +680,7 @@
680
680
  "__schema": "KeywordTypeSchema",
681
681
  "location": {
682
682
  "filePath": "preview-env.ts",
683
- "line": 37,
683
+ "line": 38,
684
684
  "character": 22
685
685
  },
686
686
  "name": "string"
@@ -693,14 +693,14 @@
693
693
  "__schema": "VariableLikeSchema",
694
694
  "location": {
695
695
  "filePath": "preview-env.ts",
696
- "line": 45,
696
+ "line": 46,
697
697
  "character": 3
698
698
  },
699
699
  "doc": {
700
700
  "__schema": "DocSchema",
701
701
  "location": {
702
702
  "filePath": "preview-env.ts",
703
- "line": 39,
703
+ "line": 40,
704
704
  "character": 3
705
705
  },
706
706
  "raw": "/**\n * dependencies that will bundled as part of the env template and will configured as externals for the component bundle\n * these dependencies will be available in the preview on the window.\n * these dependencies will have only one instance on the page.\n * for dev server these dependencies will be aliased\n */",
@@ -713,7 +713,7 @@
713
713
  "__schema": "FunctionLikeSchema",
714
714
  "location": {
715
715
  "filePath": "preview-env.ts",
716
- "line": 45,
716
+ "line": 46,
717
717
  "character": 24
718
718
  },
719
719
  "signature": "(): string[]",
@@ -723,14 +723,14 @@
723
723
  "__schema": "TypeArraySchema",
724
724
  "location": {
725
725
  "filePath": "preview-env.ts",
726
- "line": 45,
726
+ "line": 46,
727
727
  "character": 30
728
728
  },
729
729
  "type": {
730
730
  "__schema": "KeywordTypeSchema",
731
731
  "location": {
732
732
  "filePath": "preview-env.ts",
733
- "line": 45,
733
+ "line": 46,
734
734
  "character": 30
735
735
  },
736
736
  "name": "string"
@@ -739,6 +739,49 @@
739
739
  "modifiers": []
740
740
  },
741
741
  "isOptional": false
742
+ },
743
+ {
744
+ "__schema": "VariableLikeSchema",
745
+ "location": {
746
+ "filePath": "preview-env.ts",
747
+ "line": 51,
748
+ "character": 3
749
+ },
750
+ "doc": {
751
+ "__schema": "DocSchema",
752
+ "location": {
753
+ "filePath": "preview-env.ts",
754
+ "line": 48,
755
+ "character": 3
756
+ },
757
+ "raw": "/**\n * Returns preview config like the strategy name to use when bundling the components for the preview\n */",
758
+ "comment": "Returns preview config like the strategy name to use when bundling the components for the preview",
759
+ "tags": []
760
+ },
761
+ "signature": "(property) getPreviewConfig: () => EnvPreviewConfig",
762
+ "name": "getPreviewConfig",
763
+ "type": {
764
+ "__schema": "FunctionLikeSchema",
765
+ "location": {
766
+ "filePath": "preview-env.ts",
767
+ "line": 51,
768
+ "character": 21
769
+ },
770
+ "signature": "(): EnvPreviewConfig",
771
+ "name": "",
772
+ "params": [],
773
+ "returnType": {
774
+ "__schema": "TypeRefSchema",
775
+ "location": {
776
+ "filePath": "preview-env.ts",
777
+ "line": 51,
778
+ "character": 27
779
+ },
780
+ "name": "EnvPreviewConfig"
781
+ },
782
+ "modifiers": []
783
+ },
784
+ "isOptional": false
742
785
  }
743
786
  ]
744
787
  }
@@ -6638,7 +6681,7 @@
6638
6681
  "_legacy": {
6639
6682
  "scope": "teambit.preview",
6640
6683
  "name": "preview",
6641
- "version": "1.0.473"
6684
+ "version": "1.0.475"
6642
6685
  },
6643
6686
  "_scope": "teambit.preview"
6644
6687
  }
@@ -6719,14 +6762,14 @@
6719
6762
  "__schema": "InterfaceSchema",
6720
6763
  "location": {
6721
6764
  "filePath": "preview-env.ts",
6722
- "line": 8,
6765
+ "line": 9,
6723
6766
  "character": 1
6724
6767
  },
6725
6768
  "doc": {
6726
6769
  "__schema": "DocSchema",
6727
6770
  "location": {
6728
6771
  "filePath": "preview-env.ts",
6729
- "line": 4,
6772
+ "line": 5,
6730
6773
  "character": 1
6731
6774
  },
6732
6775
  "raw": "/**\n * interface for implementing component previews\n * using bit's development environments.\n */",
@@ -6740,7 +6783,7 @@
6740
6783
  "__schema": "FunctionLikeSchema",
6741
6784
  "location": {
6742
6785
  "filePath": "preview-env.ts",
6743
- "line": 9,
6786
+ "line": 10,
6744
6787
  "character": 3
6745
6788
  },
6746
6789
  "signature": "(method) PreviewEnv.preview(): EnvHandler<Preview>",
@@ -6750,7 +6793,7 @@
6750
6793
  "__schema": "TypeRefSchema",
6751
6794
  "location": {
6752
6795
  "filePath": "preview-env.ts",
6753
- "line": 9,
6796
+ "line": 10,
6754
6797
  "character": 14
6755
6798
  },
6756
6799
  "name": "EnvHandler",
@@ -6759,7 +6802,7 @@
6759
6802
  "__schema": "TypeRefSchema",
6760
6803
  "location": {
6761
6804
  "filePath": "preview-env.ts",
6762
- "line": 9,
6805
+ "line": 10,
6763
6806
  "character": 25
6764
6807
  },
6765
6808
  "name": "Preview"
@@ -6775,16 +6818,16 @@
6775
6818
  "__schema": "TypeSchema",
6776
6819
  "location": {
6777
6820
  "filePath": "preview-env.ts",
6778
- "line": 12,
6821
+ "line": 13,
6779
6822
  "character": 1
6780
6823
  },
6781
- "signature": "type Preview = {\n getMounter: () => string;\n getDocsTemplate: () => string;\n getDevServer: (context: DevServerContext) => EnvHandler<DevServer> | AsyncEnvHandler<DevServer>;\n getBundler: (context: BundlerContext) => EnvHandler<Bundler> | AsyncEnvHandler<Bundler>;\n getDevEnvId: () => string;\n getHostDependencies: () => string[];\n}",
6824
+ "signature": "type Preview = {\n getMounter: () => string;\n getDocsTemplate: () => string;\n getDevServer: (context: DevServerContext) => EnvHandler<DevServer> | AsyncEnvHandler<DevServer>;\n getBundler: (context: BundlerContext) => EnvHandler<Bundler> | AsyncEnvHandler<Bundler>;\n getDevEnvId: () => string;\n getHostDependencies: () => string[];\n getPreviewConfig: () => EnvPreviewConfig;\n}",
6782
6825
  "name": "Preview",
6783
6826
  "type": {
6784
6827
  "__schema": "TypeLiteralSchema",
6785
6828
  "location": {
6786
6829
  "filePath": "preview-env.ts",
6787
- "line": 12,
6830
+ "line": 13,
6788
6831
  "character": 23
6789
6832
  },
6790
6833
  "members": [
@@ -6792,14 +6835,14 @@
6792
6835
  "__schema": "VariableLikeSchema",
6793
6836
  "location": {
6794
6837
  "filePath": "preview-env.ts",
6795
- "line": 16,
6838
+ "line": 17,
6796
6839
  "character": 3
6797
6840
  },
6798
6841
  "doc": {
6799
6842
  "__schema": "DocSchema",
6800
6843
  "location": {
6801
6844
  "filePath": "preview-env.ts",
6802
- "line": 13,
6845
+ "line": 14,
6803
6846
  "character": 3
6804
6847
  },
6805
6848
  "raw": "/**\n * return an instance of a mounter.\n */",
@@ -6812,7 +6855,7 @@
6812
6855
  "__schema": "FunctionLikeSchema",
6813
6856
  "location": {
6814
6857
  "filePath": "preview-env.ts",
6815
- "line": 16,
6858
+ "line": 17,
6816
6859
  "character": 15
6817
6860
  },
6818
6861
  "signature": "(): string",
@@ -6822,7 +6865,7 @@
6822
6865
  "__schema": "KeywordTypeSchema",
6823
6866
  "location": {
6824
6867
  "filePath": "preview-env.ts",
6825
- "line": 16,
6868
+ "line": 17,
6826
6869
  "character": 21
6827
6870
  },
6828
6871
  "name": "string"
@@ -6835,14 +6878,14 @@
6835
6878
  "__schema": "VariableLikeSchema",
6836
6879
  "location": {
6837
6880
  "filePath": "preview-env.ts",
6838
- "line": 21,
6881
+ "line": 22,
6839
6882
  "character": 3
6840
6883
  },
6841
6884
  "doc": {
6842
6885
  "__schema": "DocSchema",
6843
6886
  "location": {
6844
6887
  "filePath": "preview-env.ts",
6845
- "line": 18,
6888
+ "line": 19,
6846
6889
  "character": 3
6847
6890
  },
6848
6891
  "raw": "/**\n * return a path to a docs template.\n */",
@@ -6855,7 +6898,7 @@
6855
6898
  "__schema": "FunctionLikeSchema",
6856
6899
  "location": {
6857
6900
  "filePath": "preview-env.ts",
6858
- "line": 21,
6901
+ "line": 22,
6859
6902
  "character": 20
6860
6903
  },
6861
6904
  "signature": "(): string",
@@ -6865,7 +6908,7 @@
6865
6908
  "__schema": "KeywordTypeSchema",
6866
6909
  "location": {
6867
6910
  "filePath": "preview-env.ts",
6868
- "line": 21,
6911
+ "line": 22,
6869
6912
  "character": 26
6870
6913
  },
6871
6914
  "name": "string"
@@ -6878,14 +6921,14 @@
6878
6921
  "__schema": "VariableLikeSchema",
6879
6922
  "location": {
6880
6923
  "filePath": "preview-env.ts",
6881
- "line": 26,
6924
+ "line": 27,
6882
6925
  "character": 3
6883
6926
  },
6884
6927
  "doc": {
6885
6928
  "__schema": "DocSchema",
6886
6929
  "location": {
6887
6930
  "filePath": "preview-env.ts",
6888
- "line": 23,
6931
+ "line": 24,
6889
6932
  "character": 3
6890
6933
  },
6891
6934
  "raw": "/**\n * return a dev server instance to use for previews.\n */",
@@ -6898,7 +6941,7 @@
6898
6941
  "__schema": "FunctionLikeSchema",
6899
6942
  "location": {
6900
6943
  "filePath": "preview-env.ts",
6901
- "line": 26,
6944
+ "line": 27,
6902
6945
  "character": 17
6903
6946
  },
6904
6947
  "signature": "(context: DevServerContext): EnvHandler<DevServer> | AsyncEnvHandler<DevServer>",
@@ -6908,7 +6951,7 @@
6908
6951
  "__schema": "ParameterSchema",
6909
6952
  "location": {
6910
6953
  "filePath": "preview-env.ts",
6911
- "line": 26,
6954
+ "line": 27,
6912
6955
  "character": 18
6913
6956
  },
6914
6957
  "name": "context",
@@ -6916,7 +6959,7 @@
6916
6959
  "__schema": "TypeRefSchema",
6917
6960
  "location": {
6918
6961
  "filePath": "preview-env.ts",
6919
- "line": 26,
6962
+ "line": 27,
6920
6963
  "character": 27
6921
6964
  },
6922
6965
  "name": "DevServerContext"
@@ -6929,7 +6972,7 @@
6929
6972
  "__schema": "TypeUnionSchema",
6930
6973
  "location": {
6931
6974
  "filePath": "preview-env.ts",
6932
- "line": 26,
6975
+ "line": 27,
6933
6976
  "character": 48
6934
6977
  },
6935
6978
  "types": [
@@ -6937,7 +6980,7 @@
6937
6980
  "__schema": "TypeRefSchema",
6938
6981
  "location": {
6939
6982
  "filePath": "preview-env.ts",
6940
- "line": 26,
6983
+ "line": 27,
6941
6984
  "character": 48
6942
6985
  },
6943
6986
  "name": "EnvHandler",
@@ -6946,7 +6989,7 @@
6946
6989
  "__schema": "TypeRefSchema",
6947
6990
  "location": {
6948
6991
  "filePath": "preview-env.ts",
6949
- "line": 26,
6992
+ "line": 27,
6950
6993
  "character": 59
6951
6994
  },
6952
6995
  "name": "DevServer"
@@ -6957,7 +7000,7 @@
6957
7000
  "__schema": "TypeRefSchema",
6958
7001
  "location": {
6959
7002
  "filePath": "preview-env.ts",
6960
- "line": 26,
7003
+ "line": 27,
6961
7004
  "character": 72
6962
7005
  },
6963
7006
  "name": "AsyncEnvHandler",
@@ -6966,7 +7009,7 @@
6966
7009
  "__schema": "TypeRefSchema",
6967
7010
  "location": {
6968
7011
  "filePath": "preview-env.ts",
6969
- "line": 26,
7012
+ "line": 27,
6970
7013
  "character": 88
6971
7014
  },
6972
7015
  "name": "DevServer"
@@ -6983,14 +7026,14 @@
6983
7026
  "__schema": "VariableLikeSchema",
6984
7027
  "location": {
6985
7028
  "filePath": "preview-env.ts",
6986
- "line": 31,
7029
+ "line": 32,
6987
7030
  "character": 3
6988
7031
  },
6989
7032
  "doc": {
6990
7033
  "__schema": "DocSchema",
6991
7034
  "location": {
6992
7035
  "filePath": "preview-env.ts",
6993
- "line": 28,
7036
+ "line": 29,
6994
7037
  "character": 3
6995
7038
  },
6996
7039
  "raw": "/**\n * return an instance for a preview bundler.\n */",
@@ -7003,7 +7046,7 @@
7003
7046
  "__schema": "FunctionLikeSchema",
7004
7047
  "location": {
7005
7048
  "filePath": "preview-env.ts",
7006
- "line": 31,
7049
+ "line": 32,
7007
7050
  "character": 15
7008
7051
  },
7009
7052
  "signature": "(context: BundlerContext): EnvHandler<Bundler> | AsyncEnvHandler<Bundler>",
@@ -7013,7 +7056,7 @@
7013
7056
  "__schema": "ParameterSchema",
7014
7057
  "location": {
7015
7058
  "filePath": "preview-env.ts",
7016
- "line": 31,
7059
+ "line": 32,
7017
7060
  "character": 16
7018
7061
  },
7019
7062
  "name": "context",
@@ -7021,7 +7064,7 @@
7021
7064
  "__schema": "TypeRefSchema",
7022
7065
  "location": {
7023
7066
  "filePath": "preview-env.ts",
7024
- "line": 31,
7067
+ "line": 32,
7025
7068
  "character": 25
7026
7069
  },
7027
7070
  "name": "BundlerContext"
@@ -7034,7 +7077,7 @@
7034
7077
  "__schema": "TypeUnionSchema",
7035
7078
  "location": {
7036
7079
  "filePath": "preview-env.ts",
7037
- "line": 31,
7080
+ "line": 32,
7038
7081
  "character": 44
7039
7082
  },
7040
7083
  "types": [
@@ -7042,7 +7085,7 @@
7042
7085
  "__schema": "TypeRefSchema",
7043
7086
  "location": {
7044
7087
  "filePath": "preview-env.ts",
7045
- "line": 31,
7088
+ "line": 32,
7046
7089
  "character": 44
7047
7090
  },
7048
7091
  "name": "EnvHandler",
@@ -7051,7 +7094,7 @@
7051
7094
  "__schema": "TypeRefSchema",
7052
7095
  "location": {
7053
7096
  "filePath": "preview-env.ts",
7054
- "line": 31,
7097
+ "line": 32,
7055
7098
  "character": 55
7056
7099
  },
7057
7100
  "name": "Bundler"
@@ -7062,7 +7105,7 @@
7062
7105
  "__schema": "TypeRefSchema",
7063
7106
  "location": {
7064
7107
  "filePath": "preview-env.ts",
7065
- "line": 31,
7108
+ "line": 32,
7066
7109
  "character": 66
7067
7110
  },
7068
7111
  "name": "AsyncEnvHandler",
@@ -7071,7 +7114,7 @@
7071
7114
  "__schema": "TypeRefSchema",
7072
7115
  "location": {
7073
7116
  "filePath": "preview-env.ts",
7074
- "line": 31,
7117
+ "line": 32,
7075
7118
  "character": 82
7076
7119
  },
7077
7120
  "name": "Bundler"
@@ -7088,14 +7131,14 @@
7088
7131
  "__schema": "VariableLikeSchema",
7089
7132
  "location": {
7090
7133
  "filePath": "preview-env.ts",
7091
- "line": 37,
7134
+ "line": 38,
7092
7135
  "character": 3
7093
7136
  },
7094
7137
  "doc": {
7095
7138
  "__schema": "DocSchema",
7096
7139
  "location": {
7097
7140
  "filePath": "preview-env.ts",
7098
- "line": 33,
7141
+ "line": 34,
7099
7142
  "character": 3
7100
7143
  },
7101
7144
  "raw": "/**\n * return the id of the dev server.\n * used for deduplication of dev servers\n */",
@@ -7108,7 +7151,7 @@
7108
7151
  "__schema": "FunctionLikeSchema",
7109
7152
  "location": {
7110
7153
  "filePath": "preview-env.ts",
7111
- "line": 37,
7154
+ "line": 38,
7112
7155
  "character": 16
7113
7156
  },
7114
7157
  "signature": "(): string",
@@ -7118,7 +7161,7 @@
7118
7161
  "__schema": "KeywordTypeSchema",
7119
7162
  "location": {
7120
7163
  "filePath": "preview-env.ts",
7121
- "line": 37,
7164
+ "line": 38,
7122
7165
  "character": 22
7123
7166
  },
7124
7167
  "name": "string"
@@ -7131,14 +7174,14 @@
7131
7174
  "__schema": "VariableLikeSchema",
7132
7175
  "location": {
7133
7176
  "filePath": "preview-env.ts",
7134
- "line": 45,
7177
+ "line": 46,
7135
7178
  "character": 3
7136
7179
  },
7137
7180
  "doc": {
7138
7181
  "__schema": "DocSchema",
7139
7182
  "location": {
7140
7183
  "filePath": "preview-env.ts",
7141
- "line": 39,
7184
+ "line": 40,
7142
7185
  "character": 3
7143
7186
  },
7144
7187
  "raw": "/**\n * dependencies that will bundled as part of the env template and will configured as externals for the component bundle\n * these dependencies will be available in the preview on the window.\n * these dependencies will have only one instance on the page.\n * for dev server these dependencies will be aliased\n */",
@@ -7151,7 +7194,7 @@
7151
7194
  "__schema": "FunctionLikeSchema",
7152
7195
  "location": {
7153
7196
  "filePath": "preview-env.ts",
7154
- "line": 45,
7197
+ "line": 46,
7155
7198
  "character": 24
7156
7199
  },
7157
7200
  "signature": "(): string[]",
@@ -7161,14 +7204,14 @@
7161
7204
  "__schema": "TypeArraySchema",
7162
7205
  "location": {
7163
7206
  "filePath": "preview-env.ts",
7164
- "line": 45,
7207
+ "line": 46,
7165
7208
  "character": 30
7166
7209
  },
7167
7210
  "type": {
7168
7211
  "__schema": "KeywordTypeSchema",
7169
7212
  "location": {
7170
7213
  "filePath": "preview-env.ts",
7171
- "line": 45,
7214
+ "line": 46,
7172
7215
  "character": 30
7173
7216
  },
7174
7217
  "name": "string"
@@ -7177,6 +7220,49 @@
7177
7220
  "modifiers": []
7178
7221
  },
7179
7222
  "isOptional": false
7223
+ },
7224
+ {
7225
+ "__schema": "VariableLikeSchema",
7226
+ "location": {
7227
+ "filePath": "preview-env.ts",
7228
+ "line": 51,
7229
+ "character": 3
7230
+ },
7231
+ "doc": {
7232
+ "__schema": "DocSchema",
7233
+ "location": {
7234
+ "filePath": "preview-env.ts",
7235
+ "line": 48,
7236
+ "character": 3
7237
+ },
7238
+ "raw": "/**\n * Returns preview config like the strategy name to use when bundling the components for the preview\n */",
7239
+ "comment": "Returns preview config like the strategy name to use when bundling the components for the preview",
7240
+ "tags": []
7241
+ },
7242
+ "signature": "(property) getPreviewConfig: () => EnvPreviewConfig",
7243
+ "name": "getPreviewConfig",
7244
+ "type": {
7245
+ "__schema": "FunctionLikeSchema",
7246
+ "location": {
7247
+ "filePath": "preview-env.ts",
7248
+ "line": 51,
7249
+ "character": 21
7250
+ },
7251
+ "signature": "(): EnvPreviewConfig",
7252
+ "name": "",
7253
+ "params": [],
7254
+ "returnType": {
7255
+ "__schema": "TypeRefSchema",
7256
+ "location": {
7257
+ "filePath": "preview-env.ts",
7258
+ "line": 51,
7259
+ "character": 27
7260
+ },
7261
+ "name": "EnvPreviewConfig"
7262
+ },
7263
+ "modifiers": []
7264
+ },
7265
+ "isOptional": false
7180
7266
  }
7181
7267
  ]
7182
7268
  }
@@ -13699,7 +13785,7 @@
13699
13785
  "componentId": {
13700
13786
  "scope": "teambit.preview",
13701
13787
  "name": "preview",
13702
- "version": "1.0.473"
13788
+ "version": "1.0.475"
13703
13789
  },
13704
13790
  "taggedModuleExports": []
13705
13791
  }
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.473/dist/preview.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.473/dist/preview.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.475/dist/preview.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.475/dist/preview.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -1,5 +1,6 @@
1
1
  import { Bundler, BundlerContext, DevServer, DevServerContext } from '@teambit/bundler';
2
2
  import { AsyncEnvHandler, EnvHandler } from '@teambit/envs';
3
+ import { EnvPreviewConfig } from './preview.main.runtime';
3
4
  /**
4
5
  * interface for implementing component previews
5
6
  * using bit's development environments.
@@ -36,4 +37,8 @@ export type Preview = {
36
37
  * for dev server these dependencies will be aliased
37
38
  */
38
39
  getHostDependencies: () => string[];
40
+ /**
41
+ * Returns preview config like the strategy name to use when bundling the components for the preview
42
+ */
43
+ getPreviewConfig: () => EnvPreviewConfig;
39
44
  };
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["preview-env.ts"],"sourcesContent":["import { Bundler, BundlerContext, DevServer, DevServerContext } from '@teambit/bundler';\nimport { AsyncEnvHandler, EnvHandler } from '@teambit/envs';\n\n/**\n * interface for implementing component previews\n * using bit's development environments.\n */\nexport interface PreviewEnv {\n preview(): EnvHandler<Preview>;\n}\n\nexport type Preview = {\n /**\n * return an instance of a mounter.\n */\n getMounter: () => string;\n\n /**\n * return a path to a docs template.\n */\n getDocsTemplate: () => string;\n\n /**\n * return a dev server instance to use for previews.\n */\n getDevServer: (context: DevServerContext) => EnvHandler<DevServer> | AsyncEnvHandler<DevServer>;\n\n /**\n * return an instance for a preview bundler.\n */\n getBundler: (context: BundlerContext) => EnvHandler<Bundler> | AsyncEnvHandler<Bundler>;\n\n /**\n * return the id of the dev server.\n * used for deduplication of dev servers\n */\n getDevEnvId: () => string;\n\n /**\n * dependencies that will bundled as part of the env template and will configured as externals for the component bundle\n * these dependencies will be available in the preview on the window.\n * these dependencies will have only one instance on the page.\n * for dev server these dependencies will be aliased\n */\n getHostDependencies: () => string[];\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["preview-env.ts"],"sourcesContent":["import { Bundler, BundlerContext, DevServer, DevServerContext } from '@teambit/bundler';\nimport { AsyncEnvHandler, EnvHandler } from '@teambit/envs';\nimport { EnvPreviewConfig } from './preview.main.runtime';\n\n/**\n * interface for implementing component previews\n * using bit's development environments.\n */\nexport interface PreviewEnv {\n preview(): EnvHandler<Preview>;\n}\n\nexport type Preview = {\n /**\n * return an instance of a mounter.\n */\n getMounter: () => string;\n\n /**\n * return a path to a docs template.\n */\n getDocsTemplate: () => string;\n\n /**\n * return a dev server instance to use for previews.\n */\n getDevServer: (context: DevServerContext) => EnvHandler<DevServer> | AsyncEnvHandler<DevServer>;\n\n /**\n * return an instance for a preview bundler.\n */\n getBundler: (context: BundlerContext) => EnvHandler<Bundler> | AsyncEnvHandler<Bundler>;\n\n /**\n * return the id of the dev server.\n * used for deduplication of dev servers\n */\n getDevEnvId: () => string;\n\n /**\n * dependencies that will bundled as part of the env template and will configured as externals for the component bundle\n * these dependencies will be available in the preview on the window.\n * these dependencies will have only one instance on the page.\n * for dev server these dependencies will be aliased\n */\n getHostDependencies: () => string[];\n\n /**\n * Returns preview config like the strategy name to use when bundling the components for the preview\n */\n getPreviewConfig: () => EnvPreviewConfig;\n};\n"],"mappings":"","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/preview",
3
- "version": "1.0.473",
3
+ "version": "1.0.475",
4
4
  "homepage": "https://bit.cloud/teambit/preview/preview",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.preview",
8
8
  "name": "preview",
9
- "version": "1.0.473"
9
+ "version": "1.0.475"
10
10
  },
11
11
  "dependencies": {
12
12
  "mime": "2.5.2",
@@ -31,35 +31,35 @@
31
31
  "@teambit/bit-error": "0.0.404",
32
32
  "@teambit/preview.cli.dev-server-events-listener": "0.0.1",
33
33
  "@teambit/react.webpack.react-webpack": "1.0.37",
34
- "@teambit/express": "0.0.1149",
35
- "@teambit/logger": "0.0.1143",
34
+ "@teambit/express": "0.0.1151",
35
+ "@teambit/logger": "0.0.1145",
36
36
  "@teambit/ui-foundation.ui.pages.static-error": "0.0.105",
37
- "@teambit/builder": "1.0.473",
38
- "@teambit/bundler": "1.0.473",
39
- "@teambit/component": "1.0.473",
37
+ "@teambit/builder": "1.0.475",
38
+ "@teambit/bundler": "1.0.475",
39
+ "@teambit/component": "1.0.475",
40
40
  "@teambit/preview.ui.component-preview": "1.0.16",
41
- "@teambit/aspect-loader": "1.0.473",
42
- "@teambit/cli": "0.0.1050",
43
- "@teambit/dependency-resolver": "1.0.473",
44
- "@teambit/envs": "1.0.473",
41
+ "@teambit/aspect-loader": "1.0.475",
42
+ "@teambit/cli": "0.0.1052",
43
+ "@teambit/dependency-resolver": "1.0.475",
44
+ "@teambit/envs": "1.0.475",
45
45
  "@teambit/toolbox.path.to-windows-compatible-path": "0.0.496",
46
46
  "@teambit/toolbox.crypto.sha1": "0.0.2",
47
- "@teambit/ui": "1.0.473",
48
- "@teambit/isolator": "1.0.473",
47
+ "@teambit/ui": "1.0.475",
48
+ "@teambit/isolator": "1.0.475",
49
49
  "@teambit/harmony.modules.harmony-root-generator": "0.0.7",
50
- "@teambit/component.sources": "0.0.47",
50
+ "@teambit/component.sources": "0.0.48",
51
51
  "@teambit/toolbox.path.path": "0.0.4",
52
- "@teambit/cache": "0.0.1143",
53
- "@teambit/graphql": "1.0.473",
52
+ "@teambit/cache": "0.0.1145",
53
+ "@teambit/graphql": "1.0.475",
54
54
  "@teambit/harmony.modules.feature-toggle": "0.0.6",
55
- "@teambit/pkg": "1.0.473",
56
- "@teambit/pubsub": "1.0.473",
57
- "@teambit/scope": "1.0.473",
58
- "@teambit/watcher": "1.0.473",
59
- "@teambit/workspace": "1.0.473",
60
- "@teambit/compiler": "1.0.473",
55
+ "@teambit/pkg": "1.0.475",
56
+ "@teambit/pubsub": "1.0.475",
57
+ "@teambit/scope": "1.0.475",
58
+ "@teambit/watcher": "1.0.475",
59
+ "@teambit/workspace": "1.0.475",
60
+ "@teambit/compiler": "1.0.475",
61
61
  "@teambit/preview.cli.webpack-events-listener": "0.0.175",
62
- "@teambit/webpack": "1.0.473"
62
+ "@teambit/webpack": "1.0.475"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@types/mime": "2.0.3",