@almadar/ui 6.61.0 → 6.62.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.
Files changed (41) hide show
  1. package/dist/{BehaviorValueFrame-QTD7BWOI.js → BehaviorValueFrame-QYFJEMN5.js} +12 -12
  2. package/dist/{TraitValueFrame-WOXNLLMM.js → TraitValueFrame-X6IL3UST.js} +11 -11
  3. package/dist/Typography-KBATMU2V.js +5 -0
  4. package/dist/{UISlotRenderer-EEOXSJCI.js → UISlotRenderer-NZBV5BUI.js} +10 -10
  5. package/dist/avl/index.cjs +303 -261
  6. package/dist/avl/index.js +13 -13
  7. package/dist/{chunk-CB64IOYD.js → chunk-7JRWELUC.js} +4 -2
  8. package/dist/{chunk-6ZCU3BQN.js → chunk-CXQENFO2.js} +1 -1
  9. package/dist/{chunk-LUREMDI3.js → chunk-D4NAA2JW.js} +2 -2
  10. package/dist/{chunk-UTSDPJUP.js → chunk-DXPCAQJU.js} +3 -3
  11. package/dist/{chunk-MGN6B6OQ.js → chunk-EDPUQ2ZJ.js} +9 -0
  12. package/dist/{chunk-KZRAMPM6.js → chunk-ERDYADVZ.js} +1 -1
  13. package/dist/{chunk-7NIU5GDC.js → chunk-EZ5FSNOE.js} +2 -2
  14. package/dist/{chunk-6PV4LASE.js → chunk-G6EFTACU.js} +281 -206
  15. package/dist/{chunk-EIIQGOZW.js → chunk-GVQOTA7T.js} +1 -1
  16. package/dist/{chunk-FYX64CDL.js → chunk-QOV3TUAA.js} +2 -1
  17. package/dist/{chunk-F7NZ3KZQ.js → chunk-WBWXBA5H.js} +1 -1
  18. package/dist/components/index.cjs +414 -312
  19. package/dist/components/index.d.ts +40 -8
  20. package/dist/components/index.js +14 -14
  21. package/dist/hooks/index.cjs +6 -3
  22. package/dist/hooks/index.js +5 -5
  23. package/dist/lib/drawable/three/index.cjs +11 -1
  24. package/dist/lib/drawable/three/index.js +6 -6
  25. package/dist/lib/index.cjs +27 -1
  26. package/dist/lib/index.js +27 -2
  27. package/dist/locales/index.cjs +6 -3
  28. package/dist/locales/index.js +2 -2
  29. package/dist/providers/index.cjs +302 -260
  30. package/dist/providers/index.js +10 -10
  31. package/dist/runtime/index.cjs +302 -260
  32. package/dist/runtime/index.d.ts +6 -1
  33. package/dist/runtime/index.js +12 -12
  34. package/dist/ssr/index.cjs +2 -1
  35. package/dist/ssr/index.js +2 -1
  36. package/locales/ar.json +2 -1
  37. package/locales/en.json +2 -1
  38. package/locales/sl.json +2 -1
  39. package/package.json +6 -6
  40. package/themes/_base.css +27 -0
  41. package/dist/Typography-BY4A2NBY.js +0 -5
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var jsxRuntime = require('react/jsx-runtime');
4
- var React89 = require('react');
5
4
  var clsx = require('clsx');
6
5
  var tailwindMerge = require('tailwind-merge');
6
+ var React89 = require('react');
7
7
  var providers = require('@almadar/ui/providers');
8
8
  var core = require('@almadar/core');
9
9
  var logger = require('@almadar/logger');
@@ -291,11 +291,143 @@ var init_SvgBranch = __esm({
291
291
  exports.SvgBranch.displayName = "SvgBranch";
292
292
  }
293
293
  });
294
+
295
+ // lib/theme-scale.ts
296
+ var THEME_SCALE_KEYS;
297
+ var init_theme_scale = __esm({
298
+ "lib/theme-scale.ts"() {
299
+ THEME_SCALE_KEYS = {
300
+ height: ["button-sm", "button-md", "button-lg", "input-sm", "input-md", "input-lg", "row-compact", "row-normal", "row-spacious", "icon-default"],
301
+ minHeight: ["button-sm", "button-md", "button-lg", "input-sm", "input-md", "input-lg", "row-compact", "row-normal", "row-spacious"],
302
+ width: ["icon-default"],
303
+ fontSize: ["display-1", "display-2"],
304
+ borderRadius: ["container", "interactive", "pill"],
305
+ boxShadow: ["elevation-card", "elevation-popover", "elevation-dialog", "elevation-toast", "elevation-interactive", "elevation-pressed"],
306
+ spacing: ["card-sm", "card-md", "card-lg", "dialog", "section"]
307
+ };
308
+ }
309
+ });
310
+ function cn(...inputs) {
311
+ return twMerge(clsx.clsx(inputs));
312
+ }
313
+ var scale, twMerge;
314
+ var init_cn = __esm({
315
+ "lib/cn.ts"() {
316
+ init_theme_scale();
317
+ scale = (keys) => [...keys];
318
+ twMerge = tailwindMerge.extendTailwindMerge({
319
+ extend: {
320
+ theme: {
321
+ spacing: scale(THEME_SCALE_KEYS.spacing),
322
+ borderRadius: scale(THEME_SCALE_KEYS.borderRadius)
323
+ },
324
+ classGroups: {
325
+ h: [{ h: scale(THEME_SCALE_KEYS.height) }],
326
+ "min-h": [{ "min-h": scale(THEME_SCALE_KEYS.minHeight) }],
327
+ w: [{ w: scale(THEME_SCALE_KEYS.width) }],
328
+ "font-size": [{ text: scale(THEME_SCALE_KEYS.fontSize) }],
329
+ shadow: [{ shadow: scale(THEME_SCALE_KEYS.boxShadow) }]
330
+ }
331
+ }
332
+ });
333
+ }
334
+ });
335
+ function isMotionEnabled() {
336
+ if (typeof document === "undefined") return true;
337
+ if (motionEnabledCache !== null) return motionEnabledCache;
338
+ const v = getComputedStyle(document.documentElement).getPropertyValue("--motion-enable").trim().toLowerCase();
339
+ motionEnabledCache = v !== "off";
340
+ return motionEnabledCache;
341
+ }
342
+ function usePresence(show, opts) {
343
+ const { animation, animate = true, onExited } = opts;
344
+ const [mounted, setMounted] = React89.useState(show);
345
+ const [exiting, setExiting] = React89.useState(false);
346
+ const prev = React89.useRef(show);
347
+ const onExitedRef = React89.useRef(onExited);
348
+ onExitedRef.current = onExited;
349
+ const safeTimer = React89.useRef(null);
350
+ const clearSafe = React89.useCallback(() => {
351
+ if (safeTimer.current) {
352
+ clearTimeout(safeTimer.current);
353
+ safeTimer.current = null;
354
+ }
355
+ }, []);
356
+ const finishExit = React89.useCallback(() => {
357
+ clearSafe();
358
+ setExiting(false);
359
+ setMounted(false);
360
+ onExitedRef.current?.();
361
+ }, [clearSafe]);
362
+ React89.useLayoutEffect(() => {
363
+ const moving = animate && isMotionEnabled();
364
+ if (show && !prev.current) {
365
+ setExiting(false);
366
+ setMounted(true);
367
+ } else if (!show && prev.current) {
368
+ if (moving) {
369
+ setExiting(true);
370
+ clearSafe();
371
+ safeTimer.current = setTimeout(finishExit, SAFE_EXIT_MS);
372
+ } else {
373
+ setMounted(false);
374
+ setExiting(false);
375
+ onExitedRef.current?.();
376
+ }
377
+ }
378
+ prev.current = show;
379
+ }, [show, animate, clearSafe, finishExit]);
380
+ React89.useEffect(() => () => clearSafe(), [clearSafe]);
381
+ const disabled = !animate || !isMotionEnabled();
382
+ const className = disabled ? "" : show ? `animate-${animation}-in` : `animate-${animation}-out`;
383
+ const onAnimationEnd = React89.useCallback(
384
+ (e) => {
385
+ if (e.target !== e.currentTarget) return;
386
+ if (exiting) finishExit();
387
+ },
388
+ [exiting, finishExit]
389
+ );
390
+ return { mounted, exiting, className, onAnimationEnd };
391
+ }
392
+ var SAFE_EXIT_MS, motionEnabledCache; exports.Presence = void 0;
393
+ var init_Presence = __esm({
394
+ "components/core/atoms/Presence.tsx"() {
395
+ "use client";
396
+ init_domPassthrough();
397
+ init_cn();
398
+ SAFE_EXIT_MS = 1e3;
399
+ motionEnabledCache = null;
400
+ exports.Presence = ({ show, className, children, ...rest }) => {
401
+ const { mounted, className: animClass, onAnimationEnd } = usePresence(show, rest);
402
+ if (!mounted) return null;
403
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(animClass, className), onAnimationEnd, ...domPassthrough(rest), children });
404
+ };
405
+ exports.Presence.displayName = "Presence";
406
+ }
407
+ });
408
+
409
+ // lib/svgMotion.ts
410
+ function svgMotionClass(motion, animated) {
411
+ if (!animated || !isMotionEnabled()) return void 0;
412
+ return SVG_MOTION_CLASSES[motion];
413
+ }
414
+ var SVG_MOTION_CLASSES;
415
+ var init_svgMotion = __esm({
416
+ "lib/svgMotion.ts"() {
417
+ init_Presence();
418
+ SVG_MOTION_CLASSES = {
419
+ flowDash: "almadar-svg-flow-dash",
420
+ pulseRing: "almadar-svg-pulse-ring",
421
+ pulseExpand: "almadar-svg-pulse-expand"
422
+ };
423
+ }
424
+ });
294
425
  exports.SvgConnection = void 0;
295
426
  var init_SvgConnection = __esm({
296
427
  "components/core/atoms/svg/SvgConnection.tsx"() {
297
428
  "use client";
298
429
  init_domPassthrough();
430
+ init_svgMotion();
299
431
  exports.SvgConnection = ({
300
432
  x1 = 10,
301
433
  y1 = 50,
@@ -320,7 +452,7 @@ var init_SvgConnection = __esm({
320
452
  {
321
453
  ...asRoot ? void 0 : a11y,
322
454
  className: [
323
- variant === "animated" ? "almadar-svg-flow-dash" : void 0,
455
+ svgMotionClass("flowDash", variant === "animated"),
324
456
  className
325
457
  ].filter(Boolean).join(" ") || void 0,
326
458
  x1,
@@ -347,6 +479,7 @@ var init_SvgFlow = __esm({
347
479
  "components/core/atoms/svg/SvgFlow.tsx"() {
348
480
  "use client";
349
481
  init_domPassthrough();
482
+ init_svgMotion();
350
483
  flowIdCounter = 0;
351
484
  DEFAULT_POINTS = [[10, 50], [50, 20], [90, 50]];
352
485
  exports.SvgFlow = ({
@@ -394,7 +527,7 @@ var init_SvgFlow = __esm({
394
527
  strokeLinecap: "round",
395
528
  strokeLinejoin: "round",
396
529
  markerEnd: `url(#${markerId})`,
397
- className: animated ? "almadar-svg-flow-dash" : void 0,
530
+ className: svgMotionClass("flowDash", animated),
398
531
  strokeDasharray: animated ? "8 6" : void 0
399
532
  }
400
533
  )
@@ -828,6 +961,7 @@ var init_SvgNode = __esm({
828
961
  "components/core/atoms/svg/SvgNode.tsx"() {
829
962
  "use client";
830
963
  init_domPassthrough();
964
+ init_svgMotion();
831
965
  exports.SvgNode = ({
832
966
  x = 50,
833
967
  y = 50,
@@ -854,7 +988,7 @@ var init_SvgNode = __esm({
854
988
  stroke: color,
855
989
  strokeWidth: 1,
856
990
  opacity: 0.3,
857
- className: "almadar-svg-pulse-ring"
991
+ className: svgMotionClass("pulseRing", true)
858
992
  }
859
993
  ),
860
994
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -889,23 +1023,12 @@ var init_SvgNode = __esm({
889
1023
  exports.SvgNode.displayName = "SvgNode";
890
1024
  }
891
1025
  });
892
- var PULSE_KEYFRAMES; exports.SvgPulse = void 0;
1026
+ exports.SvgPulse = void 0;
893
1027
  var init_SvgPulse = __esm({
894
1028
  "components/core/atoms/svg/SvgPulse.tsx"() {
895
1029
  "use client";
896
1030
  init_domPassthrough();
897
- PULSE_KEYFRAMES = `
898
- @keyframes almadar-svg-pulse-expand {
899
- 0% {
900
- transform: scale(0.3);
901
- opacity: 0.4;
902
- }
903
- 100% {
904
- transform: scale(1);
905
- opacity: 0;
906
- }
907
- }
908
- `;
1031
+ init_svgMotion();
909
1032
  exports.SvgPulse = ({
910
1033
  cx = 70,
911
1034
  cy = 70,
@@ -921,8 +1044,8 @@ var init_SvgPulse = __esm({
921
1044
  ...rest
922
1045
  }) => {
923
1046
  const a11y = domPassthrough(rest);
1047
+ const pulseClass2 = svgMotionClass("pulseExpand", animated);
924
1048
  const inner = /* @__PURE__ */ jsxRuntime.jsxs("g", { ...asRoot ? void 0 : a11y, className, opacity, children: [
925
- animated && /* @__PURE__ */ jsxRuntime.jsx("style", { children: PULSE_KEYFRAMES }),
926
1049
  Array.from({ length: rings }).map((_, i) => {
927
1050
  const ringRadius = (i + 1) / rings * maxRadius;
928
1051
  const ringOpacity = 1 - i / rings * 0.6;
@@ -936,11 +1059,9 @@ var init_SvgPulse = __esm({
936
1059
  fill: "none",
937
1060
  stroke: color,
938
1061
  strokeWidth: 1.5,
939
- opacity: animated ? void 0 : ringOpacity * 0.4,
940
- style: animated ? {
941
- transformOrigin: `${cx}px ${cy}px`,
942
- animation: `almadar-svg-pulse-expand 2s ease-out ${delay}s infinite`
943
- } : void 0
1062
+ opacity: pulseClass2 ? void 0 : ringOpacity * 0.4,
1063
+ className: pulseClass2,
1064
+ style: pulseClass2 ? { animationDelay: `${delay}s` } : void 0
944
1065
  },
945
1066
  i
946
1067
  );
@@ -1171,47 +1292,6 @@ var init_svg = __esm({
1171
1292
  init_SvgStack();
1172
1293
  }
1173
1294
  });
1174
-
1175
- // lib/theme-scale.ts
1176
- var THEME_SCALE_KEYS;
1177
- var init_theme_scale = __esm({
1178
- "lib/theme-scale.ts"() {
1179
- THEME_SCALE_KEYS = {
1180
- height: ["button-sm", "button-md", "button-lg", "input-sm", "input-md", "input-lg", "row-compact", "row-normal", "row-spacious", "icon-default"],
1181
- minHeight: ["button-sm", "button-md", "button-lg", "input-sm", "input-md", "input-lg", "row-compact", "row-normal", "row-spacious"],
1182
- width: ["icon-default"],
1183
- fontSize: ["display-1", "display-2"],
1184
- borderRadius: ["container", "interactive", "pill"],
1185
- boxShadow: ["elevation-card", "elevation-popover", "elevation-dialog", "elevation-toast", "elevation-interactive", "elevation-pressed"],
1186
- spacing: ["card-sm", "card-md", "card-lg", "dialog", "section"]
1187
- };
1188
- }
1189
- });
1190
- function cn(...inputs) {
1191
- return twMerge(clsx.clsx(inputs));
1192
- }
1193
- var scale, twMerge;
1194
- var init_cn = __esm({
1195
- "lib/cn.ts"() {
1196
- init_theme_scale();
1197
- scale = (keys) => [...keys];
1198
- twMerge = tailwindMerge.extendTailwindMerge({
1199
- extend: {
1200
- theme: {
1201
- spacing: scale(THEME_SCALE_KEYS.spacing),
1202
- borderRadius: scale(THEME_SCALE_KEYS.borderRadius)
1203
- },
1204
- classGroups: {
1205
- h: [{ h: scale(THEME_SCALE_KEYS.height) }],
1206
- "min-h": [{ "min-h": scale(THEME_SCALE_KEYS.minHeight) }],
1207
- w: [{ w: scale(THEME_SCALE_KEYS.width) }],
1208
- "font-size": [{ text: scale(THEME_SCALE_KEYS.fontSize) }],
1209
- shadow: [{ shadow: scale(THEME_SCALE_KEYS.boxShadow) }]
1210
- }
1211
- }
1212
- });
1213
- }
1214
- });
1215
1295
  function notify(key) {
1216
1296
  keyListeners.get(key)?.forEach((cb) => cb());
1217
1297
  }
@@ -3769,7 +3849,8 @@ var init_en = __esm({
3769
3849
  "avl.stateInitial": "start",
3770
3850
  "avl.stateTerminal": "end",
3771
3851
  "avl.guardCaption": "The transition only fires when this check is true.",
3772
- "avl.effectsCaption": "What runs, in order, when the transition fires."
3852
+ "avl.effectsCaption": "What runs, in order, when the transition fires.",
3853
+ "aria.carousel": "carousel"
3773
3854
  };
3774
3855
  }
3775
3856
  });
@@ -5452,79 +5533,6 @@ var init_useTapReveal = __esm({
5452
5533
  "hooks/useTapReveal.ts"() {
5453
5534
  }
5454
5535
  });
5455
- function isMotionEnabled() {
5456
- if (typeof document === "undefined") return true;
5457
- if (motionEnabledCache !== null) return motionEnabledCache;
5458
- const v = getComputedStyle(document.documentElement).getPropertyValue("--motion-enable").trim().toLowerCase();
5459
- motionEnabledCache = v !== "off";
5460
- return motionEnabledCache;
5461
- }
5462
- function usePresence(show, opts) {
5463
- const { animation, animate = true, onExited } = opts;
5464
- const [mounted, setMounted] = React89.useState(show);
5465
- const [exiting, setExiting] = React89.useState(false);
5466
- const prev = React89.useRef(show);
5467
- const onExitedRef = React89.useRef(onExited);
5468
- onExitedRef.current = onExited;
5469
- const safeTimer = React89.useRef(null);
5470
- const clearSafe = React89.useCallback(() => {
5471
- if (safeTimer.current) {
5472
- clearTimeout(safeTimer.current);
5473
- safeTimer.current = null;
5474
- }
5475
- }, []);
5476
- const finishExit = React89.useCallback(() => {
5477
- clearSafe();
5478
- setExiting(false);
5479
- setMounted(false);
5480
- onExitedRef.current?.();
5481
- }, [clearSafe]);
5482
- React89.useLayoutEffect(() => {
5483
- const moving = animate && isMotionEnabled();
5484
- if (show && !prev.current) {
5485
- setExiting(false);
5486
- setMounted(true);
5487
- } else if (!show && prev.current) {
5488
- if (moving) {
5489
- setExiting(true);
5490
- clearSafe();
5491
- safeTimer.current = setTimeout(finishExit, SAFE_EXIT_MS);
5492
- } else {
5493
- setMounted(false);
5494
- setExiting(false);
5495
- onExitedRef.current?.();
5496
- }
5497
- }
5498
- prev.current = show;
5499
- }, [show, animate, clearSafe, finishExit]);
5500
- React89.useEffect(() => () => clearSafe(), [clearSafe]);
5501
- const disabled = !animate || !isMotionEnabled();
5502
- const className = disabled ? "" : show ? `animate-${animation}-in` : `animate-${animation}-out`;
5503
- const onAnimationEnd = React89.useCallback(
5504
- (e) => {
5505
- if (e.target !== e.currentTarget) return;
5506
- if (exiting) finishExit();
5507
- },
5508
- [exiting, finishExit]
5509
- );
5510
- return { mounted, exiting, className, onAnimationEnd };
5511
- }
5512
- var SAFE_EXIT_MS, motionEnabledCache; exports.Presence = void 0;
5513
- var init_Presence = __esm({
5514
- "components/core/atoms/Presence.tsx"() {
5515
- "use client";
5516
- init_domPassthrough();
5517
- init_cn();
5518
- SAFE_EXIT_MS = 1e3;
5519
- motionEnabledCache = null;
5520
- exports.Presence = ({ show, className, children, ...rest }) => {
5521
- const { mounted, className: animClass, onAnimationEnd } = usePresence(show, rest);
5522
- if (!mounted) return null;
5523
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(animClass, className), onAnimationEnd, ...domPassthrough(rest), children });
5524
- };
5525
- exports.Presence.displayName = "Presence";
5526
- }
5527
- });
5528
5536
 
5529
5537
  // lib/motion-tokens.ts
5530
5538
  function cssTimeMs(value) {
@@ -13140,7 +13148,7 @@ var init_CodeBlock = __esm({
13140
13148
  () => naturalTabs?.find((lang) => lang === pageLocale) ?? naturalTabs?.[0] ?? "en"
13141
13149
  );
13142
13150
  const activeNaturalLanguage = naturalTabs?.includes(naturalLanguage) === true ? naturalLanguage : naturalTabs?.[0] ?? "en";
13143
- const codeDir = naturalTabs && i18n.coreTables[activeNaturalLanguage].meta.rtl ? "rtl" : "ltr";
13151
+ const codeDir = naturalTabs && i18n.getVocabulary(activeNaturalLanguage).meta.rtl ? "rtl" : "ltr";
13144
13152
  const translationCache = React89.useMemo(() => /* @__PURE__ */ new Map(), [englishCode, files]);
13145
13153
  const translateFor = React89.useCallback(
13146
13154
  (source, sourceLanguage, cacheKey) => {
@@ -13157,14 +13165,14 @@ var init_CodeBlock = __esm({
13157
13165
  const code = translateFor(englishCode, language, "code");
13158
13166
  const naturalTabItems = naturalTabs?.map((lang) => ({
13159
13167
  id: `lang-${lang}`,
13160
- label: i18n.coreTables[lang].meta.name,
13168
+ label: i18n.getVocabulary(lang).meta.name,
13161
13169
  content: null
13162
13170
  }));
13163
13171
  const naturalTabStrip = naturalTabs && naturalTabItems ? /* @__PURE__ */ jsxRuntime.jsx(
13164
13172
  exports.Box,
13165
13173
  {
13166
13174
  className: "border-b border-border",
13167
- dir: i18n.coreTables[activeNaturalLanguage].meta.rtl ? "rtl" : "ltr",
13175
+ dir: i18n.getVocabulary(activeNaturalLanguage).meta.rtl ? "rtl" : "ltr",
13168
13176
  "data-testid": "codeblock-language-tabs",
13169
13177
  children: /* @__PURE__ */ jsxRuntime.jsx(
13170
13178
  exports.Tabs,
@@ -14661,6 +14669,10 @@ function resolveCanvasTheme(scope) {
14661
14669
  const c = r.color(toneVar(tone));
14662
14670
  tones[tone] = c ? colorCss(c) : "currentColor";
14663
14671
  }
14672
+ const surface = (name) => {
14673
+ const c = r.color(name);
14674
+ return c ? colorCss(c) : "transparent";
14675
+ };
14664
14676
  const ground = r.color("--surface-diagram");
14665
14677
  const text = {};
14666
14678
  const TEXT_FALLBACK = { xs: 12, sm: 14, base: 16, lg: 18, xl: 20, "2xl": 24 };
@@ -14668,6 +14680,11 @@ function resolveCanvasTheme(scope) {
14668
14680
  const body = r.family("--font-family-body", r.family("--font-family", "system-ui, sans-serif"));
14669
14681
  return {
14670
14682
  ground: ground ? colorCss(ground) : "transparent",
14683
+ surfaces: {
14684
+ muted: surface("--color-muted"),
14685
+ card: surface("--color-card"),
14686
+ onPrimary: surface("--color-primary-foreground")
14687
+ },
14671
14688
  tones,
14672
14689
  series: SERIES_TONES.map((t) => tones[t]),
14673
14690
  strokes: {
@@ -20418,10 +20435,10 @@ var init_AvlState = __esm({
20418
20435
  }) => {
20419
20436
  const width = computeWidth(explicitWidth, transitionCount);
20420
20437
  const rx = height / 2;
20421
- const roleColors = role ? STATE_COLORS[role] : null;
20422
- const fillColor = roleColors ? roleColors.fill : "none";
20423
- const strokeColor = roleColors ? roleColors.border : color;
20424
- const textColor = roleColors ? roleColors.border : color;
20438
+ const roleColors2 = role ? STATE_COLORS[role] : null;
20439
+ const fillColor = roleColors2 ? roleColors2.fill : "none";
20440
+ const strokeColor = roleColors2 ? roleColors2.border : color;
20441
+ const textColor = roleColors2 ? roleColors2.border : color;
20425
20442
  return /* @__PURE__ */ jsxRuntime.jsxs("g", { className, opacity, transform: `translate(${x},${y})`, children: [
20426
20443
  isInitial && /* @__PURE__ */ jsxRuntime.jsx(
20427
20444
  "circle",
@@ -26903,18 +26920,30 @@ var init_Carousel = __esm({
26903
26920
  loop = false,
26904
26921
  slideChangeEvent,
26905
26922
  slideChangePayload,
26923
+ orientation = "horizontal",
26924
+ fullHeight = false,
26925
+ loadMoreEvent,
26926
+ loadMoreAhead = 2,
26927
+ hasMore = false,
26928
+ isLoadingMore = false,
26906
26929
  className,
26907
26930
  ...rest
26908
26931
  }) => {
26932
+ const vertical = orientation === "vertical";
26933
+ const loadRequestedAt = React89.useRef(null);
26909
26934
  const [activeIndex, setActiveIndex] = React89.useState(0);
26910
26935
  const scrollRef = React89.useRef(null);
26936
+ const rootRef = React89.useRef(null);
26937
+ const [topOffset, setTopOffset] = React89.useState(0);
26911
26938
  const autoPlayRef = React89.useRef(null);
26912
26939
  const eventBus = useSafeEventBus3();
26913
26940
  const { t } = hooks.useTranslate();
26914
26941
  const safeItems = items ?? [];
26915
26942
  const totalSlides = safeItems.length;
26943
+ const announcedIndex = React89.useRef(0);
26916
26944
  const emitSlideChange = React89.useCallback(
26917
26945
  (newIndex) => {
26946
+ announcedIndex.current = newIndex;
26918
26947
  if (slideChangeEvent) {
26919
26948
  eventBus.emit(`UI:${slideChangeEvent}`, {
26920
26949
  index: newIndex,
@@ -26928,13 +26957,13 @@ var init_Carousel = __esm({
26928
26957
  (index) => {
26929
26958
  const container = scrollRef.current;
26930
26959
  if (!container) return;
26931
- const slideWidth = container.offsetWidth;
26932
- container.scrollTo({
26933
- left: slideWidth * index,
26934
- behavior: "smooth"
26935
- });
26960
+ const reduceMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
26961
+ const behavior = reduceMotion ? "auto" : "smooth";
26962
+ if (typeof container.scrollTo !== "function") return;
26963
+ if (vertical) container.scrollTo({ top: container.offsetHeight * index, behavior });
26964
+ else container.scrollTo({ left: container.offsetWidth * index, behavior });
26936
26965
  },
26937
- []
26966
+ [vertical]
26938
26967
  );
26939
26968
  const goToSlide = React89.useCallback(
26940
26969
  (index) => {
@@ -26958,10 +26987,7 @@ var init_Carousel = __esm({
26958
26987
  goToSlide(activeIndex - 1);
26959
26988
  }, [goToSlide, activeIndex]);
26960
26989
  const swipeHandlers = useSwipeGesture(
26961
- {
26962
- onSwipeLeft: goNext,
26963
- onSwipeRight: goPrev
26964
- },
26990
+ vertical ? { onSwipeUp: goNext, onSwipeDown: goPrev } : { onSwipeLeft: goNext, onSwipeRight: goPrev },
26965
26991
  { threshold: 40 }
26966
26992
  );
26967
26993
  React89.useEffect(() => {
@@ -26986,138 +27012,189 @@ var init_Carousel = __esm({
26986
27012
  const handleScroll = React89.useCallback(() => {
26987
27013
  const container = scrollRef.current;
26988
27014
  if (!container) return;
26989
- const slideWidth = container.offsetWidth;
26990
- if (slideWidth === 0) return;
26991
- const newIndex = Math.round(container.scrollLeft / slideWidth);
26992
- setActiveIndex((prev) => {
26993
- if (prev !== newIndex && newIndex >= 0 && newIndex < totalSlides) {
26994
- return newIndex;
27015
+ const slideSize = vertical ? container.offsetHeight : container.offsetWidth;
27016
+ if (slideSize === 0) return;
27017
+ const position = vertical ? container.scrollTop : container.scrollLeft;
27018
+ const newIndex = Math.round(position / slideSize);
27019
+ if (newIndex < 0 || newIndex >= totalSlides) return;
27020
+ setActiveIndex(newIndex);
27021
+ if (Math.abs(position - newIndex * slideSize) <= 1 && newIndex !== announcedIndex.current) {
27022
+ emitSlideChange(newIndex);
27023
+ }
27024
+ }, [totalSlides, vertical, emitSlideChange]);
27025
+ React89.useEffect(() => {
27026
+ if (!loadMoreEvent || !hasMore || isLoadingMore || totalSlides === 0) return;
27027
+ if (activeIndex < totalSlides - 1 - loadMoreAhead) return;
27028
+ if (loadRequestedAt.current === totalSlides) return;
27029
+ loadRequestedAt.current = totalSlides;
27030
+ eventBus.emit(`UI:${loadMoreEvent}`, { index: activeIndex });
27031
+ }, [activeIndex, totalSlides, loadMoreEvent, hasMore, isLoadingMore, loadMoreAhead, eventBus]);
27032
+ const viewportBound = vertical && fullHeight;
27033
+ React89.useLayoutEffect(() => {
27034
+ if (!viewportBound || typeof window === "undefined") return;
27035
+ const measure = () => {
27036
+ const root = rootRef.current;
27037
+ if (root) setTopOffset(Math.max(0, Math.round(root.getBoundingClientRect().top)));
27038
+ };
27039
+ measure();
27040
+ window.addEventListener("resize", measure);
27041
+ return () => window.removeEventListener("resize", measure);
27042
+ }, [viewportBound]);
27043
+ const handleKeyDown = React89.useCallback(
27044
+ (e) => {
27045
+ const next = vertical ? ["ArrowDown", "PageDown"] : ["ArrowRight"];
27046
+ const prev = vertical ? ["ArrowUp", "PageUp"] : ["ArrowLeft"];
27047
+ if (next.includes(e.key)) {
27048
+ e.preventDefault();
27049
+ goNext();
27050
+ } else if (prev.includes(e.key)) {
27051
+ e.preventDefault();
27052
+ goPrev();
26995
27053
  }
26996
- return prev;
26997
- });
26998
- }, [totalSlides]);
27054
+ },
27055
+ [vertical, goNext, goPrev]
27056
+ );
26999
27057
  const hasPrev = loop || activeIndex > 0;
27000
27058
  const hasNext = loop || activeIndex < totalSlides - 1;
27001
27059
  if (totalSlides === 0) return null;
27002
- return /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { position: "relative", overflow: "hidden", ...domPassthrough(rest), className: cn("w-full", className), children: [
27003
- /* @__PURE__ */ jsxRuntime.jsx(
27004
- exports.Box,
27005
- {
27006
- ref: scrollRef,
27007
- display: "flex",
27008
- overflow: "auto",
27009
- className: cn(
27010
- "w-full",
27011
- "scroll-smooth",
27012
- "scrollbar-none",
27013
- "[scroll-snap-type:x_mandatory]",
27014
- "[&::-webkit-scrollbar]:hidden",
27015
- "[-ms-overflow-style:none]"
27016
- ),
27017
- style: {
27018
- scrollSnapType: "x mandatory",
27019
- WebkitOverflowScrolling: "touch"
27020
- },
27021
- onScroll: handleScroll,
27022
- onPointerDown: swipeHandlers.onPointerDown,
27023
- onPointerMove: swipeHandlers.onPointerMove,
27024
- onPointerUp: swipeHandlers.onPointerUp,
27025
- onPointerCancel: swipeHandlers.onPointerCancel,
27026
- children: safeItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
27060
+ return /* @__PURE__ */ jsxRuntime.jsxs(
27061
+ exports.Box,
27062
+ {
27063
+ position: "relative",
27064
+ overflow: "hidden",
27065
+ role: "region",
27066
+ "aria-roledescription": t("aria.carousel"),
27067
+ tabIndex: 0,
27068
+ onKeyDown: handleKeyDown,
27069
+ ...domPassthrough(rest),
27070
+ ref: rootRef,
27071
+ className: cn("w-full", fullHeight && !viewportBound && "h-full", className),
27072
+ style: viewportBound ? { height: `calc(100svh - ${topOffset}px)` } : void 0,
27073
+ children: [
27074
+ /* @__PURE__ */ jsxRuntime.jsx(
27027
27075
  exports.Box,
27028
27076
  {
27077
+ ref: scrollRef,
27078
+ display: "flex",
27079
+ overflow: "auto",
27029
27080
  className: cn(
27030
- "flex-shrink-0 w-full",
27031
- "[scroll-snap-align:start]"
27081
+ "w-full",
27082
+ "scroll-smooth",
27083
+ "scrollbar-none",
27084
+ vertical ? "[scroll-snap-type:y_mandatory]" : "[scroll-snap-type:x_mandatory]",
27085
+ "[&::-webkit-scrollbar]:hidden",
27086
+ "[-ms-overflow-style:none]"
27032
27087
  ),
27033
27088
  style: {
27034
- scrollSnapAlign: "start"
27089
+ flexDirection: vertical ? "column" : "row",
27090
+ scrollSnapType: vertical ? "y mandatory" : "x mandatory",
27091
+ height: fullHeight ? "100%" : void 0,
27092
+ WebkitOverflowScrolling: "touch"
27035
27093
  },
27036
- children: (renderItem ?? children)?.(item, index)
27037
- },
27038
- index
27039
- ))
27040
- }
27041
- ),
27042
- showArrows && hasPrev && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
27043
- exports.Box,
27044
- {
27045
- position: "absolute",
27046
- className: "left-2 top-1/2 -translate-y-1/2 z-10",
27047
- children: /* @__PURE__ */ jsxRuntime.jsx(
27048
- exports.Button,
27094
+ onScroll: handleScroll,
27095
+ onPointerDown: swipeHandlers.onPointerDown,
27096
+ onPointerMove: swipeHandlers.onPointerMove,
27097
+ onPointerUp: swipeHandlers.onPointerUp,
27098
+ onPointerCancel: swipeHandlers.onPointerCancel,
27099
+ children: safeItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
27100
+ exports.Box,
27101
+ {
27102
+ className: cn(
27103
+ "flex-shrink-0 w-full",
27104
+ "[scroll-snap-align:start]"
27105
+ ),
27106
+ style: {
27107
+ scrollSnapAlign: "start",
27108
+ scrollSnapStop: vertical ? "always" : void 0,
27109
+ height: fullHeight ? "100%" : void 0
27110
+ },
27111
+ children: (renderItem ?? children)?.(item, index)
27112
+ },
27113
+ index
27114
+ ))
27115
+ }
27116
+ ),
27117
+ showArrows && hasPrev && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
27118
+ exports.Box,
27049
27119
  {
27050
- variant: "ghost",
27051
- size: "sm",
27052
- onClick: goPrev,
27053
- "aria-label": t("aria.previousSlide"),
27054
- className: cn(
27055
- "rounded-full",
27056
- "bg-surface/80",
27057
- "backdrop-blur-sm",
27058
- "shadow-elevation-interactive",
27059
- "hover:bg-surface"
27060
- ),
27061
- children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronLeft, { className: "w-5 h-5" })
27120
+ position: "absolute",
27121
+ className: vertical ? "right-2 top-2 z-10" : "left-2 top-1/2 -translate-y-1/2 z-10",
27122
+ children: /* @__PURE__ */ jsxRuntime.jsx(
27123
+ exports.Button,
27124
+ {
27125
+ variant: "ghost",
27126
+ size: "sm",
27127
+ onClick: goPrev,
27128
+ "aria-label": t("aria.previousSlide"),
27129
+ className: cn(
27130
+ "rounded-full",
27131
+ "bg-surface/80",
27132
+ "backdrop-blur-sm",
27133
+ "shadow-elevation-interactive",
27134
+ "hover:bg-surface"
27135
+ ),
27136
+ children: vertical ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronUp, { className: "w-5 h-5" }) : /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronLeft, { className: "w-5 h-5" })
27137
+ }
27138
+ )
27062
27139
  }
27063
- )
27064
- }
27065
- ),
27066
- showArrows && hasNext && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
27067
- exports.Box,
27068
- {
27069
- position: "absolute",
27070
- className: "right-2 top-1/2 -translate-y-1/2 z-10",
27071
- children: /* @__PURE__ */ jsxRuntime.jsx(
27072
- exports.Button,
27140
+ ),
27141
+ showArrows && hasNext && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
27142
+ exports.Box,
27073
27143
  {
27074
- variant: "ghost",
27075
- size: "sm",
27076
- onClick: goNext,
27077
- "aria-label": t("aria.nextSlide"),
27078
- className: cn(
27079
- "rounded-full",
27080
- "bg-surface/80",
27081
- "backdrop-blur-sm",
27082
- "shadow-elevation-interactive",
27083
- "hover:bg-surface"
27084
- ),
27085
- children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronRight, { className: "w-5 h-5" })
27144
+ position: "absolute",
27145
+ className: vertical ? "right-2 bottom-2 z-10" : "right-2 top-1/2 -translate-y-1/2 z-10",
27146
+ children: /* @__PURE__ */ jsxRuntime.jsx(
27147
+ exports.Button,
27148
+ {
27149
+ variant: "ghost",
27150
+ size: "sm",
27151
+ onClick: goNext,
27152
+ "aria-label": t("aria.nextSlide"),
27153
+ className: cn(
27154
+ "rounded-full",
27155
+ "bg-surface/80",
27156
+ "backdrop-blur-sm",
27157
+ "shadow-elevation-interactive",
27158
+ "hover:bg-surface"
27159
+ ),
27160
+ children: vertical ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronDown, { className: "w-5 h-5" }) : /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronRight, { className: "w-5 h-5" })
27161
+ }
27162
+ )
27163
+ }
27164
+ ),
27165
+ showDots && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
27166
+ exports.Box,
27167
+ {
27168
+ position: "absolute",
27169
+ className: "bottom-3 left-0 right-0 z-10",
27170
+ children: /* @__PURE__ */ jsxRuntime.jsx(exports.HStack, { gap: "xs", align: "center", justify: "center", role: "tablist", "aria-label": t("aria.carouselSlides"), children: safeItems.map((_, index) => {
27171
+ const isActive = index === activeIndex;
27172
+ return /* @__PURE__ */ jsxRuntime.jsx(
27173
+ exports.Box,
27174
+ {
27175
+ className: cn(
27176
+ "rounded-full cursor-pointer transition-all duration-fast"
27177
+ ),
27178
+ style: {
27179
+ width: isActive ? 10 : 8,
27180
+ height: isActive ? 10 : 8,
27181
+ backgroundColor: isActive ? "var(--color-primary)" : "var(--color-muted, #d4d4d8)",
27182
+ opacity: isActive ? 1 : 0.6
27183
+ },
27184
+ ...pressableProps(() => goToSlide(index)),
27185
+ role: "tab",
27186
+ "aria-selected": isActive,
27187
+ tabIndex: isActive ? 0 : -1,
27188
+ "aria-label": t("carousel.goToSlide", { number: index + 1 })
27189
+ },
27190
+ index
27191
+ );
27192
+ }) })
27086
27193
  }
27087
27194
  )
27088
- }
27089
- ),
27090
- showDots && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
27091
- exports.Box,
27092
- {
27093
- position: "absolute",
27094
- className: "bottom-3 left-0 right-0 z-10",
27095
- children: /* @__PURE__ */ jsxRuntime.jsx(exports.HStack, { gap: "xs", align: "center", justify: "center", role: "tablist", "aria-label": t("aria.carouselSlides"), children: safeItems.map((_, index) => {
27096
- const isActive = index === activeIndex;
27097
- return /* @__PURE__ */ jsxRuntime.jsx(
27098
- exports.Box,
27099
- {
27100
- className: cn(
27101
- "rounded-full cursor-pointer transition-all duration-fast"
27102
- ),
27103
- style: {
27104
- width: isActive ? 10 : 8,
27105
- height: isActive ? 10 : 8,
27106
- backgroundColor: isActive ? "var(--color-primary)" : "var(--color-muted, #d4d4d8)",
27107
- opacity: isActive ? 1 : 0.6
27108
- },
27109
- ...pressableProps(() => goToSlide(index)),
27110
- role: "tab",
27111
- "aria-selected": isActive,
27112
- tabIndex: isActive ? 0 : -1,
27113
- "aria-label": t("carousel.goToSlide", { number: index + 1 })
27114
- },
27115
- index
27116
- );
27117
- }) })
27118
- }
27119
- )
27120
- ] });
27195
+ ]
27196
+ }
27197
+ );
27121
27198
  };
27122
27199
  exports.Carousel.displayName = "Carousel";
27123
27200
  }
@@ -28193,6 +28270,8 @@ function ChatBar({
28193
28270
  placeholder,
28194
28271
  context,
28195
28272
  sendEvent = "CHAT_SEND",
28273
+ focusRequest,
28274
+ editFocus,
28196
28275
  className,
28197
28276
  ...rest
28198
28277
  }) {
@@ -28201,7 +28280,14 @@ function ChatBar({
28201
28280
  const [inputValue, setInputValue] = React89.useState("");
28202
28281
  const inputRef = React89.useRef(null);
28203
28282
  const [requestedPlaceholder, setRequestedPlaceholder] = React89.useState(null);
28204
- const [focus, setFocus] = React89.useState(null);
28283
+ const focus = editFocus ?? null;
28284
+ const requestId = focusRequest?.id;
28285
+ const requestPlaceholder = focusRequest?.placeholder;
28286
+ React89.useEffect(() => {
28287
+ if (requestId === void 0) return;
28288
+ if (requestPlaceholder !== void 0 && requestPlaceholder.length > 0) setRequestedPlaceholder(requestPlaceholder);
28289
+ inputRef.current?.focus();
28290
+ }, [requestId, requestPlaceholder]);
28205
28291
  React89.useLayoutEffect(() => {
28206
28292
  const el = inputRef.current;
28207
28293
  if (!el) return;
@@ -28211,36 +28297,21 @@ function ChatBar({
28211
28297
  el.style.overflowY = el.scrollHeight > INPUT_MAX_HEIGHT_PX ? "auto" : "hidden";
28212
28298
  }, [inputValue]);
28213
28299
  const clearFocus = React89.useCallback(() => {
28214
- setFocus(null);
28215
28300
  eventBus.emit(exports.ELEMENT_SELECTED_EVENT, { focus: null });
28216
28301
  }, [eventBus]);
28302
+ const clearSent = React89.useCallback(() => {
28303
+ setInputValue("");
28304
+ setRequestedPlaceholder(null);
28305
+ }, []);
28217
28306
  const handleKeyDown = React89.useCallback((e) => {
28218
28307
  if (e.key !== "Enter" || e.shiftKey) return;
28219
28308
  const trimmed = inputValue.trim();
28220
28309
  if (!trimmed) return;
28221
28310
  e.preventDefault();
28222
28311
  eventBus.emit(`UI:${sendEvent}`, { message: trimmed });
28223
- }, [inputValue, eventBus, sendEvent]);
28224
- React89.useEffect(() => {
28225
- const unsubSend = eventBus.on(`UI:${sendEvent}`, () => {
28226
- setInputValue("");
28227
- setFocus(null);
28228
- setRequestedPlaceholder(null);
28229
- });
28230
- const unsubFocus = eventBus.on("UI:CHAT_FOCUS", (e) => {
28231
- const hint = e.payload?.placeholder;
28232
- if (typeof hint === "string" && hint.length > 0) setRequestedPlaceholder(hint);
28233
- inputRef.current?.focus();
28234
- });
28235
- const unsubSelect = eventBus.on(exports.ELEMENT_SELECTED_EVENT, (e) => {
28236
- setFocus(parseEditFocus(e.payload?.focus));
28237
- });
28238
- return () => {
28239
- unsubSend();
28240
- unsubFocus();
28241
- unsubSelect();
28242
- };
28243
- }, [eventBus, sendEvent]);
28312
+ clearSent();
28313
+ }, [inputValue, eventBus, sendEvent, clearSent]);
28314
+ React89.useEffect(() => eventBus.on(`UI:${sendEvent}`, clearSent), [eventBus, sendEvent, clearSent]);
28244
28315
  const trailingAction = status === "error" ? /* @__PURE__ */ jsxRuntime.jsxs(exports.Button, { variant: "secondary", size: "sm", action: "RETRY_GENERATION", className: "rounded-none flex-shrink-0 h-auto", children: [
28245
28316
  /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "refresh-cw", size: "xs" }),
28246
28317
  /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", children: t("openFile.retry") })
@@ -28287,6 +28358,7 @@ function ChatBar({
28287
28358
  size: "sm",
28288
28359
  action: sendEvent,
28289
28360
  actionPayload: { message: inputValue.trim() },
28361
+ onClick: clearSent,
28290
28362
  disabled: !inputValue.trim(),
28291
28363
  "aria-label": t("chatBar.sendMessage"),
28292
28364
  className: "rounded-none flex-shrink-0 h-auto",
@@ -31476,13 +31548,16 @@ var init_DashboardLayout = __esm({
31476
31548
  React89.useEffect(() => {
31477
31549
  registerNavItems(navItems);
31478
31550
  }, [navItems, registerNavItems]);
31479
- const { user: authUser, signOut: authSignOut } = useAuthContext();
31551
+ const { user: authUser } = useAuthContext();
31480
31552
  const user = userProp || (authUser ? {
31481
31553
  name: authUser.displayName || authUser.email?.split("@")[0] || t("dashboard.defaultUserName"),
31482
31554
  email: authUser.email || "",
31483
31555
  avatar: authUser.photoURL || void 0
31484
31556
  } : null);
31485
- const handleSignOut = onSignOutProp || authSignOut;
31557
+ const handleSignOut = () => {
31558
+ onSignOutProp?.();
31559
+ eventBus.emit("UI:SIGN_OUT", {});
31560
+ };
31486
31561
  const showSidebar = layoutMode === "sidebar" || isDrawer;
31487
31562
  const showHeader = layoutMode !== "minimal";
31488
31563
  const showBottomNav = layoutMode === "bottomnav";
@@ -31491,7 +31566,11 @@ var init_DashboardLayout = __esm({
31491
31566
  exports.Box,
31492
31567
  {
31493
31568
  ref: layoutRef,
31494
- className: "@container/dashboard min-h-screen w-full bg-background surface-page flex flex-row items-stretch",
31569
+ className: cn(
31570
+ "@container/dashboard w-full bg-background surface-page flex flex-row items-stretch",
31571
+ // A full-bleed shell is an app frame: viewport-bound, so a full-height child gets a real height.
31572
+ fullBleed ? "h-screen overflow-hidden" : "min-h-screen"
31573
+ ),
31495
31574
  children: [
31496
31575
  /* @__PURE__ */ jsxRuntime.jsx(
31497
31576
  exports.Button,
@@ -31595,7 +31674,7 @@ var init_DashboardLayout = __esm({
31595
31674
  ]
31596
31675
  }
31597
31676
  ),
31598
- /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "none", className: "flex-1 min-w-0 min-h-screen", children: [
31677
+ /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "none", className: cn("flex-1 min-w-0", fullBleed ? "h-full min-h-0" : "min-h-screen"), children: [
31599
31678
  showHeader && /* @__PURE__ */ jsxRuntime.jsx(
31600
31679
  exports.Box,
31601
31680
  {
@@ -31818,7 +31897,7 @@ var init_DashboardLayout = __esm({
31818
31897
  id: "main-content",
31819
31898
  tabIndex: -1,
31820
31899
  className: cn(
31821
- fullBleed ? "flex-1 min-h-0 flex flex-col focus:outline-none" : "flex-1 p-3 @sm/dashboard:p-4 @md/dashboard:p-6 focus:outline-none",
31900
+ fullBleed ? "flex-1 min-h-0 flex flex-col overflow-y-auto focus:outline-none" : "flex-1 p-3 @sm/dashboard:p-4 @md/dashboard:p-6 focus:outline-none",
31822
31901
  // Reserve space for the fixed bottom nav so content isn't
31823
31902
  // hidden under the tab bar.
31824
31903
  showBottomNav && "pb-[calc(5rem+env(safe-area-inset-bottom))]"
@@ -42200,7 +42279,8 @@ var init_ar = __esm({
42200
42279
  "avl.stateInitial": "\u0627\u0644\u0628\u062F\u0627\u064A\u0629",
42201
42280
  "avl.stateTerminal": "\u0627\u0644\u0646\u0647\u0627\u064A\u0629",
42202
42281
  "avl.guardCaption": "\u0644\u0627 \u064A\u062D\u062F\u062B \u0627\u0644\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0627 \u0639\u0646\u062F\u0645\u0627 \u064A\u0643\u0648\u0646 \u0647\u0630\u0627 \u0627\u0644\u0634\u0631\u0637 \u0635\u062D\u064A\u062D\u064B\u0627.",
42203
- "avl.effectsCaption": "\u0645\u0627 \u064A\u064F\u0646\u0641\u064E\u0651\u0630\u060C \u0628\u0627\u0644\u062A\u0631\u062A\u064A\u0628\u060C \u0639\u0646\u062F \u062D\u062F\u0648\u062B \u0627\u0644\u0627\u0646\u062A\u0642\u0627\u0644."
42282
+ "avl.effectsCaption": "\u0645\u0627 \u064A\u064F\u0646\u0641\u064E\u0651\u0630\u060C \u0628\u0627\u0644\u062A\u0631\u062A\u064A\u0628\u060C \u0639\u0646\u062F \u062D\u062F\u0648\u062B \u0627\u0644\u0627\u0646\u062A\u0642\u0627\u0644.",
42283
+ "aria.carousel": "\u0639\u0631\u0636 \u0634\u0631\u0627\u0626\u062D"
42204
42284
  };
42205
42285
  }
42206
42286
  });
@@ -43462,7 +43542,8 @@ var init_sl = __esm({
43462
43542
  "avl.stateInitial": "za\u010Detek",
43463
43543
  "avl.stateTerminal": "konec",
43464
43544
  "avl.guardCaption": "Prehod se zgodi le, ko je ta pogoj izpolnjen.",
43465
- "avl.effectsCaption": "Kaj se izvede, po vrsti, ko se prehod zgodi."
43545
+ "avl.effectsCaption": "Kaj se izvede, po vrsti, ko se prehod zgodi.",
43546
+ "aria.carousel": "vrtiljak"
43466
43547
  };
43467
43548
  }
43468
43549
  });
@@ -45163,6 +45244,18 @@ var init_circuitVerificationObserver = __esm({
45163
45244
  init_verificationRegistry();
45164
45245
  }
45165
45246
  });
45247
+
45248
+ // lib/hostDispatchInView.ts
45249
+ function hostDispatchInView(request, response, owns) {
45250
+ if (request.targetTrait !== void 0 && owns(request.targetTrait)) return true;
45251
+ if (Object.keys(response.states).some(owns)) return true;
45252
+ if (Object.keys(response.entityByTrait ?? {}).some(owns)) return true;
45253
+ return (response.clientEffectsByTrait ?? []).some((e) => owns(e.traitName));
45254
+ }
45255
+ var init_hostDispatchInView = __esm({
45256
+ "lib/hostDispatchInView.ts"() {
45257
+ }
45258
+ });
45166
45259
  function getTabClientId() {
45167
45260
  if (tabClientId === void 0) tabClientId = crypto.randomUUID();
45168
45261
  return tabClientId;
@@ -45487,6 +45580,9 @@ function readsI18n(value) {
45487
45580
  const arr = value;
45488
45581
  return arr[0] === "i18n/t" || arr.some((v) => readsI18n(v));
45489
45582
  }
45583
+ if (value !== null && typeof value === "object" && !React89__namespace.default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function") {
45584
+ return Object.values(value).some((v) => readsI18n(v));
45585
+ }
45490
45586
  return false;
45491
45587
  }
45492
45588
  function needsRenderContext(value) {
@@ -46512,7 +46608,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
46512
46608
  if (!transport?.subscribeHostDispatches) return;
46513
46609
  return transport.subscribeHostDispatches((_orbitalName, request, response) => {
46514
46610
  const traitName = request.targetTrait;
46515
- if (traitName === void 0 || !traitIndex.byName.has(traitName)) return;
46611
+ if (traitName === void 0 || !hostDispatchInView(request, response, (t2) => traitIndex.byName.has(t2))) return;
46516
46612
  const composedBefore = new Map(store.callsitePayloads);
46517
46613
  void kernel.foldHostDispatch(request, response).then((outcome) => settleOutcome(traitName, request.event, request.payload, outcome, composedBefore));
46518
46614
  }, { clientId: getTabClientId() });
@@ -46654,6 +46750,7 @@ var init_useTraitStateMachine = __esm({
46654
46750
  init_traitRegistry();
46655
46751
  init_verificationRegistry();
46656
46752
  init_circuitVerificationObserver();
46753
+ init_hostDispatchInView();
46657
46754
  init_useCircuitKernel();
46658
46755
  init_useBusIngress();
46659
46756
  init_useSlotFlush();
@@ -47082,6 +47179,11 @@ function NavigateListener({ onNavigate }) {
47082
47179
  );
47083
47180
  return null;
47084
47181
  }
47182
+ function SignOutListener({ onSignOut }) {
47183
+ const bus = useEventBus();
47184
+ React89.useEffect(() => bus.on("UI:SIGN_OUT", () => onSignOut()), [bus, onSignOut]);
47185
+ return null;
47186
+ }
47085
47187
  function OrbPreview({
47086
47188
  schema,
47087
47189
  mockData,
@@ -47102,7 +47204,8 @@ function OrbPreview({
47102
47204
  lazyLoader,
47103
47205
  schemaPath,
47104
47206
  onUnmatchedNavigate,
47105
- onSignIn
47207
+ onSignIn,
47208
+ onSignOut
47106
47209
  }) {
47107
47210
  if (serverUrl && transport) {
47108
47211
  throw new Error("OrbPreview accepts serverUrl OR transport, not both");
@@ -47390,6 +47493,7 @@ function OrbPreview({
47390
47493
  /* @__PURE__ */ jsxRuntime.jsx(NavStackRefBridge, { apiRef: navStackRef }),
47391
47494
  /* @__PURE__ */ jsxRuntime.jsxs(providers.OrbitalProvider, { initialData: effectiveMockData, skipTheme: true, verification: true, isolated, user, children: [
47392
47495
  /* @__PURE__ */ jsxRuntime.jsx(NavigateListener, { onNavigate: handleNavigate }),
47496
+ onSignOut !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(SignOutListener, { onSignOut }),
47393
47497
  /* @__PURE__ */ jsxRuntime.jsx(context.UISlotProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
47394
47498
  providers.PageAccessHost,
47395
47499
  {
@@ -47731,6 +47835,10 @@ function entityNameOf(ref) {
47731
47835
  if (typeof ref === "string") return ref;
47732
47836
  return "name" in ref ? ref.name : void 0;
47733
47837
  }
47838
+ function roleColors(role) {
47839
+ if (role === "default") return { border: "var(--color-border)", dot: STATE_COLORS.default.border };
47840
+ return { border: STATE_COLORS[role].border, dot: STATE_COLORS[role].border };
47841
+ }
47734
47842
  function eventHandleStyle(source) {
47735
47843
  const hint = Number.isFinite(source.positionHint) ? source.positionHint : 0.5;
47736
47844
  if (hint !== source.positionHint) {
@@ -48039,7 +48147,7 @@ function parentBoxOf(el, container, zoom) {
48039
48147
  function resolveLayoutAxis(el) {
48040
48148
  return getComputedStyle(layoutBoxOf(el)).flexDirection === "row" ? "horizontal" : "vertical";
48041
48149
  }
48042
- var eventHandleLog, orbPreviewLog, ScreenSizeContext, CARD_MIN_WIDTH, CARD_MAX_WIDTH, PatternSelectionContext, CanvasToolsContext, CanvasStatePickerContext, CanvasVerifyContext, VERDICT_VARIANT, ROLE_COLORS, LAYER_ORDER, LAYER_LABEL_KEYS, LAYER_COLORS, TARGET_HANDLE_STYLE, SELECTION_STYLES, OrbPreviewNodeInner, OrbPreviewNode;
48150
+ var eventHandleLog, orbPreviewLog, ScreenSizeContext, CARD_MIN_WIDTH, CARD_MAX_WIDTH, PatternSelectionContext, CanvasToolsContext, CanvasStatePickerContext, CanvasVerifyContext, VERDICT_VARIANT, LAYER_ORDER, LAYER_LABEL_KEYS, LAYER_COLORS, TARGET_HANDLE_STYLE, SELECTION_STYLES, OrbPreviewNodeInner, OrbPreviewNode;
48043
48151
  var init_OrbPreviewNode = __esm({
48044
48152
  "components/avl/molecules/OrbPreviewNode.tsx"() {
48045
48153
  "use client";
@@ -48089,12 +48197,6 @@ var init_OrbPreviewNode = __esm({
48089
48197
  stale: "warning",
48090
48198
  running: "info"
48091
48199
  };
48092
- ROLE_COLORS = {
48093
- initial: { border: STATE_COLORS.initial.border, dot: STATE_COLORS.initial.border },
48094
- terminal: { border: STATE_COLORS.terminal.border, dot: STATE_COLORS.terminal.border },
48095
- hub: { border: STATE_COLORS.hub.border, dot: STATE_COLORS.hub.border },
48096
- default: { border: "var(--color-border)", dot: STATE_COLORS.default.border }
48097
- };
48098
48200
  LAYER_ORDER = ["Infrastructure", "Services", "UI Patterns", "Game", "ML", "Domain", "Community"];
48099
48201
  LAYER_LABEL_KEYS = {
48100
48202
  Infrastructure: "orbPreview.layer.infrastructure",
@@ -48165,7 +48267,7 @@ var init_OrbPreviewNode = __esm({
48165
48267
  const [hoverRect, setHoverRect] = React89.useState(null);
48166
48268
  const lastHoverElRef = React89.useRef(null);
48167
48269
  const role = data.stateRole ?? "default";
48168
- const colors = ROLE_COLORS[role] ?? ROLE_COLORS.default;
48270
+ const colors = roleColors(role);
48169
48271
  const eventSources = data.eventSources ?? [];
48170
48272
  const layerColor = data.layer ? LAYER_COLORS[data.layer] : void 0;
48171
48273
  const isExpanded = Boolean(data.traitName);