@exegia/corpora-ui 0.22.0 → 0.23.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-lib/components/blocks/auth/__tests__/auth-flow-block.test.d.ts +1 -0
- package/dist-lib/components/blocks/auth/auth-flow-block.d.ts +123 -0
- package/dist-lib/components/blocks/scaffold/__tests__/scaffold-atom.test.d.ts +1 -0
- package/dist-lib/components/blocks/scaffold/index.d.ts +2 -0
- package/dist-lib/components/blocks/scaffold/scaffold-atom.d.ts +97 -0
- package/dist-lib/components/blocks/scaffold/scaffold-context.d.ts +3 -1
- package/dist-lib/components/blocks/scaffold/scaffold-root.d.ts +12 -3
- package/dist-lib/components/blocks/scaffold/type.d.ts +58 -18
- package/dist-lib/components/blocks/scaffold/use-scaffold-state.d.ts +26 -0
- package/dist-lib/components/blocks/scaffold/use-scaffold.d.ts +7 -1
- package/dist-lib/components/blocks/scaffold/utils.d.ts +11 -1
- package/dist-lib/components/ui/switch.d.ts +4 -0
- package/dist-lib/index.d.ts +1 -0
- package/dist-lib/index.js +1383 -1196
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/beste/piece/browser-frame.tsx +1 -1
- package/src/components/beste/piece/utils.ts +4 -4
- package/src/components/blocks/auth/__tests__/auth-flow-block.test.tsx +183 -0
- package/src/components/blocks/auth/auth-flow-block.tsx +296 -0
- package/src/components/blocks/scaffold/__tests__/scaffold-atom.test.tsx +210 -0
- package/src/components/blocks/scaffold/index.ts +15 -0
- package/src/components/blocks/scaffold/scaffold-actions.tsx +5 -1
- package/src/components/blocks/scaffold/scaffold-atom.ts +383 -0
- package/src/components/blocks/scaffold/scaffold-canvas.tsx +12 -4
- package/src/components/blocks/scaffold/scaffold-context.ts +3 -1
- package/src/components/blocks/scaffold/scaffold-inspector.tsx +9 -2
- package/src/components/blocks/scaffold/scaffold-panel.tsx +9 -5
- package/src/components/blocks/scaffold/scaffold-root.tsx +64 -32
- package/src/components/blocks/scaffold/scaffold-tab.tsx +13 -9
- package/src/components/blocks/scaffold/type.ts +64 -18
- package/src/components/blocks/scaffold/use-scaffold-state.ts +58 -0
- package/src/components/blocks/scaffold/use-scaffold.ts +30 -19
- package/src/components/blocks/scaffold/utils.ts +45 -1
- package/src/components/docs/component-preview.tsx +7 -2
- package/src/components/docs/demo-controls.tsx +32 -23
- package/src/components/ui/switch.tsx +30 -0
- package/src/index.ts +1 -0
- package/dist-lib/components/blocks/scaffold/use-panel-visibility.d.ts +0 -19
- package/src/components/blocks/scaffold/use-panel-visibility.ts +0 -180
package/dist-lib/index.js
CHANGED
|
@@ -2741,148 +2741,8 @@ function va(e, t) {
|
|
|
2741
2741
|
}, [e, t]), n.remaining;
|
|
2742
2742
|
}
|
|
2743
2743
|
//#endregion
|
|
2744
|
-
//#region src/components/blocks/auth/auth-session-atom.ts
|
|
2745
|
-
var ya = G("unknown");
|
|
2746
|
-
ya.debugLabel = "auth-session/status";
|
|
2747
|
-
var ba = G(null);
|
|
2748
|
-
ba.debugLabel = "auth-session/user";
|
|
2749
|
-
var xa = G((e) => e(ya) === "authenticated");
|
|
2750
|
-
xa.debugLabel = "auth-session/isAuthenticated";
|
|
2751
|
-
var Sa = G((e) => ({
|
|
2752
|
-
status: e(ya),
|
|
2753
|
-
user: e(ba)
|
|
2754
|
-
}));
|
|
2755
|
-
Sa.debugLabel = "auth-session/state";
|
|
2756
|
-
var Ca = G(null, (e, t, n) => {
|
|
2757
|
-
t(ba, n), t(ya, "authenticated");
|
|
2758
|
-
});
|
|
2759
|
-
Ca.debugLabel = "auth-session/signIn";
|
|
2760
|
-
var wa = G(null, (e, t, n) => {
|
|
2761
|
-
let r = e(ba);
|
|
2762
|
-
r !== null && t(ba, {
|
|
2763
|
-
...r,
|
|
2764
|
-
...n
|
|
2765
|
-
});
|
|
2766
|
-
});
|
|
2767
|
-
wa.debugLabel = "auth-session/updateUser";
|
|
2768
|
-
var Ta = G(null, (e, t) => {
|
|
2769
|
-
t(ya, "unauthenticated"), t(ba, null);
|
|
2770
|
-
});
|
|
2771
|
-
Ta.debugLabel = "auth-session/markUnauthenticated";
|
|
2772
|
-
var Ea = G(null, (e, t) => {
|
|
2773
|
-
t(ba, null), t(ya, "unauthenticated");
|
|
2774
|
-
});
|
|
2775
|
-
Ea.debugLabel = "auth-session/signOut";
|
|
2776
|
-
//#endregion
|
|
2777
|
-
//#region src/components/blocks/auth/auth-flow-atom.ts
|
|
2778
|
-
var Da = "default", Oa = [];
|
|
2779
|
-
function ka(e) {
|
|
2780
|
-
let t = /* @__PURE__ */ new Map(), n = ((n) => {
|
|
2781
|
-
let r = t.get(n);
|
|
2782
|
-
return r === void 0 && (r = e(n), t.set(n, r)), r;
|
|
2783
|
-
});
|
|
2784
|
-
return n.remove = (e) => {
|
|
2785
|
-
t.delete(e);
|
|
2786
|
-
}, Oa.push(n), n;
|
|
2787
|
-
}
|
|
2788
|
-
function Aa(e, t) {
|
|
2789
|
-
return ka((n) => {
|
|
2790
|
-
let r = G(t);
|
|
2791
|
-
return r.debugLabel = `auth-flow/${n}/${e}`, r;
|
|
2792
|
-
});
|
|
2793
|
-
}
|
|
2794
|
-
function ja(e, t) {
|
|
2795
|
-
return ka((n) => {
|
|
2796
|
-
let r = G((e) => t(e, n));
|
|
2797
|
-
return r.debugLabel = `auth-flow/${n}/${e}`, r;
|
|
2798
|
-
});
|
|
2799
|
-
}
|
|
2800
|
-
function Ma(e, t) {
|
|
2801
|
-
return ka((n) => {
|
|
2802
|
-
let r = G(null, (e, r, ...i) => t(e, r, n, ...i));
|
|
2803
|
-
return r.debugLabel = `auth-flow/${n}/${e}`, r;
|
|
2804
|
-
});
|
|
2805
|
-
}
|
|
2806
|
-
function Na(e) {
|
|
2807
|
-
let t = e.indexOf("@");
|
|
2808
|
-
return t > 0 ? `${e[0]}•••${e.slice(t)}` : e.length <= 4 ? "•••" : `•••${e.slice(-4)}`;
|
|
2809
|
-
}
|
|
2810
|
-
var Pa = Aa("step", "login"), Fa = Aa("identifier", null), Ia = Aa("channel", "email"), La = Aa("status", "idle"), Ra = Aa("error", null), za = ja("maskedIdentifier", (e, t) => {
|
|
2811
|
-
let n = e(Fa(t));
|
|
2812
|
-
return n === null ? null : Na(n);
|
|
2813
|
-
}), Ba = ja("state", (e, t) => ({
|
|
2814
|
-
step: e(Pa(t)),
|
|
2815
|
-
identifier: e(Fa(t)),
|
|
2816
|
-
maskedIdentifier: e(za(t)),
|
|
2817
|
-
channel: e(Ia(t)),
|
|
2818
|
-
status: e(La(t)),
|
|
2819
|
-
error: e(Ra(t))
|
|
2820
|
-
})), Va = Ma("goToStep", (e, t, n, r) => {
|
|
2821
|
-
t(Pa(n), r), t(La(n), "idle"), t(Ra(n), null);
|
|
2822
|
-
}), Ha = Ma("beginVerification", (e, t, n, { identifier: r, channel: i = "email", step: a = "verify-code" }) => {
|
|
2823
|
-
t(Fa(n), r), t(Ia(n), i), t(Pa(n), a), t(La(n), "idle"), t(Ra(n), null);
|
|
2824
|
-
}), Ua = Ma("beginAttempt", (e, t, n) => {
|
|
2825
|
-
t(La(n), "loading"), t(Ra(n), null);
|
|
2826
|
-
}), Wa = Ma("fail", (e, t, n, r) => {
|
|
2827
|
-
t(La(n), "error"), t(Ra(n), r);
|
|
2828
|
-
}), Ga = Ma("complete", (e, t, n, r) => {
|
|
2829
|
-
t(La(n), "success"), t(Ra(n), null), t(Pa(n), "success"), r && t(Ca, r);
|
|
2830
|
-
}), Ka = Ma("reset", (e, t, n) => {
|
|
2831
|
-
t(Pa(n), "login"), t(Fa(n), null), t(Ia(n), "email"), t(La(n), "idle"), t(Ra(n), null);
|
|
2832
|
-
}), qa = G(null, (e, t) => {
|
|
2833
|
-
t(Ea), t(Ka(Da));
|
|
2834
|
-
});
|
|
2835
|
-
qa.debugLabel = "auth-flow/endAuthSession";
|
|
2836
|
-
function Ja(e) {
|
|
2837
|
-
for (let t of Oa) t.remove(e);
|
|
2838
|
-
}
|
|
2839
|
-
//#endregion
|
|
2840
|
-
//#region src/components/blocks/auth/use-auth-state.ts
|
|
2841
|
-
function Ya(e = Da) {
|
|
2842
|
-
return K(Ba(e));
|
|
2843
|
-
}
|
|
2844
|
-
function Xa(e = Da) {
|
|
2845
|
-
let t = q(Va(e)), n = q(Ha(e)), r = q(Ua(e)), i = q(Wa(e)), a = q(Ga(e)), o = q(Ka(e));
|
|
2846
|
-
return F.useMemo(() => ({
|
|
2847
|
-
goToStep: t,
|
|
2848
|
-
beginVerification: n,
|
|
2849
|
-
beginAttempt: r,
|
|
2850
|
-
fail: i,
|
|
2851
|
-
complete: a,
|
|
2852
|
-
reset: o
|
|
2853
|
-
}), [
|
|
2854
|
-
t,
|
|
2855
|
-
n,
|
|
2856
|
-
r,
|
|
2857
|
-
i,
|
|
2858
|
-
a,
|
|
2859
|
-
o
|
|
2860
|
-
]);
|
|
2861
|
-
}
|
|
2862
|
-
function Za() {
|
|
2863
|
-
let e = K(Sa), t = K(xa);
|
|
2864
|
-
return F.useMemo(() => ({
|
|
2865
|
-
...e,
|
|
2866
|
-
isAuthenticated: t
|
|
2867
|
-
}), [e, t]);
|
|
2868
|
-
}
|
|
2869
|
-
function Qa() {
|
|
2870
|
-
let e = q(Ca), t = q(wa), n = q(Ta), r = q(qa);
|
|
2871
|
-
return F.useMemo(() => ({
|
|
2872
|
-
signIn: e,
|
|
2873
|
-
updateUser: t,
|
|
2874
|
-
markUnauthenticated: n,
|
|
2875
|
-
signOut: r
|
|
2876
|
-
}), [
|
|
2877
|
-
e,
|
|
2878
|
-
t,
|
|
2879
|
-
n,
|
|
2880
|
-
r
|
|
2881
|
-
]);
|
|
2882
|
-
}
|
|
2883
|
-
//#endregion
|
|
2884
2744
|
//#region src/components/blocks/auth/code-auth-block.tsx
|
|
2885
|
-
function
|
|
2745
|
+
function ya({ channel: e = "email", logo: t, accent: n, destination: o, length: s = 6, autoSubmit: c = !0, resendSeconds: l = 30, onVerify: u, onResend: d, onBack: f }) {
|
|
2886
2746
|
let [p, m] = F.useState("idle"), [h, g] = F.useState(null), [_, v] = F.useState(""), [y, b] = F.useState(0), x = va(l, y), S = e === "sms" ? re : ee, C = e === "sms" ? "phone" : "email", w = F.useCallback(async (e) => {
|
|
2887
2747
|
g(null), m("loading");
|
|
2888
2748
|
try {
|
|
@@ -2988,7 +2848,7 @@ function $a({ channel: e = "email", logo: t, accent: n, destination: o, length:
|
|
|
2988
2848
|
}
|
|
2989
2849
|
//#endregion
|
|
2990
2850
|
//#region src/components/blocks/auth/forgot-password-block.tsx
|
|
2991
|
-
function
|
|
2851
|
+
function ba({ title: e = "Reset your password", logo: t, accent: n, description: o = "Enter your email and we will send you a reset link", onSubmit: s, onBackToLogin: c }) {
|
|
2992
2852
|
let u = F.useId(), [d, f] = F.useState("idle"), [p, m] = F.useState(null), [h, g] = F.useState("");
|
|
2993
2853
|
async function _(e) {
|
|
2994
2854
|
e.preventDefault(), m(null), f("loading");
|
|
@@ -3062,146 +2922,8 @@ function eo({ title: e = "Reset your password", logo: t, accent: n, description:
|
|
|
3062
2922
|
});
|
|
3063
2923
|
}
|
|
3064
2924
|
//#endregion
|
|
3065
|
-
//#region src/components/blocks/auth/linked-accounts-block.tsx
|
|
3066
|
-
var to = "This is your only way to sign in, so it can't be disconnected.";
|
|
3067
|
-
function no({ title: e = "Connected accounts", description: t = "Manage the accounts you can use to sign in.", identities: n = [], providers: r = [
|
|
3068
|
-
"google",
|
|
3069
|
-
"apple",
|
|
3070
|
-
"github"
|
|
3071
|
-
], loading: o = !1, hasOtherSignInMethods: s = !1, onLink: c, onUnlink: l, className: u }) {
|
|
3072
|
-
let d = F.useId(), [f, p] = F.useState(null), [m, h] = F.useState(null), [g, _] = F.useState(null), v = new Set(n.map((e) => e.provider)), y = r.filter((e) => !v.has(e)), b = m !== null || g !== null, x = !s && n.length <= 1;
|
|
3073
|
-
async function S(e) {
|
|
3074
|
-
if (!b) {
|
|
3075
|
-
p(null), h(e);
|
|
3076
|
-
try {
|
|
3077
|
-
await c?.(e);
|
|
3078
|
-
} catch (e) {
|
|
3079
|
-
p(e instanceof Error ? e.message : "Unable to connect account.");
|
|
3080
|
-
} finally {
|
|
3081
|
-
h(null);
|
|
3082
|
-
}
|
|
3083
|
-
}
|
|
3084
|
-
}
|
|
3085
|
-
async function C(e) {
|
|
3086
|
-
if (!(b || x)) {
|
|
3087
|
-
p(null), _(e);
|
|
3088
|
-
try {
|
|
3089
|
-
await l?.(e);
|
|
3090
|
-
} catch (e) {
|
|
3091
|
-
p(e instanceof Error ? e.message : "Unable to disconnect account.");
|
|
3092
|
-
} finally {
|
|
3093
|
-
_(null);
|
|
3094
|
-
}
|
|
3095
|
-
}
|
|
3096
|
-
}
|
|
3097
|
-
return /* @__PURE__ */ i(Oe, {
|
|
3098
|
-
reducedMotion: "user",
|
|
3099
|
-
children: /* @__PURE__ */ a(rt, {
|
|
3100
|
-
className: J("w-full", u),
|
|
3101
|
-
"data-slot": "auth-block",
|
|
3102
|
-
children: [/* @__PURE__ */ a(ut, { children: [/* @__PURE__ */ i(dt, { children: e }), /* @__PURE__ */ i(ft, { children: t })] }), /* @__PURE__ */ i(mt, { children: o ? /* @__PURE__ */ a("div", {
|
|
3103
|
-
className: "flex items-center gap-2 text-sm text-muted-foreground",
|
|
3104
|
-
children: [/* @__PURE__ */ i(qe, { className: "size-4" }), "Loading connected accounts…"]
|
|
3105
|
-
}) : /* @__PURE__ */ a(U.div, {
|
|
3106
|
-
layout: !0,
|
|
3107
|
-
transition: {
|
|
3108
|
-
duration: .3,
|
|
3109
|
-
ease: da
|
|
3110
|
-
},
|
|
3111
|
-
className: "flex flex-col gap-3",
|
|
3112
|
-
children: [
|
|
3113
|
-
/* @__PURE__ */ i(ha, { message: f }),
|
|
3114
|
-
n.length > 0 ? /* @__PURE__ */ i("ul", {
|
|
3115
|
-
"aria-label": "Connected accounts",
|
|
3116
|
-
className: "flex flex-col gap-2",
|
|
3117
|
-
children: /* @__PURE__ */ i(H, {
|
|
3118
|
-
initial: !1,
|
|
3119
|
-
children: n.map((e, t) => {
|
|
3120
|
-
let { label: n, BrandIcon: r, brandClassName: o } = pr[e.provider];
|
|
3121
|
-
return /* @__PURE__ */ a(U.li, {
|
|
3122
|
-
layout: !0,
|
|
3123
|
-
className: "flex items-center justify-between gap-3 rounded-lg border px-3 py-2",
|
|
3124
|
-
initial: {
|
|
3125
|
-
opacity: 0,
|
|
3126
|
-
y: -4
|
|
3127
|
-
},
|
|
3128
|
-
animate: {
|
|
3129
|
-
opacity: 1,
|
|
3130
|
-
y: 0
|
|
3131
|
-
},
|
|
3132
|
-
exit: {
|
|
3133
|
-
opacity: 0,
|
|
3134
|
-
y: -4
|
|
3135
|
-
},
|
|
3136
|
-
transition: {
|
|
3137
|
-
duration: .25,
|
|
3138
|
-
ease: da,
|
|
3139
|
-
delay: Math.min(t, 5) * .04
|
|
3140
|
-
},
|
|
3141
|
-
children: [/* @__PURE__ */ a("div", {
|
|
3142
|
-
className: "flex min-w-0 items-center gap-2.5",
|
|
3143
|
-
children: [/* @__PURE__ */ i(r, {
|
|
3144
|
-
"aria-hidden": "true",
|
|
3145
|
-
className: J("size-4", o)
|
|
3146
|
-
}), /* @__PURE__ */ a("div", {
|
|
3147
|
-
className: "flex min-w-0 flex-col",
|
|
3148
|
-
children: [/* @__PURE__ */ i("span", {
|
|
3149
|
-
className: "text-sm font-medium",
|
|
3150
|
-
children: n
|
|
3151
|
-
}), e.email && /* @__PURE__ */ i("span", {
|
|
3152
|
-
className: "truncate text-xs text-muted-foreground",
|
|
3153
|
-
children: e.email
|
|
3154
|
-
})]
|
|
3155
|
-
})]
|
|
3156
|
-
}), /* @__PURE__ */ i(Y, {
|
|
3157
|
-
"aria-describedby": x ? d : void 0,
|
|
3158
|
-
"aria-label": `Disconnect ${n}`,
|
|
3159
|
-
size: "sm",
|
|
3160
|
-
type: "button",
|
|
3161
|
-
variant: "destructive-outline",
|
|
3162
|
-
disabled: b || x,
|
|
3163
|
-
loading: g === e.id,
|
|
3164
|
-
onClick: () => void C(e.id),
|
|
3165
|
-
children: "Disconnect"
|
|
3166
|
-
})]
|
|
3167
|
-
}, e.id);
|
|
3168
|
-
})
|
|
3169
|
-
})
|
|
3170
|
-
}) : /* @__PURE__ */ i("p", {
|
|
3171
|
-
className: "text-sm text-muted-foreground",
|
|
3172
|
-
children: "No sign-in methods connected yet."
|
|
3173
|
-
}),
|
|
3174
|
-
x && n.length > 0 && /* @__PURE__ */ i("p", {
|
|
3175
|
-
className: "text-xs text-muted-foreground",
|
|
3176
|
-
id: d,
|
|
3177
|
-
children: to
|
|
3178
|
-
}),
|
|
3179
|
-
y.map((e) => {
|
|
3180
|
-
let { label: t, BrandIcon: n, brandClassName: r } = pr[e];
|
|
3181
|
-
return /* @__PURE__ */ a(Y, {
|
|
3182
|
-
className: "w-full",
|
|
3183
|
-
type: "button",
|
|
3184
|
-
variant: "outline",
|
|
3185
|
-
disabled: b,
|
|
3186
|
-
loading: m === e,
|
|
3187
|
-
onClick: () => void S(e),
|
|
3188
|
-
children: [/* @__PURE__ */ i(n, {
|
|
3189
|
-
"aria-hidden": "true",
|
|
3190
|
-
className: r
|
|
3191
|
-
}), /* @__PURE__ */ a("span", {
|
|
3192
|
-
className: "flex-1",
|
|
3193
|
-
children: ["Connect ", t]
|
|
3194
|
-
})]
|
|
3195
|
-
}, e);
|
|
3196
|
-
})
|
|
3197
|
-
]
|
|
3198
|
-
}) })]
|
|
3199
|
-
})
|
|
3200
|
-
});
|
|
3201
|
-
}
|
|
3202
|
-
//#endregion
|
|
3203
2925
|
//#region src/components/blocks/auth/login-block.tsx
|
|
3204
|
-
function
|
|
2926
|
+
function xa({ title: e = "Login to your account", description: t = "Enter your email and password to login", logo: n, accent: o, providers: s = [
|
|
3205
2927
|
"google",
|
|
3206
2928
|
"apple",
|
|
3207
2929
|
"github"
|
|
@@ -3346,10 +3068,10 @@ function ro({ title: e = "Login to your account", description: t = "Enter your e
|
|
|
3346
3068
|
}
|
|
3347
3069
|
//#endregion
|
|
3348
3070
|
//#region src/components/blocks/auth/onboarding/profile-step.tsx
|
|
3349
|
-
function
|
|
3071
|
+
function Sa(e, t) {
|
|
3350
3072
|
return e.kind === "checkbox" ? typeof t == "boolean" && t : typeof t == "string" ? t : "";
|
|
3351
3073
|
}
|
|
3352
|
-
function
|
|
3074
|
+
function Ca(e, t) {
|
|
3353
3075
|
let n = e.required === !0;
|
|
3354
3076
|
if (e.kind === "checkbox") return n && t !== !0 ? `${e.label} is required` : null;
|
|
3355
3077
|
let r = typeof t == "string" ? t.trim() : "";
|
|
@@ -3361,8 +3083,8 @@ function ao(e, t) {
|
|
|
3361
3083
|
}
|
|
3362
3084
|
return e.kind === "select" && r.length > 0 && !e.options.map((e) => e.value).includes(r) ? `Choose a valid option for ${e.label}` : e.validate?.(r) ?? null;
|
|
3363
3085
|
}
|
|
3364
|
-
function
|
|
3365
|
-
let l = F.useId(), [u, d] = F.useState(() => Object.fromEntries(e.fields.map((e) => [e.name,
|
|
3086
|
+
function wa({ step: e, values: t, submitting: n = !1, submitLabel: r, onSubmit: o, onBack: s, onDraftChange: c }) {
|
|
3087
|
+
let l = F.useId(), [u, d] = F.useState(() => Object.fromEntries(e.fields.map((e) => [e.name, Sa(e, t[e.name])]))), [f, p] = F.useState({});
|
|
3366
3088
|
function m(e, t) {
|
|
3367
3089
|
d((n) => ({
|
|
3368
3090
|
...n,
|
|
@@ -3376,7 +3098,7 @@ function oo({ step: e, values: t, submitting: n = !1, submitLabel: r, onSubmit:
|
|
|
3376
3098
|
if (t.preventDefault(), n) return;
|
|
3377
3099
|
let r = {};
|
|
3378
3100
|
for (let t of e.fields) {
|
|
3379
|
-
let e =
|
|
3101
|
+
let e = Ca(t, u[t.name]);
|
|
3380
3102
|
e && (r[t.name] = e);
|
|
3381
3103
|
}
|
|
3382
3104
|
if (Object.keys(r).length > 0) {
|
|
@@ -3480,7 +3202,7 @@ function oo({ step: e, values: t, submitting: n = !1, submitLabel: r, onSubmit:
|
|
|
3480
3202
|
}
|
|
3481
3203
|
//#endregion
|
|
3482
3204
|
//#region src/components/blocks/auth/onboarding-block.tsx
|
|
3483
|
-
var
|
|
3205
|
+
var Ta = [{
|
|
3484
3206
|
id: "profile",
|
|
3485
3207
|
title: "Your profile",
|
|
3486
3208
|
fields: [{
|
|
@@ -3490,7 +3212,7 @@ var so = [{
|
|
|
3490
3212
|
required: !0
|
|
3491
3213
|
}]
|
|
3492
3214
|
}];
|
|
3493
|
-
function
|
|
3215
|
+
function Ea({ steps: e = Ta, logo: t, accent: n, onStepSubmit: r, onComplete: o, showCompleteScreen: s = !0, className: c }) {
|
|
3494
3216
|
let l = F.useRef(null), u = F.useRef({}), [d, f] = F.useState({}), [p, m] = F.useState(0), [h, g] = F.useState({}), [_, v] = F.useState("idle"), [y, b] = F.useState(null), x = _ === "success", S = e[p], C = p >= e.length - 1;
|
|
3495
3217
|
F.useEffect(() => {
|
|
3496
3218
|
y || l.current?.focus();
|
|
@@ -3547,7 +3269,7 @@ function co({ steps: e = so, logo: t, accent: n, onStepSubmit: r, onComplete: o,
|
|
|
3547
3269
|
children: S.title
|
|
3548
3270
|
}),
|
|
3549
3271
|
/* @__PURE__ */ i(ha, { message: y }),
|
|
3550
|
-
/* @__PURE__ */ i(
|
|
3272
|
+
/* @__PURE__ */ i(wa, {
|
|
3551
3273
|
step: S,
|
|
3552
3274
|
values: {
|
|
3553
3275
|
...h,
|
|
@@ -3572,39 +3294,662 @@ function co({ steps: e = so, logo: t, accent: n, onStepSubmit: r, onComplete: o,
|
|
|
3572
3294
|
});
|
|
3573
3295
|
}
|
|
3574
3296
|
//#endregion
|
|
3575
|
-
//#region src/components/blocks/auth/
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
function
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3297
|
+
//#region src/components/blocks/auth/signup-block.tsx
|
|
3298
|
+
function Da({ title: e = "Create your account", description: t = "Start exploring manuscripts in minutes", logo: n, accent: o, providers: s = [
|
|
3299
|
+
"google",
|
|
3300
|
+
"apple",
|
|
3301
|
+
"github"
|
|
3302
|
+
], showNameField: c = !0, showTerms: l = !0, termsChecked: u, defaultTermsChecked: d = !1, onTermsCheckedChange: f, enforceStrongPassword: p = !0, onSubmit: m, termsComponent: h, onProviderSelect: g, onLogin: _, onTerms: v }) {
|
|
3303
|
+
let y = F.useId(), b = F.useId(), x = F.useId(), S = F.useId(), [C, w] = F.useState("idle"), [T, E] = F.useState(null), [D, O] = F.useState(null), [k, A] = F.useState(""), [j, ee] = F.useState(d), M = u ?? j;
|
|
3304
|
+
function te(e) {
|
|
3305
|
+
u === void 0 && ee(e), f?.(e);
|
|
3306
|
+
}
|
|
3307
|
+
let [ne, re] = F.useState(!1), [ie, N] = F.useState(!1), P = C === "loading" || D !== null, ae = !p || lr(k) === cr.length, oe = k.trim().length > 0 && ae, se = (!c || ie) && ne && oe;
|
|
3308
|
+
async function ce(e) {
|
|
3309
|
+
if (e.preventDefault(), E(null), !ae) {
|
|
3310
|
+
E("Please meet all password requirements.");
|
|
3311
|
+
return;
|
|
3312
|
+
}
|
|
3313
|
+
if (l && !M) {
|
|
3314
|
+
E("Please accept the terms to continue.");
|
|
3315
|
+
return;
|
|
3316
|
+
}
|
|
3317
|
+
let t = new FormData(e.currentTarget);
|
|
3318
|
+
w("loading");
|
|
3587
3319
|
try {
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3320
|
+
await m?.({
|
|
3321
|
+
name: String(t.get("name") ?? ""),
|
|
3322
|
+
email: String(t.get("email") ?? ""),
|
|
3323
|
+
password: k
|
|
3324
|
+
}), w("success");
|
|
3592
3325
|
} catch (e) {
|
|
3593
|
-
|
|
3594
|
-
} finally {
|
|
3595
|
-
m(!1);
|
|
3326
|
+
w("idle"), E(e instanceof Error ? e.message : "Unable to create account.");
|
|
3596
3327
|
}
|
|
3597
3328
|
}
|
|
3598
|
-
async function
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3329
|
+
async function le(e) {
|
|
3330
|
+
E(null), O(e);
|
|
3331
|
+
try {
|
|
3332
|
+
await g?.(e), w("success");
|
|
3333
|
+
} catch (e) {
|
|
3334
|
+
E(e instanceof Error ? e.message : "Unable to create account.");
|
|
3335
|
+
} finally {
|
|
3336
|
+
O(null);
|
|
3337
|
+
}
|
|
3338
|
+
}
|
|
3339
|
+
return /* @__PURE__ */ i(fa, {
|
|
3340
|
+
title: e,
|
|
3341
|
+
description: t,
|
|
3342
|
+
logo: n,
|
|
3343
|
+
accent: o,
|
|
3344
|
+
footer: C !== "success" && /* @__PURE__ */ a(r, { children: [
|
|
3345
|
+
"Already have an account?",
|
|
3346
|
+
" ",
|
|
3347
|
+
/* @__PURE__ */ i(Y, {
|
|
3348
|
+
variant: "link",
|
|
3349
|
+
onClick: _,
|
|
3350
|
+
children: "Login"
|
|
3351
|
+
})
|
|
3352
|
+
] }),
|
|
3353
|
+
children: /* @__PURE__ */ i(pa, {
|
|
3354
|
+
step: C === "success" ? "success" : "form",
|
|
3355
|
+
children: C === "success" ? /* @__PURE__ */ i(ga, {
|
|
3356
|
+
title: "Account created",
|
|
3357
|
+
description: "Check your inbox to confirm your email address."
|
|
3358
|
+
}) : /* @__PURE__ */ a("div", {
|
|
3359
|
+
className: "flex flex-col gap-4",
|
|
3360
|
+
children: [s.length > 0 && /* @__PURE__ */ a(ma, {
|
|
3361
|
+
show: !se,
|
|
3362
|
+
className: "flex flex-col gap-4",
|
|
3363
|
+
children: [/* @__PURE__ */ i(hr, {
|
|
3364
|
+
providers: s,
|
|
3365
|
+
action: "signup",
|
|
3366
|
+
loadingProvider: D,
|
|
3367
|
+
disabled: C === "loading",
|
|
3368
|
+
onSelect: le
|
|
3369
|
+
}), /* @__PURE__ */ i(_a, { label: "Or with email" })]
|
|
3370
|
+
}), /* @__PURE__ */ a("form", {
|
|
3371
|
+
className: "flex flex-col gap-4",
|
|
3372
|
+
onSubmit: ce,
|
|
3373
|
+
children: [
|
|
3374
|
+
c && /* @__PURE__ */ a(bt, {
|
|
3375
|
+
name: "name",
|
|
3376
|
+
children: [/* @__PURE__ */ i(xt, {
|
|
3377
|
+
htmlFor: y,
|
|
3378
|
+
children: "Name"
|
|
3379
|
+
}), /* @__PURE__ */ i(Nt, {
|
|
3380
|
+
"aria-label": "Name",
|
|
3381
|
+
id: y,
|
|
3382
|
+
name: "name",
|
|
3383
|
+
autoComplete: "name",
|
|
3384
|
+
placeholder: "Your name",
|
|
3385
|
+
required: !0,
|
|
3386
|
+
disabled: P,
|
|
3387
|
+
onChange: (e) => N(e.currentTarget.validity.valid)
|
|
3388
|
+
})]
|
|
3389
|
+
}),
|
|
3390
|
+
/* @__PURE__ */ a(bt, {
|
|
3391
|
+
name: "email",
|
|
3392
|
+
children: [/* @__PURE__ */ i(xt, {
|
|
3393
|
+
htmlFor: b,
|
|
3394
|
+
children: "Email"
|
|
3395
|
+
}), /* @__PURE__ */ i(Nt, {
|
|
3396
|
+
id: b,
|
|
3397
|
+
name: "email",
|
|
3398
|
+
type: "email",
|
|
3399
|
+
"aria-label": "Email",
|
|
3400
|
+
autoComplete: "email",
|
|
3401
|
+
placeholder: "you@example.com",
|
|
3402
|
+
required: !0,
|
|
3403
|
+
disabled: P,
|
|
3404
|
+
onChange: (e) => re(e.currentTarget.validity.valid)
|
|
3405
|
+
})]
|
|
3406
|
+
}),
|
|
3407
|
+
/* @__PURE__ */ i(ma, {
|
|
3408
|
+
show: ne,
|
|
3409
|
+
children: /* @__PURE__ */ a(bt, {
|
|
3410
|
+
name: "password",
|
|
3411
|
+
children: [/* @__PURE__ */ i(xt, {
|
|
3412
|
+
htmlFor: x,
|
|
3413
|
+
children: "Password"
|
|
3414
|
+
}), /* @__PURE__ */ i(dr, {
|
|
3415
|
+
id: x,
|
|
3416
|
+
name: "password",
|
|
3417
|
+
"aria-label": "Password",
|
|
3418
|
+
autoComplete: "new-password",
|
|
3419
|
+
placeholder: "Create a password",
|
|
3420
|
+
showStrength: !0,
|
|
3421
|
+
required: !0,
|
|
3422
|
+
disabled: P,
|
|
3423
|
+
value: k,
|
|
3424
|
+
onChange: (e) => A(e.target.value)
|
|
3425
|
+
})]
|
|
3426
|
+
})
|
|
3427
|
+
}),
|
|
3428
|
+
l && /* @__PURE__ */ a("div", {
|
|
3429
|
+
className: "flex items-center gap-2",
|
|
3430
|
+
children: [/* @__PURE__ */ i(yt, {
|
|
3431
|
+
id: S,
|
|
3432
|
+
checked: M,
|
|
3433
|
+
onCheckedChange: (e) => te(e === !0),
|
|
3434
|
+
disabled: P
|
|
3435
|
+
}), /* @__PURE__ */ a(Vt, {
|
|
3436
|
+
htmlFor: S,
|
|
3437
|
+
className: "font-normal",
|
|
3438
|
+
children: [
|
|
3439
|
+
"I agree to the",
|
|
3440
|
+
" ",
|
|
3441
|
+
h ?? /* @__PURE__ */ i(Y, {
|
|
3442
|
+
variant: "link",
|
|
3443
|
+
type: "button",
|
|
3444
|
+
onClick: v,
|
|
3445
|
+
children: "terms"
|
|
3446
|
+
})
|
|
3447
|
+
]
|
|
3448
|
+
})]
|
|
3449
|
+
}),
|
|
3450
|
+
/* @__PURE__ */ i(ha, { message: T }),
|
|
3451
|
+
/* @__PURE__ */ i(Y, {
|
|
3452
|
+
className: J("w-full", o && "border-transparent bg-[var(--auth-accent)] bg-[image:var(--auth-accent-image)] text-[var(--auth-accent-foreground)] shadow-none hover:bg-[var(--auth-accent)] hover:brightness-110 data-pressed:bg-[var(--auth-accent)] data-pressed:brightness-110 *:data-[slot=button-loading-indicator]:text-[var(--auth-accent-foreground)]"),
|
|
3453
|
+
type: "submit",
|
|
3454
|
+
loading: C === "loading",
|
|
3455
|
+
disabled: P,
|
|
3456
|
+
children: "Create account"
|
|
3457
|
+
})
|
|
3458
|
+
]
|
|
3459
|
+
})]
|
|
3460
|
+
})
|
|
3461
|
+
})
|
|
3462
|
+
});
|
|
3463
|
+
}
|
|
3464
|
+
//#endregion
|
|
3465
|
+
//#region src/components/blocks/auth/update-password-block.tsx
|
|
3466
|
+
function Oa({ title: e = "Update your password", description: t = "Choose a new password for your account", logo: n, accent: r, minStrength: o = 4, onSubmit: s, onDone: c }) {
|
|
3467
|
+
let l = F.useId(), u = F.useId(), [d, f] = F.useState("idle"), [p, m] = F.useState(null), [h, g] = F.useState(""), [_, v] = F.useState(""), y = lr(h) >= o, b = _.length > 0 && _ === h, x = y && b, S = _.length > 0 && !h.startsWith(_);
|
|
3468
|
+
async function C(e) {
|
|
3469
|
+
if (e.preventDefault(), x) {
|
|
3470
|
+
m(null), f("loading");
|
|
3471
|
+
try {
|
|
3472
|
+
await s?.({ password: h }), f("success");
|
|
3473
|
+
} catch (e) {
|
|
3474
|
+
f("idle"), m(e instanceof Error ? e.message : "Unable to update password.");
|
|
3475
|
+
}
|
|
3476
|
+
}
|
|
3477
|
+
}
|
|
3478
|
+
return /* @__PURE__ */ i(fa, {
|
|
3479
|
+
title: e,
|
|
3480
|
+
description: t,
|
|
3481
|
+
logo: n,
|
|
3482
|
+
accent: r,
|
|
3483
|
+
children: /* @__PURE__ */ i(pa, {
|
|
3484
|
+
step: d === "success" ? "success" : "form",
|
|
3485
|
+
children: d === "success" ? /* @__PURE__ */ i(ga, {
|
|
3486
|
+
title: "Password updated",
|
|
3487
|
+
description: "Your password has been changed successfully.",
|
|
3488
|
+
children: c && /* @__PURE__ */ i(Y, {
|
|
3489
|
+
variant: "link",
|
|
3490
|
+
onClick: c,
|
|
3491
|
+
children: "Continue"
|
|
3492
|
+
})
|
|
3493
|
+
}) : /* @__PURE__ */ a("form", {
|
|
3494
|
+
className: "flex flex-col gap-4",
|
|
3495
|
+
onSubmit: C,
|
|
3496
|
+
children: [
|
|
3497
|
+
/* @__PURE__ */ a(bt, {
|
|
3498
|
+
name: "password",
|
|
3499
|
+
children: [/* @__PURE__ */ i(xt, {
|
|
3500
|
+
htmlFor: l,
|
|
3501
|
+
children: "New password"
|
|
3502
|
+
}), /* @__PURE__ */ i(dr, {
|
|
3503
|
+
id: l,
|
|
3504
|
+
name: "password",
|
|
3505
|
+
autoComplete: "new-password",
|
|
3506
|
+
required: !0,
|
|
3507
|
+
showStrength: !0,
|
|
3508
|
+
disabled: d === "loading",
|
|
3509
|
+
value: h,
|
|
3510
|
+
onChange: (e) => g(e.target.value)
|
|
3511
|
+
})]
|
|
3512
|
+
}),
|
|
3513
|
+
/* @__PURE__ */ i(ma, {
|
|
3514
|
+
show: y,
|
|
3515
|
+
children: /* @__PURE__ */ a(bt, {
|
|
3516
|
+
name: "confirmPassword",
|
|
3517
|
+
children: [/* @__PURE__ */ i(xt, {
|
|
3518
|
+
htmlFor: u,
|
|
3519
|
+
children: "Confirm new password"
|
|
3520
|
+
}), /* @__PURE__ */ i(dr, {
|
|
3521
|
+
id: u,
|
|
3522
|
+
name: "confirmPassword",
|
|
3523
|
+
autoComplete: "new-password",
|
|
3524
|
+
required: !0,
|
|
3525
|
+
disabled: d === "loading",
|
|
3526
|
+
value: _,
|
|
3527
|
+
onChange: (e) => v(e.target.value)
|
|
3528
|
+
})]
|
|
3529
|
+
})
|
|
3530
|
+
}),
|
|
3531
|
+
/* @__PURE__ */ i(ha, { message: p ?? (S ? "Passwords do not match." : null) }),
|
|
3532
|
+
/* @__PURE__ */ i(ma, {
|
|
3533
|
+
show: x,
|
|
3534
|
+
children: /* @__PURE__ */ i(Y, {
|
|
3535
|
+
className: J("w-full", r && "border-transparent bg-[var(--auth-accent)] bg-[image:var(--auth-accent-image)] text-[var(--auth-accent-foreground)] shadow-none hover:bg-[var(--auth-accent)] hover:brightness-110 data-pressed:bg-[var(--auth-accent)] data-pressed:brightness-110 *:data-[slot=button-loading-indicator]:text-[var(--auth-accent-foreground)]"),
|
|
3536
|
+
type: "submit",
|
|
3537
|
+
loading: d === "loading",
|
|
3538
|
+
children: "Update password"
|
|
3539
|
+
})
|
|
3540
|
+
})
|
|
3541
|
+
]
|
|
3542
|
+
})
|
|
3543
|
+
})
|
|
3544
|
+
});
|
|
3545
|
+
}
|
|
3546
|
+
//#endregion
|
|
3547
|
+
//#region src/components/blocks/auth/auth-session-atom.ts
|
|
3548
|
+
var ka = G("unknown");
|
|
3549
|
+
ka.debugLabel = "auth-session/status";
|
|
3550
|
+
var Aa = G(null);
|
|
3551
|
+
Aa.debugLabel = "auth-session/user";
|
|
3552
|
+
var ja = G((e) => e(ka) === "authenticated");
|
|
3553
|
+
ja.debugLabel = "auth-session/isAuthenticated";
|
|
3554
|
+
var Ma = G((e) => ({
|
|
3555
|
+
status: e(ka),
|
|
3556
|
+
user: e(Aa)
|
|
3557
|
+
}));
|
|
3558
|
+
Ma.debugLabel = "auth-session/state";
|
|
3559
|
+
var Na = G(null, (e, t, n) => {
|
|
3560
|
+
t(Aa, n), t(ka, "authenticated");
|
|
3561
|
+
});
|
|
3562
|
+
Na.debugLabel = "auth-session/signIn";
|
|
3563
|
+
var Pa = G(null, (e, t, n) => {
|
|
3564
|
+
let r = e(Aa);
|
|
3565
|
+
r !== null && t(Aa, {
|
|
3566
|
+
...r,
|
|
3567
|
+
...n
|
|
3568
|
+
});
|
|
3569
|
+
});
|
|
3570
|
+
Pa.debugLabel = "auth-session/updateUser";
|
|
3571
|
+
var Fa = G(null, (e, t) => {
|
|
3572
|
+
t(ka, "unauthenticated"), t(Aa, null);
|
|
3573
|
+
});
|
|
3574
|
+
Fa.debugLabel = "auth-session/markUnauthenticated";
|
|
3575
|
+
var Ia = G(null, (e, t) => {
|
|
3576
|
+
t(Aa, null), t(ka, "unauthenticated");
|
|
3577
|
+
});
|
|
3578
|
+
Ia.debugLabel = "auth-session/signOut";
|
|
3579
|
+
//#endregion
|
|
3580
|
+
//#region src/components/blocks/auth/auth-flow-atom.ts
|
|
3581
|
+
var La = "default", Ra = [];
|
|
3582
|
+
function za(e) {
|
|
3583
|
+
let t = /* @__PURE__ */ new Map(), n = ((n) => {
|
|
3584
|
+
let r = t.get(n);
|
|
3585
|
+
return r === void 0 && (r = e(n), t.set(n, r)), r;
|
|
3586
|
+
});
|
|
3587
|
+
return n.remove = (e) => {
|
|
3588
|
+
t.delete(e);
|
|
3589
|
+
}, Ra.push(n), n;
|
|
3590
|
+
}
|
|
3591
|
+
function Ba(e, t) {
|
|
3592
|
+
return za((n) => {
|
|
3593
|
+
let r = G(t);
|
|
3594
|
+
return r.debugLabel = `auth-flow/${n}/${e}`, r;
|
|
3595
|
+
});
|
|
3596
|
+
}
|
|
3597
|
+
function Va(e, t) {
|
|
3598
|
+
return za((n) => {
|
|
3599
|
+
let r = G((e) => t(e, n));
|
|
3600
|
+
return r.debugLabel = `auth-flow/${n}/${e}`, r;
|
|
3601
|
+
});
|
|
3602
|
+
}
|
|
3603
|
+
function Ha(e, t) {
|
|
3604
|
+
return za((n) => {
|
|
3605
|
+
let r = G(null, (e, r, ...i) => t(e, r, n, ...i));
|
|
3606
|
+
return r.debugLabel = `auth-flow/${n}/${e}`, r;
|
|
3607
|
+
});
|
|
3608
|
+
}
|
|
3609
|
+
function Ua(e) {
|
|
3610
|
+
let t = e.indexOf("@");
|
|
3611
|
+
return t > 0 ? `${e[0]}•••${e.slice(t)}` : e.length <= 4 ? "•••" : `•••${e.slice(-4)}`;
|
|
3612
|
+
}
|
|
3613
|
+
var Wa = Ba("step", "login"), Ga = Ba("identifier", null), Ka = Ba("channel", "email"), qa = Ba("status", "idle"), Ja = Ba("error", null), Ya = Va("maskedIdentifier", (e, t) => {
|
|
3614
|
+
let n = e(Ga(t));
|
|
3615
|
+
return n === null ? null : Ua(n);
|
|
3616
|
+
}), Xa = Va("state", (e, t) => ({
|
|
3617
|
+
step: e(Wa(t)),
|
|
3618
|
+
identifier: e(Ga(t)),
|
|
3619
|
+
maskedIdentifier: e(Ya(t)),
|
|
3620
|
+
channel: e(Ka(t)),
|
|
3621
|
+
status: e(qa(t)),
|
|
3622
|
+
error: e(Ja(t))
|
|
3623
|
+
})), Za = Ha("goToStep", (e, t, n, r) => {
|
|
3624
|
+
t(Wa(n), r), t(qa(n), "idle"), t(Ja(n), null);
|
|
3625
|
+
}), Qa = Ha("beginVerification", (e, t, n, { identifier: r, channel: i = "email", step: a = "verify-code" }) => {
|
|
3626
|
+
t(Ga(n), r), t(Ka(n), i), t(Wa(n), a), t(qa(n), "idle"), t(Ja(n), null);
|
|
3627
|
+
}), $a = Ha("beginAttempt", (e, t, n) => {
|
|
3628
|
+
t(qa(n), "loading"), t(Ja(n), null);
|
|
3629
|
+
}), eo = Ha("fail", (e, t, n, r) => {
|
|
3630
|
+
t(qa(n), "error"), t(Ja(n), r);
|
|
3631
|
+
}), to = Ha("complete", (e, t, n, r) => {
|
|
3632
|
+
t(qa(n), "success"), t(Ja(n), null), t(Wa(n), "success"), r && t(Na, r);
|
|
3633
|
+
}), no = Ha("reset", (e, t, n) => {
|
|
3634
|
+
t(Wa(n), "login"), t(Ga(n), null), t(Ka(n), "email"), t(qa(n), "idle"), t(Ja(n), null);
|
|
3635
|
+
}), ro = G(null, (e, t) => {
|
|
3636
|
+
t(Ia), t(no(La));
|
|
3637
|
+
});
|
|
3638
|
+
ro.debugLabel = "auth-flow/endAuthSession";
|
|
3639
|
+
function io(e) {
|
|
3640
|
+
for (let t of Ra) t.remove(e);
|
|
3641
|
+
}
|
|
3642
|
+
//#endregion
|
|
3643
|
+
//#region src/components/blocks/auth/use-auth-state.ts
|
|
3644
|
+
function ao(e = La) {
|
|
3645
|
+
return K(Xa(e));
|
|
3646
|
+
}
|
|
3647
|
+
function oo(e = La) {
|
|
3648
|
+
let t = q(Za(e)), n = q(Qa(e)), r = q($a(e)), i = q(eo(e)), a = q(to(e)), o = q(no(e));
|
|
3649
|
+
return F.useMemo(() => ({
|
|
3650
|
+
goToStep: t,
|
|
3651
|
+
beginVerification: n,
|
|
3652
|
+
beginAttempt: r,
|
|
3653
|
+
fail: i,
|
|
3654
|
+
complete: a,
|
|
3655
|
+
reset: o
|
|
3656
|
+
}), [
|
|
3657
|
+
t,
|
|
3658
|
+
n,
|
|
3659
|
+
r,
|
|
3660
|
+
i,
|
|
3661
|
+
a,
|
|
3662
|
+
o
|
|
3663
|
+
]);
|
|
3664
|
+
}
|
|
3665
|
+
function so() {
|
|
3666
|
+
let e = K(Ma), t = K(ja);
|
|
3667
|
+
return F.useMemo(() => ({
|
|
3668
|
+
...e,
|
|
3669
|
+
isAuthenticated: t
|
|
3670
|
+
}), [e, t]);
|
|
3671
|
+
}
|
|
3672
|
+
function co() {
|
|
3673
|
+
let e = q(Na), t = q(Pa), n = q(Fa), r = q(ro);
|
|
3674
|
+
return F.useMemo(() => ({
|
|
3675
|
+
signIn: e,
|
|
3676
|
+
updateUser: t,
|
|
3677
|
+
markUnauthenticated: n,
|
|
3678
|
+
signOut: r
|
|
3679
|
+
}), [
|
|
3680
|
+
e,
|
|
3681
|
+
t,
|
|
3682
|
+
n,
|
|
3683
|
+
r
|
|
3684
|
+
]);
|
|
3685
|
+
}
|
|
3686
|
+
//#endregion
|
|
3687
|
+
//#region src/components/blocks/auth/auth-flow-block.tsx
|
|
3688
|
+
function lo({ flowId: e, logo: t, accent: n, providers: r, onLogin: a, onSignup: o, onProviderSelect: s, onRequestReset: c, onVerifyCode: l, onResendCode: u, onUpdatePassword: d, onOnboardingComplete: f, onboardingSteps: p, steps: m, renderStep: h, success: g, successTitle: _ = "Welcome", successDescription: v, className: y }) {
|
|
3689
|
+
let b = ao(e), { goToStep: x, beginVerification: S, complete: C } = oo(e), w = F.useCallback((e) => {
|
|
3690
|
+
e && ("user" in e ? C(e.user) : "verify" in e ? S(e.verify) : x(e.step));
|
|
3691
|
+
}, [
|
|
3692
|
+
C,
|
|
3693
|
+
S,
|
|
3694
|
+
x
|
|
3695
|
+
]);
|
|
3696
|
+
function T(e) {
|
|
3697
|
+
if (e) return async (t) => {
|
|
3698
|
+
w(await e(t));
|
|
3699
|
+
};
|
|
3700
|
+
}
|
|
3701
|
+
let E = (() => {
|
|
3702
|
+
let e = h?.(b.step, b);
|
|
3703
|
+
if (e !== void 0) return e;
|
|
3704
|
+
switch (b.step) {
|
|
3705
|
+
case "login": return /* @__PURE__ */ i(xa, {
|
|
3706
|
+
logo: t,
|
|
3707
|
+
accent: n,
|
|
3708
|
+
providers: r,
|
|
3709
|
+
onSubmit: T(a),
|
|
3710
|
+
onProviderSelect: T(s),
|
|
3711
|
+
onForgotPassword: () => x("forgot-password"),
|
|
3712
|
+
onSignup: () => x("signup"),
|
|
3713
|
+
...m?.login
|
|
3714
|
+
});
|
|
3715
|
+
case "signup": return /* @__PURE__ */ i(Da, {
|
|
3716
|
+
logo: t,
|
|
3717
|
+
accent: n,
|
|
3718
|
+
providers: r,
|
|
3719
|
+
onSubmit: T(o),
|
|
3720
|
+
onProviderSelect: T(s),
|
|
3721
|
+
onLogin: () => x("login"),
|
|
3722
|
+
...m?.signup
|
|
3723
|
+
});
|
|
3724
|
+
case "verify-code": return /* @__PURE__ */ i(ya, {
|
|
3725
|
+
logo: t,
|
|
3726
|
+
accent: n,
|
|
3727
|
+
channel: b.channel,
|
|
3728
|
+
destination: b.maskedIdentifier ?? void 0,
|
|
3729
|
+
onVerify: T(l),
|
|
3730
|
+
onResend: T(u),
|
|
3731
|
+
onBack: () => x("login"),
|
|
3732
|
+
...m?.["verify-code"]
|
|
3733
|
+
});
|
|
3734
|
+
case "forgot-password": return /* @__PURE__ */ i(ba, {
|
|
3735
|
+
logo: t,
|
|
3736
|
+
accent: n,
|
|
3737
|
+
onSubmit: T(c),
|
|
3738
|
+
onBackToLogin: () => x("login"),
|
|
3739
|
+
...m?.["forgot-password"]
|
|
3740
|
+
});
|
|
3741
|
+
case "update-password": return /* @__PURE__ */ i(Oa, {
|
|
3742
|
+
logo: t,
|
|
3743
|
+
accent: n,
|
|
3744
|
+
onSubmit: T(d),
|
|
3745
|
+
onDone: () => x("login"),
|
|
3746
|
+
...m?.["update-password"]
|
|
3747
|
+
});
|
|
3748
|
+
case "onboarding": return /* @__PURE__ */ i(Ea, {
|
|
3749
|
+
logo: t,
|
|
3750
|
+
accent: n,
|
|
3751
|
+
steps: p,
|
|
3752
|
+
onComplete: T(f),
|
|
3753
|
+
showCompleteScreen: !1,
|
|
3754
|
+
...m?.onboarding
|
|
3755
|
+
});
|
|
3756
|
+
case "success": return g ?? /* @__PURE__ */ i(fa, {
|
|
3757
|
+
title: _,
|
|
3758
|
+
logo: t,
|
|
3759
|
+
accent: n,
|
|
3760
|
+
children: /* @__PURE__ */ i(ga, {
|
|
3761
|
+
title: "You're signed in",
|
|
3762
|
+
description: v
|
|
3763
|
+
})
|
|
3764
|
+
});
|
|
3765
|
+
}
|
|
3766
|
+
})();
|
|
3767
|
+
return /* @__PURE__ */ i(Oe, {
|
|
3768
|
+
reducedMotion: "user",
|
|
3769
|
+
children: /* @__PURE__ */ i("div", {
|
|
3770
|
+
className: J("flex w-full justify-center", y),
|
|
3771
|
+
"data-slot": "auth-flow",
|
|
3772
|
+
"data-step": b.step,
|
|
3773
|
+
children: /* @__PURE__ */ i(pa, {
|
|
3774
|
+
step: b.step,
|
|
3775
|
+
className: "flex w-full justify-center",
|
|
3776
|
+
children: E
|
|
3777
|
+
})
|
|
3778
|
+
})
|
|
3779
|
+
});
|
|
3780
|
+
}
|
|
3781
|
+
//#endregion
|
|
3782
|
+
//#region src/components/blocks/auth/linked-accounts-block.tsx
|
|
3783
|
+
var uo = "This is your only way to sign in, so it can't be disconnected.";
|
|
3784
|
+
function fo({ title: e = "Connected accounts", description: t = "Manage the accounts you can use to sign in.", identities: n = [], providers: r = [
|
|
3785
|
+
"google",
|
|
3786
|
+
"apple",
|
|
3787
|
+
"github"
|
|
3788
|
+
], loading: o = !1, hasOtherSignInMethods: s = !1, onLink: c, onUnlink: l, className: u }) {
|
|
3789
|
+
let d = F.useId(), [f, p] = F.useState(null), [m, h] = F.useState(null), [g, _] = F.useState(null), v = new Set(n.map((e) => e.provider)), y = r.filter((e) => !v.has(e)), b = m !== null || g !== null, x = !s && n.length <= 1;
|
|
3790
|
+
async function S(e) {
|
|
3791
|
+
if (!b) {
|
|
3792
|
+
p(null), h(e);
|
|
3793
|
+
try {
|
|
3794
|
+
await c?.(e);
|
|
3795
|
+
} catch (e) {
|
|
3796
|
+
p(e instanceof Error ? e.message : "Unable to connect account.");
|
|
3797
|
+
} finally {
|
|
3798
|
+
h(null);
|
|
3799
|
+
}
|
|
3800
|
+
}
|
|
3801
|
+
}
|
|
3802
|
+
async function C(e) {
|
|
3803
|
+
if (!(b || x)) {
|
|
3804
|
+
p(null), _(e);
|
|
3805
|
+
try {
|
|
3806
|
+
await l?.(e);
|
|
3807
|
+
} catch (e) {
|
|
3808
|
+
p(e instanceof Error ? e.message : "Unable to disconnect account.");
|
|
3809
|
+
} finally {
|
|
3810
|
+
_(null);
|
|
3811
|
+
}
|
|
3812
|
+
}
|
|
3813
|
+
}
|
|
3814
|
+
return /* @__PURE__ */ i(Oe, {
|
|
3815
|
+
reducedMotion: "user",
|
|
3816
|
+
children: /* @__PURE__ */ a(rt, {
|
|
3817
|
+
className: J("w-full", u),
|
|
3818
|
+
"data-slot": "auth-block",
|
|
3819
|
+
children: [/* @__PURE__ */ a(ut, { children: [/* @__PURE__ */ i(dt, { children: e }), /* @__PURE__ */ i(ft, { children: t })] }), /* @__PURE__ */ i(mt, { children: o ? /* @__PURE__ */ a("div", {
|
|
3820
|
+
className: "flex items-center gap-2 text-sm text-muted-foreground",
|
|
3821
|
+
children: [/* @__PURE__ */ i(qe, { className: "size-4" }), "Loading connected accounts…"]
|
|
3822
|
+
}) : /* @__PURE__ */ a(U.div, {
|
|
3823
|
+
layout: !0,
|
|
3824
|
+
transition: {
|
|
3825
|
+
duration: .3,
|
|
3826
|
+
ease: da
|
|
3827
|
+
},
|
|
3828
|
+
className: "flex flex-col gap-3",
|
|
3829
|
+
children: [
|
|
3830
|
+
/* @__PURE__ */ i(ha, { message: f }),
|
|
3831
|
+
n.length > 0 ? /* @__PURE__ */ i("ul", {
|
|
3832
|
+
"aria-label": "Connected accounts",
|
|
3833
|
+
className: "flex flex-col gap-2",
|
|
3834
|
+
children: /* @__PURE__ */ i(H, {
|
|
3835
|
+
initial: !1,
|
|
3836
|
+
children: n.map((e, t) => {
|
|
3837
|
+
let { label: n, BrandIcon: r, brandClassName: o } = pr[e.provider];
|
|
3838
|
+
return /* @__PURE__ */ a(U.li, {
|
|
3839
|
+
layout: !0,
|
|
3840
|
+
className: "flex items-center justify-between gap-3 rounded-lg border px-3 py-2",
|
|
3841
|
+
initial: {
|
|
3842
|
+
opacity: 0,
|
|
3843
|
+
y: -4
|
|
3844
|
+
},
|
|
3845
|
+
animate: {
|
|
3846
|
+
opacity: 1,
|
|
3847
|
+
y: 0
|
|
3848
|
+
},
|
|
3849
|
+
exit: {
|
|
3850
|
+
opacity: 0,
|
|
3851
|
+
y: -4
|
|
3852
|
+
},
|
|
3853
|
+
transition: {
|
|
3854
|
+
duration: .25,
|
|
3855
|
+
ease: da,
|
|
3856
|
+
delay: Math.min(t, 5) * .04
|
|
3857
|
+
},
|
|
3858
|
+
children: [/* @__PURE__ */ a("div", {
|
|
3859
|
+
className: "flex min-w-0 items-center gap-2.5",
|
|
3860
|
+
children: [/* @__PURE__ */ i(r, {
|
|
3861
|
+
"aria-hidden": "true",
|
|
3862
|
+
className: J("size-4", o)
|
|
3863
|
+
}), /* @__PURE__ */ a("div", {
|
|
3864
|
+
className: "flex min-w-0 flex-col",
|
|
3865
|
+
children: [/* @__PURE__ */ i("span", {
|
|
3866
|
+
className: "text-sm font-medium",
|
|
3867
|
+
children: n
|
|
3868
|
+
}), e.email && /* @__PURE__ */ i("span", {
|
|
3869
|
+
className: "truncate text-xs text-muted-foreground",
|
|
3870
|
+
children: e.email
|
|
3871
|
+
})]
|
|
3872
|
+
})]
|
|
3873
|
+
}), /* @__PURE__ */ i(Y, {
|
|
3874
|
+
"aria-describedby": x ? d : void 0,
|
|
3875
|
+
"aria-label": `Disconnect ${n}`,
|
|
3876
|
+
size: "sm",
|
|
3877
|
+
type: "button",
|
|
3878
|
+
variant: "destructive-outline",
|
|
3879
|
+
disabled: b || x,
|
|
3880
|
+
loading: g === e.id,
|
|
3881
|
+
onClick: () => void C(e.id),
|
|
3882
|
+
children: "Disconnect"
|
|
3883
|
+
})]
|
|
3884
|
+
}, e.id);
|
|
3885
|
+
})
|
|
3886
|
+
})
|
|
3887
|
+
}) : /* @__PURE__ */ i("p", {
|
|
3888
|
+
className: "text-sm text-muted-foreground",
|
|
3889
|
+
children: "No sign-in methods connected yet."
|
|
3890
|
+
}),
|
|
3891
|
+
x && n.length > 0 && /* @__PURE__ */ i("p", {
|
|
3892
|
+
className: "text-xs text-muted-foreground",
|
|
3893
|
+
id: d,
|
|
3894
|
+
children: uo
|
|
3895
|
+
}),
|
|
3896
|
+
y.map((e) => {
|
|
3897
|
+
let { label: t, BrandIcon: n, brandClassName: r } = pr[e];
|
|
3898
|
+
return /* @__PURE__ */ a(Y, {
|
|
3899
|
+
className: "w-full",
|
|
3900
|
+
type: "button",
|
|
3901
|
+
variant: "outline",
|
|
3902
|
+
disabled: b,
|
|
3903
|
+
loading: m === e,
|
|
3904
|
+
onClick: () => void S(e),
|
|
3905
|
+
children: [/* @__PURE__ */ i(n, {
|
|
3906
|
+
"aria-hidden": "true",
|
|
3907
|
+
className: r
|
|
3908
|
+
}), /* @__PURE__ */ a("span", {
|
|
3909
|
+
className: "flex-1",
|
|
3910
|
+
children: ["Connect ", t]
|
|
3911
|
+
})]
|
|
3912
|
+
}, e);
|
|
3913
|
+
})
|
|
3914
|
+
]
|
|
3915
|
+
}) })]
|
|
3916
|
+
})
|
|
3917
|
+
});
|
|
3918
|
+
}
|
|
3919
|
+
//#endregion
|
|
3920
|
+
//#region src/components/blocks/auth/passkey-manager-block.tsx
|
|
3921
|
+
var po = 120, mo = "This is your last passkey. After deleting it you won't be able to sign in with a passkey until you register a new one.";
|
|
3922
|
+
function ho(e) {
|
|
3923
|
+
if (!e) return null;
|
|
3924
|
+
let t = new Date(e);
|
|
3925
|
+
return Number.isNaN(t.getTime()) ? null : t.toLocaleDateString();
|
|
3926
|
+
}
|
|
3927
|
+
function go({ title: e = "Passkeys", description: t = "Sign in without a password using your device's biometrics or security key.", passkeys: n = [], available: r = !0, loading: o = !1, onRegister: s, onRename: c, onDelete: l, className: u }) {
|
|
3928
|
+
let [d, f] = F.useState(null), [p, m] = F.useState(!1), [h, g] = F.useState(!1), [_, v] = F.useState(null), [y, b] = F.useState(""), [S, C] = F.useState(null), [w, T] = F.useState(null), E = n.length === 1;
|
|
3929
|
+
async function D(e) {
|
|
3930
|
+
if (p) return { ok: !1 };
|
|
3931
|
+
f(null), m(!0);
|
|
3932
|
+
try {
|
|
3933
|
+
return {
|
|
3934
|
+
ok: !0,
|
|
3935
|
+
result: await e()
|
|
3936
|
+
};
|
|
3937
|
+
} catch (e) {
|
|
3938
|
+
return f(e instanceof Error ? e.message : "Something went wrong."), { ok: !1 };
|
|
3939
|
+
} finally {
|
|
3940
|
+
m(!1);
|
|
3941
|
+
}
|
|
3942
|
+
}
|
|
3943
|
+
async function O() {
|
|
3944
|
+
g(!0), await D(() => s?.()), g(!1);
|
|
3945
|
+
}
|
|
3946
|
+
function k(e) {
|
|
3947
|
+
T(null), v(e.id), b(e.name ?? ""), C(null);
|
|
3948
|
+
}
|
|
3604
3949
|
async function A(e) {
|
|
3605
3950
|
let t = y.trim();
|
|
3606
|
-
if (t.length < 1 || t.length >
|
|
3607
|
-
C(`Name must be between 1 and ${
|
|
3951
|
+
if (t.length < 1 || t.length > po) {
|
|
3952
|
+
C(`Name must be between 1 and ${po} characters.`);
|
|
3608
3953
|
return;
|
|
3609
3954
|
}
|
|
3610
3955
|
(await D(() => c?.(e, t))).ok && (v(null), C(null));
|
|
@@ -3636,7 +3981,7 @@ function po({ title: e = "Passkeys", description: t = "Sign in without a passwor
|
|
|
3636
3981
|
children: /* @__PURE__ */ i(H, {
|
|
3637
3982
|
initial: !1,
|
|
3638
3983
|
children: n.map((e, t) => {
|
|
3639
|
-
let n = e.name ?? "Passkey", r =
|
|
3984
|
+
let n = e.name ?? "Passkey", r = ho(e.createdAt), o = ho(e.lastUsedAt);
|
|
3640
3985
|
return /* @__PURE__ */ a(U.li, {
|
|
3641
3986
|
layout: !0,
|
|
3642
3987
|
className: "flex flex-col gap-2 rounded-lg border px-3 py-2",
|
|
@@ -3764,7 +4109,7 @@ function po({ title: e = "Passkeys", description: t = "Sign in without a passwor
|
|
|
3764
4109
|
}),
|
|
3765
4110
|
E && /* @__PURE__ */ i("p", {
|
|
3766
4111
|
className: "text-xs text-destructive-foreground",
|
|
3767
|
-
children:
|
|
4112
|
+
children: mo
|
|
3768
4113
|
}),
|
|
3769
4114
|
/* @__PURE__ */ a("div", {
|
|
3770
4115
|
className: "flex gap-2",
|
|
@@ -3809,328 +4154,78 @@ function po({ title: e = "Passkeys", description: t = "Sign in without a passwor
|
|
|
3809
4154
|
className: "text-sm text-muted-foreground",
|
|
3810
4155
|
children: "Passkeys aren't available on this device. You can manage them from a device that supports passkeys."
|
|
3811
4156
|
}) })]
|
|
3812
|
-
})
|
|
3813
|
-
});
|
|
3814
|
-
}
|
|
3815
|
-
//#endregion
|
|
3816
|
-
//#region src/components/blocks/auth/passkey-sign-in-block.tsx
|
|
3817
|
-
function
|
|
3818
|
-
let [s, c] = F.useState(null), [l, u] = F.useState(!1);
|
|
3819
|
-
if (!e) return null;
|
|
3820
|
-
async function d() {
|
|
3821
|
-
if (!l) {
|
|
3822
|
-
c(null), u(!0);
|
|
3823
|
-
try {
|
|
3824
|
-
await n?.();
|
|
3825
|
-
} catch (e) {
|
|
3826
|
-
c(e instanceof Error ? e.message : "Unable to sign in with a passkey.");
|
|
3827
|
-
} finally {
|
|
3828
|
-
u(!1);
|
|
3829
|
-
}
|
|
3830
|
-
}
|
|
3831
|
-
}
|
|
3832
|
-
return /* @__PURE__ */ a("div", {
|
|
3833
|
-
className: J("flex w-full flex-col gap-2", o),
|
|
3834
|
-
children: [
|
|
3835
|
-
/* @__PURE__ */ a(Y, {
|
|
3836
|
-
variant: "outline",
|
|
3837
|
-
className: "w-full",
|
|
3838
|
-
type: "button",
|
|
3839
|
-
loading: l,
|
|
3840
|
-
onClick: () => void d(),
|
|
3841
|
-
children: [/* @__PURE__ */ i(v, { "aria-hidden": "true" }), /* @__PURE__ */ i("span", {
|
|
3842
|
-
className: "flex-1",
|
|
3843
|
-
children: t
|
|
3844
|
-
})]
|
|
3845
|
-
}),
|
|
3846
|
-
/* @__PURE__ */ i(ha, { message: s }),
|
|
3847
|
-
/* @__PURE__ */ i(ma, {
|
|
3848
|
-
show: !!s && !!r,
|
|
3849
|
-
children: /* @__PURE__ */ i("p", {
|
|
3850
|
-
className: "text-xs text-muted-foreground",
|
|
3851
|
-
children: r
|
|
3852
|
-
})
|
|
3853
|
-
})
|
|
3854
|
-
]
|
|
3855
|
-
});
|
|
3856
|
-
}
|
|
3857
|
-
//#endregion
|
|
3858
|
-
//#region src/components/blocks/auth/signup-block.tsx
|
|
3859
|
-
function ho({ title: e = "Create your account", description: t = "Start exploring manuscripts in minutes", logo: n, accent: o, providers: s = [
|
|
3860
|
-
"google",
|
|
3861
|
-
"apple",
|
|
3862
|
-
"github"
|
|
3863
|
-
], showNameField: c = !0, showTerms: l = !0, termsChecked: u, defaultTermsChecked: d = !1, onTermsCheckedChange: f, enforceStrongPassword: p = !0, onSubmit: m, termsComponent: h, onProviderSelect: g, onLogin: _, onTerms: v }) {
|
|
3864
|
-
let y = F.useId(), b = F.useId(), x = F.useId(), S = F.useId(), [C, w] = F.useState("idle"), [T, E] = F.useState(null), [D, O] = F.useState(null), [k, A] = F.useState(""), [j, ee] = F.useState(d), M = u ?? j;
|
|
3865
|
-
function te(e) {
|
|
3866
|
-
u === void 0 && ee(e), f?.(e);
|
|
3867
|
-
}
|
|
3868
|
-
let [ne, re] = F.useState(!1), [ie, N] = F.useState(!1), P = C === "loading" || D !== null, ae = !p || lr(k) === cr.length, oe = k.trim().length > 0 && ae, se = (!c || ie) && ne && oe;
|
|
3869
|
-
async function ce(e) {
|
|
3870
|
-
if (e.preventDefault(), E(null), !ae) {
|
|
3871
|
-
E("Please meet all password requirements.");
|
|
3872
|
-
return;
|
|
3873
|
-
}
|
|
3874
|
-
if (l && !M) {
|
|
3875
|
-
E("Please accept the terms to continue.");
|
|
3876
|
-
return;
|
|
3877
|
-
}
|
|
3878
|
-
let t = new FormData(e.currentTarget);
|
|
3879
|
-
w("loading");
|
|
3880
|
-
try {
|
|
3881
|
-
await m?.({
|
|
3882
|
-
name: String(t.get("name") ?? ""),
|
|
3883
|
-
email: String(t.get("email") ?? ""),
|
|
3884
|
-
password: k
|
|
3885
|
-
}), w("success");
|
|
3886
|
-
} catch (e) {
|
|
3887
|
-
w("idle"), E(e instanceof Error ? e.message : "Unable to create account.");
|
|
3888
|
-
}
|
|
3889
|
-
}
|
|
3890
|
-
async function le(e) {
|
|
3891
|
-
E(null), O(e);
|
|
3892
|
-
try {
|
|
3893
|
-
await g?.(e), w("success");
|
|
3894
|
-
} catch (e) {
|
|
3895
|
-
E(e instanceof Error ? e.message : "Unable to create account.");
|
|
3896
|
-
} finally {
|
|
3897
|
-
O(null);
|
|
3898
|
-
}
|
|
3899
|
-
}
|
|
3900
|
-
return /* @__PURE__ */ i(fa, {
|
|
3901
|
-
title: e,
|
|
3902
|
-
description: t,
|
|
3903
|
-
logo: n,
|
|
3904
|
-
accent: o,
|
|
3905
|
-
footer: C !== "success" && /* @__PURE__ */ a(r, { children: [
|
|
3906
|
-
"Already have an account?",
|
|
3907
|
-
" ",
|
|
3908
|
-
/* @__PURE__ */ i(Y, {
|
|
3909
|
-
variant: "link",
|
|
3910
|
-
onClick: _,
|
|
3911
|
-
children: "Login"
|
|
3912
|
-
})
|
|
3913
|
-
] }),
|
|
3914
|
-
children: /* @__PURE__ */ i(pa, {
|
|
3915
|
-
step: C === "success" ? "success" : "form",
|
|
3916
|
-
children: C === "success" ? /* @__PURE__ */ i(ga, {
|
|
3917
|
-
title: "Account created",
|
|
3918
|
-
description: "Check your inbox to confirm your email address."
|
|
3919
|
-
}) : /* @__PURE__ */ a("div", {
|
|
3920
|
-
className: "flex flex-col gap-4",
|
|
3921
|
-
children: [s.length > 0 && /* @__PURE__ */ a(ma, {
|
|
3922
|
-
show: !se,
|
|
3923
|
-
className: "flex flex-col gap-4",
|
|
3924
|
-
children: [/* @__PURE__ */ i(hr, {
|
|
3925
|
-
providers: s,
|
|
3926
|
-
action: "signup",
|
|
3927
|
-
loadingProvider: D,
|
|
3928
|
-
disabled: C === "loading",
|
|
3929
|
-
onSelect: le
|
|
3930
|
-
}), /* @__PURE__ */ i(_a, { label: "Or with email" })]
|
|
3931
|
-
}), /* @__PURE__ */ a("form", {
|
|
3932
|
-
className: "flex flex-col gap-4",
|
|
3933
|
-
onSubmit: ce,
|
|
3934
|
-
children: [
|
|
3935
|
-
c && /* @__PURE__ */ a(bt, {
|
|
3936
|
-
name: "name",
|
|
3937
|
-
children: [/* @__PURE__ */ i(xt, {
|
|
3938
|
-
htmlFor: y,
|
|
3939
|
-
children: "Name"
|
|
3940
|
-
}), /* @__PURE__ */ i(Nt, {
|
|
3941
|
-
"aria-label": "Name",
|
|
3942
|
-
id: y,
|
|
3943
|
-
name: "name",
|
|
3944
|
-
autoComplete: "name",
|
|
3945
|
-
placeholder: "Your name",
|
|
3946
|
-
required: !0,
|
|
3947
|
-
disabled: P,
|
|
3948
|
-
onChange: (e) => N(e.currentTarget.validity.valid)
|
|
3949
|
-
})]
|
|
3950
|
-
}),
|
|
3951
|
-
/* @__PURE__ */ a(bt, {
|
|
3952
|
-
name: "email",
|
|
3953
|
-
children: [/* @__PURE__ */ i(xt, {
|
|
3954
|
-
htmlFor: b,
|
|
3955
|
-
children: "Email"
|
|
3956
|
-
}), /* @__PURE__ */ i(Nt, {
|
|
3957
|
-
id: b,
|
|
3958
|
-
name: "email",
|
|
3959
|
-
type: "email",
|
|
3960
|
-
"aria-label": "Email",
|
|
3961
|
-
autoComplete: "email",
|
|
3962
|
-
placeholder: "you@example.com",
|
|
3963
|
-
required: !0,
|
|
3964
|
-
disabled: P,
|
|
3965
|
-
onChange: (e) => re(e.currentTarget.validity.valid)
|
|
3966
|
-
})]
|
|
3967
|
-
}),
|
|
3968
|
-
/* @__PURE__ */ i(ma, {
|
|
3969
|
-
show: ne,
|
|
3970
|
-
children: /* @__PURE__ */ a(bt, {
|
|
3971
|
-
name: "password",
|
|
3972
|
-
children: [/* @__PURE__ */ i(xt, {
|
|
3973
|
-
htmlFor: x,
|
|
3974
|
-
children: "Password"
|
|
3975
|
-
}), /* @__PURE__ */ i(dr, {
|
|
3976
|
-
id: x,
|
|
3977
|
-
name: "password",
|
|
3978
|
-
"aria-label": "Password",
|
|
3979
|
-
autoComplete: "new-password",
|
|
3980
|
-
placeholder: "Create a password",
|
|
3981
|
-
showStrength: !0,
|
|
3982
|
-
required: !0,
|
|
3983
|
-
disabled: P,
|
|
3984
|
-
value: k,
|
|
3985
|
-
onChange: (e) => A(e.target.value)
|
|
3986
|
-
})]
|
|
3987
|
-
})
|
|
3988
|
-
}),
|
|
3989
|
-
l && /* @__PURE__ */ a("div", {
|
|
3990
|
-
className: "flex items-center gap-2",
|
|
3991
|
-
children: [/* @__PURE__ */ i(yt, {
|
|
3992
|
-
id: S,
|
|
3993
|
-
checked: M,
|
|
3994
|
-
onCheckedChange: (e) => te(e === !0),
|
|
3995
|
-
disabled: P
|
|
3996
|
-
}), /* @__PURE__ */ a(Vt, {
|
|
3997
|
-
htmlFor: S,
|
|
3998
|
-
className: "font-normal",
|
|
3999
|
-
children: [
|
|
4000
|
-
"I agree to the",
|
|
4001
|
-
" ",
|
|
4002
|
-
h ?? /* @__PURE__ */ i(Y, {
|
|
4003
|
-
variant: "link",
|
|
4004
|
-
type: "button",
|
|
4005
|
-
onClick: v,
|
|
4006
|
-
children: "terms"
|
|
4007
|
-
})
|
|
4008
|
-
]
|
|
4009
|
-
})]
|
|
4010
|
-
}),
|
|
4011
|
-
/* @__PURE__ */ i(ha, { message: T }),
|
|
4012
|
-
/* @__PURE__ */ i(Y, {
|
|
4013
|
-
className: J("w-full", o && "border-transparent bg-[var(--auth-accent)] bg-[image:var(--auth-accent-image)] text-[var(--auth-accent-foreground)] shadow-none hover:bg-[var(--auth-accent)] hover:brightness-110 data-pressed:bg-[var(--auth-accent)] data-pressed:brightness-110 *:data-[slot=button-loading-indicator]:text-[var(--auth-accent-foreground)]"),
|
|
4014
|
-
type: "submit",
|
|
4015
|
-
loading: C === "loading",
|
|
4016
|
-
disabled: P,
|
|
4017
|
-
children: "Create account"
|
|
4018
|
-
})
|
|
4019
|
-
]
|
|
4020
|
-
})]
|
|
4021
|
-
})
|
|
4022
|
-
})
|
|
4023
|
-
});
|
|
4024
|
-
}
|
|
4025
|
-
//#endregion
|
|
4026
|
-
//#region src/components/blocks/auth/update-password-block.tsx
|
|
4027
|
-
function go({ title: e = "Update your password", description: t = "Choose a new password for your account", logo: n, accent: r, minStrength: o = 4, onSubmit: s, onDone: c }) {
|
|
4028
|
-
let l = F.useId(), u = F.useId(), [d, f] = F.useState("idle"), [p, m] = F.useState(null), [h, g] = F.useState(""), [_, v] = F.useState(""), y = lr(h) >= o, b = _.length > 0 && _ === h, x = y && b, S = _.length > 0 && !h.startsWith(_);
|
|
4029
|
-
async function C(e) {
|
|
4030
|
-
if (e.preventDefault(), x) {
|
|
4031
|
-
m(null), f("loading");
|
|
4157
|
+
})
|
|
4158
|
+
});
|
|
4159
|
+
}
|
|
4160
|
+
//#endregion
|
|
4161
|
+
//#region src/components/blocks/auth/passkey-sign-in-block.tsx
|
|
4162
|
+
function _o({ available: e = !0, label: t = "Sign in with a passkey", onSignIn: n, fallbackHint: r = "You can still sign in with your other methods below.", className: o }) {
|
|
4163
|
+
let [s, c] = F.useState(null), [l, u] = F.useState(!1);
|
|
4164
|
+
if (!e) return null;
|
|
4165
|
+
async function d() {
|
|
4166
|
+
if (!l) {
|
|
4167
|
+
c(null), u(!0);
|
|
4032
4168
|
try {
|
|
4033
|
-
await
|
|
4169
|
+
await n?.();
|
|
4034
4170
|
} catch (e) {
|
|
4035
|
-
|
|
4171
|
+
c(e instanceof Error ? e.message : "Unable to sign in with a passkey.");
|
|
4172
|
+
} finally {
|
|
4173
|
+
u(!1);
|
|
4036
4174
|
}
|
|
4037
4175
|
}
|
|
4038
4176
|
}
|
|
4039
|
-
return /* @__PURE__ */
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4177
|
+
return /* @__PURE__ */ a("div", {
|
|
4178
|
+
className: J("flex w-full flex-col gap-2", o),
|
|
4179
|
+
children: [
|
|
4180
|
+
/* @__PURE__ */ a(Y, {
|
|
4181
|
+
variant: "outline",
|
|
4182
|
+
className: "w-full",
|
|
4183
|
+
type: "button",
|
|
4184
|
+
loading: l,
|
|
4185
|
+
onClick: () => void d(),
|
|
4186
|
+
children: [/* @__PURE__ */ i(v, { "aria-hidden": "true" }), /* @__PURE__ */ i("span", {
|
|
4187
|
+
className: "flex-1",
|
|
4188
|
+
children: t
|
|
4189
|
+
})]
|
|
4190
|
+
}),
|
|
4191
|
+
/* @__PURE__ */ i(ha, { message: s }),
|
|
4192
|
+
/* @__PURE__ */ i(ma, {
|
|
4193
|
+
show: !!s && !!r,
|
|
4194
|
+
children: /* @__PURE__ */ i("p", {
|
|
4195
|
+
className: "text-xs text-muted-foreground",
|
|
4196
|
+
children: r
|
|
4053
4197
|
})
|
|
4054
|
-
}) : /* @__PURE__ */ a("form", {
|
|
4055
|
-
className: "flex flex-col gap-4",
|
|
4056
|
-
onSubmit: C,
|
|
4057
|
-
children: [
|
|
4058
|
-
/* @__PURE__ */ a(bt, {
|
|
4059
|
-
name: "password",
|
|
4060
|
-
children: [/* @__PURE__ */ i(xt, {
|
|
4061
|
-
htmlFor: l,
|
|
4062
|
-
children: "New password"
|
|
4063
|
-
}), /* @__PURE__ */ i(dr, {
|
|
4064
|
-
id: l,
|
|
4065
|
-
name: "password",
|
|
4066
|
-
autoComplete: "new-password",
|
|
4067
|
-
required: !0,
|
|
4068
|
-
showStrength: !0,
|
|
4069
|
-
disabled: d === "loading",
|
|
4070
|
-
value: h,
|
|
4071
|
-
onChange: (e) => g(e.target.value)
|
|
4072
|
-
})]
|
|
4073
|
-
}),
|
|
4074
|
-
/* @__PURE__ */ i(ma, {
|
|
4075
|
-
show: y,
|
|
4076
|
-
children: /* @__PURE__ */ a(bt, {
|
|
4077
|
-
name: "confirmPassword",
|
|
4078
|
-
children: [/* @__PURE__ */ i(xt, {
|
|
4079
|
-
htmlFor: u,
|
|
4080
|
-
children: "Confirm new password"
|
|
4081
|
-
}), /* @__PURE__ */ i(dr, {
|
|
4082
|
-
id: u,
|
|
4083
|
-
name: "confirmPassword",
|
|
4084
|
-
autoComplete: "new-password",
|
|
4085
|
-
required: !0,
|
|
4086
|
-
disabled: d === "loading",
|
|
4087
|
-
value: _,
|
|
4088
|
-
onChange: (e) => v(e.target.value)
|
|
4089
|
-
})]
|
|
4090
|
-
})
|
|
4091
|
-
}),
|
|
4092
|
-
/* @__PURE__ */ i(ha, { message: p ?? (S ? "Passwords do not match." : null) }),
|
|
4093
|
-
/* @__PURE__ */ i(ma, {
|
|
4094
|
-
show: x,
|
|
4095
|
-
children: /* @__PURE__ */ i(Y, {
|
|
4096
|
-
className: J("w-full", r && "border-transparent bg-[var(--auth-accent)] bg-[image:var(--auth-accent-image)] text-[var(--auth-accent-foreground)] shadow-none hover:bg-[var(--auth-accent)] hover:brightness-110 data-pressed:bg-[var(--auth-accent)] data-pressed:brightness-110 *:data-[slot=button-loading-indicator]:text-[var(--auth-accent-foreground)]"),
|
|
4097
|
-
type: "submit",
|
|
4098
|
-
loading: d === "loading",
|
|
4099
|
-
children: "Update password"
|
|
4100
|
-
})
|
|
4101
|
-
})
|
|
4102
|
-
]
|
|
4103
4198
|
})
|
|
4104
|
-
|
|
4199
|
+
]
|
|
4105
4200
|
});
|
|
4106
4201
|
}
|
|
4107
4202
|
//#endregion
|
|
4108
4203
|
//#region src/components/blocks/nav/sidebar/utils.ts
|
|
4109
|
-
var
|
|
4204
|
+
var vo = {
|
|
4110
4205
|
duration: .16,
|
|
4111
4206
|
ease: X
|
|
4112
4207
|
};
|
|
4113
|
-
function
|
|
4208
|
+
function yo(e) {
|
|
4114
4209
|
return e.kind === "folder" || e.kind === "project";
|
|
4115
4210
|
}
|
|
4116
|
-
function
|
|
4211
|
+
function bo(e, t, n = 0, r = null) {
|
|
4117
4212
|
return e.flatMap((e) => {
|
|
4118
4213
|
let i = {
|
|
4119
4214
|
item: e,
|
|
4120
4215
|
depth: n,
|
|
4121
4216
|
parentId: r
|
|
4122
4217
|
};
|
|
4123
|
-
return !e.children?.length || !t.has(e.id) ? [i] : [i, ...
|
|
4218
|
+
return !e.children?.length || !t.has(e.id) ? [i] : [i, ...bo(e.children, t, n + 1, e.id)];
|
|
4124
4219
|
});
|
|
4125
4220
|
}
|
|
4126
|
-
function
|
|
4221
|
+
function xo(e, t) {
|
|
4127
4222
|
for (let n of e) {
|
|
4128
4223
|
if (n.id === t) return n;
|
|
4129
|
-
let e = n.children ?
|
|
4224
|
+
let e = n.children ? xo(n.children, t) : void 0;
|
|
4130
4225
|
if (e) return e;
|
|
4131
4226
|
}
|
|
4132
4227
|
}
|
|
4133
|
-
function
|
|
4228
|
+
function So(e, t) {
|
|
4134
4229
|
let n = (e, r) => {
|
|
4135
4230
|
for (let i of e) {
|
|
4136
4231
|
if (i.id === t) return r;
|
|
@@ -4143,13 +4238,13 @@ function xo(e, t) {
|
|
|
4143
4238
|
};
|
|
4144
4239
|
return n(e, []) ?? [];
|
|
4145
4240
|
}
|
|
4146
|
-
function
|
|
4147
|
-
return e.flatMap((e) => e.children?.length &&
|
|
4148
|
-
}
|
|
4149
|
-
function Co(e, t) {
|
|
4150
|
-
return e.id === t || e.children?.some((e) => Co(e, t)) === !0;
|
|
4241
|
+
function Co(e) {
|
|
4242
|
+
return e.flatMap((e) => e.children?.length && yo(e) ? [e.id, ...Co(e.children)] : []);
|
|
4151
4243
|
}
|
|
4152
4244
|
function wo(e, t) {
|
|
4245
|
+
return e.id === t || e.children?.some((e) => wo(e, t)) === !0;
|
|
4246
|
+
}
|
|
4247
|
+
function To(e, t) {
|
|
4153
4248
|
let n, r = [];
|
|
4154
4249
|
for (let i of e) {
|
|
4155
4250
|
if (i.id === t) {
|
|
@@ -4157,7 +4252,7 @@ function wo(e, t) {
|
|
|
4157
4252
|
continue;
|
|
4158
4253
|
}
|
|
4159
4254
|
if (i.children?.length) {
|
|
4160
|
-
let e =
|
|
4255
|
+
let e = To(i.children, t);
|
|
4161
4256
|
if (e.removed) {
|
|
4162
4257
|
n = e.removed, r.push({
|
|
4163
4258
|
...i,
|
|
@@ -4173,7 +4268,7 @@ function wo(e, t) {
|
|
|
4173
4268
|
removed: n
|
|
4174
4269
|
};
|
|
4175
4270
|
}
|
|
4176
|
-
function
|
|
4271
|
+
function Eo(e, t, n, r) {
|
|
4177
4272
|
if (n === null) return [...e, t];
|
|
4178
4273
|
let i = [];
|
|
4179
4274
|
for (let a of e) {
|
|
@@ -4186,67 +4281,67 @@ function To(e, t, n, r) {
|
|
|
4186
4281
|
}
|
|
4187
4282
|
a.children?.length ? i.push({
|
|
4188
4283
|
...a,
|
|
4189
|
-
children:
|
|
4284
|
+
children: Eo(a.children, t, n, r)
|
|
4190
4285
|
}) : i.push(a);
|
|
4191
4286
|
}
|
|
4192
4287
|
return i;
|
|
4193
4288
|
}
|
|
4194
|
-
function
|
|
4195
|
-
let n =
|
|
4196
|
-
if (!n || n.disabled || t.targetId &&
|
|
4197
|
-
let r = t.targetId ?
|
|
4198
|
-
if (t.position === "inside" && (!r || r.disabled || !
|
|
4199
|
-
let i =
|
|
4200
|
-
return i.removed ?
|
|
4289
|
+
function Do(e, t) {
|
|
4290
|
+
let n = xo(e, t.itemId);
|
|
4291
|
+
if (!n || n.disabled || t.targetId && wo(n, t.targetId)) return null;
|
|
4292
|
+
let r = t.targetId ? xo(e, t.targetId) : void 0;
|
|
4293
|
+
if (t.position === "inside" && (!r || r.disabled || !yo(r))) return null;
|
|
4294
|
+
let i = To(e, t.itemId);
|
|
4295
|
+
return i.removed ? Eo(i.items, i.removed, t.targetId, t.position) : null;
|
|
4201
4296
|
}
|
|
4202
|
-
function
|
|
4297
|
+
function Oo(e, t, n) {
|
|
4203
4298
|
return e.map((e) => ({
|
|
4204
4299
|
...e,
|
|
4205
4300
|
label: e.id === t ? n : e.label,
|
|
4206
|
-
children: e.children ?
|
|
4301
|
+
children: e.children ? Oo(e.children, t, n) : void 0
|
|
4207
4302
|
}));
|
|
4208
4303
|
}
|
|
4209
4304
|
//#endregion
|
|
4210
4305
|
//#region src/components/blocks/nav/sidebar/ai-sidebar-atom.ts
|
|
4211
|
-
var
|
|
4306
|
+
var ko = [], Ao = [], jo = /* @__PURE__ */ new Set(), Mo = {}, No = {
|
|
4212
4307
|
controlsItems: !1,
|
|
4213
4308
|
controlsActiveId: !1,
|
|
4214
4309
|
controlsExpandedIds: !1
|
|
4215
|
-
},
|
|
4216
|
-
items:
|
|
4310
|
+
}, Po = {
|
|
4311
|
+
items: ko,
|
|
4217
4312
|
activeId: null,
|
|
4218
4313
|
focusedId: null,
|
|
4219
4314
|
expandedIds: []
|
|
4220
|
-
},
|
|
4221
|
-
function
|
|
4315
|
+
}, Fo = [];
|
|
4316
|
+
function Io(e) {
|
|
4222
4317
|
let t = /* @__PURE__ */ new Map(), n = ((n) => {
|
|
4223
4318
|
let r = t.get(n);
|
|
4224
4319
|
return r === void 0 && (r = e(n), t.set(n, r)), r;
|
|
4225
4320
|
});
|
|
4226
4321
|
return n.remove = (e) => {
|
|
4227
4322
|
t.delete(e);
|
|
4228
|
-
},
|
|
4323
|
+
}, Fo.push(n), n;
|
|
4229
4324
|
}
|
|
4230
|
-
function
|
|
4231
|
-
return
|
|
4325
|
+
function Lo(e, t) {
|
|
4326
|
+
return Io((n) => {
|
|
4232
4327
|
let r = G(t);
|
|
4233
4328
|
return r.debugLabel = `ai-sidebar/${n}/${e}`, r;
|
|
4234
4329
|
});
|
|
4235
4330
|
}
|
|
4236
|
-
function
|
|
4237
|
-
return
|
|
4331
|
+
function Ro(e, t) {
|
|
4332
|
+
return Io((n) => {
|
|
4238
4333
|
let r = G((e) => t(e, n));
|
|
4239
4334
|
return r.debugLabel = `ai-sidebar/${n}/${e}`, r;
|
|
4240
4335
|
});
|
|
4241
4336
|
}
|
|
4242
4337
|
function $(e, t) {
|
|
4243
|
-
return
|
|
4338
|
+
return Io((n) => {
|
|
4244
4339
|
let r = G(null, (e, r, ...i) => t(e, r, n, ...i));
|
|
4245
4340
|
return r.debugLabel = `ai-sidebar/${n}/${e}`, r;
|
|
4246
4341
|
});
|
|
4247
4342
|
}
|
|
4248
|
-
function
|
|
4249
|
-
let n =
|
|
4343
|
+
function zo(e, t) {
|
|
4344
|
+
let n = Io((n) => {
|
|
4250
4345
|
let r = /* @__PURE__ */ new Map();
|
|
4251
4346
|
return (i) => {
|
|
4252
4347
|
let a = r.get(i);
|
|
@@ -4255,123 +4350,123 @@ function Ro(e, t) {
|
|
|
4255
4350
|
});
|
|
4256
4351
|
return (e, t) => n(e)(t);
|
|
4257
4352
|
}
|
|
4258
|
-
var
|
|
4259
|
-
let n = e(
|
|
4260
|
-
return n.length === 0 ?
|
|
4261
|
-
}),
|
|
4262
|
-
let r = e(
|
|
4353
|
+
var Bo = Lo("config", No), Vo = Lo("handlers", Mo), Ho = Lo("seed", Po), Uo = Lo("initialized", !1), Wo = Lo("items", ko), Go = Lo("ownActiveId", null), Ko = Lo("controlledActiveId", void 0), qo = Lo("expandedIds", jo), Jo = Lo("focusedId", null), Yo = Lo("draggingId", null), Xo = Lo("dropTarget", null), Zo = Lo("menuOpenId", null), Qo = Lo("renamingId", null), $o = Lo("hoveredId", null), es = Lo("announcement", ""), ts = Lo("movePending", !1), ns = Ro("ownedItems", (e, t) => e(Bo(t)).controlsItems ? ko : e(Wo(t))), rs = Ro("ownedExpandedIds", (e, t) => e(Bo(t)).controlsExpandedIds ? jo : e(qo(t))), is = Ro("activeId", (e, t) => e(Ko(t)) ?? e(Go(t))), as = Ro("flat", (e, t) => {
|
|
4354
|
+
let n = e(Wo(t));
|
|
4355
|
+
return n.length === 0 ? Ao : bo(n, e(qo(t)));
|
|
4356
|
+
}), os = Ro("hoverActive", (e, t) => e($o(t)) !== null && e(Yo(t)) === null), ss = zo("rowSelected", (e, t, n) => e(is(t)) === n), cs = zo("rowExpanded", (e, t, n) => e(qo(t)).has(n)), ls = zo("rowFocused", (e, t, n) => e(Jo(t)) === n), us = zo("rowRenaming", (e, t, n) => e(Qo(t)) === n), ds = zo("rowMenuOpen", (e, t, n) => e(Zo(t)) === n), fs = zo("rowDragging", (e, t, n) => e(Yo(t)) === n), ps = zo("rowDrop", (e, t, n) => {
|
|
4357
|
+
let r = e(Xo(t));
|
|
4263
4358
|
return r?.id === n ? r.position : null;
|
|
4264
|
-
}),
|
|
4265
|
-
items: e(
|
|
4266
|
-
flat: e(
|
|
4267
|
-
selectedId: e(
|
|
4268
|
-
expandedIds: e(
|
|
4269
|
-
focusedId: e(
|
|
4270
|
-
renamingId: e(
|
|
4271
|
-
menuOpenId: e(
|
|
4272
|
-
draggingId: e(
|
|
4273
|
-
dropTarget: e(
|
|
4274
|
-
hoveredId: e(
|
|
4275
|
-
movePending: e(
|
|
4276
|
-
announcement: e(
|
|
4359
|
+
}), ms = zo("rowHovered", (e, t, n) => e($o(t)) === n && e(Yo(t)) === null), hs = Ro("state", (e, t) => ({
|
|
4360
|
+
items: e(Wo(t)),
|
|
4361
|
+
flat: e(as(t)),
|
|
4362
|
+
selectedId: e(is(t)),
|
|
4363
|
+
expandedIds: e(qo(t)),
|
|
4364
|
+
focusedId: e(Jo(t)),
|
|
4365
|
+
renamingId: e(Qo(t)),
|
|
4366
|
+
menuOpenId: e(Zo(t)),
|
|
4367
|
+
draggingId: e(Yo(t)),
|
|
4368
|
+
dropTarget: e(Xo(t)),
|
|
4369
|
+
hoveredId: e($o(t)),
|
|
4370
|
+
movePending: e(ts(t)),
|
|
4371
|
+
announcement: e(es(t))
|
|
4277
4372
|
}));
|
|
4278
|
-
function hs(e, t, n, r) {
|
|
4279
|
-
e(zo(n)).controlsItems || t(Uo(n), r), e(Bo(n)).onItemsChange?.(r);
|
|
4280
|
-
}
|
|
4281
4373
|
function gs(e, t, n, r) {
|
|
4282
|
-
e(
|
|
4374
|
+
e(Bo(n)).controlsItems || t(Wo(n), r), e(Vo(n)).onItemsChange?.(r);
|
|
4283
4375
|
}
|
|
4284
|
-
function _s(e, t, n) {
|
|
4285
|
-
e(
|
|
4376
|
+
function _s(e, t, n, r) {
|
|
4377
|
+
e(Bo(n)).controlsExpandedIds || t(qo(n), r), e(Vo(n)).onExpandedChange?.([...r]);
|
|
4286
4378
|
}
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
let i = e(
|
|
4379
|
+
function vs(e, t, n) {
|
|
4380
|
+
e(Wo(t), n.items), e(Go(t), n.activeId), e(Jo(t), n.focusedId), e(qo(t), new Set(n.expandedIds)), e(Qo(t), null), e(Zo(t), null), e(Yo(t), null), e(Xo(t), null), e($o(t), null), e(es(t), ""), e(ts(t), !1);
|
|
4381
|
+
}
|
|
4382
|
+
var ys = $("expand", (e, t, n, r) => {
|
|
4383
|
+
let i = e(qo(n));
|
|
4384
|
+
i.has(r) || _s(e, t, n, new Set(i).add(r));
|
|
4385
|
+
}), bs = $("collapse", (e, t, n, r) => {
|
|
4386
|
+
let i = e(qo(n));
|
|
4292
4387
|
if (!i.has(r)) return;
|
|
4293
4388
|
let a = new Set(i);
|
|
4294
|
-
a.delete(r),
|
|
4295
|
-
}),
|
|
4296
|
-
let i = new Set(e(
|
|
4297
|
-
i.has(r) ? i.delete(r) : i.add(r),
|
|
4298
|
-
}),
|
|
4299
|
-
|
|
4300
|
-
}),
|
|
4301
|
-
|
|
4302
|
-
}),
|
|
4303
|
-
let i =
|
|
4304
|
-
i.some((e) => !a.has(e)) &&
|
|
4305
|
-
}),
|
|
4306
|
-
e(
|
|
4307
|
-
}),
|
|
4308
|
-
t(
|
|
4309
|
-
}),
|
|
4310
|
-
let r = e(
|
|
4389
|
+
a.delete(r), _s(e, t, n, a);
|
|
4390
|
+
}), xs = $("toggleExpanded", (e, t, n, r) => {
|
|
4391
|
+
let i = new Set(e(qo(n)));
|
|
4392
|
+
i.has(r) ? i.delete(r) : i.add(r), _s(e, t, n, i);
|
|
4393
|
+
}), Ss = $("expandAll", (e, t, n) => {
|
|
4394
|
+
_s(e, t, n, new Set(Co(e(Wo(n)))));
|
|
4395
|
+
}), Cs = $("collapseAll", (e, t, n) => {
|
|
4396
|
+
_s(e, t, n, /* @__PURE__ */ new Set());
|
|
4397
|
+
}), ws = $("reveal", (e, t, n, r) => {
|
|
4398
|
+
let i = So(e(Wo(n)), r), a = e(qo(n));
|
|
4399
|
+
i.some((e) => !a.has(e)) && _s(e, t, n, /* @__PURE__ */ new Set([...a, ...i]));
|
|
4400
|
+
}), Ts = $("select", (e, t, n, r) => {
|
|
4401
|
+
e(Bo(n)).controlsActiveId || t(Go(n), r), e(Vo(n)).onActiveChange?.(r);
|
|
4402
|
+
}), Es = $("focus", (e, t, n, r) => {
|
|
4403
|
+
t(Jo(n), r);
|
|
4404
|
+
}), Ds = $("normalizeFocus", (e, t, n) => {
|
|
4405
|
+
let r = e(as(n)), i = e(Jo(n));
|
|
4311
4406
|
if (i !== null && r.some((e) => e.item.id === i)) return;
|
|
4312
4407
|
let a = r[0]?.item.id ?? null;
|
|
4313
|
-
i !== a && t(
|
|
4314
|
-
}),
|
|
4315
|
-
|
|
4316
|
-
}),
|
|
4317
|
-
t(
|
|
4318
|
-
}),
|
|
4408
|
+
i !== a && t(Jo(n), a);
|
|
4409
|
+
}), Os = $("startRename", (e, t, n, r) => {
|
|
4410
|
+
xo(e(Wo(n)), r) && t(Qo(n), r);
|
|
4411
|
+
}), ks = $("cancelRename", (e, t, n) => {
|
|
4412
|
+
t(Qo(n), null);
|
|
4413
|
+
}), As = $("rename", (e, t, n, r, i) => {
|
|
4319
4414
|
let a = i.trim();
|
|
4320
|
-
t(
|
|
4321
|
-
let o = e(
|
|
4322
|
-
!s || !a || a === s.label || (
|
|
4323
|
-
|
|
4415
|
+
t(Qo(n), null);
|
|
4416
|
+
let o = e(Wo(n)), s = xo(o, r);
|
|
4417
|
+
!s || !a || a === s.label || (gs(e, t, n, Oo(o, r, a)), Promise.resolve(e(Vo(n)).onRename?.(s, a)).catch(() => {
|
|
4418
|
+
gs(e, t, n, o), t(es(n), `Rename failed. ${s.label} was restored.`);
|
|
4324
4419
|
}));
|
|
4325
|
-
}),
|
|
4326
|
-
|
|
4327
|
-
}),
|
|
4328
|
-
let r = e(
|
|
4329
|
-
return t(
|
|
4330
|
-
}),
|
|
4331
|
-
if (e(
|
|
4332
|
-
t(
|
|
4420
|
+
}), js = $("openMenu", (e, t, n, r) => {
|
|
4421
|
+
xo(e(Wo(n)), r) && t(Zo(n), r);
|
|
4422
|
+
}), Ms = $("closeMenu", (e, t, n) => {
|
|
4423
|
+
let r = e(Zo(n));
|
|
4424
|
+
return t(Zo(n), null), r && t(Jo(n), r), r;
|
|
4425
|
+
}), Ns = $("move", async (e, t, n, r) => {
|
|
4426
|
+
if (e(ts(n))) {
|
|
4427
|
+
t(es(n), "Wait for the current move to finish.");
|
|
4333
4428
|
return;
|
|
4334
4429
|
}
|
|
4335
|
-
let i = e(
|
|
4430
|
+
let i = e(Wo(n)), a = Do(i, r);
|
|
4336
4431
|
if (!a || a === i) return;
|
|
4337
|
-
t(
|
|
4338
|
-
let o =
|
|
4339
|
-
t(
|
|
4432
|
+
t(ts(n), !0), gs(e, t, n, a), t(Xo(n), null), t(Yo(n), null);
|
|
4433
|
+
let o = xo(i, r.itemId), s = r.targetId ? xo(i, r.targetId) : null;
|
|
4434
|
+
t(es(n), s ? `Moved ${o?.label ?? "item"} ${r.position} ${s.label}.` : `Moved ${o?.label ?? "item"} to the top level.`);
|
|
4340
4435
|
try {
|
|
4341
|
-
await e(
|
|
4436
|
+
await e(Vo(n)).onMove?.(r);
|
|
4342
4437
|
} catch (a) {
|
|
4343
|
-
|
|
4438
|
+
gs(e, t, n, i), t(es(n), `Move failed. ${o?.label ?? "Item"} was restored.`), e(Vo(n)).onMoveError?.(a, r);
|
|
4344
4439
|
} finally {
|
|
4345
|
-
t(
|
|
4440
|
+
t(ts(n), !1);
|
|
4346
4441
|
}
|
|
4347
|
-
}),
|
|
4348
|
-
|
|
4349
|
-
}),
|
|
4350
|
-
let a = e(
|
|
4351
|
-
o !== a && t(
|
|
4352
|
-
}),
|
|
4353
|
-
t(
|
|
4354
|
-
}),
|
|
4355
|
-
t(
|
|
4356
|
-
}),
|
|
4357
|
-
t(
|
|
4358
|
-
}),
|
|
4359
|
-
t(
|
|
4360
|
-
}),
|
|
4361
|
-
t(
|
|
4362
|
-
}),
|
|
4363
|
-
t(
|
|
4364
|
-
}),
|
|
4365
|
-
t(
|
|
4366
|
-
}),
|
|
4367
|
-
|
|
4442
|
+
}), Ps = $("setItems", (e, t, n, r) => {
|
|
4443
|
+
gs(e, t, n, r);
|
|
4444
|
+
}), Fs = $("setHovered", (e, t, n, r, i) => {
|
|
4445
|
+
let a = e($o(n)), o = i ? r : a === r ? null : a;
|
|
4446
|
+
o !== a && t($o(n), o);
|
|
4447
|
+
}), Is = $("clearHover", (e, t, n) => {
|
|
4448
|
+
t($o(n), null);
|
|
4449
|
+
}), Ls = $("endDrag", (e, t, n) => {
|
|
4450
|
+
t(Yo(n), null), t(Xo(n), null);
|
|
4451
|
+
}), Rs = $("mount", (e, t, n, r, i) => {
|
|
4452
|
+
t(Bo(n), r), !e(Uo(n)) && (t(Uo(n), !0), t(Ho(n), i), vs(t, n, i));
|
|
4453
|
+
}), zs = $("setHandlers", (e, t, n, r) => {
|
|
4454
|
+
t(Vo(n), r);
|
|
4455
|
+
}), Bs = $("projectItems", (e, t, n, r) => {
|
|
4456
|
+
t(Wo(n), r);
|
|
4457
|
+
}), Vs = $("projectActiveId", (e, t, n, r) => {
|
|
4458
|
+
t(Ko(n), r);
|
|
4459
|
+
}), Hs = $("projectExpandedIds", (e, t, n, r) => {
|
|
4460
|
+
t(qo(n), new Set(r));
|
|
4461
|
+
}), Us = $("reset", (e, t, n) => {
|
|
4462
|
+
vs(t, n, e(Ho(n)));
|
|
4368
4463
|
});
|
|
4369
|
-
function
|
|
4370
|
-
for (let t of
|
|
4464
|
+
function Ws(e) {
|
|
4465
|
+
for (let t of Fo) t.remove(e);
|
|
4371
4466
|
}
|
|
4372
4467
|
//#endregion
|
|
4373
4468
|
//#region src/components/blocks/nav/sidebar/use-ai-sidebar.ts
|
|
4374
|
-
function
|
|
4469
|
+
function Gs(e) {
|
|
4375
4470
|
let { items: t, defaultItems: n = [], onItemsChange: r, onMove: i, onMoveError: a, onRename: o, activeId: s, defaultActiveId: c = null, onActiveChange: l, onExpandedChange: u } = e, d = pe(), f = e.sidebarId ?? d, p = Me(), m = pe(), h = e.expandedIds, g = t !== void 0, _ = s !== void 0, v = h !== void 0, y = R(() => ({
|
|
4376
4471
|
controlsItems: g,
|
|
4377
4472
|
controlsActiveId: _,
|
|
@@ -4399,7 +4494,7 @@ function Ws(e) {
|
|
|
4399
4494
|
activeId: c,
|
|
4400
4495
|
focusedId: s ?? c,
|
|
4401
4496
|
expandedIds: [...h ?? e.defaultExpandedIds ?? []]
|
|
4402
|
-
})), S = q(
|
|
4497
|
+
})), S = q(Rs(f)), C = q(zs(f)), w = q(Bs(f)), T = q(Vs(f)), E = q(Hs(f)), D = q(Ds(f));
|
|
4403
4498
|
me(() => {
|
|
4404
4499
|
C(b);
|
|
4405
4500
|
}, [b, C]), me(() => {
|
|
@@ -4415,9 +4510,9 @@ function Ws(e) {
|
|
|
4415
4510
|
}, [s, T]), me(() => {
|
|
4416
4511
|
h !== void 0 && E(h);
|
|
4417
4512
|
}, [h, E]), L(() => {
|
|
4418
|
-
if (e.sidebarId === void 0) return () =>
|
|
4513
|
+
if (e.sidebarId === void 0) return () => Ws(f);
|
|
4419
4514
|
}, [e.sidebarId, f]);
|
|
4420
|
-
let O = K(
|
|
4515
|
+
let O = K(ns(f)), k = t ?? O, A = K(Go(f)), j = s ?? A, ee = K(rs(f)), M = R(() => h ? new Set(h) : ee, [h, ee]), te = K(Jo(f)), ne = K(Qo(f)), re = K(Zo(f)), ie = K(Yo(f)), N = K(Xo(f)), P = K($o(f)), ae = K(es(f)), F = K(ts(f)), oe = R(() => bo(k, M), [M, k]);
|
|
4421
4516
|
me(() => {
|
|
4422
4517
|
D();
|
|
4423
4518
|
}, [
|
|
@@ -4431,7 +4526,7 @@ function Ws(e) {
|
|
|
4431
4526
|
});
|
|
4432
4527
|
return () => cancelAnimationFrame(e);
|
|
4433
4528
|
}, [re]);
|
|
4434
|
-
let se = I((e) =>
|
|
4529
|
+
let se = I((e) => xo(k, e), [k]), ce = I((e) => M.has(e), [M]), le = q(Ts(f)), ue = q(ys(f)), de = q(bs(f)), fe = q(xs(f)), he = q(Ss(f)), ge = q(Cs(f)), _e = q(ws(f)), ve = q(Os(f)), ye = q(ks(f)), be = q(As(f)), xe = q(js(f)), Se = q(Ms(f)), Ce = q(Ns(f)), we = q(Us(f)), Te = q(Es(f)), V = q(Fs(f)), Ee = q(Is(f)), De = q(Ls(f)), H = q(Yo(f)), Oe = q(Xo(f)), U = z(/* @__PURE__ */ new Map()), ke = I((e, t) => {
|
|
4435
4530
|
t ? U.current.set(e, t) : U.current.delete(e);
|
|
4436
4531
|
}, []), W = I((e) => {
|
|
4437
4532
|
requestAnimationFrame(() => U.current.get(e)?.focus());
|
|
@@ -4440,8 +4535,8 @@ function Ws(e) {
|
|
|
4440
4535
|
}, [W, Te]), G = I(() => {
|
|
4441
4536
|
let e = Se();
|
|
4442
4537
|
e && W(e);
|
|
4443
|
-
}, [Se, W]), je = I(() => p.get(
|
|
4444
|
-
let n = je(), r = p.get(
|
|
4538
|
+
}, [Se, W]), je = I(() => p.get(as(f)), [f, p]), Ne = I((e, t) => {
|
|
4539
|
+
let n = je(), r = p.get(qo(f)), i = n.findIndex(({ item: e }) => e.id === t.item.id), a = n[i - 1], o = n[i + 1], s = e.altKey && e.shiftKey;
|
|
4445
4540
|
if (e.key === "ArrowDown" && !s && o) {
|
|
4446
4541
|
e.preventDefault(), Ae(o.item.id);
|
|
4447
4542
|
return;
|
|
@@ -4484,7 +4579,7 @@ function Ws(e) {
|
|
|
4484
4579
|
});
|
|
4485
4580
|
return;
|
|
4486
4581
|
}
|
|
4487
|
-
if (s && e.key === "ArrowRight" && a &&
|
|
4582
|
+
if (s && e.key === "ArrowRight" && a && yo(a.item)) {
|
|
4488
4583
|
e.preventDefault(), ue(a.item.id), Ce({
|
|
4489
4584
|
itemId: t.item.id,
|
|
4490
4585
|
targetId: a.item.id,
|
|
@@ -4500,7 +4595,7 @@ function Ws(e) {
|
|
|
4500
4595
|
});
|
|
4501
4596
|
return;
|
|
4502
4597
|
}
|
|
4503
|
-
e.key === "ArrowRight" &&
|
|
4598
|
+
e.key === "ArrowRight" && yo(t.item) ? (e.preventDefault(), r.has(t.item.id) ? o?.parentId === t.item.id && Ae(o.item.id) : ue(t.item.id)) : e.key === "ArrowLeft" ? (e.preventDefault(), r.has(t.item.id) ? de(t.item.id) : t.parentId && Ae(t.parentId)) : e.key === "Enter" || e.key === " " ? (e.preventDefault(), yo(t.item) ? fe(t.item.id) : le(t.item.id)) : e.key === "F2" ? (e.preventDefault(), ve(t.item.id)) : (e.key === "ContextMenu" || e.shiftKey && e.key === "F10") && (e.preventDefault(), xe(t.item.id));
|
|
4504
4599
|
}, [
|
|
4505
4600
|
de,
|
|
4506
4601
|
ue,
|
|
@@ -4514,7 +4609,7 @@ function Ws(e) {
|
|
|
4514
4609
|
p,
|
|
4515
4610
|
fe
|
|
4516
4611
|
]), Pe = I((e) => {
|
|
4517
|
-
!p.get(
|
|
4612
|
+
!p.get(Yo(f)) || e.target !== e.currentTarget || (e.preventDefault(), Oe({
|
|
4518
4613
|
id: null,
|
|
4519
4614
|
position: "after"
|
|
4520
4615
|
}));
|
|
@@ -4524,7 +4619,7 @@ function Ws(e) {
|
|
|
4524
4619
|
p
|
|
4525
4620
|
]), Fe = I((e) => {
|
|
4526
4621
|
e.preventDefault(), e.stopPropagation();
|
|
4527
|
-
let t = p.get(
|
|
4622
|
+
let t = p.get(Yo(f)), n = p.get(Xo(f));
|
|
4528
4623
|
t && n && Ce({
|
|
4529
4624
|
itemId: t,
|
|
4530
4625
|
targetId: n.id,
|
|
@@ -4537,12 +4632,12 @@ function Ws(e) {
|
|
|
4537
4632
|
]), Ie = I((e, t) => {
|
|
4538
4633
|
H(t), e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", t);
|
|
4539
4634
|
}, [H]), Le = I((e, t) => {
|
|
4540
|
-
let n = p.get(
|
|
4635
|
+
let n = p.get(Yo(f));
|
|
4541
4636
|
if (!n || n === t.item.id) return;
|
|
4542
|
-
let r =
|
|
4543
|
-
if (r &&
|
|
4637
|
+
let r = xo(p.get(Wo(f)), n);
|
|
4638
|
+
if (r && wo(r, t.item.id)) return;
|
|
4544
4639
|
e.preventDefault(), e.stopPropagation();
|
|
4545
|
-
let i = e.currentTarget.getBoundingClientRect(), a = (e.clientY - i.top) / i.height, o = !t.item.disabled &&
|
|
4640
|
+
let i = e.currentTarget.getBoundingClientRect(), a = (e.clientY - i.top) / i.height, o = !t.item.disabled && yo(t.item) && a >= .25 && a <= .75 ? "inside" : a < .5 ? "before" : "after";
|
|
4546
4641
|
Oe({
|
|
4547
4642
|
id: t.item.id,
|
|
4548
4643
|
position: o
|
|
@@ -4646,20 +4741,20 @@ function Ws(e) {
|
|
|
4646
4741
|
}
|
|
4647
4742
|
//#endregion
|
|
4648
4743
|
//#region src/components/blocks/nav/sidebar/sidebar-context.ts
|
|
4649
|
-
var
|
|
4650
|
-
function
|
|
4651
|
-
let e = fe(
|
|
4744
|
+
var Ks = ce(null);
|
|
4745
|
+
function qs() {
|
|
4746
|
+
let e = fe(Ks);
|
|
4652
4747
|
if (!e) throw Error("Sidebar rows must render inside <AISidebar>.");
|
|
4653
4748
|
return e;
|
|
4654
4749
|
}
|
|
4655
4750
|
//#endregion
|
|
4656
4751
|
//#region src/components/blocks/nav/sidebar/sidebar-icon.tsx
|
|
4657
|
-
function
|
|
4752
|
+
function Js(e, t) {
|
|
4658
4753
|
return /* @__PURE__ */ i(e.kind === "folder" || e.kind === "project" ? t ? b : y : e.kind === "bookmark" ? u : _, { className: "size-4" });
|
|
4659
4754
|
}
|
|
4660
4755
|
//#endregion
|
|
4661
4756
|
//#region src/components/blocks/nav/sidebar/marquee-label.tsx
|
|
4662
|
-
function
|
|
4757
|
+
function Ys({ active: e, children: t }) {
|
|
4663
4758
|
let n = W() ?? !1, r = z(null), o = z(null), [s, c] = B(0);
|
|
4664
4759
|
L(() => {
|
|
4665
4760
|
let e = () => {
|
|
@@ -4682,7 +4777,7 @@ function Js({ active: e, children: t }) {
|
|
|
4682
4777
|
ease: "linear",
|
|
4683
4778
|
repeat: Infinity,
|
|
4684
4779
|
repeatDelay: 2
|
|
4685
|
-
} :
|
|
4780
|
+
} : vo,
|
|
4686
4781
|
children: [/* @__PURE__ */ i("span", {
|
|
4687
4782
|
ref: o,
|
|
4688
4783
|
children: t
|
|
@@ -4695,10 +4790,10 @@ function Js({ active: e, children: t }) {
|
|
|
4695
4790
|
}
|
|
4696
4791
|
//#endregion
|
|
4697
4792
|
//#region src/components/motion/popover-position.ts
|
|
4698
|
-
function
|
|
4793
|
+
function Xs(e, t) {
|
|
4699
4794
|
return e?.trigger.left === t.trigger.left && e.trigger.top === t.trigger.top && e.trigger.width === t.trigger.width && e.trigger.height === t.trigger.height && e.content.width === t.content.width && e.content.height === t.content.height;
|
|
4700
4795
|
}
|
|
4701
|
-
function
|
|
4796
|
+
function Zs(e, t, n) {
|
|
4702
4797
|
let [r, i] = B(null), a = I(() => {
|
|
4703
4798
|
let n = e.current, r = t.current;
|
|
4704
4799
|
if (!n || !r) return;
|
|
@@ -4714,7 +4809,7 @@ function Xs(e, t, n) {
|
|
|
4714
4809
|
height: r.offsetHeight
|
|
4715
4810
|
}
|
|
4716
4811
|
};
|
|
4717
|
-
i((e) =>
|
|
4812
|
+
i((e) => Xs(e, o) ? e : o);
|
|
4718
4813
|
}, [t, e]);
|
|
4719
4814
|
return me(() => {
|
|
4720
4815
|
if (a(), !n) return;
|
|
@@ -4731,13 +4826,13 @@ function Xs(e, t, n) {
|
|
|
4731
4826
|
}
|
|
4732
4827
|
//#endregion
|
|
4733
4828
|
//#region src/components/motion/popover-morph.tsx
|
|
4734
|
-
var
|
|
4735
|
-
function
|
|
4736
|
-
let t = fe(
|
|
4829
|
+
var Qs = ce(null);
|
|
4830
|
+
function $s(e) {
|
|
4831
|
+
let t = fe(Qs);
|
|
4737
4832
|
if (!t) throw Error(`${e} must be used within <MorphPopover>`);
|
|
4738
4833
|
return t;
|
|
4739
4834
|
}
|
|
4740
|
-
function
|
|
4835
|
+
function ec({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, className: a }) {
|
|
4741
4836
|
let o = pe(), s = z(null), c = z(null), l = z(null), [u, d] = B(n), f = t !== void 0, p = f ? t : u, m = I((e) => {
|
|
4742
4837
|
f || d(e), r?.(e);
|
|
4743
4838
|
}, [f, r]), h = I(() => m(!p), [m, p]);
|
|
@@ -4768,7 +4863,7 @@ function $s({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, classN
|
|
|
4768
4863
|
h,
|
|
4769
4864
|
o
|
|
4770
4865
|
]);
|
|
4771
|
-
return /* @__PURE__ */ i(
|
|
4866
|
+
return /* @__PURE__ */ i(Qs.Provider, {
|
|
4772
4867
|
value: g,
|
|
4773
4868
|
children: /* @__PURE__ */ i("div", {
|
|
4774
4869
|
ref: s,
|
|
@@ -4777,18 +4872,18 @@ function $s({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, classN
|
|
|
4777
4872
|
})
|
|
4778
4873
|
});
|
|
4779
4874
|
}
|
|
4780
|
-
function
|
|
4875
|
+
function tc(...e) {
|
|
4781
4876
|
return (t) => {
|
|
4782
4877
|
for (let n of e) typeof n == "function" ? n(t) : n && typeof n == "object" && (n.current = t);
|
|
4783
4878
|
};
|
|
4784
4879
|
}
|
|
4785
|
-
function
|
|
4786
|
-
let t =
|
|
4880
|
+
function nc({ children: e }) {
|
|
4881
|
+
let t = $s("MorphPopoverTrigger");
|
|
4787
4882
|
if (!ue(e)) return e;
|
|
4788
4883
|
let n = e, r = n.props.onClick, i = n.props.ref;
|
|
4789
4884
|
return se(n, {
|
|
4790
4885
|
id: t.triggerId,
|
|
4791
|
-
ref:
|
|
4886
|
+
ref: tc(i, (e) => {
|
|
4792
4887
|
t.triggerRef.current = e;
|
|
4793
4888
|
}),
|
|
4794
4889
|
onClick: (e) => {
|
|
@@ -4799,16 +4894,16 @@ function tc({ children: e }) {
|
|
|
4799
4894
|
"aria-controls": t.open ? t.contentId : void 0
|
|
4800
4895
|
});
|
|
4801
4896
|
}
|
|
4802
|
-
var
|
|
4803
|
-
function
|
|
4897
|
+
var rc = (e, t) => `${e === "bottom" ? "top" : "bottom"} ${t === "end" ? "right" : "left"}`;
|
|
4898
|
+
function ic(e, t, n) {
|
|
4804
4899
|
return `inset(${e === "bottom" ? "0%" : "92%"} ${t === "end" ? "0%" : "92%"} ${e === "bottom" ? "92%" : "0%"} ${t === "end" ? "92%" : "0%"} round ${n}px)`;
|
|
4805
4900
|
}
|
|
4806
|
-
var
|
|
4901
|
+
var ac = (e) => `inset(0% 0% 0% 0% round ${e}px)`, oc = {
|
|
4807
4902
|
duration: .32,
|
|
4808
4903
|
ease: X
|
|
4809
4904
|
};
|
|
4810
|
-
function
|
|
4811
|
-
let s =
|
|
4905
|
+
function sc({ children: e, side: t = "bottom", align: n = "end", sideOffset: r = 8, radius: a = 16, className: o }) {
|
|
4906
|
+
let s = $s("MorphPopoverContent"), { contentId: c, setContentRef: l, triggerId: u } = s, d = W() ?? !1, [f, p] = B(!1), m = Zs(s.triggerRef, s.contentRef, f && s.open);
|
|
4812
4907
|
L(() => p(!0), []);
|
|
4813
4908
|
let h = m ? n === "end" ? m.trigger.left + m.trigger.width - m.content.width : m.trigger.left : 0, g = m ? t === "bottom" ? m.trigger.top + m.trigger.height + r : m.trigger.top - m.content.height - r : 0, _ = d ? void 0 : {
|
|
4814
4909
|
hidden: {
|
|
@@ -4823,12 +4918,12 @@ function oc({ children: e, side: t = "bottom", align: n = "end", sideOffset: r =
|
|
|
4823
4918
|
}
|
|
4824
4919
|
}, v = d ? void 0 : {
|
|
4825
4920
|
hidden: {
|
|
4826
|
-
clipPath:
|
|
4827
|
-
transition:
|
|
4921
|
+
clipPath: ic(t, n, a),
|
|
4922
|
+
transition: oc
|
|
4828
4923
|
},
|
|
4829
4924
|
show: {
|
|
4830
|
-
clipPath:
|
|
4831
|
-
transition:
|
|
4925
|
+
clipPath: ac(a),
|
|
4926
|
+
transition: oc
|
|
4832
4927
|
}
|
|
4833
4928
|
};
|
|
4834
4929
|
return f ? ze(/* @__PURE__ */ i(H, { children: s.open ? /* @__PURE__ */ i(U.div, {
|
|
@@ -4842,7 +4937,7 @@ function oc({ children: e, side: t = "bottom", align: n = "end", sideOffset: r =
|
|
|
4842
4937
|
left: h,
|
|
4843
4938
|
top: g,
|
|
4844
4939
|
visibility: m ? "visible" : "hidden",
|
|
4845
|
-
transformOrigin:
|
|
4940
|
+
transformOrigin: rc(t, n)
|
|
4846
4941
|
},
|
|
4847
4942
|
className: "fixed z-[9999] [filter:drop-shadow(0_10px_18px_rgba(0,0,0,0.14))]",
|
|
4848
4943
|
children: /* @__PURE__ */ i(U.div, {
|
|
@@ -4859,7 +4954,7 @@ function oc({ children: e, side: t = "bottom", align: n = "end", sideOffset: r =
|
|
|
4859
4954
|
}
|
|
4860
4955
|
//#endregion
|
|
4861
4956
|
//#region src/components/blocks/nav/sidebar/sidebar-row.tsx
|
|
4862
|
-
var
|
|
4957
|
+
var cc = {
|
|
4863
4958
|
initial: {
|
|
4864
4959
|
opacity: 0,
|
|
4865
4960
|
filter: "blur(6px)"
|
|
@@ -4872,19 +4967,19 @@ var sc = {
|
|
|
4872
4967
|
opacity: 0,
|
|
4873
4968
|
filter: "blur(6px)"
|
|
4874
4969
|
}
|
|
4875
|
-
},
|
|
4970
|
+
}, lc = {
|
|
4876
4971
|
initial: { opacity: 0 },
|
|
4877
4972
|
animate: { opacity: 1 },
|
|
4878
4973
|
exit: (e) => e ? {} : { opacity: 0 }
|
|
4879
4974
|
};
|
|
4880
|
-
function
|
|
4881
|
-
let { sidebarId: t, hoverLayoutId: n, renderIcon: r, renderMenu: o, renderActionsTrigger: s, setRowRef: c, onRowKeyDown: l, onRowHover: u, closeMenu: d, dnd: p } =
|
|
4975
|
+
function uc({ row: e }) {
|
|
4976
|
+
let { sidebarId: t, hoverLayoutId: n, renderIcon: r, renderMenu: o, renderActionsTrigger: s, setRowRef: c, onRowKeyDown: l, onRowHover: u, closeMenu: d, dnd: p } = qs(), m = W() ?? !1, h = K(ss(t, e.item.id)), g = K(cs(t, e.item.id)), _ = K(ls(t, e.item.id)), v = K(us(t, e.item.id)), y = K(ds(t, e.item.id)), b = K(fs(t, e.item.id)), x = K(ps(t, e.item.id)), S = K(os(t)), C = K(ms(t, e.item.id)) && !e.item.disabled, w = q(Ts(t)), T = q(xs(t)), E = q(Es(t)), D = q(Os(t)), O = q(ks(t)), k = q(As(t)), A = q(js(t)), j = I((t) => {
|
|
4882
4977
|
t ? A(e.item.id) : d();
|
|
4883
4978
|
}, [
|
|
4884
4979
|
d,
|
|
4885
4980
|
A,
|
|
4886
4981
|
e.item.id
|
|
4887
|
-
]), ee = I((t) => c(e.item.id, t), [e.item.id, c]), [ne, re] = B(!1), ie = z(null), N = z(!1), P = z(!1), [ae, F] = B(e.item.label), oe =
|
|
4982
|
+
]), ee = I((t) => c(e.item.id, t), [e.item.id, c]), [ne, re] = B(!1), ie = z(null), N = z(!1), P = z(!1), [ae, F] = B(e.item.label), oe = yo(e.item);
|
|
4888
4983
|
L(() => {
|
|
4889
4984
|
v && (N.current = !1, requestAnimationFrame(() => {
|
|
4890
4985
|
ie.current?.focus(), ie.current?.select();
|
|
@@ -4951,7 +5046,7 @@ function lc({ row: e }) {
|
|
|
4951
5046
|
custom: S,
|
|
4952
5047
|
children: S ? /* @__PURE__ */ i(U.span, {
|
|
4953
5048
|
"aria-hidden": "true",
|
|
4954
|
-
variants: m ?
|
|
5049
|
+
variants: m ? lc : cc,
|
|
4955
5050
|
initial: "initial",
|
|
4956
5051
|
animate: "animate",
|
|
4957
5052
|
exit: "exit",
|
|
@@ -4967,7 +5062,7 @@ function lc({ row: e }) {
|
|
|
4967
5062
|
/* @__PURE__ */ i("span", {
|
|
4968
5063
|
"aria-hidden": "true",
|
|
4969
5064
|
className: "relative grid size-5 shrink-0 place-items-center",
|
|
4970
|
-
children: r?.(e.item) ??
|
|
5065
|
+
children: r?.(e.item) ?? Js(e.item, g)
|
|
4971
5066
|
}),
|
|
4972
5067
|
v ? /* @__PURE__ */ i("input", {
|
|
4973
5068
|
ref: ie,
|
|
@@ -4984,14 +5079,14 @@ function lc({ row: e }) {
|
|
|
4984
5079
|
t.stopPropagation(), t.key === "Enter" && (N.current = !0, k(e.item.id, ae)), t.key === "Escape" && (N.current = !0, O());
|
|
4985
5080
|
},
|
|
4986
5081
|
className: "relative h-7 min-w-0 flex-1 text-sm text-foreground outline-none focus-visible:ring-0 focus-visible:ring-ring"
|
|
4987
|
-
}) : /* @__PURE__ */ i(
|
|
5082
|
+
}) : /* @__PURE__ */ i(Ys, {
|
|
4988
5083
|
active: ne || y,
|
|
4989
5084
|
children: e.item.label
|
|
4990
5085
|
}),
|
|
4991
|
-
!v && !e.item.disabled ? /* @__PURE__ */ a(
|
|
5086
|
+
!v && !e.item.disabled ? /* @__PURE__ */ a(ec, {
|
|
4992
5087
|
open: y,
|
|
4993
5088
|
onOpenChange: j,
|
|
4994
|
-
children: [/* @__PURE__ */ i(
|
|
5089
|
+
children: [/* @__PURE__ */ i(nc, { children: (() => {
|
|
4995
5090
|
let t = s?.(e.item);
|
|
4996
5091
|
if (t) {
|
|
4997
5092
|
let e = t.props.onClick;
|
|
@@ -5014,7 +5109,7 @@ function lc({ row: e }) {
|
|
|
5014
5109
|
className: "size-4"
|
|
5015
5110
|
})
|
|
5016
5111
|
});
|
|
5017
|
-
})() }), /* @__PURE__ */ i(
|
|
5112
|
+
})() }), /* @__PURE__ */ i(sc, {
|
|
5018
5113
|
side: "bottom",
|
|
5019
5114
|
align: "end",
|
|
5020
5115
|
sideOffset: 8,
|
|
@@ -5033,27 +5128,27 @@ function lc({ row: e }) {
|
|
|
5033
5128
|
]
|
|
5034
5129
|
});
|
|
5035
5130
|
}
|
|
5036
|
-
function
|
|
5131
|
+
function dc(e, t) {
|
|
5037
5132
|
return e.row.item === t.row.item && e.row.depth === t.row.depth && e.row.parentId === t.row.parentId;
|
|
5038
5133
|
}
|
|
5039
|
-
var
|
|
5040
|
-
|
|
5134
|
+
var fc = de(uc, dc);
|
|
5135
|
+
fc.displayName = "ResourceRow";
|
|
5041
5136
|
//#endregion
|
|
5042
5137
|
//#region src/components/blocks/nav/sidebar/ai-sidebar.tsx
|
|
5043
|
-
function
|
|
5044
|
-
return e.controller ? /* @__PURE__ */ i(
|
|
5045
|
-
...
|
|
5138
|
+
function pc(e) {
|
|
5139
|
+
return e.controller ? /* @__PURE__ */ i(gc, {
|
|
5140
|
+
...hc(e),
|
|
5046
5141
|
controller: e.controller
|
|
5047
|
-
}) : /* @__PURE__ */ i(
|
|
5142
|
+
}) : /* @__PURE__ */ i(mc, { ...e });
|
|
5048
5143
|
}
|
|
5049
|
-
function
|
|
5050
|
-
let { renderIcon: t, renderMenu: n, renderActionsTrigger: r, ariaLabel: a, className: o, controller: s, ...c } = e, l =
|
|
5051
|
-
return /* @__PURE__ */ i(
|
|
5052
|
-
...
|
|
5144
|
+
function mc(e) {
|
|
5145
|
+
let { renderIcon: t, renderMenu: n, renderActionsTrigger: r, ariaLabel: a, className: o, controller: s, ...c } = e, l = Gs(c);
|
|
5146
|
+
return /* @__PURE__ */ i(gc, {
|
|
5147
|
+
...hc(e),
|
|
5053
5148
|
controller: l
|
|
5054
5149
|
});
|
|
5055
5150
|
}
|
|
5056
|
-
function
|
|
5151
|
+
function hc(e) {
|
|
5057
5152
|
return {
|
|
5058
5153
|
renderIcon: e.renderIcon,
|
|
5059
5154
|
renderMenu: e.renderMenu,
|
|
@@ -5062,7 +5157,7 @@ function mc(e) {
|
|
|
5062
5157
|
className: e.className
|
|
5063
5158
|
};
|
|
5064
5159
|
}
|
|
5065
|
-
function
|
|
5160
|
+
function gc({ controller: e, renderIcon: t, renderMenu: n, renderActionsTrigger: r, ariaLabel: o = "Resources", className: s }) {
|
|
5066
5161
|
let { dnd: c, hover: l } = e, { draggingId: u, dropTarget: d } = c, f = R(() => ({
|
|
5067
5162
|
sidebarId: e.sidebarId,
|
|
5068
5163
|
hoverLayoutId: l.layoutId,
|
|
@@ -5094,7 +5189,7 @@ function hc({ controller: e, renderIcon: t, renderMenu: n, renderActionsTrigger:
|
|
|
5094
5189
|
c.onRowDragEnd,
|
|
5095
5190
|
c.onRowDragOver
|
|
5096
5191
|
]);
|
|
5097
|
-
return /* @__PURE__ */ a(
|
|
5192
|
+
return /* @__PURE__ */ a(Ks.Provider, {
|
|
5098
5193
|
value: f,
|
|
5099
5194
|
children: [/* @__PURE__ */ a("div", {
|
|
5100
5195
|
role: "tree",
|
|
@@ -5106,7 +5201,7 @@ function hc({ controller: e, renderIcon: t, renderMenu: n, renderActionsTrigger:
|
|
|
5106
5201
|
className: J("relative min-w-0 flex-col gap-0.5 [overflow-anchor:none] group-data-[state=collapsed]/sidebar:hidden", u && "pb-9 select-none", s),
|
|
5107
5202
|
children: [/* @__PURE__ */ i(H, {
|
|
5108
5203
|
initial: !1,
|
|
5109
|
-
children: e.flat.map((e) => /* @__PURE__ */ i(
|
|
5204
|
+
children: e.flat.map((e) => /* @__PURE__ */ i(fc, { row: e }, e.item.id))
|
|
5110
5205
|
}), u && /* @__PURE__ */ i("div", {
|
|
5111
5206
|
"aria-hidden": "true",
|
|
5112
5207
|
"data-active": d?.id === null || void 0,
|
|
@@ -5122,11 +5217,11 @@ function hc({ controller: e, renderIcon: t, renderMenu: n, renderActionsTrigger:
|
|
|
5122
5217
|
}
|
|
5123
5218
|
//#endregion
|
|
5124
5219
|
//#region src/components/blocks/nav/sidebar/use-ai-sidebar-state.ts
|
|
5125
|
-
function gc(e) {
|
|
5126
|
-
return K(ms(e));
|
|
5127
|
-
}
|
|
5128
5220
|
function _c(e) {
|
|
5129
|
-
|
|
5221
|
+
return K(hs(e));
|
|
5222
|
+
}
|
|
5223
|
+
function vc(e) {
|
|
5224
|
+
let t = q(Ts(e)), n = q(ys(e)), r = q(bs(e)), i = q(xs(e)), a = q(Ss(e)), o = q(Cs(e)), s = q(ws(e)), c = q(Es(e)), l = q(Os(e)), u = q(ks(e)), d = q(As(e)), f = q(js(e)), p = q(Ms(e)), m = q(Ns(e)), h = q(Ps(e)), g = q(Us(e));
|
|
5130
5225
|
return R(() => ({
|
|
5131
5226
|
select: t,
|
|
5132
5227
|
expand: n,
|
|
@@ -5165,33 +5260,33 @@ function _c(e) {
|
|
|
5165
5260
|
}
|
|
5166
5261
|
//#endregion
|
|
5167
5262
|
//#region src/components/blocks/nav/sidebar/index.ts
|
|
5168
|
-
var
|
|
5169
|
-
Wrapper:
|
|
5170
|
-
MarqueeLabel:
|
|
5171
|
-
Row:
|
|
5172
|
-
Icon:
|
|
5173
|
-
},
|
|
5263
|
+
var yc = {
|
|
5264
|
+
Wrapper: pc,
|
|
5265
|
+
MarqueeLabel: Ys,
|
|
5266
|
+
Row: fc,
|
|
5267
|
+
Icon: Js
|
|
5268
|
+
}, bc = 48, xc = {
|
|
5174
5269
|
type: "spring",
|
|
5175
5270
|
stiffness: 380,
|
|
5176
5271
|
damping: 35,
|
|
5177
5272
|
mass: .75
|
|
5178
|
-
},
|
|
5273
|
+
}, Sc = {
|
|
5179
5274
|
duration: .2,
|
|
5180
5275
|
delay: .08,
|
|
5181
5276
|
ease: X
|
|
5182
|
-
},
|
|
5277
|
+
}, Cc = {
|
|
5183
5278
|
duration: .12,
|
|
5184
5279
|
ease: X
|
|
5185
|
-
},
|
|
5280
|
+
}, wc = {
|
|
5186
5281
|
duration: .36,
|
|
5187
5282
|
ease: fn
|
|
5188
|
-
},
|
|
5283
|
+
}, Tc = {
|
|
5189
5284
|
duration: .16,
|
|
5190
5285
|
ease: X
|
|
5191
|
-
},
|
|
5286
|
+
}, Ec = {
|
|
5192
5287
|
duration: .18,
|
|
5193
5288
|
ease: X
|
|
5194
|
-
},
|
|
5289
|
+
}, Dc = {
|
|
5195
5290
|
closed: {
|
|
5196
5291
|
opacity: 0,
|
|
5197
5292
|
clipPath: "inset(0 0 100% 0 round 8px)",
|
|
@@ -5212,7 +5307,7 @@ var vc = {
|
|
|
5212
5307
|
staggerChildren: .045
|
|
5213
5308
|
}
|
|
5214
5309
|
}
|
|
5215
|
-
},
|
|
5310
|
+
}, Oc = {
|
|
5216
5311
|
closed: {
|
|
5217
5312
|
opacity: 0,
|
|
5218
5313
|
y: -6,
|
|
@@ -5222,60 +5317,60 @@ var vc = {
|
|
|
5222
5317
|
opacity: 1,
|
|
5223
5318
|
y: 0,
|
|
5224
5319
|
filter: "blur(0px)",
|
|
5225
|
-
transition:
|
|
5320
|
+
transition: Ec
|
|
5226
5321
|
}
|
|
5227
|
-
},
|
|
5322
|
+
}, kc = [
|
|
5228
5323
|
"a[href]",
|
|
5229
5324
|
"button:not([disabled])",
|
|
5230
5325
|
"input:not([disabled])",
|
|
5231
5326
|
"select:not([disabled])",
|
|
5232
5327
|
"textarea:not([disabled])",
|
|
5233
5328
|
"[tabindex]:not([tabindex='-1'])"
|
|
5234
|
-
].join(","),
|
|
5329
|
+
].join(","), Ac = "(max-width: 767px)", jc = "b", Mc = {
|
|
5235
5330
|
"--sidebar-width": "256px",
|
|
5236
5331
|
"--sidebar-width-icon": "56px",
|
|
5237
5332
|
"--sidebar-width-mobile": "18rem",
|
|
5238
5333
|
"--panel-width": "320px",
|
|
5239
5334
|
"--inset-min-width": "360px"
|
|
5240
5335
|
};
|
|
5241
|
-
function
|
|
5336
|
+
function Nc(e) {
|
|
5242
5337
|
return e === "right" ? "var(--panel-width)" : "var(--sidebar-width)";
|
|
5243
5338
|
}
|
|
5244
|
-
function
|
|
5339
|
+
function Pc(e, t) {
|
|
5245
5340
|
let n = document.createElement("div");
|
|
5246
5341
|
n.style.cssText = `position:absolute;visibility:hidden;pointer-events:none;width:${t}`, e.appendChild(n);
|
|
5247
5342
|
let r = n.getBoundingClientRect().width;
|
|
5248
5343
|
return n.remove(), r;
|
|
5249
5344
|
}
|
|
5250
|
-
var
|
|
5251
|
-
function
|
|
5252
|
-
let e = fe(
|
|
5345
|
+
var Fc = ce(null), Ic = ce(null);
|
|
5346
|
+
function Lc() {
|
|
5347
|
+
let e = fe(Fc);
|
|
5253
5348
|
if (!e) throw Error("useAnimatedSidebar must be used inside AnimatedPanelProvider.");
|
|
5254
5349
|
return e;
|
|
5255
5350
|
}
|
|
5256
|
-
function
|
|
5257
|
-
let t = window.matchMedia(
|
|
5351
|
+
function Rc(e) {
|
|
5352
|
+
let t = window.matchMedia(Ac);
|
|
5258
5353
|
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
5259
5354
|
}
|
|
5260
|
-
function Rc() {
|
|
5261
|
-
return window.matchMedia(kc).matches;
|
|
5262
|
-
}
|
|
5263
5355
|
function zc() {
|
|
5264
|
-
return
|
|
5356
|
+
return window.matchMedia(Ac).matches;
|
|
5265
5357
|
}
|
|
5266
5358
|
function Bc() {
|
|
5267
|
-
return
|
|
5359
|
+
return !1;
|
|
5268
5360
|
}
|
|
5269
5361
|
function Vc() {
|
|
5270
|
-
|
|
5362
|
+
return he(Rc, zc, Bc);
|
|
5363
|
+
}
|
|
5364
|
+
function Hc() {
|
|
5365
|
+
let e = fe(Ic);
|
|
5271
5366
|
if (!e) throw Error("Animated Sidebar parts must be used inside AnimatedPanel.");
|
|
5272
5367
|
return e;
|
|
5273
5368
|
}
|
|
5274
5369
|
//#endregion
|
|
5275
5370
|
//#region src/components/blocks/shell/animated-panel.tsx
|
|
5276
|
-
var
|
|
5277
|
-
function
|
|
5278
|
-
let f =
|
|
5371
|
+
var Uc = 16, Wc = 64;
|
|
5372
|
+
function Gc({ side: e = "left", variant: t = "sidebar", collapsible: n = "icon", ariaLabel: r = "Sidebar", children: o, className: s, panelClassName: c, style: l, ref: u, ...d }) {
|
|
5373
|
+
let f = Lc(), { bounds: p, panelWidth: m, resetPanelWidth: h, resizePanel: g } = f.fit, _ = f.open[e], v = n !== "none" && !_, y = v && n === "offcanvas", b = e === "right" && n === "offcanvas" && !v, x = z(0), [S, C] = B(!1), w = y ? 0 : v ? "var(--sidebar-width-icon)" : Nc(e), T = b && m !== null ? m : w, E = I((e) => {
|
|
5279
5374
|
typeof u == "function" ? u(e) : u && (u.current = e);
|
|
5280
5375
|
}, [u]), D = I(() => {
|
|
5281
5376
|
x.current = m ?? p.min, C(!0);
|
|
@@ -5285,7 +5380,7 @@ function Wc({ side: e = "left", variant: t = "sidebar", collapsible: n = "icon",
|
|
|
5285
5380
|
let t = e.key === "ArrowLeft" ? 1 : e.key === "ArrowRight" ? -1 : 0;
|
|
5286
5381
|
if (!t) return;
|
|
5287
5382
|
e.preventDefault();
|
|
5288
|
-
let n = e.shiftKey ?
|
|
5383
|
+
let n = e.shiftKey ? Wc : Uc;
|
|
5289
5384
|
g((m ?? p.min) + t * n);
|
|
5290
5385
|
}, [
|
|
5291
5386
|
p.min,
|
|
@@ -5313,7 +5408,7 @@ function Wc({ side: e = "left", variant: t = "sidebar", collapsible: n = "icon",
|
|
|
5313
5408
|
width: T,
|
|
5314
5409
|
...e === "right" ? { marginLeft: y ? "-0.5rem" : "0rem" } : { marginRight: y ? "-0.5rem" : "0rem" }
|
|
5315
5410
|
},
|
|
5316
|
-
transition: S || f.reduce ? { duration: 0 } :
|
|
5411
|
+
transition: S || f.reduce ? { duration: 0 } : xc,
|
|
5317
5412
|
style: l,
|
|
5318
5413
|
className: J("group/sidebar relative hidden h-full shrink-0 will-change-[width] md:block", "peer flex!", e === "right" && "order-last", s),
|
|
5319
5414
|
children: [b && /* @__PURE__ */ i(U.div, {
|
|
@@ -5347,9 +5442,9 @@ function Wc({ side: e = "left", variant: t = "sidebar", collapsible: n = "icon",
|
|
|
5347
5442
|
children: /* @__PURE__ */ i(U.div, {
|
|
5348
5443
|
initial: !1,
|
|
5349
5444
|
animate: { opacity: +!y },
|
|
5350
|
-
transition: f.reduce ?
|
|
5445
|
+
transition: f.reduce ? Tc : wc,
|
|
5351
5446
|
className: J("sticky top-0 flex w-full flex-col overflow-hidden", e === "right" && "ml-auto", t === "floating" && "mx-2 mt-2 h-[calc(100%-0.5rem)]", t === "inset" && "mt-2 h-[calc(100%-0.5rem)]", c),
|
|
5352
|
-
children: /* @__PURE__ */ i(
|
|
5447
|
+
children: /* @__PURE__ */ i(Ic.Provider, {
|
|
5353
5448
|
value: {
|
|
5354
5449
|
collapsed: v,
|
|
5355
5450
|
collapsible: n,
|
|
@@ -5363,106 +5458,106 @@ function Wc({ side: e = "left", variant: t = "sidebar", collapsible: n = "icon",
|
|
|
5363
5458
|
}
|
|
5364
5459
|
//#endregion
|
|
5365
5460
|
//#region src/components/blocks/shell/shell-metrics.ts
|
|
5366
|
-
function
|
|
5461
|
+
function Kc({ rail: e, insetMin: t, panelMin: n }) {
|
|
5367
5462
|
return e + t + n;
|
|
5368
5463
|
}
|
|
5369
|
-
function Kc(e) {
|
|
5370
|
-
return e.viewport <= 0 || e.panelMin <= 0 || Gc(e) < e.viewport;
|
|
5371
|
-
}
|
|
5372
5464
|
function qc(e) {
|
|
5465
|
+
return e.viewport <= 0 || e.panelMin <= 0 || Kc(e) < e.viewport;
|
|
5466
|
+
}
|
|
5467
|
+
function Jc(e) {
|
|
5373
5468
|
let { chrome: t, insetMin: n, panelMin: r, rail: i, viewport: a } = e;
|
|
5374
5469
|
return {
|
|
5375
5470
|
min: r,
|
|
5376
5471
|
max: Math.max(r, a - t - i - n)
|
|
5377
5472
|
};
|
|
5378
5473
|
}
|
|
5379
|
-
function
|
|
5380
|
-
let { min: n, max: r } =
|
|
5474
|
+
function Yc(e, t) {
|
|
5475
|
+
let { min: n, max: r } = Jc(t);
|
|
5381
5476
|
return Math.min(Math.max(e, n), r);
|
|
5382
5477
|
}
|
|
5383
|
-
function
|
|
5478
|
+
function Xc(e, t) {
|
|
5384
5479
|
return e.rail === t.rail && e.insetMin === t.insetMin && e.panelMin === t.panelMin && e.viewport === t.viewport && e.chrome === t.chrome;
|
|
5385
5480
|
}
|
|
5386
5481
|
//#endregion
|
|
5387
5482
|
//#region src/components/blocks/shell/shell-fit-atom.ts
|
|
5388
|
-
var
|
|
5483
|
+
var Zc = {
|
|
5389
5484
|
rail: 0,
|
|
5390
5485
|
insetMin: 0,
|
|
5391
5486
|
panelMin: 0,
|
|
5392
5487
|
viewport: 0,
|
|
5393
5488
|
chrome: 0
|
|
5394
|
-
},
|
|
5489
|
+
}, Qc = { panelWidth: null }, $c = {
|
|
5395
5490
|
min: 0,
|
|
5396
5491
|
max: 0
|
|
5397
|
-
},
|
|
5398
|
-
function
|
|
5492
|
+
}, el = [];
|
|
5493
|
+
function tl(e) {
|
|
5399
5494
|
let t = /* @__PURE__ */ new Map(), n = ((n) => {
|
|
5400
5495
|
let r = t.get(n);
|
|
5401
5496
|
return r === void 0 && (r = e(n), t.set(n, r)), r;
|
|
5402
5497
|
});
|
|
5403
5498
|
return n.remove = (e) => {
|
|
5404
5499
|
t.delete(e);
|
|
5405
|
-
},
|
|
5500
|
+
}, el.push(n), n;
|
|
5406
5501
|
}
|
|
5407
|
-
function
|
|
5408
|
-
return
|
|
5502
|
+
function nl(e, t) {
|
|
5503
|
+
return tl((n) => {
|
|
5409
5504
|
let r = G(t);
|
|
5410
5505
|
return r.debugLabel = `shell-fit/${n}/${e}`, r;
|
|
5411
5506
|
});
|
|
5412
5507
|
}
|
|
5413
|
-
function
|
|
5414
|
-
return
|
|
5508
|
+
function rl(e, t) {
|
|
5509
|
+
return tl((n) => {
|
|
5415
5510
|
let r = G((e) => t(e, n));
|
|
5416
5511
|
return r.debugLabel = `shell-fit/${n}/${e}`, r;
|
|
5417
5512
|
});
|
|
5418
5513
|
}
|
|
5419
|
-
function
|
|
5420
|
-
return
|
|
5514
|
+
function il(e, t) {
|
|
5515
|
+
return tl((n) => {
|
|
5421
5516
|
let r = G(null, (e, r, ...i) => t(e, r, n, ...i));
|
|
5422
5517
|
return r.debugLabel = `shell-fit/${n}/${e}`, r;
|
|
5423
5518
|
});
|
|
5424
5519
|
}
|
|
5425
|
-
var
|
|
5426
|
-
let n = e(
|
|
5520
|
+
var al = nl("metrics", Zc), ol = nl("requestedWidth", null), sl = nl("seed", Qc), cl = nl("initialized", !1), ll = rl("measured", (e, t) => {
|
|
5521
|
+
let n = e(al(t));
|
|
5427
5522
|
return n.panelMin > 0 ? n : null;
|
|
5428
|
-
}),
|
|
5429
|
-
let n = e(
|
|
5430
|
-
return n ?
|
|
5431
|
-
}),
|
|
5432
|
-
let n = e(
|
|
5433
|
-
return n ?
|
|
5434
|
-
}),
|
|
5435
|
-
metrics: e(
|
|
5436
|
-
fits: e(
|
|
5437
|
-
panelWidth: e(
|
|
5438
|
-
bounds: e(
|
|
5439
|
-
})),
|
|
5440
|
-
|
|
5441
|
-
}),
|
|
5442
|
-
let i = e(
|
|
5443
|
-
t(
|
|
5444
|
-
}),
|
|
5445
|
-
t(
|
|
5446
|
-
}),
|
|
5447
|
-
e(
|
|
5523
|
+
}), ul = rl("fits", (e, t) => qc(e(al(t)))), dl = rl("panelBounds", (e, t) => {
|
|
5524
|
+
let n = e(ll(t));
|
|
5525
|
+
return n ? Jc(n) : $c;
|
|
5526
|
+
}), fl = rl("panelWidth", (e, t) => {
|
|
5527
|
+
let n = e(ll(t));
|
|
5528
|
+
return n ? Yc(e(ol(t)) ?? n.panelMin, n) : null;
|
|
5529
|
+
}), pl = rl("state", (e, t) => ({
|
|
5530
|
+
metrics: e(ll(t)),
|
|
5531
|
+
fits: e(ul(t)),
|
|
5532
|
+
panelWidth: e(fl(t)),
|
|
5533
|
+
bounds: e(dl(t))
|
|
5534
|
+
})), ml = il("measure", (e, t, n, r) => {
|
|
5535
|
+
Xc(e(al(n)), r) || t(al(n), r);
|
|
5536
|
+
}), hl = il("resizePanel", (e, t, n, r) => {
|
|
5537
|
+
let i = e(ll(n));
|
|
5538
|
+
t(ol(n), i ? Yc(r, i) : r);
|
|
5539
|
+
}), gl = il("resetPanelWidth", (e, t, n) => {
|
|
5540
|
+
t(ol(n), e(sl(n)).panelWidth);
|
|
5541
|
+
}), _l = il("mount", (e, t, n, r) => {
|
|
5542
|
+
e(cl(n)) || (t(cl(n), !0), t(sl(n), r), t(ol(n), r.panelWidth));
|
|
5448
5543
|
});
|
|
5449
|
-
function
|
|
5450
|
-
for (let t of
|
|
5544
|
+
function vl(e) {
|
|
5545
|
+
for (let t of el) t.remove(e);
|
|
5451
5546
|
}
|
|
5452
5547
|
//#endregion
|
|
5453
5548
|
//#region src/components/blocks/shell/use-shell-fit.ts
|
|
5454
|
-
function
|
|
5549
|
+
function yl(e, t) {
|
|
5455
5550
|
let n = e.querySelector("[data-slot=\"sidebar\"][data-side=\"left\"]"), r = n?.dataset.collapsible, i = getComputedStyle(e), a = Number.parseFloat(i.columnGap) || 0;
|
|
5456
5551
|
return {
|
|
5457
|
-
rail: n ? t || r === "none" ?
|
|
5458
|
-
insetMin:
|
|
5459
|
-
panelMin:
|
|
5552
|
+
rail: n ? t || r === "none" ? Pc(e, "var(--sidebar-width)") : r === "offcanvas" ? 0 : Pc(e, "var(--sidebar-width-icon)") : 0,
|
|
5553
|
+
insetMin: Pc(e, "var(--inset-min-width)"),
|
|
5554
|
+
panelMin: Pc(e, "var(--panel-width)"),
|
|
5460
5555
|
viewport: window.innerWidth,
|
|
5461
5556
|
chrome: (Number.parseFloat(i.paddingLeft) || 0) + (Number.parseFloat(i.paddingRight) || 0) + a * Math.max(0, e.children.length - 1)
|
|
5462
5557
|
};
|
|
5463
5558
|
}
|
|
5464
|
-
function
|
|
5465
|
-
let a = pe(), o = e ?? a, [s] = B(() => ({ panelWidth: r ?? null })), c = q(
|
|
5559
|
+
function bl({ shellId: e, hostRef: t, railOpen: n, defaultPanelWidth: r, onUnfit: i }) {
|
|
5560
|
+
let a = pe(), o = e ?? a, [s] = B(() => ({ panelWidth: r ?? null })), c = q(_l(o)), l = q(ml(o)), u = q(hl(o)), d = q(gl(o));
|
|
5466
5561
|
ke(() => {
|
|
5467
5562
|
c(s);
|
|
5468
5563
|
}, [c, s]);
|
|
@@ -5473,8 +5568,8 @@ function yl({ shellId: e, hostRef: t, railOpen: n, defaultPanelWidth: r, onUnfit
|
|
|
5473
5568
|
let e = t.current;
|
|
5474
5569
|
if (!e) return;
|
|
5475
5570
|
let r = () => {
|
|
5476
|
-
let t =
|
|
5477
|
-
l(t),
|
|
5571
|
+
let t = yl(e, n);
|
|
5572
|
+
l(t), qc(t) || f.current?.();
|
|
5478
5573
|
};
|
|
5479
5574
|
return r(), window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
5480
5575
|
}, [
|
|
@@ -5482,9 +5577,9 @@ function yl({ shellId: e, hostRef: t, railOpen: n, defaultPanelWidth: r, onUnfit
|
|
|
5482
5577
|
n,
|
|
5483
5578
|
l
|
|
5484
5579
|
]), L(() => {
|
|
5485
|
-
if (e === void 0) return () =>
|
|
5580
|
+
if (e === void 0) return () => vl(o);
|
|
5486
5581
|
}, [o, e]);
|
|
5487
|
-
let p = K(
|
|
5582
|
+
let p = K(pl(o));
|
|
5488
5583
|
return R(() => ({
|
|
5489
5584
|
shellId: o,
|
|
5490
5585
|
...p,
|
|
@@ -5499,14 +5594,14 @@ function yl({ shellId: e, hostRef: t, railOpen: n, defaultPanelWidth: r, onUnfit
|
|
|
5499
5594
|
}
|
|
5500
5595
|
//#endregion
|
|
5501
5596
|
//#region src/components/blocks/shell/animated-panel-provider.tsx
|
|
5502
|
-
function
|
|
5597
|
+
function xl({ children: e, shellId: t, defaultPanelWidth: n, open: r, defaultOpen: a, onOpenChange: o, openMobile: s, defaultOpenMobile: c, onOpenMobileChange: l, onNarrowChange: u, className: d, style: f, ...p }) {
|
|
5503
5598
|
let [m, h] = B(() => ({
|
|
5504
5599
|
left: a?.left ?? !0,
|
|
5505
5600
|
right: a?.right ?? !1
|
|
5506
5601
|
})), [g, _] = B(() => ({
|
|
5507
5602
|
left: c?.left ?? !1,
|
|
5508
5603
|
right: c?.right ?? !1
|
|
5509
|
-
})), v =
|
|
5604
|
+
})), v = Vc(), y = W() ?? !1, b = pe(), x = z(null), S = z(null), C = z(null), w = z(!0), T = r?.left, E = r?.right, D = s?.left, O = s?.right, k = R(() => ({
|
|
5510
5605
|
left: T ?? m.left,
|
|
5511
5606
|
right: E ?? m.right
|
|
5512
5607
|
}), [
|
|
@@ -5555,7 +5650,7 @@ function bl({ children: e, shellId: t, defaultPanelWidth: n, open: r, defaultOpe
|
|
|
5555
5650
|
k.right && j(!1, "right"), A.right && ee(!1, "right");
|
|
5556
5651
|
};
|
|
5557
5652
|
});
|
|
5558
|
-
let re = I(() => ne.current(), []), ie =
|
|
5653
|
+
let re = I(() => ne.current(), []), ie = bl({
|
|
5559
5654
|
shellId: t,
|
|
5560
5655
|
hostRef: C,
|
|
5561
5656
|
railOpen: k.left,
|
|
@@ -5577,7 +5672,7 @@ function bl({ children: e, shellId: t, defaultPanelWidth: n, open: r, defaultOpe
|
|
|
5577
5672
|
e.key.toLowerCase() === "b" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), M("left"));
|
|
5578
5673
|
};
|
|
5579
5674
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
5580
|
-
}, [M]), /* @__PURE__ */ i(
|
|
5675
|
+
}, [M]), /* @__PURE__ */ i(Fc.Provider, {
|
|
5581
5676
|
value: {
|
|
5582
5677
|
isMobile: v,
|
|
5583
5678
|
fit: ie,
|
|
@@ -5598,7 +5693,7 @@ function bl({ children: e, shellId: t, defaultPanelWidth: n, open: r, defaultOpe
|
|
|
5598
5693
|
"data-state-left": k.left ? "expanded" : "collapsed",
|
|
5599
5694
|
"data-state-right": k.right ? "expanded" : "collapsed",
|
|
5600
5695
|
style: {
|
|
5601
|
-
...
|
|
5696
|
+
...Mc,
|
|
5602
5697
|
...f
|
|
5603
5698
|
},
|
|
5604
5699
|
className: J("group/sidebar-wrapper flex w-full min-w-0 gap-x-2", d),
|
|
@@ -5608,8 +5703,8 @@ function bl({ children: e, shellId: t, defaultPanelWidth: n, open: r, defaultOpe
|
|
|
5608
5703
|
}
|
|
5609
5704
|
//#endregion
|
|
5610
5705
|
//#region src/components/blocks/shell/animated-panel-trigger.tsx
|
|
5611
|
-
var
|
|
5612
|
-
let o =
|
|
5706
|
+
var Sl = le(function({ onClick: e, side: t = "left", type: n = "button", ...r }, a) {
|
|
5707
|
+
let o = Lc(), s = o.isMobile ? o.openMobile[t] : o.open[t], c = o.triggerRefs[t];
|
|
5613
5708
|
return t === "right" && !o.fit.fits ? null : /* @__PURE__ */ i(Y, {
|
|
5614
5709
|
...r,
|
|
5615
5710
|
ref: (e) => {
|
|
@@ -5627,7 +5722,7 @@ var xl = le(function({ onClick: e, side: t = "left", type: n = "button", ...r },
|
|
|
5627
5722
|
e?.(n), !n.defaultPrevented && o.toggleSidebar(t);
|
|
5628
5723
|
}
|
|
5629
5724
|
});
|
|
5630
|
-
}),
|
|
5725
|
+
}), Cl = le(function({ className: e, ...t }, n) {
|
|
5631
5726
|
return /* @__PURE__ */ i(U.main, {
|
|
5632
5727
|
...t,
|
|
5633
5728
|
ref: n,
|
|
@@ -5637,31 +5732,31 @@ var xl = le(function({ onClick: e, side: t = "left", type: n = "button", ...r },
|
|
|
5637
5732
|
});
|
|
5638
5733
|
//#endregion
|
|
5639
5734
|
//#region src/components/blocks/shell/shell-layout.tsx
|
|
5640
|
-
function
|
|
5735
|
+
function wl({ children: e, variant: t = "desktop", panels: n, className: r, header: o, defaultOpen: s, ...c }) {
|
|
5641
5736
|
let l = {
|
|
5642
5737
|
...n?.left && { left: n.left.defaultOpen ?? !0 },
|
|
5643
5738
|
...n?.right && { right: n.right.defaultOpen ?? !1 },
|
|
5644
5739
|
...s
|
|
5645
5740
|
};
|
|
5646
|
-
return /* @__PURE__ */ a(
|
|
5741
|
+
return /* @__PURE__ */ a(xl, {
|
|
5647
5742
|
...c,
|
|
5648
5743
|
defaultOpen: l,
|
|
5649
5744
|
className: J("relative h-full min-h-0 px-2 pb-2", r, "bg-linear-to-tr/increasing from-neutral-200 via-neutral-100 to-stone-200 dark:from-neutral-900 dark:via-neutral-950 dark:to-stone-950"),
|
|
5650
5745
|
style: { paddingTop: t === "desktop" ? 48 : 0 },
|
|
5651
5746
|
children: [
|
|
5652
|
-
n?.left?.component && /* @__PURE__ */ i(
|
|
5747
|
+
n?.left?.component && /* @__PURE__ */ i(Gc, {
|
|
5653
5748
|
ariaLabel: "Primary navigation",
|
|
5654
5749
|
collapsible: "icon",
|
|
5655
5750
|
role: "navigation",
|
|
5656
5751
|
variant: "inset",
|
|
5657
5752
|
children: n?.left?.component
|
|
5658
5753
|
}),
|
|
5659
|
-
/* @__PURE__ */ a(
|
|
5754
|
+
/* @__PURE__ */ a(Cl, { children: [/* @__PURE__ */ a("header", {
|
|
5660
5755
|
className: "flex h-12 flex-row! items-center justify-between gap-2 border-b px-2",
|
|
5661
5756
|
children: [
|
|
5662
5757
|
n?.left?.component && /* @__PURE__ */ i("div", {
|
|
5663
5758
|
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
5664
|
-
children: /* @__PURE__ */ i(
|
|
5759
|
+
children: /* @__PURE__ */ i(Sl, {
|
|
5665
5760
|
side: "left",
|
|
5666
5761
|
children: /* @__PURE__ */ i(Be, {
|
|
5667
5762
|
name: "PanelLeft",
|
|
@@ -5676,7 +5771,7 @@ function Cl({ children: e, variant: t = "desktop", panels: n, className: r, head
|
|
|
5676
5771
|
}),
|
|
5677
5772
|
n?.right?.component && /* @__PURE__ */ i("div", {
|
|
5678
5773
|
className: "flex flex-1 items-center justify-end gap-2",
|
|
5679
|
-
children: /* @__PURE__ */ i(
|
|
5774
|
+
children: /* @__PURE__ */ i(Sl, {
|
|
5680
5775
|
"aria-label": "Toggle panel",
|
|
5681
5776
|
side: "right",
|
|
5682
5777
|
children: /* @__PURE__ */ i(Be, {
|
|
@@ -5691,7 +5786,7 @@ function Cl({ children: e, variant: t = "desktop", panels: n, className: r, head
|
|
|
5691
5786
|
className: "min-h-24 flex-1 overflow-auto",
|
|
5692
5787
|
children: e
|
|
5693
5788
|
})] }),
|
|
5694
|
-
n?.right?.component && /* @__PURE__ */ i(
|
|
5789
|
+
n?.right?.component && /* @__PURE__ */ i(Gc, {
|
|
5695
5790
|
ariaLabel: n.right.name ?? "Secondary panel",
|
|
5696
5791
|
className: J("bg-neutral-50 dark:border-neutral-800 dark:bg-neutral-900", "outline-offset-0.5 border-t-3 border-white outline-neutral-100 dark:inset-ring-black", "rounded-lg shadow-md shadow-neutral-200 dark:shadow-neutral-950"),
|
|
5697
5792
|
collapsible: "offcanvas",
|
|
@@ -5705,10 +5800,10 @@ function Cl({ children: e, variant: t = "desktop", panels: n, className: r, head
|
|
|
5705
5800
|
}
|
|
5706
5801
|
//#endregion
|
|
5707
5802
|
//#region src/components/blocks/shell/use-shell-panels.ts
|
|
5708
|
-
function
|
|
5803
|
+
function Tl({ shellId: e, defaultOpen: t, defaultOpenMobile: n, defaultPanelWidth: r, onPanelChange: i } = {}) {
|
|
5709
5804
|
let a = pe(), o = e ?? a;
|
|
5710
5805
|
L(() => {
|
|
5711
|
-
if (e === void 0) return () =>
|
|
5806
|
+
if (e === void 0) return () => vl(o);
|
|
5712
5807
|
}, [o, e]);
|
|
5713
5808
|
let [s, c] = B(() => ({
|
|
5714
5809
|
left: t?.left ?? !0,
|
|
@@ -5716,7 +5811,7 @@ function wl({ shellId: e, defaultOpen: t, defaultOpenMobile: n, defaultPanelWidt
|
|
|
5716
5811
|
})), [l, u] = B(() => ({
|
|
5717
5812
|
left: n?.left ?? !1,
|
|
5718
5813
|
right: n?.right ?? !1
|
|
5719
|
-
})), d = !K(
|
|
5814
|
+
})), d = !K(ul(o)), f = K(fl(o)), p = q(hl(o)), m = I((e, t) => {
|
|
5720
5815
|
e && t === "right" && d || (c((n) => n[t] === e ? n : {
|
|
5721
5816
|
...n,
|
|
5722
5817
|
[t]: e
|
|
@@ -5756,11 +5851,11 @@ function wl({ shellId: e, defaultOpen: t, defaultOpenMobile: n, defaultPanelWidt
|
|
|
5756
5851
|
}
|
|
5757
5852
|
//#endregion
|
|
5758
5853
|
//#region src/components/blocks/shell/use-shell-fit-state.ts
|
|
5759
|
-
function Tl(e) {
|
|
5760
|
-
return K(fl(e));
|
|
5761
|
-
}
|
|
5762
5854
|
function El(e) {
|
|
5763
|
-
|
|
5855
|
+
return K(pl(e));
|
|
5856
|
+
}
|
|
5857
|
+
function Dl(e) {
|
|
5858
|
+
let t = q(hl(e)), n = q(gl(e));
|
|
5764
5859
|
return R(() => ({
|
|
5765
5860
|
resizePanel: t,
|
|
5766
5861
|
resetPanelWidth: n
|
|
@@ -5768,7 +5863,7 @@ function El(e) {
|
|
|
5768
5863
|
}
|
|
5769
5864
|
//#endregion
|
|
5770
5865
|
//#region src/components/blocks/scaffold/constants.ts
|
|
5771
|
-
var
|
|
5866
|
+
var Ol = 64, kl = 272, Al = 3, jl = 320, Ml = 8, Nl = 10, Pl = 52, Fl = 52, Il = 10, Ll = 4e3, Rl = .3, zl = [
|
|
5772
5867
|
.22,
|
|
5773
5868
|
1,
|
|
5774
5869
|
.36,
|
|
@@ -5776,12 +5871,32 @@ var Dl = 64, Ol = 272, kl = 3, Al = 320, jl = 8, Ml = 10, Nl = 52, Pl = 52, Fl =
|
|
|
5776
5871
|
];
|
|
5777
5872
|
//#endregion
|
|
5778
5873
|
//#region src/components/blocks/scaffold/utils.ts
|
|
5779
|
-
function
|
|
5874
|
+
function Bl(e) {
|
|
5780
5875
|
if (e === null) return 3;
|
|
5781
5876
|
let t = Math.floor((e + 8) / 328);
|
|
5782
5877
|
return Math.max(1, Math.min(3, t));
|
|
5783
5878
|
}
|
|
5784
|
-
var
|
|
5879
|
+
var Vl = {
|
|
5880
|
+
visibleOrder: [],
|
|
5881
|
+
autoHidden: [],
|
|
5882
|
+
userHidden: []
|
|
5883
|
+
};
|
|
5884
|
+
function Hl(e, t, n) {
|
|
5885
|
+
let r = new Set(t), i = e.visibleOrder.filter((e) => r.has(e)), a = e.autoHidden.filter((e) => r.has(e)), o = e.userHidden.filter((e) => r.has(e)), s = /* @__PURE__ */ new Set([
|
|
5886
|
+
...i,
|
|
5887
|
+
...a,
|
|
5888
|
+
...o
|
|
5889
|
+
]);
|
|
5890
|
+
for (let e of t) s.has(e) || i.push(e);
|
|
5891
|
+
for (; i.length > n && i.length > 1;) a.push(i.shift());
|
|
5892
|
+
for (; i.length < n && a.length > 0;) i.push(a.pop());
|
|
5893
|
+
return i.join(" ") === e.visibleOrder.join(" ") && a.join(" ") === e.autoHidden.join(" ") && o.join(" ") === e.userHidden.join(" ") ? e : {
|
|
5894
|
+
visibleOrder: i,
|
|
5895
|
+
autoHidden: a,
|
|
5896
|
+
userHidden: o
|
|
5897
|
+
};
|
|
5898
|
+
}
|
|
5899
|
+
var Ul = "transition-[opacity,scale,box-shadow] duration-200 ease-smooth-out hover:text-neutral-900 hover:shadow-md active:scale-97 dark:bg-neutral-800/95 dark:text-neutral-300 dark:inset-ring-white/10 dark:hover:text-white motion-reduce:transition-none motion-reduce:active:scale-100 z-20", Wl = "opacity-0 scale-95 group-hover/panel:opacity-100 group-hover/panel:scale-100 focus-visible:opacity-100 focus-visible:scale-100 pointer-coarse:opacity-100 pointer-coarse:scale-100", Gl = {
|
|
5785
5900
|
hidden: {
|
|
5786
5901
|
opacity: 0,
|
|
5787
5902
|
filter: "blur(4px)"
|
|
@@ -5798,18 +5913,18 @@ var Bl = "transition-[opacity,scale,box-shadow] duration-200 ease-smooth-out hov
|
|
|
5798
5913
|
ease: X
|
|
5799
5914
|
}
|
|
5800
5915
|
}
|
|
5801
|
-
},
|
|
5916
|
+
}, Kl = {
|
|
5802
5917
|
card: "bg-neutral-50 dark:bg-neutral-900 rounded-md border-t border-b border-t-white dark:border-t-neutral-700/50 border-b-neutral-900/10 dark:border-b-black/70 shadow-sm shadow-neutral-900/10 dark:shadow-black/50 inset-shadow-sm inset-shadow-white dark:inset-shadow-neutral-800",
|
|
5803
5918
|
subtle: "bg-neutral-100 dark:bg-neutral-800",
|
|
5804
5919
|
inset: "bg-neutral-200 dark:bg-neutral-700"
|
|
5805
5920
|
};
|
|
5806
5921
|
//#endregion
|
|
5807
5922
|
//#region src/components/blocks/scaffold/panel-close-button.tsx
|
|
5808
|
-
function
|
|
5923
|
+
function ql({ onClick: e, label: t, sound: n = !0, className: r }) {
|
|
5809
5924
|
return /* @__PURE__ */ i("button", {
|
|
5810
5925
|
id: "scaffold-panel-close-button",
|
|
5811
5926
|
"aria-label": t,
|
|
5812
|
-
className: J(
|
|
5927
|
+
className: J(Ul, Wl, "absolute top-4 right-3.5 z-10", r),
|
|
5813
5928
|
"data-cuelume-press": n ? "" : void 0,
|
|
5814
5929
|
"data-cuelume-release": n ? "" : void 0,
|
|
5815
5930
|
"data-slot": "scaffold-panel-close",
|
|
@@ -5823,35 +5938,35 @@ function Wl({ onClick: e, label: t, sound: n = !0, className: r }) {
|
|
|
5823
5938
|
}
|
|
5824
5939
|
//#endregion
|
|
5825
5940
|
//#region src/components/ui/button-group.tsx
|
|
5826
|
-
var
|
|
5941
|
+
var Jl = c("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
5827
5942
|
variants: { orientation: {
|
|
5828
5943
|
horizontal: "*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",
|
|
5829
5944
|
vertical: "flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"
|
|
5830
5945
|
} },
|
|
5831
5946
|
defaultVariants: { orientation: "horizontal" }
|
|
5832
5947
|
});
|
|
5833
|
-
function
|
|
5948
|
+
function Yl({ className: e, orientation: t, ...n }) {
|
|
5834
5949
|
return /* @__PURE__ */ i(He.div, {
|
|
5835
5950
|
role: "group",
|
|
5836
5951
|
"data-slot": "button-group",
|
|
5837
5952
|
"data-orientation": t,
|
|
5838
|
-
className: J(
|
|
5953
|
+
className: J(Jl({ orientation: t }), e),
|
|
5839
5954
|
...n
|
|
5840
5955
|
});
|
|
5841
5956
|
}
|
|
5842
5957
|
//#endregion
|
|
5843
5958
|
//#region src/components/ui/glasscn/glass-button-group.tsx
|
|
5844
|
-
function
|
|
5959
|
+
function Xl({ className: e, glassVariant: t = "liquid-refract", children: n, ...r }) {
|
|
5845
5960
|
return t === "liquid-refract" ? /* @__PURE__ */ i(et, {
|
|
5846
5961
|
className: J("", e),
|
|
5847
|
-
children: /* @__PURE__ */ i(
|
|
5962
|
+
children: /* @__PURE__ */ i(Yl, {
|
|
5848
5963
|
"data-slot": "glass-button-group",
|
|
5849
5964
|
"data-glass-variant": t,
|
|
5850
5965
|
className: J("bg-transparent", e),
|
|
5851
5966
|
...r,
|
|
5852
5967
|
children: n
|
|
5853
5968
|
})
|
|
5854
|
-
}) : /* @__PURE__ */ i(
|
|
5969
|
+
}) : /* @__PURE__ */ i(Yl, {
|
|
5855
5970
|
"data-slot": "glass-button-group",
|
|
5856
5971
|
"data-glass-variant": t,
|
|
5857
5972
|
className: J("rounded-lg", tt[t], e),
|
|
@@ -5861,7 +5976,7 @@ function ql({ className: e, glassVariant: t = "liquid-refract", children: n, ...
|
|
|
5861
5976
|
}
|
|
5862
5977
|
//#endregion
|
|
5863
5978
|
//#region src/lib/hooks/use-hover-capable.ts
|
|
5864
|
-
function
|
|
5979
|
+
function Zl() {
|
|
5865
5980
|
let [e, t] = B(!1);
|
|
5866
5981
|
return L(() => {
|
|
5867
5982
|
if (typeof window > "u" || !window.matchMedia) return;
|
|
@@ -5871,16 +5986,16 @@ function Jl() {
|
|
|
5871
5986
|
}
|
|
5872
5987
|
//#endregion
|
|
5873
5988
|
//#region src/components/blocks/scaffold/panel-menu-button.tsx
|
|
5874
|
-
var
|
|
5875
|
-
function
|
|
5876
|
-
let u =
|
|
5989
|
+
var Ql = "grid transition-[grid-template-columns,opacity] duration-300 ease-smooth-out motion-reduce:transition-none";
|
|
5990
|
+
function $l({ onClick: e, onExpand: t, onCloseSecondary: n, secondaryExpanded: r = !1, swapped: o = !1, label: s, sound: c = !0, className: l }) {
|
|
5991
|
+
let u = Zl(), d = F.useId(), f = F.useRef(null), p = F.useRef(null), [m, h] = F.useState(!1), g = F.useRef(void 0), _ = F.useRef(0), v = F.useRef(!1);
|
|
5877
5992
|
F.useEffect(() => () => clearTimeout(g.current), []);
|
|
5878
5993
|
let y = F.useCallback(() => {
|
|
5879
5994
|
clearTimeout(g.current);
|
|
5880
5995
|
}, []), b = F.useCallback(() => {
|
|
5881
5996
|
u && (clearTimeout(g.current), g.current = setTimeout(() => {
|
|
5882
5997
|
f.current?.contains(document.activeElement) || h(!1);
|
|
5883
|
-
},
|
|
5998
|
+
}, Ll));
|
|
5884
5999
|
}, [u]);
|
|
5885
6000
|
F.useEffect(() => {
|
|
5886
6001
|
if (!m || !u) return;
|
|
@@ -5900,17 +6015,17 @@ function Xl({ onClick: e, onExpand: t, onCloseSecondary: n, secondaryExpanded: r
|
|
|
5900
6015
|
}, S = (e) => {
|
|
5901
6016
|
e?.(), x();
|
|
5902
6017
|
};
|
|
5903
|
-
return /* @__PURE__ */ a(
|
|
6018
|
+
return /* @__PURE__ */ a(Xl, {
|
|
5904
6019
|
ref: f,
|
|
5905
6020
|
onPointerEnter: y,
|
|
5906
6021
|
onPointerLeave: b,
|
|
5907
6022
|
glassVariant: "subtle",
|
|
5908
6023
|
"data-expanded": m ? "" : void 0,
|
|
5909
|
-
className: J(
|
|
6024
|
+
className: J(Ul, Wl, "group/menu absolute top-1/2 z-10 -translate-y-1/2", l),
|
|
5910
6025
|
children: [/* @__PURE__ */ i("div", {
|
|
5911
6026
|
"aria-hidden": m || void 0,
|
|
5912
6027
|
inert: m || void 0,
|
|
5913
|
-
className: J(
|
|
6028
|
+
className: J(Ql, "grid-cols-[1fr] opacity-100 group-data-expanded/menu:grid-cols-[0fr] group-data-expanded/menu:opacity-0"),
|
|
5914
6029
|
children: /* @__PURE__ */ i("div", {
|
|
5915
6030
|
className: "flex min-w-0 overflow-hidden",
|
|
5916
6031
|
children: /* @__PURE__ */ i(Y, {
|
|
@@ -5937,7 +6052,7 @@ function Xl({ onClick: e, onExpand: t, onCloseSecondary: n, secondaryExpanded: r
|
|
|
5937
6052
|
ref: p,
|
|
5938
6053
|
"aria-hidden": !m || void 0,
|
|
5939
6054
|
inert: !m || void 0,
|
|
5940
|
-
className: J(
|
|
6055
|
+
className: J(Ql, "grid-cols-[0fr] opacity-0 group-data-expanded/menu:grid-cols-[1fr] group-data-expanded/menu:opacity-100"),
|
|
5941
6056
|
children: /* @__PURE__ */ a("div", {
|
|
5942
6057
|
className: "flex min-w-0 overflow-hidden",
|
|
5943
6058
|
children: [
|
|
@@ -5980,43 +6095,153 @@ function Xl({ onClick: e, onExpand: t, onCloseSecondary: n, secondaryExpanded: r
|
|
|
5980
6095
|
});
|
|
5981
6096
|
}
|
|
5982
6097
|
//#endregion
|
|
6098
|
+
//#region src/components/blocks/scaffold/scaffold-atom.ts
|
|
6099
|
+
var eu = { controlsInspector: !1 }, tu = {}, nu = [], ru = [];
|
|
6100
|
+
function iu(e) {
|
|
6101
|
+
let t = /* @__PURE__ */ new Map(), n = ((n) => {
|
|
6102
|
+
let r = t.get(n);
|
|
6103
|
+
return r === void 0 && (r = e(n), t.set(n, r)), r;
|
|
6104
|
+
});
|
|
6105
|
+
return n.remove = (e) => {
|
|
6106
|
+
t.delete(e);
|
|
6107
|
+
}, ru.push(n), n;
|
|
6108
|
+
}
|
|
6109
|
+
function au(e, t) {
|
|
6110
|
+
return iu((n) => {
|
|
6111
|
+
let r = G(t);
|
|
6112
|
+
return r.debugLabel = `scaffold/${n}/${e}`, r;
|
|
6113
|
+
});
|
|
6114
|
+
}
|
|
6115
|
+
function ou(e, t) {
|
|
6116
|
+
return iu((n) => {
|
|
6117
|
+
let r = G((e) => t(e, n));
|
|
6118
|
+
return r.debugLabel = `scaffold/${n}/${e}`, r;
|
|
6119
|
+
});
|
|
6120
|
+
}
|
|
6121
|
+
function su(e, t) {
|
|
6122
|
+
return iu((n) => {
|
|
6123
|
+
let r = G(null, (e, r, ...i) => t(e, r, n, ...i));
|
|
6124
|
+
return r.debugLabel = `scaffold/${n}/${e}`, r;
|
|
6125
|
+
});
|
|
6126
|
+
}
|
|
6127
|
+
function cu(e, t) {
|
|
6128
|
+
let n = /* @__PURE__ */ new Map();
|
|
6129
|
+
return ru.push({ remove: (e) => {
|
|
6130
|
+
n.delete(e);
|
|
6131
|
+
} }), (r, i) => {
|
|
6132
|
+
let a = n.get(r);
|
|
6133
|
+
a === void 0 && (a = /* @__PURE__ */ new Map(), n.set(r, a));
|
|
6134
|
+
let o = a.get(i);
|
|
6135
|
+
if (o === void 0) {
|
|
6136
|
+
let n = G((e) => t(e, r, i));
|
|
6137
|
+
n.debugLabel = `scaffold/${r}/${i}/${e}`, a.set(i, n), o = n;
|
|
6138
|
+
}
|
|
6139
|
+
return o;
|
|
6140
|
+
};
|
|
6141
|
+
}
|
|
6142
|
+
var lu = au("inspectorOpen", !1), uu = au("panelIds", nu), du = au("measuredCapacity", null), fu = au("visibility", Vl), pu = au("hoveredPanelId", null), mu = au("config", eu), hu = au("handlers", tu), gu = ou("panelCapacity", (e, t) => e(du(t)) ?? 3), _u = ou("hiddenPanelIds", (e, t) => {
|
|
6143
|
+
let n = e(fu(t));
|
|
6144
|
+
return [...n.autoHidden, ...n.userHidden];
|
|
6145
|
+
}), vu = cu("hidden", (e, t, n) => {
|
|
6146
|
+
if (n === "") return !1;
|
|
6147
|
+
let r = e(fu(t));
|
|
6148
|
+
return r.autoHidden.includes(n) || r.userHidden.includes(n);
|
|
6149
|
+
}), yu = cu("dimmed", (e, t, n) => {
|
|
6150
|
+
if (n === "") return !1;
|
|
6151
|
+
let r = e(pu(t));
|
|
6152
|
+
return r !== null && r !== n;
|
|
6153
|
+
}), bu = ou("state", (e, t) => ({
|
|
6154
|
+
inspectorOpen: e(lu(t)),
|
|
6155
|
+
panelCapacity: e(gu(t)),
|
|
6156
|
+
hiddenPanelIds: e(_u(t)),
|
|
6157
|
+
hoveredPanelId: e(pu(t))
|
|
6158
|
+
}));
|
|
6159
|
+
function xu(e, t, n) {
|
|
6160
|
+
let r = e(fu(n)), i = Hl(r, e(uu(n)), e(gu(n)));
|
|
6161
|
+
i !== r && t(fu(n), i);
|
|
6162
|
+
}
|
|
6163
|
+
var Su = su("setInspectorOpen", (e, t, n, r) => {
|
|
6164
|
+
e(lu(n)) !== r && (e(mu(n)).controlsInspector || t(lu(n), r), e(hu(n)).onInspectorOpenChange?.(r));
|
|
6165
|
+
}), Cu = su("toggleInspector", (e, t, n) => {
|
|
6166
|
+
t(Su(n), !e(lu(n)));
|
|
6167
|
+
}), wu = su("togglePanel", (e, t, n, r) => {
|
|
6168
|
+
let i = e(uu(n));
|
|
6169
|
+
if (!i.includes(r)) return;
|
|
6170
|
+
let a = e(fu(n)), o = a.autoHidden.includes(r) || a.userHidden.includes(r);
|
|
6171
|
+
if (!o && a.visibleOrder.length <= 1) return;
|
|
6172
|
+
let s = o ? {
|
|
6173
|
+
visibleOrder: [...a.visibleOrder, r],
|
|
6174
|
+
autoHidden: a.autoHidden.filter((e) => e !== r),
|
|
6175
|
+
userHidden: a.userHidden.filter((e) => e !== r)
|
|
6176
|
+
} : {
|
|
6177
|
+
visibleOrder: a.visibleOrder.filter((e) => e !== r),
|
|
6178
|
+
autoHidden: a.autoHidden,
|
|
6179
|
+
userHidden: [...a.userHidden, r]
|
|
6180
|
+
};
|
|
6181
|
+
t(fu(n), Hl(s, i, e(gu(n))));
|
|
6182
|
+
}), Tu = su("setPanelHovered", (e, t, n, r, i) => {
|
|
6183
|
+
let a = e(pu(n));
|
|
6184
|
+
if (i) {
|
|
6185
|
+
a !== r && t(pu(n), r);
|
|
6186
|
+
return;
|
|
6187
|
+
}
|
|
6188
|
+
a === r && t(pu(n), null);
|
|
6189
|
+
}), Eu = su("registerPanelIds", (e, t, n, r) => {
|
|
6190
|
+
let i = e(uu(n));
|
|
6191
|
+
i.length === r.length && i.every((e, t) => e === r[t]) || (t(uu(n), [...r]), xu(e, t, n));
|
|
6192
|
+
}), Du = su("measureCanvas", (e, t, n, r) => {
|
|
6193
|
+
let i = Bl(r);
|
|
6194
|
+
e(du(n)) !== i && (t(du(n), i), xu(e, t, n));
|
|
6195
|
+
}), Ou = su("projectProps", (e, t, n, r, i) => {
|
|
6196
|
+
t(mu(n), r), r.controlsInspector && i !== void 0 && t(lu(n), i);
|
|
6197
|
+
}), ku = su("setHandlers", (e, t, n, r) => {
|
|
6198
|
+
t(hu(n), r);
|
|
6199
|
+
}), Au = su("seedInspector", (e, t, n, r) => {
|
|
6200
|
+
t(lu(n), r);
|
|
6201
|
+
}), ju = su("reset", (e, t, n) => {
|
|
6202
|
+
t(lu(n), !1), t(uu(n), nu), t(du(n), null), t(fu(n), Vl), t(pu(n), null), t(mu(n), eu), t(hu(n), tu);
|
|
6203
|
+
});
|
|
6204
|
+
function Mu(e) {
|
|
6205
|
+
for (let t of ru) t.remove(e);
|
|
6206
|
+
}
|
|
6207
|
+
//#endregion
|
|
5983
6208
|
//#region src/components/blocks/scaffold/scaffold-context.ts
|
|
5984
|
-
var
|
|
5985
|
-
function
|
|
5986
|
-
let e = F.useContext(
|
|
6209
|
+
var Nu = F.createContext(null);
|
|
6210
|
+
function Pu() {
|
|
6211
|
+
let e = F.useContext(Nu);
|
|
5987
6212
|
if (!e) throw Error("useScaffoldContext must be used within <Scaffold.Root>");
|
|
5988
6213
|
return e;
|
|
5989
6214
|
}
|
|
5990
6215
|
//#endregion
|
|
5991
6216
|
//#region src/components/blocks/scaffold/scaffold-actions.tsx
|
|
5992
|
-
function
|
|
5993
|
-
let {
|
|
6217
|
+
function Fu({ onAdd: e, addLabel: t = "Panel", addIcon: n, sound: r = !0, className: o, children: s, ...c }) {
|
|
6218
|
+
let { scaffoldId: l, inspectorWidth: u } = Pu(), d = K(lu(l)), f = W(), p = f ? { duration: 0 } : _n;
|
|
5994
6219
|
return /* @__PURE__ */ i(U.div, {
|
|
5995
6220
|
id: "scaffold-actions",
|
|
5996
|
-
animate: { x:
|
|
6221
|
+
animate: { x: d ? -(u + 10) : 0 },
|
|
5997
6222
|
className: J("sticky inline-flex h-12 items-center gap-0.5", "justify-end", o),
|
|
5998
6223
|
"data-slot": "scaffold-actions",
|
|
5999
6224
|
initial: !1,
|
|
6000
6225
|
transition: {
|
|
6001
|
-
duration:
|
|
6002
|
-
ease:
|
|
6226
|
+
duration: f ? 0 : Rl,
|
|
6227
|
+
ease: zl
|
|
6003
6228
|
},
|
|
6004
6229
|
...c,
|
|
6005
6230
|
children: /* @__PURE__ */ i(U.div, {
|
|
6006
6231
|
layout: !0,
|
|
6007
|
-
transition:
|
|
6232
|
+
transition: p,
|
|
6008
6233
|
className: "flex items-center gap-1.5",
|
|
6009
6234
|
children: /* @__PURE__ */ a(H, {
|
|
6010
6235
|
mode: "popLayout",
|
|
6011
6236
|
initial: !1,
|
|
6012
6237
|
children: [e && /* @__PURE__ */ i(U.div, {
|
|
6013
6238
|
layout: !0,
|
|
6014
|
-
animate:
|
|
6239
|
+
animate: f ? { opacity: 1 } : "visible",
|
|
6015
6240
|
className: "flex shrink-0",
|
|
6016
|
-
exit:
|
|
6017
|
-
initial:
|
|
6018
|
-
transition:
|
|
6019
|
-
variants:
|
|
6241
|
+
exit: f ? { opacity: 0 } : "exit",
|
|
6242
|
+
initial: f ? { opacity: 0 } : "hidden",
|
|
6243
|
+
transition: p,
|
|
6244
|
+
variants: Gl,
|
|
6020
6245
|
children: /* @__PURE__ */ a(Y, {
|
|
6021
6246
|
onClick: e,
|
|
6022
6247
|
size: "sm",
|
|
@@ -6032,41 +6257,41 @@ function $l({ onAdd: e, addLabel: t = "Panel", addIcon: n, sound: r = !0, classN
|
|
|
6032
6257
|
}
|
|
6033
6258
|
//#endregion
|
|
6034
6259
|
//#region src/components/blocks/scaffold/scaffold-canvas.tsx
|
|
6035
|
-
function
|
|
6260
|
+
function Iu(e) {
|
|
6036
6261
|
if (!F.isValidElement(e)) return;
|
|
6037
6262
|
let t = e.props.id;
|
|
6038
6263
|
return typeof t == "string" ? t : void 0;
|
|
6039
6264
|
}
|
|
6040
|
-
function
|
|
6041
|
-
let {
|
|
6265
|
+
function Lu({ className: e, children: t, ...n }) {
|
|
6266
|
+
let { scaffoldId: r } = Pu(), a = K(_u(r)), o = q(Eu(r)), s = q(Du(r)), c = F.useRef(null);
|
|
6042
6267
|
F.useLayoutEffect(() => {
|
|
6043
|
-
let e =
|
|
6268
|
+
let e = c.current;
|
|
6044
6269
|
if (!e || typeof ResizeObserver > "u") return;
|
|
6045
|
-
let t = new ResizeObserver(([e]) =>
|
|
6270
|
+
let t = new ResizeObserver(([e]) => s(e.contentRect.width));
|
|
6046
6271
|
return t.observe(e), () => t.disconnect();
|
|
6047
|
-
}, [
|
|
6048
|
-
let
|
|
6272
|
+
}, [s]);
|
|
6273
|
+
let l = F.Children.toArray(t), u = l.map(Iu).filter((e) => e !== void 0), d = u.join(" ");
|
|
6049
6274
|
F.useLayoutEffect(() => {
|
|
6050
|
-
|
|
6051
|
-
}, [
|
|
6052
|
-
let
|
|
6053
|
-
let t =
|
|
6054
|
-
return t === void 0 || !
|
|
6275
|
+
o(u);
|
|
6276
|
+
}, [d, o]);
|
|
6277
|
+
let f = l.filter((e) => {
|
|
6278
|
+
let t = Iu(e);
|
|
6279
|
+
return t === void 0 || !a.includes(t);
|
|
6055
6280
|
});
|
|
6056
6281
|
return /* @__PURE__ */ i("div", {
|
|
6057
6282
|
className: J("relative flex min-h-0 w-full flex-1 gap-2", e),
|
|
6058
6283
|
"data-slot": "scaffold-canvas",
|
|
6059
|
-
ref:
|
|
6284
|
+
ref: c,
|
|
6060
6285
|
...n,
|
|
6061
6286
|
children: /* @__PURE__ */ i(H, {
|
|
6062
6287
|
initial: !1,
|
|
6063
|
-
children:
|
|
6288
|
+
children: f
|
|
6064
6289
|
})
|
|
6065
6290
|
});
|
|
6066
6291
|
}
|
|
6067
6292
|
//#endregion
|
|
6068
6293
|
//#region src/components/ui/glasscn/glass-container.tsx
|
|
6069
|
-
var
|
|
6294
|
+
var Ru = {
|
|
6070
6295
|
clear: [
|
|
6071
6296
|
"[--sidebar:rgba(255,255,255,0.18)]",
|
|
6072
6297
|
"[--sidebar-foreground:oklch(0.145_0_0)]",
|
|
@@ -6137,16 +6362,16 @@ var nu = {
|
|
|
6137
6362
|
"dark:[--sidebar-ring:rgba(255,255,255,0.18)]"
|
|
6138
6363
|
].join(" ")
|
|
6139
6364
|
};
|
|
6140
|
-
function
|
|
6141
|
-
return J(tt[e],
|
|
6365
|
+
function zu(e) {
|
|
6366
|
+
return J(tt[e], Ru[e], "overflow-hidden", "shadow-[0_24px_80px_rgba(15,23,42,0.08)] dark:shadow-[0_24px_80px_rgba(0,0,0,0.28)]");
|
|
6142
6367
|
}
|
|
6143
|
-
function
|
|
6368
|
+
function Bu({ glassVariant: e = "liquid-refract", className: t, children: n, ...r }) {
|
|
6144
6369
|
return /* @__PURE__ */ i(et, {
|
|
6145
6370
|
className: J("rounded-[1.75rem]", t),
|
|
6146
6371
|
blur: 5,
|
|
6147
6372
|
refraction: 50,
|
|
6148
6373
|
children: /* @__PURE__ */ i("div", {
|
|
6149
|
-
className: J(
|
|
6374
|
+
className: J(zu(e), e === "liquid-refract" && "border-0 bg-transparent shadow-none", t),
|
|
6150
6375
|
...r,
|
|
6151
6376
|
children: n
|
|
6152
6377
|
})
|
|
@@ -6154,25 +6379,25 @@ function iu({ glassVariant: e = "liquid-refract", className: t, children: n, ...
|
|
|
6154
6379
|
}
|
|
6155
6380
|
//#endregion
|
|
6156
6381
|
//#region src/components/blocks/scaffold/scaffold-inspector.tsx
|
|
6157
|
-
function
|
|
6158
|
-
let {
|
|
6382
|
+
function Vu({ children: e, name: t = "Inspector", className: n, ...r }) {
|
|
6383
|
+
let { scaffoldId: o, inspectorWidth: s } = Pu(), c = K(lu(o)), l = q(Cu(o)), u = W(), d = s + 10 + 12;
|
|
6159
6384
|
return /* @__PURE__ */ i(U.aside, {
|
|
6160
6385
|
id: "scaffold-inspector",
|
|
6161
|
-
animate: { x:
|
|
6162
|
-
"aria-hidden": !
|
|
6386
|
+
animate: { x: c ? 0 : d },
|
|
6387
|
+
"aria-hidden": !c || void 0,
|
|
6163
6388
|
"aria-label": t,
|
|
6164
|
-
className: J("absolute right-0 z-20 my-2 flex h-full max-h-[calc(100%-0.5rem)] w-96 flex-col", !
|
|
6389
|
+
className: J("absolute right-0 z-20 my-2 flex h-full max-h-[calc(100%-0.5rem)] w-96 flex-col", !c && "pointer-events-none", n),
|
|
6165
6390
|
"data-slot": "scaffold-inspector",
|
|
6166
|
-
inert: !
|
|
6391
|
+
inert: !c || void 0,
|
|
6167
6392
|
initial: !1,
|
|
6168
6393
|
role: "complementary",
|
|
6169
6394
|
style: { width: s },
|
|
6170
6395
|
transition: {
|
|
6171
|
-
duration:
|
|
6172
|
-
ease:
|
|
6396
|
+
duration: u ? 0 : Rl,
|
|
6397
|
+
ease: zl
|
|
6173
6398
|
},
|
|
6174
6399
|
...r,
|
|
6175
|
-
children: /* @__PURE__ */ a(
|
|
6400
|
+
children: /* @__PURE__ */ a(Bu, {
|
|
6176
6401
|
className: "flex flex-1 flex-col rounded-md border-t border-white bg-neutral-50/20 shadow-inner shadow-lg dark:border-neutral-800 dark:bg-black/5",
|
|
6177
6402
|
glassVariant: "subtle",
|
|
6178
6403
|
children: [/* @__PURE__ */ a("div", {
|
|
@@ -6187,7 +6412,7 @@ function au({ children: e, name: t = "Inspector", className: n, ...r }) {
|
|
|
6187
6412
|
glassVariant: "subtle",
|
|
6188
6413
|
className: "scale-85",
|
|
6189
6414
|
"aria-label": "Close inspector",
|
|
6190
|
-
onClick:
|
|
6415
|
+
onClick: l,
|
|
6191
6416
|
children: /* @__PURE__ */ i(j, { className: "stroke-3" })
|
|
6192
6417
|
})]
|
|
6193
6418
|
}), e]
|
|
@@ -6196,7 +6421,7 @@ function au({ children: e, name: t = "Inspector", className: n, ...r }) {
|
|
|
6196
6421
|
}
|
|
6197
6422
|
//#endregion
|
|
6198
6423
|
//#region src/components/blocks/scaffold/scaffold-main.tsx
|
|
6199
|
-
function
|
|
6424
|
+
function Hu({ className: e, children: t, ...n }) {
|
|
6200
6425
|
return /* @__PURE__ */ i("div", {
|
|
6201
6426
|
id: "scaffold-main",
|
|
6202
6427
|
className: J("relative flex min-w-0 flex-1 flex-col", e),
|
|
@@ -6207,7 +6432,7 @@ function ou({ className: e, children: t, ...n }) {
|
|
|
6207
6432
|
}
|
|
6208
6433
|
//#endregion
|
|
6209
6434
|
//#region src/components/blocks/scaffold/scaffold-sub-panel.tsx
|
|
6210
|
-
function
|
|
6435
|
+
function Uu({ className: e, children: t, variant: n = "card", primary: r = !1, expanded: a, ...o }) {
|
|
6211
6436
|
let s = Ue(), c = a ?? r;
|
|
6212
6437
|
return /* @__PURE__ */ i(He.div, {
|
|
6213
6438
|
layout: "size",
|
|
@@ -6215,10 +6440,10 @@ function su({ className: e, children: t, variant: n = "card", primary: r = !1, e
|
|
|
6215
6440
|
initial: !1,
|
|
6216
6441
|
animate: { flexGrow: +!!c },
|
|
6217
6442
|
transition: s ? { duration: 0 } : {
|
|
6218
|
-
duration:
|
|
6219
|
-
ease:
|
|
6443
|
+
duration: Rl,
|
|
6444
|
+
ease: zl
|
|
6220
6445
|
},
|
|
6221
|
-
className: J("flex w-full flex-col",
|
|
6446
|
+
className: J("flex w-full flex-col", Kl[n], r ? "basis-14 min-h-14 overflow-clip" : "basis-auto min-h-14", e),
|
|
6222
6447
|
"data-slot": `scaffold-sub-panel-${n}`,
|
|
6223
6448
|
"data-expanded": c ? "" : void 0,
|
|
6224
6449
|
...o,
|
|
@@ -6227,10 +6452,10 @@ function su({ className: e, children: t, variant: n = "card", primary: r = !1, e
|
|
|
6227
6452
|
}
|
|
6228
6453
|
//#endregion
|
|
6229
6454
|
//#region src/components/blocks/scaffold/scaffold-panel.tsx
|
|
6230
|
-
function
|
|
6231
|
-
let {
|
|
6232
|
-
duration: f ? 0 :
|
|
6233
|
-
ease:
|
|
6455
|
+
function Wu({ id: e, children: t, SecondaryPanel: n, onSwap: r, onCloseSecondary: o, name: s, swapLabel: c = "Swap panel content", sound: l = !0, className: u }) {
|
|
6456
|
+
let { scaffoldId: d } = Pu(), f = W(), p = K(yu(d, e ?? "")), m = {
|
|
6457
|
+
duration: f ? 0 : Rl,
|
|
6458
|
+
ease: zl
|
|
6234
6459
|
}, [h, g] = B("top"), [_, v] = B(!1), y = () => {
|
|
6235
6460
|
v((e) => !e), r?.();
|
|
6236
6461
|
}, b = () => {
|
|
@@ -6261,7 +6486,7 @@ function cu({ id: e, children: t, SecondaryPanel: n, onSwap: r, onCloseSecondary
|
|
|
6261
6486
|
"data-swapped": _ ? "" : void 0,
|
|
6262
6487
|
transition: m,
|
|
6263
6488
|
children: [
|
|
6264
|
-
/* @__PURE__ */ i(
|
|
6489
|
+
/* @__PURE__ */ i(Uu, {
|
|
6265
6490
|
id: "top",
|
|
6266
6491
|
expanded: h === "top",
|
|
6267
6492
|
primary: !0,
|
|
@@ -6269,7 +6494,7 @@ function cu({ id: e, children: t, SecondaryPanel: n, onSwap: r, onCloseSecondary
|
|
|
6269
6494
|
}),
|
|
6270
6495
|
(r || o) && n && /* @__PURE__ */ i("div", {
|
|
6271
6496
|
className: "relative flex h-2 items-center justify-center",
|
|
6272
|
-
children: /* @__PURE__ */ i(
|
|
6497
|
+
children: /* @__PURE__ */ i($l, {
|
|
6273
6498
|
label: c,
|
|
6274
6499
|
onClick: y,
|
|
6275
6500
|
onExpand: b,
|
|
@@ -6279,7 +6504,7 @@ function cu({ id: e, children: t, SecondaryPanel: n, onSwap: r, onCloseSecondary
|
|
|
6279
6504
|
sound: l
|
|
6280
6505
|
})
|
|
6281
6506
|
}),
|
|
6282
|
-
n && /* @__PURE__ */ i(
|
|
6507
|
+
n && /* @__PURE__ */ i(Uu, {
|
|
6283
6508
|
id: "bottom",
|
|
6284
6509
|
expanded: h === "bottom",
|
|
6285
6510
|
children: n
|
|
@@ -6288,103 +6513,40 @@ function cu({ id: e, children: t, SecondaryPanel: n, onSwap: r, onCloseSecondary
|
|
|
6288
6513
|
});
|
|
6289
6514
|
}
|
|
6290
6515
|
//#endregion
|
|
6291
|
-
//#region src/components/blocks/scaffold/use-panel-visibility.ts
|
|
6292
|
-
var lu = {
|
|
6293
|
-
visibleOrder: [],
|
|
6294
|
-
autoHidden: [],
|
|
6295
|
-
userHidden: []
|
|
6296
|
-
};
|
|
6297
|
-
function uu(e, t, n) {
|
|
6298
|
-
let r = new Set(t), i = e.visibleOrder.filter((e) => r.has(e)), a = e.autoHidden.filter((e) => r.has(e)), o = e.userHidden.filter((e) => r.has(e)), s = /* @__PURE__ */ new Set([
|
|
6299
|
-
...i,
|
|
6300
|
-
...a,
|
|
6301
|
-
...o
|
|
6302
|
-
]);
|
|
6303
|
-
for (let e of t) s.has(e) || i.push(e);
|
|
6304
|
-
for (; i.length > n && i.length > 1;) a.push(i.shift());
|
|
6305
|
-
for (; i.length < n && a.length > 0;) i.push(a.pop());
|
|
6306
|
-
return i.join(" ") === e.visibleOrder.join(" ") && a.join(" ") === e.autoHidden.join(" ") && o.join(" ") === e.userHidden.join(" ") ? e : {
|
|
6307
|
-
visibleOrder: i,
|
|
6308
|
-
autoHidden: a,
|
|
6309
|
-
userHidden: o
|
|
6310
|
-
};
|
|
6311
|
-
}
|
|
6312
|
-
function du() {
|
|
6313
|
-
let [e, t] = F.useState([]), [n, r] = F.useState(null), [i, a] = F.useState(lu), [o, s] = F.useState(null), c = n ?? 3, l = F.useCallback((e) => {
|
|
6314
|
-
t((t) => t.length === e.length && t.every((t, n) => t === e[n]) ? t : [...e]);
|
|
6315
|
-
}, []), u = F.useCallback((e) => {
|
|
6316
|
-
r(zl(e));
|
|
6317
|
-
}, []), d = uu(i, e, c);
|
|
6318
|
-
d !== i && a(d);
|
|
6319
|
-
let f = F.useCallback((t) => {
|
|
6320
|
-
a((n) => {
|
|
6321
|
-
if (!e.includes(t)) return n;
|
|
6322
|
-
let r = n.autoHidden.includes(t) || n.userHidden.includes(t);
|
|
6323
|
-
return !r && n.visibleOrder.length <= 1 ? n : uu(r ? {
|
|
6324
|
-
visibleOrder: [...n.visibleOrder, t],
|
|
6325
|
-
autoHidden: n.autoHidden.filter((e) => e !== t),
|
|
6326
|
-
userHidden: n.userHidden.filter((e) => e !== t)
|
|
6327
|
-
} : {
|
|
6328
|
-
visibleOrder: n.visibleOrder.filter((e) => e !== t),
|
|
6329
|
-
autoHidden: n.autoHidden,
|
|
6330
|
-
userHidden: [...n.userHidden, t]
|
|
6331
|
-
}, e, c);
|
|
6332
|
-
});
|
|
6333
|
-
}, [e, c]), p = F.useCallback((e, t) => {
|
|
6334
|
-
s((n) => t ? e : n === e ? null : n);
|
|
6335
|
-
}, []), m = F.useMemo(() => [...d.autoHidden, ...d.userHidden], [d]), h = F.useCallback((e) => m.includes(e), [m]);
|
|
6336
|
-
return F.useMemo(() => ({
|
|
6337
|
-
panelCapacity: c,
|
|
6338
|
-
hiddenPanelIds: m,
|
|
6339
|
-
isPanelHidden: h,
|
|
6340
|
-
togglePanelVisibility: f,
|
|
6341
|
-
hoveredPanelId: o,
|
|
6342
|
-
setPanelHovered: p,
|
|
6343
|
-
registerPanelIds: l,
|
|
6344
|
-
setCanvasWidth: u
|
|
6345
|
-
}), [
|
|
6346
|
-
c,
|
|
6347
|
-
m,
|
|
6348
|
-
h,
|
|
6349
|
-
f,
|
|
6350
|
-
o,
|
|
6351
|
-
p,
|
|
6352
|
-
l,
|
|
6353
|
-
u
|
|
6354
|
-
]);
|
|
6355
|
-
}
|
|
6356
|
-
//#endregion
|
|
6357
6516
|
//#region src/components/blocks/scaffold/scaffold-root.tsx
|
|
6358
|
-
function
|
|
6359
|
-
let
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
u,
|
|
6369
|
-
r,
|
|
6370
|
-
d,
|
|
6517
|
+
function Gu({ scaffoldId: e, inspectorOpen: t, defaultInspectorOpen: n, onInspectorOpenChange: r, inspectorWidth: a = 272, className: o, children: s, ...c }) {
|
|
6518
|
+
let l = F.useId(), u = e ?? l, d = t !== void 0, f = F.useMemo(() => ({ controlsInspector: d }), [d]), p = F.useMemo(() => ({ onInspectorOpenChange: r }), [r]), m = q(Ou(u)), h = q(ku(u)), g = q(Au(u)), [_] = F.useState(() => t ?? n ?? !1);
|
|
6519
|
+
F.useLayoutEffect(() => {
|
|
6520
|
+
d || g(_);
|
|
6521
|
+
}, []), F.useLayoutEffect(() => {
|
|
6522
|
+
h(p);
|
|
6523
|
+
}, [h, p]), F.useLayoutEffect(() => {
|
|
6524
|
+
m(f, t);
|
|
6525
|
+
}, [
|
|
6526
|
+
m,
|
|
6371
6527
|
f,
|
|
6372
|
-
|
|
6373
|
-
])
|
|
6374
|
-
|
|
6375
|
-
|
|
6528
|
+
t
|
|
6529
|
+
]), F.useEffect(() => {
|
|
6530
|
+
if (e === void 0) return () => Mu(u);
|
|
6531
|
+
}, [e, u]);
|
|
6532
|
+
let v = F.useMemo(() => ({
|
|
6533
|
+
scaffoldId: u,
|
|
6534
|
+
inspectorWidth: a
|
|
6535
|
+
}), [u, a]);
|
|
6536
|
+
return /* @__PURE__ */ i(Nu.Provider, {
|
|
6537
|
+
value: v,
|
|
6376
6538
|
children: /* @__PURE__ */ i("div", {
|
|
6377
6539
|
id: "scaffold-root",
|
|
6378
|
-
className: J("relative isolate flex size-full flex-1 overflow-clip pr-2 pb-2", "bg-linear-to-tr/increasing from-neutral-200 via-neutral-100 to-stone-200 dark:from-neutral-900 dark:via-neutral-950 dark:to-stone-950",
|
|
6540
|
+
className: J("relative isolate flex size-full flex-1 overflow-clip pr-2 pb-2", "bg-linear-to-tr/increasing from-neutral-200 via-neutral-100 to-stone-200 dark:from-neutral-900 dark:via-neutral-950 dark:to-stone-950", o),
|
|
6379
6541
|
"data-slot": "scaffold",
|
|
6380
|
-
...
|
|
6381
|
-
children:
|
|
6542
|
+
...c,
|
|
6543
|
+
children: s
|
|
6382
6544
|
})
|
|
6383
6545
|
});
|
|
6384
6546
|
}
|
|
6385
6547
|
//#endregion
|
|
6386
6548
|
//#region src/components/blocks/scaffold/scaffold-sidebar.tsx
|
|
6387
|
-
function
|
|
6549
|
+
function Ku({ className: e, children: t, ...n }) {
|
|
6388
6550
|
return /* @__PURE__ */ i("nav", {
|
|
6389
6551
|
id: "scaffold-sidebar",
|
|
6390
6552
|
"aria-label": "Primary",
|
|
@@ -6396,41 +6558,41 @@ function pu({ className: e, children: t, ...n }) {
|
|
|
6396
6558
|
}
|
|
6397
6559
|
//#endregion
|
|
6398
6560
|
//#region src/components/blocks/scaffold/scaffold-tab.tsx
|
|
6399
|
-
function
|
|
6400
|
-
let {
|
|
6561
|
+
function qu({ children: e, panelId: t, onClose: n, closeLabel: r = "Close panel", sound: o = !0, className: s, ...c }) {
|
|
6562
|
+
let { scaffoldId: l } = Pu(), u = K(vu(l, t ?? "")), d = q(wu(l)), f = q(Tu(l)), p = W(), m = p ? { duration: 0 } : _n;
|
|
6401
6563
|
return F.useEffect(() => {
|
|
6402
|
-
if (t !== void 0) return () =>
|
|
6403
|
-
}, [t,
|
|
6564
|
+
if (t !== void 0) return () => f(t, !1);
|
|
6565
|
+
}, [t, f]), /* @__PURE__ */ a(Xl, {
|
|
6404
6566
|
layout: !0,
|
|
6405
|
-
animate:
|
|
6567
|
+
animate: p ? {
|
|
6406
6568
|
opacity: 1,
|
|
6407
6569
|
width: "auto"
|
|
6408
6570
|
} : "visible",
|
|
6409
6571
|
"data-slot": "scaffold-tab",
|
|
6410
|
-
"data-panel-hidden":
|
|
6411
|
-
onPointerEnter: t === void 0 ? void 0 : () =>
|
|
6412
|
-
onPointerLeave: t === void 0 ? void 0 : () =>
|
|
6413
|
-
exit:
|
|
6572
|
+
"data-panel-hidden": u ? "" : void 0,
|
|
6573
|
+
onPointerEnter: t === void 0 ? void 0 : () => f(t, !0),
|
|
6574
|
+
onPointerLeave: t === void 0 ? void 0 : () => f(t, !1),
|
|
6575
|
+
exit: p ? {
|
|
6414
6576
|
opacity: 0,
|
|
6415
6577
|
width: 0
|
|
6416
6578
|
} : "exit",
|
|
6417
|
-
initial:
|
|
6579
|
+
initial: p ? {
|
|
6418
6580
|
opacity: 0,
|
|
6419
6581
|
width: 0
|
|
6420
6582
|
} : "hidden",
|
|
6421
|
-
transition:
|
|
6422
|
-
variants:
|
|
6583
|
+
transition: m,
|
|
6584
|
+
variants: Gl,
|
|
6423
6585
|
glassVariant: "subtle",
|
|
6424
6586
|
className: J("h-full rounded-sm", s),
|
|
6425
6587
|
...c,
|
|
6426
6588
|
children: [/* @__PURE__ */ a(Y, {
|
|
6427
|
-
"aria-pressed": t === void 0 ? void 0 : !
|
|
6428
|
-
onClick: t === void 0 ? void 0 : () =>
|
|
6589
|
+
"aria-pressed": t === void 0 ? void 0 : !u,
|
|
6590
|
+
onClick: t === void 0 ? void 0 : () => d(t),
|
|
6429
6591
|
size: "sm",
|
|
6430
6592
|
sound: o,
|
|
6431
6593
|
variant: "ghost",
|
|
6432
|
-
className: J("gap-2.5 rounded-sm pl-2", n && "pr-2",
|
|
6433
|
-
children: [i(
|
|
6594
|
+
className: J("gap-2.5 rounded-sm pl-2", n && "pr-2", u && "text-muted-foreground/70"),
|
|
6595
|
+
children: [i(u ? k : w, { size: 16 }), e]
|
|
6434
6596
|
}), n && /* @__PURE__ */ i(Y, {
|
|
6435
6597
|
"aria-label": r,
|
|
6436
6598
|
onClick: n,
|
|
@@ -6444,105 +6606,130 @@ function mu({ children: e, panelId: t, onClose: n, closeLabel: r = "Close panel"
|
|
|
6444
6606
|
}
|
|
6445
6607
|
//#endregion
|
|
6446
6608
|
//#region src/components/blocks/scaffold/use-scaffold.ts
|
|
6447
|
-
function
|
|
6448
|
-
let
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6609
|
+
function Ju({ scaffoldId: e, defaultInspectorOpen: t, onInspectorChange: n } = {}) {
|
|
6610
|
+
let r = pe(), i = e ?? r, a = K(lu(i)), o = q(Su(i)), s = q(Cu(i));
|
|
6611
|
+
return L(() => {
|
|
6612
|
+
if (e === void 0) return () => Mu(i);
|
|
6613
|
+
}, [e, i]), {
|
|
6614
|
+
scaffoldId: i,
|
|
6615
|
+
inspectorOpen: a,
|
|
6616
|
+
setInspectorOpen: o,
|
|
6617
|
+
toggleInspector: s,
|
|
6455
6618
|
providerProps: R(() => ({
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6619
|
+
scaffoldId: i,
|
|
6620
|
+
defaultInspectorOpen: t,
|
|
6621
|
+
onInspectorOpenChange: n
|
|
6622
|
+
}), [
|
|
6623
|
+
i,
|
|
6624
|
+
t,
|
|
6625
|
+
n
|
|
6626
|
+
])
|
|
6459
6627
|
};
|
|
6460
6628
|
}
|
|
6461
6629
|
//#endregion
|
|
6630
|
+
//#region src/components/blocks/scaffold/use-scaffold-state.ts
|
|
6631
|
+
function Yu(e) {
|
|
6632
|
+
return K(bu(e));
|
|
6633
|
+
}
|
|
6634
|
+
function Xu(e) {
|
|
6635
|
+
let t = q(Su(e)), n = q(Cu(e)), r = q(wu(e)), i = q(ju(e));
|
|
6636
|
+
return R(() => ({
|
|
6637
|
+
setInspectorOpen: t,
|
|
6638
|
+
toggleInspector: n,
|
|
6639
|
+
togglePanel: r,
|
|
6640
|
+
reset: i
|
|
6641
|
+
}), [
|
|
6642
|
+
t,
|
|
6643
|
+
n,
|
|
6644
|
+
r,
|
|
6645
|
+
i
|
|
6646
|
+
]);
|
|
6647
|
+
}
|
|
6648
|
+
//#endregion
|
|
6462
6649
|
//#region src/components/blocks/scaffold/index.ts
|
|
6463
|
-
var
|
|
6464
|
-
Root:
|
|
6465
|
-
Sidebar:
|
|
6466
|
-
Main:
|
|
6467
|
-
Actions:
|
|
6468
|
-
Canvas:
|
|
6469
|
-
Panel:
|
|
6470
|
-
Tab:
|
|
6471
|
-
Inspector:
|
|
6472
|
-
SubPanel:
|
|
6473
|
-
},
|
|
6474
|
-
Main:
|
|
6475
|
-
Panel:
|
|
6476
|
-
Trigger:
|
|
6477
|
-
},
|
|
6650
|
+
var Zu = {
|
|
6651
|
+
Root: Gu,
|
|
6652
|
+
Sidebar: Ku,
|
|
6653
|
+
Main: Hu,
|
|
6654
|
+
Actions: Fu,
|
|
6655
|
+
Canvas: Lu,
|
|
6656
|
+
Panel: Wu,
|
|
6657
|
+
Tab: qu,
|
|
6658
|
+
Inspector: Vu,
|
|
6659
|
+
SubPanel: Uu
|
|
6660
|
+
}, Qu = {
|
|
6661
|
+
Main: wl,
|
|
6662
|
+
Panel: Gc,
|
|
6663
|
+
Trigger: Sl
|
|
6664
|
+
}, $u = {
|
|
6478
6665
|
controlsVariant: !1,
|
|
6479
6666
|
controlsMenuOpen: !1
|
|
6480
|
-
},
|
|
6481
|
-
function
|
|
6667
|
+
}, ed = {}, td = [];
|
|
6668
|
+
function nd(e) {
|
|
6482
6669
|
let t = /* @__PURE__ */ new Map(), n = ((n) => {
|
|
6483
6670
|
let r = t.get(n);
|
|
6484
6671
|
return r === void 0 && (r = e(n), t.set(n, r)), r;
|
|
6485
6672
|
});
|
|
6486
6673
|
return n.remove = (e) => {
|
|
6487
6674
|
t.delete(e);
|
|
6488
|
-
},
|
|
6675
|
+
}, td.push(n), n;
|
|
6489
6676
|
}
|
|
6490
|
-
function
|
|
6491
|
-
return
|
|
6677
|
+
function rd(e, t) {
|
|
6678
|
+
return nd((n) => {
|
|
6492
6679
|
let r = G(t);
|
|
6493
6680
|
return r.debugLabel = `profileCard/${n}/${e}`, r;
|
|
6494
6681
|
});
|
|
6495
6682
|
}
|
|
6496
|
-
function
|
|
6497
|
-
return
|
|
6683
|
+
function id(e, t) {
|
|
6684
|
+
return nd((n) => {
|
|
6498
6685
|
let r = G((e) => t(e, n));
|
|
6499
6686
|
return r.debugLabel = `profileCard/${n}/${e}`, r;
|
|
6500
6687
|
});
|
|
6501
6688
|
}
|
|
6502
|
-
function
|
|
6503
|
-
return
|
|
6689
|
+
function ad(e, t) {
|
|
6690
|
+
return nd((n) => {
|
|
6504
6691
|
let r = G(null, (e, r, ...i) => t(e, r, n, ...i));
|
|
6505
6692
|
return r.debugLabel = `profileCard/${n}/${e}`, r;
|
|
6506
6693
|
});
|
|
6507
6694
|
}
|
|
6508
|
-
var
|
|
6509
|
-
variant: e(
|
|
6510
|
-
menuOpen: e(
|
|
6511
|
-
pendingActionId: e(
|
|
6512
|
-
busy: e(
|
|
6513
|
-
})),
|
|
6514
|
-
e(
|
|
6515
|
-
}),
|
|
6516
|
-
t(
|
|
6517
|
-
}),
|
|
6518
|
-
e(
|
|
6519
|
-
}),
|
|
6695
|
+
var od = rd("variant", "expanded"), sd = rd("menuOpen", !1), cd = rd("pendingActionId", null), ld = rd("config", $u), ud = rd("handlers", ed), dd = id("collapsed", (e, t) => e(od(t)) === "collapsed"), fd = id("busy", (e, t) => e(cd(t)) !== null), pd = id("state", (e, t) => ({
|
|
6696
|
+
variant: e(od(t)),
|
|
6697
|
+
menuOpen: e(sd(t)),
|
|
6698
|
+
pendingActionId: e(cd(t)),
|
|
6699
|
+
busy: e(fd(t))
|
|
6700
|
+
})), md = ad("setVariant", (e, t, n, r) => {
|
|
6701
|
+
e(od(n)) !== r && (e(ld(n)).controlsVariant || t(od(n), r), e(ud(n)).onVariantChange?.(r));
|
|
6702
|
+
}), hd = ad("toggleVariant", (e, t, n) => {
|
|
6703
|
+
t(md(n), e(od(n)) === "collapsed" ? "expanded" : "collapsed");
|
|
6704
|
+
}), gd = ad("setMenuOpen", (e, t, n, r) => {
|
|
6705
|
+
e(ld(n)).controlsMenuOpen || t(sd(n), r);
|
|
6706
|
+
}), _d = ad("selectAction", (e, t, n, r) => {
|
|
6520
6707
|
let i = r.onSelect?.();
|
|
6521
|
-
i instanceof Promise && (t(
|
|
6522
|
-
e(
|
|
6708
|
+
i instanceof Promise && (t(cd(n), r.id), i.catch((t) => e(ud(n)).onError?.(t)).finally(() => {
|
|
6709
|
+
e(cd(n)) === r.id && t(cd(n), null);
|
|
6523
6710
|
}));
|
|
6524
|
-
}),
|
|
6525
|
-
t(
|
|
6526
|
-
}),
|
|
6527
|
-
t(
|
|
6528
|
-
}),
|
|
6529
|
-
t(
|
|
6530
|
-
}),
|
|
6531
|
-
t(
|
|
6711
|
+
}), vd = ad("projectProps", (e, t, n, r, i, a) => {
|
|
6712
|
+
t(ld(n), r), r.controlsVariant && i !== void 0 && t(od(n), i), r.controlsMenuOpen && a !== void 0 && t(sd(n), a);
|
|
6713
|
+
}), yd = ad("setHandlers", (e, t, n, r) => {
|
|
6714
|
+
t(ud(n), r);
|
|
6715
|
+
}), bd = ad("seedVariant", (e, t, n, r) => {
|
|
6716
|
+
t(od(n), r);
|
|
6717
|
+
}), xd = ad("reset", (e, t, n) => {
|
|
6718
|
+
t(od(n), "expanded"), t(sd(n), !1), t(cd(n), null), t(ld(n), $u), t(ud(n), ed);
|
|
6532
6719
|
});
|
|
6533
|
-
function
|
|
6534
|
-
for (let t of
|
|
6720
|
+
function Sd(e) {
|
|
6721
|
+
for (let t of td) t.remove(e);
|
|
6535
6722
|
}
|
|
6536
6723
|
//#endregion
|
|
6537
6724
|
//#region src/components/blocks/profile/use-profile-card.ts
|
|
6538
|
-
function
|
|
6725
|
+
function Cd(e) {
|
|
6539
6726
|
let { variant: t, defaultVariant: n = "expanded", onVariantChange: r, open: i, onError: a } = e, o = F.useId(), s = e.profileCardId ?? o, c = t !== void 0, l = i !== void 0, u = F.useMemo(() => ({
|
|
6540
6727
|
controlsVariant: c,
|
|
6541
6728
|
controlsMenuOpen: l
|
|
6542
6729
|
}), [c, l]), d = F.useMemo(() => ({
|
|
6543
6730
|
onVariantChange: r,
|
|
6544
6731
|
onError: a
|
|
6545
|
-
}), [r, a]), f = q(
|
|
6732
|
+
}), [r, a]), f = q(vd(s)), p = q(yd(s)), m = q(bd(s)), h = q(gd(s)), g = q(_d(s)), [_] = F.useState(() => ({
|
|
6546
6733
|
variant: t ?? n,
|
|
6547
6734
|
open: i ?? e.defaultOpen ?? !1
|
|
6548
6735
|
}));
|
|
@@ -6558,9 +6745,9 @@ function Hu(e) {
|
|
|
6558
6745
|
]), F.useLayoutEffect(() => {
|
|
6559
6746
|
p(d);
|
|
6560
6747
|
}, [p, d]), F.useEffect(() => {
|
|
6561
|
-
if (e.profileCardId === void 0) return () =>
|
|
6748
|
+
if (e.profileCardId === void 0) return () => Sd(s);
|
|
6562
6749
|
}, [e.profileCardId, s]);
|
|
6563
|
-
let v = K(
|
|
6750
|
+
let v = K(od(s)), y = K(sd(s)), b = K(fd(s));
|
|
6564
6751
|
return {
|
|
6565
6752
|
profileCardId: s,
|
|
6566
6753
|
variant: v,
|
|
@@ -6573,7 +6760,7 @@ function Hu(e) {
|
|
|
6573
6760
|
}
|
|
6574
6761
|
//#endregion
|
|
6575
6762
|
//#region src/components/blocks/profile/profile-card-block.tsx
|
|
6576
|
-
var
|
|
6763
|
+
var wd = [
|
|
6577
6764
|
{
|
|
6578
6765
|
type: "label",
|
|
6579
6766
|
label: "Management"
|
|
@@ -6607,13 +6794,13 @@ var Uu = [
|
|
|
6607
6794
|
variant: "destructive"
|
|
6608
6795
|
}
|
|
6609
6796
|
];
|
|
6610
|
-
function
|
|
6797
|
+
function Td(e) {
|
|
6611
6798
|
let t = [], n = { actions: [] };
|
|
6612
6799
|
for (let r of e) r.type === "separator" ? (t.push(n), n = { actions: [] }) : r.type === "label" ? n.label = r.label : n.actions.push(r);
|
|
6613
6800
|
return t.push(n), t.filter((e) => e.actions.length > 0 || e.label !== void 0);
|
|
6614
6801
|
}
|
|
6615
|
-
function
|
|
6616
|
-
let x = F.useMemo(() =>
|
|
6802
|
+
function Ed({ user: e, items: t = wd, align: n = "center", side: r = "bottom", sideOffset: o = 8, menuWidth: s = "content", variant: c, defaultVariant: l, onVariantChange: u, profileCardId: d, presence: f, avatarId: p, open: h, defaultOpen: g, onOpenChange: _, sound: v = !0, onError: y, className: b }) {
|
|
6803
|
+
let x = F.useMemo(() => Td(t), [t]), S = F.useContext(Ic), { collapsed: C, busy: w, menuOpen: T, setMenuOpen: E, select: D } = Cd({
|
|
6617
6804
|
profileCardId: d,
|
|
6618
6805
|
variant: c ?? (S ? S.collapsed ? "collapsed" : "expanded" : void 0),
|
|
6619
6806
|
defaultVariant: l,
|
|
@@ -6658,7 +6845,7 @@ function Gu({ user: e, items: t = Uu, align: n = "center", side: r = "bottom", s
|
|
|
6658
6845
|
className: J("flex min-w-0 flex-col overflow-hidden text-left whitespace-nowrap", C && "pointer-events-none"),
|
|
6659
6846
|
"data-slot": "profile-card-identity",
|
|
6660
6847
|
initial: !1,
|
|
6661
|
-
transition: O ?
|
|
6848
|
+
transition: O ? Tc : C ? Cc : Sc,
|
|
6662
6849
|
children: [/* @__PURE__ */ i("span", {
|
|
6663
6850
|
className: "truncate font-medium",
|
|
6664
6851
|
children: e.name
|
|
@@ -6676,7 +6863,7 @@ function Gu({ user: e, items: t = Uu, align: n = "center", side: r = "bottom", s
|
|
|
6676
6863
|
"aria-hidden": "true",
|
|
6677
6864
|
className: J("flex shrink-0 items-center overflow-hidden", C && "-ml-2"),
|
|
6678
6865
|
initial: !1,
|
|
6679
|
-
transition: O ?
|
|
6866
|
+
transition: O ? Tc : C ? Cc : Sc,
|
|
6680
6867
|
children: /* @__PURE__ */ i(m, {
|
|
6681
6868
|
"aria-hidden": "true",
|
|
6682
6869
|
className: "size-3.5"
|
|
@@ -6703,11 +6890,11 @@ function Gu({ user: e, items: t = Uu, align: n = "center", side: r = "bottom", s
|
|
|
6703
6890
|
}
|
|
6704
6891
|
//#endregion
|
|
6705
6892
|
//#region src/components/blocks/profile/use-profile-card-state.ts
|
|
6706
|
-
function
|
|
6707
|
-
return K(
|
|
6893
|
+
function Dd(e) {
|
|
6894
|
+
return K(pd(e));
|
|
6708
6895
|
}
|
|
6709
|
-
function
|
|
6710
|
-
let t = q(
|
|
6896
|
+
function Od(e) {
|
|
6897
|
+
let t = q(md(e)), n = q(hd(e)), r = q(gd(e)), i = q(xd(e));
|
|
6711
6898
|
return F.useMemo(() => ({
|
|
6712
6899
|
setVariant: t,
|
|
6713
6900
|
toggleVariant: n,
|
|
@@ -6726,7 +6913,7 @@ function qu(e) {
|
|
|
6726
6913
|
}
|
|
6727
6914
|
//#endregion
|
|
6728
6915
|
//#region src/components/motion/shared-layout-bg.tsx
|
|
6729
|
-
var
|
|
6916
|
+
var kd = {
|
|
6730
6917
|
initial: {
|
|
6731
6918
|
opacity: 0,
|
|
6732
6919
|
filter: "blur(6px)"
|
|
@@ -6739,11 +6926,11 @@ var Ju = {
|
|
|
6739
6926
|
opacity: 0,
|
|
6740
6927
|
filter: "blur(6px)"
|
|
6741
6928
|
}
|
|
6742
|
-
},
|
|
6929
|
+
}, Ad = {
|
|
6743
6930
|
initial: { opacity: 0 },
|
|
6744
6931
|
animate: { opacity: 1 },
|
|
6745
6932
|
exit: (e) => e ? {} : { opacity: 0 }
|
|
6746
|
-
},
|
|
6933
|
+
}, jd = le(function({ children: e, as: t = "div", className: n, onMouseLeave: o, pillClassName: s, pillContainerClassName: c, inset: l = 20, ...u }, d) {
|
|
6747
6934
|
let [f, p] = B(null), m = pe(), h = W(), g = oe.toArray(e).filter(ue).map((e, t) => {
|
|
6748
6935
|
let n = e, o = n.key ? String(n.key) : `item-${t}`;
|
|
6749
6936
|
return se(n, {
|
|
@@ -6755,7 +6942,7 @@ var Ju = {
|
|
|
6755
6942
|
}, /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(H, {
|
|
6756
6943
|
custom: f !== null,
|
|
6757
6944
|
children: f === null ? null : /* @__PURE__ */ i(U.div, {
|
|
6758
|
-
variants: h ?
|
|
6945
|
+
variants: h ? Ad : kd,
|
|
6759
6946
|
initial: "initial",
|
|
6760
6947
|
animate: "animate",
|
|
6761
6948
|
exit: "exit",
|
|
@@ -6786,18 +6973,18 @@ var Ju = {
|
|
|
6786
6973
|
className: J("flex w-full flex-col", n),
|
|
6787
6974
|
children: g
|
|
6788
6975
|
});
|
|
6789
|
-
}),
|
|
6976
|
+
}), Md = "(prefers-color-scheme: dark)", Nd = [
|
|
6790
6977
|
"dark",
|
|
6791
6978
|
"light",
|
|
6792
6979
|
"system"
|
|
6793
|
-
],
|
|
6794
|
-
function
|
|
6795
|
-
return e !== null &&
|
|
6980
|
+
], Pd = F.createContext(void 0);
|
|
6981
|
+
function Fd(e) {
|
|
6982
|
+
return e !== null && Nd.includes(e);
|
|
6796
6983
|
}
|
|
6797
|
-
function
|
|
6798
|
-
return window.matchMedia(
|
|
6984
|
+
function Id() {
|
|
6985
|
+
return window.matchMedia(Md).matches ? "dark" : "light";
|
|
6799
6986
|
}
|
|
6800
|
-
function
|
|
6987
|
+
function Ld() {
|
|
6801
6988
|
let e = document.createElement("style");
|
|
6802
6989
|
return e.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;transition:none!important}")), document.head.appendChild(e), () => {
|
|
6803
6990
|
window.getComputedStyle(document.body), requestAnimationFrame(() => {
|
|
@@ -6807,22 +6994,22 @@ function nd() {
|
|
|
6807
6994
|
});
|
|
6808
6995
|
};
|
|
6809
6996
|
}
|
|
6810
|
-
function
|
|
6997
|
+
function Rd(e) {
|
|
6811
6998
|
return e instanceof HTMLElement && !!(e.isContentEditable || e.closest("input, textarea, select, [contenteditable='true']"));
|
|
6812
6999
|
}
|
|
6813
|
-
function
|
|
7000
|
+
function zd({ children: e, defaultTheme: t = "system", storageKey: n = "theme", disableTransitionOnChange: r = !0, ...a }) {
|
|
6814
7001
|
let [o, s] = F.useState(() => {
|
|
6815
7002
|
let e = localStorage.getItem(n);
|
|
6816
|
-
return
|
|
7003
|
+
return Fd(e) ? e : t;
|
|
6817
7004
|
}), c = F.useCallback((e) => {
|
|
6818
7005
|
localStorage.setItem(n, e), s(e);
|
|
6819
7006
|
}, [n]), l = F.useCallback((e) => {
|
|
6820
|
-
let t = document.documentElement, n = e === "system" ?
|
|
7007
|
+
let t = document.documentElement, n = e === "system" ? Id() : e, i = r ? Ld() : null;
|
|
6821
7008
|
t.classList.remove("light", "dark"), t.classList.add(n), i && i();
|
|
6822
7009
|
}, [r]);
|
|
6823
7010
|
F.useEffect(() => {
|
|
6824
7011
|
if (l(o), o !== "system") return;
|
|
6825
|
-
let e = window.matchMedia(
|
|
7012
|
+
let e = window.matchMedia(Md), t = () => {
|
|
6826
7013
|
l("system");
|
|
6827
7014
|
};
|
|
6828
7015
|
return e.addEventListener("change", t), () => {
|
|
@@ -6830,8 +7017,8 @@ function id({ children: e, defaultTheme: t = "system", storageKey: n = "theme",
|
|
|
6830
7017
|
};
|
|
6831
7018
|
}, [o, l]), F.useEffect(() => {
|
|
6832
7019
|
let e = (e) => {
|
|
6833
|
-
e.repeat || e.metaKey || e.ctrlKey || e.altKey ||
|
|
6834
|
-
let t = e === "dark" ? "light" : e === "light" ? "dark" :
|
|
7020
|
+
e.repeat || e.metaKey || e.ctrlKey || e.altKey || Rd(e.target) || e.key.toLowerCase() === "d" && s((e) => {
|
|
7021
|
+
let t = e === "dark" ? "light" : e === "light" ? "dark" : Id() === "dark" ? "light" : "dark";
|
|
6835
7022
|
return localStorage.setItem(n, t), t;
|
|
6836
7023
|
});
|
|
6837
7024
|
};
|
|
@@ -6841,7 +7028,7 @@ function id({ children: e, defaultTheme: t = "system", storageKey: n = "theme",
|
|
|
6841
7028
|
}, [n]), F.useEffect(() => {
|
|
6842
7029
|
let e = (e) => {
|
|
6843
7030
|
if (e.storageArea === localStorage && e.key === n) {
|
|
6844
|
-
if (
|
|
7031
|
+
if (Fd(e.newValue)) {
|
|
6845
7032
|
s(e.newValue);
|
|
6846
7033
|
return;
|
|
6847
7034
|
}
|
|
@@ -6856,7 +7043,7 @@ function id({ children: e, defaultTheme: t = "system", storageKey: n = "theme",
|
|
|
6856
7043
|
theme: o,
|
|
6857
7044
|
setTheme: c
|
|
6858
7045
|
}), [o, c]);
|
|
6859
|
-
return /* @__PURE__ */ i(
|
|
7046
|
+
return /* @__PURE__ */ i(Pd.Provider, {
|
|
6860
7047
|
...a,
|
|
6861
7048
|
value: u,
|
|
6862
7049
|
children: e
|
|
@@ -6864,22 +7051,22 @@ function id({ children: e, defaultTheme: t = "system", storageKey: n = "theme",
|
|
|
6864
7051
|
}
|
|
6865
7052
|
//#endregion
|
|
6866
7053
|
//#region src/state/store.ts
|
|
6867
|
-
var
|
|
7054
|
+
var Bd = je();
|
|
6868
7055
|
//#endregion
|
|
6869
7056
|
//#region src/state/exegia-provider.tsx
|
|
6870
|
-
function
|
|
7057
|
+
function Vd({ children: e, store: t, sound: n = !1, theme: r }) {
|
|
6871
7058
|
return F.useEffect(() => {
|
|
6872
7059
|
n && _t();
|
|
6873
7060
|
}, [n]), /* @__PURE__ */ i(Ae, {
|
|
6874
|
-
store: t ??
|
|
6875
|
-
children: r ? /* @__PURE__ */ i(
|
|
7061
|
+
store: t ?? Bd,
|
|
7062
|
+
children: r ? /* @__PURE__ */ i(zd, {
|
|
6876
7063
|
...r,
|
|
6877
7064
|
children: e
|
|
6878
7065
|
}) : e
|
|
6879
7066
|
});
|
|
6880
7067
|
}
|
|
6881
|
-
var
|
|
7068
|
+
var Hd = Me;
|
|
6882
7069
|
//#endregion
|
|
6883
|
-
export {
|
|
7070
|
+
export { pc as AISidebar, Gc as AnimatedPanel, Gc as AnimatedSidebar, Cl as AnimatedPanelInset, Cl as AnimatedSidebarInset, xl as AnimatedPanelProvider, xl as AnimatedSidebarProvider, Sl as AnimatedPanelTrigger, Sl as AnimatedSidebarTrigger, Fc as AnimatedSidebarContext, Ic as AnimatedSidebarPanelContext, fa as AuthCard, ha as AuthError, lo as AuthFlowBlock, _a as AuthSeparator, ga as AuthSuccess, We as Avatar, Ke as AvatarFallback, Ge as AvatarImage, e as AvatarPrimitive, Y as Button, rt as Card, pt as CardAction, mt as CardContent, mt as CardPanel, ft as CardDescription, ht as CardFooter, it as CardFrame, ct as CardFrameAction, st as CardFrameDescription, lt as CardFrameFooter, at as CardFrameHeader, ot as CardFrameTitle, ut as CardHeader, dt as CardTitle, yt as Checkbox, ge as CheckboxPrimitive, ya as CodeAuthBlock, La as DEFAULT_AUTH_FLOW_ID, An as DEFAULT_BEZEL_ANGLE, Ta as DEFAULT_ONBOARDING_STEPS, Ut as DropdownMenu, Ut as Menu, Xt as DropdownMenuCheckboxItem, Xt as MenuCheckboxItem, Kt as DropdownMenuContent, Kt as MenuPopup, Ht as DropdownMenuCreateHandle, Ht as MenuCreateHandle, qt as DropdownMenuGroup, qt as MenuGroup, Jt as DropdownMenuItem, Jt as MenuItem, $t as DropdownMenuLabel, $t as MenuGroupLabel, Wt as DropdownMenuPortal, Wt as MenuPortal, Zt as DropdownMenuRadioGroup, Zt as MenuRadioGroup, Qt as DropdownMenuRadioItem, Qt as MenuRadioItem, en as DropdownMenuSeparator, en as MenuSeparator, tn as DropdownMenuShortcut, tn as MenuShortcut, nn as DropdownMenuSub, nn as MenuSub, an as DropdownMenuSubContent, an as MenuSubPopup, rn as DropdownMenuSubTrigger, rn as MenuSubTrigger, Gt as DropdownMenuTrigger, Gt as MenuTrigger, da as EASE, fn as EASE_DRAWER, dn as EASE_IN_OUT, X as EASE_OUT, pn as EASE_OUT_CSS, Vd as ExegiaProvider, kc as FOCUSABLE_SELECTOR, bt as Field, Tt as FieldControl, Ct as FieldDescription, wt as FieldError, St as FieldItem, xt as FieldLabel, Et as FieldValidity, ba as ForgotPasswordBlock, Dt as Frame, jt as FrameDescription, Mt as FrameFooter, kt as FrameHeader, Ot as FramePanel, At as FrameTitle, xn as ICON_VARIANTS, Nt as Input, It as InputGroup, Lt as InputGroupAddon, zt as InputGroupInput, Rt as InputGroupText, Bt as InputGroupTextarea, Te as InputPrimitive, Sc as LABEL_ENTER_TRANSITION, Cc as LABEL_EXIT_TRANSITION, Vt as Label, Qu as Layout, fo as LinkedAccountsBlock, xa as LoginBlock, or as Logo, Ac as MOBILE_QUERY, Ys as MarqueeLabel, Yt as MenuLinkItem, V as MenuPrimitive, pa as MorphStep, sn as OTPField, cn as OTPFieldInput, Ee as OTPFieldPrimitive, ln as OTPFieldSeparator, Ea as OnboardingBlock, wc as PANEL_TRANSITION, ql as PanelCloseButton, $l as PanelMenuButton, go as PasskeyManagerBlock, _o as PasskeySignInBlock, dr as PasswordInput, kn as PresenceBadge, Ed as ProfileCardBlock, Tc as REDUCED_TRANSITION, fc as ResourceRow, ma as Reveal, Ml as SCAFFOLD_CANVAS_GAP, zl as SCAFFOLD_EASE, Nl as SCAFFOLD_EDGE_GUTTER, Pl as SCAFFOLD_HEADER_HEIGHT, kl as SCAFFOLD_INSPECTOR_WIDTH, Ll as SCAFFOLD_MENU_COLLAPSE_DELAY, Rl as SCAFFOLD_MORPH_DURATION, Al as SCAFFOLD_PANEL_CAPACITY, Il as SCAFFOLD_PANEL_GAP, jl as SCAFFOLD_PANEL_MIN_WIDTH, Fl as SCAFFOLD_SECONDARY_HEIGHT, Ol as SCAFFOLD_SIDEBAR_WIDTH, bn as SHELL_TRANSITION, Mc as SHELL_WIDTHS, jc as SIDEBAR_KEYBOARD_SHORTCUT, xc as SIDEBAR_MORPH_TRANSITION, pr as SOCIAL_PROVIDERS, yn as SPRING_GLIDE, _n as SPRING_LAYOUT, vn as SPRING_MOUSE, gn as SPRING_PANEL, mn as SPRING_PRESS, hn as SPRING_SWAP, Oc as SUBMENU_ITEM_VARIANTS, Dc as SUBMENU_VARIANTS, Zu as Scaffold, Fu as ScaffoldActions, Lu as ScaffoldCanvas, Vu as ScaffoldInspector, Hu as ScaffoldMain, Wu as ScaffoldPanel, Gu as ScaffoldRoot, Ku as ScaffoldSidebar, qu as ScaffoldTab, on as Separator, jd as SharedLayoutBg, wl as ShellLayout, yc as Sidebar, Js as SidebarIcon, Da as SignupBlock, un as Skeleton, hr as SocialProviders, qe as Spinner, bc as TITLE_BAR_HEIGHT, Pt as Textarea, ia as Tree, Oa as UpdatePasswordBlock, tr as UserAvatar, is as aiSidebarActiveIdAtom, es as aiSidebarAnnouncementAtom, Yo as aiSidebarDraggingIdAtom, Xo as aiSidebarDropTargetAtom, qo as aiSidebarExpandedIdsAtom, as as aiSidebarFlatAtom, Jo as aiSidebarFocusedIdAtom, os as aiSidebarHoverActiveAtom, $o as aiSidebarHoveredIdAtom, Wo as aiSidebarItemsAtom, Zo as aiSidebarMenuOpenIdAtom, ts as aiSidebarMovePendingAtom, Qo as aiSidebarRenamingIdAtom, fs as aiSidebarRowDraggingAtom, ps as aiSidebarRowDropAtom, cs as aiSidebarRowExpandedAtom, ls as aiSidebarRowFocusedAtom, ms as aiSidebarRowHoveredAtom, ds as aiSidebarRowMenuOpenAtom, us as aiSidebarRowRenamingAtom, ss as aiSidebarRowSelectedAtom, hs as aiSidebarStateAtom, ua as authAccentActionStyles, la as authAccentVars, Ka as authFlowChannelAtom, Ja as authFlowErrorAtom, Ga as authFlowIdentifierAtom, Ya as authFlowMaskedIdentifierAtom, Xa as authFlowStateAtom, qa as authFlowStatusAtom, Wa as authFlowStepAtom, Ma as authSessionStateAtom, ka as authSessionStatusAtom, Aa as authUserAtom, $a as beginAuthAttemptAtom, Qa as beginAuthVerificationAtom, _t as bindSounds, nt as buttonVariants, ks as cancelAISidebarRenameAtom, Li as cancelTreeRenameAtom, Yc as clampPanelWidth, Is as clearAISidebarHoverAtom, Ms as closeAISidebarMenuAtom, J as cn, bs as collapseAISidebarRowAtom, Cs as collapseAllAISidebarRowsAtom, Ai as collapseAllTreeNodesAtom, Di as collapseTreeNodeAtom, to as completeAuthFlowAtom, wd as defaultProfileCardItems, Ls as endAISidebarDragAtom, ro as endAuthSessionAtom, Bd as exegiaStore, ys as expandAISidebarRowAtom, Ss as expandAllAISidebarRowsAtom, ki as expandAllTreeNodesAtom, Ei as expandTreeNodeAtom, Nc as expandedWidthVar, eo as failAuthFlowAtom, qc as fitsPanel, Es as focusAISidebarRowAtom, zc as getMobileSnapshot, lr as getPasswordStrength, Bc as getServerMobileSnapshot, Za as goToAuthStepAtom, Sn as initialsFrom, ja as isAuthenticatedAtom, Fa as markUnauthenticatedAtom, Ua as maskAuthIdentifier, Xc as metricsEqual, Ns as moveAISidebarRowAtom, Br as moveNode, zi as moveTreeNodeAtom, js as openAISidebarMenuAtom, Jc as panelBounds, cr as passwordRequirements, vt as playCue, ye as playSound, fd as profileCardBusyAtom, dd as profileCardCollapsedAtom, sd as profileCardMenuOpenAtom, cd as profileCardPendingActionIdAtom, pd as profileCardStateAtom, od as profileCardVariantAtom, Ws as removeAISidebarInstance, io as removeAuthFlowInstance, Sd as removeProfileCardInstance, Mu as removeScaffoldInstance, vl as removeShellFitInstance, Ji as removeTreeInstance, Zn as removeUserAvatarInstance, As as renameAISidebarRowAtom, Ir as renameNode, Ri as renameTreeNodeAtom, Kc as requiredWidth, Us as resetAISidebarAtom, no as resetAuthFlowAtom, xd as resetProfileCardAtom, ju as resetScaffoldAtom, gl as resetShellPanelWidthAtom, qi as resetTreeAtom, Xn as resetUserAvatarAtom, hl as resizeShellPanelAtom, Pc as resolveLength, ws as revealAISidebarRowAtom, ji as revealTreeNodeAtom, _u as scaffoldHiddenPanelIdsAtom, pu as scaffoldHoveredPanelIdAtom, lu as scaffoldInspectorOpenAtom, gu as scaffoldPanelCapacityAtom, yu as scaffoldPanelDimmedAtom, vu as scaffoldPanelHiddenAtom, bu as scaffoldStateAtom, Ts as selectAISidebarRowAtom, _d as selectProfileCardActionAtom, Fi as selectTreeNodeAtom, Fs as setAISidebarHoveredAtom, Ps as setAISidebarItemsAtom, gd as setProfileCardMenuOpenAtom, md as setProfileCardVariantAtom, Su as setScaffoldInspectorOpenAtom, be as setSoundEnabled, xe as setSoundVolume, Ni as setTreeCollapsedAtom, Bi as setTreeItemsAtom, Kn as setUserAvatarBezelAngleAtom, Wn as setUserAvatarPresenceAtom, ul as shellFitFitsAtom, ll as shellFitMeasuredAtom, al as shellFitMetricsAtom, dl as shellFitPanelBoundsAtom, fl as shellFitPanelWidthAtom, ol as shellFitRequestedWidthAtom, pl as shellFitStateAtom, Na as signInAtom, Ia as signOutAtom, Se as sounds, Os as startAISidebarRenameAtom, Ii as startTreeRenameAtom, xs as toggleAISidebarRowAtom, hd as toggleProfileCardVariantAtom, Cu as toggleScaffoldInspectorAtom, wu as toggleScaffoldPanelAtom, Pi as toggleTreeCollapsedAtom, Oi as toggleTreeNodeAtom, Gn as toggleUserAvatarPresenceAtom, ti as treeActiveIdAtom, fi as treeCanMoveAtom, di as treeCanRenameAtom, ci as treeCollapsedAtom, ai as treeDraggedIdAtom, oi as treeDropTargetAtom, ni as treeExpandedIdsAtom, ei as treeItemsAtom, ii as treeRenamingIdAtom, ui as treeSectionIdsAtom, li as treeSectionedAtom, bi as treeStateAtom, Pa as updateAuthUserAtom, Gs as useAISidebar, vc as useAISidebarActions, _c as useAISidebarState, Lc as useAnimatedSidebar, Hc as useAnimatedSidebarPanel, ao as useAuthFlow, oo as useAuthFlowActions, so as useAuthSession, co as useAuthSessionActions, va as useCountdown, Hd as useExegiaStore, Vc as useIsMobile, Cd as useProfileCard, Od as useProfileCardActions, Dd as useProfileCardState, Ju as useScaffold, Xu as useScaffoldActions, Pu as useScaffoldContext, Yu as useScaffoldState, bl as useShellFit, Dl as useShellFitActions, El as useShellFitState, Tl as useShellPanels, na as useTree, ca as useTreeActions, sa as useTreeState, $n as useUserAvatar, rr as useUserAvatarActions, nr as useUserAvatarState, Rn as userAvatarBezelAngleAtom, Hn as userAvatarIsOnlineAtom, Ln as userAvatarPresenceAtom, Un as userAvatarStateAtom };
|
|
6884
7071
|
|
|
6885
7072
|
//# sourceMappingURL=index.js.map
|