@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
@@ -974,10 +974,10 @@ var init_AvlState = __esm({
974
974
  }) => {
975
975
  const width = computeWidth(explicitWidth, transitionCount);
976
976
  const rx = height / 2;
977
- const roleColors = role ? exports.STATE_COLORS[role] : null;
978
- const fillColor = roleColors ? roleColors.fill : "none";
979
- const strokeColor = roleColors ? roleColors.border : color;
980
- const textColor = roleColors ? roleColors.border : color;
977
+ const roleColors2 = role ? exports.STATE_COLORS[role] : null;
978
+ const fillColor = roleColors2 ? roleColors2.fill : "none";
979
+ const strokeColor = roleColors2 ? roleColors2.border : color;
980
+ const textColor = roleColors2 ? roleColors2.border : color;
981
981
  return /* @__PURE__ */ jsxRuntime.jsxs("g", { className, opacity, transform: `translate(${x},${y})`, children: [
982
982
  isInitial && /* @__PURE__ */ jsxRuntime.jsx(
983
983
  "circle",
@@ -5572,7 +5572,8 @@ var init_en = __esm({
5572
5572
  "avl.stateInitial": "start",
5573
5573
  "avl.stateTerminal": "end",
5574
5574
  "avl.guardCaption": "The transition only fires when this check is true.",
5575
- "avl.effectsCaption": "What runs, in order, when the transition fires."
5575
+ "avl.effectsCaption": "What runs, in order, when the transition fires.",
5576
+ "aria.carousel": "carousel"
5576
5577
  };
5577
5578
  }
5578
5579
  });
@@ -10379,11 +10380,29 @@ var init_SvgBranch = __esm({
10379
10380
  SvgBranch.displayName = "SvgBranch";
10380
10381
  }
10381
10382
  });
10383
+
10384
+ // lib/svgMotion.ts
10385
+ function svgMotionClass(motion, animated) {
10386
+ if (!animated || !isMotionEnabled()) return void 0;
10387
+ return SVG_MOTION_CLASSES[motion];
10388
+ }
10389
+ var SVG_MOTION_CLASSES;
10390
+ var init_svgMotion = __esm({
10391
+ "lib/svgMotion.ts"() {
10392
+ init_Presence();
10393
+ SVG_MOTION_CLASSES = {
10394
+ flowDash: "almadar-svg-flow-dash",
10395
+ pulseRing: "almadar-svg-pulse-ring",
10396
+ pulseExpand: "almadar-svg-pulse-expand"
10397
+ };
10398
+ }
10399
+ });
10382
10400
  var SvgConnection;
10383
10401
  var init_SvgConnection = __esm({
10384
10402
  "components/core/atoms/svg/SvgConnection.tsx"() {
10385
10403
  "use client";
10386
10404
  init_domPassthrough();
10405
+ init_svgMotion();
10387
10406
  SvgConnection = ({
10388
10407
  x1 = 10,
10389
10408
  y1 = 50,
@@ -10408,7 +10427,7 @@ var init_SvgConnection = __esm({
10408
10427
  {
10409
10428
  ...asRoot ? void 0 : a11y,
10410
10429
  className: [
10411
- variant === "animated" ? "almadar-svg-flow-dash" : void 0,
10430
+ svgMotionClass("flowDash", variant === "animated"),
10412
10431
  className
10413
10432
  ].filter(Boolean).join(" ") || void 0,
10414
10433
  x1,
@@ -10435,6 +10454,7 @@ var init_SvgFlow = __esm({
10435
10454
  "components/core/atoms/svg/SvgFlow.tsx"() {
10436
10455
  "use client";
10437
10456
  init_domPassthrough();
10457
+ init_svgMotion();
10438
10458
  flowIdCounter = 0;
10439
10459
  DEFAULT_POINTS = [[10, 50], [50, 20], [90, 50]];
10440
10460
  SvgFlow = ({
@@ -10482,7 +10502,7 @@ var init_SvgFlow = __esm({
10482
10502
  strokeLinecap: "round",
10483
10503
  strokeLinejoin: "round",
10484
10504
  markerEnd: `url(#${markerId})`,
10485
- className: animated ? "almadar-svg-flow-dash" : void 0,
10505
+ className: svgMotionClass("flowDash", animated),
10486
10506
  strokeDasharray: animated ? "8 6" : void 0
10487
10507
  }
10488
10508
  )
@@ -10916,6 +10936,7 @@ var init_SvgNode = __esm({
10916
10936
  "components/core/atoms/svg/SvgNode.tsx"() {
10917
10937
  "use client";
10918
10938
  init_domPassthrough();
10939
+ init_svgMotion();
10919
10940
  SvgNode = ({
10920
10941
  x = 50,
10921
10942
  y = 50,
@@ -10942,7 +10963,7 @@ var init_SvgNode = __esm({
10942
10963
  stroke: color,
10943
10964
  strokeWidth: 1,
10944
10965
  opacity: 0.3,
10945
- className: "almadar-svg-pulse-ring"
10966
+ className: svgMotionClass("pulseRing", true)
10946
10967
  }
10947
10968
  ),
10948
10969
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -10977,23 +10998,12 @@ var init_SvgNode = __esm({
10977
10998
  SvgNode.displayName = "SvgNode";
10978
10999
  }
10979
11000
  });
10980
- var PULSE_KEYFRAMES, SvgPulse;
11001
+ var SvgPulse;
10981
11002
  var init_SvgPulse = __esm({
10982
11003
  "components/core/atoms/svg/SvgPulse.tsx"() {
10983
11004
  "use client";
10984
11005
  init_domPassthrough();
10985
- PULSE_KEYFRAMES = `
10986
- @keyframes almadar-svg-pulse-expand {
10987
- 0% {
10988
- transform: scale(0.3);
10989
- opacity: 0.4;
10990
- }
10991
- 100% {
10992
- transform: scale(1);
10993
- opacity: 0;
10994
- }
10995
- }
10996
- `;
11006
+ init_svgMotion();
10997
11007
  SvgPulse = ({
10998
11008
  cx = 70,
10999
11009
  cy = 70,
@@ -11009,8 +11019,8 @@ var init_SvgPulse = __esm({
11009
11019
  ...rest
11010
11020
  }) => {
11011
11021
  const a11y = domPassthrough(rest);
11022
+ const pulseClass2 = svgMotionClass("pulseExpand", animated);
11012
11023
  const inner = /* @__PURE__ */ jsxRuntime.jsxs("g", { ...asRoot ? void 0 : a11y, className, opacity, children: [
11013
- animated && /* @__PURE__ */ jsxRuntime.jsx("style", { children: PULSE_KEYFRAMES }),
11014
11024
  Array.from({ length: rings }).map((_, i) => {
11015
11025
  const ringRadius = (i + 1) / rings * maxRadius;
11016
11026
  const ringOpacity = 1 - i / rings * 0.6;
@@ -11024,11 +11034,9 @@ var init_SvgPulse = __esm({
11024
11034
  fill: "none",
11025
11035
  stroke: color,
11026
11036
  strokeWidth: 1.5,
11027
- opacity: animated ? void 0 : ringOpacity * 0.4,
11028
- style: animated ? {
11029
- transformOrigin: `${cx}px ${cy}px`,
11030
- animation: `almadar-svg-pulse-expand 2s ease-out ${delay}s infinite`
11031
- } : void 0
11037
+ opacity: pulseClass2 ? void 0 : ringOpacity * 0.4,
11038
+ className: pulseClass2,
11039
+ style: pulseClass2 ? { animationDelay: `${delay}s` } : void 0
11032
11040
  },
11033
11041
  i
11034
11042
  );
@@ -19370,7 +19378,7 @@ var init_CodeBlock = __esm({
19370
19378
  () => naturalTabs?.find((lang) => lang === pageLocale) ?? naturalTabs?.[0] ?? "en"
19371
19379
  );
19372
19380
  const activeNaturalLanguage = naturalTabs?.includes(naturalLanguage) === true ? naturalLanguage : naturalTabs?.[0] ?? "en";
19373
- const codeDir = naturalTabs && i18n.coreTables[activeNaturalLanguage].meta.rtl ? "rtl" : "ltr";
19381
+ const codeDir = naturalTabs && i18n.getVocabulary(activeNaturalLanguage).meta.rtl ? "rtl" : "ltr";
19374
19382
  const translationCache = React96.useMemo(() => /* @__PURE__ */ new Map(), [englishCode, files]);
19375
19383
  const translateFor = React96.useCallback(
19376
19384
  (source, sourceLanguage, cacheKey) => {
@@ -19387,14 +19395,14 @@ var init_CodeBlock = __esm({
19387
19395
  const code = translateFor(englishCode, language, "code");
19388
19396
  const naturalTabItems = naturalTabs?.map((lang) => ({
19389
19397
  id: `lang-${lang}`,
19390
- label: i18n.coreTables[lang].meta.name,
19398
+ label: i18n.getVocabulary(lang).meta.name,
19391
19399
  content: null
19392
19400
  }));
19393
19401
  const naturalTabStrip = naturalTabs && naturalTabItems ? /* @__PURE__ */ jsxRuntime.jsx(
19394
19402
  Box,
19395
19403
  {
19396
19404
  className: "border-b border-border",
19397
- dir: i18n.coreTables[activeNaturalLanguage].meta.rtl ? "rtl" : "ltr",
19405
+ dir: i18n.getVocabulary(activeNaturalLanguage).meta.rtl ? "rtl" : "ltr",
19398
19406
  "data-testid": "codeblock-language-tabs",
19399
19407
  children: /* @__PURE__ */ jsxRuntime.jsx(
19400
19408
  Tabs,
@@ -20795,6 +20803,10 @@ function resolveCanvasTheme(scope) {
20795
20803
  const c = r2.color(toneVar(tone));
20796
20804
  tones[tone] = c ? colorCss(c) : "currentColor";
20797
20805
  }
20806
+ const surface = (name) => {
20807
+ const c = r2.color(name);
20808
+ return c ? colorCss(c) : "transparent";
20809
+ };
20798
20810
  const ground = r2.color("--surface-diagram");
20799
20811
  const text = {};
20800
20812
  const TEXT_FALLBACK = { xs: 12, sm: 14, base: 16, lg: 18, xl: 20, "2xl": 24 };
@@ -20802,6 +20814,11 @@ function resolveCanvasTheme(scope) {
20802
20814
  const body = r2.family("--font-family-body", r2.family("--font-family", "system-ui, sans-serif"));
20803
20815
  return {
20804
20816
  ground: ground ? colorCss(ground) : "transparent",
20817
+ surfaces: {
20818
+ muted: surface("--color-muted"),
20819
+ card: surface("--color-card"),
20820
+ onPrimary: surface("--color-primary-foreground")
20821
+ },
20805
20822
  tones,
20806
20823
  series: SERIES_TONES.map((t) => tones[t]),
20807
20824
  strokes: {
@@ -29858,18 +29875,30 @@ var init_Carousel = __esm({
29858
29875
  loop = false,
29859
29876
  slideChangeEvent,
29860
29877
  slideChangePayload,
29878
+ orientation = "horizontal",
29879
+ fullHeight = false,
29880
+ loadMoreEvent,
29881
+ loadMoreAhead = 2,
29882
+ hasMore = false,
29883
+ isLoadingMore = false,
29861
29884
  className,
29862
29885
  ...rest
29863
29886
  }) => {
29887
+ const vertical = orientation === "vertical";
29888
+ const loadRequestedAt = React96.useRef(null);
29864
29889
  const [activeIndex, setActiveIndex] = React96.useState(0);
29865
29890
  const scrollRef = React96.useRef(null);
29891
+ const rootRef = React96.useRef(null);
29892
+ const [topOffset, setTopOffset] = React96.useState(0);
29866
29893
  const autoPlayRef = React96.useRef(null);
29867
29894
  const eventBus = useSafeEventBus3();
29868
29895
  const { t } = hooks.useTranslate();
29869
29896
  const safeItems = items ?? [];
29870
29897
  const totalSlides = safeItems.length;
29898
+ const announcedIndex = React96.useRef(0);
29871
29899
  const emitSlideChange = React96.useCallback(
29872
29900
  (newIndex) => {
29901
+ announcedIndex.current = newIndex;
29873
29902
  if (slideChangeEvent) {
29874
29903
  eventBus.emit(`UI:${slideChangeEvent}`, {
29875
29904
  index: newIndex,
@@ -29883,13 +29912,13 @@ var init_Carousel = __esm({
29883
29912
  (index) => {
29884
29913
  const container = scrollRef.current;
29885
29914
  if (!container) return;
29886
- const slideWidth = container.offsetWidth;
29887
- container.scrollTo({
29888
- left: slideWidth * index,
29889
- behavior: "smooth"
29890
- });
29915
+ const reduceMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
29916
+ const behavior = reduceMotion ? "auto" : "smooth";
29917
+ if (typeof container.scrollTo !== "function") return;
29918
+ if (vertical) container.scrollTo({ top: container.offsetHeight * index, behavior });
29919
+ else container.scrollTo({ left: container.offsetWidth * index, behavior });
29891
29920
  },
29892
- []
29921
+ [vertical]
29893
29922
  );
29894
29923
  const goToSlide = React96.useCallback(
29895
29924
  (index) => {
@@ -29913,10 +29942,7 @@ var init_Carousel = __esm({
29913
29942
  goToSlide(activeIndex - 1);
29914
29943
  }, [goToSlide, activeIndex]);
29915
29944
  const swipeHandlers = useSwipeGesture(
29916
- {
29917
- onSwipeLeft: goNext,
29918
- onSwipeRight: goPrev
29919
- },
29945
+ vertical ? { onSwipeUp: goNext, onSwipeDown: goPrev } : { onSwipeLeft: goNext, onSwipeRight: goPrev },
29920
29946
  { threshold: 40 }
29921
29947
  );
29922
29948
  React96.useEffect(() => {
@@ -29941,138 +29967,189 @@ var init_Carousel = __esm({
29941
29967
  const handleScroll = React96.useCallback(() => {
29942
29968
  const container = scrollRef.current;
29943
29969
  if (!container) return;
29944
- const slideWidth = container.offsetWidth;
29945
- if (slideWidth === 0) return;
29946
- const newIndex = Math.round(container.scrollLeft / slideWidth);
29947
- setActiveIndex((prev) => {
29948
- if (prev !== newIndex && newIndex >= 0 && newIndex < totalSlides) {
29949
- return newIndex;
29950
- }
29951
- return prev;
29952
- });
29953
- }, [totalSlides]);
29970
+ const slideSize = vertical ? container.offsetHeight : container.offsetWidth;
29971
+ if (slideSize === 0) return;
29972
+ const position = vertical ? container.scrollTop : container.scrollLeft;
29973
+ const newIndex = Math.round(position / slideSize);
29974
+ if (newIndex < 0 || newIndex >= totalSlides) return;
29975
+ setActiveIndex(newIndex);
29976
+ if (Math.abs(position - newIndex * slideSize) <= 1 && newIndex !== announcedIndex.current) {
29977
+ emitSlideChange(newIndex);
29978
+ }
29979
+ }, [totalSlides, vertical, emitSlideChange]);
29980
+ React96.useEffect(() => {
29981
+ if (!loadMoreEvent || !hasMore || isLoadingMore || totalSlides === 0) return;
29982
+ if (activeIndex < totalSlides - 1 - loadMoreAhead) return;
29983
+ if (loadRequestedAt.current === totalSlides) return;
29984
+ loadRequestedAt.current = totalSlides;
29985
+ eventBus.emit(`UI:${loadMoreEvent}`, { index: activeIndex });
29986
+ }, [activeIndex, totalSlides, loadMoreEvent, hasMore, isLoadingMore, loadMoreAhead, eventBus]);
29987
+ const viewportBound = vertical && fullHeight;
29988
+ React96.useLayoutEffect(() => {
29989
+ if (!viewportBound || typeof window === "undefined") return;
29990
+ const measure = () => {
29991
+ const root = rootRef.current;
29992
+ if (root) setTopOffset(Math.max(0, Math.round(root.getBoundingClientRect().top)));
29993
+ };
29994
+ measure();
29995
+ window.addEventListener("resize", measure);
29996
+ return () => window.removeEventListener("resize", measure);
29997
+ }, [viewportBound]);
29998
+ const handleKeyDown = React96.useCallback(
29999
+ (e) => {
30000
+ const next = vertical ? ["ArrowDown", "PageDown"] : ["ArrowRight"];
30001
+ const prev = vertical ? ["ArrowUp", "PageUp"] : ["ArrowLeft"];
30002
+ if (next.includes(e.key)) {
30003
+ e.preventDefault();
30004
+ goNext();
30005
+ } else if (prev.includes(e.key)) {
30006
+ e.preventDefault();
30007
+ goPrev();
30008
+ }
30009
+ },
30010
+ [vertical, goNext, goPrev]
30011
+ );
29954
30012
  const hasPrev = loop || activeIndex > 0;
29955
30013
  const hasNext = loop || activeIndex < totalSlides - 1;
29956
30014
  if (totalSlides === 0) return null;
29957
- return /* @__PURE__ */ jsxRuntime.jsxs(Box, { position: "relative", overflow: "hidden", ...domPassthrough(rest), className: cn("w-full", className), children: [
29958
- /* @__PURE__ */ jsxRuntime.jsx(
29959
- Box,
29960
- {
29961
- ref: scrollRef,
29962
- display: "flex",
29963
- overflow: "auto",
29964
- className: cn(
29965
- "w-full",
29966
- "scroll-smooth",
29967
- "scrollbar-none",
29968
- "[scroll-snap-type:x_mandatory]",
29969
- "[&::-webkit-scrollbar]:hidden",
29970
- "[-ms-overflow-style:none]"
29971
- ),
29972
- style: {
29973
- scrollSnapType: "x mandatory",
29974
- WebkitOverflowScrolling: "touch"
29975
- },
29976
- onScroll: handleScroll,
29977
- onPointerDown: swipeHandlers.onPointerDown,
29978
- onPointerMove: swipeHandlers.onPointerMove,
29979
- onPointerUp: swipeHandlers.onPointerUp,
29980
- onPointerCancel: swipeHandlers.onPointerCancel,
29981
- children: safeItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
30015
+ return /* @__PURE__ */ jsxRuntime.jsxs(
30016
+ Box,
30017
+ {
30018
+ position: "relative",
30019
+ overflow: "hidden",
30020
+ role: "region",
30021
+ "aria-roledescription": t("aria.carousel"),
30022
+ tabIndex: 0,
30023
+ onKeyDown: handleKeyDown,
30024
+ ...domPassthrough(rest),
30025
+ ref: rootRef,
30026
+ className: cn("w-full", fullHeight && !viewportBound && "h-full", className),
30027
+ style: viewportBound ? { height: `calc(100svh - ${topOffset}px)` } : void 0,
30028
+ children: [
30029
+ /* @__PURE__ */ jsxRuntime.jsx(
29982
30030
  Box,
29983
30031
  {
30032
+ ref: scrollRef,
30033
+ display: "flex",
30034
+ overflow: "auto",
29984
30035
  className: cn(
29985
- "flex-shrink-0 w-full",
29986
- "[scroll-snap-align:start]"
30036
+ "w-full",
30037
+ "scroll-smooth",
30038
+ "scrollbar-none",
30039
+ vertical ? "[scroll-snap-type:y_mandatory]" : "[scroll-snap-type:x_mandatory]",
30040
+ "[&::-webkit-scrollbar]:hidden",
30041
+ "[-ms-overflow-style:none]"
29987
30042
  ),
29988
30043
  style: {
29989
- scrollSnapAlign: "start"
30044
+ flexDirection: vertical ? "column" : "row",
30045
+ scrollSnapType: vertical ? "y mandatory" : "x mandatory",
30046
+ height: fullHeight ? "100%" : void 0,
30047
+ WebkitOverflowScrolling: "touch"
29990
30048
  },
29991
- children: (renderItem ?? children)?.(item, index)
29992
- },
29993
- index
29994
- ))
29995
- }
29996
- ),
29997
- showArrows && hasPrev && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
29998
- Box,
29999
- {
30000
- position: "absolute",
30001
- className: "left-2 top-1/2 -translate-y-1/2 z-10",
30002
- children: /* @__PURE__ */ jsxRuntime.jsx(
30003
- Button,
30049
+ onScroll: handleScroll,
30050
+ onPointerDown: swipeHandlers.onPointerDown,
30051
+ onPointerMove: swipeHandlers.onPointerMove,
30052
+ onPointerUp: swipeHandlers.onPointerUp,
30053
+ onPointerCancel: swipeHandlers.onPointerCancel,
30054
+ children: safeItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
30055
+ Box,
30056
+ {
30057
+ className: cn(
30058
+ "flex-shrink-0 w-full",
30059
+ "[scroll-snap-align:start]"
30060
+ ),
30061
+ style: {
30062
+ scrollSnapAlign: "start",
30063
+ scrollSnapStop: vertical ? "always" : void 0,
30064
+ height: fullHeight ? "100%" : void 0
30065
+ },
30066
+ children: (renderItem ?? children)?.(item, index)
30067
+ },
30068
+ index
30069
+ ))
30070
+ }
30071
+ ),
30072
+ showArrows && hasPrev && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
30073
+ Box,
30004
30074
  {
30005
- variant: "ghost",
30006
- size: "sm",
30007
- onClick: goPrev,
30008
- "aria-label": t("aria.previousSlide"),
30009
- className: cn(
30010
- "rounded-full",
30011
- "bg-surface/80",
30012
- "backdrop-blur-sm",
30013
- "shadow-elevation-interactive",
30014
- "hover:bg-surface"
30015
- ),
30016
- children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronLeft, { className: "w-5 h-5" })
30075
+ position: "absolute",
30076
+ className: vertical ? "right-2 top-2 z-10" : "left-2 top-1/2 -translate-y-1/2 z-10",
30077
+ children: /* @__PURE__ */ jsxRuntime.jsx(
30078
+ Button,
30079
+ {
30080
+ variant: "ghost",
30081
+ size: "sm",
30082
+ onClick: goPrev,
30083
+ "aria-label": t("aria.previousSlide"),
30084
+ className: cn(
30085
+ "rounded-full",
30086
+ "bg-surface/80",
30087
+ "backdrop-blur-sm",
30088
+ "shadow-elevation-interactive",
30089
+ "hover:bg-surface"
30090
+ ),
30091
+ children: vertical ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronUp, { className: "w-5 h-5" }) : /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronLeft, { className: "w-5 h-5" })
30092
+ }
30093
+ )
30017
30094
  }
30018
- )
30019
- }
30020
- ),
30021
- showArrows && hasNext && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
30022
- Box,
30023
- {
30024
- position: "absolute",
30025
- className: "right-2 top-1/2 -translate-y-1/2 z-10",
30026
- children: /* @__PURE__ */ jsxRuntime.jsx(
30027
- Button,
30095
+ ),
30096
+ showArrows && hasNext && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
30097
+ Box,
30028
30098
  {
30029
- variant: "ghost",
30030
- size: "sm",
30031
- onClick: goNext,
30032
- "aria-label": t("aria.nextSlide"),
30033
- className: cn(
30034
- "rounded-full",
30035
- "bg-surface/80",
30036
- "backdrop-blur-sm",
30037
- "shadow-elevation-interactive",
30038
- "hover:bg-surface"
30039
- ),
30040
- children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronRight, { className: "w-5 h-5" })
30099
+ position: "absolute",
30100
+ className: vertical ? "right-2 bottom-2 z-10" : "right-2 top-1/2 -translate-y-1/2 z-10",
30101
+ children: /* @__PURE__ */ jsxRuntime.jsx(
30102
+ Button,
30103
+ {
30104
+ variant: "ghost",
30105
+ size: "sm",
30106
+ onClick: goNext,
30107
+ "aria-label": t("aria.nextSlide"),
30108
+ className: cn(
30109
+ "rounded-full",
30110
+ "bg-surface/80",
30111
+ "backdrop-blur-sm",
30112
+ "shadow-elevation-interactive",
30113
+ "hover:bg-surface"
30114
+ ),
30115
+ children: vertical ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronDown, { className: "w-5 h-5" }) : /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronRight, { className: "w-5 h-5" })
30116
+ }
30117
+ )
30118
+ }
30119
+ ),
30120
+ showDots && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
30121
+ Box,
30122
+ {
30123
+ position: "absolute",
30124
+ className: "bottom-3 left-0 right-0 z-10",
30125
+ children: /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "xs", align: "center", justify: "center", role: "tablist", "aria-label": t("aria.carouselSlides"), children: safeItems.map((_, index) => {
30126
+ const isActive = index === activeIndex;
30127
+ return /* @__PURE__ */ jsxRuntime.jsx(
30128
+ Box,
30129
+ {
30130
+ className: cn(
30131
+ "rounded-full cursor-pointer transition-all duration-fast"
30132
+ ),
30133
+ style: {
30134
+ width: isActive ? 10 : 8,
30135
+ height: isActive ? 10 : 8,
30136
+ backgroundColor: isActive ? "var(--color-primary)" : "var(--color-muted, #d4d4d8)",
30137
+ opacity: isActive ? 1 : 0.6
30138
+ },
30139
+ ...pressableProps(() => goToSlide(index)),
30140
+ role: "tab",
30141
+ "aria-selected": isActive,
30142
+ tabIndex: isActive ? 0 : -1,
30143
+ "aria-label": t("carousel.goToSlide", { number: index + 1 })
30144
+ },
30145
+ index
30146
+ );
30147
+ }) })
30041
30148
  }
30042
30149
  )
30043
- }
30044
- ),
30045
- showDots && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
30046
- Box,
30047
- {
30048
- position: "absolute",
30049
- className: "bottom-3 left-0 right-0 z-10",
30050
- children: /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "xs", align: "center", justify: "center", role: "tablist", "aria-label": t("aria.carouselSlides"), children: safeItems.map((_, index) => {
30051
- const isActive = index === activeIndex;
30052
- return /* @__PURE__ */ jsxRuntime.jsx(
30053
- Box,
30054
- {
30055
- className: cn(
30056
- "rounded-full cursor-pointer transition-all duration-fast"
30057
- ),
30058
- style: {
30059
- width: isActive ? 10 : 8,
30060
- height: isActive ? 10 : 8,
30061
- backgroundColor: isActive ? "var(--color-primary)" : "var(--color-muted, #d4d4d8)",
30062
- opacity: isActive ? 1 : 0.6
30063
- },
30064
- ...pressableProps(() => goToSlide(index)),
30065
- role: "tab",
30066
- "aria-selected": isActive,
30067
- tabIndex: isActive ? 0 : -1,
30068
- "aria-label": t("carousel.goToSlide", { number: index + 1 })
30069
- },
30070
- index
30071
- );
30072
- }) })
30073
- }
30074
- )
30075
- ] });
30150
+ ]
30151
+ }
30152
+ );
30076
30153
  };
30077
30154
  Carousel.displayName = "Carousel";
30078
30155
  }
@@ -31080,59 +31157,10 @@ var init_ChartLegend = __esm({
31080
31157
  });
31081
31158
 
31082
31159
  // components/core/organisms/trace-edit-focus.ts
31083
- function asString(v) {
31084
- return typeof v === "string" ? v : void 0;
31085
- }
31086
- function asLevel(v) {
31087
- if (typeof v === "string" && EDIT_FOCUS_LEVELS.has(v)) {
31088
- return v;
31089
- }
31090
- return "node";
31091
- }
31092
- function isEventPayload(v) {
31093
- return v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v) && !(v instanceof Date);
31094
- }
31095
- function parseEditFocus(value) {
31096
- if (!isEventPayload(value)) return null;
31097
- const payload = value;
31098
- const orbital = asString(payload.orbital);
31099
- if (orbital === void 0 || orbital.length === 0) return null;
31100
- const focus = {
31101
- level: asLevel(payload.level),
31102
- orbital,
31103
- label: asString(payload.label) ?? orbital
31104
- };
31105
- const trait = asString(payload.trait);
31106
- if (trait !== void 0) focus.trait = trait;
31107
- const transition = asString(payload.transition);
31108
- if (transition !== void 0) focus.transition = transition;
31109
- const state = asString(payload.state);
31110
- if (state !== void 0) focus.state = state;
31111
- const slot = asString(payload.slot);
31112
- if (slot !== void 0) focus.slot = slot;
31113
- const path = asString(payload.path);
31114
- if (path !== void 0) focus.path = path;
31115
- const patternType = asString(payload.patternType);
31116
- if (patternType !== void 0) focus.patternType = patternType;
31117
- const entity = asString(payload.entity);
31118
- if (entity !== void 0) focus.entity = entity;
31119
- const source = asString(payload.source);
31120
- if (source !== void 0) focus.source = source;
31121
- return focus;
31122
- }
31123
- var ELEMENT_SELECTED_EVENT, EDIT_FOCUS_LEVELS;
31160
+ var ELEMENT_SELECTED_EVENT;
31124
31161
  var init_trace_edit_focus = __esm({
31125
31162
  "components/core/organisms/trace-edit-focus.ts"() {
31126
31163
  ELEMENT_SELECTED_EVENT = "UI:ELEMENT_SELECTED";
31127
- EDIT_FOCUS_LEVELS = /* @__PURE__ */ new Set([
31128
- "node",
31129
- "slot",
31130
- "field",
31131
- "effect",
31132
- "trait",
31133
- "page",
31134
- "orbital"
31135
- ]);
31136
31164
  }
31137
31165
  });
31138
31166
  function getJepaBadgeVariant(probability) {
@@ -31148,6 +31176,8 @@ function ChatBar({
31148
31176
  placeholder,
31149
31177
  context,
31150
31178
  sendEvent = "CHAT_SEND",
31179
+ focusRequest,
31180
+ editFocus: editFocus2,
31151
31181
  className,
31152
31182
  ...rest
31153
31183
  }) {
@@ -31156,7 +31186,14 @@ function ChatBar({
31156
31186
  const [inputValue, setInputValue] = React96.useState("");
31157
31187
  const inputRef = React96.useRef(null);
31158
31188
  const [requestedPlaceholder, setRequestedPlaceholder] = React96.useState(null);
31159
- const [focus, setFocus] = React96.useState(null);
31189
+ const focus = editFocus2 ?? null;
31190
+ const requestId = focusRequest?.id;
31191
+ const requestPlaceholder = focusRequest?.placeholder;
31192
+ React96.useEffect(() => {
31193
+ if (requestId === void 0) return;
31194
+ if (requestPlaceholder !== void 0 && requestPlaceholder.length > 0) setRequestedPlaceholder(requestPlaceholder);
31195
+ inputRef.current?.focus();
31196
+ }, [requestId, requestPlaceholder]);
31160
31197
  React96.useLayoutEffect(() => {
31161
31198
  const el = inputRef.current;
31162
31199
  if (!el) return;
@@ -31166,36 +31203,21 @@ function ChatBar({
31166
31203
  el.style.overflowY = el.scrollHeight > INPUT_MAX_HEIGHT_PX ? "auto" : "hidden";
31167
31204
  }, [inputValue]);
31168
31205
  const clearFocus = React96.useCallback(() => {
31169
- setFocus(null);
31170
31206
  eventBus.emit(ELEMENT_SELECTED_EVENT, { focus: null });
31171
31207
  }, [eventBus]);
31208
+ const clearSent = React96.useCallback(() => {
31209
+ setInputValue("");
31210
+ setRequestedPlaceholder(null);
31211
+ }, []);
31172
31212
  const handleKeyDown = React96.useCallback((e) => {
31173
31213
  if (e.key !== "Enter" || e.shiftKey) return;
31174
31214
  const trimmed = inputValue.trim();
31175
31215
  if (!trimmed) return;
31176
31216
  e.preventDefault();
31177
31217
  eventBus.emit(`UI:${sendEvent}`, { message: trimmed });
31178
- }, [inputValue, eventBus, sendEvent]);
31179
- React96.useEffect(() => {
31180
- const unsubSend = eventBus.on(`UI:${sendEvent}`, () => {
31181
- setInputValue("");
31182
- setFocus(null);
31183
- setRequestedPlaceholder(null);
31184
- });
31185
- const unsubFocus = eventBus.on("UI:CHAT_FOCUS", (e) => {
31186
- const hint = e.payload?.placeholder;
31187
- if (typeof hint === "string" && hint.length > 0) setRequestedPlaceholder(hint);
31188
- inputRef.current?.focus();
31189
- });
31190
- const unsubSelect = eventBus.on(ELEMENT_SELECTED_EVENT, (e) => {
31191
- setFocus(parseEditFocus(e.payload?.focus));
31192
- });
31193
- return () => {
31194
- unsubSend();
31195
- unsubFocus();
31196
- unsubSelect();
31197
- };
31198
- }, [eventBus, sendEvent]);
31218
+ clearSent();
31219
+ }, [inputValue, eventBus, sendEvent, clearSent]);
31220
+ React96.useEffect(() => eventBus.on(`UI:${sendEvent}`, clearSent), [eventBus, sendEvent, clearSent]);
31199
31221
  const trailingAction = status === "error" ? /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "secondary", size: "sm", action: "RETRY_GENERATION", className: "rounded-none flex-shrink-0 h-auto", children: [
31200
31222
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "refresh-cw", size: "xs" }),
31201
31223
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", children: t("openFile.retry") })
@@ -31242,6 +31264,7 @@ function ChatBar({
31242
31264
  size: "sm",
31243
31265
  action: sendEvent,
31244
31266
  actionPayload: { message: inputValue.trim() },
31267
+ onClick: clearSent,
31245
31268
  disabled: !inputValue.trim(),
31246
31269
  "aria-label": t("chatBar.sendMessage"),
31247
31270
  className: "rounded-none flex-shrink-0 h-auto",
@@ -33599,16 +33622,6 @@ var init_TopNavItem = __esm({
33599
33622
  TopNavItem.displayName = "TopNavItem";
33600
33623
  }
33601
33624
  });
33602
-
33603
- // hooks/useAuthContext.ts
33604
- function useAuthContext() {
33605
- return {
33606
- user: null,
33607
- loading: false,
33608
- signIn: void 0,
33609
- signOut: void 0
33610
- };
33611
- }
33612
33625
  var init_useAuthContext = __esm({
33613
33626
  "hooks/useAuthContext.ts"() {
33614
33627
  }
@@ -34176,9 +34189,11 @@ var init_DashboardLayout = __esm({
34176
34189
  React96.useEffect(() => {
34177
34190
  registerNavItems(navItems);
34178
34191
  }, [navItems, registerNavItems]);
34179
- const { signOut: authSignOut } = useAuthContext();
34180
34192
  const user = userProp || (null);
34181
- const handleSignOut = onSignOutProp || authSignOut;
34193
+ const handleSignOut = () => {
34194
+ onSignOutProp?.();
34195
+ eventBus.emit("UI:SIGN_OUT", {});
34196
+ };
34182
34197
  const showSidebar = layoutMode === "sidebar" || isDrawer;
34183
34198
  const showHeader = layoutMode !== "minimal";
34184
34199
  const showBottomNav = layoutMode === "bottomnav";
@@ -34187,7 +34202,11 @@ var init_DashboardLayout = __esm({
34187
34202
  Box,
34188
34203
  {
34189
34204
  ref: layoutRef,
34190
- className: "@container/dashboard min-h-screen w-full bg-background surface-page flex flex-row items-stretch",
34205
+ className: cn(
34206
+ "@container/dashboard w-full bg-background surface-page flex flex-row items-stretch",
34207
+ // A full-bleed shell is an app frame: viewport-bound, so a full-height child gets a real height.
34208
+ fullBleed ? "h-screen overflow-hidden" : "min-h-screen"
34209
+ ),
34191
34210
  children: [
34192
34211
  /* @__PURE__ */ jsxRuntime.jsx(
34193
34212
  Button,
@@ -34291,7 +34310,7 @@ var init_DashboardLayout = __esm({
34291
34310
  ]
34292
34311
  }
34293
34312
  ),
34294
- /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: "flex-1 min-w-0 min-h-screen", children: [
34313
+ /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: cn("flex-1 min-w-0", fullBleed ? "h-full min-h-0" : "min-h-screen"), children: [
34295
34314
  showHeader && /* @__PURE__ */ jsxRuntime.jsx(
34296
34315
  Box,
34297
34316
  {
@@ -34514,7 +34533,7 @@ var init_DashboardLayout = __esm({
34514
34533
  id: "main-content",
34515
34534
  tabIndex: -1,
34516
34535
  className: cn(
34517
- 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",
34536
+ 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",
34518
34537
  // Reserve space for the fixed bottom nav so content isn't
34519
34538
  // hidden under the tab bar.
34520
34539
  showBottomNav && "pb-[calc(5rem+env(safe-area-inset-bottom))]"
@@ -44888,7 +44907,8 @@ var init_ar = __esm({
44888
44907
  "avl.stateInitial": "\u0627\u0644\u0628\u062F\u0627\u064A\u0629",
44889
44908
  "avl.stateTerminal": "\u0627\u0644\u0646\u0647\u0627\u064A\u0629",
44890
44909
  "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.",
44891
- "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."
44910
+ "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.",
44911
+ "aria.carousel": "\u0639\u0631\u0636 \u0634\u0631\u0627\u0626\u062D"
44892
44912
  };
44893
44913
  }
44894
44914
  });
@@ -46150,7 +46170,8 @@ var init_sl = __esm({
46150
46170
  "avl.stateInitial": "za\u010Detek",
46151
46171
  "avl.stateTerminal": "konec",
46152
46172
  "avl.guardCaption": "Prehod se zgodi le, ko je ta pogoj izpolnjen.",
46153
- "avl.effectsCaption": "Kaj se izvede, po vrsti, ko se prehod zgodi."
46173
+ "avl.effectsCaption": "Kaj se izvede, po vrsti, ko se prehod zgodi.",
46174
+ "aria.carousel": "vrtiljak"
46154
46175
  };
46155
46176
  }
46156
46177
  });
@@ -47385,6 +47406,18 @@ var init_circuitVerificationObserver = __esm({
47385
47406
  init_verificationRegistry();
47386
47407
  }
47387
47408
  });
47409
+
47410
+ // lib/hostDispatchInView.ts
47411
+ function hostDispatchInView(request, response, owns) {
47412
+ if (request.targetTrait !== void 0 && owns(request.targetTrait)) return true;
47413
+ if (Object.keys(response.states).some(owns)) return true;
47414
+ if (Object.keys(response.entityByTrait ?? {}).some(owns)) return true;
47415
+ return (response.clientEffectsByTrait ?? []).some((e) => owns(e.traitName));
47416
+ }
47417
+ var init_hostDispatchInView = __esm({
47418
+ "lib/hostDispatchInView.ts"() {
47419
+ }
47420
+ });
47388
47421
  function getTabClientId() {
47389
47422
  if (tabClientId === void 0) tabClientId = crypto.randomUUID();
47390
47423
  return tabClientId;
@@ -47709,6 +47742,9 @@ function readsI18n(value) {
47709
47742
  const arr = value;
47710
47743
  return arr[0] === "i18n/t" || arr.some((v) => readsI18n(v));
47711
47744
  }
47745
+ if (value !== null && typeof value === "object" && !React96__namespace.default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function") {
47746
+ return Object.values(value).some((v) => readsI18n(v));
47747
+ }
47712
47748
  return false;
47713
47749
  }
47714
47750
  function needsRenderContext(value) {
@@ -48668,7 +48704,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
48668
48704
  if (!transport?.subscribeHostDispatches) return;
48669
48705
  return transport.subscribeHostDispatches((_orbitalName, request, response) => {
48670
48706
  const traitName = request.targetTrait;
48671
- if (traitName === void 0 || !traitIndex.byName.has(traitName)) return;
48707
+ if (traitName === void 0 || !hostDispatchInView(request, response, (t2) => traitIndex.byName.has(t2))) return;
48672
48708
  const composedBefore = new Map(store.callsitePayloads);
48673
48709
  void kernel.foldHostDispatch(request, response).then((outcome) => settleOutcome(traitName, request.event, request.payload, outcome, composedBefore));
48674
48710
  }, { clientId: getTabClientId() });
@@ -48810,6 +48846,7 @@ var init_useTraitStateMachine = __esm({
48810
48846
  init_traitRegistry();
48811
48847
  init_verificationRegistry();
48812
48848
  init_circuitVerificationObserver();
48849
+ init_hostDispatchInView();
48813
48850
  init_useCircuitKernel();
48814
48851
  init_useBusIngress();
48815
48852
  init_useSlotFlush();
@@ -49238,6 +49275,11 @@ function NavigateListener({ onNavigate }) {
49238
49275
  );
49239
49276
  return null;
49240
49277
  }
49278
+ function SignOutListener({ onSignOut }) {
49279
+ const bus = useEventBus();
49280
+ React96.useEffect(() => bus.on("UI:SIGN_OUT", () => onSignOut()), [bus, onSignOut]);
49281
+ return null;
49282
+ }
49241
49283
  function OrbPreview({
49242
49284
  schema,
49243
49285
  mockData,
@@ -49258,7 +49300,8 @@ function OrbPreview({
49258
49300
  lazyLoader,
49259
49301
  schemaPath,
49260
49302
  onUnmatchedNavigate,
49261
- onSignIn
49303
+ onSignIn,
49304
+ onSignOut
49262
49305
  }) {
49263
49306
  if (serverUrl && transport) {
49264
49307
  throw new Error("OrbPreview accepts serverUrl OR transport, not both");
@@ -49546,6 +49589,7 @@ function OrbPreview({
49546
49589
  /* @__PURE__ */ jsxRuntime.jsx(NavStackRefBridge, { apiRef: navStackRef }),
49547
49590
  /* @__PURE__ */ jsxRuntime.jsxs(providers.OrbitalProvider, { initialData: effectiveMockData, skipTheme: true, verification: true, isolated, user, children: [
49548
49591
  /* @__PURE__ */ jsxRuntime.jsx(NavigateListener, { onNavigate: handleNavigate }),
49592
+ onSignOut !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(SignOutListener, { onSignOut }),
49549
49593
  /* @__PURE__ */ jsxRuntime.jsx(context.UISlotProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
49550
49594
  providers.PageAccessHost,
49551
49595
  {
@@ -50019,6 +50063,10 @@ function entityNameOf(ref) {
50019
50063
  if (typeof ref === "string") return ref;
50020
50064
  return "name" in ref ? ref.name : void 0;
50021
50065
  }
50066
+ function roleColors(role) {
50067
+ if (role === "default") return { border: "var(--color-border)", dot: exports.STATE_COLORS.default.border };
50068
+ return { border: exports.STATE_COLORS[role].border, dot: exports.STATE_COLORS[role].border };
50069
+ }
50022
50070
  function eventHandleStyle(source) {
50023
50071
  const hint = Number.isFinite(source.positionHint) ? source.positionHint : 0.5;
50024
50072
  if (hint !== source.positionHint) {
@@ -50327,7 +50375,7 @@ function parentBoxOf(el, container, zoom) {
50327
50375
  function resolveLayoutAxis(el) {
50328
50376
  return getComputedStyle(layoutBoxOf(el)).flexDirection === "row" ? "horizontal" : "vertical";
50329
50377
  }
50330
- var eventHandleLog, orbPreviewLog, ScreenSizeContext, CARD_MIN_WIDTH, CARD_MAX_WIDTH, PatternSelectionContext, CanvasToolsContext, CanvasStatePickerContext; exports.CanvasVerifyContext = void 0; var VERDICT_VARIANT, ROLE_COLORS, LAYER_ORDER, LAYER_LABEL_KEYS, LAYER_COLORS, TARGET_HANDLE_STYLE, SELECTION_STYLES, OrbPreviewNodeInner; exports.OrbPreviewNode = void 0;
50378
+ var eventHandleLog, orbPreviewLog, ScreenSizeContext, CARD_MIN_WIDTH, CARD_MAX_WIDTH, PatternSelectionContext, CanvasToolsContext, CanvasStatePickerContext; exports.CanvasVerifyContext = void 0; var VERDICT_VARIANT, LAYER_ORDER, LAYER_LABEL_KEYS, LAYER_COLORS, TARGET_HANDLE_STYLE, SELECTION_STYLES, OrbPreviewNodeInner; exports.OrbPreviewNode = void 0;
50331
50379
  var init_OrbPreviewNode = __esm({
50332
50380
  "components/avl/molecules/OrbPreviewNode.tsx"() {
50333
50381
  "use client";
@@ -50377,12 +50425,6 @@ var init_OrbPreviewNode = __esm({
50377
50425
  stale: "warning",
50378
50426
  running: "info"
50379
50427
  };
50380
- ROLE_COLORS = {
50381
- initial: { border: exports.STATE_COLORS.initial.border, dot: exports.STATE_COLORS.initial.border },
50382
- terminal: { border: exports.STATE_COLORS.terminal.border, dot: exports.STATE_COLORS.terminal.border },
50383
- hub: { border: exports.STATE_COLORS.hub.border, dot: exports.STATE_COLORS.hub.border },
50384
- default: { border: "var(--color-border)", dot: exports.STATE_COLORS.default.border }
50385
- };
50386
50428
  LAYER_ORDER = ["Infrastructure", "Services", "UI Patterns", "Game", "ML", "Domain", "Community"];
50387
50429
  LAYER_LABEL_KEYS = {
50388
50430
  Infrastructure: "orbPreview.layer.infrastructure",
@@ -50453,7 +50495,7 @@ var init_OrbPreviewNode = __esm({
50453
50495
  const [hoverRect, setHoverRect] = React96.useState(null);
50454
50496
  const lastHoverElRef = React96.useRef(null);
50455
50497
  const role = data.stateRole ?? "default";
50456
- const colors = ROLE_COLORS[role] ?? ROLE_COLORS.default;
50498
+ const colors = roleColors(role);
50457
50499
  const eventSources = data.eventSources ?? [];
50458
50500
  const layerColor = data.layer ? LAYER_COLORS[data.layer] : void 0;
50459
50501
  const isExpanded = Boolean(data.traitName);
@@ -52057,7 +52099,7 @@ var init_TagInput = __esm({
52057
52099
  TagInput.displayName = "TagInput";
52058
52100
  }
52059
52101
  });
52060
- function asString2(v) {
52102
+ function asString(v) {
52061
52103
  return typeof v === "string" ? v : "";
52062
52104
  }
52063
52105
  function asNumberInput(v) {
@@ -52530,7 +52572,7 @@ function KnobField({
52530
52572
  EnumRadio,
52531
52573
  {
52532
52574
  suggested,
52533
- value: asString2(value),
52575
+ value: asString(value),
52534
52576
  onChange: (v) => onChange(v),
52535
52577
  placeholder: question.helpText
52536
52578
  }
@@ -52568,7 +52610,7 @@ function KnobField({
52568
52610
  Input,
52569
52611
  {
52570
52612
  placeholder: question.helpText ?? t("knobField.yourAnswer"),
52571
- value: asString2(value),
52613
+ value: asString(value),
52572
52614
  onChange: (e) => onChange(e.target.value)
52573
52615
  }
52574
52616
  );