@teambit/component-tree 0.0.370 → 0.0.374
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/dist/component-tree-node.d.ts +6 -0
- package/package.json +12 -4
- package/tsconfig.json +1 -2
- package/component-tree-node.ts +0 -16
- package/component-tree.aspect.ts +0 -5
- package/component-tree.composition.tsx +0 -0
- package/component-tree.docs.tsx +0 -0
- package/component-tree.drawer.tsx +0 -20
- package/component-tree.ui.runtime.tsx +0 -28
- package/index.ts +0 -7
- package/package-tar/teambit-component-tree-0.0.370.tgz +0 -0
- package/types/asset.d.ts +0 -29
- package/types/style.d.ts +0 -42
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { ComponentModel } from '@teambit/component';
|
|
2
2
|
import { ComponentType } from 'react';
|
|
3
3
|
export declare type ComponentTreeNodeProps = {
|
|
4
|
+
/**
|
|
5
|
+
* component model.
|
|
6
|
+
*/
|
|
4
7
|
component: ComponentModel;
|
|
5
8
|
};
|
|
6
9
|
export declare type ComponentTreeNode = {
|
|
10
|
+
/**
|
|
11
|
+
* component to render inside the tree node.
|
|
12
|
+
*/
|
|
7
13
|
widget: ComponentType<ComponentTreeNodeProps>;
|
|
8
14
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/component-tree",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.374",
|
|
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.374"
|
|
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.174",
|
|
26
26
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
27
27
|
"react": "^16.8.0 || ^17.0.0"
|
|
28
28
|
},
|
|
@@ -50,12 +50,20 @@
|
|
|
50
50
|
"react": "-"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@teambit/legacy": "1.0.
|
|
53
|
+
"@teambit/legacy": "1.0.174",
|
|
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
|
+
"README.md",
|
|
63
|
+
"README.mdx",
|
|
64
|
+
"*.js",
|
|
65
|
+
"*.json"
|
|
66
|
+
],
|
|
59
67
|
"private": false,
|
|
60
68
|
"engines": {
|
|
61
69
|
"node": ">=12.22.0"
|
package/tsconfig.json
CHANGED
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"skipLibCheck": true,
|
|
16
16
|
"moduleResolution": "node",
|
|
17
17
|
"esModuleInterop": true,
|
|
18
|
-
"outDir": "dist",
|
|
19
18
|
"composite": true,
|
|
20
19
|
"emitDeclarationOnly": true,
|
|
20
|
+
"outDir": "dist",
|
|
21
21
|
"experimentalDecorators": true,
|
|
22
22
|
"emitDecoratorMetadata": true,
|
|
23
23
|
"allowSyntheticDefaultImports": true,
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"strict": true,
|
|
26
26
|
"noImplicitAny": false,
|
|
27
27
|
"rootDir": ".",
|
|
28
|
-
"removeComments": true,
|
|
29
28
|
"preserveConstEnums": true,
|
|
30
29
|
"resolveJsonModule": true
|
|
31
30
|
},
|
package/component-tree-node.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ComponentModel } from '@teambit/component';
|
|
2
|
-
import { ComponentType } from 'react';
|
|
3
|
-
|
|
4
|
-
export type ComponentTreeNodeProps = {
|
|
5
|
-
/**
|
|
6
|
-
* component model.
|
|
7
|
-
*/
|
|
8
|
-
component: ComponentModel;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export type ComponentTreeNode = {
|
|
12
|
-
/**
|
|
13
|
-
* component to render inside the tree node.
|
|
14
|
-
*/
|
|
15
|
-
widget: ComponentType<ComponentTreeNodeProps>;
|
|
16
|
-
};
|
package/component-tree.aspect.ts
DELETED
|
File without changes
|
package/component-tree.docs.tsx
DELETED
|
File without changes
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
// }
|
|
@@ -1,28 +0,0 @@
|
|
|
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);
|
package/index.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ComponentTreeAspect } from './component-tree.aspect';
|
|
2
|
-
|
|
3
|
-
export { ComponentTreeAspect };
|
|
4
|
-
export { ComponentTreeUI } from './component-tree.ui.runtime';
|
|
5
|
-
export type { ComponentTreeSlot } from './component-tree.ui.runtime';
|
|
6
|
-
export type { ComponentTreeNode, ComponentTreeNodeProps } from './component-tree-node';
|
|
7
|
-
export default ComponentTreeAspect;
|
|
Binary file
|
package/types/asset.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
}
|