@mechane-ai/elements 0.13.0 → 0.14.1
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 +36 -12
- package/dist/ai.js +19 -19
- package/dist/{categorical-values-DwobbjBq.js → categorical-values-l5YTG9G3.js} +3 -3
- package/dist/{chart-frame-DAxsgMyl.js → chart-frame-Bf1l_7-R.js} +6 -6
- package/dist/{chart-input-B0snxbMH.js → chart-input-fBuRm0Lc.js} +3 -3
- package/dist/charts/cartesian.js +16 -16
- package/dist/charts/distribution.js +6 -6
- package/dist/charts/graph.js +5 -5
- package/dist/charts/hierarchy.js +3 -3
- package/dist/charts/matrix.js +13 -13
- package/dist/charts/timeline.js +30 -30
- package/dist/charts.js +1 -1
- package/dist/{code-block-VwrOHz5j.js → code-block-DB42-a0M.js} +4 -4
- package/dist/collections.js +330 -394
- package/dist/constants.stylex-bbdiv1fD.js +83 -0
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +5 -5
- 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-Oj-MtNYi.js → content-link-rdxJ94P8.js} +1 -1
- package/dist/content.js +5 -5
- package/dist/elements.css +73 -106
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +21 -21
- package/dist/forms.js +1 -1
- package/dist/index.js +1 -1
- package/dist/layout.js +22 -22
- package/dist/navigation/commands.js +6 -6
- package/dist/navigation.js +7 -7
- package/dist/overlays.js +1 -1
- package/dist/packages/ai/src/approval.d.ts +1 -1
- package/dist/packages/ai/src/conversation.d.ts +4 -4
- package/dist/packages/ai/src/prompt-input.d.ts +7 -7
- package/dist/packages/charts/src/cartesian/time-series-data.d.ts +1 -1
- package/dist/packages/charts/src/cartesian/time-series.d.ts +2 -2
- package/dist/packages/charts/src/chart-frame.d.ts +2 -2
- package/dist/packages/collections/src/collection-controls.d.ts +8 -7
- package/dist/packages/collections/src/collection-scroll.d.ts +2 -2
- package/dist/packages/collections/src/data-table.d.ts +6 -6
- package/dist/packages/collections/src/index.d.ts +2 -3
- package/dist/packages/content/src/code/code-block.d.ts +4 -4
- package/dist/packages/content/src/diff/diff-source.d.ts +1 -1
- package/dist/packages/content/src/diff/pierre-diff.d.ts +2 -2
- package/dist/packages/content/src/markdown/markdown.d.ts +2 -2
- package/dist/packages/content/src/trace.d.ts +3 -3
- package/dist/packages/core/src/actions.d.ts +2 -2
- package/dist/packages/core/src/surfaces.d.ts +6 -6
- package/dist/packages/core/src/text.d.ts +2 -2
- package/dist/packages/feedback/src/async-region.d.ts +5 -3
- package/dist/packages/feedback/src/control-placeholders.d.ts +5 -5
- package/dist/packages/feedback/src/feedback.d.ts +2 -2
- package/dist/packages/forms/src/form-actions.d.ts +2 -2
- package/dist/packages/forms/src/forms.d.ts +2 -2
- package/dist/packages/forms/src/selection-styles.d.ts +1 -1
- package/dist/packages/foundations/src/constants.stylex.d.ts +90 -0
- package/dist/packages/foundations/src/tokens.d.ts +2 -0
- package/dist/packages/foundations/src/tokens.stylex.d.ts +0 -90
- package/dist/packages/layout/src/app-shell.d.ts +2 -2
- package/dist/packages/layout/src/page-toolbar.d.ts +3 -3
- package/dist/packages/layout/src/record-page.d.ts +2 -2
- package/dist/packages/layout/src/resizable.d.ts +2 -2
- package/dist/packages/layout/src/sidebar.d.ts +6 -6
- package/dist/packages/layout/src/view-stack.d.ts +2 -2
- package/dist/packages/layout/src/workbench.d.ts +2 -2
- package/dist/packages/navigation/src/commands/command.d.ts +3 -3
- package/dist/packages/navigation/src/page-navigation.d.ts +4 -4
- package/dist/packages/overlays/src/drawer.d.ts +2 -2
- package/dist/{pierre-diff-sUAU-xeL.js → pierre-diff-C_j0nxwS.js} +2 -2
- package/dist/pierre-theme-BUeJim8s.js +127 -0
- package/dist/{pierre-tree-Db1yaDM2.js → pierre-tree-BaIVTNmG.js} +4 -4
- package/dist/{src-B0UTwpOz.js → src-BVsyKLQ8.js} +42 -41
- package/dist/{src-BNlyCwOr.js → src-BXh4g2VY.js} +36 -35
- package/dist/{src-DMsnWyru.js → src-R0kgHFPZ.js} +28 -28
- package/dist/{src-CVlgjAlw.js → src-d7EAi61b.js} +9 -9
- package/dist/theme.js +1 -1
- package/dist/tokens.js +3 -207
- package/dist/tokens.stylex-DTHHFbyl.js +128 -0
- package/package.json +4 -2
- package/packages/foundations/src/constants.stylex.ts +91 -0
- package/packages/foundations/src/tokens.stylex.ts +0 -90
- package/dist/packages/collections/src/table.d.ts +0 -17
- package/dist/pierre-theme-CBAncKdH.js +0 -126
|
@@ -4,8 +4,8 @@ type EmptyStateProps = Omit<ComponentProps<'div'>, 'title'> & {
|
|
|
4
4
|
readonly action?: ReactNode;
|
|
5
5
|
};
|
|
6
6
|
type NoticeProps = ComponentProps<'div'> & {
|
|
7
|
-
readonly
|
|
7
|
+
readonly hasError?: boolean;
|
|
8
8
|
};
|
|
9
9
|
export declare function EmptyState({ title, children, action, ...props }: EmptyStateProps): ReactNode;
|
|
10
|
-
export declare function Notice({
|
|
10
|
+
export declare function Notice({ hasError, ...props }: NoticeProps): ReactNode;
|
|
11
11
|
export {};
|
|
@@ -4,8 +4,8 @@ type FormActionsAlignment = 'start' | 'end';
|
|
|
4
4
|
export type FormActionsProps = {
|
|
5
5
|
readonly children: ReactNode;
|
|
6
6
|
readonly align?: FormActionsAlignment;
|
|
7
|
-
readonly
|
|
7
|
+
readonly hasSeparator?: boolean;
|
|
8
8
|
readonly xstyle?: PlacementStyle;
|
|
9
9
|
};
|
|
10
|
-
export declare function FormActions({ children, align,
|
|
10
|
+
export declare function FormActions({ children, align, hasSeparator, xstyle }: FormActionsProps): ReactNode;
|
|
11
11
|
export {};
|
|
@@ -17,7 +17,7 @@ export type InputProps = Omit<BaseInputProps, 'value' | 'defaultValue' | 'onChan
|
|
|
17
17
|
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
|
-
readonly
|
|
20
|
+
readonly isCompact?: boolean;
|
|
21
21
|
readonly appearance?: TextareaAppearance;
|
|
22
22
|
};
|
|
23
23
|
declare function FieldRoot({ className, style, xstyle, ...props }: FieldRootProps): ReactNode;
|
|
@@ -31,5 +31,5 @@ export declare const Field: {
|
|
|
31
31
|
Error: typeof FieldError;
|
|
32
32
|
};
|
|
33
33
|
export declare function Input({ className, style, xstyle, ...props }: InputProps): ReactNode;
|
|
34
|
-
export declare function Textarea({
|
|
34
|
+
export declare function Textarea({ isCompact, appearance, value, defaultValue, onValueChange, name, disabled, readOnly, required, className, style, xstyle, ...props }: TextareaProps): ReactNode;
|
|
35
35
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as stylex from '@stylexjs/stylex';
|
|
2
|
-
import { conditions } from '../../foundations/src/
|
|
2
|
+
import { conditions } from '../../foundations/src/constants.stylex.ts';
|
|
3
3
|
export declare const selectionStyles: Readonly<{
|
|
4
4
|
readonly trigger: Readonly<{
|
|
5
5
|
readonly display: stylex.StyleXClassNameFor<"display", "inline-flex">;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export declare const darkColors: {
|
|
2
|
+
canvas: string;
|
|
3
|
+
surface: string;
|
|
4
|
+
ink: string;
|
|
5
|
+
inkHover: string;
|
|
6
|
+
inverse: string;
|
|
7
|
+
muted: string;
|
|
8
|
+
faint: string;
|
|
9
|
+
line: string;
|
|
10
|
+
focus: string;
|
|
11
|
+
accent: string;
|
|
12
|
+
accentSoft: string;
|
|
13
|
+
warning: string;
|
|
14
|
+
warningSoft: string;
|
|
15
|
+
danger: string;
|
|
16
|
+
dangerHover: string;
|
|
17
|
+
dangerSoft: string;
|
|
18
|
+
overlay: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const darkChartColors: {
|
|
21
|
+
series1: string;
|
|
22
|
+
series2: string;
|
|
23
|
+
series3: string;
|
|
24
|
+
series4: string;
|
|
25
|
+
series5: string;
|
|
26
|
+
series6: string;
|
|
27
|
+
negative: string;
|
|
28
|
+
positive: string;
|
|
29
|
+
missing: string;
|
|
30
|
+
};
|
|
31
|
+
export declare const darkAvatarColors: {
|
|
32
|
+
identity1: string;
|
|
33
|
+
identity2: string;
|
|
34
|
+
identity3: string;
|
|
35
|
+
identity4: string;
|
|
36
|
+
identity5: string;
|
|
37
|
+
identity6: string;
|
|
38
|
+
identity7: string;
|
|
39
|
+
identity8: string;
|
|
40
|
+
identity9: string;
|
|
41
|
+
identity10: string;
|
|
42
|
+
identity11: string;
|
|
43
|
+
identity12: string;
|
|
44
|
+
identity13: string;
|
|
45
|
+
identity14: string;
|
|
46
|
+
identity15: string;
|
|
47
|
+
identity16: string;
|
|
48
|
+
identity17: string;
|
|
49
|
+
identity18: string;
|
|
50
|
+
identity19: string;
|
|
51
|
+
identity20: string;
|
|
52
|
+
identity21: string;
|
|
53
|
+
identity22: string;
|
|
54
|
+
identity23: string;
|
|
55
|
+
identity24: string;
|
|
56
|
+
};
|
|
57
|
+
export declare const darkSyntaxColors: {
|
|
58
|
+
keyword: string;
|
|
59
|
+
string: string;
|
|
60
|
+
comment: string;
|
|
61
|
+
number: string;
|
|
62
|
+
type: string;
|
|
63
|
+
};
|
|
64
|
+
export declare const loading: {
|
|
65
|
+
delaySeconds: number;
|
|
66
|
+
revealMs: number;
|
|
67
|
+
placeholderMs: number;
|
|
68
|
+
};
|
|
69
|
+
export declare const darkShadows: {
|
|
70
|
+
popup: string;
|
|
71
|
+
};
|
|
72
|
+
export declare const layers: {
|
|
73
|
+
sticky: string;
|
|
74
|
+
backdrop: string;
|
|
75
|
+
dialog: string;
|
|
76
|
+
popup: string;
|
|
77
|
+
tooltip: string;
|
|
78
|
+
skipLink: string;
|
|
79
|
+
};
|
|
80
|
+
export declare const tableGeometry: {
|
|
81
|
+
rowHeight: number;
|
|
82
|
+
headerHeight: number;
|
|
83
|
+
};
|
|
84
|
+
export declare const conditions: {
|
|
85
|
+
coarsePointer: string;
|
|
86
|
+
hoverPointer: string;
|
|
87
|
+
compactText: string;
|
|
88
|
+
compactTable: string;
|
|
89
|
+
reducedMotion: string;
|
|
90
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { conditions, darkAvatarColors, darkChartColors, darkColors, darkShadows, darkSyntaxColors, layers, loading, tableGeometry, } from './constants.stylex.ts';
|
|
2
|
+
export { avatarColors, chartColors, colors, controls, motion, pageGeometry, radii, shadows, spacing, syntaxColors, typography, } from './tokens.stylex.ts';
|
|
@@ -18,25 +18,6 @@ export declare const colors: stylex.VarGroup<Readonly<{
|
|
|
18
18
|
dangerSoft: string;
|
|
19
19
|
overlay: string;
|
|
20
20
|
}>, symbol>;
|
|
21
|
-
export declare const darkColors: {
|
|
22
|
-
canvas: string;
|
|
23
|
-
surface: string;
|
|
24
|
-
ink: string;
|
|
25
|
-
inkHover: string;
|
|
26
|
-
inverse: string;
|
|
27
|
-
muted: string;
|
|
28
|
-
faint: string;
|
|
29
|
-
line: string;
|
|
30
|
-
focus: string;
|
|
31
|
-
accent: string;
|
|
32
|
-
accentSoft: string;
|
|
33
|
-
warning: string;
|
|
34
|
-
warningSoft: string;
|
|
35
|
-
danger: string;
|
|
36
|
-
dangerHover: string;
|
|
37
|
-
dangerSoft: string;
|
|
38
|
-
overlay: string;
|
|
39
|
-
};
|
|
40
21
|
export declare const chartColors: stylex.VarGroup<Readonly<{
|
|
41
22
|
series1: string;
|
|
42
23
|
series2: string;
|
|
@@ -48,17 +29,6 @@ export declare const chartColors: stylex.VarGroup<Readonly<{
|
|
|
48
29
|
positive: string;
|
|
49
30
|
missing: string;
|
|
50
31
|
}>, symbol>;
|
|
51
|
-
export declare const darkChartColors: {
|
|
52
|
-
series1: string;
|
|
53
|
-
series2: string;
|
|
54
|
-
series3: string;
|
|
55
|
-
series4: string;
|
|
56
|
-
series5: string;
|
|
57
|
-
series6: string;
|
|
58
|
-
negative: string;
|
|
59
|
-
positive: string;
|
|
60
|
-
missing: string;
|
|
61
|
-
};
|
|
62
32
|
export declare const avatarColors: stylex.VarGroup<Readonly<{
|
|
63
33
|
identity1: string;
|
|
64
34
|
identity2: string;
|
|
@@ -85,32 +55,6 @@ export declare const avatarColors: stylex.VarGroup<Readonly<{
|
|
|
85
55
|
identity23: string;
|
|
86
56
|
identity24: string;
|
|
87
57
|
}>, 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
|
-
};
|
|
114
58
|
export declare const syntaxColors: stylex.VarGroup<Readonly<{
|
|
115
59
|
keyword: string;
|
|
116
60
|
string: string;
|
|
@@ -118,13 +62,6 @@ export declare const syntaxColors: stylex.VarGroup<Readonly<{
|
|
|
118
62
|
number: string;
|
|
119
63
|
type: string;
|
|
120
64
|
}>, symbol>;
|
|
121
|
-
export declare const darkSyntaxColors: {
|
|
122
|
-
keyword: string;
|
|
123
|
-
string: string;
|
|
124
|
-
comment: string;
|
|
125
|
-
number: string;
|
|
126
|
-
type: string;
|
|
127
|
-
};
|
|
128
65
|
export declare const spacing: stylex.VarGroup<Readonly<{
|
|
129
66
|
xxs: string;
|
|
130
67
|
xs: string;
|
|
@@ -182,34 +119,7 @@ export declare const motion: stylex.VarGroup<Readonly<{
|
|
|
182
119
|
drawerDuration: string;
|
|
183
120
|
drawerEasing: string;
|
|
184
121
|
}>, symbol>;
|
|
185
|
-
export declare const loading: {
|
|
186
|
-
delaySeconds: number;
|
|
187
|
-
revealMs: number;
|
|
188
|
-
placeholderMs: number;
|
|
189
|
-
};
|
|
190
122
|
export declare const shadows: stylex.VarGroup<Readonly<{
|
|
191
123
|
popup: string;
|
|
192
124
|
selection: string;
|
|
193
125
|
}>, symbol>;
|
|
194
|
-
export declare const darkShadows: {
|
|
195
|
-
popup: string;
|
|
196
|
-
};
|
|
197
|
-
export declare const layers: {
|
|
198
|
-
sticky: string;
|
|
199
|
-
backdrop: string;
|
|
200
|
-
dialog: string;
|
|
201
|
-
popup: string;
|
|
202
|
-
tooltip: string;
|
|
203
|
-
skipLink: string;
|
|
204
|
-
};
|
|
205
|
-
export declare const tableGeometry: {
|
|
206
|
-
rowHeight: number;
|
|
207
|
-
headerHeight: number;
|
|
208
|
-
};
|
|
209
|
-
export declare const conditions: {
|
|
210
|
-
coarsePointer: string;
|
|
211
|
-
hoverPointer: string;
|
|
212
|
-
compactText: string;
|
|
213
|
-
compactTable: string;
|
|
214
|
-
reducedMotion: string;
|
|
215
|
-
};
|
|
@@ -5,7 +5,7 @@ type AppShellProps = {
|
|
|
5
5
|
readonly footer?: ReactNode;
|
|
6
6
|
readonly children: ReactNode;
|
|
7
7
|
readonly mainId?: string;
|
|
8
|
-
readonly
|
|
8
|
+
readonly shouldFocus?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare function AppShell({ sidebarHeader, sidebar, footer, children, mainId,
|
|
10
|
+
export declare function AppShell({ sidebarHeader, sidebar, footer, children, mainId, shouldFocus, }: AppShellProps): ReactNode;
|
|
11
11
|
export {};
|
|
@@ -3,14 +3,14 @@ import { Button } from '../../core/src/index.ts';
|
|
|
3
3
|
type PageToolbarProps = {
|
|
4
4
|
readonly title: ReactNode;
|
|
5
5
|
readonly actions?: ReactNode;
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
6
|
+
readonly showBreadcrumb?: boolean;
|
|
7
|
+
readonly showNavigation?: boolean;
|
|
8
8
|
readonly views?: ReactNode;
|
|
9
9
|
readonly leading?: ReactNode;
|
|
10
10
|
};
|
|
11
11
|
type ToolbarActionProps = Omit<ComponentProps<typeof Button>, 'variant' | 'xstyle'> & {
|
|
12
12
|
readonly icon?: ReactNode;
|
|
13
13
|
};
|
|
14
|
-
export declare function PageToolbar({ title, actions,
|
|
14
|
+
export declare function PageToolbar({ title, actions, showBreadcrumb, showNavigation, views, leading, }: PageToolbarProps): ReactNode;
|
|
15
15
|
export declare function ToolbarAction({ icon, children, ...props }: ToolbarActionProps): ReactNode;
|
|
16
16
|
export {};
|
|
@@ -13,7 +13,7 @@ export type RecordPageToolbarProps = {
|
|
|
13
13
|
readonly backHref: string;
|
|
14
14
|
readonly onBack?: () => void;
|
|
15
15
|
readonly actions?: ReactNode;
|
|
16
|
-
readonly
|
|
16
|
+
readonly showNavigation?: boolean;
|
|
17
17
|
};
|
|
18
18
|
export type RecordPageHeaderProps = {
|
|
19
19
|
readonly title: ReactNode;
|
|
@@ -26,7 +26,7 @@ export type RecordPageAsideProps = {
|
|
|
26
26
|
readonly label?: string;
|
|
27
27
|
};
|
|
28
28
|
declare function RecordPageRoot({ children }: RecordPageRootProps): ReactNode;
|
|
29
|
-
declare function RecordPageToolbar({ backLabel, backHref, onBack, actions,
|
|
29
|
+
declare function RecordPageToolbar({ backLabel, backHref, onBack, actions, showNavigation, }: RecordPageToolbarProps): ReactNode;
|
|
30
30
|
declare function RecordPageBody({ children }: RecordPageBodyProps): ReactNode;
|
|
31
31
|
declare function RecordPageContent({ children }: RecordPageContentProps): ReactNode;
|
|
32
32
|
declare function RecordPageHeader({ title, description, icon, titleRef }: RecordPageHeaderProps): ReactNode;
|
|
@@ -10,14 +10,14 @@ export type ResizablePaneProps = {
|
|
|
10
10
|
readonly initialSizePercent?: number;
|
|
11
11
|
readonly minimumSizePercent?: number;
|
|
12
12
|
readonly maximumSizePercent?: number;
|
|
13
|
-
readonly
|
|
13
|
+
readonly canCollapse?: boolean;
|
|
14
14
|
} & Omit<ComponentProps<'div'>, 'id' | 'onResize'>;
|
|
15
15
|
export type ResizableHandleProps = {
|
|
16
16
|
readonly 'aria-label': string;
|
|
17
17
|
readonly 'disabled'?: boolean;
|
|
18
18
|
} & Omit<ComponentProps<'div'>, 'children'>;
|
|
19
19
|
declare function ResizableRoot({ orientation, initialSizes, onSizesChange, disabled, ref, ...props }: ResizableRootProps): ReactNode;
|
|
20
|
-
declare function ResizablePane({ id, initialSizePercent, minimumSizePercent, maximumSizePercent,
|
|
20
|
+
declare function ResizablePane({ id, initialSizePercent, minimumSizePercent, maximumSizePercent, canCollapse, ref, ...props }: ResizablePaneProps): ReactNode;
|
|
21
21
|
declare function ResizableHandle({ ref, ...props }: ResizableHandleProps): ReactNode;
|
|
22
22
|
export declare const Resizable: {
|
|
23
23
|
Root: typeof ResizableRoot;
|
|
@@ -23,15 +23,15 @@ type NavigationProps = {
|
|
|
23
23
|
};
|
|
24
24
|
type NavigationItemProps = ComponentProps<typeof BaseButton> & {
|
|
25
25
|
readonly icon?: ReactNode;
|
|
26
|
-
readonly
|
|
26
|
+
readonly isSelected?: boolean;
|
|
27
27
|
};
|
|
28
28
|
type NavigationLinkProps = ComponentProps<'a'> & {
|
|
29
29
|
readonly icon?: ReactNode;
|
|
30
|
-
readonly
|
|
30
|
+
readonly isSelected?: boolean;
|
|
31
31
|
};
|
|
32
32
|
type SidebarLabelProps = {
|
|
33
33
|
readonly children: ReactNode;
|
|
34
|
-
readonly
|
|
34
|
+
readonly shouldGrow?: boolean;
|
|
35
35
|
};
|
|
36
36
|
type SidebarFooterLayout = 'inline' | 'navigation';
|
|
37
37
|
type SidebarFooterProps = {
|
|
@@ -45,9 +45,9 @@ export declare function NavigationSection({ children, label, }: {
|
|
|
45
45
|
readonly children: ReactNode;
|
|
46
46
|
readonly label: string;
|
|
47
47
|
}): ReactNode;
|
|
48
|
-
export declare function NavigationItem({ children, icon,
|
|
49
|
-
export declare function NavigationLink({ children, icon,
|
|
50
|
-
export declare function SidebarLabel({ children,
|
|
48
|
+
export declare function NavigationItem({ children, icon, isSelected, onClick, className, style, ...props }: NavigationItemProps): ReactNode;
|
|
49
|
+
export declare function NavigationLink({ children, icon, isSelected, onClick, className, style, ...props }: NavigationLinkProps): ReactNode;
|
|
50
|
+
export declare function SidebarLabel({ children, shouldGrow }: SidebarLabelProps): ReactNode;
|
|
51
51
|
export declare function SidebarFooter({ children, layout }: SidebarFooterProps): ReactNode;
|
|
52
52
|
export declare function SidebarToggle(): ReactNode;
|
|
53
53
|
export {};
|
|
@@ -2,8 +2,8 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
declare function ViewStackRoot({ children }: {
|
|
3
3
|
readonly children: ReactNode;
|
|
4
4
|
}): ReactNode;
|
|
5
|
-
declare function ViewStackPanel({
|
|
6
|
-
readonly
|
|
5
|
+
declare function ViewStackPanel({ isActive, children, }: {
|
|
6
|
+
readonly isActive: boolean;
|
|
7
7
|
readonly children: ReactNode;
|
|
8
8
|
}): ReactNode;
|
|
9
9
|
export declare const ViewStack: {
|
|
@@ -4,10 +4,10 @@ export declare function Workbench({ header, children, inspector, }: {
|
|
|
4
4
|
readonly children: ReactNode;
|
|
5
5
|
readonly inspector?: ReactNode;
|
|
6
6
|
}): ReactNode;
|
|
7
|
-
export declare function WorkbenchScroll({ label, children,
|
|
7
|
+
export declare function WorkbenchScroll({ label, children, isFlush, scrollRestorationId, }: {
|
|
8
8
|
readonly label: string;
|
|
9
9
|
readonly children: ReactNode;
|
|
10
|
-
readonly
|
|
10
|
+
readonly isFlush?: boolean;
|
|
11
11
|
readonly scrollRestorationId?: string;
|
|
12
12
|
}): ReactNode;
|
|
13
13
|
export declare function WorkbenchFooter({ children }: {
|
|
@@ -12,15 +12,15 @@ export type CommandAction = {
|
|
|
12
12
|
readonly label: string;
|
|
13
13
|
readonly description?: string;
|
|
14
14
|
readonly shortcut?: CommandShortcut;
|
|
15
|
-
readonly
|
|
15
|
+
readonly isDisabled?: boolean;
|
|
16
16
|
readonly onSelect: () => void;
|
|
17
17
|
};
|
|
18
18
|
export type CommandShortcutsOptions = {
|
|
19
19
|
readonly commands: ReadonlyArray<CommandAction>;
|
|
20
20
|
readonly target: RefObject<HTMLElement | null> | HTMLElement | null;
|
|
21
|
-
readonly
|
|
21
|
+
readonly isEnabled: boolean;
|
|
22
22
|
};
|
|
23
|
-
export declare function useCommandShortcuts({ commands, target,
|
|
23
|
+
export declare function useCommandShortcuts({ commands, target, isEnabled }: CommandShortcutsOptions): void;
|
|
24
24
|
export type ShortcutHintProps = {
|
|
25
25
|
readonly shortcut: CommandShortcut;
|
|
26
26
|
};
|
|
@@ -9,11 +9,11 @@ export type PageNavigationProps<ItemId extends string = string> = {
|
|
|
9
9
|
readonly selectedId: ItemId;
|
|
10
10
|
readonly onNavigate?: (id: ItemId) => void;
|
|
11
11
|
readonly label?: string;
|
|
12
|
-
readonly
|
|
12
|
+
readonly isEmbedded?: boolean;
|
|
13
13
|
};
|
|
14
14
|
export type PageNavigationPlaceholderProps = {
|
|
15
15
|
readonly items: ReadonlyArray<Pick<PageNavigationItem, 'id' | 'label'>>;
|
|
16
|
-
readonly
|
|
16
|
+
readonly isEmbedded?: boolean;
|
|
17
17
|
};
|
|
18
|
-
export declare function PageNavigationPlaceholder({ items,
|
|
19
|
-
export declare function PageNavigation<ItemId extends string>({ items, selectedId, onNavigate, label,
|
|
18
|
+
export declare function PageNavigationPlaceholder({ items, isEmbedded }: PageNavigationPlaceholderProps): ReactNode;
|
|
19
|
+
export declare function PageNavigation<ItemId extends string>({ items, selectedId, onNavigate, label, isEmbedded, }: PageNavigationProps<ItemId>): ReactNode;
|
|
@@ -9,14 +9,14 @@ type DrawerPopupProps = ComponentProps<typeof BaseDrawer.Popup> & {
|
|
|
9
9
|
readonly xstyle?: PlacementStyle;
|
|
10
10
|
};
|
|
11
11
|
type DrawerTitleProps = ComponentProps<typeof BaseDrawer.Title> & {
|
|
12
|
-
readonly
|
|
12
|
+
readonly isVisuallyHidden?: boolean;
|
|
13
13
|
};
|
|
14
14
|
type DrawerDescriptionProps = ComponentProps<typeof BaseDrawer.Description>;
|
|
15
15
|
declare function DrawerRoot<Payload = unknown>(props: DrawerRootProps<Payload>): ReactNode;
|
|
16
16
|
declare function DrawerBackdrop({ className, style, ...props }: DrawerBackdropProps): ReactNode;
|
|
17
17
|
declare function DrawerViewport({ className, style, ...props }: DrawerViewportProps): ReactNode;
|
|
18
18
|
declare function DrawerPopup({ className, style, xstyle, ...props }: DrawerPopupProps): ReactNode;
|
|
19
|
-
declare function DrawerTitle({ className, style,
|
|
19
|
+
declare function DrawerTitle({ className, style, isVisuallyHidden, ...props }: DrawerTitleProps): ReactNode;
|
|
20
20
|
declare function DrawerDescription({ className, style, ...props }: DrawerDescriptionProps): ReactNode;
|
|
21
21
|
export declare const Drawer: {
|
|
22
22
|
createHandle: typeof BaseDrawer.createHandle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, t } from "./pierre-theme-
|
|
1
|
+
import { n as e, t } from "./pierre-theme-BUeJim8s.js";
|
|
2
2
|
import { t as n } from "./viewer-styles-CpHqp5Qv.js";
|
|
3
3
|
import * as r from "@stylexjs/stylex";
|
|
4
4
|
import { useCallback as i, useState as a } from "react";
|
|
@@ -28,7 +28,7 @@ function h(e) {
|
|
|
28
28
|
function g(e) {
|
|
29
29
|
return e.patch === void 0 ? [c(h(e.before), h(e.after), {}, !0)] : l(e.patch, { throwOnError: !0 }).flatMap((e) => e.files);
|
|
30
30
|
}
|
|
31
|
-
function _({ files: t, layout: c,
|
|
31
|
+
function _({ files: t, layout: c, shouldWrap: l, showUnchanged: u, annotations: p, maxHeight: h, label: g }) {
|
|
32
32
|
let [_] = a(() => new s()), v = i((e) => {
|
|
33
33
|
e === null ? _.cleanUp() : _.setup(e);
|
|
34
34
|
}, [_]);
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { t as e } from "./constants.stylex-bbdiv1fD.js";
|
|
2
|
+
import { d as t, i as n, l as r, r as i, u as a } from "./tokens.stylex-DTHHFbyl.js";
|
|
3
|
+
// packages/content/src/pierre-theme.ts
|
|
4
|
+
var o = {
|
|
5
|
+
name: "Elements",
|
|
6
|
+
appearance: "light",
|
|
7
|
+
cssVariables: {
|
|
8
|
+
prefix: "--elements-syntax-",
|
|
9
|
+
defaults: {
|
|
10
|
+
foreground: i.ink,
|
|
11
|
+
background: i.surface,
|
|
12
|
+
keyword: a.keyword,
|
|
13
|
+
string: a.string,
|
|
14
|
+
comment: a.comment,
|
|
15
|
+
number: a.number,
|
|
16
|
+
type: a.type,
|
|
17
|
+
punctuation: i.muted
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
style: {
|
|
21
|
+
"editor.background": "background",
|
|
22
|
+
"editor.foreground": "foreground",
|
|
23
|
+
syntax: {
|
|
24
|
+
keyword: {
|
|
25
|
+
color: "keyword",
|
|
26
|
+
font_weight: 600
|
|
27
|
+
},
|
|
28
|
+
string: "string",
|
|
29
|
+
comment: "comment",
|
|
30
|
+
number: "number",
|
|
31
|
+
type: "type",
|
|
32
|
+
function: "foreground",
|
|
33
|
+
operator: "punctuation",
|
|
34
|
+
punctuation: "punctuation"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, s = `
|
|
38
|
+
:host {
|
|
39
|
+
color-scheme: inherit;
|
|
40
|
+
--diffs-font-family: ${t.monoFamily};
|
|
41
|
+
--diffs-header-font-family: ${t.fontFamily};
|
|
42
|
+
--diffs-font-size: ${t.captionSize};
|
|
43
|
+
--diffs-line-height: ${t.bodyLineHeight};
|
|
44
|
+
--diffs-gap-inline: ${r.sm};
|
|
45
|
+
--diffs-gap-block: ${r.sm};
|
|
46
|
+
--diffs-bg: ${i.surface};
|
|
47
|
+
--diffs-fg: ${i.ink};
|
|
48
|
+
--diffs-fg-number: ${i.muted};
|
|
49
|
+
--diffs-bg-addition: ${i.accentSoft};
|
|
50
|
+
--diffs-bg-deletion: ${i.dangerSoft};
|
|
51
|
+
--diffs-addition-color-override: ${i.accent};
|
|
52
|
+
--diffs-deletion-color-override: ${i.danger};
|
|
53
|
+
--diffs-modified-color-override: ${i.focus};
|
|
54
|
+
--diffs-bg-context-override: ${i.surface};
|
|
55
|
+
--diffs-bg-context-gutter-override: ${i.canvas};
|
|
56
|
+
--diffs-bg-separator-override: ${i.canvas};
|
|
57
|
+
--diffs-selection-background: ${i.accentSoft};
|
|
58
|
+
font-family: ${t.monoFamily};
|
|
59
|
+
font-size: ${t.captionSize};
|
|
60
|
+
color: ${i.ink};
|
|
61
|
+
background: ${i.surface};
|
|
62
|
+
}
|
|
63
|
+
pre { font-family: ${t.monoFamily}; font-size: ${t.captionSize}; line-height: ${t.bodyLineHeight}; }
|
|
64
|
+
[data-line-number] { color: ${i.muted}; }
|
|
65
|
+
[data-diffs-header] {
|
|
66
|
+
min-height: ${n.height};
|
|
67
|
+
padding-block: ${r.sm};
|
|
68
|
+
padding-inline: ${r.md};
|
|
69
|
+
border-bottom: 1px solid ${i.line};
|
|
70
|
+
font-size: ${t.captionSize};
|
|
71
|
+
line-height: ${t.captionLineHeight};
|
|
72
|
+
font-weight: ${t.mediumWeight};
|
|
73
|
+
flex-wrap: wrap;
|
|
74
|
+
}
|
|
75
|
+
[data-header-content] { flex: 1 1 12ch; }
|
|
76
|
+
`, c = `
|
|
77
|
+
:host {
|
|
78
|
+
color-scheme: inherit;
|
|
79
|
+
color: ${i.ink};
|
|
80
|
+
background: ${i.surface};
|
|
81
|
+
font-family: ${t.fontFamily};
|
|
82
|
+
font-size: ${t.bodySize};
|
|
83
|
+
--trees-font-family-override: ${t.fontFamily};
|
|
84
|
+
--trees-font-size-override: ${t.bodySize};
|
|
85
|
+
--trees-font-weight-regular-override: ${t.regularWeight};
|
|
86
|
+
--trees-font-weight-semibold-override: ${t.strongWeight};
|
|
87
|
+
--trees-search-font-weight-override: ${t.strongWeight};
|
|
88
|
+
--trees-padding-inline-override: ${r.md};
|
|
89
|
+
--trees-item-padding-x-override: ${r.sm};
|
|
90
|
+
--trees-item-row-gap-override: ${n.gap};
|
|
91
|
+
--trees-bg-override: ${i.surface};
|
|
92
|
+
--trees-fg-override: ${i.ink};
|
|
93
|
+
--trees-fg-muted-override: ${i.muted};
|
|
94
|
+
--trees-bg-muted-override: ${i.canvas};
|
|
95
|
+
--trees-input-bg-override: ${i.surface};
|
|
96
|
+
--trees-border-color-override: ${i.line};
|
|
97
|
+
--trees-border-radius-override: 0px;
|
|
98
|
+
--trees-accent-override: ${i.focus};
|
|
99
|
+
--trees-focus-ring-color-override: ${i.focus};
|
|
100
|
+
--trees-focus-ring-width-override: ${n.focusWidth};
|
|
101
|
+
--trees-focus-ring-offset-override: -2px;
|
|
102
|
+
--trees-selected-fg-override: ${i.ink};
|
|
103
|
+
--trees-selected-bg-override: ${i.canvas};
|
|
104
|
+
--trees-selected-focused-border-color-override: ${i.focus};
|
|
105
|
+
--trees-status-added-override: ${i.accent};
|
|
106
|
+
--trees-status-deleted-override: ${i.danger};
|
|
107
|
+
--trees-status-ignored-override: ${i.muted};
|
|
108
|
+
--trees-status-modified-override: ${i.warning};
|
|
109
|
+
--trees-status-renamed-override: ${i.warning};
|
|
110
|
+
--trees-status-untracked-override: ${i.accent};
|
|
111
|
+
}
|
|
112
|
+
[data-type="item"]:hover:not([data-item-selected="true"]):not([data-item-context-hover="true"]) {
|
|
113
|
+
background-color: ${i.surface};
|
|
114
|
+
--truncate-marker-background-overlay-color: transparent;
|
|
115
|
+
}
|
|
116
|
+
${e.hoverPointer} {
|
|
117
|
+
[data-type="item"]:hover:not([data-item-selected="true"]):not([data-item-context-hover="true"]) {
|
|
118
|
+
background-color: ${i.canvas};
|
|
119
|
+
--truncate-marker-background-overlay-color: ${i.canvas};
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
[data-type="item"]:active:not([data-item-selected="true"]):not([data-item-context-hover="true"]) {
|
|
123
|
+
background-color: ${i.canvas};
|
|
124
|
+
--truncate-marker-background-overlay-color: ${i.canvas};
|
|
125
|
+
}
|
|
126
|
+
`;
|
|
127
|
+
export { s as n, c as r, o as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as e } from "./src-
|
|
2
|
-
import { l as t } from "./src-
|
|
3
|
-
import {
|
|
4
|
-
import { r } from "./pierre-theme-
|
|
1
|
+
import { c as e } from "./src-BXh4g2VY.js";
|
|
2
|
+
import { l as t } from "./src-R0kgHFPZ.js";
|
|
3
|
+
import { t as n } from "./constants.stylex-bbdiv1fD.js";
|
|
4
|
+
import { r } from "./pierre-theme-BUeJim8s.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";
|