@gperezmz/bb-plugin-thread-glance 0.1.2
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/LICENSE +21 -0
- package/README.md +20 -0
- package/THIRD_PARTY_NOTICES.md +230 -0
- package/app.tsx +12 -0
- package/components/ui/alert-dialog.tsx +142 -0
- package/components/ui/button.tsx +59 -0
- package/components/ui/card.tsx +83 -0
- package/components/ui/coarse-pointer-sizing.ts +66 -0
- package/components/ui/context-menu.tsx +355 -0
- package/components/ui/dialog.tsx +416 -0
- package/components/ui/dropdown-menu.tsx +640 -0
- package/components/ui/hooks/use-compact-viewport.tsx +37 -0
- package/components/ui/hooks/use-media-query.ts +70 -0
- package/components/ui/hooks/use-pointer-coarse.ts +7 -0
- package/components/ui/hover-card.tsx +36 -0
- package/components/ui/icon-extended.tsx +333 -0
- package/components/ui/icon-registry.ts +189 -0
- package/components/ui/icon.tsx +444 -0
- package/components/ui/input.tsx +30 -0
- package/components/ui/menu-item-hover.tsx +93 -0
- package/components/ui/motion.ts +4 -0
- package/components/ui/overlay-trigger.ts +84 -0
- package/components/ui/popover.tsx +223 -0
- package/components/ui/responsive-overlay.tsx +823 -0
- package/components/ui/tooltip.tsx +63 -0
- package/dist/app.css +2 -0
- package/dist/app.js +66 -0
- package/dist/app.meta.json +11 -0
- package/dist/server.js +71 -0
- package/dist/server.js.map +6 -0
- package/dist/server.meta.json +11 -0
- package/features/thread-list/components/Dialogs.tsx +299 -0
- package/features/thread-list/components/FoldRows.tsx +147 -0
- package/features/thread-list/components/GroupSection.tsx +370 -0
- package/features/thread-list/components/ProviderBadge.tsx +57 -0
- package/features/thread-list/components/PullRequestBadge.tsx +50 -0
- package/features/thread-list/components/Rails.tsx +28 -0
- package/features/thread-list/components/RenameEditor.tsx +118 -0
- package/features/thread-list/components/RowMenu.tsx +168 -0
- package/features/thread-list/components/SplitMiniMap.tsx +55 -0
- package/features/thread-list/components/ThreadDetails.tsx +138 -0
- package/features/thread-list/components/ThreadList.tsx +855 -0
- package/features/thread-list/components/ThreadRowView.tsx +631 -0
- package/features/thread-list/components/Toolbar.tsx +296 -0
- package/features/thread-list/components/controller.ts +64 -0
- package/features/thread-list/components/glyphs.tsx +129 -0
- package/features/thread-list/components/row-card.ts +127 -0
- package/features/thread-list/data/storage.ts +18 -0
- package/features/thread-list/data/useAutoExpand.ts +53 -0
- package/features/thread-list/data/useClientPreferences.ts +20 -0
- package/features/thread-list/data/useNotes.ts +41 -0
- package/features/thread-list/data/useNow.ts +19 -0
- package/features/thread-list/data/usePreferences.ts +126 -0
- package/features/thread-list/data/useScheduled.ts +43 -0
- package/features/thread-list/data/useStamps.ts +68 -0
- package/features/thread-list/icons.ts +44 -0
- package/features/thread-list/index.ts +2 -0
- package/features/thread-list/model/attention.ts +89 -0
- package/features/thread-list/model/counters.ts +67 -0
- package/features/thread-list/model/details.ts +79 -0
- package/features/thread-list/model/drag.ts +104 -0
- package/features/thread-list/model/expansion.ts +71 -0
- package/features/thread-list/model/families.ts +297 -0
- package/features/thread-list/model/groups.ts +263 -0
- package/features/thread-list/model/labels.ts +50 -0
- package/features/thread-list/model/layout.ts +61 -0
- package/features/thread-list/model/menu.ts +78 -0
- package/features/thread-list/model/move.ts +46 -0
- package/features/thread-list/model/notes.ts +52 -0
- package/features/thread-list/model/provider-mark.ts +59 -0
- package/features/thread-list/model/share.ts +101 -0
- package/features/thread-list/model/sort.ts +78 -0
- package/features/thread-list/model/state.ts +330 -0
- package/features/thread-list/model/time.ts +107 -0
- package/features/thread-list/model/toggles.ts +99 -0
- package/features/thread-list/model/view.ts +669 -0
- package/features/thread-list/model/windowing.ts +27 -0
- package/features/thread-list/testing/fixtures.ts +162 -0
- package/hooks/useBrowserDimmingModal.ts +5 -0
- package/lib/portal-scope.ts +15 -0
- package/lib/utils.ts +17 -0
- package/package.json +96 -0
- package/server/cli.ts +107 -0
- package/server/failures.ts +136 -0
- package/server/import.ts +144 -0
- package/server/notes.ts +236 -0
- package/server/preference-store.ts +96 -0
- package/server/scheduled.ts +129 -0
- package/server/serial.ts +12 -0
- package/server/stamps.ts +142 -0
- package/server/startup.ts +121 -0
- package/server.ts +126 -0
- package/shared/contract.ts +73 -0
- package/shared/preferences.ts +241 -0
- package/shared/signals.ts +71 -0
- package/skills/thread-glance/SKILL.md +69 -0
- package/tsconfig.json +36 -0
- package/types/global-jsx.d.ts +10 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { useSyncExternalStore } from "react";
|
|
2
|
+
|
|
3
|
+
export const DARK_COLOR_SCHEME_QUERY = "(prefers-color-scheme: dark)";
|
|
4
|
+
export const REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
|
|
5
|
+
|
|
6
|
+
type MediaQueryRef = {
|
|
7
|
+
mql: MediaQueryList;
|
|
8
|
+
subscribe: (notify: () => void) => () => void;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const mediaQueryCache = new Map<string, MediaQueryRef>();
|
|
12
|
+
|
|
13
|
+
function createMediaQueryRef(query: string): MediaQueryRef | null {
|
|
14
|
+
if (typeof window === "undefined" || !window.matchMedia) return null;
|
|
15
|
+
|
|
16
|
+
let ref = mediaQueryCache.get(query);
|
|
17
|
+
if (ref) return ref;
|
|
18
|
+
|
|
19
|
+
const mql = window.matchMedia(query);
|
|
20
|
+
const listeners = new Set<() => void>();
|
|
21
|
+
const onChange = () => {
|
|
22
|
+
for (const listener of listeners) listener();
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
ref = {
|
|
26
|
+
mql,
|
|
27
|
+
subscribe(notify) {
|
|
28
|
+
const wasEmpty = listeners.size === 0;
|
|
29
|
+
listeners.add(notify);
|
|
30
|
+
if (wasEmpty) {
|
|
31
|
+
mql.addEventListener("change", onChange);
|
|
32
|
+
}
|
|
33
|
+
return () => {
|
|
34
|
+
listeners.delete(notify);
|
|
35
|
+
if (listeners.size === 0) {
|
|
36
|
+
mql.removeEventListener("change", onChange);
|
|
37
|
+
mediaQueryCache.delete(query);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
mediaQueryCache.set(query, ref);
|
|
43
|
+
return ref;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function subscribeMediaQuery(
|
|
47
|
+
query: string,
|
|
48
|
+
notify: () => void,
|
|
49
|
+
): () => void {
|
|
50
|
+
return createMediaQueryRef(query)?.subscribe(notify) ?? (() => {});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function getMediaQuerySnapshot(query: string): boolean {
|
|
54
|
+
if (typeof window === "undefined" || !window.matchMedia) return false;
|
|
55
|
+
return (
|
|
56
|
+
mediaQueryCache.get(query)?.mql.matches ?? window.matchMedia(query).matches
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function useMediaQuery(query: string): boolean {
|
|
61
|
+
return useSyncExternalStore(
|
|
62
|
+
(notify) => subscribeMediaQuery(query, notify),
|
|
63
|
+
() => getMediaQuerySnapshot(query),
|
|
64
|
+
() => false,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function usePrefersReducedMotion(): boolean {
|
|
69
|
+
return useMediaQuery(REDUCED_MOTION_QUERY);
|
|
70
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
3
|
+
|
|
4
|
+
import { usePortalScopeProps } from "../../lib/portal-scope";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
|
|
7
|
+
const HoverCard = HoverCardPrimitive.Root;
|
|
8
|
+
|
|
9
|
+
const HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
10
|
+
|
|
11
|
+
const HoverCardContent = React.forwardRef<
|
|
12
|
+
React.ElementRef<typeof HoverCardPrimitive.Content>,
|
|
13
|
+
React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>
|
|
14
|
+
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => {
|
|
15
|
+
// Portaled to the document, like the other overlays, so the card paints
|
|
16
|
+
// above the main pane instead of inside the sidebar's stacking context.
|
|
17
|
+
const scopeProps = usePortalScopeProps();
|
|
18
|
+
return (
|
|
19
|
+
<HoverCardPrimitive.Portal>
|
|
20
|
+
<HoverCardPrimitive.Content
|
|
21
|
+
ref={ref}
|
|
22
|
+
align={align}
|
|
23
|
+
sideOffset={sideOffset}
|
|
24
|
+
{...scopeProps}
|
|
25
|
+
className={cn(
|
|
26
|
+
"z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]",
|
|
27
|
+
className,
|
|
28
|
+
)}
|
|
29
|
+
{...props}
|
|
30
|
+
/>
|
|
31
|
+
</HoverCardPrimitive.Portal>
|
|
32
|
+
);
|
|
33
|
+
});
|
|
34
|
+
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
35
|
+
|
|
36
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import type { IconSvgElement } from "@hugeicons/react";
|
|
2
|
+
import AiBrain01Icon from "@hugeicons/core-free-icons/AiBrain01Icon";
|
|
3
|
+
import AiBrowserIcon from "@hugeicons/core-free-icons/AiBrowserIcon";
|
|
4
|
+
import AiContentGenerator01Icon from "@hugeicons/core-free-icons/AiContentGenerator01Icon";
|
|
5
|
+
import ArrowDown02Icon from "@hugeicons/core-free-icons/ArrowDown02Icon";
|
|
6
|
+
import ArrowDownDoubleIcon from "@hugeicons/core-free-icons/ArrowDownDoubleIcon";
|
|
7
|
+
import ArrowLeft02Icon from "@hugeicons/core-free-icons/ArrowLeft02Icon";
|
|
8
|
+
import ArrowMoveDownLeftIcon from "@hugeicons/core-free-icons/ArrowMoveDownLeftIcon";
|
|
9
|
+
import ArrowMoveDownRightIcon from "@hugeicons/core-free-icons/ArrowMoveDownRightIcon";
|
|
10
|
+
import ArrowReloadHorizontalIcon from "@hugeicons/core-free-icons/ArrowReloadHorizontalIcon";
|
|
11
|
+
import ArrowRight02Icon from "@hugeicons/core-free-icons/ArrowRight02Icon";
|
|
12
|
+
import ArrowTurnBackwardIcon from "@hugeicons/core-free-icons/ArrowTurnBackwardIcon";
|
|
13
|
+
import ArrowTurnForwardIcon from "@hugeicons/core-free-icons/ArrowTurnForwardIcon";
|
|
14
|
+
import ArrowUp01Icon from "@hugeicons/core-free-icons/ArrowUp01Icon";
|
|
15
|
+
import ArrowUp02Icon from "@hugeicons/core-free-icons/ArrowUp02Icon";
|
|
16
|
+
import ArrowUpDoubleIcon from "@hugeicons/core-free-icons/ArrowUpDoubleIcon";
|
|
17
|
+
import ArrowUpDownIcon from "@hugeicons/core-free-icons/ArrowUpDownIcon";
|
|
18
|
+
import ArrowUpRight01Icon from "@hugeicons/core-free-icons/ArrowUpRight01Icon";
|
|
19
|
+
import AttachmentIcon from "@hugeicons/core-free-icons/AttachmentIcon";
|
|
20
|
+
import BellDotIcon from "@hugeicons/core-free-icons/BellDotIcon";
|
|
21
|
+
import Book02Icon from "@hugeicons/core-free-icons/Book02Icon";
|
|
22
|
+
import BrainIcon from "@hugeicons/core-free-icons/BrainIcon";
|
|
23
|
+
import BrowserIcon from "@hugeicons/core-free-icons/BrowserIcon";
|
|
24
|
+
import Calendar03Icon from "@hugeicons/core-free-icons/Calendar03Icon";
|
|
25
|
+
import CalendarCheckOut02Icon from "@hugeicons/core-free-icons/CalendarCheckOut02Icon";
|
|
26
|
+
import ChartColumnIcon from "@hugeicons/core-free-icons/ChartColumnIcon";
|
|
27
|
+
import CircleArrowShrink01Icon from "@hugeicons/core-free-icons/CircleArrowShrink01Icon";
|
|
28
|
+
import CleanIcon from "@hugeicons/core-free-icons/CleanIcon";
|
|
29
|
+
import Clock01Icon from "@hugeicons/core-free-icons/Clock01Icon";
|
|
30
|
+
import ClockArrowDownIcon from "@hugeicons/core-free-icons/ClockArrowDownIcon";
|
|
31
|
+
import ClockArrowUpIcon from "@hugeicons/core-free-icons/ClockArrowUpIcon";
|
|
32
|
+
import CloudIcon from "@hugeicons/core-free-icons/CloudIcon";
|
|
33
|
+
import CloudOffIcon from "@hugeicons/core-free-icons/CloudOffIcon";
|
|
34
|
+
import Coffee02Icon from "@hugeicons/core-free-icons/Coffee02Icon";
|
|
35
|
+
import CollapseIcon from "@hugeicons/core-free-icons/CollapseIcon";
|
|
36
|
+
import DashedLine02Icon from "@hugeicons/core-free-icons/DashedLine02Icon";
|
|
37
|
+
import DateTimeIcon from "@hugeicons/core-free-icons/DateTimeIcon";
|
|
38
|
+
import DiscordIcon from "@hugeicons/core-free-icons/DiscordIcon";
|
|
39
|
+
import DragDropHorizontalIcon from "@hugeicons/core-free-icons/DragDropHorizontalIcon";
|
|
40
|
+
import DragDropVerticalIcon from "@hugeicons/core-free-icons/DragDropVerticalIcon";
|
|
41
|
+
import Edit04Icon from "@hugeicons/core-free-icons/Edit04Icon";
|
|
42
|
+
import ElectricPlugsIcon from "@hugeicons/core-free-icons/ElectricPlugsIcon";
|
|
43
|
+
import ExpandIcon from "@hugeicons/core-free-icons/ExpandIcon";
|
|
44
|
+
import File01Icon from "@hugeicons/core-free-icons/File01Icon";
|
|
45
|
+
import FileAttachmentIcon from "@hugeicons/core-free-icons/FileAttachmentIcon";
|
|
46
|
+
import FileEmpty02Icon from "@hugeicons/core-free-icons/FileEmpty02Icon";
|
|
47
|
+
import FileQuestionMarkIcon from "@hugeicons/core-free-icons/FileQuestionMarkIcon";
|
|
48
|
+
import Folder02Icon from "@hugeicons/core-free-icons/Folder02Icon";
|
|
49
|
+
import FolderEditIcon from "@hugeicons/core-free-icons/FolderEditIcon";
|
|
50
|
+
import FolderRemoveIcon from "@hugeicons/core-free-icons/FolderRemoveIcon";
|
|
51
|
+
import GitBranchIcon from "@hugeicons/core-free-icons/GitBranchIcon";
|
|
52
|
+
import GitForkIcon from "@hugeicons/core-free-icons/GitForkIcon";
|
|
53
|
+
import GitMergeIcon from "@hugeicons/core-free-icons/GitMergeIcon";
|
|
54
|
+
import GitPullRequestArrow from "@hugeicons/core-free-icons/GitPullRequestIcon";
|
|
55
|
+
import GitPullRequestClosedIcon from "@hugeicons/core-free-icons/GitPullRequestClosedIcon";
|
|
56
|
+
import GitPullRequestDraftIcon from "@hugeicons/core-free-icons/GitPullRequestDraftIcon";
|
|
57
|
+
import GitPullRequestIcon from "@hugeicons/core-free-icons/GitPullRequestIcon";
|
|
58
|
+
import GithubIcon from "@hugeicons/core-free-icons/GithubIcon";
|
|
59
|
+
import GridViewIcon from "@hugeicons/core-free-icons/GridViewIcon";
|
|
60
|
+
import InternetIcon from "@hugeicons/core-free-icons/InternetIcon";
|
|
61
|
+
import LaptopIcon from "@hugeicons/core-free-icons/LaptopIcon";
|
|
62
|
+
import Layers01Icon from "@hugeicons/core-free-icons/Layers01Icon";
|
|
63
|
+
import LayoutTwoColumnIcon from "@hugeicons/core-free-icons/Layout2ColumnIcon";
|
|
64
|
+
import LayoutTwoRowIcon from "@hugeicons/core-free-icons/Layout2RowIcon";
|
|
65
|
+
import LimitationIcon from "@hugeicons/core-free-icons/LimitationIcon";
|
|
66
|
+
import LinkSquare02Icon from "@hugeicons/core-free-icons/LinkSquare02Icon";
|
|
67
|
+
import ListEndIcon from "@hugeicons/core-free-icons/ListEndIcon";
|
|
68
|
+
import ListViewIcon from "@hugeicons/core-free-icons/ListViewIcon";
|
|
69
|
+
import LockIcon from "@hugeicons/core-free-icons/LockIcon";
|
|
70
|
+
import Mail02Icon from "@hugeicons/core-free-icons/Mail02Icon";
|
|
71
|
+
import MailOpen01Icon from "@hugeicons/core-free-icons/MailOpen01Icon";
|
|
72
|
+
import Menu02Icon from "@hugeicons/core-free-icons/Menu02Icon";
|
|
73
|
+
import MessageAdd02Icon from "@hugeicons/core-free-icons/MessageAdd02Icon";
|
|
74
|
+
import Mic02Icon from "@hugeicons/core-free-icons/Mic02Icon";
|
|
75
|
+
import MinusSignIcon from "@hugeicons/core-free-icons/MinusSignIcon";
|
|
76
|
+
import MoveToIcon from "@hugeicons/core-free-icons/MoveToIcon";
|
|
77
|
+
import News01Icon from "@hugeicons/core-free-icons/News01Icon";
|
|
78
|
+
import PackageReceiveIcon from "@hugeicons/core-free-icons/PackageReceiveIcon";
|
|
79
|
+
import PauseIcon from "@hugeicons/core-free-icons/PauseIcon";
|
|
80
|
+
import PinIcon from "@hugeicons/core-free-icons/PinIcon";
|
|
81
|
+
import PinOffIcon from "@hugeicons/core-free-icons/PinOffIcon";
|
|
82
|
+
import PlayIcon from "@hugeicons/core-free-icons/PlayIcon";
|
|
83
|
+
import Plug02Icon from "@hugeicons/core-free-icons/Plug02Icon";
|
|
84
|
+
import PlusMinusSquare01Icon from "@hugeicons/core-free-icons/PlusMinusSquare01Icon";
|
|
85
|
+
import PlusSignIcon from "@hugeicons/core-free-icons/PlusSignIcon";
|
|
86
|
+
import PuzzleIcon from "@hugeicons/core-free-icons/PuzzleIcon";
|
|
87
|
+
import Refresh01Icon from "@hugeicons/core-free-icons/Refresh01Icon";
|
|
88
|
+
import RepeatIcon from "@hugeicons/core-free-icons/RepeatIcon";
|
|
89
|
+
import SecurityCheckIcon from "@hugeicons/core-free-icons/SecurityCheckIcon";
|
|
90
|
+
import SentIcon from "@hugeicons/core-free-icons/SentIcon";
|
|
91
|
+
import SidebarBottomIcon from "@hugeicons/core-free-icons/SidebarBottomIcon";
|
|
92
|
+
import SidebarRightIcon from "@hugeicons/core-free-icons/SidebarRightIcon";
|
|
93
|
+
import SmartPhone01Icon from "@hugeicons/core-free-icons/SmartPhone01Icon";
|
|
94
|
+
import Sorting01Icon from "@hugeicons/core-free-icons/Sorting01Icon";
|
|
95
|
+
import SortingAZ02Icon from "@hugeicons/core-free-icons/SortingAZ02Icon";
|
|
96
|
+
import SortingNineOneIcon from "@hugeicons/core-free-icons/SortingNineOneIcon";
|
|
97
|
+
import SortingOneNineIcon from "@hugeicons/core-free-icons/SortingOneNineIcon";
|
|
98
|
+
import SortingZA01Icon from "@hugeicons/core-free-icons/SortingZA01Icon";
|
|
99
|
+
import SquareIcon from "@hugeicons/core-free-icons/SquareIcon";
|
|
100
|
+
import SquareUnlock02Icon from "@hugeicons/core-free-icons/SquareUnlock02Icon";
|
|
101
|
+
import StarIcon from "@hugeicons/core-free-icons/StarIcon";
|
|
102
|
+
import TestTube01Icon from "@hugeicons/core-free-icons/TestTube01Icon";
|
|
103
|
+
import TextWrapIcon from "@hugeicons/core-free-icons/TextWrapIcon";
|
|
104
|
+
import TimeScheduleIcon from "@hugeicons/core-free-icons/TimeScheduleIcon";
|
|
105
|
+
import Unarchive03Icon from "@hugeicons/core-free-icons/Unarchive03Icon";
|
|
106
|
+
import UserIcon from "@hugeicons/core-free-icons/UserIcon";
|
|
107
|
+
import ViewIcon from "@hugeicons/core-free-icons/ViewIcon";
|
|
108
|
+
import ViewOffIcon from "@hugeicons/core-free-icons/ViewOffIcon";
|
|
109
|
+
import ZoomInAreaIcon from "@hugeicons/core-free-icons/ZoomInAreaIcon";
|
|
110
|
+
import ZoomOutAreaIcon from "@hugeicons/core-free-icons/ZoomOutAreaIcon";
|
|
111
|
+
import { type ExtendedIconMap, registerExtendedIcons } from "./icon-registry";
|
|
112
|
+
|
|
113
|
+
const PaletteStrokeRoundedIcon: IconSvgElement = [
|
|
114
|
+
[
|
|
115
|
+
"path",
|
|
116
|
+
{
|
|
117
|
+
d: "M21.8205 10.4127C22.062 11.8519 22.1827 12.5715 21.2423 13.9326C21.1459 14.0722 20.8966 14.3713 20.777 14.4911C19.6103 15.6586 18.4308 15.6586 16.0716 15.6586H14.1392C13.5085 15.6586 13.1931 15.6586 12.9639 15.7142C11.9586 15.9581 11.3031 16.9391 11.453 17.9755C11.4872 18.2118 11.6043 18.5085 11.8386 19.102C11.9345 19.3449 11.9824 19.4664 12.0136 19.7304C12.1292 20.7084 11.0869 21.9508 10.1158 21.9926C9.85358 22.0039 9.83681 22.0002 9.80326 21.9926C7.66174 21.51 5.66204 20.3123 4.18389 18.4421C0.736789 14.0808 1.43146 7.71364 5.73548 4.22064C10.0395 0.727643 16.323 1.43156 19.7701 5.79289C20.868 7.1819 21.5457 8.77438 21.8205 10.4127Z",
|
|
118
|
+
fill: "none",
|
|
119
|
+
fillRule: "evenodd",
|
|
120
|
+
clipRule: "evenodd",
|
|
121
|
+
stroke: "currentColor",
|
|
122
|
+
strokeLinejoin: "round",
|
|
123
|
+
strokeWidth: "1.5",
|
|
124
|
+
key: "0",
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
[
|
|
128
|
+
"path",
|
|
129
|
+
{
|
|
130
|
+
d: "M7.36719 7.74976H7.24219M7.49219 7.74976C7.49219 7.88783 7.38026 7.99976 7.24219 7.99976C7.10412 7.99976 6.99219 7.88783 6.99219 7.74976C6.99219 7.61169 7.10412 7.49976 7.24219 7.49976C7.38026 7.49976 7.49219 7.61169 7.49219 7.74976Z",
|
|
131
|
+
stroke: "currentColor",
|
|
132
|
+
strokeLinecap: "round",
|
|
133
|
+
strokeLinejoin: "round",
|
|
134
|
+
strokeWidth: "1.5",
|
|
135
|
+
key: "1",
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
[
|
|
139
|
+
"path",
|
|
140
|
+
{
|
|
141
|
+
d: "M7.36719 15.7498H7.24219M7.49219 15.7498C7.49219 15.8878 7.38026 15.9998 7.24219 15.9998C7.10412 15.9998 6.99219 15.8878 6.99219 15.7498C6.99219 15.6117 7.10412 15.4998 7.24219 15.4998C7.38026 15.4998 7.49219 15.6117 7.49219 15.7498Z",
|
|
142
|
+
stroke: "currentColor",
|
|
143
|
+
strokeLinecap: "round",
|
|
144
|
+
strokeLinejoin: "round",
|
|
145
|
+
strokeWidth: "1.5",
|
|
146
|
+
key: "2",
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
[
|
|
150
|
+
"path",
|
|
151
|
+
{
|
|
152
|
+
d: "M11.8672 5.74976H11.7422M11.9922 5.74976C11.9922 5.88783 11.8803 5.99976 11.7422 5.99976C11.6041 5.99976 11.4922 5.88783 11.4922 5.74976C11.4922 5.61169 11.6041 5.49976 11.7422 5.49976C11.8803 5.49976 11.9922 5.61169 11.9922 5.74976Z",
|
|
153
|
+
stroke: "currentColor",
|
|
154
|
+
strokeLinecap: "round",
|
|
155
|
+
strokeLinejoin: "round",
|
|
156
|
+
strokeWidth: "1.5",
|
|
157
|
+
key: "3",
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
[
|
|
161
|
+
"path",
|
|
162
|
+
{
|
|
163
|
+
d: "M16.3672 7.74976H16.2422M16.4922 7.74976C16.4922 7.88783 16.3803 7.99976 16.2422 7.99976C16.1041 7.99976 15.9922 7.88783 15.9922 7.74976C15.9922 7.61169 16.1041 7.49976 16.2422 7.49976C16.3803 7.49976 16.4922 7.61169 16.4922 7.74976Z",
|
|
164
|
+
stroke: "currentColor",
|
|
165
|
+
strokeLinecap: "round",
|
|
166
|
+
strokeLinejoin: "round",
|
|
167
|
+
strokeWidth: "1.5",
|
|
168
|
+
key: "4",
|
|
169
|
+
},
|
|
170
|
+
],
|
|
171
|
+
[
|
|
172
|
+
"path",
|
|
173
|
+
{
|
|
174
|
+
d: "M18.3672 11.7498H18.2422M18.4922 11.7498C18.4922 11.8878 18.3803 11.9998 18.2422 11.9998C18.1041 11.9998 17.9922 11.8878 17.9922 11.7498C17.9922 11.6117 18.1041 11.4998 18.2422 11.4998C18.3803 11.4998 18.4922 11.6117 18.4922 11.7498Z",
|
|
175
|
+
stroke: "currentColor",
|
|
176
|
+
strokeLinecap: "round",
|
|
177
|
+
strokeLinejoin: "round",
|
|
178
|
+
strokeWidth: "1.5",
|
|
179
|
+
key: "5",
|
|
180
|
+
},
|
|
181
|
+
],
|
|
182
|
+
[
|
|
183
|
+
"path",
|
|
184
|
+
{
|
|
185
|
+
d: "M5.86719 11.7498H5.74219M5.99219 11.7498C5.99219 11.8878 5.88026 11.9998 5.74219 11.9998C5.60412 11.9998 5.49219 11.8878 5.49219 11.7498C5.49219 11.6117 5.60412 11.4998 5.74219 11.4998C5.88026 11.4998 5.99219 11.6117 5.99219 11.7498Z",
|
|
186
|
+
stroke: "currentColor",
|
|
187
|
+
strokeLinecap: "round",
|
|
188
|
+
strokeLinejoin: "round",
|
|
189
|
+
strokeWidth: "1.5",
|
|
190
|
+
key: "6",
|
|
191
|
+
},
|
|
192
|
+
],
|
|
193
|
+
];
|
|
194
|
+
|
|
195
|
+
const DiscordLogoIcon: IconSvgElement = [
|
|
196
|
+
[
|
|
197
|
+
"path",
|
|
198
|
+
{
|
|
199
|
+
d: "M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z",
|
|
200
|
+
fill: "currentColor",
|
|
201
|
+
key: "0",
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
];
|
|
205
|
+
|
|
206
|
+
const GithubLogoIcon: IconSvgElement = [
|
|
207
|
+
[
|
|
208
|
+
"path",
|
|
209
|
+
{
|
|
210
|
+
d: "M10.226 17.284c-2.965-.36-5.054-2.493-5.054-5.256 0-1.123.404-2.336 1.078-3.144-.292-.741-.247-2.314.09-2.965.898-.112 2.111.36 2.83 1.01.853-.269 1.752-.404 2.853-.404 1.1 0 1.999.135 2.807.382.696-.629 1.932-1.1 2.83-.988.315.606.36 2.179.067 2.942.72.854 1.101 2 1.101 3.167 0 2.763-2.089 4.852-5.098 5.234.763.494 1.28 1.572 1.28 2.807v2.336c0 .674.561 1.056 1.235.786 4.066-1.55 7.255-5.615 7.255-10.646C23.5 6.188 18.334 1 11.978 1 5.62 1 .5 6.188.5 12.545c0 4.986 3.167 9.12 7.435 10.669.606.225 1.19-.18 1.19-.786V20.63a2.9 2.9 0 0 1-1.078.224c-1.483 0-2.359-.808-2.987-2.313-.247-.607-.517-.966-1.034-1.033-.27-.023-.359-.135-.359-.27 0-.27.45-.471.898-.471.652 0 1.213.404 1.797 1.235.45.651.921.943 1.483.943.561 0 .92-.202 1.437-.719.382-.381.674-.718.944-.943",
|
|
211
|
+
fill: "currentColor",
|
|
212
|
+
key: "0",
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
];
|
|
216
|
+
|
|
217
|
+
export const EXTENDED_ICON_MAP: ExtendedIconMap = {
|
|
218
|
+
AiBrain01: AiBrain01Icon,
|
|
219
|
+
AiBrowser: AiBrowserIcon,
|
|
220
|
+
AiContentGenerator01: AiContentGenerator01Icon,
|
|
221
|
+
AlignLeft: Menu02Icon,
|
|
222
|
+
AppWindow: BrowserIcon,
|
|
223
|
+
ArchiveRestore: Unarchive03Icon,
|
|
224
|
+
ArrowDown: ArrowDown02Icon,
|
|
225
|
+
ArrowLeft: ArrowLeft02Icon,
|
|
226
|
+
ArrowRight: ArrowRight02Icon,
|
|
227
|
+
ArrowReloadHorizontal: ArrowReloadHorizontalIcon,
|
|
228
|
+
ArrowUp: ArrowUp02Icon,
|
|
229
|
+
ArrowUpDown: ArrowUpDownIcon,
|
|
230
|
+
ArrowTurnBackward: ArrowTurnBackwardIcon,
|
|
231
|
+
ArrowTurnForward: ArrowTurnForwardIcon,
|
|
232
|
+
ArrowUpRight: ArrowUpRight01Icon,
|
|
233
|
+
Beaker: TestTube01Icon,
|
|
234
|
+
BellDot: BellDotIcon,
|
|
235
|
+
Browser: BrowserIcon,
|
|
236
|
+
Brain: BrainIcon,
|
|
237
|
+
Calendar: Calendar03Icon,
|
|
238
|
+
CalendarCheckOut02: CalendarCheckOut02Icon,
|
|
239
|
+
ChartColumn: ChartColumnIcon,
|
|
240
|
+
ChevronUp: ArrowUp01Icon,
|
|
241
|
+
ChevronsDown: ArrowDownDoubleIcon,
|
|
242
|
+
ChevronsUp: ArrowUpDoubleIcon,
|
|
243
|
+
CircleArrowShrink: CircleArrowShrink01Icon,
|
|
244
|
+
Clean: CleanIcon,
|
|
245
|
+
Clock: Clock01Icon,
|
|
246
|
+
ClockArrowUp: ClockArrowUpIcon,
|
|
247
|
+
ClockArrowDown: ClockArrowDownIcon,
|
|
248
|
+
Cloud: CloudIcon,
|
|
249
|
+
CloudOff: CloudOffIcon,
|
|
250
|
+
Coffee: Coffee02Icon,
|
|
251
|
+
Columns2: LayoutTwoColumnIcon,
|
|
252
|
+
CornerDownLeft: ArrowMoveDownLeftIcon,
|
|
253
|
+
CornerDownRight: ArrowMoveDownRightIcon,
|
|
254
|
+
Discord: DiscordIcon,
|
|
255
|
+
DiscordLogo: DiscordLogoIcon,
|
|
256
|
+
DateTime: DateTimeIcon,
|
|
257
|
+
Github: GithubIcon,
|
|
258
|
+
GithubLogo: GithubLogoIcon,
|
|
259
|
+
DragDropHorizontal: DragDropHorizontalIcon,
|
|
260
|
+
DragDropVertical: DragDropVerticalIcon,
|
|
261
|
+
EditFile: Edit04Icon,
|
|
262
|
+
ElectricPlugs: ElectricPlugsIcon,
|
|
263
|
+
Eye: ViewIcon,
|
|
264
|
+
EyeOff: ViewOffIcon,
|
|
265
|
+
Explore: Book02Icon,
|
|
266
|
+
ExternalLink: LinkSquare02Icon,
|
|
267
|
+
FileDiff: PlusMinusSquare01Icon,
|
|
268
|
+
File: FileEmpty02Icon,
|
|
269
|
+
FileAttachment: FileAttachmentIcon,
|
|
270
|
+
FileQuestion: FileQuestionMarkIcon,
|
|
271
|
+
FileText: File01Icon,
|
|
272
|
+
FolderOpen: Folder02Icon,
|
|
273
|
+
FolderEdit: FolderEditIcon,
|
|
274
|
+
FolderMinus: FolderRemoveIcon,
|
|
275
|
+
Fork: GitForkIcon,
|
|
276
|
+
GitBranch: GitBranchIcon,
|
|
277
|
+
GitMerge: GitMergeIcon,
|
|
278
|
+
GitPullRequest: GitPullRequestIcon,
|
|
279
|
+
GitPullRequestArrow: GitPullRequestArrow,
|
|
280
|
+
GitPullRequestClosed: GitPullRequestClosedIcon,
|
|
281
|
+
GitPullRequestDraft: GitPullRequestDraftIcon,
|
|
282
|
+
Globe: InternetIcon,
|
|
283
|
+
GridView: GridViewIcon,
|
|
284
|
+
Laptop: LaptopIcon,
|
|
285
|
+
Layers: Layers01Icon,
|
|
286
|
+
Limitation: LimitationIcon,
|
|
287
|
+
ListEnd: ListEndIcon,
|
|
288
|
+
ListView: ListViewIcon,
|
|
289
|
+
Lock: LockIcon,
|
|
290
|
+
Mail: Mail02Icon,
|
|
291
|
+
MailOpen: MailOpen01Icon,
|
|
292
|
+
Maximize2: ExpandIcon,
|
|
293
|
+
Mic: Mic02Icon,
|
|
294
|
+
Minus: MinusSignIcon,
|
|
295
|
+
Minimize2: CollapseIcon,
|
|
296
|
+
MoveTo: MoveToIcon,
|
|
297
|
+
NewTab: DashedLine02Icon,
|
|
298
|
+
News01: News01Icon,
|
|
299
|
+
PackageReceive: PackageReceiveIcon,
|
|
300
|
+
Palette: PaletteStrokeRoundedIcon,
|
|
301
|
+
PanelBottom: SidebarBottomIcon,
|
|
302
|
+
PanelRight: SidebarRightIcon,
|
|
303
|
+
Paperclip: AttachmentIcon,
|
|
304
|
+
Pause: PauseIcon,
|
|
305
|
+
Pin: PinIcon,
|
|
306
|
+
PinOff: PinOffIcon,
|
|
307
|
+
Play: PlayIcon,
|
|
308
|
+
Plug02: Plug02Icon,
|
|
309
|
+
Plus: PlusSignIcon,
|
|
310
|
+
Puzzle: PuzzleIcon,
|
|
311
|
+
Repeat: RepeatIcon,
|
|
312
|
+
SecurityCheck: SecurityCheckIcon,
|
|
313
|
+
RotateCcw: Refresh01Icon,
|
|
314
|
+
Rows2: LayoutTwoRowIcon,
|
|
315
|
+
Sent: SentIcon,
|
|
316
|
+
SideChat: MessageAdd02Icon,
|
|
317
|
+
Smartphone: SmartPhone01Icon,
|
|
318
|
+
Sort: Sorting01Icon,
|
|
319
|
+
SortingAZ02: SortingAZ02Icon,
|
|
320
|
+
SortingZA01: SortingZA01Icon,
|
|
321
|
+
SortingOneNine: SortingOneNineIcon,
|
|
322
|
+
SortingNineOne: SortingNineOneIcon,
|
|
323
|
+
Square: SquareIcon,
|
|
324
|
+
SquareUnlock02: SquareUnlock02Icon,
|
|
325
|
+
Star: StarIcon,
|
|
326
|
+
TextWrap: TextWrapIcon,
|
|
327
|
+
TimeSchedule: TimeScheduleIcon,
|
|
328
|
+
UserRound: UserIcon,
|
|
329
|
+
ZoomIn: ZoomInAreaIcon,
|
|
330
|
+
ZoomOut: ZoomOutAreaIcon,
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
registerExtendedIcons(EXTENDED_ICON_MAP);
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import type { ComponentType } from "react";
|
|
2
|
+
import type { IconSvgElement } from "@hugeicons/react";
|
|
3
|
+
|
|
4
|
+
export const EXTENDED_ICON_NAMES = [
|
|
5
|
+
"AiBrain01",
|
|
6
|
+
"AiBrowser",
|
|
7
|
+
"AiContentGenerator01",
|
|
8
|
+
"AlignLeft",
|
|
9
|
+
"AppWindow",
|
|
10
|
+
"ArchiveRestore",
|
|
11
|
+
"ArrowDown",
|
|
12
|
+
"ArrowLeft",
|
|
13
|
+
"ArrowRight",
|
|
14
|
+
"ArrowReloadHorizontal",
|
|
15
|
+
"ArrowUp",
|
|
16
|
+
"ArrowUpDown",
|
|
17
|
+
"ArrowTurnBackward",
|
|
18
|
+
"ArrowTurnForward",
|
|
19
|
+
"ArrowUpRight",
|
|
20
|
+
"Beaker",
|
|
21
|
+
"BellDot",
|
|
22
|
+
"Browser",
|
|
23
|
+
"Brain",
|
|
24
|
+
"Calendar",
|
|
25
|
+
"CalendarCheckOut02",
|
|
26
|
+
"ChartColumn",
|
|
27
|
+
"ChevronUp",
|
|
28
|
+
"ChevronsDown",
|
|
29
|
+
"ChevronsUp",
|
|
30
|
+
"CircleArrowShrink",
|
|
31
|
+
"Clean",
|
|
32
|
+
"Clock",
|
|
33
|
+
"ClockArrowUp",
|
|
34
|
+
"ClockArrowDown",
|
|
35
|
+
"Cloud",
|
|
36
|
+
"CloudOff",
|
|
37
|
+
"Coffee",
|
|
38
|
+
"Columns2",
|
|
39
|
+
"CornerDownLeft",
|
|
40
|
+
"CornerDownRight",
|
|
41
|
+
"Discord",
|
|
42
|
+
"DiscordLogo",
|
|
43
|
+
"DateTime",
|
|
44
|
+
"Github",
|
|
45
|
+
"GithubLogo",
|
|
46
|
+
"DragDropHorizontal",
|
|
47
|
+
"DragDropVertical",
|
|
48
|
+
"EditFile",
|
|
49
|
+
"ElectricPlugs",
|
|
50
|
+
"Eye",
|
|
51
|
+
"EyeOff",
|
|
52
|
+
"Explore",
|
|
53
|
+
"ExternalLink",
|
|
54
|
+
"FileDiff",
|
|
55
|
+
"File",
|
|
56
|
+
"FileAttachment",
|
|
57
|
+
"FileQuestion",
|
|
58
|
+
"FileText",
|
|
59
|
+
"FolderOpen",
|
|
60
|
+
"FolderEdit",
|
|
61
|
+
"FolderMinus",
|
|
62
|
+
"Fork",
|
|
63
|
+
"GitBranch",
|
|
64
|
+
"GitMerge",
|
|
65
|
+
"GitPullRequest",
|
|
66
|
+
"GitPullRequestArrow",
|
|
67
|
+
"GitPullRequestClosed",
|
|
68
|
+
"GitPullRequestDraft",
|
|
69
|
+
"Globe",
|
|
70
|
+
"GridView",
|
|
71
|
+
"Laptop",
|
|
72
|
+
"Layers",
|
|
73
|
+
"Limitation",
|
|
74
|
+
"ListEnd",
|
|
75
|
+
"ListView",
|
|
76
|
+
"Lock",
|
|
77
|
+
"Mail",
|
|
78
|
+
"MailOpen",
|
|
79
|
+
"Maximize2",
|
|
80
|
+
"Mic",
|
|
81
|
+
"Minus",
|
|
82
|
+
"Minimize2",
|
|
83
|
+
"MoveTo",
|
|
84
|
+
"NewTab",
|
|
85
|
+
"News01",
|
|
86
|
+
"PackageReceive",
|
|
87
|
+
"Palette",
|
|
88
|
+
"PanelBottom",
|
|
89
|
+
"PanelRight",
|
|
90
|
+
"Paperclip",
|
|
91
|
+
"Pause",
|
|
92
|
+
"Pin",
|
|
93
|
+
"PinOff",
|
|
94
|
+
"Play",
|
|
95
|
+
"Plug02",
|
|
96
|
+
"Plus",
|
|
97
|
+
"Puzzle",
|
|
98
|
+
"Repeat",
|
|
99
|
+
"RotateCcw",
|
|
100
|
+
"Rows2",
|
|
101
|
+
"SecurityCheck",
|
|
102
|
+
"Sent",
|
|
103
|
+
"SideChat",
|
|
104
|
+
"Smartphone",
|
|
105
|
+
"Sort",
|
|
106
|
+
"SortingAZ02",
|
|
107
|
+
"SortingZA01",
|
|
108
|
+
"SortingOneNine",
|
|
109
|
+
"SortingNineOne",
|
|
110
|
+
"Square",
|
|
111
|
+
"SquareUnlock02",
|
|
112
|
+
"Star",
|
|
113
|
+
"TextWrap",
|
|
114
|
+
"TimeSchedule",
|
|
115
|
+
"UserRound",
|
|
116
|
+
"ZoomIn",
|
|
117
|
+
"ZoomOut",
|
|
118
|
+
] as const;
|
|
119
|
+
|
|
120
|
+
export type ExtendedIconName = (typeof EXTENDED_ICON_NAMES)[number];
|
|
121
|
+
|
|
122
|
+
export type ExtendedIconMap = Readonly<
|
|
123
|
+
Record<ExtendedIconName, IconSvgElement>
|
|
124
|
+
>;
|
|
125
|
+
|
|
126
|
+
let extendedIcons: ExtendedIconMap | null = null;
|
|
127
|
+
const listeners = new Set<() => void>();
|
|
128
|
+
|
|
129
|
+
export function registerExtendedIcons(map: ExtendedIconMap): void {
|
|
130
|
+
if (extendedIcons === map) return;
|
|
131
|
+
extendedIcons = map;
|
|
132
|
+
for (const listener of listeners) listener();
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function getExtendedIcons(): ExtendedIconMap | null {
|
|
136
|
+
return extendedIcons;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function subscribeExtendedIcons(listener: () => void): () => void {
|
|
140
|
+
listeners.add(listener);
|
|
141
|
+
return () => {
|
|
142
|
+
listeners.delete(listener);
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
interface AppIconDefinition {
|
|
147
|
+
component: ComponentType<{ className?: string }>;
|
|
148
|
+
key: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
let appIcons: ReadonlyMap<string, AppIconDefinition> = new Map();
|
|
152
|
+
const appIconListeners = new Set<() => void>();
|
|
153
|
+
|
|
154
|
+
export function setAppIcons(
|
|
155
|
+
next: ReadonlyMap<string, AppIconDefinition>,
|
|
156
|
+
): void {
|
|
157
|
+
appIcons = next;
|
|
158
|
+
for (const listener of appIconListeners) listener();
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function getAppIcon(name: string): AppIconDefinition | undefined {
|
|
162
|
+
return appIcons.get(name);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export function subscribeAppIcons(listener: () => void): () => void {
|
|
166
|
+
appIconListeners.add(listener);
|
|
167
|
+
return () => {
|
|
168
|
+
appIconListeners.delete(listener);
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
let pluginAssetIcons: ReadonlyMap<string, string> = new Map();
|
|
173
|
+
const pluginAssetIconListeners = new Set<() => void>();
|
|
174
|
+
|
|
175
|
+
export function setPluginAssetIcons(next: ReadonlyMap<string, string>): void {
|
|
176
|
+
pluginAssetIcons = next;
|
|
177
|
+
for (const listener of pluginAssetIconListeners) listener();
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export function getPluginAssetIcon(glyph: string): string | undefined {
|
|
181
|
+
return pluginAssetIcons.get(glyph);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export function subscribePluginAssetIcons(listener: () => void): () => void {
|
|
185
|
+
pluginAssetIconListeners.add(listener);
|
|
186
|
+
return () => {
|
|
187
|
+
pluginAssetIconListeners.delete(listener);
|
|
188
|
+
};
|
|
189
|
+
}
|