cynx-ui 1.2.9 → 1.2.10

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.
@@ -91,6 +91,9 @@ function ensureStyles() {
91
91
  document.head.appendChild(tag);
92
92
  }
93
93
 
94
+ // Auto-inject on module load
95
+ if (typeof document !== 'undefined') ensureStyles();
96
+
94
97
  export function Modal({ open, onClose, onBeforeClose, title, children, footer, maxWidth = 520, bodyStyle }) {
95
98
  const [closing, setClosing] = useState(false);
96
99
  const mounted = useRef(open);
@@ -13,6 +13,9 @@ function ensureStyles() {
13
13
  document.head.appendChild(tag);
14
14
  }
15
15
 
16
+ // Auto-inject on module load so raw className="skeleton" works everywhere
17
+ if (typeof document !== 'undefined') ensureStyles();
18
+
16
19
  const SK_BASE = {
17
20
  background: 'linear-gradient(90deg, var(--grey-1, #f0f1f5) 25%, var(--border-light, #e8e8ec) 50%, var(--grey-1, #f0f1f5) 75%)',
18
21
  backgroundSize: '600px 100%',
@@ -10,6 +10,9 @@ function ensureStyles() {
10
10
  document.head.appendChild(tag);
11
11
  }
12
12
 
13
+ // Auto-inject on module load
14
+ if (typeof document !== 'undefined') ensureStyles();
15
+
13
16
  export function Spinner({ size = 20, inline = false, color = 'currentColor', fullPage = false }) {
14
17
  ensureStyles();
15
18
  const s = inline ? 14 : size;
@@ -27,6 +27,9 @@ function ensureStyles() {
27
27
  document.head.appendChild(tag);
28
28
  }
29
29
 
30
+ // Auto-inject on module load
31
+ if (typeof document !== 'undefined') ensureStyles();
32
+
30
33
  // ── Module-level state ────────────────────────────────────────────────────────
31
34
  let _toasts = [];
32
35
  let _listeners = new Set();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cynx-ui",
3
- "version": "1.2.9",
3
+ "version": "1.2.10",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js"