@teambit/react 0.0.779 → 0.0.782
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/apps/web/react.application.ts +1 -1
- package/artifacts/__bit_junit.xml +2 -2
- package/artifacts/env-template/public/22.02c5cc40d024e64c9979.js +43 -0
- package/artifacts/env-template/public/{244.739752d913aa9b9973e9.js → 244.40a7c02382995372607b.js} +6 -6
- package/artifacts/env-template/public/{830.87975426a2d9aba35cc5.js → 857.bdfded1490d9efe637f8.js} +28 -28
- package/artifacts/env-template/public/assets-manifest.json +16 -16
- package/artifacts/env-template/public/compositions.132ad56af83a59d06627.js +5 -0
- package/artifacts/env-template/public/compositions.html +1 -1
- package/artifacts/env-template/public/{overview.e9f25567c914ef048779.js → overview.077ea2408336de8f238c.js} +1 -1
- package/artifacts/env-template/public/overview.html +1 -1
- package/artifacts/env-template/public/peers.6a6694db7f2fdcdd11a0.js +1 -0
- package/artifacts/env-template/public/{preview-root.267f5147d686b94c6d62.js → preview-root.c56b4d752d9774bccd8b.js} +1 -1
- package/artifacts/env-template/public/static/css/{830.c01819bb.css → 857.c0eadd42.css} +1 -1
- package/artifacts/preview/teambit_react_react-preview.js +2 -2
- package/{compositions-1656991770328.js → compositions-1657164425299.js} +1 -1
- package/dist/apps/web/react.application.js.map +1 -1
- package/dist/react.env.d.ts +2 -2
- package/dist/react.env.js +2 -2
- package/dist/react.env.js.map +1 -1
- package/{overview-1656991770328.js → overview-1657164425299.js} +0 -0
- package/package-tar/teambit-react-0.0.782.tgz +0 -0
- package/package.json +32 -37
- package/{preview-1656991770328.js → preview-1657164425299.js} +2 -2
- package/artifacts/env-template/public/22.7072732251b2fe075054.js +0 -43
- package/artifacts/env-template/public/compositions.f2bf30aaac737a83f3b2.js +0 -5
- package/artifacts/env-template/public/peers.7d1c60e8589952b82b8c.js +0 -1
- package/compositions-app.tsx +0 -32
- package/dist/compositions-app.d.ts +0 -6
- package/dist/compositions-app.js +0 -99
- package/dist/compositions-app.js.map +0 -1
- package/dist/mount.d.ts +0 -9
- package/dist/mount.js +0 -54
- package/dist/mount.js.map +0 -1
- package/mount.tsx +0 -17
- package/package-tar/teambit-react-0.0.779.tgz +0 -0
package/dist/compositions-app.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.CompositionsApp = CompositionsApp;
|
|
9
|
-
|
|
10
|
-
function _react() {
|
|
11
|
-
const data = _interopRequireDefault(require("react"));
|
|
12
|
-
|
|
13
|
-
_react = function () {
|
|
14
|
-
return data;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
return data;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function _baseUiUtils() {
|
|
21
|
-
const data = require("@teambit/base-ui.utils.composer");
|
|
22
|
-
|
|
23
|
-
_baseUiUtils = function () {
|
|
24
|
-
return data;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return data;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function _designUiPages() {
|
|
31
|
-
const data = require("@teambit/design.ui.pages.standalone-not-found-page");
|
|
32
|
-
|
|
33
|
-
_designUiPages = function () {
|
|
34
|
-
return data;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return data;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function _reactUi() {
|
|
41
|
-
const data = require("@teambit/react.ui.error-fallback");
|
|
42
|
-
|
|
43
|
-
_reactUi = function () {
|
|
44
|
-
return data;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
return data;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function _reactUi2() {
|
|
51
|
-
const data = require("@teambit/react.ui.loader-fallback");
|
|
52
|
-
|
|
53
|
-
_reactUi2 = function () {
|
|
54
|
-
return data;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
return data;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function _reactErrorBoundary() {
|
|
61
|
-
const data = require("react-error-boundary");
|
|
62
|
-
|
|
63
|
-
_reactErrorBoundary = function () {
|
|
64
|
-
return data;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
return data;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function _react2() {
|
|
71
|
-
const data = require("./react.aspect");
|
|
72
|
-
|
|
73
|
-
_react2 = function () {
|
|
74
|
-
return data;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
return data;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// 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)
|
|
81
|
-
const hideScrollbars = 'body::-webkit-scrollbar {display: none;}';
|
|
82
|
-
|
|
83
|
-
function CompositionsApp({
|
|
84
|
-
Composition,
|
|
85
|
-
previewContext
|
|
86
|
-
}) {
|
|
87
|
-
const {
|
|
88
|
-
providers = []
|
|
89
|
-
} = previewContext.get(_react2().ReactAspect.id) || {};
|
|
90
|
-
const safeComposition = (0, _reactUi2().useFallback)(Composition && /*#__PURE__*/_react().default.createElement(Composition, null), /*#__PURE__*/_react().default.createElement(_designUiPages().StandaloneNotFoundPage, null));
|
|
91
|
-
return /*#__PURE__*/_react().default.createElement(_reactErrorBoundary().ErrorBoundary, {
|
|
92
|
-
FallbackComponent: _reactUi().ErrorFallback,
|
|
93
|
-
resetKeys: [Composition]
|
|
94
|
-
}, /*#__PURE__*/_react().default.createElement(_baseUiUtils().Composer, {
|
|
95
|
-
components: providers
|
|
96
|
-
}, /*#__PURE__*/_react().default.createElement("style", null, hideScrollbars), safeComposition));
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
//# sourceMappingURL=compositions-app.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/dist/mount.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RenderingContext } from '@teambit/preview';
|
|
3
|
-
declare const _default: (Composition: React.ComponentType, previewContext: RenderingContext) => void;
|
|
4
|
-
/**
|
|
5
|
-
* this mounts compositions into the DOM in the component preview.
|
|
6
|
-
* this function can be overridden through ReactAspect.overrideCompositionsMounter() API
|
|
7
|
-
* to apply custom logic for component DOM mounting.
|
|
8
|
-
*/
|
|
9
|
-
export default _default;
|
package/dist/mount.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
function _react() {
|
|
11
|
-
const data = _interopRequireDefault(require("react"));
|
|
12
|
-
|
|
13
|
-
_react = function () {
|
|
14
|
-
return data;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
return data;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function _reactDom() {
|
|
21
|
-
const data = _interopRequireDefault(require("react-dom"));
|
|
22
|
-
|
|
23
|
-
_reactDom = function () {
|
|
24
|
-
return data;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return data;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function _compositionsApp() {
|
|
31
|
-
const data = require("./compositions-app");
|
|
32
|
-
|
|
33
|
-
_compositionsApp = function () {
|
|
34
|
-
return data;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return data;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* this mounts compositions into the DOM in the component preview.
|
|
42
|
-
* this function can be overridden through ReactAspect.overrideCompositionsMounter() API
|
|
43
|
-
* to apply custom logic for component DOM mounting.
|
|
44
|
-
*/
|
|
45
|
-
var _default = (Composition, previewContext) => {
|
|
46
|
-
_reactDom().default.render( /*#__PURE__*/_react().default.createElement(_compositionsApp().CompositionsApp, {
|
|
47
|
-
Composition: Composition,
|
|
48
|
-
previewContext: previewContext
|
|
49
|
-
}), document.getElementById('root'));
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
exports.default = _default;
|
|
53
|
-
|
|
54
|
-
//# sourceMappingURL=mount.js.map
|
package/dist/mount.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/mount.tsx
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom';
|
|
3
|
-
import { RenderingContext } from '@teambit/preview';
|
|
4
|
-
|
|
5
|
-
import { CompositionsApp } from './compositions-app';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* this mounts compositions into the DOM in the component preview.
|
|
9
|
-
* this function can be overridden through ReactAspect.overrideCompositionsMounter() API
|
|
10
|
-
* to apply custom logic for component DOM mounting.
|
|
11
|
-
*/
|
|
12
|
-
export default (Composition: React.ComponentType, previewContext: RenderingContext) => {
|
|
13
|
-
ReactDOM.render(
|
|
14
|
-
<CompositionsApp Composition={Composition} previewContext={previewContext} />,
|
|
15
|
-
document.getElementById('root')
|
|
16
|
-
);
|
|
17
|
-
};
|
|
Binary file
|