@waline/client 2.14.4 → 2.14.6

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 (47) hide show
  1. package/dist/api.cjs.map +1 -1
  2. package/dist/api.mjs.map +1 -1
  3. package/dist/comment.cjs +1 -1
  4. package/dist/comment.cjs.map +1 -1
  5. package/dist/comment.js +1 -1
  6. package/dist/comment.js.map +1 -1
  7. package/dist/comment.mjs +1 -1
  8. package/dist/comment.mjs.map +1 -1
  9. package/dist/component.mjs +1 -1
  10. package/dist/component.mjs.map +1 -1
  11. package/dist/legacy.umd.js +1 -1
  12. package/dist/legacy.umd.js.map +1 -1
  13. package/dist/pageview.cjs +1 -1
  14. package/dist/pageview.cjs.map +1 -1
  15. package/dist/pageview.js +1 -1
  16. package/dist/pageview.js.map +1 -1
  17. package/dist/pageview.mjs +1 -1
  18. package/dist/pageview.mjs.map +1 -1
  19. package/dist/shim.cjs +1 -1
  20. package/dist/shim.cjs.map +1 -1
  21. package/dist/shim.mjs +1 -1
  22. package/dist/shim.mjs.map +1 -1
  23. package/dist/waline-meta.css +1 -1
  24. package/dist/waline-meta.css.map +1 -1
  25. package/dist/waline.cjs +1 -1
  26. package/dist/waline.cjs.map +1 -1
  27. package/dist/waline.css +1 -1
  28. package/dist/waline.css.map +1 -1
  29. package/dist/waline.js +1 -1
  30. package/dist/waline.js.map +1 -1
  31. package/dist/waline.mjs +1 -1
  32. package/dist/waline.mjs.map +1 -1
  33. package/package.json +8 -8
  34. package/src/components/ArticleReaction.vue +14 -7
  35. package/src/components/CommentBox.vue +16 -6
  36. package/src/components/CommentCard.vue +1 -1
  37. package/src/components/WalineComment.vue +5 -1
  38. package/src/styles/card.scss +32 -29
  39. package/src/styles/emoji.scss +1 -1
  40. package/src/styles/gif.scss +1 -1
  41. package/src/styles/highlight.scss +3 -0
  42. package/src/styles/layout.scss +15 -15
  43. package/src/styles/meta.scss +1 -1
  44. package/src/styles/normalize.scss +7 -3
  45. package/src/styles/panel.scss +18 -18
  46. package/src/styles/reaction.scss +72 -69
  47. package/src/styles/user-list.scss +30 -29
@@ -1,25 +1,9 @@
1
1
  .wl-cards {
2
- .wl-item {
3
- position: relative;
4
- display: flex;
5
- padding: 0.5em;
6
-
7
- &:last-child .wl-card {
8
- border-bottom: none;
9
- }
10
- }
11
-
12
- .wl-card {
13
- .wl-item {
14
- padding-right: 0;
15
- }
16
- }
17
-
18
2
  .wl-user {
19
3
  --avatar-size: var(--waline-avatar-size);
20
4
 
21
5
  position: relative;
22
- margin-right: 0.75em;
6
+ margin-inline-end: 0.75em;
23
7
 
24
8
  @media (max-width: 720px) {
25
9
  --avatar-size: var(--waline-m-avatar-size);
@@ -35,7 +19,7 @@
35
19
  .verified-icon {
36
20
  position: absolute;
37
21
  top: calc(var(--avatar-size) * 3 / 4);
38
- left: calc(var(--avatar-size) * 3 / 4);
22
+ inset-inline-start: calc(var(--avatar-size) * 3 / 4);
39
23
 
40
24
  border-radius: 50%;
41
25
 
@@ -45,6 +29,16 @@
45
29
  }
46
30
  }
47
31
 
32
+ .wl-card-item {
33
+ position: relative;
34
+ display: flex;
35
+ padding: 0.5em;
36
+
37
+ .wl-card-item {
38
+ padding-inline-end: 0;
39
+ }
40
+ }
41
+
48
42
  .wl-card {
49
43
  flex: 1;
50
44
  width: 0;
@@ -52,11 +46,16 @@
52
46
  border-bottom: 1px dashed var(--waline-border-color);
53
47
 
54
48
  &:first-child {
55
- margin-left: 1em;
49
+ margin-inline-start: 1em;
50
+ }
51
+
52
+ .wl-card-item:last-child & {
53
+ border-bottom: none;
56
54
  }
57
55
 
58
56
  .wl-head {
59
- overflow: hidden; // bfc to fix https://github.com/walinejs/waline/issues/1415
57
+ // bfc to fix https://github.com/walinejs/waline/issues/1415
58
+ overflow: hidden;
60
59
  line-height: 1.5;
61
60
  }
62
61
 
@@ -65,7 +64,7 @@
65
64
 
66
65
  display: inline-block;
67
66
 
68
- margin-right: 0.5em;
67
+ margin-inline-end: 0.5em;
69
68
 
70
69
  font-weight: bold;
71
70
  font-size: 0.875em;
@@ -86,7 +85,7 @@
86
85
  .wl-badge {
87
86
  display: inline-block;
88
87
 
89
- margin-right: 1em;
88
+ margin-inline-end: 1em;
90
89
  padding: 0 0.3em;
91
90
  border: 1px solid var(--waline-badge-color);
92
91
  border-radius: 4px;
@@ -97,7 +96,7 @@
97
96
  }
98
97
 
99
98
  .wl-time {
100
- margin-right: 0.875em;
99
+ margin-inline-end: 0.875em;
101
100
  color: var(--waline-info-color);
102
101
  font-size: 0.75em;
103
102
  }
@@ -109,7 +108,7 @@
109
108
  > span {
110
109
  display: inline-block;
111
110
 
112
- margin-right: 0.25em;
111
+ margin-inline-end: 0.25em;
113
112
  padding: 2px 4px;
114
113
  border-radius: 0.2em;
115
114
 
@@ -128,6 +127,10 @@
128
127
  .wl-comment-actions {
129
128
  float: right;
130
129
  line-height: 1;
130
+
131
+ [dir='rtl'] & {
132
+ float: left;
133
+ }
131
134
  }
132
135
 
133
136
  .wl-delete,
@@ -179,7 +182,7 @@
179
182
  position: absolute;
180
183
  top: 0;
181
184
  bottom: 3.15em;
182
- left: 0;
185
+ inset-inline-start: 0;
183
186
  z-index: 999;
184
187
 
185
188
  display: block;
@@ -194,7 +197,7 @@
194
197
 
195
198
  position: absolute;
196
199
  bottom: 0;
197
- left: 0;
200
+ inset-inline-start: 0;
198
201
  z-index: 999;
199
202
 
200
203
  display: block;
@@ -232,19 +235,19 @@
232
235
  border-radius: 0;
233
236
 
234
237
  &:first-child {
235
- border-right: 0;
238
+ border-inline-end: 0;
236
239
  border-radius: 0.5em 0 0 0.5em;
237
240
  }
238
241
 
239
242
  &:last-child {
240
- border-left: 0;
243
+ border-inline-start: 0;
241
244
  border-radius: 0 0.5em 0.5em 0;
242
245
  }
243
246
  }
244
247
  }
245
248
 
246
249
  .wl-quote {
247
- border-left: 1px dashed rgb(237 237 237 / 50%);
250
+ border-inline-start: 1px dashed rgb(237 237 237 / 50%);
248
251
 
249
252
  .wl-user {
250
253
  --avatar-size: var(--waline-m-avatar-size);
@@ -1,7 +1,7 @@
1
1
  .wl-emoji-popup {
2
2
  position: absolute;
3
3
  top: 100%;
4
- left: 1.25em;
4
+ inset-inline-start: 1.25em;
5
5
  z-index: 10;
6
6
 
7
7
  max-width: 526px;
@@ -1,7 +1,7 @@
1
1
  .wl-gif-popup {
2
2
  position: absolute;
3
3
  top: 100%;
4
- left: 1.25em;
4
+ inset-inline-start: 1.25em;
5
5
  z-index: 10;
6
6
 
7
7
  width: calc(100% - 3em);
@@ -15,8 +15,11 @@
15
15
  code {
16
16
  padding: 0;
17
17
  border-radius: 0;
18
+
18
19
  background: transparent !important;
19
20
  color: #bbb;
21
+
22
+ direction: ltr;
20
23
  }
21
24
  }
22
25
 
@@ -20,7 +20,7 @@
20
20
  span.wl-tex {
21
21
  display: inline-block;
22
22
 
23
- margin-right: 0.25em;
23
+ margin-inline-end: 0.25em;
24
24
  padding: 2px 4px;
25
25
  border-radius: 0.2em;
26
26
 
@@ -74,7 +74,7 @@
74
74
  padding: 0.5em 0;
75
75
  color: var(--waline-light-grey);
76
76
  font-size: var(--waline-info-font-size);
77
- text-align: right;
77
+ text-align: end;
78
78
  }
79
79
 
80
80
  .wl-meta-head {
@@ -84,22 +84,22 @@
84
84
  padding: 0.375em;
85
85
  }
86
86
 
87
- ul.wl-sort {
87
+ .wl-sort {
88
88
  margin: 0;
89
89
  list-style-type: none;
90
- }
91
90
 
92
- .wl-sort li {
93
- display: inline-block;
94
- color: var(--waline-info-color);
95
- font-size: 0.75em;
96
- cursor: pointer;
97
- }
91
+ li {
92
+ display: inline-block;
93
+ color: var(--waline-info-color);
94
+ font-size: 0.75em;
95
+ cursor: pointer;
98
96
 
99
- .wl-sort li + li {
100
- margin-left: 1em;
101
- }
97
+ &.active {
98
+ color: var(--waline-theme-color);
99
+ }
102
100
 
103
- .wl-sort li.active {
104
- color: var(--waline-theme-color);
101
+ + li {
102
+ margin-inline-start: 1em;
103
+ }
104
+ }
105
105
  }
@@ -21,7 +21,7 @@ $safari-icon: '<svg viewBox="0 0 512 512" fill="#999"><path d="m274.69 274.69-37
21
21
 
22
22
  width: 1em;
23
23
  height: 1em;
24
- margin-right: 2px;
24
+ margin-inline-end: 2px;
25
25
 
26
26
  background-position: center center;
27
27
  background-repeat: no-repeat;
@@ -1,6 +1,10 @@
1
1
  [data-waline] {
2
2
  font-size: var(--waline-font-size);
3
- text-align: left;
3
+ text-align: start;
4
+
5
+ [dir='rtl'] & {
6
+ direction: rtl;
7
+ }
4
8
 
5
9
  * {
6
10
  box-sizing: content-box;
@@ -88,7 +92,7 @@
88
92
  blockquote {
89
93
  margin: 0.5em 0;
90
94
  padding: 0.5em 0 0.5em 1em;
91
- border-left: 8px solid var(--waline-bq-color);
95
+ border-inline-start: 8px solid var(--waline-bq-color);
92
96
  color: var(--waline-dark-grey);
93
97
 
94
98
  > p {
@@ -98,7 +102,7 @@
98
102
 
99
103
  ol,
100
104
  ul {
101
- margin-left: 1.25em;
105
+ margin-inline-start: 1.25em;
102
106
  padding: 0;
103
107
  }
104
108
 
@@ -7,7 +7,7 @@
7
7
  .wl-close {
8
8
  position: absolute;
9
9
  top: -4px;
10
- right: -4px;
10
+ inset-inline-end: -4px;
11
11
 
12
12
  padding: 0;
13
13
  border: none;
@@ -28,7 +28,7 @@
28
28
  .wl-logout-btn {
29
29
  position: absolute;
30
30
  top: -10px;
31
- right: -10px;
31
+ inset-inline-end: -10px;
32
32
 
33
33
  padding: 3px;
34
34
  border: none;
@@ -152,21 +152,6 @@
152
152
  }
153
153
  }
154
154
 
155
- .wl-editor,
156
- .wl-input {
157
- max-width: 100%;
158
- border: none;
159
-
160
- color: var(--waline-color);
161
- outline: none;
162
-
163
- transition: all 0.25s ease;
164
-
165
- &:focus {
166
- background: var(--waline-bgcolor-light);
167
- }
168
- }
169
-
170
155
  .wl-editor {
171
156
  position: relative;
172
157
 
@@ -182,6 +167,21 @@
182
167
  resize: vertical;
183
168
  }
184
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
185
  .wl-preview {
186
186
  padding: 0 0.5em 0.5em;
187
187
 
@@ -275,7 +275,7 @@
275
275
  }
276
276
 
277
277
  button {
278
- margin-left: 0.75em;
278
+ margin-inline-start: 0.75em;
279
279
 
280
280
  svg {
281
281
  display: block;
@@ -1,100 +1,103 @@
1
1
  .wl-reaction {
2
+ overflow: auto hidden;
2
3
  margin-bottom: 1.75em;
3
4
  text-align: center;
4
- overflow-x: auto;
5
5
 
6
6
  img {
7
7
  width: 100%;
8
8
  height: 100%;
9
9
  transition: all 250ms ease-in-out;
10
10
  }
11
+ }
11
12
 
12
- .reaction-title {
13
- margin: 16px auto;
14
- font-size: 18px;
15
- font-weight: bold;
16
- }
13
+ .wl-reaction-title {
14
+ margin: 16px auto;
15
+ font-weight: bold;
16
+ font-size: 18px;
17
+ }
17
18
 
18
- .reaction-list {
19
- padding: 8px;
20
- display: flex;
21
- flex-direction: row;
22
- gap: 16px;
23
- justify-content: center;
19
+ .wl-reaction-list {
20
+ display: flex;
21
+ flex-direction: row;
22
+ gap: 16px;
23
+ justify-content: center;
24
24
 
25
- margin: 0;
25
+ margin: 0;
26
+ padding: 8px;
26
27
 
27
- list-style-type: none;
28
+ list-style-type: none;
28
29
 
29
- @media (max-width: 580px) {
30
- gap: 12px;
31
- }
30
+ @media (max-width: 580px) {
31
+ gap: 12px;
32
32
  }
33
33
 
34
- .reaction-item {
35
- display: flex;
36
- flex-direction: column;
37
- align-items: center;
38
- cursor: pointer;
39
-
40
- &:hover img,
41
- &.active img {
42
- transform: scale(1.15);
43
- }
44
-
45
- &.active {
46
- .reaction-votes {
47
- background: var(--waline-theme-color);
48
- color: var(--waline-bgcolor);
49
- }
50
-
51
- .reaction-text {
52
- color: var(--waline-theme-color);
53
- }
54
- }
34
+ // normalize reset
35
+ [data-waline] & {
36
+ margin-inline-start: 0;
55
37
  }
38
+ }
56
39
 
57
- .reaction-img {
58
- position: relative;
59
- width: 42px;
60
- height: 42px;
40
+ .wl-reaction-item {
41
+ display: flex;
42
+ flex-direction: column;
43
+ align-items: center;
44
+ cursor: pointer;
61
45
 
62
- @media (max-width: 580px) {
63
- width: 32px;
64
- height: 32px;
65
- }
46
+ &:hover img,
47
+ &.active img {
48
+ transform: scale(1.15);
66
49
  }
50
+ }
67
51
 
68
- .reaction-loading {
69
- position: absolute;
70
- top: -4px;
71
- right: -5px;
72
-
73
- width: 18px;
74
- height: 18px;
52
+ .wl-reaction-img {
53
+ position: relative;
54
+ width: 42px;
55
+ height: 42px;
75
56
 
76
- color: var(--waline-theme-color);
57
+ @media (max-width: 580px) {
58
+ width: 32px;
59
+ height: 32px;
77
60
  }
61
+ }
78
62
 
79
- .reaction-votes {
80
- position: absolute;
81
- top: -9px;
82
- right: -9px;
63
+ .wl-reaction-loading {
64
+ position: absolute;
65
+ top: -4px;
66
+ inset-inline-end: -5px;
83
67
 
84
- min-width: 1em;
85
- padding: 2px;
86
- border: 1px solid var(--waline-theme-color);
87
- border-radius: 1em;
68
+ width: 18px;
69
+ height: 18px;
88
70
 
89
- background: var(--waline-bgcolor);
90
- color: var(--waline-theme-color);
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);
91
86
 
92
- font-weight: 700;
93
- font-size: 0.75em;
94
- line-height: 1;
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);
95
94
  }
95
+ }
96
96
 
97
- .reaction-text {
98
- font-size: 0.875em;
97
+ .wl-reaction-text {
98
+ font-size: 0.875em;
99
+
100
+ .wl-reaction-item.active & {
101
+ color: var(--waline-theme-color);
99
102
  }
100
103
  }
@@ -2,27 +2,6 @@
2
2
  padding: 0;
3
3
  list-style: none;
4
4
 
5
- .wl-user-item {
6
- margin: 10px 0;
7
-
8
- &:nth-child(1) .wl-user-badge {
9
- background: var(--waline-rank-gold-bgcolor, #fa3939);
10
- color: var(--waline-white);
11
- font-weight: bold;
12
- }
13
-
14
- &:nth-child(2) .wl-user-badge {
15
- background: var(--waline-rank-silver-bgcolor, #fb811c);
16
- color: var(--waline-white);
17
- font-weight: bold;
18
- }
19
-
20
- &:nth-child(3) .wl-user-badge {
21
- background: var(--waline-rank-copper-bgcolor, #feb207);
22
- color: var(--waline-white);
23
- }
24
- }
25
-
26
5
  a,
27
6
  a:hover,
28
7
  a:visited {
@@ -37,7 +16,7 @@
37
16
 
38
17
  overflow: hidden;
39
18
 
40
- margin-right: 10px;
19
+ margin-inline-end: 10px;
41
20
  border-radius: 4px;
42
21
 
43
22
  line-height: 0;
@@ -50,8 +29,8 @@
50
29
 
51
30
  .wl-user-badge {
52
31
  position: absolute;
53
- right: 0;
54
32
  bottom: 0;
33
+ inset-inline-end: 0;
55
34
 
56
35
  min-width: 0.7em;
57
36
  height: 1.5em;
@@ -67,6 +46,27 @@
67
46
  text-align: center;
68
47
  }
69
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
70
  .wl-user-meta {
71
71
  display: inline-block;
72
72
  vertical-align: top;
@@ -76,7 +76,7 @@
76
76
  display: inline-block;
77
77
  vertical-align: text-top;
78
78
 
79
- margin-left: 0.5em;
79
+ margin-inline-start: 0.5em;
80
80
  padding: 0 0.3em;
81
81
  border: 1px solid var(--waline-badge-color);
82
82
  border-radius: 4px;
@@ -91,6 +91,12 @@
91
91
  padding: 0;
92
92
  list-style: none;
93
93
 
94
+ // stylelint-disable-next-line no-descending-specificity
95
+ .wl-user-badge,
96
+ .wl-user-meta {
97
+ display: none;
98
+ }
99
+
94
100
  .wl-user-item {
95
101
  position: relative;
96
102
  display: inline-block;
@@ -150,9 +156,4 @@
150
156
  height: var(--waline-user-avatar-size, 48px);
151
157
  }
152
158
  }
153
-
154
- .wl-user-badge,
155
- .wl-user-meta {
156
- display: none;
157
- }
158
159
  }