@waline/client 2.15.8 → 3.0.0-alpha.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.
Files changed (139) hide show
  1. package/dist/comment.cjs +1 -1
  2. package/dist/comment.cjs.map +1 -1
  3. package/dist/comment.d.cts +2 -1
  4. package/dist/comment.d.mts +2 -1
  5. package/dist/comment.d.ts +2 -1
  6. package/dist/comment.js +1 -1
  7. package/dist/comment.js.map +1 -1
  8. package/dist/comment.mjs +1 -1
  9. package/dist/comment.mjs.map +1 -1
  10. package/dist/component.mjs +8 -1
  11. package/dist/component.mjs.map +1 -1
  12. package/dist/pageview.cjs +1 -1
  13. package/dist/pageview.cjs.map +1 -1
  14. package/dist/pageview.d.cts +2 -1
  15. package/dist/pageview.d.mts +2 -1
  16. package/dist/pageview.d.ts +2 -1
  17. package/dist/pageview.js +1 -1
  18. package/dist/pageview.js.map +1 -1
  19. package/dist/pageview.mjs +1 -1
  20. package/dist/pageview.mjs.map +1 -1
  21. package/dist/shim.cjs +8 -1
  22. package/dist/shim.cjs.map +1 -1
  23. package/dist/shim.d.cts +7 -82
  24. package/dist/shim.d.mts +7 -82
  25. package/dist/shim.mjs +8 -1
  26. package/dist/shim.mjs.map +1 -1
  27. package/dist/waline.cjs +53 -1
  28. package/dist/waline.cjs.map +1 -1
  29. package/dist/waline.css +1 -1
  30. package/dist/waline.css.map +1 -1
  31. package/dist/waline.d.cts +7 -82
  32. package/dist/waline.d.mts +7 -82
  33. package/dist/waline.d.ts +7 -82
  34. package/dist/waline.js +53 -1
  35. package/dist/waline.js.map +1 -1
  36. package/dist/waline.mjs +53 -1
  37. package/dist/waline.mjs.map +1 -1
  38. package/package.json +20 -53
  39. package/dist/api.cjs +0 -2
  40. package/dist/api.cjs.map +0 -1
  41. package/dist/api.d.cts +0 -445
  42. package/dist/api.d.mts +0 -445
  43. package/dist/api.d.ts +0 -445
  44. package/dist/api.mjs +0 -2
  45. package/dist/api.mjs.map +0 -1
  46. package/dist/legacy.umd.d.ts +0 -628
  47. package/dist/legacy.umd.js +0 -2
  48. package/dist/legacy.umd.js.map +0 -1
  49. package/src/api/articleCounter.ts +0 -82
  50. package/src/api/comment.ts +0 -258
  51. package/src/api/commentCount.ts +0 -33
  52. package/src/api/index.ts +0 -7
  53. package/src/api/login.ts +0 -96
  54. package/src/api/pageview.ts +0 -54
  55. package/src/api/recentComment.ts +0 -42
  56. package/src/api/user.ts +0 -44
  57. package/src/api/utils.ts +0 -46
  58. package/src/comment.ts +0 -69
  59. package/src/compact/convert.ts +0 -80
  60. package/src/compact/dropped.ts +0 -35
  61. package/src/compact/index.ts +0 -4
  62. package/src/compact/logger.ts +0 -5
  63. package/src/compact/v1.ts +0 -103
  64. package/src/compact/valine.ts +0 -132
  65. package/src/components/ArticleReaction.vue +0 -159
  66. package/src/components/CommentBox.vue +0 -807
  67. package/src/components/CommentCard.vue +0 -271
  68. package/src/components/Icons.ts +0 -181
  69. package/src/components/ImageWall.vue +0 -169
  70. package/src/components/WalineComment.vue +0 -353
  71. package/src/composables/index.ts +0 -6
  72. package/src/composables/inputs.ts +0 -17
  73. package/src/composables/like.ts +0 -13
  74. package/src/composables/reaction.ts +0 -15
  75. package/src/composables/recaptchaV3.ts +0 -19
  76. package/src/composables/turnstile.ts +0 -50
  77. package/src/composables/userInfo.ts +0 -16
  78. package/src/config/default.ts +0 -93
  79. package/src/config/highlighter.ts +0 -74
  80. package/src/config/i18n/en.ts +0 -53
  81. package/src/config/i18n/generate.ts +0 -58
  82. package/src/config/i18n/index.ts +0 -30
  83. package/src/config/i18n/jp.ts +0 -53
  84. package/src/config/i18n/pt-BR.ts +0 -53
  85. package/src/config/i18n/ru.ts +0 -53
  86. package/src/config/i18n/vi-VN.ts +0 -53
  87. package/src/config/i18n/zh-CN.ts +0 -53
  88. package/src/config/i18n/zh-TW.ts +0 -53
  89. package/src/config/index.ts +0 -3
  90. package/src/entries/api.ts +0 -1
  91. package/src/entries/comment.ts +0 -2
  92. package/src/entries/components.ts +0 -2
  93. package/src/entries/full.ts +0 -7
  94. package/src/entries/init.ts +0 -4
  95. package/src/entries/legacy.ts +0 -31
  96. package/src/entries/pageview.ts +0 -2
  97. package/src/init.ts +0 -112
  98. package/src/pageview.ts +0 -116
  99. package/src/shims-vue.d.ts +0 -6
  100. package/src/styles/base.scss +0 -67
  101. package/src/styles/card.scss +0 -258
  102. package/src/styles/config.scss +0 -52
  103. package/src/styles/emoji.scss +0 -137
  104. package/src/styles/gif.scss +0 -73
  105. package/src/styles/helpers/_svg.scss +0 -51
  106. package/src/styles/highlight.scss +0 -138
  107. package/src/styles/index.scss +0 -12
  108. package/src/styles/layout.scss +0 -105
  109. package/src/styles/meta.scss +0 -82
  110. package/src/styles/normalize.scss +0 -117
  111. package/src/styles/panel.scss +0 -286
  112. package/src/styles/reaction.scss +0 -103
  113. package/src/styles/recent.scss +0 -3
  114. package/src/styles/user-list.scss +0 -159
  115. package/src/typings/base.ts +0 -123
  116. package/src/typings/comment.ts +0 -94
  117. package/src/typings/index.ts +0 -5
  118. package/src/typings/locale.ts +0 -73
  119. package/src/typings/options.ts +0 -44
  120. package/src/typings/waline.ts +0 -251
  121. package/src/utils/config.ts +0 -122
  122. package/src/utils/darkmode.ts +0 -11
  123. package/src/utils/date.ts +0 -71
  124. package/src/utils/email.ts +0 -8
  125. package/src/utils/emoji.ts +0 -73
  126. package/src/utils/error.ts +0 -3
  127. package/src/utils/getRoot.ts +0 -8
  128. package/src/utils/image.ts +0 -10
  129. package/src/utils/index.ts +0 -13
  130. package/src/utils/markdown.ts +0 -41
  131. package/src/utils/markedMathExtension.ts +0 -54
  132. package/src/utils/path.ts +0 -15
  133. package/src/utils/query.ts +0 -2
  134. package/src/utils/userAgent.ts +0 -31
  135. package/src/utils/wordCount.ts +0 -31
  136. package/src/version.ts +0 -3
  137. package/src/widgets/index.ts +0 -2
  138. package/src/widgets/recentComments.ts +0 -93
  139. package/src/widgets/userList.ts +0 -136
@@ -1,286 +0,0 @@
1
- .wl-comment {
2
- position: relative;
3
- display: flex;
4
- margin-bottom: 0.75em;
5
- }
6
-
7
- .wl-close {
8
- position: absolute;
9
- top: -4px;
10
- inset-inline-end: -4px;
11
-
12
- padding: 0;
13
- border: none;
14
-
15
- background: transparent;
16
-
17
- line-height: 1;
18
-
19
- cursor: pointer;
20
- }
21
-
22
- .wl-login-info {
23
- max-width: 80px;
24
- margin-top: 0.75em;
25
- text-align: center;
26
- }
27
-
28
- .wl-logout-btn {
29
- position: absolute;
30
- top: -10px;
31
- inset-inline-end: -10px;
32
-
33
- padding: 3px;
34
- border: none;
35
-
36
- background: transparent;
37
-
38
- line-height: 0;
39
-
40
- cursor: pointer;
41
- }
42
-
43
- .wl-avatar {
44
- position: relative;
45
-
46
- width: var(--waline-avatar-size);
47
- height: var(--waline-avatar-size);
48
- margin: 0 auto;
49
- border: var(--waline-border);
50
- border-radius: var(--waline-avatar-radius);
51
-
52
- @media (max-width: 720px) {
53
- width: var(--waline-m-avatar-size);
54
- height: var(--waline-m-avatar-size);
55
- }
56
-
57
- img {
58
- width: 100%;
59
- height: 100%;
60
- border-radius: var(--waline-avatar-radius);
61
- }
62
- }
63
-
64
- .wl-login-nick {
65
- display: block;
66
- color: var(--waline-theme-color);
67
- font-size: 0.75em;
68
- word-break: break-all;
69
- }
70
-
71
- .wl-panel {
72
- position: relative;
73
-
74
- flex-shrink: 1;
75
-
76
- width: 100%;
77
- margin: 0.5em;
78
- border: var(--waline-border);
79
- border-radius: 0.75em;
80
-
81
- background: var(--waline-bgcolor);
82
- box-shadow: var(--waline-box-shadow);
83
- }
84
-
85
- .wl-header {
86
- display: flex;
87
-
88
- overflow: hidden;
89
-
90
- padding: 0 4px;
91
- border-bottom: 2px dashed var(--waline-border-color);
92
- border-top-left-radius: 0.75em;
93
- border-top-right-radius: 0.75em;
94
-
95
- @media (max-width: 580px) {
96
- display: block;
97
- }
98
-
99
- label {
100
- min-width: 40px;
101
- padding: 0.75em 0.5em;
102
-
103
- color: var(--waline-color);
104
-
105
- font-size: 0.75em;
106
- text-align: center;
107
- }
108
-
109
- input {
110
- flex: 1;
111
-
112
- width: 0;
113
- padding: 0.5em;
114
-
115
- background: transparent;
116
-
117
- font-size: 0.625em;
118
-
119
- resize: none;
120
- }
121
- }
122
-
123
- .wl-header-item {
124
- display: flex;
125
- flex: 1;
126
-
127
- &:not(:last-child) {
128
- @media (max-width: 580px) {
129
- border-bottom: 2px dashed var(--waline-border-color);
130
- }
131
- }
132
-
133
- .wl-header-1 & {
134
- width: 100%;
135
- }
136
-
137
- .wl-header-2 & {
138
- width: 50%;
139
-
140
- @media (max-width: 580px) {
141
- flex: 0;
142
- width: 100%;
143
- }
144
- }
145
-
146
- .wl-header-3 & {
147
- width: 33.33%;
148
-
149
- @media (max-width: 580px) {
150
- width: 100%;
151
- }
152
- }
153
- }
154
-
155
- .wl-editor {
156
- position: relative;
157
-
158
- width: calc(100% - 1em);
159
- min-height: 8.75em;
160
- margin: 0.75em 0.5em;
161
- border-radius: 0.5em;
162
-
163
- background: transparent;
164
-
165
- font-size: 0.875em;
166
-
167
- resize: vertical;
168
- }
169
-
170
- .wl-editor,
171
- .wl-input {
172
- max-width: 100%;
173
- border: none;
174
-
175
- color: var(--waline-color);
176
- outline: none;
177
-
178
- transition: all 0.25s ease;
179
-
180
- &:focus {
181
- background: var(--waline-bgcolor-light);
182
- }
183
- }
184
-
185
- .wl-preview {
186
- padding: 0 0.5em 0.5em;
187
-
188
- h4 {
189
- margin: 0.25em;
190
- font-weight: bold;
191
- font-size: 0.9375em;
192
- }
193
-
194
- .wl-content {
195
- min-height: 1.25em;
196
- padding: 0.25em;
197
- word-break: break-word;
198
- hyphens: auto;
199
-
200
- > *:first-child {
201
- margin-top: 0;
202
- }
203
-
204
- > *:last-child {
205
- margin-bottom: 0;
206
- }
207
- }
208
- }
209
-
210
- .wl-footer {
211
- position: relative;
212
- display: flex;
213
- flex-wrap: wrap;
214
- margin: 0.5em 0.75em;
215
- }
216
-
217
- .wl-actions {
218
- display: flex;
219
- flex: 2;
220
- align-items: center;
221
- }
222
-
223
- .wl-action {
224
- display: inline-flex;
225
- align-items: center;
226
- justify-content: center;
227
-
228
- width: 1.5em;
229
- height: 1.5em;
230
- margin: 2px;
231
- padding: 0;
232
- border: none;
233
-
234
- background: transparent;
235
- color: var(--waline-color);
236
-
237
- font-size: 16px;
238
-
239
- cursor: pointer;
240
-
241
- &:hover {
242
- color: var(--waline-theme-color);
243
- }
244
-
245
- &.active {
246
- color: var(--waline-active-color);
247
- }
248
- }
249
-
250
- #wl-image-upload {
251
- display: none;
252
-
253
- &:focus + label {
254
- color: var(--waline-color);
255
- }
256
-
257
- &:focus-visible + label {
258
- outline: -webkit-focus-ring-color auto 1px;
259
- }
260
- }
261
-
262
- .wl-info {
263
- display: flex;
264
- flex: 3;
265
- align-items: center;
266
- justify-content: flex-end;
267
-
268
- .wl-text-number {
269
- color: var(--waline-info-color);
270
- font-size: 0.75em;
271
-
272
- .illegal {
273
- color: #f00;
274
- }
275
- }
276
-
277
- button {
278
- margin-inline-start: 0.75em;
279
-
280
- svg {
281
- display: block;
282
- margin: 0 auto;
283
- line-height: 18px;
284
- }
285
- }
286
- }
@@ -1,103 +0,0 @@
1
- .wl-reaction {
2
- overflow: auto hidden;
3
- margin-bottom: 1.75em;
4
- text-align: center;
5
-
6
- img {
7
- width: 100%;
8
- height: 100%;
9
- transition: all 250ms ease-in-out;
10
- }
11
- }
12
-
13
- .wl-reaction-title {
14
- margin: 16px auto;
15
- font-weight: bold;
16
- font-size: 18px;
17
- }
18
-
19
- .wl-reaction-list {
20
- display: flex;
21
- flex-direction: row;
22
- gap: 16px;
23
- justify-content: center;
24
-
25
- margin: 0;
26
- padding: 8px;
27
-
28
- list-style-type: none;
29
-
30
- @media (max-width: 580px) {
31
- gap: 12px;
32
- }
33
-
34
- // normalize reset
35
- [data-waline] & {
36
- margin-inline-start: 0;
37
- }
38
- }
39
-
40
- .wl-reaction-item {
41
- display: flex;
42
- flex-direction: column;
43
- align-items: center;
44
- cursor: pointer;
45
-
46
- &:hover img,
47
- &.active img {
48
- transform: scale(1.15);
49
- }
50
- }
51
-
52
- .wl-reaction-img {
53
- position: relative;
54
- width: 42px;
55
- height: 42px;
56
-
57
- @media (max-width: 580px) {
58
- width: 32px;
59
- height: 32px;
60
- }
61
- }
62
-
63
- .wl-reaction-loading {
64
- position: absolute;
65
- top: -4px;
66
- inset-inline-end: -5px;
67
-
68
- width: 18px;
69
- height: 18px;
70
-
71
- color: var(--waline-theme-color);
72
- }
73
-
74
- .wl-reaction-votes {
75
- position: absolute;
76
- top: -9px;
77
- inset-inline-end: -9px;
78
-
79
- min-width: 1em;
80
- padding: 2px;
81
- border: 1px solid var(--waline-theme-color);
82
- border-radius: 1em;
83
-
84
- background: var(--waline-bgcolor);
85
- color: var(--waline-theme-color);
86
-
87
- font-weight: 700;
88
- font-size: 0.75em;
89
- line-height: 1;
90
-
91
- .wl-reaction-item.active & {
92
- background: var(--waline-theme-color);
93
- color: var(--waline-bgcolor);
94
- }
95
- }
96
-
97
- .wl-reaction-text {
98
- font-size: 0.875em;
99
-
100
- .wl-reaction-item.active & {
101
- color: var(--waline-theme-color);
102
- }
103
- }
@@ -1,3 +0,0 @@
1
- .wl-recent-item p {
2
- display: inline;
3
- }
@@ -1,159 +0,0 @@
1
- .wl-user-list {
2
- padding: 0;
3
- list-style: none;
4
-
5
- a,
6
- a:hover,
7
- a:visited {
8
- color: var(--waline-color);
9
- text-decoration: none;
10
- }
11
-
12
- .wl-user-avatar {
13
- position: relative;
14
-
15
- display: inline-block;
16
-
17
- overflow: hidden;
18
-
19
- margin-inline-end: 10px;
20
- border-radius: 4px;
21
-
22
- line-height: 0;
23
-
24
- > img {
25
- width: var(--waline-user-avatar-size, 48px);
26
- height: var(--waline-user-avatar-size, 48px);
27
- }
28
- }
29
-
30
- .wl-user-badge {
31
- position: absolute;
32
- bottom: 0;
33
- inset-inline-end: 0;
34
-
35
- min-width: 0.7em;
36
- height: 1.5em;
37
- padding: 0 0.4em;
38
- border-radius: 4px;
39
-
40
- background: var(--waline-info-bgcolor);
41
- color: var(--waline-info-color);
42
-
43
- font-weight: bold;
44
- font-size: 10px;
45
- line-height: 1.5em;
46
- text-align: center;
47
- }
48
-
49
- .wl-user-item {
50
- margin: 10px 0;
51
-
52
- &:nth-child(1) .wl-user-badge {
53
- background: var(--waline-rank-gold-bgcolor, #fa3939);
54
- color: var(--waline-white);
55
- font-weight: bold;
56
- }
57
-
58
- &:nth-child(2) .wl-user-badge {
59
- background: var(--waline-rank-silver-bgcolor, #fb811c);
60
- color: var(--waline-white);
61
- font-weight: bold;
62
- }
63
-
64
- &:nth-child(3) .wl-user-badge {
65
- background: var(--waline-rank-copper-bgcolor, #feb207);
66
- color: var(--waline-white);
67
- }
68
- }
69
-
70
- .wl-user-meta {
71
- display: inline-block;
72
- vertical-align: top;
73
- }
74
-
75
- .wl-badge {
76
- display: inline-block;
77
- vertical-align: text-top;
78
-
79
- margin-inline-start: 0.5em;
80
- padding: 0 0.3em;
81
- border: 1px solid var(--waline-badge-color);
82
- border-radius: 4px;
83
-
84
- color: var(--waline-badge-color);
85
-
86
- font-size: var(--waline-badge-font-size);
87
- }
88
- }
89
-
90
- .wl-user-wall {
91
- padding: 0;
92
- list-style: none;
93
-
94
- // stylelint-disable-next-line no-descending-specificity
95
- .wl-user-badge,
96
- .wl-user-meta {
97
- display: none;
98
- }
99
-
100
- .wl-user-item {
101
- position: relative;
102
- display: inline-block;
103
- transition: transform ease-in-out 0.2s;
104
-
105
- &::before,
106
- &::after {
107
- position: absolute;
108
- bottom: 100%;
109
- left: 50%;
110
- z-index: 10;
111
-
112
- opacity: 0;
113
- pointer-events: none;
114
-
115
- transition: all 0.18s ease-out 0.18s;
116
- transform: translate(-50%, 4px);
117
- transform-origin: top;
118
- }
119
-
120
- &::before {
121
- content: '';
122
-
123
- width: 0;
124
- height: 0;
125
- border: 5px solid transparent;
126
- border-top-color: rgb(16 16 16 / 95%);
127
- }
128
-
129
- &::after {
130
- content: attr(aria-label);
131
-
132
- margin-bottom: 10px;
133
- padding: 0.5em 1em;
134
- border-radius: 2px;
135
-
136
- background: rgb(16 16 16 / 95%);
137
- color: #fff;
138
-
139
- font-size: 12px;
140
- white-space: nowrap;
141
- }
142
-
143
- &:hover {
144
- transform: scale(1.1);
145
-
146
- &::before,
147
- &::after {
148
- opacity: 1;
149
- pointer-events: none;
150
- transform: translate(-50%, 0);
151
- }
152
- }
153
-
154
- img {
155
- width: var(--waline-user-avatar-size, 48px);
156
- height: var(--waline-user-avatar-size, 48px);
157
- }
158
- }
159
- }
@@ -1,123 +0,0 @@
1
- export type WalineCommentSorting = 'latest' | 'oldest' | 'hottest';
2
-
3
- export type WalineEmojiPresets =
4
- | `//${string}`
5
- | `http://${string}`
6
- | `https://${string}`;
7
-
8
- export interface WalineEmojiInfo {
9
- /**
10
- * 选项卡上的 Emoji 名称
11
- *
12
- * Emoji name show on tab
13
- */
14
- name: string;
15
- /**
16
- * 所在文件夹链接
17
- *
18
- * Current folder link
19
- */
20
- folder?: string;
21
- /**
22
- * Emoji 通用路径前缀
23
- *
24
- * Common prefix of Emoji icons
25
- */
26
- prefix?: string;
27
- /**
28
- * Emoji 图片的类型,会作为文件扩展名使用
29
- *
30
- * Type of Emoji icons, will be regarded as file extension
31
- */
32
- type?: string;
33
- /**
34
- * 选项卡显示的 Emoji 图标
35
- *
36
- * Emoji icon show on tab
37
- */
38
- icon: string;
39
- /**
40
- * Emoji 图片列表
41
- *
42
- * Emoji image list
43
- */
44
- items: string[];
45
- }
46
-
47
- export type WalineEmojiMaps = Record<string, string>;
48
-
49
- export type WalineLoginStatus = 'enable' | 'disable' | 'force';
50
-
51
- export interface WalineSearchImageData extends Record<string, unknown> {
52
- /**
53
- * 图片链接
54
- *
55
- * Image link
56
- */
57
- src: string;
58
-
59
- /**
60
- * 图片标题
61
- *
62
- * @description 用于图片的 alt 属性
63
- *
64
- * Image title
65
- *
66
- * @description Used for alt attribute of image
67
- */
68
- title?: string;
69
-
70
- /**
71
- * 图片缩略图
72
- *
73
- * @description 为了更好的加载性能,我们会优先在列表中使用此缩略图
74
- *
75
- * Image preview link
76
- *
77
- * @description For better loading performance, we will use this thumbnail first in the list
78
- *
79
- * @default src
80
- */
81
- preview?: string;
82
- }
83
-
84
- export type WalineSearchResult = WalineSearchImageData[];
85
-
86
- export interface WalineSearchOptions {
87
- /**
88
- * 搜索操作
89
- *
90
- * Search action
91
- */
92
- search: (word: string) => Promise<WalineSearchResult>;
93
-
94
- /**
95
- * 打开列表时展示的默认结果
96
- *
97
- * Default result when opening list
98
- *
99
- * @default () => search('')
100
- */
101
- default?: () => Promise<WalineSearchResult>;
102
-
103
- /**
104
- * 获取更多的操作
105
- *
106
- * @description 会在列表滚动到底部时触发,如果你的搜索服务支持分页功能,你应该设置此项实现无限滚动
107
- *
108
- * Fetch more action
109
- *
110
- * @description It will be triggered when the list scrolls to the bottom. If your search service supports paging, you should set this to achieve infinite scrolling
111
- *
112
- * @default (word) => search(word)
113
- */
114
- more?: (word: string, currentCount: number) => Promise<WalineSearchResult>;
115
- }
116
-
117
- export type WalineMeta = 'nick' | 'mail' | 'link';
118
-
119
- export type WalineImageUploader = (image: File) => Promise<string>;
120
-
121
- export type WalineHighlighter = (code: string, lang: string) => string;
122
-
123
- export type WalineTeXRenderer = (blockMode: boolean, tex: string) => string;