next-ui3 1.5.6 → 1.5.7
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 +23 -14
- package/dist/index.full.min.mjs +22 -13
- 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/preview/src/html/index.vue.d.ts +51 -0
- package/es/components/preview/src/index.vue.d.ts +2 -2
- package/es/components/preview/src/markdown/index.vue.d.ts +55 -0
- package/es/config/enums.d.ts +2 -1
- package/es/config/preview.d.ts +1 -0
- package/es/hooks/use-preview-config/index.d.ts +4 -8
- package/es/locale/lang/en.d.ts +2 -0
- package/es/locale/lang/en.mjs +3 -1
- package/es/locale/lang/en.mjs.map +1 -1
- package/es/locale/lang/zh-cn.d.ts +2 -0
- package/es/locale/lang/zh-cn.mjs +3 -1
- package/es/locale/lang/zh-cn.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/lib/components/preview/src/html/index.vue.d.ts +51 -0
- package/lib/components/preview/src/index.vue.d.ts +2 -2
- package/lib/components/preview/src/markdown/index.vue.d.ts +55 -0
- package/lib/config/enums.d.ts +2 -1
- package/lib/config/preview.d.ts +1 -0
- package/lib/hooks/use-preview-config/index.d.ts +4 -8
- package/lib/locale/lang/en.d.ts +2 -0
- package/lib/locale/lang/en.js +3 -1
- package/lib/locale/lang/en.js.map +1 -1
- package/lib/locale/lang/zh-cn.d.ts +2 -0
- package/lib/locale/lang/zh-cn.js +3 -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/src/preview/audio.scss +1 -0
- package/theme-chalk/src/preview/index.scss +1 -0
- package/theme-chalk/src/preview/markdown.scss +153 -0
- package/theme-chalk/src/preview/text.scss +6 -0
- package/theme-chalk/src/preview/video.scss +1 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/* 结构与 nt-preview-text 一致,独立 BEM 块供 Markdown 源码预览使用 */
|
|
2
|
+
|
|
3
|
+
.nt-preview-markdown {
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
|
|
10
|
+
&--light {
|
|
11
|
+
background: #fff;
|
|
12
|
+
|
|
13
|
+
pre,
|
|
14
|
+
code {
|
|
15
|
+
background: #fff;
|
|
16
|
+
color: #24292e;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&--dark {
|
|
21
|
+
background: #1e1e1e;
|
|
22
|
+
|
|
23
|
+
pre,
|
|
24
|
+
code {
|
|
25
|
+
background: #1e1e1e;
|
|
26
|
+
color: #d4d4d4;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.nt-preview-markdown__toolbar {
|
|
30
|
+
border-bottom-color: #333;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&--wrap {
|
|
35
|
+
pre {
|
|
36
|
+
white-space: pre-wrap;
|
|
37
|
+
word-break: break-all;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&__toolbar {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: space-between;
|
|
45
|
+
padding: 8px 16px;
|
|
46
|
+
border-bottom: 1px solid var(--el-border-color-lighter);
|
|
47
|
+
flex-shrink: 0;
|
|
48
|
+
padding-left: 10px;
|
|
49
|
+
min-height: 40px;
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&__language {
|
|
54
|
+
font-size: 12px;
|
|
55
|
+
color: var(--el-text-color-secondary);
|
|
56
|
+
text-transform: uppercase;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&__mode {
|
|
60
|
+
font-size: 12px;
|
|
61
|
+
color: var(--el-text-color-secondary);
|
|
62
|
+
text-transform: uppercase;
|
|
63
|
+
|
|
64
|
+
&-item {
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
padding: 3px 6px;
|
|
67
|
+
border-radius: 3px;
|
|
68
|
+
|
|
69
|
+
&:hover {
|
|
70
|
+
background: var(--el-color-info-light-7);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&.is-active {
|
|
74
|
+
color: #fff;
|
|
75
|
+
background: var(--el-color-info-light-5);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&-item + &-item {
|
|
80
|
+
margin-left: 8px;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&__toolbar-actions {
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
gap: 20px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&__switch-item {
|
|
91
|
+
display: inline-flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
gap: 6px;
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
font-size: 12px;
|
|
96
|
+
color: var(--el-text-color-secondary);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&__copy-button {
|
|
100
|
+
font-size: 12px;
|
|
101
|
+
color: var(--el-text-color-secondary);
|
|
102
|
+
font-weight: normal;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&__content {
|
|
106
|
+
flex: 1;
|
|
107
|
+
overflow: auto;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&__source {
|
|
111
|
+
pre {
|
|
112
|
+
margin: 0;
|
|
113
|
+
padding: 16px;
|
|
114
|
+
font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
|
|
115
|
+
font-size: 13px;
|
|
116
|
+
line-height: 1.6;
|
|
117
|
+
tab-size: 2;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
code {
|
|
121
|
+
font-family: inherit;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
&__preview {
|
|
125
|
+
padding: 16px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&__line-numbers {
|
|
129
|
+
counter-reset: line;
|
|
130
|
+
|
|
131
|
+
.line {
|
|
132
|
+
display: block;
|
|
133
|
+
width: 100%;
|
|
134
|
+
position: relative;
|
|
135
|
+
padding-left: 4em;
|
|
136
|
+
box-sizing: border-box;
|
|
137
|
+
|
|
138
|
+
&::before {
|
|
139
|
+
position: absolute;
|
|
140
|
+
left: 0;
|
|
141
|
+
top: 0;
|
|
142
|
+
counter-increment: line;
|
|
143
|
+
content: counter(line);
|
|
144
|
+
display: inline-block;
|
|
145
|
+
width: 3em;
|
|
146
|
+
margin-right: 1em;
|
|
147
|
+
text-align: right;
|
|
148
|
+
color: var(--el-text-color-placeholder);
|
|
149
|
+
user-select: none;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|