@teambit/component-tree 0.0.380 → 0.0.384
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.
- package/component-tree.composition.tsx +0 -0
- package/component-tree.docs.tsx +0 -0
- package/component-tree.drawer.tsx +20 -0
- package/component-tree.ui.runtime.tsx +28 -0
- package/package-tar/teambit-component-tree-0.0.384.tgz +0 -0
- package/package.json +4 -19
- package/types/asset.d.ts +29 -0
- package/types/style.d.ts +42 -0
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// import { useComponentHost } from '@teambit/component';
|
|
2
|
+
// import { Drawer } from '@teambit/sidebar';
|
|
3
|
+
// import { FullLoader } from '@teambit/uis.full-loader';
|
|
4
|
+
// import { ComponentTree } from '@teambit/uis.side-bar';
|
|
5
|
+
// import React from 'react';
|
|
6
|
+
|
|
7
|
+
// import { ComponentTreeSlot } from './component-tree.ui.runtime';
|
|
8
|
+
|
|
9
|
+
// export class ComponentTreeDrawer implements Drawer {
|
|
10
|
+
// constructor(private treeNodeSlot: ComponentTreeSlot) {}
|
|
11
|
+
// // TODO - check if this is still used @oded/@uri
|
|
12
|
+
// name = 'COMPONENTS';
|
|
13
|
+
|
|
14
|
+
// render = () => {
|
|
15
|
+
// const { host } = useComponentHost();
|
|
16
|
+
|
|
17
|
+
// if (!host) return <FullLoader />;
|
|
18
|
+
// return <ComponentTree components={host.components} treeNodeSlot={this.treeNodeSlot} />;
|
|
19
|
+
// };
|
|
20
|
+
// }
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Slot, SlotRegistry } from '@teambit/harmony';
|
|
2
|
+
import { UIRuntime } from '@teambit/ui';
|
|
3
|
+
|
|
4
|
+
import { ComponentTreeNode } from './component-tree-node';
|
|
5
|
+
import { ComponentTreeAspect } from './component-tree.aspect';
|
|
6
|
+
|
|
7
|
+
export type ComponentTreeSlot = SlotRegistry<ComponentTreeNode>;
|
|
8
|
+
|
|
9
|
+
export class ComponentTreeUI {
|
|
10
|
+
constructor(private treeNodeSlot: ComponentTreeSlot) {}
|
|
11
|
+
|
|
12
|
+
registerTreeNode(treeNode: ComponentTreeNode) {
|
|
13
|
+
this.treeNodeSlot.register(treeNode);
|
|
14
|
+
return this;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static runtime = UIRuntime;
|
|
18
|
+
|
|
19
|
+
static slots = [Slot.withType<ComponentTreeNode>()];
|
|
20
|
+
|
|
21
|
+
static dependencies = [];
|
|
22
|
+
|
|
23
|
+
static async provider(deps, config, [treeNodeSlot]: [ComponentTreeSlot]) {
|
|
24
|
+
return new ComponentTreeUI(treeNodeSlot);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
ComponentTreeAspect.addRuntime(ComponentTreeUI);
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/component-tree",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.384",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/component/component-tree",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "component-tree",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.384"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@teambit/harmony": "0.2.11",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@types/node": "12.20.4"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@teambit/legacy": "1.0.
|
|
25
|
+
"@teambit/legacy": "1.0.184",
|
|
26
26
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
27
27
|
"react": "^16.8.0 || ^17.0.0"
|
|
28
28
|
},
|
|
@@ -50,27 +50,12 @@
|
|
|
50
50
|
"react": "-"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@teambit/legacy": "1.0.
|
|
53
|
+
"@teambit/legacy": "1.0.184",
|
|
54
54
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
55
55
|
"react": "^16.8.0 || ^17.0.0"
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
-
"files": [
|
|
60
|
-
"dist",
|
|
61
|
-
"!dist/tsconfig.tsbuildinfo",
|
|
62
|
-
"**/*.md",
|
|
63
|
-
"**/*.mdx",
|
|
64
|
-
"**/*.js",
|
|
65
|
-
"**/*.json",
|
|
66
|
-
"**/*.sass",
|
|
67
|
-
"**/*.scss",
|
|
68
|
-
"**/*.less",
|
|
69
|
-
"**/*.css",
|
|
70
|
-
"**/*.css",
|
|
71
|
-
"**/*.jpeg",
|
|
72
|
-
"**/*.gif"
|
|
73
|
-
],
|
|
74
59
|
"private": false,
|
|
75
60
|
"engines": {
|
|
76
61
|
"node": ">=12.22.0"
|
package/types/asset.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare module '*.png' {
|
|
2
|
+
const value: any;
|
|
3
|
+
export = value;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.svg' {
|
|
6
|
+
import type { FunctionComponent, SVGProps } from 'react';
|
|
7
|
+
|
|
8
|
+
export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
|
|
9
|
+
const src: string;
|
|
10
|
+
export default src;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// @TODO Gilad
|
|
14
|
+
declare module '*.jpg' {
|
|
15
|
+
const value: any;
|
|
16
|
+
export = value;
|
|
17
|
+
}
|
|
18
|
+
declare module '*.jpeg' {
|
|
19
|
+
const value: any;
|
|
20
|
+
export = value;
|
|
21
|
+
}
|
|
22
|
+
declare module '*.gif' {
|
|
23
|
+
const value: any;
|
|
24
|
+
export = value;
|
|
25
|
+
}
|
|
26
|
+
declare module '*.bmp' {
|
|
27
|
+
const value: any;
|
|
28
|
+
export = value;
|
|
29
|
+
}
|
package/types/style.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare module '*.module.css' {
|
|
2
|
+
const classes: { readonly [key: string]: string };
|
|
3
|
+
export default classes;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.module.scss' {
|
|
6
|
+
const classes: { readonly [key: string]: string };
|
|
7
|
+
export default classes;
|
|
8
|
+
}
|
|
9
|
+
declare module '*.module.sass' {
|
|
10
|
+
const classes: { readonly [key: string]: string };
|
|
11
|
+
export default classes;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module '*.module.less' {
|
|
15
|
+
const classes: { readonly [key: string]: string };
|
|
16
|
+
export default classes;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare module '*.less' {
|
|
20
|
+
const classes: { readonly [key: string]: string };
|
|
21
|
+
export default classes;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.css' {
|
|
25
|
+
const classes: { readonly [key: string]: string };
|
|
26
|
+
export default classes;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare module '*.sass' {
|
|
30
|
+
const classes: { readonly [key: string]: string };
|
|
31
|
+
export default classes;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare module '*.scss' {
|
|
35
|
+
const classes: { readonly [key: string]: string };
|
|
36
|
+
export default classes;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare module '*.mdx' {
|
|
40
|
+
const component: any;
|
|
41
|
+
export default component;
|
|
42
|
+
}
|