@viteplus/versions 2.0.9 → 2.1.1
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.
- package/components/env.d.ts +17 -0
- package/components/styles/scoped.css +79 -0
- package/components/styles/version-switcher.css +7 -0
- package/components/tsconfig.json +36 -0
- package/components/version-switcher.component.ts +662 -0
- package/components/version-switcher.component.vue +41 -181
- package/dist/index.d.ts +21 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +5 -5
- package/package.json +11 -10
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shim for single-file components so the IDE can type `*.vue` imports.
|
|
3
|
+
* VitePress/Vite handles the real resolution at build time.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
declare module '*.vue' {
|
|
7
|
+
import type { DefineComponent } from 'vue';
|
|
8
|
+
const component: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
|
|
9
|
+
export default component;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Shim for side effect CSS imports so the IDE stops flagging TS2882.
|
|
14
|
+
* Vite handles the real resolution at build time.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
declare module '*.css';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
.VPVersionSwitcher {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.icon {
|
|
7
|
+
padding: 8px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.title {
|
|
11
|
+
padding: 0 24px 0 12px;
|
|
12
|
+
line-height: 32px;
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
font-weight: 700;
|
|
15
|
+
color: var(--vp-c-text-1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.VPScreenVersionSwitcher {
|
|
19
|
+
border-bottom: 1px solid var(--vp-c-divider);
|
|
20
|
+
height: 48px;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
transition: border-color 0.5s;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.VPScreenVersionSwitcher .items {
|
|
26
|
+
visibility: hidden;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.VPScreenVersionSwitcher.open {
|
|
30
|
+
padding-bottom: 10px;
|
|
31
|
+
height: auto;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.VPScreenVersionSwitcher.open .items {
|
|
35
|
+
visibility: visible;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.VPScreenVersionSwitcher.open .button {
|
|
39
|
+
padding-bottom: 6px;
|
|
40
|
+
color: var(--vp-c-brand-1);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.VPScreenVersionSwitcher.open .button-icon {
|
|
44
|
+
transform: rotate(45deg);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.VPScreenVersionSwitcher button .icon {
|
|
48
|
+
margin-right: 8px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.button {
|
|
52
|
+
display: flex;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
align-items: center;
|
|
55
|
+
padding: 12px 4px 11px 0;
|
|
56
|
+
width: 100%;
|
|
57
|
+
line-height: 24px;
|
|
58
|
+
font-size: 14px;
|
|
59
|
+
font-weight: 500;
|
|
60
|
+
color: var(--vp-c-text-1);
|
|
61
|
+
transition: color 0.25s;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.button:hover {
|
|
65
|
+
color: var(--vp-c-brand-1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.button-icon {
|
|
69
|
+
transition: transform 0.25s;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.group:first-child {
|
|
73
|
+
padding-top: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.group + .group,
|
|
77
|
+
.group + .item {
|
|
78
|
+
padding-top: 4px;
|
|
79
|
+
}
|
|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Jva2U9IiMwMDAwMDAiIHN0cm9rZS13aWR0aD0iMi4yIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjwvcGF0aD48cGF0aCBkPSJNNyA3VjE3IiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS13aWR0aD0iMi4yIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjwvcGF0aD48cGF0aCBkPSJNMTcgN1Y4QzE3IDEwLjUgMTUgMTEgMTUgMTFMOSAxM0M5IDEzIDcgMTMuNSA3IDE2VjE3IiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS13aWR0aD0iMi4yIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjwvcGF0aD48L3N2Zz4=");
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"strict": true,
|
|
4
|
+
"noEmit": true,
|
|
5
|
+
"target": "ESNext",
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"moduleResolution": "bundler",
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"lib": [
|
|
12
|
+
"DOM",
|
|
13
|
+
"ESNext"
|
|
14
|
+
],
|
|
15
|
+
"types": [
|
|
16
|
+
"node"
|
|
17
|
+
],
|
|
18
|
+
"paths": {
|
|
19
|
+
"vue": [
|
|
20
|
+
"../../node_modules/.pnpm/node_modules/vue"
|
|
21
|
+
],
|
|
22
|
+
"@vue/runtime-core": [
|
|
23
|
+
"../../node_modules/.pnpm/node_modules/@vue/runtime-core"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"include": [
|
|
28
|
+
"**/*.ts",
|
|
29
|
+
"**/*.vue",
|
|
30
|
+
"env.d.ts"
|
|
31
|
+
],
|
|
32
|
+
"exclude": [
|
|
33
|
+
"dist",
|
|
34
|
+
"cache"
|
|
35
|
+
]
|
|
36
|
+
}
|