@teambit/component 1.0.228 → 1.0.230

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 +1127 -305
  4. package/dist/aspect-entry.d.ts +39 -0
  5. package/dist/aspect-list.d.ts +43 -0
  6. package/dist/aspect.section.d.ts +13 -0
  7. package/dist/component-factory.d.ts +150 -0
  8. package/dist/component-fs.d.ts +34 -0
  9. package/dist/component-interface.d.ts +22 -0
  10. package/dist/component-map/component-map.d.ts +63 -0
  11. package/dist/component-map/index.d.ts +1 -0
  12. package/dist/component-meta.d.ts +22 -0
  13. package/dist/component.aspect.d.ts +3 -0
  14. package/dist/component.composition.d.ts +1 -0
  15. package/dist/component.d.ts +183 -0
  16. package/dist/component.graphql.d.ts +83 -0
  17. package/dist/component.main.runtime.d.ts +75 -0
  18. package/dist/component.route.d.ts +18 -0
  19. package/dist/component.ui.runtime.d.ts +104 -0
  20. package/dist/config.d.ts +18 -0
  21. package/dist/dependencies/dependencies.d.ts +43 -0
  22. package/dist/dependencies/index.d.ts +1 -0
  23. package/dist/exceptions/could-not-find-latest.d.ts +4 -0
  24. package/dist/exceptions/host-not-found.d.ts +12 -0
  25. package/dist/exceptions/index.d.ts +4 -0
  26. package/dist/exceptions/main-file-not-found.d.ts +14 -0
  27. package/dist/exceptions/nothing-to-snap.d.ts +2 -0
  28. package/dist/get-component-opts.d.ts +13 -0
  29. package/dist/hash.d.ts +4 -0
  30. package/dist/head.d.ts +0 -0
  31. package/dist/history-graph.d.ts +2 -0
  32. package/dist/host/component-host-model.d.ts +7 -0
  33. package/dist/host/index.d.ts +2 -0
  34. package/dist/host/use-component-host.d.ts +6 -0
  35. package/dist/index.d.ts +37 -0
  36. package/dist/on-load.d.ts +0 -0
  37. package/dist/{preview-1712805335812.js → preview-1712891953391.js} +2 -2
  38. package/dist/section/index.d.ts +1 -0
  39. package/dist/section/section.d.ts +11 -0
  40. package/dist/show/extensions.fragment.d.ts +13 -0
  41. package/dist/show/files.fragment.d.ts +14 -0
  42. package/dist/show/id.fragment.d.ts +13 -0
  43. package/dist/show/index.d.ts +8 -0
  44. package/dist/show/main-file.fragment.d.ts +9 -0
  45. package/dist/show/name.fragment.d.ts +9 -0
  46. package/dist/show/scope.fragment.d.ts +10 -0
  47. package/dist/show/show-fragment.d.ts +37 -0
  48. package/dist/show/show.cmd.d.ts +26 -0
  49. package/dist/snap/author.d.ts +17 -0
  50. package/dist/snap/index.d.ts +2 -0
  51. package/dist/snap/snap.d.ts +56 -0
  52. package/dist/state.d.ts +65 -0
  53. package/dist/store.d.ts +3 -0
  54. package/dist/tag/index.d.ts +1 -0
  55. package/dist/tag/tag.d.ts +32 -0
  56. package/dist/tag-map.d.ts +35 -0
  57. package/dist/ui/aspect-page/aspect-page.d.ts +1 -0
  58. package/dist/ui/aspect-page/index.d.ts +1 -0
  59. package/dist/ui/component-error/component-error.d.ts +20 -0
  60. package/dist/ui/component-error/index.d.ts +1 -0
  61. package/dist/ui/component-model/component-model.d.ts +186 -0
  62. package/dist/ui/component-model/index.d.ts +1 -0
  63. package/dist/ui/component-searcher/component-result.d.ts +16 -0
  64. package/dist/ui/component-searcher/component-searcher.d.ts +22 -0
  65. package/dist/ui/component-searcher/index.d.ts +2 -0
  66. package/dist/ui/component.d.ts +26 -0
  67. package/dist/ui/context/component-context.d.ts +6 -0
  68. package/dist/ui/context/component-provider.d.ts +25 -0
  69. package/dist/ui/context/index.d.ts +3 -0
  70. package/dist/ui/index.d.ts +12 -0
  71. package/dist/ui/menu/index.d.ts +3 -0
  72. package/dist/ui/menu/menu-nav.d.ts +23 -0
  73. package/dist/ui/menu/menu.d.ts +97 -0
  74. package/dist/ui/menu/nav-plugin.d.ts +28 -0
  75. package/dist/ui/top-bar-nav/index.d.ts +1 -0
  76. package/dist/ui/top-bar-nav/top-bar-nav.d.ts +2 -0
  77. package/dist/ui/use-component-from-location.d.ts +1 -0
  78. package/dist/ui/use-component-logs.d.ts +16 -0
  79. package/dist/ui/use-component-query.d.ts +3 -0
  80. package/dist/ui/use-component.d.ts +3 -0
  81. package/dist/ui/use-component.fragments.d.ts +10 -0
  82. package/dist/ui/use-component.model.d.ts +44 -0
  83. package/dist/ui/use-component.utils.d.ts +1 -0
  84. package/package.json +23 -23
  85. package/tsconfig.json +1 -46
@@ -0,0 +1,3 @@
1
+ import { ComponentQueryResult, Filters } from './use-component.model';
2
+ /** provides data to component ui page, making sure both variables and return value are safely typed and memoized */
3
+ export declare function useComponentQuery(componentId: string, host: string, filters?: Filters, skip?: boolean): ComponentQueryResult;
@@ -0,0 +1,3 @@
1
+ import { ComponentQueryResult, UseComponentOptions, UseComponentType, Filters } from './use-component.model';
2
+ export { UseComponentType, Filters };
3
+ export declare function useComponent(host: string, id?: string, options?: UseComponentOptions): ComponentQueryResult;
@@ -0,0 +1,10 @@
1
+ export declare const componentIdFields: import("@apollo/client").DocumentNode;
2
+ export declare const componentOverviewFields: import("@apollo/client").DocumentNode;
3
+ export declare const componentFields: import("@apollo/client").DocumentNode;
4
+ export declare const componentFieldsWithLogs: import("@apollo/client").DocumentNode;
5
+ export declare const COMPONENT_QUERY_LOG_FIELDS = "\n $logOffset: Int\n $logLimit: Int\n $logType: String\n $logHead: String\n $logSort: String\n $logTakeHeadFromComponent: Boolean\n";
6
+ export declare const GET_COMPONENT: import("@apollo/client").DocumentNode;
7
+ export declare const GET_COMPONENT_WITH_LOGS: import("@apollo/client").DocumentNode;
8
+ export declare const SUB_SUBSCRIPTION_ADDED: import("@apollo/client").DocumentNode;
9
+ export declare const SUB_COMPONENT_CHANGED: import("@apollo/client").DocumentNode;
10
+ export declare const SUB_COMPONENT_REMOVED: import("@apollo/client").DocumentNode;
@@ -0,0 +1,44 @@
1
+ import { ComponentDescriptor } from '@teambit/component-descriptor';
2
+ import { LegacyComponentLog } from '@teambit/legacy-component-log';
3
+ import { ComponentID } from '../';
4
+ import { ComponentError } from './component-error';
5
+ import { ComponentModel } from './component-model';
6
+ export type LogFilter = {
7
+ offset?: number;
8
+ limit?: number;
9
+ head?: string;
10
+ sort?: string;
11
+ takeHeadFromComponent?: boolean;
12
+ };
13
+ export type Filters = {
14
+ log?: LogFilter & {
15
+ type?: string;
16
+ };
17
+ loading?: boolean;
18
+ };
19
+ export type UseComponentOptions = {
20
+ version?: string;
21
+ logFilters?: Filters;
22
+ customUseComponent?: UseComponentType;
23
+ skip?: boolean;
24
+ };
25
+ export type ComponentQueryResult = {
26
+ component?: ComponentModel;
27
+ componentDescriptor?: ComponentDescriptor;
28
+ componentLogs?: ComponentLogs;
29
+ loading?: boolean;
30
+ error?: ComponentError;
31
+ };
32
+ export type ComponentLogsResult = {
33
+ id?: ComponentID;
34
+ componentLogs?: ComponentLogs;
35
+ latest?: string;
36
+ packageName?: string;
37
+ error?: ComponentError;
38
+ loading?: boolean;
39
+ };
40
+ export type ComponentLogs = {
41
+ logs?: LegacyComponentLog[];
42
+ loading?: boolean;
43
+ };
44
+ export type UseComponentType = (id: string, host: string, filters?: Filters, skip?: boolean) => ComponentQueryResult;
@@ -0,0 +1 @@
1
+ export declare function getOffsetValue(offset: any, limit: any, backwards?: boolean): any;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/component",
3
- "version": "1.0.228",
3
+ "version": "1.0.230",
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.228"
9
+ "version": "1.0.230"
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",
42
40
  "@teambit/design.navigation.responsive-navbar": "0.0.7",
43
41
  "@teambit/base-ui.layout.breakpoints": "1.0.0",
44
42
  "@teambit/ui-foundation.ui.use-box.dropdown": "0.0.142",
45
- "@teambit/aspect-loader": "1.0.228",
46
- "@teambit/dependency-resolver": "1.0.228",
47
- "@teambit/graph": "1.0.228",
43
+ "@teambit/design.ui.styles.ellipsis": "0.0.357",
44
+ "@teambit/explorer.ui.command-bar": "2.0.14",
45
+ "@teambit/aspect-loader": "1.0.230",
46
+ "@teambit/dependency-resolver": "1.0.230",
47
+ "@teambit/graph": "1.0.230",
48
48
  "@teambit/toolbox.path.match-patterns": "0.0.15",
49
49
  "@teambit/toolbox.string.capitalize": "0.0.496",
50
- "@teambit/cli": "0.0.861",
51
- "@teambit/express": "0.0.960",
52
- "@teambit/graphql": "1.0.228",
53
- "@teambit/command-bar": "1.0.228",
50
+ "@teambit/cli": "0.0.862",
51
+ "@teambit/express": "0.0.961",
52
+ "@teambit/graphql": "1.0.230",
53
+ "@teambit/command-bar": "1.0.230",
54
54
  "@teambit/component-package-version": "0.0.433",
55
- "@teambit/preview": "1.0.228",
56
- "@teambit/pubsub": "1.0.228",
57
- "@teambit/react-router": "1.0.228",
55
+ "@teambit/preview": "1.0.230",
56
+ "@teambit/pubsub": "1.0.230",
57
+ "@teambit/react-router": "1.0.230",
58
58
  "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.508",
59
- "@teambit/ui": "1.0.228",
60
- "@teambit/component-issues": "0.0.143",
59
+ "@teambit/ui": "1.0.230",
60
+ "@teambit/component-issues": "0.0.144",
61
61
  "@teambit/cli-table": "0.0.48",
62
- "@teambit/component-descriptor": "0.0.418",
62
+ "@teambit/component-descriptor": "0.0.419",
63
63
  "@teambit/harmony.ui.aspect-box": "0.0.507",
64
- "@teambit/compositions": "1.0.228",
65
- "@teambit/deprecation": "1.0.228",
66
- "@teambit/envs": "1.0.228",
67
- "@teambit/envs.ui.env-icon": "0.0.505",
64
+ "@teambit/compositions": "1.0.230",
65
+ "@teambit/deprecation": "1.0.230",
66
+ "@teambit/envs": "1.0.230",
68
67
  "@teambit/component.ui.version-dropdown": "0.0.859",
69
68
  "@teambit/lanes.hooks.use-lanes": "0.0.264",
70
- "@teambit/lanes.ui.models.lanes-model": "0.0.216"
69
+ "@teambit/lanes.ui.models.lanes-model": "0.0.216",
70
+ "@teambit/envs.ui.env-icon": "0.0.505"
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.30"
81
+ "@teambit/harmony.envs.core-aspect-env": "0.0.33"
82
82
  },
83
83
  "peerDependencies": {
84
84
  "@apollo/client": "^3.6.0",
package/tsconfig.json CHANGED
@@ -20,8 +20,7 @@
20
20
  "emitDeclarationOnly": true,
21
21
  "strict": true,
22
22
  "strictPropertyInitialization": false,
23
- "noImplicitAny": false,
24
- "composite": true
23
+ "noImplicitAny": false
25
24
  },
26
25
  "exclude": [
27
26
  "artifacts",
@@ -36,49 +35,5 @@
36
35
  "include": [
37
36
  "**/*",
38
37
  "**/*.json"
39
- ],
40
- "references": [
41
- {
42
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_aspect-loader@1.0.228"
43
- },
44
- {
45
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_graph@1.0.228"
46
- },
47
- {
48
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.861"
49
- },
50
- {
51
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_express@0.0.960"
52
- },
53
- {
54
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_graphql@1.0.228"
55
- },
56
- {
57
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.explorer_command-bar@1.0.228"
58
- },
59
- {
60
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.preview_preview@1.0.228"
61
- },
62
- {
63
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_pubsub@1.0.228"
64
- },
65
- {
66
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_react-router@1.0.228"
67
- },
68
- {
69
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_ui@1.0.228"
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.228"
76
- },
77
- {
78
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@1.0.228"
79
- },
80
- {
81
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@1.0.228"
82
- }
83
38
  ]
84
39
  }