@teambit/preview 1.0.497 → 1.0.499

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.497" tests="1" failures="0" errors="0" skipped="0">
3
+ <testsuite name="teambit.preview/preview@1.0.499" 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={95670:(e,t,n)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return o.default}});var o=r(n(48267));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}},48267:(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},37580:(e,t,n)=>{var o={id:"teambit.preview/preview@1.0.497",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(37580),a=(n(41594),n(5016));const s=TeambitMdxUiMdxScopeContext;var p=n(95670),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={95670:(e,t,n)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return o.default}});var o=r(n(48267));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}},48267:(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},77698:(e,t,n)=>{var o={id:"teambit.preview/preview@1.0.499",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(77698),a=(n(41594),n(5016));const s=TeambitMdxUiMdxScopeContext;var p=n(95670),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.497"
252
+ "version": "1.0.499"
253
253
  },
254
254
  "_scope": "teambit.preview"
255
255
  }
@@ -4700,7 +4700,7 @@
4700
4700
  "line": 9,
4701
4701
  "character": 3
4702
4702
  },
4703
- "signature": "type PreviewStrategyName = \"component\" | \"env\"",
4703
+ "signature": "type PreviewStrategyName = \"env\" | \"component\"",
4704
4704
  "name": "PreviewStrategyName",
4705
4705
  "exportNode": {
4706
4706
  "__schema": "TypeSchema",
@@ -4709,7 +4709,7 @@
4709
4709
  "line": 83,
4710
4710
  "character": 1
4711
4711
  },
4712
- "signature": "type PreviewStrategyName = \"component\" | \"env\"",
4712
+ "signature": "type PreviewStrategyName = \"env\" | \"component\"",
4713
4713
  "name": "PreviewStrategyName",
4714
4714
  "type": {
4715
4715
  "__schema": "TypeUnionSchema",
@@ -6805,7 +6805,7 @@
6805
6805
  "_legacy": {
6806
6806
  "scope": "teambit.preview",
6807
6807
  "name": "preview",
6808
- "version": "1.0.497"
6808
+ "version": "1.0.499"
6809
6809
  },
6810
6810
  "_scope": "teambit.preview"
6811
6811
  }
@@ -7439,7 +7439,7 @@
7439
7439
  "line": 83,
7440
7440
  "character": 1
7441
7441
  },
7442
- "signature": "type PreviewStrategyName = \"component\" | \"env\"",
7442
+ "signature": "type PreviewStrategyName = \"env\" | \"component\"",
7443
7443
  "name": "PreviewStrategyName",
7444
7444
  "type": {
7445
7445
  "__schema": "TypeUnionSchema",
@@ -14033,7 +14033,7 @@
14033
14033
  "componentId": {
14034
14034
  "scope": "teambit.preview",
14035
14035
  "name": "preview",
14036
- "version": "1.0.497"
14036
+ "version": "1.0.499"
14037
14037
  },
14038
14038
  "taggedModuleExports": []
14039
14039
  }
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.497/dist/preview.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.497/dist/preview.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.499/dist/preview.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.preview_preview@1.0.499/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.497",
3
+ "version": "1.0.499",
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.497"
9
+ "version": "1.0.499"
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.1173",
35
- "@teambit/logger": "0.0.1167",
34
+ "@teambit/express": "0.0.1175",
35
+ "@teambit/logger": "0.0.1169",
36
36
  "@teambit/ui-foundation.ui.pages.static-error": "0.0.106",
37
- "@teambit/builder": "1.0.497",
38
- "@teambit/bundler": "1.0.497",
39
- "@teambit/component": "1.0.497",
37
+ "@teambit/builder": "1.0.499",
38
+ "@teambit/bundler": "1.0.499",
39
+ "@teambit/component": "1.0.499",
40
40
  "@teambit/preview.ui.component-preview": "1.0.19",
41
- "@teambit/aspect-loader": "1.0.497",
42
- "@teambit/cli": "0.0.1074",
43
- "@teambit/dependency-resolver": "1.0.497",
44
- "@teambit/envs": "1.0.497",
41
+ "@teambit/aspect-loader": "1.0.499",
42
+ "@teambit/cli": "0.0.1076",
43
+ "@teambit/dependency-resolver": "1.0.499",
44
+ "@teambit/envs": "1.0.499",
45
45
  "@teambit/toolbox.path.to-windows-compatible-path": "0.0.497",
46
46
  "@teambit/legacy.constants": "0.0.3",
47
47
  "@teambit/toolbox.crypto.sha1": "0.0.4",
48
- "@teambit/ui": "1.0.497",
49
- "@teambit/isolator": "1.0.497",
48
+ "@teambit/ui": "1.0.499",
49
+ "@teambit/isolator": "1.0.499",
50
50
  "@teambit/harmony.modules.harmony-root-generator": "0.0.9",
51
51
  "@teambit/component.sources": "0.0.61",
52
52
  "@teambit/toolbox.path.path": "0.0.5",
53
- "@teambit/cache": "0.0.1167",
54
- "@teambit/graphql": "1.0.497",
53
+ "@teambit/cache": "0.0.1169",
54
+ "@teambit/graphql": "1.0.499",
55
55
  "@teambit/harmony.modules.feature-toggle": "0.0.11",
56
- "@teambit/pkg": "1.0.497",
57
- "@teambit/pubsub": "1.0.497",
58
- "@teambit/scope": "1.0.497",
59
- "@teambit/watcher": "1.0.497",
60
- "@teambit/workspace": "1.0.497",
61
- "@teambit/compiler": "1.0.497",
56
+ "@teambit/pkg": "1.0.499",
57
+ "@teambit/pubsub": "1.0.499",
58
+ "@teambit/scope": "1.0.499",
59
+ "@teambit/watcher": "1.0.499",
60
+ "@teambit/workspace": "1.0.499",
61
+ "@teambit/compiler": "1.0.499",
62
62
  "@teambit/preview.cli.webpack-events-listener": "0.0.176",
63
- "@teambit/webpack": "1.0.497"
63
+ "@teambit/webpack": "1.0.499"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@types/mime": "2.0.3",