next-ui3 1.5.0 → 1.5.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.
- package/dist/index.css +1 -1
- package/dist/index.full.min.js +21 -19
- package/dist/index.full.min.mjs +24 -22
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/utils/index.min.js +1 -1
- package/dist/utils/index.min.mjs +1 -1
- package/es/components/_base/next.d.ts +1 -1
- package/es/components/_base/types/index.d.ts +1 -0
- package/es/components/loading/src/index.vue.d.ts +1 -0
- package/es/components/preview/src/audio/index.vue.d.ts +42 -0
- package/es/components/preview/src/document/index.vue.d.ts +30 -0
- package/es/components/preview/src/image/index.vue.d.ts +38 -0
- package/es/components/preview/src/index.vue.d.ts +4 -1
- package/es/components/preview/src/text/index.vue.d.ts +50 -0
- package/es/components/preview/src/text/languages.d.ts +1 -0
- package/es/components/preview/src/video/index.vue.d.ts +52 -0
- package/es/config/enums.d.ts +6 -1
- package/es/config/index.d.ts +1 -0
- package/es/config/preview.d.ts +2 -0
- package/es/hooks/use-enums/index.d.ts +3 -1
- package/es/hooks/use-list/index.d.ts +26 -15
- package/es/hooks/use-loader/index.d.ts +4 -4
- package/es/hooks/use-preview-config/index.d.ts +28 -1
- package/es/locale/lang/en.d.ts +18 -0
- package/es/locale/lang/en.mjs +19 -1
- package/es/locale/lang/en.mjs.map +1 -1
- package/es/locale/lang/zh-cn.d.ts +18 -0
- package/es/locale/lang/zh-cn.mjs +19 -1
- package/es/locale/lang/zh-cn.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/lib/components/_base/next.d.ts +1 -1
- package/lib/components/_base/types/index.d.ts +1 -0
- package/lib/components/loading/src/index.vue.d.ts +1 -0
- package/lib/components/preview/src/audio/index.vue.d.ts +42 -0
- package/lib/components/preview/src/document/index.vue.d.ts +30 -0
- package/lib/components/preview/src/image/index.vue.d.ts +38 -0
- package/lib/components/preview/src/index.vue.d.ts +4 -1
- package/lib/components/preview/src/text/index.vue.d.ts +50 -0
- package/lib/components/preview/src/text/languages.d.ts +1 -0
- package/lib/components/preview/src/video/index.vue.d.ts +52 -0
- package/lib/config/enums.d.ts +6 -1
- package/lib/config/index.d.ts +1 -0
- package/lib/config/preview.d.ts +2 -0
- package/lib/hooks/use-enums/index.d.ts +3 -1
- package/lib/hooks/use-list/index.d.ts +26 -15
- package/lib/hooks/use-loader/index.d.ts +4 -4
- package/lib/hooks/use-preview-config/index.d.ts +28 -1
- package/lib/locale/lang/en.d.ts +18 -0
- package/lib/locale/lang/en.js +19 -1
- package/lib/locale/lang/en.js.map +1 -1
- package/lib/locale/lang/zh-cn.d.ts +18 -0
- package/lib/locale/lang/zh-cn.js +19 -1
- package/lib/locale/lang/zh-cn.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/nt-loading.css +1 -1
- package/theme-chalk/src/loading.scss +9 -0
- package/theme-chalk/src/preview/audio.scss +63 -0
- package/theme-chalk/src/preview/document.scss +20 -0
- package/theme-chalk/src/preview/image.scss +16 -0
- package/theme-chalk/src/preview/index.scss +5 -0
- package/theme-chalk/src/preview/text.scss +112 -0
- package/theme-chalk/src/preview/video.scss +30 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
.nt-preview-text {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
|
|
8
|
+
&--light {
|
|
9
|
+
background: #fff;
|
|
10
|
+
|
|
11
|
+
pre,
|
|
12
|
+
code {
|
|
13
|
+
background: #fff;
|
|
14
|
+
color: #24292e;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&--dark {
|
|
19
|
+
background: #1e1e1e;
|
|
20
|
+
|
|
21
|
+
pre,
|
|
22
|
+
code {
|
|
23
|
+
background: #1e1e1e;
|
|
24
|
+
color: #d4d4d4;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.nt-preview-text__toolbar {
|
|
28
|
+
border-bottom-color: #333;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&--wrap {
|
|
33
|
+
pre {
|
|
34
|
+
white-space: pre-wrap;
|
|
35
|
+
word-break: break-all;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__toolbar {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: space-between;
|
|
43
|
+
padding: 8px 16px;
|
|
44
|
+
border-bottom: 1px solid var(--el-border-color-lighter);
|
|
45
|
+
flex-shrink: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&__language {
|
|
49
|
+
font-size: 12px;
|
|
50
|
+
color: var(--el-text-color-secondary);
|
|
51
|
+
text-transform: uppercase;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&__toolbar-actions {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: 20px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&__switch-item {
|
|
61
|
+
display: inline-flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 6px;
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
font-size: 12px;
|
|
66
|
+
color: var(--el-text-color-secondary);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&__content {
|
|
70
|
+
flex: 1;
|
|
71
|
+
overflow: auto;
|
|
72
|
+
|
|
73
|
+
pre {
|
|
74
|
+
margin: 0;
|
|
75
|
+
padding: 16px;
|
|
76
|
+
font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
|
|
77
|
+
font-size: 13px;
|
|
78
|
+
line-height: 1.6;
|
|
79
|
+
tab-size: 2;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
code {
|
|
83
|
+
font-family: inherit;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&__line-numbers {
|
|
88
|
+
counter-reset: line;
|
|
89
|
+
|
|
90
|
+
.line {
|
|
91
|
+
display: block;
|
|
92
|
+
width: 100%;
|
|
93
|
+
position: relative;
|
|
94
|
+
padding-left: 4em;
|
|
95
|
+
box-sizing: border-box;
|
|
96
|
+
|
|
97
|
+
&::before {
|
|
98
|
+
position: absolute;
|
|
99
|
+
left: 0;
|
|
100
|
+
top: 0;
|
|
101
|
+
counter-increment: line;
|
|
102
|
+
content: counter(line);
|
|
103
|
+
display: inline-block;
|
|
104
|
+
width: 3em;
|
|
105
|
+
margin-right: 1em;
|
|
106
|
+
text-align: right;
|
|
107
|
+
color: var(--el-text-color-placeholder);
|
|
108
|
+
user-select: none;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.nt-preview-video {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
position: relative;
|
|
8
|
+
background: #000;
|
|
9
|
+
|
|
10
|
+
&__player {
|
|
11
|
+
max-width: 100%;
|
|
12
|
+
max-height: 100%;
|
|
13
|
+
object-fit: contain;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&__loading {
|
|
17
|
+
position: absolute;
|
|
18
|
+
inset: 0;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:fullscreen {
|
|
25
|
+
.nt-preview-video__player {
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 100%;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|