@teambit/react.ui.compositions-app 0.0.8 → 0.0.10
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/compositions-app.tsx +4 -8
- package/dist/compositions-app.js +3 -6
- package/dist/compositions-app.js.map +1 -1
- package/dist/compositions.app-root.d.ts +1 -1
- package/{preview-1662069881993.js → dist/preview-1669911866429.js} +4 -2
- package/package-tar/teambit-react.ui.compositions-app-0.0.10.tgz +0 -0
- package/package.json +4 -8
- package/package-tar/teambit-react.ui.compositions-app-0.0.8.tgz +0 -0
package/compositions-app.tsx
CHANGED
|
@@ -2,9 +2,7 @@ import React, { ComponentType } from 'react';
|
|
|
2
2
|
import { Composer } from '@teambit/base-ui.utils.composer';
|
|
3
3
|
import { StandaloneNotFoundPage } from '@teambit/design.ui.pages.standalone-not-found-page';
|
|
4
4
|
import { RenderingContext } from '@teambit/preview';
|
|
5
|
-
import { ErrorFallback } from '@teambit/react.ui.error-fallback';
|
|
6
5
|
import { useFallback } from '@teambit/react.ui.loader-fallback';
|
|
7
|
-
import { ErrorBoundary } from 'react-error-boundary';
|
|
8
6
|
|
|
9
7
|
// 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)
|
|
10
8
|
const hideScrollbars = 'body::-webkit-scrollbar {display: none;}';
|
|
@@ -21,11 +19,9 @@ export function CompositionsApp({
|
|
|
21
19
|
const safeComposition = useFallback(Composition && <Composition />, <StandaloneNotFoundPage />);
|
|
22
20
|
|
|
23
21
|
return (
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</Composer>
|
|
29
|
-
</ErrorBoundary>
|
|
22
|
+
<Composer components={providers}>
|
|
23
|
+
<style>{hideScrollbars}</style>
|
|
24
|
+
{safeComposition}
|
|
25
|
+
</Composer>
|
|
30
26
|
);
|
|
31
27
|
}
|
package/dist/compositions-app.js
CHANGED
|
@@ -7,18 +7,15 @@ exports.CompositionsApp = void 0;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const base_ui_utils_composer_1 = require("@teambit/base-ui.utils.composer");
|
|
9
9
|
const design_ui_pages_standalone_not_found_page_1 = require("@teambit/design.ui.pages.standalone-not-found-page");
|
|
10
|
-
const react_ui_error_fallback_1 = require("@teambit/react.ui.error-fallback");
|
|
11
10
|
const react_ui_loader_fallback_1 = require("@teambit/react.ui.loader-fallback");
|
|
12
|
-
const react_error_boundary_1 = require("react-error-boundary");
|
|
13
11
|
// 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)
|
|
14
12
|
const hideScrollbars = 'body::-webkit-scrollbar {display: none;}';
|
|
15
13
|
function CompositionsApp({ Composition, previewContext, }) {
|
|
16
14
|
const { providers = [] } = (previewContext === null || previewContext === void 0 ? void 0 : previewContext.get('teambit.react/react')) || {};
|
|
17
15
|
const safeComposition = (0, react_ui_loader_fallback_1.useFallback)(Composition && react_1.default.createElement(Composition, null), react_1.default.createElement(design_ui_pages_standalone_not_found_page_1.StandaloneNotFoundPage, null));
|
|
18
|
-
return (react_1.default.createElement(
|
|
19
|
-
react_1.default.createElement(
|
|
20
|
-
|
|
21
|
-
safeComposition)));
|
|
16
|
+
return (react_1.default.createElement(base_ui_utils_composer_1.Composer, { components: providers },
|
|
17
|
+
react_1.default.createElement("style", null, hideScrollbars),
|
|
18
|
+
safeComposition));
|
|
22
19
|
}
|
|
23
20
|
exports.CompositionsApp = CompositionsApp;
|
|
24
21
|
//# sourceMappingURL=compositions-app.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compositions-app.js","sourceRoot":"","sources":["../compositions-app.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA6C;AAC7C,4EAA2D;AAC3D,kHAA4F;AAE5F,
|
|
1
|
+
{"version":3,"file":"compositions-app.js","sourceRoot":"","sources":["../compositions-app.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA6C;AAC7C,4EAA2D;AAC3D,kHAA4F;AAE5F,gFAAgE;AAEhE,wIAAwI;AACxI,MAAM,cAAc,GAAG,0CAA0C,CAAC;AAElE,SAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,cAAc,GAIf;IACC,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,GAAG,CAAC,qBAAqB,CAAC,KAAI,EAAE,CAAC;IAE5E,MAAM,eAAe,GAAG,IAAA,sCAAW,EAAC,WAAW,IAAI,8BAAC,WAAW,OAAG,EAAE,8BAAC,kEAAsB,OAAG,CAAC,CAAC;IAEhG,OAAO,CACL,8BAAC,iCAAQ,IAAC,UAAU,EAAE,SAAS;QAC7B,6CAAQ,cAAc,CAAS;QAC9B,eAAe,CACP,CACZ,CAAC;AACJ,CAAC;AAjBD,0CAiBC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RenderingContext } from '@teambit/preview';
|
|
3
|
-
declare const _default: (Composition: React.ComponentType, previewContext: RenderingContext) => void;
|
|
4
3
|
/**
|
|
5
4
|
* mounts compositions into the DOM in the component preview.
|
|
6
5
|
*/
|
|
6
|
+
declare const _default: (Composition: React.ComponentType, previewContext: RenderingContext) => void;
|
|
7
7
|
export default _default;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_ui_compositions-app@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_ui_compositions-app@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_ui_compositions-app@0.0.10/dist/compositions.compositions.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_ui_compositions-app@0.0.10/dist/composition-app.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
6
|
+
|
|
7
|
+
export const compositions_metadata = {"compositions":[{"displayName":"Preview","identifier":"Preview"},{"displayName":"Not found","identifier":"NotFound"}]};
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/react.ui.compositions-app",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/react/ui/compositions-app",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.react",
|
|
8
8
|
"name": "ui/compositions-app",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.10"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react-error-boundary": "^3.0.0",
|
|
13
|
-
"core-js": "^3.0.0",
|
|
14
12
|
"@teambit/base-ui.utils.composer": "1.0.0",
|
|
15
|
-
"@teambit/design.ui.pages.standalone-not-found-page": "0.0.
|
|
16
|
-
"@teambit/react.ui.
|
|
17
|
-
"@teambit/react.ui.loader-fallback": "0.0.96"
|
|
13
|
+
"@teambit/design.ui.pages.standalone-not-found-page": "0.0.368",
|
|
14
|
+
"@teambit/react.ui.loader-fallback": "0.0.98"
|
|
18
15
|
},
|
|
19
16
|
"devDependencies": {
|
|
20
17
|
"@types/react": "^17.0.8",
|
|
21
18
|
"@types/react-dom": "^17.0.5",
|
|
22
19
|
"@types/mocha": "9.1.0",
|
|
23
20
|
"@types/testing-library__jest-dom": "5.9.5",
|
|
24
|
-
"@babel/runtime": "7.12.18",
|
|
25
21
|
"@types/jest": "^26.0.0",
|
|
26
22
|
"@types/node": "12.20.4"
|
|
27
23
|
},
|
|
Binary file
|