@teambit/component-sizer 0.0.2
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-1642994756471.js +1 -0
- package/dist/component-sizer.aspect.d.ts +2 -0
- package/dist/component-sizer.aspect.js +24 -0
- package/dist/component-sizer.aspect.js.map +1 -0
- package/dist/component-sizer.graphql.d.ts +3 -0
- package/dist/component-sizer.graphql.js +56 -0
- package/dist/component-sizer.graphql.js.map +1 -0
- package/dist/component-sizer.main.runtime.d.ts +19 -0
- package/dist/component-sizer.main.runtime.js +112 -0
- package/dist/component-sizer.main.runtime.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/package-tar/teambit-component-sizer-0.0.2.tgz +0 -0
- package/package.json +84 -0
- package/tsconfig.json +34 -0
- package/types/asset.d.ts +29 -0
- package/types/style.d.ts +42 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ComponentSizerAspect = void 0;
|
|
7
|
+
|
|
8
|
+
function _harmony() {
|
|
9
|
+
const data = require("@teambit/harmony");
|
|
10
|
+
|
|
11
|
+
_harmony = function () {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const ComponentSizerAspect = _harmony().Aspect.create({
|
|
19
|
+
id: 'teambit.component/component-sizer'
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
exports.ComponentSizerAspect = ComponentSizerAspect;
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=component-sizer.aspect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["component-sizer.aspect.ts"],"names":["ComponentSizerAspect","Aspect","create","id"],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEO,MAAMA,oBAAoB,GAAGC,kBAAOC,MAAP,CAAc;AAChDC,EAAAA,EAAE,EAAE;AAD4C,CAAd,CAA7B","sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const ComponentSizerAspect = Aspect.create({\n id: 'teambit.component/component-sizer',\n});\n"]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.componentSizerSchema = componentSizerSchema;
|
|
9
|
+
|
|
10
|
+
function _graphqlTag() {
|
|
11
|
+
const data = _interopRequireDefault(require("graphql-tag"));
|
|
12
|
+
|
|
13
|
+
_graphqlTag = function () {
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return data;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function componentSizerSchema(componentSizerMain) {
|
|
21
|
+
return {
|
|
22
|
+
typeDefs: (0, _graphqlTag().default)`
|
|
23
|
+
type ComponentSizedFile {
|
|
24
|
+
name: String
|
|
25
|
+
size: Int
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type ComponentSize {
|
|
29
|
+
# breakdown for the component files sizes
|
|
30
|
+
files: [ComponentSizedFile]
|
|
31
|
+
# breakdown for the component assets sizes
|
|
32
|
+
assets: [ComponentSizedFile]
|
|
33
|
+
# total size of the component files (like js and css) (without assets)
|
|
34
|
+
totalFiles: Int
|
|
35
|
+
# total size of the component assets (like pngs) (without files)
|
|
36
|
+
totalAssets: Int
|
|
37
|
+
# total size of the component files and assets
|
|
38
|
+
total: Int
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
extend type Component {
|
|
42
|
+
# size of the component bundle
|
|
43
|
+
size: ComponentSize
|
|
44
|
+
}
|
|
45
|
+
`,
|
|
46
|
+
resolvers: {
|
|
47
|
+
Component: {
|
|
48
|
+
size: component => {
|
|
49
|
+
return componentSizerMain.getComponentSize(component);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=component-sizer.graphql.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["component-sizer.graphql.ts"],"names":["componentSizerSchema","componentSizerMain","typeDefs","resolvers","Component","size","component","getComponentSize"],"mappings":";;;;;;;;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAIO,SAASA,oBAAT,CAA8BC,kBAA9B,EAA8E;AACnF,SAAO;AACLC,IAAAA,QAAQ,EAAE,0BAAI;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAxBS;AAyBLC,IAAAA,SAAS,EAAE;AACTC,MAAAA,SAAS,EAAE;AACTC,QAAAA,IAAI,EAAGC,SAAD,IAA0B;AAC9B,iBAAOL,kBAAkB,CAACM,gBAAnB,CAAoCD,SAApC,CAAP;AACD;AAHQ;AADF;AAzBN,GAAP;AAiCD","sourcesContent":["import { Component } from '@teambit/component';\nimport { Schema } from '@teambit/graphql';\nimport gql from 'graphql-tag';\n\nimport { ComponentSizerMain } from './component-sizer.main.runtime';\n\nexport function componentSizerSchema(componentSizerMain: ComponentSizerMain): Schema {\n return {\n typeDefs: gql`\n type ComponentSizedFile {\n name: String\n size: Int\n }\n\n type ComponentSize {\n # breakdown for the component files sizes\n files: [ComponentSizedFile]\n # breakdown for the component assets sizes\n assets: [ComponentSizedFile]\n # total size of the component files (like js and css) (without assets)\n totalFiles: Int\n # total size of the component assets (like pngs) (without files)\n totalAssets: Int\n # total size of the component files and assets\n total: Int\n }\n\n extend type Component {\n # size of the component bundle\n size: ComponentSize\n }\n `,\n resolvers: {\n Component: {\n size: (component: Component) => {\n return componentSizerMain.getComponentSize(component);\n },\n },\n },\n };\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Component } from '@teambit/component';
|
|
2
|
+
import { GraphqlMain } from '@teambit/graphql';
|
|
3
|
+
import { ComponentPreviewSize, PreviewMain } from '@teambit/preview';
|
|
4
|
+
export declare class ComponentSizerMain {
|
|
5
|
+
/**
|
|
6
|
+
* preview aspect.
|
|
7
|
+
*/
|
|
8
|
+
private preview;
|
|
9
|
+
constructor(
|
|
10
|
+
/**
|
|
11
|
+
* preview aspect.
|
|
12
|
+
*/
|
|
13
|
+
preview: PreviewMain);
|
|
14
|
+
getComponentSize(component: Component): ComponentPreviewSize | undefined;
|
|
15
|
+
static slots: never[];
|
|
16
|
+
static dependencies: import("@teambit/harmony").Aspect[];
|
|
17
|
+
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
18
|
+
static provider([preview, graphql]: [PreviewMain, GraphqlMain]): Promise<ComponentSizerMain>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.array.iterator.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.promise.js");
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
exports.ComponentSizerMain = void 0;
|
|
13
|
+
|
|
14
|
+
function _defineProperty2() {
|
|
15
|
+
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
+
|
|
17
|
+
_defineProperty2 = function () {
|
|
18
|
+
return data;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return data;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function _cli() {
|
|
25
|
+
const data = require("@teambit/cli");
|
|
26
|
+
|
|
27
|
+
_cli = function () {
|
|
28
|
+
return data;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return data;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function _component() {
|
|
35
|
+
const data = _interopRequireDefault(require("@teambit/component"));
|
|
36
|
+
|
|
37
|
+
_component = function () {
|
|
38
|
+
return data;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return data;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function _graphql() {
|
|
45
|
+
const data = _interopRequireDefault(require("@teambit/graphql"));
|
|
46
|
+
|
|
47
|
+
_graphql = function () {
|
|
48
|
+
return data;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return data;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function _preview() {
|
|
55
|
+
const data = _interopRequireDefault(require("@teambit/preview"));
|
|
56
|
+
|
|
57
|
+
_preview = function () {
|
|
58
|
+
return data;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return data;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function _componentSizer() {
|
|
65
|
+
const data = require("./component-sizer.aspect");
|
|
66
|
+
|
|
67
|
+
_componentSizer = function () {
|
|
68
|
+
return data;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return data;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function _componentSizer2() {
|
|
75
|
+
const data = require("./component-sizer.graphql");
|
|
76
|
+
|
|
77
|
+
_componentSizer2 = function () {
|
|
78
|
+
return data;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
return data;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
class ComponentSizerMain {
|
|
85
|
+
constructor(
|
|
86
|
+
/**
|
|
87
|
+
* preview aspect.
|
|
88
|
+
*/
|
|
89
|
+
preview) {
|
|
90
|
+
this.preview = preview;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
getComponentSize(component) {
|
|
94
|
+
return this.preview.getComponentBundleSize(component);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
static async provider([preview, graphql]) {
|
|
98
|
+
const componentSizer = new ComponentSizerMain(preview);
|
|
99
|
+
graphql.register((0, _componentSizer2().componentSizerSchema)(componentSizer));
|
|
100
|
+
return componentSizer;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
exports.ComponentSizerMain = ComponentSizerMain;
|
|
106
|
+
(0, _defineProperty2().default)(ComponentSizerMain, "slots", []);
|
|
107
|
+
(0, _defineProperty2().default)(ComponentSizerMain, "dependencies", [_preview().default, _graphql().default, _component().default]);
|
|
108
|
+
(0, _defineProperty2().default)(ComponentSizerMain, "runtime", _cli().MainRuntime);
|
|
109
|
+
|
|
110
|
+
_componentSizer().ComponentSizerAspect.addRuntime(ComponentSizerMain);
|
|
111
|
+
|
|
112
|
+
//# sourceMappingURL=component-sizer.main.runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["component-sizer.main.runtime.ts"],"names":["ComponentSizerMain","constructor","preview","getComponentSize","component","getComponentBundleSize","provider","graphql","componentSizer","register","PreviewAspect","GraphqlAspect","ComponentAspect","MainRuntime","ComponentSizerAspect","addRuntime"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;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;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEO,MAAMA,kBAAN,CAAyB;AAC9BC,EAAAA,WAAW;AACT;AACJ;AACA;AACYC,EAAAA,OAJC,EAKT;AAAA,SADQA,OACR,GADQA,OACR;AAAE;;AAEJC,EAAAA,gBAAgB,CAACC,SAAD,EAAyD;AACvE,WAAO,KAAKF,OAAL,CAAaG,sBAAb,CAAoCD,SAApC,CAAP;AACD;;AAKoB,eAARE,QAAQ,CAAC,CAACJ,OAAD,EAAUK,OAAV,CAAD,EAAiD;AACpE,UAAMC,cAAc,GAAG,IAAIR,kBAAJ,CAAuBE,OAAvB,CAAvB;AACAK,IAAAA,OAAO,CAACE,QAAR,CAAiB,6CAAqBD,cAArB,CAAjB;AACA,WAAOA,cAAP;AACD;;AAnB6B;;;gCAAnBR,kB,WAYI,E;gCAZJA,kB,kBAaW,CAACU,kBAAD,EAAgBC,kBAAhB,EAA+BC,oBAA/B,C;gCAbXZ,kB,aAcMa,kB;;AAQnBC,uCAAqBC,UAArB,CAAgCf,kBAAhC","sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport ComponentAspect, { Component } from '@teambit/component';\nimport GraphqlAspect, { GraphqlMain } from '@teambit/graphql';\nimport PreviewAspect, { ComponentPreviewSize, PreviewMain } from '@teambit/preview';\nimport { ComponentSizerAspect } from './component-sizer.aspect';\nimport { componentSizerSchema } from './component-sizer.graphql';\n\nexport class ComponentSizerMain {\n constructor(\n /**\n * preview aspect.\n */\n private preview: PreviewMain\n ) {}\n\n getComponentSize(component: Component): ComponentPreviewSize | undefined {\n return this.preview.getComponentBundleSize(component);\n }\n\n static slots = [];\n static dependencies = [PreviewAspect, GraphqlAspect, ComponentAspect];\n static runtime = MainRuntime;\n static async provider([preview, graphql]: [PreviewMain, GraphqlMain]) {\n const componentSizer = new ComponentSizerMain(preview);\n graphql.register(componentSizerSchema(componentSizer));\n return componentSizer;\n }\n}\n\nComponentSizerAspect.addRuntime(ComponentSizerMain);\n"]}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ComponentSizerAspect", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _componentSizer().ComponentSizerAspect;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.default = void 0;
|
|
13
|
+
|
|
14
|
+
function _componentSizer() {
|
|
15
|
+
const data = require("./component-sizer.aspect");
|
|
16
|
+
|
|
17
|
+
_componentSizer = function () {
|
|
18
|
+
return data;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return data;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var _default = _componentSizer().ComponentSizerAspect;
|
|
25
|
+
|
|
26
|
+
exports.default = _default;
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":["ComponentSizerAspect"],"mappings":";;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;eAGeA,sC","sourcesContent":["import { ComponentSizerAspect } from './component-sizer.aspect';\n\nexport type { ComponentSizerMain } from './component-sizer.main.runtime';\nexport default ComponentSizerAspect;\nexport { ComponentSizerAspect };\n"]}
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@teambit/component-sizer",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"componentId": {
|
|
6
|
+
"scope": "teambit.component",
|
|
7
|
+
"name": "component-sizer",
|
|
8
|
+
"version": "0.0.2"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@teambit/harmony": "0.2.11",
|
|
12
|
+
"graphql-tag": "2.12.1",
|
|
13
|
+
"@babel/runtime": "7.12.18",
|
|
14
|
+
"core-js": "^3.0.0",
|
|
15
|
+
"@teambit/component": "0.0.629",
|
|
16
|
+
"@teambit/graphql": "0.0.629",
|
|
17
|
+
"@teambit/cli": "0.0.433",
|
|
18
|
+
"@teambit/preview": "0.0.629"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/mocha": "5.2.7",
|
|
22
|
+
"@types/testing-library__jest-dom": "5.9.5",
|
|
23
|
+
"@types/jest": "^26.0.0",
|
|
24
|
+
"@types/react-dom": "^17.0.5",
|
|
25
|
+
"@types/react": "^17.0.8",
|
|
26
|
+
"@types/node": "12.20.4"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@teambit/legacy": "1.0.209",
|
|
30
|
+
"react-dom": "^16.8.0 || ^17.0.0",
|
|
31
|
+
"react": "^16.8.0 || ^17.0.0"
|
|
32
|
+
},
|
|
33
|
+
"license": "Apache-2.0",
|
|
34
|
+
"bit": {
|
|
35
|
+
"bindingPrefix": "@teambit",
|
|
36
|
+
"env": {},
|
|
37
|
+
"overrides": {
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@teambit/legacy": "-",
|
|
40
|
+
"@babel/runtime": "7.12.18",
|
|
41
|
+
"core-js": "^3.0.0",
|
|
42
|
+
"react-dom": "-",
|
|
43
|
+
"react": "-"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@teambit/legacy": "-",
|
|
47
|
+
"@types/mocha": "5.2.7",
|
|
48
|
+
"@types/testing-library__jest-dom": "5.9.5",
|
|
49
|
+
"@types/jest": "^26.0.0",
|
|
50
|
+
"@types/react-dom": "^17.0.5",
|
|
51
|
+
"@types/react": "^17.0.8",
|
|
52
|
+
"@types/node": "12.20.4",
|
|
53
|
+
"react-dom": "-",
|
|
54
|
+
"react": "-"
|
|
55
|
+
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"@teambit/legacy": "1.0.209",
|
|
58
|
+
"react-dom": "^16.8.0 || ^17.0.0",
|
|
59
|
+
"react": "^16.8.0 || ^17.0.0"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"private": false,
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=12.22.0"
|
|
66
|
+
},
|
|
67
|
+
"repository": {
|
|
68
|
+
"type": "git",
|
|
69
|
+
"url": "https://github.com/teambit/bit"
|
|
70
|
+
},
|
|
71
|
+
"keywords": [
|
|
72
|
+
"bit",
|
|
73
|
+
"bit-aspect",
|
|
74
|
+
"components",
|
|
75
|
+
"collaboration",
|
|
76
|
+
"web",
|
|
77
|
+
"react",
|
|
78
|
+
"react-components",
|
|
79
|
+
"angular",
|
|
80
|
+
"angular-components",
|
|
81
|
+
"vue",
|
|
82
|
+
"vue-components"
|
|
83
|
+
]
|
|
84
|
+
}
|
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
|
+
"resolveJsonModule": true,
|
|
19
|
+
"composite": true,
|
|
20
|
+
"emitDeclarationOnly": true,
|
|
21
|
+
"outDir": "dist",
|
|
22
|
+
"experimentalDecorators": true,
|
|
23
|
+
"emitDecoratorMetadata": true,
|
|
24
|
+
"allowSyntheticDefaultImports": true,
|
|
25
|
+
"strictPropertyInitialization": false,
|
|
26
|
+
"strict": true,
|
|
27
|
+
"noImplicitAny": false,
|
|
28
|
+
"rootDir": ".",
|
|
29
|
+
"preserveConstEnums": true
|
|
30
|
+
},
|
|
31
|
+
"exclude": [
|
|
32
|
+
"dist"
|
|
33
|
+
]
|
|
34
|
+
}
|
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
|
+
}
|