@teambit/docs 1.0.252 → 1.0.254

Sign up to get free protection for your applications and to get access to all the features.
@@ -6798,7 +6798,7 @@
6798
6798
  "componentId": {
6799
6799
  "scope": "teambit.docs",
6800
6800
  "name": "docs",
6801
- "version": "1.0.252"
6801
+ "version": "1.0.254"
6802
6802
  },
6803
6803
  "taggedModuleExports": []
6804
6804
  }
@@ -133,7 +133,7 @@ function Overview({
133
133
  if (isLoading && !defaultLoadingState) setLoading(false);
134
134
  }, [component.id.toString(), defaultLoadingState]);
135
135
  return /*#__PURE__*/_react().default.createElement("div", {
136
- className: _overviewModule().default.overviewWrapper,
136
+ className: (0, _classnames().default)(_overviewModule().default.overviewWrapper, isLoading && _overviewModule().default.noOverflow),
137
137
  key: `${component.id.toString()}`
138
138
  }, showHeader && /*#__PURE__*/_react().default.createElement(_componentUi().ComponentOverview, {
139
139
  className: (0, _classnames().default)(_overviewModule().default.componentOverviewBlock, !isScaling && _overviewModule().default.legacyPreview),
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_lodash","_component","_previewUi","_componentUi","_compositionsPanels","_baseReactThemes","_readmeSkeleton","_overviewModule","_excluded","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","prototype","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","BadgePosition","exports","Overview","titleBadges","overviewOptions","previewProps","getEmptyState","TaggedAPI","component","useContext","ComponentContext","componentDescriptor","useComponentDescriptor","current","useThemePicker","overviewProps","flatten","values","showHeader","preview","legacyHeader","EmptyState","buildFailed","buildStatus","toLowerCase","host","isScaling","Boolean","includesEnvTemplate","defaultLoadingState","React","useMemo","isLoading","setLoading","useState","iframeQueryParams","onlyOverview","skipIncludes","overviewPropsValues","themeParams","themeName","_ref","onLoad","style","rest","onPreviewLoad","useCallback","props","useEffect","id","toString","createElement","className","styles","overviewWrapper","ComponentOverview","classNames","componentOverviewBlock","legacyPreview","displayName","version","abstract","description","labels","packageName","readme","ReadmeSkeleton","CompositionGallerySkeleton","compositionsLength","Math","min","compositions","ComponentPreview","previewName","pubsub","queryParams","viewport","fullContentHeight","disableScroll","width","height","minHeight","undefined","CompositionGallery","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';\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, CompositionGallerySkeleton } from '@teambit/compositions.panels.composition-gallery';\nimport { useThemePicker } from '@teambit/base-react.themes.theme-switcher';\nimport { 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 TaggedAPI?: React.ComponentType<{ componentId: string }>;\n};\n\nexport function Overview({ titleBadges, overviewOptions, previewProps, getEmptyState, TaggedAPI }: OverviewProps) {\n const component = useContext(ComponentContext);\n const componentDescriptor = useComponentDescriptor();\n const { current } = useThemePicker();\n const overviewProps = flatten(overviewOptions.values())[0];\n const showHeader = !component.preview?.legacyHeader;\n const EmptyState = getEmptyState && getEmptyState();\n const buildFailed = component.buildStatus?.toLowerCase() !== 'succeed' && component?.host === 'teambit.scope/scope';\n const isScaling = Boolean(component.preview?.isScaling);\n const includesEnvTemplate = Boolean(component.preview?.includesEnvTemplate);\n const defaultLoadingState = React.useMemo(() => {\n return isScaling && !includesEnvTemplate;\n }, [isScaling, includesEnvTemplate]);\n\n const [isLoading, setLoading] = useState(defaultLoadingState);\n\n const iframeQueryParams = `onlyOverview=${component.preview?.onlyOverview || 'false'}&skipIncludes=${\n component.preview?.skipIncludes || component.preview?.onlyOverview\n }`;\n\n const overviewPropsValues = overviewProps && overviewProps();\n\n const themeParams = current?.themeName ? `theme=${current?.themeName}` : '';\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 React.useEffect(() => {\n if (!isLoading && defaultLoadingState) setLoading(true);\n if (isLoading && !defaultLoadingState) setLoading(false);\n }, [component.id.toString(), defaultLoadingState]);\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 {!buildFailed && (\n <div className={styles.readme}>\n {isLoading && (\n <ReadmeSkeleton>\n <CompositionGallerySkeleton compositionsLength={Math.min(component.compositions.length, 3)} />\n </ReadmeSkeleton>\n )}\n <ComponentPreview\n onLoad={onPreviewLoad}\n previewName=\"overview\"\n pubsub={true}\n queryParams={[iframeQueryParams, themeParams, 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?.onlyOverview && !isLoading && <CompositionGallery component={component} />}\n {component.preview?.onlyOverview && !isLoading && TaggedAPI && (\n <TaggedAPI 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;AAGA,SAAAM,WAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,UAAA,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,aAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,YAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,oBAAA;EAAA,MAAAT,IAAA,GAAAE,OAAA;EAAAO,mBAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAA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","require","_classnames","_interopRequireDefault","_lodash","_component","_previewUi","_componentUi","_compositionsPanels","_baseReactThemes","_readmeSkeleton","_overviewModule","_excluded","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","prototype","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","BadgePosition","exports","Overview","titleBadges","overviewOptions","previewProps","getEmptyState","TaggedAPI","component","useContext","ComponentContext","componentDescriptor","useComponentDescriptor","current","useThemePicker","overviewProps","flatten","values","showHeader","preview","legacyHeader","EmptyState","buildFailed","buildStatus","toLowerCase","host","isScaling","Boolean","includesEnvTemplate","defaultLoadingState","React","useMemo","isLoading","setLoading","useState","iframeQueryParams","onlyOverview","skipIncludes","overviewPropsValues","themeParams","themeName","_ref","onLoad","style","rest","onPreviewLoad","useCallback","props","useEffect","id","toString","createElement","className","classNames","styles","overviewWrapper","noOverflow","ComponentOverview","componentOverviewBlock","legacyPreview","displayName","version","abstract","description","labels","packageName","readme","ReadmeSkeleton","CompositionGallerySkeleton","compositionsLength","Math","min","compositions","ComponentPreview","previewName","pubsub","queryParams","viewport","fullContentHeight","disableScroll","width","height","minHeight","undefined","CompositionGallery","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';\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, CompositionGallerySkeleton } from '@teambit/compositions.panels.composition-gallery';\nimport { useThemePicker } from '@teambit/base-react.themes.theme-switcher';\nimport { 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 TaggedAPI?: React.ComponentType<{ componentId: string }>;\n};\n\nexport function Overview({ titleBadges, overviewOptions, previewProps, getEmptyState, TaggedAPI }: OverviewProps) {\n const component = useContext(ComponentContext);\n const componentDescriptor = useComponentDescriptor();\n const { current } = useThemePicker();\n const overviewProps = flatten(overviewOptions.values())[0];\n const showHeader = !component.preview?.legacyHeader;\n const EmptyState = getEmptyState && getEmptyState();\n const buildFailed = component.buildStatus?.toLowerCase() !== 'succeed' && component?.host === 'teambit.scope/scope';\n const isScaling = Boolean(component.preview?.isScaling);\n const includesEnvTemplate = Boolean(component.preview?.includesEnvTemplate);\n const defaultLoadingState = React.useMemo(() => {\n return isScaling && !includesEnvTemplate;\n }, [isScaling, includesEnvTemplate]);\n\n const [isLoading, setLoading] = useState(defaultLoadingState);\n\n const iframeQueryParams = `onlyOverview=${component.preview?.onlyOverview || 'false'}&skipIncludes=${\n component.preview?.skipIncludes || component.preview?.onlyOverview\n }`;\n\n const overviewPropsValues = overviewProps && overviewProps();\n\n const themeParams = current?.themeName ? `theme=${current?.themeName}` : '';\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 React.useEffect(() => {\n if (!isLoading && defaultLoadingState) setLoading(true);\n if (isLoading && !defaultLoadingState) setLoading(false);\n }, [component.id.toString(), defaultLoadingState]);\n\n return (\n <div\n className={classNames(styles.overviewWrapper, isLoading && styles.noOverflow)}\n key={`${component.id.toString()}`}\n >\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 {!buildFailed && (\n <div className={styles.readme}>\n {isLoading && (\n <ReadmeSkeleton>\n <CompositionGallerySkeleton compositionsLength={Math.min(component.compositions.length, 3)} />\n </ReadmeSkeleton>\n )}\n <ComponentPreview\n onLoad={onPreviewLoad}\n previewName=\"overview\"\n pubsub={true}\n queryParams={[iframeQueryParams, themeParams, 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?.onlyOverview && !isLoading && <CompositionGallery component={component} />}\n {component.preview?.onlyOverview && !isLoading && TaggedAPI && (\n <TaggedAPI 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,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BmC,KAAK,EAAE;MAAEqC,KAAK,EAAE,MAAM;MAAEC,MAAM,EAAE,MAAM;MAAEC,SAAS,EAAE,CAACxD,SAAS,GAAG,GAAG,GAAGyD;IAAU;EAAE,EACnF,CAAC,EACD3E,SAAS,CAACW,OAAO,EAAEiB,YAAY,IAAI,CAACJ,SAAS,iBAAIvF,MAAA,GAAAiB,OAAA,CAAAyF,aAAA,CAAChG,mBAAA,GAAAiI,kBAAkB;IAAC5E,SAAS,EAAEA;EAAU,CAAE,CAAC,EAC7FA,SAAS,CAACW,OAAO,EAAEiB,YAAY,IAAI,CAACJ,SAAS,IAAIzB,SAAS,iBACzD9D,MAAA,GAAAiB,OAAA,CAAAyF,aAAA,CAAC5C,SAAS;IAAC8E,WAAW,EAAE7E,SAAS,CAACyC,EAAE,CAACC,QAAQ,CAAC;EAAE,CAAE,CAEjD,CACN,EACA5B,WAAW,IAAID,UAAU,iBAAI5E,MAAA,GAAAiB,OAAA,CAAAyF,aAAA,CAAC9B,UAAU,MAAE,CACxC,CAAC;AAEV","ignoreList":[]}
@@ -2,6 +2,10 @@
2
2
  overflow: auto;
3
3
  --bit-h-lg: 36px;
4
4
 
5
+ &.noOverflow {
6
+ overflow: hidden;
7
+ }
8
+
5
9
  .componentOverviewBlock {
6
10
  padding: 50px 40px 10px 40px;
7
11
  max-width: 1440px;
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.docs_docs@1.0.252/dist/docs.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.docs_docs@1.0.252/dist/docs.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.docs_docs@1.0.254/dist/docs.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.docs_docs@1.0.254/dist/docs.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -2,6 +2,10 @@
2
2
  overflow: auto;
3
3
  --bit-h-lg: 36px;
4
4
 
5
+ &.noOverflow {
6
+ overflow: hidden;
7
+ }
8
+
5
9
  .componentOverviewBlock {
6
10
  padding: 50px 40px 10px 40px;
7
11
  max-width: 1440px;
@@ -81,7 +81,10 @@ export function Overview({ titleBadges, overviewOptions, previewProps, getEmptyS
81
81
  }, [component.id.toString(), defaultLoadingState]);
82
82
 
83
83
  return (
84
- <div className={styles.overviewWrapper} key={`${component.id.toString()}`}>
84
+ <div
85
+ className={classNames(styles.overviewWrapper, isLoading && styles.noOverflow)}
86
+ key={`${component.id.toString()}`}
87
+ >
85
88
  {showHeader && (
86
89
  <ComponentOverview
87
90
  className={classNames(styles.componentOverviewBlock, !isScaling && styles.legacyPreview)}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/docs",
3
- "version": "1.0.252",
3
+ "version": "1.0.254",
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.252"
9
+ "version": "1.0.254"
10
10
  },
11
11
  "dependencies": {
12
12
  "graphql-tag": "2.12.1",
@@ -19,21 +19,21 @@
19
19
  "@teambit/base-react.themes.theme-switcher": "1.0.2",
20
20
  "@teambit/component.ui.component-meta": "0.0.358",
21
21
  "@teambit/base-ui.loaders.skeleton": "1.0.1",
22
- "@teambit/compiler": "1.0.252",
23
- "@teambit/component": "1.0.252",
24
- "@teambit/pkg": "1.0.252",
25
- "@teambit/workspace": "1.0.252",
22
+ "@teambit/compiler": "1.0.254",
23
+ "@teambit/component": "1.0.254",
24
+ "@teambit/pkg": "1.0.254",
25
+ "@teambit/workspace": "1.0.254",
26
26
  "@teambit/cli": "0.0.862",
27
- "@teambit/dev-files": "1.0.252",
28
- "@teambit/envs": "1.0.252",
29
- "@teambit/graphql": "1.0.252",
27
+ "@teambit/dev-files": "1.0.254",
28
+ "@teambit/envs": "1.0.254",
29
+ "@teambit/graphql": "1.0.254",
30
30
  "@teambit/logger": "0.0.955",
31
- "@teambit/preview": "1.0.252",
32
- "@teambit/scope": "1.0.252",
33
- "@teambit/api-reference": "1.0.252",
34
- "@teambit/component-compare": "1.0.252",
35
- "@teambit/ui": "1.0.252",
36
- "@teambit/pubsub": "1.0.252",
31
+ "@teambit/preview": "1.0.254",
32
+ "@teambit/scope": "1.0.254",
33
+ "@teambit/api-reference": "1.0.254",
34
+ "@teambit/component-compare": "1.0.254",
35
+ "@teambit/ui": "1.0.254",
36
+ "@teambit/pubsub": "1.0.254",
37
37
  "@teambit/compositions.panels.composition-gallery": "0.0.211",
38
38
  "@teambit/preview.ui.component-preview": "1.0.12"
39
39
  },