@mechane-ai/elements 0.39.0 → 0.41.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/NOTICE +11 -19
- package/README.md +49 -25
- package/dist/accessibility-P89UG9-r.js +25 -0
- package/dist/agent.js +1 -0
- package/dist/ai.js +50 -44
- package/dist/{categorical-values-BECG-J6R.js → categorical-values-DnGR_pQx.js} +3 -3
- package/dist/{chart-frame-CJFnI39T.js → chart-frame-BsyI1Zc8.js} +58 -57
- package/dist/{chart-input-DwAobO8Y.js → chart-input-r4S3-QCT.js} +2 -2
- package/dist/chart-navigation-D7OkLdSx.js +119 -0
- package/dist/charts/cartesian.js +560 -583
- package/dist/charts/distribution.js +218 -218
- package/dist/charts/graph.js +86 -85
- package/dist/charts/hierarchy.js +4 -4
- package/dist/charts/matrix.js +148 -147
- package/dist/charts/timeline.js +77 -76
- package/dist/charts.js +2 -2
- package/dist/code-block-C4K1sM9O.js +255 -0
- package/dist/collections.js +828 -607
- package/dist/constants.stylex-BILvnwUk.js +84 -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 +184 -77
- package/dist/{content-link-B3ObdyZY.js → content-link-CBDqSvgP.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/control-styles-D3q_Qyxi.js +179 -0
- package/dist/csp.js +14 -1
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +359 -245
- package/dist/forms-I-WMHTkr.js +139 -0
- package/dist/forms.js +3 -3
- package/dist/index.js +1 -1
- package/dist/layout.js +271 -241
- package/dist/navigation/commands.js +87 -76
- package/dist/{navigation-D2_sGy3C.js → navigation-CveMIuXI.js} +1 -1
- package/dist/navigation.js +2 -2
- package/dist/overlays.js +1 -1
- package/dist/packages/ai/src/message-action.d.ts +1 -1
- package/dist/packages/charts/src/chart-navigation.d.ts +18 -2
- package/dist/packages/charts/src/chart-surface.d.ts +23 -0
- package/dist/packages/charts/src/distribution/distribution-plot.d.ts +3 -2
- package/dist/packages/collections/src/data-table.d.ts +7 -2
- package/dist/packages/collections/src/index.d.ts +4 -1
- package/dist/packages/collections/src/query-controls.d.ts +18 -0
- package/dist/packages/collections/src/table-query.d.ts +64 -0
- package/dist/packages/collections/src/use-collection-controls.d.ts +3 -8
- package/dist/packages/content/src/pierre-theme.d.ts +0 -1
- package/dist/packages/core/src/actions.d.ts +15 -13
- package/dist/packages/core/src/copy-value.d.ts +3 -2
- package/dist/packages/core/src/disclosure.d.ts +14 -11
- package/dist/packages/feedback/src/notifications.d.ts +15 -15
- package/dist/packages/feedback/src/toast.d.ts +9 -3
- package/dist/packages/forms/src/combobox.d.ts +31 -41
- package/dist/packages/forms/src/dates/event-month.d.ts +17 -0
- package/dist/packages/forms/src/dates/index.d.ts +2 -0
- package/dist/packages/forms/src/field-styles.d.ts +0 -19
- package/dist/packages/forms/src/form-controls.d.ts +26 -24
- package/dist/packages/forms/src/forms.d.ts +17 -14
- package/dist/packages/forms/src/select-control.d.ts +6 -4
- package/dist/packages/forms/src/select.d.ts +14 -18
- package/dist/packages/forms/src/selection-state.d.ts +11 -0
- package/dist/packages/forms/src/selection-styles.d.ts +3 -0
- package/dist/packages/forms/src/selection.d.ts +21 -19
- package/dist/packages/foundations/src/agent/index.d.ts +2 -0
- package/dist/packages/foundations/src/control-state.d.ts +2 -3
- package/dist/packages/foundations/src/control-styles.d.ts +19 -0
- package/dist/packages/foundations/src/csp/index.d.ts +1 -1
- package/dist/packages/foundations/src/csp/provider.d.ts +3 -0
- package/dist/packages/foundations/src/style-composition.d.ts +4 -1
- package/dist/packages/layout/src/app-shell.d.ts +12 -1
- package/dist/packages/layout/src/index.d.ts +1 -1
- package/dist/packages/layout/src/navigation-rail.d.ts +15 -2
- package/dist/packages/layout/src/resizable.d.ts +2 -2
- package/dist/packages/layout/src/sidebar.d.ts +4 -3
- package/dist/packages/navigation/src/tab-styles.d.ts +1 -1
- package/dist/packages/navigation/src/tabs.d.ts +12 -10
- package/dist/packages/overlays/src/alert-dialog.d.ts +19 -13
- package/dist/packages/overlays/src/dialog.d.ts +39 -24
- package/dist/packages/overlays/src/drawer.d.ts +16 -26
- package/dist/packages/overlays/src/menu.d.ts +37 -44
- package/dist/packages/overlays/src/overlay-root.d.ts +10 -0
- package/dist/packages/overlays/src/popover.d.ts +11 -20
- package/dist/packages/overlays/src/preview.d.ts +6 -13
- package/dist/packages/overlays/src/tooltip.d.ts +12 -15
- package/dist/{pierre-diff-CaPsfQRo.js → pierre-diff-DJ3oOfPX.js} +5 -5
- package/dist/{src-DPRmO-JY.js → src-CNV1ewzb.js} +379 -407
- package/dist/{src-CSWIG_op.js → src-CQQvXi7a.js} +58 -81
- package/dist/{src-DWjAoOyd.js → src-D2OHco8V.js} +42 -41
- package/dist/src-DfOAlAd2.js +750 -0
- package/dist/src-na2DdkKI.js +561 -0
- package/dist/{src-C-Sx37kz.js → src-s3tWwnN4.js} +361 -518
- package/dist/styles.js +3 -0
- package/dist/{elements.css → styles2.css} +195 -97
- package/dist/tokens.js +3 -1
- package/dist/{tokens.stylex-CJbIDPB9.js → tokens.stylex-dF5CACEJ.js} +13 -93
- package/package.json +8 -9
- package/skills/elements-workspace/SKILL.md +12 -0
- package/dist/accessibility-C-aIZ1Yx.js +0 -15
- package/dist/chart-navigation-CBIeNtJq.js +0 -67
- package/dist/code-block-aC0Htt4N.js +0 -184
- package/dist/forms-BQQFas9g.js +0 -118
- package/dist/foundations.css +0 -7
- package/dist/packages/content/src/tree/pierre-tree.d.ts +0 -3
- package/dist/pierre-theme-BpNaWn1x.js +0 -126
- package/dist/pierre-tree-CYCRjdGG.js +0 -106
- package/dist/src-d7EAi61b.js +0 -617
- package/dist/src-nkgFDl-g.js +0 -1171
- package/dist/style-composition-uYlczSsB.js +0 -9
- package/styles.css +0 -2
|
@@ -12,7 +12,20 @@ export type NavigationRailProps = {
|
|
|
12
12
|
readonly action?: {
|
|
13
13
|
readonly label: string;
|
|
14
14
|
readonly icon: ReactNode;
|
|
15
|
-
readonly onClick: MouseEventHandler<
|
|
15
|
+
readonly onClick: MouseEventHandler<HTMLElement>;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
export declare function NavigationRail(
|
|
18
|
+
export declare function NavigationRail(props: NavigationRailProps): ReactNode;
|
|
19
|
+
export declare function RailGroup({ label, links, action, isFooter, }: NavigationRailProps & {
|
|
20
|
+
readonly isFooter?: boolean;
|
|
21
|
+
}): ReactNode;
|
|
22
|
+
export declare function RailFooterGroup({ children }: {
|
|
23
|
+
readonly children: ReactNode;
|
|
24
|
+
}): ReactNode;
|
|
25
|
+
export declare function RailPlaceholderItem({ children }: {
|
|
26
|
+
readonly children: ReactNode;
|
|
27
|
+
}): ReactNode;
|
|
28
|
+
export declare function NavigationRailPlaceholder({ count, icon, }: {
|
|
29
|
+
readonly count: number;
|
|
30
|
+
readonly icon: ReactNode;
|
|
31
|
+
}): ReactNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
export type ResizableRootProps = {
|
|
3
3
|
readonly orientation?: 'horizontal' | 'vertical';
|
|
4
|
-
readonly initialSizes?:
|
|
5
|
-
readonly onSizesChange?: (sizes:
|
|
4
|
+
readonly initialSizes?: Array<number>;
|
|
5
|
+
readonly onSizesChange?: (sizes: Array<number>) => void;
|
|
6
6
|
readonly disabled?: boolean;
|
|
7
7
|
} & Omit<ComponentProps<'div'>, 'onChange' | 'defaultValue'>;
|
|
8
8
|
export type ResizablePaneProps = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Button as
|
|
1
|
+
import { Button as SdkButton } from '@ui-sdk/react/button';
|
|
2
2
|
import type { ComponentProps, ReactNode, RefObject } from 'react';
|
|
3
3
|
import { Drawer } from '../../overlays/src/index.ts';
|
|
4
4
|
type SidebarState = {
|
|
5
5
|
readonly isExpanded: boolean;
|
|
6
6
|
readonly sidebarId: string;
|
|
7
|
-
readonly
|
|
7
|
+
readonly drawerController: ReturnType<typeof Drawer.createController<unknown, string>>;
|
|
8
8
|
readonly navigationToggleRef: RefObject<HTMLButtonElement | null>;
|
|
9
9
|
readonly mobileNavigationToggleRef: RefObject<HTMLButtonElement | null>;
|
|
10
10
|
readonly onToggle: () => void;
|
|
@@ -22,7 +22,8 @@ type NavigationProps = {
|
|
|
22
22
|
readonly children: ReactNode;
|
|
23
23
|
readonly label?: string;
|
|
24
24
|
};
|
|
25
|
-
type NavigationItemProps = ComponentProps<typeof
|
|
25
|
+
type NavigationItemProps = Omit<ComponentProps<typeof SdkButton>, 'children'> & {
|
|
26
|
+
readonly children?: ReactNode;
|
|
26
27
|
readonly icon?: ReactNode;
|
|
27
28
|
readonly isSelected?: boolean;
|
|
28
29
|
readonly shouldCloseOnActivate?: boolean;
|
|
@@ -56,7 +56,7 @@ export declare const tabStyles: Readonly<{
|
|
|
56
56
|
readonly height: 2;
|
|
57
57
|
readonly backgroundColor: "transparent";
|
|
58
58
|
}>;
|
|
59
|
-
readonly ':is([
|
|
59
|
+
readonly ':is([aria-selected="true"], [aria-current="page"])': stylex.StyleXClassNameFor<":is([aria-selected=\"true\"], [aria-current=\"page\"])", {
|
|
60
60
|
readonly color: stylex.StyleXVar<string>;
|
|
61
61
|
readonly '::after': {
|
|
62
62
|
backgroundColor: stylex.StyleXVar<string>;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { Tabs as BaseTabs } from '@base-ui/react/tabs';
|
|
2
1
|
import type { ComponentProps, ReactNode } from 'react';
|
|
3
2
|
import type { ValueStateProperties } from '../../foundations/src/control-state.ts';
|
|
4
|
-
type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
declare function
|
|
10
|
-
declare function
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
type TabsRootProps<Value extends string> = Omit<ComponentProps<'div'>, 'defaultValue'> & ValueStateProperties<Value | null, (value: Value | null) => void> & {
|
|
4
|
+
readonly orientation?: 'horizontal' | 'vertical';
|
|
5
|
+
readonly activation?: 'automatic' | 'manual';
|
|
6
|
+
};
|
|
7
|
+
declare function TabsRoot<Value extends string>(props: TabsRootProps<Value>): ReactNode;
|
|
8
|
+
declare function TabsList(props: ComponentProps<'div'>): ReactNode;
|
|
9
|
+
declare function TabsTab({ value, ...props }: Omit<ComponentProps<'button'>, 'value'> & {
|
|
10
|
+
readonly value: string;
|
|
11
|
+
}): ReactNode;
|
|
12
|
+
declare function TabsPanel({ value, ...props }: ComponentProps<'div'> & {
|
|
13
|
+
readonly value: string;
|
|
14
|
+
}): ReactNode;
|
|
13
15
|
export declare const Tabs: {
|
|
14
16
|
Root: typeof TabsRoot;
|
|
15
17
|
List: typeof TabsList;
|
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as SDK from '@ui-sdk/react/alert-dialog';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
-
import type {
|
|
4
|
-
type AlertDialogRootProps<Payload> = Omit<BaseAlertDialog.Root.Props<Payload>, 'open' | 'defaultOpen' | 'onOpenChange'> & OpenStateProperties<NonNullable<BaseAlertDialog.Root.Props<Payload>['onOpenChange']>>;
|
|
5
|
-
declare function AlertDialogRoot<Payload = unknown>(props: AlertDialogRootProps<Payload>): ReactNode;
|
|
3
|
+
import type { OpenProps } from './overlay-root.tsx';
|
|
6
4
|
export declare const AlertDialog: {
|
|
7
|
-
|
|
8
|
-
Trigger: BaseAlertDialog.Trigger;
|
|
9
|
-
Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
-
Backdrop: ({ className, style, motion, ...props }: Omit<import("@base-ui/react").DialogBackdropProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
|
|
5
|
+
Backdrop: ({ className, style, motion, ...props }: import("react").ComponentProps<(props: import("@ui-sdk/react/primitive").PartProps<"div", import("@ui-sdk/core/dialog").DialogBackdropState>) => React.JSX.Element | null> & {
|
|
11
6
|
readonly motion?: "none" | "standard";
|
|
12
7
|
}) => ReactNode;
|
|
13
|
-
Popup: ({ className, style, xstyle, motion, ...props }: Omit<import("
|
|
8
|
+
Popup: ({ className, style, xstyle, motion, ...props }: (Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children" | "className" | "style"> & {
|
|
9
|
+
className?: string | ((state: import("@ui-sdk/core/dialog").DialogContentState<unknown>) => string | undefined);
|
|
10
|
+
style?: import("react").CSSProperties | ((state: import("@ui-sdk/core/dialog").DialogContentState<unknown>) => React.CSSProperties | undefined);
|
|
11
|
+
render?: import("@ui-sdk/react/primitive").RenderProp<import("@ui-sdk/core/dialog").DialogContentState<unknown>>;
|
|
12
|
+
children?: ((state: import("@ui-sdk/core/dialog").DialogContentState<unknown>) => React.ReactNode) | ReactNode;
|
|
13
|
+
} & import("@ui-sdk/core").PortalProps & {
|
|
14
|
+
initialFocus?: import("@ui-sdk/core/dialog").DialogInitialFocus;
|
|
15
|
+
finalFocus?: import("@ui-sdk/core/dialog").DialogFinalFocus;
|
|
16
|
+
keepMounted?: boolean;
|
|
17
|
+
inline?: boolean;
|
|
18
|
+
}) & {
|
|
14
19
|
readonly xstyle?: import("../../foundations/src/style-composition.ts").PlacementStyle;
|
|
15
20
|
readonly motion?: "none" | "standard";
|
|
16
21
|
}) => ReactNode;
|
|
17
|
-
Title: ({ className, style, ...props }:
|
|
18
|
-
Description: ({ className, style, ...props }:
|
|
19
|
-
|
|
22
|
+
Title: ({ className, style, ...props }: import("react").ComponentProps<import("@ui-sdk/react/primitive").PartComponent<import("@ui-sdk/core/dialog").DialogPrimitive, "title", "h2">>) => ReactNode;
|
|
23
|
+
Description: ({ className, style, ...props }: import("react").ComponentProps<import("@ui-sdk/react/primitive").PartComponent<import("@ui-sdk/core/dialog").DialogPrimitive, "description", "p">>) => ReactNode;
|
|
24
|
+
Root: (props: OpenProps<SDK.AlertDialogProps>) => ReactNode;
|
|
25
|
+
Trigger: typeof SDK.AlertDialogTrigger;
|
|
26
|
+
Close: import("@ui-sdk/react/primitive").PartComponent<import("@ui-sdk/core/dialog").DialogPrimitive, "close", "button">;
|
|
20
27
|
};
|
|
21
|
-
export {};
|
|
@@ -1,31 +1,46 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as SDK from '@ui-sdk/react/dialog';
|
|
2
2
|
import type { ComponentProps, ReactNode } from 'react';
|
|
3
|
-
import type { OpenStateProperties } from '../../foundations/src/control-state.ts';
|
|
4
3
|
import type { PlacementStyle } from '../../foundations/src/style-composition.ts';
|
|
4
|
+
import type { OpenProps } from './overlay-root.tsx';
|
|
5
5
|
type DialogMotion = 'standard' | 'none';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export declare function styledDialogParts(parts: {
|
|
7
|
+
Backdrop: typeof SDK.DialogBackdrop;
|
|
8
|
+
Content: typeof SDK.DialogContent;
|
|
9
|
+
Title: typeof SDK.DialogTitle;
|
|
10
|
+
Description: typeof SDK.DialogDescription;
|
|
11
|
+
}): {
|
|
12
|
+
Backdrop: ({ className, style, motion, ...props }: ComponentProps<typeof parts.Backdrop> & {
|
|
13
|
+
readonly motion?: DialogMotion;
|
|
14
|
+
}) => ReactNode;
|
|
15
|
+
Popup: ({ className, style, xstyle, motion, ...props }: ComponentProps<typeof parts.Content> & {
|
|
16
|
+
readonly xstyle?: PlacementStyle;
|
|
17
|
+
readonly motion?: DialogMotion;
|
|
18
|
+
}) => ReactNode;
|
|
19
|
+
Title: ({ className, style, ...props }: ComponentProps<typeof parts.Title>) => ReactNode;
|
|
20
|
+
Description: ({ className, style, ...props }: ComponentProps<typeof parts.Description>) => ReactNode;
|
|
9
21
|
};
|
|
10
|
-
type DialogPopupProps = ComponentProps<typeof BaseDialog.Popup> & {
|
|
11
|
-
readonly xstyle?: PlacementStyle;
|
|
12
|
-
readonly motion?: DialogMotion;
|
|
13
|
-
};
|
|
14
|
-
type DialogTitleProps = ComponentProps<typeof BaseDialog.Title>;
|
|
15
|
-
type DialogDescriptionProps = ComponentProps<typeof BaseDialog.Description>;
|
|
16
|
-
declare function DialogRoot<Payload = unknown>(props: DialogRootProps<Payload>): ReactNode;
|
|
17
|
-
declare function DialogBackdrop({ className, style, motion, ...props }: DialogBackdropProps): ReactNode;
|
|
18
|
-
declare function DialogPopup({ className, style, xstyle, motion, ...props }: DialogPopupProps): ReactNode;
|
|
19
|
-
declare function DialogTitle({ className, style, ...props }: DialogTitleProps): ReactNode;
|
|
20
|
-
declare function DialogDescription({ className, style, ...props }: DialogDescriptionProps): ReactNode;
|
|
21
22
|
export declare const Dialog: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
Backdrop: ({ className, style, motion, ...props }: ComponentProps<(props: import("@ui-sdk/react/primitive").PartProps<"div", import("@ui-sdk/core/dialog").DialogBackdropState>) => React.JSX.Element | null> & {
|
|
24
|
+
readonly motion?: DialogMotion;
|
|
25
|
+
}) => ReactNode;
|
|
26
|
+
Popup: ({ className, style, xstyle, motion, ...props }: (Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children" | "className" | "style"> & {
|
|
27
|
+
className?: string | ((state: SDK.DialogContentState<unknown>) => string | undefined);
|
|
28
|
+
style?: import("react").CSSProperties | ((state: SDK.DialogContentState<unknown>) => React.CSSProperties | undefined);
|
|
29
|
+
render?: import("@ui-sdk/react/primitive").RenderProp<SDK.DialogContentState<unknown>>;
|
|
30
|
+
children?: ((state: SDK.DialogContentState<unknown>) => React.ReactNode) | ReactNode;
|
|
31
|
+
} & import("@ui-sdk/core").PortalProps & {
|
|
32
|
+
initialFocus?: SDK.DialogInitialFocus;
|
|
33
|
+
finalFocus?: SDK.DialogFinalFocus;
|
|
34
|
+
keepMounted?: boolean;
|
|
35
|
+
inline?: boolean;
|
|
36
|
+
}) & {
|
|
37
|
+
readonly xstyle?: PlacementStyle;
|
|
38
|
+
readonly motion?: DialogMotion;
|
|
39
|
+
}) => ReactNode;
|
|
40
|
+
Title: ({ className, style, ...props }: ComponentProps<import("@ui-sdk/react/primitive").PartComponent<SDK.DialogPrimitive, "title", "h2">>) => ReactNode;
|
|
41
|
+
Description: ({ className, style, ...props }: ComponentProps<import("@ui-sdk/react/primitive").PartComponent<SDK.DialogPrimitive, "description", "p">>) => ReactNode;
|
|
42
|
+
Root: (props: OpenProps<SDK.DialogProps>) => ReactNode;
|
|
43
|
+
Trigger: typeof SDK.DialogTrigger;
|
|
44
|
+
Close: import("@ui-sdk/react/primitive").PartComponent<SDK.DialogPrimitive, "close", "button">;
|
|
30
45
|
};
|
|
31
46
|
export {};
|
|
@@ -1,33 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as SDK from '@ui-sdk/react/drawer';
|
|
2
2
|
import type { ComponentProps, ReactNode } from 'react';
|
|
3
|
-
import type { OpenStateProperties } from '../../foundations/src/control-state.ts';
|
|
4
3
|
import type { PlacementStyle } from '../../foundations/src/style-composition.ts';
|
|
5
|
-
type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type DrawerPopupProps = ComponentProps<typeof BaseDrawer.Popup> & {
|
|
4
|
+
import type { OpenProps } from './overlay-root.tsx';
|
|
5
|
+
declare function Backdrop({ className, style, ...props }: ComponentProps<typeof SDK.DrawerBackdrop>): ReactNode;
|
|
6
|
+
declare function Popup({ className, style, xstyle, ...props }: ComponentProps<typeof SDK.DrawerContent> & {
|
|
9
7
|
readonly xstyle?: PlacementStyle;
|
|
10
|
-
};
|
|
11
|
-
|
|
8
|
+
}): ReactNode;
|
|
9
|
+
declare function Title({ className, style, isVisuallyHidden, ...props }: ComponentProps<typeof SDK.DrawerTitle> & {
|
|
12
10
|
readonly isVisuallyHidden?: boolean;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
declare function DrawerRoot<Payload = unknown>(props: DrawerRootProps<Payload>): ReactNode;
|
|
16
|
-
declare function DrawerBackdrop({ className, style, ...props }: DrawerBackdropProps): ReactNode;
|
|
17
|
-
declare function DrawerViewport({ className, style, ...props }: DrawerViewportProps): ReactNode;
|
|
18
|
-
declare function DrawerPopup({ className, style, xstyle, ...props }: DrawerPopupProps): ReactNode;
|
|
19
|
-
declare function DrawerTitle({ className, style, isVisuallyHidden, ...props }: DrawerTitleProps): ReactNode;
|
|
20
|
-
declare function DrawerDescription({ className, style, ...props }: DrawerDescriptionProps): ReactNode;
|
|
11
|
+
}): ReactNode;
|
|
12
|
+
declare function Description({ className, style, ...props }: ComponentProps<typeof SDK.DrawerDescription>): ReactNode;
|
|
21
13
|
export declare const Drawer: {
|
|
22
|
-
|
|
23
|
-
Root:
|
|
24
|
-
Trigger:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Description: typeof DrawerDescription;
|
|
31
|
-
Close: BaseDrawer.Close;
|
|
14
|
+
createController: typeof SDK.createDrawerController;
|
|
15
|
+
Root: (props: OpenProps<Omit<SDK.DrawerProps, "defaultSnapPoint" | "onSnapPointChange" | "side" | "snapPoint" | "snapPoints">>) => ReactNode;
|
|
16
|
+
Trigger: typeof SDK.DrawerTrigger;
|
|
17
|
+
Backdrop: typeof Backdrop;
|
|
18
|
+
Popup: typeof Popup;
|
|
19
|
+
Title: typeof Title;
|
|
20
|
+
Description: typeof Description;
|
|
21
|
+
Close: import("@ui-sdk/react/primitive").PartComponent<SDK.DrawerPrimitive, "close", "button">;
|
|
32
22
|
};
|
|
33
23
|
export {};
|
|
@@ -1,51 +1,44 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as SDK from '@ui-sdk/react/menu';
|
|
2
2
|
import type { ComponentProps, ReactNode } from 'react';
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
import type { OpenProps } from './overlay-root.tsx';
|
|
4
|
+
declare function SubmenuRoot(props: OpenProps<SDK.MenuSubProps>): ReactNode;
|
|
5
|
+
declare function Popup({ className, style, sideOffset, ...props }: ComponentProps<typeof SDK.MenuContent>): ReactNode;
|
|
6
|
+
type ItemProps = Omit<ComponentProps<typeof SDK.MenuItem>, 'onClick'>;
|
|
7
|
+
declare function Item({ className, style, ...props }: ItemProps): ReactNode;
|
|
8
|
+
type LinkItemProps = Omit<ItemProps, 'render'> & Pick<ComponentProps<'a'>, 'target' | 'rel'> & {
|
|
9
|
+
readonly href: string;
|
|
10
|
+
};
|
|
11
|
+
declare function LinkItem({ href, target, rel, ...props }: LinkItemProps): ReactNode;
|
|
12
|
+
declare function GroupLabel({ className, style, ...props }: ComponentProps<typeof SDK.MenuGroupLabel>): ReactNode;
|
|
13
|
+
declare function Separator({ className, style, ...props }: ComponentProps<typeof SDK.MenuSeparator>): ReactNode;
|
|
14
|
+
type CheckboxItemProps = Omit<ComponentProps<typeof SDK.MenuCheckboxItem>, 'children' | 'defaultChecked' | 'checked' | 'onCheckedChange'> & {
|
|
12
15
|
readonly checked: boolean;
|
|
13
|
-
readonly onCheckedChange: NonNullable<
|
|
16
|
+
readonly onCheckedChange: NonNullable<SDK.MenuCheckboxItemProps['onCheckedChange']>;
|
|
17
|
+
readonly children?: ReactNode;
|
|
14
18
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
readonly
|
|
19
|
+
declare function CheckboxItem({ className, style, children, ...props }: CheckboxItemProps): ReactNode;
|
|
20
|
+
type RadioGroupProps<T extends string> = Omit<ComponentProps<typeof SDK.MenuRadioGroup<T>>, 'defaultValue' | 'value' | 'onValueChange'> & {
|
|
21
|
+
readonly value: T;
|
|
22
|
+
readonly onValueChange: NonNullable<SDK.MenuRadioGroupProps<T>['onValueChange']>;
|
|
18
23
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
declare function
|
|
24
|
-
declare function MenuPositioner({ className, style, sideOffset, ...props }: MenuPositionerProps): ReactNode;
|
|
25
|
-
declare function MenuPopup({ className, style, ...props }: MenuPopupProps): ReactNode;
|
|
26
|
-
declare function MenuItem({ className, style, ...props }: MenuItemProps): ReactNode;
|
|
27
|
-
declare function MenuLinkItem({ className, style, ...props }: MenuLinkItemProps): ReactNode;
|
|
28
|
-
declare function MenuGroupLabel({ className, style, ...props }: MenuGroupLabelProps): ReactNode;
|
|
29
|
-
declare function MenuSeparator({ className, style, ...props }: MenuSeparatorProps): ReactNode;
|
|
30
|
-
declare function MenuCheckboxItem({ className, style, children, ...props }: MenuCheckboxItemProps): ReactNode;
|
|
31
|
-
declare function MenuRadioGroup(props: MenuRadioGroupProps): ReactNode;
|
|
32
|
-
declare function MenuRadioItem({ className, style, children, ...props }: MenuRadioItemProps): ReactNode;
|
|
33
|
-
declare function MenuSubmenuTrigger({ className, style, ...props }: MenuSubmenuTriggerProps): ReactNode;
|
|
24
|
+
declare function RadioGroup<T extends string>(props: RadioGroupProps<T>): ReactNode;
|
|
25
|
+
declare function RadioItem({ children, className, style, ...props }: Omit<ComponentProps<typeof SDK.MenuRadioItem>, 'children'> & {
|
|
26
|
+
readonly children?: ReactNode;
|
|
27
|
+
}): ReactNode;
|
|
28
|
+
declare function SubmenuTrigger({ className, style, ...props }: ComponentProps<typeof SDK.MenuSubTrigger>): ReactNode;
|
|
34
29
|
export declare const Menu: {
|
|
35
|
-
Root:
|
|
36
|
-
Trigger:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
SubmenuRoot: typeof MenuSubmenuRoot;
|
|
49
|
-
SubmenuTrigger: typeof MenuSubmenuTrigger;
|
|
30
|
+
Root: (props: OpenProps<SDK.MenuProps>) => ReactNode;
|
|
31
|
+
Trigger: typeof SDK.MenuTrigger;
|
|
32
|
+
Popup: typeof Popup;
|
|
33
|
+
Item: typeof Item;
|
|
34
|
+
LinkItem: typeof LinkItem;
|
|
35
|
+
Group: typeof SDK.MenuGroup;
|
|
36
|
+
GroupLabel: typeof GroupLabel;
|
|
37
|
+
Separator: typeof Separator;
|
|
38
|
+
CheckboxItem: typeof CheckboxItem;
|
|
39
|
+
RadioGroup: typeof RadioGroup;
|
|
40
|
+
RadioItem: typeof RadioItem;
|
|
41
|
+
SubmenuRoot: typeof SubmenuRoot;
|
|
42
|
+
SubmenuTrigger: typeof SubmenuTrigger;
|
|
50
43
|
};
|
|
51
44
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import type { OpenStateProperties } from '../../foundations/src/control-state.ts';
|
|
3
|
+
export type OpenProps<Props extends {
|
|
4
|
+
onOpenChange?: (...args: Array<never>) => void;
|
|
5
|
+
}> = Omit<Props, 'open' | 'defaultOpen' | 'onOpenChange'> & OpenStateProperties<NonNullable<Props['onOpenChange']>>;
|
|
6
|
+
type PortalContainer = Element | DocumentFragment | null;
|
|
7
|
+
export declare function withOverlayPortal<Props extends {
|
|
8
|
+
container?: PortalContainer;
|
|
9
|
+
}>(Root: ComponentType<Props>): (props: Props) => ReactNode;
|
|
10
|
+
export {};
|
|
@@ -1,24 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as SDK from '@ui-sdk/react/popover';
|
|
2
2
|
import type { ComponentProps, ReactNode } from 'react';
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type PopoverTitleProps = ComponentProps<typeof BasePopover.Title>;
|
|
8
|
-
type PopoverDescriptionProps = ComponentProps<typeof BasePopover.Description>;
|
|
9
|
-
declare function PopoverRoot<Payload = unknown>(props: PopoverRootProps<Payload>): ReactNode;
|
|
10
|
-
declare function PopoverPositioner({ className, style, sideOffset, ...props }: PopoverPositionerProps): ReactNode;
|
|
11
|
-
declare function PopoverPopup({ className, style, ...props }: PopoverPopupProps): ReactNode;
|
|
12
|
-
declare function PopoverTitle({ className, style, ...props }: PopoverTitleProps): ReactNode;
|
|
13
|
-
declare function PopoverDescription({ className, style, ...props }: PopoverDescriptionProps): ReactNode;
|
|
3
|
+
import type { OpenProps } from './overlay-root.tsx';
|
|
4
|
+
declare function Popup({ className, style, sideOffset, ...props }: ComponentProps<typeof SDK.PopoverContent>): ReactNode;
|
|
5
|
+
declare function Title({ className, style, ...props }: ComponentProps<typeof SDK.PopoverTitle>): ReactNode;
|
|
6
|
+
declare function Description({ className, style, ...props }: ComponentProps<typeof SDK.PopoverDescription>): ReactNode;
|
|
14
7
|
export declare const Popover: {
|
|
15
|
-
Root:
|
|
16
|
-
Trigger:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Description: typeof PopoverDescription;
|
|
22
|
-
Close: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").PopoverCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
Root: (props: OpenProps<SDK.PopoverProps>) => ReactNode;
|
|
9
|
+
Trigger: typeof SDK.PopoverTrigger;
|
|
10
|
+
Popup: typeof Popup;
|
|
11
|
+
Title: typeof Title;
|
|
12
|
+
Description: typeof Description;
|
|
13
|
+
Close: import("@ui-sdk/react/primitive").PartComponent<SDK.PopoverPrimitive, "close", "button">;
|
|
23
14
|
};
|
|
24
15
|
export {};
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as SDK from '@ui-sdk/react/hover-card';
|
|
2
2
|
import type { ComponentProps, ReactNode } from 'react';
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
type PreviewPositionerProps = ComponentProps<typeof BasePreview.Positioner>;
|
|
6
|
-
type PreviewPopupProps = ComponentProps<typeof BasePreview.Popup>;
|
|
7
|
-
declare function PreviewRoot<Payload = unknown>(props: PreviewRootProps<Payload>): ReactNode;
|
|
8
|
-
declare function PreviewPositioner({ className, style, sideOffset, ...props }: PreviewPositionerProps): ReactNode;
|
|
9
|
-
declare function PreviewPopup({ className, style, ...props }: PreviewPopupProps): ReactNode;
|
|
3
|
+
import type { OpenProps } from './overlay-root.tsx';
|
|
4
|
+
declare function Popup({ className, style, sideOffset, ...props }: ComponentProps<typeof SDK.HoverCardContent>): ReactNode;
|
|
10
5
|
export declare const Preview: {
|
|
11
|
-
Root:
|
|
12
|
-
Trigger:
|
|
13
|
-
|
|
14
|
-
Positioner: typeof PreviewPositioner;
|
|
15
|
-
Popup: typeof PreviewPopup;
|
|
6
|
+
Root: (props: OpenProps<SDK.HoverCardProps>) => ReactNode;
|
|
7
|
+
Trigger: typeof SDK.HoverCardTrigger;
|
|
8
|
+
Popup: typeof Popup;
|
|
16
9
|
};
|
|
17
10
|
export {};
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
type
|
|
5
|
-
type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import type { TooltipContentProps, TooltipContentState, TooltipOptions, TooltipTriggerProps, TooltipTriggerState } from '@ui-sdk/core/tooltip';
|
|
2
|
+
import type { PartProps } from '@ui-sdk/react/primitive';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
import type { OpenProps } from './overlay-root.tsx';
|
|
5
|
+
type RootProps = OpenProps<TooltipOptions> & {
|
|
6
|
+
readonly children?: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
type TriggerProps = Omit<PartProps<'button', TooltipTriggerState>, 'value' | 'defaultValue' | 'onChange'> & TooltipTriggerProps;
|
|
9
|
+
type PopupProps = PartProps<'div', TooltipContentState> & TooltipContentProps;
|
|
10
10
|
export declare const Tooltip: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").TooltipPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
-
Positioner: typeof TooltipPositioner;
|
|
16
|
-
Popup: typeof TooltipPopup;
|
|
11
|
+
Root: (props: RootProps) => ReactNode;
|
|
12
|
+
Trigger: (props: TriggerProps) => ReactNode;
|
|
13
|
+
Popup: (props: PopupProps) => ReactNode;
|
|
17
14
|
};
|
|
18
15
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./use-scroll-tab-index-Dxpdh4W7.js";
|
|
2
|
-
import { n as t,
|
|
2
|
+
import { n as t, r as n } from "./code-block-C4K1sM9O.js";
|
|
3
3
|
import { t as r } from "./viewer-styles-DsFYri4K.js";
|
|
4
4
|
import * as i from "@stylexjs/stylex";
|
|
5
5
|
import { useCallback as a, useState as o } from "react";
|
|
@@ -18,7 +18,7 @@ var m = {
|
|
|
18
18
|
},
|
|
19
19
|
{ "--x-maxHeight": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
|
|
20
20
|
] };
|
|
21
|
-
d("mechane", () => Promise.resolve(
|
|
21
|
+
d("mechane", () => Promise.resolve(t), "zed");
|
|
22
22
|
function g(e) {
|
|
23
23
|
return e === null ? null : {
|
|
24
24
|
name: e.name,
|
|
@@ -29,7 +29,7 @@ function g(e) {
|
|
|
29
29
|
function _(e) {
|
|
30
30
|
return e.patch === void 0 ? [l(g(e.before), g(e.after), {}, !0)] : u(e.patch, { throwOnError: !0 }).flatMap((e) => e.files);
|
|
31
31
|
}
|
|
32
|
-
function v({ files:
|
|
32
|
+
function v({ files: t, layout: l, shouldWrap: u, showUnchanged: d, annotations: m, maxHeight: g, label: _ }) {
|
|
33
33
|
let [v] = o(() => new c()), y = e(), b = a((e) => {
|
|
34
34
|
y.ref(e), e === null ? v.cleanUp() : v.setup(e);
|
|
35
35
|
}, [v, y.ref]);
|
|
@@ -41,14 +41,14 @@ function v({ files: n, layout: l, shouldWrap: u, showUnchanged: d, annotations:
|
|
|
41
41
|
"aria-label": `${_} changes`,
|
|
42
42
|
tabIndex: y.tabIndex,
|
|
43
43
|
...i.props(r.scrollRegion, h.viewport(g)),
|
|
44
|
-
children: /* @__PURE__ */ s("div", { children:
|
|
44
|
+
children: /* @__PURE__ */ s("div", { children: t.map((e) => /* @__PURE__ */ s(f, {
|
|
45
45
|
fileDiff: e,
|
|
46
46
|
disableWorkerPool: !0,
|
|
47
47
|
options: {
|
|
48
48
|
preferredHighlighter: "highlights",
|
|
49
49
|
theme: "mechane",
|
|
50
50
|
themeType: "system",
|
|
51
|
-
unsafeCSS:
|
|
51
|
+
unsafeCSS: n,
|
|
52
52
|
diffStyle: l,
|
|
53
53
|
overflow: u ? "wrap" : "scroll",
|
|
54
54
|
hunkSeparators: "metadata",
|