@mechane-ai/elements 0.7.1 → 0.9.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 +73 -36
- package/dist/ai.js +231 -170
- package/dist/assets/stylex.css +464 -166
- package/dist/{categorical-values-75J0TUkR.js → categorical-values-DYRiw5Qd.js} +2 -2
- package/dist/{chart-frame--DOsZKwP.js → chart-frame-RL1hCWBC.js} +2 -1
- package/dist/{chart-input-C-g586YE.js → chart-input-Bm3ot1yD.js} +2 -2
- package/dist/charts/cartesian.js +6 -5
- 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 +1 -1
- package/dist/charts.js +1 -1
- package/dist/{code-block-D0Jmsj7w.js → code-block-B30xQKqg.js} +1 -1
- package/dist/collections.js +369 -244
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +2 -2
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +4 -4
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-HLYu0cmz.js → content-link-BrPrpBof.js} +1 -1
- package/dist/content.js +35 -35
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +7 -7
- package/dist/forms.js +1 -1
- package/dist/index.js +1 -1
- package/dist/layout.js +144 -91
- package/dist/navigation/commands.js +1 -1
- package/dist/packages/ai/src/conversation.d.ts +2 -1
- package/dist/packages/ai/src/index.d.ts +4 -0
- package/dist/packages/ai/src/message-action.d.ts +10 -0
- package/dist/packages/ai/src/message-boundary.d.ts +6 -0
- package/dist/packages/ai/src/message.d.ts +2 -1
- package/dist/packages/charts/src/chart-theme.d.ts +1 -0
- package/dist/packages/collections/src/data-table.d.ts +9 -1
- package/dist/packages/collections/src/index.d.ts +4 -2
- package/dist/packages/collections/src/metrics.d.ts +5 -2
- package/dist/packages/collections/src/timeline.d.ts +26 -0
- package/dist/packages/core/src/actions.d.ts +7 -0
- package/dist/packages/core/src/agent-avatar-glyphs.d.ts +5 -0
- package/dist/packages/core/src/agent-avatar.d.ts +17 -0
- package/dist/packages/core/src/copy-value.d.ts +2 -1
- package/dist/packages/core/src/index.d.ts +5 -1
- package/dist/packages/forms/src/agent-avatar-picker.d.ts +8 -0
- package/dist/packages/forms/src/field-styles.d.ts +19 -0
- package/dist/packages/forms/src/forms.d.ts +2 -1
- package/dist/packages/forms/src/index.d.ts +2 -0
- package/dist/packages/foundations/src/tokens.stylex.d.ts +52 -0
- package/dist/packages/layout/src/app-shell.d.ts +2 -1
- package/dist/packages/layout/src/index.d.ts +2 -1
- package/dist/packages/layout/src/page-toolbar.d.ts +3 -1
- package/dist/packages/layout/src/sidebar.d.ts +4 -0
- package/dist/packages/layout/src/view-stack.d.ts +13 -0
- package/dist/packages/layout/src/workbench.d.ts +5 -2
- package/dist/{pierre-tree-DVybsnm4.js → pierre-tree-CRk09rx7.js} +2 -2
- package/dist/{src-DjTM64tN.js → src-Cc0Sadzr.js} +378 -295
- package/dist/{src-B_DCatpY.js → src-DuuAmS-c.js} +1 -1
- package/dist/src-elMBQ2Dh.js +1087 -0
- package/dist/theme.js +1 -1
- package/dist/tokens.js +61 -10
- package/package.json +1 -1
- package/packages/foundations/src/tokens.stylex.ts +54 -0
- package/dist/src-BkCsvZGi.js +0 -675
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Button as BaseButton } from '@base-ui/react/button';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
3
|
import type { ComponentProps, ReactNode } from 'react';
|
|
3
4
|
import type { ControlStyle, PlacementStyle } from '../../foundations/src/style-composition.ts';
|
|
4
5
|
type ButtonVariant = 'solid' | 'outline' | 'ghost';
|
|
@@ -17,6 +18,11 @@ type ButtonProps = ComponentProps<typeof BaseButton> & PendingProps & {
|
|
|
17
18
|
type IconButtonProps = Omit<ButtonProps, 'aria-label' | 'pendingLabel'> & {
|
|
18
19
|
readonly 'aria-label': string;
|
|
19
20
|
};
|
|
21
|
+
type IconLinkProps = Omit<useRender.ComponentProps<'a'>, 'aria-label'> & {
|
|
22
|
+
readonly 'aria-label': string;
|
|
23
|
+
readonly 'size'?: ControlSize;
|
|
24
|
+
readonly 'xstyle'?: PlacementStyle;
|
|
25
|
+
};
|
|
20
26
|
type TextButtonProps = ComponentProps<typeof BaseButton> & PendingProps & {
|
|
21
27
|
readonly tone?: ButtonTone;
|
|
22
28
|
readonly xstyle?: PlacementStyle;
|
|
@@ -28,4 +34,5 @@ export declare function Button({ variant, tone, size, pending, pendingLabel, chi
|
|
|
28
34
|
export declare function IconButton({ size, children, xstyle, ...props }: IconButtonProps): ReactNode;
|
|
29
35
|
export declare function TextButton({ tone, pending, pendingLabel, children, className, style, xstyle, disabled, ...props }: TextButtonProps): ReactNode;
|
|
30
36
|
export declare function TextLink({ xstyle, ...props }: TextLinkProps): ReactNode;
|
|
37
|
+
export declare function IconLink({ size, children, xstyle, render, ref, ...props }: IconLinkProps): ReactNode;
|
|
31
38
|
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export declare const seededAgentAvatarShapes: readonly ["spark", "facet", "orbit", "loop", "clover", "petal", "wheel", "compass", "grid", "steps", "chevron", "wave", "ripple", "arch", "bridge", "peak", "zigzag", "helix", "kite", "cube", "prism", "frame", "brackets", "diamond", "hexagon", "signal", "crest", "bolt", "link", "split", "aster", "portal"];
|
|
3
|
+
export declare const agentAvatarShapes: readonly ["spark", "facet", "orbit", "loop", "clover", "petal", "wheel", "compass", "grid", "steps", "chevron", "wave", "ripple", "arch", "bridge", "peak", "zigzag", "helix", "kite", "cube", "prism", "frame", "brackets", "diamond", "hexagon", "signal", "crest", "bolt", "link", "split", "aster", "portal"];
|
|
4
|
+
export type AgentAvatarShape = (typeof agentAvatarShapes)[number];
|
|
5
|
+
export declare const agentAvatarGlyphs: Readonly<Record<AgentAvatarShape, ReactNode>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { AgentAvatarShape } from './agent-avatar-glyphs.tsx';
|
|
3
|
+
export declare const agentAvatarColors: readonly ["ember", "coral", "rose", "berry", "plum", "orchid", "violet", "indigo", "iris", "cobalt", "blue", "sky", "cyan", "lagoon", "teal", "jade", "mint", "forest", "leaf", "moss", "olive", "ochre", "amber", "copper"];
|
|
4
|
+
export type AgentAvatarColor = (typeof agentAvatarColors)[number];
|
|
5
|
+
export type AgentAvatarSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
6
|
+
export type AgentAppearance = {
|
|
7
|
+
readonly shape: AgentAvatarShape;
|
|
8
|
+
readonly color: AgentAvatarColor;
|
|
9
|
+
};
|
|
10
|
+
export declare function agentAppearance(seed: string): AgentAppearance;
|
|
11
|
+
export type AgentAvatarProps = {
|
|
12
|
+
readonly seed: string;
|
|
13
|
+
readonly appearance?: AgentAppearance | undefined;
|
|
14
|
+
readonly size?: AgentAvatarSize;
|
|
15
|
+
readonly label?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function AgentAvatar({ seed, appearance, size, label }: AgentAvatarProps): ReactNode;
|
|
@@ -4,6 +4,7 @@ type CopySource = string | (() => string);
|
|
|
4
4
|
type CopyValueProps = Omit<ComponentProps<typeof BaseButton>, 'value'> & {
|
|
5
5
|
readonly value: CopySource;
|
|
6
6
|
readonly label: string;
|
|
7
|
+
readonly display?: 'value' | 'icon';
|
|
7
8
|
};
|
|
8
|
-
export declare function CopyValue({ value, label, children, className, style, disabled, onClick, ...props }: CopyValueProps): ReactNode;
|
|
9
|
+
export declare function CopyValue({ value, label, display, children, className, style, disabled, onClick, render, ...props }: CopyValueProps): ReactNode;
|
|
9
10
|
export {};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
export { Button, IconButton, TextButton, TextLink } from './actions.tsx';
|
|
1
|
+
export { Button, IconButton, IconLink, TextButton, TextLink } from './actions.tsx';
|
|
2
2
|
export type { AvatarProps } from './avatar.tsx';
|
|
3
3
|
export { Avatar } from './avatar.tsx';
|
|
4
|
+
export type { AgentAvatarShape } from './agent-avatar-glyphs.tsx';
|
|
5
|
+
export { agentAvatarShapes } from './agent-avatar-glyphs.tsx';
|
|
6
|
+
export type { AgentAppearance, AgentAvatarColor, AgentAvatarProps, AgentAvatarSize } from './agent-avatar.tsx';
|
|
7
|
+
export { AgentAvatar, agentAppearance, agentAvatarColors } from './agent-avatar.tsx';
|
|
4
8
|
export { CopyValue } from './copy-value.tsx';
|
|
5
9
|
export { Accordion, Collapsible } from './disclosure.tsx';
|
|
6
10
|
export { Panel, Row, Stack, Columns, Divider } from './surfaces.tsx';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { AgentAppearance } from '../../core/src/index.ts';
|
|
3
|
+
export type AgentAvatarPickerProps = {
|
|
4
|
+
readonly value: AgentAppearance;
|
|
5
|
+
readonly onValueChange: (value: AgentAppearance) => void;
|
|
6
|
+
readonly disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function AgentAvatarPicker({ value, onValueChange, disabled }: AgentAvatarPickerProps): ReactNode;
|
|
@@ -68,6 +68,25 @@ export declare const fieldStyles: Readonly<{
|
|
|
68
68
|
readonly maxHeight: stylex.StyleXClassNameFor<"maxHeight", "30dvh">;
|
|
69
69
|
}>;
|
|
70
70
|
}>;
|
|
71
|
+
export declare const textareaAppearanceStyles: Readonly<{
|
|
72
|
+
readonly field: {};
|
|
73
|
+
readonly plain: Readonly<{
|
|
74
|
+
readonly minHeight: stylex.StyleXClassNameFor<"minHeight", string>;
|
|
75
|
+
readonly maxHeight: stylex.StyleXClassNameFor<"maxHeight", "30dvh">;
|
|
76
|
+
readonly fieldSizing: stylex.StyleXClassNameFor<"fieldSizing", "content">;
|
|
77
|
+
readonly resize: stylex.StyleXClassNameFor<"resize", "none">;
|
|
78
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", 0>;
|
|
79
|
+
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 0>;
|
|
80
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", 0>;
|
|
81
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "transparent">;
|
|
82
|
+
readonly ':focus-visible': stylex.StyleXClassNameFor<":focus-visible", {
|
|
83
|
+
readonly outlineStyle: "none";
|
|
84
|
+
}>;
|
|
85
|
+
readonly ':disabled': stylex.StyleXClassNameFor<":disabled", {
|
|
86
|
+
readonly backgroundColor: "transparent";
|
|
87
|
+
}>;
|
|
88
|
+
}>;
|
|
89
|
+
}>;
|
|
71
90
|
export declare const inputSizeStyles: Readonly<{
|
|
72
91
|
readonly sm: Readonly<{
|
|
73
92
|
readonly minHeight: stylex.StyleXClassNameFor<"minHeight", string>;
|
|
@@ -18,6 +18,7 @@ type NativeTextareaProps = ComponentProps<'textarea'>;
|
|
|
18
18
|
type TextareaProps = Omit<NativeTextareaProps, 'value' | 'defaultValue' | 'onChange' | 'readOnly'> & TextValueProperties<NonNullable<NativeTextareaProps['value']>, NonNullable<NativeTextareaProps['onChange']>, NonNullable<BaseInputProps['onValueChange']>> & {
|
|
19
19
|
readonly xstyle?: PlacementStyle;
|
|
20
20
|
readonly compact?: boolean;
|
|
21
|
+
readonly appearance?: 'field' | 'plain';
|
|
21
22
|
};
|
|
22
23
|
declare function FieldRoot({ className, style, xstyle, ...props }: FieldRootProps): ReactNode;
|
|
23
24
|
declare function FieldLabel({ className, style, ...props }: FieldLabelProps): ReactNode;
|
|
@@ -30,5 +31,5 @@ export declare const Field: {
|
|
|
30
31
|
Error: typeof FieldError;
|
|
31
32
|
};
|
|
32
33
|
export declare function Input({ className, style, xstyle, size, ...props }: InputProps): ReactNode;
|
|
33
|
-
export declare function Textarea({ compact, value, defaultValue, onValueChange, name, disabled, readOnly, required, className, style, xstyle, ...props }: TextareaProps): ReactNode;
|
|
34
|
+
export declare function Textarea({ compact, appearance, value, defaultValue, onValueChange, name, disabled, readOnly, required, className, style, xstyle, ...props }: TextareaProps): ReactNode;
|
|
34
35
|
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { Combobox } from './combobox.tsx';
|
|
2
|
+
export type { AgentAvatarPickerProps } from './agent-avatar-picker.tsx';
|
|
3
|
+
export { AgentAvatarPicker } from './agent-avatar-picker.tsx';
|
|
2
4
|
export { FilePicker, Fieldset, InputGroup, NumberField, Slider } from './form-controls.tsx';
|
|
3
5
|
export { Field, Input, Textarea } from './forms.tsx';
|
|
4
6
|
export { Select } from './select.tsx';
|
|
@@ -59,6 +59,58 @@ export declare const darkChartColors: {
|
|
|
59
59
|
positive: string;
|
|
60
60
|
missing: string;
|
|
61
61
|
};
|
|
62
|
+
export declare const avatarColors: stylex.VarGroup<Readonly<{
|
|
63
|
+
identity1: string;
|
|
64
|
+
identity2: string;
|
|
65
|
+
identity3: string;
|
|
66
|
+
identity4: string;
|
|
67
|
+
identity5: string;
|
|
68
|
+
identity6: string;
|
|
69
|
+
identity7: string;
|
|
70
|
+
identity8: string;
|
|
71
|
+
identity9: string;
|
|
72
|
+
identity10: string;
|
|
73
|
+
identity11: string;
|
|
74
|
+
identity12: string;
|
|
75
|
+
identity13: string;
|
|
76
|
+
identity14: string;
|
|
77
|
+
identity15: string;
|
|
78
|
+
identity16: string;
|
|
79
|
+
identity17: string;
|
|
80
|
+
identity18: string;
|
|
81
|
+
identity19: string;
|
|
82
|
+
identity20: string;
|
|
83
|
+
identity21: string;
|
|
84
|
+
identity22: string;
|
|
85
|
+
identity23: string;
|
|
86
|
+
identity24: string;
|
|
87
|
+
}>, symbol>;
|
|
88
|
+
export declare const darkAvatarColors: {
|
|
89
|
+
identity1: string;
|
|
90
|
+
identity2: string;
|
|
91
|
+
identity3: string;
|
|
92
|
+
identity4: string;
|
|
93
|
+
identity5: string;
|
|
94
|
+
identity6: string;
|
|
95
|
+
identity7: string;
|
|
96
|
+
identity8: string;
|
|
97
|
+
identity9: string;
|
|
98
|
+
identity10: string;
|
|
99
|
+
identity11: string;
|
|
100
|
+
identity12: string;
|
|
101
|
+
identity13: string;
|
|
102
|
+
identity14: string;
|
|
103
|
+
identity15: string;
|
|
104
|
+
identity16: string;
|
|
105
|
+
identity17: string;
|
|
106
|
+
identity18: string;
|
|
107
|
+
identity19: string;
|
|
108
|
+
identity20: string;
|
|
109
|
+
identity21: string;
|
|
110
|
+
identity22: string;
|
|
111
|
+
identity23: string;
|
|
112
|
+
identity24: string;
|
|
113
|
+
};
|
|
62
114
|
export declare const syntaxColors: stylex.VarGroup<Readonly<{
|
|
63
115
|
keyword: string;
|
|
64
116
|
string: string;
|
|
@@ -5,6 +5,7 @@ type AppShellProps = {
|
|
|
5
5
|
readonly footer?: ReactNode;
|
|
6
6
|
readonly children: ReactNode;
|
|
7
7
|
readonly mainId?: string;
|
|
8
|
+
readonly focus?: boolean;
|
|
8
9
|
};
|
|
9
|
-
export declare function AppShell({ sidebarHeader, sidebar, footer, children, mainId }: AppShellProps): ReactNode;
|
|
10
|
+
export declare function AppShell({ sidebarHeader, sidebar, footer, children, mainId, focus, }: AppShellProps): ReactNode;
|
|
10
11
|
export {};
|
|
@@ -2,9 +2,10 @@ export { AppShell } from './app-shell.tsx';
|
|
|
2
2
|
export { DetailPage } from './detail-page.tsx';
|
|
3
3
|
export { FocusPage } from './focus-page.tsx';
|
|
4
4
|
export { Workbench, WorkbenchScroll, WorkbenchFooter } from './workbench.tsx';
|
|
5
|
+
export { ViewStack } from './view-stack.tsx';
|
|
5
6
|
export { PageToolbar, ToolbarAction } from './page-toolbar.tsx';
|
|
6
7
|
export type { RecordPageRootProps, RecordPageToolbarProps, RecordPageBodyProps, RecordPageHeaderProps, RecordPageContentProps, RecordPageAsideProps, } from './record-page.tsx';
|
|
7
8
|
export { RecordPage } from './record-page.tsx';
|
|
8
9
|
export type { ResizableRootProps, ResizablePaneProps, ResizableHandleProps } from './resizable.tsx';
|
|
9
10
|
export { Resizable } from './resizable.tsx';
|
|
10
|
-
export { Navigation, NavigationItem, NavigationLink, SidebarLabel, SidebarFooter } from './sidebar.tsx';
|
|
11
|
+
export { Navigation, NavigationSection, NavigationItem, NavigationLink, SidebarLabel, SidebarFooter, } from './sidebar.tsx';
|
|
@@ -5,10 +5,12 @@ type PageToolbarProps = {
|
|
|
5
5
|
readonly actions?: ReactNode;
|
|
6
6
|
readonly breadcrumb?: boolean;
|
|
7
7
|
readonly navigation?: boolean;
|
|
8
|
+
readonly views?: ReactNode;
|
|
9
|
+
readonly leading?: ReactNode;
|
|
8
10
|
};
|
|
9
11
|
type ToolbarActionProps = Omit<ComponentProps<typeof Button>, 'variant' | 'size' | 'xstyle'> & {
|
|
10
12
|
readonly icon?: ReactNode;
|
|
11
13
|
};
|
|
12
|
-
export declare function PageToolbar({ title, actions, breadcrumb, navigation }: PageToolbarProps): ReactNode;
|
|
14
|
+
export declare function PageToolbar({ title, actions, breadcrumb, navigation, views, leading, }: PageToolbarProps): ReactNode;
|
|
13
15
|
export declare function ToolbarAction({ icon, children, ...props }: ToolbarActionProps): ReactNode;
|
|
14
16
|
export {};
|
|
@@ -39,6 +39,10 @@ type SidebarFooterProps = {
|
|
|
39
39
|
export declare function Sidebar({ header, footer, close, children }: SidebarProps): ReactNode;
|
|
40
40
|
export declare function SidebarClose(): ReactNode;
|
|
41
41
|
export declare function Navigation({ children, label }: NavigationProps): ReactNode;
|
|
42
|
+
export declare function NavigationSection({ children, label, }: {
|
|
43
|
+
readonly children: ReactNode;
|
|
44
|
+
readonly label: string;
|
|
45
|
+
}): ReactNode;
|
|
42
46
|
export declare function NavigationItem({ children, icon, selected, onClick, ...props }: NavigationItemProps): ReactNode;
|
|
43
47
|
export declare function NavigationLink({ children, icon, selected, onClick, className, style, ...props }: NavigationLinkProps): ReactNode;
|
|
44
48
|
export declare function SidebarLabel({ children, grow }: SidebarLabelProps): ReactNode;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
declare function ViewStackRoot({ children }: {
|
|
3
|
+
readonly children: ReactNode;
|
|
4
|
+
}): ReactNode;
|
|
5
|
+
declare function ViewStackPanel({ active, children }: {
|
|
6
|
+
readonly active: boolean;
|
|
7
|
+
readonly children: ReactNode;
|
|
8
|
+
}): ReactNode;
|
|
9
|
+
export declare const ViewStack: {
|
|
10
|
+
Root: typeof ViewStackRoot;
|
|
11
|
+
Panel: typeof ViewStackPanel;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
export declare function Workbench({ header, children, inspector, }: {
|
|
3
|
-
readonly header
|
|
3
|
+
readonly header?: ReactNode;
|
|
4
4
|
readonly children: ReactNode;
|
|
5
5
|
readonly inspector?: ReactNode;
|
|
6
6
|
}): ReactNode;
|
|
7
|
-
export declare function WorkbenchScroll({ children }: {
|
|
7
|
+
export declare function WorkbenchScroll({ label, children, flush, scrollRestorationId, }: {
|
|
8
|
+
readonly label: string;
|
|
8
9
|
readonly children: ReactNode;
|
|
10
|
+
readonly flush?: boolean;
|
|
11
|
+
readonly scrollRestorationId?: string;
|
|
9
12
|
}): ReactNode;
|
|
10
13
|
export declare function WorkbenchFooter({ children }: {
|
|
11
14
|
readonly children: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as e } from "./src-
|
|
2
|
-
import { l as t } from "./src-
|
|
1
|
+
import { c as e } from "./src-elMBQ2Dh.js";
|
|
2
|
+
import { l as t } from "./src-Cc0Sadzr.js";
|
|
3
3
|
import { conditions as n } from "./tokens.js";
|
|
4
4
|
import { r } from "./pierre-theme-BpESNIsV.js";
|
|
5
5
|
import * as i from "@stylexjs/stylex";
|