@teambit/component-sizer 0.0.26 → 0.0.29
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/{__preview-1645393132004.js → __preview-1645673006381.js} +0 -0
- package/component-sizer.ui.runtime.tsx +15 -10
- package/dist/component-sizer.ui.runtime.d.ts +3 -3
- package/dist/component-sizer.ui.runtime.js +25 -15
- package/dist/component-sizer.ui.runtime.js.map +1 -1
- package/package-tar/teambit-component-sizer-0.0.29.tgz +0 -0
- package/package.json +13 -11
- package/package-tar/teambit-component-sizer-0.0.26.tgz +0 -0
|
File without changes
|
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { UIRuntime } from '@teambit/ui';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { ComponentDescriptor } from '@teambit/component-descriptor';
|
|
4
|
+
import { DocsAspect, DocsUI } from '@teambit/docs';
|
|
5
|
+
import { ComponentSize } from '@teambit/component.ui.component-size';
|
|
6
|
+
// import { ComponentSizerAspect } from './component-sizer.aspect';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
|
-
* Component
|
|
8
|
-
* @example CodeUI.registerEnvFileIcon([(fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined)])
|
|
9
|
+
* Component size aspect.
|
|
9
10
|
*/
|
|
10
11
|
export class SizerUIRuntime {
|
|
11
|
-
static dependencies = [
|
|
12
|
+
static dependencies = [DocsAspect];
|
|
12
13
|
|
|
13
14
|
static runtime = UIRuntime;
|
|
14
15
|
|
|
15
|
-
static async provider() {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
static async provider([docs]: [DocsUI]) {
|
|
17
|
+
docs.registerTitleBadge({
|
|
18
|
+
component: function badge({ componentDescriptor }: { componentDescriptor: ComponentDescriptor }) {
|
|
19
|
+
return <ComponentSize componentDescriptor={componentDescriptor} />;
|
|
20
|
+
},
|
|
21
|
+
weight: 30,
|
|
22
|
+
});
|
|
18
23
|
}
|
|
19
24
|
}
|
|
20
25
|
|
|
21
|
-
ComponentSizerAspect.addRuntime(SizerUIRuntime);
|
|
26
|
+
// ComponentSizerAspect.addRuntime(SizerUIRuntime);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { DocsUI } from '@teambit/docs';
|
|
1
2
|
/**
|
|
2
|
-
* Component
|
|
3
|
-
* @example CodeUI.registerEnvFileIcon([(fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined)])
|
|
3
|
+
* Component size aspect.
|
|
4
4
|
*/
|
|
5
5
|
export declare class SizerUIRuntime {
|
|
6
6
|
static dependencies: import("@teambit/harmony").Aspect[];
|
|
7
7
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
8
|
-
static provider(): Promise<
|
|
8
|
+
static provider([docs]: [DocsUI]): Promise<void>;
|
|
9
9
|
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
+
require("core-js/modules/es.array.iterator.js");
|
|
6
|
+
|
|
5
7
|
require("core-js/modules/es.promise.js");
|
|
6
8
|
|
|
7
9
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -19,10 +21,10 @@ function _defineProperty2() {
|
|
|
19
21
|
return data;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
|
-
function
|
|
23
|
-
const data = require("
|
|
24
|
+
function _react() {
|
|
25
|
+
const data = _interopRequireDefault(require("react"));
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
_react = function () {
|
|
26
28
|
return data;
|
|
27
29
|
};
|
|
28
30
|
|
|
@@ -49,32 +51,40 @@ function _docs() {
|
|
|
49
51
|
return data;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
|
-
function
|
|
53
|
-
const data = require("
|
|
54
|
+
function _componentUi() {
|
|
55
|
+
const data = require("@teambit/component.ui.component-size");
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
_componentUi = function () {
|
|
56
58
|
return data;
|
|
57
59
|
};
|
|
58
60
|
|
|
59
61
|
return data;
|
|
60
62
|
}
|
|
61
63
|
|
|
64
|
+
// import { ComponentSizerAspect } from './component-sizer.aspect';
|
|
65
|
+
|
|
62
66
|
/**
|
|
63
|
-
* Component
|
|
64
|
-
* @example CodeUI.registerEnvFileIcon([(fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined)])
|
|
67
|
+
* Component size aspect.
|
|
65
68
|
*/
|
|
66
69
|
class SizerUIRuntime {
|
|
67
|
-
static async provider() {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
static async provider([docs]) {
|
|
71
|
+
docs.registerTitleBadge({
|
|
72
|
+
component: function badge({
|
|
73
|
+
componentDescriptor
|
|
74
|
+
}) {
|
|
75
|
+
return /*#__PURE__*/_react().default.createElement(_componentUi().ComponentSize, {
|
|
76
|
+
componentDescriptor: componentDescriptor
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
weight: 30
|
|
80
|
+
});
|
|
70
81
|
}
|
|
71
82
|
|
|
72
|
-
}
|
|
83
|
+
} // ComponentSizerAspect.addRuntime(SizerUIRuntime);
|
|
84
|
+
|
|
73
85
|
|
|
74
86
|
exports.SizerUIRuntime = SizerUIRuntime;
|
|
75
|
-
(0, _defineProperty2().default)(SizerUIRuntime, "dependencies", [
|
|
87
|
+
(0, _defineProperty2().default)(SizerUIRuntime, "dependencies", [_docs().DocsAspect]);
|
|
76
88
|
(0, _defineProperty2().default)(SizerUIRuntime, "runtime", _ui().UIRuntime);
|
|
77
89
|
|
|
78
|
-
_componentSizer().ComponentSizerAspect.addRuntime(SizerUIRuntime);
|
|
79
|
-
|
|
80
90
|
//# sourceMappingURL=component-sizer.ui.runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["component-sizer.ui.runtime.tsx"],"names":["SizerUIRuntime","provider","
|
|
1
|
+
{"version":3,"sources":["component-sizer.ui.runtime.tsx"],"names":["SizerUIRuntime","provider","docs","registerTitleBadge","component","badge","componentDescriptor","weight","DocsAspect","UIRuntime"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;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;;AACA;;AAEA;AACA;AACA;AACO,MAAMA,cAAN,CAAqB;AAKL,eAARC,QAAQ,CAAC,CAACC,IAAD,CAAD,EAAmB;AACtCA,IAAAA,IAAI,CAACC,kBAAL,CAAwB;AACtBC,MAAAA,SAAS,EAAE,SAASC,KAAT,CAAe;AAAEC,QAAAA;AAAF,OAAf,EAAsF;AAC/F,4BAAO,+BAAC,4BAAD;AAAe,UAAA,mBAAmB,EAAEA;AAApC,UAAP;AACD,OAHqB;AAItBC,MAAAA,MAAM,EAAE;AAJc,KAAxB;AAMD;;AAZyB,C,CAe5B;;;;gCAfaP,c,kBACW,CAACQ,kBAAD,C;gCADXR,c,aAGMS,e","sourcesContent":["import React from 'react';\nimport { UIRuntime } from '@teambit/ui';\nimport type { ComponentDescriptor } from '@teambit/component-descriptor';\nimport { DocsAspect, DocsUI } from '@teambit/docs';\nimport { ComponentSize } from '@teambit/component.ui.component-size';\n// import { ComponentSizerAspect } from './component-sizer.aspect';\n\n/**\n * Component size aspect.\n */\nexport class SizerUIRuntime {\n static dependencies = [DocsAspect];\n\n static runtime = UIRuntime;\n\n static async provider([docs]: [DocsUI]) {\n docs.registerTitleBadge({\n component: function badge({ componentDescriptor }: { componentDescriptor: ComponentDescriptor }) {\n return <ComponentSize componentDescriptor={componentDescriptor} />;\n },\n weight: 30,\n });\n }\n}\n\n// ComponentSizerAspect.addRuntime(SizerUIRuntime);\n"]}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/component-sizer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/component/component-sizer",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "component-sizer",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.29"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@teambit/harmony": "0.2.11",
|
|
13
13
|
"graphql-tag": "2.12.1",
|
|
14
14
|
"@babel/runtime": "7.12.18",
|
|
15
15
|
"core-js": "^3.0.0",
|
|
16
|
-
"@teambit/component": "0.0.
|
|
17
|
-
"@teambit/graphql": "0.0.
|
|
18
|
-
"@teambit/cli": "0.0.
|
|
19
|
-
"@teambit/preview": "0.0.
|
|
20
|
-
"@teambit/
|
|
21
|
-
"@teambit/ui": "0.0.
|
|
16
|
+
"@teambit/component": "0.0.656",
|
|
17
|
+
"@teambit/graphql": "0.0.656",
|
|
18
|
+
"@teambit/cli": "0.0.447",
|
|
19
|
+
"@teambit/preview": "0.0.656",
|
|
20
|
+
"@teambit/component-descriptor": "0.0.5",
|
|
21
|
+
"@teambit/component.ui.component-size": "0.0.2",
|
|
22
|
+
"@teambit/docs": "0.0.656",
|
|
23
|
+
"@teambit/ui": "0.0.656"
|
|
22
24
|
},
|
|
23
25
|
"devDependencies": {
|
|
26
|
+
"@types/react": "^17.0.8",
|
|
24
27
|
"@types/mocha": "9.1.0",
|
|
25
28
|
"@types/testing-library__jest-dom": "5.9.5",
|
|
26
29
|
"@types/jest": "^26.0.0",
|
|
27
30
|
"@types/react-dom": "^17.0.5",
|
|
28
|
-
"@types/react": "^17.0.8",
|
|
29
31
|
"@types/node": "12.20.4"
|
|
30
32
|
},
|
|
31
33
|
"peerDependencies": {
|
|
32
|
-
"@teambit/legacy": "1.0.
|
|
34
|
+
"@teambit/legacy": "1.0.226",
|
|
33
35
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
34
36
|
"react": "^16.8.0 || ^17.0.0"
|
|
35
37
|
},
|
|
@@ -57,7 +59,7 @@
|
|
|
57
59
|
"react": "-"
|
|
58
60
|
},
|
|
59
61
|
"peerDependencies": {
|
|
60
|
-
"@teambit/legacy": "1.0.
|
|
62
|
+
"@teambit/legacy": "1.0.226",
|
|
61
63
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
62
64
|
"react": "^16.8.0 || ^17.0.0"
|
|
63
65
|
}
|
|
Binary file
|