@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.
- package/dist/{BehaviorValueFrame-QTD7BWOI.js → BehaviorValueFrame-QYFJEMN5.js} +12 -12
- package/dist/{TraitValueFrame-WOXNLLMM.js → TraitValueFrame-X6IL3UST.js} +11 -11
- package/dist/Typography-KBATMU2V.js +5 -0
- package/dist/{UISlotRenderer-EEOXSJCI.js → UISlotRenderer-NZBV5BUI.js} +10 -10
- package/dist/avl/index.cjs +303 -261
- package/dist/avl/index.js +13 -13
- package/dist/{chunk-CB64IOYD.js → chunk-7JRWELUC.js} +4 -2
- package/dist/{chunk-6ZCU3BQN.js → chunk-CXQENFO2.js} +1 -1
- package/dist/{chunk-LUREMDI3.js → chunk-D4NAA2JW.js} +2 -2
- package/dist/{chunk-UTSDPJUP.js → chunk-DXPCAQJU.js} +3 -3
- package/dist/{chunk-MGN6B6OQ.js → chunk-EDPUQ2ZJ.js} +9 -0
- package/dist/{chunk-KZRAMPM6.js → chunk-ERDYADVZ.js} +1 -1
- package/dist/{chunk-7NIU5GDC.js → chunk-EZ5FSNOE.js} +2 -2
- package/dist/{chunk-6PV4LASE.js → chunk-G6EFTACU.js} +281 -206
- package/dist/{chunk-EIIQGOZW.js → chunk-GVQOTA7T.js} +1 -1
- package/dist/{chunk-FYX64CDL.js → chunk-QOV3TUAA.js} +2 -1
- package/dist/{chunk-F7NZ3KZQ.js → chunk-WBWXBA5H.js} +1 -1
- package/dist/components/index.cjs +414 -312
- package/dist/components/index.d.ts +40 -8
- package/dist/components/index.js +14 -14
- package/dist/hooks/index.cjs +6 -3
- package/dist/hooks/index.js +5 -5
- package/dist/lib/drawable/three/index.cjs +11 -1
- package/dist/lib/drawable/three/index.js +6 -6
- package/dist/lib/index.cjs +27 -1
- package/dist/lib/index.js +27 -2
- package/dist/locales/index.cjs +6 -3
- package/dist/locales/index.js +2 -2
- package/dist/providers/index.cjs +302 -260
- package/dist/providers/index.js +10 -10
- package/dist/runtime/index.cjs +302 -260
- package/dist/runtime/index.d.ts +6 -1
- package/dist/runtime/index.js +12 -12
- package/dist/ssr/index.cjs +2 -1
- package/dist/ssr/index.js +2 -1
- package/locales/ar.json +2 -1
- package/locales/en.json +2 -1
- package/locales/sl.json +2 -1
- package/package.json +6 -6
- package/themes/_base.css +27 -0
- package/dist/Typography-BY4A2NBY.js +0 -5
package/dist/providers/index.cjs
CHANGED
|
@@ -3417,7 +3417,8 @@ var init_en = __esm({
|
|
|
3417
3417
|
"avl.stateInitial": "start",
|
|
3418
3418
|
"avl.stateTerminal": "end",
|
|
3419
3419
|
"avl.guardCaption": "The transition only fires when this check is true.",
|
|
3420
|
-
"avl.effectsCaption": "What runs, in order, when the transition fires."
|
|
3420
|
+
"avl.effectsCaption": "What runs, in order, when the transition fires.",
|
|
3421
|
+
"aria.carousel": "carousel"
|
|
3421
3422
|
};
|
|
3422
3423
|
}
|
|
3423
3424
|
});
|
|
@@ -5389,11 +5390,29 @@ var init_SvgBranch = __esm({
|
|
|
5389
5390
|
SvgBranch.displayName = "SvgBranch";
|
|
5390
5391
|
}
|
|
5391
5392
|
});
|
|
5393
|
+
|
|
5394
|
+
// lib/svgMotion.ts
|
|
5395
|
+
function svgMotionClass(motion, animated) {
|
|
5396
|
+
if (!animated || !isMotionEnabled()) return void 0;
|
|
5397
|
+
return SVG_MOTION_CLASSES[motion];
|
|
5398
|
+
}
|
|
5399
|
+
var SVG_MOTION_CLASSES;
|
|
5400
|
+
var init_svgMotion = __esm({
|
|
5401
|
+
"lib/svgMotion.ts"() {
|
|
5402
|
+
init_Presence();
|
|
5403
|
+
SVG_MOTION_CLASSES = {
|
|
5404
|
+
flowDash: "almadar-svg-flow-dash",
|
|
5405
|
+
pulseRing: "almadar-svg-pulse-ring",
|
|
5406
|
+
pulseExpand: "almadar-svg-pulse-expand"
|
|
5407
|
+
};
|
|
5408
|
+
}
|
|
5409
|
+
});
|
|
5392
5410
|
var SvgConnection;
|
|
5393
5411
|
var init_SvgConnection = __esm({
|
|
5394
5412
|
"components/core/atoms/svg/SvgConnection.tsx"() {
|
|
5395
5413
|
"use client";
|
|
5396
5414
|
init_domPassthrough();
|
|
5415
|
+
init_svgMotion();
|
|
5397
5416
|
SvgConnection = ({
|
|
5398
5417
|
x1 = 10,
|
|
5399
5418
|
y1 = 50,
|
|
@@ -5418,7 +5437,7 @@ var init_SvgConnection = __esm({
|
|
|
5418
5437
|
{
|
|
5419
5438
|
...asRoot ? void 0 : a11y,
|
|
5420
5439
|
className: [
|
|
5421
|
-
variant === "animated"
|
|
5440
|
+
svgMotionClass("flowDash", variant === "animated"),
|
|
5422
5441
|
className
|
|
5423
5442
|
].filter(Boolean).join(" ") || void 0,
|
|
5424
5443
|
x1,
|
|
@@ -5445,6 +5464,7 @@ var init_SvgFlow = __esm({
|
|
|
5445
5464
|
"components/core/atoms/svg/SvgFlow.tsx"() {
|
|
5446
5465
|
"use client";
|
|
5447
5466
|
init_domPassthrough();
|
|
5467
|
+
init_svgMotion();
|
|
5448
5468
|
flowIdCounter = 0;
|
|
5449
5469
|
DEFAULT_POINTS = [[10, 50], [50, 20], [90, 50]];
|
|
5450
5470
|
SvgFlow = ({
|
|
@@ -5492,7 +5512,7 @@ var init_SvgFlow = __esm({
|
|
|
5492
5512
|
strokeLinecap: "round",
|
|
5493
5513
|
strokeLinejoin: "round",
|
|
5494
5514
|
markerEnd: `url(#${markerId})`,
|
|
5495
|
-
className:
|
|
5515
|
+
className: svgMotionClass("flowDash", animated),
|
|
5496
5516
|
strokeDasharray: animated ? "8 6" : void 0
|
|
5497
5517
|
}
|
|
5498
5518
|
)
|
|
@@ -5926,6 +5946,7 @@ var init_SvgNode = __esm({
|
|
|
5926
5946
|
"components/core/atoms/svg/SvgNode.tsx"() {
|
|
5927
5947
|
"use client";
|
|
5928
5948
|
init_domPassthrough();
|
|
5949
|
+
init_svgMotion();
|
|
5929
5950
|
SvgNode = ({
|
|
5930
5951
|
x = 50,
|
|
5931
5952
|
y = 50,
|
|
@@ -5952,7 +5973,7 @@ var init_SvgNode = __esm({
|
|
|
5952
5973
|
stroke: color,
|
|
5953
5974
|
strokeWidth: 1,
|
|
5954
5975
|
opacity: 0.3,
|
|
5955
|
-
className: "
|
|
5976
|
+
className: svgMotionClass("pulseRing", true)
|
|
5956
5977
|
}
|
|
5957
5978
|
),
|
|
5958
5979
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5987,23 +6008,12 @@ var init_SvgNode = __esm({
|
|
|
5987
6008
|
SvgNode.displayName = "SvgNode";
|
|
5988
6009
|
}
|
|
5989
6010
|
});
|
|
5990
|
-
var
|
|
6011
|
+
var SvgPulse;
|
|
5991
6012
|
var init_SvgPulse = __esm({
|
|
5992
6013
|
"components/core/atoms/svg/SvgPulse.tsx"() {
|
|
5993
6014
|
"use client";
|
|
5994
6015
|
init_domPassthrough();
|
|
5995
|
-
|
|
5996
|
-
@keyframes almadar-svg-pulse-expand {
|
|
5997
|
-
0% {
|
|
5998
|
-
transform: scale(0.3);
|
|
5999
|
-
opacity: 0.4;
|
|
6000
|
-
}
|
|
6001
|
-
100% {
|
|
6002
|
-
transform: scale(1);
|
|
6003
|
-
opacity: 0;
|
|
6004
|
-
}
|
|
6005
|
-
}
|
|
6006
|
-
`;
|
|
6016
|
+
init_svgMotion();
|
|
6007
6017
|
SvgPulse = ({
|
|
6008
6018
|
cx = 70,
|
|
6009
6019
|
cy = 70,
|
|
@@ -6019,8 +6029,8 @@ var init_SvgPulse = __esm({
|
|
|
6019
6029
|
...rest
|
|
6020
6030
|
}) => {
|
|
6021
6031
|
const a11y = domPassthrough(rest);
|
|
6032
|
+
const pulseClass2 = svgMotionClass("pulseExpand", animated);
|
|
6022
6033
|
const inner = /* @__PURE__ */ jsxRuntime.jsxs("g", { ...asRoot ? void 0 : a11y, className, opacity, children: [
|
|
6023
|
-
animated && /* @__PURE__ */ jsxRuntime.jsx("style", { children: PULSE_KEYFRAMES }),
|
|
6024
6034
|
Array.from({ length: rings }).map((_, i) => {
|
|
6025
6035
|
const ringRadius = (i + 1) / rings * maxRadius;
|
|
6026
6036
|
const ringOpacity = 1 - i / rings * 0.6;
|
|
@@ -6034,11 +6044,9 @@ var init_SvgPulse = __esm({
|
|
|
6034
6044
|
fill: "none",
|
|
6035
6045
|
stroke: color,
|
|
6036
6046
|
strokeWidth: 1.5,
|
|
6037
|
-
opacity:
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
animation: `almadar-svg-pulse-expand 2s ease-out ${delay}s infinite`
|
|
6041
|
-
} : void 0
|
|
6047
|
+
opacity: pulseClass2 ? void 0 : ringOpacity * 0.4,
|
|
6048
|
+
className: pulseClass2,
|
|
6049
|
+
style: pulseClass2 ? { animationDelay: `${delay}s` } : void 0
|
|
6042
6050
|
},
|
|
6043
6051
|
i
|
|
6044
6052
|
);
|
|
@@ -15437,6 +15445,10 @@ function resolveCanvasTheme(scope) {
|
|
|
15437
15445
|
const c = r.color(toneVar(tone));
|
|
15438
15446
|
tones[tone] = c ? colorCss(c) : "currentColor";
|
|
15439
15447
|
}
|
|
15448
|
+
const surface = (name) => {
|
|
15449
|
+
const c = r.color(name);
|
|
15450
|
+
return c ? colorCss(c) : "transparent";
|
|
15451
|
+
};
|
|
15440
15452
|
const ground = r.color("--surface-diagram");
|
|
15441
15453
|
const text = {};
|
|
15442
15454
|
const TEXT_FALLBACK = { xs: 12, sm: 14, base: 16, lg: 18, xl: 20, "2xl": 24 };
|
|
@@ -15444,6 +15456,11 @@ function resolveCanvasTheme(scope) {
|
|
|
15444
15456
|
const body = r.family("--font-family-body", r.family("--font-family", "system-ui, sans-serif"));
|
|
15445
15457
|
return {
|
|
15446
15458
|
ground: ground ? colorCss(ground) : "transparent",
|
|
15459
|
+
surfaces: {
|
|
15460
|
+
muted: surface("--color-muted"),
|
|
15461
|
+
card: surface("--color-card"),
|
|
15462
|
+
onPrimary: surface("--color-primary-foreground")
|
|
15463
|
+
},
|
|
15447
15464
|
tones,
|
|
15448
15465
|
series: SERIES_TONES.map((t) => tones[t]),
|
|
15449
15466
|
strokes: {
|
|
@@ -21396,7 +21413,7 @@ var init_CodeBlock = __esm({
|
|
|
21396
21413
|
() => naturalTabs?.find((lang) => lang === pageLocale) ?? naturalTabs?.[0] ?? "en"
|
|
21397
21414
|
);
|
|
21398
21415
|
const activeNaturalLanguage = naturalTabs?.includes(naturalLanguage) === true ? naturalLanguage : naturalTabs?.[0] ?? "en";
|
|
21399
|
-
const codeDir = naturalTabs && i18n.
|
|
21416
|
+
const codeDir = naturalTabs && i18n.getVocabulary(activeNaturalLanguage).meta.rtl ? "rtl" : "ltr";
|
|
21400
21417
|
const translationCache = React99.useMemo(() => /* @__PURE__ */ new Map(), [englishCode, files]);
|
|
21401
21418
|
const translateFor = React99.useCallback(
|
|
21402
21419
|
(source, sourceLanguage, cacheKey) => {
|
|
@@ -21413,14 +21430,14 @@ var init_CodeBlock = __esm({
|
|
|
21413
21430
|
const code = translateFor(englishCode, language, "code");
|
|
21414
21431
|
const naturalTabItems = naturalTabs?.map((lang) => ({
|
|
21415
21432
|
id: `lang-${lang}`,
|
|
21416
|
-
label: i18n.
|
|
21433
|
+
label: i18n.getVocabulary(lang).meta.name,
|
|
21417
21434
|
content: null
|
|
21418
21435
|
}));
|
|
21419
21436
|
const naturalTabStrip = naturalTabs && naturalTabItems ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
21420
21437
|
Box,
|
|
21421
21438
|
{
|
|
21422
21439
|
className: "border-b border-border",
|
|
21423
|
-
dir: i18n.
|
|
21440
|
+
dir: i18n.getVocabulary(activeNaturalLanguage).meta.rtl ? "rtl" : "ltr",
|
|
21424
21441
|
"data-testid": "codeblock-language-tabs",
|
|
21425
21442
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
21426
21443
|
Tabs,
|
|
@@ -25509,10 +25526,10 @@ var init_AvlState = __esm({
|
|
|
25509
25526
|
}) => {
|
|
25510
25527
|
const width = computeWidth(explicitWidth, transitionCount);
|
|
25511
25528
|
const rx = height / 2;
|
|
25512
|
-
const
|
|
25513
|
-
const fillColor =
|
|
25514
|
-
const strokeColor =
|
|
25515
|
-
const textColor =
|
|
25529
|
+
const roleColors2 = role ? STATE_COLORS[role] : null;
|
|
25530
|
+
const fillColor = roleColors2 ? roleColors2.fill : "none";
|
|
25531
|
+
const strokeColor = roleColors2 ? roleColors2.border : color;
|
|
25532
|
+
const textColor = roleColors2 ? roleColors2.border : color;
|
|
25516
25533
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { className, opacity, transform: `translate(${x},${y})`, children: [
|
|
25517
25534
|
isInitial && /* @__PURE__ */ jsxRuntime.jsx(
|
|
25518
25535
|
"circle",
|
|
@@ -29510,18 +29527,30 @@ var init_Carousel = __esm({
|
|
|
29510
29527
|
loop = false,
|
|
29511
29528
|
slideChangeEvent,
|
|
29512
29529
|
slideChangePayload,
|
|
29530
|
+
orientation = "horizontal",
|
|
29531
|
+
fullHeight = false,
|
|
29532
|
+
loadMoreEvent,
|
|
29533
|
+
loadMoreAhead = 2,
|
|
29534
|
+
hasMore = false,
|
|
29535
|
+
isLoadingMore = false,
|
|
29513
29536
|
className,
|
|
29514
29537
|
...rest
|
|
29515
29538
|
}) => {
|
|
29539
|
+
const vertical = orientation === "vertical";
|
|
29540
|
+
const loadRequestedAt = React99.useRef(null);
|
|
29516
29541
|
const [activeIndex, setActiveIndex] = React99.useState(0);
|
|
29517
29542
|
const scrollRef = React99.useRef(null);
|
|
29543
|
+
const rootRef = React99.useRef(null);
|
|
29544
|
+
const [topOffset, setTopOffset] = React99.useState(0);
|
|
29518
29545
|
const autoPlayRef = React99.useRef(null);
|
|
29519
29546
|
const eventBus = useSafeEventBus3();
|
|
29520
29547
|
const { t } = hooks.useTranslate();
|
|
29521
29548
|
const safeItems = items ?? [];
|
|
29522
29549
|
const totalSlides = safeItems.length;
|
|
29550
|
+
const announcedIndex = React99.useRef(0);
|
|
29523
29551
|
const emitSlideChange = React99.useCallback(
|
|
29524
29552
|
(newIndex) => {
|
|
29553
|
+
announcedIndex.current = newIndex;
|
|
29525
29554
|
if (slideChangeEvent) {
|
|
29526
29555
|
eventBus.emit(`UI:${slideChangeEvent}`, {
|
|
29527
29556
|
index: newIndex,
|
|
@@ -29535,13 +29564,13 @@ var init_Carousel = __esm({
|
|
|
29535
29564
|
(index) => {
|
|
29536
29565
|
const container = scrollRef.current;
|
|
29537
29566
|
if (!container) return;
|
|
29538
|
-
const
|
|
29539
|
-
|
|
29540
|
-
|
|
29541
|
-
|
|
29542
|
-
});
|
|
29567
|
+
const reduceMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
29568
|
+
const behavior = reduceMotion ? "auto" : "smooth";
|
|
29569
|
+
if (typeof container.scrollTo !== "function") return;
|
|
29570
|
+
if (vertical) container.scrollTo({ top: container.offsetHeight * index, behavior });
|
|
29571
|
+
else container.scrollTo({ left: container.offsetWidth * index, behavior });
|
|
29543
29572
|
},
|
|
29544
|
-
[]
|
|
29573
|
+
[vertical]
|
|
29545
29574
|
);
|
|
29546
29575
|
const goToSlide = React99.useCallback(
|
|
29547
29576
|
(index) => {
|
|
@@ -29565,10 +29594,7 @@ var init_Carousel = __esm({
|
|
|
29565
29594
|
goToSlide(activeIndex - 1);
|
|
29566
29595
|
}, [goToSlide, activeIndex]);
|
|
29567
29596
|
const swipeHandlers = useSwipeGesture(
|
|
29568
|
-
{
|
|
29569
|
-
onSwipeLeft: goNext,
|
|
29570
|
-
onSwipeRight: goPrev
|
|
29571
|
-
},
|
|
29597
|
+
vertical ? { onSwipeUp: goNext, onSwipeDown: goPrev } : { onSwipeLeft: goNext, onSwipeRight: goPrev },
|
|
29572
29598
|
{ threshold: 40 }
|
|
29573
29599
|
);
|
|
29574
29600
|
React99.useEffect(() => {
|
|
@@ -29593,138 +29619,189 @@ var init_Carousel = __esm({
|
|
|
29593
29619
|
const handleScroll = React99.useCallback(() => {
|
|
29594
29620
|
const container = scrollRef.current;
|
|
29595
29621
|
if (!container) return;
|
|
29596
|
-
const
|
|
29597
|
-
if (
|
|
29598
|
-
const
|
|
29599
|
-
|
|
29600
|
-
|
|
29601
|
-
|
|
29622
|
+
const slideSize = vertical ? container.offsetHeight : container.offsetWidth;
|
|
29623
|
+
if (slideSize === 0) return;
|
|
29624
|
+
const position = vertical ? container.scrollTop : container.scrollLeft;
|
|
29625
|
+
const newIndex = Math.round(position / slideSize);
|
|
29626
|
+
if (newIndex < 0 || newIndex >= totalSlides) return;
|
|
29627
|
+
setActiveIndex(newIndex);
|
|
29628
|
+
if (Math.abs(position - newIndex * slideSize) <= 1 && newIndex !== announcedIndex.current) {
|
|
29629
|
+
emitSlideChange(newIndex);
|
|
29630
|
+
}
|
|
29631
|
+
}, [totalSlides, vertical, emitSlideChange]);
|
|
29632
|
+
React99.useEffect(() => {
|
|
29633
|
+
if (!loadMoreEvent || !hasMore || isLoadingMore || totalSlides === 0) return;
|
|
29634
|
+
if (activeIndex < totalSlides - 1 - loadMoreAhead) return;
|
|
29635
|
+
if (loadRequestedAt.current === totalSlides) return;
|
|
29636
|
+
loadRequestedAt.current = totalSlides;
|
|
29637
|
+
eventBus.emit(`UI:${loadMoreEvent}`, { index: activeIndex });
|
|
29638
|
+
}, [activeIndex, totalSlides, loadMoreEvent, hasMore, isLoadingMore, loadMoreAhead, eventBus]);
|
|
29639
|
+
const viewportBound = vertical && fullHeight;
|
|
29640
|
+
React99.useLayoutEffect(() => {
|
|
29641
|
+
if (!viewportBound || typeof window === "undefined") return;
|
|
29642
|
+
const measure = () => {
|
|
29643
|
+
const root = rootRef.current;
|
|
29644
|
+
if (root) setTopOffset(Math.max(0, Math.round(root.getBoundingClientRect().top)));
|
|
29645
|
+
};
|
|
29646
|
+
measure();
|
|
29647
|
+
window.addEventListener("resize", measure);
|
|
29648
|
+
return () => window.removeEventListener("resize", measure);
|
|
29649
|
+
}, [viewportBound]);
|
|
29650
|
+
const handleKeyDown = React99.useCallback(
|
|
29651
|
+
(e) => {
|
|
29652
|
+
const next = vertical ? ["ArrowDown", "PageDown"] : ["ArrowRight"];
|
|
29653
|
+
const prev = vertical ? ["ArrowUp", "PageUp"] : ["ArrowLeft"];
|
|
29654
|
+
if (next.includes(e.key)) {
|
|
29655
|
+
e.preventDefault();
|
|
29656
|
+
goNext();
|
|
29657
|
+
} else if (prev.includes(e.key)) {
|
|
29658
|
+
e.preventDefault();
|
|
29659
|
+
goPrev();
|
|
29602
29660
|
}
|
|
29603
|
-
|
|
29604
|
-
|
|
29605
|
-
|
|
29661
|
+
},
|
|
29662
|
+
[vertical, goNext, goPrev]
|
|
29663
|
+
);
|
|
29606
29664
|
const hasPrev = loop || activeIndex > 0;
|
|
29607
29665
|
const hasNext = loop || activeIndex < totalSlides - 1;
|
|
29608
29666
|
if (totalSlides === 0) return null;
|
|
29609
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
29610
|
-
|
|
29611
|
-
|
|
29612
|
-
|
|
29613
|
-
|
|
29614
|
-
|
|
29615
|
-
|
|
29616
|
-
|
|
29617
|
-
|
|
29618
|
-
|
|
29619
|
-
|
|
29620
|
-
|
|
29621
|
-
|
|
29622
|
-
|
|
29623
|
-
|
|
29624
|
-
style: {
|
|
29625
|
-
scrollSnapType: "x mandatory",
|
|
29626
|
-
WebkitOverflowScrolling: "touch"
|
|
29627
|
-
},
|
|
29628
|
-
onScroll: handleScroll,
|
|
29629
|
-
onPointerDown: swipeHandlers.onPointerDown,
|
|
29630
|
-
onPointerMove: swipeHandlers.onPointerMove,
|
|
29631
|
-
onPointerUp: swipeHandlers.onPointerUp,
|
|
29632
|
-
onPointerCancel: swipeHandlers.onPointerCancel,
|
|
29633
|
-
children: safeItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
29667
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
29668
|
+
Box,
|
|
29669
|
+
{
|
|
29670
|
+
position: "relative",
|
|
29671
|
+
overflow: "hidden",
|
|
29672
|
+
role: "region",
|
|
29673
|
+
"aria-roledescription": t("aria.carousel"),
|
|
29674
|
+
tabIndex: 0,
|
|
29675
|
+
onKeyDown: handleKeyDown,
|
|
29676
|
+
...domPassthrough(rest),
|
|
29677
|
+
ref: rootRef,
|
|
29678
|
+
className: cn("w-full", fullHeight && !viewportBound && "h-full", className),
|
|
29679
|
+
style: viewportBound ? { height: `calc(100svh - ${topOffset}px)` } : void 0,
|
|
29680
|
+
children: [
|
|
29681
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29634
29682
|
Box,
|
|
29635
29683
|
{
|
|
29684
|
+
ref: scrollRef,
|
|
29685
|
+
display: "flex",
|
|
29686
|
+
overflow: "auto",
|
|
29636
29687
|
className: cn(
|
|
29637
|
-
"
|
|
29638
|
-
"
|
|
29688
|
+
"w-full",
|
|
29689
|
+
"scroll-smooth",
|
|
29690
|
+
"scrollbar-none",
|
|
29691
|
+
vertical ? "[scroll-snap-type:y_mandatory]" : "[scroll-snap-type:x_mandatory]",
|
|
29692
|
+
"[&::-webkit-scrollbar]:hidden",
|
|
29693
|
+
"[-ms-overflow-style:none]"
|
|
29639
29694
|
),
|
|
29640
29695
|
style: {
|
|
29641
|
-
|
|
29696
|
+
flexDirection: vertical ? "column" : "row",
|
|
29697
|
+
scrollSnapType: vertical ? "y mandatory" : "x mandatory",
|
|
29698
|
+
height: fullHeight ? "100%" : void 0,
|
|
29699
|
+
WebkitOverflowScrolling: "touch"
|
|
29642
29700
|
},
|
|
29643
|
-
|
|
29644
|
-
|
|
29645
|
-
|
|
29646
|
-
|
|
29647
|
-
|
|
29648
|
-
|
|
29649
|
-
|
|
29650
|
-
|
|
29651
|
-
|
|
29652
|
-
|
|
29653
|
-
|
|
29654
|
-
|
|
29655
|
-
|
|
29701
|
+
onScroll: handleScroll,
|
|
29702
|
+
onPointerDown: swipeHandlers.onPointerDown,
|
|
29703
|
+
onPointerMove: swipeHandlers.onPointerMove,
|
|
29704
|
+
onPointerUp: swipeHandlers.onPointerUp,
|
|
29705
|
+
onPointerCancel: swipeHandlers.onPointerCancel,
|
|
29706
|
+
children: safeItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
29707
|
+
Box,
|
|
29708
|
+
{
|
|
29709
|
+
className: cn(
|
|
29710
|
+
"flex-shrink-0 w-full",
|
|
29711
|
+
"[scroll-snap-align:start]"
|
|
29712
|
+
),
|
|
29713
|
+
style: {
|
|
29714
|
+
scrollSnapAlign: "start",
|
|
29715
|
+
scrollSnapStop: vertical ? "always" : void 0,
|
|
29716
|
+
height: fullHeight ? "100%" : void 0
|
|
29717
|
+
},
|
|
29718
|
+
children: (renderItem ?? children)?.(item, index)
|
|
29719
|
+
},
|
|
29720
|
+
index
|
|
29721
|
+
))
|
|
29722
|
+
}
|
|
29723
|
+
),
|
|
29724
|
+
showArrows && hasPrev && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
29725
|
+
Box,
|
|
29656
29726
|
{
|
|
29657
|
-
|
|
29658
|
-
|
|
29659
|
-
|
|
29660
|
-
|
|
29661
|
-
|
|
29662
|
-
|
|
29663
|
-
|
|
29664
|
-
|
|
29665
|
-
|
|
29666
|
-
|
|
29667
|
-
|
|
29668
|
-
|
|
29727
|
+
position: "absolute",
|
|
29728
|
+
className: vertical ? "right-2 top-2 z-10" : "left-2 top-1/2 -translate-y-1/2 z-10",
|
|
29729
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
29730
|
+
Button,
|
|
29731
|
+
{
|
|
29732
|
+
variant: "ghost",
|
|
29733
|
+
size: "sm",
|
|
29734
|
+
onClick: goPrev,
|
|
29735
|
+
"aria-label": t("aria.previousSlide"),
|
|
29736
|
+
className: cn(
|
|
29737
|
+
"rounded-full",
|
|
29738
|
+
"bg-surface/80",
|
|
29739
|
+
"backdrop-blur-sm",
|
|
29740
|
+
"shadow-elevation-interactive",
|
|
29741
|
+
"hover:bg-surface"
|
|
29742
|
+
),
|
|
29743
|
+
children: vertical ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronUp, { className: "w-5 h-5" }) : /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronLeft, { className: "w-5 h-5" })
|
|
29744
|
+
}
|
|
29745
|
+
)
|
|
29669
29746
|
}
|
|
29670
|
-
)
|
|
29671
|
-
|
|
29672
|
-
|
|
29673
|
-
showArrows && hasNext && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
29674
|
-
Box,
|
|
29675
|
-
{
|
|
29676
|
-
position: "absolute",
|
|
29677
|
-
className: "right-2 top-1/2 -translate-y-1/2 z-10",
|
|
29678
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
29679
|
-
Button,
|
|
29747
|
+
),
|
|
29748
|
+
showArrows && hasNext && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
29749
|
+
Box,
|
|
29680
29750
|
{
|
|
29681
|
-
|
|
29682
|
-
|
|
29683
|
-
|
|
29684
|
-
|
|
29685
|
-
|
|
29686
|
-
|
|
29687
|
-
|
|
29688
|
-
|
|
29689
|
-
|
|
29690
|
-
|
|
29691
|
-
|
|
29692
|
-
|
|
29751
|
+
position: "absolute",
|
|
29752
|
+
className: vertical ? "right-2 bottom-2 z-10" : "right-2 top-1/2 -translate-y-1/2 z-10",
|
|
29753
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
29754
|
+
Button,
|
|
29755
|
+
{
|
|
29756
|
+
variant: "ghost",
|
|
29757
|
+
size: "sm",
|
|
29758
|
+
onClick: goNext,
|
|
29759
|
+
"aria-label": t("aria.nextSlide"),
|
|
29760
|
+
className: cn(
|
|
29761
|
+
"rounded-full",
|
|
29762
|
+
"bg-surface/80",
|
|
29763
|
+
"backdrop-blur-sm",
|
|
29764
|
+
"shadow-elevation-interactive",
|
|
29765
|
+
"hover:bg-surface"
|
|
29766
|
+
),
|
|
29767
|
+
children: vertical ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronDown, { className: "w-5 h-5" }) : /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronRight, { className: "w-5 h-5" })
|
|
29768
|
+
}
|
|
29769
|
+
)
|
|
29770
|
+
}
|
|
29771
|
+
),
|
|
29772
|
+
showDots && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
29773
|
+
Box,
|
|
29774
|
+
{
|
|
29775
|
+
position: "absolute",
|
|
29776
|
+
className: "bottom-3 left-0 right-0 z-10",
|
|
29777
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "xs", align: "center", justify: "center", role: "tablist", "aria-label": t("aria.carouselSlides"), children: safeItems.map((_, index) => {
|
|
29778
|
+
const isActive = index === activeIndex;
|
|
29779
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29780
|
+
Box,
|
|
29781
|
+
{
|
|
29782
|
+
className: cn(
|
|
29783
|
+
"rounded-full cursor-pointer transition-all duration-fast"
|
|
29784
|
+
),
|
|
29785
|
+
style: {
|
|
29786
|
+
width: isActive ? 10 : 8,
|
|
29787
|
+
height: isActive ? 10 : 8,
|
|
29788
|
+
backgroundColor: isActive ? "var(--color-primary)" : "var(--color-muted, #d4d4d8)",
|
|
29789
|
+
opacity: isActive ? 1 : 0.6
|
|
29790
|
+
},
|
|
29791
|
+
...pressableProps(() => goToSlide(index)),
|
|
29792
|
+
role: "tab",
|
|
29793
|
+
"aria-selected": isActive,
|
|
29794
|
+
tabIndex: isActive ? 0 : -1,
|
|
29795
|
+
"aria-label": t("carousel.goToSlide", { number: index + 1 })
|
|
29796
|
+
},
|
|
29797
|
+
index
|
|
29798
|
+
);
|
|
29799
|
+
}) })
|
|
29693
29800
|
}
|
|
29694
29801
|
)
|
|
29695
|
-
|
|
29696
|
-
|
|
29697
|
-
|
|
29698
|
-
Box,
|
|
29699
|
-
{
|
|
29700
|
-
position: "absolute",
|
|
29701
|
-
className: "bottom-3 left-0 right-0 z-10",
|
|
29702
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "xs", align: "center", justify: "center", role: "tablist", "aria-label": t("aria.carouselSlides"), children: safeItems.map((_, index) => {
|
|
29703
|
-
const isActive = index === activeIndex;
|
|
29704
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29705
|
-
Box,
|
|
29706
|
-
{
|
|
29707
|
-
className: cn(
|
|
29708
|
-
"rounded-full cursor-pointer transition-all duration-fast"
|
|
29709
|
-
),
|
|
29710
|
-
style: {
|
|
29711
|
-
width: isActive ? 10 : 8,
|
|
29712
|
-
height: isActive ? 10 : 8,
|
|
29713
|
-
backgroundColor: isActive ? "var(--color-primary)" : "var(--color-muted, #d4d4d8)",
|
|
29714
|
-
opacity: isActive ? 1 : 0.6
|
|
29715
|
-
},
|
|
29716
|
-
...pressableProps(() => goToSlide(index)),
|
|
29717
|
-
role: "tab",
|
|
29718
|
-
"aria-selected": isActive,
|
|
29719
|
-
tabIndex: isActive ? 0 : -1,
|
|
29720
|
-
"aria-label": t("carousel.goToSlide", { number: index + 1 })
|
|
29721
|
-
},
|
|
29722
|
-
index
|
|
29723
|
-
);
|
|
29724
|
-
}) })
|
|
29725
|
-
}
|
|
29726
|
-
)
|
|
29727
|
-
] });
|
|
29802
|
+
]
|
|
29803
|
+
}
|
|
29804
|
+
);
|
|
29728
29805
|
};
|
|
29729
29806
|
Carousel.displayName = "Carousel";
|
|
29730
29807
|
}
|
|
@@ -30732,59 +30809,10 @@ var init_ChartLegend = __esm({
|
|
|
30732
30809
|
});
|
|
30733
30810
|
|
|
30734
30811
|
// components/core/organisms/trace-edit-focus.ts
|
|
30735
|
-
|
|
30736
|
-
return typeof v === "string" ? v : void 0;
|
|
30737
|
-
}
|
|
30738
|
-
function asLevel(v) {
|
|
30739
|
-
if (typeof v === "string" && EDIT_FOCUS_LEVELS.has(v)) {
|
|
30740
|
-
return v;
|
|
30741
|
-
}
|
|
30742
|
-
return "node";
|
|
30743
|
-
}
|
|
30744
|
-
function isEventPayload(v) {
|
|
30745
|
-
return v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v) && !(v instanceof Date);
|
|
30746
|
-
}
|
|
30747
|
-
function parseEditFocus(value) {
|
|
30748
|
-
if (!isEventPayload(value)) return null;
|
|
30749
|
-
const payload = value;
|
|
30750
|
-
const orbital = asString(payload.orbital);
|
|
30751
|
-
if (orbital === void 0 || orbital.length === 0) return null;
|
|
30752
|
-
const focus = {
|
|
30753
|
-
level: asLevel(payload.level),
|
|
30754
|
-
orbital,
|
|
30755
|
-
label: asString(payload.label) ?? orbital
|
|
30756
|
-
};
|
|
30757
|
-
const trait = asString(payload.trait);
|
|
30758
|
-
if (trait !== void 0) focus.trait = trait;
|
|
30759
|
-
const transition = asString(payload.transition);
|
|
30760
|
-
if (transition !== void 0) focus.transition = transition;
|
|
30761
|
-
const state = asString(payload.state);
|
|
30762
|
-
if (state !== void 0) focus.state = state;
|
|
30763
|
-
const slot = asString(payload.slot);
|
|
30764
|
-
if (slot !== void 0) focus.slot = slot;
|
|
30765
|
-
const path = asString(payload.path);
|
|
30766
|
-
if (path !== void 0) focus.path = path;
|
|
30767
|
-
const patternType = asString(payload.patternType);
|
|
30768
|
-
if (patternType !== void 0) focus.patternType = patternType;
|
|
30769
|
-
const entity = asString(payload.entity);
|
|
30770
|
-
if (entity !== void 0) focus.entity = entity;
|
|
30771
|
-
const source = asString(payload.source);
|
|
30772
|
-
if (source !== void 0) focus.source = source;
|
|
30773
|
-
return focus;
|
|
30774
|
-
}
|
|
30775
|
-
var ELEMENT_SELECTED_EVENT, EDIT_FOCUS_LEVELS;
|
|
30812
|
+
var ELEMENT_SELECTED_EVENT;
|
|
30776
30813
|
var init_trace_edit_focus = __esm({
|
|
30777
30814
|
"components/core/organisms/trace-edit-focus.ts"() {
|
|
30778
30815
|
ELEMENT_SELECTED_EVENT = "UI:ELEMENT_SELECTED";
|
|
30779
|
-
EDIT_FOCUS_LEVELS = /* @__PURE__ */ new Set([
|
|
30780
|
-
"node",
|
|
30781
|
-
"slot",
|
|
30782
|
-
"field",
|
|
30783
|
-
"effect",
|
|
30784
|
-
"trait",
|
|
30785
|
-
"page",
|
|
30786
|
-
"orbital"
|
|
30787
|
-
]);
|
|
30788
30816
|
}
|
|
30789
30817
|
});
|
|
30790
30818
|
function getJepaBadgeVariant(probability) {
|
|
@@ -30800,6 +30828,8 @@ function ChatBar({
|
|
|
30800
30828
|
placeholder,
|
|
30801
30829
|
context,
|
|
30802
30830
|
sendEvent = "CHAT_SEND",
|
|
30831
|
+
focusRequest,
|
|
30832
|
+
editFocus,
|
|
30803
30833
|
className,
|
|
30804
30834
|
...rest
|
|
30805
30835
|
}) {
|
|
@@ -30808,7 +30838,14 @@ function ChatBar({
|
|
|
30808
30838
|
const [inputValue, setInputValue] = React99.useState("");
|
|
30809
30839
|
const inputRef = React99.useRef(null);
|
|
30810
30840
|
const [requestedPlaceholder, setRequestedPlaceholder] = React99.useState(null);
|
|
30811
|
-
const
|
|
30841
|
+
const focus = editFocus ?? null;
|
|
30842
|
+
const requestId = focusRequest?.id;
|
|
30843
|
+
const requestPlaceholder = focusRequest?.placeholder;
|
|
30844
|
+
React99.useEffect(() => {
|
|
30845
|
+
if (requestId === void 0) return;
|
|
30846
|
+
if (requestPlaceholder !== void 0 && requestPlaceholder.length > 0) setRequestedPlaceholder(requestPlaceholder);
|
|
30847
|
+
inputRef.current?.focus();
|
|
30848
|
+
}, [requestId, requestPlaceholder]);
|
|
30812
30849
|
React99.useLayoutEffect(() => {
|
|
30813
30850
|
const el = inputRef.current;
|
|
30814
30851
|
if (!el) return;
|
|
@@ -30818,36 +30855,21 @@ function ChatBar({
|
|
|
30818
30855
|
el.style.overflowY = el.scrollHeight > INPUT_MAX_HEIGHT_PX ? "auto" : "hidden";
|
|
30819
30856
|
}, [inputValue]);
|
|
30820
30857
|
const clearFocus = React99.useCallback(() => {
|
|
30821
|
-
setFocus(null);
|
|
30822
30858
|
eventBus.emit(ELEMENT_SELECTED_EVENT, { focus: null });
|
|
30823
30859
|
}, [eventBus]);
|
|
30860
|
+
const clearSent = React99.useCallback(() => {
|
|
30861
|
+
setInputValue("");
|
|
30862
|
+
setRequestedPlaceholder(null);
|
|
30863
|
+
}, []);
|
|
30824
30864
|
const handleKeyDown = React99.useCallback((e) => {
|
|
30825
30865
|
if (e.key !== "Enter" || e.shiftKey) return;
|
|
30826
30866
|
const trimmed = inputValue.trim();
|
|
30827
30867
|
if (!trimmed) return;
|
|
30828
30868
|
e.preventDefault();
|
|
30829
30869
|
eventBus.emit(`UI:${sendEvent}`, { message: trimmed });
|
|
30830
|
-
|
|
30831
|
-
|
|
30832
|
-
|
|
30833
|
-
setInputValue("");
|
|
30834
|
-
setFocus(null);
|
|
30835
|
-
setRequestedPlaceholder(null);
|
|
30836
|
-
});
|
|
30837
|
-
const unsubFocus = eventBus.on("UI:CHAT_FOCUS", (e) => {
|
|
30838
|
-
const hint = e.payload?.placeholder;
|
|
30839
|
-
if (typeof hint === "string" && hint.length > 0) setRequestedPlaceholder(hint);
|
|
30840
|
-
inputRef.current?.focus();
|
|
30841
|
-
});
|
|
30842
|
-
const unsubSelect = eventBus.on(ELEMENT_SELECTED_EVENT, (e) => {
|
|
30843
|
-
setFocus(parseEditFocus(e.payload?.focus));
|
|
30844
|
-
});
|
|
30845
|
-
return () => {
|
|
30846
|
-
unsubSend();
|
|
30847
|
-
unsubFocus();
|
|
30848
|
-
unsubSelect();
|
|
30849
|
-
};
|
|
30850
|
-
}, [eventBus, sendEvent]);
|
|
30870
|
+
clearSent();
|
|
30871
|
+
}, [inputValue, eventBus, sendEvent, clearSent]);
|
|
30872
|
+
React99.useEffect(() => eventBus.on(`UI:${sendEvent}`, clearSent), [eventBus, sendEvent, clearSent]);
|
|
30851
30873
|
const trailingAction = status === "error" ? /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "secondary", size: "sm", action: "RETRY_GENERATION", className: "rounded-none flex-shrink-0 h-auto", children: [
|
|
30852
30874
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "refresh-cw", size: "xs" }),
|
|
30853
30875
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", children: t("openFile.retry") })
|
|
@@ -30894,6 +30916,7 @@ function ChatBar({
|
|
|
30894
30916
|
size: "sm",
|
|
30895
30917
|
action: sendEvent,
|
|
30896
30918
|
actionPayload: { message: inputValue.trim() },
|
|
30919
|
+
onClick: clearSent,
|
|
30897
30920
|
disabled: !inputValue.trim(),
|
|
30898
30921
|
"aria-label": t("chatBar.sendMessage"),
|
|
30899
30922
|
className: "rounded-none flex-shrink-0 h-auto",
|
|
@@ -33112,16 +33135,6 @@ var init_TopNavItem = __esm({
|
|
|
33112
33135
|
TopNavItem.displayName = "TopNavItem";
|
|
33113
33136
|
}
|
|
33114
33137
|
});
|
|
33115
|
-
|
|
33116
|
-
// hooks/useAuthContext.ts
|
|
33117
|
-
function useAuthContext() {
|
|
33118
|
-
return {
|
|
33119
|
-
user: null,
|
|
33120
|
-
loading: false,
|
|
33121
|
-
signIn: void 0,
|
|
33122
|
-
signOut: void 0
|
|
33123
|
-
};
|
|
33124
|
-
}
|
|
33125
33138
|
var init_useAuthContext = __esm({
|
|
33126
33139
|
"hooks/useAuthContext.ts"() {
|
|
33127
33140
|
}
|
|
@@ -33689,9 +33702,11 @@ var init_DashboardLayout = __esm({
|
|
|
33689
33702
|
React99.useEffect(() => {
|
|
33690
33703
|
registerNavItems(navItems);
|
|
33691
33704
|
}, [navItems, registerNavItems]);
|
|
33692
|
-
const { signOut: authSignOut } = useAuthContext();
|
|
33693
33705
|
const user = userProp || (null);
|
|
33694
|
-
const handleSignOut =
|
|
33706
|
+
const handleSignOut = () => {
|
|
33707
|
+
onSignOutProp?.();
|
|
33708
|
+
eventBus.emit("UI:SIGN_OUT", {});
|
|
33709
|
+
};
|
|
33695
33710
|
const showSidebar = layoutMode === "sidebar" || isDrawer;
|
|
33696
33711
|
const showHeader = layoutMode !== "minimal";
|
|
33697
33712
|
const showBottomNav = layoutMode === "bottomnav";
|
|
@@ -33700,7 +33715,11 @@ var init_DashboardLayout = __esm({
|
|
|
33700
33715
|
Box,
|
|
33701
33716
|
{
|
|
33702
33717
|
ref: layoutRef,
|
|
33703
|
-
className:
|
|
33718
|
+
className: cn(
|
|
33719
|
+
"@container/dashboard w-full bg-background surface-page flex flex-row items-stretch",
|
|
33720
|
+
// A full-bleed shell is an app frame: viewport-bound, so a full-height child gets a real height.
|
|
33721
|
+
fullBleed ? "h-screen overflow-hidden" : "min-h-screen"
|
|
33722
|
+
),
|
|
33704
33723
|
children: [
|
|
33705
33724
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33706
33725
|
Button,
|
|
@@ -33804,7 +33823,7 @@ var init_DashboardLayout = __esm({
|
|
|
33804
33823
|
]
|
|
33805
33824
|
}
|
|
33806
33825
|
),
|
|
33807
|
-
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: "flex-1 min-w-0 min-h-screen", children: [
|
|
33826
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: cn("flex-1 min-w-0", fullBleed ? "h-full min-h-0" : "min-h-screen"), children: [
|
|
33808
33827
|
showHeader && /* @__PURE__ */ jsxRuntime.jsx(
|
|
33809
33828
|
Box,
|
|
33810
33829
|
{
|
|
@@ -34027,7 +34046,7 @@ var init_DashboardLayout = __esm({
|
|
|
34027
34046
|
id: "main-content",
|
|
34028
34047
|
tabIndex: -1,
|
|
34029
34048
|
className: cn(
|
|
34030
|
-
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",
|
|
34049
|
+
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",
|
|
34031
34050
|
// Reserve space for the fixed bottom nav so content isn't
|
|
34032
34051
|
// hidden under the tab bar.
|
|
34033
34052
|
showBottomNav && "pb-[calc(5rem+env(safe-area-inset-bottom))]"
|
|
@@ -44346,7 +44365,8 @@ var init_ar = __esm({
|
|
|
44346
44365
|
"avl.stateInitial": "\u0627\u0644\u0628\u062F\u0627\u064A\u0629",
|
|
44347
44366
|
"avl.stateTerminal": "\u0627\u0644\u0646\u0647\u0627\u064A\u0629",
|
|
44348
44367
|
"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.",
|
|
44349
|
-
"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."
|
|
44368
|
+
"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.",
|
|
44369
|
+
"aria.carousel": "\u0639\u0631\u0636 \u0634\u0631\u0627\u0626\u062D"
|
|
44350
44370
|
};
|
|
44351
44371
|
}
|
|
44352
44372
|
});
|
|
@@ -45608,7 +45628,8 @@ var init_sl = __esm({
|
|
|
45608
45628
|
"avl.stateInitial": "za\u010Detek",
|
|
45609
45629
|
"avl.stateTerminal": "konec",
|
|
45610
45630
|
"avl.guardCaption": "Prehod se zgodi le, ko je ta pogoj izpolnjen.",
|
|
45611
|
-
"avl.effectsCaption": "Kaj se izvede, po vrsti, ko se prehod zgodi."
|
|
45631
|
+
"avl.effectsCaption": "Kaj se izvede, po vrsti, ko se prehod zgodi.",
|
|
45632
|
+
"aria.carousel": "vrtiljak"
|
|
45612
45633
|
};
|
|
45613
45634
|
}
|
|
45614
45635
|
});
|
|
@@ -46876,6 +46897,18 @@ var init_circuitVerificationObserver = __esm({
|
|
|
46876
46897
|
init_verificationRegistry();
|
|
46877
46898
|
}
|
|
46878
46899
|
});
|
|
46900
|
+
|
|
46901
|
+
// lib/hostDispatchInView.ts
|
|
46902
|
+
function hostDispatchInView(request, response, owns) {
|
|
46903
|
+
if (request.targetTrait !== void 0 && owns(request.targetTrait)) return true;
|
|
46904
|
+
if (Object.keys(response.states).some(owns)) return true;
|
|
46905
|
+
if (Object.keys(response.entityByTrait ?? {}).some(owns)) return true;
|
|
46906
|
+
return (response.clientEffectsByTrait ?? []).some((e) => owns(e.traitName));
|
|
46907
|
+
}
|
|
46908
|
+
var init_hostDispatchInView = __esm({
|
|
46909
|
+
"lib/hostDispatchInView.ts"() {
|
|
46910
|
+
}
|
|
46911
|
+
});
|
|
46879
46912
|
function getTabClientId() {
|
|
46880
46913
|
if (tabClientId === void 0) tabClientId = crypto.randomUUID();
|
|
46881
46914
|
return tabClientId;
|
|
@@ -47200,6 +47233,9 @@ function readsI18n(value) {
|
|
|
47200
47233
|
const arr = value;
|
|
47201
47234
|
return arr[0] === "i18n/t" || arr.some((v) => readsI18n(v));
|
|
47202
47235
|
}
|
|
47236
|
+
if (value !== null && typeof value === "object" && !React99__namespace.default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function") {
|
|
47237
|
+
return Object.values(value).some((v) => readsI18n(v));
|
|
47238
|
+
}
|
|
47203
47239
|
return false;
|
|
47204
47240
|
}
|
|
47205
47241
|
function needsRenderContext(value) {
|
|
@@ -48159,7 +48195,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
48159
48195
|
if (!transport?.subscribeHostDispatches) return;
|
|
48160
48196
|
return transport.subscribeHostDispatches((_orbitalName, request, response) => {
|
|
48161
48197
|
const traitName = request.targetTrait;
|
|
48162
|
-
if (traitName === void 0 || !traitIndex.byName.has(
|
|
48198
|
+
if (traitName === void 0 || !hostDispatchInView(request, response, (t2) => traitIndex.byName.has(t2))) return;
|
|
48163
48199
|
const composedBefore = new Map(store.callsitePayloads);
|
|
48164
48200
|
void kernel.foldHostDispatch(request, response).then((outcome) => settleOutcome(traitName, request.event, request.payload, outcome, composedBefore));
|
|
48165
48201
|
}, { clientId: getTabClientId() });
|
|
@@ -48301,6 +48337,7 @@ var init_useTraitStateMachine = __esm({
|
|
|
48301
48337
|
init_traitRegistry();
|
|
48302
48338
|
init_verificationRegistry();
|
|
48303
48339
|
init_circuitVerificationObserver();
|
|
48340
|
+
init_hostDispatchInView();
|
|
48304
48341
|
init_useCircuitKernel();
|
|
48305
48342
|
init_useBusIngress();
|
|
48306
48343
|
init_useSlotFlush();
|
|
@@ -48729,6 +48766,11 @@ function NavigateListener({ onNavigate }) {
|
|
|
48729
48766
|
);
|
|
48730
48767
|
return null;
|
|
48731
48768
|
}
|
|
48769
|
+
function SignOutListener({ onSignOut }) {
|
|
48770
|
+
const bus = useEventBus();
|
|
48771
|
+
React99.useEffect(() => bus.on("UI:SIGN_OUT", () => onSignOut()), [bus, onSignOut]);
|
|
48772
|
+
return null;
|
|
48773
|
+
}
|
|
48732
48774
|
function OrbPreview({
|
|
48733
48775
|
schema,
|
|
48734
48776
|
mockData,
|
|
@@ -48749,7 +48791,8 @@ function OrbPreview({
|
|
|
48749
48791
|
lazyLoader,
|
|
48750
48792
|
schemaPath,
|
|
48751
48793
|
onUnmatchedNavigate,
|
|
48752
|
-
onSignIn
|
|
48794
|
+
onSignIn,
|
|
48795
|
+
onSignOut
|
|
48753
48796
|
}) {
|
|
48754
48797
|
if (serverUrl && transport) {
|
|
48755
48798
|
throw new Error("OrbPreview accepts serverUrl OR transport, not both");
|
|
@@ -49037,6 +49080,7 @@ function OrbPreview({
|
|
|
49037
49080
|
/* @__PURE__ */ jsxRuntime.jsx(NavStackRefBridge, { apiRef: navStackRef }),
|
|
49038
49081
|
/* @__PURE__ */ jsxRuntime.jsxs(providers.OrbitalProvider, { initialData: effectiveMockData, skipTheme: true, verification: true, isolated, user, children: [
|
|
49039
49082
|
/* @__PURE__ */ jsxRuntime.jsx(NavigateListener, { onNavigate: handleNavigate }),
|
|
49083
|
+
onSignOut !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(SignOutListener, { onSignOut }),
|
|
49040
49084
|
/* @__PURE__ */ jsxRuntime.jsx(context.UISlotProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
49041
49085
|
providers.PageAccessHost,
|
|
49042
49086
|
{
|
|
@@ -49378,6 +49422,10 @@ function entityNameOf(ref) {
|
|
|
49378
49422
|
if (typeof ref === "string") return ref;
|
|
49379
49423
|
return "name" in ref ? ref.name : void 0;
|
|
49380
49424
|
}
|
|
49425
|
+
function roleColors(role) {
|
|
49426
|
+
if (role === "default") return { border: "var(--color-border)", dot: STATE_COLORS.default.border };
|
|
49427
|
+
return { border: STATE_COLORS[role].border, dot: STATE_COLORS[role].border };
|
|
49428
|
+
}
|
|
49381
49429
|
function eventHandleStyle(source) {
|
|
49382
49430
|
const hint = Number.isFinite(source.positionHint) ? source.positionHint : 0.5;
|
|
49383
49431
|
if (hint !== source.positionHint) {
|
|
@@ -49686,7 +49734,7 @@ function parentBoxOf(el, container, zoom) {
|
|
|
49686
49734
|
function resolveLayoutAxis(el) {
|
|
49687
49735
|
return getComputedStyle(layoutBoxOf(el)).flexDirection === "row" ? "horizontal" : "vertical";
|
|
49688
49736
|
}
|
|
49689
|
-
var eventHandleLog, orbPreviewLog, ScreenSizeContext, CARD_MIN_WIDTH, CARD_MAX_WIDTH, PatternSelectionContext, CanvasToolsContext, CanvasStatePickerContext, CanvasVerifyContext, VERDICT_VARIANT,
|
|
49737
|
+
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;
|
|
49690
49738
|
var init_OrbPreviewNode = __esm({
|
|
49691
49739
|
"components/avl/molecules/OrbPreviewNode.tsx"() {
|
|
49692
49740
|
"use client";
|
|
@@ -49736,12 +49784,6 @@ var init_OrbPreviewNode = __esm({
|
|
|
49736
49784
|
stale: "warning",
|
|
49737
49785
|
running: "info"
|
|
49738
49786
|
};
|
|
49739
|
-
ROLE_COLORS = {
|
|
49740
|
-
initial: { border: STATE_COLORS.initial.border, dot: STATE_COLORS.initial.border },
|
|
49741
|
-
terminal: { border: STATE_COLORS.terminal.border, dot: STATE_COLORS.terminal.border },
|
|
49742
|
-
hub: { border: STATE_COLORS.hub.border, dot: STATE_COLORS.hub.border },
|
|
49743
|
-
default: { border: "var(--color-border)", dot: STATE_COLORS.default.border }
|
|
49744
|
-
};
|
|
49745
49787
|
LAYER_ORDER = ["Infrastructure", "Services", "UI Patterns", "Game", "ML", "Domain", "Community"];
|
|
49746
49788
|
LAYER_LABEL_KEYS = {
|
|
49747
49789
|
Infrastructure: "orbPreview.layer.infrastructure",
|
|
@@ -49812,7 +49854,7 @@ var init_OrbPreviewNode = __esm({
|
|
|
49812
49854
|
const [hoverRect, setHoverRect] = React99.useState(null);
|
|
49813
49855
|
const lastHoverElRef = React99.useRef(null);
|
|
49814
49856
|
const role = data.stateRole ?? "default";
|
|
49815
|
-
const colors =
|
|
49857
|
+
const colors = roleColors(role);
|
|
49816
49858
|
const eventSources = data.eventSources ?? [];
|
|
49817
49859
|
const layerColor = data.layer ? LAYER_COLORS[data.layer] : void 0;
|
|
49818
49860
|
const isExpanded = Boolean(data.traitName);
|
|
@@ -51552,7 +51594,7 @@ var init_TagInput = __esm({
|
|
|
51552
51594
|
TagInput.displayName = "TagInput";
|
|
51553
51595
|
}
|
|
51554
51596
|
});
|
|
51555
|
-
function
|
|
51597
|
+
function asString(v) {
|
|
51556
51598
|
return typeof v === "string" ? v : "";
|
|
51557
51599
|
}
|
|
51558
51600
|
function asNumberInput(v) {
|
|
@@ -52025,7 +52067,7 @@ function KnobField({
|
|
|
52025
52067
|
EnumRadio,
|
|
52026
52068
|
{
|
|
52027
52069
|
suggested,
|
|
52028
|
-
value:
|
|
52070
|
+
value: asString(value),
|
|
52029
52071
|
onChange: (v) => onChange(v),
|
|
52030
52072
|
placeholder: question.helpText
|
|
52031
52073
|
}
|
|
@@ -52063,7 +52105,7 @@ function KnobField({
|
|
|
52063
52105
|
Input,
|
|
52064
52106
|
{
|
|
52065
52107
|
placeholder: question.helpText ?? t("knobField.yourAnswer"),
|
|
52066
|
-
value:
|
|
52108
|
+
value: asString(value),
|
|
52067
52109
|
onChange: (e) => onChange(e.target.value)
|
|
52068
52110
|
}
|
|
52069
52111
|
);
|