@almadar/ui 6.52.0 → 6.53.1

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 (64) hide show
  1. package/dist/{EntityBindingContext-BbxrwSb9.d.ts → AwaitingSkeletonContext-Bh399p1x.d.ts} +17 -2
  2. package/dist/{Canvas3DHost-CWO0tswb.d.ts → Canvas3DHost-B-y2TNij.d.ts} +1 -1
  3. package/dist/{GameAudioProvider-_hPzjqp-.d.ts → GameAudioProvider-DyBvYP2c.d.ts} +1 -1
  4. package/dist/Typography-7QEWUTW3.js +5 -0
  5. package/dist/{UISlotRenderer-CR7SCAMR.js → UISlotRenderer-P7A4SZSK.js} +10 -10
  6. package/dist/avl/index.cjs +40157 -39958
  7. package/dist/avl/index.d.ts +5 -2
  8. package/dist/avl/index.js +34 -21
  9. package/dist/{chunk-XUSSAWKL.js → chunk-2LFBQ4IS.js} +1 -1
  10. package/dist/{chunk-QWDKMVLX.js → chunk-53VTY5CC.js} +141 -82
  11. package/dist/{chunk-MSBMVG3B.js → chunk-6O37FCX4.js} +1 -0
  12. package/dist/{chunk-WB2A6V3I.js → chunk-7KSLPY56.js} +49 -1
  13. package/dist/{chunk-BHZG4PDZ.js → chunk-7LM6I3NA.js} +629 -626
  14. package/dist/{chunk-NCNP2RKZ.js → chunk-E37BYSXY.js} +2 -2
  15. package/dist/{chunk-5GCI6C7J.js → chunk-FUQASYEW.js} +2 -2
  16. package/dist/{chunk-CLSLVFSP.js → chunk-HB4C27KU.js} +2 -2
  17. package/dist/{chunk-EERAGPBW.js → chunk-HUG25TT3.js} +32341 -33067
  18. package/dist/{chunk-TWHYH25Q.js → chunk-JRW33U35.js} +80 -80
  19. package/dist/{chunk-G4GMXYMY.js → chunk-KQXXO42S.js} +93 -171
  20. package/dist/chunk-OKWD7LPO.js +80 -0
  21. package/dist/{chunk-YHY5K2Y7.js → chunk-PEST66PN.js} +6 -0
  22. package/dist/{chunk-V5AGW2JN.js → chunk-QVXLKFUQ.js} +1 -1
  23. package/dist/chunk-UOTYAPV5.js +284 -0
  24. package/dist/{chunk-2QB2PXOO.js → chunk-VHTJRS2N.js} +3 -5
  25. package/dist/components/index.cjs +42813 -42691
  26. package/dist/components/index.d.ts +182 -319
  27. package/dist/components/index.js +621 -13
  28. package/dist/context/index.cjs +8 -3
  29. package/dist/context/index.js +3 -3
  30. package/dist/hooks/index.cjs +56 -4
  31. package/dist/hooks/index.js +7 -7
  32. package/dist/lib/drawable/three/index.cjs +49 -1
  33. package/dist/lib/drawable/three/index.d.ts +5 -5
  34. package/dist/lib/drawable/three/index.js +7 -7
  35. package/dist/lib/index.cjs +50 -1
  36. package/dist/lib/index.d.ts +2 -2
  37. package/dist/lib/index.js +6 -5
  38. package/dist/locales/index.cjs +147 -3
  39. package/dist/locales/index.js +99 -3
  40. package/dist/{paintDispatch-DHo3WhaU.d.ts → paintDispatch-_6EhJCiL.d.ts} +3 -3
  41. package/dist/providers/index.cjs +35850 -35687
  42. package/dist/providers/index.d.ts +33 -8
  43. package/dist/providers/index.js +37 -13
  44. package/dist/renderer/index.cjs +6 -0
  45. package/dist/renderer/index.d.ts +1 -1
  46. package/dist/renderer/index.js +1 -1
  47. package/dist/runtime/index.cjs +42533 -42343
  48. package/dist/runtime/index.d.ts +4 -2
  49. package/dist/runtime/index.js +12 -12
  50. package/dist/ssr/index.cjs +377 -137
  51. package/dist/ssr/index.d.cts +5 -1
  52. package/dist/ssr/index.d.ts +5 -1
  53. package/dist/ssr/index.js +313 -73
  54. package/dist/{verificationRegistry-BYD3cVhS.d.ts → verificationRegistry-CD7Xb40L.d.ts} +1 -1
  55. package/locales/ar.json +49 -1
  56. package/locales/en.json +49 -1
  57. package/locales/sl.json +49 -1
  58. package/package.json +6 -6
  59. package/tailwind-preset.cjs +23 -0
  60. package/themes/_base.css +28 -8
  61. package/themes/_contract.md +5 -0
  62. package/dist/Typography-7FRZOS2H.js +0 -5
  63. package/dist/{avl-3d-context-DLteNEwu.d.ts → avl-3d-context-MAt_NuU9.d.ts} +3 -3
  64. package/dist/{chunk-IN3BVW2Z.js → chunk-64WACXM7.js} +14 -14
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var React16 = require('react');
3
+ var React17 = require('react');
4
4
  var logger = require('@almadar/logger');
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var LucideIcons2 = require('lucide-react');
@@ -25,7 +25,7 @@ function _interopNamespace(e) {
25
25
  return Object.freeze(n);
26
26
  }
27
27
 
28
- var React16__namespace = /*#__PURE__*/_interopNamespace(React16);
28
+ var React17__namespace = /*#__PURE__*/_interopNamespace(React17);
29
29
  var LucideIcons2__namespace = /*#__PURE__*/_interopNamespace(LucideIcons2);
30
30
 
31
31
  // node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
@@ -2578,11 +2578,11 @@ function cn(...inputs) {
2578
2578
  }
2579
2579
  logger.createLogger("almadar:eventbus");
2580
2580
  logger.createLogger("almadar:eventbus:subscribe");
2581
- var EventBusContext = globalThis.__almadarUiEventBusContext ?? (globalThis.__almadarUiEventBusContext = React16.createContext(null));
2581
+ var EventBusContext = globalThis.__almadarUiEventBusContext ?? (globalThis.__almadarUiEventBusContext = React17.createContext(null));
2582
2582
  var EMPTY_CHAIN = Object.freeze([]);
2583
- var TraitScopeContext = React16.createContext(null);
2583
+ var TraitScopeContext = React17.createContext(null);
2584
2584
  function useTraitScopeChain() {
2585
- const chain = React16.useContext(TraitScopeContext);
2585
+ const chain = React17.useContext(TraitScopeContext);
2586
2586
  return chain ?? EMPTY_CHAIN;
2587
2587
  }
2588
2588
  var log = logger.createLogger("almadar:eventbus");
@@ -2659,10 +2659,10 @@ var fallbackEventBus = {
2659
2659
  }
2660
2660
  };
2661
2661
  function useEventBus() {
2662
- const context = React16.useContext(EventBusContext);
2662
+ const context = React17.useContext(EventBusContext);
2663
2663
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
2664
2664
  const chain = useTraitScopeChain();
2665
- return React16.useMemo(() => {
2665
+ return React17.useMemo(() => {
2666
2666
  if (chain.length === 0) {
2667
2667
  return {
2668
2668
  ...baseBus,
@@ -2708,24 +2708,24 @@ function useEventBus() {
2708
2708
  }
2709
2709
  function useTapReveal(options = {}) {
2710
2710
  const { onReveal, onDismiss, refs, enabled = true } = options;
2711
- const [revealed, setRevealed] = React16.useState(false);
2712
- const onRevealRef = React16.useRef(onReveal);
2713
- const onDismissRef = React16.useRef(onDismiss);
2711
+ const [revealed, setRevealed] = React17.useState(false);
2712
+ const onRevealRef = React17.useRef(onReveal);
2713
+ const onDismissRef = React17.useRef(onDismiss);
2714
2714
  onRevealRef.current = onReveal;
2715
2715
  onDismissRef.current = onDismiss;
2716
- const reveal = React16.useCallback(() => {
2716
+ const reveal = React17.useCallback(() => {
2717
2717
  setRevealed((wasRevealed) => {
2718
2718
  if (!wasRevealed) onRevealRef.current?.();
2719
2719
  return true;
2720
2720
  });
2721
2721
  }, []);
2722
- const dismiss = React16.useCallback(() => {
2722
+ const dismiss = React17.useCallback(() => {
2723
2723
  setRevealed((wasRevealed) => {
2724
2724
  if (wasRevealed) onDismissRef.current?.();
2725
2725
  return false;
2726
2726
  });
2727
2727
  }, []);
2728
- const onPointerDown = React16.useCallback(
2728
+ const onPointerDown = React17.useCallback(
2729
2729
  (e) => {
2730
2730
  if (!enabled || e.pointerType === "mouse") return;
2731
2731
  if (revealed) dismiss();
@@ -2733,7 +2733,7 @@ function useTapReveal(options = {}) {
2733
2733
  },
2734
2734
  [enabled, revealed, reveal, dismiss]
2735
2735
  );
2736
- React16.useEffect(() => {
2736
+ React17.useEffect(() => {
2737
2737
  if (!revealed || typeof document === "undefined") return;
2738
2738
  const onDocDown = (ev) => {
2739
2739
  const target = ev.target;
@@ -2750,10 +2750,10 @@ function useTapReveal(options = {}) {
2750
2750
  return { revealed, triggerProps: { onPointerDown }, reveal, dismiss };
2751
2751
  }
2752
2752
  logger.createLogger("almadar:ui:theme");
2753
- React16.createContext(void 0);
2754
- var ThemeScopeContext = React16.createContext({});
2753
+ React17.createContext(void 0);
2754
+ var ThemeScopeContext = React17.createContext({});
2755
2755
  function useThemeScope() {
2756
- return React16.useContext(ThemeScopeContext);
2756
+ return React17.useContext(ThemeScopeContext);
2757
2757
  }
2758
2758
 
2759
2759
  // lib/pressable.ts
@@ -2883,7 +2883,7 @@ var positionStyles = {
2883
2883
  fixed: "fixed",
2884
2884
  sticky: "sticky"
2885
2885
  };
2886
- var Box = React16__namespace.default.forwardRef(
2886
+ var Box = React17__namespace.default.forwardRef(
2887
2887
  ({
2888
2888
  padding,
2889
2889
  paddingX,
@@ -2918,20 +2918,20 @@ var Box = React16__namespace.default.forwardRef(
2918
2918
  const { override: themeOverride } = useThemeScope();
2919
2919
  const declaredTheme = rest["data-theme"];
2920
2920
  const dataTheme = declaredTheme !== void 0 && themeOverride ? themeOverride : declaredTheme;
2921
- const handleClick = React16.useCallback((e) => {
2921
+ const handleClick = React17.useCallback((e) => {
2922
2922
  if (action) {
2923
2923
  e.stopPropagation();
2924
2924
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
2925
2925
  }
2926
2926
  onClick?.(e);
2927
2927
  }, [action, actionPayload, eventBus, onClick]);
2928
- const handleMouseEnter = React16.useCallback((e) => {
2928
+ const handleMouseEnter = React17.useCallback((e) => {
2929
2929
  if (hoverEvent) {
2930
2930
  eventBus.emit(`UI:${hoverEvent}`, { hovered: true });
2931
2931
  }
2932
2932
  onMouseEnter?.(e);
2933
2933
  }, [hoverEvent, eventBus, onMouseEnter]);
2934
- const handleMouseLeave = React16.useCallback((e) => {
2934
+ const handleMouseLeave = React17.useCallback((e) => {
2935
2935
  if (hoverEvent) {
2936
2936
  eventBus.emit(`UI:${hoverEvent}`, { hovered: false });
2937
2937
  }
@@ -2939,20 +2939,20 @@ var Box = React16__namespace.default.forwardRef(
2939
2939
  }, [hoverEvent, eventBus, onMouseLeave]);
2940
2940
  const { triggerProps } = useTapReveal({
2941
2941
  enabled: tapReveal && !!hoverEvent,
2942
- onReveal: React16.useCallback(() => {
2942
+ onReveal: React17.useCallback(() => {
2943
2943
  if (hoverEvent) eventBus.emit(`UI:${hoverEvent}`, { hovered: true });
2944
2944
  }, [hoverEvent, eventBus]),
2945
- onDismiss: React16.useCallback(() => {
2945
+ onDismiss: React17.useCallback(() => {
2946
2946
  if (hoverEvent) eventBus.emit(`UI:${hoverEvent}`, { hovered: false });
2947
2947
  }, [hoverEvent, eventBus])
2948
2948
  });
2949
- const handlePointerDown = React16.useCallback((e) => {
2949
+ const handlePointerDown = React17.useCallback((e) => {
2950
2950
  if (hoverEvent && tapReveal) triggerProps.onPointerDown(e);
2951
2951
  onPointerDown?.(e);
2952
2952
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
2953
2953
  const isClickable = action || onClick;
2954
2954
  const actionControl = action && rest.role === void 0 && rest.tabIndex === void 0 ? pressableProps(handleClick) : {};
2955
- return React16__namespace.default.createElement(
2955
+ return React17__namespace.default.createElement(
2956
2956
  Component,
2957
2957
  {
2958
2958
  ref,
@@ -3057,7 +3057,7 @@ var Stack = ({
3057
3057
  };
3058
3058
  const isHorizontal = direction === "horizontal";
3059
3059
  const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
3060
- return React16__namespace.default.createElement(
3060
+ return React17__namespace.default.createElement(
3061
3061
  Component,
3062
3062
  {
3063
3063
  ...domPassthrough(rest),
@@ -3200,6 +3200,7 @@ var en_default = {
3200
3200
  "aria.removeFilter": "Remove filter",
3201
3201
  "aria.closeDrawer": "Close drawer",
3202
3202
  "aria.closePanel": "Close panel",
3203
+ "aria.dockPanel": "Side panel",
3203
3204
  "aria.previousImage": "Previous image",
3204
3205
  "aria.nextImage": "Next image",
3205
3206
  "aria.dismiss": "Dismiss",
@@ -3221,6 +3222,7 @@ var en_default = {
3221
3222
  "aria.openMenu": "Open menu",
3222
3223
  "aria.closeMenu": "Close menu",
3223
3224
  "aria.openSidebar": "Open sidebar",
3225
+ "aria.openRow": "Open item {{position}}",
3224
3226
  "sidebar.expand": "Expand sidebar",
3225
3227
  "sidebar.collapse": "Collapse sidebar",
3226
3228
  "sidebar.close": "Close sidebar",
@@ -4266,7 +4268,53 @@ var en_default = {
4266
4268
  "aria.walkTraitDone": "completed",
4267
4269
  "aria.walkTraitPending": "pending",
4268
4270
  "aria.walkGraph": "State graph for {{trait}}: {{from}} to {{to}}",
4269
- "aria.loading": "Loading"
4271
+ "aria.loading": "Loading",
4272
+ "agentActivity.toolCall": "Called {{tool}}",
4273
+ "agentActivity.toolResult": "{{tool}} returned",
4274
+ "agentActivity.toolRows": "{{count}} rows",
4275
+ "agentActivity.thinking": "Thinking\u2026",
4276
+ "agentActivity.analyzed": "Analyzed your request \u2014 {{organism}}",
4277
+ "agentActivity.renamed": "Rename {{from}} \u2192 {{to}}",
4278
+ "agentActivity.deleted": "Remove {{orbitalName}}",
4279
+ "agentActivity.roster": "Planning {{count}} orbitals",
4280
+ "agentActivity.orbitalStarted": "Working on {{orbitalName}}\u2026",
4281
+ "agentActivity.orbitalStartedSettled": "Started {{orbitalName}}",
4282
+ "agentActivity.orbitalDone": "{{orbitalName}} ready",
4283
+ "agentActivity.orbitalCounts": "{{traitCount}} traits, {{transitionCount}} transitions",
4284
+ "agentActivity.change.orbital-added": "Added {{orbitalName}}",
4285
+ "agentActivity.change.orbital-removed": "Removed {{orbitalName}}",
4286
+ "agentActivity.change.entity-fields-changed": "Changed the data fields of {{orbitalName}}",
4287
+ "agentActivity.change.trait-added": "Added a behavior to {{orbitalName}}",
4288
+ "agentActivity.change.trait-removed": "Removed a behavior from {{orbitalName}}",
4289
+ "agentActivity.change.state-machine-changed": "Changed the flow of {{orbitalName}}",
4290
+ "agentActivity.change.guard-changed": "Changed a rule in {{orbitalName}}",
4291
+ "agentActivity.change.effect-changed": "Changed what {{orbitalName}} does",
4292
+ "agentActivity.change.render-ui-changed": "Changed the design of {{orbitalName}}",
4293
+ "agentActivity.change.event-wiring-changed": "Changed the connections of {{orbitalName}}",
4294
+ "agentActivity.change.page-changed": "Changed the pages of {{orbitalName}}",
4295
+ "agentActivity.change.behavior-composed": "Composed a behavior into {{orbitalName}}",
4296
+ "agentActivity.done": "Done \u2014 {{count}} orbitals ready",
4297
+ "agentActivity.cancelled": "Cancelled",
4298
+ "agentActivity.jump": "Show",
4299
+ "agentActivity.emptyTitle": "No activity yet",
4300
+ "agentActivity.emptyDescription": "Send a message and the agent's work shows up here.",
4301
+ "agentActivity.fileOperation": "{{operation}}",
4302
+ "agentActivity.schemaDiff": "Edited {{filePath}}",
4303
+ "agentActivity.coordinatorDecision": "Chose {{organism}}",
4304
+ "agentActivity.change.trait-config-changed": "Changed the settings of {{orbitalName}}",
4305
+ "agentActivity.change.theme-changed": "Changed the theme of {{orbitalName}}",
4306
+ "agentActivity.llmResponse": "Raw LLM response",
4307
+ "agentActivity.llmDuration": "{{seconds}}s",
4308
+ "agentActivity.llmTokens": "{{prompt}} in / {{completion}} out tokens",
4309
+ "agentActivity.llmResponseLabel": "Response",
4310
+ "agentActivity.llmSystemPrompt": "System prompt",
4311
+ "agentActivity.llmUserPrompt": "User prompt",
4312
+ "agentActivity.llmToolCalls": "Tool calls",
4313
+ "agentActivity.showRawLlm": "Raw LLM",
4314
+ "agentActivity.earlierConversations": "Earlier conversations ({{count}})",
4315
+ "agentActivity.earlierActivity": "Earlier activity",
4316
+ "tabs.scrollStart": "Scroll tabs back",
4317
+ "tabs.scrollEnd": "Scroll tabs forward"
4270
4318
  };
4271
4319
 
4272
4320
  // lib/format.ts
@@ -4330,7 +4378,7 @@ function formatValue(value, format, fmt = {}) {
4330
4378
  var INLINE_TEXT_ATTR = "data-inline-text";
4331
4379
  var { $meta: _meta2, ...coreMessages2 } = en_default;
4332
4380
  var coreLocale2 = coreMessages2;
4333
- var I18nContext = React16.createContext({
4381
+ var I18nContext = React17.createContext({
4334
4382
  locale: "en",
4335
4383
  direction: "ltr",
4336
4384
  t: (key, params) => {
@@ -4345,11 +4393,11 @@ var I18nContext = React16.createContext({
4345
4393
  });
4346
4394
  I18nContext.displayName = "I18nContext";
4347
4395
  function useTranslate() {
4348
- return React16.useContext(I18nContext);
4396
+ return React17.useContext(I18nContext);
4349
4397
  }
4350
4398
  function useFormatContext() {
4351
- const { t, locale, currency } = React16.useContext(I18nContext);
4352
- return React16.useMemo(
4399
+ const { t, locale, currency } = React17.useContext(I18nContext);
4400
+ return React17.useMemo(
4353
4401
  () => ({ locale, currency: currency ?? DEFAULT_CURRENCY, booleanLabels: { yes: t("common.yes"), no: t("common.no") } }),
4354
4402
  [t, locale, currency]
4355
4403
  );
@@ -4455,7 +4503,7 @@ var Typography = ({
4455
4503
  if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
4456
4504
  body = formatValue(body, format, fmt);
4457
4505
  }
4458
- return React16__namespace.default.createElement(
4506
+ return React17__namespace.default.createElement(
4459
4507
  Component,
4460
4508
  {
4461
4509
  ...domPassthrough(rest),
@@ -4509,20 +4557,20 @@ function subscribePending(key, cb) {
4509
4557
  if (set && set.size === 0) keyListeners.delete(key);
4510
4558
  };
4511
4559
  }
4512
- var PendingScopeContext = React16.createContext(null);
4560
+ var PendingScopeContext = React17.createContext(null);
4513
4561
  function usePendingAction() {
4514
- const scope = React16.useContext(PendingScopeContext);
4515
- const [key, setKey] = React16.useState(null);
4516
- const pending = React16.useSyncExternalStore(
4517
- React16.useCallback((cb) => key ? subscribePending(key, cb) : () => {
4562
+ const scope = React17.useContext(PendingScopeContext);
4563
+ const [key, setKey] = React17.useState(null);
4564
+ const pending = React17.useSyncExternalStore(
4565
+ React17.useCallback((cb) => key ? subscribePending(key, cb) : () => {
4518
4566
  }, [key]),
4519
4567
  () => key ? isPending(key) : false,
4520
4568
  () => false
4521
4569
  );
4522
- React16.useEffect(() => {
4570
+ React17.useEffect(() => {
4523
4571
  if (key && !pending) setKey(null);
4524
4572
  }, [key, pending]);
4525
- const activate = React16.useCallback((emit) => {
4573
+ const activate = React17.useCallback((emit) => {
4526
4574
  const k = newPendingKey();
4527
4575
  emit(k);
4528
4576
  if (!isPending(k)) return;
@@ -4613,16 +4661,16 @@ function getThemeVersionSnapshot() {
4613
4661
  return themeVersion;
4614
4662
  }
4615
4663
  function useThemeIconStrokeApplies(ref) {
4616
- const documentApplies = React16.useSyncExternalStore(subscribeIconFamily, getStrokeAppliesSnapshot, () => true);
4617
- const version = React16.useSyncExternalStore(subscribeIconFamily, getThemeVersionSnapshot, () => 0);
4618
- const [scopedApplies, setScopedApplies] = React16.useState(null);
4619
- React16.useLayoutEffect(() => {
4664
+ const documentApplies = React17.useSyncExternalStore(subscribeIconFamily, getStrokeAppliesSnapshot, () => true);
4665
+ const version = React17.useSyncExternalStore(subscribeIconFamily, getThemeVersionSnapshot, () => 0);
4666
+ const [scopedApplies, setScopedApplies] = React17.useState(null);
4667
+ React17.useLayoutEffect(() => {
4620
4668
  if (ref.current) setScopedApplies(familyStrokeApplies(scopedIconFamily(ref.current)));
4621
4669
  }, [ref, version]);
4622
4670
  return scopedApplies ?? documentApplies;
4623
4671
  }
4624
4672
  function useIconFamily() {
4625
- return React16.useSyncExternalStore(
4673
+ return React17.useSyncExternalStore(
4626
4674
  subscribeIconFamily,
4627
4675
  getIconFamilySnapshot,
4628
4676
  getIconFamilyServerSnapshot
@@ -4661,7 +4709,7 @@ function resolveLucide(name) {
4661
4709
  }
4662
4710
  function makeLucideAdapter(name) {
4663
4711
  const LucideComp = resolveLucide(name);
4664
- const Adapter = React16__namespace.default.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4712
+ const Adapter = React17__namespace.default.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4665
4713
  LucideComp,
4666
4714
  {
4667
4715
  ref,
@@ -4749,9 +4797,9 @@ var Icon = ({
4749
4797
  const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
4750
4798
  const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
4751
4799
  const family = useIconFamily();
4752
- const svgRef = React16__namespace.default.useRef(null);
4800
+ const svgRef = React17__namespace.default.useRef(null);
4753
4801
  const themeStroke = useThemeIconStrokeApplies(svgRef);
4754
- const RenderedComponent = React16__namespace.default.useMemo(() => {
4802
+ const RenderedComponent = React17__namespace.default.useMemo(() => {
4755
4803
  if (directIcon) return null;
4756
4804
  return effectiveName ? resolveIconForFamily(effectiveName) : null;
4757
4805
  }, [directIcon, effectiveName, family]);
@@ -4893,13 +4941,13 @@ function AtlasImage({
4893
4941
  "aria-hidden": ariaHidden,
4894
4942
  ...rest
4895
4943
  }) {
4896
- const [, bump] = React16__namespace.useReducer((x) => x + 1, 0);
4897
- const canvasRef = React16__namespace.useRef(null);
4944
+ const [, bump] = React17__namespace.useReducer((x) => x + 1, 0);
4945
+ const canvasRef = React17__namespace.useRef(null);
4898
4946
  const sliced = isAtlasAsset(asset);
4899
4947
  const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
4900
4948
  const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
4901
4949
  const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
4902
- React16__namespace.useEffect(() => {
4950
+ React17__namespace.useEffect(() => {
4903
4951
  const canvas = canvasRef.current;
4904
4952
  if (!canvas || !img || !rect) return;
4905
4953
  canvas.width = rect.sw;
@@ -4954,7 +5002,7 @@ function AtlasImage({
4954
5002
  }
4955
5003
  AtlasImage.displayName = "AtlasImage";
4956
5004
  logger.createLogger("almadar:ui:navigation");
4957
- React16.createContext(null);
5005
+ React17.createContext(null);
4958
5006
  var INERT_API = {
4959
5007
  entries: [],
4960
5008
  canGoBack: false,
@@ -4964,12 +5012,12 @@ var INERT_API = {
4964
5012
  setCurrentLabel: () => void 0,
4965
5013
  registerNavItems: () => void 0
4966
5014
  };
4967
- var NavStackContext = React16.createContext(INERT_API);
5015
+ var NavStackContext = React17.createContext(INERT_API);
4968
5016
  function isInertNavStack(api) {
4969
5017
  return api === INERT_API;
4970
5018
  }
4971
5019
  function useNavStack() {
4972
- return React16.useContext(NavStackContext);
5020
+ return React17.useContext(NavStackContext);
4973
5021
  }
4974
5022
 
4975
5023
  // lib/followHref.ts
@@ -5064,7 +5112,7 @@ function resolveIconProp(value, sizeClass) {
5064
5112
  const IconComp = value;
5065
5113
  return /* @__PURE__ */ jsxRuntime.jsx(IconComp, { className: sizeClass });
5066
5114
  }
5067
- if (React16__namespace.default.isValidElement(value)) {
5115
+ if (React17__namespace.default.isValidElement(value)) {
5068
5116
  return value;
5069
5117
  }
5070
5118
  if (typeof value === "object" && value !== null && isIconLike(value)) {
@@ -5073,7 +5121,7 @@ function resolveIconProp(value, sizeClass) {
5073
5121
  }
5074
5122
  return value;
5075
5123
  }
5076
- var Button = React16__namespace.default.forwardRef(
5124
+ var Button = React17__namespace.default.forwardRef(
5077
5125
  ({
5078
5126
  className,
5079
5127
  variant = "primary",
@@ -5100,7 +5148,7 @@ var Button = React16__namespace.default.forwardRef(
5100
5148
  const navStack = useNavStack();
5101
5149
  const { pending, activate } = usePendingAction();
5102
5150
  const busy = isLoading || pending;
5103
- const [focused, setFocused] = React16__namespace.default.useState(false);
5151
+ const [focused, setFocused] = React17__namespace.default.useState(false);
5104
5152
  const inert = Boolean(disabled) || busy;
5105
5153
  const emitAction = () => {
5106
5154
  if (!action) return;
@@ -5238,7 +5286,7 @@ var sizeStyles2 = {
5238
5286
  md: "px-2.5 py-1 text-sm",
5239
5287
  lg: "px-3 py-1.5 text-base"
5240
5288
  };
5241
- var Badge = React16__namespace.default.forwardRef(
5289
+ var Badge = React17__namespace.default.forwardRef(
5242
5290
  ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, onClick, ...props }, ref) => {
5243
5291
  const { t } = useTranslate();
5244
5292
  const iconSizes = {
@@ -5302,13 +5350,25 @@ var Badge = React16__namespace.default.forwardRef(
5302
5350
  }
5303
5351
  );
5304
5352
  Badge.displayName = "Badge";
5353
+ var SurfaceContext = React17__namespace.default.createContext(false);
5354
+ function SurfaceBoundary({ children }) {
5355
+ return /* @__PURE__ */ jsxRuntime.jsx(SurfaceContext.Provider, { value: true, children });
5356
+ }
5357
+ function useContentSurface(surface = "auto") {
5358
+ const onSurface = React17__namespace.default.useContext(SurfaceContext);
5359
+ const paints = surface === "auto" && !onSurface;
5360
+ return {
5361
+ className: paints ? "surface-content" : void 0,
5362
+ provide: (node) => paints ? /* @__PURE__ */ jsxRuntime.jsx(SurfaceBoundary, { children: node }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: node })
5363
+ };
5364
+ }
5305
5365
  var sizeStyles3 = {
5306
5366
  xs: "h-3 w-3",
5307
5367
  sm: "h-icon-default w-icon-default",
5308
5368
  md: "h-6 w-6",
5309
5369
  lg: "h-8 w-8"
5310
5370
  };
5311
- var Spinner = React16__namespace.default.forwardRef(
5371
+ var Spinner = React17__namespace.default.forwardRef(
5312
5372
  ({ className, size = "md", overlay, ...props }, ref) => {
5313
5373
  const { t } = useTranslate();
5314
5374
  if (overlay) {
@@ -5346,16 +5406,12 @@ var Spinner = React16__namespace.default.forwardRef(
5346
5406
  Spinner.displayName = "Spinner";
5347
5407
  var variantStyles4 = {
5348
5408
  default: [
5349
- "bg-card surface-material",
5350
- "border-[length:var(--border-width)] border-border",
5351
- "shadow-elevation-card",
5409
+ "surface-content",
5352
5410
  "transition-all duration-normal",
5353
5411
  "hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
5354
5412
  ].join(" "),
5355
5413
  bordered: [
5356
- "bg-card surface-material",
5357
- "border-[length:var(--border-width)] border-border",
5358
- "shadow-elevation-card",
5414
+ "surface-content",
5359
5415
  "transition-all duration-normal",
5360
5416
  "hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
5361
5417
  ].join(" "),
@@ -5397,7 +5453,7 @@ var lookStyles = {
5397
5453
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
5398
5454
  "tile-image-first": "p-0 overflow-hidden"
5399
5455
  };
5400
- var Card = React16__namespace.default.forwardRef(
5456
+ var Card = React17__namespace.default.forwardRef(
5401
5457
  ({
5402
5458
  className,
5403
5459
  variant = "bordered",
@@ -5440,16 +5496,16 @@ var Card = React16__namespace.default.forwardRef(
5440
5496
  title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg text-card-foreground heading-voice", children: title }),
5441
5497
  subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mt-1", children: subtitle })
5442
5498
  ] }),
5443
- children
5499
+ /* @__PURE__ */ jsxRuntime.jsx(SurfaceBoundary, { children })
5444
5500
  ]
5445
5501
  }
5446
5502
  );
5447
5503
  }
5448
5504
  );
5449
5505
  Card.displayName = "Card";
5450
- var CardHeader = React16__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("mb-4", className), ...props }));
5506
+ var CardHeader = React17__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("mb-4", className), ...props }));
5451
5507
  CardHeader.displayName = "CardHeader";
5452
- var CardTitle = React16__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5508
+ var CardTitle = React17__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5453
5509
  "h3",
5454
5510
  {
5455
5511
  ref,
@@ -5462,11 +5518,11 @@ var CardTitle = React16__namespace.default.forwardRef(({ className, ...props },
5462
5518
  }
5463
5519
  ));
5464
5520
  CardTitle.displayName = "CardTitle";
5465
- var CardContent = React16__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("", className), ...props }));
5521
+ var CardContent = React17__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("", className), ...props }));
5466
5522
  CardContent.displayName = "CardContent";
5467
5523
  var CardBody = CardContent;
5468
5524
  CardBody.displayName = "CardBody";
5469
- var CardFooter = React16__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5525
+ var CardFooter = React17__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5470
5526
  "div",
5471
5527
  {
5472
5528
  ref,
@@ -5563,7 +5619,7 @@ var Center = ({
5563
5619
  ...rest
5564
5620
  }) => {
5565
5621
  const mergedStyle = minHeight ? { minHeight, ...style } : style;
5566
- return React16__namespace.default.createElement(Component, {
5622
+ return React17__namespace.default.createElement(Component, {
5567
5623
  ...domPassthrough(rest),
5568
5624
  className: cn(
5569
5625
  inline ? "inline-flex" : "flex",
@@ -5670,8 +5726,8 @@ var Avatar = ({
5670
5726
  }) => {
5671
5727
  const eventBus = useEventBus();
5672
5728
  const { t } = useTranslate();
5673
- const [imgFailed, setImgFailed] = React16__namespace.default.useState(false);
5674
- React16__namespace.default.useEffect(() => {
5729
+ const [imgFailed, setImgFailed] = React17__namespace.default.useState(false);
5730
+ React17__namespace.default.useEffect(() => {
5675
5731
  setImgFailed(false);
5676
5732
  }, [src]);
5677
5733
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -6027,7 +6083,7 @@ var Container = ({
6027
6083
  ...rest
6028
6084
  }) => {
6029
6085
  const resolvedSize = maxWidth ?? size ?? "lg";
6030
- return React16__namespace.default.createElement(
6086
+ return React17__namespace.default.createElement(
6031
6087
  Component,
6032
6088
  {
6033
6089
  ...domPassthrough(rest),
@@ -6043,6 +6099,186 @@ var Container = ({
6043
6099
  );
6044
6100
  };
6045
6101
  Container.displayName = "Container";
6102
+ var pulseClass = "almadar-shimmer animate-shimmer rounded-container";
6103
+ function SkeletonLine({ className }) {
6104
+ return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn(pulseClass, "h-4", className) });
6105
+ }
6106
+ function SkeletonBlock({ className }) {
6107
+ return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn(pulseClass, className) });
6108
+ }
6109
+ function HeaderSkeleton({ className }) {
6110
+ return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { className: cn("items-center justify-between px-6 py-5", className), children: [
6111
+ /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", className: "flex-1", children: [
6112
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-7 w-48" }),
6113
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-64" })
6114
+ ] }),
6115
+ /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", children: [
6116
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-9 w-24 rounded-interactive" }),
6117
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-9 w-32 rounded-interactive" })
6118
+ ] })
6119
+ ] });
6120
+ }
6121
+ function TableSkeleton({ rows = 5, columns = 4, className }) {
6122
+ return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: cn("border border-border rounded-container overflow-hidden", className), children: [
6123
+ /* @__PURE__ */ jsxRuntime.jsx(HStack, { className: "px-4 py-3 bg-muted/30 border-b border-border", children: Array.from({ length: columns }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-4 flex-1 mx-2" }, i)) }),
6124
+ Array.from({ length: rows }).map((_, rowIdx) => /* @__PURE__ */ jsxRuntime.jsx(
6125
+ HStack,
6126
+ {
6127
+ className: cn(
6128
+ "px-4 py-3",
6129
+ rowIdx < rows - 1 && "border-b border-border"
6130
+ ),
6131
+ children: Array.from({ length: columns }).map((_2, colIdx) => /* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "flex-1 mx-2" }, colIdx))
6132
+ },
6133
+ rowIdx
6134
+ ))
6135
+ ] });
6136
+ }
6137
+ function FormSkeleton({ fields = 4, className }) {
6138
+ return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "lg", className: cn("p-6", className), children: [
6139
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-6 w-40" }),
6140
+ Array.from({ length: fields }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", children: [
6141
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-4 w-24" }),
6142
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-10 w-full rounded-interactive" })
6143
+ ] }, i)),
6144
+ /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "md", className: "justify-end pt-2", children: [
6145
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-10 w-20 rounded-interactive" }),
6146
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-10 w-24 rounded-interactive" })
6147
+ ] })
6148
+ ] });
6149
+ }
6150
+ function CardSkeleton({ className }) {
6151
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6152
+ VStack,
6153
+ {
6154
+ gap: "md",
6155
+ className: cn(
6156
+ "p-5 border border-border rounded-container",
6157
+ className
6158
+ ),
6159
+ children: [
6160
+ /* @__PURE__ */ jsxRuntime.jsxs(HStack, { className: "items-center", gap: "md", children: [
6161
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-10 w-10 rounded-full" }),
6162
+ /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", className: "flex-1", children: [
6163
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-5 w-32" }),
6164
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-48" })
6165
+ ] })
6166
+ ] }),
6167
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-full" }),
6168
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-3/4" }),
6169
+ /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", className: "pt-2", children: [
6170
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-6 w-16 rounded-full" }),
6171
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-6 w-20 rounded-full" })
6172
+ ] })
6173
+ ]
6174
+ }
6175
+ );
6176
+ }
6177
+ function TextSkeleton({ rows = 3, className }) {
6178
+ return /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "sm", className, children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
6179
+ SkeletonLine,
6180
+ {
6181
+ className: i === rows - 1 ? "w-2/3" : "w-full"
6182
+ },
6183
+ i
6184
+ )) });
6185
+ }
6186
+ function ListSkeleton({ rows = 5, className }) {
6187
+ return /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "none", className: cn("border border-border rounded-container overflow-hidden", className), children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "md", className: cn("items-center px-4 py-3", i < rows - 1 && "border-b border-border"), children: [
6188
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-10 w-10 rounded-full shrink-0" }),
6189
+ /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
6190
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-4 w-1/3" }),
6191
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-2/3 h-3" })
6192
+ ] }),
6193
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-6 w-16 rounded-full" })
6194
+ ] }, i)) });
6195
+ }
6196
+ function GridSkeleton({ rows = 6, className }) {
6197
+ return /* @__PURE__ */ jsxRuntime.jsx(SimpleGrid, { minChildWidth: "260px", gap: "md", className, children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(CardSkeleton, {}, i)) });
6198
+ }
6199
+ function StatsSkeleton({ columns = 4, className }) {
6200
+ return /* @__PURE__ */ jsxRuntime.jsx(SimpleGrid, { minChildWidth: "180px", gap: "md", className, children: Array.from({ length: columns }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", className: "p-4 border border-border rounded-container", children: [
6201
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-1/2 h-3" }),
6202
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-7 w-2/3" })
6203
+ ] }, i)) });
6204
+ }
6205
+ function DetailSkeleton({ rows = 6, className }) {
6206
+ return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "lg", className: cn("p-6 border border-border rounded-container", className), children: [
6207
+ /* @__PURE__ */ jsxRuntime.jsxs(HStack, { className: "items-start justify-between", gap: "md", children: [
6208
+ /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", className: "items-center", children: [
6209
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-8 w-56" }),
6210
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-6 w-20 rounded-full" })
6211
+ ] }),
6212
+ /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", children: [
6213
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-9 w-24 rounded-interactive" }),
6214
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-9 w-9 rounded-interactive" })
6215
+ ] })
6216
+ ] }),
6217
+ /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "md", children: [
6218
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-20 flex-1" }),
6219
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-20 flex-1" }),
6220
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-20 flex-1" })
6221
+ ] }),
6222
+ /* @__PURE__ */ jsxRuntime.jsx(SimpleGrid, { minChildWidth: "200px", maxCols: 3, gap: "md", children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", children: [
6223
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-1/3 h-3" }),
6224
+ /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-5 w-2/3" })
6225
+ ] }, i)) }),
6226
+ /* @__PURE__ */ jsxRuntime.jsx(TextSkeleton, { rows: 3 })
6227
+ ] });
6228
+ }
6229
+ function Skeleton({
6230
+ variant = "text",
6231
+ spec,
6232
+ rows,
6233
+ columns,
6234
+ fields,
6235
+ className,
6236
+ ...rest
6237
+ }) {
6238
+ const { t } = useTranslate();
6239
+ const shape = spec !== void 0 ? shapeOfSpec(spec) : { variant, rows, columns, fields };
6240
+ if (shape === null) return null;
6241
+ return /* @__PURE__ */ jsxRuntime.jsx(
6242
+ Box,
6243
+ {
6244
+ ...domPassthrough(rest),
6245
+ role: "status",
6246
+ "aria-busy": "true",
6247
+ "aria-label": rest["aria-label"] ?? t("common.loading"),
6248
+ "data-skeleton": shape.variant,
6249
+ ...{ [core.LOADING_STATE_MARKER]: "" },
6250
+ className: "w-full",
6251
+ children: renderVariant(shape.variant, shape.rows, shape.columns, shape.fields, className)
6252
+ }
6253
+ );
6254
+ }
6255
+ function shapeOfSpec(spec) {
6256
+ if (spec === "none") return null;
6257
+ return typeof spec === "string" ? { variant: spec } : spec;
6258
+ }
6259
+ function renderVariant(variant, rows, columns, fields, className) {
6260
+ switch (variant) {
6261
+ case "header":
6262
+ return /* @__PURE__ */ jsxRuntime.jsx(HeaderSkeleton, { className });
6263
+ case "table":
6264
+ return /* @__PURE__ */ jsxRuntime.jsx(TableSkeleton, { rows, columns, className });
6265
+ case "list":
6266
+ return /* @__PURE__ */ jsxRuntime.jsx(ListSkeleton, { rows, className });
6267
+ case "grid":
6268
+ return /* @__PURE__ */ jsxRuntime.jsx(GridSkeleton, { rows, className });
6269
+ case "detail":
6270
+ return /* @__PURE__ */ jsxRuntime.jsx(DetailSkeleton, { rows, className });
6271
+ case "stats":
6272
+ return /* @__PURE__ */ jsxRuntime.jsx(StatsSkeleton, { columns, className });
6273
+ case "form":
6274
+ return /* @__PURE__ */ jsxRuntime.jsx(FormSkeleton, { fields, className });
6275
+ case "card":
6276
+ return /* @__PURE__ */ jsxRuntime.jsx(CardSkeleton, { className });
6277
+ case "text":
6278
+ return /* @__PURE__ */ jsxRuntime.jsx(TextSkeleton, { rows, className });
6279
+ }
6280
+ }
6281
+ Skeleton.displayName = "Skeleton";
6046
6282
  var COLOR_VAR = {
6047
6283
  primary: "var(--color-primary)",
6048
6284
  success: "var(--color-success)",
@@ -6102,7 +6338,7 @@ var Sparkline = ({
6102
6338
  Sparkline.displayName = "Sparkline";
6103
6339
  var lookStyles2 = {
6104
6340
  elevated: "",
6105
- flat: "shadow-none border-[length:var(--border-width)] border-border",
6341
+ flat: "shadow-none",
6106
6342
  "progress-backed": "",
6107
6343
  gauge: "",
6108
6344
  sparkline: ""
@@ -6142,12 +6378,15 @@ var StatDisplay = ({
6142
6378
  look = "elevated",
6143
6379
  className,
6144
6380
  isLoading = false,
6381
+ skeleton = { variant: "stats", columns: 1 },
6145
6382
  error = null,
6383
+ surface = "auto",
6146
6384
  ...rest
6147
6385
  }) => {
6386
+ const contentSurface = useContentSurface(surface);
6148
6387
  const eventBus = useEventBus();
6149
6388
  const fmt = useFormatContext();
6150
- const handleClick = React16.useCallback(() => {
6389
+ const handleClick = React17.useCallback(() => {
6151
6390
  if (clickEvent) eventBus.emit(`UI:${clickEvent}`, { metricLabel: label });
6152
6391
  }, [clickEvent, eventBus, label]);
6153
6392
  const ResolvedIcon = typeof iconProp === "string" ? resolveIcon(iconProp) : typeof iconProp === "function" ? iconProp : null;
@@ -6165,13 +6404,12 @@ var StatDisplay = ({
6165
6404
  const trendSuffix = trendFormat === "percent" ? "%" : "";
6166
6405
  const trendLabel = showTrend ? `${trendUp ? "\u2191" : "\u2193"} ${trendMagnitude}${trendSuffix}` : "";
6167
6406
  if (error) {
6168
- return /* @__PURE__ */ jsxRuntime.jsx(Card, { ...domPassthrough(rest), className: cn(padSizes[size], className), children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", color: "error", children: error.message }) });
6407
+ return contentSurface.provide(
6408
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { ...domPassthrough(rest), className: cn(contentSurface.className, "rounded-container", padSizes[size], className), children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", color: "error", children: error.message }) })
6409
+ );
6169
6410
  }
6170
6411
  if (isLoading) {
6171
- return /* @__PURE__ */ jsxRuntime.jsx(Card, { ...domPassthrough(rest), className: cn(padSizes[size], className), children: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", className: "animate-pulse", children: [
6172
- /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "h-3 bg-muted rounded w-16" }),
6173
- /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "h-6 bg-muted rounded w-12" })
6174
- ] }) });
6412
+ return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { spec: skeleton, className });
6175
6413
  }
6176
6414
  if (compact) {
6177
6415
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -6191,40 +6429,42 @@ var StatDisplay = ({
6191
6429
  }
6192
6430
  );
6193
6431
  }
6194
- return /* @__PURE__ */ jsxRuntime.jsx(
6195
- Card,
6196
- {
6197
- ...domPassthrough(rest),
6198
- className: cn(padSizes[size], lookStyles2[look], clickEvent && "cursor-pointer hover:shadow-elevation-dialog transition-shadow", className),
6199
- ...pressableProps(clickEvent ? handleClick : void 0),
6200
- children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "start", justify: "between", children: [
6201
- /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: "space-y-1 flex-1", children: [
6202
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "overline", color: "secondary", children: label }),
6203
- /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "end", children: [
6204
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h4", className: cn("", valueSizes[size], variantColor[variant]), children: displayValue }),
6205
- showTrend && /* @__PURE__ */ jsxRuntime.jsx(
6206
- Typography,
6432
+ return contentSurface.provide(
6433
+ /* @__PURE__ */ jsxRuntime.jsx(
6434
+ Box,
6435
+ {
6436
+ ...domPassthrough(rest),
6437
+ className: cn(contentSurface.className, "rounded-container", padSizes[size], lookStyles2[look], clickEvent && "cursor-pointer hover:shadow-elevation-dialog transition-shadow", className),
6438
+ ...pressableProps(clickEvent ? handleClick : void 0),
6439
+ children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "start", justify: "between", children: [
6440
+ /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: "space-y-1 flex-1", children: [
6441
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "overline", color: "secondary", children: label }),
6442
+ /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "end", children: [
6443
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h4", className: cn("", valueSizes[size], variantColor[variant]), children: displayValue }),
6444
+ showTrend && /* @__PURE__ */ jsxRuntime.jsx(
6445
+ Typography,
6446
+ {
6447
+ variant: "caption",
6448
+ className: cn("font-semibold pb-1", trendIsGood ? "text-success" : "text-error"),
6449
+ children: trendLabel
6450
+ }
6451
+ )
6452
+ ] }),
6453
+ showTarget && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "mt-2 h-1.5 w-full bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
6454
+ Box,
6207
6455
  {
6208
- variant: "caption",
6209
- className: cn("font-semibold pb-1", trendIsGood ? "text-success" : "text-error"),
6210
- children: trendLabel
6456
+ className: cn("h-full rounded-full transition-all", `bg-${variant === "default" ? "primary" : variant}`),
6457
+ style: { width: `${targetPct}%` }
6211
6458
  }
6212
- )
6459
+ ) })
6213
6460
  ] }),
6214
- showTarget && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "mt-2 h-1.5 w-full bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
6215
- Box,
6216
- {
6217
- className: cn("h-full rounded-full transition-all", `bg-${variant === "default" ? "primary" : variant}`),
6218
- style: { width: `${targetPct}%` }
6219
- }
6220
- ) })
6221
- ] }),
6222
- /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", align: "end", children: [
6223
- ResolvedIcon && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("p-3 rounded-container", iconBg), children: /* @__PURE__ */ jsxRuntime.jsx(ResolvedIcon, { className: cn(iconSizes[size], iconColor) }) }),
6224
- sparklineData && sparklineData.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(Sparkline, { data: sparklineData, color: "auto" })
6461
+ /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", align: "end", children: [
6462
+ ResolvedIcon && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("p-3 rounded-container", iconBg), children: /* @__PURE__ */ jsxRuntime.jsx(ResolvedIcon, { className: cn(iconSizes[size], iconColor) }) }),
6463
+ sparklineData && sparklineData.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(Sparkline, { data: sparklineData, color: "auto" })
6464
+ ] })
6225
6465
  ] })
6226
- ] })
6227
- }
6466
+ }
6467
+ )
6228
6468
  );
6229
6469
  };
6230
6470
  StatDisplay.displayName = "StatDisplay";
@@ -6300,14 +6540,14 @@ var AnimatedCounter = ({
6300
6540
  ...rest
6301
6541
  }) => {
6302
6542
  const fmt = useFormatContext();
6303
- const ref = React16.useRef(null);
6543
+ const ref = React17.useRef(null);
6304
6544
  const parsed = parseValue(value);
6305
6545
  const target = parsed.num ?? 0;
6306
- const [visible, setVisible] = React16.useState(() => typeof IntersectionObserver === "undefined");
6307
- const [display, setDisplay] = React16.useState(() => typeof IntersectionObserver === "undefined" ? target : 0);
6308
- const shownRef = React16.useRef(display);
6309
- const frameRef = React16.useRef(null);
6310
- React16.useEffect(() => {
6546
+ const [visible, setVisible] = React17.useState(() => typeof IntersectionObserver === "undefined");
6547
+ const [display, setDisplay] = React17.useState(() => typeof IntersectionObserver === "undefined" ? target : 0);
6548
+ const shownRef = React17.useRef(display);
6549
+ const frameRef = React17.useRef(null);
6550
+ React17.useEffect(() => {
6311
6551
  if (visible) return;
6312
6552
  const el = ref.current;
6313
6553
  if (!el || typeof IntersectionObserver === "undefined") {
@@ -6326,7 +6566,7 @@ var AnimatedCounter = ({
6326
6566
  observer2.observe(el);
6327
6567
  return () => observer2.disconnect();
6328
6568
  }, [visible]);
6329
- React16.useEffect(() => {
6569
+ React17.useEffect(() => {
6330
6570
  if (!visible) return;
6331
6571
  const from = shownRef.current;
6332
6572
  if (from === target || prefersReducedMotion() || typeof requestAnimationFrame === "undefined") {
@@ -6375,7 +6615,7 @@ var animatedStyles = {
6375
6615
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
6376
6616
  "none": {}
6377
6617
  };
6378
- var AnimatedReveal = React16__namespace.default.forwardRef(
6618
+ var AnimatedReveal = React17__namespace.default.forwardRef(
6379
6619
  ({
6380
6620
  trigger = "scroll",
6381
6621
  animation = "fade-up",
@@ -6390,10 +6630,10 @@ var AnimatedReveal = React16__namespace.default.forwardRef(
6390
6630
  style,
6391
6631
  ...props
6392
6632
  }, forwardedRef) => {
6393
- const [isAnimated, setIsAnimated] = React16.useState(false);
6394
- const internalRef = React16.useRef(null);
6395
- const hasAnimated = React16.useRef(false);
6396
- const setRef = React16.useCallback(
6633
+ const [isAnimated, setIsAnimated] = React17.useState(false);
6634
+ const internalRef = React17.useRef(null);
6635
+ const hasAnimated = React17.useRef(false);
6636
+ const setRef = React17.useCallback(
6397
6637
  (node) => {
6398
6638
  internalRef.current = node;
6399
6639
  if (typeof forwardedRef === "function") forwardedRef(node);
@@ -6401,7 +6641,7 @@ var AnimatedReveal = React16__namespace.default.forwardRef(
6401
6641
  },
6402
6642
  [forwardedRef]
6403
6643
  );
6404
- React16.useEffect(() => {
6644
+ React17.useEffect(() => {
6405
6645
  if (trigger !== "scroll") return;
6406
6646
  const el = internalRef.current;
6407
6647
  if (!el) return;
@@ -6427,7 +6667,7 @@ var AnimatedReveal = React16__namespace.default.forwardRef(
6427
6667
  setIsAnimated(false);
6428
6668
  }
6429
6669
  } : void 0;
6430
- React16.useEffect(() => {
6670
+ React17.useEffect(() => {
6431
6671
  if (trigger === "manual" && manualAnimate !== void 0) {
6432
6672
  setIsAnimated(manualAnimate);
6433
6673
  }
@@ -6457,9 +6697,9 @@ var AnimatedReveal = React16__namespace.default.forwardRef(
6457
6697
  );
6458
6698
  AnimatedReveal.displayName = "AnimatedReveal";
6459
6699
  function useFetchedSvg(src) {
6460
- const [svg, setSvg] = React16.useState(null);
6461
- const cache = React16.useRef({});
6462
- React16.useEffect(() => {
6700
+ const [svg, setSvg] = React17.useState(null);
6701
+ const cache = React17.useRef({});
6702
+ React17.useEffect(() => {
6463
6703
  if (!src) {
6464
6704
  setSvg(null);
6465
6705
  return;
@@ -6528,7 +6768,7 @@ function applyMorphAnimation(container, animate, duration, delay, easing) {
6528
6768
  el.style.opacity = animate ? "1" : "0";
6529
6769
  });
6530
6770
  }
6531
- var AnimatedGraphic = React16__namespace.default.forwardRef(
6771
+ var AnimatedGraphic = React17__namespace.default.forwardRef(
6532
6772
  ({
6533
6773
  src,
6534
6774
  svgContent,
@@ -6547,11 +6787,11 @@ var AnimatedGraphic = React16__namespace.default.forwardRef(
6547
6787
  children,
6548
6788
  ...props
6549
6789
  }, ref) => {
6550
- const containerRef = React16.useRef(null);
6790
+ const containerRef = React17.useRef(null);
6551
6791
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6552
6792
  const resolvedSvg = svgContent ?? fetchedSvg;
6553
- const prevAnimateRef = React16.useRef(animate);
6554
- const setRef = React16__namespace.default.useCallback(
6793
+ const prevAnimateRef = React17.useRef(animate);
6794
+ const setRef = React17__namespace.default.useCallback(
6555
6795
  (node) => {
6556
6796
  containerRef.current = node;
6557
6797
  if (typeof ref === "function") ref(node);
@@ -6559,7 +6799,7 @@ var AnimatedGraphic = React16__namespace.default.forwardRef(
6559
6799
  },
6560
6800
  [ref]
6561
6801
  );
6562
- React16.useEffect(() => {
6802
+ React17.useEffect(() => {
6563
6803
  const el = containerRef.current;
6564
6804
  if (!el || !strokeColor) return;
6565
6805
  const paths = el.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
@@ -6567,7 +6807,7 @@ var AnimatedGraphic = React16__namespace.default.forwardRef(
6567
6807
  p.style.stroke = strokeColor;
6568
6808
  });
6569
6809
  }, [resolvedSvg, strokeColor]);
6570
- React16.useEffect(() => {
6810
+ React17.useEffect(() => {
6571
6811
  const el = containerRef.current;
6572
6812
  if (!el || !resolvedSvg) return;
6573
6813
  if (animation === "draw" || animation === "fill") {
@@ -6592,7 +6832,7 @@ var AnimatedGraphic = React16__namespace.default.forwardRef(
6592
6832
  });
6593
6833
  }
6594
6834
  }, [resolvedSvg, animation]);
6595
- React16.useEffect(() => {
6835
+ React17.useEffect(() => {
6596
6836
  const el = containerRef.current;
6597
6837
  if (!el) return;
6598
6838
  const id = requestAnimationFrame(() => {
@@ -7393,7 +7633,7 @@ var GeometricPattern = ({
7393
7633
  children,
7394
7634
  className
7395
7635
  }) => {
7396
- const reactId = React16.useId();
7636
+ const reactId = React17.useId();
7397
7637
  const patternId = `gp${reactId.replace(/:/g, "")}`;
7398
7638
  const size = 60 * scale2;
7399
7639
  const stripHeight = 40 * scale2;
@@ -7628,7 +7868,7 @@ var EdgeDecoration = ({
7628
7868
  width = 15,
7629
7869
  className
7630
7870
  }) => {
7631
- const id = React16.useId();
7871
+ const id = React17.useId();
7632
7872
  const Variant = VARIANT_MAP2[variant];
7633
7873
  const resolvedColor = color in colorTokenVars2 ? colorTokenVars2[color] : color;
7634
7874
  const sides = side === "both" ? ["left", "right"] : [side];