@teambit/preview 1.0.511 → 1.0.512

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.511" tests="1" failures="0" errors="0" skipped="0">
4
- <testcase classname="dist/bundler/create-peer-link.spec.js" name="should output snapshot" time="0.005"/>
3
+ <testsuite name="teambit.preview/preview@1.0.512" 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={68691:(e,t,n)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return o.default}});var o=r(n(34334));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.preview/aspect-docs/preview@0.0.171",homepage:"https://bit.cloud/teambit/preview/aspect-docs/preview",exported:!0}},34334:(e,t,n)=>{var o={id:"teambit.preview/aspect-docs/preview@0.0.171",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},60313:(e,t,n)=>{var o={id:"teambit.preview/preview@1.0.511",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(60313),a=(n(41594),n(5016));const s=TeambitMdxUiMdxScopeContext;var p=n(68691),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={91072:(e,t,n)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return o.default}});var o=r(n(34334));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.preview/aspect-docs/preview@0.0.171",homepage:"https://bit.cloud/teambit/preview/aspect-docs/preview",exported:!0}},34334:(e,t,n)=>{var o={id:"teambit.preview/aspect-docs/preview@0.0.171",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},83922:(e,t,n)=>{var o={id:"teambit.preview/preview@1.0.512",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(83922),a=(n(41594),n(5016));const s=TeambitMdxUiMdxScopeContext;var p=n(91072),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,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.511/dist/preview.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.511/dist/preview.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.512/dist/preview.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.512/dist/preview.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/preview",
3
- "version": "1.0.511",
3
+ "version": "1.0.512",
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.511"
9
+ "version": "1.0.512"
10
10
  },
11
11
  "dependencies": {
12
12
  "mime": "2.5.2",
@@ -31,36 +31,36 @@
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.38",
34
- "@teambit/express": "0.0.1187",
35
- "@teambit/logger": "0.0.1181",
34
+ "@teambit/express": "0.0.1188",
35
+ "@teambit/logger": "0.0.1182",
36
36
  "@teambit/ui-foundation.ui.pages.static-error": "0.0.106",
37
- "@teambit/builder": "1.0.511",
38
- "@teambit/bundler": "1.0.511",
39
- "@teambit/component": "1.0.511",
37
+ "@teambit/builder": "1.0.512",
38
+ "@teambit/bundler": "1.0.512",
39
+ "@teambit/component": "1.0.512",
40
40
  "@teambit/preview.ui.component-preview": "1.0.19",
41
- "@teambit/aspect-loader": "1.0.511",
42
- "@teambit/cli": "0.0.1088",
43
- "@teambit/dependency-resolver": "1.0.511",
44
- "@teambit/envs": "1.0.511",
41
+ "@teambit/aspect-loader": "1.0.512",
42
+ "@teambit/cli": "0.0.1089",
43
+ "@teambit/dependency-resolver": "1.0.512",
44
+ "@teambit/envs": "1.0.512",
45
45
  "@teambit/toolbox.path.to-windows-compatible-path": "0.0.498",
46
46
  "@teambit/legacy.constants": "0.0.5",
47
47
  "@teambit/toolbox.crypto.sha1": "0.0.5",
48
- "@teambit/ui": "1.0.511",
49
- "@teambit/isolator": "1.0.511",
48
+ "@teambit/ui": "1.0.512",
49
+ "@teambit/isolator": "1.0.512",
50
50
  "@teambit/harmony.modules.harmony-root-generator": "0.0.10",
51
- "@teambit/component.sources": "0.0.70",
51
+ "@teambit/component.sources": "0.0.71",
52
52
  "@teambit/toolbox.path.path": "0.0.6",
53
- "@teambit/cache": "0.0.1181",
54
- "@teambit/graphql": "1.0.511",
53
+ "@teambit/cache": "0.0.1182",
54
+ "@teambit/graphql": "1.0.512",
55
55
  "@teambit/harmony.modules.feature-toggle": "0.0.13",
56
- "@teambit/pkg": "1.0.511",
57
- "@teambit/pubsub": "1.0.511",
58
- "@teambit/scope": "1.0.511",
59
- "@teambit/watcher": "1.0.511",
60
- "@teambit/workspace": "1.0.511",
61
- "@teambit/compiler": "1.0.511",
56
+ "@teambit/pkg": "1.0.512",
57
+ "@teambit/pubsub": "1.0.512",
58
+ "@teambit/scope": "1.0.512",
59
+ "@teambit/watcher": "1.0.512",
60
+ "@teambit/workspace": "1.0.512",
61
+ "@teambit/compiler": "1.0.512",
62
62
  "@teambit/preview.cli.webpack-events-listener": "0.0.177",
63
- "@teambit/webpack": "1.0.511"
63
+ "@teambit/webpack": "1.0.512"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@types/mime": "2.0.3",