@teambit/preview 1.0.502 → 1.0.503

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.502" tests="1" failures="0" errors="0" skipped="0">
3
+ <testsuite name="teambit.preview/preview@1.0.503" 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.002"/>
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={52428:function(e,t,n){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Preview=void 0;var r=n(49269);Object.defineProperty(t,"Preview",{enumerable:!0,get:function(){return o(r).default}})},49269:(e,t,n)=>{var o={id:"teambit.preview/aspect-docs/preview@0.0.170",homepage:"https://bit.cloud/teambit/preview/aspect-docs/preview",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=u,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 u(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)."))}u.__bit_component=o,u.isMDXComponent=!0},92735:(e,t,n)=>{var o={id:"teambit.preview/preview@1.0.502",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].call(i.exports,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:()=>m});var i=n(92735),a=(n(41594),n(5016));const s=TeambitMdxUiMdxScopeContext;var p=n(52428),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={},u="wrapper";function m(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)(u,d({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)(s.MDXScopeProvider,{components:{Preview:p.Preview},mdxType:"MDXScopeProvider"},(0,a.mdx)(p.Preview,{mdxType:"Preview"})))}m.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={52428:(e,t,n)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return o.default}});var o=r(n(49269));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.preview/aspect-docs/preview@0.0.170",homepage:"https://bit.cloud/teambit/preview/aspect-docs/preview",exported:!0}},49269:(e,t,n)=>{var o={id:"teambit.preview/aspect-docs/preview@0.0.170",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},25550:(e,t,n)=>{var o={id:"teambit.preview/preview@1.0.503",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(25550),a=(n(41594),n(5016));const s=TeambitMdxUiMdxScopeContext;var p=n(52428),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.502"
253
+ "version": "1.0.503"
254
254
  },
255
255
  "_scope": "teambit.preview"
256
256
  }
@@ -5009,7 +5009,7 @@
5009
5009
  "line": 9,
5010
5010
  "character": 3
5011
5011
  },
5012
- "signature": "type PreviewStrategyName = \"component\" | \"env\"",
5012
+ "signature": "type PreviewStrategyName = \"env\" | \"component\"",
5013
5013
  "name": "PreviewStrategyName",
5014
5014
  "exportNode": {
5015
5015
  "__schema": "TypeSchema",
@@ -5018,7 +5018,7 @@
5018
5018
  "line": 83,
5019
5019
  "character": 1
5020
5020
  },
5021
- "signature": "type PreviewStrategyName = \"component\" | \"env\"",
5021
+ "signature": "type PreviewStrategyName = \"env\" | \"component\"",
5022
5022
  "name": "PreviewStrategyName",
5023
5023
  "type": {
5024
5024
  "__schema": "TypeUnionSchema",
@@ -7164,7 +7164,7 @@
7164
7164
  "_legacy": {
7165
7165
  "scope": "teambit.preview",
7166
7166
  "name": "preview",
7167
- "version": "1.0.502"
7167
+ "version": "1.0.503"
7168
7168
  },
7169
7169
  "_scope": "teambit.preview"
7170
7170
  }
@@ -7847,7 +7847,7 @@
7847
7847
  "line": 83,
7848
7848
  "character": 1
7849
7849
  },
7850
- "signature": "type PreviewStrategyName = \"component\" | \"env\"",
7850
+ "signature": "type PreviewStrategyName = \"env\" | \"component\"",
7851
7851
  "name": "PreviewStrategyName",
7852
7852
  "type": {
7853
7853
  "__schema": "TypeUnionSchema",
@@ -14781,7 +14781,7 @@
14781
14781
  "componentId": {
14782
14782
  "scope": "teambit.preview",
14783
14783
  "name": "preview",
14784
- "version": "1.0.502"
14784
+ "version": "1.0.503"
14785
14785
  },
14786
14786
  "taggedModuleExports": []
14787
14787
  }
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.502/dist/preview.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.502/dist/preview.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.503/dist/preview.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.503/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.502",
3
+ "version": "1.0.503",
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.502"
9
+ "version": "1.0.503"
10
10
  },
11
11
  "dependencies": {
12
12
  "mime": "2.5.2",
@@ -21,8 +21,8 @@
21
21
  "webpack": "5.84.1",
22
22
  "graphql-tag": "2.12.1",
23
23
  "filenamify": "4.2.0",
24
- "lodash.compact": "3.0.1",
25
24
  "graphql-request": "6.1.0",
25
+ "lodash.compact": "3.0.1",
26
26
  "webpack-manifest-plugin": "5.0.0",
27
27
  "webpack-merge": "5.8.0",
28
28
  "@teambit/harmony": "0.4.6",
@@ -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.1178",
35
- "@teambit/logger": "0.0.1172",
34
+ "@teambit/express": "0.0.1179",
35
+ "@teambit/logger": "0.0.1173",
36
36
  "@teambit/ui-foundation.ui.pages.static-error": "0.0.106",
37
- "@teambit/builder": "1.0.502",
38
- "@teambit/bundler": "1.0.502",
39
- "@teambit/component": "1.0.502",
37
+ "@teambit/builder": "1.0.503",
38
+ "@teambit/bundler": "1.0.503",
39
+ "@teambit/component": "1.0.503",
40
40
  "@teambit/preview.ui.component-preview": "1.0.19",
41
- "@teambit/aspect-loader": "1.0.502",
42
- "@teambit/cli": "0.0.1079",
43
- "@teambit/dependency-resolver": "1.0.502",
44
- "@teambit/envs": "1.0.502",
41
+ "@teambit/aspect-loader": "1.0.503",
42
+ "@teambit/cli": "0.0.1080",
43
+ "@teambit/dependency-resolver": "1.0.503",
44
+ "@teambit/envs": "1.0.503",
45
45
  "@teambit/toolbox.path.to-windows-compatible-path": "0.0.497",
46
46
  "@teambit/legacy.constants": "0.0.4",
47
47
  "@teambit/toolbox.crypto.sha1": "0.0.4",
48
- "@teambit/ui": "1.0.502",
49
- "@teambit/isolator": "1.0.502",
48
+ "@teambit/ui": "1.0.503",
49
+ "@teambit/isolator": "1.0.503",
50
50
  "@teambit/harmony.modules.harmony-root-generator": "0.0.9",
51
51
  "@teambit/component.sources": "0.0.63",
52
52
  "@teambit/toolbox.path.path": "0.0.5",
53
- "@teambit/cache": "0.0.1172",
54
- "@teambit/graphql": "1.0.502",
53
+ "@teambit/cache": "0.0.1173",
54
+ "@teambit/graphql": "1.0.503",
55
55
  "@teambit/harmony.modules.feature-toggle": "0.0.12",
56
- "@teambit/pkg": "1.0.502",
57
- "@teambit/pubsub": "1.0.502",
58
- "@teambit/scope": "1.0.502",
59
- "@teambit/watcher": "1.0.502",
60
- "@teambit/workspace": "1.0.502",
61
- "@teambit/compiler": "1.0.502",
56
+ "@teambit/pkg": "1.0.503",
57
+ "@teambit/pubsub": "1.0.503",
58
+ "@teambit/scope": "1.0.503",
59
+ "@teambit/watcher": "1.0.503",
60
+ "@teambit/workspace": "1.0.503",
61
+ "@teambit/compiler": "1.0.503",
62
62
  "@teambit/preview.cli.webpack-events-listener": "0.0.176",
63
- "@teambit/webpack": "1.0.502"
63
+ "@teambit/webpack": "1.0.503"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@types/mime": "2.0.3",