@app-studio/web 0.9.28 → 0.9.30
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/components/Formik/AttachmentPreview.d.ts +19 -0
- package/dist/components/Formik/index.d.ts +1 -0
- package/dist/web.cjs.development.js +136 -2
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +136 -3
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +136 -2
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/package.json +1 -1
package/dist/web.esm.js
CHANGED
|
@@ -4050,13 +4050,13 @@ var UploadView = _ref => {
|
|
|
4050
4050
|
textProps
|
|
4051
4051
|
}), progress < 100 && (icon || /*#__PURE__*/React.createElement(UploadIcon, Object.assign({
|
|
4052
4052
|
widthHeight: 32
|
|
4053
|
-
}, iconProps))), !selectedFile && text && renderText({
|
|
4053
|
+
}, iconProps))), !isLoading && !selectedFile && text && renderText({
|
|
4054
4054
|
text,
|
|
4055
4055
|
textProps
|
|
4056
4056
|
}), isLoading && renderProgress({
|
|
4057
4057
|
progress,
|
|
4058
4058
|
progressProps
|
|
4059
|
-
}), errorMessage && renderError({
|
|
4059
|
+
}), !isLoading && errorMessage && renderError({
|
|
4060
4060
|
errorMessage,
|
|
4061
4061
|
errorMessageProps
|
|
4062
4062
|
}), /*#__PURE__*/React.createElement(View, Object.assign({
|
|
@@ -17189,6 +17189,139 @@ var FormikUploader = _ref => {
|
|
|
17189
17189
|
};
|
|
17190
17190
|
FormikUploader.displayName = 'FormikUploader';
|
|
17191
17191
|
|
|
17192
|
+
var AttachmentPreview = _ref => {
|
|
17193
|
+
var {
|
|
17194
|
+
files,
|
|
17195
|
+
onRemove,
|
|
17196
|
+
maxHeight = '120px',
|
|
17197
|
+
views = {}
|
|
17198
|
+
} = _ref;
|
|
17199
|
+
if (files.length === 0) {
|
|
17200
|
+
return null;
|
|
17201
|
+
}
|
|
17202
|
+
var formatFileSize = useCallback(bytes => {
|
|
17203
|
+
if (bytes < 1024) return bytes + " B";
|
|
17204
|
+
if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(1) + " KB";
|
|
17205
|
+
return (bytes / (1024 * 1024)).toFixed(1) + " MB";
|
|
17206
|
+
}, []);
|
|
17207
|
+
return /*#__PURE__*/React.createElement(View, Object.assign({
|
|
17208
|
+
display: "flex",
|
|
17209
|
+
flexWrap: "wrap",
|
|
17210
|
+
gap: "6px",
|
|
17211
|
+
padding: "8px 0",
|
|
17212
|
+
maxHeight: maxHeight,
|
|
17213
|
+
overflowY: "auto"
|
|
17214
|
+
}, views == null ? void 0 : views.container), files.map((file, index) => {
|
|
17215
|
+
var previewUrl = file.url || '';
|
|
17216
|
+
var isImage = file.type.startsWith('image/');
|
|
17217
|
+
var isVideo = file.type.startsWith('video/');
|
|
17218
|
+
var isAudio = file.type.startsWith('audio/');
|
|
17219
|
+
return /*#__PURE__*/React.createElement(Vertical, Object.assign({
|
|
17220
|
+
key: index,
|
|
17221
|
+
alignItems: "center",
|
|
17222
|
+
gap: "6px",
|
|
17223
|
+
padding: "4px 8px",
|
|
17224
|
+
borderRadius: "6px",
|
|
17225
|
+
backgroundColor: "color.gray.100",
|
|
17226
|
+
position: "relative",
|
|
17227
|
+
animate: {
|
|
17228
|
+
from: {
|
|
17229
|
+
opacity: 0,
|
|
17230
|
+
scale: 0.9
|
|
17231
|
+
},
|
|
17232
|
+
to: {
|
|
17233
|
+
opacity: 1,
|
|
17234
|
+
scale: 1
|
|
17235
|
+
}
|
|
17236
|
+
},
|
|
17237
|
+
animationDuration: 0.2
|
|
17238
|
+
}, views == null ? void 0 : views.item), /*#__PURE__*/React.createElement(HoverCard, null, /*#__PURE__*/React.createElement(HoverCard.Trigger, null, /*#__PURE__*/React.createElement(View, {
|
|
17239
|
+
position: "relative"
|
|
17240
|
+
}, isImage && previewUrl && (/*#__PURE__*/React.createElement(Image, {
|
|
17241
|
+
src: previewUrl,
|
|
17242
|
+
alt: file.name,
|
|
17243
|
+
width: "60px",
|
|
17244
|
+
height: "60px",
|
|
17245
|
+
objectFit: "cover",
|
|
17246
|
+
borderRadius: "4px"
|
|
17247
|
+
})), isVideo && previewUrl && (/*#__PURE__*/React.createElement(View, {
|
|
17248
|
+
as: "video",
|
|
17249
|
+
src: previewUrl,
|
|
17250
|
+
alt: file.name,
|
|
17251
|
+
controls: false,
|
|
17252
|
+
muted: true,
|
|
17253
|
+
width: "60px",
|
|
17254
|
+
height: "60px",
|
|
17255
|
+
objectFit: "cover",
|
|
17256
|
+
borderRadius: "4px"
|
|
17257
|
+
})), isAudio && (/*#__PURE__*/React.createElement(Center, {
|
|
17258
|
+
width: "60px",
|
|
17259
|
+
height: "60px",
|
|
17260
|
+
backgroundColor: "color.gray.200",
|
|
17261
|
+
borderRadius: "4px"
|
|
17262
|
+
}, /*#__PURE__*/React.createElement(AudioIcon, {
|
|
17263
|
+
widthHeight: 24,
|
|
17264
|
+
color: "color.black"
|
|
17265
|
+
}))), !isImage && !isVideo && !isAudio && (/*#__PURE__*/React.createElement(Center, {
|
|
17266
|
+
width: "60px",
|
|
17267
|
+
height: "60px",
|
|
17268
|
+
backgroundColor: "color.gray.200",
|
|
17269
|
+
borderRadius: "4px"
|
|
17270
|
+
}, /*#__PURE__*/React.createElement(FileIcon, {
|
|
17271
|
+
widthHeight: 24,
|
|
17272
|
+
color: "color.black"
|
|
17273
|
+
}))), onRemove && (/*#__PURE__*/React.createElement(Button$1, {
|
|
17274
|
+
position: "absolute",
|
|
17275
|
+
top: "-4px",
|
|
17276
|
+
right: "-4px",
|
|
17277
|
+
width: "20px",
|
|
17278
|
+
height: "20px",
|
|
17279
|
+
minWidth: "20px",
|
|
17280
|
+
minHeight: "20px",
|
|
17281
|
+
borderRadius: "50%",
|
|
17282
|
+
backgroundColor: "color.red.500",
|
|
17283
|
+
color: "white",
|
|
17284
|
+
fontSize: 14,
|
|
17285
|
+
fontWeight: "bold",
|
|
17286
|
+
padding: 0,
|
|
17287
|
+
display: "flex",
|
|
17288
|
+
alignItems: "center",
|
|
17289
|
+
justifyContent: "center",
|
|
17290
|
+
cursor: "pointer",
|
|
17291
|
+
border: "2px solid white",
|
|
17292
|
+
_hover: {
|
|
17293
|
+
backgroundColor: 'color.red.600'
|
|
17294
|
+
},
|
|
17295
|
+
onClick: e => {
|
|
17296
|
+
e.stopPropagation();
|
|
17297
|
+
onRemove(index);
|
|
17298
|
+
},
|
|
17299
|
+
"aria-label": "Remove " + file.name
|
|
17300
|
+
}, "\u00D7")))), /*#__PURE__*/React.createElement(HoverCard.Content, null, isImage && previewUrl && (/*#__PURE__*/React.createElement(Image, {
|
|
17301
|
+
src: previewUrl,
|
|
17302
|
+
alt: file.name,
|
|
17303
|
+
maxWidth: "300px"
|
|
17304
|
+
})), isVideo && previewUrl && (/*#__PURE__*/React.createElement(View, {
|
|
17305
|
+
as: "video",
|
|
17306
|
+
src: previewUrl,
|
|
17307
|
+
controls: true,
|
|
17308
|
+
maxWidth: "300px"
|
|
17309
|
+
})), isAudio && previewUrl && (/*#__PURE__*/React.createElement(View, {
|
|
17310
|
+
as: "audio",
|
|
17311
|
+
src: previewUrl,
|
|
17312
|
+
controls: true,
|
|
17313
|
+
width: '100%'
|
|
17314
|
+
})), /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
17315
|
+
marginTop: "4px",
|
|
17316
|
+
truncateText: true,
|
|
17317
|
+
textOverflow: "ellipsis",
|
|
17318
|
+
overflow: "hidden",
|
|
17319
|
+
width: '100%',
|
|
17320
|
+
fontSize: 12
|
|
17321
|
+
}, views == null ? void 0 : views.name), file.name, " (", formatFileSize(file.size), ")"))));
|
|
17322
|
+
}));
|
|
17323
|
+
};
|
|
17324
|
+
|
|
17192
17325
|
var SliderComponent$1 = props => {
|
|
17193
17326
|
// Get state and handlers from the custom hook
|
|
17194
17327
|
var sliderState = useSliderState(props);
|
|
@@ -35659,5 +35792,5 @@ var AgentEval = props => {
|
|
|
35659
35792
|
return /*#__PURE__*/React.createElement(AgentEvalView, Object.assign({}, props, evalState));
|
|
35660
35793
|
};
|
|
35661
35794
|
|
|
35662
|
-
export { Accordion, AgentChat, AgentEval, AgentSession, AgentTrace, Alert, ArrowIcon, AspectRatio, AttachmentIcon, AudioIcon, AudioInput, AudioWaveform, Avatar, Background, Badge, BatteryIcon, BluetoothIcon, BoldArrowIcon, BookmarkIcon, Button, Calendar, CalendarIcon, CameraIcon, Card, Carousel, Chart, ChartIcon, ChatInput, CheckIcon, Checkbox, ChevronIcon, ClockIcon, CloseEyeIcon, CloseIcon, CloudIcon, ColorInput, ColorPicker, ComboBox, Command, ContextMenu, CookieConsent, CopyIcon, CountryPicker, CropIcon, DatePicker, DeleteIcon, Divider, DocumentIcon, DownloadIcon, DragAndDrop, DragAndDropComponent, DragHandleIcon, DragHandleLinesIcon, DropdownMenu, DustBinIcon, EditIcon, EmojiPicker, ErrorIcon, ExternalLinkIcon, FacebookIcon, FileIcon, FileImage, FileSVG, FilterIcon, Flow, FolderIcon, FormikChatInput, FormikCheckbox, FormikColorInput, FormikComboBox, FormikCountryPicker, FormikDatePicker, FormikForm, FormikOTPInput, FormikPassword, FormikSelect, FormikSlider, FormikSwitch, FormikTagInput, FormikTextArea, FormikTextField, FormikUploader, GiftIcon, HeartIcon, HelpIcon, HomeIcon, HoverCard, Icon, ImageIcon, InfoIcon, InstagramIcon, KanbanBoard, LikeIcon, Link, LinkedinIcon, Loader, LoadingSpinnerIcon, LocationIcon, LockIcon, LogoutIcon, MagicWandIcon, MediaPreview, MenuIcon, Menubar, MessageLayout, MessageView, MicrophoneIcon, MinusIcon, Modal, MoonIcon, NavigationMenu, NotificationIcon, OTPInput, OpenEyeIcon, Pagination, PanelIcon, Password, PauseIcon, PlayIcon, PlusIcon, PowerOffIcon, PrintIcon, ProfileIcon, ProgressBar, RefreshIcon, Resizable, RotateIcon, SaveIcon, SearchIcon, Select, SendIcon, Separator, SettingsIcon, ShapeIcon, ShareButton, ShareIcon, ShieldIcon, Sidebar, Slider, SliderIcon, SpinnerIcon, StarIcon, StatusIndicator, StopIcon, SuccessIcon, Switch, Table, Tabs, TagInput, Text, TextArea, TextField, TextIcon, ThreadsIcon, TickIcon, Title, Toast, Toggle, ToggleGroup, Tooltip, TrashIcon, Tree, TwitchIcon, TwitterIcon, UnLikeIcon, UnlockIcon, UploadIcon, Uploader, UserIcon, VideoIcon, WarningIcon, WifiIcon, XIcon, YoutubeIcon, ZoomInIcon, ZoomOutIcon, hideMessage, hideModal, showMessage, showModal, showToast, useMessageStore, useModalStore, useToast$1 as useToast };
|
|
35795
|
+
export { Accordion, AgentChat, AgentEval, AgentSession, AgentTrace, Alert, ArrowIcon, AspectRatio, AttachmentIcon, AttachmentPreview, AudioIcon, AudioInput, AudioWaveform, Avatar, Background, Badge, BatteryIcon, BluetoothIcon, BoldArrowIcon, BookmarkIcon, Button, Calendar, CalendarIcon, CameraIcon, Card, Carousel, Chart, ChartIcon, ChatInput, CheckIcon, Checkbox, ChevronIcon, ClockIcon, CloseEyeIcon, CloseIcon, CloudIcon, ColorInput, ColorPicker, ComboBox, Command, ContextMenu, CookieConsent, CopyIcon, CountryPicker, CropIcon, DatePicker, DeleteIcon, Divider, DocumentIcon, DownloadIcon, DragAndDrop, DragAndDropComponent, DragHandleIcon, DragHandleLinesIcon, DropdownMenu, DustBinIcon, EditIcon, EmojiPicker, ErrorIcon, ExternalLinkIcon, FacebookIcon, FileIcon, FileImage, FileSVG, FilterIcon, Flow, FolderIcon, FormikChatInput, FormikCheckbox, FormikColorInput, FormikComboBox, FormikCountryPicker, FormikDatePicker, FormikForm, FormikOTPInput, FormikPassword, FormikSelect, FormikSlider, FormikSwitch, FormikTagInput, FormikTextArea, FormikTextField, FormikUploader, GiftIcon, HeartIcon, HelpIcon, HomeIcon, HoverCard, Icon, ImageIcon, InfoIcon, InstagramIcon, KanbanBoard, LikeIcon, Link, LinkedinIcon, Loader, LoadingSpinnerIcon, LocationIcon, LockIcon, LogoutIcon, MagicWandIcon, MediaPreview, MenuIcon, Menubar, MessageLayout, MessageView, MicrophoneIcon, MinusIcon, Modal, MoonIcon, NavigationMenu, NotificationIcon, OTPInput, OpenEyeIcon, Pagination, PanelIcon, Password, PauseIcon, PlayIcon, PlusIcon, PowerOffIcon, PrintIcon, ProfileIcon, ProgressBar, RefreshIcon, Resizable, RotateIcon, SaveIcon, SearchIcon, Select, SendIcon, Separator, SettingsIcon, ShapeIcon, ShareButton, ShareIcon, ShieldIcon, Sidebar, Slider, SliderIcon, SpinnerIcon, StarIcon, StatusIndicator, StopIcon, SuccessIcon, Switch, Table, Tabs, TagInput, Text, TextArea, TextField, TextIcon, ThreadsIcon, TickIcon, Title, Toast, Toggle, ToggleGroup, Tooltip, TrashIcon, Tree, TwitchIcon, TwitterIcon, UnLikeIcon, UnlockIcon, UploadIcon, Uploader, UserIcon, VideoIcon, WarningIcon, WifiIcon, XIcon, YoutubeIcon, ZoomInIcon, ZoomOutIcon, hideMessage, hideModal, showMessage, showModal, showToast, useMessageStore, useModalStore, useToast$1 as useToast };
|
|
35663
35796
|
//# sourceMappingURL=web.esm.js.map
|