@weavy/uikit-react 12.1.0 → 14.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.
Files changed (280) hide show
  1. package/changelog.md +60 -0
  2. package/dist/cjs/index.js +28 -6
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/client/WeavyClient.d.ts +8 -1
  5. package/dist/cjs/types/components/Attachment.d.ts +2 -1
  6. package/dist/cjs/types/components/Chat.d.ts +1 -1
  7. package/dist/cjs/types/components/Messages.d.ts +3 -1
  8. package/dist/cjs/types/components/PdfViewer.d.ts +3 -1
  9. package/dist/cjs/types/components/Preview.d.ts +8 -10
  10. package/dist/cjs/types/contexts/PreviewContext.d.ts +2 -1
  11. package/dist/cjs/types/contexts/WeavyContext.d.ts +2 -3
  12. package/dist/cjs/types/hooks/useConversations.d.ts +1 -1
  13. package/dist/cjs/types/hooks/useMutateMessage.d.ts +1 -1
  14. package/dist/cjs/types/hooks/useMutateRead.d.ts +1 -0
  15. package/dist/cjs/types/types/Chat.d.ts +2 -1
  16. package/dist/cjs/types/types/Message.d.ts +2 -0
  17. package/dist/cjs/types/types/types.d.ts +63 -9
  18. package/dist/cjs/types/ui/Spinner.d.ts +10 -0
  19. package/dist/cjs/types/utils/fileUtilities.d.ts +1 -4
  20. package/dist/css/weavy-chat.css +1803 -1041
  21. package/dist/css/weavy-messenger.css +2141 -1360
  22. package/dist/css/weavy.css +1943 -1162
  23. package/dist/esm/index.js +28 -6
  24. package/dist/esm/index.js.map +1 -1
  25. package/dist/esm/types/client/WeavyClient.d.ts +8 -1
  26. package/dist/esm/types/components/Attachment.d.ts +2 -1
  27. package/dist/esm/types/components/Chat.d.ts +1 -1
  28. package/dist/esm/types/components/Messages.d.ts +3 -1
  29. package/dist/esm/types/components/PdfViewer.d.ts +3 -1
  30. package/dist/esm/types/components/Preview.d.ts +8 -10
  31. package/dist/esm/types/contexts/PreviewContext.d.ts +2 -1
  32. package/dist/esm/types/contexts/WeavyContext.d.ts +2 -3
  33. package/dist/esm/types/hooks/useConversations.d.ts +1 -1
  34. package/dist/esm/types/hooks/useMutateMessage.d.ts +1 -1
  35. package/dist/esm/types/hooks/useMutateRead.d.ts +1 -0
  36. package/dist/esm/types/types/Chat.d.ts +2 -1
  37. package/dist/esm/types/types/Message.d.ts +2 -0
  38. package/dist/esm/types/types/types.d.ts +63 -9
  39. package/dist/esm/types/ui/Spinner.d.ts +10 -0
  40. package/dist/esm/types/utils/fileUtilities.d.ts +1 -4
  41. package/dist/index.d.ts +15 -7
  42. package/package.json +2 -2
  43. package/rollup.config.js +3 -1
  44. package/src/client/WeavyClient.ts +105 -29
  45. package/src/components/Attachment.tsx +8 -7
  46. package/src/components/Chat.tsx +8 -7
  47. package/src/components/Conversation.tsx +29 -23
  48. package/src/components/ConversationBadge.tsx +7 -5
  49. package/src/components/ConversationForm.tsx +1 -1
  50. package/src/components/ConversationList.tsx +59 -11
  51. package/src/components/ConversationListItem.tsx +71 -54
  52. package/src/components/FileBrowser.tsx +53 -50
  53. package/src/components/MeetingCard.tsx +35 -13
  54. package/src/components/Meetings.tsx +1 -1
  55. package/src/components/Message.tsx +41 -41
  56. package/src/components/Messages.tsx +62 -61
  57. package/src/components/Messenger.tsx +7 -2
  58. package/src/components/NewConversation.tsx +1 -1
  59. package/src/components/PdfViewer.tsx +93 -88
  60. package/src/components/Preview.tsx +115 -54
  61. package/src/components/Reactions.tsx +11 -5
  62. package/src/components/SearchUsers.tsx +21 -11
  63. package/src/components/SeenBy.tsx +13 -7
  64. package/src/components/Typing.tsx +11 -12
  65. package/src/contexts/PreviewContext.tsx +90 -16
  66. package/src/contexts/UserContext.tsx +1 -1
  67. package/src/contexts/WeavyContext.tsx +10 -7
  68. package/src/hooks/useBadge.ts +2 -6
  69. package/src/hooks/useChat.ts +3 -14
  70. package/src/hooks/useConversation.ts +1 -7
  71. package/src/hooks/useConversations.ts +15 -11
  72. package/src/hooks/useFileUploader.ts +6 -8
  73. package/src/hooks/useMembers.ts +1 -7
  74. package/src/hooks/useMessages.ts +1 -7
  75. package/src/hooks/useMutateChat.ts +6 -11
  76. package/src/hooks/useMutateConversation.ts +7 -10
  77. package/src/hooks/useMutateConversationName.ts +10 -12
  78. package/src/hooks/useMutateDeleteReaction.ts +3 -8
  79. package/src/hooks/useMutateExternalBlobs.ts +6 -11
  80. package/src/hooks/useMutateMeeting.ts +6 -11
  81. package/src/hooks/useMutateMembers.ts +8 -13
  82. package/src/hooks/useMutateMessage.ts +9 -18
  83. package/src/hooks/useMutatePinned.ts +3 -8
  84. package/src/hooks/useMutateReaction.ts +6 -12
  85. package/src/hooks/useMutateRead.ts +5 -12
  86. package/src/hooks/useMutateRemoveMembers.ts +7 -12
  87. package/src/hooks/useMutateTyping.ts +6 -11
  88. package/src/hooks/usePresence.ts +2 -3
  89. package/src/hooks/useReactions.ts +11 -12
  90. package/src/hooks/useSearchUsers.ts +1 -6
  91. package/src/hooks/useUser.ts +3 -14
  92. package/src/scss/theme/_alert.scss +61 -63
  93. package/src/scss/theme/_appbar.scss +105 -28
  94. package/src/scss/theme/_avatar.scss +23 -28
  95. package/src/scss/theme/_badge.scss +26 -18
  96. package/src/scss/theme/_buttons.scss +107 -52
  97. package/src/scss/theme/_card.scss +102 -4
  98. package/src/scss/theme/_checkbox.scss +16 -20
  99. package/src/scss/theme/_code-vscode-dark.scss +184 -0
  100. package/src/scss/theme/_code-vscode-light.scss +179 -0
  101. package/src/scss/theme/_code.scss +9 -114
  102. package/src/scss/theme/_comment-editor-cm.scss +97 -0
  103. package/src/scss/theme/_comment-editor.scss +129 -0
  104. package/src/scss/theme/_comments.scss +66 -0
  105. package/src/scss/theme/_content.scss +33 -5
  106. package/src/scss/theme/_conversations.scss +19 -78
  107. package/src/scss/theme/_dropdown.scss +102 -15
  108. package/src/scss/theme/_embed.scss +135 -0
  109. package/src/scss/theme/_facepile.scss +11 -0
  110. package/src/scss/theme/_filebrowser.scss +1 -1
  111. package/src/scss/theme/_files.scss +77 -48
  112. package/src/scss/theme/_grid.scss +8 -0
  113. package/src/scss/theme/_icons.scss +155 -19
  114. package/src/scss/theme/_image-grid.scss +7 -10
  115. package/src/scss/theme/_input.scss +160 -0
  116. package/src/scss/theme/_item.scss +169 -0
  117. package/src/scss/theme/_list.scss +57 -0
  118. package/src/scss/theme/_meeting.scss +11 -0
  119. package/src/scss/theme/_message-editor-cm.scss +95 -0
  120. package/src/scss/theme/_message-editor.scss +66 -20
  121. package/src/scss/theme/_messages.scss +51 -105
  122. package/src/scss/theme/_meta.scss +12 -0
  123. package/src/scss/theme/_overlays.scss +31 -76
  124. package/src/scss/theme/_pager.scss +5 -1
  125. package/src/scss/theme/_pane.scss +13 -2
  126. package/src/scss/theme/_panels.scss +34 -25
  127. package/src/scss/theme/_picker-list.scss +5 -3
  128. package/src/scss/theme/_placeholder.scss +19 -0
  129. package/src/scss/theme/_poll.scss +49 -0
  130. package/src/scss/theme/_post-editor-cm.scss +100 -0
  131. package/src/scss/theme/_post-editor.scss +127 -0
  132. package/src/scss/theme/_post.scss +83 -0
  133. package/src/scss/theme/_preview-code.scss +14 -0
  134. package/src/scss/theme/_preview-embed.scss +11 -5
  135. package/src/scss/theme/_preview-image.scss +8 -26
  136. package/src/scss/theme/_preview-media.scss +1 -0
  137. package/src/scss/theme/_preview-pdf.scss +10 -15
  138. package/src/scss/theme/_preview-text.scss +1 -1
  139. package/src/scss/theme/_preview.scss +59 -76
  140. package/src/scss/theme/_reactions.scss +48 -17
  141. package/src/scss/theme/_sheet.scss +59 -0
  142. package/src/scss/theme/_sidebar.scss +86 -0
  143. package/src/scss/theme/_spinner.scss +11 -7
  144. package/src/scss/theme/_tab.scss +72 -0
  145. package/src/scss/theme/_tables.scss +70 -23
  146. package/src/scss/theme/_toasts.scss +56 -26
  147. package/src/scss/theme/_type.scss +41 -0
  148. package/src/scss/theme/{mixins → base}/_backdrop.scss +0 -0
  149. package/src/scss/theme/{bootstrap/mixins → base}/_breakpoints.scss +9 -0
  150. package/src/scss/theme/base/_colors.scss +315 -0
  151. package/src/scss/theme/base/_md.scss +19 -0
  152. package/src/scss/theme/base/_palette.scss +130 -0
  153. package/src/scss/theme/{mixins → base}/_position.scss +5 -5
  154. package/src/scss/theme/base/_reboot.scss +51 -0
  155. package/src/scss/theme/base/_scroll.scss +180 -0
  156. package/src/scss/theme/base/_svg.scss +49 -0
  157. package/src/scss/theme/base/_text.scss +23 -0
  158. package/src/scss/theme/base/_vars.scss +203 -0
  159. package/src/scss/theme/{fonts → base/fonts}/_fontmapping-roboto.scss +0 -0
  160. package/src/scss/theme/{fonts → base/fonts}/_fontmapping-segoe-ui.scss +0 -0
  161. package/src/scss/theme/base/fonts/_index.scss +2 -0
  162. package/src/scss/weavy-chat.scss +11 -4
  163. package/src/scss/weavy-messenger.scss +38 -21
  164. package/src/types/Chat.ts +2 -1
  165. package/src/types/Message.ts +3 -1
  166. package/src/types/types.ts +72 -10
  167. package/src/ui/Icon.tsx +1 -1
  168. package/src/ui/Spinner.tsx +19 -0
  169. package/src/utils/fileUtilities.ts +11 -125
  170. package/src/utils/infiniteScroll.js +11 -2
  171. package/src/utils/postal-parent.js +398 -0
  172. package/src/utils/promise.js +187 -0
  173. package/src/utils/scrollbarDetection.js +68 -9
  174. package/src/utils/utils.js +547 -0
  175. package/src/scss/theme/_attachments.scss +0 -74
  176. package/src/scss/theme/_cm-editor.scss +0 -42
  177. package/src/scss/theme/_colors.scss +0 -520
  178. package/src/scss/theme/_config.scss +0 -6
  179. package/src/scss/theme/_inputs.scss +0 -28
  180. package/src/scss/theme/_nav.scss +0 -52
  181. package/src/scss/theme/_palette.scss +0 -165
  182. package/src/scss/theme/_preview-icon.scss +0 -41
  183. package/src/scss/theme/_reboot.scss +0 -41
  184. package/src/scss/theme/_root.scss +0 -2
  185. package/src/scss/theme/_scroll.scss +0 -55
  186. package/src/scss/theme/_search.scss +0 -68
  187. package/src/scss/theme/_turbo.scss +0 -17
  188. package/src/scss/theme/_variables.scss +0 -139
  189. package/src/scss/theme/bootstrap/_accordion.scss +0 -146
  190. package/src/scss/theme/bootstrap/_alert.scss +0 -71
  191. package/src/scss/theme/bootstrap/_badge.scss +0 -38
  192. package/src/scss/theme/bootstrap/_breadcrumb.scss +0 -40
  193. package/src/scss/theme/bootstrap/_button-group.scss +0 -142
  194. package/src/scss/theme/bootstrap/_buttons.scss +0 -186
  195. package/src/scss/theme/bootstrap/_card.scss +0 -234
  196. package/src/scss/theme/bootstrap/_carousel.scss +0 -229
  197. package/src/scss/theme/bootstrap/_close.scss +0 -40
  198. package/src/scss/theme/bootstrap/_containers.scss +0 -41
  199. package/src/scss/theme/bootstrap/_dropdown.scss +0 -248
  200. package/src/scss/theme/bootstrap/_forms.scss +0 -9
  201. package/src/scss/theme/bootstrap/_functions.scss +0 -302
  202. package/src/scss/theme/bootstrap/_grid.scss +0 -33
  203. package/src/scss/theme/bootstrap/_helpers.scss +0 -10
  204. package/src/scss/theme/bootstrap/_images.scss +0 -42
  205. package/src/scss/theme/bootstrap/_list-group.scss +0 -191
  206. package/src/scss/theme/bootstrap/_maps.scss +0 -54
  207. package/src/scss/theme/bootstrap/_mixins.scss +0 -43
  208. package/src/scss/theme/bootstrap/_modal.scss +0 -237
  209. package/src/scss/theme/bootstrap/_nav.scss +0 -172
  210. package/src/scss/theme/bootstrap/_navbar.scss +0 -276
  211. package/src/scss/theme/bootstrap/_offcanvas.scss +0 -143
  212. package/src/scss/theme/bootstrap/_pagination.scss +0 -109
  213. package/src/scss/theme/bootstrap/_placeholders.scss +0 -51
  214. package/src/scss/theme/bootstrap/_popover.scss +0 -196
  215. package/src/scss/theme/bootstrap/_progress.scss +0 -59
  216. package/src/scss/theme/bootstrap/_reboot.scss +0 -610
  217. package/src/scss/theme/bootstrap/_root.scss +0 -73
  218. package/src/scss/theme/bootstrap/_spinners.scss +0 -85
  219. package/src/scss/theme/bootstrap/_tables.scss +0 -164
  220. package/src/scss/theme/bootstrap/_toasts.scss +0 -70
  221. package/src/scss/theme/bootstrap/_tooltip.scss +0 -120
  222. package/src/scss/theme/bootstrap/_transitions.scss +0 -27
  223. package/src/scss/theme/bootstrap/_type.scss +0 -106
  224. package/src/scss/theme/bootstrap/_utilities.scss +0 -647
  225. package/src/scss/theme/bootstrap/_variables.scss +0 -1633
  226. package/src/scss/theme/bootstrap/forms/_floating-labels.scss +0 -74
  227. package/src/scss/theme/bootstrap/forms/_form-check.scss +0 -175
  228. package/src/scss/theme/bootstrap/forms/_form-control.scss +0 -194
  229. package/src/scss/theme/bootstrap/forms/_form-range.scss +0 -91
  230. package/src/scss/theme/bootstrap/forms/_form-select.scss +0 -71
  231. package/src/scss/theme/bootstrap/forms/_form-text.scss +0 -11
  232. package/src/scss/theme/bootstrap/forms/_input-group.scss +0 -129
  233. package/src/scss/theme/bootstrap/forms/_labels.scss +0 -36
  234. package/src/scss/theme/bootstrap/forms/_validation.scss +0 -12
  235. package/src/scss/theme/bootstrap/helpers/_clearfix.scss +0 -3
  236. package/src/scss/theme/bootstrap/helpers/_color-bg.scss +0 -10
  237. package/src/scss/theme/bootstrap/helpers/_colored-links.scss +0 -12
  238. package/src/scss/theme/bootstrap/helpers/_position.scss +0 -36
  239. package/src/scss/theme/bootstrap/helpers/_ratio.scss +0 -26
  240. package/src/scss/theme/bootstrap/helpers/_stacks.scss +0 -15
  241. package/src/scss/theme/bootstrap/helpers/_stretched-link.scss +0 -15
  242. package/src/scss/theme/bootstrap/helpers/_text-truncation.scss +0 -7
  243. package/src/scss/theme/bootstrap/helpers/_visually-hidden.scss +0 -8
  244. package/src/scss/theme/bootstrap/helpers/_vr.scss +0 -8
  245. package/src/scss/theme/bootstrap/mixins/_alert.scss +0 -15
  246. package/src/scss/theme/bootstrap/mixins/_backdrop.scss +0 -14
  247. package/src/scss/theme/bootstrap/mixins/_banner.scss +0 -9
  248. package/src/scss/theme/bootstrap/mixins/_border-radius.scss +0 -78
  249. package/src/scss/theme/bootstrap/mixins/_box-shadow.scss +0 -18
  250. package/src/scss/theme/bootstrap/mixins/_buttons.scss +0 -70
  251. package/src/scss/theme/bootstrap/mixins/_caret.scss +0 -64
  252. package/src/scss/theme/bootstrap/mixins/_clearfix.scss +0 -9
  253. package/src/scss/theme/bootstrap/mixins/_color-scheme.scss +0 -7
  254. package/src/scss/theme/bootstrap/mixins/_container.scss +0 -11
  255. package/src/scss/theme/bootstrap/mixins/_deprecate.scss +0 -10
  256. package/src/scss/theme/bootstrap/mixins/_forms.scss +0 -152
  257. package/src/scss/theme/bootstrap/mixins/_gradients.scss +0 -47
  258. package/src/scss/theme/bootstrap/mixins/_grid.scss +0 -151
  259. package/src/scss/theme/bootstrap/mixins/_image.scss +0 -16
  260. package/src/scss/theme/bootstrap/mixins/_list-group.scss +0 -24
  261. package/src/scss/theme/bootstrap/mixins/_lists.scss +0 -7
  262. package/src/scss/theme/bootstrap/mixins/_pagination.scss +0 -10
  263. package/src/scss/theme/bootstrap/mixins/_reset-text.scss +0 -17
  264. package/src/scss/theme/bootstrap/mixins/_resize.scss +0 -6
  265. package/src/scss/theme/bootstrap/mixins/_table-variants.scss +0 -24
  266. package/src/scss/theme/bootstrap/mixins/_text-truncate.scss +0 -8
  267. package/src/scss/theme/bootstrap/mixins/_transition.scss +0 -26
  268. package/src/scss/theme/bootstrap/mixins/_utilities.scss +0 -97
  269. package/src/scss/theme/bootstrap/mixins/_visually-hidden.scss +0 -29
  270. package/src/scss/theme/bootstrap/utilities/_api.scss +0 -47
  271. package/src/scss/theme/bootstrap/vendor/_rfs.scss +0 -354
  272. package/src/scss/theme/bs/_badge.scss +0 -20
  273. package/src/scss/theme/bs/_buttons.scss +0 -185
  274. package/src/scss/theme/bs/_dropdown.scss +0 -86
  275. package/src/scss/theme/bs/_forms.scss +0 -161
  276. package/src/scss/theme/bs/_list-group.scss +0 -73
  277. package/src/scss/theme/bs/_tables.scss +0 -46
  278. package/src/scss/theme/fonts/_index.scss +0 -2
  279. package/src/scss/theme/mixins/_palette.scss +0 -165
  280. package/src/scss/theme/mixins/_scrollbar.scss +0 -110
@@ -1,56 +1,52 @@
1
- @use "config" as *;
1
+ @use "base/vars";
2
2
 
3
3
  // Include mixin in the relative class that should be suffixed with -check
4
- @mixin button-check {
5
-
4
+ .wy-button {
6
5
  // From bootstrap/scss/forms/_form_check
7
6
  &-check {
8
7
  position: absolute;
9
8
  clip: rect(0, 0, 0, 0);
10
9
  pointer-events: none;
11
-
10
+
12
11
  &[disabled] + &,
13
12
  &:disabled + & {
14
13
  pointer-events: none;
15
14
  filter: none;
16
- opacity: $form-check-btn-check-disabled-opacity;
15
+ opacity: vars.$opacity-disabled;
17
16
  }
18
17
  }
19
-
20
18
  // From bootstrap/scss/_buttons
21
19
  &-check:focus + &,
22
20
  &:focus {
23
21
  outline: 0;
24
- box-shadow: $btn-focus-box-shadow;
22
+ //box-shadow: vars.$btn-focus-box-shadow;
25
23
  }
26
- &-check:checked + &,
24
+ /*&-check:checked + &,
27
25
  &-check:active + & {
28
- @include box-shadow($btn-active-box-shadow);
26
+ box-shadow: vars.$btn-active-box-shadow;
29
27
 
30
28
  &:focus {
31
- @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
29
+ box-shadow: vars.$btn-focus-box-shadow, vars.$btn-active-box-shadow;
32
30
  }
33
- }
34
-
31
+ }*/
35
32
  // Custom icons
36
- &-check + .#{wy}-button-icon {
33
+ &-check + .wy-button-icon {
37
34
  svg:last-child {
38
35
  display: none;
39
36
  }
40
37
  }
41
38
 
42
- &-check:checked + .#{wy}-button-icon {
39
+ &-check:disabled + .wy-button-icon {
40
+ opacity: vars.$opacity-disabled;
41
+ }
42
+
43
+ &-check:checked + .wy-button-icon {
43
44
  svg:first-child {
44
45
  display: none;
45
46
  }
46
-
47
+
47
48
  svg:last-child {
48
49
  display: inline-block;
49
50
  }
50
51
  }
51
52
  }
52
-
53
- // Create a suffixed subclass from .wy-button -> .wy-button-check
54
- .wy-button {
55
- @include button-check;
56
- }
@@ -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-wrap;
9
+ word-spacing: normal;
10
+ word-break: normal;
11
+ word-wrap: break-word;
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-wrap;
9
+ word-spacing: normal;
10
+ word-break: normal;
11
+ word-wrap: break-word;
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,10 @@
1
- @use "config" as *;
2
-
3
- // custom theme for syntax highlighting with Prism
4
- code[class*="language-"], pre[class*="language-"] {
5
- color: $pre-color;
6
- font-family: $font-family-code;
7
- font-size: 1em;
8
- direction: ltr;
9
- text-align: left;
10
- white-space: pre;
11
- word-spacing: normal;
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;
1
+ // Themes generated from VS Code using https://prism.dotenv.dev/
2
+ .wy-code {
3
+ :not(.wy-dark) &, &:not(.wy-dark) {
4
+ @import "code-vscode-light";
5
+ }
6
+
7
+ .wy-dark &, &.wy-dark {
8
+ @import "code-vscode-dark";
9
+ }
115
10
  }
@@ -0,0 +1,97 @@
1
+ @use "base/vars";
2
+ @use "base/colors";
3
+ @use "base/scroll";
4
+ @use "base/svg";
5
+ @use "comment-editor";
6
+
7
+ .wy-comment-editor {
8
+ position: relative;
9
+
10
+ .ͼ1 .cm-scroller {
11
+ font-family: unset;
12
+ line-height: 1.5;
13
+ }
14
+
15
+ .ͼ1 .cm-widgetBuffer {
16
+ vertical-align: unset;
17
+ }
18
+
19
+ .ͼ1 .cm-placeholder {
20
+ color: #{colors.$outline};
21
+ }
22
+
23
+ .ͼ1.cm-editor {
24
+ @extend %comment-editor-textfield;
25
+
26
+ &.cm-focused {
27
+ /* default theme in codemirror seems difficult to override */
28
+ --wy-component-color: #{colors.$on-background};
29
+ color: var(--wy-component-color);
30
+ border-color: #{colors.$primary};
31
+ outline: 0;
32
+ }
33
+
34
+ .cm-content {
35
+ @extend %comment-editor-textcontent;
36
+ }
37
+
38
+ .cm-scroller {
39
+ overflow: auto;
40
+
41
+ .wy-scrollbars & {
42
+ @include scroll.custom-scrollbar;
43
+ // scrollbar offsets
44
+ @include scroll.scrollbar-top-padding(0.375rem);
45
+ @include scroll.scrollbar-bottom-padding(0.375rem);
46
+ }
47
+ }
48
+ }
49
+
50
+ .wy-is-invalid + .cm-editor {
51
+ border-color: colors.$error !important;
52
+ }
53
+ // autocomplete dropdown menu
54
+ .ͼ1 {
55
+ .cm-tooltip.cm-tooltip-autocomplete > ul {
56
+ font-family: unset;
57
+ max-height: 15rem; // room for 5 items
58
+
59
+ > li {
60
+ padding: 0;
61
+ }
62
+ }
63
+ }
64
+
65
+ .ͼ2 {
66
+ .cm-tooltip {
67
+ border: none;
68
+ background-clip: padding-box;
69
+ background-color: #{colors.$surface-2};
70
+ color: #{colors.$on-surface};
71
+ border-radius: vars.$border-radius;
72
+ box-shadow: vars.$shadow-level1;
73
+ overflow: hidden;
74
+ z-index: vars.$zindex-dropdown;
75
+ }
76
+
77
+ .cm-tooltip-autocomplete ul li[aria-selected] {
78
+ background: #{colors.$primary-container};
79
+ color: unset;
80
+ }
81
+ }
82
+
83
+ .cm-tooltip-autocomplete {
84
+ .cm-completionLabel {
85
+ display: none;
86
+ }
87
+
88
+ .wy-item-hover:hover, .wy-item-hover:focus {
89
+ background: #{colors.$surface-variant};
90
+ }
91
+
92
+ .wy-avatar {
93
+ width: 32px;
94
+ height: 32px;
95
+ }
96
+ }
97
+ }