@teambit/component-tree 0.0.368 → 0.0.373

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.
@@ -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.368",
3
+ "version": "0.0.373",
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.368"
9
+ "version": "0.0.373"
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.169",
25
+ "@teambit/legacy": "1.0.173",
26
26
  "react-dom": "^16.8.0 || ^17.0.0",
27
27
  "react": "^16.8.0 || ^17.0.0"
28
28
  },
@@ -50,12 +50,18 @@
50
50
  "react": "-"
51
51
  },
52
52
  "peerDependencies": {
53
- "@teambit/legacy": "1.0.169",
53
+ "@teambit/legacy": "1.0.173",
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
+ ],
59
65
  "private": false,
60
66
  "engines": {
61
67
  "node": ">=12.22.0"
@@ -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
- };
@@ -1,5 +0,0 @@
1
- import { Aspect } from '@teambit/harmony';
2
-
3
- export const ComponentTreeAspect = Aspect.create({
4
- id: 'teambit/component-tree',
5
- });
File without changes
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;
package/tsconfig.json DELETED
@@ -1,35 +0,0 @@
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
- "outDir": "dist",
19
- "composite": true,
20
- "emitDeclarationOnly": true,
21
- "experimentalDecorators": true,
22
- "emitDecoratorMetadata": true,
23
- "allowSyntheticDefaultImports": true,
24
- "strictPropertyInitialization": false,
25
- "strict": true,
26
- "noImplicitAny": false,
27
- "rootDir": ".",
28
- "removeComments": true,
29
- "preserveConstEnums": true,
30
- "resolveJsonModule": true
31
- },
32
- "exclude": [
33
- "dist"
34
- ]
35
- }
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
- }