@carto/ps-react-ui 4.9.0 → 4.11.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/dist/category-Dnd2_j0x.js +719 -0
- package/dist/category-Dnd2_j0x.js.map +1 -0
- package/dist/change-column-BiuuHCDN.js +1156 -0
- package/dist/change-column-BiuuHCDN.js.map +1 -0
- package/dist/chat.js +1507 -0
- package/dist/chat.js.map +1 -0
- package/dist/components.js +125 -122
- package/dist/components.js.map +1 -1
- package/dist/copy-button-DGL1tyli.js +26 -0
- package/dist/copy-button-DGL1tyli.js.map +1 -0
- package/dist/{data-zoom-layout-BH0LPwSy.js → data-zoom-layout--YiY6ko_.js} +5 -4
- package/dist/{data-zoom-layout-BH0LPwSy.js.map → data-zoom-layout--YiY6ko_.js.map} +1 -1
- package/dist/{download-config-DNLkypdN.js → download-config-oJIFZ2WC.js} +10 -9
- package/dist/{download-config-DNLkypdN.js.map → download-config-oJIFZ2WC.js.map} +1 -1
- package/dist/{lasso-tool-BYbxrJ-7.js → lasso-tool-CDFj4zKY.js} +2 -1
- package/dist/lasso-tool-CDFj4zKY.js.map +1 -0
- package/dist/{spread-CTuIXZSM.js → spread-CPis22AE.js} +5 -4
- package/dist/{spread-CTuIXZSM.js.map → spread-CPis22AE.js.map} +1 -1
- package/dist/types/chat/bubbles/chat-error-message.d.ts +2 -0
- package/dist/types/chat/bubbles/chat-suggestion-button.d.ts +2 -0
- package/dist/types/chat/bubbles/chat-user-message.d.ts +2 -0
- package/dist/types/chat/bubbles/index.d.ts +4 -0
- package/dist/types/chat/const.d.ts +4 -0
- package/dist/types/chat/containers/chat-content.d.ts +2 -0
- package/dist/types/chat/containers/chat-footer.d.ts +2 -0
- package/dist/types/chat/containers/chat-header.d.ts +2 -0
- package/dist/types/chat/containers/chat-starter.d.ts +2 -0
- package/dist/types/chat/containers/index.d.ts +4 -0
- package/dist/types/chat/containers/styles.d.ts +93 -0
- package/dist/types/chat/feedback/chat-loader.d.ts +2 -0
- package/dist/types/chat/feedback/chat-rating-action.d.ts +2 -0
- package/dist/types/chat/feedback/chat-thinking.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-code-area.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-full-view-dialog.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-group.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-trace.d.ts +3 -0
- package/dist/types/chat/feedback/get-tool-label.d.ts +2 -0
- package/dist/types/chat/feedback/index.d.ts +8 -0
- package/dist/types/chat/feedback/styles.d.ts +211 -0
- package/dist/types/chat/index.d.ts +20 -0
- package/dist/types/chat/types.d.ts +184 -0
- package/dist/types/chat/use-typewriter.d.ts +30 -0
- package/dist/types/components/copy-button/copy-button.d.ts +2 -0
- package/dist/types/components/copy-button/types.d.ts +6 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/lasso-tool/styles.d.ts +1 -0
- package/dist/types/components/measurement-tools/styles.d.ts +1 -0
- package/dist/types/widgets-v2/actions/index.d.ts +1 -0
- package/dist/types/widgets-v2/actions/show-all/index.d.ts +2 -0
- package/dist/types/widgets-v2/actions/show-all/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/show-all/show-all.d.ts +33 -0
- package/dist/types/widgets-v2/actions/show-all/style.d.ts +8 -0
- package/dist/types/widgets-v2/category/category-ui.d.ts +9 -2
- package/dist/types/widgets-v2/category/category.d.ts +9 -2
- package/dist/types/widgets-v2/category/components/category-row-other.d.ts +19 -6
- package/dist/types/widgets-v2/category/style.d.ts +21 -2
- package/dist/types/widgets-v2/category/types.d.ts +2 -0
- package/dist/types/widgets-v2/index.d.ts +3 -2
- package/dist/types/widgets-v2/selection-summary/labels.d.ts +7 -2
- package/dist/types/widgets-v2/selection-summary/selection-summary.d.ts +13 -6
- package/dist/types/widgets-v2/selection-summary/style.d.ts +15 -0
- package/dist/types/widgets-v2/wrapper/style.d.ts +1 -2
- package/dist/types/widgets-v2/wrapper/widget-wrapper.d.ts +6 -1
- package/dist/widgets/actions.js +116 -115
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +1 -1
- package/dist/widgets/category.js +10 -9
- package/dist/widgets/category.js.map +1 -1
- package/dist/widgets/formula.js +12 -11
- package/dist/widgets/formula.js.map +1 -1
- package/dist/widgets/histogram.js +8 -7
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/markdown.js +10 -9
- package/dist/widgets/markdown.js.map +1 -1
- package/dist/widgets/pie.js +1 -1
- package/dist/widgets/scatterplot.js +1 -1
- package/dist/widgets/spread.js +10 -9
- package/dist/widgets/spread.js.map +1 -1
- package/dist/widgets/table.js +18 -17
- package/dist/widgets/table.js.map +1 -1
- package/dist/widgets/timeseries.js +1 -1
- package/dist/widgets/utils.js +1 -1
- package/dist/widgets/wrapper.js +4 -3
- package/dist/widgets/wrapper.js.map +1 -1
- package/dist/widgets-v2/actions.js +41 -37
- package/dist/widgets-v2/bar.js +9 -8
- package/dist/widgets-v2/bar.js.map +1 -1
- package/dist/widgets-v2/category.js +23 -22
- package/dist/widgets-v2/category.js.map +1 -1
- package/dist/widgets-v2/formula.js +24 -23
- package/dist/widgets-v2/formula.js.map +1 -1
- package/dist/widgets-v2/histogram.js +11 -10
- package/dist/widgets-v2/histogram.js.map +1 -1
- package/dist/widgets-v2/markdown.js +10 -9
- package/dist/widgets-v2/markdown.js.map +1 -1
- package/dist/widgets-v2/pie.js +8 -7
- package/dist/widgets-v2/pie.js.map +1 -1
- package/dist/widgets-v2/scatterplot.js +10 -9
- package/dist/widgets-v2/scatterplot.js.map +1 -1
- package/dist/widgets-v2/spread.js +10 -9
- package/dist/widgets-v2/spread.js.map +1 -1
- package/dist/widgets-v2/table.js +17 -16
- package/dist/widgets-v2/table.js.map +1 -1
- package/dist/widgets-v2/timeseries.js +9 -8
- package/dist/widgets-v2/timeseries.js.map +1 -1
- package/dist/widgets-v2/utils.js +1 -1
- package/dist/widgets-v2.js +343 -338
- package/dist/widgets-v2.js.map +1 -1
- package/package.json +9 -3
- package/src/chat/bubbles/chat-agent-message.test.tsx +30 -0
- package/src/chat/bubbles/chat-agent-message.tsx +11 -0
- package/src/chat/bubbles/chat-error-message.test.tsx +40 -0
- package/src/chat/bubbles/chat-error-message.tsx +47 -0
- package/src/chat/bubbles/chat-suggestion-button.test.tsx +24 -0
- package/src/chat/bubbles/chat-suggestion-button.tsx +27 -0
- package/src/chat/bubbles/chat-user-message.test.tsx +27 -0
- package/src/chat/bubbles/chat-user-message.tsx +27 -0
- package/src/chat/bubbles/index.ts +4 -0
- package/src/chat/bubbles/styles.ts +148 -0
- package/src/chat/const.ts +4 -0
- package/src/chat/containers/chat-content.test.tsx +269 -0
- package/src/chat/containers/chat-content.tsx +142 -0
- package/src/chat/containers/chat-footer.test.tsx +34 -0
- package/src/chat/containers/chat-footer.tsx +78 -0
- package/src/chat/containers/chat-header.test.tsx +28 -0
- package/src/chat/containers/chat-header.tsx +29 -0
- package/src/chat/containers/chat-starter.test.tsx +32 -0
- package/src/chat/containers/chat-starter.tsx +75 -0
- package/src/chat/containers/index.ts +4 -0
- package/src/chat/containers/styles.ts +96 -0
- package/src/chat/feedback/chat-actions-container.test.tsx +64 -0
- package/src/chat/feedback/chat-actions-container.tsx +7 -0
- package/src/chat/feedback/chat-loader.test.tsx +10 -0
- package/src/chat/feedback/chat-loader.tsx +31 -0
- package/src/chat/feedback/chat-rating-action.tsx +43 -0
- package/src/chat/feedback/chat-thinking.test.tsx +15 -0
- package/src/chat/feedback/chat-thinking.tsx +23 -0
- package/src/chat/feedback/chat-tool-code-area.test.tsx +23 -0
- package/src/chat/feedback/chat-tool-code-area.tsx +71 -0
- package/src/chat/feedback/chat-tool-full-view-dialog.test.tsx +39 -0
- package/src/chat/feedback/chat-tool-full-view-dialog.tsx +121 -0
- package/src/chat/feedback/chat-tool-group.test.tsx +84 -0
- package/src/chat/feedback/chat-tool-group.tsx +156 -0
- package/src/chat/feedback/chat-tool-trace.test.tsx +81 -0
- package/src/chat/feedback/chat-tool-trace.tsx +192 -0
- package/src/chat/feedback/get-tool-label.test.tsx +91 -0
- package/src/chat/feedback/get-tool-label.ts +13 -0
- package/src/chat/feedback/index.ts +8 -0
- package/src/chat/feedback/styles.ts +229 -0
- package/src/chat/index.ts +59 -0
- package/src/chat/types.ts +215 -0
- package/src/chat/use-typewriter.test.tsx +38 -0
- package/src/chat/use-typewriter.ts +82 -0
- package/src/components/copy-button/copy-button.test.tsx +41 -0
- package/src/components/copy-button/copy-button.tsx +31 -0
- package/src/components/copy-button/types.ts +10 -0
- package/src/components/index.ts +3 -0
- package/src/components/lasso-tool/styles.ts +1 -0
- package/src/components/measurement-tools/styles.ts +1 -0
- package/src/widgets-v2/actions/index.ts +8 -0
- package/src/widgets-v2/actions/show-all/index.ts +7 -0
- package/src/widgets-v2/actions/show-all/labels.ts +8 -0
- package/src/widgets-v2/actions/show-all/show-all.test.tsx +50 -0
- package/src/widgets-v2/actions/show-all/show-all.tsx +72 -0
- package/src/widgets-v2/actions/show-all/style.ts +8 -0
- package/src/widgets-v2/category/category-ui.test.tsx +26 -10
- package/src/widgets-v2/category/category-ui.tsx +13 -3
- package/src/widgets-v2/category/category.test.tsx +4 -4
- package/src/widgets-v2/category/category.tsx +10 -1
- package/src/widgets-v2/category/components/category-row-other.test.tsx +36 -7
- package/src/widgets-v2/category/components/category-row-other.tsx +64 -13
- package/src/widgets-v2/category/style.ts +35 -4
- package/src/widgets-v2/category/types.ts +2 -0
- package/src/widgets-v2/index.ts +3 -0
- package/src/widgets-v2/selection-summary/labels.ts +8 -4
- package/src/widgets-v2/selection-summary/selection-summary.test.tsx +15 -9
- package/src/widgets-v2/selection-summary/selection-summary.tsx +42 -22
- package/src/widgets-v2/selection-summary/style.ts +15 -0
- package/src/widgets-v2/wrapper/style.ts +1 -2
- package/src/widgets-v2/wrapper/widget-wrapper.test.tsx +30 -0
- package/src/widgets-v2/wrapper/widget-wrapper.tsx +11 -1
- package/dist/category-DwaeYjpX.js +0 -656
- package/dist/category-DwaeYjpX.js.map +0 -1
- package/dist/change-column-Cidl_M-4.js +0 -1110
- package/dist/change-column-Cidl_M-4.js.map +0 -1
- package/dist/lasso-tool-BYbxrJ-7.js.map +0 -1
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
2
|
+
export declare const styles: {
|
|
3
|
+
thinking: {
|
|
4
|
+
display: "flex";
|
|
5
|
+
alignItems: "center";
|
|
6
|
+
minHeight: ({ spacing }: Theme) => string;
|
|
7
|
+
background: ({ palette }: Theme) => string;
|
|
8
|
+
backgroundSize: string;
|
|
9
|
+
backgroundClip: "text";
|
|
10
|
+
WebkitBackgroundClip: "text";
|
|
11
|
+
WebkitTextFillColor: "transparent";
|
|
12
|
+
animation: `${{
|
|
13
|
+
name: string;
|
|
14
|
+
styles: string;
|
|
15
|
+
anim: 1;
|
|
16
|
+
toString: () => string;
|
|
17
|
+
} & string} 2s ease-in-out infinite`;
|
|
18
|
+
animationDuration: "2s";
|
|
19
|
+
};
|
|
20
|
+
loader: {
|
|
21
|
+
display: "flex";
|
|
22
|
+
alignItems: "center";
|
|
23
|
+
justifyContent: "center";
|
|
24
|
+
position: "relative";
|
|
25
|
+
p: number;
|
|
26
|
+
};
|
|
27
|
+
loaderOuterCircle: {
|
|
28
|
+
position: "absolute";
|
|
29
|
+
inset: number;
|
|
30
|
+
margin: string;
|
|
31
|
+
borderRadius: string;
|
|
32
|
+
backgroundColor: ({ palette }: Theme) => string;
|
|
33
|
+
animation: `${{
|
|
34
|
+
name: string;
|
|
35
|
+
styles: string;
|
|
36
|
+
anim: 1;
|
|
37
|
+
toString: () => string;
|
|
38
|
+
} & string} 1s ease-in-out infinite`;
|
|
39
|
+
};
|
|
40
|
+
loaderInnerCircle: {
|
|
41
|
+
position: "absolute";
|
|
42
|
+
inset: number;
|
|
43
|
+
margin: string;
|
|
44
|
+
borderRadius: string;
|
|
45
|
+
backgroundColor: ({ palette }: Theme) => string;
|
|
46
|
+
animation: `${{
|
|
47
|
+
name: string;
|
|
48
|
+
styles: string;
|
|
49
|
+
anim: 1;
|
|
50
|
+
toString: () => string;
|
|
51
|
+
} & string} 1s ease-in-out infinite`;
|
|
52
|
+
};
|
|
53
|
+
traceHeader: {
|
|
54
|
+
display: "flex";
|
|
55
|
+
alignItems: "center";
|
|
56
|
+
padding: number;
|
|
57
|
+
paddingLeft: ({ spacing }: Theme) => string;
|
|
58
|
+
borderRadius: ({ spacing }: Theme) => string;
|
|
59
|
+
width: string;
|
|
60
|
+
color: ({ palette }: Theme) => string;
|
|
61
|
+
'&:hover': {
|
|
62
|
+
backgroundColor: ({ palette }: Theme) => string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
traceChevron: {
|
|
66
|
+
color: ({ palette }: Theme) => string;
|
|
67
|
+
transition: "transform 0.2s";
|
|
68
|
+
};
|
|
69
|
+
traceDetailsWrapper: {
|
|
70
|
+
marginTop: ({ spacing }: Theme) => string;
|
|
71
|
+
padding: ({ spacing }: Theme) => string;
|
|
72
|
+
border: "1px solid";
|
|
73
|
+
borderColor: "divider";
|
|
74
|
+
borderRadius: ({ spacing }: Theme) => string;
|
|
75
|
+
};
|
|
76
|
+
traceField: {
|
|
77
|
+
display: "flex";
|
|
78
|
+
alignItems: "flex-start";
|
|
79
|
+
gap: ({ spacing }: Theme) => string;
|
|
80
|
+
};
|
|
81
|
+
traceFieldLabel: {
|
|
82
|
+
flexShrink: number;
|
|
83
|
+
};
|
|
84
|
+
traceReference: {
|
|
85
|
+
display: "flex";
|
|
86
|
+
borderRadius: ({ spacing }: Theme) => string;
|
|
87
|
+
padding: ({ spacing }: Theme) => string;
|
|
88
|
+
gap: ({ spacing }: Theme) => string;
|
|
89
|
+
backgroundColor: ({ palette }: Theme) => string;
|
|
90
|
+
color: ({ palette }: Theme) => string;
|
|
91
|
+
};
|
|
92
|
+
traceStatusSuccess: {
|
|
93
|
+
color: ({ palette }: Theme) => string;
|
|
94
|
+
};
|
|
95
|
+
traceStatusError: {
|
|
96
|
+
color: ({ palette }: Theme) => string;
|
|
97
|
+
};
|
|
98
|
+
codeArea: {
|
|
99
|
+
position: "relative";
|
|
100
|
+
width: string;
|
|
101
|
+
};
|
|
102
|
+
codeAreaPre: {
|
|
103
|
+
margin: number;
|
|
104
|
+
padding: ({ spacing }: Theme) => string;
|
|
105
|
+
borderRadius: ({ spacing }: Theme) => string;
|
|
106
|
+
backgroundColor: ({ palette }: Theme) => string;
|
|
107
|
+
fontSize: string;
|
|
108
|
+
fontFamily: "monospace";
|
|
109
|
+
whiteSpace: "pre-wrap";
|
|
110
|
+
wordBreak: "break-word";
|
|
111
|
+
overflowY: "auto";
|
|
112
|
+
};
|
|
113
|
+
codeAreaPreError: {
|
|
114
|
+
borderLeft: ({ palette }: Theme) => string;
|
|
115
|
+
backgroundColor: ({ palette }: Theme) => string;
|
|
116
|
+
};
|
|
117
|
+
codeAreaFullViewButton: {
|
|
118
|
+
position: "absolute";
|
|
119
|
+
top: ({ spacing }: Theme) => string;
|
|
120
|
+
right: ({ spacing }: Theme) => string;
|
|
121
|
+
};
|
|
122
|
+
fullViewDialog: {
|
|
123
|
+
margin: ({ spacing }: Theme) => string;
|
|
124
|
+
};
|
|
125
|
+
fullViewPaper: {
|
|
126
|
+
borderRadius: number;
|
|
127
|
+
};
|
|
128
|
+
fullViewTitle: {
|
|
129
|
+
display: "flex";
|
|
130
|
+
alignItems: "center";
|
|
131
|
+
justifyContent: "space-between";
|
|
132
|
+
padding: ({ spacing }: Theme) => string;
|
|
133
|
+
borderBottom: string;
|
|
134
|
+
borderBottomColor: "divider";
|
|
135
|
+
};
|
|
136
|
+
fullViewDialogContent: {
|
|
137
|
+
padding: number;
|
|
138
|
+
'&:first-of-type': {
|
|
139
|
+
paddingTop: number;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
fullViewPre: {
|
|
143
|
+
margin: number;
|
|
144
|
+
padding: ({ spacing }: Theme) => string;
|
|
145
|
+
background: ({ palette, spacing }: Theme) => string;
|
|
146
|
+
fontFamily: "monospace";
|
|
147
|
+
fontSize: string;
|
|
148
|
+
whiteSpace: "pre-wrap";
|
|
149
|
+
wordBreak: "break-word";
|
|
150
|
+
lineHeight: number;
|
|
151
|
+
counterReset: "line";
|
|
152
|
+
};
|
|
153
|
+
fullViewLine: {
|
|
154
|
+
display: "block";
|
|
155
|
+
'&::before': {
|
|
156
|
+
counterIncrement: "line";
|
|
157
|
+
content: "counter(line)";
|
|
158
|
+
display: "inline-block";
|
|
159
|
+
width: string;
|
|
160
|
+
marginRight: string;
|
|
161
|
+
textAlign: "right";
|
|
162
|
+
color: ({ palette }: Theme) => string;
|
|
163
|
+
userSelect: "none";
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
groupHeader: {
|
|
167
|
+
textAlign: "left";
|
|
168
|
+
display: "flex";
|
|
169
|
+
alignItems: "center";
|
|
170
|
+
borderRadius: number;
|
|
171
|
+
gap: ({ spacing }: Theme) => string;
|
|
172
|
+
};
|
|
173
|
+
errorBadge: {
|
|
174
|
+
color: ({ palette }: Theme) => string;
|
|
175
|
+
fontWeight: number;
|
|
176
|
+
display: "flex";
|
|
177
|
+
alignItems: "center";
|
|
178
|
+
gap: ({ spacing }: Theme) => string;
|
|
179
|
+
};
|
|
180
|
+
syntaxToken_key: {
|
|
181
|
+
color: "#881280";
|
|
182
|
+
};
|
|
183
|
+
syntaxToken_string: {
|
|
184
|
+
color: "#c41a16";
|
|
185
|
+
};
|
|
186
|
+
syntaxToken_number: {
|
|
187
|
+
color: "#1c00cf";
|
|
188
|
+
};
|
|
189
|
+
syntaxToken_boolean: {
|
|
190
|
+
color: "#1c00cf";
|
|
191
|
+
};
|
|
192
|
+
syntaxToken_null: {
|
|
193
|
+
color: "#808080";
|
|
194
|
+
};
|
|
195
|
+
syntaxToken_punctuation: {
|
|
196
|
+
color: ({ palette }: Theme) => string;
|
|
197
|
+
};
|
|
198
|
+
groupListItem: {
|
|
199
|
+
borderBottom: string;
|
|
200
|
+
borderColor: "divider";
|
|
201
|
+
'&:first-of-type .MuiButton-root': {
|
|
202
|
+
borderRadius: ({ spacing }: Theme) => string;
|
|
203
|
+
};
|
|
204
|
+
'&:last-of-type:not([aria-expanded=true]) .MuiButton-root': {
|
|
205
|
+
borderRadius: ({ spacing }: Theme) => string;
|
|
206
|
+
};
|
|
207
|
+
'&:last-of-type': {
|
|
208
|
+
borderBottomWidth: number;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type { ChatSxProps, ChatErrorAction, ChatUserMessageProps, ChatAgentMessageProps, ChatErrorMessageProps, ChatSuggestionButtonProps, ChatThinkingProps, ChatLoaderProps, ChatContentProps, ChatContentRef, ChatHeaderProps, ChatFooterProps, ChatStarterItem, ChatStarterProps, ChatRatingActionProps, ChatToolItem, ChatToolTraceProps, ChatToolCodeAreaProps, ChatToolFullViewDialogProps, ChatToolGroupProps, } from './types';
|
|
2
|
+
export { CHAT_MAX_WIDTH, CHAT_SCROLL_DELAY, CHAT_DIVIDER_DELAY, CHAT_TOOL_CODE_AREA_MAX_HEIGHT, } from './const';
|
|
3
|
+
export { useTypewriter } from './use-typewriter';
|
|
4
|
+
export { ChatUserMessage } from './bubbles/chat-user-message';
|
|
5
|
+
export { ChatAgentMessage } from './bubbles/chat-agent-message';
|
|
6
|
+
export { ChatErrorMessage } from './bubbles/chat-error-message';
|
|
7
|
+
export { ChatSuggestionButton } from './bubbles/chat-suggestion-button';
|
|
8
|
+
export { ChatMessageOverflow } from './bubbles/styles';
|
|
9
|
+
export { ChatThinking } from './feedback/chat-thinking';
|
|
10
|
+
export { ChatLoader } from './feedback/chat-loader';
|
|
11
|
+
export { ChatContent } from './containers/chat-content';
|
|
12
|
+
export { ChatHeader } from './containers/chat-header';
|
|
13
|
+
export { ChatFooter } from './containers/chat-footer';
|
|
14
|
+
export { ChatStarter } from './containers/chat-starter';
|
|
15
|
+
export { ChatActionsContainer } from './feedback/chat-actions-container';
|
|
16
|
+
export { ChatRatingAction } from './feedback/chat-rating-action';
|
|
17
|
+
export { ChatToolTrace } from './feedback/chat-tool-trace';
|
|
18
|
+
export { ChatToolCodeArea } from './feedback/chat-tool-code-area';
|
|
19
|
+
export { ChatToolFullViewDialog } from './feedback/chat-tool-full-view-dialog';
|
|
20
|
+
export { ChatToolGroup } from './feedback/chat-tool-group';
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonBaseProps, SxProps, Theme } from '@mui/material';
|
|
3
|
+
export interface ChatSxProps {
|
|
4
|
+
sx?: SxProps<Theme>;
|
|
5
|
+
}
|
|
6
|
+
export interface ChatErrorAction {
|
|
7
|
+
label: string;
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
}
|
|
10
|
+
export interface ChatUserMessageProps extends ChatSxProps {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
/** enabled to render text with a lighter color for indicating things like an error sending the message */
|
|
13
|
+
muted?: boolean;
|
|
14
|
+
/** content to render on top of the message for user attachments */
|
|
15
|
+
topContext?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export interface ChatAgentMessageProps extends ChatSxProps {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export interface ChatErrorMessageProps extends ChatSxProps {
|
|
21
|
+
errors: string[];
|
|
22
|
+
icon?: ReactNode;
|
|
23
|
+
actions?: ChatErrorAction[];
|
|
24
|
+
}
|
|
25
|
+
export interface ChatSuggestionButtonProps extends ChatSxProps, Omit<ButtonBaseProps, 'children'> {
|
|
26
|
+
label: ReactNode;
|
|
27
|
+
color?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ChatThinkingProps extends ChatSxProps {
|
|
30
|
+
duration?: number;
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
export interface ChatLoaderProps extends ChatSxProps {
|
|
34
|
+
size?: number;
|
|
35
|
+
labels?: {
|
|
36
|
+
loading?: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface ChatContentProps extends ChatSxProps {
|
|
40
|
+
children: ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* Smooth-scrolls to the bottom whenever new content is added — but only if
|
|
43
|
+
* the user was already at (or near) the bottom. Readers who scrolled up to
|
|
44
|
+
* revisit older messages are left alone. Defaults to `true`; pass `false`
|
|
45
|
+
* to opt out and manage scroll yourself via the ref.
|
|
46
|
+
*/
|
|
47
|
+
autoScroll?: boolean;
|
|
48
|
+
labels?: {
|
|
49
|
+
jumpToLatest?: string;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Imperative handle exposed by `ChatContent` via `ref`. Use it to drive scroll
|
|
54
|
+
* from the parent — for example, calling `scrollToBottom()` when a new agent
|
|
55
|
+
* message arrives.
|
|
56
|
+
*/
|
|
57
|
+
export interface ChatContentRef {
|
|
58
|
+
/** Smooth-scrolls the content area to the bottom. */
|
|
59
|
+
scrollToBottom: () => void;
|
|
60
|
+
/** Smooth-scrolls the content area to the top. */
|
|
61
|
+
scrollToTop: () => void;
|
|
62
|
+
/** `true` when the content area is scrolled to (or near) its bottom edge. */
|
|
63
|
+
isAtBottom: boolean;
|
|
64
|
+
/** `true` when the content area is scrolled to (or near) its top edge. */
|
|
65
|
+
isAtTop: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface ChatHeaderProps extends ChatSxProps {
|
|
68
|
+
leftSlot?: ReactNode;
|
|
69
|
+
title: ReactNode;
|
|
70
|
+
rightSlot?: ReactNode;
|
|
71
|
+
onClose?: () => void;
|
|
72
|
+
}
|
|
73
|
+
export interface ChatFooterProps extends ChatSxProps {
|
|
74
|
+
/** Current value of the chat message area. */
|
|
75
|
+
value: string;
|
|
76
|
+
/** Called with the new textarea value on every keystroke. */
|
|
77
|
+
onChange: (value: string) => void;
|
|
78
|
+
/** Called when the send button is clicked or Enter is pressed (without Shift). */
|
|
79
|
+
onSend: () => void;
|
|
80
|
+
/** Called when the stop button is clicked. Only shown while `isGenerating` is true. */
|
|
81
|
+
onStop?: () => void;
|
|
82
|
+
/** When true, swaps the send button for a stop button and disables the textarea. */
|
|
83
|
+
isGenerating?: boolean;
|
|
84
|
+
/** Disables the textarea and both send/stop buttons. */
|
|
85
|
+
disabled?: boolean;
|
|
86
|
+
/** Placeholder text for the textarea. Defaults to `'Type a message...'`. */
|
|
87
|
+
placeholder?: string;
|
|
88
|
+
/** Accessible labels for the send and stop buttons (used as `aria-label`). */
|
|
89
|
+
labels?: {
|
|
90
|
+
/** Defaults to `'Send'`. */
|
|
91
|
+
send?: string;
|
|
92
|
+
/** Defaults to `'Stop'`. */
|
|
93
|
+
stop?: string;
|
|
94
|
+
};
|
|
95
|
+
/** Helper text rendered under the input. Defaults to an AI disclaimer; pass `null` to hide. */
|
|
96
|
+
caption?: ReactNode;
|
|
97
|
+
}
|
|
98
|
+
export interface ChatStarterItem {
|
|
99
|
+
label: string;
|
|
100
|
+
color?: string;
|
|
101
|
+
}
|
|
102
|
+
export interface ChatStarterProps extends ChatSxProps {
|
|
103
|
+
icon?: ReactNode;
|
|
104
|
+
title?: ReactNode;
|
|
105
|
+
description?: ReactNode;
|
|
106
|
+
items: string[] | ChatStarterItem[];
|
|
107
|
+
size?: 'small' | 'medium';
|
|
108
|
+
onSelect?: (prompt: string) => void;
|
|
109
|
+
}
|
|
110
|
+
export interface ChatRatingActionProps {
|
|
111
|
+
onRatingChange?: (rating: 'up' | 'down' | null) => void;
|
|
112
|
+
rating?: 'up' | 'down' | null;
|
|
113
|
+
labels?: {
|
|
114
|
+
thumbUp?: string;
|
|
115
|
+
thumbDown?: string;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
export interface ChatToolItem {
|
|
119
|
+
id: string;
|
|
120
|
+
name: string;
|
|
121
|
+
status: 'running' | 'complete' | 'error';
|
|
122
|
+
/** Display label shown while status is 'running'. Falls back to a capitalized `name`. */
|
|
123
|
+
runningLabel?: string;
|
|
124
|
+
/** Display label shown for non-running statuses. Falls back to a capitalized `name`. */
|
|
125
|
+
label?: string;
|
|
126
|
+
/** Friendly reference name for the tool (e.g. "add_marker"). Displayed with icon. */
|
|
127
|
+
reference?: string;
|
|
128
|
+
/** Execution duration in seconds (e.g. 1.8) */
|
|
129
|
+
duration?: number;
|
|
130
|
+
/** Input arguments as a JSON string or plain text */
|
|
131
|
+
inputArguments?: string;
|
|
132
|
+
/** Output as a JSON string or plain text */
|
|
133
|
+
output?: string;
|
|
134
|
+
}
|
|
135
|
+
export interface ChatToolTraceProps extends ChatSxProps {
|
|
136
|
+
tool: ChatToolItem;
|
|
137
|
+
/** Whether the trace accordion is expanded */
|
|
138
|
+
expanded?: boolean;
|
|
139
|
+
/** Callback when accordion expansion state changes */
|
|
140
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
141
|
+
labels?: {
|
|
142
|
+
toolExecuted?: string;
|
|
143
|
+
reference?: string;
|
|
144
|
+
duration?: string;
|
|
145
|
+
status?: string;
|
|
146
|
+
inputArguments?: string;
|
|
147
|
+
output?: string;
|
|
148
|
+
fullView?: string;
|
|
149
|
+
success?: string;
|
|
150
|
+
error?: string;
|
|
151
|
+
running?: string;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
export interface ChatToolCodeAreaProps extends ChatSxProps {
|
|
155
|
+
/** Code content to display */
|
|
156
|
+
content: string;
|
|
157
|
+
/** Label for the full view dialog title */
|
|
158
|
+
title?: string;
|
|
159
|
+
/** Render with error styling (red left border, tinted background) */
|
|
160
|
+
isError?: boolean;
|
|
161
|
+
labels?: {
|
|
162
|
+
fullView?: string;
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
export interface ChatToolFullViewDialogProps {
|
|
166
|
+
open: boolean;
|
|
167
|
+
onClose: () => void;
|
|
168
|
+
title: string;
|
|
169
|
+
content: string;
|
|
170
|
+
}
|
|
171
|
+
export interface ChatToolGroupProps extends ChatSxProps {
|
|
172
|
+
tools: ChatToolItem[];
|
|
173
|
+
/** Whether the group accordion is expanded */
|
|
174
|
+
expanded?: boolean;
|
|
175
|
+
/** Callback when group expansion state changes */
|
|
176
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
177
|
+
/** Map of tool IDs to their individual expanded state. Used to preserve expansion state during grouping. */
|
|
178
|
+
expandedTools?: Record<string, boolean>;
|
|
179
|
+
/** Callback when an individual tool's expansion state changes */
|
|
180
|
+
onToolExpandedChange?: (value: Record<string, boolean>, toolId?: string) => void;
|
|
181
|
+
labels?: ChatToolTraceProps['labels'] & {
|
|
182
|
+
toolsUsed?: string;
|
|
183
|
+
};
|
|
184
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
interface UseTypewriterOptions {
|
|
2
|
+
/** Characters revealed per second (default: `500`). */
|
|
3
|
+
speed?: number;
|
|
4
|
+
/** When true on mount, skip the animation and reveal the full text immediately. */
|
|
5
|
+
skipAnimation?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface UseTypewriterResult {
|
|
8
|
+
/** The portion of `fullText` revealed so far. */
|
|
9
|
+
displayedText: string;
|
|
10
|
+
/** `true` while characters are still being revealed. */
|
|
11
|
+
isTyping: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Reveals a string character-by-character at a steady rate via
|
|
15
|
+
* `requestAnimationFrame`. Useful for smoothing out bursty WebSocket-streamed
|
|
16
|
+
* agent message text — pair it with `ChatAgentMessage`.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* const { displayedText, isTyping } = useTypewriter(message)
|
|
21
|
+
* return (
|
|
22
|
+
* <ChatAgentMessage>
|
|
23
|
+
* <Markdown>{displayedText}</Markdown>
|
|
24
|
+
* {isTyping ? <Cursor /> : null}
|
|
25
|
+
* </ChatAgentMessage>
|
|
26
|
+
* )
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function useTypewriter(fullText: string, options?: UseTypewriterOptions): UseTypewriterResult;
|
|
30
|
+
export {};
|
|
@@ -18,3 +18,5 @@ export { BasemapsUI } from './basemaps/basemaps';
|
|
|
18
18
|
export type { BasemapsUIProps } from './basemaps/types';
|
|
19
19
|
export { Tooltip, setTooltipEnterDelay } from './tooltip/tooltip';
|
|
20
20
|
export { SmartTooltip } from './smart-tooltip/smart-tooltip';
|
|
21
|
+
export type { CopyButtonProps } from './copy-button/types';
|
|
22
|
+
export { CopyButton } from './copy-button/copy-button';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Searcher, SearcherToggle, setSearcherText, filterBySearchText, DEFAULT_SEARCHER_LABELS, type SearcherProps, type SearcherToggleProps, type SearcherLabels, } from './searcher';
|
|
2
2
|
export { StackToggle, addStack, DEFAULT_STACK_TOGGLE_LABELS, type StackToggleProps, type StackToggleLabels, } from './stack-toggle';
|
|
3
|
+
export { ShowAllToggle, setShowAll, SHOW_ALL_ID, DEFAULT_SHOW_ALL_LABELS, type ShowAllToggleProps, type ShowAllLabels, } from './show-all';
|
|
3
4
|
export { ZoomToggle, addZoom, createAddZoom, ZOOM_LAYOUT, DEFAULT_ZOOM_TOGGLE_LABELS, type ZoomToggleProps, type ZoomToggleLabels, } from './zoom-toggle';
|
|
4
5
|
export { BrushToggle, addBrush, DEFAULT_BRUSH_TOGGLE_LABELS, type BrushToggleProps, type BrushToggleLabels, } from './brush-toggle';
|
|
5
6
|
export { RelativeData, toRelativeData, createPercentFormatter, DEFAULT_RELATIVE_DATA_LABELS, type RelativeDataProps, type RelativeDataLabels, } from './relative-data';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
import { ShowAllLabels } from './labels';
|
|
4
|
+
/**
|
|
5
|
+
* The `show-all` flag is a pure UI signal (no data/config transform): the
|
|
6
|
+
* Category overflow row writes it `true` via {@link setShowAll}, the
|
|
7
|
+
* composer reads it with `useTransformEnabled(id, SHOW_ALL_ID)` to drop the
|
|
8
|
+
* row cap, and this button writes it back `false` to collapse. Stored under
|
|
9
|
+
* `transformStates` so `useTransformEnabled` can observe it like any other
|
|
10
|
+
* action flag — but it never registers a pipeline transform, so toggling it
|
|
11
|
+
* never re-runs the data pipeline.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SHOW_ALL_ID = "show-all";
|
|
14
|
+
export interface ShowAllToggleProps {
|
|
15
|
+
labels?: Partial<ShowAllLabels>;
|
|
16
|
+
icon?: ComponentType<SvgIconProps>;
|
|
17
|
+
iconProps?: SvgIconProps;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Collapse (✕) affordance shown while a widget is expanded into its
|
|
21
|
+
* "show all" state. Clicking it clears the `show-all` flag, returning the
|
|
22
|
+
* widget to its capped view. Mount it conditionally (only while the flag is
|
|
23
|
+
* set) so it doesn't occupy a `Widget.Toolbox` visibility-budget slot when
|
|
24
|
+
* the widget is collapsed.
|
|
25
|
+
*/
|
|
26
|
+
export declare function ShowAllToggle({ labels, icon: Icon, iconProps, }: ShowAllToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* Imperatively writes the `show-all` flag into the widget store. Mirrors
|
|
29
|
+
* {@link setSearcherText} — used by the Category overflow row (to expand)
|
|
30
|
+
* and the {@link ShowAllToggle} button (to collapse) without routing through
|
|
31
|
+
* a re-rendered subscription.
|
|
32
|
+
*/
|
|
33
|
+
export declare function setShowAll(widgetId: string, value: boolean): void;
|
|
@@ -23,7 +23,7 @@ export interface CategoryUIProps {
|
|
|
23
23
|
* Caps the number of visible category rows.
|
|
24
24
|
*
|
|
25
25
|
* - `undefined` (omitted) — caps at {@link DEFAULT_MAX_ITEMS} (20).
|
|
26
|
-
* Surplus rows fold into a single
|
|
26
|
+
* Surplus rows fold into a single "Others <count>" footer row.
|
|
27
27
|
* `undefined` cannot mean "no cap" because it's consumed by the
|
|
28
28
|
* default-parameter syntax — pass `null` instead.
|
|
29
29
|
* - positive finite N — same as the default but with a custom cap.
|
|
@@ -44,6 +44,13 @@ export interface CategoryUIProps {
|
|
|
44
44
|
maxItems?: number | null;
|
|
45
45
|
/** Labels for the "Other" overflow row. `{count}` placeholder is replaced. */
|
|
46
46
|
labels?: CategoryLabels;
|
|
47
|
+
/**
|
|
48
|
+
* When provided, the "Other" overflow row becomes a button — clicking it
|
|
49
|
+
* fires `onShowAll`, which a composer typically wires to expand the widget
|
|
50
|
+
* (drop the row cap) so every category becomes reachable. When omitted the
|
|
51
|
+
* overflow row stays a static summary.
|
|
52
|
+
*/
|
|
53
|
+
onShowAll?: () => void;
|
|
47
54
|
/** Manual override for the bar-width denominator. */
|
|
48
55
|
maxOverride?: number;
|
|
49
56
|
/**
|
|
@@ -78,4 +85,4 @@ export interface CategoryUIProps {
|
|
|
78
85
|
* Returns `null` when there's nothing to render — `Widget.State` is the
|
|
79
86
|
* empty-state authority in the canonical compositor.
|
|
80
87
|
*/
|
|
81
|
-
export declare function CategoryUI({ data, selection, onSelectionChange, formatter, labelFormatter, series, maxItems, labels, maxOverride, size, stacked, }: CategoryUIProps): import("react/jsx-runtime").JSX.Element | null;
|
|
88
|
+
export declare function CategoryUI({ data, selection, onSelectionChange, formatter, labelFormatter, series, maxItems, labels, onShowAll, maxOverride, size, stacked, }: CategoryUIProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -7,7 +7,7 @@ export interface CategoryProps {
|
|
|
7
7
|
/** Per-series metadata. Enables the legend + overrides palette per index. */
|
|
8
8
|
series?: readonly CategorySeriesConfig[];
|
|
9
9
|
/**
|
|
10
|
-
* Cap visible rows; overflow folds into "
|
|
10
|
+
* Cap visible rows; overflow folds into an "Others <count>" row. Default 20
|
|
11
11
|
* (when omitted). Pass `0` to swap the cap for a scrollable viewport
|
|
12
12
|
* (composers use this when the user opens the SearcherToggle —
|
|
13
13
|
* `maxItems = searcherOpen ? 0 : userMaxItems`). Pass `null` to disable
|
|
@@ -16,6 +16,13 @@ export interface CategoryProps {
|
|
|
16
16
|
maxItems?: number | null;
|
|
17
17
|
/** Labels for the "Other" overflow row. */
|
|
18
18
|
labels?: CategoryLabels;
|
|
19
|
+
/**
|
|
20
|
+
* When provided, the "Other" overflow row becomes a button that fires this
|
|
21
|
+
* callback. Composers wire it to expand the widget (e.g. flip the
|
|
22
|
+
* `show-all` flag) so every category is shown. Forwarded to
|
|
23
|
+
* {@link CategoryUI}.
|
|
24
|
+
*/
|
|
25
|
+
onShowAll?: () => void;
|
|
19
26
|
/**
|
|
20
27
|
* Manual override for the bar-width denominator. When omitted, the
|
|
21
28
|
* bridge auto-fills from the widget store's `rawData` so bar widths
|
|
@@ -45,4 +52,4 @@ export interface CategoryProps {
|
|
|
45
52
|
* `onSelectionChange` follow the destination-owned principle: the
|
|
46
53
|
* consumer keeps the list in their own store and passes it through.
|
|
47
54
|
*/
|
|
48
|
-
export declare function Category({ selection, onSelectionChange, series, maxItems, labels, maxOverride, size, stacked, }: CategoryProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export declare function Category({ selection, onSelectionChange, series, maxItems, labels, onShowAll, maxOverride, size, stacked, }: CategoryProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
export interface CategoryRowOtherProps {
|
|
2
2
|
hiddenCount: number;
|
|
3
|
-
/** Label for the overflow row. Defaults to `'
|
|
3
|
+
/** Label for the overflow row. Defaults to `'Others'`. */
|
|
4
4
|
otherLabel?: string;
|
|
5
|
-
/** Count text with `{count}` placeholder. Defaults to `'{count}
|
|
5
|
+
/** Count text with `{count}` placeholder. Defaults to `'{count}'`. */
|
|
6
6
|
otherCountLabel?: string;
|
|
7
|
+
/**
|
|
8
|
+
* When provided, the row becomes a button: clicking it (or Enter/Space)
|
|
9
|
+
* fires `onShowAll`, expanding the widget to reveal every category. When
|
|
10
|
+
* omitted the row renders as a static, non-interactive summary.
|
|
11
|
+
*/
|
|
12
|
+
onShowAll?: () => void;
|
|
13
|
+
/** Tooltip shown over the button form. Defaults to `'Show all'`. */
|
|
14
|
+
showAllLabel?: string;
|
|
7
15
|
}
|
|
8
16
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
17
|
+
* Overflow summary row rendered after the last visible category row when
|
|
18
|
+
* `data.length > maxItems`. Shows `Others <count>` (count muted, no
|
|
19
|
+
* parentheses).
|
|
20
|
+
*
|
|
21
|
+
* When `onShowAll` is supplied the row is an interactive button — clicking
|
|
22
|
+
* it (or Enter/Space) expands the widget to show all categories, mirroring
|
|
23
|
+
* the Searcher's full-list view. Without `onShowAll` it stays a static,
|
|
24
|
+
* non-interactive summary (backward-compatible default).
|
|
12
25
|
*/
|
|
13
|
-
export declare function CategoryRowOther({ hiddenCount, otherLabel, otherCountLabel, }: CategoryRowOtherProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function CategoryRowOther({ hiddenCount, otherLabel, otherCountLabel, onShowAll, showAllLabel, }: CategoryRowOtherProps): import("react/jsx-runtime").JSX.Element;
|