@weavy/uikit-react 12.1.0 → 13.0.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/changelog.md +36 -0
- package/dist/cjs/index.js +28 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/client/WeavyClient.d.ts +8 -1
- package/dist/cjs/types/components/Attachment.d.ts +2 -1
- package/dist/cjs/types/components/Chat.d.ts +1 -1
- package/dist/cjs/types/components/PdfViewer.d.ts +3 -1
- package/dist/cjs/types/components/Preview.d.ts +8 -10
- package/dist/cjs/types/contexts/PreviewContext.d.ts +2 -1
- package/dist/cjs/types/contexts/WeavyContext.d.ts +2 -3
- package/dist/cjs/types/types/Chat.d.ts +1 -1
- package/dist/cjs/types/types/types.d.ts +16 -5
- package/dist/cjs/types/ui/Spinner.d.ts +9 -0
- package/dist/cjs/types/utils/fileUtilities.d.ts +1 -4
- package/dist/css/weavy-chat.css +270 -94
- package/dist/css/weavy-messenger.css +274 -96
- package/dist/css/weavy.css +274 -96
- package/dist/esm/index.js +28 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/client/WeavyClient.d.ts +8 -1
- package/dist/esm/types/components/Attachment.d.ts +2 -1
- package/dist/esm/types/components/Chat.d.ts +1 -1
- package/dist/esm/types/components/PdfViewer.d.ts +3 -1
- package/dist/esm/types/components/Preview.d.ts +8 -10
- package/dist/esm/types/contexts/PreviewContext.d.ts +2 -1
- package/dist/esm/types/contexts/WeavyContext.d.ts +2 -3
- package/dist/esm/types/types/Chat.d.ts +1 -1
- package/dist/esm/types/types/types.d.ts +16 -5
- package/dist/esm/types/ui/Spinner.d.ts +9 -0
- package/dist/esm/types/utils/fileUtilities.d.ts +1 -4
- package/dist/index.d.ts +14 -7
- package/package.json +2 -2
- package/rollup.config.js +3 -1
- package/src/client/WeavyClient.ts +105 -24
- package/src/components/Attachment.tsx +8 -7
- package/src/components/Chat.tsx +3 -3
- package/src/components/Conversation.tsx +3 -3
- package/src/components/Message.tsx +1 -1
- package/src/components/Messages.tsx +1 -1
- package/src/components/PdfViewer.tsx +88 -83
- package/src/components/Preview.tsx +115 -54
- package/src/components/SearchUsers.tsx +2 -2
- package/src/contexts/PreviewContext.tsx +90 -16
- package/src/contexts/WeavyContext.tsx +7 -4
- package/src/hooks/useBadge.ts +2 -6
- package/src/hooks/useChat.ts +3 -14
- package/src/hooks/useConversation.ts +1 -7
- package/src/hooks/useConversations.ts +1 -7
- package/src/hooks/useFileUploader.ts +6 -8
- package/src/hooks/useMembers.ts +1 -7
- package/src/hooks/useMessages.ts +1 -7
- package/src/hooks/useMutateChat.ts +6 -11
- package/src/hooks/useMutateConversation.ts +7 -10
- package/src/hooks/useMutateConversationName.ts +10 -12
- package/src/hooks/useMutateDeleteReaction.ts +3 -8
- package/src/hooks/useMutateExternalBlobs.ts +6 -11
- package/src/hooks/useMutateMeeting.ts +6 -11
- package/src/hooks/useMutateMembers.ts +8 -13
- package/src/hooks/useMutateMessage.ts +10 -15
- package/src/hooks/useMutatePinned.ts +3 -8
- package/src/hooks/useMutateReaction.ts +6 -12
- package/src/hooks/useMutateRead.ts +1 -10
- package/src/hooks/useMutateRemoveMembers.ts +7 -12
- package/src/hooks/useMutateTyping.ts +6 -11
- package/src/hooks/useSearchUsers.ts +1 -6
- package/src/hooks/useUser.ts +3 -14
- package/src/scss/theme/_appbar.scss +4 -2
- package/src/scss/theme/_cm-editor.scss +1 -1
- package/src/scss/theme/_code-vscode-dark.scss +184 -0
- package/src/scss/theme/_code-vscode-light.scss +179 -0
- package/src/scss/theme/_code.scss +9 -112
- package/src/scss/theme/_files.scss +1 -1
- package/src/scss/theme/_message-editor.scss +1 -1
- package/src/scss/theme/_overlays.scss +2 -2
- package/src/scss/theme/_panels.scss +11 -7
- package/src/scss/theme/_preview-code.scss +5 -0
- package/src/scss/theme/_preview-embed.scss +3 -3
- package/src/scss/theme/_preview-image.scss +1 -1
- package/src/scss/theme/_preview-text.scss +1 -1
- package/src/scss/theme/_preview.scss +7 -2
- package/src/scss/weavy-chat.scss +1 -0
- package/src/scss/weavy-messenger.scss +1 -0
- package/src/types/Chat.ts +1 -1
- package/src/types/types.ts +16 -5
- package/src/ui/Spinner.tsx +18 -0
- package/src/utils/fileUtilities.ts +11 -125
|
@@ -16,20 +16,14 @@ export default function useMutateReaction() {
|
|
|
16
16
|
|
|
17
17
|
type MutateProps = {
|
|
18
18
|
id: number | null,
|
|
19
|
-
reaction: string
|
|
19
|
+
reaction: string
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
const mutateReaction = async ({id, reaction }: MutateProps) => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
body: JSON.stringify({ content: reaction}),
|
|
28
|
-
headers: {
|
|
29
|
-
"content-type": "application/json",
|
|
30
|
-
"Authorization": "Bearer " + await client.tokenFactory()
|
|
31
|
-
}
|
|
32
|
-
});
|
|
22
|
+
const mutateReaction = async ({ id, reaction }: MutateProps) => {
|
|
23
|
+
|
|
24
|
+
const response = await client.post("/api/messages/" + id + "/reactions/",
|
|
25
|
+
"POST",
|
|
26
|
+
JSON.stringify({ content: reaction }));
|
|
33
27
|
|
|
34
28
|
return response;
|
|
35
29
|
};
|
|
@@ -19,16 +19,7 @@ export default function useMutateRead() {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
const mutateRead = async ({ id, read }: MutateProps) => {
|
|
22
|
-
|
|
23
|
-
const response = await fetch(client.url + "/api/conversations/" + id + "/read", {
|
|
24
|
-
method: !read ? "DELETE": "PUT",
|
|
25
|
-
body: "",
|
|
26
|
-
headers: {
|
|
27
|
-
"content-type": "application/json",
|
|
28
|
-
"Authorization": "Bearer " + await client.tokenFactory()
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
|
|
22
|
+
const response = await client.post("/api/conversations/" + id + "/read", !read ? "DELETE": "PUT", "")
|
|
32
23
|
return response.json();
|
|
33
24
|
};
|
|
34
25
|
|
|
@@ -16,28 +16,23 @@ export default function useMutateRemoveMembers() {
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
type MutateProps = {
|
|
19
|
-
id:
|
|
19
|
+
id: number | null,
|
|
20
20
|
members: number[]
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const mutateRemove = async ({ id, members }: MutateProps) => {
|
|
24
24
|
|
|
25
|
-
const response = await
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
headers: {
|
|
29
|
-
"content-type": "application/json",
|
|
30
|
-
"Authorization": "Bearer " + await client.tokenFactory()
|
|
31
|
-
}
|
|
32
|
-
});
|
|
25
|
+
const response = await client.post("/api/apps/" + id + "/members/" + members.join(","),
|
|
26
|
+
"DELETE",
|
|
27
|
+
JSON.stringify(members));
|
|
33
28
|
|
|
34
29
|
return response;
|
|
35
30
|
};
|
|
36
31
|
|
|
37
32
|
return useMutation(mutateRemove, {
|
|
38
33
|
onSuccess: () => {
|
|
39
|
-
queryClient.invalidateQueries("conversations");
|
|
40
|
-
setSelectedConversationId(null);
|
|
41
|
-
}
|
|
34
|
+
queryClient.invalidateQueries("conversations");
|
|
35
|
+
setSelectedConversationId(null);
|
|
36
|
+
}
|
|
42
37
|
});
|
|
43
38
|
}
|
|
@@ -6,29 +6,24 @@ import { WeavyContext } from "../contexts/WeavyContext";
|
|
|
6
6
|
export default function useMutateTyping() {
|
|
7
7
|
|
|
8
8
|
const { client } = useContext(WeavyContext);
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
if (!client) {
|
|
11
11
|
throw new Error('useMutateTyping must be used within an WeavyProvider');
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
type MutateProps = {
|
|
16
|
-
id: number | null
|
|
16
|
+
id: number | null
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
const mutateTyping = async ({ id }: MutateProps) => {
|
|
20
20
|
|
|
21
|
-
const response = await
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
headers: {
|
|
25
|
-
"content-type": "application/json",
|
|
26
|
-
"Authorization": "Bearer " + await client.tokenFactory()
|
|
27
|
-
}
|
|
28
|
-
});
|
|
21
|
+
const response = await client.post("/api/conversations/" + id + "/typing",
|
|
22
|
+
"PUT",
|
|
23
|
+
JSON.stringify({}));
|
|
29
24
|
|
|
30
25
|
return response;
|
|
31
26
|
};
|
|
32
27
|
|
|
33
|
-
return useMutation(mutateTyping, {
|
|
28
|
+
return useMutation(mutateTyping, {});
|
|
34
29
|
}
|
|
@@ -12,12 +12,7 @@ export default function useSearchUsers(text: string, options: any) {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
const getUsers = async () => {
|
|
15
|
-
const response = await
|
|
16
|
-
headers: {
|
|
17
|
-
"content-type": "application/json",
|
|
18
|
-
"Authorization": "Bearer " + await client.tokenFactory()
|
|
19
|
-
}
|
|
20
|
-
});
|
|
15
|
+
const response = await client.get("/api/users?q=" + text + "&skip=0&top=" + PAGE_SIZE);
|
|
21
16
|
const data = await response.json();
|
|
22
17
|
return data;
|
|
23
18
|
};
|
package/src/hooks/useUser.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
//import { useContext } from "react";
|
|
2
1
|
import { useQuery } from "react-query";
|
|
3
2
|
import WeavyClient from "../client/WeavyClient";
|
|
4
|
-
//import { WeavyContext } from "../contexts/WeavyContext";
|
|
5
3
|
|
|
6
4
|
/// GET current user
|
|
7
|
-
export default function useUser(client: WeavyClient) {
|
|
8
|
-
//const { client } = useContext(WeavyContext);
|
|
9
|
-
|
|
5
|
+
export default function useUser(client: WeavyClient) {
|
|
10
6
|
if (!client) {
|
|
11
7
|
throw new Error('useUser must be used within an WeavyProvider');
|
|
12
8
|
}
|
|
@@ -14,17 +10,10 @@ export default function useUser(client: WeavyClient) {
|
|
|
14
10
|
const getUser = async () => {
|
|
15
11
|
|
|
16
12
|
try {
|
|
17
|
-
const response = await
|
|
18
|
-
headers: {
|
|
19
|
-
"content-type": "application/json",
|
|
20
|
-
"Authorization": "Bearer " + await client.tokenFactory()
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
|
|
13
|
+
const response = await client.get("/api/user");
|
|
24
14
|
if(response.ok){
|
|
25
15
|
return await response.json();
|
|
26
|
-
}
|
|
27
|
-
|
|
16
|
+
}
|
|
28
17
|
console.error("Could not load Weavy user data...")
|
|
29
18
|
return null;
|
|
30
19
|
} catch(err: any){
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
flex: 0 0 $appbar-height;
|
|
22
22
|
grid-template-columns: minmax(2rem, max-content) minmax(0, max-content) minmax(2rem, max-content);
|
|
23
23
|
column-gap: .5rem;
|
|
24
|
+
font-family: $font-family-base;
|
|
25
|
+
line-height: $line-height-base;
|
|
24
26
|
|
|
25
27
|
@include backdrop.filter;
|
|
26
28
|
|
|
@@ -57,13 +59,13 @@
|
|
|
57
59
|
&, .wy-light &, &.wy-light {
|
|
58
60
|
background-color: rgba($gray-50, $opacity-backdrop);
|
|
59
61
|
color: $navbar-light-color;
|
|
60
|
-
|
|
62
|
+
box-shadow: rgba($gray-200, $opacity-backdrop) 0px -1px 0px 0px inset;
|
|
61
63
|
}
|
|
62
64
|
// dark theme
|
|
63
65
|
.wy-dark &, &.wy-dark {
|
|
64
66
|
background-color: rgba($dark, $opacity-backdrop);
|
|
65
67
|
color: $navbar-dark-color;
|
|
66
|
-
|
|
68
|
+
box-shadow: rgba($gray-800, $opacity-backdrop) 0px -1px 0px 0px inset;
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
// Theme generated from VS Code using https://prism.dotenv.dev/
|
|
2
|
+
|
|
3
|
+
code[class*="language-"],
|
|
4
|
+
pre[class*="language-"] {
|
|
5
|
+
color: #d4d4d4;
|
|
6
|
+
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
|
|
7
|
+
text-align: left;
|
|
8
|
+
white-space: pre;
|
|
9
|
+
word-spacing: normal;
|
|
10
|
+
word-break: normal;
|
|
11
|
+
word-wrap: normal;
|
|
12
|
+
line-height: 1.5;
|
|
13
|
+
|
|
14
|
+
-moz-tab-size: 4;
|
|
15
|
+
-o-tab-size: 4;
|
|
16
|
+
tab-size: 4;
|
|
17
|
+
|
|
18
|
+
-webkit-hyphens: none;
|
|
19
|
+
-moz-hyphens: none;
|
|
20
|
+
-ms-hyphens: none;
|
|
21
|
+
hyphens: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/*pre[class*="language-"]::-moz-selection,
|
|
25
|
+
pre[class*="language-"] ::-moz-selection,
|
|
26
|
+
code[class*="language-"]::-moz-selection,
|
|
27
|
+
code[class*="language-"] ::-moz-selection {
|
|
28
|
+
text-shadow: none;
|
|
29
|
+
background: #1e1e1e;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
pre[class*="language-"]::selection,
|
|
33
|
+
pre[class*="language-"] ::selection,
|
|
34
|
+
code[class*="language-"]::selection,
|
|
35
|
+
code[class*="language-"] ::selection {
|
|
36
|
+
text-shadow: none;
|
|
37
|
+
background: #1e1e1e;
|
|
38
|
+
}*/
|
|
39
|
+
|
|
40
|
+
@media print {
|
|
41
|
+
code[class*="language-"],
|
|
42
|
+
pre[class*="language-"] {
|
|
43
|
+
text-shadow: none;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Code blocks */
|
|
48
|
+
pre[class*="language-"] {
|
|
49
|
+
padding: 1em;
|
|
50
|
+
margin: 0.5em 0;
|
|
51
|
+
overflow: auto;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:not(pre) > code[class*="language-"],
|
|
55
|
+
pre[class*="language-"] {
|
|
56
|
+
color: white;
|
|
57
|
+
background: #1e1e1e;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:not(pre) > code[class*="language-"] {
|
|
61
|
+
padding: 0.1em;
|
|
62
|
+
border-radius: 0.3em;
|
|
63
|
+
white-space: normal;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
.token.prolog {
|
|
68
|
+
color: #8080ff;
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.token.comment {
|
|
73
|
+
color: #6A9955;
|
|
74
|
+
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.token.punctuation {
|
|
78
|
+
color: #6A9955;
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.token.builtin {
|
|
83
|
+
color: #4FC1FF;
|
|
84
|
+
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.token.number {
|
|
88
|
+
color: #B5CEA8;
|
|
89
|
+
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.token.variable {
|
|
93
|
+
color: #B5CEA8;
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.token.inserted {
|
|
98
|
+
color: #B5CEA8;
|
|
99
|
+
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.token.operator {
|
|
103
|
+
color: #D4D4D4;
|
|
104
|
+
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.token.constant {
|
|
108
|
+
color: #646695;
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.token.hexcode {
|
|
113
|
+
color: #646695;
|
|
114
|
+
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.token.tag {
|
|
118
|
+
color: #569CD6;
|
|
119
|
+
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.token.changed {
|
|
123
|
+
color: #569CD6;
|
|
124
|
+
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.token.function {
|
|
128
|
+
color: #569CD6;
|
|
129
|
+
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.token.keyword {
|
|
133
|
+
color: #569CD6;
|
|
134
|
+
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.token.attr-name {
|
|
138
|
+
color: #9CDCFE;
|
|
139
|
+
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.token.selector {
|
|
143
|
+
color: #9CDCFE;
|
|
144
|
+
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.token.property {
|
|
148
|
+
color: #9CDCFE;
|
|
149
|
+
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.token.deleted {
|
|
153
|
+
color: #CE9178;
|
|
154
|
+
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.token.string {
|
|
158
|
+
color: #CE9178;
|
|
159
|
+
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.token.regex {
|
|
163
|
+
color: #D16969;
|
|
164
|
+
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.token.char {
|
|
168
|
+
color: #D16969;
|
|
169
|
+
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.token.class-name {
|
|
173
|
+
color: #4EC9B0;
|
|
174
|
+
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.token.important,
|
|
178
|
+
.token.bold {
|
|
179
|
+
font-weight: bold;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.token.italic {
|
|
183
|
+
font-style: italic;
|
|
184
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// Theme generated from VS Code using https://prism.dotenv.dev/
|
|
2
|
+
|
|
3
|
+
code[class*="language-"],
|
|
4
|
+
pre[class*="language-"] {
|
|
5
|
+
color: #000000;
|
|
6
|
+
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
|
|
7
|
+
text-align: left;
|
|
8
|
+
white-space: pre;
|
|
9
|
+
word-spacing: normal;
|
|
10
|
+
word-break: normal;
|
|
11
|
+
word-wrap: normal;
|
|
12
|
+
line-height: 1.5;
|
|
13
|
+
|
|
14
|
+
-moz-tab-size: 4;
|
|
15
|
+
-o-tab-size: 4;
|
|
16
|
+
tab-size: 4;
|
|
17
|
+
|
|
18
|
+
-webkit-hyphens: none;
|
|
19
|
+
-moz-hyphens: none;
|
|
20
|
+
-ms-hyphens: none;
|
|
21
|
+
hyphens: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/*pre[class*="language-"]::-moz-selection,
|
|
25
|
+
pre[class*="language-"] ::-moz-selection,
|
|
26
|
+
code[class*="language-"]::-moz-selection,
|
|
27
|
+
code[class*="language-"] ::-moz-selection {
|
|
28
|
+
text-shadow: none;
|
|
29
|
+
background: #ffffff;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
pre[class*="language-"]::selection,
|
|
33
|
+
pre[class*="language-"] ::selection,
|
|
34
|
+
code[class*="language-"]::selection,
|
|
35
|
+
code[class*="language-"] ::selection {
|
|
36
|
+
text-shadow: none;
|
|
37
|
+
background: #ffffff;
|
|
38
|
+
}*/
|
|
39
|
+
|
|
40
|
+
@media print {
|
|
41
|
+
code[class*="language-"],
|
|
42
|
+
pre[class*="language-"] {
|
|
43
|
+
text-shadow: none;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Code blocks */
|
|
48
|
+
pre[class*="language-"] {
|
|
49
|
+
padding: 1em;
|
|
50
|
+
margin: 0.5em 0;
|
|
51
|
+
overflow: auto;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:not(pre) > code[class*="language-"],
|
|
55
|
+
pre[class*="language-"] {
|
|
56
|
+
color: white;
|
|
57
|
+
background: #ffffff;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:not(pre) > code[class*="language-"] {
|
|
61
|
+
padding: 0.1em;
|
|
62
|
+
border-radius: 0.3em;
|
|
63
|
+
white-space: normal;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
.token.comment {
|
|
68
|
+
color: #008000;
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.token.builtin {
|
|
73
|
+
color: #0070C1;
|
|
74
|
+
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.token.number {
|
|
78
|
+
color: #098658;
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.token.variable {
|
|
83
|
+
color: #098658;
|
|
84
|
+
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.token.inserted {
|
|
88
|
+
color: #098658;
|
|
89
|
+
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.token.operator {
|
|
93
|
+
color: #000000;
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.token.constant {
|
|
98
|
+
color: #811F3F;
|
|
99
|
+
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.token.hexcode {
|
|
103
|
+
color: #811F3F;
|
|
104
|
+
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.token.regex {
|
|
108
|
+
color: #811F3F;
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.token.char {
|
|
113
|
+
color: #811F3F;
|
|
114
|
+
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.token.tag {
|
|
118
|
+
color: #800000;
|
|
119
|
+
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.token.attr-name {
|
|
123
|
+
color: #FF0000;
|
|
124
|
+
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.token.selector {
|
|
128
|
+
color: #FF0000;
|
|
129
|
+
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.token.property {
|
|
133
|
+
color: #FF0000;
|
|
134
|
+
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.token.deleted {
|
|
138
|
+
color: #A31515;
|
|
139
|
+
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.token.string {
|
|
143
|
+
color: #A31515;
|
|
144
|
+
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.token.changed {
|
|
148
|
+
color: #0451A5;
|
|
149
|
+
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.token.punctuation {
|
|
153
|
+
color: #0451A5;
|
|
154
|
+
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.token.function {
|
|
158
|
+
color: #0000FF;
|
|
159
|
+
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.token.keyword {
|
|
163
|
+
color: #0000FF;
|
|
164
|
+
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.token.class-name {
|
|
168
|
+
color: #267F99;
|
|
169
|
+
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.token.important,
|
|
173
|
+
.token.bold {
|
|
174
|
+
font-weight: bold;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.token.italic {
|
|
178
|
+
font-style: italic;
|
|
179
|
+
}
|
|
@@ -1,115 +1,12 @@
|
|
|
1
1
|
@use "config" as *;
|
|
2
2
|
|
|
3
|
-
//
|
|
4
|
-
code
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
word-break: normal;
|
|
13
|
-
line-height: $line-height-base;
|
|
14
|
-
tab-size: 4;
|
|
15
|
-
hyphens: none;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
pre[class*="language-"] {
|
|
19
|
-
background: $white;
|
|
20
|
-
font-size: $code-font-size;
|
|
21
|
-
padding: 1rem;
|
|
22
|
-
margin: 0.5rem 0;
|
|
23
|
-
overflow: auto;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// token colors from https://github.com/PrismJS/prism-themes/blob/master/themes/prism-vs.css
|
|
27
|
-
.token.comment,
|
|
28
|
-
.token.prolog,
|
|
29
|
-
.token.doctype,
|
|
30
|
-
.token.cdata {
|
|
31
|
-
color: #008000;
|
|
32
|
-
font-style: italic;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.token.namespace {
|
|
36
|
-
opacity: .7;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.token.string {
|
|
40
|
-
color: #A31515;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.token.punctuation,
|
|
44
|
-
.token.operator {
|
|
45
|
-
color: $pre-color;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.token.url,
|
|
49
|
-
.token.symbol,
|
|
50
|
-
.token.number,
|
|
51
|
-
.token.boolean,
|
|
52
|
-
.token.variable,
|
|
53
|
-
.token.constant,
|
|
54
|
-
.token.inserted {
|
|
55
|
-
color: #36acaa;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.token.atrule,
|
|
59
|
-
.token.keyword,
|
|
60
|
-
.token.attr-value,
|
|
61
|
-
.language-autohotkey .token.selector,
|
|
62
|
-
.language-json .token.boolean,
|
|
63
|
-
.language-json .token.number,
|
|
64
|
-
code[class*="language-css"] {
|
|
65
|
-
color: #0000ff;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.token.function {
|
|
69
|
-
color: $pre-color;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.token.deleted,
|
|
73
|
-
.language-autohotkey .token.tag {
|
|
74
|
-
color: #9a050f;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.token.selector,
|
|
78
|
-
.language-autohotkey .token.keyword {
|
|
79
|
-
color: #00009f;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.token.important {
|
|
83
|
-
color: #e90;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.token.important,
|
|
87
|
-
.token.bold {
|
|
88
|
-
font-weight: $font-weight-bold;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.token.italic {
|
|
92
|
-
font-style: italic;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.token.class-name,
|
|
96
|
-
.language-json .token.property {
|
|
97
|
-
color: #2B91AF;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.token.tag,
|
|
101
|
-
.token.selector {
|
|
102
|
-
color: #800000;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.token.attr-name,
|
|
106
|
-
.token.property,
|
|
107
|
-
.token.regex,
|
|
108
|
-
.token.entity {
|
|
109
|
-
color: #ff0000;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.token.directive.tag .tag {
|
|
113
|
-
background: #ffff00;
|
|
114
|
-
color: $pre-color;
|
|
3
|
+
// Themes generated from VS Code using https://prism.dotenv.dev/
|
|
4
|
+
.wy-code {
|
|
5
|
+
:not(.wy-dark) &, &:not(.wy-dark) {
|
|
6
|
+
@import "code-vscode-light";
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.wy-dark &, &.wy-dark {
|
|
10
|
+
@import "code-vscode-dark";
|
|
11
|
+
}
|
|
115
12
|
}
|