@mechane-ai/elements 0.8.0 → 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.
Files changed (61) hide show
  1. package/README.md +60 -39
  2. package/dist/ai.js +231 -170
  3. package/dist/assets/stylex.css +402 -164
  4. package/dist/{categorical-values-dGbaZ0tp.js → categorical-values-DYRiw5Qd.js} +2 -2
  5. package/dist/{chart-frame-DgPdIguO.js → chart-frame-RL1hCWBC.js} +1 -1
  6. package/dist/{chart-input-Sac4StHN.js → chart-input-Bm3ot1yD.js} +2 -2
  7. package/dist/charts/cartesian.js +5 -5
  8. package/dist/charts/distribution.js +2 -2
  9. package/dist/charts/graph.js +2 -2
  10. package/dist/charts/hierarchy.js +3 -3
  11. package/dist/charts/matrix.js +2 -2
  12. package/dist/charts/timeline.js +1 -1
  13. package/dist/charts.js +1 -1
  14. package/dist/{code-block-BRNdtTaP.js → code-block-B30xQKqg.js} +1 -1
  15. package/dist/collections.js +305 -261
  16. package/dist/content/code.js +1 -1
  17. package/dist/content/diff.js +2 -2
  18. package/dist/content/link.js +1 -1
  19. package/dist/content/markdown.js +4 -4
  20. package/dist/content/tree.js +2 -2
  21. package/dist/{content-link-Dd8gapwc.js → content-link-BrPrpBof.js} +1 -1
  22. package/dist/content.js +35 -35
  23. package/dist/feedback.js +1 -1
  24. package/dist/forms/dates.js +7 -7
  25. package/dist/forms.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/layout.js +138 -86
  28. package/dist/navigation/commands.js +1 -1
  29. package/dist/packages/ai/src/conversation.d.ts +2 -1
  30. package/dist/packages/ai/src/index.d.ts +4 -0
  31. package/dist/packages/ai/src/message-action.d.ts +10 -0
  32. package/dist/packages/ai/src/message-boundary.d.ts +6 -0
  33. package/dist/packages/ai/src/message.d.ts +2 -1
  34. package/dist/packages/collections/src/data-table.d.ts +6 -0
  35. package/dist/packages/collections/src/index.d.ts +2 -2
  36. package/dist/packages/collections/src/timeline.d.ts +10 -3
  37. package/dist/packages/core/src/actions.d.ts +7 -0
  38. package/dist/packages/core/src/agent-avatar-glyphs.d.ts +5 -0
  39. package/dist/packages/core/src/agent-avatar.d.ts +17 -0
  40. package/dist/packages/core/src/copy-value.d.ts +2 -1
  41. package/dist/packages/core/src/index.d.ts +5 -1
  42. package/dist/packages/forms/src/agent-avatar-picker.d.ts +8 -0
  43. package/dist/packages/forms/src/field-styles.d.ts +19 -0
  44. package/dist/packages/forms/src/forms.d.ts +2 -1
  45. package/dist/packages/forms/src/index.d.ts +2 -0
  46. package/dist/packages/foundations/src/tokens.stylex.d.ts +52 -0
  47. package/dist/packages/layout/src/app-shell.d.ts +2 -1
  48. package/dist/packages/layout/src/index.d.ts +2 -1
  49. package/dist/packages/layout/src/page-toolbar.d.ts +3 -1
  50. package/dist/packages/layout/src/sidebar.d.ts +4 -0
  51. package/dist/packages/layout/src/view-stack.d.ts +13 -0
  52. package/dist/packages/layout/src/workbench.d.ts +5 -2
  53. package/dist/{pierre-tree-DdE1boiT.js → pierre-tree-CRk09rx7.js} +2 -2
  54. package/dist/{src-Eg_ytPjv.js → src-Cc0Sadzr.js} +376 -293
  55. package/dist/{src-DV0BNk1M.js → src-DuuAmS-c.js} +1 -1
  56. package/dist/src-elMBQ2Dh.js +1087 -0
  57. package/dist/theme.js +1 -1
  58. package/dist/tokens.js +61 -10
  59. package/package.json +1 -1
  60. package/packages/foundations/src/tokens.stylex.ts +54 -0
  61. package/dist/src-Bc5sEhdO.js +0 -680
@@ -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: ReactNode;
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-Bc5sEhdO.js";
2
- import { l as t } from "./src-Eg_ytPjv.js";
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";