@factorialco/f0-react 14.9.1 → 14.9.3
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/component-status.js +1 -1
- package/dist/experimental.js +109 -119
- package/dist/styles.css +1 -1
- package/package.json +1 -2
package/dist/component-status.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useCallback as i, useEffect as a, useRef as o, useState as s } from "re
|
|
|
4
4
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
5
|
//#region \0virtual:f0-component-status-data
|
|
6
6
|
var u = {
|
|
7
|
-
generatedAt: "2026-11-
|
|
7
|
+
generatedAt: "2026-11-12T21:45:06.818Z",
|
|
8
8
|
stats: {
|
|
9
9
|
total: 314,
|
|
10
10
|
byStatus: {
|
package/dist/experimental.js
CHANGED
|
@@ -1963,7 +1963,7 @@ var zf = Sn(En("F0PulseDot", Rf)), Bf = [
|
|
|
1963
1963
|
children: i ? e : t
|
|
1964
1964
|
}, i ? "replacement" : "input")
|
|
1965
1965
|
});
|
|
1966
|
-
}, lp = [], up = () => null, dp = B("relative flex flex-col rounded-xl border border-solid border-f1-border-secondary bg-f1-background", "shadow
|
|
1966
|
+
}, lp = [], up = () => null, dp = B("relative flex flex-col rounded-xl border border-solid border-f1-border-secondary bg-f1-background", "shadow", "transition-colors motion-reduce:transition-none"), fp = "button, a, input, select, [role='menu'], [role='dialog'], [role='listbox']", pp = (e, t, n) => {
|
|
1967
1967
|
let r = e.target;
|
|
1968
1968
|
!t && !r.closest(fp) && n?.focus();
|
|
1969
1969
|
}, mp = (e) => !!e && (e.sources.length > 0 || !!e.pinned), hp = (e, t) => B(dp, !e && "hover:cursor-text", t), gp = (e, t, n, r) => {
|
|
@@ -14684,46 +14684,46 @@ var FO = ({ item: e, active: t }) => {
|
|
|
14684
14684
|
className: B("group/item flex items-center rounded", s ? "bg-f1-background-secondary" : "hover:bg-f1-background-secondary"),
|
|
14685
14685
|
children: [c, /* @__PURE__ */ Q(IO, { pin: a })]
|
|
14686
14686
|
}) : c;
|
|
14687
|
-
}, RO = ({ item: e, tooltip: t,
|
|
14688
|
-
let
|
|
14687
|
+
}, RO = ({ item: e, tooltip: t, onRemove: n, index: r, total: i, onMove: a, onReorderFinish: o, isSortable: s = !0 }) => {
|
|
14688
|
+
let c = ql() === "two-level", l = R(), { isDragging: u, setIsDragging: d, draggedItemId: f, setDraggedItemId: p } = PO(), { isActive: m } = Rn(), h = m(e.href, { exact: e.exactMatch }), g = Y(!1), [_, v] = X(!1), y = r === 0, b = r === i - 1, x = i === 1, S = J(function() {
|
|
14689
14689
|
let t = [];
|
|
14690
|
-
return !
|
|
14691
|
-
label:
|
|
14692
|
-
onClick: () =>
|
|
14690
|
+
return !x && !y && t.push({
|
|
14691
|
+
label: l.actions.moveUp,
|
|
14692
|
+
onClick: () => a?.(r, r - 1),
|
|
14693
14693
|
icon: ci
|
|
14694
|
-
}), !
|
|
14695
|
-
label:
|
|
14696
|
-
onClick: () =>
|
|
14694
|
+
}), !x && !b && t.push({
|
|
14695
|
+
label: l.actions.moveDown,
|
|
14696
|
+
onClick: () => a?.(r, r + 1),
|
|
14697
14697
|
icon: Ja
|
|
14698
14698
|
}), t.length > 0 && t.push({ type: "separator" }), t.push({
|
|
14699
|
-
label:
|
|
14700
|
-
onClick: () =>
|
|
14699
|
+
label: l.favorites.remove,
|
|
14700
|
+
onClick: () => n?.(e),
|
|
14701
14701
|
icon: xi,
|
|
14702
14702
|
critical: !0
|
|
14703
14703
|
}), t;
|
|
14704
14704
|
}, [
|
|
14705
|
-
S,
|
|
14706
|
-
b,
|
|
14707
14705
|
x,
|
|
14708
|
-
|
|
14709
|
-
|
|
14710
|
-
|
|
14706
|
+
y,
|
|
14707
|
+
b,
|
|
14708
|
+
l,
|
|
14709
|
+
a,
|
|
14711
14710
|
r,
|
|
14711
|
+
n,
|
|
14712
14712
|
e
|
|
14713
|
-
]),
|
|
14714
|
-
|
|
14715
|
-
},
|
|
14716
|
-
|
|
14717
|
-
|
|
14713
|
+
]), C = () => {
|
|
14714
|
+
d(!0), v(!1), p(e.href || null), g.current = !0;
|
|
14715
|
+
}, w = () => {
|
|
14716
|
+
d(!1), p(null), o(), setTimeout(() => {
|
|
14717
|
+
g.current = !1;
|
|
14718
14718
|
}, 0);
|
|
14719
|
-
},
|
|
14720
|
-
return B("group relative cursor-pointer select-none list-none rounded backdrop-blur-sm active:cursor-grabbing",
|
|
14719
|
+
}, T = u && f === e.href, E = J(function() {
|
|
14720
|
+
return B("group relative cursor-pointer select-none list-none rounded backdrop-blur-sm active:cursor-grabbing", s && "touch-none", h ? "bg-f1-background-secondary text-f1-foreground" : "hover:bg-f1-background-secondary", _ && "bg-f1-background-secondary", T && "bg-f1-background-secondary");
|
|
14721
14721
|
}, [
|
|
14722
|
-
|
|
14723
|
-
|
|
14724
|
-
|
|
14725
|
-
|
|
14726
|
-
]),
|
|
14722
|
+
h,
|
|
14723
|
+
_,
|
|
14724
|
+
T,
|
|
14725
|
+
s
|
|
14726
|
+
]), D = J(function() {
|
|
14727
14727
|
return /* @__PURE__ */ $(Z, { children: [/* @__PURE__ */ Q("div", {
|
|
14728
14728
|
className: "flex w-full items-center justify-between px-1.5 py-1.5",
|
|
14729
14729
|
children: /* @__PURE__ */ Q(HO, {
|
|
@@ -14732,12 +14732,12 @@ var FO = ({ item: e, active: t }) => {
|
|
|
14732
14732
|
onClick: e.onClick,
|
|
14733
14733
|
href: e.href,
|
|
14734
14734
|
exactMatch: e.exactMatch,
|
|
14735
|
-
className: B("flex w-[calc(100%-24px-2px)] items-center gap-1.5 no-underline",
|
|
14735
|
+
className: B("flex w-[calc(100%-24px-2px)] items-center gap-1.5 no-underline", T && "pointer-events-none"),
|
|
14736
14736
|
draggable: !1,
|
|
14737
14737
|
children: [e.type === "icon" ? /* @__PURE__ */ Q(W, {
|
|
14738
14738
|
icon: e.icon,
|
|
14739
14739
|
size: "md",
|
|
14740
|
-
className: B(!
|
|
14740
|
+
className: B(!c && "transition-colors", h ? "text-f1-icon-bold" : "text-f1-icon")
|
|
14741
14741
|
}) : e.avatar ? /* @__PURE__ */ Q(As, {
|
|
14742
14742
|
size: "xs",
|
|
14743
14743
|
avatar: e.avatar
|
|
@@ -14751,11 +14751,11 @@ var FO = ({ item: e, active: t }) => {
|
|
|
14751
14751
|
})
|
|
14752
14752
|
})
|
|
14753
14753
|
}), /* @__PURE__ */ Q("div", {
|
|
14754
|
-
className: B("absolute inset-y-1 right-1 z-10 flex h-6 w-6 items-center justify-center rounded-sm opacity-0 transition-opacity duration-100 hover:bg-f1-background-secondary group-hover:opacity-100",
|
|
14754
|
+
className: B("absolute inset-y-1 right-1 z-10 flex h-6 w-6 items-center justify-center rounded-sm opacity-0 transition-opacity duration-100 hover:bg-f1-background-secondary group-hover:opacity-100", _ && "bg-f1-background-secondary opacity-100", T && "opacity-100"),
|
|
14755
14755
|
children: /* @__PURE__ */ Q($a, {
|
|
14756
|
-
open:
|
|
14757
|
-
onOpenChange:
|
|
14758
|
-
items:
|
|
14756
|
+
open: _,
|
|
14757
|
+
onOpenChange: v,
|
|
14758
|
+
items: S,
|
|
14759
14759
|
children: /* @__PURE__ */ Q("div", {
|
|
14760
14760
|
className: "flex items-center justify-center",
|
|
14761
14761
|
role: "list",
|
|
@@ -14768,56 +14768,52 @@ var FO = ({ item: e, active: t }) => {
|
|
|
14768
14768
|
})] });
|
|
14769
14769
|
}, [
|
|
14770
14770
|
e,
|
|
14771
|
-
|
|
14772
|
-
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
|
|
14771
|
+
h,
|
|
14772
|
+
c,
|
|
14773
|
+
_,
|
|
14774
|
+
T,
|
|
14775
|
+
S,
|
|
14776
14776
|
t
|
|
14777
14777
|
]);
|
|
14778
|
-
return
|
|
14778
|
+
return s ? /* @__PURE__ */ Q(hn, {
|
|
14779
14779
|
value: e,
|
|
14780
14780
|
drag: "y",
|
|
14781
|
-
|
|
14782
|
-
|
|
14783
|
-
|
|
14784
|
-
onDragEnd: T,
|
|
14785
|
-
className: D,
|
|
14781
|
+
onDragStart: C,
|
|
14782
|
+
onDragEnd: w,
|
|
14783
|
+
className: E,
|
|
14786
14784
|
whileDrag: { scale: 1.05 },
|
|
14787
|
-
children:
|
|
14785
|
+
children: D
|
|
14788
14786
|
}) : /* @__PURE__ */ Q("div", {
|
|
14789
|
-
className:
|
|
14790
|
-
children:
|
|
14791
|
-
});
|
|
14792
|
-
}, zO = ({ category: e, isSortable: t = !1,
|
|
14793
|
-
let
|
|
14794
|
-
|
|
14795
|
-
},
|
|
14796
|
-
|
|
14797
|
-
|
|
14787
|
+
className: E,
|
|
14788
|
+
children: D
|
|
14789
|
+
});
|
|
14790
|
+
}, zO = ({ category: e, isSortable: t = !1, onCollapse: n, onDragEnd: r, currentOrder: i }) => {
|
|
14791
|
+
let a = ql() === "two-level", { isDragging: o, setIsDragging: s } = PO(), c = Y(!1), l = dn(), u = () => {
|
|
14792
|
+
s(!0), c.current = !0;
|
|
14793
|
+
}, d = () => {
|
|
14794
|
+
s(!1), setTimeout(() => {
|
|
14795
|
+
c.current = !1, i && r?.(i);
|
|
14798
14796
|
}, 0);
|
|
14799
|
-
},
|
|
14797
|
+
}, f = /* @__PURE__ */ Q(gE, {
|
|
14800
14798
|
title: e.title,
|
|
14801
14799
|
isOpen: e.isOpen,
|
|
14802
14800
|
isRoot: e.isRoot,
|
|
14803
14801
|
onCollapse: (t) => {
|
|
14804
|
-
!
|
|
14802
|
+
!o && !c.current && n?.(e, t);
|
|
14805
14803
|
},
|
|
14806
|
-
isDragging:
|
|
14807
|
-
wasDragging:
|
|
14804
|
+
isDragging: o,
|
|
14805
|
+
wasDragging: c,
|
|
14808
14806
|
children: /* @__PURE__ */ Q("div", {
|
|
14809
|
-
className: B("flex flex-col gap-0.5",
|
|
14807
|
+
className: B("flex flex-col gap-0.5", o && !c.current && "pointer-events-none"),
|
|
14810
14808
|
children: e.items.map((e) => /* @__PURE__ */ Q(LO, { item: e }, `${e.href ?? ""}|${e.label}`))
|
|
14811
14809
|
})
|
|
14812
14810
|
});
|
|
14813
14811
|
return t ? /* @__PURE__ */ Q(hn, {
|
|
14814
14812
|
id: e.id,
|
|
14815
14813
|
value: e,
|
|
14816
|
-
|
|
14817
|
-
|
|
14818
|
-
|
|
14819
|
-
onDragStart: d,
|
|
14820
|
-
onDragEnd: f,
|
|
14814
|
+
dragControls: l,
|
|
14815
|
+
onDragStart: u,
|
|
14816
|
+
onDragEnd: d,
|
|
14821
14817
|
layout: !0,
|
|
14822
14818
|
layoutId: `category-${e.id}`,
|
|
14823
14819
|
initial: { opacity: 1 },
|
|
@@ -14848,7 +14844,7 @@ var FO = ({ item: e, active: t }) => {
|
|
|
14848
14844
|
1.275
|
|
14849
14845
|
]
|
|
14850
14846
|
},
|
|
14851
|
-
layout:
|
|
14847
|
+
layout: o || !a ? {
|
|
14852
14848
|
type: "spring",
|
|
14853
14849
|
bounce: .1,
|
|
14854
14850
|
damping: 15
|
|
@@ -14861,8 +14857,8 @@ var FO = ({ item: e, active: t }) => {
|
|
|
14861
14857
|
backdropFilter: "blur(4px)"
|
|
14862
14858
|
},
|
|
14863
14859
|
className: "relative",
|
|
14864
|
-
children:
|
|
14865
|
-
}) :
|
|
14860
|
+
children: f
|
|
14861
|
+
}) : f;
|
|
14866
14862
|
};
|
|
14867
14863
|
function BO({ tree: e, onCollapse: t, onSort: n, onFavoritesChange: r, favorites: i }) {
|
|
14868
14864
|
let a = Y(null), o = e.filter((e) => e.isSortable === !1), s = J(function() {
|
|
@@ -14892,69 +14888,67 @@ function BO({ tree: e, onCollapse: t, onSort: n, onFavoritesChange: r, favorites
|
|
|
14892
14888
|
}) });
|
|
14893
14889
|
}
|
|
14894
14890
|
function VO({ nonSortableItems: e, sortableItems: t, setSortableItems: n, containerRef: r, onCollapse: i, onDragEnd: a, favorites: o = [], onFavoritesChange: s, forceUpdate: c, disableDragging: l = !1 }) {
|
|
14895
|
-
let u = R(), { isDragging: d } = PO(), f = e.some((e) => e.isRoot), p = e.filter((e) => !e.isRoot).length > 0, m = t.length > 0, h
|
|
14891
|
+
let u = R(), { isDragging: d } = PO(), f = e.some((e) => e.isRoot), p = e.filter((e) => !e.isRoot).length > 0, m = t.length > 0, [h, g] = X(o), _ = o.length > 0;
|
|
14896
14892
|
K(function() {
|
|
14897
|
-
JSON.stringify(o) !== JSON.stringify(
|
|
14893
|
+
JSON.stringify(o) !== JSON.stringify(h) && g(o);
|
|
14898
14894
|
}, [o]);
|
|
14899
|
-
let
|
|
14900
|
-
|
|
14901
|
-
},
|
|
14902
|
-
let t =
|
|
14903
|
-
|
|
14904
|
-
}, [
|
|
14905
|
-
if (t < 0 || t >=
|
|
14906
|
-
let n = [...
|
|
14907
|
-
n.splice(t, 0, r),
|
|
14908
|
-
}, [
|
|
14895
|
+
let v = (e) => {
|
|
14896
|
+
g(e);
|
|
14897
|
+
}, y = G(function(e) {
|
|
14898
|
+
let t = h.filter((t) => t.href !== e.href);
|
|
14899
|
+
g(t), s?.(t);
|
|
14900
|
+
}, [h, s]), b = G(function(e, t) {
|
|
14901
|
+
if (t < 0 || t >= h.length) return;
|
|
14902
|
+
let n = [...h], [r] = n.splice(e, 1);
|
|
14903
|
+
n.splice(t, 0, r), g(n), s?.(n);
|
|
14904
|
+
}, [h, s]), [x, S] = X(!1), C = Y(null);
|
|
14909
14905
|
K(function() {
|
|
14910
|
-
t.length > 0 && !
|
|
14906
|
+
t.length > 0 && !x && (n([...t]), S(!0));
|
|
14911
14907
|
}, [
|
|
14912
14908
|
t,
|
|
14913
14909
|
n,
|
|
14914
|
-
|
|
14910
|
+
x
|
|
14915
14911
|
]), K(function() {
|
|
14916
14912
|
let e = () => {
|
|
14917
|
-
|
|
14913
|
+
C.current !== null && window.clearTimeout(C.current), C.current = window.setTimeout(() => {
|
|
14918
14914
|
r.current && t.length > 0 && c();
|
|
14919
14915
|
}, 50);
|
|
14920
14916
|
};
|
|
14921
14917
|
return window.addEventListener("resize", e), () => {
|
|
14922
|
-
window.removeEventListener("resize", e),
|
|
14918
|
+
window.removeEventListener("resize", e), C.current !== null && window.clearTimeout(C.current);
|
|
14923
14919
|
};
|
|
14924
14920
|
}, [
|
|
14925
14921
|
r,
|
|
14926
14922
|
t,
|
|
14927
14923
|
c
|
|
14928
14924
|
]);
|
|
14929
|
-
let
|
|
14930
|
-
return
|
|
14931
|
-
}, [
|
|
14932
|
-
return
|
|
14925
|
+
let w = "flex flex-col gap-0.5", T = J(function() {
|
|
14926
|
+
return h.reduce((e, t, n) => (t.label in e || (e[t.label] = []), e[t.label].push(n), e), {});
|
|
14927
|
+
}, [h]), E = J(function() {
|
|
14928
|
+
return _ && h.map((e, t) => /* @__PURE__ */ Q(RO, {
|
|
14933
14929
|
isSortable: !l,
|
|
14934
|
-
tooltip: (
|
|
14930
|
+
tooltip: (T[e.label] ?? []).length > 1 ? e.tooltip : void 0,
|
|
14935
14931
|
item: e,
|
|
14936
|
-
|
|
14937
|
-
onRemove: b,
|
|
14932
|
+
onRemove: y,
|
|
14938
14933
|
index: t,
|
|
14939
|
-
total:
|
|
14940
|
-
onMove:
|
|
14934
|
+
total: h.length,
|
|
14935
|
+
onMove: b,
|
|
14941
14936
|
onReorderFinish: () => {
|
|
14942
|
-
s?.(
|
|
14937
|
+
s?.(h);
|
|
14943
14938
|
}
|
|
14944
14939
|
}, `${e.href}-${e.label}`));
|
|
14945
14940
|
}, [
|
|
14946
|
-
|
|
14947
|
-
|
|
14948
|
-
|
|
14941
|
+
_,
|
|
14942
|
+
h,
|
|
14943
|
+
T,
|
|
14944
|
+
y,
|
|
14949
14945
|
b,
|
|
14950
|
-
x,
|
|
14951
14946
|
s,
|
|
14952
14947
|
l
|
|
14953
|
-
]),
|
|
14948
|
+
]), D = "flex flex-col gap-3", O = J(function() {
|
|
14954
14949
|
return t.map((e) => /* @__PURE__ */ Q(zO, {
|
|
14955
14950
|
category: e,
|
|
14956
14951
|
isSortable: !l,
|
|
14957
|
-
dragConstraints: r,
|
|
14958
14952
|
onCollapse: i,
|
|
14959
14953
|
onDragEnd: a,
|
|
14960
14954
|
currentOrder: t
|
|
@@ -14962,7 +14956,6 @@ function VO({ nonSortableItems: e, sortableItems: t, setSortableItems: n, contai
|
|
|
14962
14956
|
}, [
|
|
14963
14957
|
t,
|
|
14964
14958
|
l,
|
|
14965
|
-
r,
|
|
14966
14959
|
i,
|
|
14967
14960
|
a
|
|
14968
14961
|
]);
|
|
@@ -14976,22 +14969,19 @@ function VO({ nonSortableItems: e, sortableItems: t, setSortableItems: n, contai
|
|
|
14976
14969
|
onCollapse: i
|
|
14977
14970
|
}, `fixed-${t}`))
|
|
14978
14971
|
}) : null,
|
|
14979
|
-
|
|
14972
|
+
_ ? /* @__PURE__ */ Q("div", {
|
|
14980
14973
|
className: "mt-3 flex w-full flex-col gap-3 bg-transparent px-3",
|
|
14981
14974
|
children: /* @__PURE__ */ Q(gE, {
|
|
14982
14975
|
title: u.favorites.favorites,
|
|
14983
|
-
children: /* @__PURE__ */ Q("div", {
|
|
14984
|
-
|
|
14985
|
-
children:
|
|
14986
|
-
|
|
14987
|
-
|
|
14988
|
-
|
|
14989
|
-
|
|
14990
|
-
|
|
14991
|
-
|
|
14992
|
-
className: T,
|
|
14993
|
-
children: D
|
|
14994
|
-
})
|
|
14976
|
+
children: l ? /* @__PURE__ */ Q("div", {
|
|
14977
|
+
className: w,
|
|
14978
|
+
children: E
|
|
14979
|
+
}) : /* @__PURE__ */ Q(We, {
|
|
14980
|
+
axis: "y",
|
|
14981
|
+
values: h,
|
|
14982
|
+
onReorder: v,
|
|
14983
|
+
className: w,
|
|
14984
|
+
children: E
|
|
14995
14985
|
})
|
|
14996
14986
|
})
|
|
14997
14987
|
}) : null,
|
|
@@ -15006,15 +14996,15 @@ function VO({ nonSortableItems: e, sortableItems: t, setSortableItems: n, contai
|
|
|
15006
14996
|
className: B("mt-3 flex w-full flex-col gap-3 bg-transparent px-3 [&_li]:list-none"),
|
|
15007
14997
|
ref: r,
|
|
15008
14998
|
children: l ? /* @__PURE__ */ Q("div", {
|
|
15009
|
-
className:
|
|
15010
|
-
children:
|
|
14999
|
+
className: D,
|
|
15000
|
+
children: O
|
|
15011
15001
|
}) : /* @__PURE__ */ Q(We, {
|
|
15012
15002
|
axis: "y",
|
|
15013
15003
|
values: t,
|
|
15014
15004
|
onReorder: n,
|
|
15015
15005
|
layoutScroll: !0,
|
|
15016
|
-
className:
|
|
15017
|
-
children:
|
|
15006
|
+
className: D,
|
|
15007
|
+
children: O
|
|
15018
15008
|
})
|
|
15019
15009
|
}) : null
|
|
15020
15010
|
]
|
|
@@ -18612,7 +18602,7 @@ var QM = () => ZM(WM, "useChatJump"), $M = (e) => {
|
|
|
18612
18602
|
role: a ? "status" : void 0,
|
|
18613
18603
|
"aria-live": "polite",
|
|
18614
18604
|
"aria-label": a ? o : void 0,
|
|
18615
|
-
className: "h-
|
|
18605
|
+
className: "h-7 truncate px-2.5 text-sm leading-7 text-f1-foreground-tertiary",
|
|
18616
18606
|
children: a ? dN(o, t.slice(0, 2).map((e) => e.name)) : null
|
|
18617
18607
|
});
|
|
18618
18608
|
}, pN = ({ visible: e }) => {
|