vitepress-theme-element-plus 0.0.3 → 0.0.4

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 (41) hide show
  1. package/README.md +3 -3
  2. package/client/components/A11yTag.vue +29 -29
  3. package/client/components/ApiTyping.vue +54 -54
  4. package/client/components/Backdrop.vue +41 -41
  5. package/client/components/Bili.vue +94 -94
  6. package/client/components/Content.vue +148 -150
  7. package/client/components/DeprecatedTag.vue +19 -19
  8. package/client/components/Doc.vue +181 -181
  9. package/client/components/DocAside.vue +46 -46
  10. package/client/components/DocAsideOutline.vue +82 -82
  11. package/client/components/DocFooter.vue +159 -159
  12. package/client/components/Footer.vue +77 -77
  13. package/client/components/FooterCopyright.vue +27 -27
  14. package/client/components/Layout.vue +156 -156
  15. package/client/components/Link.vue +41 -41
  16. package/client/components/LocalNav.vue +160 -160
  17. package/client/components/Nav.vue +69 -69
  18. package/client/components/NavBar.vue +203 -203
  19. package/client/components/NavBarTitle.vue +75 -75
  20. package/client/components/Sidebar.vue +129 -129
  21. package/client/components/SidebarGroup.vue +51 -51
  22. package/client/components/SidebarItem.vue +302 -302
  23. package/client/components/Tag.vue +25 -25
  24. package/client/components/VPNavBarSearch.vue +23 -23
  25. package/client/components/VersionTag.vue +18 -18
  26. package/client/hooks/useBackTop.ts +71 -71
  27. package/client/hooks/useLangs.ts +50 -50
  28. package/client/hooks/useSidebar.ts +93 -18
  29. package/client/hooks/useSidebarControl.ts +78 -78
  30. package/client/hooks/useSize.ts +69 -69
  31. package/client/utils/client/common.ts +49 -49
  32. package/client/utils/client/outline.ts +113 -113
  33. package/client/utils/common.ts +90 -90
  34. package/index.ts +26 -26
  35. package/package.json +73 -73
  36. package/shared/constants.ts +3 -3
  37. package/styles/base.scss +37 -37
  38. package/styles/code.scss +282 -282
  39. package/styles/doc-content.scss +161 -161
  40. package/styles/index.scss +69 -69
  41. package/styles/tag-content.scss +30 -30
package/index.ts CHANGED
@@ -1,26 +1,26 @@
1
- import type { DefaultTheme, Theme } from 'vitepress'
2
- import VPTheme from 'vitepress/theme'
3
- import Layout from './client/components/Layout.vue'
4
- import 'element-plus/theme-chalk/base.css'
5
- import 'element-plus/theme-chalk/el-tag.css'
6
- import 'element-plus/theme-chalk/dark/css-vars.css'
7
- import './styles/index.scss'
8
- import './styles/base.scss'
9
- import './styles/code.scss'
10
- import './styles/doc-content.scss'
11
- import './styles/tag-content.scss'
12
-
13
- const EPTheme: Theme = {
14
- extends: VPTheme,
15
- Layout,
16
- }
17
-
18
- export interface EPThemeConfig extends DefaultTheme.Config {
19
- /**
20
- * 文档版本号
21
- */
22
- version?: string
23
- }
24
-
25
- export { Layout }
26
- export default EPTheme
1
+ import type { DefaultTheme, Theme } from 'vitepress'
2
+ import VPTheme from 'vitepress/theme'
3
+ import Layout from './client/components/Layout.vue'
4
+ import 'element-plus/theme-chalk/base.css'
5
+ import 'element-plus/theme-chalk/el-tag.css'
6
+ import 'element-plus/theme-chalk/dark/css-vars.css'
7
+ import './styles/index.scss'
8
+ import './styles/base.scss'
9
+ import './styles/code.scss'
10
+ import './styles/doc-content.scss'
11
+ import './styles/tag-content.scss'
12
+
13
+ const EPTheme: Theme = {
14
+ extends: VPTheme,
15
+ Layout,
16
+ }
17
+
18
+ export interface EPThemeConfig extends DefaultTheme.Config {
19
+ /**
20
+ * 文档版本号
21
+ */
22
+ version?: string
23
+ }
24
+
25
+ export { Layout }
26
+ export default EPTheme
package/package.json CHANGED
@@ -1,73 +1,73 @@
1
- {
2
- "name": "vitepress-theme-element-plus",
3
- "type": "module",
4
- "version": "0.0.3",
5
- "description": "A VitePress theme for Element Plus",
6
- "author": "Hezhengxu",
7
- "license": "MIT",
8
- "repository": {
9
- "type": "git",
10
- "url": "https://github.com/hezhengxu/vitepress-theme-element-plus"
11
- },
12
- "keywords": [
13
- "vitepress",
14
- "theme",
15
- "vue",
16
- "documentation"
17
- ],
18
- "exports": {
19
- ".": {
20
- "default": "./index.ts"
21
- },
22
- "./node": {
23
- "types": "./dist/index.d.ts",
24
- "default": "./dist/index.mjs"
25
- }
26
- },
27
- "module": "./index.ts",
28
- "types": "./types/index.d.ts",
29
- "style": "./index.scss",
30
- "files": [
31
- "client",
32
- "dist",
33
- "index.ts",
34
- "shared",
35
- "styles"
36
- ],
37
- "scripts": {
38
- "clean": "rimraf dist",
39
- "build": "tsdown",
40
- "build:watch": "tsdown --watch",
41
- "lint": "eslint ./ --fix",
42
- "prepublishOnly": "pnpm run build",
43
- "release": "release-it"
44
- },
45
- "peerDependencies": {
46
- "vitepress": "2.0.0-alpha.12"
47
- },
48
- "dependencies": {
49
- "@iconify/vue": "^4"
50
- },
51
- "devDependencies": {
52
- "@release-it/conventional-changelog": "^10",
53
- "@types/glob": "^9.0.0",
54
- "@types/markdown-it": "^14.1.0",
55
- "@types/node": "^22.17.0",
56
- "@vitejs/plugin-vue": "^5.2.4",
57
- "@vueuse/core": "^11.3.0",
58
- "element-plus": "^2.11.7",
59
- "release-it": "^19",
60
- "rimraf": "^6.0.1",
61
- "sass-embedded": "^1.80.3",
62
- "tsdown": "0.16.0",
63
- "typescript": "^5.9.2",
64
- "vite": "^6.3.5",
65
- "vite-plugin-dts": "^4.5.4",
66
- "vitepress": "2.0.0-alpha.12",
67
- "vue": "^3.5.18",
68
- "vue-tsc": "^3.0.5"
69
- },
70
- "publishConfig": {
71
- "access": "public"
72
- }
73
- }
1
+ {
2
+ "name": "vitepress-theme-element-plus",
3
+ "type": "module",
4
+ "version": "0.0.4",
5
+ "description": "A VitePress theme for Element Plus",
6
+ "author": "Hezhengxu",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/hezhengxu/vitepress-theme-element-plus"
11
+ },
12
+ "keywords": [
13
+ "vitepress",
14
+ "theme",
15
+ "vue",
16
+ "documentation"
17
+ ],
18
+ "exports": {
19
+ ".": {
20
+ "default": "./index.ts"
21
+ },
22
+ "./node": {
23
+ "types": "./dist/index.d.ts",
24
+ "default": "./dist/index.mjs"
25
+ }
26
+ },
27
+ "module": "./index.ts",
28
+ "types": "./types/index.d.ts",
29
+ "style": "./index.scss",
30
+ "files": [
31
+ "client",
32
+ "dist",
33
+ "index.ts",
34
+ "shared",
35
+ "styles"
36
+ ],
37
+ "scripts": {
38
+ "clean": "rimraf dist",
39
+ "build": "tsdown",
40
+ "build:watch": "tsdown --watch",
41
+ "lint": "eslint ./ --fix",
42
+ "prepublishOnly": "pnpm run build",
43
+ "release": "release-it"
44
+ },
45
+ "peerDependencies": {
46
+ "vitepress": "2.0.0-alpha.12"
47
+ },
48
+ "dependencies": {
49
+ "@iconify/vue": "^4"
50
+ },
51
+ "devDependencies": {
52
+ "@release-it/conventional-changelog": "^10",
53
+ "@types/glob": "^9.0.0",
54
+ "@types/markdown-it": "^14.1.0",
55
+ "@types/node": "^22.17.0",
56
+ "@vitejs/plugin-vue": "^5.2.4",
57
+ "@vueuse/core": "^11.3.0",
58
+ "element-plus": "^2.11.7",
59
+ "release-it": "^19",
60
+ "rimraf": "^6.0.1",
61
+ "sass-embedded": "^1.80.3",
62
+ "tsdown": "0.16.0",
63
+ "typescript": "^5.9.2",
64
+ "vite": "^6.3.5",
65
+ "vite-plugin-dts": "^4.5.4",
66
+ "vitepress": "2.0.0-alpha.12",
67
+ "vue": "^3.5.18",
68
+ "vue-tsc": "^3.0.5"
69
+ },
70
+ "publishConfig": {
71
+ "access": "public"
72
+ }
73
+ }
@@ -1,3 +1,3 @@
1
- export const NOT_ARTICLE_LAYOUTS = ['blog', 'tags', 'categorys', 'projects', 'home', 'page']
2
-
3
- export const DEFAULT_PAGE_SIZE = 5
1
+ export const NOT_ARTICLE_LAYOUTS = ['blog', 'tags', 'categorys', 'projects', 'home', 'page']
2
+
3
+ export const DEFAULT_PAGE_SIZE = 5
package/styles/base.scss CHANGED
@@ -1,37 +1,37 @@
1
-
2
- ::before,
3
- ::after {
4
- box-sizing: border-box;
5
- }
6
-
7
- html {
8
- line-height: 1.4;
9
- font-size: 16px;
10
- text-size-adjust: 100%;
11
- font-family: var(--font-family);
12
- font-weight: 400;
13
- -webkit-font-smoothing: antialiased;
14
- -webkit-tap-highlight-color: transparent;
15
- }
16
-
17
- body {
18
- margin: 0;
19
- width: 100%;
20
- min-width: 320px;
21
- min-height: 100vh;
22
- line-height: 1.4;
23
- font-size: 16px;
24
- font-weight: 400;
25
- color: var(--text-color);
26
- background-color: var(--bg-color);
27
- direction: ltr;
28
- font-synthesis: none;
29
- text-rendering: optimizeLegibility;
30
- -webkit-font-smoothing: antialiased;
31
- -moz-osx-font-smoothing: grayscale;
32
- transition: background-color var(--el-transition-duration-fast);
33
- }
34
-
35
- main {
36
- display: block;
37
- }
1
+
2
+ ::before,
3
+ ::after {
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ html {
8
+ line-height: 1.4;
9
+ font-size: 16px;
10
+ text-size-adjust: 100%;
11
+ font-family: var(--font-family);
12
+ font-weight: 400;
13
+ -webkit-font-smoothing: antialiased;
14
+ -webkit-tap-highlight-color: transparent;
15
+ }
16
+
17
+ body {
18
+ margin: 0;
19
+ width: 100%;
20
+ min-width: 320px;
21
+ min-height: 100vh;
22
+ line-height: 1.4;
23
+ font-size: 16px;
24
+ font-weight: 400;
25
+ color: var(--text-color);
26
+ background-color: var(--bg-color);
27
+ direction: ltr;
28
+ font-synthesis: none;
29
+ text-rendering: optimizeLegibility;
30
+ -webkit-font-smoothing: antialiased;
31
+ -moz-osx-font-smoothing: grayscale;
32
+ transition: background-color var(--el-transition-duration-fast);
33
+ }
34
+
35
+ main {
36
+ display: block;
37
+ }