@factorialco/f0-react 10.12.1 → 10.13.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/component-status.js +1 -1
- package/dist/experimental.d.ts +27 -0
- package/dist/experimental.js +535 -407
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/experimental.js
CHANGED
|
@@ -20599,8 +20599,177 @@ var ZN = 3, QN = "slot-skeleton-item", $N = [
|
|
|
20599
20599
|
className: W(t && "animate-clock-tick motion-reduce:animate-none"),
|
|
20600
20600
|
children: ":"
|
|
20601
20601
|
}) : null, e] }, n))
|
|
20602
|
-
})
|
|
20603
|
-
|
|
20602
|
+
}), lP = 1e3, uP = (e) => {
|
|
20603
|
+
let t = cn(), [n, r] = X(!0), i = e && !t;
|
|
20604
|
+
return q(() => {
|
|
20605
|
+
if (!i) return;
|
|
20606
|
+
let e = setInterval(() => r((e) => !e), lP);
|
|
20607
|
+
return () => {
|
|
20608
|
+
clearInterval(e), r(!0);
|
|
20609
|
+
};
|
|
20610
|
+
}, [i]), !i || n;
|
|
20611
|
+
}, dP = ({ text: e, ticking: t }) => /* @__PURE__ */ Q(cP, {
|
|
20612
|
+
text: e,
|
|
20613
|
+
ticking: t,
|
|
20614
|
+
className: "px-2 text-2xl font-semibold"
|
|
20615
|
+
}), fP = {
|
|
20616
|
+
neutral: {
|
|
20617
|
+
pill: "bg-f1-background-inverse text-f1-foreground-inverse",
|
|
20618
|
+
button: "bg-f1-background-accent-bold hover:bg-f1-background-accent-bold-hover",
|
|
20619
|
+
icon: "inverse",
|
|
20620
|
+
ring: "ring-f1-border-inverse",
|
|
20621
|
+
solo: "bg-f1-background-accent-bold hover:bg-f1-background-accent-bold-hover",
|
|
20622
|
+
soloIcon: "inverse",
|
|
20623
|
+
soloRing: "ring-f1-border-inverse"
|
|
20624
|
+
},
|
|
20625
|
+
accent: {
|
|
20626
|
+
pill: "bg-f1-background-accent-bold text-f1-foreground-inverse",
|
|
20627
|
+
button: "bg-f1-background hover:bg-f1-background",
|
|
20628
|
+
icon: "accent",
|
|
20629
|
+
ring: "ring-f1-border-secondary",
|
|
20630
|
+
solo: "bg-f1-background-accent-bold hover:bg-f1-background-accent-bold-hover",
|
|
20631
|
+
soloIcon: "inverse",
|
|
20632
|
+
soloRing: "ring-f1-border-inverse"
|
|
20633
|
+
},
|
|
20634
|
+
critical: {
|
|
20635
|
+
pill: "bg-f1-background-critical-bold text-f1-foreground-inverse",
|
|
20636
|
+
button: "bg-f1-background hover:bg-f1-background",
|
|
20637
|
+
icon: "critical",
|
|
20638
|
+
ring: "ring-f1-border-secondary",
|
|
20639
|
+
solo: "bg-f1-background-critical-bold",
|
|
20640
|
+
soloIcon: "inverse",
|
|
20641
|
+
soloRing: "ring-f1-border-inverse"
|
|
20642
|
+
},
|
|
20643
|
+
warning: {
|
|
20644
|
+
pill: "bg-f1-background-warning-bold text-f1-foreground-inverse",
|
|
20645
|
+
button: "bg-f1-background hover:bg-f1-background",
|
|
20646
|
+
icon: "warning",
|
|
20647
|
+
ring: "ring-f1-border-secondary",
|
|
20648
|
+
solo: "bg-f1-background-warning-bold",
|
|
20649
|
+
soloIcon: "inverse",
|
|
20650
|
+
soloRing: "ring-f1-border-inverse"
|
|
20651
|
+
},
|
|
20652
|
+
promote: {
|
|
20653
|
+
pill: "bg-f1-background-promote-bold text-f1-foreground-inverse",
|
|
20654
|
+
button: "bg-f1-background hover:bg-f1-background",
|
|
20655
|
+
icon: "promote",
|
|
20656
|
+
ring: "ring-f1-border-secondary",
|
|
20657
|
+
solo: "bg-f1-background-promote-bold",
|
|
20658
|
+
soloIcon: "inverse",
|
|
20659
|
+
soloRing: "ring-f1-border-inverse"
|
|
20660
|
+
},
|
|
20661
|
+
positive: {
|
|
20662
|
+
pill: "bg-f1-background-positive-bold text-f1-foreground-inverse",
|
|
20663
|
+
button: "bg-f1-background hover:bg-f1-background",
|
|
20664
|
+
icon: "positive",
|
|
20665
|
+
ring: "ring-f1-border-secondary",
|
|
20666
|
+
solo: "bg-f1-background-positive-bold",
|
|
20667
|
+
soloIcon: "inverse",
|
|
20668
|
+
soloRing: "ring-f1-border-inverse"
|
|
20669
|
+
}
|
|
20670
|
+
}, pP = (e, t) => {
|
|
20671
|
+
let n = cn();
|
|
20672
|
+
return {
|
|
20673
|
+
initial: {
|
|
20674
|
+
opacity: 0,
|
|
20675
|
+
x: n ? 0 : -8
|
|
20676
|
+
},
|
|
20677
|
+
animate: {
|
|
20678
|
+
opacity: 1,
|
|
20679
|
+
x: 0
|
|
20680
|
+
},
|
|
20681
|
+
exit: {
|
|
20682
|
+
opacity: 0,
|
|
20683
|
+
x: n ? 0 : -8
|
|
20684
|
+
},
|
|
20685
|
+
whileTap: n ? void 0 : { scale: eN },
|
|
20686
|
+
transition: cN({
|
|
20687
|
+
...rN,
|
|
20688
|
+
delay: XM(e, t)
|
|
20689
|
+
}, n)
|
|
20690
|
+
};
|
|
20691
|
+
}, mP = ({ hasUpdates: e }) => e ? /* @__PURE__ */ Q("span", { className: "pointer-events-none absolute -right-0.5 -top-0.5 h-2 w-2 rounded-full bg-f1-background-accent-bold ring-2 ring-f1-background" }) : null, hP = ({ widget: e, action: t, order: n, open: r, delayMs: i, onOpen: a, onCancelOpen: o }) => {
|
|
20692
|
+
let s = pP(n, i), c = uP(!!t.flashing && !r), l = t.text && !r ? t.text : void 0, u = fP[t.tone ?? "neutral"];
|
|
20693
|
+
return /* @__PURE__ */ Q(vn, {
|
|
20694
|
+
label: t.label,
|
|
20695
|
+
instant: !0,
|
|
20696
|
+
children: /* @__PURE__ */ $(B.div, {
|
|
20697
|
+
className: W("group pointer-events-auto relative shrink-0", l ? W("-mr-1 -my-1 flex flex-row items-center gap-1 rounded-lg p-1", u.pill) : "rounded-lg"),
|
|
20698
|
+
"data-widget-glyph": e.id,
|
|
20699
|
+
onMouseEnter: (t) => a(e.id, t.currentTarget),
|
|
20700
|
+
onMouseLeave: o,
|
|
20701
|
+
onFocus: (t) => a(e.id, t.currentTarget, !0),
|
|
20702
|
+
...s,
|
|
20703
|
+
children: [
|
|
20704
|
+
l ? /* @__PURE__ */ Q(dP, {
|
|
20705
|
+
text: l,
|
|
20706
|
+
ticking: !!t.ticking
|
|
20707
|
+
}) : null,
|
|
20708
|
+
/* @__PURE__ */ Q(an, {
|
|
20709
|
+
type: "button",
|
|
20710
|
+
variant: "ghost",
|
|
20711
|
+
size: "lg",
|
|
20712
|
+
className: W("size-10 shadow-none after:hidden hover:shadow-none active:shadow-none [&_.main]:px-0", t.text ? u.button : u.solo, "ring-inset group-hover:ring-1", r && "ring-1", t.text ? u.ring : u.soloRing),
|
|
20713
|
+
"aria-label": `${t.label}, ${IN(e)}`,
|
|
20714
|
+
onClick: () => t.onClick(),
|
|
20715
|
+
children: /* @__PURE__ */ Q(V, {
|
|
20716
|
+
size: "lg",
|
|
20717
|
+
color: t.text ? u.icon : u.soloIcon,
|
|
20718
|
+
icon: c || !e.icon ? t.icon : e.icon
|
|
20719
|
+
})
|
|
20720
|
+
}),
|
|
20721
|
+
/* @__PURE__ */ Q(mP, { hasUpdates: e.hasUpdates })
|
|
20722
|
+
]
|
|
20723
|
+
})
|
|
20724
|
+
});
|
|
20725
|
+
}, gP = ({ widget: e, order: t, open: n, delayMs: r, onOpen: i, onCancelOpen: a, onClose: o, look: s = "tile" }) => {
|
|
20726
|
+
let c = e.railAction, l = pP(t, r);
|
|
20727
|
+
return c ? /* @__PURE__ */ Q(hP, {
|
|
20728
|
+
widget: e,
|
|
20729
|
+
action: c,
|
|
20730
|
+
order: t,
|
|
20731
|
+
open: n,
|
|
20732
|
+
delayMs: r,
|
|
20733
|
+
onOpen: i,
|
|
20734
|
+
onCancelOpen: a
|
|
20735
|
+
}) : e.loading && !e.icon ? /* @__PURE__ */ Q(B.div, {
|
|
20736
|
+
"aria-hidden": !0,
|
|
20737
|
+
className: "pointer-events-none shrink-0",
|
|
20738
|
+
...l,
|
|
20739
|
+
children: /* @__PURE__ */ Q(H, { className: "h-10 w-10 rounded-lg" })
|
|
20740
|
+
}) : /* @__PURE__ */ Q(B.button, {
|
|
20741
|
+
type: "button",
|
|
20742
|
+
"aria-label": IN(e),
|
|
20743
|
+
"aria-expanded": n,
|
|
20744
|
+
"data-widget-glyph": e.id,
|
|
20745
|
+
onMouseEnter: (t) => i(e.id, t.currentTarget),
|
|
20746
|
+
onMouseLeave: a,
|
|
20747
|
+
onClick: (t) => n ? o() : i(e.id, t.currentTarget, !0),
|
|
20748
|
+
className: W("pointer-events-auto", s === "ghost" ? "rounded-md" : "rounded-lg"),
|
|
20749
|
+
...l,
|
|
20750
|
+
children: /* @__PURE__ */ $("span", {
|
|
20751
|
+
className: "relative inline-flex",
|
|
20752
|
+
children: [s === "ghost" ? /* @__PURE__ */ Q("span", {
|
|
20753
|
+
className: W("flex size-10 items-center justify-center rounded-md transition-colors", n ? "bg-f1-background-secondary" : "hover:bg-f1-background-secondary"),
|
|
20754
|
+
children: e.icon ? /* @__PURE__ */ Q(V, {
|
|
20755
|
+
icon: e.icon,
|
|
20756
|
+
size: "md",
|
|
20757
|
+
color: "bold"
|
|
20758
|
+
}) : /* @__PURE__ */ Q("span", {
|
|
20759
|
+
className: "font-medium text-f1-foreground-secondary",
|
|
20760
|
+
children: IN(e).charAt(0)
|
|
20761
|
+
})
|
|
20762
|
+
}) : e.icon ? /* @__PURE__ */ Q(Oo, {
|
|
20763
|
+
icon: e.icon,
|
|
20764
|
+
size: "lg"
|
|
20765
|
+
}) : /* @__PURE__ */ Q("span", {
|
|
20766
|
+
className: "flex h-10 w-10 items-center justify-center rounded-lg border border-solid border-f1-border-secondary bg-f1-background font-medium text-f1-foreground-secondary",
|
|
20767
|
+
children: IN(e).charAt(0)
|
|
20768
|
+
}), /* @__PURE__ */ Q(mP, { hasUpdates: e.hasUpdates })]
|
|
20769
|
+
})
|
|
20770
|
+
});
|
|
20771
|
+
};
|
|
20772
|
+
function _P(e = 24) {
|
|
20604
20773
|
let [t, n] = X(null), [r, i] = X({
|
|
20605
20774
|
top: !1,
|
|
20606
20775
|
bottom: !1
|
|
@@ -20634,8 +20803,8 @@ function lP(e = 24) {
|
|
|
20634
20803
|
}
|
|
20635
20804
|
//#endregion
|
|
20636
20805
|
//#region src/domains/platform/home/Home/SlotWidget/SlotWidget.tsx
|
|
20637
|
-
var
|
|
20638
|
-
function
|
|
20806
|
+
var vP = "-ml-0.5 mt-2", yP = 450, bP = "cubic-bezier(0.4, 0, 0.1, 1)", xP = 1.04;
|
|
20807
|
+
function SP({ slots: e, loading: t = !1, slotRenderers: n, ctx: r = {}, headless: i = !1 }) {
|
|
20639
20808
|
let a = n ? {
|
|
20640
20809
|
...sP,
|
|
20641
20810
|
...n
|
|
@@ -20668,7 +20837,7 @@ function mP({ slots: e, loading: t = !1, slotRenderers: n, ctx: r = {}, headless
|
|
|
20668
20837
|
})
|
|
20669
20838
|
});
|
|
20670
20839
|
}
|
|
20671
|
-
function
|
|
20840
|
+
function CP({ header: e, params: t, fullHeight: n, action: r, summaries: i, headerControls: a, headerActions: o, headerSelect: s, alert: c, status: l, slots: u, loading: d = !1, slotRenderers: f, actions: p, flipped: m = !1, onFlipBack: h, isDragging: g, ctx: _ = {}, headless: v = !1 }) {
|
|
20672
20841
|
let y = U(), b = cn(), [x, S] = X(!1), C = Y(!1);
|
|
20673
20842
|
q(() => {
|
|
20674
20843
|
if (!C.current) {
|
|
@@ -20677,7 +20846,7 @@ function hP({ header: e, params: t, fullHeight: n, action: r, summaries: i, head
|
|
|
20677
20846
|
}
|
|
20678
20847
|
if (b) return;
|
|
20679
20848
|
S(!0);
|
|
20680
|
-
let e = setTimeout(() => S(!1),
|
|
20849
|
+
let e = setTimeout(() => S(!1), yP);
|
|
20681
20850
|
return () => clearTimeout(e);
|
|
20682
20851
|
}, [m, b]);
|
|
20683
20852
|
let [w, T] = X(void 0), D = s ? w ?? s.value ?? s.options[0]?.value : void 0, O = s?.options.find((e) => e.value === D), k = (e) => {
|
|
@@ -20718,13 +20887,13 @@ function hP({ header: e, params: t, fullHeight: n, action: r, summaries: i, head
|
|
|
20718
20887
|
header: F,
|
|
20719
20888
|
fullHeight: n,
|
|
20720
20889
|
action: ee,
|
|
20721
|
-
footerClassName:
|
|
20890
|
+
footerClassName: vP,
|
|
20722
20891
|
actions: v ? void 0 : p,
|
|
20723
20892
|
headerControls: v ? void 0 : A,
|
|
20724
20893
|
summaries: i,
|
|
20725
20894
|
...c ? { alert: c } : { status: l },
|
|
20726
20895
|
isDragging: g,
|
|
20727
|
-
children: /* @__PURE__ */ Q(
|
|
20896
|
+
children: /* @__PURE__ */ Q(SP, {
|
|
20728
20897
|
ctx: {
|
|
20729
20898
|
..._,
|
|
20730
20899
|
hasFooter: !!r,
|
|
@@ -20743,14 +20912,14 @@ function hP({ header: e, params: t, fullHeight: n, action: r, summaries: i, head
|
|
|
20743
20912
|
className: "h-full",
|
|
20744
20913
|
"data-turning": x || void 0,
|
|
20745
20914
|
style: {
|
|
20746
|
-
transform: `scale(${x ?
|
|
20747
|
-
transition: b ? void 0 : `transform ${
|
|
20915
|
+
transform: `scale(${x ? xP : 1})`,
|
|
20916
|
+
transition: b ? void 0 : `transform ${yP / 2}ms ease-out`
|
|
20748
20917
|
},
|
|
20749
20918
|
children: /* @__PURE__ */ $("div", {
|
|
20750
20919
|
className: "relative h-full [transform-style:preserve-3d]",
|
|
20751
20920
|
style: {
|
|
20752
20921
|
transform: `rotateY(${m ? 180 : 0}deg)`,
|
|
20753
|
-
transition: b ? void 0 : `transform ${
|
|
20922
|
+
transition: b ? void 0 : `transform ${yP}ms ${bP}`
|
|
20754
20923
|
},
|
|
20755
20924
|
children: [/* @__PURE__ */ Q("div", {
|
|
20756
20925
|
className: W("[backface-visibility:hidden]", m && "pointer-events-none"),
|
|
@@ -20782,8 +20951,8 @@ function hP({ header: e, params: t, fullHeight: n, action: r, summaries: i, head
|
|
|
20782
20951
|
}
|
|
20783
20952
|
//#endregion
|
|
20784
20953
|
//#region src/domains/platform/home/Home/WidgetPreview/WidgetPreview.tsx
|
|
20785
|
-
var
|
|
20786
|
-
let e = sn(
|
|
20954
|
+
var wP = "(min-width: 2200px) and (min-height: 900px)", TP = () => {
|
|
20955
|
+
let e = sn(wP, {
|
|
20787
20956
|
initializeWithValue: !0,
|
|
20788
20957
|
defaultValue: !1
|
|
20789
20958
|
}), t = sn(`(max-width: ${tc.md}px)`, {
|
|
@@ -20797,14 +20966,14 @@ var gP = "(min-width: 2200px) and (min-height: 900px)", _P = () => {
|
|
|
20797
20966
|
asideClassName: t ? "w-full shrink-0" : "w-80 shrink-0",
|
|
20798
20967
|
stacked: t
|
|
20799
20968
|
};
|
|
20800
|
-
},
|
|
20801
|
-
function
|
|
20969
|
+
}, EP = "animate-in fade-in zoom-in-95 duration-300 ease-out motion-reduce:animate-none";
|
|
20970
|
+
function DP({ previewKey: e, children: t, info: n, previewWidth: r = 396 }) {
|
|
20802
20971
|
return /* @__PURE__ */ Q("div", {
|
|
20803
20972
|
className: "flex min-w-0 flex-1 flex-col overflow-y-auto rounded-lg bg-f1-background-secondary p-6",
|
|
20804
20973
|
children: /* @__PURE__ */ $("div", {
|
|
20805
20974
|
className: "my-auto flex w-full flex-col items-center gap-6",
|
|
20806
20975
|
children: [/* @__PURE__ */ Q("div", {
|
|
20807
|
-
className: W("w-full",
|
|
20976
|
+
className: W("w-full", EP),
|
|
20808
20977
|
style: { maxWidth: `${r}px` },
|
|
20809
20978
|
children: t
|
|
20810
20979
|
}, e), n ? /* @__PURE__ */ Q("p", {
|
|
@@ -20816,9 +20985,9 @@ function yP({ previewKey: e, children: t, info: n, previewWidth: r = 396 }) {
|
|
|
20816
20985
|
}
|
|
20817
20986
|
//#endregion
|
|
20818
20987
|
//#region src/domains/platform/home/Home/WidgetUpdateDialog/WidgetUpdateDialog.tsx
|
|
20819
|
-
var
|
|
20820
|
-
function
|
|
20821
|
-
let u = U(), { position: d, width: f, bodyClassName: p, asideClassName: m } =
|
|
20988
|
+
var OP = (e, t) => typeof e == "function" ? e(t) : e, kP = 250;
|
|
20989
|
+
function AP({ isOpen: e, onClose: t, schema: n, params: r, renderPreview: i, info: a, onSave: o, previewWidth: s = 396, title: c, saveLabel: l = "Save" }) {
|
|
20990
|
+
let u = U(), { position: d, width: f, bodyClassName: p, asideClassName: m } = TP(), { formRef: h, getValues: g, trigger: _ } = Ke(), [v, y] = X(r ?? {});
|
|
20822
20991
|
return q(() => {
|
|
20823
20992
|
e && y(r ?? {});
|
|
20824
20993
|
}, [e, r]), /* @__PURE__ */ Q(Ka, {
|
|
@@ -20844,15 +21013,15 @@ function SP({ isOpen: e, onClose: t, schema: n, params: r, renderPreview: i, inf
|
|
|
20844
21013
|
defaultValues: r,
|
|
20845
21014
|
submitConfig: {
|
|
20846
21015
|
type: "autosubmit",
|
|
20847
|
-
delay:
|
|
21016
|
+
delay: kP,
|
|
20848
21017
|
hideActionBar: !0
|
|
20849
21018
|
},
|
|
20850
21019
|
styling: { noPadding: !0 },
|
|
20851
21020
|
onSubmit: (e) => (y(e), { success: !0 })
|
|
20852
21021
|
})
|
|
20853
|
-
}), /* @__PURE__ */ Q(
|
|
21022
|
+
}), /* @__PURE__ */ Q(DP, {
|
|
20854
21023
|
previewKey: "widget-params",
|
|
20855
|
-
info:
|
|
21024
|
+
info: OP(a, v),
|
|
20856
21025
|
previewWidth: s,
|
|
20857
21026
|
children: i(v)
|
|
20858
21027
|
})]
|
|
@@ -20861,10 +21030,10 @@ function SP({ isOpen: e, onClose: t, schema: n, params: r, renderPreview: i, inf
|
|
|
20861
21030
|
}
|
|
20862
21031
|
//#endregion
|
|
20863
21032
|
//#region src/domains/platform/home/Home/WidgetContainer/dragGhost.ts
|
|
20864
|
-
var
|
|
21033
|
+
var jP = (e) => {
|
|
20865
21034
|
let t = e?.cloneNode(!0);
|
|
20866
21035
|
return t instanceof HTMLElement ? (t.classList.remove("invisible"), t.style.transform = "none", t.style.transition = "none", t.removeAttribute("id"), t.querySelectorAll("[id]").forEach((e) => e.removeAttribute("id")), t.setAttribute("aria-hidden", "true"), t.setAttribute("inert", ""), t) : null;
|
|
20867
|
-
},
|
|
21036
|
+
}, MP = (e, t) => {
|
|
20868
21037
|
if (!e || !t) return null;
|
|
20869
21038
|
let n = e.cloneNode(!0);
|
|
20870
21039
|
if (!(n instanceof HTMLElement)) return null;
|
|
@@ -20878,51 +21047,51 @@ var CP = (e) => {
|
|
|
20878
21047
|
width: r.width,
|
|
20879
21048
|
height: r.height
|
|
20880
21049
|
},
|
|
20881
|
-
base:
|
|
21050
|
+
base: PP(e)
|
|
20882
21051
|
};
|
|
20883
|
-
},
|
|
21052
|
+
}, NP = /* @__PURE__ */ new Set([
|
|
20884
21053
|
"rgba(0, 0, 0, 0)",
|
|
20885
21054
|
"transparent",
|
|
20886
21055
|
""
|
|
20887
|
-
]),
|
|
21056
|
+
]), PP = (e) => {
|
|
20888
21057
|
if (typeof getComputedStyle != "function") return null;
|
|
20889
21058
|
for (let t = e; t; t = t.parentElement) {
|
|
20890
21059
|
let e = getComputedStyle(t).backgroundColor;
|
|
20891
|
-
if (!
|
|
21060
|
+
if (!NP.has(e)) return e;
|
|
20892
21061
|
}
|
|
20893
21062
|
return null;
|
|
20894
|
-
},
|
|
21063
|
+
}, FP = /^(https?:\/\/|mailto:|tel:|\/|\.\/|\.\.\/|#|\?)/i, IP = (e) => e && FP.test(e) ? e : void 0, LP = /\[([^[\]\n]+)\]\(([^)\s]+)\)/g, RP = (e) => FP.test(e), zP = (e) => {
|
|
20895
21064
|
let t = [], n = 0;
|
|
20896
|
-
for (let r of e.matchAll(
|
|
21065
|
+
for (let r of e.matchAll(LP)) {
|
|
20897
21066
|
let i = r[1] ?? "", a = r[2] ?? "", o = r.index, s = e[o - 1] === "!", c = e.slice(n, s ? o - 1 : o);
|
|
20898
|
-
c && t.push({ text: c }), t.push(s || !
|
|
21067
|
+
c && t.push({ text: c }), t.push(s || !RP(a) ? { text: i } : {
|
|
20899
21068
|
label: i,
|
|
20900
21069
|
href: a
|
|
20901
21070
|
}), n = o + r[0].length;
|
|
20902
21071
|
}
|
|
20903
21072
|
return n < e.length && t.push({ text: e.slice(n) }), t;
|
|
20904
|
-
},
|
|
21073
|
+
}, BP = ({ text: e }) => /* @__PURE__ */ Q("div", {
|
|
20905
21074
|
className: "text-center text-f1-foreground-secondary",
|
|
20906
|
-
children:
|
|
21075
|
+
children: zP(e).map((e, t) => /* @__PURE__ */ Q(Vc, { children: "href" in e ? /* @__PURE__ */ Q(xr, {
|
|
20907
21076
|
href: e.href,
|
|
20908
21077
|
children: e.label
|
|
20909
21078
|
}) : e.text }, t))
|
|
20910
|
-
}),
|
|
21079
|
+
}), VP = (e) => {
|
|
20911
21080
|
let t = e.findIndex((e) => !e.locked);
|
|
20912
21081
|
return e.slice(0, t < 0 ? e.length : t);
|
|
20913
|
-
},
|
|
20914
|
-
let r =
|
|
21082
|
+
}, HP = (e, t, n) => {
|
|
21083
|
+
let r = VP(e).flatMap((e) => {
|
|
20915
21084
|
let n = t?.querySelector(`[data-widget-id="${e.id}"]`)?.getBoundingClientRect();
|
|
20916
21085
|
return n ? [n.bottom] : [];
|
|
20917
21086
|
});
|
|
20918
21087
|
return r.length > 0 ? Math.max(...r) + n : null;
|
|
20919
|
-
},
|
|
21088
|
+
}, UP = (e) => ({ transform: t, draggingNodeRect: n, activeNodeRect: r }) => {
|
|
20920
21089
|
let i = e(), a = (n ?? r)?.top;
|
|
20921
21090
|
return i == null || a == null ? t : {
|
|
20922
21091
|
...t,
|
|
20923
21092
|
y: Math.max(t.y, i - a)
|
|
20924
21093
|
};
|
|
20925
|
-
},
|
|
21094
|
+
}, WP = ({ id: e, disabled: t = !1, children: n }) => {
|
|
20926
21095
|
let { listeners: r, setNodeRef: i, transform: a, transition: o, isDragging: s } = ee({
|
|
20927
21096
|
id: e,
|
|
20928
21097
|
disabled: t
|
|
@@ -20941,22 +21110,22 @@ var CP = (e) => {
|
|
|
20941
21110
|
...t ? {} : r,
|
|
20942
21111
|
children: n({ isDragging: s })
|
|
20943
21112
|
});
|
|
20944
|
-
},
|
|
21113
|
+
}, GP = 12, KP = 280, qP = 2, JP = /* @__PURE__ */ new Set([
|
|
20945
21114
|
"auto",
|
|
20946
21115
|
"scroll",
|
|
20947
21116
|
"overlay"
|
|
20948
|
-
]),
|
|
21117
|
+
]), YP = (e) => {
|
|
20949
21118
|
let t = e.parentElement;
|
|
20950
21119
|
for (; t && t !== document.body && t !== document.documentElement;) {
|
|
20951
|
-
if (
|
|
21120
|
+
if (JP.has(getComputedStyle(t).getPropertyValue("overflow-y"))) return t;
|
|
20952
21121
|
t = t.parentElement;
|
|
20953
21122
|
}
|
|
20954
21123
|
return null;
|
|
20955
21124
|
};
|
|
20956
|
-
function
|
|
21125
|
+
function XP({ config: e, count: t, gap: n, pinned: r = [], paused: i = !1 }) {
|
|
20957
21126
|
let a = e === !1 ? null : e, [o, s] = X(null), [c, l] = X(null), u = a?.scrollElement ?? c, d = a != null && !i, f = a?.scrollElement != null;
|
|
20958
21127
|
Qc(() => {
|
|
20959
|
-
d && !f && o && l(
|
|
21128
|
+
d && !f && o && l(YP(o));
|
|
20960
21129
|
}, [
|
|
20961
21130
|
d,
|
|
20962
21131
|
f,
|
|
@@ -20977,7 +21146,7 @@ function HP({ config: e, count: t, gap: n, pinned: r = [], paused: i = !1 }) {
|
|
|
20977
21146
|
o,
|
|
20978
21147
|
u
|
|
20979
21148
|
]);
|
|
20980
|
-
let h = d && u != null && t >= (a?.threshold ??
|
|
21149
|
+
let h = d && u != null && t >= (a?.threshold ?? GP), g = Y(r);
|
|
20981
21150
|
g.current = r;
|
|
20982
21151
|
let _ = r.join(","), v = K((e) => {
|
|
20983
21152
|
let t = new Set(ls(e));
|
|
@@ -20989,8 +21158,8 @@ function HP({ config: e, count: t, gap: n, pinned: r = [], paused: i = !1 }) {
|
|
|
20989
21158
|
gap: n,
|
|
20990
21159
|
scrollMargin: p,
|
|
20991
21160
|
rangeExtractor: v,
|
|
20992
|
-
overscan: a?.overscan ??
|
|
20993
|
-
estimateSize: () => a?.estimateHeight ??
|
|
21161
|
+
overscan: a?.overscan ?? qP,
|
|
21162
|
+
estimateSize: () => a?.estimateHeight ?? KP,
|
|
20994
21163
|
getScrollElement: () => u
|
|
20995
21164
|
});
|
|
20996
21165
|
return {
|
|
@@ -21007,10 +21176,10 @@ function HP({ config: e, count: t, gap: n, pinned: r = [], paused: i = !1 }) {
|
|
|
21007
21176
|
}
|
|
21008
21177
|
//#endregion
|
|
21009
21178
|
//#region src/domains/platform/home/Home/WidgetContainer/verticalOnly.ts
|
|
21010
|
-
var
|
|
21179
|
+
var ZP = ({ transform: e }) => ({
|
|
21011
21180
|
...e,
|
|
21012
21181
|
x: 0
|
|
21013
|
-
}),
|
|
21182
|
+
}), QP = ({ arrival: e, stow: t, fullHeight: n, widgetId: r, children: i }) => {
|
|
21014
21183
|
let a = cn(), o = t?.stowed ?? !1, s = e?.order ?? 0, c = a ? YM : e?.arriving ? ZM(s, e.delayMs) : !t || t.instant ? YM : o ? aN : oN;
|
|
21015
21184
|
return /* @__PURE__ */ Q(B.div, {
|
|
21016
21185
|
"data-widget-id": r,
|
|
@@ -21026,7 +21195,7 @@ var UP = ({ transform: e }) => ({
|
|
|
21026
21195
|
transition: c,
|
|
21027
21196
|
children: i
|
|
21028
21197
|
});
|
|
21029
|
-
},
|
|
21198
|
+
}, $P = ({ host: e, children: t }) => {
|
|
21030
21199
|
let n = Y();
|
|
21031
21200
|
if (!n.current) {
|
|
21032
21201
|
let e = document.createElement("div");
|
|
@@ -21046,7 +21215,7 @@ var UP = ({ transform: e }) => ({
|
|
|
21046
21215
|
ref: o,
|
|
21047
21216
|
className: "contents"
|
|
21048
21217
|
}), nl(t, r)] });
|
|
21049
|
-
},
|
|
21218
|
+
}, eF = [
|
|
21050
21219
|
"a",
|
|
21051
21220
|
"button",
|
|
21052
21221
|
"input",
|
|
@@ -21060,28 +21229,28 @@ var UP = ({ transform: e }) => ({
|
|
|
21060
21229
|
"[role='checkbox']",
|
|
21061
21230
|
"[role='tab']",
|
|
21062
21231
|
"[contenteditable='true']"
|
|
21063
|
-
].join(","),
|
|
21232
|
+
].join(","), tF = class extends P {
|
|
21064
21233
|
static activators = [{
|
|
21065
21234
|
eventName: "onPointerDown",
|
|
21066
21235
|
handler: ({ nativeEvent: e }, { onActivation: t }) => {
|
|
21067
21236
|
if (!e.isPrimary || e.button !== 0) return !1;
|
|
21068
21237
|
let n = e.target;
|
|
21069
|
-
return n instanceof Element && n.closest(
|
|
21238
|
+
return n instanceof Element && n.closest(eF) ? !1 : (t?.({ event: e }), !0);
|
|
21070
21239
|
}
|
|
21071
21240
|
}];
|
|
21072
|
-
},
|
|
21241
|
+
}, nF = {
|
|
21073
21242
|
duration: 450,
|
|
21074
21243
|
easing: "cubic-bezier(0.4, 0, 0.1, 1)"
|
|
21075
|
-
},
|
|
21244
|
+
}, rF = (e, t) => {
|
|
21076
21245
|
for (let n = e; n; n = n.parentElement) {
|
|
21077
21246
|
let e = n.querySelector(t);
|
|
21078
21247
|
if (e) return e;
|
|
21079
21248
|
}
|
|
21080
21249
|
return null;
|
|
21081
|
-
},
|
|
21250
|
+
}, iF = {
|
|
21082
21251
|
main: 24,
|
|
21083
21252
|
right: 16
|
|
21084
|
-
},
|
|
21253
|
+
}, aF = ({ hidden: e, placement: t, measureRef: n, children: r }) => /* @__PURE__ */ Q("div", {
|
|
21085
21254
|
ref: t ? n : void 0,
|
|
21086
21255
|
"data-index": t?.index,
|
|
21087
21256
|
hidden: e,
|
|
@@ -21092,7 +21261,7 @@ var UP = ({ transform: e }) => ({
|
|
|
21092
21261
|
width: "100%"
|
|
21093
21262
|
} : { display: e ? void 0 : "contents" },
|
|
21094
21263
|
children: r
|
|
21095
|
-
}),
|
|
21264
|
+
}), oF = ({ onClick: e, label: t, side: n }) => /* @__PURE__ */ Q(vn, {
|
|
21096
21265
|
label: t,
|
|
21097
21266
|
children: /* @__PURE__ */ Q("button", {
|
|
21098
21267
|
type: "button",
|
|
@@ -21106,10 +21275,10 @@ var UP = ({ transform: e }) => ({
|
|
|
21106
21275
|
})
|
|
21107
21276
|
})
|
|
21108
21277
|
});
|
|
21109
|
-
function
|
|
21110
|
-
let j = U(), M = !c, N = (e) => g !== void 0 && e.id !== g, P = M && h != null, F = e.filter((e) => !e.locked).length > 1, [I, ee] = X(null), te = s(Xt(
|
|
21278
|
+
function sF({ widgets: e = [], side: t = "main", children: n, footnote: r, slotRenderers: a, renderWidget: o, disableEdition: c = !1, disableDrag: l = !1, widgetHostFor: u, afterWidgets: d, dragSurfaceSelector: f, onRemoveWidget: p, onClickAddNewWidget: m, onReorder: h, visibleWidgetId: g, entrance: _ = {}, virtualized: v = !1, stow: b, addWidgetLabel: x, onChangeWidgetParams: S, rebuildWidget: C, renderWidgetPreview: w, paramsPreviewWidth: T, removeLabel: E, editParamsLabel: D, ctx: O = {}, className: k, style: A }) {
|
|
21279
|
+
let j = U(), M = !c, N = (e) => g !== void 0 && e.id !== g, P = M && h != null, F = e.filter((e) => !e.locked).length > 1, [I, ee] = X(null), te = s(Xt(tF, { activationConstraint: { distance: 4 } })), [re, ie] = X(null), L = e.find((e) => e.id === re), [oe, se] = X(null), ce = Y(null), R = Y(null), le = Y(null), ue = Y(null), fe = J(() => [ZP, UP(() => ue.current)], []), pe = (e) => {
|
|
21111
21280
|
let t = ce.current?.querySelector(`[data-widget-id="${e}"]`);
|
|
21112
|
-
R.current =
|
|
21281
|
+
R.current = jP(t), le.current = f ? MP(rF(ce.current, f), t) : null;
|
|
21113
21282
|
}, me = (e) => {
|
|
21114
21283
|
e && R.current && e.replaceChildren(R.current);
|
|
21115
21284
|
}, he = Y(0), ge = () => cancelAnimationFrame(he.current), _e = (e) => {
|
|
@@ -21124,14 +21293,14 @@ function $P({ widgets: e = [], side: t = "main", children: n, footnote: r, slotR
|
|
|
21124
21293
|
e.style.transform = `translate3d(${-t}px, ${-i}px, 0)`, he.current = requestAnimationFrame(r);
|
|
21125
21294
|
};
|
|
21126
21295
|
r();
|
|
21127
|
-
}, ve =
|
|
21296
|
+
}, ve = XP({
|
|
21128
21297
|
config: v === !0 ? {} : v,
|
|
21129
21298
|
count: e.length,
|
|
21130
|
-
gap:
|
|
21299
|
+
gap: iF[t],
|
|
21131
21300
|
pinned: I ? [e.findIndex((e) => e.id === I)] : [],
|
|
21132
21301
|
paused: g !== void 0
|
|
21133
21302
|
}), ye = v !== !1 && g !== void 0, be = ({ activatorEvent: t, delta: n, active: r }) => {
|
|
21134
|
-
let i = r.rect.current.translated, a = t, o = a.clientX == null ? null : a.clientX + n.x, s = a.clientY == null ? null : a.clientY + n.y, c = ue.current == null ? [] :
|
|
21303
|
+
let i = r.rect.current.translated, a = t, o = a.clientX == null ? null : a.clientX + n.x, s = a.clientY == null ? null : a.clientY + n.y, c = ue.current == null ? [] : VP(e);
|
|
21135
21304
|
return e.find((e) => {
|
|
21136
21305
|
if (!e.locked || c.includes(e)) return !1;
|
|
21137
21306
|
let t = ce.current?.querySelector(`[data-widget-id="${e.id}"]`)?.getBoundingClientRect();
|
|
@@ -21180,7 +21349,7 @@ function $P({ widgets: e = [], side: t = "main", children: n, footnote: r, slotR
|
|
|
21180
21349
|
children: we(e, t, n)
|
|
21181
21350
|
}), we = (e, t, n = e.params) => {
|
|
21182
21351
|
let r = xe(e);
|
|
21183
|
-
if (!o) return /* @__PURE__ */ Q(
|
|
21352
|
+
if (!o) return /* @__PURE__ */ Q(CP, {
|
|
21184
21353
|
...zN(e),
|
|
21185
21354
|
header: e.header,
|
|
21186
21355
|
params: n,
|
|
@@ -21218,7 +21387,7 @@ function $P({ widgets: e = [], side: t = "main", children: n, footnote: r, slotR
|
|
|
21218
21387
|
instant: b.stowed
|
|
21219
21388
|
}, Oe = (e, t, n, r) => {
|
|
21220
21389
|
let i = n ? De(n) : void 0;
|
|
21221
|
-
return !Te && !i && !r ? t : /* @__PURE__ */ Q(
|
|
21390
|
+
return !Te && !i && !r ? t : /* @__PURE__ */ Q(QP, {
|
|
21222
21391
|
arrival: Te ? {
|
|
21223
21392
|
order: (Te.order ?? 0) + e,
|
|
21224
21393
|
delayMs: Te.delayMs ?? 0,
|
|
@@ -21229,13 +21398,13 @@ function $P({ widgets: e = [], side: t = "main", children: n, footnote: r, slotR
|
|
|
21229
21398
|
widgetId: r,
|
|
21230
21399
|
children: t
|
|
21231
21400
|
});
|
|
21232
|
-
}, ke = (e, t, n) => /* @__PURE__ */ Q(
|
|
21401
|
+
}, ke = (e, t, n) => /* @__PURE__ */ Q(aF, {
|
|
21233
21402
|
hidden: N(e),
|
|
21234
21403
|
placement: n,
|
|
21235
21404
|
measureRef: ve.measureRef,
|
|
21236
|
-
children: /* @__PURE__ */ Q(
|
|
21405
|
+
children: /* @__PURE__ */ Q($P, {
|
|
21237
21406
|
host: u?.(e),
|
|
21238
|
-
children: P ? /* @__PURE__ */ Q(
|
|
21407
|
+
children: P ? /* @__PURE__ */ Q(WP, {
|
|
21239
21408
|
id: e.id,
|
|
21240
21409
|
disabled: e.locked || l || !F,
|
|
21241
21410
|
children: (n) => Oe(t, Ce(e, n), e)
|
|
@@ -21261,7 +21430,7 @@ function $P({ widgets: e = [], side: t = "main", children: n, footnote: r, slotR
|
|
|
21261
21430
|
collisionDetection: de,
|
|
21262
21431
|
modifiers: fe,
|
|
21263
21432
|
onDragStart: ({ active: n }) => {
|
|
21264
|
-
pe(String(n.id)), ue.current =
|
|
21433
|
+
pe(String(n.id)), ue.current = HP(e, ce.current, iF[t]), ee(String(n.id));
|
|
21265
21434
|
},
|
|
21266
21435
|
onDragCancel: () => {
|
|
21267
21436
|
ee(null), ge(), R.current = null, le.current = null, ue.current = null;
|
|
@@ -21281,7 +21450,7 @@ function $P({ widgets: e = [], side: t = "main", children: n, footnote: r, slotR
|
|
|
21281
21450
|
className: "fixed inset-0 z-50 cursor-grabbing"
|
|
21282
21451
|
}) : null,
|
|
21283
21452
|
/* @__PURE__ */ Q(y, {
|
|
21284
|
-
dropAnimation:
|
|
21453
|
+
dropAnimation: nF,
|
|
21285
21454
|
children: I ? /* @__PURE__ */ $("div", {
|
|
21286
21455
|
className: "relative h-full w-full cursor-grabbing overflow-hidden rounded-xl bg-f1-background",
|
|
21287
21456
|
children: [/* @__PURE__ */ Q("div", {
|
|
@@ -21296,13 +21465,13 @@ function $P({ widgets: e = [], side: t = "main", children: n, footnote: r, slotR
|
|
|
21296
21465
|
]
|
|
21297
21466
|
}) : Ae,
|
|
21298
21467
|
d,
|
|
21299
|
-
r == null ? null : Oe(e.length, /* @__PURE__ */ Q(
|
|
21300
|
-
!c && m ? Oe(e.length + (r == null ? 0 : 1), /* @__PURE__ */ Q(
|
|
21468
|
+
r == null ? null : Oe(e.length, /* @__PURE__ */ Q(BP, { text: r })),
|
|
21469
|
+
!c && m ? Oe(e.length + (r == null ? 0 : 1), /* @__PURE__ */ Q(oF, {
|
|
21301
21470
|
onClick: m,
|
|
21302
21471
|
label: x ?? j.widgets.addWidget,
|
|
21303
21472
|
side: t
|
|
21304
21473
|
})) : null,
|
|
21305
|
-
L?.paramsSchema && S ? /* @__PURE__ */ Q(
|
|
21474
|
+
L?.paramsSchema && S ? /* @__PURE__ */ Q(AP, {
|
|
21306
21475
|
isOpen: !0,
|
|
21307
21476
|
onClose: () => ie(null),
|
|
21308
21477
|
schema: L.paramsSchema,
|
|
@@ -21317,7 +21486,7 @@ function $P({ widgets: e = [], side: t = "main", children: n, footnote: r, slotR
|
|
|
21317
21486
|
}
|
|
21318
21487
|
//#endregion
|
|
21319
21488
|
//#region src/domains/platform/home/Home/NewHomeLayout/useRailMotion.ts
|
|
21320
|
-
var
|
|
21489
|
+
var cF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
21321
21490
|
let a = cn(), [o, s] = X(!1);
|
|
21322
21491
|
q(() => {
|
|
21323
21492
|
r && s(!0);
|
|
@@ -21347,173 +21516,14 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
21347
21516
|
},
|
|
21348
21517
|
glyphDelayMs: o ? 90 : 220
|
|
21349
21518
|
};
|
|
21350
|
-
},
|
|
21519
|
+
}, lF = {
|
|
21351
21520
|
morning: "bg-gradient-to-bl from-[#E51943] from-20% via-[#F97316] via-35% to-transparent to-50%",
|
|
21352
21521
|
afternoon: "bg-gradient-to-bl from-[#5596F6] from-20% via-[#10B881] via-35% to-transparent to-50%",
|
|
21353
21522
|
evening: "bg-gradient-to-bl from-[#3739A8] from-20% via-[#CB6687] via-35% to-transparent to-50%"
|
|
21354
|
-
},
|
|
21523
|
+
}, uF = ({ period: e, className: t }) => /* @__PURE__ */ Q("div", {
|
|
21355
21524
|
"aria-hidden": !0,
|
|
21356
|
-
className: W("pointer-events-none absolute inset-0 h-screen max-h-[1000px] opacity-[0.08]",
|
|
21357
|
-
}),
|
|
21358
|
-
let t = cn(), [n, r] = X(!0), i = e && !t;
|
|
21359
|
-
return q(() => {
|
|
21360
|
-
if (!i) return;
|
|
21361
|
-
let e = setInterval(() => r((e) => !e), aF);
|
|
21362
|
-
return () => {
|
|
21363
|
-
clearInterval(e), r(!0);
|
|
21364
|
-
};
|
|
21365
|
-
}, [i]), !i || n;
|
|
21366
|
-
}, sF = ({ text: e, ticking: t }) => /* @__PURE__ */ Q(cP, {
|
|
21367
|
-
text: e,
|
|
21368
|
-
ticking: t,
|
|
21369
|
-
className: "px-2 text-2xl font-semibold"
|
|
21370
|
-
}), cF = {
|
|
21371
|
-
neutral: {
|
|
21372
|
-
pill: "bg-f1-background-inverse text-f1-foreground-inverse",
|
|
21373
|
-
button: "bg-f1-background-accent-bold hover:bg-f1-background-accent-bold-hover",
|
|
21374
|
-
icon: "inverse",
|
|
21375
|
-
ring: "ring-f1-border-inverse",
|
|
21376
|
-
solo: "bg-f1-background-accent-bold hover:bg-f1-background-accent-bold-hover",
|
|
21377
|
-
soloIcon: "inverse",
|
|
21378
|
-
soloRing: "ring-f1-border-inverse"
|
|
21379
|
-
},
|
|
21380
|
-
accent: {
|
|
21381
|
-
pill: "bg-f1-background-accent-bold text-f1-foreground-inverse",
|
|
21382
|
-
button: "bg-f1-background hover:bg-f1-background",
|
|
21383
|
-
icon: "accent",
|
|
21384
|
-
ring: "ring-f1-border-secondary",
|
|
21385
|
-
solo: "bg-f1-background-accent-bold hover:bg-f1-background-accent-bold-hover",
|
|
21386
|
-
soloIcon: "inverse",
|
|
21387
|
-
soloRing: "ring-f1-border-inverse"
|
|
21388
|
-
},
|
|
21389
|
-
critical: {
|
|
21390
|
-
pill: "bg-f1-background-critical-bold text-f1-foreground-inverse",
|
|
21391
|
-
button: "bg-f1-background hover:bg-f1-background",
|
|
21392
|
-
icon: "critical",
|
|
21393
|
-
ring: "ring-f1-border-secondary",
|
|
21394
|
-
solo: "bg-f1-background-critical-bold",
|
|
21395
|
-
soloIcon: "inverse",
|
|
21396
|
-
soloRing: "ring-f1-border-inverse"
|
|
21397
|
-
},
|
|
21398
|
-
warning: {
|
|
21399
|
-
pill: "bg-f1-background-warning-bold text-f1-foreground-inverse",
|
|
21400
|
-
button: "bg-f1-background hover:bg-f1-background",
|
|
21401
|
-
icon: "warning",
|
|
21402
|
-
ring: "ring-f1-border-secondary",
|
|
21403
|
-
solo: "bg-f1-background-warning-bold",
|
|
21404
|
-
soloIcon: "inverse",
|
|
21405
|
-
soloRing: "ring-f1-border-inverse"
|
|
21406
|
-
},
|
|
21407
|
-
promote: {
|
|
21408
|
-
pill: "bg-f1-background-promote-bold text-f1-foreground-inverse",
|
|
21409
|
-
button: "bg-f1-background hover:bg-f1-background",
|
|
21410
|
-
icon: "promote",
|
|
21411
|
-
ring: "ring-f1-border-secondary",
|
|
21412
|
-
solo: "bg-f1-background-promote-bold",
|
|
21413
|
-
soloIcon: "inverse",
|
|
21414
|
-
soloRing: "ring-f1-border-inverse"
|
|
21415
|
-
},
|
|
21416
|
-
positive: {
|
|
21417
|
-
pill: "bg-f1-background-positive-bold text-f1-foreground-inverse",
|
|
21418
|
-
button: "bg-f1-background hover:bg-f1-background",
|
|
21419
|
-
icon: "positive",
|
|
21420
|
-
ring: "ring-f1-border-secondary",
|
|
21421
|
-
solo: "bg-f1-background-positive-bold",
|
|
21422
|
-
soloIcon: "inverse",
|
|
21423
|
-
soloRing: "ring-f1-border-inverse"
|
|
21424
|
-
}
|
|
21425
|
-
}, lF = (e, t) => {
|
|
21426
|
-
let n = cn();
|
|
21427
|
-
return {
|
|
21428
|
-
initial: {
|
|
21429
|
-
opacity: 0,
|
|
21430
|
-
x: n ? 0 : -8
|
|
21431
|
-
},
|
|
21432
|
-
animate: {
|
|
21433
|
-
opacity: 1,
|
|
21434
|
-
x: 0
|
|
21435
|
-
},
|
|
21436
|
-
exit: {
|
|
21437
|
-
opacity: 0,
|
|
21438
|
-
x: n ? 0 : -8
|
|
21439
|
-
},
|
|
21440
|
-
whileTap: n ? void 0 : { scale: eN },
|
|
21441
|
-
transition: cN({
|
|
21442
|
-
...rN,
|
|
21443
|
-
delay: XM(e, t)
|
|
21444
|
-
}, n)
|
|
21445
|
-
};
|
|
21446
|
-
}, uF = ({ hasUpdates: e }) => e ? /* @__PURE__ */ Q("span", { className: "pointer-events-none absolute -right-0.5 -top-0.5 h-2 w-2 rounded-full bg-f1-background-accent-bold ring-2 ring-f1-background" }) : null, dF = ({ widget: e, action: t, order: n, open: r, delayMs: i, onOpen: a, onCancelOpen: o }) => {
|
|
21447
|
-
let s = lF(n, i), c = oF(!!t.flashing && !r), l = t.text && !r ? t.text : void 0, u = cF[t.tone ?? "neutral"];
|
|
21448
|
-
return /* @__PURE__ */ Q(vn, {
|
|
21449
|
-
label: t.label,
|
|
21450
|
-
instant: !0,
|
|
21451
|
-
children: /* @__PURE__ */ $(B.div, {
|
|
21452
|
-
className: W("group pointer-events-auto relative shrink-0", l ? W("-mr-1 -my-1 flex flex-row items-center gap-1 rounded-lg p-1", u.pill) : "rounded-lg"),
|
|
21453
|
-
"data-widget-glyph": e.id,
|
|
21454
|
-
onMouseEnter: (t) => a(e.id, t.currentTarget),
|
|
21455
|
-
onMouseLeave: o,
|
|
21456
|
-
onFocus: (t) => a(e.id, t.currentTarget, !0),
|
|
21457
|
-
...s,
|
|
21458
|
-
children: [
|
|
21459
|
-
l ? /* @__PURE__ */ Q(sF, {
|
|
21460
|
-
text: l,
|
|
21461
|
-
ticking: !!t.ticking
|
|
21462
|
-
}) : null,
|
|
21463
|
-
/* @__PURE__ */ Q(an, {
|
|
21464
|
-
type: "button",
|
|
21465
|
-
variant: "ghost",
|
|
21466
|
-
size: "lg",
|
|
21467
|
-
className: W("size-10 shadow-none after:hidden hover:shadow-none active:shadow-none [&_.main]:px-0", t.text ? u.button : u.solo, "ring-inset group-hover:ring-1", r && "ring-1", t.text ? u.ring : u.soloRing),
|
|
21468
|
-
"aria-label": `${t.label}, ${IN(e)}`,
|
|
21469
|
-
onClick: () => t.onClick(),
|
|
21470
|
-
children: /* @__PURE__ */ Q(V, {
|
|
21471
|
-
size: "lg",
|
|
21472
|
-
color: t.text ? u.icon : u.soloIcon,
|
|
21473
|
-
icon: c || !e.icon ? t.icon : e.icon
|
|
21474
|
-
})
|
|
21475
|
-
}),
|
|
21476
|
-
/* @__PURE__ */ Q(uF, { hasUpdates: e.hasUpdates })
|
|
21477
|
-
]
|
|
21478
|
-
})
|
|
21479
|
-
});
|
|
21480
|
-
}, fF = ({ widget: e, order: t, open: n, delayMs: r, onOpen: i, onCancelOpen: a, onClose: o }) => {
|
|
21481
|
-
let s = e.railAction, c = lF(t, r);
|
|
21482
|
-
return s ? /* @__PURE__ */ Q(dF, {
|
|
21483
|
-
widget: e,
|
|
21484
|
-
action: s,
|
|
21485
|
-
order: t,
|
|
21486
|
-
open: n,
|
|
21487
|
-
delayMs: r,
|
|
21488
|
-
onOpen: i,
|
|
21489
|
-
onCancelOpen: a
|
|
21490
|
-
}) : e.loading && !e.icon ? /* @__PURE__ */ Q(B.div, {
|
|
21491
|
-
"aria-hidden": !0,
|
|
21492
|
-
className: "pointer-events-none shrink-0",
|
|
21493
|
-
...c,
|
|
21494
|
-
children: /* @__PURE__ */ Q(H, { className: "h-10 w-10 rounded-lg" })
|
|
21495
|
-
}) : /* @__PURE__ */ Q(B.button, {
|
|
21496
|
-
type: "button",
|
|
21497
|
-
"aria-label": IN(e),
|
|
21498
|
-
"aria-expanded": n,
|
|
21499
|
-
"data-widget-glyph": e.id,
|
|
21500
|
-
onMouseEnter: (t) => i(e.id, t.currentTarget),
|
|
21501
|
-
onMouseLeave: a,
|
|
21502
|
-
onClick: (t) => n ? o() : i(e.id, t.currentTarget, !0),
|
|
21503
|
-
className: "pointer-events-auto rounded-lg",
|
|
21504
|
-
...c,
|
|
21505
|
-
children: /* @__PURE__ */ $("span", {
|
|
21506
|
-
className: "relative inline-flex",
|
|
21507
|
-
children: [e.icon ? /* @__PURE__ */ Q(Oo, {
|
|
21508
|
-
icon: e.icon,
|
|
21509
|
-
size: "lg"
|
|
21510
|
-
}) : /* @__PURE__ */ Q("span", {
|
|
21511
|
-
className: "flex h-10 w-10 items-center justify-center rounded-lg border border-solid border-f1-border-secondary bg-f1-background font-medium text-f1-foreground-secondary",
|
|
21512
|
-
children: IN(e).charAt(0)
|
|
21513
|
-
}), /* @__PURE__ */ Q(uF, { hasUpdates: e.hasUpdates })]
|
|
21514
|
-
})
|
|
21515
|
-
});
|
|
21516
|
-
}, pF = "[scrollbar-width:none] [&::-webkit-scrollbar]:hidden", mF = 16, hF = 768, gF = { display: "contents" }, _F = 150, vF = 150, yF = Gc(function({ children: e, mainFootnote: t, leftWidgets: n = [], rightWidgets: r = [], aside: i, slotRenderers: a, renderWidget: o, editableWidgetContainers: s = ["main", "right"], addableWidgetContainers: c, virtualizedWidgetContainers: l = [], virtualization: u, onRemoveWidget: d, onChangeWidgetParams: f, rebuildWidget: p, renderWidgetPreview: m, onClickAddNewWidget: h, onReorderWidgets: g, tracking: _, period: v = "morning", asideWidth: y = 396, mainWidth: b = iF, bleed: x = 24, stackedPinsAfter: S = 2, ctx: C = {}, className: w, oneSwitchTooltip: T, oneSwitchAutoOpen: E, hideOneSwitch: D = !1 }, O) {
|
|
21525
|
+
className: W("pointer-events-none absolute inset-0 h-screen max-h-[1000px] opacity-[0.08]", lF[e], t)
|
|
21526
|
+
}), dF = 40, fF = 672, pF = "[scrollbar-width:none] [&::-webkit-scrollbar]:hidden", mF = 16, hF = 768, gF = { display: "contents" }, _F = 150, vF = 150, yF = Gc(function({ children: e, mainFootnote: t, leftWidgets: n = [], rightWidgets: r = [], aside: i, slotRenderers: a, renderWidget: o, editableWidgetContainers: s = ["main", "right"], addableWidgetContainers: c, virtualizedWidgetContainers: l = [], virtualization: u, onRemoveWidget: d, onChangeWidgetParams: f, rebuildWidget: p, renderWidgetPreview: m, onClickAddNewWidget: h, onReorderWidgets: g, tracking: _, period: v = "morning", asideWidth: y = 396, mainWidth: b = fF, bleed: x = 24, stackedPinsAfter: S = 2, ctx: C = {}, className: w, oneSwitchTooltip: T, oneSwitchAutoOpen: E, hideOneSwitch: D = !1 }, O) {
|
|
21517
21527
|
let k = U(), { sidebarState: A, toggleSidebar: j, isSmallScreen: M, hasRail: N } = mc(), P = cn(), F = Y(null), [I, ee] = X(0), [te, ne] = X(!1), [re, ie] = X(null), [L, ae] = X(0), [oe, se] = X(!1), ce = Y(null), R = Y(null);
|
|
21518
21528
|
Qc(() => {
|
|
21519
21529
|
let e = F.current;
|
|
@@ -21526,10 +21536,10 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
21526
21536
|
let n = new ResizeObserver(t);
|
|
21527
21537
|
return n.observe(e), () => n.disconnect();
|
|
21528
21538
|
}, []);
|
|
21529
|
-
let [le, ue] = X(null), de = (e) => s.includes(e), fe = (e) => de(e) && (c?.includes(e) ?? !0), pe =
|
|
21539
|
+
let [le, ue] = X(null), de = (e) => s.includes(e), fe = (e) => de(e) && (c?.includes(e) ?? !0), pe = _P(), me = _P(), he = _P(), ge = (e) => l.includes(e) ? {
|
|
21530
21540
|
...u,
|
|
21531
21541
|
scrollElement: e === "main" ? pe.element : me.element
|
|
21532
|
-
} : !1, _e = i != null || r.length > 0 || h != null && fe("right"), ve = I > 0 && I < b + mF + y, ye = _e && r.length > 0 && (ve || (le ?? !1)), be = ye ?
|
|
21542
|
+
} : !1, _e = i != null || r.length > 0 || h != null && fe("right"), ve = I > 0 && I < b + mF + y, ye = _e && r.length > 0 && (ve || (le ?? !1)), be = ye ? dF : y, xe = ye ? "Expand widgets panel" : "Collapse widgets panel", Se = _e && te, Ce = I > 0 && I < hF, we = Se && !Ce && (ye || I >= hF), Te = {
|
|
21533
21543
|
pinned: r.filter((e) => e.locked),
|
|
21534
21544
|
rest: r.filter((e) => !e.locked)
|
|
21535
21545
|
}, [Ee, De] = X({}), Oe = Y(/* @__PURE__ */ new Map()), ke = (e) => {
|
|
@@ -21556,7 +21566,7 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
21556
21566
|
}, [ye]), q(() => () => {
|
|
21557
21567
|
R.current && clearTimeout(R.current), ce.current && clearTimeout(ce.current);
|
|
21558
21568
|
}, []);
|
|
21559
|
-
let Fe =
|
|
21569
|
+
let Fe = cF({
|
|
21560
21570
|
collapsed: ye,
|
|
21561
21571
|
open: Pe != null,
|
|
21562
21572
|
glide: oe,
|
|
@@ -21623,7 +21633,7 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
21623
21633
|
left: -x,
|
|
21624
21634
|
right: -x
|
|
21625
21635
|
},
|
|
21626
|
-
children: /* @__PURE__ */ Q(
|
|
21636
|
+
children: /* @__PURE__ */ Q(uF, { period: v })
|
|
21627
21637
|
}),
|
|
21628
21638
|
/* @__PURE__ */ $(vN, {
|
|
21629
21639
|
order: 0,
|
|
@@ -21668,7 +21678,7 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
21668
21678
|
paddingRight: we ? mF : x,
|
|
21669
21679
|
...pe.style
|
|
21670
21680
|
},
|
|
21671
|
-
children: /* @__PURE__ */ Q(
|
|
21681
|
+
children: /* @__PURE__ */ Q(sF, {
|
|
21672
21682
|
side: "main",
|
|
21673
21683
|
className: "relative mx-auto w-full",
|
|
21674
21684
|
style: { maxWidth: `${b}px` },
|
|
@@ -21711,7 +21721,7 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
21711
21721
|
transition: cN(nN, P),
|
|
21712
21722
|
onMouseLeave: Ue,
|
|
21713
21723
|
onMouseEnter: Ve,
|
|
21714
|
-
children: [r.map((e, t) => /* @__PURE__ */ Q(
|
|
21724
|
+
children: [r.map((e, t) => /* @__PURE__ */ Q(gP, {
|
|
21715
21725
|
widget: e,
|
|
21716
21726
|
order: t,
|
|
21717
21727
|
open: re === e.id,
|
|
@@ -21754,7 +21764,7 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
21754
21764
|
transition: Fe.transition,
|
|
21755
21765
|
onMouseEnter: ye ? Ve : void 0,
|
|
21756
21766
|
onMouseLeave: ye ? Ue : void 0,
|
|
21757
|
-
children: /* @__PURE__ */ Q(
|
|
21767
|
+
children: /* @__PURE__ */ Q(sF, {
|
|
21758
21768
|
side: "right",
|
|
21759
21769
|
widgets: r,
|
|
21760
21770
|
visibleWidgetId: !Ce && Ie ? ze : void 0,
|
|
@@ -21800,14 +21810,14 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
21800
21810
|
...e,
|
|
21801
21811
|
icon: bF(e.icon) ?? Hr
|
|
21802
21812
|
} : e, SF = (e, t, n) => ({
|
|
21803
|
-
...e.type === "navigate" &&
|
|
21813
|
+
...e.type === "navigate" && IP(e.href) ? { href: e.href } : {},
|
|
21804
21814
|
onClick: () => n(e, t)
|
|
21805
21815
|
}), CF = (e, t, n) => ({
|
|
21806
21816
|
label: e.label,
|
|
21807
21817
|
icon: bF(e.icon),
|
|
21808
21818
|
variant: e.variant,
|
|
21809
21819
|
...SF(e.action, t, n)
|
|
21810
|
-
}), wF = ({ title: e, slots: t, loading: n, slotRenderers: r, fullHeight: i }) => /* @__PURE__ */ Q(
|
|
21820
|
+
}), wF = ({ title: e, slots: t, loading: n, slotRenderers: r, fullHeight: i }) => /* @__PURE__ */ Q(CP, {
|
|
21811
21821
|
headless: !e,
|
|
21812
21822
|
header: e ? { title: e } : void 0,
|
|
21813
21823
|
fullHeight: i,
|
|
@@ -22236,7 +22246,7 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
22236
22246
|
}] })] }, e))
|
|
22237
22247
|
}), EI = ({ action: e, ...t }, n, r) => ({
|
|
22238
22248
|
...t,
|
|
22239
|
-
href:
|
|
22249
|
+
href: IP(t.href),
|
|
22240
22250
|
...e ? {
|
|
22241
22251
|
href: void 0,
|
|
22242
22252
|
...SF(e, {
|
|
@@ -22276,7 +22286,7 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
22276
22286
|
children: e.title
|
|
22277
22287
|
}) : null, /* @__PURE__ */ Q("div", {
|
|
22278
22288
|
className: "text-lg [&_[data-list-row]]:gap-4",
|
|
22279
|
-
children: /* @__PURE__ */ Q(
|
|
22289
|
+
children: /* @__PURE__ */ Q(SP, { slots: OI(e, t, n) })
|
|
22280
22290
|
})]
|
|
22281
22291
|
}), AI = ({ content: e, elementId: t, onAction: n }) => e.bare ? /* @__PURE__ */ Q(kI, {
|
|
22282
22292
|
content: e,
|
|
@@ -22293,7 +22303,7 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
22293
22303
|
variant: "row",
|
|
22294
22304
|
post: {
|
|
22295
22305
|
...n,
|
|
22296
|
-
href:
|
|
22306
|
+
href: IP(t),
|
|
22297
22307
|
createdAt: new Date(e)
|
|
22298
22308
|
}
|
|
22299
22309
|
}, n.id))
|
|
@@ -22446,7 +22456,7 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
22446
22456
|
content: e.value ?? ""
|
|
22447
22457
|
})
|
|
22448
22458
|
}, t);
|
|
22449
|
-
case "link": return e.url &&
|
|
22459
|
+
case "link": return e.url && RP(e.url) ? /* @__PURE__ */ Q(xr, {
|
|
22450
22460
|
href: e.url,
|
|
22451
22461
|
children: WI(e)
|
|
22452
22462
|
}, t) : WI(e);
|
|
@@ -22699,12 +22709,12 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
22699
22709
|
} : n;
|
|
22700
22710
|
}, yL = (e, t) => e.type !== "shortcuts" && e.type !== "text" && e.type !== "widget" && t?.status === "ready" && t.block && rI(e, t) ? vL(e, t.block) : void 0, bL = Wc(void 0), xL = bL.Provider, SL = () => Yc(bL), CL = ({ widget: e, bare: t = !1 }) => {
|
|
22701
22711
|
let n = SL();
|
|
22702
|
-
return t ? /* @__PURE__ */ Q(
|
|
22712
|
+
return t ? /* @__PURE__ */ Q(SP, {
|
|
22703
22713
|
headless: !0,
|
|
22704
22714
|
slots: e.slots,
|
|
22705
22715
|
loading: e.loading,
|
|
22706
22716
|
slotRenderers: n
|
|
22707
|
-
}) : /* @__PURE__ */ Q(
|
|
22717
|
+
}) : /* @__PURE__ */ Q(CP, {
|
|
22708
22718
|
...zN(e),
|
|
22709
22719
|
headless: !0,
|
|
22710
22720
|
params: e.params,
|
|
@@ -22820,7 +22830,7 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
22820
22830
|
} }), n = c + i.length;
|
|
22821
22831
|
}
|
|
22822
22832
|
return n < e.length && t.push({ text: e.slice(n) }), t;
|
|
22823
|
-
}, HL = ({ text: e }) => /* @__PURE__ */ Q(Z, { children:
|
|
22833
|
+
}, HL = ({ text: e }) => /* @__PURE__ */ Q(Z, { children: zP(e).map((e, t) => /* @__PURE__ */ Q(Vc, { children: "href" in e ? /* @__PURE__ */ Q(xr, {
|
|
22824
22834
|
href: e.href,
|
|
22825
22835
|
children: e.label
|
|
22826
22836
|
}) : /* @__PURE__ */ Q(zL, { text: e.text }) }, t)) }), UL = ({ text: e }) => {
|
|
@@ -22955,7 +22965,7 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
22955
22965
|
};
|
|
22956
22966
|
}, rR = (e, t) => JSON.stringify([e, Object.entries(t).sort(([e], [t]) => e.localeCompare(t))]), iR = ({ element: e, state: t }) => {
|
|
22957
22967
|
let n = SL();
|
|
22958
|
-
return !t || t.status === "loading" ? /* @__PURE__ */ Q(hL, { element: e }) : t.status === "error" ? /* @__PURE__ */ Q(kF, { message: t.message }) : t.widget ? /* @__PURE__ */ Q(
|
|
22968
|
+
return !t || t.status === "loading" ? /* @__PURE__ */ Q(hL, { element: e }) : t.status === "error" ? /* @__PURE__ */ Q(kF, { message: t.message }) : t.widget ? /* @__PURE__ */ Q(SP, {
|
|
22959
22969
|
slots: t.widget.slots,
|
|
22960
22970
|
loading: t.widget.loading,
|
|
22961
22971
|
slotRenderers: n
|
|
@@ -23095,16 +23105,130 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
23095
23105
|
variant: "description",
|
|
23096
23106
|
content: e.subtitle
|
|
23097
23107
|
}) : null]
|
|
23098
|
-
}), pR = (e, t, n) => {
|
|
23108
|
+
}), pR = 180, mR = 396, hR = 8, gR = ({ glyphCenter: e, panelHeight: t, railHeight: n }) => {
|
|
23109
|
+
let r = n - t - hR;
|
|
23110
|
+
return r <= hR ? hR : Math.min(Math.max(e - t / 2, hR), r);
|
|
23111
|
+
}, _R = ({ widgets: e, slotRenderers: t, clock: n, onAdd: r, onRemove: i, onChangeParams: a }) => {
|
|
23112
|
+
let o = U(), s = Xc(), c = Y(null), l = Y(null), u = Y(null), [d, f] = X(null), [p, m] = X(null), [h, g] = X(!1), [_, v] = X(0), y = () => {
|
|
23113
|
+
u.current && clearTimeout(u.current), u.current = null;
|
|
23114
|
+
}, b = (e = pR) => {
|
|
23115
|
+
y(), u.current = setTimeout(() => f(null), e);
|
|
23116
|
+
}, x = (e, t) => {
|
|
23117
|
+
y();
|
|
23118
|
+
let n = t.getBoundingClientRect(), r = c.current?.getBoundingClientRect();
|
|
23119
|
+
g(d != null), m({
|
|
23120
|
+
id: e,
|
|
23121
|
+
center: n.top + n.height / 2 - (r?.top ?? 0),
|
|
23122
|
+
railHeight: r?.height ?? 0
|
|
23123
|
+
}), f(e);
|
|
23124
|
+
};
|
|
23125
|
+
q(() => y, []), Qc(() => {
|
|
23126
|
+
let e = l.current;
|
|
23127
|
+
if (!e || (v(e.offsetHeight), typeof ResizeObserver != "function")) return;
|
|
23128
|
+
let t = new ResizeObserver(() => v(e.offsetHeight));
|
|
23129
|
+
return t.observe(e), () => t.disconnect();
|
|
23130
|
+
}, []);
|
|
23131
|
+
let S = (t) => e.some((e) => e.id === t), C = S(d) ? d : null, w = cF({
|
|
23132
|
+
collapsed: !0,
|
|
23133
|
+
open: C != null,
|
|
23134
|
+
glide: h,
|
|
23135
|
+
drawn: !0,
|
|
23136
|
+
width: mR
|
|
23137
|
+
}), T = C ?? (!w.panelHidden && p && S(p.id) ? p.id : null), E = e.find((e) => e.id === T), D = p ? gR({
|
|
23138
|
+
glyphCenter: p.center,
|
|
23139
|
+
panelHeight: _,
|
|
23140
|
+
railHeight: p.railHeight
|
|
23141
|
+
}) : 0;
|
|
23142
|
+
return /* @__PURE__ */ $("div", {
|
|
23143
|
+
ref: c,
|
|
23144
|
+
className: "pointer-events-none absolute inset-y-0 right-0 z-30 flex flex-col items-end p-4",
|
|
23145
|
+
onFocus: y,
|
|
23146
|
+
onBlur: () => b(0),
|
|
23147
|
+
onKeyDown: (e) => {
|
|
23148
|
+
e.key === "Escape" && C && e.currentTarget.contains(e.target) && (e.stopPropagation(), f(null), e.currentTarget.querySelector(`[data-widget-glyph="${C}"]`)?.focus());
|
|
23149
|
+
},
|
|
23150
|
+
children: [
|
|
23151
|
+
n ? /* @__PURE__ */ Q("div", {
|
|
23152
|
+
className: "pointer-events-auto",
|
|
23153
|
+
children: n
|
|
23154
|
+
}) : null,
|
|
23155
|
+
/* @__PURE__ */ $("div", {
|
|
23156
|
+
className: "my-auto hidden flex-col items-end gap-2 md:flex",
|
|
23157
|
+
onMouseEnter: y,
|
|
23158
|
+
onMouseLeave: () => b(),
|
|
23159
|
+
children: [e.map((e, t) => /* @__PURE__ */ Q(gP, {
|
|
23160
|
+
look: "ghost",
|
|
23161
|
+
widget: e,
|
|
23162
|
+
order: t,
|
|
23163
|
+
open: C === e.id,
|
|
23164
|
+
delayMs: 0,
|
|
23165
|
+
onOpen: (e, t) => x(e, t),
|
|
23166
|
+
onCancelOpen: y,
|
|
23167
|
+
onClose: y
|
|
23168
|
+
}, e.id)), r ? /* @__PURE__ */ $(Z, { children: [e.length > 0 ? /* @__PURE__ */ Q("span", {
|
|
23169
|
+
"aria-hidden": !0,
|
|
23170
|
+
className: "flex h-4 w-10 items-center justify-center",
|
|
23171
|
+
children: /* @__PURE__ */ Q("span", { className: "h-px w-6 bg-f1-border-secondary" })
|
|
23172
|
+
}) : null, /* @__PURE__ */ Q(vn, {
|
|
23173
|
+
label: o.widgets.addWidget,
|
|
23174
|
+
instant: !0,
|
|
23175
|
+
children: /* @__PURE__ */ Q("button", {
|
|
23176
|
+
type: "button",
|
|
23177
|
+
"aria-label": o.widgets.addWidget,
|
|
23178
|
+
"data-add-widget": "right",
|
|
23179
|
+
onClick: r,
|
|
23180
|
+
className: "pointer-events-auto m-0 flex size-10 cursor-pointer appearance-none items-center justify-center rounded-md border-0 bg-transparent p-0 transition-colors hover:bg-f1-background-secondary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-f1-border-selected-bold",
|
|
23181
|
+
children: /* @__PURE__ */ Q(V, {
|
|
23182
|
+
icon: ys,
|
|
23183
|
+
size: "md",
|
|
23184
|
+
color: "bold"
|
|
23185
|
+
})
|
|
23186
|
+
})
|
|
23187
|
+
})] }) : null]
|
|
23188
|
+
}),
|
|
23189
|
+
/* @__PURE__ */ Q(B.div, {
|
|
23190
|
+
ref: l,
|
|
23191
|
+
id: s,
|
|
23192
|
+
role: "group",
|
|
23193
|
+
"aria-label": E ? IN(E) : void 0,
|
|
23194
|
+
hidden: w.panelHidden,
|
|
23195
|
+
className: W("absolute right-[68px] top-0 z-20 max-h-[calc(100%-1rem)] w-[396px] max-w-[calc(100vw-6rem)] overflow-y-auto overflow-x-hidden rounded-xl bg-f1-background shadow-lg [scrollbar-width:none] dark:bg-f1-background-secondary dark:backdrop-blur-[100px] dark:backdrop-saturate-150 [&::-webkit-scrollbar]:hidden", C ? "pointer-events-auto" : "pointer-events-none"),
|
|
23196
|
+
style: { transformOrigin: QM },
|
|
23197
|
+
initial: !1,
|
|
23198
|
+
animate: {
|
|
23199
|
+
opacity: +!!w.bodyOut,
|
|
23200
|
+
scale: w.bodyOut ? 1 : $M,
|
|
23201
|
+
x: w.bodyOut ? 0 : 10,
|
|
23202
|
+
y: D
|
|
23203
|
+
},
|
|
23204
|
+
transition: w.transition,
|
|
23205
|
+
onMouseEnter: y,
|
|
23206
|
+
onMouseLeave: () => b(),
|
|
23207
|
+
children: /* @__PURE__ */ Q(sF, {
|
|
23208
|
+
side: "right",
|
|
23209
|
+
widgets: e,
|
|
23210
|
+
visibleWidgetId: T,
|
|
23211
|
+
stow: { stowed: !0 },
|
|
23212
|
+
entrance: !1,
|
|
23213
|
+
disableDrag: !0,
|
|
23214
|
+
slotRenderers: t,
|
|
23215
|
+
onRemoveWidget: i,
|
|
23216
|
+
onChangeWidgetParams: a,
|
|
23217
|
+
paramsPreviewWidth: mR
|
|
23218
|
+
})
|
|
23219
|
+
})
|
|
23220
|
+
]
|
|
23221
|
+
});
|
|
23222
|
+
}, vR = (e, t, n) => {
|
|
23099
23223
|
let r = Array.from(e.current?.querySelectorAll("section") ?? []).find((e) => e.id === t);
|
|
23100
23224
|
r?.scrollIntoView({
|
|
23101
23225
|
behavior: n ? "auto" : "smooth",
|
|
23102
23226
|
block: "start"
|
|
23103
23227
|
}), r?.focus({ preventScroll: !0 });
|
|
23104
|
-
},
|
|
23228
|
+
}, yR = (e) => {
|
|
23105
23229
|
let t = cn();
|
|
23106
|
-
return K((n) =>
|
|
23107
|
-
},
|
|
23230
|
+
return K((n) => vR(e, n, t), [e, t]);
|
|
23231
|
+
}, bR = (e, t, n) => {
|
|
23108
23232
|
let r = [], i = /* @__PURE__ */ new Map(), a = [];
|
|
23109
23233
|
for (let o of e.elements) {
|
|
23110
23234
|
if (!LF(t, o.type)) {
|
|
@@ -23149,14 +23273,14 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
23149
23273
|
...e,
|
|
23150
23274
|
elements: r
|
|
23151
23275
|
};
|
|
23152
|
-
},
|
|
23276
|
+
}, xR = (e, t, n) => {
|
|
23153
23277
|
let r = e;
|
|
23154
23278
|
return t.maxSections !== void 0 && r.length > t.maxSections && (n.push({
|
|
23155
23279
|
rule: "maxSections",
|
|
23156
23280
|
limit: t.maxSections,
|
|
23157
23281
|
droppedSectionIds: r.slice(t.maxSections).map((e) => e.id)
|
|
23158
|
-
}), r = r.slice(0, t.maxSections)), r.map((e, r) =>
|
|
23159
|
-
},
|
|
23282
|
+
}), r = r.slice(0, t.maxSections)), r.map((e, r) => bR(e, VF(t, r === 0), n));
|
|
23283
|
+
}, SR = (e, t, n) => {
|
|
23160
23284
|
if (e.type !== "text" || !t.text) return;
|
|
23161
23285
|
let r = e.text.trim().length, { minLength: i, maxLength: a } = t.text;
|
|
23162
23286
|
return (i === void 0 || r >= i) && (a === void 0 || r <= a) ? void 0 : {
|
|
@@ -23167,14 +23291,14 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
23167
23291
|
...i === void 0 ? {} : { minLength: i },
|
|
23168
23292
|
...a === void 0 ? {} : { maxLength: a }
|
|
23169
23293
|
};
|
|
23170
|
-
},
|
|
23294
|
+
}, CR = (e, t, n) => {
|
|
23171
23295
|
let r = e.flatMap((e) => e.elements), i = /* @__PURE__ */ new Set(), a = 0;
|
|
23172
23296
|
t.forEach((e, t) => {
|
|
23173
23297
|
let o = e.min ?? 1, s = e.max ?? 1, c = 0;
|
|
23174
23298
|
for (; c < s && a < r.length && e.types.includes(r[a].type);) {
|
|
23175
23299
|
let o = r[a];
|
|
23176
23300
|
a += 1, c += 1;
|
|
23177
|
-
let s =
|
|
23301
|
+
let s = SR(o, e, t);
|
|
23178
23302
|
s && (i.add(o.id), n.push(s));
|
|
23179
23303
|
}
|
|
23180
23304
|
c < o && n.push({
|
|
@@ -23193,11 +23317,11 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
23193
23317
|
...e,
|
|
23194
23318
|
elements: e.elements.filter(({ id: e }) => !i.has(e))
|
|
23195
23319
|
}));
|
|
23196
|
-
},
|
|
23320
|
+
}, wR = (e) => typeof e == "object" && !!e, TR = (e) => {
|
|
23197
23321
|
let t = e.widget, n = Array.isArray(e.sections);
|
|
23198
|
-
return t === void 0 ? n ? "sections" : null :
|
|
23199
|
-
},
|
|
23200
|
-
if (!
|
|
23322
|
+
return t === void 0 ? n ? "sections" : null : wR(t) && t.type === "widget" && typeof t.id == "string" && wR(t.source) && !n ? "widget" : null;
|
|
23323
|
+
}, ER = (e, t, n) => {
|
|
23324
|
+
if (!TR(e)) return n.push({ rule: "accessoryViewBody" }), [];
|
|
23201
23325
|
let r = t.rules ?? {};
|
|
23202
23326
|
if (e.widget) return LF(r, "widget") ? [e] : (n.push({
|
|
23203
23327
|
rule: "allowedBlockTypes",
|
|
@@ -23205,25 +23329,25 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
23205
23329
|
elementId: e.widget.id,
|
|
23206
23330
|
blockType: "widget"
|
|
23207
23331
|
}), []);
|
|
23208
|
-
let i =
|
|
23332
|
+
let i = xR(e.sections, r, n), a = t.shape ? CR(i, t.shape, n) : i;
|
|
23209
23333
|
return [{
|
|
23210
23334
|
...e,
|
|
23211
23335
|
sections: a
|
|
23212
23336
|
}];
|
|
23213
|
-
},
|
|
23337
|
+
}, DR = (e, t, n) => e.flatMap((e) => {
|
|
23214
23338
|
let r = t.find((t) => t.type === e.type);
|
|
23215
23339
|
if (!r) return n.push({
|
|
23216
23340
|
rule: "accessoryViewType",
|
|
23217
23341
|
accessoryViewId: e.id,
|
|
23218
23342
|
viewType: e.type
|
|
23219
23343
|
}), [];
|
|
23220
|
-
let i = [], a =
|
|
23344
|
+
let i = [], a = ER(e, r, i);
|
|
23221
23345
|
return n.push(...i.map((t) => ({
|
|
23222
23346
|
...t,
|
|
23223
23347
|
accessoryViewId: e.id
|
|
23224
23348
|
}))), a;
|
|
23225
|
-
}),
|
|
23226
|
-
let r = [], i = tI(
|
|
23349
|
+
}), OR = (e, t, n = []) => {
|
|
23350
|
+
let r = [], i = tI(xR(e.sections.filter((e) => e.title?.trim() ? !0 : (r.push({
|
|
23227
23351
|
rule: "sectionTitle",
|
|
23228
23352
|
sectionId: e.id
|
|
23229
23353
|
}), !1)), t, r), r);
|
|
@@ -23234,7 +23358,7 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
23234
23358
|
elementId: t.id
|
|
23235
23359
|
}, r);
|
|
23236
23360
|
});
|
|
23237
|
-
let a = e.accessoryViews ?
|
|
23361
|
+
let a = e.accessoryViews ? DR(e.accessoryViews, n, r) : void 0, o = {
|
|
23238
23362
|
...e,
|
|
23239
23363
|
sections: i,
|
|
23240
23364
|
...a ? { accessoryViews: a } : {}
|
|
@@ -23243,9 +23367,9 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
23243
23367
|
spec: o,
|
|
23244
23368
|
violations: [...r, ...XF(o)]
|
|
23245
23369
|
};
|
|
23246
|
-
},
|
|
23370
|
+
}, kR = ({ spec: e, sources: t, rules: n, accessoryViewTypes: r, onRulesViolation: i }) => {
|
|
23247
23371
|
let a = J(() => {
|
|
23248
|
-
let i =
|
|
23372
|
+
let i = OR(e, n ?? {}, r), a = t ? aI(t, i.spec, n ?? {}, r) : {
|
|
23249
23373
|
sources: t,
|
|
23250
23374
|
violations: []
|
|
23251
23375
|
};
|
|
@@ -23268,7 +23392,7 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
23268
23392
|
let e = JSON.parse(s);
|
|
23269
23393
|
e.length !== 0 && (o.current ? o.current(e) : console.warn("F0AgenticHome: the spec breaks its rules", e));
|
|
23270
23394
|
}, [s]), a;
|
|
23271
|
-
},
|
|
23395
|
+
}, AR = (e, t, n) => {
|
|
23272
23396
|
let r = Y(n);
|
|
23273
23397
|
q(() => {
|
|
23274
23398
|
r.current = n;
|
|
@@ -23283,97 +23407,101 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
23283
23407
|
t,
|
|
23284
23408
|
i
|
|
23285
23409
|
]);
|
|
23286
|
-
},
|
|
23410
|
+
}, jR = (e, t) => {
|
|
23287
23411
|
let n = Object.keys(e.params);
|
|
23288
23412
|
return e.id === t.id && n.length === Object.keys(t.params).length && n.every((n) => e.params[n] === t.params[n]);
|
|
23289
|
-
},
|
|
23413
|
+
}, MR = (e, t) => {
|
|
23290
23414
|
let { missingParams: n, undeclaredParams: r } = HF(e, t);
|
|
23291
23415
|
return n.length === 0 && r.length === 0;
|
|
23292
|
-
},
|
|
23293
|
-
let { spec:
|
|
23416
|
+
}, NR = {}, PR = (e, t, n, r) => !n || r && jR(r, t) ? e : NR, FR = "pt-[max(4rem,22vh)]", IR = "pb-40", LR = "pb-10", RR = Gc(function({ spec: e, greeting: t, clockIn: n, widgets: r = [], onClickAddWidget: i, onRemoveWidget: a, onChangeWidgetParams: o, sources: s, sourcesFor: c, onAccessoryViewOpen: l, onAccessoryViewClose: u, onAction: d, composer: f, onComposerVisibilityChange: p, rules: m, onRulesViolation: h, accessoryViewTypes: g, slotRenderers: _, renderMention: v }, y) {
|
|
23417
|
+
let { spec: b, sources: x } = kR({
|
|
23294
23418
|
spec: e,
|
|
23295
|
-
sources:
|
|
23296
|
-
rules:
|
|
23297
|
-
accessoryViewTypes:
|
|
23298
|
-
onRulesViolation:
|
|
23299
|
-
}),
|
|
23300
|
-
Zc(
|
|
23301
|
-
let
|
|
23302
|
-
ref:
|
|
23303
|
-
children:
|
|
23304
|
-
}) : null, [
|
|
23305
|
-
if (e.type === "goToSection" &&
|
|
23306
|
-
let t =
|
|
23419
|
+
sources: s,
|
|
23420
|
+
rules: m,
|
|
23421
|
+
accessoryViewTypes: g,
|
|
23422
|
+
onRulesViolation: h
|
|
23423
|
+
}), S = Y(null), C = Y(null);
|
|
23424
|
+
Zc(y, () => S.current), AR(S, C, p);
|
|
23425
|
+
let w = yR(S), T = f ? /* @__PURE__ */ Q(dR, {
|
|
23426
|
+
ref: C,
|
|
23427
|
+
children: f
|
|
23428
|
+
}) : null, [E, ...D] = b.sections, [O, k] = X(), A = b.accessoryViews?.find(({ id: e }) => e === O?.id), j = g?.find(({ type: e }) => e === A?.type), M = J(() => (e, t) => {
|
|
23429
|
+
if (e.type === "goToSection" && w(e.sectionId), e.type === "openAccessoryView") {
|
|
23430
|
+
let t = b.accessoryViews?.find(({ id: t }) => t === e.id);
|
|
23307
23431
|
if (!t) console.warn(`F0AgenticHome: no accessory view "${e.id}" to open`);
|
|
23308
|
-
else if (
|
|
23432
|
+
else if (MR(t, e.params)) {
|
|
23309
23433
|
let n = {
|
|
23310
23434
|
id: t.id,
|
|
23311
23435
|
params: e.params ?? {}
|
|
23312
23436
|
};
|
|
23313
|
-
|
|
23437
|
+
k({
|
|
23314
23438
|
...n,
|
|
23315
23439
|
open: !0
|
|
23316
|
-
}),
|
|
23440
|
+
}), l?.(n);
|
|
23317
23441
|
}
|
|
23318
23442
|
}
|
|
23319
|
-
|
|
23443
|
+
d?.(e, t);
|
|
23320
23444
|
}, [
|
|
23321
|
-
|
|
23322
|
-
|
|
23323
|
-
|
|
23324
|
-
|
|
23445
|
+
d,
|
|
23446
|
+
w,
|
|
23447
|
+
l,
|
|
23448
|
+
b.accessoryViews
|
|
23325
23449
|
]);
|
|
23326
23450
|
return /* @__PURE__ */ Q(xL, {
|
|
23327
|
-
value:
|
|
23451
|
+
value: _,
|
|
23328
23452
|
children: /* @__PURE__ */ Q(IL, {
|
|
23329
|
-
value:
|
|
23453
|
+
value: v,
|
|
23330
23454
|
children: /* @__PURE__ */ $("div", {
|
|
23331
23455
|
className: "relative h-full min-h-0 w-full",
|
|
23332
23456
|
children: [/* @__PURE__ */ $("div", {
|
|
23333
|
-
ref:
|
|
23334
|
-
className: "h-full w-full overflow-y-auto bg-f1-background px-6",
|
|
23457
|
+
ref: S,
|
|
23458
|
+
className: W("h-full w-full overflow-y-auto bg-f1-background px-6", (r.length > 0 || i) && "md:px-20"),
|
|
23335
23459
|
children: [/* @__PURE__ */ $("div", {
|
|
23336
|
-
className: W("mx-auto flex w-full max-w-content flex-col gap-20",
|
|
23460
|
+
className: W("mx-auto flex w-full max-w-content flex-col gap-20", FR, f && p ? IR : LR),
|
|
23337
23461
|
children: [
|
|
23338
23462
|
t ? /* @__PURE__ */ Q(fR, { greeting: t }) : null,
|
|
23339
|
-
|
|
23340
|
-
|
|
23463
|
+
E ? null : T,
|
|
23464
|
+
E ? /* @__PURE__ */ Q(tR, {
|
|
23341
23465
|
size: "lead",
|
|
23342
|
-
section:
|
|
23343
|
-
sources:
|
|
23344
|
-
onAction:
|
|
23345
|
-
composer:
|
|
23346
|
-
},
|
|
23347
|
-
|
|
23466
|
+
section: E,
|
|
23467
|
+
sources: x,
|
|
23468
|
+
onAction: M,
|
|
23469
|
+
composer: T
|
|
23470
|
+
}, E.id) : null,
|
|
23471
|
+
D.map((e) => /* @__PURE__ */ Q(tR, {
|
|
23348
23472
|
section: e,
|
|
23349
|
-
sources:
|
|
23350
|
-
onAction:
|
|
23473
|
+
sources: x,
|
|
23474
|
+
onAction: M
|
|
23351
23475
|
}, e.id))
|
|
23352
23476
|
]
|
|
23353
|
-
}),
|
|
23354
|
-
view:
|
|
23355
|
-
params:
|
|
23356
|
-
presentation:
|
|
23357
|
-
width:
|
|
23358
|
-
bleed:
|
|
23359
|
-
isOpen:
|
|
23477
|
+
}), O && A && j ? /* @__PURE__ */ Q(aR, {
|
|
23478
|
+
view: A,
|
|
23479
|
+
params: O.params,
|
|
23480
|
+
presentation: j.presentation,
|
|
23481
|
+
width: j.width,
|
|
23482
|
+
bleed: j.bleed,
|
|
23483
|
+
isOpen: O.open,
|
|
23360
23484
|
onClose: () => {
|
|
23361
|
-
|
|
23485
|
+
k((e) => e && {
|
|
23362
23486
|
...e,
|
|
23363
23487
|
open: !1
|
|
23364
|
-
}),
|
|
23488
|
+
}), u?.();
|
|
23365
23489
|
},
|
|
23366
|
-
sources:
|
|
23367
|
-
onAction:
|
|
23490
|
+
sources: PR(x, O, !!A.params?.length, c),
|
|
23491
|
+
onAction: M
|
|
23368
23492
|
}) : null]
|
|
23369
|
-
}), n ? /* @__PURE__ */ Q(
|
|
23370
|
-
|
|
23371
|
-
|
|
23493
|
+
}), n || r.length || i ? /* @__PURE__ */ Q(_R, {
|
|
23494
|
+
widgets: r,
|
|
23495
|
+
onAdd: i,
|
|
23496
|
+
onRemove: a,
|
|
23497
|
+
onChangeParams: o,
|
|
23498
|
+
slotRenderers: _,
|
|
23499
|
+
clock: n ? /* @__PURE__ */ Q(uR, { clockIn: n }) : void 0
|
|
23372
23500
|
}) : null]
|
|
23373
23501
|
})
|
|
23374
23502
|
})
|
|
23375
23503
|
});
|
|
23376
|
-
}),
|
|
23504
|
+
}), zR = Ln("F0AgenticHome", RR), BR = Gc(function({ element: e, state: t, onAction: n, slotRenderers: r }, i) {
|
|
23377
23505
|
let a = J(() => (e, t) => n?.(e, t), [n]);
|
|
23378
23506
|
return /* @__PURE__ */ Q("div", {
|
|
23379
23507
|
ref: i,
|
|
@@ -23386,7 +23514,7 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
23386
23514
|
})
|
|
23387
23515
|
})
|
|
23388
23516
|
});
|
|
23389
|
-
}),
|
|
23517
|
+
}), VR = Ln("F0AgenticHomeBlock", BR), HR = {
|
|
23390
23518
|
maxSections: 12,
|
|
23391
23519
|
maxElementsPerSection: 3,
|
|
23392
23520
|
blocks: [
|
|
@@ -23434,10 +23562,10 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
23434
23562
|
type: "list",
|
|
23435
23563
|
itemActions: ["goToSection"]
|
|
23436
23564
|
}] }
|
|
23437
|
-
},
|
|
23565
|
+
}, UR = 1, WR = {
|
|
23438
23566
|
main: 672,
|
|
23439
23567
|
right: 396
|
|
23440
|
-
},
|
|
23568
|
+
}, GR = 250, KR = (e) => typeof e == "object" && !!e && !Kc(e) && Array.isArray(e.slots), qR = ({ preview: e, params: t, slotRenderers: n }) => KR(e) ? /* @__PURE__ */ Q(CP, {
|
|
23441
23569
|
...zN(e),
|
|
23442
23570
|
header: e.header,
|
|
23443
23571
|
params: t ?? e.params,
|
|
@@ -23445,7 +23573,7 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
23445
23573
|
slots: e.slots,
|
|
23446
23574
|
loading: e.loading,
|
|
23447
23575
|
slotRenderers: n
|
|
23448
|
-
}) : /* @__PURE__ */ Q(Z, { children: e }),
|
|
23576
|
+
}) : /* @__PURE__ */ Q(Z, { children: e }), JR = (e, t, n) => e.info ?? (KR(t) ? FN(t.header, n ?? t.params)?.info : void 0), YR = (e) => e.paramsSchema ?? (KR(e.preview) ? e.preview.paramsSchema : void 0), XR = (e) => e.params ?? (KR(e.preview) ? e.preview.params : void 0) ?? {}, ZR = ({ label: e, icon: t }) => /* @__PURE__ */ $("div", {
|
|
23449
23577
|
className: "flex items-center gap-1.5 px-2 pb-1 pt-5 first:pt-1",
|
|
23450
23578
|
children: [t ? /* @__PURE__ */ Q(V, {
|
|
23451
23579
|
icon: t,
|
|
@@ -23456,10 +23584,10 @@ var eF = ({ collapsed: e, open: t, glide: n, drawn: r, width: i }) => {
|
|
|
23456
23584
|
children: e
|
|
23457
23585
|
})]
|
|
23458
23586
|
});
|
|
23459
|
-
function
|
|
23460
|
-
let u = U(), { position: d, width: f, bodyClassName: p, asideClassName: m } =
|
|
23587
|
+
function QR({ isOpen: e, onClose: t, widgets: n, onAdd: r, groups: i, area: a, previewWidth: o, slotRenderers: s, rebuildPreview: c, title: l = "Add widget" }) {
|
|
23588
|
+
let u = U(), { position: d, width: f, bodyClassName: p, asideClassName: m } = TP(), [h, g] = X(""), [_, v] = X(null), [y, b] = X("pick"), [x, S] = X(!1), C = (e) => {
|
|
23461
23589
|
S(!0), b(e);
|
|
23462
|
-
}, [w, T] = X(null), { formRef: E, getValues: D, trigger: O } = Ke(), k = h.trim().toLowerCase(), A = o ?? (a ?
|
|
23590
|
+
}, [w, T] = X(null), { formRef: E, getValues: D, trigger: O } = Ke(), k = h.trim().toLowerCase(), A = o ?? (a ? WR[a] : WR.right), j = J(() => {
|
|
23463
23591
|
let e = a ? n.filter((e) => !e.areas || e.areas.includes(a)) : n, t = k ? e.filter((e) => e.title.toLowerCase().includes(k)) : e, r = t.filter((e) => e.recommended), o = t.filter((e) => !e.recommended), s = new Set((i ?? []).map((e) => e.id)), c = o.filter((e) => !e.group || !s.has(e.group));
|
|
23464
23592
|
return [
|
|
23465
23593
|
...r.length ? [{
|
|
@@ -23484,7 +23612,7 @@ function qR({ isOpen: e, onClose: t, widgets: n, onAdd: r, groups: i, area: a, p
|
|
|
23484
23612
|
k,
|
|
23485
23613
|
a,
|
|
23486
23614
|
u
|
|
23487
|
-
]), M = j.flatMap((e) => e.items), N = M.find((e) => e.id === _) ?? M[0] ?? null, P = N ?
|
|
23615
|
+
]), M = j.flatMap((e) => e.items), N = M.find((e) => e.id === _) ?? M[0] ?? null, P = N ? YR(N) : void 0, F = P !== void 0 && !(N?.addWithDefaults && LN(P, XR(N))), I = y === "configure" && F, ee = N && w?.id === N.id ? w.params : N ? XR(N) : {}, te = I && N && c ? c(N, ee) : N?.preview;
|
|
23488
23616
|
return q(() => {
|
|
23489
23617
|
e && (b("pick"), S(!1), T(null));
|
|
23490
23618
|
}, [e]), q(() => {
|
|
@@ -23531,7 +23659,7 @@ function qR({ isOpen: e, onClose: t, widgets: n, onAdd: r, groups: i, area: a, p
|
|
|
23531
23659
|
defaultValues: ee,
|
|
23532
23660
|
submitConfig: {
|
|
23533
23661
|
type: "autosubmit",
|
|
23534
|
-
delay:
|
|
23662
|
+
delay: GR,
|
|
23535
23663
|
hideActionBar: !0
|
|
23536
23664
|
},
|
|
23537
23665
|
styling: { noPadding: !0 },
|
|
@@ -23546,7 +23674,7 @@ function qR({ isOpen: e, onClose: t, widgets: n, onAdd: r, groups: i, area: a, p
|
|
|
23546
23674
|
placeholder: "Search widgets"
|
|
23547
23675
|
}), /* @__PURE__ */ $("div", {
|
|
23548
23676
|
className: "flex flex-col gap-1 overflow-y-auto",
|
|
23549
|
-
children: [j.map((e) => /* @__PURE__ */ $(Vc, { children: [e.label ? /* @__PURE__ */ Q(
|
|
23677
|
+
children: [j.map((e) => /* @__PURE__ */ $(Vc, { children: [e.label ? /* @__PURE__ */ Q(ZR, {
|
|
23550
23678
|
label: e.label,
|
|
23551
23679
|
icon: e.icon
|
|
23552
23680
|
}) : null, e.items.map((e) => /* @__PURE__ */ $("button", {
|
|
@@ -23565,11 +23693,11 @@ function qR({ isOpen: e, onClose: t, widgets: n, onAdd: r, groups: i, area: a, p
|
|
|
23565
23693
|
children: k ? "No widgets match your search." : "No widgets to add here."
|
|
23566
23694
|
}) : null]
|
|
23567
23695
|
})] })
|
|
23568
|
-
}, y), /* @__PURE__ */ Q(
|
|
23696
|
+
}, y), /* @__PURE__ */ Q(DP, {
|
|
23569
23697
|
previewKey: N?.id,
|
|
23570
|
-
info: N ?
|
|
23698
|
+
info: N ? JR(N, te, I ? ee : void 0) : void 0,
|
|
23571
23699
|
previewWidth: A,
|
|
23572
|
-
children: N ? /* @__PURE__ */ Q(
|
|
23700
|
+
children: N ? /* @__PURE__ */ Q(qR, {
|
|
23573
23701
|
preview: te,
|
|
23574
23702
|
params: I ? ee : void 0,
|
|
23575
23703
|
slotRenderers: s
|
|
@@ -23580,62 +23708,62 @@ function qR({ isOpen: e, onClose: t, widgets: n, onAdd: r, groups: i, area: a, p
|
|
|
23580
23708
|
}
|
|
23581
23709
|
//#endregion
|
|
23582
23710
|
//#region ../../node_modules/.pnpm/react-masonry@1.0.7/node_modules/react-masonry/dist/index.js
|
|
23583
|
-
var
|
|
23711
|
+
var $R = Object.defineProperty, ez = Object.defineProperties, tz = Object.getOwnPropertyDescriptors, nz = Object.getOwnPropertySymbols, rz = Object.prototype.hasOwnProperty, iz = Object.prototype.propertyIsEnumerable, az = (e, t, n) => t in e ? $R(e, t, {
|
|
23584
23712
|
enumerable: !0,
|
|
23585
23713
|
configurable: !0,
|
|
23586
23714
|
writable: !0,
|
|
23587
23715
|
value: n
|
|
23588
|
-
}) : e[t] = n,
|
|
23589
|
-
for (var n in t ||= {})
|
|
23590
|
-
if (
|
|
23716
|
+
}) : e[t] = n, oz = (e, t) => {
|
|
23717
|
+
for (var n in t ||= {}) rz.call(t, n) && az(e, n, t[n]);
|
|
23718
|
+
if (nz) for (var n of nz(t)) iz.call(t, n) && az(e, n, t[n]);
|
|
23591
23719
|
return e;
|
|
23592
|
-
},
|
|
23720
|
+
}, sz = (e, t) => ez(e, tz(t)), cz = (e, t) => {
|
|
23593
23721
|
var n = {};
|
|
23594
|
-
for (var r in e)
|
|
23595
|
-
if (e != null &&
|
|
23722
|
+
for (var r in e) rz.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
23723
|
+
if (e != null && nz) for (var r of nz(e)) t.indexOf(r) < 0 && iz.call(e, r) && (n[r] = e[r]);
|
|
23596
23724
|
return n;
|
|
23597
|
-
},
|
|
23725
|
+
}, lz = (e) => e.right - e.left < 5 || e.bottom && e.bottom - e.top < 5, uz = ({ spotsList: e, usedSpot: t }) => e.some((e) => e !== t && t.left === e.left), dz = ({ position: e, spot: t, stone: n }) => {
|
|
23598
23726
|
if (e.left > t.left && t.right >= e.left && e.top + n.height > t.top) {
|
|
23599
23727
|
if (t.bottom && t.bottom < e.top) return t;
|
|
23600
|
-
let n =
|
|
23728
|
+
let n = oz({}, t);
|
|
23601
23729
|
return n.right = e.left, n;
|
|
23602
23730
|
}
|
|
23603
23731
|
return null;
|
|
23604
|
-
},
|
|
23732
|
+
}, fz = ({ position: e, stone: t, spot: n }) => {
|
|
23605
23733
|
if (e.left + t.width > n.left && e.top >= n.top) {
|
|
23606
23734
|
if (n.bottom && n.bottom < e.top || n.right < e.left) return n;
|
|
23607
|
-
let t =
|
|
23735
|
+
let t = oz({}, n);
|
|
23608
23736
|
return t.bottom = e.top, t;
|
|
23609
23737
|
}
|
|
23610
23738
|
return null;
|
|
23611
|
-
},
|
|
23612
|
-
let i =
|
|
23613
|
-
return i.left = t.left + e.width,
|
|
23739
|
+
}, pz = ({ stone: e, position: t, spotsList: n, optimalSpot: r }) => {
|
|
23740
|
+
let i = oz({}, r);
|
|
23741
|
+
return i.left = t.left + e.width, lz(i) || uz({
|
|
23614
23742
|
usedSpot: i,
|
|
23615
23743
|
spotsList: n
|
|
23616
23744
|
}) ? null : i;
|
|
23617
|
-
},
|
|
23745
|
+
}, mz = ({ spots: e, position: t, optimalSpot: n, stone: r }) => e.map((e, i, a) => e === n ? pz({
|
|
23618
23746
|
stone: r,
|
|
23619
23747
|
position: t,
|
|
23620
23748
|
optimalSpot: n,
|
|
23621
23749
|
spotsList: a
|
|
23622
|
-
}) :
|
|
23750
|
+
}) : dz({
|
|
23623
23751
|
position: t,
|
|
23624
23752
|
spot: e,
|
|
23625
23753
|
stone: r
|
|
23626
|
-
}) ||
|
|
23754
|
+
}) || fz({
|
|
23627
23755
|
position: t,
|
|
23628
23756
|
stone: r,
|
|
23629
23757
|
spot: e
|
|
23630
23758
|
}) || e);
|
|
23631
|
-
function
|
|
23759
|
+
function hz(e, t) {
|
|
23632
23760
|
for (let n = 0, r = t.length; n < r; n++) {
|
|
23633
23761
|
let r = t[n];
|
|
23634
23762
|
if (e(r)) return r;
|
|
23635
23763
|
}
|
|
23636
23764
|
return null;
|
|
23637
23765
|
}
|
|
23638
|
-
var
|
|
23766
|
+
var gz = (e, t) => t.filter(e), _z = (e, t) => [...t].sort(e), vz = (e, t) => e.top === t.top ? e.left < t.left ? -1 : 1 : e.top < t.top ? -1 : 1, yz = (e) => _z(vz, e), bz = ({ availableSpots: e, optimalSpot: t, containerSize: n, stone: r }) => {
|
|
23639
23767
|
let i = {
|
|
23640
23768
|
right: n,
|
|
23641
23769
|
top: t.top + r.height,
|
|
@@ -23650,36 +23778,36 @@ var dz = (e, t) => t.filter(e), fz = (e, t) => [...t].sort(e), pz = (e, t) => e.
|
|
|
23650
23778
|
}
|
|
23651
23779
|
}
|
|
23652
23780
|
return i;
|
|
23653
|
-
},
|
|
23781
|
+
}, xz = (e, t) => {
|
|
23654
23782
|
let n = e.right - e.left >= t.width;
|
|
23655
23783
|
if (!e.bottom) return n;
|
|
23656
23784
|
let r = e.bottom - e.top >= t.height;
|
|
23657
23785
|
return n && r;
|
|
23658
|
-
},
|
|
23659
|
-
function
|
|
23660
|
-
let r =
|
|
23786
|
+
}, Sz = ({ availableSpots: e, stone: t }) => hz((e) => xz(e, t), e);
|
|
23787
|
+
function Cz({ stone: e, availableSpots: t, containerSize: n }) {
|
|
23788
|
+
let r = Sz({
|
|
23661
23789
|
availableSpots: t,
|
|
23662
23790
|
stone: e
|
|
23663
23791
|
}), i = {
|
|
23664
23792
|
left: r.left,
|
|
23665
23793
|
top: r.top
|
|
23666
|
-
}, a =
|
|
23794
|
+
}, a = bz({
|
|
23667
23795
|
optimalSpot: r,
|
|
23668
23796
|
availableSpots: t.filter((e) => e !== r),
|
|
23669
23797
|
stone: e,
|
|
23670
23798
|
containerSize: n
|
|
23671
|
-
}), o = [...t, a], s =
|
|
23799
|
+
}), o = [...t, a], s = mz({
|
|
23672
23800
|
spots: o,
|
|
23673
23801
|
position: i,
|
|
23674
23802
|
optimalSpot: r,
|
|
23675
23803
|
stone: e
|
|
23676
23804
|
});
|
|
23677
|
-
return o = [...
|
|
23805
|
+
return o = [...gz(Boolean, s)], o = yz(o), {
|
|
23678
23806
|
position: i,
|
|
23679
23807
|
availableSpots: o
|
|
23680
23808
|
};
|
|
23681
23809
|
}
|
|
23682
|
-
var
|
|
23810
|
+
var wz = ({ stones: e, containerSize: t }) => {
|
|
23683
23811
|
let n = {
|
|
23684
23812
|
positions: [],
|
|
23685
23813
|
containerHeight: 0,
|
|
@@ -23692,7 +23820,7 @@ var yz = ({ stones: e, containerSize: t }) => {
|
|
|
23692
23820
|
right: t
|
|
23693
23821
|
}];
|
|
23694
23822
|
for (let n of e) {
|
|
23695
|
-
let e =
|
|
23823
|
+
let e = Cz({
|
|
23696
23824
|
availableSpots: a,
|
|
23697
23825
|
stone: n,
|
|
23698
23826
|
containerSize: t
|
|
@@ -23704,14 +23832,14 @@ var yz = ({ stones: e, containerSize: t }) => {
|
|
|
23704
23832
|
positions: i,
|
|
23705
23833
|
containerHeight: r
|
|
23706
23834
|
};
|
|
23707
|
-
},
|
|
23835
|
+
}, Tz = (e) => e.reduce((e, t) => {
|
|
23708
23836
|
if (!t) return e;
|
|
23709
23837
|
let n = t.getBoundingClientRect();
|
|
23710
23838
|
return e.push({
|
|
23711
23839
|
width: n.width,
|
|
23712
23840
|
height: n.height
|
|
23713
23841
|
}), e;
|
|
23714
|
-
}, []),
|
|
23842
|
+
}, []), Ez = ({ boxesRefs: e, wrapperRef: t, children: n, windowWidth: r, wrapperWidth: i }) => {
|
|
23715
23843
|
let [{ positions: a, containerHeight: o, stones: s, availableSpots: c }, l] = X({
|
|
23716
23844
|
positions: [],
|
|
23717
23845
|
containerHeight: null,
|
|
@@ -23719,13 +23847,13 @@ var yz = ({ stones: e, containerSize: t }) => {
|
|
|
23719
23847
|
availableSpots: []
|
|
23720
23848
|
});
|
|
23721
23849
|
return q(() => {
|
|
23722
|
-
let n =
|
|
23850
|
+
let n = Tz(e.current), r = t.current?.offsetWidth ?? 0;
|
|
23723
23851
|
if (r === null) return;
|
|
23724
|
-
let i =
|
|
23852
|
+
let i = wz({
|
|
23725
23853
|
stones: n,
|
|
23726
23854
|
containerSize: r
|
|
23727
23855
|
});
|
|
23728
|
-
l(
|
|
23856
|
+
l(sz(oz({}, i), { stones: n }));
|
|
23729
23857
|
}, [
|
|
23730
23858
|
n,
|
|
23731
23859
|
e,
|
|
@@ -23738,7 +23866,7 @@ var yz = ({ stones: e, containerSize: t }) => {
|
|
|
23738
23866
|
stones: s,
|
|
23739
23867
|
availableSpots: c
|
|
23740
23868
|
};
|
|
23741
|
-
},
|
|
23869
|
+
}, Dz = (e) => ({
|
|
23742
23870
|
fade: `${e}ms opacity ease`,
|
|
23743
23871
|
fadeMove: `
|
|
23744
23872
|
${e}ms opacity ease,
|
|
@@ -23749,15 +23877,15 @@ var yz = ({ stones: e, containerSize: t }) => {
|
|
|
23749
23877
|
${e}ms top ease,
|
|
23750
23878
|
${e}ms left ease
|
|
23751
23879
|
`
|
|
23752
|
-
}),
|
|
23880
|
+
}), Oz = ({ transition: e, transitionDuration: t }) => e ? { transition: Dz(t)[e] } : null, kz = (e) => e ? sz(oz({}, e), { opacity: 1 }) : {
|
|
23753
23881
|
opacity: 0,
|
|
23754
23882
|
top: 0,
|
|
23755
23883
|
left: 0
|
|
23756
|
-
},
|
|
23884
|
+
}, Az = ({ style: e, position: t, transition: n, transitionDuration: r }) => oz(oz(sz(oz({}, e), { position: "absolute" }), kz(t)), Oz({
|
|
23757
23885
|
transition: n,
|
|
23758
23886
|
transitionDuration: r
|
|
23759
23887
|
}));
|
|
23760
|
-
function
|
|
23888
|
+
function jz(e, t, n) {
|
|
23761
23889
|
let r;
|
|
23762
23890
|
return function(...i) {
|
|
23763
23891
|
r && clearTimeout(r), r = setTimeout(function() {
|
|
@@ -23765,8 +23893,8 @@ function Ez(e, t, n) {
|
|
|
23765
23893
|
}, t), n && !r && e.apply(null, i);
|
|
23766
23894
|
};
|
|
23767
23895
|
}
|
|
23768
|
-
var
|
|
23769
|
-
let [e, t] = X(), n = Y(
|
|
23896
|
+
var Mz = () => {
|
|
23897
|
+
let [e, t] = X(), n = Y(jz(t, 300));
|
|
23770
23898
|
return q(() => {
|
|
23771
23899
|
let e = () => {
|
|
23772
23900
|
n.current(window.innerWidth);
|
|
@@ -23775,7 +23903,7 @@ var Dz = () => {
|
|
|
23775
23903
|
window.removeEventListener("resize", e);
|
|
23776
23904
|
};
|
|
23777
23905
|
}, []), e;
|
|
23778
|
-
},
|
|
23906
|
+
}, Nz = (e) => {
|
|
23779
23907
|
let [t, n] = X(null);
|
|
23780
23908
|
return q(() => {
|
|
23781
23909
|
let t = new ResizeObserver((e) => {
|
|
@@ -23785,31 +23913,31 @@ var Dz = () => {
|
|
|
23785
23913
|
t.disconnect();
|
|
23786
23914
|
};
|
|
23787
23915
|
}, [e]), t;
|
|
23788
|
-
},
|
|
23789
|
-
var t = e, { children: n, style: r, transition: i = !1, transitionDuration: a = 500, transitionStep: o = 50 } = t, s =
|
|
23916
|
+
}, Pz = (e) => {
|
|
23917
|
+
var t = e, { children: n, style: r, transition: i = !1, transitionDuration: a = 500, transitionStep: o = 50 } = t, s = cz(t, [
|
|
23790
23918
|
"children",
|
|
23791
23919
|
"style",
|
|
23792
23920
|
"transition",
|
|
23793
23921
|
"transitionDuration",
|
|
23794
23922
|
"transitionStep"
|
|
23795
23923
|
]);
|
|
23796
|
-
let c = Y([]), l = Y(null), { positions: u, containerHeight: d } =
|
|
23924
|
+
let c = Y([]), l = Y(null), { positions: u, containerHeight: d } = Ez({
|
|
23797
23925
|
boxesRefs: c,
|
|
23798
23926
|
wrapperRef: l,
|
|
23799
23927
|
children: n,
|
|
23800
|
-
windowWidth:
|
|
23801
|
-
wrapperWidth:
|
|
23802
|
-
}), f =
|
|
23928
|
+
windowWidth: Mz(),
|
|
23929
|
+
wrapperWidth: Nz(l)
|
|
23930
|
+
}), f = oz({
|
|
23803
23931
|
minHeight: d ?? 0,
|
|
23804
23932
|
position: "relative"
|
|
23805
23933
|
}, r);
|
|
23806
|
-
return Q("div",
|
|
23934
|
+
return Q("div", sz(oz({
|
|
23807
23935
|
ref: l,
|
|
23808
23936
|
style: f
|
|
23809
23937
|
}, s), { children: Bc.map(n, (e, t) => {
|
|
23810
23938
|
if (typeof e != "object" || !e || !("type" in e)) return e;
|
|
23811
23939
|
let n = {
|
|
23812
|
-
style:
|
|
23940
|
+
style: Az({
|
|
23813
23941
|
style: e.props.style,
|
|
23814
23942
|
position: u[t],
|
|
23815
23943
|
transition: i,
|
|
@@ -23817,14 +23945,14 @@ var Dz = () => {
|
|
|
23817
23945
|
}),
|
|
23818
23946
|
ref: (e) => c.current[t] = e
|
|
23819
23947
|
};
|
|
23820
|
-
return Uc(e,
|
|
23948
|
+
return Uc(e, oz(oz({}, e.props), n));
|
|
23821
23949
|
}) }));
|
|
23822
|
-
},
|
|
23950
|
+
}, Fz = {
|
|
23823
23951
|
sm: 340,
|
|
23824
23952
|
md: 480,
|
|
23825
23953
|
lg: 640
|
|
23826
|
-
},
|
|
23827
|
-
let r =
|
|
23954
|
+
}, Iz = Gc(function({ children: e, widgetWidth: t = "sm" }, n) {
|
|
23955
|
+
let r = Fz[t], [i, a] = X(), o = Bc.toArray(e), s = Y(null);
|
|
23828
23956
|
return q(() => {
|
|
23829
23957
|
let e = () => {
|
|
23830
23958
|
let e = s.current?.offsetWidth;
|
|
@@ -23843,7 +23971,7 @@ var Dz = () => {
|
|
|
23843
23971
|
children: e
|
|
23844
23972
|
}) : i && i > 1 && /* @__PURE__ */ Q("div", {
|
|
23845
23973
|
className: "relative -mr-4",
|
|
23846
|
-
children: /* @__PURE__ */ Q(
|
|
23974
|
+
children: /* @__PURE__ */ Q(Pz, { children: o.map((e, t) => /* @__PURE__ */ Q("div", {
|
|
23847
23975
|
style: { width: `${Math.floor(1 / i * 1e4) / 100 - .05}%` },
|
|
23848
23976
|
className: "pb-[0.01px] pr-4 *:mb-4 *:shadow",
|
|
23849
23977
|
children: e
|
|
@@ -23851,7 +23979,7 @@ var Dz = () => {
|
|
|
23851
23979
|
})
|
|
23852
23980
|
})
|
|
23853
23981
|
});
|
|
23854
|
-
}),
|
|
23982
|
+
}), Lz = [
|
|
23855
23983
|
"sm",
|
|
23856
23984
|
"lg",
|
|
23857
23985
|
"md",
|
|
@@ -23864,18 +23992,18 @@ var Dz = () => {
|
|
|
23864
23992
|
"sm",
|
|
23865
23993
|
"md",
|
|
23866
23994
|
"md"
|
|
23867
|
-
],
|
|
23995
|
+
], Rz = Yr(Iz, () => /* @__PURE__ */ Q(or, { children: /* @__PURE__ */ Q(Iz, { children: Lz.map((e, t) => /* @__PURE__ */ Q(E.Skeleton, { height: e }, t)) }) })), zz = ({ children: e }) => /* @__PURE__ */ Q("div", {
|
|
23868
23996
|
className: "flex min-h-40 flex-row items-stretch gap-4 text-f1-foreground @container [&>div]:min-w-[calc(100vw-64px)] @2xl:[&>div]:min-w-[calc(50vw-48px)]",
|
|
23869
23997
|
children: e
|
|
23870
|
-
}),
|
|
23998
|
+
}), Bz = Yr(Gc(function({ children: e }, t) {
|
|
23871
23999
|
return /* @__PURE__ */ Q(zo, {
|
|
23872
24000
|
ref: t,
|
|
23873
24001
|
showBar: !1,
|
|
23874
|
-
children: /* @__PURE__ */ Q(
|
|
24002
|
+
children: /* @__PURE__ */ Q(zz, { children: e })
|
|
23875
24003
|
});
|
|
23876
24004
|
}), () => /* @__PURE__ */ Q(or, {
|
|
23877
24005
|
orientation: "horizontal",
|
|
23878
|
-
children: /* @__PURE__ */ $(
|
|
24006
|
+
children: /* @__PURE__ */ $(zz, { children: [
|
|
23879
24007
|
/* @__PURE__ */ Q(E.Skeleton, {}),
|
|
23880
24008
|
/* @__PURE__ */ Q(E.Skeleton, {}),
|
|
23881
24009
|
/* @__PURE__ */ Q(E.Skeleton, {})
|
|
@@ -23883,7 +24011,7 @@ var Dz = () => {
|
|
|
23883
24011
|
}));
|
|
23884
24012
|
//#endregion
|
|
23885
24013
|
//#region src/blocks/Widgets/WidgetEmptyState/WidgetEmptyState.tsx
|
|
23886
|
-
function
|
|
24014
|
+
function Vz({ title: e, description: t, emoji: n, actions: r }) {
|
|
23887
24015
|
if ((r?.length ?? 0) > 2) throw Error("You can only provide up to two actions for the WidgetEmptyState");
|
|
23888
24016
|
return /* @__PURE__ */ Q(oe, {
|
|
23889
24017
|
title: e,
|
|
@@ -23892,7 +24020,7 @@ function Iz({ title: e, description: t, emoji: n, actions: r }) {
|
|
|
23892
24020
|
actions: r
|
|
23893
24021
|
});
|
|
23894
24022
|
}
|
|
23895
|
-
var
|
|
24023
|
+
var Hz = Cn(Ln("WidgetEmptyState", Vz)), Uz = Gc(({ title: e, children: t }, n) => (un(e, { disallowEmpty: !0 }, { componentName: "WidgetSection" }), /* @__PURE__ */ $("div", {
|
|
23896
24024
|
ref: n,
|
|
23897
24025
|
className: "flex flex-col gap-2",
|
|
23898
24026
|
children: [/* @__PURE__ */ Q("p", {
|
|
@@ -23900,8 +24028,8 @@ var Lz = Cn(Ln("WidgetEmptyState", Iz)), Rz = Gc(({ title: e, children: t }, n)
|
|
|
23900
24028
|
children: e
|
|
23901
24029
|
}), t]
|
|
23902
24030
|
})));
|
|
23903
|
-
|
|
23904
|
-
var
|
|
24031
|
+
Uz.displayName = "WidgetSection";
|
|
24032
|
+
var Wz = Cn(Ln("WidgetSection", Uz)), Gz = ({ identifier: e, allowedRoutes: t, disallowedRoutes: n, children: r }) => {
|
|
23905
24033
|
let i = wn(), a = window.location.pathname, o = J(() => t?.length ? t.includes(a) : !n?.length || !n.includes(a), [
|
|
23906
24034
|
a,
|
|
23907
24035
|
t,
|
|
@@ -23915,9 +24043,9 @@ var zz = Cn(Ln("WidgetSection", Rz)), Bz = ({ identifier: e, allowedRoutes: t, d
|
|
|
23915
24043
|
n
|
|
23916
24044
|
]);
|
|
23917
24045
|
return o ? r : (i && console.error(s), null);
|
|
23918
|
-
},
|
|
24046
|
+
}, Kz = Cn(Pn({
|
|
23919
24047
|
name: "ScrollArea",
|
|
23920
24048
|
type: "layout"
|
|
23921
24049
|
}, zo));
|
|
23922
24050
|
//#endregion
|
|
23923
|
-
export {
|
|
24051
|
+
export { UR as AGENTIC_HOME_SPEC_VERSION, d as AUTO_PER_PAGE_MAX, Ut as AUTO_PER_PAGE_MIN_RESERVED_ROWS, op as ActivityItemList, ap as ActivityItemListSkeleton, Pl as AiPromotionChat, Fl as AiPromotionChatProvider, uy as ApplicationFrame, It as AreaChart, Lj as AreaChartWidget, Cj as AutoGrid, xo as Badge, qe as BarChart, Rj as BarChartWidget, ip as BaseActivityItemList, nt as BaseBanner, fp as BaseCelebration, kp as BaseCommunityPost, Fi as BaseTabs, Xr as BreadcrumbSelect, Oy as Breadcrumbs, wp as CalendarEvent, $j as CalendarEventList, ce as CardSelectableContainer, A as Carousel, Qe as CategoryBarChart, mM as CategoryBarSection, mp as Celebration, pp as CelebrationSkeleton, Xj as ChartWidgetEmptyState, qo as Chip, UM as ClockInControls, Mt as CoachmarkProvider, Ct as ComboChart, jp as CommunityPost, Bp as CommunityPostCard, Ap as CommunityPostSkeleton, Jb as CompanySelector, gn as Counter, ZN as DEFAULT_EXPECTED_ITEMS_COUNT, Rz as Dashboard, yy as DaytimePage, Ei as DetailsItem, Qi as DetailsItemsList, Rt as Dialog, Di as Dropdown, WN as EVENT_LIST_GAP, Ef as EntitySelect, yt as F0ActionBar, zR as F0AgenticHome, VR as F0AgenticHomeBlock, ue as F0AiBanner, pu as F0AiCallout, Co as F0AvatarModule, Js as F0ButtonToggle, xu as F0Callout, Ur as F0CardHorizontal, Ur as F0CardRow, Ed as F0CarouselDialog, ij as F0Chat, UC as F0ChatHistoryLimitCard, wc as F0ChatProvider, HS as F0CommandPaletteProvider, Gp as F0CommunityPostsCarousel, Nu as F0Confetti, dj as F0ENPSButton, Wl as F0EmojiPicker, xa as F0FileItem, Pe as F0FormEditableTable, Ve as F0LocationInput, yc as F0Map, xc as F0MapControls, ac as F0MapList, dc as F0MapSidebar, pc as F0MapSidebarToggle, gc as F0MapSkeleton, Gv as F0Meeting, td as F0MeetingCard, _m as F0MeetingProvider, Ov as F0MeetingRoom, Kv as F0MeetingSlot, Wv as F0MeetingSurface, qt as F0NotesTextEditor, He as F0NotesTextEditorSkeleton, h as F0NumberInput, ge as F0NumberInputInline, st as F0PhoneInput, Gs as F0ProgressSeries, od as F0PulseDot, Cd as F0Resizable, Re as F0ResourceHeader, Re as ResourceHeader, La as F0RichTextDisplay, ct as F0RichTextEditor, js as F0SearchInput, Od as F0SegmentedBar, Xe as F0SegmentedControl, zd as F0SwipeDeck, vt as F0TableOfContent, Jf as F0TemplateTextInput, l as F0TextAreaInput, pe as F0TextAreaInputInline, Va as F0TextInput, Gt as F0TextInputInline, Zd as F0Timeline, Yd as F0VersionHistory, VC as F0_CHAT_HEADER_TITLE_SELECTOR, Cs as F1SearchBox, te as FILE_TYPES, tr as FileItem, hp as HighlightBanner, _N as HomeSlotItem, gN as HomeSlotItems, rM as IndicatorsList, Mr as Input, at as Item, Dt as ItemSectionHeader, JS as LATEST, AN as LIST_COMPACT_AFTER, HN as LIST_MORE_BUTTON_CLASS, mt as LineChart, zj as LineChartWidget, $v as MeetingNotes, qv as MeetingPanelContent, Yv as MeetingRoomChat, Ev as MeetingSidePanel, Zh as MeetingSurfaceProvider, Qv as MeetingTranscript, ux as Menu, oo as MobileDropdown, yF as NewHomeLayout, Wt as NotesTextEditor, fe as NotesTextEditorSkeleton, f as NumberInput, eb as OmniButton, Nx as OneApprovalHistory, xs as OneCalendar, gs as OneCalendarInternal, xt as OneDataCollection, Zt as OneDateNavigator, oe as OneEmptyState, Xp as OneListItem, Yp as OneListItemSkeleton, a as OnePagination, $p as OnePersonListItem, Gz as OneRestrictComponent, nb as Page, Xy as PageHeader, ky as PageHeaderNavigationContext, Ay as PageHeaderNavigationProvider, oa as PageNavigation, rt as PieChart, Bj as PieChartWidget, S as PrivateBox, tt as ProgressBarChart, HR as RECOMMENDED_AGENTIC_HOME_RULES, sc as RECOMMENDED_MAX_MARKERS, ze as RadarChart, vp as Reactions, ka as RichTextDisplay, I as RichTextEditor, BN as SLOT_ROW_BLEED, QN as SLOT_SKELETON_ITEM_TESTID, Kz as ScrollArea, yx as SearchBar, le as SectionHeader, zs as Select, Qt as Shortcut, Sx as Sidebar, kb as SidebarChatBlankState, Lb as SidebarChatItem, jb as SidebarChatItemSkeleton, qb as SidebarChatList, Nb as SidebarChatListSkeleton, fb as SidebarChatProvider, xb as SidebarCollapsibleSection, $b as SidebarFooter, tx as SidebarHeader, px as SidebarPanelHeader, vx as SidebarRail, Db as SidebarTabPanel, Tx as SidebarTabs, Qb as SidebarUserMenu, CP as SlotWidget, SP as SlotWidgetContent, cs as Spinner, Sj as Split, xj as Stack, Hj as SummariesWidget, Is as Switch, Fa as Tabs, $a as TabsSkeleton, qM as TasksList, Vt as Textarea, mo as ToggleGroup, Ii as ToggleGroupItem, vn as Tooltip, bn as TooltipGroup, pM as TwoColumnsList, L as UPLOAD_INPUT_ID, zt as VerticalBarChart, Vj as VerticalBarChartWidget, $d as VirtualList, vs as WeekStartDay, ao as Weekdays, E as Widget, aM as WidgetAvatarsListItem, QR as WidgetCatalog, Hz as WidgetEmptyState, tM as WidgetHighlightButton, uM as WidgetInboxList, sM as WidgetInboxListItem, Wz as WidgetSection, dM as WidgetSimpleList, lM as WidgetSimpleListItem, Bz as WidgetStrip, Ot as actionBarStatuses, Gl as aiCalloutStatuses, rd as attendeesDisplays, nh as buildTiles, Me as buttonToggleColors, ke as buttonToggleSizes, Ie as buttonToggleVariants, Sp as calendarEventVariants, qs as chipVariants, hl as coachmarks, xS as commandActionRisks, zp as communityPostCardVariants, Su as confettiPalette, M_ as createMeetingSignalStore, hc as defaultMapStyle, sP as defaultSlotRenderers, oP as defaultSlotSkeleton, bl as defineStepByStepCoachmarkGuidance, We as downloadAsCSV, Vx as downloadAsExcel, US as f0ChatSenderColors, Il as f0EmojiPickerSizes, ga as f0FileItemSizes, uc as f0MapMarkerVariants, vc as f0MapStyles, dh as f0MeetingConnectionQualities, hh as f0MeetingCoreActionIds, lh as f0MeetingDisconnectReasons, uh as f0MeetingPermissions, sh as f0MeetingPresences, ch as f0MeetingStatuses, fh as f0MeetingSurfaceDestinations, ph as f0MeetingSurfaceModes, oh as f0MeetingTrackKinds, ll as f0ProgressSeriesColors, cl as f0ProgressSeriesSizes, mh as f0WindowCorners, PN as fromParams, Je as generateCSVContent, ve as getAutoPerPageMinHeight, Ws as getGranularityDefinition, bs as getGranularityDefinitions, Ys as getGranularitySimpleDefinition, fc as googleMapStyles, oc as googlePinlessMapStyles, Vs as granularityDefinitions, MN as homeSlot, Ga as isPossiblePhoneValue, qS as isPost, WS as isSystemMessage, KS as isUserMessage, la as isValidPhoneValue, S_ as layoutGrid, m as listIconColors, UN as listMoreButtonClass, NN as listSlot, jf as locationInputSizes, Mf as locationParts, nd as meetingStates, Do as modules, Nh as nearestCorner, Kp as oneListItemRowClassName, Nf as phoneInputSizes, Mh as placementFromRect, k as predefinedPresets, sd as pulseDotVariants, RN as railActionTones, Rs as rangeSeparator, T_ as reorderForSpeakers, cd as resizableDirections, u_ as resolveAutoFocus, Fs as resolveGranularityDefinition, jh as resolvePlacement, kN as resolveSlotRenderer, FN as resolveWidgetHeader, Fx as seedFromStorage, Ce as selectSizes, T as selectVariants, Ph as settlePlacement, VN as slotRowBleed, x_ as solveGrid, E_ as solveSpotlight, Gd as swipeDirections, ah as tileAspectRatio, eh as tileKey, Dl as useAiPromotionChat, BS as useCommandPalette, sp as useCompactOnScroll, ju as useConfetti, lt as useDataCollectionData, Ix as useDataCollectionItemNavigation, F as useDataCollectionSource, jt as useExportAction, Rc as useF0Chat, ym as useF0Meeting, xm as useF0MeetingRoster, bm as useF0MeetingStable, vm as useHasF0Meeting, dt as useInfiniteScrollPagination, hN as useIsBulkChange, I_ as useMeetingSignal, L_ as useMeetingSpeakers, Qh as useMeetingSurface, $h as useMeetingSurfaceOptional, My as usePageHeaderItemNavigation, jy as usePageHeaderNavigation, bi as useSidePanel, mc as useSidebar, gb as useSidebarChatActions, hb as useSidebarChats, Wd as useSwipeDeck, wm as useTrackBinding, xe as useWidgetIsWide, ey as viewportRect, zN as widgetChrome, LN as widgetParamsAreComplete, IN as widgetTitle };
|