solar-background 0.1.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/src/style.css ADDED
@@ -0,0 +1,467 @@
1
+ body {
2
+ margin: 0;
3
+ min-height: 100vh;
4
+ overflow: hidden;
5
+ background: radial-gradient(circle at top, #07142b 0%, #02040e 42%, #000000 100%);
6
+ font-family: Inter, system-ui, sans-serif;
7
+ }
8
+
9
+ body::before {
10
+ content: '';
11
+ position: fixed;
12
+ inset: 0;
13
+ background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 22%),
14
+ radial-gradient(circle at 80% 15%, rgba(82, 180, 255, 0.06), transparent 18%),
15
+ radial-gradient(circle at 60% 85%, rgba(249, 237, 173, 0.05), transparent 16%);
16
+ pointer-events: none;
17
+ }
18
+
19
+ .scene {
20
+ position: absolute;
21
+ inset: 0;
22
+ width: min(90vmin, 760px);
23
+ height: min(90vmin, 760px);
24
+ margin: auto;
25
+ z-index: 3;
26
+ transform-origin: center;
27
+ animation: scene-zoom 20s ease-in-out infinite alternate;
28
+ }
29
+
30
+ .sun {
31
+ position: absolute;
32
+ inset: 50%;
33
+ transform: translate(-50%, -50%);
34
+ width: 120px;
35
+ height: 120px;
36
+ border-radius: 50%;
37
+ background:
38
+ radial-gradient(circle at 38% 32%, #fff9d4 0%, #ffe57d 16%, #ffba3f 34%, #ff8d1d 58%, #e85a0f 80%, #b83006 96%),
39
+ radial-gradient(circle at 62% 55%, rgba(255, 220, 120, 0.94) 0%, rgba(255, 150, 40, 0.78) 28%, rgba(230, 100, 24, 0.5) 62%, transparent 100%);
40
+ box-shadow:
41
+ 0 0 120px rgba(255, 175, 55, 0.96),
42
+ 0 0 240px rgba(255, 135, 20, 0.3),
43
+ inset 0 0 32px rgba(255, 250, 210, 0.92);
44
+ overflow: hidden;
45
+ animation: sun-pulse 4.2s ease-in-out infinite alternate;
46
+ }
47
+
48
+ .sun::before {
49
+ content: '';
50
+ position: absolute;
51
+ inset: 10%;
52
+ border-radius: 50%;
53
+ background:
54
+ radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.75) 0%, transparent 40%),
55
+ radial-gradient(circle at 50% 55%, rgba(255, 210, 90, 0.45) 0%, transparent 38%),
56
+ radial-gradient(circle at 65% 60%, rgba(255, 160, 45, 0.28) 0%, transparent 45%);
57
+ background-size: 160% 160%;
58
+ filter: blur(3px);
59
+ mix-blend-mode: screen;
60
+ animation: sun-surface 4.6s ease-in-out infinite alternate;
61
+ }
62
+
63
+ .sun::after {
64
+ content: '';
65
+ position: absolute;
66
+ inset: -22%;
67
+ border-radius: 50%;
68
+ background: conic-gradient(from 0deg, transparent 0deg 10deg, rgba(255, 224, 140, 0.18) 10deg 16deg, transparent 16deg 24deg, rgba(255, 180, 75, 0.13) 24deg 32deg, transparent 32deg 360deg);
69
+ opacity: 0.8;
70
+ filter: blur(14px);
71
+ animation: sun-flares 6.4s linear infinite;
72
+ }
73
+
74
+ .orbit {
75
+ position: absolute;
76
+ inset: 50%;
77
+ transform: translate(-50%, -50%);
78
+ border: 1px solid rgba(255, 255, 255, 0.12);
79
+ border-radius: 50%;
80
+ z-index: 4;
81
+ }
82
+
83
+ .orbit-mercury {
84
+ width: 130px;
85
+ height: 130px;
86
+ animation: orbit 4s linear infinite;
87
+ }
88
+
89
+ .orbit-venus {
90
+ width: 180px;
91
+ height: 180px;
92
+ animation: orbit 7s linear infinite reverse;
93
+ }
94
+
95
+ .orbit-earth {
96
+ width: 240px;
97
+ height: 240px;
98
+ animation: orbit 10s linear infinite;
99
+ }
100
+
101
+ .orbit-mars {
102
+ width: 300px;
103
+ height: 300px;
104
+ animation: orbit 16s linear infinite ;
105
+ }
106
+
107
+ .orbit-jupiter {
108
+ width: 380px;
109
+ height: 380px;
110
+ animation: orbit 24s linear infinite;
111
+ }
112
+
113
+ .orbit-saturn {
114
+ width: 460px;
115
+ height: 460px;
116
+ animation: orbit 32s linear infinite ;
117
+ }
118
+
119
+ .orbit-uranus {
120
+ width: 540px;
121
+ height: 540px;
122
+ animation: orbit 46s linear infinite reverse;
123
+ }
124
+
125
+ .orbit-neptune {
126
+ width: 620px;
127
+ height: 620px;
128
+ animation: orbit 56s linear infinite ;
129
+ }
130
+
131
+ .orbit-pluto {
132
+ width: 700px;
133
+ height: 700px;
134
+ animation: orbit 68s linear infinite;
135
+ }
136
+
137
+ @keyframes orbit {
138
+ to {
139
+ transform: translate(-50%, -50%) rotate(360deg);
140
+ }
141
+ }
142
+
143
+ @keyframes sun-pulse {
144
+ 0% {
145
+ transform: translate(-50%, -50%) scale(1);
146
+ box-shadow:
147
+ 0 0 110px rgba(255, 175, 55, 0.96),
148
+ 0 0 230px rgba(255, 135, 20, 0.3),
149
+ inset 0 0 30px rgba(255, 250, 210, 0.92);
150
+ }
151
+ 50% {
152
+ transform: translate(-50%, -50%) scale(1.02);
153
+ box-shadow:
154
+ 0 0 120px rgba(255, 190, 65, 0.96),
155
+ 0 0 250px rgba(255, 140, 25, 0.32),
156
+ inset 0 0 34px rgba(255, 255, 220, 0.94);
157
+ }
158
+ 100% {
159
+ transform: translate(-50%, -50%) scale(1);
160
+ box-shadow:
161
+ 0 0 110px rgba(255, 175, 55, 0.96),
162
+ 0 0 230px rgba(255, 135, 20, 0.3),
163
+ inset 0 0 30px rgba(255, 250, 210, 0.92);
164
+ }
165
+ }
166
+
167
+ @keyframes sun-surface {
168
+ 0% {
169
+ background-position: 0% 0%;
170
+ opacity: 1;
171
+ }
172
+ 50% {
173
+ background-position: 40% 45%;
174
+ opacity: 0.92;
175
+ }
176
+ 100% {
177
+ background-position: 0% 15%;
178
+ opacity: 1;
179
+ }
180
+ }
181
+
182
+ @keyframes sun-flares {
183
+ from {
184
+ transform: rotate(0deg);
185
+ opacity: 0.82;
186
+ }
187
+ to {
188
+ transform: rotate(360deg);
189
+ opacity: 0.68;
190
+ }
191
+ }
192
+
193
+ @keyframes scene-zoom {
194
+ 0% {
195
+ transform: scale(1) translateZ(0);
196
+ }
197
+ 100% {
198
+ transform: scale(1.08) translateZ(0);
199
+ }
200
+ }
201
+
202
+ .planet,
203
+ .moon {
204
+ position: absolute;
205
+ top: 50%;
206
+ right: 0;
207
+ transform: translate(50%, -50%);
208
+ border-radius: 50%;
209
+ background-size: cover;
210
+ background-position: center;
211
+ box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
212
+ z-index: 5;
213
+ }
214
+
215
+ .mercury,
216
+ .venus,
217
+ .earth,
218
+ .mars,
219
+ .jupiter,
220
+ .saturn,
221
+ .uranus,
222
+ .neptune,
223
+ .pluto {
224
+ width: 16px;
225
+ height: 16px;
226
+ }
227
+
228
+ .moon {
229
+ width: 8px;
230
+ height: 8px;
231
+ background-image: url('/images/moon.png');
232
+ background-color: #ccc;
233
+ }
234
+
235
+ .mercury {
236
+ width: 14px;
237
+ height: 14px;
238
+ background-image: url('/images/mercury.png');
239
+ }
240
+
241
+ .venus {
242
+ width: 16px;
243
+ height: 16px;
244
+ background-image: url('/images/venus.png');
245
+ }
246
+
247
+ .earth {
248
+ width: 22px;
249
+ height: 22px;
250
+ background-image: url('/images/earth.png');
251
+ }
252
+
253
+ .mars {
254
+ width: 18px;
255
+ height: 18px;
256
+ background-image: url('/images/mars.png');
257
+ }
258
+
259
+ .jupiter {
260
+ width: 28px;
261
+ height: 28px;
262
+ background-image: url('/images/jupiter.png');
263
+ }
264
+
265
+ .saturn {
266
+ width: 26px;
267
+ height: 26px;
268
+ background-image: url('/images/saturn.png');
269
+ }
270
+
271
+ .uranus {
272
+ width: 22px;
273
+ height: 22px;
274
+ background-image: url('/images/uranus.png');
275
+ }
276
+
277
+ .neptune {
278
+ width: 20px;
279
+ height: 20px;
280
+ background-image: url('/images/neptune.png');
281
+ }
282
+
283
+ .pluto {
284
+ width: 14px;
285
+ height: 14px;
286
+ background-image: url('/images/pluto.png');
287
+ }
288
+
289
+ .earth .moon-orbit {
290
+ position: absolute;
291
+ inset: 50%;
292
+ width: 48px;
293
+ height: 48px;
294
+ transform: translate(-50%, -50%);
295
+ border: 1px dashed rgba(255, 255, 255, 0.18);
296
+ border-radius: 50%;
297
+ animation: orbit 3s linear infinite;
298
+ }
299
+
300
+ .earth .moon {
301
+ right: -6px;
302
+ top: 50%;
303
+ transform: translate(50%, -50%);
304
+ }
305
+
306
+ .star {
307
+ position: absolute;
308
+ background: rgba(255, 255, 255, 0.85);
309
+ border-radius: 50%;
310
+ pointer-events: none;
311
+ z-index: -1;
312
+ }
313
+
314
+ .zodiac-layer {
315
+ position: absolute;
316
+ inset: 0;
317
+ pointer-events: none;
318
+ z-index: 1; /* behind the solar scene */
319
+ }
320
+
321
+ .zodiac-sign {
322
+ position: absolute;
323
+ width: min(34vmin, 360px);
324
+ height: min(34vmin, 360px);
325
+ padding: 1rem;
326
+ opacity: 0;
327
+ pointer-events: none;
328
+ animation: constellation-appear 3.4s ease-in-out forwards;
329
+ transform-origin: left;
330
+ }
331
+
332
+ .left-sign {
333
+ left: 2%;
334
+ }
335
+
336
+ .right-sign {
337
+ right: 2%;
338
+ }
339
+
340
+ .zodiac-pointer {
341
+ position: absolute;
342
+ inset: 0;
343
+ }
344
+
345
+ .pattern-star {
346
+ position: absolute;
347
+ width: 8px;
348
+ height: 8px;
349
+ border-radius: 50%;
350
+ background: radial-gradient(circle, #ffffff 0%, rgba(255,255,255,0.1) 100%);
351
+ box-shadow: 0 0 16px rgba(255, 255, 255, 0.6);
352
+ }
353
+
354
+ .pattern-line {
355
+ position: absolute;
356
+ height: 2px;
357
+ background: rgba(255, 255, 255, 0.685);
358
+ box-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
359
+ transform-origin: left center;
360
+ }
361
+
362
+ .pattern-title {
363
+ position: absolute;
364
+ left: 1rem;
365
+ top: 1rem;
366
+ font-size: 1rem;
367
+ text-transform: uppercase;
368
+ letter-spacing: 0.18em;
369
+ color: rgba(255, 255, 255, 0.92);
370
+ font-weight: 700;
371
+ text-shadow: 0 0 18px rgba(255, 255, 255, 0.15);
372
+ }
373
+
374
+ .pattern-subtitle {
375
+ position: absolute;
376
+ left: 1rem;
377
+ bottom: 1rem;
378
+ font-size: 0.92rem;
379
+ color: rgba(255, 255, 255, 0.76);
380
+ }
381
+
382
+ .pattern-glyph {
383
+ position: absolute;
384
+ right: 1rem;
385
+ top: 4rem;
386
+ font-size: 2.2rem;
387
+ line-height: 1;
388
+ }
389
+
390
+ .pattern-pair {
391
+ position: absolute;
392
+ right: 1rem;
393
+ bottom: 5rem;
394
+ font-size: 1.1rem;
395
+ color: rgba(255, 255, 255, 0.9);
396
+ letter-spacing: 0.08em;
397
+ }
398
+
399
+ @keyframes constellation-appear {
400
+ 0% {
401
+ opacity: 0;
402
+ transform: translateY(15px) scale(0.96);
403
+ }
404
+ 15% {
405
+ opacity: 1;
406
+ transform: translateY(0) scale(1);
407
+ }
408
+ 85% {
409
+ opacity: 1;
410
+ }
411
+ 100% {
412
+ opacity: 0;
413
+ transform: translateY(-10px) scale(0.96);
414
+ }
415
+ }
416
+
417
+ .zodiac-star {
418
+ position: absolute;
419
+ width: 6px;
420
+ height: 6px;
421
+ border-radius: 50%;
422
+ background: rgba(255, 255, 255, 0.95);
423
+ box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
424
+ }
425
+
426
+ .zodiac-line {
427
+ position: absolute;
428
+ height: 2px;
429
+ background: rgba(255, 255, 255, 0.45);
430
+ transform-origin: left center;
431
+ box-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
432
+ }
433
+
434
+ .zodiac-glyph {
435
+ position: absolute;
436
+ font-size: 48px;
437
+ filter: drop-shadow(0 0 8px rgba(255,255,255,0.2));
438
+ pointer-events: none;
439
+ }
440
+
441
+ .zodiac-label {
442
+ position: absolute;
443
+ color: rgba(255, 255, 255, 0.95);
444
+ font-size: 1rem;
445
+ letter-spacing: 0.12em;
446
+ text-transform: uppercase;
447
+ font-weight: 700;
448
+ text-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
449
+ }
450
+
451
+ @keyframes zodiac-fade {
452
+ 0% {
453
+ opacity: 0;
454
+ transform: scale(0.9);
455
+ }
456
+ 15% {
457
+ opacity: 1;
458
+ transform: scale(1);
459
+ }
460
+ 85% {
461
+ opacity: 1;
462
+ }
463
+ 100% {
464
+ opacity: 0;
465
+ transform: scale(0.9);
466
+ }
467
+ }
package/vite.config.js ADDED
@@ -0,0 +1,16 @@
1
+ import { defineConfig } from 'vite'
2
+ import path from 'path'
3
+
4
+ export default defineConfig({
5
+ build: {
6
+ lib: {
7
+ entry: path.resolve(__dirname, 'src/main.js'),
8
+ name: 'SolarBackground',
9
+ fileName: (format) => `solar-background.${format === 'es' ? 'esm' : 'umd'}.js`,
10
+ formats: ['es', 'umd'],
11
+ },
12
+ rollupOptions: {
13
+ external: [],
14
+ },
15
+ },
16
+ })