vuepress-theme-uniapp-official 1.6.0 → 1.6.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.
@@ -251,6 +251,8 @@ window.addEventListener('resize', scrollToBottom)
251
251
  box-sizing border-box
252
252
 
253
253
  .msg
254
+ display flex
255
+ flex-direction column
254
256
  margin-bottom 14px
255
257
 
256
258
  .msg.user
@@ -270,12 +272,14 @@ window.addEventListener('resize', scrollToBottom)
270
272
  max-width 80%
271
273
  background white
272
274
  border 1px solid #eee
275
+ margin-right auto
273
276
  pre
274
277
  background #f6f8fa
275
278
  .time
276
279
  margin-left 10px
277
280
 
278
281
  .bubble
282
+ display inline-block
279
283
  max-width 50%
280
284
  padding 10px 14px
281
285
  border-radius 14px
@@ -15,26 +15,18 @@ function transfromLang(lang) {
15
15
 
16
16
  export async function renderMarkdown(md) {
17
17
  if (!markedInstance) {
18
- const [{ Marked }, { markedHighlight }, hljs] = await Promise.all([
19
- import('marked'),
20
- import('marked-highlight'),
21
- import('highlight.js'),
22
- ]);
23
-
24
- const marked = new Marked(
25
- markedHighlight({
26
- emptyLangClass: 'hljs',
27
- langPrefix: 'hljs language-',
28
- highlight(code, lang, info) {
29
- const language = transfromLang(lang);
30
- return hljs.highlight(code, { language }).value;
31
- },
32
- })
33
- );
18
+ const [marked, hljs] = await Promise.all([import('marked'), import('highlight.js')]);
34
19
 
35
20
  marked.setOptions({
36
21
  headerIds: false,
37
22
  mangle: false,
23
+ highlight(code, lang) {
24
+ lang = transfromLang(lang);
25
+ if (lang && hljs.getLanguage(lang)) {
26
+ return hljs.highlight(code, { language: lang }).value;
27
+ }
28
+ return hljs.highlightAuto(code).value;
29
+ },
38
30
  });
39
31
 
40
32
  markedInstance = marked;
@@ -20,7 +20,7 @@
20
20
 
21
21
  .chat-skeleton .line
22
22
  height: 14px
23
- width: 100%
23
+ width: 60%
24
24
  border-radius: 6px
25
25
  @extend .skeleton
26
26
 
@@ -61,10 +61,6 @@
61
61
  background-color $search-container-color;
62
62
  color: $accentColor;
63
63
  font-size 1em;
64
- padding 15px 4px 15px
64
+ padding 8px 4px
65
65
  }
66
-
67
- @media (max-width $MQMobile)
68
- .DocSearch-Hit-source
69
- padding 8px 4px 8px
70
66
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vuepress-theme-uniapp-official",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "uni-app official website theme for vuepress",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -39,16 +39,15 @@
39
39
  "markdown-it-attrs": "^4.1.6",
40
40
  "markdown-it-raw-table": "^1.0.0",
41
41
  "markdown-it-task-lists": "^2.1.1",
42
- "marked": "^5.1.2",
43
- "marked-highlight": "^2.2.3",
42
+ "marked": "^3.0.8",
44
43
  "qr-code-with-logo": "^1.1.0",
45
44
  "vuepress-plugin-juejin-style-copy": "^1.0.4",
46
45
  "vuepress-plugin-mermaidjs": "1.9.1",
47
46
  "vuepress-plugin-named-chunks": "^1.1.4",
48
47
  "vuepress-plugin-zooming": "^1.1.8",
49
- "vuepress-plugin-expandable-row": "^1.0.10",
48
+ "vuepress-plugin-check-md2": "^1.0.5",
50
49
  "vuepress-plugin-noscript-code": "^1.0.2",
51
- "vuepress-plugin-check-md2": "^1.0.5"
50
+ "vuepress-plugin-expandable-row": "^1.0.10"
52
51
  },
53
52
  "resolutions": {
54
53
  "terser-webpack-plugin": "1.4.6",