1import { backgroundColor, border, iconColor, text } from "./components";
2import Theme from "./theme";
3
4export default function workspace(theme: Theme) {
5 const signInPrompt = {
6 ...text(theme, "sans", "secondary"),
7 size: 13,
8 underline: true,
9 padding: {
10 right: 8,
11 },
12 };
13
14 const tab = {
15 height: 34,
16 iconClose: iconColor(theme, "secondary"),
17 iconCloseActive: iconColor(theme, "active"),
18 iconConflict: iconColor(theme, "warning"),
19 iconDirty: iconColor(theme, "info"),
20 iconWidth: 8,
21 spacing: 10,
22 text: text(theme, "mono", "secondary"),
23 border: border(theme, "primary", {
24 left: true,
25 bottom: true,
26 overlay: true,
27 }),
28 padding: {
29 left: 12,
30 right: 12,
31 },
32 };
33
34 const activeTab = {
35 ...tab,
36 background: backgroundColor(theme, 300),
37 text: text(theme, "mono", "primary"),
38 border: {
39 ...tab.border,
40 bottom: false,
41 },
42 };
43
44 const sidebarItem = {
45 height: 32,
46 iconColor: iconColor(theme, "secondary"),
47 iconSize: 18,
48 };
49 const sidebar = {
50 width: 30,
51 border: border(theme, "primary", { right: true }),
52 item: sidebarItem,
53 activeItem: {
54 ...sidebarItem,
55 iconColor: iconColor(theme, "primary"),
56 },
57 resizeHandle: {
58 background: border(theme, "primary").color,
59 padding: {
60 left: 1,
61 },
62 },
63 };
64
65 return {
66 background: backgroundColor(theme, 500),
67 leaderBorderOpacity: 0.7,
68 leaderBorderWidth: 2.0,
69 tab,
70 activeTab,
71 leftSidebar: {
72 ...sidebar,
73 border: border(theme, "primary", { right: true }),
74 },
75 rightSidebar: {
76 ...sidebar,
77 border: border(theme, "primary", { left: true }),
78 },
79 paneDivider: {
80 color: border(theme, "primary").color,
81 width: 1,
82 },
83 status_bar: {
84 height: 24,
85 itemSpacing: 8,
86 padding: {
87 left: 6,
88 right: 6,
89 },
90 cursorPosition: text(theme, "sans", "muted"),
91 diagnosticMessage: text(theme, "sans", "muted"),
92 lspMessage: text(theme, "sans", "muted"),
93 },
94 titlebar: {
95 avatarWidth: 18,
96 height: 32,
97 shareIconColor: iconColor(theme, "secondary"),
98 shareIconActiveColor: iconColor(theme, "active"),
99 title: text(theme, "sans", "primary"),
100 avatar: {
101 cornerRadius: 10,
102 border: {
103 color: "#00000088",
104 width: 1,
105 },
106 },
107 avatarRibbon: {
108 height: 3,
109 width: 12,
110 },
111 border: border(theme, "primary", { bottom: true }),
112 signInPrompt,
113 hoveredSignInPrompt: {
114 ...signInPrompt,
115 ...text(theme, "mono", "active"),
116 },
117 offlineIcon: {
118 color: iconColor(theme, "muted"),
119 width: 16,
120 padding: {
121 right: 4,
122 },
123 },
124 outdatedWarning: {
125 ...text(theme, "sans", "muted"),
126 size: 13,
127 },
128 },
129 toolbar: {
130 height: 44,
131 },
132 };
133}