@teambit/preview 1.0.492 → 1.0.493

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.492" tests="1" failures="0" errors="0" skipped="0">
3
+ <testsuite name="teambit.preview/preview@1.0.493" tests="1" failures="0" errors="0" skipped="0">
4
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={941:(e,t,n)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return o.default}});var o=r(n(236));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.preview/aspect-docs/preview@0.0.169",homepage:"https://bit.cloud/teambit/preview/aspect-docs/preview",exported:!0}},236:(e,t,n)=>{var o={id:"teambit.preview/aspect-docs/preview@0.0.169",homepage:"https://bit.cloud/teambit/preview/aspect-docs/preview",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=m,a(n(594));var r=n(16),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},482:(e,t,n)=>{var o={id:"teambit.preview/preview@1.0.492",homepage:"https://bit.cloud/teambit/preview/preview",exported:!0};function r(){const e=i(n(594));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},16:e=>{e.exports=MdxJsReact},594: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(482),a=(n(594),n(16));const s=TeambitMdxUiMdxScopeContext;var p=n(941),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={17941:(e,t,n)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return o.default}});var o=r(n(72236));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.preview/aspect-docs/preview@0.0.169",homepage:"https://bit.cloud/teambit/preview/aspect-docs/preview",exported:!0}},72236:(e,t,n)=>{var o={id:"teambit.preview/aspect-docs/preview@0.0.169",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},13267:(e,t,n)=>{var o={id:"teambit.preview/preview@1.0.493",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(13267),a=(n(41594),n(5016));const s=TeambitMdxUiMdxScopeContext;var p=n(17941),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})()));
@@ -250,7 +250,7 @@
250
250
  "_legacy": {
251
251
  "scope": "teambit.preview",
252
252
  "name": "preview",
253
- "version": "1.0.492"
253
+ "version": "1.0.493"
254
254
  },
255
255
  "_scope": "teambit.preview"
256
256
  }
@@ -4344,7 +4344,7 @@
4344
4344
  "type": "{\n disabled: boolean;\n onlyOverview: boolean;\n}"
4345
4345
  },
4346
4346
  "isOptional": true,
4347
- "defaultValue": "{\n disabled: false,\n onlyOverview: false,\n }"
4347
+ "defaultValue": "{\n disabled: false,\n onlyOverview: true,\n }"
4348
4348
  },
4349
4349
  {
4350
4350
  "__schema": "FunctionLikeSchema",
@@ -6586,7 +6586,7 @@
6586
6586
  "componentId": {
6587
6587
  "scope": "teambit.component",
6588
6588
  "name": "sources",
6589
- "version": "0.0.56"
6589
+ "version": "0.0.57"
6590
6590
  }
6591
6591
  }
6592
6592
  }
@@ -7164,7 +7164,7 @@
7164
7164
  "_legacy": {
7165
7165
  "scope": "teambit.preview",
7166
7166
  "name": "preview",
7167
- "version": "1.0.492"
7167
+ "version": "1.0.493"
7168
7168
  },
7169
7169
  "_scope": "teambit.preview"
7170
7170
  }
@@ -12420,7 +12420,7 @@
12420
12420
  "type": "{\n disabled: boolean;\n onlyOverview: boolean;\n}"
12421
12421
  },
12422
12422
  "isOptional": true,
12423
- "defaultValue": "{\n disabled: false,\n onlyOverview: false,\n }"
12423
+ "defaultValue": "{\n disabled: false,\n onlyOverview: true,\n }"
12424
12424
  },
12425
12425
  {
12426
12426
  "__schema": "FunctionLikeSchema",
@@ -14371,7 +14371,7 @@
14371
14371
  "componentId": {
14372
14372
  "scope": "teambit.component",
14373
14373
  "name": "sources",
14374
- "version": "0.0.56"
14374
+ "version": "0.0.57"
14375
14375
  }
14376
14376
  }
14377
14377
  }
@@ -14781,7 +14781,7 @@
14781
14781
  "componentId": {
14782
14782
  "scope": "teambit.preview",
14783
14783
  "name": "preview",
14784
- "version": "1.0.492"
14784
+ "version": "1.0.493"
14785
14785
  },
14786
14786
  "taggedModuleExports": []
14787
14787
  }
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "files": {
3
3
  "main.css": "/static/css/main.b7a031de.css",
4
- "main.cjs": "/static/js/main.8d229812.cjs"
4
+ "main.cjs": "/static/js/main.7dcb5084.cjs"
5
5
  },
6
6
  "entrypoints": [
7
7
  "static/css/main.b7a031de.css",
8
- "static/js/main.8d229812.cjs"
8
+ "static/js/main.7dcb5084.cjs"
9
9
  ]
10
10
  }