@gfazioli/mantine-scene 1.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.
Files changed (87) hide show
  1. package/CODE_OF_CONDUCT.md +128 -0
  2. package/CONTRIBUTING.md +18 -0
  3. package/LICENSE +21 -0
  4. package/README.md +120 -0
  5. package/dist/cjs/Scene.cjs +163 -0
  6. package/dist/cjs/Scene.cjs.map +1 -0
  7. package/dist/cjs/Scene.context.cjs +12 -0
  8. package/dist/cjs/Scene.context.cjs.map +1 -0
  9. package/dist/cjs/Scene.module.css.cjs +7 -0
  10. package/dist/cjs/Scene.module.css.cjs.map +1 -0
  11. package/dist/cjs/SceneAurora/SceneAurora.cjs +83 -0
  12. package/dist/cjs/SceneAurora/SceneAurora.cjs.map +1 -0
  13. package/dist/cjs/SceneDotGrid/SceneDotGrid.cjs +78 -0
  14. package/dist/cjs/SceneDotGrid/SceneDotGrid.cjs.map +1 -0
  15. package/dist/cjs/SceneGlow/SceneGlow.cjs +62 -0
  16. package/dist/cjs/SceneGlow/SceneGlow.cjs.map +1 -0
  17. package/dist/cjs/SceneGradient/SceneGradient.cjs +72 -0
  18. package/dist/cjs/SceneGradient/SceneGradient.cjs.map +1 -0
  19. package/dist/cjs/SceneMesh/SceneMesh.cjs +47 -0
  20. package/dist/cjs/SceneMesh/SceneMesh.cjs.map +1 -0
  21. package/dist/cjs/SceneNoise/SceneNoise.cjs +58 -0
  22. package/dist/cjs/SceneNoise/SceneNoise.cjs.map +1 -0
  23. package/dist/cjs/SceneShootingStar/SceneShootingStar.cjs +97 -0
  24. package/dist/cjs/SceneShootingStar/SceneShootingStar.cjs.map +1 -0
  25. package/dist/cjs/SceneSnow/SceneSnow.cjs +71 -0
  26. package/dist/cjs/SceneSnow/SceneSnow.cjs.map +1 -0
  27. package/dist/cjs/SceneStarField/SceneStarField.cjs +91 -0
  28. package/dist/cjs/SceneStarField/SceneStarField.cjs.map +1 -0
  29. package/dist/cjs/SceneStarWarp/SceneStarWarp.cjs +87 -0
  30. package/dist/cjs/SceneStarWarp/SceneStarWarp.cjs.map +1 -0
  31. package/dist/cjs/index.cjs +11 -0
  32. package/dist/cjs/index.cjs.map +1 -0
  33. package/dist/cjs/prng.cjs +15 -0
  34. package/dist/cjs/prng.cjs.map +1 -0
  35. package/dist/cjs/use-responsive-value.cjs +13 -0
  36. package/dist/cjs/use-responsive-value.cjs.map +1 -0
  37. package/dist/esm/Scene.context.mjs +9 -0
  38. package/dist/esm/Scene.context.mjs.map +1 -0
  39. package/dist/esm/Scene.mjs +161 -0
  40. package/dist/esm/Scene.mjs.map +1 -0
  41. package/dist/esm/Scene.module.css.mjs +5 -0
  42. package/dist/esm/Scene.module.css.mjs.map +1 -0
  43. package/dist/esm/SceneAurora/SceneAurora.mjs +81 -0
  44. package/dist/esm/SceneAurora/SceneAurora.mjs.map +1 -0
  45. package/dist/esm/SceneDotGrid/SceneDotGrid.mjs +76 -0
  46. package/dist/esm/SceneDotGrid/SceneDotGrid.mjs.map +1 -0
  47. package/dist/esm/SceneGlow/SceneGlow.mjs +60 -0
  48. package/dist/esm/SceneGlow/SceneGlow.mjs.map +1 -0
  49. package/dist/esm/SceneGradient/SceneGradient.mjs +70 -0
  50. package/dist/esm/SceneGradient/SceneGradient.mjs.map +1 -0
  51. package/dist/esm/SceneMesh/SceneMesh.mjs +45 -0
  52. package/dist/esm/SceneMesh/SceneMesh.mjs.map +1 -0
  53. package/dist/esm/SceneNoise/SceneNoise.mjs +56 -0
  54. package/dist/esm/SceneNoise/SceneNoise.mjs.map +1 -0
  55. package/dist/esm/SceneShootingStar/SceneShootingStar.mjs +95 -0
  56. package/dist/esm/SceneShootingStar/SceneShootingStar.mjs.map +1 -0
  57. package/dist/esm/SceneSnow/SceneSnow.mjs +69 -0
  58. package/dist/esm/SceneSnow/SceneSnow.mjs.map +1 -0
  59. package/dist/esm/SceneStarField/SceneStarField.mjs +89 -0
  60. package/dist/esm/SceneStarField/SceneStarField.mjs.map +1 -0
  61. package/dist/esm/SceneStarWarp/SceneStarWarp.mjs +85 -0
  62. package/dist/esm/SceneStarWarp/SceneStarWarp.mjs.map +1 -0
  63. package/dist/esm/index.mjs +3 -0
  64. package/dist/esm/index.mjs.map +1 -0
  65. package/dist/esm/prng.mjs +13 -0
  66. package/dist/esm/prng.mjs.map +1 -0
  67. package/dist/esm/use-responsive-value.mjs +11 -0
  68. package/dist/esm/use-responsive-value.mjs.map +1 -0
  69. package/dist/styles.css +1 -0
  70. package/dist/styles.layer.css +1 -0
  71. package/dist/types/Scene.context.d.ts +20 -0
  72. package/dist/types/Scene.d.ts +88 -0
  73. package/dist/types/SceneAurora/SceneAurora.d.ts +40 -0
  74. package/dist/types/SceneDotGrid/SceneDotGrid.d.ts +49 -0
  75. package/dist/types/SceneGlow/SceneGlow.d.ts +65 -0
  76. package/dist/types/SceneGradient/SceneGradient.d.ts +62 -0
  77. package/dist/types/SceneMesh/SceneMesh.d.ts +40 -0
  78. package/dist/types/SceneNoise/SceneNoise.d.ts +40 -0
  79. package/dist/types/SceneShootingStar/SceneShootingStar.d.ts +48 -0
  80. package/dist/types/SceneSnow/SceneSnow.d.ts +49 -0
  81. package/dist/types/SceneStarField/SceneStarField.d.ts +45 -0
  82. package/dist/types/SceneStarWarp/SceneStarWarp.d.ts +57 -0
  83. package/dist/types/index.d.mts +4 -0
  84. package/dist/types/index.d.ts +4 -0
  85. package/dist/types/prng.d.ts +2 -0
  86. package/dist/types/use-responsive-value.d.ts +9 -0
  87. package/package.json +51 -0
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ - Demonstrating empathy and kindness toward other people
21
+ - Being respectful of differing opinions, viewpoints, and experiences
22
+ - Giving and gracefully accepting constructive feedback
23
+ - Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ - Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ - The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ - Trolling, insulting or derogatory comments, and personal or political attacks
33
+ - Public or private harassment
34
+ - Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ - Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ giovambattista.fazioli@gmail.com.
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
@@ -0,0 +1,18 @@
1
+ # Contributing
2
+
3
+ 👏 Thank you for considering contributing to this project.
4
+
5
+ ## Bug Reports
6
+
7
+ When encountering issues with software or applications, submitting a detailed bug report can significantly help developers in understanding and resolving the problem efficiently. A well-written bug report should include clear steps to reproduce the issue, the expected behavior, and the actual outcome.
8
+
9
+ Furthermore, providing information such as system specifications, error messages, and screenshots can aid in pinpointing the root cause of the bug. By utilizing platforms like GitHub, users can create issue tickets with relevant details, facilitating effective communication between users and developers. Remember, a comprehensive bug report not only assists in bug resolution but also improves the overall quality of the software.
10
+
11
+ 🐛 [GitHub issue](https://github.com/gfazioli/mantine-scene/issues)
12
+
13
+
14
+ ## Code contributors
15
+
16
+ Here's a list of all the people who have contributed to the codebase of this project so far:
17
+
18
+ [![Contributors list](https://contrib.rocks/image?repo=gfazioli/mantine-scene)](https://github.com/gfazioli/mantine-scene/graphs/contributors)
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Giovambattista Fazioli
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,120 @@
1
+ # Mantine Scene Component
2
+
3
+ <img alt="Mantine Scene" src="https://github.com/gfazioli/mantine-scene/blob/master/logo.jpeg" />
4
+
5
+ <div align="center">
6
+
7
+ [![NPM version](https://img.shields.io/npm/v/%40gfazioli%2Fmantine-scene?style=for-the-badge)](https://www.npmjs.com/package/@gfazioli/mantine-scene)
8
+ [![NPM Downloads](https://img.shields.io/npm/dm/%40gfazioli%2Fmantine-scene?style=for-the-badge)](https://www.npmjs.com/package/@gfazioli/mantine-scene)
9
+ [![NPM Downloads](https://img.shields.io/npm/dy/%40gfazioli%2Fmantine-scene?style=for-the-badge&label=%20&color=f90)](https://www.npmjs.com/package/@gfazioli/mantine-scene)
10
+ ![NPM License](https://img.shields.io/npm/l/%40gfazioli%2Fmantine-scene?style=for-the-badge)
11
+
12
+ ---
13
+
14
+ [<kbd> <br/> ❤️ If this component has been useful to you or your team, please consider becoming a sponsor <br/> </kbd>](https://github.com/sponsors/gfazioli?o=esc)
15
+
16
+ </div>
17
+
18
+ ## Overview
19
+
20
+ This component is created on top of the [Mantine](https://mantine.dev/) library.
21
+
22
+ [Mantine Scene](https://gfazioli.github.io/mantine-scene/) is a decorative background container that composes multiple visual layers to create rich, atmospheric backgrounds for your React applications. Place it behind your content and combine sub-components to build anything from subtle gradients to full starfield environments.
23
+
24
+ ## Sub-components
25
+
26
+ | Component | Description |
27
+ |-----------|-------------|
28
+ | `Scene.Gradient` | Radial, linear, or conic gradient with optional rotate/pulse animation |
29
+ | `Scene.Glow` | Floating, animated glow blobs with float/pulse/breathe variants |
30
+ | `Scene.DotGrid` | Repeating dot pattern with stagger, fade masks, and twinkle animation |
31
+ | `Scene.Mesh` | Multi-stop radial gradient overlay simulating a mesh gradient |
32
+ | `Scene.Noise` | SVG-based film grain texture with configurable seed, type, and color tint |
33
+ | `Scene.StarField` | CSS-only star field with deterministic PRNG positioning and twinkle animation |
34
+ | `Scene.StarWarp` | Hyperspace warp-speed effect with configurable focal point and direction |
35
+ | `Scene.ShootingStar` | Animated shooting star trails at configurable angles and intervals |
36
+ | `Scene.Snow` | Falling snowflakes with horizontal drift and wind control |
37
+ | `Scene.Aurora` | Shimmering aurora borealis bands with wave animation |
38
+
39
+ ## Features
40
+
41
+ - 🎨 **Theme Integration**: All color props accept Mantine theme colors (`MantineColor`)
42
+ - 🧩 **Composable**: Freely combine any number of sub-components — layer order follows DOM order
43
+ - ✨ **Rich Animations**: GPU-accelerated CSS animations (transform/opacity) with per-component controls
44
+ - 🖱️ **Interactive Mode**: Enable mouse tracking — Glow, Gradient, and StarWarp react to cursor position with configurable LERP easing
45
+ - 📱 **Responsive Props**: Key props (`count`, `size`, `blur`, `spacing`) accept Mantine responsive objects like `{ base: 50, md: 100 }`
46
+ - ♿ **Accessibility**: `aria-hidden="true"` by default; respects `prefers-reduced-motion` with configurable `reducedMotion` prop
47
+ - 🖥️ **Fullscreen**: Set `fullscreen` to cover the entire viewport with `position: fixed`
48
+ - 🎨 **Styles API**: Full Mantine Styles API support for all sub-components
49
+ - 📦 **TypeScript**: Complete type safety with exported prop interfaces and factory types
50
+
51
+ > [!note]
52
+ >
53
+ > → [Demo and Documentation](https://gfazioli.github.io/mantine-scene/) → [More Mantine Components](https://mantine-extensions.vercel.app/)
54
+
55
+ ## Installation
56
+
57
+ ```sh
58
+ npm install @gfazioli/mantine-scene
59
+ ```
60
+ or
61
+
62
+ ```sh
63
+ yarn add @gfazioli/mantine-scene
64
+ ```
65
+
66
+ After installation import package styles at the root of your application:
67
+
68
+ ```tsx
69
+ import '@gfazioli/mantine-scene/styles.css';
70
+ ```
71
+
72
+ ## Usage
73
+
74
+ ```tsx
75
+ import { Scene } from '@gfazioli/mantine-scene';
76
+ import { Box, Text } from '@mantine/core';
77
+
78
+ function Demo() {
79
+ return (
80
+ <Box pos="relative" h={400}>
81
+ <Scene>
82
+ <Scene.StarField count={{ base: 50, md: 100 }} twinkle />
83
+ <Scene.Gradient from="violet" fromOpacity={0.15} />
84
+ <Scene.Glow color="violet" size={400} blur={120} opacity={0.3} top="20%" left="30%" />
85
+ <Scene.DotGrid color="gray" opacity={0.3} spacing={24} />
86
+ <Scene.Noise opacity={0.025} />
87
+ </Scene>
88
+ <Box pos="relative" style={{ zIndex: 1 }} p="xl">
89
+ <Text size="xl" fw={700} c="white">Your content here</Text>
90
+ </Box>
91
+ </Box>
92
+ );
93
+ }
94
+ ```
95
+
96
+ ## Sponsor
97
+
98
+ <div align="center">
99
+
100
+ [<kbd> <br/> ❤️ If this component has been useful to you or your team, please consider becoming a sponsor <br/> </kbd>](https://github.com/sponsors/gfazioli?o=esc)
101
+
102
+ </div>
103
+
104
+ Your support helps me:
105
+
106
+ - Keep the project actively maintained with timely bug fixes and security updates
107
+ - Add new features, improve performance, and refine the developer experience
108
+ - Expand test coverage and documentation for smoother adoption
109
+ - Ensure long‑term sustainability without relying on ad hoc free time
110
+ - Prioritize community requests and roadmap items that matter most
111
+
112
+ Open source thrives when those who benefit can give back—even a small monthly contribution makes a real difference. Sponsorships help cover maintenance time, infrastructure, and the countless invisible tasks that keep a project healthy.
113
+
114
+ Your help truly matters.
115
+
116
+ 💚 [Become a sponsor](https://github.com/sponsors/gfazioli?o=esc) today and help me keep this project reliable, up‑to‑date, and growing for everyone.
117
+
118
+ ---
119
+
120
+ [![Star History Chart](https://api.star-history.com/svg?repos=gfazioli/mantine-scene&type=Timeline)](https://www.star-history.com/#gfazioli/mantine-scene&Timeline)
@@ -0,0 +1,163 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ var React = require('react');
5
+ var core = require('@mantine/core');
6
+ var Scene_context = require('./Scene.context.cjs');
7
+ var SceneAurora = require('./SceneAurora/SceneAurora.cjs');
8
+ var SceneDotGrid = require('./SceneDotGrid/SceneDotGrid.cjs');
9
+ var SceneGlow = require('./SceneGlow/SceneGlow.cjs');
10
+ var SceneGradient = require('./SceneGradient/SceneGradient.cjs');
11
+ var SceneMesh = require('./SceneMesh/SceneMesh.cjs');
12
+ var SceneNoise = require('./SceneNoise/SceneNoise.cjs');
13
+ var SceneShootingStar = require('./SceneShootingStar/SceneShootingStar.cjs');
14
+ var SceneSnow = require('./SceneSnow/SceneSnow.cjs');
15
+ var SceneStarField = require('./SceneStarField/SceneStarField.cjs');
16
+ var SceneStarWarp = require('./SceneStarWarp/SceneStarWarp.cjs');
17
+ var Scene_module = require('./Scene.module.css.cjs');
18
+
19
+ const defaultProps = {
20
+ fullscreen: false,
21
+ zIndex: 0,
22
+ reducedMotion: "auto",
23
+ interactive: false,
24
+ interactiveEasing: 0.12
25
+ };
26
+ const varsResolver = core.createVarsResolver((_, { zIndex }) => ({
27
+ root: {
28
+ "--scene-z-index": zIndex !== void 0 ? String(zIndex) : "0"
29
+ }
30
+ }));
31
+ const Scene = core.factory((_props, ref) => {
32
+ const props = core.useProps("Scene", defaultProps, _props);
33
+ const {
34
+ fullscreen,
35
+ zIndex,
36
+ reducedMotion,
37
+ interactive,
38
+ interactiveEasing,
39
+ children,
40
+ classNames,
41
+ style,
42
+ styles,
43
+ unstyled,
44
+ vars,
45
+ className,
46
+ mod,
47
+ ...others
48
+ } = props;
49
+ const getStyles = core.useStyles({
50
+ name: "Scene",
51
+ props,
52
+ classes: Scene_module,
53
+ className,
54
+ style,
55
+ classNames,
56
+ styles,
57
+ unstyled,
58
+ vars,
59
+ varsResolver
60
+ });
61
+ const containerRef = React.useRef(null);
62
+ const [mouse, setMouse] = React.useState(null);
63
+ const targetRef = React.useRef({ x: 50, y: 50 });
64
+ const smoothRef = React.useRef({ x: 50, y: 50 });
65
+ const hasReceivedInput = React.useRef(false);
66
+ React.useEffect(() => {
67
+ if (!interactive) {
68
+ return;
69
+ }
70
+ const onPointerMove = (e) => {
71
+ const rect = containerRef.current?.getBoundingClientRect();
72
+ if (!rect) {
73
+ return;
74
+ }
75
+ const x = (e.clientX - rect.left) / rect.width * 100;
76
+ const y = (e.clientY - rect.top) / rect.height * 100;
77
+ targetRef.current = {
78
+ x: Math.max(0, Math.min(100, x)),
79
+ y: Math.max(0, Math.min(100, y))
80
+ };
81
+ hasReceivedInput.current = true;
82
+ };
83
+ document.addEventListener("pointermove", onPointerMove, { passive: true });
84
+ return () => document.removeEventListener("pointermove", onPointerMove);
85
+ }, [interactive]);
86
+ React.useEffect(() => {
87
+ if (!interactive) {
88
+ setMouse(null);
89
+ hasReceivedInput.current = false;
90
+ return;
91
+ }
92
+ const easing = interactiveEasing ?? 0.12;
93
+ let frameId = 0;
94
+ let active = true;
95
+ const animate = () => {
96
+ if (!active) {
97
+ return;
98
+ }
99
+ if (!hasReceivedInput.current) {
100
+ frameId = requestAnimationFrame(animate);
101
+ return;
102
+ }
103
+ const prev = smoothRef.current;
104
+ const target = targetRef.current;
105
+ if (easing >= 1) {
106
+ smoothRef.current = target;
107
+ setMouse({ ...target });
108
+ } else {
109
+ const dx = target.x - prev.x;
110
+ const dy = target.y - prev.y;
111
+ const nextX = Math.abs(dx) < 0.01 ? target.x : prev.x + dx * easing;
112
+ const nextY = Math.abs(dy) < 0.01 ? target.y : prev.y + dy * easing;
113
+ if (nextX !== prev.x || nextY !== prev.y) {
114
+ smoothRef.current = { x: nextX, y: nextY };
115
+ setMouse({ x: nextX, y: nextY });
116
+ }
117
+ }
118
+ frameId = requestAnimationFrame(animate);
119
+ };
120
+ frameId = requestAnimationFrame(animate);
121
+ return () => {
122
+ active = false;
123
+ cancelAnimationFrame(frameId);
124
+ };
125
+ }, [interactive, interactiveEasing]);
126
+ const mergeRefs = React.useCallback(
127
+ (node) => {
128
+ containerRef.current = node;
129
+ if (typeof ref === "function") {
130
+ ref(node);
131
+ } else if (ref) {
132
+ ref.current = node;
133
+ }
134
+ },
135
+ [ref]
136
+ );
137
+ return /* @__PURE__ */ React.createElement(Scene_context.SceneProvider, { value: { getStyles, mouse, fullscreen: !!fullscreen } }, /* @__PURE__ */ React.createElement(
138
+ core.Box,
139
+ {
140
+ ref: mergeRefs,
141
+ "aria-hidden": "true",
142
+ ...getStyles("root"),
143
+ ...others,
144
+ mod: [{ fullscreen, "reduced-motion": reducedMotion }, mod]
145
+ },
146
+ children
147
+ ));
148
+ });
149
+ Scene.classes = Scene_module;
150
+ Scene.displayName = "Scene";
151
+ Scene.Gradient = SceneGradient.SceneGradient;
152
+ Scene.DotGrid = SceneDotGrid.SceneDotGrid;
153
+ Scene.Glow = SceneGlow.SceneGlow;
154
+ Scene.Mesh = SceneMesh.SceneMesh;
155
+ Scene.Noise = SceneNoise.SceneNoise;
156
+ Scene.StarField = SceneStarField.SceneStarField;
157
+ Scene.ShootingStar = SceneShootingStar.SceneShootingStar;
158
+ Scene.Snow = SceneSnow.SceneSnow;
159
+ Scene.Aurora = SceneAurora.SceneAurora;
160
+ Scene.StarWarp = SceneStarWarp.SceneStarWarp;
161
+
162
+ exports.Scene = Scene;
163
+ //# sourceMappingURL=Scene.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scene.cjs","sources":["../../src/Scene.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n Factory,\n factory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport { SceneProvider, type SceneMousePosition } from './Scene.context';\nimport { SceneAurora } from './SceneAurora/SceneAurora';\nimport { SceneDotGrid } from './SceneDotGrid/SceneDotGrid';\nimport { SceneGlow } from './SceneGlow/SceneGlow';\nimport { SceneGradient } from './SceneGradient/SceneGradient';\nimport { SceneMesh } from './SceneMesh/SceneMesh';\nimport { SceneNoise } from './SceneNoise/SceneNoise';\nimport { SceneShootingStar } from './SceneShootingStar/SceneShootingStar';\nimport { SceneSnow } from './SceneSnow/SceneSnow';\nimport { SceneStarField } from './SceneStarField/SceneStarField';\nimport { SceneStarWarp } from './SceneStarWarp/SceneStarWarp';\nimport classes from './Scene.module.css';\n\nexport type SceneStylesNames =\n | 'root'\n | 'gradient'\n | 'dotGrid'\n | 'glow'\n | 'mesh'\n | 'noise'\n | 'starField'\n | 'shootingStar'\n | 'snow'\n | 'aurora'\n | 'starWarp';\n\nexport type SceneCssVariables = {\n root: '--scene-z-index';\n};\n\nexport interface SceneBaseProps {\n /** Whether the scene covers the full viewport (fixed position) or acts as a contained box\n * @default false\n */\n fullscreen?: boolean;\n\n /** z-index when fullscreen is true\n * @default 0\n */\n zIndex?: number;\n\n /** Controls animation behavior for prefers-reduced-motion: 'auto' respects system preference, 'always' disables all animations, 'never' keeps animations regardless\n * @default 'auto'\n */\n reducedMotion?: 'auto' | 'always' | 'never';\n\n /** Enable mouse tracking — sub-components can react to the cursor position\n * @default false\n */\n interactive?: boolean;\n\n /** Easing factor for interactive mouse tracking (0 to 1). Lower values result in slower, smoother following. Set to 1 for instant tracking (no easing).\n * @default 0.12\n */\n interactiveEasing?: number;\n\n /** Scene content (compound sub-components: Scene.Gradient, Scene.Glow, etc.) */\n children?: React.ReactNode;\n}\n\nexport interface SceneProps extends BoxProps, SceneBaseProps, StylesApiProps<SceneFactory> {}\n\nexport type SceneFactory = Factory<{\n props: SceneProps;\n ref: HTMLDivElement;\n stylesNames: SceneStylesNames;\n vars: SceneCssVariables;\n staticComponents: {\n Gradient: typeof SceneGradient;\n DotGrid: typeof SceneDotGrid;\n Glow: typeof SceneGlow;\n Mesh: typeof SceneMesh;\n Noise: typeof SceneNoise;\n StarField: typeof SceneStarField;\n ShootingStar: typeof SceneShootingStar;\n Snow: typeof SceneSnow;\n Aurora: typeof SceneAurora;\n StarWarp: typeof SceneStarWarp;\n };\n}>;\n\nconst defaultProps: Partial<SceneProps> = {\n fullscreen: false,\n zIndex: 0,\n reducedMotion: 'auto',\n interactive: false,\n interactiveEasing: 0.12,\n};\n\nconst varsResolver = createVarsResolver<SceneFactory>((_, { zIndex }) => ({\n root: {\n '--scene-z-index': zIndex !== undefined ? String(zIndex) : '0',\n },\n}));\n\nexport const Scene = factory<SceneFactory>((_props, ref) => {\n const props = useProps('Scene', defaultProps, _props);\n const {\n fullscreen,\n zIndex,\n reducedMotion,\n interactive,\n interactiveEasing,\n children,\n\n classNames,\n style,\n styles,\n unstyled,\n vars,\n className,\n mod,\n ...others\n } = props;\n\n const getStyles = useStyles<SceneFactory>({\n name: 'Scene',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n varsResolver,\n });\n\n const containerRef = useRef<HTMLDivElement>(null);\n const [mouse, setMouse] = useState<SceneMousePosition | null>(null);\n const targetRef = useRef<SceneMousePosition>({ x: 50, y: 50 });\n const smoothRef = useRef<SceneMousePosition>({ x: 50, y: 50 });\n const hasReceivedInput = useRef(false);\n\n // Track raw cursor position on the full document\n useEffect(() => {\n if (!interactive) {\n return;\n }\n\n const onPointerMove = (e: PointerEvent) => {\n const rect = containerRef.current?.getBoundingClientRect();\n if (!rect) {\n return;\n }\n\n const x = ((e.clientX - rect.left) / rect.width) * 100;\n const y = ((e.clientY - rect.top) / rect.height) * 100;\n\n // Clamp to 0-100 so the position stays meaningful even when mouse is outside\n targetRef.current = {\n x: Math.max(0, Math.min(100, x)),\n y: Math.max(0, Math.min(100, y)),\n };\n hasReceivedInput.current = true;\n };\n\n document.addEventListener('pointermove', onPointerMove, { passive: true });\n return () => document.removeEventListener('pointermove', onPointerMove);\n }, [interactive]);\n\n // LERP smoothing via requestAnimationFrame\n useEffect(() => {\n if (!interactive) {\n setMouse(null);\n hasReceivedInput.current = false;\n return;\n }\n\n const easing = interactiveEasing ?? 0.12;\n let frameId = 0;\n let active = true;\n\n const animate = () => {\n if (!active) {\n return;\n }\n\n if (!hasReceivedInput.current) {\n frameId = requestAnimationFrame(animate);\n return;\n }\n\n const prev = smoothRef.current;\n const target = targetRef.current;\n\n if (easing >= 1) {\n // Instant tracking — no easing\n smoothRef.current = target;\n setMouse({ ...target });\n } else {\n const dx = target.x - prev.x;\n const dy = target.y - prev.y;\n const nextX = Math.abs(dx) < 0.01 ? target.x : prev.x + dx * easing;\n const nextY = Math.abs(dy) < 0.01 ? target.y : prev.y + dy * easing;\n\n if (nextX !== prev.x || nextY !== prev.y) {\n smoothRef.current = { x: nextX, y: nextY };\n setMouse({ x: nextX, y: nextY });\n }\n }\n\n frameId = requestAnimationFrame(animate);\n };\n\n frameId = requestAnimationFrame(animate);\n return () => {\n active = false;\n cancelAnimationFrame(frameId);\n };\n }, [interactive, interactiveEasing]);\n\n const mergeRefs = useCallback(\n (node: HTMLDivElement | null) => {\n (containerRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n },\n [ref]\n );\n\n return (\n <SceneProvider value={{ getStyles, mouse, fullscreen: !!fullscreen }}>\n <Box\n ref={mergeRefs}\n aria-hidden=\"true\"\n {...getStyles('root')}\n {...others}\n mod={[{ fullscreen, 'reduced-motion': reducedMotion }, mod]}\n >\n {children}\n </Box>\n </SceneProvider>\n );\n});\n\nScene.classes = classes;\nScene.displayName = 'Scene';\nScene.Gradient = SceneGradient;\nScene.DotGrid = SceneDotGrid;\nScene.Glow = SceneGlow;\nScene.Mesh = SceneMesh;\nScene.Noise = SceneNoise;\nScene.StarField = SceneStarField;\nScene.ShootingStar = SceneShootingStar;\nScene.Snow = SceneSnow;\nScene.Aurora = SceneAurora;\nScene.StarWarp = SceneStarWarp;\n\nexport type { SceneGradientProps } from './SceneGradient/SceneGradient';\nexport type { SceneDotGridProps } from './SceneDotGrid/SceneDotGrid';\nexport type { SceneGlowProps } from './SceneGlow/SceneGlow';\nexport type { SceneMeshProps, SceneMeshStop } from './SceneMesh/SceneMesh';\nexport type { SceneNoiseProps } from './SceneNoise/SceneNoise';\nexport type { SceneStarFieldProps } from './SceneStarField/SceneStarField';\nexport type { SceneShootingStarProps } from './SceneShootingStar/SceneShootingStar';\nexport type { SceneSnowProps } from './SceneSnow/SceneSnow';\nexport type { SceneAuroraProps } from './SceneAurora/SceneAurora';\nexport type { SceneStarWarpProps } from './SceneStarWarp/SceneStarWarp';\n"],"names":["createVarsResolver","factory","useProps","useStyles","classes","useRef","useState","useEffect","useCallback","SceneProvider","Box","SceneGradient","SceneDotGrid","SceneGlow","SceneMesh","SceneNoise","SceneStarField","SceneShootingStar","SceneSnow","SceneAurora","SceneStarWarp"],"mappings":";;;;;;;;;;;;;;;;;;AAoBA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,YAAY,CAAA,CAAA,CAAG,CAAA;AACrB,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,EAAE,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA;AACnB,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,EAAE,CAAC,CAAA;AACX,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA;AACvB,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,EAAE,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA;AACpB,CAAA,CAAE,iBAAiB,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA;AACrB,CAAC,CAAA;AACD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAGA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAkB,CAAC,CAAC,CAAC,CAAA,CAAE,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA;AAC5D,CAAA,CAAE,IAAI,CAAA,CAAE,CAAA;AACR,C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,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAa,CAAA;;"}
@@ -0,0 +1,12 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ var core = require('@mantine/core');
5
+
6
+ const [SceneProvider, useSceneContext] = core.createSafeContext(
7
+ "Scene component was not found in tree"
8
+ );
9
+
10
+ exports.SceneProvider = SceneProvider;
11
+ exports.useSceneContext = useSceneContext;
12
+ //# sourceMappingURL=Scene.context.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scene.context.cjs","sources":["../../src/Scene.context.ts"],"sourcesContent":["import { createSafeContext, type GetStylesApi } from '@mantine/core';\nimport type { SceneFactory } from './Scene';\n\nexport interface SceneMousePosition {\n /** Mouse X as percentage (0-100) relative to the Scene container */\n x: number;\n /** Mouse Y as percentage (0-100) relative to the Scene container */\n y: number;\n}\n\ninterface SceneContextValue {\n getStyles: GetStylesApi<SceneFactory>;\n /** Mouse position when `interactive` is true, null otherwise */\n mouse: SceneMousePosition | null;\n /** Whether the Scene is in fullscreen mode */\n fullscreen: boolean;\n}\n\nexport const [SceneProvider, useSceneContext] = createSafeContext<SceneContextValue>(\n 'Scene component was not found in tree'\n);\n"],"names":["createSafeContext"],"mappings":";;;;;AACY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,CAAC,GAAGA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAiB,CAAA;AACjE,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACF,CAAA,CAAA;;;"}
@@ -0,0 +1,7 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ var classes = {"root":"me_7013dda3","gradient":"me_71480b71","gradientAnimated":"me_e0b69834","scene-gradient-rotate":"me_e49cf8b6","scene-gradient-pulse":"me_3090a8de","dotGrid":"me_b36997ce","dotGridAnimated":"me_bb687791","scene-dotgrid-twinkle":"me_235b959c","glow":"me_700ed24e","glowAnimated":"me_a66b3211","scene-glow-float":"me_2721953e","scene-glow-pulse":"me_27b28e7b","scene-glow-breathe":"me_1b288667","mesh":"me_701172ae","meshAnimated":"me_e3777271","scene-mesh-shift":"me_59b7b7c4","noise":"me_922f6279","starField":"me_90a941a7","starFieldLayer":"me_7d4d93ea","starFieldDot":"me_60901622","starFieldTwinkle1":"me_56d2273c","scene-starfield-twinkle":"me_747316f5","starFieldTwinkle2":"me_56d2273d","starFieldTwinkle3":"me_56d2273e","shootingStar":"me_be92c816","shootingStarLane":"me_2948d322","shootingStarTrail":"me_49d790","scene-shooting-star":"me_da11301a","shootingStarTrailFullscreen":"me_492efb6b","scene-shooting-star-fs":"me_b62d5760","snow":"me_70144e44","snowFlake":"me_e82fb11","scene-snow-fall":"me_64b0e23","aurora":"me_9de683e1","auroraBand":"me_7d6f25b6","auroraBandAnimated":"me_bf959d79","scene-aurora-wave":"me_8a1f5a64","starWarp":"me_ba5fa83b","starWarpLane":"me_b5af18c7","starWarpDotOut":"me_f96cfd60","scene-starwarp-out":"me_affb8d7d","starWarpDotIn":"me_ffc9b4d3","scene-starwarp-in":"me_794a2d16","starWarpDotOutFullscreen":"me_7a391d3b","scene-starwarp-out-fs":"me_4a76db1d","starWarpDotInFullscreen":"me_9c1960ee","scene-starwarp-in-fs":"me_9ef568e4"};
5
+
6
+ module.exports = classes;
7
+ //# sourceMappingURL=Scene.module.css.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scene.module.css.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -0,0 +1,83 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ var React = require('react');
5
+ var core = require('@mantine/core');
6
+ var Scene_context = require('../Scene.context.cjs');
7
+ var Scene_module = require('../Scene.module.css.cjs');
8
+
9
+ function getPositionTop(position, index, bands) {
10
+ const bandSpacing = 100 / (bands + 1);
11
+ const offset = bandSpacing * (index + 1);
12
+ switch (position) {
13
+ case "top":
14
+ return `${offset * 0.4}%`;
15
+ case "center":
16
+ return `${30 + offset * 0.4}%`;
17
+ case "bottom":
18
+ return `${60 + offset * 0.3}%`;
19
+ default:
20
+ return `${offset * 0.4}%`;
21
+ }
22
+ }
23
+ function SceneAurora({
24
+ colors = ["green", "teal", "cyan"],
25
+ bands = 3,
26
+ position = "top",
27
+ animate = true,
28
+ duration = 8,
29
+ opacity = 0.3,
30
+ blur = 60,
31
+ className,
32
+ style
33
+ }) {
34
+ const { getStyles } = Scene_context.useSceneContext();
35
+ const theme = core.useMantineTheme();
36
+ const bandElements = React.useMemo(() => {
37
+ return Array.from({ length: bands }, (_, i) => {
38
+ const colorIndex = i % colors.length;
39
+ const nextColorIndex = (i + 1) % colors.length;
40
+ const resolvedColor = core.alpha(core.getThemeColor(colors[colorIndex], theme), 0.6);
41
+ const resolvedNextColor = core.alpha(core.getThemeColor(colors[nextColorIndex], theme), 0.3);
42
+ const top = getPositionTop(position, i, bands);
43
+ const bandDelay = i * duration / bands;
44
+ return {
45
+ key: i,
46
+ background: `linear-gradient(90deg, transparent 0%, ${resolvedColor} 30%, ${resolvedNextColor} 70%, transparent 100%)`,
47
+ top,
48
+ delay: bandDelay
49
+ };
50
+ });
51
+ }, [bands, colors, position, duration, theme]);
52
+ return /* @__PURE__ */ React.createElement(
53
+ core.Box,
54
+ {
55
+ ...getStyles("aurora", {
56
+ className,
57
+ style: {
58
+ "--scene-aurora-opacity": String(opacity),
59
+ "--scene-aurora-blur": `${blur}px`,
60
+ "--scene-aurora-duration": `${duration}s`,
61
+ ...style
62
+ }
63
+ })
64
+ },
65
+ bandElements.map((band) => /* @__PURE__ */ React.createElement(
66
+ core.Box,
67
+ {
68
+ key: band.key,
69
+ className: [Scene_module.auroraBand, animate && Scene_module.auroraBandAnimated].filter(Boolean).join(" ") || void 0,
70
+ style: {
71
+ top: band.top,
72
+ background: band.background,
73
+ "--scene-aurora-band-height": `${Math.max(15, 30 - band.key * 3)}%`,
74
+ animationDelay: `${band.delay}s`
75
+ }
76
+ }
77
+ ))
78
+ );
79
+ }
80
+ SceneAurora.displayName = "SceneAurora";
81
+
82
+ exports.SceneAurora = SceneAurora;
83
+ //# sourceMappingURL=SceneAurora.cjs.map