mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 00:58:32 +02:00
Better code splitting and removed final instances of react-dnd
This commit is contained in:
@@ -1,127 +1,245 @@
|
||||
import type { Color } from '@yaakapp-internal/plugins';
|
||||
import classNames from 'classnames';
|
||||
import * as lucide from 'lucide-react';
|
||||
import {
|
||||
AlertTriangleIcon,
|
||||
ArchiveIcon,
|
||||
ArrowBigDownDashIcon,
|
||||
ArrowBigLeftDashIcon,
|
||||
ArrowBigRightDashIcon,
|
||||
ArrowBigRightIcon,
|
||||
ArrowBigUpDashIcon,
|
||||
ArrowDownIcon,
|
||||
ArrowDownToDotIcon,
|
||||
ArrowDownToLineIcon,
|
||||
ArrowRightCircleIcon,
|
||||
ArrowUpDownIcon,
|
||||
ArrowUpFromDotIcon,
|
||||
ArrowUpFromLineIcon,
|
||||
ArrowUpIcon,
|
||||
BadgeCheckIcon,
|
||||
BookOpenText,
|
||||
BoxIcon,
|
||||
CakeIcon,
|
||||
CheckCircleIcon,
|
||||
CheckIcon,
|
||||
ChevronDownIcon,
|
||||
ChevronLeftIcon,
|
||||
ChevronRightIcon,
|
||||
CircleAlertIcon,
|
||||
CircleDashedIcon,
|
||||
CircleDollarSignIcon,
|
||||
CircleFadingArrowUpIcon,
|
||||
CircleHelpIcon,
|
||||
ClipboardPasteIcon,
|
||||
ClockIcon,
|
||||
CodeIcon,
|
||||
Columns2Icon,
|
||||
CommandIcon,
|
||||
CookieIcon,
|
||||
CopyCheck,
|
||||
CopyIcon,
|
||||
CornerRightUpIcon,
|
||||
CreditCardIcon,
|
||||
DotIcon,
|
||||
DownloadIcon,
|
||||
EllipsisIcon,
|
||||
ExpandIcon,
|
||||
ExternalLinkIcon,
|
||||
EyeIcon,
|
||||
EyeOffIcon,
|
||||
FileCodeIcon,
|
||||
FileTextIcon,
|
||||
FilterIcon,
|
||||
FlameIcon,
|
||||
FlaskConicalIcon,
|
||||
FolderCodeIcon,
|
||||
FolderCogIcon,
|
||||
FolderGitIcon,
|
||||
FolderIcon,
|
||||
FolderInputIcon,
|
||||
FolderOpenIcon,
|
||||
FolderOutputIcon,
|
||||
FolderSymlinkIcon,
|
||||
FolderSyncIcon,
|
||||
FolderUpIcon,
|
||||
GitBranchIcon,
|
||||
GitBranchPlusIcon,
|
||||
GitCommitIcon,
|
||||
GitCommitVerticalIcon,
|
||||
GitForkIcon,
|
||||
GitPullRequestIcon,
|
||||
GripVerticalIcon,
|
||||
HandIcon,
|
||||
HistoryIcon,
|
||||
HomeIcon,
|
||||
ImportIcon,
|
||||
InfoIcon,
|
||||
KeyboardIcon,
|
||||
KeyRoundIcon,
|
||||
LockIcon,
|
||||
LockOpenIcon,
|
||||
MergeIcon,
|
||||
MessageSquare,
|
||||
MinusCircleIcon,
|
||||
MinusIcon,
|
||||
MoonIcon,
|
||||
MoreVerticalIcon,
|
||||
PaletteIcon,
|
||||
PanelLeftCloseIcon,
|
||||
PanelLeftOpenIcon,
|
||||
PencilIcon,
|
||||
PinIcon,
|
||||
PinOffIcon,
|
||||
Plug,
|
||||
PlusCircleIcon,
|
||||
PlusIcon,
|
||||
PuzzleIcon,
|
||||
RefreshCcwIcon,
|
||||
RefreshCwIcon,
|
||||
RocketIcon,
|
||||
Rows2Icon,
|
||||
SaveIcon,
|
||||
SearchIcon,
|
||||
SendHorizonalIcon,
|
||||
SettingsIcon,
|
||||
ShieldAlertIcon,
|
||||
ShieldCheckIcon,
|
||||
ShieldIcon,
|
||||
ShieldOffIcon,
|
||||
SparklesIcon,
|
||||
SquareCheckIcon,
|
||||
SquareIcon,
|
||||
SquareTerminalIcon,
|
||||
SunIcon,
|
||||
TableIcon,
|
||||
Trash2Icon,
|
||||
UploadIcon,
|
||||
VariableIcon,
|
||||
Wand2Icon,
|
||||
WrenchIcon,
|
||||
XIcon,
|
||||
} from 'lucide-react';
|
||||
import type { CSSProperties, HTMLAttributes } from 'react';
|
||||
import { memo } from 'react';
|
||||
|
||||
const icons = {
|
||||
alert_triangle: lucide.AlertTriangleIcon,
|
||||
archive: lucide.ArchiveIcon,
|
||||
arrow_big_down_dash: lucide.ArrowBigDownDashIcon,
|
||||
arrow_big_left_dash: lucide.ArrowBigLeftDashIcon,
|
||||
arrow_big_right: lucide.ArrowBigRightIcon,
|
||||
arrow_big_right_dash: lucide.ArrowBigRightDashIcon,
|
||||
arrow_big_up_dash: lucide.ArrowBigUpDashIcon,
|
||||
arrow_down: lucide.ArrowDownIcon,
|
||||
arrow_down_to_dot: lucide.ArrowDownToDotIcon,
|
||||
arrow_down_to_line: lucide.ArrowDownToLineIcon,
|
||||
arrow_right_circle: lucide.ArrowRightCircleIcon,
|
||||
arrow_up: lucide.ArrowUpIcon,
|
||||
arrow_up_down: lucide.ArrowUpDownIcon,
|
||||
arrow_up_from_dot: lucide.ArrowUpFromDotIcon,
|
||||
arrow_up_from_line: lucide.ArrowUpFromLineIcon,
|
||||
badge_check: lucide.BadgeCheckIcon,
|
||||
book_open_text: lucide.BookOpenText,
|
||||
box: lucide.BoxIcon,
|
||||
cake: lucide.CakeIcon,
|
||||
chat: lucide.MessageSquare,
|
||||
check: lucide.CheckIcon,
|
||||
check_circle: lucide.CheckCircleIcon,
|
||||
check_square_checked: lucide.SquareCheckIcon,
|
||||
check_square_unchecked: lucide.SquareIcon,
|
||||
chevron_down: lucide.ChevronDownIcon,
|
||||
chevron_left: lucide.ChevronLeftIcon,
|
||||
chevron_right: lucide.ChevronRightIcon,
|
||||
circle_alert: lucide.CircleAlertIcon,
|
||||
circle_dashed: lucide.CircleDashedIcon,
|
||||
circle_dollar_sign: lucide.CircleDollarSignIcon,
|
||||
circle_fading_arrow_up: lucide.CircleFadingArrowUpIcon,
|
||||
clock: lucide.ClockIcon,
|
||||
code: lucide.CodeIcon,
|
||||
columns_2: lucide.Columns2Icon,
|
||||
command: lucide.CommandIcon,
|
||||
cookie: lucide.CookieIcon,
|
||||
copy: lucide.CopyIcon,
|
||||
copy_check: lucide.CopyCheck,
|
||||
corner_right_up: lucide.CornerRightUpIcon,
|
||||
credit_card: lucide.CreditCardIcon,
|
||||
dot: lucide.DotIcon,
|
||||
download: lucide.DownloadIcon,
|
||||
ellipsis: lucide.EllipsisIcon,
|
||||
expand: lucide.ExpandIcon,
|
||||
external_link: lucide.ExternalLinkIcon,
|
||||
eye: lucide.EyeIcon,
|
||||
eye_closed: lucide.EyeOffIcon,
|
||||
file_code: lucide.FileCodeIcon,
|
||||
filter: lucide.FilterIcon,
|
||||
flame: lucide.FlameIcon,
|
||||
flask: lucide.FlaskConicalIcon,
|
||||
folder: lucide.FolderIcon,
|
||||
folder_code: lucide.FolderCodeIcon,
|
||||
folder_cog: lucide.FolderCogIcon,
|
||||
folder_git: lucide.FolderGitIcon,
|
||||
folder_input: lucide.FolderInputIcon,
|
||||
folder_open: lucide.FolderOpenIcon,
|
||||
folder_output: lucide.FolderOutputIcon,
|
||||
folder_symlink: lucide.FolderSymlinkIcon,
|
||||
folder_sync: lucide.FolderSyncIcon,
|
||||
folder_up: lucide.FolderUpIcon,
|
||||
git_branch: lucide.GitBranchIcon,
|
||||
git_branch_plus: lucide.GitBranchPlusIcon,
|
||||
git_commit: lucide.GitCommitIcon,
|
||||
git_commit_vertical: lucide.GitCommitVerticalIcon,
|
||||
git_fork: lucide.GitForkIcon,
|
||||
git_pull_request: lucide.GitPullRequestIcon,
|
||||
grip_vertical: lucide.GripVerticalIcon,
|
||||
hand: lucide.HandIcon,
|
||||
help: lucide.CircleHelpIcon,
|
||||
history: lucide.HistoryIcon,
|
||||
house: lucide.HomeIcon,
|
||||
import: lucide.ImportIcon,
|
||||
info: lucide.InfoIcon,
|
||||
key_round: lucide.KeyRoundIcon,
|
||||
keyboard: lucide.KeyboardIcon,
|
||||
left_panel_hidden: lucide.PanelLeftOpenIcon,
|
||||
left_panel_visible: lucide.PanelLeftCloseIcon,
|
||||
lock: lucide.LockIcon,
|
||||
lock_open: lucide.LockOpenIcon,
|
||||
magic_wand: lucide.Wand2Icon,
|
||||
merge: lucide.MergeIcon,
|
||||
minus: lucide.MinusIcon,
|
||||
minus_circle: lucide.MinusCircleIcon,
|
||||
moon: lucide.MoonIcon,
|
||||
more_vertical: lucide.MoreVerticalIcon,
|
||||
palette: lucide.PaletteIcon,
|
||||
paste: lucide.ClipboardPasteIcon,
|
||||
pencil: lucide.PencilIcon,
|
||||
pin: lucide.PinIcon,
|
||||
plug: lucide.Plug,
|
||||
plus: lucide.PlusIcon,
|
||||
plus_circle: lucide.PlusCircleIcon,
|
||||
puzzle: lucide.PuzzleIcon,
|
||||
refresh: lucide.RefreshCwIcon,
|
||||
rocket: lucide.RocketIcon,
|
||||
rows_2: lucide.Rows2Icon,
|
||||
save: lucide.SaveIcon,
|
||||
search: lucide.SearchIcon,
|
||||
send_horizontal: lucide.SendHorizonalIcon,
|
||||
settings: lucide.SettingsIcon,
|
||||
shield: lucide.ShieldIcon,
|
||||
shield_check: lucide.ShieldCheckIcon,
|
||||
shield_off: lucide.ShieldOffIcon,
|
||||
sparkles: lucide.SparklesIcon,
|
||||
square_terminal: lucide.SquareTerminalIcon,
|
||||
sun: lucide.SunIcon,
|
||||
table: lucide.TableIcon,
|
||||
text: lucide.FileTextIcon,
|
||||
trash: lucide.Trash2Icon,
|
||||
unpin: lucide.PinOffIcon,
|
||||
update: lucide.RefreshCcwIcon,
|
||||
upload: lucide.UploadIcon,
|
||||
variable: lucide.VariableIcon,
|
||||
wrench: lucide.WrenchIcon,
|
||||
x: lucide.XIcon,
|
||||
_unknown: lucide.ShieldAlertIcon,
|
||||
alert_triangle: AlertTriangleIcon,
|
||||
archive: ArchiveIcon,
|
||||
arrow_big_down_dash: ArrowBigDownDashIcon,
|
||||
arrow_big_left_dash: ArrowBigLeftDashIcon,
|
||||
arrow_big_right: ArrowBigRightIcon,
|
||||
arrow_big_right_dash: ArrowBigRightDashIcon,
|
||||
arrow_big_up_dash: ArrowBigUpDashIcon,
|
||||
arrow_down: ArrowDownIcon,
|
||||
arrow_down_to_dot: ArrowDownToDotIcon,
|
||||
arrow_down_to_line: ArrowDownToLineIcon,
|
||||
arrow_right_circle: ArrowRightCircleIcon,
|
||||
arrow_up: ArrowUpIcon,
|
||||
arrow_up_down: ArrowUpDownIcon,
|
||||
arrow_up_from_dot: ArrowUpFromDotIcon,
|
||||
arrow_up_from_line: ArrowUpFromLineIcon,
|
||||
badge_check: BadgeCheckIcon,
|
||||
book_open_text: BookOpenText,
|
||||
box: BoxIcon,
|
||||
cake: CakeIcon,
|
||||
chat: MessageSquare,
|
||||
check: CheckIcon,
|
||||
check_circle: CheckCircleIcon,
|
||||
check_square_checked: SquareCheckIcon,
|
||||
check_square_unchecked: SquareIcon,
|
||||
chevron_down: ChevronDownIcon,
|
||||
chevron_left: ChevronLeftIcon,
|
||||
chevron_right: ChevronRightIcon,
|
||||
circle_alert: CircleAlertIcon,
|
||||
circle_dashed: CircleDashedIcon,
|
||||
circle_dollar_sign: CircleDollarSignIcon,
|
||||
circle_fading_arrow_up: CircleFadingArrowUpIcon,
|
||||
clock: ClockIcon,
|
||||
code: CodeIcon,
|
||||
columns_2: Columns2Icon,
|
||||
command: CommandIcon,
|
||||
cookie: CookieIcon,
|
||||
copy: CopyIcon,
|
||||
copy_check: CopyCheck,
|
||||
corner_right_up: CornerRightUpIcon,
|
||||
credit_card: CreditCardIcon,
|
||||
dot: DotIcon,
|
||||
download: DownloadIcon,
|
||||
ellipsis: EllipsisIcon,
|
||||
expand: ExpandIcon,
|
||||
external_link: ExternalLinkIcon,
|
||||
eye: EyeIcon,
|
||||
eye_closed: EyeOffIcon,
|
||||
file_code: FileCodeIcon,
|
||||
filter: FilterIcon,
|
||||
flame: FlameIcon,
|
||||
flask: FlaskConicalIcon,
|
||||
folder: FolderIcon,
|
||||
folder_code: FolderCodeIcon,
|
||||
folder_cog: FolderCogIcon,
|
||||
folder_git: FolderGitIcon,
|
||||
folder_input: FolderInputIcon,
|
||||
folder_open: FolderOpenIcon,
|
||||
folder_output: FolderOutputIcon,
|
||||
folder_symlink: FolderSymlinkIcon,
|
||||
folder_sync: FolderSyncIcon,
|
||||
folder_up: FolderUpIcon,
|
||||
git_branch: GitBranchIcon,
|
||||
git_branch_plus: GitBranchPlusIcon,
|
||||
git_commit: GitCommitIcon,
|
||||
git_commit_vertical: GitCommitVerticalIcon,
|
||||
git_fork: GitForkIcon,
|
||||
git_pull_request: GitPullRequestIcon,
|
||||
grip_vertical: GripVerticalIcon,
|
||||
hand: HandIcon,
|
||||
help: CircleHelpIcon,
|
||||
history: HistoryIcon,
|
||||
house: HomeIcon,
|
||||
import: ImportIcon,
|
||||
info: InfoIcon,
|
||||
key_round: KeyRoundIcon,
|
||||
keyboard: KeyboardIcon,
|
||||
left_panel_hidden: PanelLeftOpenIcon,
|
||||
left_panel_visible: PanelLeftCloseIcon,
|
||||
lock: LockIcon,
|
||||
lock_open: LockOpenIcon,
|
||||
magic_wand: Wand2Icon,
|
||||
merge: MergeIcon,
|
||||
minus: MinusIcon,
|
||||
minus_circle: MinusCircleIcon,
|
||||
moon: MoonIcon,
|
||||
more_vertical: MoreVerticalIcon,
|
||||
palette: PaletteIcon,
|
||||
paste: ClipboardPasteIcon,
|
||||
pencil: PencilIcon,
|
||||
pin: PinIcon,
|
||||
plug: Plug,
|
||||
plus: PlusIcon,
|
||||
plus_circle: PlusCircleIcon,
|
||||
puzzle: PuzzleIcon,
|
||||
refresh: RefreshCwIcon,
|
||||
rocket: RocketIcon,
|
||||
rows_2: Rows2Icon,
|
||||
save: SaveIcon,
|
||||
search: SearchIcon,
|
||||
send_horizontal: SendHorizonalIcon,
|
||||
settings: SettingsIcon,
|
||||
shield: ShieldIcon,
|
||||
shield_check: ShieldCheckIcon,
|
||||
shield_off: ShieldOffIcon,
|
||||
sparkles: SparklesIcon,
|
||||
square_terminal: SquareTerminalIcon,
|
||||
sun: SunIcon,
|
||||
table: TableIcon,
|
||||
text: FileTextIcon,
|
||||
trash: Trash2Icon,
|
||||
unpin: PinOffIcon,
|
||||
update: RefreshCcwIcon,
|
||||
upload: UploadIcon,
|
||||
variable: VariableIcon,
|
||||
wrench: WrenchIcon,
|
||||
x: XIcon,
|
||||
_unknown: ShieldAlertIcon,
|
||||
|
||||
empty: (props: HTMLAttributes<HTMLSpanElement>) => <div {...props} />,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user