@flytedan/flytebot-design-system 0.12.15 → 0.14.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/index.cjs +558 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +80 -1
- package/dist/index.d.ts +80 -1
- package/dist/index.js +557 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +234 -0
package/dist/index.d.cts
CHANGED
|
@@ -3418,6 +3418,85 @@ interface FileViewerProps {
|
|
|
3418
3418
|
*/
|
|
3419
3419
|
declare function FileViewer({ file, resolveUrl, sidePanel, sidePanelLabel, onClose, actions, className }: FileViewerProps): React.JSX.Element;
|
|
3420
3420
|
|
|
3421
|
+
/** A folder in the tree — an adjacency list, the same shape a real directory store
|
|
3422
|
+
* needs (see MP-128): `parentId: null` is a root-level folder. Generic on purpose,
|
|
3423
|
+
* no campaign/thread vocabulary — the host's ids are whatever it wants them to be. */
|
|
3424
|
+
interface FileBrowserFolder {
|
|
3425
|
+
id: string;
|
|
3426
|
+
parentId: string | null;
|
|
3427
|
+
name: string;
|
|
3428
|
+
}
|
|
3429
|
+
/** The host's own file shape, filed into exactly one folder (`folderId: null` = root). */
|
|
3430
|
+
type FileBrowserFile = Attachment & {
|
|
3431
|
+
folderId: string | null;
|
|
3432
|
+
};
|
|
3433
|
+
/** Every affordance defaults to visible when its matching callback is supplied — set a
|
|
3434
|
+
* flag to `false` to withhold that ONE affordance for a caller that has the callback
|
|
3435
|
+
* wired but the current viewer lacks the right (e.g. a read-only campaign guest gets
|
|
3436
|
+
* `onOpenFile` but not `canMove`/`canRemove`). Omitting the whole object shows
|
|
3437
|
+
* everything a supplied callback affords. */
|
|
3438
|
+
interface FileBrowserPermissions {
|
|
3439
|
+
canCreateFolder?: boolean;
|
|
3440
|
+
canRenameFolder?: boolean;
|
|
3441
|
+
canMove?: boolean;
|
|
3442
|
+
canUpload?: boolean;
|
|
3443
|
+
canRemoveFile?: boolean;
|
|
3444
|
+
canDeleteFolder?: boolean;
|
|
3445
|
+
}
|
|
3446
|
+
interface FileBrowserProps {
|
|
3447
|
+
folders: FileBrowserFolder[];
|
|
3448
|
+
files: FileBrowserFile[];
|
|
3449
|
+
/** `null` = the root folder. */
|
|
3450
|
+
currentFolderId: string | null;
|
|
3451
|
+
onNavigate: (folderId: string | null) => void;
|
|
3452
|
+
onCreateFolder?: (parentId: string | null, name: string) => void;
|
|
3453
|
+
onRenameFolder?: (folderId: string, name: string) => void;
|
|
3454
|
+
onMoveFolder?: (folderId: string, targetParentId: string | null) => void;
|
|
3455
|
+
onMoveFile?: (fileId: string, targetFolderId: string | null) => void;
|
|
3456
|
+
onOpenFile?: (file: FileBrowserFile) => void;
|
|
3457
|
+
onRemoveFile?: (file: FileBrowserFile) => void;
|
|
3458
|
+
/** MP-190: same contract as `onRenameFolder`/`onMoveFolder` — no fetching, no emptiness
|
|
3459
|
+
* pre-check (the host's server is the one source of truth for "empty"; see the folder
|
|
3460
|
+
* kit doc comment above), fired only once the confirm dialog is accepted. Sibling
|
|
3461
|
+
* callbacks (`onRenameFolder`, `onMoveFolder`, `onRemoveFile`) are all plain, synchronous,
|
|
3462
|
+
* void callbacks with no promise/rejection handling anywhere in this component, so this
|
|
3463
|
+
* one is void too rather than inventing an async contract none of its siblings have — a
|
|
3464
|
+
* host that needs to show the server's `folder_not_empty` refusal does so the same way it
|
|
3465
|
+
* already must for a failed rename/move/remove: by feeding the error back through its own
|
|
3466
|
+
* state, outside this component. */
|
|
3467
|
+
onDeleteFolder?: (folder: FileBrowserFolder) => void;
|
|
3468
|
+
/** Fired with the raw picked/dropped files and the folder they landed in — FileBrowser
|
|
3469
|
+
* does no fetching and stages nothing itself (R-8/"generic, controlled" — see MP-135):
|
|
3470
|
+
* the host runs its own `useStagedFiles`/`FileUploadHandler` and feeds the result back
|
|
3471
|
+
* through `files`, exactly like every other controlled list in this kit. */
|
|
3472
|
+
onUpload?: (files: File[], folderId: string | null) => void;
|
|
3473
|
+
loading?: boolean;
|
|
3474
|
+
permissions?: FileBrowserPermissions;
|
|
3475
|
+
className?: string;
|
|
3476
|
+
}
|
|
3477
|
+
/**
|
|
3478
|
+
* FileBrowser — a folder tree plus the current folder's contents: create, rename and move,
|
|
3479
|
+
* by drag or by an equally real keyboard/click menu, over a responsive two-pane layout.
|
|
3480
|
+
*
|
|
3481
|
+
* Generic and fully controlled (MP-135, phase 7 of MP-128): no data fetching, no upload,
|
|
3482
|
+
* no policy of any kind (no size cap, no type allow-list, no retention rule) — every one of
|
|
3483
|
+
* those is a product decision the epic has explicitly NOT made yet (see MP-128's open
|
|
3484
|
+
* problem), so this component encodes none of them. It only ever renders the `folders`/
|
|
3485
|
+
* `files` it is handed and reports intent through callbacks; the host owns every mutation,
|
|
3486
|
+
* every permission check and every byte that moves.
|
|
3487
|
+
*
|
|
3488
|
+
* Two panes side by side while there's room — the folder tree (search this file's own
|
|
3489
|
+
* width, a container query, exactly like FileViewer's side panel: a FileBrowser opened
|
|
3490
|
+
* inside a narrow Drawer should behave like a phone even on a wide screen) and the current
|
|
3491
|
+
* folder's contents. Below that width the tree pane disappears entirely (`display: none`,
|
|
3492
|
+
* not a tab — there is nothing to switch to, since the current folder's own subfolders
|
|
3493
|
+
* already appear as rows in the main pane) and navigation happens purely through the
|
|
3494
|
+
* breadcrumb trail plus tapping into a subfolder row, per the card's own spec. One scroll
|
|
3495
|
+
* region per pane either way (R-8): the tree pane and the main pane each own their own
|
|
3496
|
+
* `overflow`, the head/breadcrumb bar never scrolls.
|
|
3497
|
+
*/
|
|
3498
|
+
declare function FileBrowser({ folders, files, currentFolderId, onNavigate, onCreateFolder, onRenameFolder, onMoveFolder, onMoveFile, onOpenFile, onRemoveFile, onDeleteFolder, onUpload, loading, permissions, className, }: FileBrowserProps): React.JSX.Element;
|
|
3499
|
+
|
|
3421
3500
|
interface TableQuery {
|
|
3422
3501
|
/** 1-indexed. */
|
|
3423
3502
|
page: number;
|
|
@@ -3690,4 +3769,4 @@ interface VersionStore<TState, TDiff = unknown> {
|
|
|
3690
3769
|
}
|
|
3691
3770
|
declare function createVersionStore<TState, TDiff = unknown>(initialState: TState, options?: CreateVersionStoreOptions<TState, TDiff>): VersionStore<TState, TDiff>;
|
|
3692
3771
|
|
|
3693
|
-
export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, ApiSpecBrowser, type ApiSpecBrowserProps, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_UNAVAILABLE, Calendar, type CalendarProps, Card, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, ChatTranscript, type ChatTranscriptProps, ChatTurn, type ChatTurnProps, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, type DeviceSession, DiffBlock, type DiffBlockProps, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, FeatureGate, type FeatureGateProps, type FeatureStatus, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterField, type FilterFieldOption, type FilterFieldSelect, type FilterFieldText, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, Gate, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type JobStatus, Json, KeyHint, type KeyHintProps, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NumberInput, type NumberInputProps, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Placement, type PollOptions, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QueryKit, type QueuedTurn, QuotaRow, type QuotaRowProps, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type Session, type Flag as SessionFlag, SessionKit, type SessionStats, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, Textarea, type TextareaProps, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastProps, Tooltip, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, type UsageLimit, UseFeatureStatus, UseRuntimeMode, type UseServerTableOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, acceptMatches, anyOfFilter, channelWeightOf, computeNeedMore, computeVirtualWindow, createVersionStore, eqFilter, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDuration, formatEta, formatRelative, groupMessages, hasModifier, iconForMime, importanceLevel, importanceTokens, isImage, isSystemMessage, jobBucket, languageLabel, markdownToText, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, revokeAttachment, toAttachment, tokenize, useChatEngine, useFeatureStatus, usePopoverPosition, useRuntimeMode, useServerTable, useStagedFiles, visibleMessages };
|
|
3772
|
+
export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, ApiSpecBrowser, type ApiSpecBrowserProps, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_UNAVAILABLE, Calendar, type CalendarProps, Card, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, ChatTranscript, type ChatTranscriptProps, ChatTurn, type ChatTurnProps, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, type DeviceSession, DiffBlock, type DiffBlockProps, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, FeatureGate, type FeatureGateProps, type FeatureStatus, FileBrowser, type FileBrowserFile, type FileBrowserFolder, type FileBrowserPermissions, type FileBrowserProps, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterField, type FilterFieldOption, type FilterFieldSelect, type FilterFieldText, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, Gate, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type JobStatus, Json, KeyHint, type KeyHintProps, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NumberInput, type NumberInputProps, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Placement, type PollOptions, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QueryKit, type QueuedTurn, QuotaRow, type QuotaRowProps, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type Session, type Flag as SessionFlag, SessionKit, type SessionStats, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, Textarea, type TextareaProps, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastProps, Tooltip, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, type UsageLimit, UseFeatureStatus, UseRuntimeMode, type UseServerTableOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, acceptMatches, anyOfFilter, channelWeightOf, computeNeedMore, computeVirtualWindow, createVersionStore, eqFilter, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDuration, formatEta, formatRelative, groupMessages, hasModifier, iconForMime, importanceLevel, importanceTokens, isImage, isSystemMessage, jobBucket, languageLabel, markdownToText, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, revokeAttachment, toAttachment, tokenize, useChatEngine, useFeatureStatus, usePopoverPosition, useRuntimeMode, useServerTable, useStagedFiles, visibleMessages };
|
package/dist/index.d.ts
CHANGED
|
@@ -3418,6 +3418,85 @@ interface FileViewerProps {
|
|
|
3418
3418
|
*/
|
|
3419
3419
|
declare function FileViewer({ file, resolveUrl, sidePanel, sidePanelLabel, onClose, actions, className }: FileViewerProps): React.JSX.Element;
|
|
3420
3420
|
|
|
3421
|
+
/** A folder in the tree — an adjacency list, the same shape a real directory store
|
|
3422
|
+
* needs (see MP-128): `parentId: null` is a root-level folder. Generic on purpose,
|
|
3423
|
+
* no campaign/thread vocabulary — the host's ids are whatever it wants them to be. */
|
|
3424
|
+
interface FileBrowserFolder {
|
|
3425
|
+
id: string;
|
|
3426
|
+
parentId: string | null;
|
|
3427
|
+
name: string;
|
|
3428
|
+
}
|
|
3429
|
+
/** The host's own file shape, filed into exactly one folder (`folderId: null` = root). */
|
|
3430
|
+
type FileBrowserFile = Attachment & {
|
|
3431
|
+
folderId: string | null;
|
|
3432
|
+
};
|
|
3433
|
+
/** Every affordance defaults to visible when its matching callback is supplied — set a
|
|
3434
|
+
* flag to `false` to withhold that ONE affordance for a caller that has the callback
|
|
3435
|
+
* wired but the current viewer lacks the right (e.g. a read-only campaign guest gets
|
|
3436
|
+
* `onOpenFile` but not `canMove`/`canRemove`). Omitting the whole object shows
|
|
3437
|
+
* everything a supplied callback affords. */
|
|
3438
|
+
interface FileBrowserPermissions {
|
|
3439
|
+
canCreateFolder?: boolean;
|
|
3440
|
+
canRenameFolder?: boolean;
|
|
3441
|
+
canMove?: boolean;
|
|
3442
|
+
canUpload?: boolean;
|
|
3443
|
+
canRemoveFile?: boolean;
|
|
3444
|
+
canDeleteFolder?: boolean;
|
|
3445
|
+
}
|
|
3446
|
+
interface FileBrowserProps {
|
|
3447
|
+
folders: FileBrowserFolder[];
|
|
3448
|
+
files: FileBrowserFile[];
|
|
3449
|
+
/** `null` = the root folder. */
|
|
3450
|
+
currentFolderId: string | null;
|
|
3451
|
+
onNavigate: (folderId: string | null) => void;
|
|
3452
|
+
onCreateFolder?: (parentId: string | null, name: string) => void;
|
|
3453
|
+
onRenameFolder?: (folderId: string, name: string) => void;
|
|
3454
|
+
onMoveFolder?: (folderId: string, targetParentId: string | null) => void;
|
|
3455
|
+
onMoveFile?: (fileId: string, targetFolderId: string | null) => void;
|
|
3456
|
+
onOpenFile?: (file: FileBrowserFile) => void;
|
|
3457
|
+
onRemoveFile?: (file: FileBrowserFile) => void;
|
|
3458
|
+
/** MP-190: same contract as `onRenameFolder`/`onMoveFolder` — no fetching, no emptiness
|
|
3459
|
+
* pre-check (the host's server is the one source of truth for "empty"; see the folder
|
|
3460
|
+
* kit doc comment above), fired only once the confirm dialog is accepted. Sibling
|
|
3461
|
+
* callbacks (`onRenameFolder`, `onMoveFolder`, `onRemoveFile`) are all plain, synchronous,
|
|
3462
|
+
* void callbacks with no promise/rejection handling anywhere in this component, so this
|
|
3463
|
+
* one is void too rather than inventing an async contract none of its siblings have — a
|
|
3464
|
+
* host that needs to show the server's `folder_not_empty` refusal does so the same way it
|
|
3465
|
+
* already must for a failed rename/move/remove: by feeding the error back through its own
|
|
3466
|
+
* state, outside this component. */
|
|
3467
|
+
onDeleteFolder?: (folder: FileBrowserFolder) => void;
|
|
3468
|
+
/** Fired with the raw picked/dropped files and the folder they landed in — FileBrowser
|
|
3469
|
+
* does no fetching and stages nothing itself (R-8/"generic, controlled" — see MP-135):
|
|
3470
|
+
* the host runs its own `useStagedFiles`/`FileUploadHandler` and feeds the result back
|
|
3471
|
+
* through `files`, exactly like every other controlled list in this kit. */
|
|
3472
|
+
onUpload?: (files: File[], folderId: string | null) => void;
|
|
3473
|
+
loading?: boolean;
|
|
3474
|
+
permissions?: FileBrowserPermissions;
|
|
3475
|
+
className?: string;
|
|
3476
|
+
}
|
|
3477
|
+
/**
|
|
3478
|
+
* FileBrowser — a folder tree plus the current folder's contents: create, rename and move,
|
|
3479
|
+
* by drag or by an equally real keyboard/click menu, over a responsive two-pane layout.
|
|
3480
|
+
*
|
|
3481
|
+
* Generic and fully controlled (MP-135, phase 7 of MP-128): no data fetching, no upload,
|
|
3482
|
+
* no policy of any kind (no size cap, no type allow-list, no retention rule) — every one of
|
|
3483
|
+
* those is a product decision the epic has explicitly NOT made yet (see MP-128's open
|
|
3484
|
+
* problem), so this component encodes none of them. It only ever renders the `folders`/
|
|
3485
|
+
* `files` it is handed and reports intent through callbacks; the host owns every mutation,
|
|
3486
|
+
* every permission check and every byte that moves.
|
|
3487
|
+
*
|
|
3488
|
+
* Two panes side by side while there's room — the folder tree (search this file's own
|
|
3489
|
+
* width, a container query, exactly like FileViewer's side panel: a FileBrowser opened
|
|
3490
|
+
* inside a narrow Drawer should behave like a phone even on a wide screen) and the current
|
|
3491
|
+
* folder's contents. Below that width the tree pane disappears entirely (`display: none`,
|
|
3492
|
+
* not a tab — there is nothing to switch to, since the current folder's own subfolders
|
|
3493
|
+
* already appear as rows in the main pane) and navigation happens purely through the
|
|
3494
|
+
* breadcrumb trail plus tapping into a subfolder row, per the card's own spec. One scroll
|
|
3495
|
+
* region per pane either way (R-8): the tree pane and the main pane each own their own
|
|
3496
|
+
* `overflow`, the head/breadcrumb bar never scrolls.
|
|
3497
|
+
*/
|
|
3498
|
+
declare function FileBrowser({ folders, files, currentFolderId, onNavigate, onCreateFolder, onRenameFolder, onMoveFolder, onMoveFile, onOpenFile, onRemoveFile, onDeleteFolder, onUpload, loading, permissions, className, }: FileBrowserProps): React.JSX.Element;
|
|
3499
|
+
|
|
3421
3500
|
interface TableQuery {
|
|
3422
3501
|
/** 1-indexed. */
|
|
3423
3502
|
page: number;
|
|
@@ -3690,4 +3769,4 @@ interface VersionStore<TState, TDiff = unknown> {
|
|
|
3690
3769
|
}
|
|
3691
3770
|
declare function createVersionStore<TState, TDiff = unknown>(initialState: TState, options?: CreateVersionStoreOptions<TState, TDiff>): VersionStore<TState, TDiff>;
|
|
3692
3771
|
|
|
3693
|
-
export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, ApiSpecBrowser, type ApiSpecBrowserProps, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_UNAVAILABLE, Calendar, type CalendarProps, Card, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, ChatTranscript, type ChatTranscriptProps, ChatTurn, type ChatTurnProps, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, type DeviceSession, DiffBlock, type DiffBlockProps, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, FeatureGate, type FeatureGateProps, type FeatureStatus, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterField, type FilterFieldOption, type FilterFieldSelect, type FilterFieldText, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, Gate, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type JobStatus, Json, KeyHint, type KeyHintProps, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NumberInput, type NumberInputProps, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Placement, type PollOptions, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QueryKit, type QueuedTurn, QuotaRow, type QuotaRowProps, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type Session, type Flag as SessionFlag, SessionKit, type SessionStats, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, Textarea, type TextareaProps, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastProps, Tooltip, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, type UsageLimit, UseFeatureStatus, UseRuntimeMode, type UseServerTableOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, acceptMatches, anyOfFilter, channelWeightOf, computeNeedMore, computeVirtualWindow, createVersionStore, eqFilter, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDuration, formatEta, formatRelative, groupMessages, hasModifier, iconForMime, importanceLevel, importanceTokens, isImage, isSystemMessage, jobBucket, languageLabel, markdownToText, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, revokeAttachment, toAttachment, tokenize, useChatEngine, useFeatureStatus, usePopoverPosition, useRuntimeMode, useServerTable, useStagedFiles, visibleMessages };
|
|
3772
|
+
export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, ApiSpecBrowser, type ApiSpecBrowserProps, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_UNAVAILABLE, Calendar, type CalendarProps, Card, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, ChatTranscript, type ChatTranscriptProps, ChatTurn, type ChatTurnProps, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, type DeviceSession, DiffBlock, type DiffBlockProps, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, FeatureGate, type FeatureGateProps, type FeatureStatus, FileBrowser, type FileBrowserFile, type FileBrowserFolder, type FileBrowserPermissions, type FileBrowserProps, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterField, type FilterFieldOption, type FilterFieldSelect, type FilterFieldText, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, Gate, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type JobStatus, Json, KeyHint, type KeyHintProps, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NumberInput, type NumberInputProps, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Placement, type PollOptions, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QueryKit, type QueuedTurn, QuotaRow, type QuotaRowProps, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type Session, type Flag as SessionFlag, SessionKit, type SessionStats, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, Textarea, type TextareaProps, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastProps, Tooltip, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, type UsageLimit, UseFeatureStatus, UseRuntimeMode, type UseServerTableOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, acceptMatches, anyOfFilter, channelWeightOf, computeNeedMore, computeVirtualWindow, createVersionStore, eqFilter, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDuration, formatEta, formatRelative, groupMessages, hasModifier, iconForMime, importanceLevel, importanceTokens, isImage, isSystemMessage, jobBucket, languageLabel, markdownToText, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, revokeAttachment, toAttachment, tokenize, useChatEngine, useFeatureStatus, usePopoverPosition, useRuntimeMode, useServerTable, useStagedFiles, visibleMessages };
|