@almadar/ui 5.122.2 → 5.122.4

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.
@@ -5162,7 +5162,7 @@ var init_Modal = __esm({
5162
5162
  const isDragging = React91.useRef(false);
5163
5163
  const [closing, setClosing] = React91.useState(false);
5164
5164
  const wasOpenRef = React91.useRef(isOpen);
5165
- React91.useEffect(() => {
5165
+ React91.useLayoutEffect(() => {
5166
5166
  if (wasOpenRef.current && !isOpen) setClosing(true);
5167
5167
  wasOpenRef.current = isOpen;
5168
5168
  }, [isOpen]);
@@ -5367,7 +5367,7 @@ function usePresence(show, opts) {
5367
5367
  setMounted(false);
5368
5368
  onExitedRef.current?.();
5369
5369
  }, [clearSafe]);
5370
- React91.useEffect(() => {
5370
+ React91.useLayoutEffect(() => {
5371
5371
  const moving = animate && isMotionEnabled();
5372
5372
  if (show && !prev.current) {
5373
5373
  setExiting(false);
@@ -14735,7 +14735,7 @@ var init_Skeleton = __esm({
14735
14735
  init_Box();
14736
14736
  init_Stack();
14737
14737
  init_Stack();
14738
- pulseClass = "animate-pulse bg-muted/60 rounded";
14738
+ pulseClass = "almadar-shimmer animate-shimmer rounded";
14739
14739
  Skeleton.displayName = "Skeleton";
14740
14740
  }
14741
14741
  });
package/dist/avl/index.js CHANGED
@@ -5116,7 +5116,7 @@ var init_Modal = __esm({
5116
5116
  const isDragging = useRef(false);
5117
5117
  const [closing, setClosing] = useState(false);
5118
5118
  const wasOpenRef = useRef(isOpen);
5119
- useEffect(() => {
5119
+ useLayoutEffect(() => {
5120
5120
  if (wasOpenRef.current && !isOpen) setClosing(true);
5121
5121
  wasOpenRef.current = isOpen;
5122
5122
  }, [isOpen]);
@@ -5321,7 +5321,7 @@ function usePresence(show, opts) {
5321
5321
  setMounted(false);
5322
5322
  onExitedRef.current?.();
5323
5323
  }, [clearSafe]);
5324
- useEffect(() => {
5324
+ useLayoutEffect(() => {
5325
5325
  const moving = animate && isMotionEnabled();
5326
5326
  if (show && !prev.current) {
5327
5327
  setExiting(false);
@@ -14689,7 +14689,7 @@ var init_Skeleton = __esm({
14689
14689
  init_Box();
14690
14690
  init_Stack();
14691
14691
  init_Stack();
14692
- pulseClass = "animate-pulse bg-muted/60 rounded";
14692
+ pulseClass = "almadar-shimmer animate-shimmer rounded";
14693
14693
  Skeleton.displayName = "Skeleton";
14694
14694
  }
14695
14695
  });
@@ -4122,7 +4122,7 @@ function usePresence(show, opts) {
4122
4122
  setMounted(false);
4123
4123
  onExitedRef.current?.();
4124
4124
  }, [clearSafe]);
4125
- React74.useEffect(() => {
4125
+ React74.useLayoutEffect(() => {
4126
4126
  const moving = animate && isMotionEnabled();
4127
4127
  if (show && !prev.current) {
4128
4128
  setExiting(false);
@@ -6168,7 +6168,7 @@ var init_Modal = __esm({
6168
6168
  const isDragging = React74.useRef(false);
6169
6169
  const [closing, setClosing] = React74.useState(false);
6170
6170
  const wasOpenRef = React74.useRef(isOpen);
6171
- React74.useEffect(() => {
6171
+ React74.useLayoutEffect(() => {
6172
6172
  if (wasOpenRef.current && !isOpen) setClosing(true);
6173
6173
  wasOpenRef.current = isOpen;
6174
6174
  }, [isOpen]);
@@ -6847,7 +6847,7 @@ var init_Skeleton = __esm({
6847
6847
  init_Box();
6848
6848
  init_Stack();
6849
6849
  init_Stack();
6850
- pulseClass = "animate-pulse bg-muted/60 rounded";
6850
+ pulseClass = "almadar-shimmer animate-shimmer rounded";
6851
6851
  Skeleton.displayName = "Skeleton";
6852
6852
  }
6853
6853
  });
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import * as React74 from 'react';
3
- import React74__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useState, Suspense, lazy, useSyncExternalStore, useLayoutEffect, useId } from 'react';
3
+ import React74__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useState, useLayoutEffect, Suspense, lazy, useSyncExternalStore, useId } from 'react';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { EventBusContext, useTraitScopeChain, useCurrentPagePath, useGameAudioContextOptional, useEntitySchemaOptional, TraitScopeProvider } from '@almadar/ui/providers';
@@ -4077,7 +4077,7 @@ function usePresence(show, opts) {
4077
4077
  setMounted(false);
4078
4078
  onExitedRef.current?.();
4079
4079
  }, [clearSafe]);
4080
- useEffect(() => {
4080
+ useLayoutEffect(() => {
4081
4081
  const moving = animate && isMotionEnabled();
4082
4082
  if (show && !prev.current) {
4083
4083
  setExiting(false);
@@ -6123,7 +6123,7 @@ var init_Modal = __esm({
6123
6123
  const isDragging = useRef(false);
6124
6124
  const [closing, setClosing] = useState(false);
6125
6125
  const wasOpenRef = useRef(isOpen);
6126
- useEffect(() => {
6126
+ useLayoutEffect(() => {
6127
6127
  if (wasOpenRef.current && !isOpen) setClosing(true);
6128
6128
  wasOpenRef.current = isOpen;
6129
6129
  }, [isOpen]);
@@ -6802,7 +6802,7 @@ var init_Skeleton = __esm({
6802
6802
  init_Box();
6803
6803
  init_Stack();
6804
6804
  init_Stack();
6805
- pulseClass = "animate-pulse bg-muted/60 rounded";
6805
+ pulseClass = "almadar-shimmer animate-shimmer rounded";
6806
6806
  Skeleton.displayName = "Skeleton";
6807
6807
  }
6808
6808
  });
@@ -1333,7 +1333,7 @@ var init_Modal = __esm({
1333
1333
  const isDragging = React84.useRef(false);
1334
1334
  const [closing, setClosing] = React84.useState(false);
1335
1335
  const wasOpenRef = React84.useRef(isOpen);
1336
- React84.useEffect(() => {
1336
+ React84.useLayoutEffect(() => {
1337
1337
  if (wasOpenRef.current && !isOpen) setClosing(true);
1338
1338
  wasOpenRef.current = isOpen;
1339
1339
  }, [isOpen]);
@@ -1538,7 +1538,7 @@ function usePresence(show, opts) {
1538
1538
  setMounted(false);
1539
1539
  onExitedRef.current?.();
1540
1540
  }, [clearSafe]);
1541
- React84.useEffect(() => {
1541
+ React84.useLayoutEffect(() => {
1542
1542
  const moving = animate && isMotionEnabled();
1543
1543
  if (show && !prev.current) {
1544
1544
  setExiting(false);
@@ -11259,7 +11259,7 @@ var init_Skeleton = __esm({
11259
11259
  init_Box();
11260
11260
  init_Stack();
11261
11261
  init_Stack();
11262
- pulseClass = "animate-pulse bg-muted/60 rounded";
11262
+ pulseClass = "almadar-shimmer animate-shimmer rounded";
11263
11263
  Skeleton.displayName = "Skeleton";
11264
11264
  }
11265
11265
  });
@@ -1,5 +1,5 @@
1
1
  import * as React84 from 'react';
2
- import React84__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, lazy, useLayoutEffect, useId, useSyncExternalStore } from 'react';
2
+ import React84__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId, useSyncExternalStore } from 'react';
3
3
  import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath, useGameAudioContextOptional } from '@almadar/ui/providers';
4
4
  import { createLogger, isLogLevelEnabled } from '@almadar/logger';
5
5
  import { clsx } from 'clsx';
@@ -1288,7 +1288,7 @@ var init_Modal = __esm({
1288
1288
  const isDragging = useRef(false);
1289
1289
  const [closing, setClosing] = useState(false);
1290
1290
  const wasOpenRef = useRef(isOpen);
1291
- useEffect(() => {
1291
+ useLayoutEffect(() => {
1292
1292
  if (wasOpenRef.current && !isOpen) setClosing(true);
1293
1293
  wasOpenRef.current = isOpen;
1294
1294
  }, [isOpen]);
@@ -1493,7 +1493,7 @@ function usePresence(show, opts) {
1493
1493
  setMounted(false);
1494
1494
  onExitedRef.current?.();
1495
1495
  }, [clearSafe]);
1496
- useEffect(() => {
1496
+ useLayoutEffect(() => {
1497
1497
  const moving = animate && isMotionEnabled();
1498
1498
  if (show && !prev.current) {
1499
1499
  setExiting(false);
@@ -11214,7 +11214,7 @@ var init_Skeleton = __esm({
11214
11214
  init_Box();
11215
11215
  init_Stack();
11216
11216
  init_Stack();
11217
- pulseClass = "animate-pulse bg-muted/60 rounded";
11217
+ pulseClass = "almadar-shimmer animate-shimmer rounded";
11218
11218
  Skeleton.displayName = "Skeleton";
11219
11219
  }
11220
11220
  });
@@ -1811,7 +1811,7 @@ var init_Modal = __esm({
1811
1811
  const isDragging = React82.useRef(false);
1812
1812
  const [closing, setClosing] = React82.useState(false);
1813
1813
  const wasOpenRef = React82.useRef(isOpen);
1814
- React82.useEffect(() => {
1814
+ React82.useLayoutEffect(() => {
1815
1815
  if (wasOpenRef.current && !isOpen) setClosing(true);
1816
1816
  wasOpenRef.current = isOpen;
1817
1817
  }, [isOpen]);
@@ -2016,7 +2016,7 @@ function usePresence(show, opts) {
2016
2016
  setMounted(false);
2017
2017
  onExitedRef.current?.();
2018
2018
  }, [clearSafe]);
2019
- React82.useEffect(() => {
2019
+ React82.useLayoutEffect(() => {
2020
2020
  const moving = animate && isMotionEnabled();
2021
2021
  if (show && !prev.current) {
2022
2022
  setExiting(false);
@@ -11327,7 +11327,7 @@ var init_Skeleton = __esm({
11327
11327
  init_Box();
11328
11328
  init_Stack();
11329
11329
  init_Stack();
11330
- pulseClass = "animate-pulse bg-muted/60 rounded";
11330
+ pulseClass = "almadar-shimmer animate-shimmer rounded";
11331
11331
  Skeleton.displayName = "Skeleton";
11332
11332
  }
11333
11333
  });
@@ -1,5 +1,5 @@
1
1
  import * as React82 from 'react';
2
- import React82__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, lazy, useLayoutEffect, useId } from 'react';
2
+ import React82__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
3
3
  import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, useEntitySchema, getAllPages, OrbitalProvider, TraitScopeProvider, ServerBridgeProvider, useCurrentPagePath, useGameAudioContextOptional, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge } from '@almadar/ui/providers';
4
4
  export { EntitySchemaProvider, ServerBridgeProvider, TraitContext, TraitProvider, useEntitySchema, useEntitySchemaOptional, useServerBridge, useTrait, useTraitContext } from '@almadar/ui/providers';
5
5
  import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
@@ -1767,7 +1767,7 @@ var init_Modal = __esm({
1767
1767
  const isDragging = useRef(false);
1768
1768
  const [closing, setClosing] = useState(false);
1769
1769
  const wasOpenRef = useRef(isOpen);
1770
- useEffect(() => {
1770
+ useLayoutEffect(() => {
1771
1771
  if (wasOpenRef.current && !isOpen) setClosing(true);
1772
1772
  wasOpenRef.current = isOpen;
1773
1773
  }, [isOpen]);
@@ -1972,7 +1972,7 @@ function usePresence(show, opts) {
1972
1972
  setMounted(false);
1973
1973
  onExitedRef.current?.();
1974
1974
  }, [clearSafe]);
1975
- useEffect(() => {
1975
+ useLayoutEffect(() => {
1976
1976
  const moving = animate && isMotionEnabled();
1977
1977
  if (show && !prev.current) {
1978
1978
  setExiting(false);
@@ -11283,7 +11283,7 @@ var init_Skeleton = __esm({
11283
11283
  init_Box();
11284
11284
  init_Stack();
11285
11285
  init_Stack();
11286
- pulseClass = "animate-pulse bg-muted/60 rounded";
11286
+ pulseClass = "almadar-shimmer animate-shimmer rounded";
11287
11287
  Skeleton.displayName = "Skeleton";
11288
11288
  }
11289
11289
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "5.122.2",
3
+ "version": "5.122.4",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -385,6 +385,10 @@ module.exports = {
385
385
  transform: 'var(--motion-modal-enter-to-transform, translateZ(0))',
386
386
  },
387
387
  },
388
+ shimmer: {
389
+ '0%': { backgroundPosition: '200% 0' },
390
+ '100%': { backgroundPosition: '-200% 0' },
391
+ },
388
392
  'modal-out': {
389
393
  '0%': {
390
394
  opacity: 'var(--motion-modal-exit-from-opacity, 1)',
@@ -506,7 +510,7 @@ module.exports = {
506
510
  // Motion-token-driven durations/easings (fall back to legacy
507
511
  // --transition-* so themes that haven't migrated keep working).
508
512
  'modal-in': 'modal-in var(--duration-normal, var(--transition-normal, 250ms)) var(--easing-standard, var(--transition-timing, cubic-bezier(0.4, 0, 0.2, 1)))',
509
- 'modal-out': 'modal-out var(--duration-fast, var(--transition-fast, 150ms)) var(--easing-standard, var(--transition-timing, cubic-bezier(0.4, 0, 0.2, 1)))',
513
+ 'modal-out': 'modal-out var(--duration-normal, var(--transition-normal, 250ms)) var(--easing-standard, var(--transition-timing, cubic-bezier(0.4, 0, 0.2, 1)))',
510
514
  'overlay-in': 'overlay-in var(--duration-normal, var(--transition-normal, 250ms)) var(--easing-standard, var(--transition-timing, cubic-bezier(0.4, 0, 0.2, 1)))',
511
515
  'overlay-out': 'overlay-out var(--duration-fast, var(--transition-fast, 150ms)) var(--easing-standard, var(--transition-timing, cubic-bezier(0.4, 0, 0.2, 1)))',
512
516
  'slide-up': 'slide-up var(--duration-slow, var(--transition-slow, 400ms)) var(--easing-emphasized, cubic-bezier(0.2, 0, 0, 1))',
@@ -520,6 +524,7 @@ module.exports = {
520
524
  'fade-out': 'fade-out var(--duration-fast, var(--transition-fast, 150ms)) var(--easing-standard, var(--transition-timing, cubic-bezier(0.4, 0, 0.2, 1)))',
521
525
  'page-in': 'page-in var(--duration-normal, var(--transition-normal, 250ms)) var(--easing-standard, var(--transition-timing, cubic-bezier(0.4, 0, 0.2, 1)))',
522
526
  'page-out': 'page-out var(--duration-fast, var(--transition-fast, 150ms)) var(--easing-standard, var(--transition-timing, cubic-bezier(0.4, 0, 0.2, 1)))',
527
+ 'shimmer': 'shimmer var(--duration-shimmer, 1.5s) var(--easing-linear, linear) infinite',
523
528
  },
524
529
  // Density-axis spacing scale. Tailwind's default `p-3` / `gap-4` resolve
525
530
  // here so existing classes keep working — but now read from tokens.
package/themes/_base.css CHANGED
@@ -162,7 +162,7 @@
162
162
  --motion-modal-exit-from-opacity: 1;
163
163
  --motion-modal-exit-from-transform: translateZ(0);
164
164
  --motion-modal-exit-to-opacity: 0;
165
- --motion-modal-exit-to-transform: scale(0.96) translateY(8px);
165
+ --motion-modal-exit-to-transform: scale(0.92) translateY(16px);
166
166
 
167
167
  --motion-slide-up-from-opacity: 0;
168
168
  --motion-slide-up-from-transform: translateY(16px);
@@ -214,6 +214,28 @@
214
214
  --motion-page-exit-from-transform: translateZ(0);
215
215
  --motion-page-exit-to-opacity: 0;
216
216
  --motion-page-exit-to-transform: translateY(-8px);
217
+
218
+ /* ----------------------------------------------------------------
219
+ * Skeleton shimmer — the loading-placeholder sweep. Two color stops
220
+ * (base + highlight) drive the gradient; --duration-shimmer the loop.
221
+ * Override per theme to restyle the placeholder tone.
222
+ * ---------------------------------------------------------------- */
223
+ --skeleton-base: var(--color-muted, rgba(128, 128, 128, 0.18));
224
+ --skeleton-highlight: var(--color-surface, rgba(255, 255, 255, 0.55));
225
+ --duration-shimmer: 1.5s;
226
+ }
227
+
228
+ /* The shimmer gradient background. Pair with the `animate-shimmer` utility
229
+ * (defined in tailwind-preset) which sweeps background-position. */
230
+ .almadar-shimmer {
231
+ background-image: linear-gradient(
232
+ 90deg,
233
+ var(--skeleton-base) 0%,
234
+ var(--skeleton-highlight) 50%,
235
+ var(--skeleton-base) 100%
236
+ );
237
+ background-size: 200% 100%;
238
+ background-repeat: no-repeat;
217
239
  }
218
240
 
219
241
  /* ----------------------------------------------------------------