@teambit/component.ui.component-compare.utils.lazy-loading 0.0.0-6e9cb3022e8371e9240a8e69f4cec0d015b90e88
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/index.d.ts +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/lazy-loading.d.ts +2 -0
- package/dist/lazy-loading.js +10 -0
- package/dist/lazy-loading.js.map +1 -0
- package/dist/preview-1779105596694.js +7 -0
- package/index.ts +1 -0
- package/lazy-loading.ts +7 -0
- package/package.json +50 -0
- package/types/asset.d.ts +29 -0
- package/types/style.d.ts +42 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MaybeLazyLoaded, extractLazyLoadedData } from './lazy-loading';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractLazyLoadedData = void 0;
|
|
4
|
+
var lazy_loading_1 = require("./lazy-loading");
|
|
5
|
+
Object.defineProperty(exports, "extractLazyLoadedData", { enumerable: true, get: function () { return lazy_loading_1.extractLazyLoadedData; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,+CAAwE;AAA9C,qHAAA,qBAAqB,OAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractLazyLoadedData = extractLazyLoadedData;
|
|
4
|
+
const lodash_1 = require("lodash");
|
|
5
|
+
function extractLazyLoadedData(data) {
|
|
6
|
+
if ((0, lodash_1.isFunction)(data))
|
|
7
|
+
return data();
|
|
8
|
+
return data;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=lazy-loading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy-loading.js","sourceRoot":"","sources":["../lazy-loading.ts"],"names":[],"mappings":";;AAGA,sDAGC;AAND,mCAAoC;AAGpC,SAAgB,qBAAqB,CAAI,IAAyB;IAChE,IAAI,IAAA,mBAAU,EAAC,IAAI,CAAC;QAAE,OAAO,IAAI,EAAE,CAAC;IACpC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MaybeLazyLoaded, extractLazyLoadedData } from './lazy-loading';
|
package/lazy-loading.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@teambit/component.ui.component-compare.utils.lazy-loading",
|
|
3
|
+
"version": "0.0.0-6e9cb3022e8371e9240a8e69f4cec0d015b90e88",
|
|
4
|
+
"homepage": "https://bit.cloud/teambit/component/ui/component-compare/utils/lazy-loading",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"componentId": {
|
|
7
|
+
"scope": "teambit.component",
|
|
8
|
+
"name": "ui/component-compare/utils/lazy-loading",
|
|
9
|
+
"version": "6e9cb3022e8371e9240a8e69f4cec0d015b90e88"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"lodash": "4.17.21",
|
|
13
|
+
"core-js": "^3.0.0"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@types/lodash": "4.14.165",
|
|
17
|
+
"@types/mocha": "9.1.0",
|
|
18
|
+
"@types/node": "12.20.4",
|
|
19
|
+
"@types/react": "^19.0.0",
|
|
20
|
+
"@types/react-dom": "^19.0.0",
|
|
21
|
+
"@types/jest": "^26.0.0",
|
|
22
|
+
"@babel/runtime": "7.20.0",
|
|
23
|
+
"@types/testing-library__jest-dom": "5.9.5"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
27
|
+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
28
|
+
},
|
|
29
|
+
"license": "Apache-2.0",
|
|
30
|
+
"optionalDependencies": {},
|
|
31
|
+
"peerDependenciesMeta": {},
|
|
32
|
+
"private": false,
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=12.22.0"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "https://github.com/teambit/bit"
|
|
39
|
+
},
|
|
40
|
+
"keywords": [
|
|
41
|
+
"bit",
|
|
42
|
+
"components",
|
|
43
|
+
"collaboration",
|
|
44
|
+
"web",
|
|
45
|
+
"react",
|
|
46
|
+
"react-components",
|
|
47
|
+
"angular",
|
|
48
|
+
"angular-components"
|
|
49
|
+
]
|
|
50
|
+
}
|
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
|
+
}
|