loader-pack 1.2.4 → 2.0.0
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 +127 -38
- package/dist/LoaderPack.d.ts +15 -1
- package/dist/index.d.ts +2 -1
- package/dist/loader-pack.css +1 -1
- package/dist/loader-pack.js +273 -58
- package/dist/loader-pack.umd.cjs +1 -1
- package/dist/loaders/ClassicLoader.d.ts +2 -0
- package/dist/loaders/GlitchLoader.d.ts +2 -0
- package/dist/loaders/MinimalLoader.d.ts +2 -0
- package/dist/loaders/SpotlightLoader.d.ts +2 -0
- package/dist/loaders/TerminalLoader.d.ts +2 -0
- package/dist/standalone.d.ts +33 -0
- package/dist/types.d.ts +23 -5
- package/dist/withLoader.d.ts +9 -0
- package/package.json +13 -4
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standalone loader components — each one is a fully self-contained loader
|
|
3
|
+
* with sound, children-gating, and content-reveal built in.
|
|
4
|
+
*
|
|
5
|
+
* Import directly for tree-shaking:
|
|
6
|
+
* ```tsx
|
|
7
|
+
* import { TerminalLoader } from "loader-pack";
|
|
8
|
+
*
|
|
9
|
+
* <TerminalLoader name="Bhavya" theme="dark">
|
|
10
|
+
* <App />
|
|
11
|
+
* </TerminalLoader>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare const ClassicLoader: {
|
|
15
|
+
({ name, children, theme, sound, ambientSoundSrc, clickSoundSrc, marqueeText, }: import('./types').LoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const TerminalLoader: {
|
|
19
|
+
({ name, children, theme, sound, ambientSoundSrc, clickSoundSrc, marqueeText, }: import('./types').LoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const MinimalLoader: {
|
|
23
|
+
({ name, children, theme, sound, ambientSoundSrc, clickSoundSrc, marqueeText, }: import('./types').LoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const SpotlightLoader: {
|
|
27
|
+
({ name, children, theme, sound, ambientSoundSrc, clickSoundSrc, marqueeText, }: import('./types').LoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
export declare const GlitchLoader: {
|
|
31
|
+
({ name, children, theme, sound, ambientSoundSrc, clickSoundSrc, marqueeText, }: import('./types').LoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/** All available loader variants */
|
|
2
|
+
export type LoaderVariant = "classic" | "terminal" | "minimal" | "spotlight" | "glitch";
|
|
3
|
+
/** Internal — props every variant intro-screen receives */
|
|
4
|
+
export type VariantProps = {
|
|
5
|
+
name: string;
|
|
6
|
+
theme: "dark" | "light";
|
|
7
|
+
marqueeText: string;
|
|
8
|
+
/** Called when the variant's "start" action fires */
|
|
9
|
+
onStart: () => void;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Props accepted by every standalone loader
|
|
13
|
+
* (ClassicLoader, TerminalLoader, MinimalLoader, SpotlightLoader).
|
|
14
|
+
*/
|
|
15
|
+
export type LoaderProps = {
|
|
2
16
|
/** The name displayed in the center of the intro screen */
|
|
3
17
|
name: string;
|
|
4
18
|
/** Your main app content — rendered after the user clicks Start */
|
|
@@ -7,10 +21,6 @@ export type LoaderPackProps = {
|
|
|
7
21
|
theme?: "dark" | "light";
|
|
8
22
|
/** Play click/ambient sound effects. Default: false */
|
|
9
23
|
sound?: boolean;
|
|
10
|
-
/** Show an inverted-color circle cursor on the intro screen. Default: true */
|
|
11
|
-
cursor?: boolean;
|
|
12
|
-
/** Diameter of the cursor circle in pixels. Default: 34 */
|
|
13
|
-
cursorSize?: number;
|
|
14
24
|
/** Path to the ambient sound file played on mount. Uses bundled audio by default. */
|
|
15
25
|
ambientSoundSrc?: string;
|
|
16
26
|
/** Path to the click sound file played on Start. Uses bundled audio by default. */
|
|
@@ -18,3 +28,11 @@ export type LoaderPackProps = {
|
|
|
18
28
|
/** Custom marquee text. Has a built-in multilingual default. */
|
|
19
29
|
marqueeText?: string;
|
|
20
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* Props for the convenience `<LoaderPack>` component.
|
|
33
|
+
* Extends LoaderProps with a `variant` selector.
|
|
34
|
+
*/
|
|
35
|
+
export type LoaderPackProps = LoaderProps & {
|
|
36
|
+
/** Loader design variant. Default: "classic" */
|
|
37
|
+
variant?: LoaderVariant;
|
|
38
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LoaderProps, VariantProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Wraps a variant's intro-screen component into a full standalone loader.
|
|
4
|
+
* Handles: sound effects, started/children gating, content reveal animation.
|
|
5
|
+
*/
|
|
6
|
+
export declare function withLoader(Inner: React.ComponentType<VariantProps>, displayName: string): {
|
|
7
|
+
({ name, children, theme, sound, ambientSoundSrc, clickSoundSrc, marqueeText, }: LoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "loader-pack",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Beautiful animated intro/loader screens for React — 5 variants (classic, terminal, minimal, spotlight, glitch) with dark/light themes, sound effects, and tree-shakeable imports",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/loader-pack.umd.cjs",
|
|
7
7
|
"module": "dist/loader-pack.js",
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
"@types/react": "^19.2.7",
|
|
31
31
|
"@types/react-dom": "^19.2.3",
|
|
32
32
|
"@vitejs/plugin-react": "^5.1.1",
|
|
33
|
+
"react": "^19.2.4",
|
|
34
|
+
"react-dom": "^19.2.4",
|
|
33
35
|
"typescript": "~5.9.3",
|
|
34
36
|
"vite": "^7.3.1",
|
|
35
37
|
"vite-plugin-dts": "^5.0.0-beta.6"
|
|
@@ -39,11 +41,18 @@
|
|
|
39
41
|
"loader",
|
|
40
42
|
"intro-screen",
|
|
41
43
|
"animation",
|
|
42
|
-
"portfolio"
|
|
44
|
+
"portfolio",
|
|
45
|
+
"loading-screen",
|
|
46
|
+
"splash-screen",
|
|
47
|
+
"glitch",
|
|
48
|
+
"terminal",
|
|
49
|
+
"spotlight",
|
|
50
|
+
"dark-theme",
|
|
51
|
+
"react-component"
|
|
43
52
|
],
|
|
44
53
|
"license": "MIT",
|
|
45
54
|
"repository": {
|
|
46
55
|
"type": "git",
|
|
47
|
-
"url": "https://github.com/
|
|
56
|
+
"url": "https://github.com/bhavya1006/loader-pack"
|
|
48
57
|
}
|
|
49
58
|
}
|