@teambit/component 1.0.141 → 1.0.143

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.
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Section } from './section';
2
3
  export declare class AspectSection implements Section {
3
4
  route: {
@@ -9,12 +9,12 @@ export declare class ComponentMap<T> {
9
9
  /**
10
10
  * @deprecated please use `get` instead
11
11
  */
12
- byComponent(component: Component): [Component, T];
12
+ byComponent(component: Component): [Component, T] | undefined;
13
13
  get components(): Component[];
14
14
  /**
15
15
  * get a value for a component.
16
16
  */
17
- get(component: Component): [Component, T];
17
+ get(component: Component): [Component, T] | undefined;
18
18
  /**
19
19
  * get a value by the component-id
20
20
  */
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const Logo: () => JSX.Element;
@@ -79,7 +79,7 @@ export declare class Component implements IComponent {
79
79
  * build status of the component
80
80
  */
81
81
  get buildStatus(): BuildStatus;
82
- get headTag(): Tag;
82
+ get headTag(): Tag | undefined;
83
83
  get latest(): string | undefined;
84
84
  /**
85
85
  * get aspect data from current state.
@@ -14,7 +14,7 @@ export declare function componentSchema(componentExtension: ComponentMain): {
14
14
  log: (component: Component) => Promise<{
15
15
  date: number;
16
16
  email: string;
17
- username: string;
17
+ username: string | undefined;
18
18
  displayName: string;
19
19
  id: string;
20
20
  hash: string;
@@ -25,15 +25,15 @@ export declare function componentSchema(componentExtension: ComponentMain): {
25
25
  }>;
26
26
  getFile: (component: Component, { path }: {
27
27
  path: string;
28
- }) => string;
28
+ }) => string | undefined;
29
29
  mainFile: (component: Component) => any;
30
- headTag: (component: Component) => import(".").TagProps;
31
- latest: (component: Component) => string;
30
+ headTag: (component: Component) => import(".").TagProps | undefined;
31
+ latest: (component: Component) => string | undefined;
32
32
  tags: (component: any) => any;
33
33
  aspects: (component: Component, { include }: {
34
- include?: string[];
34
+ include?: string[] | undefined;
35
35
  }) => import("./component-interface").RawComponentMetadata[];
36
- elementsUrl: () => any;
36
+ elementsUrl: () => undefined;
37
37
  logs: (component: Component, filter?: {
38
38
  type?: string;
39
39
  offset?: number;
@@ -44,21 +44,21 @@ export declare function componentSchema(componentExtension: ComponentMain): {
44
44
  }) => Promise<{
45
45
  id: string;
46
46
  message: string;
47
- username?: string;
48
- displayName?: string;
49
- email?: string;
50
- date?: string;
47
+ username?: string | undefined;
48
+ displayName?: string | undefined;
49
+ email?: string | undefined;
50
+ date?: string | undefined;
51
51
  hash: string;
52
- tag?: string;
52
+ tag?: string | undefined;
53
53
  parents: string[];
54
- profileImage?: string;
55
- onLane?: boolean;
54
+ profileImage?: string | undefined;
55
+ onLane?: boolean | undefined;
56
56
  }[]>;
57
57
  };
58
58
  ComponentHost: {
59
59
  get: (host: ComponentFactory, { id }: {
60
60
  id: string;
61
- }) => Promise<Component>;
61
+ }) => Promise<Component | null | undefined>;
62
62
  snaps: (host: ComponentFactory, { id }: {
63
63
  id: string;
64
64
  }) => Promise<ComponentLog[]>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /// <reference types="lodash" />
2
3
  import type { RouteProps } from 'react-router-dom';
3
4
  import type { LinkProps } from '@teambit/base-react.navigation.link';
package/dist/esm.mjs CHANGED
@@ -25,5 +25,8 @@ export const useIdFromLocation = cjsModule.useIdFromLocation;
25
25
  export const useComponentLogs = cjsModule.useComponentLogs;
26
26
  export const Config = cjsModule.Config;
27
27
  export const ComponentModel = cjsModule.ComponentModel;
28
+ export const CollapsibleMenuNav = cjsModule.CollapsibleMenuNav;
29
+ export const ComponentMenu = cjsModule.ComponentMenu;
30
+ export const VersionRelatedDropdowns = cjsModule.VersionRelatedDropdowns;
28
31
 
29
32
  export default cjsModule;
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.141/dist/component.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.141/dist/component.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.143/dist/component.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.143/dist/component.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/dist/tag-map.d.ts CHANGED
@@ -5,7 +5,7 @@ export declare class TagMap extends Map<SemVer, Tag> {
5
5
  /**
6
6
  * get snap by hash.
7
7
  */
8
- byHash(hash: Hash): Tag;
8
+ byHash(hash: Hash): Tag | undefined;
9
9
  /**
10
10
  * e.g.
11
11
  * {
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare function AspectPage(): JSX.Element;
@@ -11,13 +11,6 @@ function _harmonyUi() {
11
11
  };
12
12
  return data;
13
13
  }
14
- function _component() {
15
- const data = require("@teambit/component");
16
- _component = function () {
17
- return data;
18
- };
19
- return data;
20
- }
21
14
  function _react() {
22
15
  const data = _interopRequireWildcard(require("react"));
23
16
  _react = function () {
@@ -67,6 +60,13 @@ function _aspectPageModule() {
67
60
  };
68
61
  return data;
69
62
  }
63
+ function _context() {
64
+ const data = require("../context");
65
+ _context = function () {
66
+ return data;
67
+ };
68
+ return data;
69
+ }
70
70
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
71
71
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
72
72
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -87,7 +87,7 @@ const GET_COMPONENT = (0, _client().gql)`
87
87
 
88
88
  // TODO: get the docs domain from the community aspect and pass it here as a prop
89
89
  function AspectPage() {
90
- const component = (0, _react().useContext)(_component().ComponentContext);
90
+ const component = (0, _react().useContext)(_context().ComponentContext);
91
91
  const {
92
92
  data
93
93
  } = (0, _uiFoundationUiHooks().useDataQuery)(GET_COMPONENT, {
@@ -1 +1 @@
1
- {"version":3,"names":["_harmonyUi","data","require","_component","_react","_interopRequireWildcard","_uiFoundationUiHooks","_client","_designUi","_documenterUi","_documenterUi2","_aspectPageModule","_interopRequireDefault","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","GET_COMPONENT","gql","AspectPage","component","useContext","ComponentContext","useDataQuery","variables","id","toString","aspectList","getHost","aspects","length","createElement","EmptyBox","title","linkText","link","className","styles","aspectPage","H1","Separator","separator","map","aspect","AspectBox","key","aspectBox","name","icon","config"],"sources":["aspect-page.tsx"],"sourcesContent":["import { AspectBox } from '@teambit/harmony.ui.aspect-box';\nimport { ComponentContext } from '@teambit/component';\nimport React, { useContext } from 'react';\nimport { useDataQuery } from '@teambit/ui-foundation.ui.hooks.use-data-query';\nimport { gql } from '@apollo/client';\nimport { EmptyBox } from '@teambit/design.ui.empty-box';\nimport { H1 } from '@teambit/documenter.ui.heading';\nimport { Separator } from '@teambit/documenter.ui.separator';\nimport styles from './aspect-page.module.scss';\n\nconst GET_COMPONENT = gql`\n query ($id: String!) {\n getHost {\n get(id: $id) {\n aspects {\n id\n config\n data\n icon\n }\n }\n }\n }\n`;\n\n// TODO: get the docs domain from the community aspect and pass it here as a prop\nexport function AspectPage() {\n const component = useContext(ComponentContext);\n const { data } = useDataQuery(GET_COMPONENT, {\n variables: { id: component.id.toString() },\n });\n const aspectList = data?.getHost?.get?.aspects;\n\n if (aspectList && aspectList.length === 0) {\n return (\n <EmptyBox\n title=\"This component is new and doesn’t have any aspects.\"\n linkText=\"Learn more about component aspects\"\n link={`https://bit.dev/docs/extending-bit/aspect-overview`}\n />\n );\n }\n\n return (\n <div className={styles.aspectPage}>\n <div>\n <H1 className={styles.title}>Configuration</H1>\n <Separator className={styles.separator} />\n {aspectList &&\n aspectList.map((aspect) => {\n return (\n <AspectBox\n key={aspect.id}\n className={styles.aspectBox}\n name={aspect.id}\n icon={aspect.icon}\n config={aspect.config}\n data={aspect.data}\n />\n );\n })}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAI,uBAAA,CAAAH,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,qBAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,oBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,QAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,UAAA;EAAA,MAAAP,IAAA,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K,SAAS,EAAEC,2BAAM,CAACC;EAAW,gBAChCpD,MAAA,GAAAW,OAAA,CAAAkC,aAAA,2BACE7C,MAAA,GAAAW,OAAA,CAAAkC,aAAA,CAACxC,aAAA,GAAAgD,EAAE;IAACH,SAAS,EAAEC,2BAAM,CAACJ;EAAM,GAAC,eAAiB,CAAC,eAC/C/C,MAAA,GAAAW,OAAA,CAAAkC,aAAA,CAACvC,cAAA,GAAAgD,SAAS;IAACJ,SAAS,EAAEC,2BAAM,CAACI;EAAU,CAAE,CAAC,EACzCd,UAAU,IACTA,UAAU,CAACe,GAAG,CAAEC,MAAM,IAAK;IACzB,oBACEzD,MAAA,GAAAW,OAAA,CAAAkC,aAAA,CAACjD,UAAA,GAAA8D,SAAS;MACRC,GAAG,EAAEF,MAAM,CAAClB,EAAG;MACfW,SAAS,EAAEC,2BAAM,CAACS,SAAU;MAC5BC,IAAI,EAAEJ,MAAM,CAAClB,EAAG;MAChBuB,IAAI,EAAEL,MAAM,CAACK,IAAK;MAClBC,MAAM,EAAEN,MAAM,CAACM,MAAO;MACtBlE,IAAI,EAAE4D,MAAM,CAAC5D;IAAK,CACnB,CAAC;EAEN,CAAC,CACA,CACF,CAAC;AAEV"}
1
+ {"version":3,"names":["_harmonyUi","data","require","_react","_interopRequireWildcard","_uiFoundationUiHooks","_client","_designUi","_documenterUi","_documenterUi2","_aspectPageModule","_interopRequireDefault","_context","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","GET_COMPONENT","gql","AspectPage","component","useContext","ComponentContext","useDataQuery","variables","id","toString","aspectList","getHost","aspects","length","createElement","EmptyBox","title","linkText","link","className","styles","aspectPage","H1","Separator","separator","map","aspect","AspectBox","key","aspectBox","name","icon","config"],"sources":["aspect-page.tsx"],"sourcesContent":["import { AspectBox } from '@teambit/harmony.ui.aspect-box';\nimport React, { useContext } from 'react';\nimport { useDataQuery } from '@teambit/ui-foundation.ui.hooks.use-data-query';\nimport { gql } from '@apollo/client';\nimport { EmptyBox } from '@teambit/design.ui.empty-box';\nimport { H1 } from '@teambit/documenter.ui.heading';\nimport { Separator } from '@teambit/documenter.ui.separator';\nimport styles from './aspect-page.module.scss';\nimport { ComponentContext } from '../context';\n\nconst GET_COMPONENT = gql`\n query ($id: String!) {\n getHost {\n get(id: $id) {\n aspects {\n id\n config\n data\n icon\n }\n }\n }\n }\n`;\n\n// TODO: get the docs domain from the community aspect and pass it here as a prop\nexport function AspectPage() {\n const component = useContext(ComponentContext);\n const { data } = useDataQuery(GET_COMPONENT, {\n variables: { id: component.id.toString() },\n });\n const aspectList = data?.getHost?.get?.aspects;\n\n if (aspectList && aspectList.length === 0) {\n return (\n <EmptyBox\n title=\"This component is new and doesn’t have any aspects.\"\n linkText=\"Learn more about component aspects\"\n link={`https://bit.dev/docs/extending-bit/aspect-overview`}\n />\n );\n }\n\n return (\n <div className={styles.aspectPage}>\n <div>\n <H1 className={styles.title}>Configuration</H1>\n <Separator className={styles.separator} />\n {aspectList &&\n aspectList.map((aspect) => {\n return (\n <AspectBox\n key={aspect.id}\n className={styles.aspectBox}\n name={aspect.id}\n icon={aspect.icon}\n config={aspect.config}\n data={aspect.data}\n />\n );\n })}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAG,uBAAA,CAAAF,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,qBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,oBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA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C,IAAIF,UAAU,IAAIA,UAAU,CAACG,MAAM,KAAK,CAAC,EAAE;IACzC,oBACE7C,MAAA,GAAAY,OAAA,CAAAkC,aAAA,CAAC1C,SAAA,GAAA2C,QAAQ;MACPC,KAAK,EAAC,0DAAqD;MAC3DC,QAAQ,EAAC,oCAAoC;MAC7CC,IAAI,EAAG;IAAoD,CAC5D,CAAC;EAEN;EAEA,oBACElD,MAAA,GAAAY,OAAA,CAAAkC,aAAA;IAAKK,SAAS,EAAEC,2BAAM,CAACC;EAAW,gBAChCrD,MAAA,GAAAY,OAAA,CAAAkC,aAAA,2BACE9C,MAAA,GAAAY,OAAA,CAAAkC,aAAA,CAACzC,aAAA,GAAAiD,EAAE;IAACH,SAAS,EAAEC,2BAAM,CAACJ;EAAM,GAAC,eAAiB,CAAC,eAC/ChD,MAAA,GAAAY,OAAA,CAAAkC,aAAA,CAACxC,cAAA,GAAAiD,SAAS;IAACJ,SAAS,EAAEC,2BAAM,CAACI;EAAU,CAAE,CAAC,EACzCd,UAAU,IACTA,UAAU,CAACe,GAAG,CAAEC,MAAM,IAAK;IACzB,oBACE1D,MAAA,GAAAY,OAAA,CAAAkC,aAAA,CAACjD,UAAA,GAAA8D,SAAS;MACRC,GAAG,EAAEF,MAAM,CAAClB,EAAG;MACfW,SAAS,EAAEC,2BAAM,CAACS,SAAU;MAC5BC,IAAI,EAAEJ,MAAM,CAAClB,EAAG;MAChBuB,IAAI,EAAEL,MAAM,CAACK,IAAK;MAClBC,MAAM,EAAEN,MAAM,CAACM,MAAO;MACtBlE,IAAI,EAAE4D,MAAM,CAAC5D;IAAK,CACnB,CAAC;EAEN,CAAC,CACA,CACF,CAAC;AAEV"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare class ComponentError {
2
3
  /**
3
4
  * http status code of error
@@ -6,7 +7,7 @@ export declare class ComponentError {
6
7
  /**
7
8
  * error message of the error
8
9
  */
9
- readonly message?: string;
10
+ readonly message?: string | undefined;
10
11
  constructor(
11
12
  /**
12
13
  * http status code of error
@@ -15,6 +16,6 @@ export declare class ComponentError {
15
16
  /**
16
17
  * error message of the error
17
18
  */
18
- message?: string);
19
+ message?: string | undefined);
19
20
  renderError(): JSX.Element;
20
21
  }
@@ -77,11 +77,11 @@ export declare class ComponentModel {
77
77
  /**
78
78
  * component build status
79
79
  */
80
- readonly buildStatus?: string;
80
+ readonly buildStatus?: string | undefined;
81
81
  /**
82
82
  * issues of component.
83
83
  */
84
- readonly issuesCount?: number;
84
+ readonly issuesCount?: number | undefined;
85
85
  /**
86
86
  * status of component.
87
87
  */
@@ -89,11 +89,11 @@ export declare class ComponentModel {
89
89
  /**
90
90
  * deprecation info of the component.
91
91
  */
92
- readonly deprecation?: DeprecationInfo;
92
+ readonly deprecation?: DeprecationInfo | undefined;
93
93
  /**
94
94
  * env descriptor.
95
95
  */
96
- readonly environment?: Descriptor;
96
+ readonly environment?: Descriptor | undefined;
97
97
  /**
98
98
  * description of the component.
99
99
  */
@@ -102,18 +102,18 @@ export declare class ComponentModel {
102
102
  /**
103
103
  * host of the component
104
104
  */
105
- readonly host?: string;
105
+ readonly host?: string | undefined;
106
106
  /**
107
107
  *
108
108
  * size preview
109
109
  */
110
- readonly size?: ComponentPreviewSize;
110
+ readonly size?: ComponentPreviewSize | undefined;
111
111
  /**
112
112
  * latest version of component
113
113
  */
114
- readonly latest?: string;
115
- readonly preview?: ComponentPreview;
116
- readonly logs?: LegacyComponentLog[];
114
+ readonly latest?: string | undefined;
115
+ readonly preview?: ComponentPreview | undefined;
116
+ readonly logs?: LegacyComponentLog[] | undefined;
117
117
  constructor(
118
118
  /**
119
119
  * id of the component
@@ -142,11 +142,11 @@ export declare class ComponentModel {
142
142
  /**
143
143
  * component build status
144
144
  */
145
- buildStatus?: string,
145
+ buildStatus?: string | undefined,
146
146
  /**
147
147
  * issues of component.
148
148
  */
149
- issuesCount?: number,
149
+ issuesCount?: number | undefined,
150
150
  /**
151
151
  * status of component.
152
152
  */
@@ -154,11 +154,11 @@ export declare class ComponentModel {
154
154
  /**
155
155
  * deprecation info of the component.
156
156
  */
157
- deprecation?: DeprecationInfo,
157
+ deprecation?: DeprecationInfo | undefined,
158
158
  /**
159
159
  * env descriptor.
160
160
  */
161
- environment?: Descriptor,
161
+ environment?: Descriptor | undefined,
162
162
  /**
163
163
  * description of the component.
164
164
  */
@@ -166,16 +166,16 @@ export declare class ComponentModel {
166
166
  /**
167
167
  * host of the component
168
168
  */
169
- host?: string,
169
+ host?: string | undefined,
170
170
  /**
171
171
  *
172
172
  * size preview
173
173
  */
174
- size?: ComponentPreviewSize,
174
+ size?: ComponentPreviewSize | undefined,
175
175
  /**
176
176
  * latest version of component
177
177
  */
178
- latest?: string, preview?: ComponentPreview, logs?: LegacyComponentLog[]);
178
+ latest?: string | undefined, preview?: ComponentPreview | undefined, logs?: LegacyComponentLog[] | undefined);
179
179
  get version(): string;
180
180
  /**
181
181
  * create an instance of a component from a plain object.
@@ -1,5 +1,5 @@
1
1
  import React, { ComponentType } from 'react';
2
- import { ComponentModel } from '@teambit/component';
2
+ import { ComponentModel } from '../component-model';
3
3
  export type ComponentPluginProps = React.HTMLAttributes<HTMLDivElement> & {
4
4
  component: ComponentModel;
5
5
  };
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_lodash","_designUiStyles","_envsUi","_classnames","_componentResultModule","obj","__esModule","default","ComponentResult","component","plugins","name","id","fullName","startPlugins","compact","map","plugin","start","createElement","key","endPlugins","end","Fragment","EnvIcon","className","styles","icon","classnames","ellipsis"],"sources":["component-result.tsx"],"sourcesContent":["import React, { ComponentType } from 'react';\nimport compact from 'lodash.compact';\nimport { ComponentModel } from '@teambit/component';\nimport { ellipsis } from '@teambit/design.ui.styles.ellipsis';\nimport { EnvIcon } from '@teambit/envs.ui.env-icon';\nimport classnames from 'classnames';\n\nimport styles from './component-result.module.scss';\n\nexport type ComponentPluginProps = React.HTMLAttributes<HTMLDivElement> & { component: ComponentModel };\n\nexport type ComponentResultPlugin = {\n key: string;\n start?: ComponentType<ComponentPluginProps>;\n end?: ComponentType<ComponentPluginProps>;\n};\ntype ComponentResultProps = {\n component: ComponentModel;\n plugins?: ComponentResultPlugin[];\n};\n\nexport function ComponentResult({ component, plugins }: ComponentResultProps) {\n const name = component.id.fullName;\n\n const startPlugins = compact(\n plugins?.map((plugin) => plugin.start && <plugin.start key={plugin.key} component={component} />)\n );\n const endPlugins = compact(\n plugins?.map((plugin) => plugin.end && <plugin.end key={plugin.key} component={component} />)\n );\n\n return (\n <>\n {startPlugins}\n <EnvIcon component={component} className={styles.icon} />\n <div className={classnames(styles.name, ellipsis)}>{name}</div>\n {endPlugins}\n </>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,gBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,eAAA,YAAAA,CAAA;IAAA,OAAAJ,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;AACA,SAAAM,YAAA;EAAA,MAAAN,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAI,WAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,uBAAA;EAAA,MAAAP,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAK,sBAAA,YAAAA,CAAA;IA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interopRequireDefault","require","_lodash","_designUiStyles","_envsUi","_classnames","_componentResultModule","obj","__esModule","default","ComponentResult","component","plugins","name","id","fullName","startPlugins","compact","map","plugin","start","createElement","key","endPlugins","end","Fragment","EnvIcon","className","styles","icon","classnames","ellipsis"],"sources":["component-result.tsx"],"sourcesContent":["import React, { ComponentType } from 'react';\nimport compact from 'lodash.compact';\nimport { ellipsis } from '@teambit/design.ui.styles.ellipsis';\nimport { EnvIcon } from '@teambit/envs.ui.env-icon';\nimport classnames from 'classnames';\nimport { ComponentModel } from '../component-model';\n\nimport styles from './component-result.module.scss';\n\nexport type ComponentPluginProps = React.HTMLAttributes<HTMLDivElement> & { component: ComponentModel };\n\nexport type ComponentResultPlugin = {\n key: string;\n start?: ComponentType<ComponentPluginProps>;\n end?: ComponentType<ComponentPluginProps>;\n};\ntype ComponentResultProps = {\n component: ComponentModel;\n plugins?: ComponentResultPlugin[];\n};\n\nexport function ComponentResult({ component, plugins }: ComponentResultProps) {\n const name = component.id.fullName;\n\n const startPlugins = compact(\n plugins?.map((plugin) => plugin.start && <plugin.start key={plugin.key} component={component} />)\n );\n const endPlugins = compact(\n plugins?.map((plugin) => plugin.end && <plugin.end key={plugin.key} component={component} />)\n );\n\n return (\n <>\n {startPlugins}\n <EnvIcon component={component} className={styles.icon} />\n <div className={classnames(styles.name, ellipsis)}>{name}</div>\n {endPlugins}\n </>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,gBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,eAAA,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,oBACEb,MAAA,GAAAW,OAAA,CAAAY,aAAA,CAAAvB,MAAA,GAAAW,OAAA,CAAAgB,QAAA,QACGT,YAAY,eACblB,MAAA,GAAAW,OAAA,CAAAY,aAAA,CAACjB,OAAA,GAAAsB,OAAO;IAACf,SAAS,EAAEA,SAAU;IAACgB,SAAS,EAAEC,gCAAM,CAACC;EAAK,CAAE,CAAC,eACzD/B,MAAA,GAAAW,OAAA,CAAAY,aAAA;IAAKM,SAAS,EAAE,IAAAG,qBAAU,EAACF,gCAAM,CAACf,IAAI,EAAEkB,0BAAQ;EAAE,GAAElB,IAAU,CAAC,EAC9DU,UACD,CAAC;AAEP"}
@@ -1,7 +1,7 @@
1
- import { ComponentModel } from '@teambit/component';
2
1
  import { SearchResult, FuzzySearchItem, FuzzySearcher } from '@teambit/explorer.ui.command-bar';
3
2
  import type { SearchProvider } from '@teambit/command-bar';
4
3
  import { ComponentResultPlugin } from './component-result';
4
+ import { ComponentModel } from '../component-model';
5
5
  export type { ComponentResultPlugin };
6
6
  type ComponentSearchIdx = {
7
7
  name: string;
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_explorerUi","_componentResult","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","String","Symbol","toPrimitive","call","TypeError","Number","searchKeys","ComponentSearcher","FuzzySearcher","constructor","options","item","navigate","resultPlugins","component","id","fullName","action","children","createElement","ComponentResult","plugins","updatePlugins","test","term","startsWith","toSearchableItem","name","displayName","exports"],"sources":["component-searcher.tsx"],"sourcesContent":["import React from 'react';\n\nimport { ComponentModel } from '@teambit/component';\nimport { SearchResult, FuzzySearchItem, FuzzySearcher } from '@teambit/explorer.ui.command-bar';\nimport type { SearchProvider } from '@teambit/command-bar';\nimport { ComponentResult, ComponentResultPlugin } from './component-result';\n\nexport type { ComponentResultPlugin };\n\ntype ComponentSearchIdx = {\n name: string;\n displayName: string;\n component: ComponentModel;\n};\n\nconst searchKeys: (keyof ComponentSearchIdx)[] = ['displayName', 'name'];\n\ntype ComponentSearcherOptions = {\n navigate: (path: string) => void;\n resultPlugins?: ComponentResultPlugin[];\n};\n\nexport class ComponentSearcher extends FuzzySearcher<ComponentModel, ComponentSearchIdx> implements SearchProvider {\n constructor(public options: ComponentSearcherOptions) {\n super({ searchKeys });\n }\n\n updatePlugins(plugins: ComponentResultPlugin[]) {\n this.options = {\n ...this.options,\n resultPlugins: plugins,\n };\n }\n\n override test(term: string): boolean {\n return !term.startsWith('>') && term.length > 0;\n }\n\n protected override toSearchableItem(item: ComponentModel): ComponentSearchIdx {\n return {\n name: item.id.name,\n displayName: item.id.fullName,\n component: item,\n };\n }\n\n protected override toSearchResult = ({ item }: FuzzySearchItem<ComponentSearchIdx>): SearchResult => {\n const { navigate, resultPlugins } = this.options;\n const { component } = item;\n\n return {\n id: component.id.fullName,\n action: () => navigate(`/${component.id.fullName}`),\n children: <ComponentResult component={component} plugins={resultPlugins} />,\n };\n };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,iBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,gBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA4E,SAAAC,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,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CAAE;MAC5E,CAAC;IACH,CAAC;EA9BD;EAEAS,aAAaA,CAACD,OAAgC,EAAE;IAC9C,IAAI,CAACX,OAAO,GAAAzB,aAAA,CAAAA,aAAA,KACP,IAAI,CAACyB,OAAO;MACfG,aAAa,EAAEQ;IAAO,EACvB;EACH;EAESE,IAAIA,CAACC,IAAY,EAAW;IACnC,OAAO,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,IAAID,IAAI,CAACrC,MAAM,GAAG,CAAC;EACjD;EAEmBuC,gBAAgBA,CAACf,IAAoB,EAAsB;IAC5E,OAAO;MACLgB,IAAI,EAAEhB,IAAI,CAACI,EAAE,CAACY,IAAI;MAClBC,WAAW,EAAEjB,IAAI,CAACI,EAAE,CAACC,QAAQ;MAC7BF,SAAS,EAAEH;IACb,CAAC;EACH;AAYF;AAACkB,OAAA,CAAAtB,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_explorerUi","_componentResult","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","String","Symbol","toPrimitive","call","TypeError","Number","searchKeys","ComponentSearcher","FuzzySearcher","constructor","options","item","navigate","resultPlugins","component","id","fullName","action","children","createElement","ComponentResult","plugins","updatePlugins","test","term","startsWith","toSearchableItem","name","displayName","exports"],"sources":["component-searcher.tsx"],"sourcesContent":["import React from 'react';\nimport { SearchResult, FuzzySearchItem, FuzzySearcher } from '@teambit/explorer.ui.command-bar';\nimport type { SearchProvider } from '@teambit/command-bar';\nimport { ComponentResult, ComponentResultPlugin } from './component-result';\nimport { ComponentModel } from '../component-model';\n\nexport type { ComponentResultPlugin };\n\ntype ComponentSearchIdx = {\n name: string;\n displayName: string;\n component: ComponentModel;\n};\n\nconst searchKeys: (keyof ComponentSearchIdx)[] = ['displayName', 'name'];\n\ntype ComponentSearcherOptions = {\n navigate: (path: string) => void;\n resultPlugins?: ComponentResultPlugin[];\n};\n\nexport class ComponentSearcher extends FuzzySearcher<ComponentModel, ComponentSearchIdx> implements SearchProvider {\n constructor(public options: ComponentSearcherOptions) {\n super({ searchKeys });\n }\n\n updatePlugins(plugins: ComponentResultPlugin[]) {\n this.options = {\n ...this.options,\n resultPlugins: plugins,\n };\n }\n\n override test(term: string): boolean {\n return !term.startsWith('>') && term.length > 0;\n }\n\n protected override toSearchableItem(item: ComponentModel): ComponentSearchIdx {\n return {\n name: item.id.name,\n displayName: item.id.fullName,\n component: item,\n };\n }\n\n protected override toSearchResult = ({ item }: FuzzySearchItem<ComponentSearchIdx>): SearchResult => {\n const { navigate, resultPlugins } = this.options;\n const { component } = item;\n\n return {\n id: component.id.fullName,\n action: () => navigate(`/${component.id.fullName}`),\n children: <ComponentResult component={component} plugins={resultPlugins} />,\n };\n };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,iBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,gBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA4E,SAAAC,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OA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,KACP,IAAI,CAACyB,OAAO;MACfG,aAAa,EAAEQ;IAAO,EACvB;EACH;EAESE,IAAIA,CAACC,IAAY,EAAW;IACnC,OAAO,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,IAAID,IAAI,CAACrC,MAAM,GAAG,CAAC;EACjD;EAEmBuC,gBAAgBA,CAACf,IAAoB,EAAsB;IAC5E,OAAO;MACLgB,IAAI,EAAEhB,IAAI,CAACI,EAAE,CAACY,IAAI;MAClBC,WAAW,EAAEjB,IAAI,CAACI,EAAE,CAACC,QAAQ;MAC7BF,SAAS,EAAEH;IACb,CAAC;EACH;AAYF;AAACkB,OAAA,CAAAtB,iBAAA,GAAAA,iBAAA"}
@@ -3,4 +3,4 @@ import type { ComponentDescriptor } from '@teambit/component-descriptor';
3
3
  import { ComponentModel } from '../component-model';
4
4
  export declare const ComponentContext: React.Context<ComponentModel>;
5
5
  export declare const ComponentDescriptorContext: React.Context<ComponentDescriptor | undefined>;
6
- export declare const useComponentDescriptor: () => ComponentDescriptor;
6
+ export declare const useComponentDescriptor: () => ComponentDescriptor | undefined;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { NavPluginProps } from '../menu/nav-plugin';
2
3
  export declare function TopBarNav({ href, className, activeClassName, children, displayName, ignoreQueryParams, ...rest }: NavPluginProps): JSX.Element;
@@ -1,16 +1,16 @@
1
1
  import { ComponentLogsResult, Filters } from './use-component.model';
2
2
  export declare function useComponentLogs(componentId: string, host: string, filters?: Filters, skipFromProps?: boolean): ComponentLogsResult;
3
3
  export declare function useComponentLogsInit(componentId: string, host: string, filters?: Filters, skip?: boolean): {
4
- logOffset: number;
4
+ logOffset: number | undefined;
5
5
  variables: {
6
6
  id: string;
7
7
  extensionId: string;
8
8
  logOffset: any;
9
- logLimit: number;
10
- logType: string;
11
- logHead: string;
12
- logSort: string;
13
- logTakeHeadFromComponent: boolean;
9
+ logLimit: number | undefined;
10
+ logType: string | undefined;
11
+ logHead: string | undefined;
12
+ logSort: string | undefined;
13
+ logTakeHeadFromComponent: boolean | undefined;
14
14
  };
15
- skip: boolean;
15
+ skip: boolean | undefined;
16
16
  };
package/esm.mjs CHANGED
@@ -25,5 +25,8 @@ export const useIdFromLocation = cjsModule.useIdFromLocation;
25
25
  export const useComponentLogs = cjsModule.useComponentLogs;
26
26
  export const Config = cjsModule.Config;
27
27
  export const ComponentModel = cjsModule.ComponentModel;
28
+ export const CollapsibleMenuNav = cjsModule.CollapsibleMenuNav;
29
+ export const ComponentMenu = cjsModule.ComponentMenu;
30
+ export const VersionRelatedDropdowns = cjsModule.VersionRelatedDropdowns;
28
31
 
29
32
  export default cjsModule;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/component",
3
- "version": "1.0.141",
3
+ "version": "1.0.143",
4
4
  "homepage": "https://bit.cloud/teambit/component/component",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "component",
9
- "version": "1.0.141"
9
+ "version": "1.0.143"
10
10
  },
11
11
  "dependencies": {
12
12
  "@teambit/any-fs": "0.0.5",
@@ -34,38 +34,38 @@
34
34
  "@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.505",
35
35
  "@teambit/legacy-component-log": "0.0.402",
36
36
  "@teambit/ui-foundation.ui.react-router.use-query": "0.0.501",
37
- "@teambit/design.ui.pages.not-found": "0.0.366",
38
- "@teambit/design.ui.pages.server-error": "0.0.366",
39
37
  "@teambit/design.ui.empty-box": "0.0.363",
40
38
  "@teambit/documenter.ui.heading": "4.1.1",
41
39
  "@teambit/documenter.ui.separator": "4.1.1",
42
40
  "@teambit/design.navigation.responsive-navbar": "0.0.7",
43
41
  "@teambit/base-ui.layout.breakpoints": "1.0.0",
44
- "@teambit/ui-foundation.ui.use-box.dropdown": "0.0.141",
42
+ "@teambit/ui-foundation.ui.use-box.dropdown": "0.0.142",
43
+ "@teambit/design.ui.pages.not-found": "0.0.366",
44
+ "@teambit/design.ui.pages.server-error": "0.0.366",
45
45
  "@teambit/design.ui.styles.ellipsis": "0.0.357",
46
46
  "@teambit/explorer.ui.command-bar": "2.0.14",
47
- "@teambit/aspect-loader": "1.0.141",
48
- "@teambit/graph": "1.0.141",
47
+ "@teambit/aspect-loader": "1.0.143",
48
+ "@teambit/graph": "1.0.143",
49
49
  "@teambit/toolbox.path.match-patterns": "0.0.15",
50
50
  "@teambit/toolbox.string.capitalize": "0.0.496",
51
- "@teambit/cli": "0.0.848",
52
- "@teambit/express": "0.0.947",
53
- "@teambit/graphql": "1.0.141",
54
- "@teambit/command-bar": "1.0.141",
51
+ "@teambit/cli": "0.0.849",
52
+ "@teambit/express": "0.0.948",
53
+ "@teambit/graphql": "1.0.143",
54
+ "@teambit/command-bar": "1.0.143",
55
55
  "@teambit/component-package-version": "0.0.433",
56
- "@teambit/preview": "1.0.141",
57
- "@teambit/pubsub": "1.0.141",
58
- "@teambit/react-router": "1.0.141",
59
- "@teambit/ui": "1.0.141",
60
- "@teambit/component-issues": "0.0.140",
56
+ "@teambit/preview": "1.0.143",
57
+ "@teambit/pubsub": "1.0.143",
58
+ "@teambit/react-router": "1.0.143",
59
+ "@teambit/ui": "1.0.143",
60
+ "@teambit/component-issues": "0.0.141",
61
61
  "@teambit/cli-table": "0.0.48",
62
- "@teambit/component-descriptor": "0.0.413",
62
+ "@teambit/component-descriptor": "0.0.414",
63
63
  "@teambit/harmony.ui.aspect-box": "0.0.507",
64
- "@teambit/compositions": "1.0.141",
65
- "@teambit/deprecation": "1.0.141",
66
- "@teambit/envs": "1.0.141",
67
- "@teambit/component.ui.version-dropdown": "0.0.854",
68
- "@teambit/lanes.hooks.use-lanes": "0.0.258",
64
+ "@teambit/compositions": "1.0.143",
65
+ "@teambit/deprecation": "1.0.143",
66
+ "@teambit/envs": "1.0.143",
67
+ "@teambit/component.ui.version-dropdown": "0.0.855",
68
+ "@teambit/lanes.hooks.use-lanes": "0.0.259",
69
69
  "@teambit/lanes.ui.models.lanes-model": "0.0.212",
70
70
  "@teambit/envs.ui.env-icon": "0.0.505"
71
71
  },
@@ -76,16 +76,15 @@
76
76
  "@types/classnames": "2.2.11",
77
77
  "@types/lodash.compact": "3.0.6",
78
78
  "@types/mocha": "9.1.0",
79
- "@types/jest": "^29.2.2",
80
- "@types/testing-library__jest-dom": "^5.9.5",
79
+ "chai": "4.3.0",
81
80
  "@teambit/component.content.component-overview": "1.95.0",
82
- "@teambit/harmony.envs.core-aspect-env": "0.0.19"
81
+ "@teambit/harmony.envs.core-aspect-env": "0.0.24"
83
82
  },
84
83
  "peerDependencies": {
85
84
  "@apollo/client": "^3.6.0",
86
85
  "react": "^17.0.0 || ^18.0.0",
87
86
  "react-router-dom": "^6.8.1",
88
- "@types/react": "17.0.8",
87
+ "@types/react": "^17.0.73",
89
88
  "@teambit/legacy": "1.0.624"
90
89
  },
91
90
  "license": "Apache-2.0",
@@ -100,7 +99,8 @@
100
99
  "default": "./dist/index.js"
101
100
  },
102
101
  "./dist/*": "./dist/*",
103
- "./artifacts/*": "./artifacts/*"
102
+ "./artifacts/*": "./artifacts/*",
103
+ "./*": "./*.ts"
104
104
  },
105
105
  "private": false,
106
106
  "engines": {
package/tsconfig.json CHANGED
@@ -17,7 +17,10 @@
17
17
  "resolveJsonModule": true,
18
18
  "allowJs": true,
19
19
  "outDir": "dist",
20
- "emitDeclarationOnly": true
20
+ "emitDeclarationOnly": true,
21
+ "strict": true,
22
+ "strictPropertyInitialization": false,
23
+ "noImplicitAny": false
21
24
  },
22
25
  "exclude": [
23
26
  "artifacts",
@@ -1,5 +1,4 @@
1
1
  import { AspectBox } from '@teambit/harmony.ui.aspect-box';
2
- import { ComponentContext } from '@teambit/component';
3
2
  import React, { useContext } from 'react';
4
3
  import { useDataQuery } from '@teambit/ui-foundation.ui.hooks.use-data-query';
5
4
  import { gql } from '@apollo/client';
@@ -7,6 +6,7 @@ import { EmptyBox } from '@teambit/design.ui.empty-box';
7
6
  import { H1 } from '@teambit/documenter.ui.heading';
8
7
  import { Separator } from '@teambit/documenter.ui.separator';
9
8
  import styles from './aspect-page.module.scss';
9
+ import { ComponentContext } from '../context';
10
10
 
11
11
  const GET_COMPONENT = gql`
12
12
  query ($id: String!) {
@@ -1,9 +1,9 @@
1
1
  import React, { ComponentType } from 'react';
2
2
  import compact from 'lodash.compact';
3
- import { ComponentModel } from '@teambit/component';
4
3
  import { ellipsis } from '@teambit/design.ui.styles.ellipsis';
5
4
  import { EnvIcon } from '@teambit/envs.ui.env-icon';
6
5
  import classnames from 'classnames';
6
+ import { ComponentModel } from '../component-model';
7
7
 
8
8
  import styles from './component-result.module.scss';
9
9
 
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
-
3
- import { ComponentModel } from '@teambit/component';
4
2
  import { SearchResult, FuzzySearchItem, FuzzySearcher } from '@teambit/explorer.ui.command-bar';
5
3
  import type { SearchProvider } from '@teambit/command-bar';
6
4
  import { ComponentResult, ComponentResultPlugin } from './component-result';
5
+ import { ComponentModel } from '../component-model';
7
6
 
8
7
  export type { ComponentResultPlugin };
9
8