@teambit/react 0.0.735 → 0.0.738

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.
Files changed (133) hide show
  1. package/artifacts/env-template/public/295.js +29 -29
  2. package/artifacts/env-template/public/{117.js → 756.js} +3 -3
  3. package/artifacts/env-template/public/assets-manifest.json +10 -10
  4. package/artifacts/env-template/public/{compositions.ff40db501672bede5e3f.js → compositions.eb4e1edea0a4802cad5a.js} +1 -1
  5. package/artifacts/env-template/public/compositions.html +1 -1
  6. package/artifacts/env-template/public/{overview.9ee03c1e295a357f7aa0.js → overview.37b3198678667237c71a.js} +1 -1
  7. package/artifacts/env-template/public/overview.html +1 -1
  8. package/artifacts/env-template/public/{preview-root.7a24e602c0fa0ba9f5f1.js → preview-root.0a3624f6e3564141db0b.js} +1 -1
  9. package/artifacts/env-template/public/service-worker.js +1 -1
  10. package/artifacts/env-template/public/static/css/{295.e370e333.css → 295.506aad7a.css} +1 -1
  11. package/artifacts/preview/teambit_react_react-preview.js +2 -2
  12. package/{compositions-1652808661748.js → compositions-1653227849497.js} +0 -0
  13. package/dist/apps/web/default-bundler.js.map +1 -1
  14. package/dist/apps/web/deploy-context.js.map +1 -1
  15. package/dist/apps/web/index.js.map +1 -1
  16. package/dist/apps/web/plugins/index.js.map +1 -1
  17. package/dist/apps/web/plugins/prerender.js.map +1 -1
  18. package/dist/apps/web/react-app-options.js.map +1 -1
  19. package/dist/apps/web/react-build-result.js.map +1 -1
  20. package/dist/apps/web/react.app-type.js.map +1 -1
  21. package/dist/apps/web/react.application.js.map +1 -1
  22. package/dist/compositions-app.js.map +1 -1
  23. package/dist/eslint/eslintrc.js.map +1 -1
  24. package/dist/highlighter-widget.js.map +1 -1
  25. package/dist/index.js.map +1 -1
  26. package/dist/jest/index.js.map +1 -1
  27. package/dist/jest/jest.base.config.js.map +1 -1
  28. package/dist/jest/jest.cjs.config.js.map +1 -1
  29. package/dist/jest/jest.config.js.map +1 -1
  30. package/dist/jest/jest.esm.config.js.map +1 -1
  31. package/dist/jest/setupTests.js.map +1 -1
  32. package/dist/jest/transformers/base-transformer-plugins.js.map +1 -1
  33. package/dist/jest/transformers/base-transformer-presets.js.map +1 -1
  34. package/dist/jest/transformers/base-transformer-process.js.map +1 -1
  35. package/dist/jest/transformers/cjs-transformer.js.map +1 -1
  36. package/dist/jest/transformers/css-transform.js.map +1 -1
  37. package/dist/jest/transformers/esm-transformer.js.map +1 -1
  38. package/dist/jest/transformers/file-transform.js.map +1 -1
  39. package/dist/mount.js.map +1 -1
  40. package/dist/prettier/prettier.config.js.map +1 -1
  41. package/dist/react.aspect.js.map +1 -1
  42. package/dist/react.composition.js.map +1 -1
  43. package/dist/react.env.js.map +1 -1
  44. package/dist/react.graphql.js.map +1 -1
  45. package/dist/react.main.runtime.js.map +1 -1
  46. package/dist/react.preview.runtime.js.map +1 -1
  47. package/dist/react.templates.js.map +1 -1
  48. package/dist/react.ui.runtime.js.map +1 -1
  49. package/dist/templates/react-app/files/app-plugin.js.map +1 -1
  50. package/dist/templates/react-app/files/app-root.js.map +1 -1
  51. package/dist/templates/react-app/files/app.js.map +1 -1
  52. package/dist/templates/react-app/files/compositions.js.map +1 -1
  53. package/dist/templates/react-app/files/doc.js.map +1 -1
  54. package/dist/templates/react-app/files/index.js.map +1 -1
  55. package/dist/templates/react-app/index.js.map +1 -1
  56. package/dist/templates/react-component/files/component.js.map +1 -1
  57. package/dist/templates/react-component/files/composition.js.map +1 -1
  58. package/dist/templates/react-component/files/docs.js.map +1 -1
  59. package/dist/templates/react-component/files/index-file.js.map +1 -1
  60. package/dist/templates/react-component/files/test.js.map +1 -1
  61. package/dist/templates/react-component/index.js.map +1 -1
  62. package/dist/templates/react-component-js/files/component.js.map +1 -1
  63. package/dist/templates/react-component-js/files/composition.js.map +1 -1
  64. package/dist/templates/react-component-js/files/docs.js.map +1 -1
  65. package/dist/templates/react-component-js/files/test.js.map +1 -1
  66. package/dist/templates/react-component-js/index.js.map +1 -1
  67. package/dist/templates/react-context/files/composition.js.map +1 -1
  68. package/dist/templates/react-context/files/context-provider.js.map +1 -1
  69. package/dist/templates/react-context/files/context.js.map +1 -1
  70. package/dist/templates/react-context/files/docs.js.map +1 -1
  71. package/dist/templates/react-context/files/index-file.js.map +1 -1
  72. package/dist/templates/react-context/files/test.js.map +1 -1
  73. package/dist/templates/react-context/index.js.map +1 -1
  74. package/dist/templates/react-env/files/aspect.js.map +1 -1
  75. package/dist/templates/react-env/files/doc.js.map +1 -1
  76. package/dist/templates/react-env/files/index.js.map +1 -1
  77. package/dist/templates/react-env/files/jest.config.js.map +1 -1
  78. package/dist/templates/react-env/files/main.runtime.js.map +1 -1
  79. package/dist/templates/react-env/files/preview.runtime.js.map +1 -1
  80. package/dist/templates/react-env/files/typescript/styles.js.map +1 -1
  81. package/dist/templates/react-env/files/typescript/ts-transformer.js.map +1 -1
  82. package/dist/templates/react-env/files/typescript/typescript.config.js.map +1 -1
  83. package/dist/templates/react-env/files/webpack.config.js.map +1 -1
  84. package/dist/templates/react-env/index.js.map +1 -1
  85. package/dist/templates/react-hook/files/component.js.map +1 -1
  86. package/dist/templates/react-hook/files/composition.js.map +1 -1
  87. package/dist/templates/react-hook/files/docs.js.map +1 -1
  88. package/dist/templates/react-hook/files/index-file.js.map +1 -1
  89. package/dist/templates/react-hook/files/test.js.map +1 -1
  90. package/dist/templates/react-hook/index.js.map +1 -1
  91. package/dist/templates/react-workspace/index.js.map +1 -1
  92. package/dist/templates/react-workspace-analytics/index.js.map +1 -1
  93. package/dist/templates/react-workspace-app/index.js.map +1 -1
  94. package/dist/templates/react-workspace-data-fetching/index.js.map +1 -1
  95. package/dist/templates/react-workspace-deprecated/index.js.map +1 -1
  96. package/dist/templates/react-workspace-design-system/index.js.map +1 -1
  97. package/dist/templates/react-workspace-lib/index.js.map +1 -1
  98. package/dist/templates/react-workspace-wiki/index.js.map +1 -1
  99. package/dist/templates/workspace-common/files/eslint-config.js.map +1 -1
  100. package/dist/templates/workspace-common/files/git-ignore.js.map +1 -1
  101. package/dist/templates/workspace-common/files/launch-json.js.map +1 -1
  102. package/dist/templates/workspace-common/files/prettier-config.js.map +1 -1
  103. package/dist/templates/workspace-common/files/readme-file.js.map +1 -1
  104. package/dist/templates/workspace-common/files/ts-config.js.map +1 -1
  105. package/dist/templates/workspace-common/files/types/asset.js.map +1 -1
  106. package/dist/templates/workspace-common/files/types/style.js.map +1 -1
  107. package/dist/templates/workspace-common/files/workspace-config.js.map +1 -1
  108. package/dist/templates/workspace-common/generate-files.js.map +1 -1
  109. package/dist/templates/workspace-common/index.js.map +1 -1
  110. package/dist/typescript/tsconfig.build.json +1 -0
  111. package/dist/webpack/get-exposed-rules.js.map +1 -1
  112. package/dist/webpack/get-externals.js.map +1 -1
  113. package/dist/webpack/html.js.map +1 -1
  114. package/dist/webpack/index.js.map +1 -1
  115. package/dist/webpack/overlay/formatWebpackMessages.js.map +1 -1
  116. package/dist/webpack/overlay/launchEditorEndpoint.js.map +1 -1
  117. package/dist/webpack/overlay/refreshOverlayInterop.js.map +1 -1
  118. package/dist/webpack/overlay/webpackHotDevClient.js.map +1 -1
  119. package/dist/webpack/postcss.config.js.map +1 -1
  120. package/dist/webpack/resolve-peer.js.map +1 -1
  121. package/dist/webpack/transformers.js.map +1 -1
  122. package/dist/webpack/webpack.config.base.js.map +1 -1
  123. package/dist/webpack/webpack.config.base.prod.js.map +1 -1
  124. package/dist/webpack/webpack.config.component.dev.js.map +1 -1
  125. package/dist/webpack/webpack.config.component.prod.js.map +1 -1
  126. package/dist/webpack/webpack.config.env.dev.js.map +1 -1
  127. package/{overview-1652808661748.js → overview-1653227849497.js} +0 -0
  128. package/package-tar/teambit-react-0.0.738.tgz +0 -0
  129. package/package.json +25 -25
  130. package/{preview-1652808661748.js → preview-1653227849497.js} +2 -2
  131. package/tsconfig.json +1 -1
  132. package/typescript/tsconfig.build.json +1 -0
  133. package/package-tar/teambit-react-0.0.735.tgz +0 -0
@@ -1,4 +1,4 @@
1
- (function(root,factory){typeof exports=="object"&&typeof module=="object"?module.exports=factory():typeof define=="function"&&define.amd?define([],factory):typeof exports=="object"?exports["teambit.react/react-preview"]=factory():root["teambit.react/react-preview"]=factory()})(self,function(){return(()=>{var __webpack_modules__={88244:module2=>{function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module2.exports=_interopRequireDefault},77076:(__unused_webpack_module,__webpack_exports__2,__webpack_require__2)=>{"use strict";__webpack_require__2.r(__webpack_exports__2),__webpack_require__2.d(__webpack_exports__2,{default:()=>MDXContent});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__2(63804),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__2.n(react__WEBPACK_IMPORTED_MODULE_0__),_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__2(85057),_mdx_js_react__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__2.n(_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__),_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__2(58459),_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__2.n(_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_2__),_teambit_react_content_react_overview__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__2(55906),_excluded=["components"];function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded),key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&(!Object.prototype.propertyIsEnumerable.call(source,key)||(target[key]=source[key]))}return target}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={},sourceKeys=Object.keys(source),key,i;for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],!(excluded.indexOf(key)>=0)&&(target[key]=source[key]);return target}var layoutProps={},MDXLayout="wrapper";function MDXContent(_ref){var components=_ref.components,props=_objectWithoutProperties(_ref,_excluded);return(0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__.mdx)(MDXLayout,_extends({},layoutProps,props,{components,mdxType:"MDXLayout"}),(0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__.mdx)(_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_2__.MDXScopeProvider,{components:{ReactOverview:_teambit_react_content_react_overview__WEBPACK_IMPORTED_MODULE_3__.ZP},mdxType:"MDXScopeProvider"},(0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__.mdx)(_teambit_react_content_react_overview__WEBPACK_IMPORTED_MODULE_3__.ZP,{mdxType:"ReactOverview"})))}MDXContent.isMDXComponent=!0},55906:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __webpack_unused_export__,__bit_component={id:"teambit.react/content/react-overview@1.95.0",homepage:"https://bit.dev/teambit/react/content/react-overview",exported:!0};__webpack_unused_export__={value:!0},__webpack_unused_export__={enumerable:!0,get:function(){return _reactOverview.default}},Object.defineProperty(exports2,"ZP",{enumerable:!0,get:function(){return _reactOverview.default}});var _reactOverview=_interopRequireDefault(__webpack_require__2(2664));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}_interopRequireDefault.__bit_component=__bit_component},2664:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __bit_component={id:"teambit.react/content/react-overview@1.95.0",homepage:"https://bit.dev/teambit/react/content/react-overview",exported:!0};Object.defineProperty(exports2,"__esModule",{value:!0}),exports2.default=MDXContent;var _react=_interopRequireDefault(__webpack_require__2(63804)),_react2=__webpack_require__2(85057),_mdxUi=__webpack_require__2(58459),_excluded=["components"];function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}_interopRequireDefault.__bit_component=__bit_component;function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}_extends.__bit_component=__bit_component;function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded),key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&(!Object.prototype.propertyIsEnumerable.call(source,key)||(target[key]=source[key]))}return target}_objectWithoutProperties.__bit_component=__bit_component;function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={},sourceKeys=Object.keys(source),key,i;for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],!(excluded.indexOf(key)>=0)&&(target[key]=source[key]);return target}_objectWithoutPropertiesLoose.__bit_component=__bit_component;var layoutProps={},MDXLayout="wrapper";function MDXContent(_ref){var components=_ref.components,props=_objectWithoutProperties(_ref,_excluded);return(0,_react2.mdx)(MDXLayout,_extends({},layoutProps,props,{components,mdxType:"MDXLayout"}),(0,_react2.mdx)(_mdxUi.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,_react2.mdx)("h1",null,"React Overview"),(0,_react2.mdx)("p",null,`React is teambit's Component Development Environment (Env) for React.
1
+ (function(root,factory){typeof exports=="object"&&typeof module=="object"?module.exports=factory():typeof define=="function"&&define.amd?define([],factory):typeof exports=="object"?exports["teambit.react/react-preview"]=factory():root["teambit.react/react-preview"]=factory()})(self,function(){return(()=>{var __webpack_modules__={88244:module2=>{function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module2.exports=_interopRequireDefault},57330:(__unused_webpack_module,__webpack_exports__2,__webpack_require__2)=>{"use strict";__webpack_require__2.r(__webpack_exports__2),__webpack_require__2.d(__webpack_exports__2,{default:()=>MDXContent});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__2(63804),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__2.n(react__WEBPACK_IMPORTED_MODULE_0__),_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__2(85057),_mdx_js_react__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__2.n(_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__),_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__2(58459),_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__2.n(_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_2__),_teambit_react_content_react_overview__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__2(55906),_excluded=["components"];function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded),key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&(!Object.prototype.propertyIsEnumerable.call(source,key)||(target[key]=source[key]))}return target}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={},sourceKeys=Object.keys(source),key,i;for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],!(excluded.indexOf(key)>=0)&&(target[key]=source[key]);return target}var layoutProps={},MDXLayout="wrapper";function MDXContent(_ref){var components=_ref.components,props=_objectWithoutProperties(_ref,_excluded);return(0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__.mdx)(MDXLayout,_extends({},layoutProps,props,{components,mdxType:"MDXLayout"}),(0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__.mdx)(_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_2__.MDXScopeProvider,{components:{ReactOverview:_teambit_react_content_react_overview__WEBPACK_IMPORTED_MODULE_3__.ZP},mdxType:"MDXScopeProvider"},(0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__.mdx)(_teambit_react_content_react_overview__WEBPACK_IMPORTED_MODULE_3__.ZP,{mdxType:"ReactOverview"})))}MDXContent.isMDXComponent=!0},55906:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __webpack_unused_export__,__bit_component={id:"teambit.react/content/react-overview@1.95.0",homepage:"https://bit.dev/teambit/react/content/react-overview",exported:!0};__webpack_unused_export__={value:!0},__webpack_unused_export__={enumerable:!0,get:function(){return _reactOverview.default}},Object.defineProperty(exports2,"ZP",{enumerable:!0,get:function(){return _reactOverview.default}});var _reactOverview=_interopRequireDefault(__webpack_require__2(2664));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}_interopRequireDefault.__bit_component=__bit_component},2664:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __bit_component={id:"teambit.react/content/react-overview@1.95.0",homepage:"https://bit.dev/teambit/react/content/react-overview",exported:!0};Object.defineProperty(exports2,"__esModule",{value:!0}),exports2.default=MDXContent;var _react=_interopRequireDefault(__webpack_require__2(63804)),_react2=__webpack_require__2(85057),_mdxUi=__webpack_require__2(58459),_excluded=["components"];function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}_interopRequireDefault.__bit_component=__bit_component;function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}_extends.__bit_component=__bit_component;function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded),key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&(!Object.prototype.propertyIsEnumerable.call(source,key)||(target[key]=source[key]))}return target}_objectWithoutProperties.__bit_component=__bit_component;function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={},sourceKeys=Object.keys(source),key,i;for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],!(excluded.indexOf(key)>=0)&&(target[key]=source[key]);return target}_objectWithoutPropertiesLoose.__bit_component=__bit_component;var layoutProps={},MDXLayout="wrapper";function MDXContent(_ref){var components=_ref.components,props=_objectWithoutProperties(_ref,_excluded);return(0,_react2.mdx)(MDXLayout,_extends({},layoutProps,props,{components,mdxType:"MDXLayout"}),(0,_react2.mdx)(_mdxUi.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,_react2.mdx)("h1",null,"React Overview"),(0,_react2.mdx)("p",null,`React is teambit's Component Development Environment (Env) for React.
2
2
  It enables you to quickly set up a dev environment that follows best practices for React component development.`),(0,_react2.mdx)("p",null,"React can also be used as a good starting point for your own customized Env as it provides a comprehensive API that makes it easy to extend."),(0,_react2.mdx)("h2",null,"Using the React env"),(0,_react2.mdx)("p",null,"To use React Env, apply it on the relevant ",(0,_react2.mdx)("a",{parentName:"p",href:"/docs/workspace/variants"},"variants")," (component selections) in your ",(0,_react2.mdx)("a",{parentName:"p",href:"/docs/workspace/workspace-configuration"},"Workspace config"),":"),(0,_react2.mdx)("pre",null,(0,_react2.mdx)("code",{parentName:"pre",className:"language-json",metastring:'title="workspace.jsonc"',title:'"workspace.jsonc"'},`{
3
3
  "teambit.workspace/variants": {
4
4
  "{ui/**}": {
@@ -8,4 +8,4 @@ It enables you to quickly set up a dev environment that follows best practices f
8
8
  }
9
9
  `)),(0,_react2.mdx)("h2",null,"Creating Components"),(0,_react2.mdx)("p",null,"React env provides a set of component templates that can be used to speed-up and standardize your component development:"),(0,_react2.mdx)("p",null,"To list all available templates:"),(0,_react2.mdx)("pre",null,(0,_react2.mdx)("code",{parentName:"pre",className:"language-bash"},`bit templates
10
10
  `)),(0,_react2.mdx)("ul",null,(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"react")," a basic React UI component."),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"react-context")," a react context component."),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"react-hook")," a react hook component."),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"mdx-component")," an MDX component."),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"react-component-js")," a basic React component in JS."),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"react-env")," boilerplate for a customized environment configuration.")),(0,_react2.mdx)("p",null,"Use any of these templates with the ",(0,_react2.mdx)("inlineCode",{parentName:"p"},"bit create")," command:"),(0,_react2.mdx)("pre",null,(0,_react2.mdx)("code",{parentName:"pre",className:"language-bash"},`bit create react ui/my-welcome
11
- `)),(0,_react2.mdx)("h2",null,"Development services and configurations"),(0,_react2.mdx)("p",null,"The table below lists ",(0,_react2.mdx)("a",{parentName:"p",href:"/dev-services/dev-services-overview"},"dev services")," that are provided by the React env. Each service handles a specific component development operation. Each is implemented by the React env, using a specific set of configurations."),(0,_react2.mdx)("p",null,"To customize and extend the React env, ",(0,_react2.mdx)("a",{parentName:"p",href:"/envs/pre-configured-envs/react/extending-react#using-your-own-react-env-extension"},"create you own React env extension"),". You can replace the Aspects used by the env, or override their configurations (use the links provided in the 'customization' column)."),(0,_react2.mdx)("table",null,(0,_react2.mdx)("thead",{parentName:"table"},(0,_react2.mdx)("tr",{parentName:"thead"},(0,_react2.mdx)("th",{parentName:"tr",align:null},"Service"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Aspect"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Default config"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Customization"))),(0,_react2.mdx)("tbody",{parentName:"table"},(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/compiler/compiler-overview"},"Compiler")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/typescript/typescript"},"TypeScript")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/typescript/tsconfig.json"},"tsconfig.json")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#typescript"},"TS compilation config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/compiler/configure-env-with-compiler"},"Replace compiler"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/tester/overview"},"Tester")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/jest"},"Jest")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/jest/jest.config.js"},"jest.config.js")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#jest"},"Jest config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/tester/configure-env-with-tester"},"Replace Tester"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/linter/overview"},"Linting")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/eslint"},"ESLint")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/eslint/eslintrc.ts"},"eslintrc.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#eslint"},"ESLint Config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/linter/configure-env-with-linter"},"Replace Linter"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/formatter/overview"},"Formatter")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/prettier"},"Prettier")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/prettier/prettier.config.js"},"prettier.config.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#prettier"},"Prettier config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/formatter/configure-env-with-formatter"},"Replace Formatter"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},"DevServer"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/webpack/webpack"},"Webpack")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/webpack/webpack.config.preview.dev.ts"},"webpack.config.preview.dev.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 Webpack config (for bundling in the workspace)")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/preview/overview"},"Preview")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null}),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/preview/register-custom-preview"},"Add preview"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/packages/packages-overview"},"Package")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},"See the ",(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/typescript/typescript/~code/typescript.main.runtime.ts"},"TypeScript Aspect")," config"),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/packages/managing-package-json#set-configuration-from-an-env"},"Add Env package config")," ",(0,_react2.mdx)("br",null)," \u2022 TypeScript's package config")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},"Bundler"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/webpack/webpack"},"Webpack")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/webpack/webpack.config.preview.ts"},"webpack.config.preview.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 Webpack config (for bundling during build)")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/docs/docs-overview"},"Documentation")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/docs/index.tsx"},"Docs template")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/docs/docs-templates"},"Replace docs template"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"http://localhost:3000/docs/dev-services/builder/builder-overview"},"Builder")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"http://localhost:3000/docs/dev-services/builder/builder-overview"},"Build pipeline")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/builder/build-pipelines"},"Build pipelines"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dependencies/dependencies-overview"},"Dependencies")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/react.env.ts"},"Env-dependencies")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dependencies/configuring-dependencies#configuring-dependencies-from-an-env"},"Env dependencies"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/generator/generator-overview"},"Generator")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/templates/react-component.ts"},"React templates")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:""},"Add a component template"))))),(0,_react2.mdx)("h3",null,"Default React versions"),(0,_react2.mdx)("p",null,"By default, the React env sets the following dependency versions for components using it:"),(0,_react2.mdx)("ul",null,(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"react")," (peer dependency): ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^16.8.0 || ^17.0.0")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"react-dom")," (peer dependency): ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^16.8.0 || ^17.0.0")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"@types/react"),": ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^17.0.8")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"@types/react-dom"),": ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^17.0.5")))))}MDXContent.__bit_component=__bit_component,MDXContent.isMDXComponent=!0},34245:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __bit_component={id:"teambit.react/react@0.0.735",homepage:"https://bit.dev/teambit/react/react",exported:!0},_interopRequireDefault=__webpack_require__2(88244);Object.defineProperty(exports2,"__esModule",{value:!0}),exports2.Logo=void 0;function _react(){const data=_interopRequireDefault(__webpack_require__2(63804));return _react=function(){return data},data}_react.__bit_component=__bit_component;const Logo=()=>_react().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},_react().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/react.svg"}));Logo.__bit_component=__bit_component,exports2.Logo=Logo},85057:module2=>{"use strict";module2.exports=MdxJsReact},63804:module2=>{"use strict";module2.exports=React},58459:module2=>{"use strict";module2.exports=TeambitMdxUiMdxScopeContext}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==void 0)return cachedModule.exports;var module2=__webpack_module_cache__[moduleId]={exports:{}};return __webpack_modules__[moduleId](module2,module2.exports,__webpack_require__),module2.exports}__webpack_require__.n=module2=>{var getter=module2&&module2.__esModule?()=>module2.default:()=>module2;return __webpack_require__.d(getter,{a:getter}),getter},__webpack_require__.d=(exports2,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports2,key)&&Object.defineProperty(exports2,key,{enumerable:!0,get:definition[key]})},__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports2=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports2,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{compositions:()=>compositions,overview:()=>overview});const compositions=[__webpack_require__(34245)],overview=[__webpack_require__(77076)]})(),__webpack_exports__})()});
11
+ `)),(0,_react2.mdx)("h2",null,"Development services and configurations"),(0,_react2.mdx)("p",null,"The table below lists ",(0,_react2.mdx)("a",{parentName:"p",href:"/dev-services/dev-services-overview"},"dev services")," that are provided by the React env. Each service handles a specific component development operation. Each is implemented by the React env, using a specific set of configurations."),(0,_react2.mdx)("p",null,"To customize and extend the React env, ",(0,_react2.mdx)("a",{parentName:"p",href:"/envs/pre-configured-envs/react/extending-react#using-your-own-react-env-extension"},"create you own React env extension"),". You can replace the Aspects used by the env, or override their configurations (use the links provided in the 'customization' column)."),(0,_react2.mdx)("table",null,(0,_react2.mdx)("thead",{parentName:"table"},(0,_react2.mdx)("tr",{parentName:"thead"},(0,_react2.mdx)("th",{parentName:"tr",align:null},"Service"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Aspect"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Default config"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Customization"))),(0,_react2.mdx)("tbody",{parentName:"table"},(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/compiler/compiler-overview"},"Compiler")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/typescript/typescript"},"TypeScript")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/typescript/tsconfig.json"},"tsconfig.json")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#typescript"},"TS compilation config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/compiler/configure-env-with-compiler"},"Replace compiler"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/tester/overview"},"Tester")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/jest"},"Jest")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/jest/jest.config.js"},"jest.config.js")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#jest"},"Jest config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/tester/configure-env-with-tester"},"Replace Tester"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/linter/overview"},"Linting")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/eslint"},"ESLint")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/eslint/eslintrc.ts"},"eslintrc.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#eslint"},"ESLint Config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/linter/configure-env-with-linter"},"Replace Linter"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/formatter/overview"},"Formatter")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/prettier"},"Prettier")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/prettier/prettier.config.js"},"prettier.config.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#prettier"},"Prettier config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/formatter/configure-env-with-formatter"},"Replace Formatter"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},"DevServer"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/webpack/webpack"},"Webpack")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/webpack/webpack.config.preview.dev.ts"},"webpack.config.preview.dev.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 Webpack config (for bundling in the workspace)")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/preview/overview"},"Preview")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null}),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/preview/register-custom-preview"},"Add preview"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/packages/packages-overview"},"Package")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},"See the ",(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/typescript/typescript/~code/typescript.main.runtime.ts"},"TypeScript Aspect")," config"),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/packages/managing-package-json#set-configuration-from-an-env"},"Add Env package config")," ",(0,_react2.mdx)("br",null)," \u2022 TypeScript's package config")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},"Bundler"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/webpack/webpack"},"Webpack")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/webpack/webpack.config.preview.ts"},"webpack.config.preview.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 Webpack config (for bundling during build)")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/docs/docs-overview"},"Documentation")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/docs/index.tsx"},"Docs template")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/docs/docs-templates"},"Replace docs template"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"http://localhost:3000/docs/dev-services/builder/builder-overview"},"Builder")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"http://localhost:3000/docs/dev-services/builder/builder-overview"},"Build pipeline")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/builder/build-pipelines"},"Build pipelines"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dependencies/dependencies-overview"},"Dependencies")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/react.env.ts"},"Env-dependencies")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dependencies/configuring-dependencies#configuring-dependencies-from-an-env"},"Env dependencies"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/generator/generator-overview"},"Generator")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/templates/react-component.ts"},"React templates")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:""},"Add a component template"))))),(0,_react2.mdx)("h3",null,"Default React versions"),(0,_react2.mdx)("p",null,"By default, the React env sets the following dependency versions for components using it:"),(0,_react2.mdx)("ul",null,(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"react")," (peer dependency): ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^16.8.0 || ^17.0.0")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"react-dom")," (peer dependency): ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^16.8.0 || ^17.0.0")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"@types/react"),": ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^17.0.8")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"@types/react-dom"),": ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^17.0.5")))))}MDXContent.__bit_component=__bit_component,MDXContent.isMDXComponent=!0},47158:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __bit_component={id:"teambit.react/react@0.0.738",homepage:"https://bit.dev/teambit/react/react",exported:!0},_interopRequireDefault=__webpack_require__2(88244);Object.defineProperty(exports2,"__esModule",{value:!0}),exports2.Logo=void 0;function _react(){const data=_interopRequireDefault(__webpack_require__2(63804));return _react=function(){return data},data}_react.__bit_component=__bit_component;const Logo=()=>_react().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},_react().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/react.svg"}));Logo.__bit_component=__bit_component,exports2.Logo=Logo},85057:module2=>{"use strict";module2.exports=MdxJsReact},63804:module2=>{"use strict";module2.exports=React},58459:module2=>{"use strict";module2.exports=TeambitMdxUiMdxScopeContext}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==void 0)return cachedModule.exports;var module2=__webpack_module_cache__[moduleId]={exports:{}};return __webpack_modules__[moduleId](module2,module2.exports,__webpack_require__),module2.exports}__webpack_require__.n=module2=>{var getter=module2&&module2.__esModule?()=>module2.default:()=>module2;return __webpack_require__.d(getter,{a:getter}),getter},__webpack_require__.d=(exports2,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports2,key)&&Object.defineProperty(exports2,key,{enumerable:!0,get:definition[key]})},__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports2=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports2,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{compositions:()=>compositions,overview:()=>overview});const compositions=[__webpack_require__(47158)],overview=[__webpack_require__(57330)]})(),__webpack_exports__})()});
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["default-bundler.ts"],"sourcesContent":[""],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["deploy-context.ts"],"sourcesContent":["import { AppDeployContext } from '@teambit/application';\nimport { ReactAppBuildResult } from './react-build-result';\n\nexport type ReactDeployContext = ReactAppBuildResult & AppDeployContext;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA","sourcesContent":["export { ReactAppType } from './react.app-type';\nexport type { ReactDeployContext } from './deploy-context';\nexport type { ReactAppOptions } from './react-app-options';\n"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { ReactAppType } from './react.app-type';\nexport type { ReactDeployContext } from './deploy-context';\nexport type { ReactAppOptions } from './react-app-options';\n"],"mappings":";;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA","sourcesContent":["export { prerenderPlugin } from './prerender';\n"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { prerenderPlugin } from './prerender';\n"],"mappings":";;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["prerender.ts"],"names":["prerenderPlugin","options","PrerenderSPAPlugin","renderer","PuppeteerRenderer"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;;;AAGO,MAAMA,eAAe,GAAIC,OAAD,IAAuC;AACpE,SAAO,KAAIC,iCAAJ;AACLC,IAAAA,QAAQ,EAAEC;AADL,KAEFH,OAFE,EAAP;AAID,CALM","sourcesContent":["import PrerenderSPAPlugin from 'prerender-spa-plugin-next';\nimport { PuppeteerRenderer } from '@teambit/react.modules.prerenderer-puppeteer';\nimport { ReactAppPrerenderOptions } from '../react-app-options';\n\nexport const prerenderPlugin = (options: ReactAppPrerenderOptions) => {\n return new PrerenderSPAPlugin({\n renderer: PuppeteerRenderer,\n ...options,\n });\n};\n"]}
1
+ {"version":3,"names":["prerenderPlugin","options","PrerenderSPAPlugin","renderer","PuppeteerRenderer"],"sources":["prerender.ts"],"sourcesContent":["import PrerenderSPAPlugin from 'prerender-spa-plugin-next';\nimport { PuppeteerRenderer } from '@teambit/react.modules.prerenderer-puppeteer';\nimport { ReactAppPrerenderOptions } from '../react-app-options';\n\nexport const prerenderPlugin = (options: ReactAppPrerenderOptions) => {\n return new PrerenderSPAPlugin({\n renderer: PuppeteerRenderer,\n ...options,\n });\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;;;AAGO,MAAMA,eAAe,GAAIC,OAAD,IAAuC;EACpE,OAAO,KAAIC,iCAAJ;IACLC,QAAQ,EAAEC;EADL,GAEFH,OAFE,EAAP;AAID,CALM"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["react-app-options.ts"],"sourcesContent":["import { Bundler, DevServer } from '@teambit/bundler';\nimport { WebpackConfigTransformer } from '@teambit/webpack';\n\nimport { ReactDeployContext } from './deploy-context';\n\ntype prerenderedRoute = {\n /** The prerendered route, after following redirects */\n route: string;\n /** The original route passed, before redirects */\n originalRoute: string;\n /** The resulting HTML for the route */\n html: string;\n /**\n * The path to write the rendered HTML to.\n * This is null (automatically calculated after postProcess)\n * unless explicitly set. */\n outputPath?: string | null;\n};\n\n/** https://github.com/Tofandel/prerender-spa-plugin-next */\nexport type ReactAppPrerenderOptions = {\n /**\n * sub folder to output the prerender, inside the webpack output folder\n * @default '/'\n */\n staticDir?: string;\n\n /** The index file to fall back on for SPAs. */\n indexPath?: string;\n\n /**\n * routes to prerender\n */\n routes: string[];\n\n /**\n * the proxy server you want the prerender headless browser to run on\n */\n server?: {\n proxy: {\n [key: string]: {\n /** required by HPM.\n * @default 'http://localhost:8000/' */\n target: string;\n pathRewrite: { [key: string]: string };\n };\n };\n };\n\n /**\n * Post processing of the prerendered html. This is useful for adding meta tags to the html or changing the file name.\n */\n postProcess?: (prerenderRoute: prerenderedRoute) => prerenderedRoute;\n\n /** The renderer you'd like to use to prerender the app.\n * @default new require(\"@prerenderer/renderer-puppeteer\").\n */\n renderer?: any;\n\n /** options to pass to the renderer class's constructor */\n rendererOptions?: any;\n};\n\nexport type ReactAppOptions = {\n /**\n * name of the application.\n */\n name: string;\n\n /**\n * path to entry files of the application.\n */\n entry: string[];\n\n /**\n * use server-side rendering for the app.\n */\n ssr?: boolean;\n\n /**\n * instance of bundler to use. default is Webpack.\n */\n bundler?: Bundler;\n\n /**\n * instance of dev server to use. default is Webpack.\n */\n devServer?: DevServer;\n\n /**\n * set webpack transformers\n */\n webpackTransformers?: WebpackConfigTransformer[];\n\n /**\n * decide whether to prerender your app. accepts an array of routes. if none, prerender would not apply.\n * e.g ['/plugins', '/learn', '/docs/quick-start]\n * You can also pass a configuration for the proxy, please refer here: https://github.com/webpack/docs/wiki/webpack-dev-server#proxy\n *\n */\n prerender?: ReactAppPrerenderOptions;\n\n /**\n * deploy function.\n */\n deploy?: (context: ReactDeployContext) => Promise<void>;\n\n /**\n * ranges of ports to use to run the app server.\n */\n portRange?: number[];\n\n /**\n * favicon for the app. You can pass an abs path (using require.resolve()) or a url.\n */\n favicon?: string;\n};\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["react-build-result.ts"],"sourcesContent":["import { AppBuildResult } from '@teambit/application';\n\nexport type ReactAppBuildResult = {\n /**\n * the directory which includes the built application public assets.\n * when using ssr, public dir is undefined.\n */\n publicDir?: string;\n} & AppBuildResult;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["react.app-type.ts"],"names":["ReactAppType","constructor","name","reactEnv","createApp","options","ReactApp","entry","portRange","prerender","bundler","devServer","webpackTransformers","deploy","favicon"],"mappings":";;;;;;;;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGO,MAAMA,YAAN,CAA+D;AACpEC,EAAAA,WAAW,CAAUC,IAAV,EAAgCC,QAAhC,EAAoD;AAAA,SAA1CD,IAA0C,GAA1CA,IAA0C;AAAA,SAApBC,QAAoB,GAApBA,QAAoB;AAAE;;AAElD,QAATC,SAAS,CAACC,OAAD,EAA2B;AACxC,WAAO,KAAIC,iBAAJ,EACLD,OAAO,CAACH,IADH,EAELG,OAAO,CAACE,KAFH,EAGLF,OAAO,CAACG,SAAR,IAAqB,CAAC,IAAD,EAAO,IAAP,CAHhB,EAIL,KAAKL,QAJA,EAKLE,OAAO,CAACI,SALH,EAMLJ,OAAO,CAACK,OANH,EAOLL,OAAO,CAACM,SAPH,EAQLN,OAAO,CAACO,mBARH,EASLP,OAAO,CAACQ,MATH,EAULR,OAAO,CAACS,OAVH,CAAP;AAYD;;AAhBmE","sourcesContent":["import { ApplicationType } from '@teambit/application';\nimport { ReactAppOptions } from './react-app-options';\nimport { ReactApp } from './react.application';\nimport { ReactEnv } from '../../react.env';\n\nexport class ReactAppType implements ApplicationType<ReactAppOptions> {\n constructor(readonly name: string, private reactEnv: ReactEnv) {}\n\n async createApp(options: ReactAppOptions) {\n return new ReactApp(\n options.name,\n options.entry,\n options.portRange || [3000, 4000],\n this.reactEnv,\n options.prerender,\n options.bundler,\n options.devServer,\n options.webpackTransformers,\n options.deploy,\n options.favicon\n );\n }\n}\n"]}
1
+ {"version":3,"names":["ReactAppType","constructor","name","reactEnv","createApp","options","ReactApp","entry","portRange","prerender","bundler","devServer","webpackTransformers","deploy","favicon"],"sources":["react.app-type.ts"],"sourcesContent":["import { ApplicationType } from '@teambit/application';\nimport { ReactAppOptions } from './react-app-options';\nimport { ReactApp } from './react.application';\nimport { ReactEnv } from '../../react.env';\n\nexport class ReactAppType implements ApplicationType<ReactAppOptions> {\n constructor(readonly name: string, private reactEnv: ReactEnv) {}\n\n async createApp(options: ReactAppOptions) {\n return new ReactApp(\n options.name,\n options.entry,\n options.portRange || [3000, 4000],\n this.reactEnv,\n options.prerender,\n options.bundler,\n options.devServer,\n options.webpackTransformers,\n options.deploy,\n options.favicon\n );\n }\n}\n"],"mappings":";;;;;;;;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,MAAMA,YAAN,CAA+D;EACpEC,WAAW,CAAUC,IAAV,EAAgCC,QAAhC,EAAoD;IAAA,KAA1CD,IAA0C,GAA1CA,IAA0C;IAAA,KAApBC,QAAoB,GAApBA,QAAoB;EAAE;;EAElD,MAATC,SAAS,CAACC,OAAD,EAA2B;IACxC,OAAO,KAAIC,iBAAJ,EACLD,OAAO,CAACH,IADH,EAELG,OAAO,CAACE,KAFH,EAGLF,OAAO,CAACG,SAAR,IAAqB,CAAC,IAAD,EAAO,IAAP,CAHhB,EAIL,KAAKL,QAJA,EAKLE,OAAO,CAACI,SALH,EAMLJ,OAAO,CAACK,OANH,EAOLL,OAAO,CAACM,SAPH,EAQLN,OAAO,CAACO,mBARH,EASLP,OAAO,CAACQ,MATH,EAULR,OAAO,CAACS,OAVH,CAAP;EAYD;;AAhBmE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["react.application.ts"],"names":["ReactApp","constructor","name","entry","portRange","reactEnv","prerender","bundler","devServer","transformers","deploy","favicon","isPrerendering","TerserPlugin","extractComments","terserOptions","parse","ecma","compress","warnings","comparisons","inline","mangle","safari10","output","comments","ascii_only","minify","esbuildMinify","run","context","from","to","port","Port","getPort","listen","devServerContext","getDevServerContext","getDevServer","configMutator","addTopLevel","historyApiFallback","index","disableDotRule","raw","publicPath","build","htmlConfig","title","templateContent","Object","assign","html","getBundler","publicDir","getPublicDir","dir","getDefaultBundler","capsule","env","outputPath","path","distDir","getCompiler","entries","map","require","resolve","staticDir","bundlerContext","targets","components","component","rootPath","metaData","initiator","envId","id","defaultTransformer","config","addPlugin","optimization","minimizer","push","getESBuildConfig","applicationType"],"mappings":";;;;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AAWqC,YAAlB,2DAAO,uBAAyBC,SAAhC,EAA4CA,SAAD,IAAe;AACxD,iBAAOA,SAAS,CAAClF,WAAV,CAAsBC,IAAtB,KAA+B,cAAtC;AACD,SAFD;AAIA,kCAAA8E,MAAM,CAACnC,GAAP,CAAWqC,YAAX,kFAAyBC,SAAzB,CAAmCC,IAAnC,CAAwC,KAAKC,gBAAL,EAAxC;AACD;;AAED,aAAOL,MAAP;AACD,KAZD;;AAaA,UAAMvE,YAAY,GAAG,CAACsE,kBAAD,EAAqB,GAAG,KAAKtE,YAA7B,CAArB;AACA,UAAMF,OAAgB,GAAG,MAAMF,QAAQ,CAACiD,UAAT,CAAoBgB,cAApB,EAAoC7D,YAApC,CAA/B;AACA,WAAOF,OAAP;AACD;;AAsDOiD,EAAAA,YAAY,GAAG;AACrB,WAAO,kBAAK,KAAK8B,eAAV,EAA2B,KAAKpF,IAAhC,CAAP;AACD;;AAEOoC,EAAAA,mBAAmB,CAACR,OAAD,EAAwC;AACjE,WAAOqB,MAAM,CAACC,MAAP,CAActB,OAAd,EAAuB;AAC5B3B,MAAAA,KAAK,EAAE,KAAKA,KADgB;AAE5BuE,MAAAA,QAAQ,EAAE,EAFkB;AAG5B5B,MAAAA,UAAU,EAAG,UAAS,KAAK5C,IAAK,EAHJ;AAI5B+C,MAAAA,KAAK,EAAE,KAAK/C,IAJgB;AAK5BS,MAAAA,OAAO,EAAE,KAAKA;AALc,KAAvB,CAAP;AAOD;;AA7K0C","sourcesContent":["import { join, basename } from 'path';\nimport { Application, AppContext, AppBuildContext } from '@teambit/application';\nimport { Bundler, DevServer, BundlerContext, DevServerContext, BundlerHtmlConfig } from '@teambit/bundler';\nimport { Port } from '@teambit/toolbox.network.get-port';\nimport { remove } from 'lodash';\nimport TerserPlugin from 'terser-webpack-plugin';\nimport { WebpackConfigTransformer } from '@teambit/webpack';\nimport { ReactEnv } from '../../react.env';\nimport { prerenderPlugin } from './plugins';\nimport { ReactAppBuildResult } from './react-build-result';\nimport { ReactAppPrerenderOptions } from './react-app-options';\nimport { html } from '../../webpack';\nimport { ReactDeployContext } from '.';\n\nexport class ReactApp implements Application {\n constructor(\n readonly name: string,\n readonly entry: string[],\n readonly portRange: number[],\n private reactEnv: ReactEnv,\n readonly prerender?: ReactAppPrerenderOptions,\n readonly bundler?: Bundler,\n readonly devServer?: DevServer,\n readonly transformers: WebpackConfigTransformer[] = [],\n readonly deploy?: (context: ReactDeployContext) => Promise<void>,\n readonly favicon?: string\n ) {}\n readonly applicationType = 'react-common-js';\n readonly dir = 'public';\n\n async run(context: AppContext): Promise<number> {\n const [from, to] = this.portRange;\n const port = await Port.getPort(from, to);\n if (this.devServer) {\n await this.devServer.listen(port);\n return port;\n }\n const devServerContext = this.getDevServerContext(context);\n const devServer = this.reactEnv.getDevServer(devServerContext, [\n (configMutator) =>\n configMutator.addTopLevel('devServer', {\n historyApiFallback: {\n index: '/index.html',\n disableDotRule: true,\n },\n }),\n (configMutator) => {\n if (!configMutator.raw.output) configMutator.raw.output = {};\n configMutator.raw.output.publicPath = '/';\n\n return configMutator;\n },\n ...this.transformers,\n ]);\n await devServer.listen(port);\n return port;\n }\n\n async build(context: AppBuildContext): Promise<ReactAppBuildResult> {\n const htmlConfig: BundlerHtmlConfig[] = [\n {\n title: context.name,\n templateContent: html(context.name),\n minify: false,\n favicon: this.favicon,\n // filename: ''.html`,\n },\n ];\n Object.assign(context, {\n html: htmlConfig,\n });\n const bundler = await this.getBundler(context);\n await bundler.run();\n return { publicDir: `${this.getPublicDir()}/${this.dir}` };\n }\n\n private getBundler(context: AppBuildContext) {\n if (this.bundler) return this.bundler;\n return this.getDefaultBundler(context);\n }\n private async getDefaultBundler(context: AppBuildContext) {\n const { capsule } = context;\n const reactEnv: ReactEnv = context.env;\n const publicDir = this.getPublicDir();\n const outputPath = join(capsule.path, publicDir);\n const { distDir } = reactEnv.getCompiler();\n const entries = this.entry.map((entry) => require.resolve(`${capsule.path}/${distDir}/${basename(entry)}`));\n const staticDir = join(outputPath, this.dir);\n\n const bundlerContext: BundlerContext = Object.assign(context, {\n targets: [\n {\n components: [capsule?.component],\n entries,\n outputPath,\n },\n ],\n entry: [],\n rootPath: '/',\n metaData: {\n initiator: `building app: ${context.name}`,\n envId: context.id,\n },\n });\n\n const defaultTransformer: WebpackConfigTransformer = (configMutator) => {\n const config = configMutator.addTopLevel('output', { path: staticDir, publicPath: `/` });\n if (this.prerender) config.addPlugin(prerenderPlugin(this.prerender));\n if (config.raw.optimization?.minimizer) {\n remove(config.raw.optimization?.minimizer, (minimizer) => {\n return minimizer.constructor.name === 'TerserPlugin';\n });\n\n config.raw.optimization?.minimizer.push(this.getESBuildConfig());\n }\n\n return config;\n };\n const transformers = [defaultTransformer, ...this.transformers];\n const bundler: Bundler = await reactEnv.getBundler(bundlerContext, transformers);\n return bundler;\n }\n private getESBuildConfig = (isPrerendering = this.prerender) => {\n // We don't want to use esbuild in case of prerendering since the headless browser puppeteer doesn't support\n // the output of esbuild\n\n if (isPrerendering) {\n return new TerserPlugin({\n extractComments: false,\n terserOptions: {\n parse: {\n // We want terser to parse ecma 8 code. However, we don't want it\n // to apply any minification steps that turns valid ecma 5 code\n // into invalid ecma 5 code. This is why the 'compress' and 'output'\n // sections only apply transformations that are ecma 5 safe\n // https://github.com/facebook/create-react-app/pull/4234\n ecma: 8,\n },\n compress: {\n ecma: 5,\n warnings: false,\n // Disabled because of an issue with Uglify breaking seemingly valid code:\n // https://github.com/facebook/create-react-app/issues/2376\n // Pending further investigation:\n // https://github.com/mishoo/UglifyJS2/issues/2011\n comparisons: false,\n // Disabled because of an issue with Terser breaking valid code:\n // https://github.com/facebook/create-react-app/issues/5250\n // Pending further investigation:\n // https://github.com/terser-js/terser/issues/120\n inline: 2,\n },\n mangle: {\n safari10: true,\n },\n output: {\n ecma: 5,\n comments: false,\n // Turned on because emoji and regex is not minified properly using default\n // https://github.com/facebook/create-react-app/issues/2488\n ascii_only: true,\n },\n },\n });\n }\n return new TerserPlugin({\n minify: TerserPlugin.esbuildMinify,\n // `terserOptions` options will be passed to `esbuild`\n // Link to options - https://esbuild.github.io/api/#minify\n terserOptions: {\n minify: true,\n },\n });\n };\n\n private getPublicDir() {\n return join(this.applicationType, this.name);\n }\n\n private getDevServerContext(context: AppContext): DevServerContext {\n return Object.assign(context, {\n entry: this.entry,\n rootPath: '',\n publicPath: `public/${this.name}`,\n title: this.name,\n favicon: this.favicon,\n });\n }\n}\n"]}
1
+ {"version":3,"names":["ReactApp","constructor","name","entry","portRange","reactEnv","prerender","bundler","devServer","transformers","deploy","favicon","isPrerendering","TerserPlugin","extractComments","terserOptions","parse","ecma","compress","warnings","comparisons","inline","mangle","safari10","output","comments","ascii_only","minify","esbuildMinify","run","context","from","to","port","Port","getPort","listen","devServerContext","getDevServerContext","getDevServer","configMutator","addTopLevel","historyApiFallback","index","disableDotRule","raw","publicPath","build","htmlConfig","title","templateContent","html","Object","assign","getBundler","publicDir","getPublicDir","dir","getDefaultBundler","capsule","env","outputPath","join","path","distDir","getCompiler","entries","map","require","resolve","basename","staticDir","bundlerContext","targets","components","component","rootPath","metaData","initiator","envId","id","defaultTransformer","config","addPlugin","prerenderPlugin","optimization","minimizer","remove","push","getESBuildConfig","applicationType"],"sources":["react.application.ts"],"sourcesContent":["import { join, basename } from 'path';\nimport { Application, AppContext, AppBuildContext } from '@teambit/application';\nimport { Bundler, DevServer, BundlerContext, DevServerContext, BundlerHtmlConfig } from '@teambit/bundler';\nimport { Port } from '@teambit/toolbox.network.get-port';\nimport { remove } from 'lodash';\nimport TerserPlugin from 'terser-webpack-plugin';\nimport { WebpackConfigTransformer } from '@teambit/webpack';\nimport { ReactEnv } from '../../react.env';\nimport { prerenderPlugin } from './plugins';\nimport { ReactAppBuildResult } from './react-build-result';\nimport { ReactAppPrerenderOptions } from './react-app-options';\nimport { html } from '../../webpack';\nimport { ReactDeployContext } from '.';\n\nexport class ReactApp implements Application {\n constructor(\n readonly name: string,\n readonly entry: string[],\n readonly portRange: number[],\n private reactEnv: ReactEnv,\n readonly prerender?: ReactAppPrerenderOptions,\n readonly bundler?: Bundler,\n readonly devServer?: DevServer,\n readonly transformers: WebpackConfigTransformer[] = [],\n readonly deploy?: (context: ReactDeployContext) => Promise<void>,\n readonly favicon?: string\n ) {}\n readonly applicationType = 'react-common-js';\n readonly dir = 'public';\n\n async run(context: AppContext): Promise<number> {\n const [from, to] = this.portRange;\n const port = await Port.getPort(from, to);\n if (this.devServer) {\n await this.devServer.listen(port);\n return port;\n }\n const devServerContext = this.getDevServerContext(context);\n const devServer = this.reactEnv.getDevServer(devServerContext, [\n (configMutator) =>\n configMutator.addTopLevel('devServer', {\n historyApiFallback: {\n index: '/index.html',\n disableDotRule: true,\n },\n }),\n (configMutator) => {\n if (!configMutator.raw.output) configMutator.raw.output = {};\n configMutator.raw.output.publicPath = '/';\n\n return configMutator;\n },\n ...this.transformers,\n ]);\n await devServer.listen(port);\n return port;\n }\n\n async build(context: AppBuildContext): Promise<ReactAppBuildResult> {\n const htmlConfig: BundlerHtmlConfig[] = [\n {\n title: context.name,\n templateContent: html(context.name),\n minify: false,\n favicon: this.favicon,\n // filename: ''.html`,\n },\n ];\n Object.assign(context, {\n html: htmlConfig,\n });\n const bundler = await this.getBundler(context);\n await bundler.run();\n return { publicDir: `${this.getPublicDir()}/${this.dir}` };\n }\n\n private getBundler(context: AppBuildContext) {\n if (this.bundler) return this.bundler;\n return this.getDefaultBundler(context);\n }\n private async getDefaultBundler(context: AppBuildContext) {\n const { capsule } = context;\n const reactEnv: ReactEnv = context.env;\n const publicDir = this.getPublicDir();\n const outputPath = join(capsule.path, publicDir);\n const { distDir } = reactEnv.getCompiler();\n const entries = this.entry.map((entry) => require.resolve(`${capsule.path}/${distDir}/${basename(entry)}`));\n const staticDir = join(outputPath, this.dir);\n\n const bundlerContext: BundlerContext = Object.assign(context, {\n targets: [\n {\n components: [capsule?.component],\n entries,\n outputPath,\n },\n ],\n entry: [],\n rootPath: '/',\n metaData: {\n initiator: `building app: ${context.name}`,\n envId: context.id,\n },\n });\n\n const defaultTransformer: WebpackConfigTransformer = (configMutator) => {\n const config = configMutator.addTopLevel('output', { path: staticDir, publicPath: `/` });\n if (this.prerender) config.addPlugin(prerenderPlugin(this.prerender));\n if (config.raw.optimization?.minimizer) {\n remove(config.raw.optimization?.minimizer, (minimizer) => {\n return minimizer.constructor.name === 'TerserPlugin';\n });\n\n config.raw.optimization?.minimizer.push(this.getESBuildConfig());\n }\n\n return config;\n };\n const transformers = [defaultTransformer, ...this.transformers];\n const bundler: Bundler = await reactEnv.getBundler(bundlerContext, transformers);\n return bundler;\n }\n private getESBuildConfig = (isPrerendering = this.prerender) => {\n // We don't want to use esbuild in case of prerendering since the headless browser puppeteer doesn't support\n // the output of esbuild\n\n if (isPrerendering) {\n return new TerserPlugin({\n extractComments: false,\n terserOptions: {\n parse: {\n // We want terser to parse ecma 8 code. However, we don't want it\n // to apply any minification steps that turns valid ecma 5 code\n // into invalid ecma 5 code. This is why the 'compress' and 'output'\n // sections only apply transformations that are ecma 5 safe\n // https://github.com/facebook/create-react-app/pull/4234\n ecma: 8,\n },\n compress: {\n ecma: 5,\n warnings: false,\n // Disabled because of an issue with Uglify breaking seemingly valid code:\n // https://github.com/facebook/create-react-app/issues/2376\n // Pending further investigation:\n // https://github.com/mishoo/UglifyJS2/issues/2011\n comparisons: false,\n // Disabled because of an issue with Terser breaking valid code:\n // https://github.com/facebook/create-react-app/issues/5250\n // Pending further investigation:\n // https://github.com/terser-js/terser/issues/120\n inline: 2,\n },\n mangle: {\n safari10: true,\n },\n output: {\n ecma: 5,\n comments: false,\n // Turned on because emoji and regex is not minified properly using default\n // https://github.com/facebook/create-react-app/issues/2488\n ascii_only: true,\n },\n },\n });\n }\n return new TerserPlugin({\n minify: TerserPlugin.esbuildMinify,\n // `terserOptions` options will be passed to `esbuild`\n // Link to options - https://esbuild.github.io/api/#minify\n terserOptions: {\n minify: true,\n },\n });\n };\n\n private getPublicDir() {\n return join(this.applicationType, this.name);\n }\n\n private getDevServerContext(context: AppContext): DevServerContext {\n return Object.assign(context, {\n entry: this.entry,\n rootPath: '',\n publicPath: `public/${this.name}`,\n title: this.name,\n favicon: this.favicon,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,MAAMA,QAAN,CAAsC;EAC3CC,WAAW,CACAC,IADA,EAEAC,KAFA,EAGAC,SAHA,EAIDC,QAJC,EAKAC,SALA,EAMAC,OANA,EAOAC,SAPA,EAQAC,YAAwC,GAAG,EAR3C,EASAC,MATA,EAUAC,OAVA,EAWT;IAAA,KAVST,IAUT,GAVSA,IAUT;IAAA,KATSC,KAST,GATSA,KAST;IAAA,KARSC,SAQT,GARSA,SAQT;IAAA,KAPQC,QAOR,GAPQA,QAOR;IAAA,KANSC,SAMT,GANSA,SAMT;IAAA,KALSC,OAKT,GALSA,OAKT;IAAA,KAJSC,SAIT,GAJSA,SAIT;IAAA,KAHSC,YAGT,GAHSA,YAGT;IAAA,KAFSC,MAET,GAFSA,MAET;IAAA,KADSC,OACT,GADSA,OACT;IAAA,yDACyB,iBADzB;IAAA,6CAEa,QAFb;IAAA,0DAgGyB,CAACC,cAAc,GAAG,KAAKN,SAAvB,KAAqC;MAC9D;MACA;MAEA,IAAIM,cAAJ,EAAoB;QAClB,OAAO,KAAIC,8BAAJ,EAAiB;UACtBC,eAAe,EAAE,KADK;UAEtBC,aAAa,EAAE;YACbC,KAAK,EAAE;cACL;cACA;cACA;cACA;cACA;cACAC,IAAI,EAAE;YAND,CADM;YASbC,QAAQ,EAAE;cACRD,IAA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CAAsBC,IAAtB,KAA+B,cAAtC;QACD,CAFD;QAIA,0BAAAgF,MAAM,CAACrC,GAAP,CAAWwC,YAAX,kFAAyBC,SAAzB,CAAmCE,IAAnC,CAAwC,KAAKC,gBAAL,EAAxC;MACD;;MAED,OAAOP,MAAP;IACD,CAZD;;IAaA,MAAMzE,YAAY,GAAG,CAACwE,kBAAD,EAAqB,GAAG,KAAKxE,YAA7B,CAArB;IACA,MAAMF,OAAgB,GAAG,MAAMF,QAAQ,CAACiD,UAAT,CAAoBkB,cAApB,EAAoC/D,YAApC,CAA/B;IACA,OAAOF,OAAP;EACD;;EAsDOiD,YAAY,GAAG;IACrB,OAAO,IAAAM,YAAA,EAAK,KAAK4B,eAAV,EAA2B,KAAKxF,IAAhC,CAAP;EACD;;EAEOoC,mBAAmB,CAACR,OAAD,EAAwC;IACjE,OAAOsB,MAAM,CAACC,MAAP,CAAcvB,OAAd,EAAuB;MAC5B3B,KAAK,EAAE,KAAKA,KADgB;MAE5ByE,QAAQ,EAAE,EAFkB;MAG5B9B,UAAU,EAAG,UAAS,KAAK5C,IAAK,EAHJ;MAI5B+C,KAAK,EAAE,KAAK/C,IAJgB;MAK5BS,OAAO,EAAE,KAAKA;IALc,CAAvB,CAAP;EAOD;;AA7K0C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["compositions-app.tsx"],"names":["hideScrollbars","CompositionsApp","Composition","previewContext","providers","get","ReactAspect","id","safeComposition","ErrorFallback"],"mappings":";;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AACA,MAAMA,cAAc,GAAG,0CAAvB;;AAEO,SAASC,eAAT,CAAyB;AAC9BC,EAAAA,WAD8B;AAE9BC,EAAAA;AAF8B,CAAzB,EAMJ;AACD,QAAM;AAAEC,IAAAA,SAAS,GAAG;AAAd,MAAqBD,cAAc,CAACE,GAAf,CAAmBC,sBAAYC,EAA/B,KAAsC,EAAjE;AAEA,QAAMC,eAAe,GAAG,6BAAYN,WAAW,iBAAI,+BAAC,WAAD,OAA3B,eAA4C,+BAAC,uCAAD,OAA5C,CAAxB;AAEA,sBACE,+BAAC,mCAAD;AAAe,IAAA,iBAAiB,EAAEO,wBAAlC;AAAiD,IAAA,SAAS,EAAE,CAACP,WAAD;AAA5D,kBACE,+BAAC,uBAAD;AAAU,IAAA,UAAU,EAAEE;AAAtB,kBACE,8CAAQJ,cAAR,CADF,EAEGQ,eAFH,CADF,CADF;AAQD","sourcesContent":["import React, { ComponentType } from 'react';\nimport { Composer } from '@teambit/base-ui.utils.composer';\nimport { StandaloneNotFoundPage } from '@teambit/design.ui.pages.standalone-not-found-page';\nimport { RenderingContext } from '@teambit/preview';\nimport { ErrorFallback } from '@teambit/react.ui.error-fallback';\nimport { useFallback } from '@teambit/react.ui.loader-fallback';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport { ReactAspect } from './react.aspect';\n\n// hide scrollbars so they won't be visible in the preview at the component card (and it's ok not to show them in the compositions page)\nconst hideScrollbars = 'body::-webkit-scrollbar {display: none;}';\n\nexport function CompositionsApp({\n Composition,\n previewContext,\n}: {\n Composition?: ComponentType;\n previewContext: RenderingContext;\n}) {\n const { providers = [] } = previewContext.get(ReactAspect.id) || {};\n\n const safeComposition = useFallback(Composition && <Composition />, <StandaloneNotFoundPage />);\n\n return (\n <ErrorBoundary FallbackComponent={ErrorFallback} resetKeys={[Composition]}>\n <Composer components={providers}>\n <style>{hideScrollbars}</style>\n {safeComposition}\n </Composer>\n </ErrorBoundary>\n );\n}\n"]}
1
+ {"version":3,"names":["hideScrollbars","CompositionsApp","Composition","previewContext","providers","get","ReactAspect","id","safeComposition","useFallback","ErrorFallback"],"sources":["compositions-app.tsx"],"sourcesContent":["import React, { ComponentType } from 'react';\nimport { Composer } from '@teambit/base-ui.utils.composer';\nimport { StandaloneNotFoundPage } from '@teambit/design.ui.pages.standalone-not-found-page';\nimport { RenderingContext } from '@teambit/preview';\nimport { ErrorFallback } from '@teambit/react.ui.error-fallback';\nimport { useFallback } from '@teambit/react.ui.loader-fallback';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport { ReactAspect } from './react.aspect';\n\n// hide scrollbars so they won't be visible in the preview at the component card (and it's ok not to show them in the compositions page)\nconst hideScrollbars = 'body::-webkit-scrollbar {display: none;}';\n\nexport function CompositionsApp({\n Composition,\n previewContext,\n}: {\n Composition?: ComponentType;\n previewContext: RenderingContext;\n}) {\n const { providers = [] } = previewContext.get(ReactAspect.id) || {};\n\n const safeComposition = useFallback(Composition && <Composition />, <StandaloneNotFoundPage />);\n\n return (\n <ErrorBoundary FallbackComponent={ErrorFallback} resetKeys={[Composition]}>\n <Composer components={providers}>\n <style>{hideScrollbars}</style>\n {safeComposition}\n </Composer>\n </ErrorBoundary>\n );\n}\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;AACA,MAAMA,cAAc,GAAG,0CAAvB;;AAEO,SAASC,eAAT,CAAyB;EAC9BC,WAD8B;EAE9BC;AAF8B,CAAzB,EAMJ;EACD,MAAM;IAAEC,SAAS,GAAG;EAAd,IAAqBD,cAAc,CAACE,GAAf,CAAmBC,qBAAA,CAAYC,EAA/B,KAAsC,EAAjE;EAEA,MAAMC,eAAe,GAAG,IAAAC,uBAAA,EAAYP,WAAW,iBAAI,+BAAC,WAAD,OAA3B,eAA4C,+BAAC,uCAAD,OAA5C,CAAxB;EAEA,oBACE,+BAAC,mCAAD;IAAe,iBAAiB,EAAEQ,wBAAlC;IAAiD,SAAS,EAAE,CAACR,WAAD;EAA5D,gBACE,+BAAC,uBAAD;IAAU,UAAU,EAAEE;EAAtB,gBACE,8CAAQJ,cAAR,CADF,EAEGQ,eAFH,CADF,CADF;AAQD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["eslintrc.js"],"names":["module","exports","extends","require","resolve","parserOptions","project"],"mappings":";;AACA;;AADA;AAGAA,MAAM,CAACC,OAAP,GAAiB;AACfC,EAAAA,OAAO,EAAE,CAACC,OAAO,CAACC,OAAR,CAAgB,wCAAhB,CAAD,CADM;AAEfC,EAAAA,aAAa,EAAE;AACb;AACA;AACA;AACAC,IAAAA,OAAO,EAAEH,OAAO,CAACC,OAAR,CAAgB,6BAAhB;AAJI;AAFA,CAAjB","sourcesContent":["// Using object\nimport '@teambit/react.eslint-config-bit-react';\n\nmodule.exports = {\n extends: [require.resolve('@teambit/react.eslint-config-bit-react')],\n parserOptions: {\n // parser: require.resolve('@typescript-eslint/parser'),\n // createDefaultProgram: true,\n // resolve the env tsconfig.\n project: require.resolve('../typescript/tsconfig.json'),\n },\n};\n"]}
1
+ {"version":3,"names":["module","exports","extends","require","resolve","parserOptions","project"],"sources":["eslintrc.js"],"sourcesContent":["// Using object\nimport '@teambit/react.eslint-config-bit-react';\n\nmodule.exports = {\n extends: [require.resolve('@teambit/react.eslint-config-bit-react')],\n parserOptions: {\n // parser: require.resolve('@typescript-eslint/parser'),\n // createDefaultProgram: true,\n // resolve the env tsconfig.\n project: require.resolve('../typescript/tsconfig.json'),\n },\n};\n"],"mappings":";;AACA;;AADA;AAGAA,MAAM,CAACC,OAAP,GAAiB;EACfC,OAAO,EAAE,CAACC,OAAO,CAACC,OAAR,CAAgB,wCAAhB,CAAD,CADM;EAEfC,aAAa,EAAE;IACb;IACA;IACA;IACAC,OAAO,EAAEH,OAAO,CAACC,OAAR,CAAgB,6BAAhB;EAJI;AAFA,CAAjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["highlighter-widget.tsx"],"names":["PARAM_NAME","HighlighterWidget","active","setActive"],"mappings":";;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA,MAAMA,UAAU,GAAG,aAAnB;;AAEO,SAASC,iBAAT,GAA6B;AAClC,QAAM,CAACC,MAAD,EAASC,SAAT,IAAsB,kDAAsBH,UAAtB,CAA5B;AAEA,sBACE,+BAAC,mBAAD;AAAS,IAAA,OAAO,EAAC;AAAjB,kBAEE,0DACE,+BAAC,6BAAD;AAAc,IAAA,IAAI,EAAC,oBAAnB;AAAwC,IAAA,OAAO,EAAE,MAAMG,SAAS,CAAC,CAACD,MAAF,CAAhE;AAA2E,IAAA,MAAM,EAAEA;AAAnF,IADF,CAFF,CADF;AAQD","sourcesContent":["import React from 'react';\nimport { OptionButton } from '@teambit/design.ui.input.option-button';\nimport { Tooltip } from '@teambit/design.ui.tooltip';\nimport { usePreviewQueryParams } from '@teambit/compositions.ui.hooks.use-composition';\n\nconst PARAM_NAME = 'highlighter';\n\nexport function HighlighterWidget() {\n const [active, setActive] = usePreviewQueryParams(PARAM_NAME);\n\n return (\n <Tooltip content=\"Component Highlighter (beta)\">\n {/* tooltip requires child with ref */}\n <span>\n <OptionButton icon=\"highlighter-toggle\" onClick={() => setActive(!active)} active={active} />\n </span>\n </Tooltip>\n );\n}\n"]}
1
+ {"version":3,"names":["PARAM_NAME","HighlighterWidget","active","setActive","usePreviewQueryParams"],"sources":["highlighter-widget.tsx"],"sourcesContent":["import React from 'react';\nimport { OptionButton } from '@teambit/design.ui.input.option-button';\nimport { Tooltip } from '@teambit/design.ui.tooltip';\nimport { usePreviewQueryParams } from '@teambit/compositions.ui.hooks.use-composition';\n\nconst PARAM_NAME = 'highlighter';\n\nexport function HighlighterWidget() {\n const [active, setActive] = usePreviewQueryParams(PARAM_NAME);\n\n return (\n <Tooltip content=\"Component Highlighter (beta)\">\n {/* tooltip requires child with ref */}\n <span>\n <OptionButton icon=\"highlighter-toggle\" onClick={() => setActive(!active)} active={active} />\n </span>\n </Tooltip>\n );\n}\n"],"mappings":";;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA,MAAMA,UAAU,GAAG,aAAnB;;AAEO,SAASC,iBAAT,GAA6B;EAClC,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsB,IAAAC,4CAAA,EAAsBJ,UAAtB,CAA5B;EAEA,oBACE,+BAAC,mBAAD;IAAS,OAAO,EAAC;EAAjB,gBAEE,0DACE,+BAAC,6BAAD;IAAc,IAAI,EAAC,oBAAnB;IAAwC,OAAO,EAAE,MAAMG,SAAS,CAAC,CAACD,MAAF,CAAhE;IAA2E,MAAM,EAAEA;EAAnF,EADF,CAFF,CADF;AAQD"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AASA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA","sourcesContent":["export type { ReactMain, UseWebpackModifiers, UseTypescriptModifiers } from './react.main.runtime';\nexport type { ReactPreview } from './react.preview.runtime';\nexport type { ReactAppType } from './apps/web/react.app-type';\nexport type { ReactEnv } from './react.env';\nexport type { ReactAppOptions, ReactDeployContext } from './apps/web';\n// Re-export it to indicate for people that extends the react env that we are using it\n// Commented - make errors in safari - SyntaxError: Invalid regular expression: invalid group specifier name\n// export * as styleRegexps from '@teambit/modules.style-regexps';\n\nexport { ReactAspect, ReactAspect as default } from './react.aspect';\n"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export type { ReactMain, UseWebpackModifiers, UseTypescriptModifiers } from './react.main.runtime';\nexport type { ReactPreview } from './react.preview.runtime';\nexport type { ReactAppType } from './apps/web/react.app-type';\nexport type { ReactEnv } from './react.env';\nexport type { ReactAppOptions, ReactDeployContext } from './apps/web';\n// Re-export it to indicate for people that extends the react env that we are using it\n// Commented - make errors in safari - SyntaxError: Invalid regular expression: invalid group specifier name\n// export * as styleRegexps from '@teambit/modules.style-regexps';\n\nexport { ReactAspect, ReactAspect as default } from './react.aspect';\n"],"mappings":";;;;;;;;;;;;;;;;;;AASA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA","sourcesContent":["import cjsConfig from './jest.cjs.config';\nimport esmConfig from './jest.esm.config';\n\nexport { cjsConfig, esmConfig };\n"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import cjsConfig from './jest.cjs.config';\nimport esmConfig from './jest.esm.config';\n\nexport { cjsConfig, esmConfig };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["jest.base.config.js"],"names":["module","exports","setupFiles","require","resolve","setupFilesAfterEnv","testEnvironment","transform","transformIgnorePatterns","modulePaths","moduleNameMapper","moduleFileExtensions","testTimeout"],"mappings":";;AAAAA,MAAM,CAACC,OAAP,GAAiB;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACAC,EAAAA,UAAU,EAAE,CAACC,OAAO,CAACC,OAAR,CAAgB,0BAAhB,CAAD,CARG;AASfC,EAAAA,kBAAkB,EAAE,CAACF,OAAO,CAACC,OAAR,CAAgB,iBAAhB,CAAD,CATL;AAUf;AACA;AACA;AACA;AACAE,EAAAA,eAAe,EAAEH,OAAO,CAACC,OAAR,CAAgB,wBAAhB,CAdF;AAefG,EAAAA,SAAS,EAAE;AACT,kBAAcJ,OAAO,CAACC,OAAR,CAAgB,iCAAhB,CADL;AAET,2CAAuCD,OAAO,CAACC,OAAR,CAAgB,kCAAhB,CAF9B,CAGT;;AAHS,GAfI;AAoBfI,EAAAA,uBAAuB,EAAE,CAAC,iDAAD,EAAoD,iCAApD,CApBV;AAqBfC,EAAAA,WAAW,EAAE,EArBE;AAsBfC,EAAAA,gBAAgB,EAAE;AAChB,gCAA4BP,OAAO,CAACC,OAAR,CAAgB,oBAAhB,CADZ;AAEhB,sBAAkBD,OAAO,CAACC,OAAR,CAAgB,kBAAhB,CAFF;AAGhB,uCAAmCD,OAAO,CAACC,OAAR,CAAgB,oBAAhB;AAHnB,GAtBH;AA2BfO,EAAAA,oBAAoB,EAAE,CAAC,QAAD,EAAW,IAAX,EAAiB,QAAjB,EAA2B,IAA3B,EAAiC,SAAjC,EAA4C,KAA5C,EAAmD,MAAnD,EAA2D,SAA3D,EAAsE,KAAtE,EAA6E,MAA7E,CA3BP;AA4BfC,EAAAA,WAAW,EAAE,KA5BE,CA4BK;AACpB;;AA7Be,CAAjB","sourcesContent":["module.exports = {\n // \"roots\": [\n // \"<rootDir>/src\"\n // ],\n // \"collectCoverageFrom\": [\n // \"src/**/*.{js,jsx,ts,tsx}\",\n // \"!src/**/*.d.ts\"\n // ],\n setupFiles: [require.resolve('react-app-polyfill/jsdom')],\n setupFilesAfterEnv: [require.resolve('./setupTests.js')],\n // \"testMatch\": [\n // \"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}\",\n // \"<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}\"\n // ],\n testEnvironment: require.resolve('jest-environment-jsdom'),\n transform: {\n '^.+\\\\.css$': require.resolve('./transformers/css-transform.js'),\n '^(?!.*\\\\.(js|jsx|ts|tsx|css|json)$)': require.resolve('./transformers/file-transform.js'),\n // '^(?!.*\\\\.(svg|png|jpg|jpeg|gif|webp|woff|ttf|woff2)$)': require.resolve('./file-transform.js'),\n },\n transformIgnorePatterns: ['[/\\\\\\\\]node_modules[/\\\\\\\\].+\\\\.(js|jsx|ts|tsx)$', '^.+\\\\.module\\\\.(css|sass|scss)$'],\n modulePaths: [],\n moduleNameMapper: {\n '\\\\.(css|less|scss|sass)$': require.resolve('identity-obj-proxy'),\n '^react-native$': require.resolve('react-native-web'),\n '^.+\\\\.module\\\\.(css|sass|scss)$': require.resolve('identity-obj-proxy'),\n },\n moduleFileExtensions: ['web.js', 'js', 'web.ts', 'ts', 'web.tsx', 'tsx', 'json', 'web.jsx', 'jsx', 'node'],\n testTimeout: 30000, // @todo remove this once mocha-tester is ready and aspect-api testing are using it.\n // watchPlugins: [require.resolve('jest-watch-typeahead/filename'), require.resolve('jest-watch-typeahead/testname')],\n};\n"]}
1
+ {"version":3,"names":["module","exports","setupFiles","require","resolve","setupFilesAfterEnv","testEnvironment","transform","transformIgnorePatterns","modulePaths","moduleNameMapper","moduleFileExtensions","testTimeout"],"sources":["jest.base.config.js"],"sourcesContent":["module.exports = {\n // \"roots\": [\n // \"<rootDir>/src\"\n // ],\n // \"collectCoverageFrom\": [\n // \"src/**/*.{js,jsx,ts,tsx}\",\n // \"!src/**/*.d.ts\"\n // ],\n setupFiles: [require.resolve('react-app-polyfill/jsdom')],\n setupFilesAfterEnv: [require.resolve('./setupTests.js')],\n // \"testMatch\": [\n // \"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}\",\n // \"<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}\"\n // ],\n testEnvironment: require.resolve('jest-environment-jsdom'),\n transform: {\n '^.+\\\\.css$': require.resolve('./transformers/css-transform.js'),\n '^(?!.*\\\\.(js|jsx|ts|tsx|css|json)$)': require.resolve('./transformers/file-transform.js'),\n // '^(?!.*\\\\.(svg|png|jpg|jpeg|gif|webp|woff|ttf|woff2)$)': require.resolve('./file-transform.js'),\n },\n transformIgnorePatterns: ['[/\\\\\\\\]node_modules[/\\\\\\\\].+\\\\.(js|jsx|ts|tsx)$', '^.+\\\\.module\\\\.(css|sass|scss)$'],\n modulePaths: [],\n moduleNameMapper: {\n '\\\\.(css|less|scss|sass)$': require.resolve('identity-obj-proxy'),\n '^react-native$': require.resolve('react-native-web'),\n '^.+\\\\.module\\\\.(css|sass|scss)$': require.resolve('identity-obj-proxy'),\n },\n moduleFileExtensions: ['web.js', 'js', 'web.ts', 'ts', 'web.tsx', 'tsx', 'json', 'web.jsx', 'jsx', 'node'],\n testTimeout: 30000, // @todo remove this once mocha-tester is ready and aspect-api testing are using it.\n // watchPlugins: [require.resolve('jest-watch-typeahead/filename'), require.resolve('jest-watch-typeahead/testname')],\n};\n"],"mappings":";;AAAAA,MAAM,CAACC,OAAP,GAAiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACAC,UAAU,EAAE,CAACC,OAAO,CAACC,OAAR,CAAgB,0BAAhB,CAAD,CARG;EASfC,kBAAkB,EAAE,CAACF,OAAO,CAACC,OAAR,CAAgB,iBAAhB,CAAD,CATL;EAUf;EACA;EACA;EACA;EACAE,eAAe,EAAEH,OAAO,CAACC,OAAR,CAAgB,wBAAhB,CAdF;EAefG,SAAS,EAAE;IACT,cAAcJ,OAAO,CAACC,OAAR,CAAgB,iCAAhB,CADL;IAET,uCAAuCD,OAAO,CAACC,OAAR,CAAgB,kCAAhB,CAF9B,CAGT;;EAHS,CAfI;EAoBfI,uBAAuB,EAAE,CAAC,iDAAD,EAAoD,iCAApD,CApBV;EAqBfC,WAAW,EAAE,EArBE;EAsBfC,gBAAgB,EAAE;IAChB,4BAA4BP,OAAO,CAACC,OAAR,CAAgB,oBAAhB,CADZ;IAEhB,kBAAkBD,OAAO,CAACC,OAAR,CAAgB,kBAAhB,CAFF;IAGhB,mCAAmCD,OAAO,CAACC,OAAR,CAAgB,oBAAhB;EAHnB,CAtBH;EA2BfO,oBAAoB,EAAE,CAAC,QAAD,EAAW,IAAX,EAAiB,QAAjB,EAA2B,IAA3B,EAAiC,SAAjC,EAA4C,KAA5C,EAAmD,MAAnD,EAA2D,SAA3D,EAAsE,KAAtE,EAA6E,MAA7E,CA3BP;EA4BfC,WAAW,EAAE,KA5BE,CA4BK;EACpB;;AA7Be,CAAjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["jest.cjs.config.js"],"names":["baseConfig","require","cjsTransformer","resolve","cjsTransform","transform","cjsConfig","module","exports"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,MAAMA,UAAU,GAAGC,OAAO,CAAC,oBAAD,CAA1B;;AAEA,MAAMC,cAAc,GAAGD,OAAO,CAACE,OAAR,CAAgB,mCAAhB,CAAvB;;AAEA,MAAMC,YAAY,mCAAQJ,UAAU,CAACK,SAAnB;AAA8B,4BAA0BH;AAAxD,EAAlB;;AACA,MAAMI,SAAS,mCAAQN,UAAR;AAAoBK,EAAAA,SAAS,EAAED;AAA/B,EAAf;;AAEAG,MAAM,CAACC,OAAP,GAAiBF,SAAjB","sourcesContent":["const baseConfig = require('./jest.base.config');\n\nconst cjsTransformer = require.resolve('./transformers/cjs-transformer.js');\n\nconst cjsTransform = { ...baseConfig.transform, '^.+\\\\.(js|jsx|ts|tsx)$': cjsTransformer };\nconst cjsConfig = { ...baseConfig, transform: cjsTransform };\n\nmodule.exports = cjsConfig;\n"]}
1
+ {"version":3,"names":["baseConfig","require","cjsTransformer","resolve","cjsTransform","transform","cjsConfig","module","exports"],"sources":["jest.cjs.config.js"],"sourcesContent":["const baseConfig = require('./jest.base.config');\n\nconst cjsTransformer = require.resolve('./transformers/cjs-transformer.js');\n\nconst cjsTransform = { ...baseConfig.transform, '^.+\\\\.(js|jsx|ts|tsx)$': cjsTransformer };\nconst cjsConfig = { ...baseConfig, transform: cjsTransform };\n\nmodule.exports = cjsConfig;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,MAAMA,UAAU,GAAGC,OAAO,CAAC,oBAAD,CAA1B;;AAEA,MAAMC,cAAc,GAAGD,OAAO,CAACE,OAAR,CAAgB,mCAAhB,CAAvB;;AAEA,MAAMC,YAAY,mCAAQJ,UAAU,CAACK,SAAnB;EAA8B,0BAA0BH;AAAxD,EAAlB;;AACA,MAAMI,SAAS,mCAAQN,UAAR;EAAoBK,SAAS,EAAED;AAA/B,EAAf;;AAEAG,MAAM,CAACC,OAAP,GAAiBF,SAAjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["jest.config.js"],"names":["cjsConfig","require","module","exports"],"mappings":";;AAAA;AACA;AACA;AAEA,MAAMA,SAAS,GAAGC,OAAO,CAAC,mBAAD,CAAzB;;AAEAC,MAAM,CAACC,OAAP,GAAiBH,SAAjB","sourcesContent":["// DEPRECATED\n// This file is here for backward compatibility. not breaking users who used to import this file directly.\n// Please use the specific config file (jest.cjs.config / jest.esm.config) instead\n\nconst cjsConfig = require('./jest.cjs.config');\n\nmodule.exports = cjsConfig;\n"]}
1
+ {"version":3,"names":["cjsConfig","require","module","exports"],"sources":["jest.config.js"],"sourcesContent":["// DEPRECATED\n// This file is here for backward compatibility. not breaking users who used to import this file directly.\n// Please use the specific config file (jest.cjs.config / jest.esm.config) instead\n\nconst cjsConfig = require('./jest.cjs.config');\n\nmodule.exports = cjsConfig;\n"],"mappings":";;AAAA;AACA;AACA;AAEA,MAAMA,SAAS,GAAGC,OAAO,CAAC,mBAAD,CAAzB;;AAEAC,MAAM,CAACC,OAAP,GAAiBH,SAAjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["jest.esm.config.js"],"names":["baseConfig","require","esmTransformer","resolve","esmTransform","transform","esmConfig","extensionsToTreatAsEsm","module","exports"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,MAAMA,UAAU,GAAGC,OAAO,CAAC,oBAAD,CAA1B;;AAEA,MAAMC,cAAc,GAAGD,OAAO,CAACE,OAAR,CAAgB,mCAAhB,CAAvB;;AACA,MAAMC,YAAY,mCAAQJ,UAAU,CAACK,SAAnB;AAA8B,4BAA0BH;AAAxD,EAAlB;;AACA,MAAMI,SAAS,mCAAQN,UAAR;AAAoBO,EAAAA,sBAAsB,EAAE,CAAC,KAAD,EAAQ,MAAR,EAAgB,MAAhB,CAA5C;AAAqEF,EAAAA,SAAS,EAAED;AAAhF,EAAf;;AAEAI,MAAM,CAACC,OAAP,GAAiBH,SAAjB","sourcesContent":["const baseConfig = require('./jest.base.config');\n\nconst esmTransformer = require.resolve('./transformers/esm-transformer.js');\nconst esmTransform = { ...baseConfig.transform, '^.+\\\\.(js|jsx|ts|tsx)$': esmTransformer };\nconst esmConfig = { ...baseConfig, extensionsToTreatAsEsm: ['.ts', '.tsx', '.jsx'], transform: esmTransform };\n\nmodule.exports = esmConfig;\n"]}
1
+ {"version":3,"names":["baseConfig","require","esmTransformer","resolve","esmTransform","transform","esmConfig","extensionsToTreatAsEsm","module","exports"],"sources":["jest.esm.config.js"],"sourcesContent":["const baseConfig = require('./jest.base.config');\n\nconst esmTransformer = require.resolve('./transformers/esm-transformer.js');\nconst esmTransform = { ...baseConfig.transform, '^.+\\\\.(js|jsx|ts|tsx)$': esmTransformer };\nconst esmConfig = { ...baseConfig, extensionsToTreatAsEsm: ['.ts', '.tsx', '.jsx'], transform: esmTransform };\n\nmodule.exports = esmConfig;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,MAAMA,UAAU,GAAGC,OAAO,CAAC,oBAAD,CAA1B;;AAEA,MAAMC,cAAc,GAAGD,OAAO,CAACE,OAAR,CAAgB,mCAAhB,CAAvB;;AACA,MAAMC,YAAY,mCAAQJ,UAAU,CAACK,SAAnB;EAA8B,0BAA0BH;AAAxD,EAAlB;;AACA,MAAMI,SAAS,mCAAQN,UAAR;EAAoBO,sBAAsB,EAAE,CAAC,KAAD,EAAQ,MAAR,EAAgB,MAAhB,CAA5C;EAAqEF,SAAS,EAAED;AAAhF,EAAf;;AAEAI,MAAM,CAACC,OAAP,GAAiBH,SAAjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["setupTests.js"],"names":["require"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACAA,OAAO,CAAC,yCAAD,CAAP","sourcesContent":["// add babel-polyfill.\n// require('babel-polyfill');\n// jest-dom adds custom jest matchers for asserting on DOM nodes.\n// allows you to do things like:\n// expect(element).toHaveTextContent(/react/i)\n// learn more: https://github.com/testing-library/jest-dom\nrequire('@testing-library/jest-dom/extend-expect');\n"]}
1
+ {"version":3,"names":["require"],"sources":["setupTests.js"],"sourcesContent":["// add babel-polyfill.\n// require('babel-polyfill');\n// jest-dom adds custom jest matchers for asserting on DOM nodes.\n// allows you to do things like:\n// expect(element).toHaveTextContent(/react/i)\n// learn more: https://github.com/testing-library/jest-dom\nrequire('@testing-library/jest-dom/extend-expect');\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACAA,OAAO,CAAC,yCAAD,CAAP"}
@@ -1 +1 @@
1
- {"version":3,"sources":["base-transformer-plugins.js"],"names":["basePlugins","require","legacy","module","exports"],"mappings":";;AAAA;AAEA,MAAMA,WAAW,GAAG,CAClB,CAACC,OAAO,CAAC,4CAAD,CAAR,CADkB,EAElB,CAACA,OAAO,CAAC,mCAAD,CAAR,EAA+C;AAAEC,EAAAA,MAAM,EAAE;AAAV,CAA/C,CAFkB,EAGlB,CAACD,OAAO,CAAC,iCAAD,CAAR,CAHkB,EAIlB,CAACA,OAAO,CAAC,2CAAD,CAAR,CAJkB,EAKlB,CAACA,OAAO,CAAC,yCAAD,CAAR,CALkB,CAApB;AAQAE,MAAM,CAACC,OAAP,GAAiB;AACfJ,EAAAA;AADe,CAAjB","sourcesContent":["/* eslint-disable global-require */\n\nconst basePlugins = [\n [require('babel-plugin-transform-typescript-metadata')],\n [require('@babel/plugin-proposal-decorators'), { legacy: true }],\n [require('@babel/plugin-transform-runtime')],\n [require('@babel/plugin-proposal-object-rest-spread')],\n [require('@babel/plugin-proposal-class-properties')],\n];\n\nmodule.exports = {\n basePlugins,\n};\n"]}
1
+ {"version":3,"names":["basePlugins","require","legacy","module","exports"],"sources":["base-transformer-plugins.js"],"sourcesContent":["/* eslint-disable global-require */\n\nconst basePlugins = [\n [require('babel-plugin-transform-typescript-metadata')],\n [require('@babel/plugin-proposal-decorators'), { legacy: true }],\n [require('@babel/plugin-transform-runtime')],\n [require('@babel/plugin-proposal-object-rest-spread')],\n [require('@babel/plugin-proposal-class-properties')],\n];\n\nmodule.exports = {\n basePlugins,\n};\n"],"mappings":";;AAAA;AAEA,MAAMA,WAAW,GAAG,CAClB,CAACC,OAAO,CAAC,4CAAD,CAAR,CADkB,EAElB,CAACA,OAAO,CAAC,mCAAD,CAAR,EAA+C;EAAEC,MAAM,EAAE;AAAV,CAA/C,CAFkB,EAGlB,CAACD,OAAO,CAAC,iCAAD,CAAR,CAHkB,EAIlB,CAACA,OAAO,CAAC,2CAAD,CAAR,CAJkB,EAKlB,CAACA,OAAO,CAAC,yCAAD,CAAR,CALkB,CAApB;AAQAE,MAAM,CAACC,OAAP,GAAiB;EACfJ;AADe,CAAjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["base-transformer-presets.js"],"names":["basePresets","require","module","exports"],"mappings":";;AAAA;AAEA,MAAMA,WAAW,GAAG,CAACC,OAAO,CAAC,qBAAD,CAAR,EAAiCA,OAAO,CAAC,0BAAD,CAAxC,EAAsEA,OAAO,CAAC,mBAAD,CAA7E,CAApB;AAEAC,MAAM,CAACC,OAAP,GAAiB;AACfH,EAAAA;AADe,CAAjB","sourcesContent":["/* eslint-disable global-require */\n\nconst basePresets = [require('@babel/preset-react'), require('@babel/preset-typescript'), require('babel-preset-jest')];\n\nmodule.exports = {\n basePresets,\n};\n"]}
1
+ {"version":3,"names":["basePresets","require","module","exports"],"sources":["base-transformer-presets.js"],"sourcesContent":["/* eslint-disable global-require */\n\nconst basePresets = [require('@babel/preset-react'), require('@babel/preset-typescript'), require('babel-preset-jest')];\n\nmodule.exports = {\n basePresets,\n};\n"],"mappings":";;AAAA;AAEA,MAAMA,WAAW,GAAG,CAACC,OAAO,CAAC,qBAAD,CAAR,EAAiCA,OAAO,CAAC,0BAAD,CAAxC,EAAsEA,OAAO,CAAC,mBAAD,CAA7E,CAApB;AAEAC,MAAM,CAACC,OAAP,GAAiB;EACfH;AADe,CAAjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["base-transformer-process.js"],"names":["transform","require","generateProcessFunc","presets","plugins","src","filename","result","sourceMap","babelrc","configFile","code","module","exports"],"mappings":";;AAAA,MAAM;AAAEA,EAAAA;AAAF,IAAgBC,OAAO,CAAC,aAAD,CAA7B;;AAEA,MAAMC,mBAAmB,GAAG,CAACC,OAAD,EAAUC,OAAV,KAAsB;AAChD,SAAO,CAACC,GAAD,EAAMC,QAAN,KAAmB;AACxB,UAAMC,MAAM,GAAGP,SAAS,CAACK,GAAD,EAAM;AAC5BG,MAAAA,SAAS,EAAE,QADiB;AAE5BF,MAAAA,QAF4B;AAG5BH,MAAAA,OAH4B;AAI5BC,MAAAA,OAJ4B;AAK5BK,MAAAA,OAAO,EAAE,KALmB;AAM5BC,MAAAA,UAAU,EAAE;AANgB,KAAN,CAAxB;AASA,WAAOH,MAAM,GAAGA,MAAM,CAACI,IAAV,GAAiBN,GAA9B;AACD,GAXD;AAYD,CAbD;;AAeAO,MAAM,CAACC,OAAP,GAAiB;AACfX,EAAAA;AADe,CAAjB","sourcesContent":["const { transform } = require('@babel/core');\n\nconst generateProcessFunc = (presets, plugins) => {\n return (src, filename) => {\n const result = transform(src, {\n sourceMap: 'inline',\n filename,\n presets,\n plugins,\n babelrc: false,\n configFile: false,\n });\n\n return result ? result.code : src;\n };\n};\n\nmodule.exports = {\n generateProcessFunc,\n};\n"]}
1
+ {"version":3,"names":["transform","require","generateProcessFunc","presets","plugins","src","filename","result","sourceMap","babelrc","configFile","code","module","exports"],"sources":["base-transformer-process.js"],"sourcesContent":["const { transform } = require('@babel/core');\n\nconst generateProcessFunc = (presets, plugins) => {\n return (src, filename) => {\n const result = transform(src, {\n sourceMap: 'inline',\n filename,\n presets,\n plugins,\n babelrc: false,\n configFile: false,\n });\n\n return result ? result.code : src;\n };\n};\n\nmodule.exports = {\n generateProcessFunc,\n};\n"],"mappings":";;AAAA,MAAM;EAAEA;AAAF,IAAgBC,OAAO,CAAC,aAAD,CAA7B;;AAEA,MAAMC,mBAAmB,GAAG,CAACC,OAAD,EAAUC,OAAV,KAAsB;EAChD,OAAO,CAACC,GAAD,EAAMC,QAAN,KAAmB;IACxB,MAAMC,MAAM,GAAGP,SAAS,CAACK,GAAD,EAAM;MAC5BG,SAAS,EAAE,QADiB;MAE5BF,QAF4B;MAG5BH,OAH4B;MAI5BC,OAJ4B;MAK5BK,OAAO,EAAE,KALmB;MAM5BC,UAAU,EAAE;IANgB,CAAN,CAAxB;IASA,OAAOH,MAAM,GAAGA,MAAM,CAACI,IAAV,GAAiBN,GAA9B;EACD,CAXD;AAYD,CAbD;;AAeAO,MAAM,CAACC,OAAP,GAAiB;EACfX;AADe,CAAjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["cjs-transformer.js"],"names":["generateProcessFunc","require","basePlugins","basePresets","presets","targets","node","useBuiltIns","corejs","plugins","module","exports","process"],"mappings":";;;;AAAA;;AACA;AACA,MAAM;AAAEA,EAAAA;AAAF,IAA0BC,OAAO,CAAC,4BAAD,CAAvC;;AACA,MAAM;AAAEC,EAAAA;AAAF,IAAkBD,OAAO,CAAC,4BAAD,CAA/B;;AACA,MAAM;AAAEE,EAAAA;AAAF,IAAkBF,OAAO,CAAC,4BAAD,CAA/B;;AAEA,MAAMG,OAAO,GAAG,CACd,GAAGD,WADW,EAEd,CACEF,OAAO,CAAC,mBAAD,CADT,EAEE;AACEI,EAAAA,OAAO,EAAE;AACPC,IAAAA,IAAI,EAAE;AADC,GADX;AAIEC,EAAAA,WAAW,EAAE,OAJf;AAKEC,EAAAA,MAAM,EAAE;AALV,CAFF,CAFc,CAAhB;AAcA,MAAMC,OAAO,GAAG,CAAC,CAACR,OAAO,CAAC,0CAAD,CAAR,CAAD,EAAwD,GAAGC,WAA3D,CAAhB;AAEAQ,MAAM,CAACC,OAAP,GAAiB;AACfC,EAAAA,OAAO,EAAEZ,mBAAmB,CAACI,OAAD,EAAUK,OAAV;AADb,CAAjB","sourcesContent":["/* eslint-disable import/order */\n/* eslint-disable global-require */\nconst { generateProcessFunc } = require('./base-transformer-process');\nconst { basePlugins } = require('./base-transformer-plugins');\nconst { basePresets } = require('./base-transformer-presets');\n\nconst presets = [\n ...basePresets,\n [\n require('@babel/preset-env'),\n {\n targets: {\n node: 12,\n },\n useBuiltIns: 'usage',\n corejs: 3,\n },\n ],\n];\n\nconst plugins = [[require('@babel/plugin-transform-modules-commonjs')], ...basePlugins];\n\nmodule.exports = {\n process: generateProcessFunc(presets, plugins),\n};\n"]}
1
+ {"version":3,"names":["generateProcessFunc","require","basePlugins","basePresets","presets","targets","node","useBuiltIns","corejs","plugins","module","exports","process"],"sources":["cjs-transformer.js"],"sourcesContent":["/* eslint-disable import/order */\n/* eslint-disable global-require */\nconst { generateProcessFunc } = require('./base-transformer-process');\nconst { basePlugins } = require('./base-transformer-plugins');\nconst { basePresets } = require('./base-transformer-presets');\n\nconst presets = [\n ...basePresets,\n [\n require('@babel/preset-env'),\n {\n targets: {\n node: 12,\n },\n useBuiltIns: 'usage',\n corejs: 3,\n },\n ],\n];\n\nconst plugins = [[require('@babel/plugin-transform-modules-commonjs')], ...basePlugins];\n\nmodule.exports = {\n process: generateProcessFunc(presets, plugins),\n};\n"],"mappings":";;;;AAAA;;AACA;AACA,MAAM;EAAEA;AAAF,IAA0BC,OAAO,CAAC,4BAAD,CAAvC;;AACA,MAAM;EAAEC;AAAF,IAAkBD,OAAO,CAAC,4BAAD,CAA/B;;AACA,MAAM;EAAEE;AAAF,IAAkBF,OAAO,CAAC,4BAAD,CAA/B;;AAEA,MAAMG,OAAO,GAAG,CACd,GAAGD,WADW,EAEd,CACEF,OAAO,CAAC,mBAAD,CADT,EAEE;EACEI,OAAO,EAAE;IACPC,IAAI,EAAE;EADC,CADX;EAIEC,WAAW,EAAE,OAJf;EAKEC,MAAM,EAAE;AALV,CAFF,CAFc,CAAhB;AAcA,MAAMC,OAAO,GAAG,CAAC,CAACR,OAAO,CAAC,0CAAD,CAAR,CAAD,EAAwD,GAAGC,WAA3D,CAAhB;AAEAQ,MAAM,CAACC,OAAP,GAAiB;EACfC,OAAO,EAAEZ,mBAAmB,CAACI,OAAD,EAAUK,OAAV;AADb,CAAjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["css-transform.js"],"names":["module","exports","process","getCacheKey"],"mappings":";;AAAA;AACA;AAEAA,MAAM,CAACC,OAAP,GAAiB;AACfC,EAAAA,OAAO,GAAG;AACR,WAAO,sBAAP;AACD,GAHc;;AAIfC,EAAAA,WAAW,GAAG;AACZ;AACA,WAAO,cAAP;AACD;;AAPc,CAAjB","sourcesContent":["// This is a custom Jest transformer turning style imports into empty objects.\n// http://facebook.github.io/jest/docs/en/webpack.html\n\nmodule.exports = {\n process() {\n return 'module.exports = {};';\n },\n getCacheKey() {\n // The output is always the same.\n return 'cssTransform';\n },\n};\n"]}
1
+ {"version":3,"names":["module","exports","process","getCacheKey"],"sources":["css-transform.js"],"sourcesContent":["// This is a custom Jest transformer turning style imports into empty objects.\n// http://facebook.github.io/jest/docs/en/webpack.html\n\nmodule.exports = {\n process() {\n return 'module.exports = {};';\n },\n getCacheKey() {\n // The output is always the same.\n return 'cssTransform';\n },\n};\n"],"mappings":";;AAAA;AACA;AAEAA,MAAM,CAACC,OAAP,GAAiB;EACfC,OAAO,GAAG;IACR,OAAO,sBAAP;EACD,CAHc;;EAIfC,WAAW,GAAG;IACZ;IACA,OAAO,cAAP;EACD;;AAPc,CAAjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["esm-transformer.js"],"names":["basePlugins","require","basePresets","generateProcessFunc","presets","modules","targets","node","useBuiltIns","corejs","plugins","module","exports","process"],"mappings":";;;;AAAA;;AACA;AAEA,MAAM;AAAEA,EAAAA;AAAF,IAAkBC,OAAO,CAAC,4BAAD,CAA/B;;AACA,MAAM;AAAEC,EAAAA;AAAF,IAAkBD,OAAO,CAAC,4BAAD,CAA/B;;AACA,MAAM;AAAEE,EAAAA;AAAF,IAA0BF,OAAO,CAAC,4BAAD,CAAvC;;AAEA,MAAMG,OAAO,GAAG,CACd,GAAGF,WADW,EAEd,CACED,OAAO,CAAC,mBAAD,CADT,EAEE;AACEI,EAAAA,OAAO,EAAE,KADX;AAEEC,EAAAA,OAAO,EAAE;AACPC,IAAAA,IAAI,EAAE;AADC,GAFX;AAKEC,EAAAA,WAAW,EAAE,OALf;AAMEC,EAAAA,MAAM,EAAE;AANV,CAFF,CAFc,CAAhB;AAeA,MAAMC,OAAO,GAAGV,WAAhB;AAEAW,MAAM,CAACC,OAAP,GAAiB;AACfC,EAAAA,OAAO,EAAEV,mBAAmB,CAACC,OAAD,EAAUM,OAAV;AADb,CAAjB","sourcesContent":["/* eslint-disable global-require */\n/* eslint-disable import/order */\n\nconst { basePlugins } = require('./base-transformer-plugins');\nconst { basePresets } = require('./base-transformer-presets');\nconst { generateProcessFunc } = require('./base-transformer-process');\n\nconst presets = [\n ...basePresets,\n [\n require('@babel/preset-env'),\n {\n modules: false,\n targets: {\n node: 12,\n },\n useBuiltIns: 'usage',\n corejs: 3,\n },\n ],\n];\n\nconst plugins = basePlugins;\n\nmodule.exports = {\n process: generateProcessFunc(presets, plugins),\n};\n"]}
1
+ {"version":3,"names":["basePlugins","require","basePresets","generateProcessFunc","presets","modules","targets","node","useBuiltIns","corejs","plugins","module","exports","process"],"sources":["esm-transformer.js"],"sourcesContent":["/* eslint-disable global-require */\n/* eslint-disable import/order */\n\nconst { basePlugins } = require('./base-transformer-plugins');\nconst { basePresets } = require('./base-transformer-presets');\nconst { generateProcessFunc } = require('./base-transformer-process');\n\nconst presets = [\n ...basePresets,\n [\n require('@babel/preset-env'),\n {\n modules: false,\n targets: {\n node: 12,\n },\n useBuiltIns: 'usage',\n corejs: 3,\n },\n ],\n];\n\nconst plugins = basePlugins;\n\nmodule.exports = {\n process: generateProcessFunc(presets, plugins),\n};\n"],"mappings":";;;;AAAA;;AACA;AAEA,MAAM;EAAEA;AAAF,IAAkBC,OAAO,CAAC,4BAAD,CAA/B;;AACA,MAAM;EAAEC;AAAF,IAAkBD,OAAO,CAAC,4BAAD,CAA/B;;AACA,MAAM;EAAEE;AAAF,IAA0BF,OAAO,CAAC,4BAAD,CAAvC;;AAEA,MAAMG,OAAO,GAAG,CACd,GAAGF,WADW,EAEd,CACED,OAAO,CAAC,mBAAD,CADT,EAEE;EACEI,OAAO,EAAE,KADX;EAEEC,OAAO,EAAE;IACPC,IAAI,EAAE;EADC,CAFX;EAKEC,WAAW,EAAE,OALf;EAMEC,MAAM,EAAE;AANV,CAFF,CAFc,CAAhB;AAeA,MAAMC,OAAO,GAAGV,WAAhB;AAEAW,MAAM,CAACC,OAAP,GAAiB;EACfC,OAAO,EAAEV,mBAAmB,CAACC,OAAD,EAAUM,OAAV;AADb,CAAjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["file-transform.js"],"names":["path","require","camelcase","module","exports","process","src","filename","assetFilename","JSON","stringify","basename","match","pascalCaseFilename","parse","name","pascalCase","componentName"],"mappings":";;;;AAAA,MAAMA,IAAI,GAAGC,OAAO,CAAC,MAAD,CAApB;;AACA,MAAMC,SAAS,GAAGD,OAAO,CAAC,WAAD,CAAzB,C,CAEA;AACA;;;AAEAE,MAAM,CAACC,OAAP,GAAiB;AACfC,EAAAA,OAAO,CAACC,GAAD,EAAMC,QAAN,EAAgB;AACrB,UAAMC,aAAa,GAAGC,IAAI,CAACC,SAAL,CAAeV,IAAI,CAACW,QAAL,CAAcJ,QAAd,CAAf,CAAtB;;AAEA,QAAIA,QAAQ,CAACK,KAAT,CAAe,QAAf,CAAJ,EAA8B;AAC5B;AACA;AACA,YAAMC,kBAAkB,GAAGX,SAAS,CAACF,IAAI,CAACc,KAAL,CAAWP,QAAX,EAAqBQ,IAAtB,EAA4B;AAC9DC,QAAAA,UAAU,EAAE;AADkD,OAA5B,CAApC;AAGA,YAAMC,aAAa,GAAI,MAAKJ,kBAAmB,EAA/C;AACA,aAAQ;AACd;AACA;AACA,mBAAmBL,aAAc;AACjC,oDAAoDS,aAAc;AAClE;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0BT,aAAc;AACxC;AACA;AACA;AACA,SAfM;AAgBD;;AAED,WAAQ,oBAAmBA,aAAc,GAAzC;AACD;;AA9Bc,CAAjB","sourcesContent":["const path = require('path');\nconst camelcase = require('camelcase');\n\n// This is a custom Jest transformer turning file imports into filenames.\n// http://facebook.github.io/jest/docs/en/webpack.html\n\nmodule.exports = {\n process(src, filename) {\n const assetFilename = JSON.stringify(path.basename(filename));\n\n if (filename.match(/\\.svg$/)) {\n // Based on how SVGR generates a component name:\n // https://github.com/smooth-code/svgr/blob/01b194cf967347d43d4cbe6b434404731b87cf27/packages/core/src/state.js#L6\n const pascalCaseFilename = camelcase(path.parse(filename).name, {\n pascalCase: true,\n });\n const componentName = `Svg${pascalCaseFilename}`;\n return `const React = require('react');\n module.exports = {\n __esModule: true,\n default: ${assetFilename},\n ReactComponent: React.forwardRef(function ${componentName}(props, ref) {\n return {\n $$typeof: Symbol.for('react.element'),\n type: 'svg',\n ref: ref,\n key: null,\n props: Object.assign({}, props, {\n children: ${assetFilename}\n })\n };\n }),\n };`;\n }\n\n return `module.exports = ${assetFilename};`;\n },\n};\n"]}
1
+ {"version":3,"names":["path","require","camelcase","module","exports","process","src","filename","assetFilename","JSON","stringify","basename","match","pascalCaseFilename","parse","name","pascalCase","componentName"],"sources":["file-transform.js"],"sourcesContent":["const path = require('path');\nconst camelcase = require('camelcase');\n\n// This is a custom Jest transformer turning file imports into filenames.\n// http://facebook.github.io/jest/docs/en/webpack.html\n\nmodule.exports = {\n process(src, filename) {\n const assetFilename = JSON.stringify(path.basename(filename));\n\n if (filename.match(/\\.svg$/)) {\n // Based on how SVGR generates a component name:\n // https://github.com/smooth-code/svgr/blob/01b194cf967347d43d4cbe6b434404731b87cf27/packages/core/src/state.js#L6\n const pascalCaseFilename = camelcase(path.parse(filename).name, {\n pascalCase: true,\n });\n const componentName = `Svg${pascalCaseFilename}`;\n return `const React = require('react');\n module.exports = {\n __esModule: true,\n default: ${assetFilename},\n ReactComponent: React.forwardRef(function ${componentName}(props, ref) {\n return {\n $$typeof: Symbol.for('react.element'),\n type: 'svg',\n ref: ref,\n key: null,\n props: Object.assign({}, props, {\n children: ${assetFilename}\n })\n };\n }),\n };`;\n }\n\n return `module.exports = ${assetFilename};`;\n },\n};\n"],"mappings":";;;;AAAA,MAAMA,IAAI,GAAGC,OAAO,CAAC,MAAD,CAApB;;AACA,MAAMC,SAAS,GAAGD,OAAO,CAAC,WAAD,CAAzB,C,CAEA;AACA;;;AAEAE,MAAM,CAACC,OAAP,GAAiB;EACfC,OAAO,CAACC,GAAD,EAAMC,QAAN,EAAgB;IACrB,MAAMC,aAAa,GAAGC,IAAI,CAACC,SAAL,CAAeV,IAAI,CAACW,QAAL,CAAcJ,QAAd,CAAf,CAAtB;;IAEA,IAAIA,QAAQ,CAACK,KAAT,CAAe,QAAf,CAAJ,EAA8B;MAC5B;MACA;MACA,MAAMC,kBAAkB,GAAGX,SAAS,CAACF,IAAI,CAACc,KAAL,CAAWP,QAAX,EAAqBQ,IAAtB,EAA4B;QAC9DC,UAAU,EAAE;MADkD,CAA5B,CAApC;MAGA,MAAMC,aAAa,GAAI,MAAKJ,kBAAmB,EAA/C;MACA,OAAQ;AACd;AACA;AACA,mBAAmBL,aAAc;AACjC,oDAAoDS,aAAc;AAClE;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0BT,aAAc;AACxC;AACA;AACA;AACA,SAfM;IAgBD;;IAED,OAAQ,oBAAmBA,aAAc,GAAzC;EACD;;AA9Bc,CAAjB"}
package/dist/mount.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["mount.tsx"],"names":["Composition","previewContext","ReactDOM","render","document","getElementById"],"mappings":";;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AACA;AACA;AACA;AACA;eACe,CAACA,WAAD,EAAmCC,cAAnC,KAAwE;AACrFC,sBAASC,MAAT,eACE,+BAAC,kCAAD;AAAiB,IAAA,WAAW,EAAEH,WAA9B;AAA2C,IAAA,cAAc,EAAEC;AAA3D,IADF,EAEEG,QAAQ,CAACC,cAAT,CAAwB,MAAxB,CAFF;AAID,C","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { RenderingContext } from '@teambit/preview';\n\nimport { CompositionsApp } from './compositions-app';\n\n/**\n * this mounts compositions into the DOM in the component preview.\n * this function can be overridden through ReactAspect.overrideCompositionsMounter() API\n * to apply custom logic for component DOM mounting.\n */\nexport default (Composition: React.ComponentType, previewContext: RenderingContext) => {\n ReactDOM.render(\n <CompositionsApp Composition={Composition} previewContext={previewContext} />,\n document.getElementById('root')\n );\n};\n"]}
1
+ {"version":3,"names":["Composition","previewContext","ReactDOM","render","document","getElementById"],"sources":["mount.tsx"],"sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { RenderingContext } from '@teambit/preview';\n\nimport { CompositionsApp } from './compositions-app';\n\n/**\n * this mounts compositions into the DOM in the component preview.\n * this function can be overridden through ReactAspect.overrideCompositionsMounter() API\n * to apply custom logic for component DOM mounting.\n */\nexport default (Composition: React.ComponentType, previewContext: RenderingContext) => {\n ReactDOM.render(\n <CompositionsApp Composition={Composition} previewContext={previewContext} />,\n document.getElementById('root')\n );\n};\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;AACA;AACA;AACA;AACA;eACe,CAACA,WAAD,EAAmCC,cAAnC,KAAwE;EACrFC,mBAAA,CAASC,MAAT,eACE,+BAAC,kCAAD;IAAiB,WAAW,EAAEH,WAA9B;IAA2C,cAAc,EAAEC;EAA3D,EADF,EAEEG,QAAQ,CAACC,cAAT,CAAwB,MAAxB,CAFF;AAID,C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["prettier.config.js"],"names":["module","exports","trailingComma","tabWidth","singleQuote"],"mappings":";;AAAAA,MAAM,CAACC,OAAP,GAAiB;AACfC,EAAAA,aAAa,EAAE,KADA;AAEfC,EAAAA,QAAQ,EAAE,CAFK;AAGfC,EAAAA,WAAW,EAAE;AAHE,CAAjB","sourcesContent":["module.exports = {\n trailingComma: 'es5',\n tabWidth: 2,\n singleQuote: true,\n};\n"]}
1
+ {"version":3,"names":["module","exports","trailingComma","tabWidth","singleQuote"],"sources":["prettier.config.js"],"sourcesContent":["module.exports = {\n trailingComma: 'es5',\n tabWidth: 2,\n singleQuote: true,\n};\n"],"mappings":";;AAAAA,MAAM,CAACC,OAAP,GAAiB;EACfC,aAAa,EAAE,KADA;EAEfC,QAAQ,EAAE,CAFK;EAGfC,WAAW,EAAE;AAHE,CAAjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["react.aspect.ts"],"names":["ReactAspect","Aspect","create","id"],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEO,MAAMA,WAAW,GAAGC,kBAAOC,MAAP,CAAc;AACvCC,EAAAA,EAAE,EAAE;AADmC,CAAd,CAApB","sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const ReactAspect = Aspect.create({\n id: 'teambit.react/react',\n});\n"]}
1
+ {"version":3,"names":["ReactAspect","Aspect","create","id"],"sources":["react.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const ReactAspect = Aspect.create({\n id: 'teambit.react/react',\n});\n"],"mappings":";;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,WAAW,GAAGC,iBAAA,CAAOC,MAAP,CAAc;EACvCC,EAAE,EAAE;AADmC,CAAd,CAApB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["react.composition.tsx"],"names":["Logo","height","display","justifyContent","width"],"mappings":";;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEO,MAAMA,IAAI,GAAG,mBAClB;AAAK,EAAA,KAAK,EAAE;AAAEC,IAAAA,MAAM,EAAE,MAAV;AAAkBC,IAAAA,OAAO,EAAE,MAA3B;AAAmCC,IAAAA,cAAc,EAAE;AAAnD;AAAZ,gBACE;AAAK,EAAA,KAAK,EAAE;AAAEC,IAAAA,KAAK,EAAE;AAAT,GAAZ;AAA2B,EAAA,GAAG,EAAC;AAA/B,EADF,CADK","sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/react.svg\" />\n </div>\n);\n"]}
1
+ {"version":3,"names":["Logo","height","display","justifyContent","width"],"sources":["react.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/react.svg\" />\n </div>\n);\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,IAAI,GAAG,mBAClB;EAAK,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAV;IAAkBC,OAAO,EAAE,MAA3B;IAAmCC,cAAc,EAAE;EAAnD;AAAZ,gBACE;EAAK,KAAK,EAAE;IAAEC,KAAK,EAAE;EAAT,CAAZ;EAA2B,GAAG,EAAC;AAA/B,EADF,CADK"}