@teambit/component 1.0.226 → 1.0.227

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.
Files changed (85) hide show
  1. package/artifacts/__bit_junit.xml +1 -1
  2. package/artifacts/preview/teambit_component_component-preview.js +1 -1
  3. package/artifacts/schema.json +303 -1125
  4. package/dist/{preview-1712632644937.js → preview-1712719054377.js} +2 -2
  5. package/package.json +22 -22
  6. package/tsconfig.json +46 -1
  7. package/dist/aspect-entry.d.ts +0 -39
  8. package/dist/aspect-list.d.ts +0 -43
  9. package/dist/aspect.section.d.ts +0 -13
  10. package/dist/component-factory.d.ts +0 -149
  11. package/dist/component-fs.d.ts +0 -34
  12. package/dist/component-interface.d.ts +0 -22
  13. package/dist/component-map/component-map.d.ts +0 -63
  14. package/dist/component-map/index.d.ts +0 -1
  15. package/dist/component-meta.d.ts +0 -22
  16. package/dist/component.aspect.d.ts +0 -3
  17. package/dist/component.composition.d.ts +0 -1
  18. package/dist/component.d.ts +0 -182
  19. package/dist/component.graphql.d.ts +0 -83
  20. package/dist/component.main.runtime.d.ts +0 -75
  21. package/dist/component.route.d.ts +0 -18
  22. package/dist/component.ui.runtime.d.ts +0 -104
  23. package/dist/config.d.ts +0 -18
  24. package/dist/dependencies/dependencies.d.ts +0 -43
  25. package/dist/dependencies/index.d.ts +0 -1
  26. package/dist/exceptions/could-not-find-latest.d.ts +0 -4
  27. package/dist/exceptions/host-not-found.d.ts +0 -12
  28. package/dist/exceptions/index.d.ts +0 -4
  29. package/dist/exceptions/main-file-not-found.d.ts +0 -14
  30. package/dist/exceptions/nothing-to-snap.d.ts +0 -2
  31. package/dist/get-component-opts.d.ts +0 -13
  32. package/dist/hash.d.ts +0 -4
  33. package/dist/head.d.ts +0 -0
  34. package/dist/history-graph.d.ts +0 -2
  35. package/dist/host/component-host-model.d.ts +0 -7
  36. package/dist/host/index.d.ts +0 -2
  37. package/dist/host/use-component-host.d.ts +0 -6
  38. package/dist/index.d.ts +0 -37
  39. package/dist/on-load.d.ts +0 -0
  40. package/dist/section/index.d.ts +0 -1
  41. package/dist/section/section.d.ts +0 -11
  42. package/dist/show/extensions.fragment.d.ts +0 -13
  43. package/dist/show/files.fragment.d.ts +0 -14
  44. package/dist/show/id.fragment.d.ts +0 -13
  45. package/dist/show/index.d.ts +0 -8
  46. package/dist/show/main-file.fragment.d.ts +0 -9
  47. package/dist/show/name.fragment.d.ts +0 -9
  48. package/dist/show/scope.fragment.d.ts +0 -10
  49. package/dist/show/show-fragment.d.ts +0 -37
  50. package/dist/show/show.cmd.d.ts +0 -26
  51. package/dist/snap/author.d.ts +0 -17
  52. package/dist/snap/index.d.ts +0 -2
  53. package/dist/snap/snap.d.ts +0 -56
  54. package/dist/state.d.ts +0 -65
  55. package/dist/store.d.ts +0 -3
  56. package/dist/tag/index.d.ts +0 -1
  57. package/dist/tag/tag.d.ts +0 -32
  58. package/dist/tag-map.d.ts +0 -35
  59. package/dist/ui/aspect-page/aspect-page.d.ts +0 -1
  60. package/dist/ui/aspect-page/index.d.ts +0 -1
  61. package/dist/ui/component-error/component-error.d.ts +0 -20
  62. package/dist/ui/component-error/index.d.ts +0 -1
  63. package/dist/ui/component-model/component-model.d.ts +0 -186
  64. package/dist/ui/component-model/index.d.ts +0 -1
  65. package/dist/ui/component-searcher/component-result.d.ts +0 -16
  66. package/dist/ui/component-searcher/component-searcher.d.ts +0 -22
  67. package/dist/ui/component-searcher/index.d.ts +0 -2
  68. package/dist/ui/component.d.ts +0 -26
  69. package/dist/ui/context/component-context.d.ts +0 -6
  70. package/dist/ui/context/component-provider.d.ts +0 -25
  71. package/dist/ui/context/index.d.ts +0 -3
  72. package/dist/ui/index.d.ts +0 -12
  73. package/dist/ui/menu/index.d.ts +0 -3
  74. package/dist/ui/menu/menu-nav.d.ts +0 -23
  75. package/dist/ui/menu/menu.d.ts +0 -97
  76. package/dist/ui/menu/nav-plugin.d.ts +0 -28
  77. package/dist/ui/top-bar-nav/index.d.ts +0 -1
  78. package/dist/ui/top-bar-nav/top-bar-nav.d.ts +0 -2
  79. package/dist/ui/use-component-from-location.d.ts +0 -1
  80. package/dist/ui/use-component-logs.d.ts +0 -16
  81. package/dist/ui/use-component-query.d.ts +0 -3
  82. package/dist/ui/use-component.d.ts +0 -3
  83. package/dist/ui/use-component.fragments.d.ts +0 -10
  84. package/dist/ui/use-component.model.d.ts +0 -44
  85. package/dist/ui/use-component.utils.d.ts +0 -1
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.226/dist/component.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.226/dist/component.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.227/dist/component.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.227/dist/component.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/component",
3
- "version": "1.0.226",
3
+ "version": "1.0.227",
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.226"
9
+ "version": "1.0.227"
10
10
  },
11
11
  "dependencies": {
12
12
  "@teambit/any-fs": "0.0.5",
@@ -37,37 +37,37 @@
37
37
  "@teambit/documenter.ui.separator": "4.1.1",
38
38
  "@teambit/design.ui.pages.not-found": "0.0.366",
39
39
  "@teambit/design.ui.pages.server-error": "0.0.366",
40
+ "@teambit/design.ui.styles.ellipsis": "0.0.357",
41
+ "@teambit/explorer.ui.command-bar": "2.0.14",
40
42
  "@teambit/design.navigation.responsive-navbar": "0.0.7",
41
43
  "@teambit/base-ui.layout.breakpoints": "1.0.0",
42
44
  "@teambit/ui-foundation.ui.use-box.dropdown": "0.0.142",
43
- "@teambit/design.ui.styles.ellipsis": "0.0.357",
44
- "@teambit/explorer.ui.command-bar": "2.0.14",
45
- "@teambit/aspect-loader": "1.0.226",
46
- "@teambit/dependency-resolver": "1.0.226",
47
- "@teambit/graph": "1.0.226",
45
+ "@teambit/aspect-loader": "1.0.227",
46
+ "@teambit/dependency-resolver": "1.0.227",
47
+ "@teambit/graph": "1.0.227",
48
48
  "@teambit/toolbox.path.match-patterns": "0.0.15",
49
49
  "@teambit/toolbox.string.capitalize": "0.0.496",
50
- "@teambit/cli": "0.0.859",
51
- "@teambit/express": "0.0.958",
52
- "@teambit/graphql": "1.0.226",
53
- "@teambit/command-bar": "1.0.226",
50
+ "@teambit/cli": "0.0.860",
51
+ "@teambit/express": "0.0.959",
52
+ "@teambit/graphql": "1.0.227",
53
+ "@teambit/command-bar": "1.0.227",
54
54
  "@teambit/component-package-version": "0.0.433",
55
- "@teambit/preview": "1.0.226",
56
- "@teambit/pubsub": "1.0.226",
57
- "@teambit/react-router": "1.0.226",
55
+ "@teambit/preview": "1.0.227",
56
+ "@teambit/pubsub": "1.0.227",
57
+ "@teambit/react-router": "1.0.227",
58
58
  "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.508",
59
- "@teambit/ui": "1.0.226",
59
+ "@teambit/ui": "1.0.227",
60
60
  "@teambit/component-issues": "0.0.143",
61
61
  "@teambit/cli-table": "0.0.48",
62
- "@teambit/component-descriptor": "0.0.417",
62
+ "@teambit/component-descriptor": "0.0.418",
63
63
  "@teambit/harmony.ui.aspect-box": "0.0.507",
64
- "@teambit/compositions": "1.0.226",
65
- "@teambit/deprecation": "1.0.226",
66
- "@teambit/envs": "1.0.226",
64
+ "@teambit/compositions": "1.0.227",
65
+ "@teambit/deprecation": "1.0.227",
66
+ "@teambit/envs": "1.0.227",
67
+ "@teambit/envs.ui.env-icon": "0.0.505",
67
68
  "@teambit/component.ui.version-dropdown": "0.0.859",
68
69
  "@teambit/lanes.hooks.use-lanes": "0.0.264",
69
- "@teambit/lanes.ui.models.lanes-model": "0.0.216",
70
- "@teambit/envs.ui.env-icon": "0.0.505"
70
+ "@teambit/lanes.ui.models.lanes-model": "0.0.216"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@types/lodash": "4.14.165",
@@ -78,7 +78,7 @@
78
78
  "@types/mocha": "9.1.0",
79
79
  "chai": "4.3.0",
80
80
  "@teambit/component.content.component-overview": "1.95.0",
81
- "@teambit/harmony.envs.core-aspect-env": "0.0.27"
81
+ "@teambit/harmony.envs.core-aspect-env": "0.0.30"
82
82
  },
83
83
  "peerDependencies": {
84
84
  "@apollo/client": "^3.6.0",
package/tsconfig.json CHANGED
@@ -20,7 +20,8 @@
20
20
  "emitDeclarationOnly": true,
21
21
  "strict": true,
22
22
  "strictPropertyInitialization": false,
23
- "noImplicitAny": false
23
+ "noImplicitAny": false,
24
+ "composite": true
24
25
  },
25
26
  "exclude": [
26
27
  "artifacts",
@@ -35,5 +36,49 @@
35
36
  "include": [
36
37
  "**/*",
37
38
  "**/*.json"
39
+ ],
40
+ "references": [
41
+ {
42
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_aspect-loader@1.0.227"
43
+ },
44
+ {
45
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_graph@1.0.227"
46
+ },
47
+ {
48
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.860"
49
+ },
50
+ {
51
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_express@0.0.959"
52
+ },
53
+ {
54
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_graphql@1.0.227"
55
+ },
56
+ {
57
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.explorer_command-bar@1.0.227"
58
+ },
59
+ {
60
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.preview_preview@1.0.227"
61
+ },
62
+ {
63
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_pubsub@1.0.227"
64
+ },
65
+ {
66
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_react-router@1.0.227"
67
+ },
68
+ {
69
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_ui@1.0.227"
70
+ },
71
+ {
72
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-descriptor@0.0.418"
73
+ },
74
+ {
75
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compositions_compositions@1.0.227"
76
+ },
77
+ {
78
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@1.0.227"
79
+ },
80
+ {
81
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@1.0.227"
82
+ }
38
83
  ]
39
84
  }
@@ -1,39 +0,0 @@
1
- /**
2
- * avoid importing any (non-type) legacy code here. otherwise, PreviewTask will throw cryptic errors
3
- */
4
- import type { ExtensionDataEntry } from '@teambit/legacy/dist/consumer/config/extension-data';
5
- import { ComponentID } from '@teambit/component-id';
6
- import { RawComponentMetadata } from './component-interface';
7
- export type Serializable = {
8
- toString(): string;
9
- };
10
- export type SerializableMap = {
11
- [key: string]: Serializable;
12
- };
13
- export type AspectData = {
14
- [key: string]: any;
15
- };
16
- export type ResolveComponentIdFunc = (id: string) => Promise<ComponentID>;
17
- export declare class AspectEntry {
18
- id: ComponentID;
19
- private legacyEntry;
20
- constructor(id: ComponentID, legacyEntry: ExtensionDataEntry);
21
- get legacy(): ExtensionDataEntry;
22
- get isLegacy(): boolean;
23
- get config(): {
24
- [key: string]: any;
25
- };
26
- set config(config: {
27
- [key: string]: any;
28
- });
29
- get data(): {
30
- [key: string]: any;
31
- };
32
- get isRemoved(): boolean;
33
- set data(val: {
34
- [key: string]: any;
35
- });
36
- transform(newData: SerializableMap): AspectEntry;
37
- clone(): AspectEntry;
38
- serialize(): RawComponentMetadata;
39
- }
@@ -1,43 +0,0 @@
1
- import { ExtensionDataList } from '@teambit/legacy/dist/consumer/config/extension-data';
2
- import { ComponentID } from '@teambit/component-id';
3
- import { AspectEntry, SerializableMap } from './aspect-entry';
4
- /**
5
- * list of aspects, each may have data and artifacts saved per component.
6
- */
7
- export declare class AspectList {
8
- readonly entries: AspectEntry[];
9
- constructor(entries: AspectEntry[]);
10
- addEntry(aspectId: ComponentID, data?: SerializableMap): AspectEntry;
11
- upsertEntry(aspectId: ComponentID, data?: SerializableMap): AspectEntry;
12
- /**
13
- * transform an aspect list into a new one without the given aspect ids
14
- */
15
- withoutEntries(aspectIds: string[]): AspectList;
16
- /**
17
- * get all ids as strings from the aspect list.
18
- */
19
- get ids(): string[];
20
- /**
21
- * get an aspect from the list using a serialized ID.
22
- */
23
- get(id: string): AspectEntry | undefined;
24
- /**
25
- * find aspect by component ID.
26
- */
27
- find(id: ComponentID, ignoreVersion?: boolean): AspectEntry | undefined;
28
- /**
29
- * transform an aspect list into a new one.
30
- */
31
- map(predicate: (entry: AspectEntry) => AspectEntry): AspectList;
32
- /**
33
- * transform an aspect list into a new one.
34
- */
35
- pmap(predicate: (entry: AspectEntry) => Promise<AspectEntry>): Promise<AspectList>;
36
- toConfigObject(): {};
37
- serialize(): import("./component-interface").RawComponentMetadata[];
38
- filter(ids?: string[]): AspectList;
39
- toLegacy(): ExtensionDataList;
40
- stringIds(): string[];
41
- clone(): AspectList;
42
- static fromLegacyExtensions(legacyDataList: ExtensionDataList): AspectList;
43
- }
@@ -1,13 +0,0 @@
1
- import { Section } from './section';
2
- export declare class AspectSection implements Section {
3
- route: {
4
- path: string;
5
- element: import("react/jsx-runtime").JSX.Element;
6
- };
7
- navigationLink: {
8
- href: string;
9
- children: import("react/jsx-runtime").JSX.Element;
10
- displayName: string;
11
- };
12
- order: number;
13
- }
@@ -1,149 +0,0 @@
1
- import { Graph } from '@teambit/graph.cleargraph';
2
- import { BitId } from '@teambit/legacy-bit-id';
3
- import { ComponentID } from '@teambit/component-id';
4
- import ConsumerComponent from '@teambit/legacy/dist/consumer/component';
5
- import { CompIdGraph } from '@teambit/graph';
6
- import type { ComponentLog } from '@teambit/legacy/dist/scope/models/model-component';
7
- import type { AspectDefinition } from '@teambit/aspect-loader';
8
- import type { DependencyList } from '@teambit/dependency-resolver';
9
- import { Component, InvalidComponent } from './component';
10
- import { State } from './state';
11
- import { Snap } from './snap';
12
- export type ResolveAspectsOptions = FilterAspectsOptions & {
13
- throwOnError?: boolean;
14
- useScopeAspectsCapsule?: boolean;
15
- workspaceName?: string;
16
- skipDeps?: boolean;
17
- resolveEnvsFromRoots?: boolean;
18
- packageManagerConfigRootDir?: string;
19
- };
20
- export type LoadAspectsOptions = {
21
- throwOnError?: boolean;
22
- hideMissingModuleError?: boolean;
23
- ignoreErrors?: boolean;
24
- [key: string]: any;
25
- };
26
- export type FilterAspectsOptions = {
27
- /**
28
- * Do not return results for the core aspects
29
- */
30
- excludeCore?: boolean;
31
- /**
32
- * Only return results for the provided list of ids
33
- */
34
- requestedOnly?: boolean;
35
- /**
36
- * Only return results for aspects that have a path to the specified runtime name
37
- */
38
- filterByRuntime?: boolean;
39
- };
40
- export interface ComponentFactory {
41
- /**
42
- * name of the component host.
43
- */
44
- name: string;
45
- /**
46
- * path to the component host.
47
- */
48
- path: string;
49
- isLegacy: boolean;
50
- /**
51
- * resolve a `string` component ID to an instance of a ComponentID.
52
- */
53
- resolveComponentId(id: string | BitId | ComponentID): Promise<ComponentID>;
54
- /**
55
- * resolve multiple `string` component ID to an instance of a ComponentID.
56
- */
57
- resolveMultipleComponentIds(ids: (string | BitId | ComponentID)[]): Promise<ComponentID[]>;
58
- /**
59
- * returns a component by ID.
60
- */
61
- get(id: ComponentID): Promise<Component | undefined>;
62
- /**
63
- * returns the legacy representation of a component with minimal loading.
64
- * when loaded from the workspace, it won't run any Harmony hooks and even won't load dependencies.
65
- * it's good to get raw aspects data or some basic properties.
66
- * use carefully. prefer using `get()` instead.
67
- */
68
- getLegacyMinimal(id: ComponentID): Promise<ConsumerComponent | undefined>;
69
- /**
70
- * returns many components by ids.
71
- */
72
- getMany(ids: ComponentID[]): Promise<Component[]>;
73
- /**
74
- * returns many components by their legacy representation.
75
- */
76
- getManyByLegacy(components: ConsumerComponent[]): Promise<Component[]>;
77
- /**
78
- * get a component from a remote without importing it
79
- */
80
- getRemoteComponent?: (id: ComponentID) => Promise<Component>;
81
- /**
82
- * important - prefer using `getGraphIds()` if you don't need the component objects.
83
- * this method has a performance penalty. it must import all flattened-dependencies objects from the remotes.
84
- */
85
- getGraph(ids?: ComponentID[], shouldThrowOnMissingDep?: boolean): Promise<Graph<Component, string>>;
86
- /**
87
- * get graph of the given component-ids and all their dependencies (recursively/flattened).
88
- * the nodes are ComponentIds and is much faster than `this.getGraph()`.
89
- */
90
- getGraphIds(ids?: ComponentID[], shouldThrowOnMissingDep?: boolean): Promise<CompIdGraph>;
91
- getLogs(id: ComponentID, shortHash?: boolean, startsFrom?: string): Promise<ComponentLog[]>;
92
- getDependencies(component: Component): DependencyList;
93
- /**
94
- * returns a specific state of a component by hash or semver.
95
- */
96
- getState(id: ComponentID, snapId: string): Promise<State>;
97
- /**
98
- * returns a specific snap of a component by hash.
99
- */
100
- getSnap(id: ComponentID, snapId: string): Promise<Snap>;
101
- /**
102
- * load aspects.
103
- * returns the loaded aspect ids including the loaded versions.
104
- */
105
- loadAspects: (ids: string[], throwOnError?: boolean, neededFor?: string, opts?: any) => Promise<string[]>;
106
- /**
107
- * Resolve dirs for aspects
108
- */
109
- resolveAspects: (runtimeName?: string, componentIds?: ComponentID[], opts?: ResolveAspectsOptions) => Promise<AspectDefinition[]>;
110
- /**
111
- * list all components in the host.
112
- */
113
- list(filter?: {
114
- offset: number;
115
- limit: number;
116
- }): Promise<Component[]>;
117
- /**
118
- * list invalid components, such as components with missing files on the fs.
119
- */
120
- listInvalid(): Promise<InvalidComponent[]>;
121
- listIds(): Promise<ComponentID[]> | ComponentID[];
122
- /**
123
- * get component-ids matching the given pattern. a pattern can have multiple patterns separated by a comma.
124
- * it uses multimatch (https://www.npmjs.com/package/multimatch) package for the matching algorithm, which supports
125
- * (among others) negate character "!" to exclude ids. See the package page for more supported characters.
126
- */
127
- idsByPattern(pattern: string, throwForNoMatch?: boolean): Promise<ComponentID[]>;
128
- hasId(componentId: ComponentID): Promise<boolean>;
129
- /**
130
- * Check if the host has the id, if no, search for the id in inner host (for example, workspace will search in the scope)
131
- * @param componentId
132
- */
133
- hasIdNested(componentId: ComponentID, includeCache?: boolean): Promise<boolean>;
134
- /**
135
- * whether a component is not the same as its head.
136
- * for a new component, it'll return "true" as it has no head yet.
137
- * this is relevant for component from the workspace, where it can be locally changed. on the scope it's always false
138
- */
139
- isModified(component: Component): Promise<boolean>;
140
- /**
141
- * write the component to the filesystem when applicable (no-op for scope).
142
- * to change the component-path, specify the "rootPath", which should be a relative path inside the workspace.
143
- */
144
- write(component: Component, rootPath?: string): Promise<void>;
145
- /**
146
- * determine whether host should be the prior one in case multiple hosts persist.
147
- */
148
- priority?: boolean;
149
- }
@@ -1,34 +0,0 @@
1
- /// <reference types="node" />
2
- import { MemoryFS } from '@teambit/any-fs';
3
- import type { AbstractVinyl } from '@teambit/legacy/dist/consumer/component/sources';
4
- /**
5
- * The virtual component filesystem
6
- */
7
- export default class ComponentFS extends MemoryFS {
8
- /**
9
- * array of all fs files.
10
- */
11
- readonly files: AbstractVinyl[];
12
- constructor(
13
- /**
14
- * array of all fs files.
15
- */
16
- files: AbstractVinyl[]);
17
- /**
18
- * hash to represent all contents within this filesystem volume.
19
- */
20
- get hash(): string;
21
- /**
22
- * filter all component files by regex.
23
- */
24
- byRegex(extension: RegExp): AbstractVinyl[];
25
- /**
26
- * filter all files using an array of glob patterns.
27
- */
28
- byGlob(patterns: string[]): AbstractVinyl[];
29
- toObject(): {
30
- path: string;
31
- contents: Buffer;
32
- }[];
33
- static fromVinyls(files: AbstractVinyl[]): ComponentFS;
34
- }
@@ -1,22 +0,0 @@
1
- import { ComponentID } from '@teambit/component-id';
2
- export interface IComponent {
3
- /**
4
- * id of the component.
5
- */
6
- id: ComponentID;
7
- /**
8
- * get function to retrieve aspect
9
- */
10
- get(aspectId: string): RawComponentMetadata | undefined;
11
- /**
12
- * determines whether a component is a modified state.
13
- * TODO: consider to remove after handling component descriptors correctly.
14
- */
15
- isModified(): Promise<boolean>;
16
- }
17
- export type RawComponentMetadata = {
18
- id: string;
19
- config: Record<string, any>;
20
- data: Record<string, any>;
21
- icon?: string;
22
- };
@@ -1,63 +0,0 @@
1
- import { ComponentID } from '@teambit/component-id';
2
- import { Component } from '../component';
3
- /**
4
- * allows to index components -> values.
5
- */
6
- export declare class ComponentMap<T> {
7
- readonly hashMap: Map<string, [Component, T]>;
8
- constructor(hashMap: Map<string, [Component, T]>);
9
- /**
10
- * @deprecated please use `get` instead
11
- */
12
- byComponent(component: Component): [Component, T] | undefined;
13
- get components(): Component[];
14
- /**
15
- * get a value for a component.
16
- */
17
- get(component: Component): [Component, T] | undefined;
18
- /**
19
- * get a value by the component-id
20
- */
21
- getValueByComponentId(componentId: ComponentID): T | null;
22
- /**
23
- * returns an array.
24
- */
25
- toArray(): [Component, T][];
26
- /**
27
- * map entries and return a new component map.
28
- */
29
- map<NewType>(predicate: (value: T, component: Component) => NewType): ComponentMap<NewType>;
30
- /**
31
- * map entries and return a new component map.
32
- */
33
- asyncMap<NewType>(predicate: (value: T, component: Component) => Promise<NewType>): Promise<ComponentMap<NewType>>;
34
- /**
35
- * similar to Array.forEach, but here you get both, the value and the component.
36
- */
37
- forEach(predicate: (value: T, component: Component) => void): void;
38
- /**
39
- * flatten values of all components into a single array.
40
- */
41
- flattenValue(): T[];
42
- /**
43
- * filter all components with empty values and return a new map.
44
- */
45
- filter(predicate: (value: T) => boolean): ComponentMap<T>;
46
- /**
47
- * get all component ids.
48
- */
49
- keys(): IterableIterator<string>;
50
- static create<U>(rawMap: [Component, U][]): ComponentMap<U>;
51
- /**
52
- * create a component map from components and a value predicate.
53
- * @param components components to zip into the map.
54
- * @param predicate predicate for returning desired value.
55
- */
56
- static as<U>(components: Component[], predicate: (component: Component) => U): ComponentMap<U>;
57
- /**
58
- * create a component map from components and a value predicate.
59
- * @param components components to zip into the map.
60
- * @param predicate predicate for returning desired value.
61
- */
62
- static asAsync<U>(components: Component[], predicate: (component: Component) => Promise<U>): Promise<ComponentMap<U>>;
63
- }
@@ -1 +0,0 @@
1
- export { ComponentMap } from './component-map';
@@ -1,22 +0,0 @@
1
- import { ComponentID, ComponentIdObj } from '@teambit/component-id';
2
- export declare class ComponentMeta {
3
- /**
4
- * id the component.
5
- */
6
- readonly id: ComponentID;
7
- constructor(
8
- /**
9
- * id the component.
10
- */
11
- id: ComponentID);
12
- /**
13
- * display name of the component.
14
- */
15
- get displayName(): string;
16
- toObject(): {
17
- id: ComponentIdObj;
18
- };
19
- static from(object: {
20
- [key: string]: any;
21
- }): ComponentMeta;
22
- }
@@ -1,3 +0,0 @@
1
- import { Aspect } from '@teambit/harmony';
2
- export declare const ComponentAspect: Aspect;
3
- export default ComponentAspect;
@@ -1 +0,0 @@
1
- export declare const Logo: () => import("react/jsx-runtime").JSX.Element;