@teambit/docs 1.0.24 → 1.0.25

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.
@@ -92,7 +92,7 @@ function Overview({
92
92
  previewProps,
93
93
  getEmptyState
94
94
  }) {
95
- var _component$preview, _component$preview2, _component$preview3, _component$preview4, _component$preview5;
95
+ var _component$preview, _component$buildStatu, _component$preview2, _component$preview3, _component$preview4, _component$preview5;
96
96
  const component = (0, _react().useContext)(_component().ComponentContext);
97
97
  const componentDescriptor = (0, _component().useComponentDescriptor)();
98
98
  const overviewProps = (0, _lodash().flatten)(overviewOptions.values())[0];
@@ -109,7 +109,7 @@ function Overview({
109
109
 
110
110
  // if (component?.buildStatus === 'failed' && component?.host === 'teambit.scope/scope')
111
111
  // return <StatusMessageCard style={{ margin: 'auto' }} status="FAILURE" title="failed to get component preview " />;
112
- const buildFailed = component.buildStatus !== 'Succeed' && (component === null || component === void 0 ? void 0 : component.host) === 'teambit.scope/scope';
112
+ const buildFailed = ((_component$buildStatu = component.buildStatus) === null || _component$buildStatu === void 0 ? void 0 : _component$buildStatu.toLowerCase()) !== 'succeed' && (component === null || component === void 0 ? void 0 : component.host) === 'teambit.scope/scope';
113
113
  const isScaling = (_component$preview2 = component.preview) === null || _component$preview2 === void 0 ? void 0 : _component$preview2.isScaling;
114
114
  const iframeQueryParams = `skipIncludes=${((_component$preview3 = component.preview) === null || _component$preview3 === void 0 ? void 0 : _component$preview3.skipIncludes) || 'false'}`;
115
115
  const overviewPropsValues = overviewProps && overviewProps();
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_lodash","_reactUiDocs","_component","_previewUi","_componentUi","_compositionsPanels","_overviewModule","_excluded","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","BadgePosition","exports","Overview","titleBadges","overviewOptions","previewProps","getEmptyState","_component$preview","_component$preview2","_component$preview3","_component$preview4","_component$preview5","component","useContext","ComponentContext","componentDescriptor","useComponentDescriptor","overviewProps","flatten","values","showHeader","preview","legacyHeader","isLoading","setLoading","useState","EmptyState","buildFailed","buildStatus","host","isScaling","iframeQueryParams","skipIncludes","overviewPropsValues","_ref","onLoad","style","rest","onPreviewLoad","React","useCallback","e","props","createElement","className","styles","overviewWrapper","id","toString","ComponentOverview","classNames","componentOverviewBlock","legacyPreview","displayName","version","abstract","description","labels","packageName","readme","ComponentPreview","previewName","pubsub","queryParams","viewport","fullContentHeight","disableScroll","width","height","minHeight","undefined","CompositionGallery","PropertiesTable","overviewPropsTable","componentId"],"sources":["overview.tsx"],"sourcesContent":["import React, { useContext, ComponentType, useState } from 'react';\nimport classNames from 'classnames';\nimport { flatten } from 'lodash';\n// import { Icon } from '@teambit/design.elements.icon';\nimport { PropertiesTable } from '@teambit/react.ui.docs.properties-table';\n// import { LinkedHeading } from '@teambit/documenter.ui.linked-heading';\nimport { ComponentContext, useComponentDescriptor } from '@teambit/component';\nimport type { SlotRegistry } from '@teambit/harmony';\nimport { ComponentPreview, ComponentPreviewProps } from '@teambit/preview.ui.component-preview';\n// import { StatusMessageCard } from '@teambit/design.ui.surfaces.status-message-card';\nimport { ComponentOverview } from '@teambit/component.ui.component-meta';\nimport { CompositionGallery } from '@teambit/compositions.panels.composition-gallery';\n// import { ReadmeSkeleton } from './readme-skeleton';\nimport styles from './overview.module.scss';\n\nexport enum BadgePosition {\n Title,\n SubTitle,\n Labels,\n Package,\n}\n\nexport type TitleBadge = {\n component: ComponentType<any>;\n weight?: number;\n position?: BadgePosition;\n};\n\nexport type TitleBadgeSlot = SlotRegistry<TitleBadge[]>;\n\nexport type OverviewOptions = () => { queryParams?: string };\n\nexport type OverviewOptionsSlot = SlotRegistry<OverviewOptions>;\n\nexport type OverviewProps = {\n titleBadges: TitleBadgeSlot;\n overviewOptions: OverviewOptionsSlot;\n previewProps?: Partial<ComponentPreviewProps>;\n getEmptyState?: () => ComponentType|undefined;\n};\n\nexport function Overview({ titleBadges, overviewOptions, previewProps, getEmptyState }: OverviewProps) {\n const component = useContext(ComponentContext);\n const componentDescriptor = useComponentDescriptor();\n const overviewProps = flatten(overviewOptions.values())[0];\n const showHeader = !component.preview?.legacyHeader;\n const [isLoading, setLoading] = useState(true);\n const EmptyState = getEmptyState && getEmptyState();\n\n // if (component?.buildStatus === 'pending' && component?.host === 'teambit.scope/scope')\n // return (\n // <StatusMessageCard style={{ margin: 'auto' }} status=\"PROCESSING\" title=\"component preview pending\">\n // this might take some time\n // </StatusMessageCard>\n // );\n\n // if (component?.buildStatus === 'failed' && component?.host === 'teambit.scope/scope')\n // return <StatusMessageCard style={{ margin: 'auto' }} status=\"FAILURE\" title=\"failed to get component preview \" />;\n const buildFailed = component.buildStatus !== 'Succeed' && component?.host === 'teambit.scope/scope';\n\n const isScaling = component.preview?.isScaling;\n\n const iframeQueryParams = `skipIncludes=${component.preview?.skipIncludes || 'false'}`;\n\n const overviewPropsValues = overviewProps && overviewProps();\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { onLoad, style, ...rest } = previewProps || {};\n\n const onPreviewLoad = React.useCallback(\n (e, props) => {\n setLoading(false);\n onLoad?.(e, props);\n },\n [onLoad]\n );\n\n return (\n <div className={styles.overviewWrapper} key={`${component.id.toString()}`}>\n {showHeader && (\n <ComponentOverview\n className={classNames(styles.componentOverviewBlock, !isScaling && styles.legacyPreview)}\n displayName={component.displayName}\n version={component.version}\n abstract={component.description}\n labels={component.labels}\n packageName={component.packageName}\n titleBadges={flatten(titleBadges.values())}\n componentDescriptor={componentDescriptor}\n component={component}\n />\n )}\n\n {/* TODO - @oded replace with new panel card same for compositions. */}\n\n {/* <LinkedHeading size=\"xs\" className={styles.title}>\n <Icon of=\"text\" /> <span>README</span>\n </LinkedHeading> */}\n {!buildFailed && <div className={styles.readme}>\n {/* {isLoading && <ReadmeSkeleton />} */}\n <ComponentPreview\n onLoad={onPreviewLoad}\n previewName=\"overview\"\n pubsub={true}\n queryParams={[iframeQueryParams, overviewPropsValues?.queryParams || '']}\n viewport={null}\n fullContentHeight\n disableScroll={true}\n {...rest}\n component={component}\n style={{ width: '100%', height: '100%', minHeight: !isScaling ? 500 : undefined }}\n />\n {component.preview?.skipIncludes && <CompositionGallery isLoading={isLoading} component={component} />}\n {component.preview?.skipIncludes && (\n <PropertiesTable className={styles.overviewPropsTable} componentId={component.id.toString()} />\n )}\n </div>}\n {(buildFailed && EmptyState) && <EmptyState />}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAF,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,aAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,YAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,WAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,UAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,WAAA;EA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,SAAS,GAAG,GAAG,GAAGwC;IAAU;EAAE,EACnF,CAAC,EACD,EAAA5D,mBAAA,GAAAE,SAAS,CAACS,OAAO,cAAAX,mBAAA,uBAAjBA,mBAAA,CAAmBsB,YAAY,kBAAItF,MAAA,GAAAgB,OAAA,CAAAiF,aAAA,CAACtF,mBAAA,GAAAkH,kBAAkB;IAAChD,SAAS,EAAEA,SAAU;IAACX,SAAS,EAAEA;EAAU,CAAE,CAAC,EACrG,EAAAD,mBAAA,GAAAC,SAAS,CAACS,OAAO,cAAAV,mBAAA,uBAAjBA,mBAAA,CAAmBqB,YAAY,kBAC9BtF,MAAA,GAAAgB,OAAA,CAAAiF,aAAA,CAAC1F,YAAA,GAAAuH,eAAe;IAAC5B,SAAS,EAAEC,yBAAM,CAAC4B,kBAAmB;IAACC,WAAW,EAAE9D,SAAS,CAACmC,EAAE,CAACC,QAAQ,CAAC;EAAE,CAAE,CAE7F,CAAC,EACJrB,WAAW,IAAID,UAAU,iBAAKhF,MAAA,GAAAgB,OAAA,CAAAiF,aAAA,CAACjB,UAAU,MAAE,CAC1C,CAAC;AAEV"}
1
+ {"version":3,"names":["_react","data","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_lodash","_reactUiDocs","_component","_previewUi","_componentUi","_compositionsPanels","_overviewModule","_excluded","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","BadgePosition","exports","Overview","titleBadges","overviewOptions","previewProps","getEmptyState","_component$preview","_component$buildStatu","_component$preview2","_component$preview3","_component$preview4","_component$preview5","component","useContext","ComponentContext","componentDescriptor","useComponentDescriptor","overviewProps","flatten","values","showHeader","preview","legacyHeader","isLoading","setLoading","useState","EmptyState","buildFailed","buildStatus","toLowerCase","host","isScaling","iframeQueryParams","skipIncludes","overviewPropsValues","_ref","onLoad","style","rest","onPreviewLoad","React","useCallback","e","props","createElement","className","styles","overviewWrapper","id","toString","ComponentOverview","classNames","componentOverviewBlock","legacyPreview","displayName","version","abstract","description","labels","packageName","readme","ComponentPreview","previewName","pubsub","queryParams","viewport","fullContentHeight","disableScroll","width","height","minHeight","undefined","CompositionGallery","PropertiesTable","overviewPropsTable","componentId"],"sources":["overview.tsx"],"sourcesContent":["import React, { useContext, ComponentType, useState } from 'react';\nimport classNames from 'classnames';\nimport { flatten } from 'lodash';\n// import { Icon } from '@teambit/design.elements.icon';\nimport { PropertiesTable } from '@teambit/react.ui.docs.properties-table';\n// import { LinkedHeading } from '@teambit/documenter.ui.linked-heading';\nimport { ComponentContext, useComponentDescriptor } from '@teambit/component';\nimport type { SlotRegistry } from '@teambit/harmony';\nimport { ComponentPreview, ComponentPreviewProps } from '@teambit/preview.ui.component-preview';\n// import { StatusMessageCard } from '@teambit/design.ui.surfaces.status-message-card';\nimport { ComponentOverview } from '@teambit/component.ui.component-meta';\nimport { CompositionGallery } from '@teambit/compositions.panels.composition-gallery';\n// import { ReadmeSkeleton } from './readme-skeleton';\nimport styles from './overview.module.scss';\n\nexport enum BadgePosition {\n Title,\n SubTitle,\n Labels,\n Package,\n}\n\nexport type TitleBadge = {\n component: ComponentType<any>;\n weight?: number;\n position?: BadgePosition;\n};\n\nexport type TitleBadgeSlot = SlotRegistry<TitleBadge[]>;\n\nexport type OverviewOptions = () => { queryParams?: string };\n\nexport type OverviewOptionsSlot = SlotRegistry<OverviewOptions>;\n\nexport type OverviewProps = {\n titleBadges: TitleBadgeSlot;\n overviewOptions: OverviewOptionsSlot;\n previewProps?: Partial<ComponentPreviewProps>;\n getEmptyState?: () => ComponentType | undefined;\n};\n\nexport function Overview({ titleBadges, overviewOptions, previewProps, getEmptyState }: OverviewProps) {\n const component = useContext(ComponentContext);\n const componentDescriptor = useComponentDescriptor();\n const overviewProps = flatten(overviewOptions.values())[0];\n const showHeader = !component.preview?.legacyHeader;\n const [isLoading, setLoading] = useState(true);\n const EmptyState = getEmptyState && getEmptyState();\n\n // if (component?.buildStatus === 'pending' && component?.host === 'teambit.scope/scope')\n // return (\n // <StatusMessageCard style={{ margin: 'auto' }} status=\"PROCESSING\" title=\"component preview pending\">\n // this might take some time\n // </StatusMessageCard>\n // );\n\n // if (component?.buildStatus === 'failed' && component?.host === 'teambit.scope/scope')\n // return <StatusMessageCard style={{ margin: 'auto' }} status=\"FAILURE\" title=\"failed to get component preview \" />;\n const buildFailed = component.buildStatus?.toLowerCase() !== 'succeed' && component?.host === 'teambit.scope/scope';\n\n const isScaling = component.preview?.isScaling;\n\n const iframeQueryParams = `skipIncludes=${component.preview?.skipIncludes || 'false'}`;\n\n const overviewPropsValues = overviewProps && overviewProps();\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { onLoad, style, ...rest } = previewProps || {};\n\n const onPreviewLoad = React.useCallback(\n (e, props) => {\n setLoading(false);\n onLoad?.(e, props);\n },\n [onLoad]\n );\n\n return (\n <div className={styles.overviewWrapper} key={`${component.id.toString()}`}>\n {showHeader && (\n <ComponentOverview\n className={classNames(styles.componentOverviewBlock, !isScaling && styles.legacyPreview)}\n displayName={component.displayName}\n version={component.version}\n abstract={component.description}\n labels={component.labels}\n packageName={component.packageName}\n titleBadges={flatten(titleBadges.values())}\n componentDescriptor={componentDescriptor}\n component={component}\n />\n )}\n\n {/* TODO - @oded replace with new panel card same for compositions. */}\n\n {/* <LinkedHeading size=\"xs\" className={styles.title}>\n <Icon of=\"text\" /> <span>README</span>\n </LinkedHeading> */}\n {!buildFailed && (\n <div className={styles.readme}>\n {/* {isLoading && <ReadmeSkeleton />} */}\n <ComponentPreview\n onLoad={onPreviewLoad}\n previewName=\"overview\"\n pubsub={true}\n queryParams={[iframeQueryParams, overviewPropsValues?.queryParams || '']}\n viewport={null}\n fullContentHeight\n disableScroll={true}\n {...rest}\n component={component}\n style={{ width: '100%', height: '100%', minHeight: !isScaling ? 500 : undefined }}\n />\n {component.preview?.skipIncludes && <CompositionGallery isLoading={isLoading} component={component} />}\n {component.preview?.skipIncludes && (\n <PropertiesTable className={styles.overviewPropsTable} componentId={component.id.toString()} />\n )}\n </div>\n )}\n {buildFailed && EmptyState && <EmptyState />}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAF,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,aAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,YAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,WAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,UAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,WAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,UAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAS,aAAA;EAAA,MAAAT,IAAA,GAAAE,OAAA;EAAAO,YAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAU,oBAAA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AA,GAAAgB,OAAA,CAAAmF,aAAA,CAACxF,mBAAA,GAAAoH,kBAAkB;IAACjD,SAAS,EAAEA,SAAU;IAACX,SAAS,EAAEA;EAAU,CAAE,CAAC,EACrG,EAAAD,mBAAA,GAAAC,SAAS,CAACS,OAAO,cAAAV,mBAAA,uBAAjBA,mBAAA,CAAmBsB,YAAY,kBAC9BxF,MAAA,GAAAgB,OAAA,CAAAmF,aAAA,CAAC5F,YAAA,GAAAyH,eAAe;IAAC5B,SAAS,EAAEC,yBAAM,CAAC4B,kBAAmB;IAACC,WAAW,EAAE/D,SAAS,CAACoC,EAAE,CAACC,QAAQ,CAAC;EAAE,CAAE,CAE7F,CACN,EACAtB,WAAW,IAAID,UAAU,iBAAIjF,MAAA,GAAAgB,OAAA,CAAAmF,aAAA,CAAClB,UAAU,MAAE,CACxC,CAAC;AAEV"}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.docs_docs@1.0.24/dist/docs.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.docs_docs@1.0.24/dist/docs.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.docs_docs@1.0.25/dist/docs.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.docs_docs@1.0.25/dist/docs.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -36,7 +36,7 @@ export type OverviewProps = {
36
36
  titleBadges: TitleBadgeSlot;
37
37
  overviewOptions: OverviewOptionsSlot;
38
38
  previewProps?: Partial<ComponentPreviewProps>;
39
- getEmptyState?: () => ComponentType|undefined;
39
+ getEmptyState?: () => ComponentType | undefined;
40
40
  };
41
41
 
42
42
  export function Overview({ titleBadges, overviewOptions, previewProps, getEmptyState }: OverviewProps) {
@@ -56,7 +56,7 @@ export function Overview({ titleBadges, overviewOptions, previewProps, getEmptyS
56
56
 
57
57
  // if (component?.buildStatus === 'failed' && component?.host === 'teambit.scope/scope')
58
58
  // return <StatusMessageCard style={{ margin: 'auto' }} status="FAILURE" title="failed to get component preview " />;
59
- const buildFailed = component.buildStatus !== 'Succeed' && component?.host === 'teambit.scope/scope';
59
+ const buildFailed = component.buildStatus?.toLowerCase() !== 'succeed' && component?.host === 'teambit.scope/scope';
60
60
 
61
61
  const isScaling = component.preview?.isScaling;
62
62
 
@@ -96,26 +96,28 @@ export function Overview({ titleBadges, overviewOptions, previewProps, getEmptyS
96
96
  {/* <LinkedHeading size="xs" className={styles.title}>
97
97
  <Icon of="text" /> <span>README</span>
98
98
  </LinkedHeading> */}
99
- {!buildFailed && <div className={styles.readme}>
100
- {/* {isLoading && <ReadmeSkeleton />} */}
101
- <ComponentPreview
102
- onLoad={onPreviewLoad}
103
- previewName="overview"
104
- pubsub={true}
105
- queryParams={[iframeQueryParams, overviewPropsValues?.queryParams || '']}
106
- viewport={null}
107
- fullContentHeight
108
- disableScroll={true}
109
- {...rest}
110
- component={component}
111
- style={{ width: '100%', height: '100%', minHeight: !isScaling ? 500 : undefined }}
112
- />
113
- {component.preview?.skipIncludes && <CompositionGallery isLoading={isLoading} component={component} />}
114
- {component.preview?.skipIncludes && (
115
- <PropertiesTable className={styles.overviewPropsTable} componentId={component.id.toString()} />
116
- )}
117
- </div>}
118
- {(buildFailed && EmptyState) && <EmptyState />}
99
+ {!buildFailed && (
100
+ <div className={styles.readme}>
101
+ {/* {isLoading && <ReadmeSkeleton />} */}
102
+ <ComponentPreview
103
+ onLoad={onPreviewLoad}
104
+ previewName="overview"
105
+ pubsub={true}
106
+ queryParams={[iframeQueryParams, overviewPropsValues?.queryParams || '']}
107
+ viewport={null}
108
+ fullContentHeight
109
+ disableScroll={true}
110
+ {...rest}
111
+ component={component}
112
+ style={{ width: '100%', height: '100%', minHeight: !isScaling ? 500 : undefined }}
113
+ />
114
+ {component.preview?.skipIncludes && <CompositionGallery isLoading={isLoading} component={component} />}
115
+ {component.preview?.skipIncludes && (
116
+ <PropertiesTable className={styles.overviewPropsTable} componentId={component.id.toString()} />
117
+ )}
118
+ </div>
119
+ )}
120
+ {buildFailed && EmptyState && <EmptyState />}
119
121
  </div>
120
122
  );
121
123
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/docs",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "homepage": "https://bit.cloud/teambit/docs/docs",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.docs",
8
8
  "name": "docs",
9
- "version": "1.0.24"
9
+ "version": "1.0.25"
10
10
  },
11
11
  "dependencies": {
12
12
  "graphql-tag": "2.12.1",
@@ -20,21 +20,21 @@
20
20
  "@teambit/docs.ui.overview-compare": "1.0.10",
21
21
  "@teambit/component.ui.component-meta": "0.0.357",
22
22
  "@teambit/base-ui.loaders.skeleton": "1.0.1",
23
- "@teambit/compiler": "1.0.24",
24
- "@teambit/component": "1.0.24",
25
- "@teambit/pkg": "1.0.24",
26
- "@teambit/workspace": "1.0.24",
27
- "@teambit/cli": "0.0.798",
28
- "@teambit/dev-files": "1.0.24",
29
- "@teambit/envs": "1.0.24",
30
- "@teambit/graphql": "1.0.24",
31
- "@teambit/logger": "0.0.891",
32
- "@teambit/preview": "1.0.24",
33
- "@teambit/component-id": "1.0.1",
34
- "@teambit/component-compare": "1.0.24",
35
- "@teambit/ui": "1.0.24",
36
- "@teambit/pubsub": "1.0.24",
37
- "@teambit/compositions.panels.composition-gallery": "0.0.157",
23
+ "@teambit/compiler": "1.0.25",
24
+ "@teambit/component": "1.0.25",
25
+ "@teambit/pkg": "1.0.25",
26
+ "@teambit/workspace": "1.0.25",
27
+ "@teambit/cli": "0.0.799",
28
+ "@teambit/dev-files": "1.0.25",
29
+ "@teambit/envs": "1.0.25",
30
+ "@teambit/graphql": "1.0.25",
31
+ "@teambit/logger": "0.0.892",
32
+ "@teambit/preview": "1.0.25",
33
+ "@teambit/component-id": "1.0.2",
34
+ "@teambit/component-compare": "1.0.25",
35
+ "@teambit/ui": "1.0.25",
36
+ "@teambit/pubsub": "1.0.25",
37
+ "@teambit/compositions.panels.composition-gallery": "0.0.158",
38
38
  "@teambit/preview.ui.component-preview": "1.0.0",
39
39
  "@teambit/react.ui.docs.properties-table": "0.0.18"
40
40
  },
@@ -50,7 +50,7 @@
50
50
  "@teambit/docs.content.docs-overview": "1.95.9"
51
51
  },
52
52
  "peerDependencies": {
53
- "@teambit/legacy": "1.0.577",
53
+ "@teambit/legacy": "1.0.578",
54
54
  "react": "^16.8.0 || ^17.0.0",
55
55
  "react-dom": "^16.8.0 || ^17.0.0"
56
56
  },