@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/runtime/index.cjs
CHANGED
|
@@ -1598,7 +1598,8 @@ var init_en = __esm({
|
|
|
1598
1598
|
"avl.stateInitial": "start",
|
|
1599
1599
|
"avl.stateTerminal": "end",
|
|
1600
1600
|
"avl.guardCaption": "The transition only fires when this check is true.",
|
|
1601
|
-
"avl.effectsCaption": "What runs, in order, when the transition fires."
|
|
1601
|
+
"avl.effectsCaption": "What runs, in order, when the transition fires.",
|
|
1602
|
+
"aria.carousel": "carousel"
|
|
1602
1603
|
};
|
|
1603
1604
|
}
|
|
1604
1605
|
});
|
|
@@ -2972,7 +2973,8 @@ var init_ar = __esm({
|
|
|
2972
2973
|
"avl.stateInitial": "\u0627\u0644\u0628\u062F\u0627\u064A\u0629",
|
|
2973
2974
|
"avl.stateTerminal": "\u0627\u0644\u0646\u0647\u0627\u064A\u0629",
|
|
2974
2975
|
"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.",
|
|
2975
|
-
"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."
|
|
2976
|
+
"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.",
|
|
2977
|
+
"aria.carousel": "\u0639\u0631\u0636 \u0634\u0631\u0627\u0626\u062D"
|
|
2976
2978
|
};
|
|
2977
2979
|
}
|
|
2978
2980
|
});
|
|
@@ -4234,7 +4236,8 @@ var init_sl = __esm({
|
|
|
4234
4236
|
"avl.stateInitial": "za\u010Detek",
|
|
4235
4237
|
"avl.stateTerminal": "konec",
|
|
4236
4238
|
"avl.guardCaption": "Prehod se zgodi le, ko je ta pogoj izpolnjen.",
|
|
4237
|
-
"avl.effectsCaption": "Kaj se izvede, po vrsti, ko se prehod zgodi."
|
|
4239
|
+
"avl.effectsCaption": "Kaj se izvede, po vrsti, ko se prehod zgodi.",
|
|
4240
|
+
"aria.carousel": "vrtiljak"
|
|
4238
4241
|
};
|
|
4239
4242
|
}
|
|
4240
4243
|
});
|
|
@@ -4779,6 +4782,18 @@ var init_circuitVerificationObserver = __esm({
|
|
|
4779
4782
|
init_verificationRegistry();
|
|
4780
4783
|
}
|
|
4781
4784
|
});
|
|
4785
|
+
|
|
4786
|
+
// lib/hostDispatchInView.ts
|
|
4787
|
+
function hostDispatchInView(request, response, owns) {
|
|
4788
|
+
if (request.targetTrait !== void 0 && owns(request.targetTrait)) return true;
|
|
4789
|
+
if (Object.keys(response.states).some(owns)) return true;
|
|
4790
|
+
if (Object.keys(response.entityByTrait ?? {}).some(owns)) return true;
|
|
4791
|
+
return (response.clientEffectsByTrait ?? []).some((e) => owns(e.traitName));
|
|
4792
|
+
}
|
|
4793
|
+
var init_hostDispatchInView = __esm({
|
|
4794
|
+
"lib/hostDispatchInView.ts"() {
|
|
4795
|
+
}
|
|
4796
|
+
});
|
|
4782
4797
|
function getTabClientId() {
|
|
4783
4798
|
if (tabClientId === void 0) tabClientId = crypto.randomUUID();
|
|
4784
4799
|
return tabClientId;
|
|
@@ -8772,11 +8787,29 @@ var init_SvgBranch = __esm({
|
|
|
8772
8787
|
SvgBranch.displayName = "SvgBranch";
|
|
8773
8788
|
}
|
|
8774
8789
|
});
|
|
8790
|
+
|
|
8791
|
+
// lib/svgMotion.ts
|
|
8792
|
+
function svgMotionClass(motion, animated) {
|
|
8793
|
+
if (!animated || !isMotionEnabled()) return void 0;
|
|
8794
|
+
return SVG_MOTION_CLASSES[motion];
|
|
8795
|
+
}
|
|
8796
|
+
var SVG_MOTION_CLASSES;
|
|
8797
|
+
var init_svgMotion = __esm({
|
|
8798
|
+
"lib/svgMotion.ts"() {
|
|
8799
|
+
init_Presence();
|
|
8800
|
+
SVG_MOTION_CLASSES = {
|
|
8801
|
+
flowDash: "almadar-svg-flow-dash",
|
|
8802
|
+
pulseRing: "almadar-svg-pulse-ring",
|
|
8803
|
+
pulseExpand: "almadar-svg-pulse-expand"
|
|
8804
|
+
};
|
|
8805
|
+
}
|
|
8806
|
+
});
|
|
8775
8807
|
var SvgConnection;
|
|
8776
8808
|
var init_SvgConnection = __esm({
|
|
8777
8809
|
"components/core/atoms/svg/SvgConnection.tsx"() {
|
|
8778
8810
|
"use client";
|
|
8779
8811
|
init_domPassthrough();
|
|
8812
|
+
init_svgMotion();
|
|
8780
8813
|
SvgConnection = ({
|
|
8781
8814
|
x1 = 10,
|
|
8782
8815
|
y1 = 50,
|
|
@@ -8801,7 +8834,7 @@ var init_SvgConnection = __esm({
|
|
|
8801
8834
|
{
|
|
8802
8835
|
...asRoot ? void 0 : a11y,
|
|
8803
8836
|
className: [
|
|
8804
|
-
variant === "animated"
|
|
8837
|
+
svgMotionClass("flowDash", variant === "animated"),
|
|
8805
8838
|
className
|
|
8806
8839
|
].filter(Boolean).join(" ") || void 0,
|
|
8807
8840
|
x1,
|
|
@@ -8828,6 +8861,7 @@ var init_SvgFlow = __esm({
|
|
|
8828
8861
|
"components/core/atoms/svg/SvgFlow.tsx"() {
|
|
8829
8862
|
"use client";
|
|
8830
8863
|
init_domPassthrough();
|
|
8864
|
+
init_svgMotion();
|
|
8831
8865
|
flowIdCounter = 0;
|
|
8832
8866
|
DEFAULT_POINTS = [[10, 50], [50, 20], [90, 50]];
|
|
8833
8867
|
SvgFlow = ({
|
|
@@ -8875,7 +8909,7 @@ var init_SvgFlow = __esm({
|
|
|
8875
8909
|
strokeLinecap: "round",
|
|
8876
8910
|
strokeLinejoin: "round",
|
|
8877
8911
|
markerEnd: `url(#${markerId})`,
|
|
8878
|
-
className:
|
|
8912
|
+
className: svgMotionClass("flowDash", animated),
|
|
8879
8913
|
strokeDasharray: animated ? "8 6" : void 0
|
|
8880
8914
|
}
|
|
8881
8915
|
)
|
|
@@ -9309,6 +9343,7 @@ var init_SvgNode = __esm({
|
|
|
9309
9343
|
"components/core/atoms/svg/SvgNode.tsx"() {
|
|
9310
9344
|
"use client";
|
|
9311
9345
|
init_domPassthrough();
|
|
9346
|
+
init_svgMotion();
|
|
9312
9347
|
SvgNode = ({
|
|
9313
9348
|
x = 50,
|
|
9314
9349
|
y = 50,
|
|
@@ -9335,7 +9370,7 @@ var init_SvgNode = __esm({
|
|
|
9335
9370
|
stroke: color,
|
|
9336
9371
|
strokeWidth: 1,
|
|
9337
9372
|
opacity: 0.3,
|
|
9338
|
-
className: "
|
|
9373
|
+
className: svgMotionClass("pulseRing", true)
|
|
9339
9374
|
}
|
|
9340
9375
|
),
|
|
9341
9376
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9370,23 +9405,12 @@ var init_SvgNode = __esm({
|
|
|
9370
9405
|
SvgNode.displayName = "SvgNode";
|
|
9371
9406
|
}
|
|
9372
9407
|
});
|
|
9373
|
-
var
|
|
9408
|
+
var SvgPulse;
|
|
9374
9409
|
var init_SvgPulse = __esm({
|
|
9375
9410
|
"components/core/atoms/svg/SvgPulse.tsx"() {
|
|
9376
9411
|
"use client";
|
|
9377
9412
|
init_domPassthrough();
|
|
9378
|
-
|
|
9379
|
-
@keyframes almadar-svg-pulse-expand {
|
|
9380
|
-
0% {
|
|
9381
|
-
transform: scale(0.3);
|
|
9382
|
-
opacity: 0.4;
|
|
9383
|
-
}
|
|
9384
|
-
100% {
|
|
9385
|
-
transform: scale(1);
|
|
9386
|
-
opacity: 0;
|
|
9387
|
-
}
|
|
9388
|
-
}
|
|
9389
|
-
`;
|
|
9413
|
+
init_svgMotion();
|
|
9390
9414
|
SvgPulse = ({
|
|
9391
9415
|
cx = 70,
|
|
9392
9416
|
cy = 70,
|
|
@@ -9402,8 +9426,8 @@ var init_SvgPulse = __esm({
|
|
|
9402
9426
|
...rest
|
|
9403
9427
|
}) => {
|
|
9404
9428
|
const a11y = domPassthrough(rest);
|
|
9429
|
+
const pulseClass2 = svgMotionClass("pulseExpand", animated);
|
|
9405
9430
|
const inner = /* @__PURE__ */ jsxRuntime.jsxs("g", { ...asRoot ? void 0 : a11y, className, opacity, children: [
|
|
9406
|
-
animated && /* @__PURE__ */ jsxRuntime.jsx("style", { children: PULSE_KEYFRAMES }),
|
|
9407
9431
|
Array.from({ length: rings }).map((_, i) => {
|
|
9408
9432
|
const ringRadius = (i + 1) / rings * maxRadius;
|
|
9409
9433
|
const ringOpacity = 1 - i / rings * 0.6;
|
|
@@ -9417,11 +9441,9 @@ var init_SvgPulse = __esm({
|
|
|
9417
9441
|
fill: "none",
|
|
9418
9442
|
stroke: color,
|
|
9419
9443
|
strokeWidth: 1.5,
|
|
9420
|
-
opacity:
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
animation: `almadar-svg-pulse-expand 2s ease-out ${delay}s infinite`
|
|
9424
|
-
} : void 0
|
|
9444
|
+
opacity: pulseClass2 ? void 0 : ringOpacity * 0.4,
|
|
9445
|
+
className: pulseClass2,
|
|
9446
|
+
style: pulseClass2 ? { animationDelay: `${delay}s` } : void 0
|
|
9425
9447
|
},
|
|
9426
9448
|
i
|
|
9427
9449
|
);
|
|
@@ -18459,6 +18481,10 @@ function resolveCanvasTheme(scope) {
|
|
|
18459
18481
|
const c = r.color(toneVar(tone));
|
|
18460
18482
|
tones[tone] = c ? colorCss(c) : "currentColor";
|
|
18461
18483
|
}
|
|
18484
|
+
const surface = (name) => {
|
|
18485
|
+
const c = r.color(name);
|
|
18486
|
+
return c ? colorCss(c) : "transparent";
|
|
18487
|
+
};
|
|
18462
18488
|
const ground = r.color("--surface-diagram");
|
|
18463
18489
|
const text = {};
|
|
18464
18490
|
const TEXT_FALLBACK = { xs: 12, sm: 14, base: 16, lg: 18, xl: 20, "2xl": 24 };
|
|
@@ -18466,6 +18492,11 @@ function resolveCanvasTheme(scope) {
|
|
|
18466
18492
|
const body = r.family("--font-family-body", r.family("--font-family", "system-ui, sans-serif"));
|
|
18467
18493
|
return {
|
|
18468
18494
|
ground: ground ? colorCss(ground) : "transparent",
|
|
18495
|
+
surfaces: {
|
|
18496
|
+
muted: surface("--color-muted"),
|
|
18497
|
+
card: surface("--color-card"),
|
|
18498
|
+
onPrimary: surface("--color-primary-foreground")
|
|
18499
|
+
},
|
|
18469
18500
|
tones,
|
|
18470
18501
|
series: SERIES_TONES.map((t) => tones[t]),
|
|
18471
18502
|
strokes: {
|
|
@@ -23960,7 +23991,7 @@ var init_CodeBlock = __esm({
|
|
|
23960
23991
|
() => naturalTabs?.find((lang) => lang === pageLocale) ?? naturalTabs?.[0] ?? "en"
|
|
23961
23992
|
);
|
|
23962
23993
|
const activeNaturalLanguage = naturalTabs?.includes(naturalLanguage) === true ? naturalLanguage : naturalTabs?.[0] ?? "en";
|
|
23963
|
-
const codeDir = naturalTabs && i18n.
|
|
23994
|
+
const codeDir = naturalTabs && i18n.getVocabulary(activeNaturalLanguage).meta.rtl ? "rtl" : "ltr";
|
|
23964
23995
|
const translationCache = React98.useMemo(() => /* @__PURE__ */ new Map(), [englishCode, files]);
|
|
23965
23996
|
const translateFor = React98.useCallback(
|
|
23966
23997
|
(source, sourceLanguage, cacheKey) => {
|
|
@@ -23977,14 +24008,14 @@ var init_CodeBlock = __esm({
|
|
|
23977
24008
|
const code = translateFor(englishCode, language, "code");
|
|
23978
24009
|
const naturalTabItems = naturalTabs?.map((lang) => ({
|
|
23979
24010
|
id: `lang-${lang}`,
|
|
23980
|
-
label: i18n.
|
|
24011
|
+
label: i18n.getVocabulary(lang).meta.name,
|
|
23981
24012
|
content: null
|
|
23982
24013
|
}));
|
|
23983
24014
|
const naturalTabStrip = naturalTabs && naturalTabItems ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
23984
24015
|
Box,
|
|
23985
24016
|
{
|
|
23986
24017
|
className: "border-b border-border",
|
|
23987
|
-
dir: i18n.
|
|
24018
|
+
dir: i18n.getVocabulary(activeNaturalLanguage).meta.rtl ? "rtl" : "ltr",
|
|
23988
24019
|
"data-testid": "codeblock-language-tabs",
|
|
23989
24020
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
23990
24021
|
Tabs,
|
|
@@ -28073,10 +28104,10 @@ var init_AvlState = __esm({
|
|
|
28073
28104
|
}) => {
|
|
28074
28105
|
const width = computeWidth(explicitWidth, transitionCount);
|
|
28075
28106
|
const rx = height / 2;
|
|
28076
|
-
const
|
|
28077
|
-
const fillColor =
|
|
28078
|
-
const strokeColor =
|
|
28079
|
-
const textColor =
|
|
28107
|
+
const roleColors2 = role ? STATE_COLORS[role] : null;
|
|
28108
|
+
const fillColor = roleColors2 ? roleColors2.fill : "none";
|
|
28109
|
+
const strokeColor = roleColors2 ? roleColors2.border : color;
|
|
28110
|
+
const textColor = roleColors2 ? roleColors2.border : color;
|
|
28080
28111
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { className, opacity, transform: `translate(${x},${y})`, children: [
|
|
28081
28112
|
isInitial && /* @__PURE__ */ jsxRuntime.jsx(
|
|
28082
28113
|
"circle",
|
|
@@ -32074,18 +32105,30 @@ var init_Carousel = __esm({
|
|
|
32074
32105
|
loop = false,
|
|
32075
32106
|
slideChangeEvent,
|
|
32076
32107
|
slideChangePayload,
|
|
32108
|
+
orientation = "horizontal",
|
|
32109
|
+
fullHeight = false,
|
|
32110
|
+
loadMoreEvent,
|
|
32111
|
+
loadMoreAhead = 2,
|
|
32112
|
+
hasMore = false,
|
|
32113
|
+
isLoadingMore = false,
|
|
32077
32114
|
className,
|
|
32078
32115
|
...rest
|
|
32079
32116
|
}) => {
|
|
32117
|
+
const vertical = orientation === "vertical";
|
|
32118
|
+
const loadRequestedAt = React98.useRef(null);
|
|
32080
32119
|
const [activeIndex, setActiveIndex] = React98.useState(0);
|
|
32081
32120
|
const scrollRef = React98.useRef(null);
|
|
32121
|
+
const rootRef = React98.useRef(null);
|
|
32122
|
+
const [topOffset, setTopOffset] = React98.useState(0);
|
|
32082
32123
|
const autoPlayRef = React98.useRef(null);
|
|
32083
32124
|
const eventBus = useSafeEventBus3();
|
|
32084
32125
|
const { t } = hooks.useTranslate();
|
|
32085
32126
|
const safeItems = items ?? [];
|
|
32086
32127
|
const totalSlides = safeItems.length;
|
|
32128
|
+
const announcedIndex = React98.useRef(0);
|
|
32087
32129
|
const emitSlideChange = React98.useCallback(
|
|
32088
32130
|
(newIndex) => {
|
|
32131
|
+
announcedIndex.current = newIndex;
|
|
32089
32132
|
if (slideChangeEvent) {
|
|
32090
32133
|
eventBus.emit(`UI:${slideChangeEvent}`, {
|
|
32091
32134
|
index: newIndex,
|
|
@@ -32099,13 +32142,13 @@ var init_Carousel = __esm({
|
|
|
32099
32142
|
(index) => {
|
|
32100
32143
|
const container = scrollRef.current;
|
|
32101
32144
|
if (!container) return;
|
|
32102
|
-
const
|
|
32103
|
-
|
|
32104
|
-
|
|
32105
|
-
|
|
32106
|
-
});
|
|
32145
|
+
const reduceMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
32146
|
+
const behavior = reduceMotion ? "auto" : "smooth";
|
|
32147
|
+
if (typeof container.scrollTo !== "function") return;
|
|
32148
|
+
if (vertical) container.scrollTo({ top: container.offsetHeight * index, behavior });
|
|
32149
|
+
else container.scrollTo({ left: container.offsetWidth * index, behavior });
|
|
32107
32150
|
},
|
|
32108
|
-
[]
|
|
32151
|
+
[vertical]
|
|
32109
32152
|
);
|
|
32110
32153
|
const goToSlide = React98.useCallback(
|
|
32111
32154
|
(index) => {
|
|
@@ -32129,10 +32172,7 @@ var init_Carousel = __esm({
|
|
|
32129
32172
|
goToSlide(activeIndex - 1);
|
|
32130
32173
|
}, [goToSlide, activeIndex]);
|
|
32131
32174
|
const swipeHandlers = useSwipeGesture(
|
|
32132
|
-
{
|
|
32133
|
-
onSwipeLeft: goNext,
|
|
32134
|
-
onSwipeRight: goPrev
|
|
32135
|
-
},
|
|
32175
|
+
vertical ? { onSwipeUp: goNext, onSwipeDown: goPrev } : { onSwipeLeft: goNext, onSwipeRight: goPrev },
|
|
32136
32176
|
{ threshold: 40 }
|
|
32137
32177
|
);
|
|
32138
32178
|
React98.useEffect(() => {
|
|
@@ -32157,138 +32197,189 @@ var init_Carousel = __esm({
|
|
|
32157
32197
|
const handleScroll = React98.useCallback(() => {
|
|
32158
32198
|
const container = scrollRef.current;
|
|
32159
32199
|
if (!container) return;
|
|
32160
|
-
const
|
|
32161
|
-
if (
|
|
32162
|
-
const
|
|
32163
|
-
|
|
32164
|
-
|
|
32165
|
-
|
|
32200
|
+
const slideSize = vertical ? container.offsetHeight : container.offsetWidth;
|
|
32201
|
+
if (slideSize === 0) return;
|
|
32202
|
+
const position = vertical ? container.scrollTop : container.scrollLeft;
|
|
32203
|
+
const newIndex = Math.round(position / slideSize);
|
|
32204
|
+
if (newIndex < 0 || newIndex >= totalSlides) return;
|
|
32205
|
+
setActiveIndex(newIndex);
|
|
32206
|
+
if (Math.abs(position - newIndex * slideSize) <= 1 && newIndex !== announcedIndex.current) {
|
|
32207
|
+
emitSlideChange(newIndex);
|
|
32208
|
+
}
|
|
32209
|
+
}, [totalSlides, vertical, emitSlideChange]);
|
|
32210
|
+
React98.useEffect(() => {
|
|
32211
|
+
if (!loadMoreEvent || !hasMore || isLoadingMore || totalSlides === 0) return;
|
|
32212
|
+
if (activeIndex < totalSlides - 1 - loadMoreAhead) return;
|
|
32213
|
+
if (loadRequestedAt.current === totalSlides) return;
|
|
32214
|
+
loadRequestedAt.current = totalSlides;
|
|
32215
|
+
eventBus.emit(`UI:${loadMoreEvent}`, { index: activeIndex });
|
|
32216
|
+
}, [activeIndex, totalSlides, loadMoreEvent, hasMore, isLoadingMore, loadMoreAhead, eventBus]);
|
|
32217
|
+
const viewportBound = vertical && fullHeight;
|
|
32218
|
+
React98.useLayoutEffect(() => {
|
|
32219
|
+
if (!viewportBound || typeof window === "undefined") return;
|
|
32220
|
+
const measure = () => {
|
|
32221
|
+
const root = rootRef.current;
|
|
32222
|
+
if (root) setTopOffset(Math.max(0, Math.round(root.getBoundingClientRect().top)));
|
|
32223
|
+
};
|
|
32224
|
+
measure();
|
|
32225
|
+
window.addEventListener("resize", measure);
|
|
32226
|
+
return () => window.removeEventListener("resize", measure);
|
|
32227
|
+
}, [viewportBound]);
|
|
32228
|
+
const handleKeyDown = React98.useCallback(
|
|
32229
|
+
(e) => {
|
|
32230
|
+
const next = vertical ? ["ArrowDown", "PageDown"] : ["ArrowRight"];
|
|
32231
|
+
const prev = vertical ? ["ArrowUp", "PageUp"] : ["ArrowLeft"];
|
|
32232
|
+
if (next.includes(e.key)) {
|
|
32233
|
+
e.preventDefault();
|
|
32234
|
+
goNext();
|
|
32235
|
+
} else if (prev.includes(e.key)) {
|
|
32236
|
+
e.preventDefault();
|
|
32237
|
+
goPrev();
|
|
32166
32238
|
}
|
|
32167
|
-
|
|
32168
|
-
|
|
32169
|
-
|
|
32239
|
+
},
|
|
32240
|
+
[vertical, goNext, goPrev]
|
|
32241
|
+
);
|
|
32170
32242
|
const hasPrev = loop || activeIndex > 0;
|
|
32171
32243
|
const hasNext = loop || activeIndex < totalSlides - 1;
|
|
32172
32244
|
if (totalSlides === 0) return null;
|
|
32173
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32174
|
-
|
|
32175
|
-
|
|
32176
|
-
|
|
32177
|
-
|
|
32178
|
-
|
|
32179
|
-
|
|
32180
|
-
|
|
32181
|
-
|
|
32182
|
-
|
|
32183
|
-
|
|
32184
|
-
|
|
32185
|
-
|
|
32186
|
-
|
|
32187
|
-
|
|
32188
|
-
style: {
|
|
32189
|
-
scrollSnapType: "x mandatory",
|
|
32190
|
-
WebkitOverflowScrolling: "touch"
|
|
32191
|
-
},
|
|
32192
|
-
onScroll: handleScroll,
|
|
32193
|
-
onPointerDown: swipeHandlers.onPointerDown,
|
|
32194
|
-
onPointerMove: swipeHandlers.onPointerMove,
|
|
32195
|
-
onPointerUp: swipeHandlers.onPointerUp,
|
|
32196
|
-
onPointerCancel: swipeHandlers.onPointerCancel,
|
|
32197
|
-
children: safeItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
32245
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32246
|
+
Box,
|
|
32247
|
+
{
|
|
32248
|
+
position: "relative",
|
|
32249
|
+
overflow: "hidden",
|
|
32250
|
+
role: "region",
|
|
32251
|
+
"aria-roledescription": t("aria.carousel"),
|
|
32252
|
+
tabIndex: 0,
|
|
32253
|
+
onKeyDown: handleKeyDown,
|
|
32254
|
+
...domPassthrough(rest),
|
|
32255
|
+
ref: rootRef,
|
|
32256
|
+
className: cn("w-full", fullHeight && !viewportBound && "h-full", className),
|
|
32257
|
+
style: viewportBound ? { height: `calc(100svh - ${topOffset}px)` } : void 0,
|
|
32258
|
+
children: [
|
|
32259
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32198
32260
|
Box,
|
|
32199
32261
|
{
|
|
32262
|
+
ref: scrollRef,
|
|
32263
|
+
display: "flex",
|
|
32264
|
+
overflow: "auto",
|
|
32200
32265
|
className: cn(
|
|
32201
|
-
"
|
|
32202
|
-
"
|
|
32266
|
+
"w-full",
|
|
32267
|
+
"scroll-smooth",
|
|
32268
|
+
"scrollbar-none",
|
|
32269
|
+
vertical ? "[scroll-snap-type:y_mandatory]" : "[scroll-snap-type:x_mandatory]",
|
|
32270
|
+
"[&::-webkit-scrollbar]:hidden",
|
|
32271
|
+
"[-ms-overflow-style:none]"
|
|
32203
32272
|
),
|
|
32204
32273
|
style: {
|
|
32205
|
-
|
|
32274
|
+
flexDirection: vertical ? "column" : "row",
|
|
32275
|
+
scrollSnapType: vertical ? "y mandatory" : "x mandatory",
|
|
32276
|
+
height: fullHeight ? "100%" : void 0,
|
|
32277
|
+
WebkitOverflowScrolling: "touch"
|
|
32206
32278
|
},
|
|
32207
|
-
|
|
32208
|
-
|
|
32209
|
-
|
|
32210
|
-
|
|
32211
|
-
|
|
32212
|
-
|
|
32213
|
-
|
|
32214
|
-
|
|
32215
|
-
|
|
32216
|
-
|
|
32217
|
-
|
|
32218
|
-
|
|
32219
|
-
|
|
32279
|
+
onScroll: handleScroll,
|
|
32280
|
+
onPointerDown: swipeHandlers.onPointerDown,
|
|
32281
|
+
onPointerMove: swipeHandlers.onPointerMove,
|
|
32282
|
+
onPointerUp: swipeHandlers.onPointerUp,
|
|
32283
|
+
onPointerCancel: swipeHandlers.onPointerCancel,
|
|
32284
|
+
children: safeItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
32285
|
+
Box,
|
|
32286
|
+
{
|
|
32287
|
+
className: cn(
|
|
32288
|
+
"flex-shrink-0 w-full",
|
|
32289
|
+
"[scroll-snap-align:start]"
|
|
32290
|
+
),
|
|
32291
|
+
style: {
|
|
32292
|
+
scrollSnapAlign: "start",
|
|
32293
|
+
scrollSnapStop: vertical ? "always" : void 0,
|
|
32294
|
+
height: fullHeight ? "100%" : void 0
|
|
32295
|
+
},
|
|
32296
|
+
children: (renderItem ?? children)?.(item, index)
|
|
32297
|
+
},
|
|
32298
|
+
index
|
|
32299
|
+
))
|
|
32300
|
+
}
|
|
32301
|
+
),
|
|
32302
|
+
showArrows && hasPrev && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
32303
|
+
Box,
|
|
32220
32304
|
{
|
|
32221
|
-
|
|
32222
|
-
|
|
32223
|
-
|
|
32224
|
-
|
|
32225
|
-
|
|
32226
|
-
|
|
32227
|
-
|
|
32228
|
-
|
|
32229
|
-
|
|
32230
|
-
|
|
32231
|
-
|
|
32232
|
-
|
|
32305
|
+
position: "absolute",
|
|
32306
|
+
className: vertical ? "right-2 top-2 z-10" : "left-2 top-1/2 -translate-y-1/2 z-10",
|
|
32307
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32308
|
+
Button,
|
|
32309
|
+
{
|
|
32310
|
+
variant: "ghost",
|
|
32311
|
+
size: "sm",
|
|
32312
|
+
onClick: goPrev,
|
|
32313
|
+
"aria-label": t("aria.previousSlide"),
|
|
32314
|
+
className: cn(
|
|
32315
|
+
"rounded-full",
|
|
32316
|
+
"bg-surface/80",
|
|
32317
|
+
"backdrop-blur-sm",
|
|
32318
|
+
"shadow-elevation-interactive",
|
|
32319
|
+
"hover:bg-surface"
|
|
32320
|
+
),
|
|
32321
|
+
children: vertical ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronUp, { className: "w-5 h-5" }) : /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronLeft, { className: "w-5 h-5" })
|
|
32322
|
+
}
|
|
32323
|
+
)
|
|
32233
32324
|
}
|
|
32234
|
-
)
|
|
32235
|
-
|
|
32236
|
-
|
|
32237
|
-
showArrows && hasNext && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
32238
|
-
Box,
|
|
32239
|
-
{
|
|
32240
|
-
position: "absolute",
|
|
32241
|
-
className: "right-2 top-1/2 -translate-y-1/2 z-10",
|
|
32242
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32243
|
-
Button,
|
|
32325
|
+
),
|
|
32326
|
+
showArrows && hasNext && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
32327
|
+
Box,
|
|
32244
32328
|
{
|
|
32245
|
-
|
|
32246
|
-
|
|
32247
|
-
|
|
32248
|
-
|
|
32249
|
-
|
|
32250
|
-
|
|
32251
|
-
|
|
32252
|
-
|
|
32253
|
-
|
|
32254
|
-
|
|
32255
|
-
|
|
32256
|
-
|
|
32329
|
+
position: "absolute",
|
|
32330
|
+
className: vertical ? "right-2 bottom-2 z-10" : "right-2 top-1/2 -translate-y-1/2 z-10",
|
|
32331
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32332
|
+
Button,
|
|
32333
|
+
{
|
|
32334
|
+
variant: "ghost",
|
|
32335
|
+
size: "sm",
|
|
32336
|
+
onClick: goNext,
|
|
32337
|
+
"aria-label": t("aria.nextSlide"),
|
|
32338
|
+
className: cn(
|
|
32339
|
+
"rounded-full",
|
|
32340
|
+
"bg-surface/80",
|
|
32341
|
+
"backdrop-blur-sm",
|
|
32342
|
+
"shadow-elevation-interactive",
|
|
32343
|
+
"hover:bg-surface"
|
|
32344
|
+
),
|
|
32345
|
+
children: vertical ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronDown, { className: "w-5 h-5" }) : /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ChevronRight, { className: "w-5 h-5" })
|
|
32346
|
+
}
|
|
32347
|
+
)
|
|
32348
|
+
}
|
|
32349
|
+
),
|
|
32350
|
+
showDots && totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
32351
|
+
Box,
|
|
32352
|
+
{
|
|
32353
|
+
position: "absolute",
|
|
32354
|
+
className: "bottom-3 left-0 right-0 z-10",
|
|
32355
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "xs", align: "center", justify: "center", role: "tablist", "aria-label": t("aria.carouselSlides"), children: safeItems.map((_, index) => {
|
|
32356
|
+
const isActive = index === activeIndex;
|
|
32357
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32358
|
+
Box,
|
|
32359
|
+
{
|
|
32360
|
+
className: cn(
|
|
32361
|
+
"rounded-full cursor-pointer transition-all duration-fast"
|
|
32362
|
+
),
|
|
32363
|
+
style: {
|
|
32364
|
+
width: isActive ? 10 : 8,
|
|
32365
|
+
height: isActive ? 10 : 8,
|
|
32366
|
+
backgroundColor: isActive ? "var(--color-primary)" : "var(--color-muted, #d4d4d8)",
|
|
32367
|
+
opacity: isActive ? 1 : 0.6
|
|
32368
|
+
},
|
|
32369
|
+
...pressableProps(() => goToSlide(index)),
|
|
32370
|
+
role: "tab",
|
|
32371
|
+
"aria-selected": isActive,
|
|
32372
|
+
tabIndex: isActive ? 0 : -1,
|
|
32373
|
+
"aria-label": t("carousel.goToSlide", { number: index + 1 })
|
|
32374
|
+
},
|
|
32375
|
+
index
|
|
32376
|
+
);
|
|
32377
|
+
}) })
|
|
32257
32378
|
}
|
|
32258
32379
|
)
|
|
32259
|
-
|
|
32260
|
-
|
|
32261
|
-
|
|
32262
|
-
Box,
|
|
32263
|
-
{
|
|
32264
|
-
position: "absolute",
|
|
32265
|
-
className: "bottom-3 left-0 right-0 z-10",
|
|
32266
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "xs", align: "center", justify: "center", role: "tablist", "aria-label": t("aria.carouselSlides"), children: safeItems.map((_, index) => {
|
|
32267
|
-
const isActive = index === activeIndex;
|
|
32268
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32269
|
-
Box,
|
|
32270
|
-
{
|
|
32271
|
-
className: cn(
|
|
32272
|
-
"rounded-full cursor-pointer transition-all duration-fast"
|
|
32273
|
-
),
|
|
32274
|
-
style: {
|
|
32275
|
-
width: isActive ? 10 : 8,
|
|
32276
|
-
height: isActive ? 10 : 8,
|
|
32277
|
-
backgroundColor: isActive ? "var(--color-primary)" : "var(--color-muted, #d4d4d8)",
|
|
32278
|
-
opacity: isActive ? 1 : 0.6
|
|
32279
|
-
},
|
|
32280
|
-
...pressableProps(() => goToSlide(index)),
|
|
32281
|
-
role: "tab",
|
|
32282
|
-
"aria-selected": isActive,
|
|
32283
|
-
tabIndex: isActive ? 0 : -1,
|
|
32284
|
-
"aria-label": t("carousel.goToSlide", { number: index + 1 })
|
|
32285
|
-
},
|
|
32286
|
-
index
|
|
32287
|
-
);
|
|
32288
|
-
}) })
|
|
32289
|
-
}
|
|
32290
|
-
)
|
|
32291
|
-
] });
|
|
32380
|
+
]
|
|
32381
|
+
}
|
|
32382
|
+
);
|
|
32292
32383
|
};
|
|
32293
32384
|
Carousel.displayName = "Carousel";
|
|
32294
32385
|
}
|
|
@@ -33296,59 +33387,10 @@ var init_ChartLegend = __esm({
|
|
|
33296
33387
|
});
|
|
33297
33388
|
|
|
33298
33389
|
// components/core/organisms/trace-edit-focus.ts
|
|
33299
|
-
|
|
33300
|
-
return typeof v === "string" ? v : void 0;
|
|
33301
|
-
}
|
|
33302
|
-
function asLevel(v) {
|
|
33303
|
-
if (typeof v === "string" && EDIT_FOCUS_LEVELS.has(v)) {
|
|
33304
|
-
return v;
|
|
33305
|
-
}
|
|
33306
|
-
return "node";
|
|
33307
|
-
}
|
|
33308
|
-
function isEventPayload(v) {
|
|
33309
|
-
return v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v) && !(v instanceof Date);
|
|
33310
|
-
}
|
|
33311
|
-
function parseEditFocus(value) {
|
|
33312
|
-
if (!isEventPayload(value)) return null;
|
|
33313
|
-
const payload = value;
|
|
33314
|
-
const orbital = asString(payload.orbital);
|
|
33315
|
-
if (orbital === void 0 || orbital.length === 0) return null;
|
|
33316
|
-
const focus = {
|
|
33317
|
-
level: asLevel(payload.level),
|
|
33318
|
-
orbital,
|
|
33319
|
-
label: asString(payload.label) ?? orbital
|
|
33320
|
-
};
|
|
33321
|
-
const trait = asString(payload.trait);
|
|
33322
|
-
if (trait !== void 0) focus.trait = trait;
|
|
33323
|
-
const transition = asString(payload.transition);
|
|
33324
|
-
if (transition !== void 0) focus.transition = transition;
|
|
33325
|
-
const state = asString(payload.state);
|
|
33326
|
-
if (state !== void 0) focus.state = state;
|
|
33327
|
-
const slot = asString(payload.slot);
|
|
33328
|
-
if (slot !== void 0) focus.slot = slot;
|
|
33329
|
-
const path = asString(payload.path);
|
|
33330
|
-
if (path !== void 0) focus.path = path;
|
|
33331
|
-
const patternType = asString(payload.patternType);
|
|
33332
|
-
if (patternType !== void 0) focus.patternType = patternType;
|
|
33333
|
-
const entity = asString(payload.entity);
|
|
33334
|
-
if (entity !== void 0) focus.entity = entity;
|
|
33335
|
-
const source = asString(payload.source);
|
|
33336
|
-
if (source !== void 0) focus.source = source;
|
|
33337
|
-
return focus;
|
|
33338
|
-
}
|
|
33339
|
-
var ELEMENT_SELECTED_EVENT, EDIT_FOCUS_LEVELS;
|
|
33390
|
+
var ELEMENT_SELECTED_EVENT;
|
|
33340
33391
|
var init_trace_edit_focus = __esm({
|
|
33341
33392
|
"components/core/organisms/trace-edit-focus.ts"() {
|
|
33342
33393
|
ELEMENT_SELECTED_EVENT = "UI:ELEMENT_SELECTED";
|
|
33343
|
-
EDIT_FOCUS_LEVELS = /* @__PURE__ */ new Set([
|
|
33344
|
-
"node",
|
|
33345
|
-
"slot",
|
|
33346
|
-
"field",
|
|
33347
|
-
"effect",
|
|
33348
|
-
"trait",
|
|
33349
|
-
"page",
|
|
33350
|
-
"orbital"
|
|
33351
|
-
]);
|
|
33352
33394
|
}
|
|
33353
33395
|
});
|
|
33354
33396
|
function getJepaBadgeVariant(probability) {
|
|
@@ -33364,6 +33406,8 @@ function ChatBar({
|
|
|
33364
33406
|
placeholder,
|
|
33365
33407
|
context,
|
|
33366
33408
|
sendEvent = "CHAT_SEND",
|
|
33409
|
+
focusRequest,
|
|
33410
|
+
editFocus,
|
|
33367
33411
|
className,
|
|
33368
33412
|
...rest
|
|
33369
33413
|
}) {
|
|
@@ -33372,7 +33416,14 @@ function ChatBar({
|
|
|
33372
33416
|
const [inputValue, setInputValue] = React98.useState("");
|
|
33373
33417
|
const inputRef = React98.useRef(null);
|
|
33374
33418
|
const [requestedPlaceholder, setRequestedPlaceholder] = React98.useState(null);
|
|
33375
|
-
const
|
|
33419
|
+
const focus = editFocus ?? null;
|
|
33420
|
+
const requestId = focusRequest?.id;
|
|
33421
|
+
const requestPlaceholder = focusRequest?.placeholder;
|
|
33422
|
+
React98.useEffect(() => {
|
|
33423
|
+
if (requestId === void 0) return;
|
|
33424
|
+
if (requestPlaceholder !== void 0 && requestPlaceholder.length > 0) setRequestedPlaceholder(requestPlaceholder);
|
|
33425
|
+
inputRef.current?.focus();
|
|
33426
|
+
}, [requestId, requestPlaceholder]);
|
|
33376
33427
|
React98.useLayoutEffect(() => {
|
|
33377
33428
|
const el = inputRef.current;
|
|
33378
33429
|
if (!el) return;
|
|
@@ -33382,36 +33433,21 @@ function ChatBar({
|
|
|
33382
33433
|
el.style.overflowY = el.scrollHeight > INPUT_MAX_HEIGHT_PX ? "auto" : "hidden";
|
|
33383
33434
|
}, [inputValue]);
|
|
33384
33435
|
const clearFocus = React98.useCallback(() => {
|
|
33385
|
-
setFocus(null);
|
|
33386
33436
|
eventBus.emit(ELEMENT_SELECTED_EVENT, { focus: null });
|
|
33387
33437
|
}, [eventBus]);
|
|
33438
|
+
const clearSent = React98.useCallback(() => {
|
|
33439
|
+
setInputValue("");
|
|
33440
|
+
setRequestedPlaceholder(null);
|
|
33441
|
+
}, []);
|
|
33388
33442
|
const handleKeyDown = React98.useCallback((e) => {
|
|
33389
33443
|
if (e.key !== "Enter" || e.shiftKey) return;
|
|
33390
33444
|
const trimmed = inputValue.trim();
|
|
33391
33445
|
if (!trimmed) return;
|
|
33392
33446
|
e.preventDefault();
|
|
33393
33447
|
eventBus.emit(`UI:${sendEvent}`, { message: trimmed });
|
|
33394
|
-
|
|
33395
|
-
|
|
33396
|
-
|
|
33397
|
-
setInputValue("");
|
|
33398
|
-
setFocus(null);
|
|
33399
|
-
setRequestedPlaceholder(null);
|
|
33400
|
-
});
|
|
33401
|
-
const unsubFocus = eventBus.on("UI:CHAT_FOCUS", (e) => {
|
|
33402
|
-
const hint = e.payload?.placeholder;
|
|
33403
|
-
if (typeof hint === "string" && hint.length > 0) setRequestedPlaceholder(hint);
|
|
33404
|
-
inputRef.current?.focus();
|
|
33405
|
-
});
|
|
33406
|
-
const unsubSelect = eventBus.on(ELEMENT_SELECTED_EVENT, (e) => {
|
|
33407
|
-
setFocus(parseEditFocus(e.payload?.focus));
|
|
33408
|
-
});
|
|
33409
|
-
return () => {
|
|
33410
|
-
unsubSend();
|
|
33411
|
-
unsubFocus();
|
|
33412
|
-
unsubSelect();
|
|
33413
|
-
};
|
|
33414
|
-
}, [eventBus, sendEvent]);
|
|
33448
|
+
clearSent();
|
|
33449
|
+
}, [inputValue, eventBus, sendEvent, clearSent]);
|
|
33450
|
+
React98.useEffect(() => eventBus.on(`UI:${sendEvent}`, clearSent), [eventBus, sendEvent, clearSent]);
|
|
33415
33451
|
const trailingAction = status === "error" ? /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "secondary", size: "sm", action: "RETRY_GENERATION", className: "rounded-none flex-shrink-0 h-auto", children: [
|
|
33416
33452
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "refresh-cw", size: "xs" }),
|
|
33417
33453
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", children: t("openFile.retry") })
|
|
@@ -33458,6 +33494,7 @@ function ChatBar({
|
|
|
33458
33494
|
size: "sm",
|
|
33459
33495
|
action: sendEvent,
|
|
33460
33496
|
actionPayload: { message: inputValue.trim() },
|
|
33497
|
+
onClick: clearSent,
|
|
33461
33498
|
disabled: !inputValue.trim(),
|
|
33462
33499
|
"aria-label": t("chatBar.sendMessage"),
|
|
33463
33500
|
className: "rounded-none flex-shrink-0 h-auto",
|
|
@@ -35676,16 +35713,6 @@ var init_TopNavItem = __esm({
|
|
|
35676
35713
|
TopNavItem.displayName = "TopNavItem";
|
|
35677
35714
|
}
|
|
35678
35715
|
});
|
|
35679
|
-
|
|
35680
|
-
// hooks/useAuthContext.ts
|
|
35681
|
-
function useAuthContext() {
|
|
35682
|
-
return {
|
|
35683
|
-
user: null,
|
|
35684
|
-
loading: false,
|
|
35685
|
-
signIn: void 0,
|
|
35686
|
-
signOut: void 0
|
|
35687
|
-
};
|
|
35688
|
-
}
|
|
35689
35716
|
var init_useAuthContext = __esm({
|
|
35690
35717
|
"hooks/useAuthContext.ts"() {
|
|
35691
35718
|
}
|
|
@@ -36253,9 +36280,11 @@ var init_DashboardLayout = __esm({
|
|
|
36253
36280
|
React98.useEffect(() => {
|
|
36254
36281
|
registerNavItems(navItems);
|
|
36255
36282
|
}, [navItems, registerNavItems]);
|
|
36256
|
-
const { signOut: authSignOut } = useAuthContext();
|
|
36257
36283
|
const user = userProp || (null);
|
|
36258
|
-
const handleSignOut =
|
|
36284
|
+
const handleSignOut = () => {
|
|
36285
|
+
onSignOutProp?.();
|
|
36286
|
+
eventBus.emit("UI:SIGN_OUT", {});
|
|
36287
|
+
};
|
|
36259
36288
|
const showSidebar = layoutMode === "sidebar" || isDrawer;
|
|
36260
36289
|
const showHeader = layoutMode !== "minimal";
|
|
36261
36290
|
const showBottomNav = layoutMode === "bottomnav";
|
|
@@ -36264,7 +36293,11 @@ var init_DashboardLayout = __esm({
|
|
|
36264
36293
|
Box,
|
|
36265
36294
|
{
|
|
36266
36295
|
ref: layoutRef,
|
|
36267
|
-
className:
|
|
36296
|
+
className: cn(
|
|
36297
|
+
"@container/dashboard w-full bg-background surface-page flex flex-row items-stretch",
|
|
36298
|
+
// A full-bleed shell is an app frame: viewport-bound, so a full-height child gets a real height.
|
|
36299
|
+
fullBleed ? "h-screen overflow-hidden" : "min-h-screen"
|
|
36300
|
+
),
|
|
36268
36301
|
children: [
|
|
36269
36302
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36270
36303
|
Button,
|
|
@@ -36368,7 +36401,7 @@ var init_DashboardLayout = __esm({
|
|
|
36368
36401
|
]
|
|
36369
36402
|
}
|
|
36370
36403
|
),
|
|
36371
|
-
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: "flex-1 min-w-0 min-h-screen", children: [
|
|
36404
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: cn("flex-1 min-w-0", fullBleed ? "h-full min-h-0" : "min-h-screen"), children: [
|
|
36372
36405
|
showHeader && /* @__PURE__ */ jsxRuntime.jsx(
|
|
36373
36406
|
Box,
|
|
36374
36407
|
{
|
|
@@ -36591,7 +36624,7 @@ var init_DashboardLayout = __esm({
|
|
|
36591
36624
|
id: "main-content",
|
|
36592
36625
|
tabIndex: -1,
|
|
36593
36626
|
className: cn(
|
|
36594
|
-
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",
|
|
36627
|
+
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",
|
|
36595
36628
|
// Reserve space for the fixed bottom nav so content isn't
|
|
36596
36629
|
// hidden under the tab bar.
|
|
36597
36630
|
showBottomNav && "pb-[calc(5rem+env(safe-area-inset-bottom))]"
|
|
@@ -47164,6 +47197,11 @@ function NavigateListener({ onNavigate }) {
|
|
|
47164
47197
|
);
|
|
47165
47198
|
return null;
|
|
47166
47199
|
}
|
|
47200
|
+
function SignOutListener({ onSignOut }) {
|
|
47201
|
+
const bus = useEventBus();
|
|
47202
|
+
React98.useEffect(() => bus.on("UI:SIGN_OUT", () => onSignOut()), [bus, onSignOut]);
|
|
47203
|
+
return null;
|
|
47204
|
+
}
|
|
47167
47205
|
function OrbPreview({
|
|
47168
47206
|
schema,
|
|
47169
47207
|
mockData,
|
|
@@ -47184,7 +47222,8 @@ function OrbPreview({
|
|
|
47184
47222
|
lazyLoader,
|
|
47185
47223
|
schemaPath,
|
|
47186
47224
|
onUnmatchedNavigate,
|
|
47187
|
-
onSignIn
|
|
47225
|
+
onSignIn,
|
|
47226
|
+
onSignOut
|
|
47188
47227
|
}) {
|
|
47189
47228
|
if (serverUrl && transport) {
|
|
47190
47229
|
throw new Error("OrbPreview accepts serverUrl OR transport, not both");
|
|
@@ -47472,6 +47511,7 @@ function OrbPreview({
|
|
|
47472
47511
|
/* @__PURE__ */ jsxRuntime.jsx(NavStackRefBridge, { apiRef: navStackRef }),
|
|
47473
47512
|
/* @__PURE__ */ jsxRuntime.jsxs(providers.OrbitalProvider, { initialData: effectiveMockData, skipTheme: true, verification: true, isolated, user, children: [
|
|
47474
47513
|
/* @__PURE__ */ jsxRuntime.jsx(NavigateListener, { onNavigate: handleNavigate }),
|
|
47514
|
+
onSignOut !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(SignOutListener, { onSignOut }),
|
|
47475
47515
|
/* @__PURE__ */ jsxRuntime.jsx(context.UISlotProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
47476
47516
|
providers.PageAccessHost,
|
|
47477
47517
|
{
|
|
@@ -47813,6 +47853,10 @@ function entityNameOf(ref) {
|
|
|
47813
47853
|
if (typeof ref === "string") return ref;
|
|
47814
47854
|
return "name" in ref ? ref.name : void 0;
|
|
47815
47855
|
}
|
|
47856
|
+
function roleColors(role) {
|
|
47857
|
+
if (role === "default") return { border: "var(--color-border)", dot: STATE_COLORS.default.border };
|
|
47858
|
+
return { border: STATE_COLORS[role].border, dot: STATE_COLORS[role].border };
|
|
47859
|
+
}
|
|
47816
47860
|
function eventHandleStyle(source) {
|
|
47817
47861
|
const hint = Number.isFinite(source.positionHint) ? source.positionHint : 0.5;
|
|
47818
47862
|
if (hint !== source.positionHint) {
|
|
@@ -48121,7 +48165,7 @@ function parentBoxOf(el, container, zoom) {
|
|
|
48121
48165
|
function resolveLayoutAxis(el) {
|
|
48122
48166
|
return getComputedStyle(layoutBoxOf(el)).flexDirection === "row" ? "horizontal" : "vertical";
|
|
48123
48167
|
}
|
|
48124
|
-
var eventHandleLog, orbPreviewLog, ScreenSizeContext, CARD_MIN_WIDTH, CARD_MAX_WIDTH, PatternSelectionContext, CanvasToolsContext, CanvasStatePickerContext, CanvasVerifyContext, VERDICT_VARIANT,
|
|
48168
|
+
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;
|
|
48125
48169
|
var init_OrbPreviewNode = __esm({
|
|
48126
48170
|
"components/avl/molecules/OrbPreviewNode.tsx"() {
|
|
48127
48171
|
"use client";
|
|
@@ -48171,12 +48215,6 @@ var init_OrbPreviewNode = __esm({
|
|
|
48171
48215
|
stale: "warning",
|
|
48172
48216
|
running: "info"
|
|
48173
48217
|
};
|
|
48174
|
-
ROLE_COLORS = {
|
|
48175
|
-
initial: { border: STATE_COLORS.initial.border, dot: STATE_COLORS.initial.border },
|
|
48176
|
-
terminal: { border: STATE_COLORS.terminal.border, dot: STATE_COLORS.terminal.border },
|
|
48177
|
-
hub: { border: STATE_COLORS.hub.border, dot: STATE_COLORS.hub.border },
|
|
48178
|
-
default: { border: "var(--color-border)", dot: STATE_COLORS.default.border }
|
|
48179
|
-
};
|
|
48180
48218
|
LAYER_ORDER = ["Infrastructure", "Services", "UI Patterns", "Game", "ML", "Domain", "Community"];
|
|
48181
48219
|
LAYER_LABEL_KEYS = {
|
|
48182
48220
|
Infrastructure: "orbPreview.layer.infrastructure",
|
|
@@ -48247,7 +48285,7 @@ var init_OrbPreviewNode = __esm({
|
|
|
48247
48285
|
const [hoverRect, setHoverRect] = React98.useState(null);
|
|
48248
48286
|
const lastHoverElRef = React98.useRef(null);
|
|
48249
48287
|
const role = data.stateRole ?? "default";
|
|
48250
|
-
const colors =
|
|
48288
|
+
const colors = roleColors(role);
|
|
48251
48289
|
const eventSources = data.eventSources ?? [];
|
|
48252
48290
|
const layerColor = data.layer ? LAYER_COLORS[data.layer] : void 0;
|
|
48253
48291
|
const isExpanded = Boolean(data.traitName);
|
|
@@ -49987,7 +50025,7 @@ var init_TagInput = __esm({
|
|
|
49987
50025
|
TagInput.displayName = "TagInput";
|
|
49988
50026
|
}
|
|
49989
50027
|
});
|
|
49990
|
-
function
|
|
50028
|
+
function asString(v) {
|
|
49991
50029
|
return typeof v === "string" ? v : "";
|
|
49992
50030
|
}
|
|
49993
50031
|
function asNumberInput(v) {
|
|
@@ -50460,7 +50498,7 @@ function KnobField({
|
|
|
50460
50498
|
EnumRadio,
|
|
50461
50499
|
{
|
|
50462
50500
|
suggested,
|
|
50463
|
-
value:
|
|
50501
|
+
value: asString(value),
|
|
50464
50502
|
onChange: (v) => onChange(v),
|
|
50465
50503
|
placeholder: question.helpText
|
|
50466
50504
|
}
|
|
@@ -50498,7 +50536,7 @@ function KnobField({
|
|
|
50498
50536
|
Input,
|
|
50499
50537
|
{
|
|
50500
50538
|
placeholder: question.helpText ?? t("knobField.yourAnswer"),
|
|
50501
|
-
value:
|
|
50539
|
+
value: asString(value),
|
|
50502
50540
|
onChange: (e) => onChange(e.target.value)
|
|
50503
50541
|
}
|
|
50504
50542
|
);
|
|
@@ -69362,6 +69400,9 @@ function readsI18n(value) {
|
|
|
69362
69400
|
const arr = value;
|
|
69363
69401
|
return arr[0] === "i18n/t" || arr.some((v) => readsI18n(v));
|
|
69364
69402
|
}
|
|
69403
|
+
if (value !== null && typeof value === "object" && !React98__namespace.default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function") {
|
|
69404
|
+
return Object.values(value).some((v) => readsI18n(v));
|
|
69405
|
+
}
|
|
69365
69406
|
return false;
|
|
69366
69407
|
}
|
|
69367
69408
|
function needsRenderContext(value) {
|
|
@@ -70321,7 +70362,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
70321
70362
|
if (!transport?.subscribeHostDispatches) return;
|
|
70322
70363
|
return transport.subscribeHostDispatches((_orbitalName, request, response) => {
|
|
70323
70364
|
const traitName = request.targetTrait;
|
|
70324
|
-
if (traitName === void 0 || !traitIndex.byName.has(
|
|
70365
|
+
if (traitName === void 0 || !hostDispatchInView(request, response, (t2) => traitIndex.byName.has(t2))) return;
|
|
70325
70366
|
const composedBefore = new Map(store.callsitePayloads);
|
|
70326
70367
|
void kernel.foldHostDispatch(request, response).then((outcome) => settleOutcome(traitName, request.event, request.payload, outcome, composedBefore));
|
|
70327
70368
|
}, { clientId: getTabClientId() });
|
|
@@ -70463,6 +70504,7 @@ var init_useTraitStateMachine = __esm({
|
|
|
70463
70504
|
init_traitRegistry();
|
|
70464
70505
|
init_verificationRegistry();
|
|
70465
70506
|
init_circuitVerificationObserver();
|
|
70507
|
+
init_hostDispatchInView();
|
|
70466
70508
|
init_useCircuitKernel();
|
|
70467
70509
|
init_useBusIngress();
|
|
70468
70510
|
init_useSlotFlush();
|