@howssatoshi/quantumcss 1.3.0 → 1.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@howssatoshi/quantumcss",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Advanced utility-first CSS framework with JIT generation and modern components",
5
5
  "main": "dist/quantum.min.css",
6
6
  "bin": {
package/src/defaults.js CHANGED
@@ -78,7 +78,7 @@ const utilityMaps = {
78
78
  },
79
79
  'btn-secondary': {
80
80
  property: ['background', 'color', 'border', 'font-weight', 'transition', 'height', 'padding', 'display', 'align-items', 'justify-content', 'border-radius', 'cursor', 'backdrop-filter', '-webkit-backdrop-filter'],
81
- value: ['rgba(255, 255, 255, 0.05)', 'inherit', '1px solid rgba(255, 255, 255, 0.15)', '700', 'all 0.2s ease', '3rem', '0 1.5rem', 'inline-flex', 'center', 'center', '0.75rem', 'pointer', 'blur(12px)', 'blur(12px)']
81
+ value: ['rgba(255, 255, 255, 0.05)', '#ffffff', '1px solid rgba(255, 255, 255, 0.15)', '700', 'all 0.2s ease', '3rem', '0 1.5rem', 'inline-flex', 'center', 'center', '0.75rem', 'pointer', 'blur(12px)', 'blur(12px)']
82
82
  },
83
83
  'input-starlight': {
84
84
  property: ['background-color', 'border', 'color', 'border-radius', 'padding', 'appearance', 'transition', 'height'],
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Starlight UI - Interactive Helpers
3
+ * Standardized components for the QuantumCSS framework
4
+ */
5
+
6
+ const Starlight = {
7
+ /**
8
+ * Initializes a randomized star field in the target container.
9
+ * @param {string} selector - CSS selector for the container (default: '.starlight-stars')
10
+ * @param {number} count - Number of stars to generate (default: 150)
11
+ */
12
+ initStars(selector = '.starlight-stars', count = 150) {
13
+ const containers = document.querySelectorAll(selector);
14
+
15
+ containers.forEach(container => {
16
+ // Clear existing stars if any
17
+ container.innerHTML = '';
18
+
19
+ for (let i = 0; i < count; i++) {
20
+ const star = document.createElement('div');
21
+ star.className = 'star';
22
+
23
+ // Randomize position
24
+ star.style.left = `${Math.random() * 100}%`;
25
+ star.style.top = `${Math.random() * 100}%`;
26
+
27
+ // Randomize size (1px to 3px)
28
+ const size = Math.random() * 2 + 1;
29
+ star.style.width = `${size}px`;
30
+ star.style.height = `${size}px`;
31
+
32
+ // Randomize animation duration (2s to 5s)
33
+ star.style.setProperty('--duration', `${Math.random() * 3 + 2}s`);
34
+
35
+ container.appendChild(star);
36
+ }
37
+ });
38
+ }
39
+ };
40
+
41
+ // Auto-initialize if the element exists and we're in a browser
42
+ if (typeof window !== 'undefined') {
43
+ window.Starlight = Starlight;
44
+ document.addEventListener('DOMContentLoaded', () => {
45
+ if (document.querySelector('.starlight-stars')) {
46
+ Starlight.initStars();
47
+ }
48
+ });
49
+ }
@@ -60,6 +60,26 @@
60
60
  animation: float-y 6s ease-in-out infinite;
61
61
  }
62
62
 
63
+ .ani-fade-in {
64
+ animation: fadeIn 0.3s ease-out forwards;
65
+ }
66
+
67
+ .ani-slide-up {
68
+ animation: slideUp 0.3s ease-out forwards;
69
+ }
70
+
71
+ .ani-slide-down {
72
+ animation: slideDown 0.3s ease-out forwards;
73
+ }
74
+
75
+ .ani-scale-in {
76
+ animation: scaleIn 0.2s ease-out forwards;
77
+ }
78
+
79
+ .ani-spin {
80
+ animation: spin 1s linear infinite;
81
+ }
82
+
63
83
  /* Staggered Animations */
64
84
  .ani-stagger-1 { animation-delay: 0.1s; }
65
85
  .ani-stagger-2 { animation-delay: 0.2s; }
@@ -71,3 +91,52 @@
71
91
  .ani-fast { animation-duration: 0.5s !important; }
72
92
  .ani-slow { animation-duration: 8s !important; }
73
93
  .ani-slower { animation-duration: 15s !important; }
94
+
95
+ /* Keyframes */
96
+ @keyframes fadeIn {
97
+ from { opacity: 0; }
98
+ to { opacity: 1; }
99
+ }
100
+
101
+ @keyframes slideUp {
102
+ from { opacity: 0; transform: translateY(20px); }
103
+ to { opacity: 1; transform: translateY(0); }
104
+ }
105
+
106
+ @keyframes slideDown {
107
+ from { opacity: 0; transform: translateY(-20px); }
108
+ to { opacity: 1; transform: translateY(0); }
109
+ }
110
+
111
+ @keyframes scaleIn {
112
+ from { opacity: 0; transform: scale(0.95); }
113
+ to { opacity: 1; transform: scale(1); }
114
+ }
115
+
116
+ @keyframes spin {
117
+ from { transform: rotate(0deg); }
118
+ to { transform: rotate(360deg); }
119
+ }
120
+
121
+ @keyframes ping {
122
+ 75%, 100% {
123
+ transform: scale(2);
124
+ opacity: 0;
125
+ }
126
+ }
127
+
128
+ @keyframes pulse {
129
+ 0%, 100% { opacity: 1; }
130
+ 50% { opacity: 0.5; }
131
+ }
132
+
133
+ @keyframes bounce {
134
+ 0%, 100% {
135
+ transform: translateY(-25%);
136
+ animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
137
+ }
138
+ 50% {
139
+ transform: none;
140
+ animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
141
+ }
142
+ }