@antv/dumi-theme-antv 0.4.5 → 0.5.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 (40) hide show
  1. package/dist/layouts/DocLayout.d.ts +2 -1
  2. package/dist/layouts/entry/Index.js +2 -2
  3. package/dist/locales/en.json +13 -7
  4. package/dist/locales/zh.json +9 -3
  5. package/dist/model/index.d.ts +5 -0
  6. package/dist/model/index.js +6 -0
  7. package/dist/pages/Example/components/CollapsedIcon/index.d.ts +8 -0
  8. package/dist/pages/Example/components/CollapsedIcon/index.js +15 -0
  9. package/dist/pages/Example/components/CollapsedIcon/index.module.less +14 -0
  10. package/dist/pages/Example/index.js +28 -11
  11. package/dist/pages/Examples/components/Accouncement/index.js +2 -2
  12. package/dist/pages/Examples/components/GalleryPageContent/index.js +2 -2
  13. package/dist/plugin/api.d.ts +7 -0
  14. package/dist/plugin/api.js +82 -0
  15. package/dist/plugin/examples.d.ts +1 -1
  16. package/dist/plugin/examples.js +28 -21
  17. package/dist/plugin/index.js +2 -1
  18. package/dist/slots/API/index.d.ts +15 -0
  19. package/dist/slots/API/index.js +202 -0
  20. package/dist/slots/API/index.module.less +93 -0
  21. package/dist/slots/Banner/index.js +2 -2
  22. package/dist/slots/CodeEditor/Toolbar.js +2 -2
  23. package/dist/slots/CodeEditor/utils.js +7 -9
  24. package/dist/slots/CodeRunner/utils.js +4 -3
  25. package/dist/slots/Detail/News.d.ts +2 -0
  26. package/dist/slots/Detail/News.js +9 -2
  27. package/dist/slots/Detail/News.module.less +47 -18
  28. package/dist/slots/Detail/index.js +4 -6
  29. package/dist/slots/Detail/index.module.less +11 -4
  30. package/dist/slots/ExampleSider/index.js +2 -3
  31. package/dist/slots/Footer/index.js +24 -11
  32. package/dist/slots/Header/Navs.js +7 -3
  33. package/dist/slots/Header/Products/getProducts.js +2 -2
  34. package/dist/slots/Header/Products/index.js +2 -2
  35. package/dist/slots/Header/index.d.ts +9 -0
  36. package/dist/slots/Header/index.js +70 -68
  37. package/dist/slots/Header/index.module.less +17 -0
  38. package/dist/slots/ManualContent/index.js +10 -4
  39. package/dist/slots/ManualContent/index.module.less +39 -18
  40. package/package.json +36 -32
@@ -76,7 +76,7 @@
76
76
  margin: 0.6em 0;
77
77
  }
78
78
 
79
- pre > code[class*='language-'] {
79
+ pre>code[class*='language-'] {
80
80
  line-height: 1.8;
81
81
  }
82
82
 
@@ -125,7 +125,7 @@
125
125
  padding: 0;
126
126
  }
127
127
 
128
- ul:not(:global(.ant-skeleton-paragraph)) > li {
128
+ ul:not(:global(.ant-skeleton-paragraph))>li {
129
129
  margin-left: 20px;
130
130
  padding-left: 4px;
131
131
  list-style-type: circle;
@@ -135,14 +135,14 @@
135
135
  }
136
136
  }
137
137
 
138
- ol > li {
138
+ ol>li {
139
139
  margin-left: 20px;
140
140
  padding-left: 4px;
141
141
  list-style-type: decimal;
142
142
  }
143
143
 
144
- ul > li > p,
145
- ol > li > p {
144
+ ul>li>p,
145
+ ol>li>p {
146
146
  margin: 0.2em 0;
147
147
  }
148
148
 
@@ -201,8 +201,8 @@
201
201
  margin: 0;
202
202
  }
203
203
 
204
- > br,
205
- > p > br {
204
+ >br,
205
+ >p>br {
206
206
  clear: both;
207
207
  }
208
208
 
@@ -228,14 +228,14 @@
228
228
  .contentReset() {
229
229
  min-height: 400px;
230
230
 
231
- > img,
232
- > p > img {
231
+ >img,
232
+ >p>img {
233
233
  max-width: 100%;
234
234
  margin: 0.5em 0;
235
235
  }
236
236
 
237
- > br,
238
- > p > br {
237
+ >br,
238
+ >p>br {
239
239
  clear: both;
240
240
  }
241
241
  }
@@ -274,6 +274,7 @@
274
274
  }
275
275
  }
276
276
  }
277
+
277
278
  .contentTitle {
278
279
  margin-top: 8px;
279
280
  margin-bottom: 20px;
@@ -282,6 +283,7 @@
282
283
  font-family: Avenir, -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
283
284
  line-height: 38px;
284
285
  }
286
+
285
287
  .sider {
286
288
  width: 280px !important;
287
289
  height: inherit;
@@ -299,9 +301,27 @@
299
301
  }
300
302
 
301
303
  .affix {
302
- & > div {
304
+ &>div {
303
305
  height: 100%;
304
306
  }
307
+
308
+ .memuLabel {
309
+ display: flex;
310
+ align-items: center;
311
+
312
+ .tag {
313
+ position: absolute;
314
+ right: 20px;
315
+ background: #f9f0ff;
316
+ color: #873bf4;
317
+ border: 1px solid #873bf4;
318
+ border-radius: 8px;
319
+ height: 22px;
320
+ font-size: 12px !important;
321
+ padding: 0 8px;
322
+ line-height: 20px;
323
+ }
324
+ }
305
325
  }
306
326
 
307
327
  .menuIcon {
@@ -384,7 +404,7 @@
384
404
  transition: all 0.3s;
385
405
  margin: 12px;
386
406
 
387
- > div {
407
+ >div {
388
408
  border: 1px solid @border-color-split;
389
409
  border-radius: 6px;
390
410
  overflow: hidden;
@@ -403,7 +423,7 @@
403
423
  }
404
424
  }
405
425
 
406
- &:hover > div {
426
+ &:hover>div {
407
427
  transform: translateY(-4px);
408
428
  border-color: transparent;
409
429
  box-shadow: 0 6px 16px rgba(107, 147, 224, 0.14);
@@ -492,10 +512,11 @@
492
512
  padding-right: 32px;
493
513
  }
494
514
  }
515
+
495
516
  .tocSiderbar {
496
- display: none;
517
+ display: none;
497
518
  }
498
-
519
+
499
520
  .gallery {
500
521
  .galleryCard {
501
522
  width: 50%;
@@ -604,7 +625,7 @@
604
625
  color: #868484;
605
626
  background-color: #fff;
606
627
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
607
- 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
628
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
608
629
  transition: color 0.3s;
609
630
  width: 44px;
610
631
  height: 44px;
@@ -672,4 +693,4 @@
672
693
  transition: all .3s;
673
694
  background-color: #fff;
674
695
  font-family: Avenir, -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
675
- }
696
+ }
package/package.json CHANGED
@@ -1,31 +1,35 @@
1
1
  {
2
2
  "name": "@antv/dumi-theme-antv",
3
- "version": "0.4.5",
3
+ "version": "0.5.0",
4
4
  "description": "AntV website theme based on dumi2.",
5
- "types": "dist/types.d.ts",
6
- "scripts": {
7
- "dev": "father dev",
8
- "dev:example-site": "cd example && npm run start",
9
- "build": "npm run prepare && father build",
10
- "prepare": "father link-dev-theme",
11
- "lint": "npm run lint:es && npm run lint:css",
12
- "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
13
- "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
14
- "prepublishOnly": "npm run build"
15
- },
16
5
  "keywords": [
17
6
  "dumi",
18
7
  "dumi-theme",
19
8
  "dumi-theme-antv"
20
9
  ],
21
- "authors": [
22
- "dumi",
23
- "antv"
24
- ],
10
+ "homepage": "https://github.com/antvis/dumi-theme-antv#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/antvis/dumi-theme-antv/issues"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/antvis/dumi-theme-antv"
17
+ },
25
18
  "license": "MIT",
19
+ "types": "dist/types.d.ts",
26
20
  "files": [
27
21
  "dist"
28
22
  ],
23
+ "scripts": {
24
+ "build": "npm run prepare && father build",
25
+ "dev": "father dev",
26
+ "lint": "npm run lint:es && npm run lint:css",
27
+ "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
28
+ "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
29
+ "prepare": "father link-dev-theme",
30
+ "prepublishOnly": "npm run build",
31
+ "start": "cd example && npm run start"
32
+ },
29
33
  "commitlint": {
30
34
  "extends": [
31
35
  "@commitlint/config-conventional"
@@ -48,9 +52,6 @@
48
52
  "prettier --parser=typescript --write"
49
53
  ]
50
54
  },
51
- "publishConfig": {
52
- "access": "public"
53
- },
54
55
  "dependencies": {
55
56
  "@ant-design/icons": "^4.7.0",
56
57
  "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6",
@@ -73,6 +74,7 @@
73
74
  "lodash-es": "^4.17.21",
74
75
  "monaco-editor": "^0.25.0",
75
76
  "parse-github-url": "^1.0.2",
77
+ "prettier": "^2.7.1",
76
78
  "rc-drawer": "^4.0.0",
77
79
  "rc-footer": "^0.6.6",
78
80
  "react": "^18.2.0",
@@ -80,24 +82,22 @@
80
82
  "react-error-boundary": "^3.1.4",
81
83
  "react-github-button": "^0.1.11",
82
84
  "react-helmet": "^6.1.0",
85
+ "react-markdown": "^9.0.1",
83
86
  "react-router-dom": "^6.4.2",
84
87
  "react-slick": "^0.29.0",
85
88
  "react-split-pane": "^0.1.92",
86
89
  "react-use": "^17.4.0",
87
90
  "reading-time": "^1.5.0",
91
+ "rehype-raw": "^7.0.0",
92
+ "remark-gfm": "^4.0.0",
88
93
  "semver": "^7.3.8",
89
94
  "size-sensor": "^1.0.1",
90
95
  "slick-carousel": "^1.8.1",
91
96
  "unified": "^10.1.2",
92
97
  "unist-util-visit": "^4.1.2",
93
98
  "uri-parse": "^1.0.0",
94
- "video-react": "^0.16.0",
95
- "prettier": "^2.7.1"
96
- },
97
- "peerDependencies": {
98
- "dumi": "^2.0.0",
99
- "react": ">=16.9.0",
100
- "react-dom": ">=16.9.0"
99
+ "valtio": "^1.12.1",
100
+ "video-react": "^0.16.0"
101
101
  },
102
102
  "devDependencies": {
103
103
  "@commitlint/cli": "^17.1.2",
@@ -123,12 +123,16 @@
123
123
  "react-dom": "^18.0.0",
124
124
  "stylelint": "^14.9.1"
125
125
  },
126
- "repository": {
127
- "type": "git",
128
- "url": "https://github.com/antvis/dumi-theme-antv"
126
+ "peerDependencies": {
127
+ "dumi": "^2.0.0",
128
+ "react": ">=16.9.0",
129
+ "react-dom": ">=16.9.0"
129
130
  },
130
- "bugs": {
131
- "url": "https://github.com/antvis/dumi-theme-antv/issues"
131
+ "publishConfig": {
132
+ "access": "public"
132
133
  },
133
- "homepage": "https://github.com/antvis/dumi-theme-antv#readme"
134
+ "authors": [
135
+ "dumi",
136
+ "antv"
137
+ ]
134
138
  }