@mechane-ai/elements 0.19.0 → 0.20.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/README.md +11 -3
- package/dist/ai.js +4 -4
- package/dist/{categorical-values-D-sSI9JB.js → categorical-values-Cf-zlA1u.js} +2 -2
- package/dist/{chart-frame-vwS7YVgv.js → chart-frame-Cf6LBA8M.js} +1 -1
- package/dist/{chart-input-D6Fw2UGV.js → chart-input-BTDzeBQU.js} +2 -2
- package/dist/charts/cartesian.js +6 -6
- package/dist/charts/distribution.js +2 -2
- package/dist/charts/graph.js +2 -2
- package/dist/charts/hierarchy.js +3 -3
- package/dist/charts/matrix.js +2 -2
- package/dist/charts/timeline.js +2 -2
- package/dist/charts.js +1 -1
- package/dist/{code-block-DB42-a0M.js → code-block-D1_kzPrs.js} +2 -2
- package/dist/collections.js +4 -4
- package/dist/{constants.stylex-bbdiv1fD.js → constants.stylex-BILvnwUk.js} +1 -0
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +3 -3
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +2 -2
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-rdxJ94P8.js → content-link-BIMrgXbz.js} +1 -1
- package/dist/content.js +3 -3
- package/dist/elements.css +20 -0
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +1 -1
- package/dist/forms.js +1 -1
- package/dist/index.js +1 -1
- package/dist/layout.js +342 -207
- package/dist/navigation/commands.js +1 -1
- package/dist/packages/feedback/src/async-region.d.ts +3 -1
- package/dist/packages/foundations/src/constants.stylex.d.ts +1 -0
- package/dist/packages/layout/src/app-shell.d.ts +2 -1
- package/dist/packages/layout/src/index.d.ts +2 -0
- package/dist/packages/layout/src/navigation-rail.d.ts +18 -0
- package/dist/packages/layout/src/sidebar.d.ts +2 -1
- package/dist/{pierre-diff-C_j0nxwS.js → pierre-diff-hAwARDse.js} +1 -1
- package/dist/{pierre-theme-BUeJim8s.js → pierre-theme-CLgk9v3e.js} +1 -1
- package/dist/{pierre-tree-BQBbAhmI.js → pierre-tree-D3XsgEH6.js} +4 -4
- package/dist/{src-BVsyKLQ8.js → src-0mocxTaR.js} +64 -43
- package/dist/{src-Dven_9lR.js → src-D4zPPr32.js} +1 -1
- package/dist/{src-BXh4g2VY.js → src-qU5Z5LRH.js} +1 -0
- package/dist/tokens.js +1 -1
- package/package.json +1 -1
- package/packages/foundations/src/constants.stylex.ts +1 -1
|
@@ -8,13 +8,15 @@ export type LoadingScopeProps = {
|
|
|
8
8
|
export declare function LoadingScope({ identity, initialStartedAt, children }: LoadingScopeProps): ReactNode;
|
|
9
9
|
export type ContentRevealProps = {
|
|
10
10
|
readonly shouldEnter: boolean;
|
|
11
|
+
readonly presentation?: 'content' | 'image';
|
|
11
12
|
readonly children: ReactNode;
|
|
12
13
|
};
|
|
13
|
-
export declare function ContentReveal({ shouldEnter, children }: ContentRevealProps): ReactNode;
|
|
14
|
+
export declare function ContentReveal({ shouldEnter, presentation, children }: ContentRevealProps): ReactNode;
|
|
14
15
|
export type AsyncRegionState = 'pending' | 'ready' | 'failed';
|
|
15
16
|
export type AsyncRegionProps = {
|
|
16
17
|
readonly label: string;
|
|
17
18
|
readonly placeholder: ReactNode;
|
|
19
|
+
readonly presentation?: 'content' | 'image';
|
|
18
20
|
} & ({
|
|
19
21
|
readonly state: 'pending';
|
|
20
22
|
readonly children?: never;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
type AppShellProps = {
|
|
3
|
+
readonly rail?: ReactNode;
|
|
3
4
|
readonly sidebarHeader?: ReactNode;
|
|
4
5
|
readonly sidebar: ReactNode;
|
|
5
6
|
readonly footer?: ReactNode;
|
|
@@ -7,5 +8,5 @@ type AppShellProps = {
|
|
|
7
8
|
readonly mainId?: string;
|
|
8
9
|
readonly shouldFocus?: boolean;
|
|
9
10
|
};
|
|
10
|
-
export declare function AppShell({ sidebarHeader, sidebar, footer, children, mainId, shouldFocus, }: AppShellProps): ReactNode;
|
|
11
|
+
export declare function AppShell({ rail, sidebarHeader, sidebar, footer, children, mainId, shouldFocus, }: AppShellProps): ReactNode;
|
|
11
12
|
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { AppShell } from './app-shell.tsx';
|
|
2
|
+
export { NavigationRail } from './navigation-rail.tsx';
|
|
3
|
+
export type { NavigationRailLink, NavigationRailProps } from './navigation-rail.tsx';
|
|
2
4
|
export { DetailPage } from './detail-page.tsx';
|
|
3
5
|
export { FocusPage } from './focus-page.tsx';
|
|
4
6
|
export { Workbench, WorkbenchScroll, WorkbenchFooter } from './workbench.tsx';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ComponentProps, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
export declare const NavigationRailContext: import("react").Context<boolean>;
|
|
3
|
+
export type NavigationRailLink = Omit<ComponentProps<'a'>, 'children' | 'href' | 'aria-label' | 'aria-current' | 'title'> & {
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly icon: ReactNode;
|
|
6
|
+
readonly href: string;
|
|
7
|
+
readonly isCurrent?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type NavigationRailProps = {
|
|
10
|
+
readonly label: string;
|
|
11
|
+
readonly links: ReadonlyArray<NavigationRailLink>;
|
|
12
|
+
readonly action?: {
|
|
13
|
+
readonly label: string;
|
|
14
|
+
readonly icon: ReactNode;
|
|
15
|
+
readonly onClick: MouseEventHandler<HTMLButtonElement>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare function NavigationRail({ label, links, action }: NavigationRailProps): ReactNode;
|
|
@@ -13,6 +13,7 @@ type SidebarState = {
|
|
|
13
13
|
export declare const SidebarContext: import("react").Context<SidebarState | null>;
|
|
14
14
|
type SidebarProps = {
|
|
15
15
|
readonly header?: ReactNode;
|
|
16
|
+
readonly navigationHeader?: ReactNode;
|
|
16
17
|
readonly footer?: ReactNode;
|
|
17
18
|
readonly close?: ReactNode;
|
|
18
19
|
readonly children: ReactNode;
|
|
@@ -39,7 +40,7 @@ type SidebarFooterProps = {
|
|
|
39
40
|
readonly children: ReactNode;
|
|
40
41
|
readonly layout?: SidebarFooterLayout;
|
|
41
42
|
};
|
|
42
|
-
export declare function Sidebar({ header, footer, close, children }: SidebarProps): ReactNode;
|
|
43
|
+
export declare function Sidebar({ header, navigationHeader, footer, close, children }: SidebarProps): ReactNode;
|
|
43
44
|
export declare function SidebarClose(): ReactNode;
|
|
44
45
|
export declare function Navigation({ children, label }: NavigationProps): ReactNode;
|
|
45
46
|
export declare function NavigationSection({ children, label, }: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as e } from "./src-
|
|
2
|
-
import { l as t } from "./src-
|
|
3
|
-
import { t as n } from "./constants.stylex-
|
|
4
|
-
import { r } from "./pierre-theme-
|
|
1
|
+
import { c as e } from "./src-qU5Z5LRH.js";
|
|
2
|
+
import { l as t } from "./src-D4zPPr32.js";
|
|
3
|
+
import { t as n } from "./constants.stylex-BILvnwUk.js";
|
|
4
|
+
import { r } from "./pierre-theme-CLgk9v3e.js";
|
|
5
5
|
import * as i from "@stylexjs/stylex";
|
|
6
6
|
import { useEffect as a, useId as o, useRef as s, useState as c } from "react";
|
|
7
7
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { O as e, i as t, s as n } from "./src-
|
|
1
|
+
import { O as e, i as t, s as n } from "./src-qU5Z5LRH.js";
|
|
2
2
|
import { i as r, l as i } from "./tokens.stylex-DTHHFbyl.js";
|
|
3
3
|
import { t as a } from "./accessibility-C-aIZ1Yx.js";
|
|
4
|
-
import { c as o, s } from "./constants.stylex-
|
|
4
|
+
import { c as o, s } from "./constants.stylex-BILvnwUk.js";
|
|
5
5
|
import { mergeProps as c } from "@base-ui/react/merge-props";
|
|
6
6
|
import * as l from "@stylexjs/stylex";
|
|
7
7
|
import u, { createContext as d, useContext as f, useEffect as p, useRef as m, useState as h } from "react";
|
|
@@ -491,7 +491,7 @@ function xe(e) {
|
|
|
491
491
|
return t && r.push(t), n && r.push(n), r;
|
|
492
492
|
}
|
|
493
493
|
var Se = (e) => {
|
|
494
|
-
let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: d, removeToast: f, defaultRichColors: p, closeButton: m, style: h, cancelButtonStyle: ee, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: te, expandByDefault: x, classNames: S, icons: C, closeButtonAriaLabel: w = "Close toast" } = e, [T, E] = u.useState(null), [ne, re] = u.useState(null), [D, O] = u.useState(!1), [k, A] = u.useState(!1), [j, M] = u.useState(!1), [N, P] = u.useState(!1), [F, I] = u.useState(!1), [ie, L] = u.useState(0), [oe, ce] = u.useState(0), R = u.useRef(n.duration || y || ve), le = u.useRef(null), z = u.useRef(null), fe = c === 0, pe = c + 1 <= o, B = n.type, V = B ?? "default", H = n.dismissible !== !1, me = n.className || "", he = n.descriptionClassName || "", W = u.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), ge = u.useMemo(() => n.closeButton ?? m, [n.closeButton, m]), _e = u.useMemo(() => n.duration || y || ve, [n.duration, y]), G = u.useRef(0), K = u.useRef(0), Se = u.useRef(0), J = u.useRef(null), [Ce, we] = b.split("-"), Te = u.useMemo(() => s.reduce((e, t, n) => n >= W ? e : e + t.height, 0), [s, W]), Y = de(), X = u.useMemo(() => e.swipeDirections ?? xe(b), [e.swipeDirections, b]),
|
|
494
|
+
let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: d, removeToast: f, defaultRichColors: p, closeButton: m, style: h, cancelButtonStyle: ee, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: te, expandByDefault: x, classNames: S, icons: C, closeButtonAriaLabel: w = "Close toast" } = e, [T, E] = u.useState(null), [ne, re] = u.useState(null), [D, O] = u.useState(!1), [k, A] = u.useState(!1), [j, M] = u.useState(!1), [N, P] = u.useState(!1), [F, I] = u.useState(!1), [ie, L] = u.useState(0), [oe, ce] = u.useState(0), R = u.useRef(n.duration || y || ve), le = u.useRef(null), z = u.useRef(null), fe = c === 0, pe = c + 1 <= o, B = n.type, V = B ?? "default", H = n.dismissible !== !1, me = n.className || "", he = n.descriptionClassName || "", W = u.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), ge = u.useMemo(() => n.closeButton ?? m, [n.closeButton, m]), _e = u.useMemo(() => n.duration || y || ve, [n.duration, y]), G = u.useRef(0), K = u.useRef(0), Se = u.useRef(0), J = u.useRef(null), [Ce, we] = b.split("-"), Te = u.useMemo(() => s.reduce((e, t, n) => n >= W ? e : e + t.height, 0), [s, W]), Y = de(), X = u.useMemo(() => e.swipeDirections ?? xe(b), [e.swipeDirections, b]), Ee = n.invert || t, Z = B === "loading";
|
|
495
495
|
K.current = u.useMemo(() => W * te + Te, [W, Te]), u.useEffect(() => {
|
|
496
496
|
R.current = _e;
|
|
497
497
|
}, [_e]), u.useEffect(() => {
|
|
@@ -529,7 +529,7 @@ var Se = (e) => {
|
|
|
529
529
|
n.action,
|
|
530
530
|
n.cancel
|
|
531
531
|
]);
|
|
532
|
-
let
|
|
532
|
+
let Q = u.useCallback(() => {
|
|
533
533
|
A(!0), L(K.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
|
|
534
534
|
f(n);
|
|
535
535
|
}, be);
|
|
@@ -549,7 +549,7 @@ var Se = (e) => {
|
|
|
549
549
|
}
|
|
550
550
|
Se.current = (/* @__PURE__ */ new Date()).getTime();
|
|
551
551
|
})() : R.current !== Infinity && (G.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
|
|
552
|
-
n.onAutoClose == null || n.onAutoClose.call(n, n),
|
|
552
|
+
n.onAutoClose == null || n.onAutoClose.call(n, n), Q();
|
|
553
553
|
}, R.current)), () => clearTimeout(e);
|
|
554
554
|
}, [
|
|
555
555
|
d,
|
|
@@ -557,11 +557,11 @@ var Se = (e) => {
|
|
|
557
557
|
n,
|
|
558
558
|
B,
|
|
559
559
|
Y,
|
|
560
|
-
|
|
560
|
+
Q
|
|
561
561
|
]), u.useEffect(() => {
|
|
562
|
-
n.delete && (
|
|
563
|
-
}, [
|
|
564
|
-
function
|
|
562
|
+
n.delete && (Q(), n.onDismiss == null || n.onDismiss.call(n, n));
|
|
563
|
+
}, [Q, n.delete]);
|
|
564
|
+
function De() {
|
|
565
565
|
return C?.loading ? /*#__PURE__*/ u.createElement("div", {
|
|
566
566
|
className: q(S?.loader, n?.classNames?.loader, "sonner-loader"),
|
|
567
567
|
"data-visible": B === "loading"
|
|
@@ -570,7 +570,7 @@ var Se = (e) => {
|
|
|
570
570
|
visible: B === "loading"
|
|
571
571
|
});
|
|
572
572
|
}
|
|
573
|
-
let
|
|
573
|
+
let $ = n.icon || C?.[B] || ae(B);
|
|
574
574
|
return /*#__PURE__*/ u.createElement("li", {
|
|
575
575
|
tabIndex: 0,
|
|
576
576
|
ref: z,
|
|
@@ -590,7 +590,7 @@ var Se = (e) => {
|
|
|
590
590
|
"data-swiping": j,
|
|
591
591
|
"data-dismissible": H,
|
|
592
592
|
"data-type": B,
|
|
593
|
-
"data-invert":
|
|
593
|
+
"data-invert": Ee,
|
|
594
594
|
"data-swipe-out": N,
|
|
595
595
|
"data-swipe-direction": ne,
|
|
596
596
|
"data-expanded": !!(d || x && D),
|
|
@@ -608,7 +608,7 @@ var Se = (e) => {
|
|
|
608
608
|
M(!1), E(null), J.current = null;
|
|
609
609
|
},
|
|
610
610
|
onPointerDown: (e) => {
|
|
611
|
-
e.button !== 2 && !
|
|
611
|
+
e.button !== 2 && !Z && H && (le.current = /* @__PURE__ */ new Date(), L(K.current), e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (M(!0), J.current = {
|
|
612
612
|
x: e.clientX,
|
|
613
613
|
y: e.clientY
|
|
614
614
|
}));
|
|
@@ -617,7 +617,7 @@ var Se = (e) => {
|
|
|
617
617
|
if (N || !H) return;
|
|
618
618
|
J.current = null;
|
|
619
619
|
let e = Number(z.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(z.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - le.current?.getTime(), i = T === "x" ? e : t, a = Math.abs(i) / r;
|
|
620
|
-
if ((T === "x" ? X.includes(e > 0 ? "right" : "left") : X.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= ye || a > .11)) L(K.current), n.onDismiss == null || n.onDismiss.call(n, n), re(T === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"),
|
|
620
|
+
if ((T === "x" ? X.includes(e > 0 ? "right" : "left") : X.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= ye || a > .11)) L(K.current), n.onDismiss == null || n.onDismiss.call(n, n), re(T === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), Q(), P(!0);
|
|
621
621
|
else {
|
|
622
622
|
var o, s;
|
|
623
623
|
(o = z.current) == null || o.style.setProperty("--swipe-amount-x", "0px"), (s = z.current) == null || s.style.setProperty("--swipe-amount-y", "0px"), I(!1), M(!1), E(null);
|
|
@@ -651,16 +651,16 @@ var Se = (e) => {
|
|
|
651
651
|
}
|
|
652
652
|
}, ge && !n.jsx && B !== "loading" ? /*#__PURE__*/ u.createElement("button", {
|
|
653
653
|
"aria-label": w,
|
|
654
|
-
"data-disabled":
|
|
654
|
+
"data-disabled": Z,
|
|
655
655
|
"data-close-button": !0,
|
|
656
|
-
onClick:
|
|
657
|
-
|
|
656
|
+
onClick: Z || !H ? () => {} : () => {
|
|
657
|
+
Q(), n.onDismiss == null || n.onDismiss.call(n, n);
|
|
658
658
|
},
|
|
659
659
|
className: q(S?.closeButton, n?.classNames?.closeButton)
|
|
660
660
|
}, C?.close ?? ue) : null, (B || n.icon || n.promise) && n.icon !== null && (C?.[B] !== null || n.icon) ? /*#__PURE__*/ u.createElement("div", {
|
|
661
661
|
"data-icon": "",
|
|
662
662
|
className: q(S?.icon, n?.classNames?.icon)
|
|
663
|
-
}, B === "loading" ? n.icon ||
|
|
663
|
+
}, B === "loading" ? n.icon || De() : n.promise ? De() : null, B === "loading" ? null : $) : null, /*#__PURE__*/ u.createElement("div", {
|
|
664
664
|
"data-content": "",
|
|
665
665
|
className: q(S?.content, n?.classNames?.content)
|
|
666
666
|
}, /*#__PURE__*/ u.createElement("div", {
|
|
@@ -674,7 +674,7 @@ var Se = (e) => {
|
|
|
674
674
|
"data-cancel": !0,
|
|
675
675
|
style: n.cancelButtonStyle || ee,
|
|
676
676
|
onClick: (e) => {
|
|
677
|
-
U(n.cancel) && H && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e),
|
|
677
|
+
U(n.cancel) && H && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), Q());
|
|
678
678
|
},
|
|
679
679
|
className: q(S?.cancelButton, n?.classNames?.cancelButton)
|
|
680
680
|
}, n.cancel.label) : null, /*#__PURE__*/ u.isValidElement(n.action) ? n.action : n.action && U(n.action) ? /*#__PURE__*/ u.createElement("button", {
|
|
@@ -682,7 +682,7 @@ var Se = (e) => {
|
|
|
682
682
|
"data-action": !0,
|
|
683
683
|
style: n.actionButtonStyle || g,
|
|
684
684
|
onClick: (e) => {
|
|
685
|
-
U(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), e.defaultPrevented ||
|
|
685
|
+
U(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), e.defaultPrevented || Q());
|
|
686
686
|
},
|
|
687
687
|
className: q(S?.actionButton, n?.classNames?.actionButton)
|
|
688
688
|
}, n.action.label) : null);
|
|
@@ -908,8 +908,30 @@ function Te({ closeButton: e = !0, closeButtonAriaLabel: t = "Dismiss notificati
|
|
|
908
908
|
});
|
|
909
909
|
}
|
|
910
910
|
// packages/feedback/src/async-region.tsx
|
|
911
|
-
var Y = d(void 0), X = d(!1),
|
|
912
|
-
|
|
911
|
+
var Y = d(void 0), X = d(!1), Ee = o.delaySeconds * 1e3, Z = {
|
|
912
|
+
content: {
|
|
913
|
+
k7Eaqz: "xeuugli",
|
|
914
|
+
kAzted: "x2lwn1j",
|
|
915
|
+
k1xSpc: "x78zum5",
|
|
916
|
+
kXwgrk: "xdt5ytf",
|
|
917
|
+
kUk6DE: "x98rzlu",
|
|
918
|
+
$$css: !0
|
|
919
|
+
},
|
|
920
|
+
reveal: {
|
|
921
|
+
kKVMdj: "xqcmdr3 x1qme5af",
|
|
922
|
+
k44tkh: "x1irg2zc",
|
|
923
|
+
kyAemX: "x1c3o69q",
|
|
924
|
+
$$css: !0
|
|
925
|
+
},
|
|
926
|
+
imageReveal: {
|
|
927
|
+
k44tkh: "x11hm9ij",
|
|
928
|
+
$$css: !0
|
|
929
|
+
}
|
|
930
|
+
}, Q = {
|
|
931
|
+
content: null,
|
|
932
|
+
image: Z.imageReveal
|
|
933
|
+
};
|
|
934
|
+
function De({ identity: e, initialStartedAt: t, children: n }) {
|
|
913
935
|
let [r, i] = h(() => ({
|
|
914
936
|
identity: e,
|
|
915
937
|
startedAt: t ?? Date.now()
|
|
@@ -922,33 +944,30 @@ function Q({ identity: e, initialStartedAt: t, children: n }) {
|
|
|
922
944
|
children: n
|
|
923
945
|
});
|
|
924
946
|
}
|
|
925
|
-
function $({ shouldEnter: e,
|
|
926
|
-
let
|
|
947
|
+
function $({ shouldEnter: e, presentation: t = "content", children: n }) {
|
|
948
|
+
let r = f(X), [i, a] = h(e && !r), o = m(null);
|
|
927
949
|
return p(() => {
|
|
928
|
-
let e =
|
|
929
|
-
if (!
|
|
950
|
+
let e = o.current;
|
|
951
|
+
if (!i || e === null) return;
|
|
930
952
|
let t = !0;
|
|
931
953
|
return Promise.allSettled(e.getAnimations().map((e) => e.finished)).then(() => {
|
|
932
|
-
t &&
|
|
954
|
+
t && a(!1);
|
|
933
955
|
}), () => {
|
|
934
956
|
t = !1;
|
|
935
957
|
};
|
|
936
|
-
}, [
|
|
937
|
-
ref:
|
|
938
|
-
...
|
|
939
|
-
0: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu" },
|
|
940
|
-
1: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu xqcmdr3 x1qme5af x1irg2zc x1c3o69q" }
|
|
941
|
-
}[!!r | 0],
|
|
958
|
+
}, [i]), /* @__PURE__ */ g("div", {
|
|
959
|
+
ref: o,
|
|
960
|
+
...l.props(Z.content, i && Z.reveal, Q[t]),
|
|
942
961
|
children: /* @__PURE__ */ g(X, {
|
|
943
|
-
value:
|
|
944
|
-
children:
|
|
962
|
+
value: r || i,
|
|
963
|
+
children: n
|
|
945
964
|
})
|
|
946
965
|
});
|
|
947
966
|
}
|
|
948
|
-
function
|
|
949
|
-
let [
|
|
967
|
+
function Oe({ label: e, placeholder: t, startedAt: n, presentation: r }) {
|
|
968
|
+
let [i, o] = h(() => Date.now() - n >= Ee ? n : void 0), s = i === n, c = r === "image";
|
|
950
969
|
return p(() => {
|
|
951
|
-
let e = Math.max(0,
|
|
970
|
+
let e = Math.max(0, Ee - (Date.now() - n)), t = setTimeout(() => o(n), e);
|
|
952
971
|
return () => clearTimeout(t);
|
|
953
972
|
}, [n]), /* @__PURE__ */ _(ee, { children: [/* @__PURE__ */ g("div", {
|
|
954
973
|
"aria-busy": !0,
|
|
@@ -961,16 +980,16 @@ function Ee({ label: e, placeholder: t, startedAt: n }) {
|
|
|
961
980
|
2: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu xlshs6z x18usnwx" },
|
|
962
981
|
1: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu xqcmdr3 x1qme5af x1c3o69q x18usnwx" },
|
|
963
982
|
3: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu xlshs6z xqcmdr3 x1qme5af x1c3o69q x18usnwx" }
|
|
964
|
-
}[!
|
|
983
|
+
}[!(c || s) << 1 | !(c || !s)],
|
|
965
984
|
children: t
|
|
966
985
|
})
|
|
967
|
-
}),
|
|
986
|
+
}), s && /* @__PURE__ */ g("span", {
|
|
968
987
|
role: "status",
|
|
969
988
|
...l.props(a.hidden),
|
|
970
989
|
children: e
|
|
971
990
|
})] });
|
|
972
991
|
}
|
|
973
|
-
function
|
|
992
|
+
function ke(e) {
|
|
974
993
|
let t = f(Y), [n, r] = h(() => ({
|
|
975
994
|
state: e.state,
|
|
976
995
|
scope: t,
|
|
@@ -988,17 +1007,19 @@ function De(e) {
|
|
|
988
1007
|
}
|
|
989
1008
|
return /* @__PURE__ */ g("div", {
|
|
990
1009
|
className: "x1n2onr6 xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu",
|
|
991
|
-
children: e.state === "pending" ? /* @__PURE__ */ g(
|
|
1010
|
+
children: e.state === "pending" ? /* @__PURE__ */ g(Oe, {
|
|
992
1011
|
label: e.label,
|
|
993
1012
|
placeholder: e.placeholder,
|
|
994
|
-
startedAt: i.startedAt
|
|
1013
|
+
startedAt: i.startedAt,
|
|
1014
|
+
presentation: e.presentation ?? "content"
|
|
995
1015
|
}) : e.state === "failed" ? /* @__PURE__ */ g("div", {
|
|
996
1016
|
className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu",
|
|
997
1017
|
children: e.children
|
|
998
1018
|
}) : /* @__PURE__ */ g($, {
|
|
999
1019
|
shouldEnter: i.wasPending,
|
|
1020
|
+
presentation: e.presentation ?? "content",
|
|
1000
1021
|
children: e.children
|
|
1001
1022
|
})
|
|
1002
1023
|
});
|
|
1003
1024
|
}
|
|
1004
|
-
export { he as a, F as c, A as d, j as f, Te as i, I as l, re as m, $ as n, L as o, ne as p,
|
|
1025
|
+
export { he as a, F as c, A as d, j as f, Te as i, I as l, re as m, $ as n, L as o, ne as p, De as r, ie as s, ke as t, k as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as e, b as t, i as n, s as r, v as i, x as a } from "./src-
|
|
1
|
+
import { O as e, b as t, i as n, s as r, v as i, x as a } from "./src-qU5Z5LRH.js";
|
|
2
2
|
import { t as o } from "./style-composition-uYlczSsB.js";
|
|
3
3
|
import { mergeProps as s } from "@base-ui/react/merge-props";
|
|
4
4
|
import * as c from "@stylexjs/stylex";
|
package/dist/tokens.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./constants.stylex-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./constants.stylex-BILvnwUk.js";
|
|
2
2
|
import { a as l, c as u, d, i as f, l as p, n as m, o as h, r as g, s as _, t as v, u as y } from "./tokens.stylex-DTHHFbyl.js";
|
|
3
3
|
export { v as avatarColors, m as chartColors, g as colors, c as conditions, f as controls, i as darkAvatarColors, o as darkChartColors, n as darkColors, e as darkShadows, a as darkSyntaxColors, s as layers, t as loading, l as motion, h as pageGeometry, _ as radii, u as shadows, p as spacing, y as syntaxColors, r as tableGeometry, d as typography };
|
package/package.json
CHANGED
|
@@ -67,7 +67,7 @@ export const darkSyntaxColors = stylex.defineConsts({
|
|
|
67
67
|
type: '#84bce3',
|
|
68
68
|
});
|
|
69
69
|
|
|
70
|
-
export const loading = stylex.defineConsts({ delaySeconds: 2, revealMs: 80, placeholderMs: 120 });
|
|
70
|
+
export const loading = stylex.defineConsts({ delaySeconds: 2, revealMs: 80, imageRevealMs: 200, placeholderMs: 120 });
|
|
71
71
|
|
|
72
72
|
export const darkShadows = stylex.defineConsts({ popup: '0 4px 16px #00000066' });
|
|
73
73
|
|