@teambit/component 0.0.556 → 0.0.560

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.
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: Component aspect for Bit components
3
+ labels: ['component', 'bit', 'extension', 'aspect']
4
+ ---
5
+
6
+ import { Component } from '@teambit/component.aspect-docs.component';
7
+
8
+ <Component />
@@ -13,7 +13,7 @@ export declare function componentSchema(componentExtension: ComponentMain): {
13
13
  path: string;
14
14
  }) => string | undefined;
15
15
  mainFile: (component: Component) => any;
16
- headTag: (component: Component) => import("./tag/tag").TagProps | undefined;
16
+ headTag: (component: Component) => import(".").TagProps | undefined;
17
17
  latest: (component: Component) => string | undefined;
18
18
  tags: (component: any) => any;
19
19
  aspects: (component: Component) => {
package/dist/index.d.ts CHANGED
@@ -7,9 +7,9 @@ export type { default as ComponentConfig } from './config';
7
7
  export type { ComponentFactory } from './component-factory';
8
8
  export type { AspectList } from './aspect-list';
9
9
  export { AspectEntry, AspectData } from './aspect-entry';
10
- export { Snap } from './snap/snap';
10
+ export { Snap, SnapProps } from './snap/snap';
11
11
  export type { Author } from './snap/author';
12
- export { Tag } from './tag/tag';
12
+ export { Tag, TagProps } from './tag/tag';
13
13
  export { State } from './state';
14
14
  export type { Hash } from './hash';
15
15
  export { TagMap } from './tag-map';
package/dist/index.js CHANGED
@@ -89,6 +89,12 @@ Object.defineProperty(exports, "Snap", {
89
89
  return _snap().Snap;
90
90
  }
91
91
  });
92
+ Object.defineProperty(exports, "SnapProps", {
93
+ enumerable: true,
94
+ get: function () {
95
+ return _snap().SnapProps;
96
+ }
97
+ });
92
98
  Object.defineProperty(exports, "State", {
93
99
  enumerable: true,
94
100
  get: function () {
@@ -107,6 +113,12 @@ Object.defineProperty(exports, "TagMap", {
107
113
  return _tagMap().TagMap;
108
114
  }
109
115
  });
116
+ Object.defineProperty(exports, "TagProps", {
117
+ enumerable: true,
118
+ get: function () {
119
+ return _tag().TagProps;
120
+ }
121
+ });
110
122
  exports.default = void 0;
111
123
  Object.defineProperty(exports, "useComponentHost", {
112
124
  enumerable: true,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":["ComponentAspect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAIA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAIA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAjBA;AACA;AAGA;AACA;AAaA;AACA;eAEeA,4B","sourcesContent":["import { ComponentAspect } from './component.aspect';\n\nexport { useComponentHost } from './host';\nexport { Component, InvalidComponent } from './component';\nexport { ComponentID } from '@teambit/component-id';\nexport { default as ComponentFS } from './component-fs';\nexport type { default as ComponentConfig } from './config';\nexport type { ComponentFactory } from './component-factory';\nexport type { AspectList } from './aspect-list';\nexport { AspectEntry, AspectData } from './aspect-entry';\n// TODO: check why it's not working when using the index in snap dir like this:\n// export { Snap, Author } from './snap';\nexport { Snap } from './snap/snap';\nexport type { Author } from './snap/author';\n// TODO: check why it's not working when using the index in tag dir like this:\n// export { Tag } from './tag';\nexport { Tag } from './tag/tag';\nexport { State } from './state';\nexport type { Hash } from './hash';\nexport { TagMap } from './tag-map';\nexport { ComponentMap } from './component-map';\nexport type { ComponentMain } from './component.main.runtime';\nexport type { ComponentUI } from './component.ui.runtime';\nexport { Section } from './section';\nexport { ComponentContext } from './ui/context/component-context';\nexport { ComponentModel, ComponentModelProps } from './ui/component-model';\nexport type { ShowFragment, ShowRow } from './show';\nexport { default as Config } from './config';\n// export { AspectList } from './aspect-list';\n// export { AspectEntry } from './aspect-entry';\nexport { ComponentAspect };\nexport default ComponentAspect;\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":["ComponentAspect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAIA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAIA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAjBA;AACA;AAGA;AACA;AAaA;AACA;eAEeA,4B","sourcesContent":["import { ComponentAspect } from './component.aspect';\n\nexport { useComponentHost } from './host';\nexport { Component, InvalidComponent } from './component';\nexport { ComponentID } from '@teambit/component-id';\nexport { default as ComponentFS } from './component-fs';\nexport type { default as ComponentConfig } from './config';\nexport type { ComponentFactory } from './component-factory';\nexport type { AspectList } from './aspect-list';\nexport { AspectEntry, AspectData } from './aspect-entry';\n// TODO: check why it's not working when using the index in snap dir like this:\n// export { Snap, Author } from './snap';\nexport { Snap, SnapProps } from './snap/snap';\nexport type { Author } from './snap/author';\n// TODO: check why it's not working when using the index in tag dir like this:\n// export { Tag } from './tag';\nexport { Tag, TagProps } from './tag/tag';\nexport { State } from './state';\nexport type { Hash } from './hash';\nexport { TagMap } from './tag-map';\nexport { ComponentMap } from './component-map';\nexport type { ComponentMain } from './component.main.runtime';\nexport type { ComponentUI } from './component.ui.runtime';\nexport { Section } from './section';\nexport { ComponentContext } from './ui/context/component-context';\nexport { ComponentModel, ComponentModelProps } from './ui/component-model';\nexport type { ShowFragment, ShowRow } from './show';\nexport { default as Config } from './config';\n// export { AspectList } from './aspect-list';\n// export { AspectEntry } from './aspect-entry';\nexport { ComponentAspect };\nexport default ComponentAspect;\n"]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/component",
3
- "version": "0.0.556",
3
+ "version": "0.0.560",
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.556"
9
+ "version": "0.0.560"
10
10
  },
11
11
  "dependencies": {
12
12
  "lodash": "4.17.21",
@@ -26,38 +26,38 @@
26
26
  "@teambit/base-ui.routing.nav-link": "1.0.0",
27
27
  "@teambit/documenter.ui.heading": "4.1.1",
28
28
  "@teambit/documenter.ui.separator": "4.1.1",
29
- "@teambit/component-id": "0.0.377",
30
- "@teambit/ui-foundation.ui.menu-widget-icon": "0.0.466",
31
- "@teambit/aspect-loader": "0.0.556",
32
- "@teambit/legacy-bit-id": "0.0.376",
33
- "@teambit/toolbox.string.capitalize": "0.0.461",
34
- "@teambit/cli": "0.0.387",
35
- "@teambit/config": "0.0.398",
36
- "@teambit/express": "0.0.476",
37
- "@teambit/graphql": "0.0.556",
38
- "@teambit/bit-error": "0.0.373",
39
- "@teambit/command-bar": "0.0.556",
40
- "@teambit/preview": "0.0.556",
41
- "@teambit/pubsub": "0.0.556",
42
- "@teambit/ui-foundation.ui.is-browser": "0.0.464",
43
- "@teambit/ui-foundation.ui.main-dropdown": "0.0.464",
44
- "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.466",
45
- "@teambit/ui": "0.0.556",
46
- "@teambit/component-issues": "0.0.22",
47
- "@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.465",
48
- "@teambit/cli-table": "0.0.10",
49
- "@teambit/ui-foundation.ui.react-router.use-query": "0.0.464",
29
+ "@teambit/component-id": "0.0.379",
30
+ "@teambit/ui-foundation.ui.menu-widget-icon": "0.0.468",
31
+ "@teambit/aspect-loader": "0.0.560",
32
+ "@teambit/legacy-bit-id": "0.0.378",
33
+ "@teambit/toolbox.string.capitalize": "0.0.463",
34
+ "@teambit/cli": "0.0.389",
35
+ "@teambit/config": "0.0.400",
36
+ "@teambit/express": "0.0.478",
37
+ "@teambit/graphql": "0.0.560",
38
+ "@teambit/bit-error": "0.0.375",
39
+ "@teambit/command-bar": "0.0.560",
40
+ "@teambit/preview": "0.0.560",
41
+ "@teambit/pubsub": "0.0.560",
42
+ "@teambit/ui-foundation.ui.is-browser": "0.0.466",
43
+ "@teambit/ui-foundation.ui.main-dropdown": "0.0.466",
44
+ "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.468",
45
+ "@teambit/ui": "0.0.560",
46
+ "@teambit/component-issues": "0.0.24",
47
+ "@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.467",
48
+ "@teambit/cli-table": "0.0.12",
49
+ "@teambit/ui-foundation.ui.react-router.use-query": "0.0.466",
50
50
  "@teambit/design.ui.empty-box": "0.0.352",
51
- "@teambit/harmony.ui.aspect-box": "0.0.464",
51
+ "@teambit/harmony.ui.aspect-box": "0.0.466",
52
52
  "@teambit/design.ui.pages.not-found": "0.0.352",
53
53
  "@teambit/design.ui.pages.server-error": "0.0.352",
54
- "@teambit/compositions": "0.0.556",
55
- "@teambit/deprecation": "0.0.556",
56
- "@teambit/envs": "0.0.556",
57
- "@teambit/component.ui.version-dropdown": "0.0.468",
58
- "@teambit/ui-foundation.ui.use-box.dropdown": "0.0.85",
59
- "@teambit/ui-foundation.ui.use-box.menu": "0.0.85",
60
- "@teambit/ui-foundation.ui.react-router.extend-path": "0.0.464"
54
+ "@teambit/compositions": "0.0.560",
55
+ "@teambit/deprecation": "0.0.560",
56
+ "@teambit/envs": "0.0.560",
57
+ "@teambit/component.ui.version-dropdown": "0.0.470",
58
+ "@teambit/ui-foundation.ui.use-box.dropdown": "0.0.87",
59
+ "@teambit/ui-foundation.ui.use-box.menu": "0.0.87",
60
+ "@teambit/ui-foundation.ui.react-router.extend-path": "0.0.466"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/lodash": "4.14.165",
@@ -72,11 +72,11 @@
72
72
  "@types/jest": "^26.0.0",
73
73
  "@types/react-dom": "^17.0.5",
74
74
  "@types/node": "12.20.4",
75
- "@teambit/component.aspect-docs.component": "0.0.106"
75
+ "@teambit/component.aspect-docs.component": "0.0.108"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "@apollo/client": "^3.0.0",
79
- "@teambit/legacy": "1.0.173",
79
+ "@teambit/legacy": "1.0.175",
80
80
  "react-dom": "^16.8.0 || ^17.0.0",
81
81
  "react": "^16.8.0 || ^17.0.0"
82
82
  },
@@ -104,7 +104,7 @@
104
104
  "react": "-"
105
105
  },
106
106
  "peerDependencies": {
107
- "@teambit/legacy": "1.0.173",
107
+ "@teambit/legacy": "1.0.175",
108
108
  "react-dom": "^16.8.0 || ^17.0.0",
109
109
  "react": "^16.8.0 || ^17.0.0"
110
110
  }
@@ -113,8 +113,17 @@
113
113
  "files": [
114
114
  "dist",
115
115
  "!dist/tsconfig.tsbuildinfo",
116
- "README.md",
117
- "README.mdx"
116
+ "**/*.md",
117
+ "**/*.mdx",
118
+ "**/*.js",
119
+ "**/*.json",
120
+ "**/*.sass",
121
+ "**/*.scss",
122
+ "**/*.less",
123
+ "**/*.css",
124
+ "**/*.css",
125
+ "**/*.jpeg",
126
+ "**/*.gif"
118
127
  ],
119
128
  "private": false,
120
129
  "engines": {
package/tsconfig.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "compilerOptions": {
3
+ "lib": [
4
+ "es2019",
5
+ "DOM",
6
+ "ES6",
7
+ "DOM.Iterable",
8
+ "ScriptHost"
9
+ ],
10
+ "target": "es2015",
11
+ "module": "commonjs",
12
+ "jsx": "react",
13
+ "declaration": true,
14
+ "sourceMap": true,
15
+ "skipLibCheck": true,
16
+ "moduleResolution": "node",
17
+ "esModuleInterop": true,
18
+ "composite": true,
19
+ "emitDeclarationOnly": true,
20
+ "outDir": "dist",
21
+ "experimentalDecorators": true,
22
+ "emitDecoratorMetadata": true,
23
+ "allowSyntheticDefaultImports": true,
24
+ "strictPropertyInitialization": false,
25
+ "strict": true,
26
+ "noImplicitAny": false,
27
+ "rootDir": ".",
28
+ "preserveConstEnums": true,
29
+ "resolveJsonModule": true
30
+ },
31
+ "exclude": [
32
+ "dist"
33
+ ]
34
+ }
@@ -0,0 +1,20 @@
1
+ .aspectPage {
2
+ padding: 50px 40px 100px 40px;
3
+ width: 100%;
4
+ overflow-y: scroll;
5
+ box-sizing: border-box;
6
+ > div {
7
+ max-width: 1440px;
8
+ margin: 0 auto;
9
+ }
10
+ }
11
+ .title {
12
+ margin-bottom: 25px;
13
+ font-size: var(--bit-h-xs, 26px);
14
+ }
15
+ .separator {
16
+ margin-bottom: 41px;
17
+ }
18
+ .aspectBox {
19
+ margin-bottom: 32px;
20
+ }
@@ -0,0 +1,7 @@
1
+ $topbarHeight: 64px;
2
+
3
+ .container {
4
+ height: 100%;
5
+ display: flex;
6
+ flex-direction: column;
7
+ }
@@ -0,0 +1,62 @@
1
+ .topBar {
2
+ display: flex;
3
+ justify-content: space-between;
4
+ align-items: center;
5
+ width: 100%;
6
+ height: 100%;
7
+ }
8
+
9
+ .leftSide {
10
+ display: flex;
11
+ align-items: center;
12
+ height: 100%;
13
+ }
14
+
15
+ .navigation {
16
+ display: flex;
17
+ list-style: none;
18
+ height: 100%;
19
+ padding-left: 28px;
20
+ @media screen and (max-width: 768px) {
21
+ padding-left: 6px;
22
+ }
23
+
24
+ > li {
25
+ display: block;
26
+ margin-right: 16px;
27
+ height: 100%;
28
+ }
29
+ }
30
+
31
+ .rightSide {
32
+ display: flex;
33
+ align-items: center;
34
+ height: 100%;
35
+ > * {
36
+ margin-right: 12px;
37
+ &:last-child {
38
+ margin-right: 16px;
39
+ }
40
+ }
41
+ .widgets {
42
+ height: 100%;
43
+ margin-right: 20px;
44
+ display: flex;
45
+ align-items: center;
46
+ > nav {
47
+ > a {
48
+ padding: 0;
49
+ &:last-child {
50
+ margin-right: 0;
51
+ }
52
+ }
53
+ }
54
+ }
55
+ .widget {
56
+ font-size: 17px;
57
+ }
58
+ }
59
+
60
+ .useBox {
61
+ --bit-drawer-margin: 14px;
62
+ }
@@ -0,0 +1,52 @@
1
+ .topBarLink {
2
+ position: relative;
3
+ padding: 0 8px;
4
+
5
+ box-sizing: border-box;
6
+
7
+ display: flex;
8
+ align-items: center;
9
+
10
+ color: inherit;
11
+ text-decoration: none;
12
+
13
+ transition: color 300ms;
14
+ margin: 0 5px;
15
+
16
+ &:hover:not(.active) {
17
+ > div {
18
+ background-color: var(--bit-bg-heavy);
19
+ }
20
+ }
21
+
22
+ &.active {
23
+ color: var(--bit-accent-color, #6c5ce7);
24
+
25
+ &:after {
26
+ background-color: var(--bit-accent-color, #6c5ce7);
27
+ height: 4px;
28
+ }
29
+ }
30
+
31
+ &:after {
32
+ content: '';
33
+ position: absolute;
34
+ bottom: 0;
35
+ left: 0;
36
+ right: 0;
37
+ background-color: transparent;
38
+ height: 0;
39
+ border-top-right-radius: 2px;
40
+ border-top-left-radius: 2px;
41
+ transition: background-color 300ms, height 300ms;
42
+ }
43
+
44
+ > div {
45
+ border-radius: 6px;
46
+ padding: 0 8px;
47
+ height: 30px;
48
+ display: flex;
49
+ align-items: center;
50
+ transition: background-color 300ms ease-in-out;
51
+ }
52
+ }