@teambit/react 0.0.676 → 0.0.679
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/env-template/public/298.js +1 -0
- package/artifacts/env-template/public/420.js +1 -0
- package/artifacts/env-template/public/677.js +1 -0
- package/artifacts/env-template/public/750.js +12 -0
- package/artifacts/env-template/public/793.js +218 -0
- package/artifacts/env-template/public/assets-manifest.json +22 -22
- package/artifacts/env-template/public/compositions.a8ece35a08e50229be47.js +1 -0
- package/artifacts/env-template/public/compositions.html +1 -1
- package/artifacts/env-template/public/{overview.d3a6b9539cdf2dac4b0d.js → overview.3372bf29ad0c9000872a.js} +1 -1
- package/artifacts/env-template/public/overview.html +1 -1
- package/artifacts/env-template/public/peers.c004d6a34765e7797913.js +1 -0
- package/artifacts/env-template/public/preview-root.2815be755d07e2f980c9.js +1 -0
- package/artifacts/env-template/public/service-worker.js +1 -1
- package/artifacts/env-template/public/static/css/{719.34ae751d.css → 793.2c0416f7.css} +1 -1
- package/artifacts/preview/teambit_react_react-preview.js +1 -1
- package/{compositions-1647314610121.js → compositions-1647509820722.js} +0 -0
- package/dist/react.composition.js +1 -1
- package/dist/react.composition.js.map +1 -1
- package/dist/react.docs.mdx +1 -1
- package/dist/react.env.d.ts +5 -2
- package/dist/react.env.js +33 -10
- package/dist/react.env.js.map +1 -1
- package/dist/templates/react-app/files/app.js +3 -7
- package/dist/templates/react-app/files/app.js.map +1 -1
- package/dist/templates/react-app/files/compositions.js +6 -1
- package/dist/templates/react-app/files/compositions.js.map +1 -1
- package/dist/templates/react-component/index.js +7 -6
- package/dist/templates/react-component/index.js.map +1 -1
- package/dist/templates/react-component-js/index.js +7 -6
- package/dist/templates/react-component-js/index.js.map +1 -1
- package/dist/templates/react-context/index.js +7 -6
- package/dist/templates/react-context/index.js.map +1 -1
- package/dist/templates/react-env/index.js +1 -1
- package/dist/templates/react-env/index.js.map +1 -1
- package/dist/templates/react-hook/index.js +7 -6
- package/dist/templates/react-hook/index.js.map +1 -1
- package/dist/templates/react-workspace/index.js +14 -21
- package/dist/templates/react-workspace/index.js.map +1 -1
- package/dist/templates/workspace-common/files/workspace-config.js +2 -32
- package/dist/templates/workspace-common/files/workspace-config.js.map +1 -1
- package/{overview-1647314610121.js → overview-1647509820722.js} +0 -0
- package/package-tar/teambit-react-0.0.679.tgz +0 -0
- package/package.json +35 -35
- package/{preview-1647314610121.js → preview-1647509820722.js} +2 -2
- package/react.composition.tsx +1 -1
- package/react.docs.mdx +1 -1
- package/templates/react-app/files/app.ts +3 -7
- package/templates/react-app/files/compositions.ts +6 -1
- package/templates/react-component/index.ts +6 -5
- package/templates/react-component-js/index.ts +6 -5
- package/templates/react-context/index.ts +6 -5
- package/templates/react-env/index.ts +1 -1
- package/templates/react-hook/index.ts +6 -5
- package/templates/react-workspace/index.ts +13 -13
- package/templates/workspace-common/files/workspace-config.ts +2 -32
- package/artifacts/env-template/public/141.js +0 -12
- package/artifacts/env-template/public/181.js +0 -1
- package/artifacts/env-template/public/447.js +0 -1
- package/artifacts/env-template/public/719.js +0 -218
- package/artifacts/env-template/public/848.js +0 -1
- package/artifacts/env-template/public/compositions.c8cc912b86f0efd1f261.js +0 -1
- package/artifacts/env-template/public/peers.e9c6c15491f6fc7c952b.js +0 -1
- package/artifacts/env-template/public/preview-root.3fd23a1233512fbb1909.js +0 -1
- package/package-tar/teambit-react-0.0.676.tgz +0 -0
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.679",
|
|
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.679"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"react-error-boundary": "^3.0.0",
|
|
@@ -78,50 +78,50 @@
|
|
|
78
78
|
"@teambit/base-ui.utils.composer": "1.0.0",
|
|
79
79
|
"@teambit/react.instructions.react.adding-compositions": "0.0.6",
|
|
80
80
|
"@teambit/react.instructions.react.adding-tests": "0.0.6",
|
|
81
|
-
"@teambit/design.ui.pages.standalone-not-found-page": "0.0.
|
|
82
|
-
"@teambit/preview": "0.0.
|
|
81
|
+
"@teambit/design.ui.pages.standalone-not-found-page": "0.0.356",
|
|
82
|
+
"@teambit/preview": "0.0.679",
|
|
83
83
|
"@teambit/react.ui.error-fallback": "0.0.110",
|
|
84
84
|
"@teambit/react.ui.loader-fallback": "0.0.89",
|
|
85
85
|
"@teambit/compositions.ui.hooks.use-composition": "0.0.163",
|
|
86
86
|
"@teambit/design.ui.input.option-button": "0.0.26",
|
|
87
87
|
"@teambit/design.ui.tooltip": "0.0.352",
|
|
88
|
-
"@teambit/builder": "0.0.
|
|
89
|
-
"@teambit/bundler": "0.0.
|
|
90
|
-
"@teambit/compiler": "0.0.
|
|
91
|
-
"@teambit/component.modules.component-url": "0.0.
|
|
92
|
-
"@teambit/component": "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/pkg": "0.0.
|
|
99
|
-
"@teambit/prettier": "0.0.
|
|
88
|
+
"@teambit/builder": "0.0.679",
|
|
89
|
+
"@teambit/bundler": "0.0.679",
|
|
90
|
+
"@teambit/compiler": "0.0.679",
|
|
91
|
+
"@teambit/component.modules.component-url": "0.0.124",
|
|
92
|
+
"@teambit/component": "0.0.679",
|
|
93
|
+
"@teambit/envs": "0.0.679",
|
|
94
|
+
"@teambit/eslint": "0.0.679",
|
|
95
|
+
"@teambit/formatter": "0.0.230",
|
|
96
|
+
"@teambit/jest": "0.0.679",
|
|
97
|
+
"@teambit/linter": "0.0.679",
|
|
98
|
+
"@teambit/pkg": "0.0.679",
|
|
99
|
+
"@teambit/prettier": "0.0.230",
|
|
100
100
|
"@teambit/react.ui.highlighter.component-metadata.bit-component-meta": "0.0.21",
|
|
101
|
-
"@teambit/schema": "0.0.
|
|
102
|
-
"@teambit/tester": "0.0.
|
|
103
|
-
"@teambit/typescript": "0.0.
|
|
104
|
-
"@teambit/webpack": "0.0.
|
|
105
|
-
"@teambit/workspace": "0.0.
|
|
106
|
-
"@teambit/application": "0.0.
|
|
107
|
-
"@teambit/cli": "0.0.
|
|
108
|
-
"@teambit/dependency-resolver": "0.0.
|
|
109
|
-
"@teambit/generator": "0.0.
|
|
110
|
-
"@teambit/graphql": "0.0.
|
|
111
|
-
"@teambit/react.ui.highlighter-provider": "0.0.
|
|
112
|
-
"@teambit/compositions": "0.0.
|
|
113
|
-
"@teambit/ui": "0.0.
|
|
114
|
-
"@teambit/react.eslint-config-bit-react": "0.0.
|
|
101
|
+
"@teambit/schema": "0.0.679",
|
|
102
|
+
"@teambit/tester": "0.0.679",
|
|
103
|
+
"@teambit/typescript": "0.0.679",
|
|
104
|
+
"@teambit/webpack": "0.0.679",
|
|
105
|
+
"@teambit/workspace": "0.0.679",
|
|
106
|
+
"@teambit/application": "0.0.321",
|
|
107
|
+
"@teambit/cli": "0.0.454",
|
|
108
|
+
"@teambit/dependency-resolver": "0.0.679",
|
|
109
|
+
"@teambit/generator": "0.0.679",
|
|
110
|
+
"@teambit/graphql": "0.0.679",
|
|
111
|
+
"@teambit/react.ui.highlighter-provider": "0.0.185",
|
|
112
|
+
"@teambit/compositions": "0.0.679",
|
|
113
|
+
"@teambit/ui": "0.0.679",
|
|
114
|
+
"@teambit/react.eslint-config-bit-react": "0.0.531",
|
|
115
115
|
"@teambit/webpack.modules.generate-expose-loaders": "0.0.3",
|
|
116
116
|
"@teambit/webpack.modules.generate-externals": "0.0.3",
|
|
117
117
|
"@teambit/webpack.modules.config-mutator": "0.0.137",
|
|
118
118
|
"@teambit/mdx.modules.mdx-loader": "0.0.489",
|
|
119
|
-
"@teambit/react.babel.bit-react-transformer": "0.0.
|
|
119
|
+
"@teambit/react.babel.bit-react-transformer": "0.0.501",
|
|
120
120
|
"@teambit/webpack.modules.generate-style-loaders": "0.0.103",
|
|
121
121
|
"@teambit/webpack.modules.style-regexps": "0.0.132",
|
|
122
|
-
"@teambit/component-id": "0.0.
|
|
122
|
+
"@teambit/component-id": "0.0.402",
|
|
123
123
|
"@teambit/toolbox.network.get-port": "0.0.113",
|
|
124
|
-
"@teambit/config": "0.0.
|
|
124
|
+
"@teambit/config": "0.0.467"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
127
|
"@types/react": "^17.0.8",
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
"@teambit/react.content.react-overview": "1.95.0"
|
|
141
141
|
},
|
|
142
142
|
"peerDependencies": {
|
|
143
|
-
"@teambit/legacy": "1.0.
|
|
143
|
+
"@teambit/legacy": "1.0.233",
|
|
144
144
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
145
145
|
"react": "^16.8.0 || ^17.0.0"
|
|
146
146
|
},
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
"@types/jest": "^26.0.0"
|
|
203
203
|
},
|
|
204
204
|
"peerDependencies": {
|
|
205
|
-
"@teambit/legacy": "1.0.
|
|
205
|
+
"@teambit/legacy": "1.0.233",
|
|
206
206
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
207
207
|
"react": "^16.8.0 || ^17.0.0"
|
|
208
208
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.
|
|
2
|
-
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.
|
|
1
|
+
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.679/dist/react.composition.js')]
|
|
2
|
+
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.679/dist/react.docs.mdx')]
|
package/react.composition.tsx
CHANGED
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
export const Logo = () => (
|
|
4
4
|
<div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>
|
|
5
|
-
<img style={{ width: 70 }} src="https://static.bit.dev/
|
|
5
|
+
<img style={{ width: 70 }} src="https://static.bit.dev/extensions-icons/react.svg" />
|
|
6
6
|
</div>
|
|
7
7
|
);
|
package/react.docs.mdx
CHANGED
|
@@ -2,14 +2,12 @@ import { ComponentContext } from '@teambit/generator';
|
|
|
2
2
|
|
|
3
3
|
export function appFile({ namePascalCase: Name }: ComponentContext) {
|
|
4
4
|
return `import React from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { Routes, Route } from 'react-router-dom';
|
|
6
6
|
|
|
7
7
|
export function ${Name}App() {
|
|
8
8
|
return (
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
<>
|
|
11
10
|
{/* header component */}
|
|
12
|
-
|
|
13
11
|
<Routes>
|
|
14
12
|
<Route path="/" element={<div>Hello World!!</div>}>
|
|
15
13
|
{/* home page component */}
|
|
@@ -20,10 +18,8 @@ export function ${Name}App() {
|
|
|
20
18
|
</Route>
|
|
21
19
|
|
|
22
20
|
</Routes>
|
|
23
|
-
|
|
24
21
|
{/* footer component */}
|
|
25
|
-
|
|
26
|
-
</BrowserRouter>
|
|
22
|
+
</>
|
|
27
23
|
);
|
|
28
24
|
}
|
|
29
25
|
`;
|
|
@@ -2,10 +2,15 @@ import { ComponentContext } from '@teambit/generator';
|
|
|
2
2
|
|
|
3
3
|
export function compositionsFile({ namePascalCase: Name }: ComponentContext) {
|
|
4
4
|
return `import React from 'react';
|
|
5
|
+
import { MemoryRouter } from 'react-router-dom';
|
|
5
6
|
import { ${Name}App } from './app';
|
|
6
7
|
|
|
7
8
|
export const ${Name}Basic = () => {
|
|
8
|
-
return
|
|
9
|
+
return (
|
|
10
|
+
<MemoryRouter>
|
|
11
|
+
<${Name}App />
|
|
12
|
+
</MemoryRouter>
|
|
13
|
+
);
|
|
9
14
|
};
|
|
10
15
|
`;
|
|
11
16
|
}
|
|
@@ -11,11 +11,12 @@ export const reactComponent: ComponentTemplate = {
|
|
|
11
11
|
generateFiles: (context: ComponentContext) => {
|
|
12
12
|
return [indexFile(context), componentFile(context), compositionFile(context), docsFile(context), testFile(context)];
|
|
13
13
|
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
config: {
|
|
15
|
+
'teambit.react/react': {},
|
|
16
|
+
'teambit.envs/envs': {
|
|
17
|
+
env: 'teambit.react/react',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
export const deprecatedReactComponent: ComponentTemplate = {
|
|
@@ -17,11 +17,12 @@ export const reactComponentJS: ComponentTemplate = {
|
|
|
17
17
|
};
|
|
18
18
|
return [indexFile, componentFile(context), compositionFile(context), docsFile(context), testFile(context)];
|
|
19
19
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
config: {
|
|
21
|
+
'teambit.react/react': {},
|
|
22
|
+
'teambit.envs/envs': {
|
|
23
|
+
env: 'teambit.react/react',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
export const deprecatedReactComponentJS: ComponentTemplate = {
|
|
@@ -20,9 +20,10 @@ export const reactContext: ComponentTemplate = {
|
|
|
20
20
|
testFile(context),
|
|
21
21
|
];
|
|
22
22
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
config: {
|
|
24
|
+
'teambit.react/react': {},
|
|
25
|
+
'teambit.envs/envs': {
|
|
26
|
+
env: 'teambit.react/react',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
28
29
|
};
|
|
@@ -12,9 +12,10 @@ export const reactHook: ComponentTemplate = {
|
|
|
12
12
|
generateFiles: (context: ComponentContext) => {
|
|
13
13
|
return [indexFile(context), componentFile(context), compositionFile(context), docsFile(context), testFile(context)];
|
|
14
14
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
config: {
|
|
16
|
+
'teambit.react/react': {},
|
|
17
|
+
'teambit.envs/envs': {
|
|
18
|
+
env: 'teambit.react/react',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
20
21
|
};
|
|
@@ -9,19 +9,19 @@ export const reactWorkspaceTemplate: WorkspaceTemplate = {
|
|
|
9
9
|
},
|
|
10
10
|
importComponents: () => {
|
|
11
11
|
return [
|
|
12
|
-
{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
{ id: 'teambit.react/templates/ui/text', targetName: 'ui/text', path: 'demo/ui/text' },
|
|
18
|
-
{ id: 'teambit.react/templates/ui/heading', targetName: 'ui/heading', path: 'demo/ui/heading' },
|
|
19
|
-
{ id: 'teambit.react/templates/ui/card', targetName: 'ui/card', path: 'demo/ui/card' },
|
|
20
|
-
{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
12
|
+
// {
|
|
13
|
+
// id: 'teambit.react/templates/envs/my-react',
|
|
14
|
+
// targetName: 'envs/my-react',
|
|
15
|
+
// path: 'demo/envs/my-react',
|
|
16
|
+
// },
|
|
17
|
+
// { id: 'teambit.react/templates/ui/text', targetName: 'ui/text', path: 'demo/ui/text' },
|
|
18
|
+
// { id: 'teambit.react/templates/ui/heading', targetName: 'ui/heading', path: 'demo/ui/heading' },
|
|
19
|
+
// { id: 'teambit.react/templates/ui/card', targetName: 'ui/card', path: 'demo/ui/card' },
|
|
20
|
+
// {
|
|
21
|
+
// id: 'teambit.react/templates/pages/welcome',
|
|
22
|
+
// targetName: 'pages/welcome',
|
|
23
|
+
// path: 'demo/pages/welcome',
|
|
24
|
+
// },
|
|
25
25
|
];
|
|
26
26
|
},
|
|
27
27
|
};
|
|
@@ -3,7 +3,7 @@ import { getWorkspaceConfigTemplateParsed, stringifyWorkspaceConfig } from '@tea
|
|
|
3
3
|
import { parse, assign } from 'comment-json';
|
|
4
4
|
|
|
5
5
|
export async function workspaceConfig({ name, defaultScope }: WorkspaceContext) {
|
|
6
|
-
const scope = defaultScope || '
|
|
6
|
+
const scope = defaultScope || 'my-org.my-scope';
|
|
7
7
|
const configParsed = await getWorkspaceConfigTemplateParsed();
|
|
8
8
|
configParsed['teambit.workspace/workspace'].name = name;
|
|
9
9
|
configParsed['teambit.workspace/workspace'].defaultScope = scope;
|
|
@@ -27,37 +27,7 @@ export async function workspaceConfig({ name, defaultScope }: WorkspaceContext)
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
const variants = {
|
|
30
|
-
'teambit.workspace/variants': parse(`{
|
|
31
|
-
/**
|
|
32
|
-
* configures all components with namespaces 'ui', 'blocks', 'pages' and 'themes'
|
|
33
|
-
* to use the default React development environment.
|
|
34
|
-
*
|
|
35
|
-
*/
|
|
36
|
-
"{ui/**}, {blocks/**}, {pages/**}, {themes/**}": {
|
|
37
|
-
"teambit.react/react": {}
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* configures components with namespaces 'entities', 'modules' and 'functions' to use the
|
|
42
|
-
* default NodeJS dev environment.
|
|
43
|
-
*/
|
|
44
|
-
"{entities/**}, {modules/**}, {functions/**}": {
|
|
45
|
-
"teambit.harmony/node": {}
|
|
46
|
-
},
|
|
47
|
-
/**
|
|
48
|
-
* configures components with namespace 'content' to use the MDX dev environment.
|
|
49
|
-
*/
|
|
50
|
-
"{content/**}": {
|
|
51
|
-
"teambit.mdx/mdx": {}
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* configures components with namespaces 'envs' and 'aspects' to use the default Aspect development environment.
|
|
56
|
-
*/
|
|
57
|
-
"{envs/**}, {aspects/**}, {apps/**}": {
|
|
58
|
-
"teambit.harmony/aspect": {}
|
|
59
|
-
}
|
|
60
|
-
}`),
|
|
30
|
+
'teambit.workspace/variants': parse(`{}`),
|
|
61
31
|
};
|
|
62
32
|
|
|
63
33
|
const configMerged = assign(configParsed, variants);
|