@uiw/react-md-editor 4.0.3 → 4.0.5

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 (46) hide show
  1. package/README.md +93 -75
  2. package/commands-cn.d.ts +65 -0
  3. package/dist/mdeditor.css +136 -50
  4. package/dist/mdeditor.js +65641 -66215
  5. package/dist/mdeditor.min.css +1 -1
  6. package/dist/mdeditor.min.js +1 -1
  7. package/dist/mdeditor.min.js.LICENSE.txt +2 -2
  8. package/esm/Context.d.ts +20 -33
  9. package/esm/Editor.js +1 -2
  10. package/esm/Editor.nohighlight.js +1 -2
  11. package/esm/Types.d.ts +1 -1
  12. package/esm/commands/comment.js +1 -2
  13. package/esm/commands/group.d.ts +1 -1
  14. package/esm/commands/index.cn.d.ts +33 -0
  15. package/esm/commands/index.cn.js +197 -0
  16. package/esm/commands/issue.js +2 -2
  17. package/esm/commands/preview.js +1 -2
  18. package/esm/components/TextArea/handleKeyDown.d.ts +0 -1
  19. package/esm/components/TextArea/index.d.ts +1 -1
  20. package/esm/components/TextArea/index.js +5 -6
  21. package/esm/components/TextArea/index.nohighlight.d.ts +1 -1
  22. package/esm/components/TextArea/index.nohighlight.js +4 -4
  23. package/esm/components/TextArea/shortcuts.d.ts +0 -1
  24. package/esm/components/Toolbar/Child.d.ts +1 -1
  25. package/esm/components/Toolbar/index.js +1 -2
  26. package/lib/Context.d.ts +20 -33
  27. package/lib/Types.d.ts +1 -1
  28. package/lib/commands/group.d.ts +1 -1
  29. package/lib/commands/index.cn.d.ts +33 -0
  30. package/lib/commands/index.cn.js +221 -0
  31. package/lib/commands/index.js +2 -4
  32. package/lib/commands/issue.js +2 -2
  33. package/lib/components/TextArea/handleKeyDown.d.ts +0 -1
  34. package/lib/components/TextArea/index.d.ts +1 -1
  35. package/lib/components/TextArea/index.js +4 -4
  36. package/lib/components/TextArea/index.nohighlight.d.ts +1 -1
  37. package/lib/components/TextArea/index.nohighlight.js +4 -4
  38. package/lib/components/TextArea/shortcuts.d.ts +0 -1
  39. package/lib/components/Toolbar/Child.d.ts +1 -1
  40. package/package.json +7 -1
  41. package/src/Types.ts +1 -1
  42. package/src/commands/index.cn.ts +187 -0
  43. package/src/commands/issue.tsx +2 -2
  44. package/src/components/TextArea/index.nohighlight.tsx +1 -1
  45. package/src/components/TextArea/index.tsx +1 -1
  46. package/src/components/Toolbar/Child.tsx +1 -1
package/README.md CHANGED
@@ -165,6 +165,29 @@ export default function App() {
165
165
  }
166
166
  ```
167
167
 
168
+ ### Placeholder & maxLength
169
+
170
+ "Below is an example that sets the `placeholder` for the editor and defines the maximum input character length as `10` characters."
171
+
172
+ ```jsx mdx:preview
173
+ import React from "react";
174
+ import MDEditor from '@uiw/react-md-editor';
175
+
176
+ export default function App() {
177
+ const [value, setValue] = React.useState("");
178
+ return (
179
+ <MDEditor
180
+ value={value}
181
+ onChange={setValue}
182
+ textareaProps={{
183
+ placeholder: 'Please enter Markdown text',
184
+ maxLength: 10
185
+ }}
186
+ />
187
+ );
188
+ }
189
+ ```
190
+
168
191
  ### Custom Toolbars
169
192
 
170
193
  [![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-blue?logo=codesandbox)](https://codesandbox.io/embed/react-md-editor-custom-toolbars-m2n10?fontsize=14&hidenavigation=1&theme=dark)
@@ -502,6 +525,27 @@ export default function App() {
502
525
  }
503
526
  ```
504
527
 
528
+ Internationalization Example, You can refer to [`commands-cn`](https://github.com/uiwjs/react-md-editor/blob/b3743ed8302b544f03aed6ed82bdbdf39efb2204/core/src/commands/index.cn.ts#L5-L187) for internationalization.
529
+
530
+ ```jsx mdx:preview
531
+ import React, { useContext } from "react";
532
+ import MDEditor, { commands } from "@uiw/react-md-editor";
533
+ import { getCommands, getExtraCommands } from "@uiw/react-md-editor/commands-cn";
534
+
535
+ export default function App() {
536
+ const [value, setValue] = React.useState("**Hello world!!!**");
537
+ return (
538
+ <MDEditor
539
+ value={value}
540
+ preview="edit"
541
+ commands={[...getCommands()]}
542
+ extraCommands={[...getExtraCommands()]}
543
+ onChange={(val) => setValue(val)}
544
+ />
545
+ );
546
+ }
547
+ ```
548
+
505
549
  ### Editor Font Size
506
550
 
507
551
  [![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-blue?logo=codesandbox)](https://codesandbox.io/embed/markdown-editor-for-react-uiwjs-react-md-editor-issues-425-2epmgh?fontsize=14&hidenavigation=1&theme=dark)
@@ -539,6 +583,30 @@ export default function App() {
539
583
  }
540
584
  ```
541
585
 
586
+ ### Disallowed Elements
587
+
588
+ ```jsx mdx:preview
589
+ import React from "react";
590
+ import MDEditor from '@uiw/react-md-editor';
591
+
592
+ export default function App() {
593
+ const [value, setValue] = React.useState("**Hello world!!!** <style>body{display:none;}</style> ");
594
+ return (
595
+ <div className="container">
596
+ <MDEditor
597
+ value={value}
598
+ height="100%"
599
+ previewOptions={{
600
+ disallowedElements: ['style'],
601
+ }}
602
+ visibleDragbar={false}
603
+ onChange={setValue}
604
+ />
605
+ </div>
606
+ );
607
+ }
608
+ ```
609
+
542
610
  ### Preview Markdown
543
611
 
544
612
  [![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-blue?logo=codesandbox)](https://codesandbox.io/embed/react-md-editor-preview-markdown-vrucl?fontsize=14&hidenavigation=1&theme=dark)
@@ -907,81 +975,31 @@ npm run start
907
975
 
908
976
  As always, thanks to our amazing contributors!
909
977
 
910
- <!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT--><a href="https://github.com/jaywcjlove" title="小弟调调">
911
- <img src="https://avatars.githubusercontent.com/u/1680273?v=4" width="42;" alt="小弟调调"/>
912
- </a>
913
- <a href="https://github.com/renovate-bot" title="Mend Renovate">
914
- <img src="https://avatars.githubusercontent.com/u/25180681?v=4" width="42;" alt="Mend Renovate"/>
915
- </a>
916
- <a href="https://github.com/stevemk14ebr" title="Stephen Eckels">
917
- <img src="https://avatars.githubusercontent.com/u/6619205?v=4" width="42;" alt="Stephen Eckels"/>
918
- </a>
919
- <a href="https://github.com/avalero" title="Alberto Valero Gómez">
920
- <img src="https://avatars.githubusercontent.com/u/1442682?v=4" width="42;" alt="Alberto Valero Gómez"/>
921
- </a>
922
- <a href="https://github.com/alphacoma18" title="Alpha Romer Coma">
923
- <img src="https://avatars.githubusercontent.com/u/108984668?v=4" width="42;" alt="Alpha Romer Coma"/>
924
- </a>
925
- <a href="https://github.com/RARgames" title="RAR">
926
- <img src="https://avatars.githubusercontent.com/u/13639766?v=4" width="42;" alt="RAR"/>
927
- </a>
928
- <a href="https://github.com/Exmirai" title="UniqueUlysees">
929
- <img src="https://avatars.githubusercontent.com/u/6436703?v=4" width="42;" alt="UniqueUlysees"/>
930
- </a>
931
- <a href="https://github.com/nuragic" title="Andrea Puddu">
932
- <img src="https://avatars.githubusercontent.com/u/1586378?v=4" width="42;" alt="Andrea Puddu"/>
933
- </a>
934
- <a href="https://github.com/bramus" title="Bramus">
935
- <img src="https://avatars.githubusercontent.com/u/213073?v=4" width="42;" alt="Bramus"/>
936
- </a>
937
- <a href="https://github.com/CarleneCannon-Conner" title="Carlene Cannon-Conner">
938
- <img src="https://avatars.githubusercontent.com/u/1942791?v=4" width="42;" alt="Carlene Cannon-Conner"/>
939
- </a>
940
- <a href="https://github.com/MercierCorentin" title="Corentin Mercier">
941
- <img src="https://avatars.githubusercontent.com/u/46066895?v=4" width="42;" alt="Corentin Mercier"/>
942
- </a>
943
- <a href="https://github.com/dmitriyyan" title="Dmitrii Ianushkevich">
944
- <img src="https://avatars.githubusercontent.com/u/89025862?v=4" width="42;" alt="Dmitrii Ianushkevich"/>
945
- </a>
946
- <a href="https://github.com/jnishiyama" title="James Finucane">
947
- <img src="https://avatars.githubusercontent.com/u/2048195?v=4" width="42;" alt="James Finucane"/>
948
- </a>
949
- <a href="https://github.com/allforabit" title="Kevin Nolan">
950
- <img src="https://avatars.githubusercontent.com/u/537189?v=4" width="42;" alt="Kevin Nolan"/>
951
- </a>
952
- <a href="https://github.com/kseikyo" title="Lucas Sierota">
953
- <img src="https://avatars.githubusercontent.com/u/29212286?v=4" width="42;" alt="Lucas Sierota"/>
954
- </a>
955
- <a href="https://github.com/michaelkramer" title="Michael Kramer">
956
- <img src="https://avatars.githubusercontent.com/u/6052223?v=4" width="42;" alt="Michael Kramer"/>
957
- </a>
958
- <a href="https://github.com/peterj" title="Peter Jausovec">
959
- <img src="https://avatars.githubusercontent.com/u/11080940?v=4" width="42;" alt="Peter Jausovec"/>
960
- </a>
961
- <a href="https://github.com/phillipb" title="Phillip Burch">
962
- <img src="https://avatars.githubusercontent.com/u/1482089?v=4" width="42;" alt="Phillip Burch"/>
963
- </a>
964
- <a href="https://github.com/psycho-baller" title="Rami Maalouf">
965
- <img src="https://avatars.githubusercontent.com/u/81759594?v=4" width="42;" alt="Rami Maalouf"/>
966
- </a>
967
- <a href="https://github.com/toresbe" title="Tore Sinding Bekkedal">
968
- <img src="https://avatars.githubusercontent.com/u/1761606?v=4" width="42;" alt="Tore Sinding Bekkedal"/>
969
- </a>
970
- <a href="https://github.com/valenfv" title="Valentin">
971
- <img src="https://avatars.githubusercontent.com/u/34139820?v=4" width="42;" alt="Valentin"/>
972
- </a>
973
- <a href="https://github.com/jmtes" title="juno tesoro">
974
- <img src="https://avatars.githubusercontent.com/u/38450133?v=4" width="42;" alt="juno tesoro"/>
975
- </a>
976
- <a href="https://github.com/juspky" title="juspky">
977
- <img src="https://avatars.githubusercontent.com/u/11074890?v=4" width="42;" alt="juspky"/>
978
- </a>
979
- <a href="https://github.com/ryicoh" title="ryicoh">
980
- <img src="https://avatars.githubusercontent.com/u/37844673?v=4" width="42;" alt="ryicoh"/>
981
- </a>
982
- <a href="https://github.com/wj0990" title="wangjie">
983
- <img src="https://avatars.githubusercontent.com/u/8792016?v=4" width="42;" alt="wangjie"/>
984
- </a><!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT-END-->
978
+ <!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT--><a href="https://github.com/jaywcjlove" title="小弟调调"><img src="https://avatars.githubusercontent.com/u/1680273?v=4" width="42;" alt="小弟调调"/></a>
979
+ <a href="https://github.com/renovate-bot" title="Mend Renovate"><img src="https://avatars.githubusercontent.com/u/25180681?v=4" width="42;" alt="Mend Renovate"/></a>
980
+ <a href="https://github.com/stevemk14ebr" title="Stephen Eckels"><img src="https://avatars.githubusercontent.com/u/6619205?v=4" width="42;" alt="Stephen Eckels"/></a>
981
+ <a href="https://github.com/alpharomercoma" title="Alpha Romer Coma"><img src="https://avatars.githubusercontent.com/u/108984668?v=4" width="42;" alt="Alpha Romer Coma"/></a>
982
+ <a href="https://github.com/RARgames" title="RAR"><img src="https://avatars.githubusercontent.com/u/13639766?v=4" width="42;" alt="RAR"/></a>
983
+ <a href="https://github.com/Exmirai" title="UniqueUlysees"><img src="https://avatars.githubusercontent.com/u/6436703?v=4" width="42;" alt="UniqueUlysees"/></a>
984
+ <a href="https://github.com/nuragic" title="Andrea Puddu"><img src="https://avatars.githubusercontent.com/u/1586378?v=4" width="42;" alt="Andrea Puddu"/></a>
985
+ <a href="https://github.com/AntonR31337" title="Anton"><img src="https://avatars.githubusercontent.com/u/88384647?v=4" width="42;" alt="Anton"/></a>
986
+ <a href="https://github.com/bramus" title="Bramus"><img src="https://avatars.githubusercontent.com/u/213073?v=4" width="42;" alt="Bramus"/></a>
987
+ <a href="https://github.com/CarleneCannon-Conner" title="Carlene Cannon-Conner"><img src="https://avatars.githubusercontent.com/u/1942791?v=4" width="42;" alt="Carlene Cannon-Conner"/></a>
988
+ <a href="https://github.com/MercierCorentin" title="Corentin Mercier"><img src="https://avatars.githubusercontent.com/u/46066895?v=4" width="42;" alt="Corentin Mercier"/></a>
989
+ <a href="https://github.com/dmitriyyan" title="Dmitrii Ianushkevich"><img src="https://avatars.githubusercontent.com/u/89025862?v=4" width="42;" alt="Dmitrii Ianushkevich"/></a>
990
+ <a href="https://github.com/jnishiyama" title="James Finucane"><img src="https://avatars.githubusercontent.com/u/2048195?v=4" width="42;" alt="James Finucane"/></a>
991
+ <a href="https://github.com/allforabit" title="Kevin Nolan"><img src="https://avatars.githubusercontent.com/u/537189?v=4" width="42;" alt="Kevin Nolan"/></a>
992
+ <a href="https://github.com/kseikyo" title="Lucas Sierota"><img src="https://avatars.githubusercontent.com/u/29212286?v=4" width="42;" alt="Lucas Sierota"/></a>
993
+ <a href="https://github.com/michaelkramer" title="Michael Kramer"><img src="https://avatars.githubusercontent.com/u/6052223?v=4" width="42;" alt="Michael Kramer"/></a>
994
+ <a href="https://github.com/peterj" title="Peter Jausovec"><img src="https://avatars.githubusercontent.com/u/11080940?v=4" width="42;" alt="Peter Jausovec"/></a>
995
+ <a href="https://github.com/phillipb" title="Phillip Burch"><img src="https://avatars.githubusercontent.com/u/1482089?v=4" width="42;" alt="Phillip Burch"/></a>
996
+ <a href="https://github.com/psycho-baller" title="Rami Maalouf"><img src="https://avatars.githubusercontent.com/u/81759594?v=4" width="42;" alt="Rami Maalouf"/></a>
997
+ <a href="https://github.com/toresbe" title="Tore Sinding Bekkedal"><img src="https://avatars.githubusercontent.com/u/1761606?v=4" width="42;" alt="Tore Sinding Bekkedal"/></a>
998
+ <a href="https://github.com/valenfv" title="Valentin"><img src="https://avatars.githubusercontent.com/u/34139820?v=4" width="42;" alt="Valentin"/></a>
999
+ <a href="https://github.com/jmtes" title="juno tesoro"><img src="https://avatars.githubusercontent.com/u/38450133?v=4" width="42;" alt="juno tesoro"/></a>
1000
+ <a href="https://github.com/juspky" title="juspky"><img src="https://avatars.githubusercontent.com/u/11074890?v=4" width="42;" alt="juspky"/></a>
1001
+ <a href="https://github.com/ryicoh" title="ryicoh"><img src="https://avatars.githubusercontent.com/u/37844673?v=4" width="42;" alt="ryicoh"/></a>
1002
+ <a href="https://github.com/wj0990" title="wangjie"><img src="https://avatars.githubusercontent.com/u/8792016?v=4" width="42;" alt="wangjie"/></a><!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT-END-->
985
1003
 
986
1004
  Made with [contributors](https://github.com/jaywcjlove/github-action-contributors).
987
1005
 
@@ -0,0 +1,65 @@
1
+ declare module '@uiw/react-md-editor/commands-cn' {
2
+ import { type ICommand } from '@uiw/react-md-editor/esm/commands';
3
+ import { divider } from '@uiw/react-md-editor/esm/commands/divider';
4
+ import { group } from '@uiw/react-md-editor/esm/commands/group';
5
+ let bold: ICommand;
6
+ let code: ICommand;
7
+ let codeBlock: ICommand;
8
+ let comment: ICommand;
9
+ let fullscreen: ICommand;
10
+ let hr: ICommand;
11
+ let image: ICommand;
12
+ let italic: ICommand;
13
+ let link: ICommand;
14
+ let checkedListCommand: ICommand;
15
+ let orderedListCommand: ICommand;
16
+ let unorderedListCommand: ICommand;
17
+ let codeEdit: ICommand;
18
+ let codeLive: ICommand;
19
+ let codePreview: ICommand;
20
+ let quote: ICommand;
21
+ let strikethrough: ICommand;
22
+ let issue: ICommand;
23
+ let title: ICommand;
24
+ let title1: ICommand;
25
+ let title2: ICommand;
26
+ let title3: ICommand;
27
+ let title4: ICommand;
28
+ let title5: ICommand;
29
+ let title6: ICommand;
30
+ let table: ICommand;
31
+ let help: ICommand;
32
+ export const getCommands: () => ICommand[];
33
+ export const getExtraCommands: () => ICommand[];
34
+ export {
35
+ title,
36
+ title1,
37
+ title2,
38
+ title3,
39
+ title4,
40
+ title5,
41
+ title6,
42
+ bold,
43
+ codeBlock,
44
+ comment,
45
+ italic,
46
+ strikethrough,
47
+ hr,
48
+ group,
49
+ divider,
50
+ link,
51
+ quote,
52
+ code,
53
+ image,
54
+ unorderedListCommand,
55
+ orderedListCommand,
56
+ checkedListCommand,
57
+ table,
58
+ issue,
59
+ help,
60
+ codeEdit,
61
+ codeLive,
62
+ codePreview,
63
+ fullscreen,
64
+ };
65
+ }
package/dist/mdeditor.css CHANGED
@@ -44,6 +44,14 @@
44
44
  --color-accent-emphasis: #1f6feb;
45
45
  --color-attention-subtle: rgba(187, 128, 9, 0.15);
46
46
  --color-danger-fg: #f85149;
47
+ --color-danger-emphasis: #da3633;
48
+ --color-attention-fg: #d29922;
49
+ --color-attention-emphasis: #9e6a03;
50
+ --color-done-fg: #a371f7;
51
+ --color-done-emphasis: #8957e5;
52
+ --color-success-fg: #3fb950;
53
+ --color-success-emphasis: #238636;
54
+ --color-copied-active-bg: #2e9b33;
47
55
  }
48
56
  }
49
57
  @media (prefers-color-scheme: light) {
@@ -91,7 +99,15 @@
91
99
  --color-accent-fg: #0969da;
92
100
  --color-accent-emphasis: #0969da;
93
101
  --color-attention-subtle: #fff8c5;
94
- --color-danger-fg: #cf222e;
102
+ --color-danger-fg: #d1242f;
103
+ --color-danger-emphasis: #cf222e;
104
+ --color-attention-fg: #9a6700;
105
+ --color-attention-emphasis: #9a6700;
106
+ --color-done-fg: #8250df;
107
+ --color-done-emphasis: #8250df;
108
+ --color-success-fg: #1a7f37;
109
+ --color-success-emphasis: #1f883d;
110
+ --color-copied-active-bg: #2e9b33;
95
111
  }
96
112
  }
97
113
  [data-color-mode*='dark'] .wmde-markdown,
@@ -194,7 +210,7 @@ body[data-color-mode*='light'] {
194
210
  }
195
211
  .wmde-markdown {
196
212
  -webkit-text-size-adjust: 100%;
197
- font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
213
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
198
214
  font-size: 16px;
199
215
  line-height: 1.5;
200
216
  word-wrap: break-word;
@@ -803,6 +819,15 @@ body[data-color-mode*='light'] {
803
819
  overflow: auto;
804
820
  display: block;
805
821
  }
822
+ .wmde-markdown pre > code::-webkit-scrollbar {
823
+ background: transparent;
824
+ width: 8px;
825
+ height: 8px;
826
+ }
827
+ .wmde-markdown pre > code::-webkit-scrollbar-thumb {
828
+ background: var(--color-fg-muted);
829
+ border-radius: 10px;
830
+ }
806
831
  .wmde-markdown .csv-data td,
807
832
  .wmde-markdown .csv-data th {
808
833
  padding: 5px;
@@ -889,7 +914,7 @@ body[data-color-mode*='light'] {
889
914
  display: flex;
890
915
  position: absolute;
891
916
  cursor: pointer;
892
- color: var(--color-fg-defaul);
917
+ color: var(--color-fg-default);
893
918
  top: 6px;
894
919
  right: 6px;
895
920
  border-radius: 5px;
@@ -913,7 +938,7 @@ body[data-color-mode*='light'] {
913
938
  }
914
939
  .wmde-markdown pre:hover .copied:active,
915
940
  .wmde-markdown pre .copied.active {
916
- background: #2e9b33;
941
+ background: var(--color-copied-active-bg);
917
942
  color: var(--color-canvas-default);
918
943
  }
919
944
  .wmde-markdown pre .active .octicon-copy {
@@ -922,10 +947,71 @@ body[data-color-mode*='light'] {
922
947
  .wmde-markdown pre .active .octicon-check {
923
948
  display: block;
924
949
  }
925
- .highlight-line {
950
+ .wmde-markdown .markdown-alert {
951
+ padding: 0.5rem 1em;
952
+ color: inherit;
953
+ margin-bottom: 16px;
954
+ border-left: 0.25em solid var(--color-border-default);
955
+ border-left: 0.25em solid var(--borderColor-default, var(--color-border-default));
956
+ }
957
+ .wmde-markdown .markdown-alert > :last-child {
958
+ margin-bottom: 0 !important;
959
+ }
960
+ .wmde-markdown .markdown-alert .markdown-alert-title {
961
+ display: flex;
962
+ align-items: center;
963
+ line-height: 1;
964
+ font-weight: 500;
965
+ font-size: 14px;
966
+ }
967
+ .wmde-markdown .markdown-alert .markdown-alert-title svg.octicon {
968
+ margin-right: 8px !important;
969
+ margin-right: var(--base-size-8, 8px) !important;
970
+ }
971
+ .wmde-markdown .markdown-alert.markdown-alert-note {
972
+ border-left-color: var(--color-accent-emphasis);
973
+ border-left-color: var(--borderColor-accent-emphasis, var(--color-accent-emphasis));
974
+ }
975
+ .wmde-markdown .markdown-alert.markdown-alert-note .markdown-alert-title {
976
+ color: var(--color-accent-fg);
977
+ color: var(--fgColor-accent, var(--color-accent-fg));
978
+ }
979
+ .wmde-markdown .markdown-alert.markdown-alert-tip {
980
+ border-left-color: var(--color-success-emphasis);
981
+ border-left-color: var(--borderColor-success-emphasis, var(--color-success-emphasis));
982
+ }
983
+ .wmde-markdown .markdown-alert.markdown-alert-tip .markdown-alert-title {
984
+ color: var(--color-success-fg);
985
+ color: var(--fgColor-success, var(--color-success-fg));
986
+ }
987
+ .wmde-markdown .markdown-alert.markdown-alert-important {
988
+ border-left-color: var(--color-done-emphasis);
989
+ border-left-color: var(--borderColor-done-emphasis, var(--color-done-emphasis));
990
+ }
991
+ .wmde-markdown .markdown-alert.markdown-alert-important .markdown-alert-title {
992
+ color: var(--color-done-fg);
993
+ color: var(--fgColor-done, var(--color-done-fg));
994
+ }
995
+ .wmde-markdown .markdown-alert.markdown-alert-warning {
996
+ border-left-color: var(--color-attention-emphasis);
997
+ border-left-color: var(--borderColor-attention-emphasis, var(--color-attention-emphasis));
998
+ }
999
+ .wmde-markdown .markdown-alert.markdown-alert-warning .markdown-alert-title {
1000
+ color: var(--color-attention-fg);
1001
+ color: var(--fgColor-attention, var(--color-attention-fg));
1002
+ }
1003
+ .wmde-markdown .markdown-alert.markdown-alert-caution {
1004
+ border-left-color: var(--color-danger-emphasis);
1005
+ border-left-color: var(--borderColor-danger-emphasis, var(--color-danger-emphasis));
1006
+ }
1007
+ .wmde-markdown .markdown-alert.markdown-alert-caution .markdown-alert-title {
1008
+ color: var(--color-danger-fg);
1009
+ color: var(--fgColor-danger, var(--color-danger-fg));
1010
+ }
1011
+ .wmde-markdown .highlight-line {
926
1012
  background-color: var(--color-neutral-muted);
927
1013
  }
928
- .code-line.line-number::before {
1014
+ .wmde-markdown .code-line.line-number::before {
929
1015
  display: inline-block;
930
1016
  width: 1rem;
931
1017
  text-align: right;
@@ -934,82 +1020,82 @@ body[data-color-mode*='light'] {
934
1020
  content: attr(line);
935
1021
  white-space: nowrap;
936
1022
  }
937
- .token.comment,
938
- .token.prolog,
939
- .token.doctype,
940
- .token.cdata {
1023
+ .wmde-markdown .token.comment,
1024
+ .wmde-markdown .token.prolog,
1025
+ .wmde-markdown .token.doctype,
1026
+ .wmde-markdown .token.cdata {
941
1027
  color: var(--color-prettylights-syntax-comment);
942
1028
  }
943
- .token.namespace {
1029
+ .wmde-markdown .token.namespace {
944
1030
  opacity: 0.7;
945
1031
  }
946
- .token.property,
947
- .token.tag,
948
- .token.selector,
949
- .token.constant,
950
- .token.symbol,
951
- .token.deleted {
1032
+ .wmde-markdown .token.property,
1033
+ .wmde-markdown .token.tag,
1034
+ .wmde-markdown .token.selector,
1035
+ .wmde-markdown .token.constant,
1036
+ .wmde-markdown .token.symbol,
1037
+ .wmde-markdown .token.deleted {
952
1038
  color: var(--color-prettylights-syntax-entity-tag);
953
1039
  }
954
- .token.maybe-class-name {
1040
+ .wmde-markdown .token.maybe-class-name {
955
1041
  color: var(--color-prettylights-syntax-variable);
956
1042
  }
957
- .token.property-access,
958
- .token.operator,
959
- .token.boolean,
960
- .token.number,
961
- .token.selector .token.class,
962
- .token.attr-name,
963
- .token.string,
964
- .token.char,
965
- .token.builtin {
1043
+ .wmde-markdown .token.property-access,
1044
+ .wmde-markdown .token.operator,
1045
+ .wmde-markdown .token.boolean,
1046
+ .wmde-markdown .token.number,
1047
+ .wmde-markdown .token.selector .token.class,
1048
+ .wmde-markdown .token.attr-name,
1049
+ .wmde-markdown .token.string,
1050
+ .wmde-markdown .token.char,
1051
+ .wmde-markdown .token.builtin {
966
1052
  color: var(--color-prettylights-syntax-constant);
967
1053
  }
968
- .token.deleted {
1054
+ .wmde-markdown .token.deleted {
969
1055
  color: var(--color-prettylights-syntax-markup-deleted-text);
970
1056
  }
971
- .code-line .token.deleted {
1057
+ .wmde-markdown .code-line .token.deleted {
972
1058
  background-color: var(--color-prettylights-syntax-markup-deleted-bg);
973
1059
  }
974
- .token.inserted {
1060
+ .wmde-markdown .token.inserted {
975
1061
  color: var(--color-prettylights-syntax-markup-inserted-text);
976
1062
  }
977
- .code-line .token.inserted {
1063
+ .wmde-markdown .code-line .token.inserted {
978
1064
  background-color: var(--color-prettylights-syntax-markup-inserted-bg);
979
1065
  }
980
- .token.variable {
1066
+ .wmde-markdown .token.variable {
981
1067
  color: var(--color-prettylights-syntax-constant);
982
1068
  }
983
- .token.entity,
984
- .token.url,
985
- .language-css .token.string,
986
- .style .token.string {
1069
+ .wmde-markdown .token.entity,
1070
+ .wmde-markdown .token.url,
1071
+ .wmde-markdown .language-css .token.string,
1072
+ .wmde-markdown .style .token.string {
987
1073
  color: var(--color-prettylights-syntax-string);
988
1074
  }
989
- .token.color,
990
- .token.atrule,
991
- .token.attr-value,
992
- .token.function,
993
- .token.class-name {
1075
+ .wmde-markdown .token.color,
1076
+ .wmde-markdown .token.atrule,
1077
+ .wmde-markdown .token.attr-value,
1078
+ .wmde-markdown .token.function,
1079
+ .wmde-markdown .token.class-name {
994
1080
  color: var(--color-prettylights-syntax-string);
995
1081
  }
996
- .token.rule,
997
- .token.regex,
998
- .token.important,
999
- .token.keyword {
1082
+ .wmde-markdown .token.rule,
1083
+ .wmde-markdown .token.regex,
1084
+ .wmde-markdown .token.important,
1085
+ .wmde-markdown .token.keyword {
1000
1086
  color: var(--color-prettylights-syntax-keyword);
1001
1087
  }
1002
- .token.coord {
1088
+ .wmde-markdown .token.coord {
1003
1089
  color: var(--color-prettylights-syntax-meta-diff-range);
1004
1090
  }
1005
- .token.important,
1006
- .token.bold {
1091
+ .wmde-markdown .token.important,
1092
+ .wmde-markdown .token.bold {
1007
1093
  font-weight: bold;
1008
1094
  }
1009
- .token.italic {
1095
+ .wmde-markdown .token.italic {
1010
1096
  font-style: italic;
1011
1097
  }
1012
- .token.entity {
1098
+ .wmde-markdown .token.entity {
1013
1099
  cursor: help;
1014
1100
  }
1015
1101