react-loadly 2.0.2 → 2.1.1
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/README.md +392 -36
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +89 -5
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/types/@types/index.d.ts +3 -0
- package/dist/types/@types/index.d.ts.map +1 -1
- package/dist/types/@types/interfaces/IAutoSkeletonProps.d.ts +24 -0
- package/dist/types/@types/interfaces/IAutoSkeletonProps.d.ts.map +1 -0
- package/dist/types/@types/interfaces/IFallbackLoaderProps.d.ts +2 -0
- package/dist/types/@types/interfaces/IFallbackLoaderProps.d.ts.map +1 -1
- package/dist/types/@types/interfaces/IHeatmapLoaderProps.d.ts +8 -0
- package/dist/types/@types/interfaces/IHeatmapLoaderProps.d.ts.map +1 -0
- package/dist/types/@types/interfaces/IMorphLoaderProps.d.ts +8 -0
- package/dist/types/@types/interfaces/IMorphLoaderProps.d.ts.map +1 -0
- package/dist/types/@types/interfaces/IProgressRingLoaderProps.d.ts +8 -0
- package/dist/types/@types/interfaces/IProgressRingLoaderProps.d.ts.map +1 -0
- package/dist/types/@types/interfaces/ISkeletonLoaderProps.d.ts +2 -1
- package/dist/types/@types/interfaces/ISkeletonLoaderProps.d.ts.map +1 -1
- package/dist/types/@types/interfaces/ISpinDotsLoaderProps.d.ts +8 -0
- package/dist/types/@types/interfaces/ISpinDotsLoaderProps.d.ts.map +1 -0
- package/dist/types/@types/interfaces/index.d.ts +5 -0
- package/dist/types/@types/interfaces/index.d.ts.map +1 -1
- package/dist/types/@types/types/SkeletonVariantType.d.ts +2 -0
- package/dist/types/@types/types/SkeletonVariantType.d.ts.map +1 -0
- package/dist/types/@types/types/WaveDirectionType.d.ts +2 -0
- package/dist/types/@types/types/WaveDirectionType.d.ts.map +1 -0
- package/dist/types/@types/types/index.d.ts +2 -0
- package/dist/types/@types/types/index.d.ts.map +1 -1
- package/dist/types/AutoSkeletonExample.d.ts +3 -0
- package/dist/types/AutoSkeletonExample.d.ts.map +1 -0
- package/dist/types/components/organisms/AutoSkeletonLoader.d.ts +4 -0
- package/dist/types/components/organisms/AutoSkeletonLoader.d.ts.map +1 -0
- package/dist/types/components/organisms/FallbackLoader.d.ts.map +1 -1
- package/dist/types/components/organisms/HeatmapLoader.d.ts +4 -0
- package/dist/types/components/organisms/HeatmapLoader.d.ts.map +1 -0
- package/dist/types/components/organisms/MorphLoader.d.ts +4 -0
- package/dist/types/components/organisms/MorphLoader.d.ts.map +1 -0
- package/dist/types/components/organisms/ProgressRingLoader.d.ts +4 -0
- package/dist/types/components/organisms/ProgressRingLoader.d.ts.map +1 -0
- package/dist/types/components/organisms/SkeletonLoader.d.ts.map +1 -1
- package/dist/types/components/organisms/SpinDotsLoader.d.ts +4 -0
- package/dist/types/components/organisms/SpinDotsLoader.d.ts.map +1 -0
- package/dist/types/components/organisms/index.d.ts +6 -1
- package/dist/types/components/organisms/index.d.ts.map +1 -1
- package/dist/types/constants/defaults.d.ts +17 -0
- package/dist/types/constants/defaults.d.ts.map +1 -0
- package/dist/types/constants/index.d.ts +2 -0
- package/dist/types/constants/index.d.ts.map +1 -0
- package/dist/types/hooks/index.d.ts +1 -1
- package/dist/types/hooks/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/main.d.ts +2 -0
- package/dist/types/main.d.ts.map +1 -0
- package/dist/types/utils/propUtils.d.ts +4 -1
- package/dist/types/utils/propUtils.d.ts.map +1 -1
- package/package.json +5 -1
- package/dist/types/__tests__/ElementLoader.example.d.ts +0 -4
- package/dist/types/__tests__/ElementLoader.example.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressRingLoader.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ProgressRingLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAUxF,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA+IjE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonLoader.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/SkeletonLoader.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAsB,EAAE,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAoBhF,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"SkeletonLoader.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/SkeletonLoader.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAsB,EAAE,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAoBhF,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,oBAAoB,CAsNnD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpinDotsLoader.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/SpinDotsLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAUhF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA4GzD,CAAC"}
|
|
@@ -15,5 +15,10 @@ export { SkeletonLoader } from "./SkeletonLoader";
|
|
|
15
15
|
export { SpinLoader } from "./SpinLoader";
|
|
16
16
|
export { TypingLoader } from "./TypingLoader";
|
|
17
17
|
export { WaveLoader } from "./WaveLoader";
|
|
18
|
-
export
|
|
18
|
+
export { AutoSkeletonLoader } from "./AutoSkeletonLoader";
|
|
19
|
+
export { ProgressRingLoader } from "./ProgressRingLoader";
|
|
20
|
+
export { MorphLoader } from "./MorphLoader";
|
|
21
|
+
export { SpinDotsLoader } from "./SpinDotsLoader";
|
|
22
|
+
export { HeatmapLoader } from "./HeatmapLoader";
|
|
23
|
+
export type { IFallbackLoaderProps, IFluidLoaderProps, IGeometricLoaderProps, ILogoLoaderProps, ITextLoaderProps, IBaseLoaderProps, ISkeletonLoaderProps, IElementLoaderProps, ILoaderCSSVariables, ILoaderState, IUseLoaderStateReturn, IUseLoaderStateOptions, IAutoSkeletonProps, IProgressRingLoaderProps, IMorphLoaderProps, ISpinDotsLoaderProps, IHeatmapLoaderProps, } from "@/@types/interfaces";
|
|
19
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC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AAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EACV,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IBaseLoaderProps } from "../@types/interfaces/IBaseLoaderProps";
|
|
2
|
+
export declare const LIB_DEFAULTS: IBaseLoaderProps;
|
|
3
|
+
/**
|
|
4
|
+
* Get the current global default props
|
|
5
|
+
* @returns Current global defaults
|
|
6
|
+
*/
|
|
7
|
+
export declare function getGlobalDefaults(): IBaseLoaderProps;
|
|
8
|
+
/**
|
|
9
|
+
* Set new global default props
|
|
10
|
+
* @param newDefaults - Partial object with new default values
|
|
11
|
+
*/
|
|
12
|
+
export declare function setGlobalDefaults(newDefaults: Partial<IBaseLoaderProps>): void;
|
|
13
|
+
/**
|
|
14
|
+
* Reset global defaults to library defaults
|
|
15
|
+
*/
|
|
16
|
+
export declare function resetGlobalDefaults(): void;
|
|
17
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/constants/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAGzE,eAAO,MAAM,YAAY,EAAE,gBAS1B,CAAC;AAKF;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,gBAAgB,CAEpD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAE9E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { useLoaderState } from "./useLoaderState";
|
|
2
2
|
export { useMultipleLoaderStates } from "./useMultipleLoaderStates";
|
|
3
3
|
export { useAsyncLoader } from "./useAsyncLoader";
|
|
4
|
-
export type { ILoaderState, IUseLoaderStateOptions, IUseLoaderStateReturn
|
|
4
|
+
export type { ILoaderState, IUseLoaderStateOptions, IUseLoaderStateReturn } from "@/@types";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,YAAY,EAAE,YAAY,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAIxB,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AAGnC,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAIxB,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AAGnC,cAAc,SAAS,CAAC;AAGxB,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.tsx"],"names":[],"mappings":"AAEA,OAAO,mBAAmB,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { ILoaderCSSVariables } from "@/@types";
|
|
2
2
|
/**
|
|
3
3
|
* Merges default props with user props, handling undefined values gracefully
|
|
4
|
+
* This utility ensures that all default values from IBaseLoaderProps are applied
|
|
5
|
+
* while allowing user props to override them.
|
|
6
|
+
*
|
|
4
7
|
* @param defaultProps - The default props to merge
|
|
5
8
|
* @param userProps - The user provided props
|
|
6
|
-
* @returns Merged props object
|
|
9
|
+
* @returns Merged props object with defaults applied
|
|
7
10
|
*/
|
|
8
11
|
export declare function mergeProps<T extends object, U extends object>(defaultProps: T, userProps: U): T & U;
|
|
9
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/propUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C
|
|
1
|
+
{"version":3,"file":"propUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/propUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C;;;;;;;;GAQG;AAEH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAAE,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAWnG;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,QAAQ,SAAS,GAAG,MAAM,CAIzF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,mBAAmB,GAAG,KAAK,CAAC,aAAa,CAUxF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-loadly",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A professional React loaders package with high-performance, customizable loader components",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -69,6 +69,10 @@
|
|
|
69
69
|
"nextjs",
|
|
70
70
|
"components",
|
|
71
71
|
"ui",
|
|
72
|
+
"nextjs spinner",
|
|
73
|
+
"nextjs loaders",
|
|
74
|
+
"nextjs loading",
|
|
75
|
+
"nextjs spinners",
|
|
72
76
|
"react loaders",
|
|
73
77
|
"react loader",
|
|
74
78
|
"react spinner",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ElementLoader.example.d.ts","sourceRoot":"","sources":["../../../src/__tests__/ElementLoader.example.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,QAAA,MAAM,oBAAoB,yBA8CzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|