@teambit/component 0.0.886 → 0.0.888

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,5 +1,5 @@
1
+ import { Graph } from '@teambit/graph.cleargraph';
1
2
  import { BitId } from '@teambit/legacy-bit-id';
2
- import LegacyGraph from '@teambit/legacy/dist/scope/graph/graph';
3
3
  import ConsumerComponent from '@teambit/legacy/dist/consumer/component';
4
4
  import type { ComponentLog } from '@teambit/legacy/dist/scope/models/model-component';
5
5
  import type { AspectDefinition } from '@teambit/aspect-loader';
@@ -51,7 +51,7 @@ export interface ComponentFactory {
51
51
  * get a component from a remote without importing it
52
52
  */
53
53
  getRemoteComponent?: (id: ComponentID) => Promise<Component>;
54
- getLegacyGraph(ids?: ComponentID[], shouldThrowOnMissingDep?: boolean): Promise<LegacyGraph>;
54
+ getGraph(ids?: ComponentID[], shouldThrowOnMissingDep?: boolean): Promise<Graph<Component, string>>;
55
55
  getLogs(id: ComponentID, shortHash?: boolean, startsFrom?: string): Promise<ComponentLog[]>;
56
56
  /**
57
57
  * returns a specific state of a component by hash or semver.
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["component-factory.ts"],"sourcesContent":["import { BitId } from '@teambit/legacy-bit-id';\nimport LegacyGraph from '@teambit/legacy/dist/scope/graph/graph';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport type { ComponentLog } from '@teambit/legacy/dist/scope/models/model-component';\nimport type { AspectDefinition } from '@teambit/aspect-loader';\nimport { ComponentID } from '@teambit/component-id';\nimport { Component, InvalidComponent } from './component';\nimport { State } from './state';\nimport { Snap } from './snap';\n\nexport type ResolveAspectsOptions = {\n /**\n * Do not return results for the core aspects\n */\n excludeCore?: boolean;\n /**\n * Only return results for the provided list of ids\n */\n requestedOnly?: boolean;\n};\n\nexport interface ComponentFactory {\n /**\n * name of the component host.\n */\n name: string;\n\n /**\n * path to the component host.\n */\n path: string;\n\n isLegacy: boolean;\n\n /**\n * resolve a `string` component ID to an instance of a ComponentID.\n */\n resolveComponentId(id: string | ComponentID | BitId): Promise<ComponentID>;\n\n /**\n * resolve multiple `string` component ID to an instance of a ComponentID.\n */\n resolveMultipleComponentIds(ids: (string | ComponentID | BitId)[]): Promise<ComponentID[]>;\n\n /**\n * returns a component by ID.\n */\n get(id: ComponentID): Promise<Component | undefined>;\n\n /**\n * returns many components by ids.\n */\n getMany(ids: ComponentID[]): Promise<Component[]>;\n\n /**\n * returns many components by their legacy representation.\n */\n getManyByLegacy(components: ConsumerComponent[]): Promise<Component[]>;\n\n /**\n * get a component from a remote without importing it\n */\n getRemoteComponent?: (id: ComponentID) => Promise<Component>;\n\n getLegacyGraph(ids?: ComponentID[], shouldThrowOnMissingDep?: boolean): Promise<LegacyGraph>;\n\n getLogs(id: ComponentID, shortHash?: boolean, startsFrom?: string): Promise<ComponentLog[]>;\n\n /**\n * returns a specific state of a component by hash or semver.\n */\n getState(id: ComponentID, snapId: string): Promise<State>;\n\n /**\n * returns a specific snap of a component by hash.\n */\n getSnap(id: ComponentID, snapId: string): Promise<Snap>;\n\n /**\n * load aspects.\n * returns the loaded aspect ids including the loaded versions.\n */\n loadAspects: (ids: string[], throwOnError?: boolean, neededFor?: string) => Promise<string[]>;\n\n /**\n * Resolve dirs for aspects\n */\n resolveAspects: (\n runtimeName?: string,\n componentIds?: ComponentID[],\n opts?: ResolveAspectsOptions\n ) => Promise<AspectDefinition[]>;\n\n /**\n * list all components in the host.\n */\n list(filter?: { offset: number; limit: number }): Promise<Component[]>;\n\n /**\n * list invalid components, such as components with missing files on the fs.\n */\n listInvalid(): Promise<InvalidComponent[]>;\n\n listIds(): Promise<ComponentID[]>;\n\n /**\n * get component-ids matching the given pattern. a pattern can have multiple patterns separated by a comma.\n * it uses multimatch (https://www.npmjs.com/package/multimatch) package for the matching algorithm, which supports\n * (among others) negate character \"!\" to exclude ids. See the package page for more supported characters.\n */\n idsByPattern(pattern: string, throwForNoMatch?: boolean): Promise<ComponentID[]>;\n\n hasId(componentId: ComponentID): Promise<boolean>;\n\n /**\n * Check if the host has the id, if no, search for the id in inner host (for example, workspace will search in the scope)\n * @param componentId\n */\n hasIdNested(componentId: ComponentID, includeCache?: boolean): Promise<boolean>;\n\n /**\n * whether a component is not the same as its head.\n * for a new component, it'll return \"true\" as it has no head yet.\n * this is relevant for component from the workspace, where it can be locally changed. on the scope it's always false\n */\n isModified(component: Component): Promise<boolean>;\n\n /**\n * write the component to the filesystem when applicable (no-op for scope).\n * to change the component-path, specify the \"rootPath\", which should be a relative path inside the workspace.\n */\n write(component: Component, rootPath?: string): Promise<void>;\n\n /**\n * determine whether host should be the prior one in case multiple hosts persist.\n */\n priority?: boolean;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["component-factory.ts"],"sourcesContent":["import { Graph } from '@teambit/graph.cleargraph';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport type { ComponentLog } from '@teambit/legacy/dist/scope/models/model-component';\nimport type { AspectDefinition } from '@teambit/aspect-loader';\nimport { ComponentID } from '@teambit/component-id';\nimport { Component, InvalidComponent } from './component';\nimport { State } from './state';\nimport { Snap } from './snap';\n\nexport type ResolveAspectsOptions = {\n /**\n * Do not return results for the core aspects\n */\n excludeCore?: boolean;\n /**\n * Only return results for the provided list of ids\n */\n requestedOnly?: boolean;\n};\n\nexport interface ComponentFactory {\n /**\n * name of the component host.\n */\n name: string;\n\n /**\n * path to the component host.\n */\n path: string;\n\n isLegacy: boolean;\n\n /**\n * resolve a `string` component ID to an instance of a ComponentID.\n */\n resolveComponentId(id: string | ComponentID | BitId): Promise<ComponentID>;\n\n /**\n * resolve multiple `string` component ID to an instance of a ComponentID.\n */\n resolveMultipleComponentIds(ids: (string | ComponentID | BitId)[]): Promise<ComponentID[]>;\n\n /**\n * returns a component by ID.\n */\n get(id: ComponentID): Promise<Component | undefined>;\n\n /**\n * returns many components by ids.\n */\n getMany(ids: ComponentID[]): Promise<Component[]>;\n\n /**\n * returns many components by their legacy representation.\n */\n getManyByLegacy(components: ConsumerComponent[]): Promise<Component[]>;\n\n /**\n * get a component from a remote without importing it\n */\n getRemoteComponent?: (id: ComponentID) => Promise<Component>;\n\n getGraph(ids?: ComponentID[], shouldThrowOnMissingDep?: boolean): Promise<Graph<Component, string>>;\n\n getLogs(id: ComponentID, shortHash?: boolean, startsFrom?: string): Promise<ComponentLog[]>;\n\n /**\n * returns a specific state of a component by hash or semver.\n */\n getState(id: ComponentID, snapId: string): Promise<State>;\n\n /**\n * returns a specific snap of a component by hash.\n */\n getSnap(id: ComponentID, snapId: string): Promise<Snap>;\n\n /**\n * load aspects.\n * returns the loaded aspect ids including the loaded versions.\n */\n loadAspects: (ids: string[], throwOnError?: boolean, neededFor?: string) => Promise<string[]>;\n\n /**\n * Resolve dirs for aspects\n */\n resolveAspects: (\n runtimeName?: string,\n componentIds?: ComponentID[],\n opts?: ResolveAspectsOptions\n ) => Promise<AspectDefinition[]>;\n\n /**\n * list all components in the host.\n */\n list(filter?: { offset: number; limit: number }): Promise<Component[]>;\n\n /**\n * list invalid components, such as components with missing files on the fs.\n */\n listInvalid(): Promise<InvalidComponent[]>;\n\n listIds(): Promise<ComponentID[]>;\n\n /**\n * get component-ids matching the given pattern. a pattern can have multiple patterns separated by a comma.\n * it uses multimatch (https://www.npmjs.com/package/multimatch) package for the matching algorithm, which supports\n * (among others) negate character \"!\" to exclude ids. See the package page for more supported characters.\n */\n idsByPattern(pattern: string, throwForNoMatch?: boolean): Promise<ComponentID[]>;\n\n hasId(componentId: ComponentID): Promise<boolean>;\n\n /**\n * Check if the host has the id, if no, search for the id in inner host (for example, workspace will search in the scope)\n * @param componentId\n */\n hasIdNested(componentId: ComponentID, includeCache?: boolean): Promise<boolean>;\n\n /**\n * whether a component is not the same as its head.\n * for a new component, it'll return \"true\" as it has no head yet.\n * this is relevant for component from the workspace, where it can be locally changed. on the scope it's always false\n */\n isModified(component: Component): Promise<boolean>;\n\n /**\n * write the component to the filesystem when applicable (no-op for scope).\n * to change the component-path, specify the \"rootPath\", which should be a relative path inside the workspace.\n */\n write(component: Component, rootPath?: string): Promise<void>;\n\n /**\n * determine whether host should be the prior one in case multiple hosts persist.\n */\n priority?: boolean;\n}\n"],"mappings":""}
@@ -20,13 +20,13 @@ export declare function componentSchema(componentExtension: ComponentMain): {
20
20
  include?: string[] | undefined;
21
21
  }) => import("./component-interface").RawComponentMetadata[];
22
22
  logs: (component: Component, filter?: {
23
- type?: string | undefined;
24
- offset?: number | undefined;
25
- limit?: number | undefined;
26
- head?: string | undefined;
27
- sort?: string | undefined;
23
+ type?: string;
24
+ offset?: number;
25
+ limit?: number;
26
+ head?: string;
27
+ sort?: string;
28
28
  takeHeadFromComponent: boolean;
29
- } | undefined) => Promise<{
29
+ }) => Promise<{
30
30
  id: string;
31
31
  message: string;
32
32
  username?: string | undefined;
@@ -48,7 +48,7 @@ export declare function componentSchema(componentExtension: ComponentMain): {
48
48
  list: (host: ComponentFactory, filter?: {
49
49
  offset: number;
50
50
  limit: number;
51
- } | undefined) => Promise<Component[]>;
51
+ }) => Promise<Component[]>;
52
52
  listInvalid: (host: ComponentFactory) => Promise<{
53
53
  id: import("@teambit/component-id").ComponentID;
54
54
  errorName: string;
@@ -62,7 +62,7 @@ export declare class ComponentUI {
62
62
  private menuItems;
63
63
  private bitMethod;
64
64
  registerPubSub(): void;
65
- handleComponentChange: (activeComponent?: ComponentModel | undefined) => void;
65
+ handleComponentChange: (activeComponent?: ComponentModel) => void;
66
66
  getComponentUI(host: string, options?: GetComponentsOptions): JSX.Element;
67
67
  getMenu(host: string, options?: GetComponentsOptions): JSX.Element;
68
68
  registerRoute(routes: RouteProps[] | RouteProps): this;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/component",
3
- "version": "0.0.886",
3
+ "version": "0.0.888",
4
4
  "homepage": "https://bit.dev/teambit/component/component",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "component",
9
- "version": "0.0.886"
9
+ "version": "0.0.888"
10
10
  },
11
11
  "dependencies": {
12
12
  "@teambit/any-fs": "0.0.5",
@@ -19,8 +19,9 @@
19
19
  "lodash.flatten": "4.4.0",
20
20
  "classnames": "2.2.6",
21
21
  "lodash.compact": "3.0.1",
22
- "@babel/runtime": "7.12.18",
22
+ "@babel/runtime": "7.20.0",
23
23
  "core-js": "^3.0.0",
24
+ "@teambit/graph.cleargraph": "0.0.1",
24
25
  "@teambit/harmony": "0.3.3",
25
26
  "@teambit/base-react.navigation.link": "2.0.27",
26
27
  "@teambit/documenter.ui.heading": "4.1.1",
@@ -29,47 +30,47 @@
29
30
  "@teambit/base-ui.layout.breakpoints": "1.0.0",
30
31
  "@teambit/design.elements.icon": "1.0.5",
31
32
  "@teambit/design.inputs.dropdown": "0.0.7",
32
- "@teambit/component-id": "0.0.418",
33
- "@teambit/ui-foundation.ui.menu-widget-icon": "0.0.494",
34
- "@teambit/aspect-loader": "0.0.886",
35
- "@teambit/legacy-bit-id": "0.0.414",
36
- "@teambit/toolbox.path.match-patterns": "0.0.8",
37
- "@teambit/toolbox.string.capitalize": "0.0.489",
38
- "@teambit/cli": "0.0.594",
39
- "@teambit/express": "0.0.692",
40
- "@teambit/graphql": "0.0.886",
41
- "@teambit/bit-error": "0.0.400",
42
- "@teambit/command-bar": "0.0.886",
43
- "@teambit/component.ui.deprecation-icon": "0.0.500",
44
- "@teambit/preview": "0.0.886",
45
- "@teambit/pubsub": "0.0.886",
46
- "@teambit/react-router": "0.0.886",
47
- "@teambit/ui-foundation.ui.is-browser": "0.0.492",
48
- "@teambit/ui-foundation.ui.main-dropdown": "0.0.493",
49
- "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.496",
50
- "@teambit/ui-foundation.ui.use-box.menu": "0.0.122",
51
- "@teambit/ui": "0.0.886",
52
- "@teambit/component-issues": "0.0.73",
53
- "@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.496",
54
- "@teambit/cli-table": "0.0.40",
55
- "@teambit/component-descriptor": "0.0.162",
56
- "@teambit/ui-foundation.ui.react-router.use-query": "0.0.493",
57
- "@teambit/design.ui.empty-box": "0.0.360",
58
- "@teambit/harmony.ui.aspect-box": "0.0.494",
59
- "@teambit/design.ui.pages.not-found": "0.0.363",
60
- "@teambit/design.ui.pages.server-error": "0.0.363",
61
- "@teambit/compositions": "0.0.886",
62
- "@teambit/deprecation": "0.0.886",
63
- "@teambit/envs": "0.0.886",
64
- "@teambit/legacy-component-log": "0.0.398",
65
- "@teambit/design.ui.styles.ellipsis": "0.0.353",
66
- "@teambit/envs.ui.env-icon": "0.0.492",
67
- "@teambit/component.ui.version-dropdown": "0.0.656",
68
- "@teambit/lanes.hooks.use-lanes": "0.0.54",
69
- "@teambit/lanes.ui.models.lanes-model": "0.0.16",
70
- "@teambit/ui-foundation.ui.full-loader": "0.0.492",
71
- "@teambit/ui-foundation.ui.use-box.dropdown": "0.0.122",
72
- "@teambit/ui-foundation.ui.constants.z-indexes": "0.0.494"
33
+ "@teambit/component-id": "0.0.420",
34
+ "@teambit/ui-foundation.ui.menu-widget-icon": "0.0.495",
35
+ "@teambit/aspect-loader": "0.0.888",
36
+ "@teambit/legacy-bit-id": "0.0.416",
37
+ "@teambit/toolbox.path.match-patterns": "0.0.9",
38
+ "@teambit/toolbox.string.capitalize": "0.0.490",
39
+ "@teambit/cli": "0.0.595",
40
+ "@teambit/express": "0.0.693",
41
+ "@teambit/graphql": "0.0.888",
42
+ "@teambit/bit-error": "0.0.401",
43
+ "@teambit/command-bar": "0.0.888",
44
+ "@teambit/component.ui.deprecation-icon": "0.0.501",
45
+ "@teambit/preview": "0.0.888",
46
+ "@teambit/pubsub": "0.0.888",
47
+ "@teambit/react-router": "0.0.888",
48
+ "@teambit/ui-foundation.ui.is-browser": "0.0.493",
49
+ "@teambit/ui-foundation.ui.main-dropdown": "0.0.494",
50
+ "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.497",
51
+ "@teambit/ui-foundation.ui.use-box.menu": "0.0.123",
52
+ "@teambit/ui": "0.0.888",
53
+ "@teambit/component-issues": "0.0.75",
54
+ "@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.497",
55
+ "@teambit/cli-table": "0.0.41",
56
+ "@teambit/component-descriptor": "0.0.164",
57
+ "@teambit/ui-foundation.ui.react-router.use-query": "0.0.494",
58
+ "@teambit/design.ui.pages.not-found": "0.0.364",
59
+ "@teambit/design.ui.pages.server-error": "0.0.364",
60
+ "@teambit/compositions": "0.0.888",
61
+ "@teambit/deprecation": "0.0.888",
62
+ "@teambit/envs": "0.0.888",
63
+ "@teambit/legacy-component-log": "0.0.399",
64
+ "@teambit/design.ui.empty-box": "0.0.361",
65
+ "@teambit/harmony.ui.aspect-box": "0.0.495",
66
+ "@teambit/design.ui.styles.ellipsis": "0.0.354",
67
+ "@teambit/envs.ui.env-icon": "0.0.493",
68
+ "@teambit/component.ui.version-dropdown": "0.0.658",
69
+ "@teambit/lanes.hooks.use-lanes": "0.0.56",
70
+ "@teambit/lanes.ui.models.lanes-model": "0.0.18",
71
+ "@teambit/ui-foundation.ui.full-loader": "0.0.493",
72
+ "@teambit/ui-foundation.ui.use-box.dropdown": "0.0.123",
73
+ "@teambit/ui-foundation.ui.constants.z-indexes": "0.0.495"
73
74
  },
74
75
  "devDependencies": {
75
76
  "@types/react": "^17.0.8",
@@ -88,7 +89,7 @@
88
89
  "peerDependencies": {
89
90
  "react-router-dom": "^6.0.0",
90
91
  "@apollo/client": "^3.6.0",
91
- "@teambit/legacy": "1.0.377",
92
+ "@teambit/legacy": "1.0.379",
92
93
  "react-dom": "^16.8.0 || ^17.0.0",
93
94
  "react": "^16.8.0 || ^17.0.0"
94
95
  },
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.886/dist/component.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.886/dist/component.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.888/dist/component.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.888/dist/component.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];