@teambit/react 0.0.844 → 0.0.847
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.
- package/artifacts/__bit_junit.xml +2 -2
- package/artifacts/env-template/public/22.af16047b2b2e8ff05709.js +47 -0
- package/artifacts/env-template/public/{666.5f0b0b1b0711bdc9b38d.js → 914.5a161e809dbade71270f.js} +35 -33
- package/artifacts/env-template/public/assets-manifest.json +16 -16
- package/artifacts/env-template/public/{compositions.15826ac3983ee54d29ff.js → compositions.0dff9f587c3bdd31f6e2.js} +1 -1
- package/artifacts/env-template/public/compositions.html +1 -1
- package/artifacts/env-template/public/{overview.21d51880effa7d9c8fb0.js → overview.e81eae1188d05fde82a4.js} +1 -1
- package/artifacts/env-template/public/overview.html +1 -1
- package/artifacts/env-template/public/{peers.7b3bb08bffacb49b6562.js → peers.c937af5f9e4f5ad67535.js} +1 -1
- package/artifacts/env-template/public/{preview-root.1a76deaf8a8a4bc7bf83.js → preview-root.dbadd53b381a15c4c0b1.js} +1 -1
- package/artifacts/env-template/public/static/css/914.cb83b0b4.css +1 -0
- package/artifacts/env-template/public/static/css/overview.367aeb5b.css +1 -0
- package/artifacts/preview/teambit_react_react-preview.js +1 -1
- package/{compositions-1662281577904.js → compositions-1662694416892.js} +0 -0
- package/dist/jest/transformers/base-transformer-presets.js +3 -1
- package/dist/jest/transformers/base-transformer-presets.js.map +1 -1
- package/dist/webpack/html.js +2 -2
- package/dist/webpack/html.js.map +1 -1
- package/jest/transformers/base-transformer-presets.js +5 -1
- package/{overview-1662281577904.js → overview-1662694416892.js} +0 -0
- package/package-tar/teambit-react-0.0.847.tgz +0 -0
- package/package.json +37 -37
- package/{preview-1662281577904.js → preview-1662694416892.js} +2 -2
- package/webpack/html.ts +3 -1
- package/artifacts/env-template/public/22.fdd4913fc2e3c8df9835.js +0 -43
- package/artifacts/env-template/public/static/css/666.bd6f7c48.css +0 -1
- package/artifacts/env-template/public/static/css/overview.c86de60f.css +0 -1
- package/package-tar/teambit-react-0.0.844.tgz +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.circular-font_circularFont__2U4VL{font-family:"CircularXX","Gill Sans","Gill Sans MT","Helvetica Neue",Helvetica,Arial,sans-serif}@font-face{font-family:"CircularXX";src:url(https://static.bit.dev/circular-xx/CircularXXWeb-Regular.woff2)}@font-face{font-family:"CircularXX";font-weight:700;src:url(https://static.bit.dev/circular-xx/CircularXXWeb-Bold.woff2)}@font-face{font-family:"CircularXX";font-weight:800;src:url(https://static.bit.dev/circular-xx/CircularXXWeb-Black.woff2)}@font-face{font-family:"CircularXX";font-style:italic;src:url(https://static.bit.dev/circular-xx/CircularXXWeb-Italic.woff2)}@font-face{font-family:"CircularXX";font-style:italic;font-weight:700;src:url(https://static.bit.dev/circular-xx/CircularXXWeb-BoldItalic.woff2)}@font-face{font-family:"CircularXX";font-style:italic;font-weight:800;src:url(https://static.bit.dev/circular-xx/CirculrXXWeb-BlackItalic.woff2)}@font-face{font-family:"CircularXX";font-weight:300;src:url(https://static.bit.dev/circular-xx/CircularXXWeb-light.woff2)}@font-face{font-family:"CircularXX";font-style:italic;font-weight:300;src:url(https://static.bit.dev/circular-xx/CircularXXWeb-lightItalic.woff2)}@font-face{font-family:"CircularXX";font-weight:500;src:url(https://static.bit.dev/circular-xx/CircularXXWeb-Medium.woff2)}@font-face{font-family:"CircularXX";font-style:italic;font-weight:500;src:url(https://static.bit.dev/circular-xx/CircularXXWeb-MediumItalic.woff2)}.base-theme_theme__20K5p{background:var(--background-color);color:var(--on-background-color);min-height:100%}.theme-toggler_toggler__10ZbF{background:#fff;background:var(--surface-color,#fff);border-radius:8px;cursor:pointer;padding:.5em;transition:color .18s,background-color .18s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.theme-toggler_toggler__10ZbF:hover{background:#edebfc;background:var(--surface-hover-color,#edebfc)}.theme-toggler_toggler__10ZbF:active{background:#dcd8f9;background:var(--surface-active-color,#dcd8f9)}.docs-app_compositionSection__2rAWY{margin-top:40px}.docs-app_compositionCard__2BFqj{max-height:500px;max-width:100%;overflow:hidden}.docs-app_docsMainBlock__1Vyyg{box-sizing:border-box;margin:0 0 150px;max-width:1440px;padding:20px 40px 10px;width:100%}.docs-app_docsMainBlock__1Vyyg .docs-app_heading__25cfc{margin-bottom:unset}.docs-app_mdx__WbON7{font-size:16px}.heading-sizes_xxs__sqY6F{font-size:16px;font-size:var(--bit-h-xxs,16px)}.heading-sizes_xs__2vIO-{font-size:18px;font-size:var(--bit-h-xs,18px)}.heading-sizes_sm__SWCg7{font-size:24px;font-size:var(--bit-h-sm,24px)}.heading-sizes_md__1VfRy{font-size:26px;font-size:var(--bit-h-md,26px)}.heading-sizes_lg__12r2v{font-size:36px;font-size:var(--bit-h-lg,36px)}.heading-sizes_xl__18vfm{font-size:40px;font-size:var(--bit-h-xl,40px)}.heading-sizes_xxl__1XBq0{font-size:50px;font-size:var(--bit-h-xxl,50px)}.heading_h1__18YHt,.heading_h2__1ja7_,.heading_h3__3SLRc,.heading_h4__uSuLS,.heading_h5__30dq2,.heading_h6__2CGfq{font-weight:700;margin:0}.heading_h1__18YHt{margin-bottom:20px}.anchor_anchor__3Kymc{align-items:center;display:flex;text-decoration:none}.anchor_anchorIcon__osznX{color:var(--bit-text-color-light);font-size:18px}.linked-heading_linkedHeading__1exDt{align-items:center;display:flex;margin-bottom:16px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.linked-heading_linkedHeading__1exDt:hover .linked-heading_anchor__3xkqo{opacity:1;visibility:unset}.linked-heading_heading__28Zmh{margin-bottom:0;margin-right:8px}.linked-heading_anchor__3xkqo{opacity:0;transform:translateY(4px);transition:visibility .3s,opacity .3s ease-in-out;visibility:hidden}.error_error__Aedkj{color:#e62e5c;color:var(--bit-error-color,#e62e5c)}.react-playground_error__1zi13{background-color:var(--bit-bg-color);border:1px solid var(--bit-error-color);border-bottom-right-radius:6px;border-left:none;border-top-right-radius:6px;bottom:0;box-sizing:border-box;color:var(--bit-error-color);font-family:Roboto mono;font-size:11px;left:0;overflow:auto;padding:8px;position:absolute;right:0;top:0;transition:all 1s ease-in-out;width:100%}.react-playground_error__1zi13.react-playground_column__1Kovw{border:1px solid var(--bit-error-color);border-bottom:none;border-bottom-right-radius:0;border-top-left-radius:6px}.react-playground_editorWrapper__1wY8s{max-height:450px;overflow:auto!important}.react-playground_codePane__19Xda{background-color:#282c34;max-width:-webkit-fit-content;max-width:-moz-fit-content;max-width:fit-content;max-width:90%;min-width:150px}.react-playground_codePane__19Xda.react-playground_column__1Kovw,.react-playground_codePane__19Xda.react-playground_column__1Kovw .react-playground_editorWrapper__1wY8s{height:220px;max-width:100%}.react-playground_editor__1LFjB{border-bottom-left-radius:6px;border-top-left-radius:6px;box-sizing:border-box;font-family:Roboto mono!important;font-size:11px;min-height:100px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.react-playground_editor__1LFjB>textarea{outline:none;white-space:pre!important;width:100%!important}.react-playground_editor__1LFjB>pre{white-space:pre!important;width:-webkit-fit-content!important;width:-moz-fit-content!important;width:fit-content!important}.react-playground_splitter__R480r{background-color:#282c34}.react-playground_splitter__R480r>div{border:none;border-radius:0}.react-playground_previewPane__1Rkn-{border:1px solid var(--bit-border-color-lightest);border-bottom-right-radius:6px;border-left:none;border-top-right-radius:6px;min-height:100px;overflow:auto;position:relative}.react-playground_previewPane__1Rkn-.react-playground_column__1Kovw{border:1px solid var(--bit-border-color-lightest);border-bottom:none;border-bottom-right-radius:0;border-top-left-radius:6px;min-height:220px}.react-playground_previewPane__1Rkn-.react-playground_column__1Kovw .react-playground_editorWrapper__1wY8s{max-height:220px}.react-playground_previewBox__1quIl{bottom:0;left:0;position:absolute;right:0;top:0}.react-playground_preview__1LvFd{border-left:none;box-sizing:border-box;height:100%;width:100%}.react-playground_playground__1mVdr{border-radius:6px;display:flex;max-height:450px;overflow:hidden;width:100%}.react-playground_playground__1mVdr>div{width:100%}.examples-overview_exampleSection__1OdhX>:not(:last-child){margin-bottom:8px}
|
|
@@ -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},718:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __bit_component={id:"teambit.react/react@0.0.844",homepage:"https://bit.dev/teambit/react/react",exported:!0},_interopRequireDefault=__webpack_require__2(244);Object.defineProperty(exports2,"__esModule",{value:!0}),exports2.Logo=void 0;function _react(){const data=_interopRequireDefault(__webpack_require__2(804));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},57:module2=>{"use strict";module2.exports=MdxJsReact},804:module2=>{"use strict";module2.exports=React},459: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__.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});var react_docs_namespaceObject={};__webpack_require__.r(react_docs_namespaceObject),__webpack_require__.d(react_docs_namespaceObject,{default:()=>MDXContent});var react_composition=__webpack_require__(718),external_React_=__webpack_require__(804),external_MdxJsReact_=__webpack_require__(57),external_TeambitMdxUiMdxScopeContext_=__webpack_require__(459),dist=__webpack_require__(906),_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,external_MdxJsReact_.mdx)(MDXLayout,_extends({},layoutProps,props,{components,mdxType:"MDXLayout"}),(0,external_MdxJsReact_.mdx)(external_TeambitMdxUiMdxScopeContext_.MDXScopeProvider,{components:{ReactOverview:dist.ZP},mdxType:"MDXScopeProvider"},(0,external_MdxJsReact_.mdx)(dist.ZP,{mdxType:"ReactOverview"})))}MDXContent.isMDXComponent=!0;const compositions=[react_composition],overview=[react_docs_namespaceObject]})(),__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},495:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __bit_component={id:"teambit.react/react@0.0.847",homepage:"https://bit.dev/teambit/react/react",exported:!0},_interopRequireDefault=__webpack_require__2(244);Object.defineProperty(exports2,"__esModule",{value:!0}),exports2.Logo=void 0;function _react(){const data=_interopRequireDefault(__webpack_require__2(804));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},57:module2=>{"use strict";module2.exports=MdxJsReact},804:module2=>{"use strict";module2.exports=React},459: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__.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});var react_docs_namespaceObject={};__webpack_require__.r(react_docs_namespaceObject),__webpack_require__.d(react_docs_namespaceObject,{default:()=>MDXContent});var react_composition=__webpack_require__(495),external_React_=__webpack_require__(804),external_MdxJsReact_=__webpack_require__(57),external_TeambitMdxUiMdxScopeContext_=__webpack_require__(459),dist=__webpack_require__(906),_excluded=["components"];function _extends(){return _extends=Object.assign?Object.assign.bind():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,external_MdxJsReact_.mdx)(MDXLayout,_extends({},layoutProps,props,{components,mdxType:"MDXLayout"}),(0,external_MdxJsReact_.mdx)(external_TeambitMdxUiMdxScopeContext_.MDXScopeProvider,{components:{ReactOverview:dist.ZP},mdxType:"MDXScopeProvider"},(0,external_MdxJsReact_.mdx)(dist.ZP,{mdxType:"ReactOverview"})))}MDXContent.isMDXComponent=!0;const compositions=[react_composition],overview=[react_docs_namespaceObject]})(),__webpack_exports__})()});
|
|
File without changes
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/* eslint-disable global-require */
|
|
4
|
-
const basePresets = [require('@babel/preset-react'),
|
|
4
|
+
const basePresets = [[require('@babel/preset-react'), {
|
|
5
|
+
runtime: 'automatic'
|
|
6
|
+
}], require('@babel/preset-typescript'), require('babel-preset-jest')];
|
|
5
7
|
module.exports = {
|
|
6
8
|
basePresets
|
|
7
9
|
};
|
|
@@ -1 +1 @@
|
|
|
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')
|
|
1
|
+
{"version":3,"names":["basePresets","require","runtime","module","exports"],"sources":["base-transformer-presets.js"],"sourcesContent":["/* eslint-disable global-require */\n\nconst basePresets = [\n [require('@babel/preset-react'), { runtime: 'automatic' }],\n require('@babel/preset-typescript'),\n require('babel-preset-jest'),\n];\n\nmodule.exports = {\n basePresets,\n};\n"],"mappings":";;AAAA;AAEA,MAAMA,WAAW,GAAG,CAClB,CAACC,OAAO,CAAC,qBAAD,CAAR,EAAiC;EAAEC,OAAO,EAAE;AAAX,CAAjC,CADkB,EAElBD,OAAO,CAAC,0BAAD,CAFW,EAGlBA,OAAO,CAAC,mBAAD,CAHW,CAApB;AAMAE,MAAM,CAACC,OAAP,GAAiB;EACfJ;AADe,CAAjB"}
|
package/dist/webpack/html.js
CHANGED
|
@@ -19,13 +19,13 @@ function html(title) {
|
|
|
19
19
|
try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}
|
|
20
20
|
</script>
|
|
21
21
|
<!-- minimal css resets -->
|
|
22
|
-
<style>
|
|
22
|
+
<style> body { margin: 0; } </style>
|
|
23
23
|
</head>
|
|
24
24
|
<body>
|
|
25
25
|
<div id="root"></div>
|
|
26
26
|
</body>
|
|
27
27
|
</html>
|
|
28
28
|
`;
|
|
29
|
-
}
|
|
29
|
+
} // <style> html { height: 100%; } body { margin: 0; height: 100%; } #root { height: 100%; } </style>
|
|
30
30
|
|
|
31
31
|
//# sourceMappingURL=html.js.map
|
package/dist/webpack/html.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["html","title"],"sources":["html.ts"],"sourcesContent":["/** html template for Previews (docs, compositions, etc) */\nexport function html(title: string) {\n return `\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>${title}</title>\n <script>\n // Allow to use react dev-tools inside the examples\n try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}\n </script>\n <!-- minimal css resets -->\n <style>
|
|
1
|
+
{"version":3,"names":["html","title"],"sources":["html.ts"],"sourcesContent":["/** html template for Previews (docs, compositions, etc) */\nexport function html(title: string) {\n return `\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>${title}</title>\n <script>\n // Allow to use react dev-tools inside the examples\n try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}\n </script>\n <!-- minimal css resets -->\n <style> body { margin: 0; } </style>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n </html>\n `;\n}\n\n// <style> html { height: 100%; } body { margin: 0; height: 100%; } #root { height: 100%; } </style>\n"],"mappings":";;;;;;;AAAA;AACO,SAASA,IAAT,CAAcC,KAAd,EAA6B;EAClC,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA,eAAeA,KAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAlBE;AAmBD,C,CAED"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/* eslint-disable global-require */
|
|
2
2
|
|
|
3
|
-
const basePresets = [
|
|
3
|
+
const basePresets = [
|
|
4
|
+
[require('@babel/preset-react'), { runtime: 'automatic' }],
|
|
5
|
+
require('@babel/preset-typescript'),
|
|
6
|
+
require('babel-preset-jest'),
|
|
7
|
+
];
|
|
4
8
|
|
|
5
9
|
module.exports = {
|
|
6
10
|
basePresets,
|
|
File without changes
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.847",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/react/react",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.react",
|
|
8
8
|
"name": "react",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.847"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fs-extra": "10.0.0",
|
|
@@ -77,44 +77,43 @@
|
|
|
77
77
|
"@babel/helper-plugin-test-runner": "7.16.7",
|
|
78
78
|
"@svgr/webpack": "5.5.0",
|
|
79
79
|
"core-js": "^3.0.0",
|
|
80
|
-
"@teambit/design.ui.input.option-button": "1.0.0",
|
|
81
|
-
"@teambit/harmony": "0.3.3",
|
|
82
|
-
"@teambit/react.instructions.react.adding-compositions": "0.0.6",
|
|
83
|
-
"@teambit/react.instructions.react.adding-tests": "0.0.6",
|
|
84
|
-
"@teambit/react.rendering.ssr": "0.0.3",
|
|
85
80
|
"@teambit/compositions.ui.hooks.use-composition": "0.0.169",
|
|
81
|
+
"@teambit/design.ui.input.option-button": "1.0.0",
|
|
86
82
|
"@teambit/design.ui.tooltip": "0.0.358",
|
|
87
|
-
"@teambit/
|
|
88
|
-
"@teambit/
|
|
89
|
-
"@teambit/
|
|
83
|
+
"@teambit/harmony": "0.3.3",
|
|
84
|
+
"@teambit/builder": "0.0.847",
|
|
85
|
+
"@teambit/bundler": "0.0.847",
|
|
86
|
+
"@teambit/compiler": "0.0.847",
|
|
90
87
|
"@teambit/component.modules.component-url": "0.0.140",
|
|
91
|
-
"@teambit/component": "0.0.
|
|
92
|
-
"@teambit/dependency-resolver": "0.0.
|
|
93
|
-
"@teambit/envs": "0.0.
|
|
94
|
-
"@teambit/eslint": "0.0.
|
|
95
|
-
"@teambit/formatter": "0.0.
|
|
96
|
-
"@teambit/jest": "0.0.
|
|
97
|
-
"@teambit/linter": "0.0.
|
|
98
|
-
"@teambit/logger": "0.0.
|
|
99
|
-
"@teambit/pkg": "0.0.
|
|
100
|
-
"@teambit/prettier": "0.0.
|
|
88
|
+
"@teambit/component": "0.0.847",
|
|
89
|
+
"@teambit/dependency-resolver": "0.0.847",
|
|
90
|
+
"@teambit/envs": "0.0.847",
|
|
91
|
+
"@teambit/eslint": "0.0.847",
|
|
92
|
+
"@teambit/formatter": "0.0.398",
|
|
93
|
+
"@teambit/jest": "0.0.847",
|
|
94
|
+
"@teambit/linter": "0.0.847",
|
|
95
|
+
"@teambit/logger": "0.0.658",
|
|
96
|
+
"@teambit/pkg": "0.0.847",
|
|
97
|
+
"@teambit/prettier": "0.0.398",
|
|
101
98
|
"@teambit/react.ui.compositions-app": "0.0.8",
|
|
102
|
-
"@teambit/react.ui.docs-app": "0.0.
|
|
99
|
+
"@teambit/react.ui.docs-app": "0.0.191",
|
|
103
100
|
"@teambit/react.ui.highlighter.component-metadata.bit-component-meta": "0.0.27",
|
|
104
|
-
"@teambit/schema": "0.0.
|
|
105
|
-
"@teambit/tester": "0.0.
|
|
106
|
-
"@teambit/typescript": "0.0.
|
|
107
|
-
"@teambit/webpack": "0.0.
|
|
108
|
-
"@teambit/workspace": "0.0.
|
|
109
|
-
"@teambit/application": "0.0.
|
|
110
|
-
"@teambit/cli": "0.0.
|
|
111
|
-
"@teambit/generator": "0.0.
|
|
112
|
-
"@teambit/graphql": "0.0.
|
|
113
|
-
"@teambit/preview": "0.0.
|
|
101
|
+
"@teambit/schema": "0.0.847",
|
|
102
|
+
"@teambit/tester": "0.0.847",
|
|
103
|
+
"@teambit/typescript": "0.0.847",
|
|
104
|
+
"@teambit/webpack": "0.0.847",
|
|
105
|
+
"@teambit/workspace": "0.0.847",
|
|
106
|
+
"@teambit/application": "0.0.489",
|
|
107
|
+
"@teambit/cli": "0.0.565",
|
|
108
|
+
"@teambit/generator": "0.0.847",
|
|
109
|
+
"@teambit/graphql": "0.0.847",
|
|
110
|
+
"@teambit/preview": "0.0.847",
|
|
114
111
|
"@teambit/react.ui.highlighter-provider": "0.0.196",
|
|
115
|
-
"@teambit/compositions": "0.0.
|
|
116
|
-
"@teambit/
|
|
117
|
-
"@teambit/react.
|
|
112
|
+
"@teambit/compositions": "0.0.847",
|
|
113
|
+
"@teambit/react.instructions.react.adding-compositions": "0.0.6",
|
|
114
|
+
"@teambit/react.instructions.react.adding-tests": "0.0.6",
|
|
115
|
+
"@teambit/ui": "0.0.847",
|
|
116
|
+
"@teambit/react.eslint-config-bit-react": "0.0.639",
|
|
118
117
|
"@teambit/mdx.modules.mdx-loader": "0.0.498",
|
|
119
118
|
"@teambit/react.babel.bit-react-transformer": "0.0.516",
|
|
120
119
|
"@teambit/webpack.modules.generate-style-loaders": "0.0.109",
|
|
@@ -123,8 +122,9 @@
|
|
|
123
122
|
"@teambit/bit-error": "0.0.400",
|
|
124
123
|
"@teambit/toolbox.network.get-port": "0.0.119",
|
|
125
124
|
"@teambit/react.modules.prerenderer-puppeteer": "0.0.8",
|
|
126
|
-
"@teambit/
|
|
127
|
-
"@teambit/
|
|
125
|
+
"@teambit/react.rendering.ssr": "0.0.3",
|
|
126
|
+
"@teambit/ui-foundation.ui.pages.static-error": "0.0.82",
|
|
127
|
+
"@teambit/config": "0.0.578"
|
|
128
128
|
},
|
|
129
129
|
"devDependencies": {
|
|
130
130
|
"@types/react": "^17.0.8",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"@teambit/react.content.react-overview": "1.95.0"
|
|
147
147
|
},
|
|
148
148
|
"peerDependencies": {
|
|
149
|
-
"@teambit/legacy": "1.0.
|
|
149
|
+
"@teambit/legacy": "1.0.346",
|
|
150
150
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
151
151
|
"react": "^16.8.0 || ^17.0.0"
|
|
152
152
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.847/dist/react.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.847/dist/react.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/webpack/html.ts
CHANGED
|
@@ -12,7 +12,7 @@ export function html(title: string) {
|
|
|
12
12
|
try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}
|
|
13
13
|
</script>
|
|
14
14
|
<!-- minimal css resets -->
|
|
15
|
-
<style>
|
|
15
|
+
<style> body { margin: 0; } </style>
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
|
18
18
|
<div id="root"></div>
|
|
@@ -20,3 +20,5 @@ export function html(title: string) {
|
|
|
20
20
|
</html>
|
|
21
21
|
`;
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
// <style> html { height: 100%; } body { margin: 0; height: 100%; } #root { height: 100%; } </style>
|