artalk 2.7.1 → 2.7.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 (173) hide show
  1. package/README.md +1 -1
  2. package/dist/Artalk.css +1 -1
  3. package/dist/Artalk.es.js +155 -147
  4. package/dist/Artalk.es.js.map +1 -1
  5. package/dist/Artalk.iife.js +1 -1
  6. package/dist/Artalk.iife.js.map +1 -1
  7. package/dist/Artalk.js +1 -1
  8. package/dist/Artalk.js.map +1 -1
  9. package/dist/ArtalkLite.css +1 -1
  10. package/dist/ArtalkLite.es.js +155 -147
  11. package/dist/ArtalkLite.es.js.map +1 -1
  12. package/dist/ArtalkLite.iife.js +1 -1
  13. package/dist/ArtalkLite.iife.js.map +1 -1
  14. package/dist/ArtalkLite.js +1 -1
  15. package/dist/ArtalkLite.js.map +1 -1
  16. package/dist/i18n/jp.js +1 -1
  17. package/dist/i18n/zh-TW.js +1 -1
  18. package/dist/src/api/_base.d.ts +7 -0
  19. package/dist/src/api/_options.d.ts +5 -0
  20. package/dist/src/components/checker/index.d.ts +2 -0
  21. package/dist/src/i18n/en.d.ts +1 -0
  22. package/dist/src/i18n/external.d.ts +1 -0
  23. package/dist/src/i18n/index.d.ts +3 -0
  24. package/dist/src/i18n/jp.d.ts +1 -0
  25. package/dist/src/i18n/zh-TW.d.ts +1 -0
  26. package/dist/src/lib/user.d.ts +8 -6
  27. package/dist/src/plugins/editor/_kit.d.ts +7 -1
  28. package/dist/src/service.d.ts +2 -8
  29. package/dist/types/event.d.ts +1 -1
  30. package/package.json +43 -17
  31. package/dist/src/components/dark-mode.d.ts +0 -2
  32. package/src/api/_base.ts +0 -18
  33. package/src/api/_options.ts +0 -25
  34. package/src/api/_request.ts +0 -104
  35. package/src/api/admin.ts +0 -18
  36. package/src/api/captcha.ts +0 -24
  37. package/src/api/comment.ts +0 -84
  38. package/src/api/index.ts +0 -29
  39. package/src/api/page.ts +0 -83
  40. package/src/api/site.ts +0 -51
  41. package/src/api/system.ts +0 -49
  42. package/src/api/upload.ts +0 -28
  43. package/src/api/user.ts +0 -132
  44. package/src/artalk.ts +0 -115
  45. package/src/comment/actions.ts +0 -83
  46. package/src/comment/comment.html +0 -18
  47. package/src/comment/comment.ts +0 -192
  48. package/src/comment/height-limit.ts +0 -100
  49. package/src/comment/index.ts +0 -3
  50. package/src/comment/render.ts +0 -150
  51. package/src/comment/renders/actions.ts +0 -114
  52. package/src/comment/renders/avatar.ts +0 -22
  53. package/src/comment/renders/content.ts +0 -39
  54. package/src/comment/renders/header.ts +0 -84
  55. package/src/comment/renders/index.ts +0 -19
  56. package/src/comment/renders/pending.ts +0 -12
  57. package/src/comment/renders/reply-at.ts +0 -16
  58. package/src/comment/renders/reply-to.ts +0 -24
  59. package/src/components/action-btn.ts +0 -170
  60. package/src/components/checker/admin.ts +0 -37
  61. package/src/components/checker/captcha-renders.ts +0 -69
  62. package/src/components/checker/captcha.ts +0 -26
  63. package/src/components/checker/index.ts +0 -192
  64. package/src/components/dark-mode.ts +0 -30
  65. package/src/components/dialog.ts +0 -62
  66. package/src/components/error-dialog.ts +0 -35
  67. package/src/components/pagination.ts +0 -153
  68. package/src/components/read-more-btn.ts +0 -92
  69. package/src/config.ts +0 -119
  70. package/src/context.ts +0 -146
  71. package/src/data.ts +0 -110
  72. package/src/defaults.ts +0 -61
  73. package/src/editor/editor.html +0 -18
  74. package/src/editor/editor.ts +0 -114
  75. package/src/editor/state.ts +0 -52
  76. package/src/editor/ui.ts +0 -36
  77. package/src/i18n/en.ts +0 -84
  78. package/src/i18n/external.ts +0 -10
  79. package/src/i18n/index.ts +0 -67
  80. package/src/i18n/jp.ts +0 -86
  81. package/src/i18n/zh-CN.ts +0 -88
  82. package/src/i18n/zh-TW.ts +0 -86
  83. package/src/layer/index.ts +0 -4
  84. package/src/layer/layer-manager.ts +0 -32
  85. package/src/layer/layer.ts +0 -39
  86. package/src/layer/scrollbar-helper.ts +0 -24
  87. package/src/layer/sidebar-layer.html +0 -8
  88. package/src/layer/sidebar-layer.ts +0 -155
  89. package/src/layer/wrap.ts +0 -77
  90. package/src/lib/component.ts +0 -12
  91. package/src/lib/detect.ts +0 -222
  92. package/src/lib/event-manager.ts +0 -47
  93. package/src/lib/highlight.ts +0 -5
  94. package/src/lib/marked-renderer.ts +0 -32
  95. package/src/lib/marked.ts +0 -72
  96. package/src/lib/sanitizer.ts +0 -57
  97. package/src/lib/ui.ts +0 -193
  98. package/src/lib/user.ts +0 -55
  99. package/src/lib/utils.ts +0 -236
  100. package/src/list/comment.ts +0 -20
  101. package/src/list/layout.ts +0 -120
  102. package/src/list/list.html +0 -20
  103. package/src/list/list.ts +0 -79
  104. package/src/list/nest.ts +0 -66
  105. package/src/list/page.ts +0 -97
  106. package/src/list/paginator/index.ts +0 -25
  107. package/src/list/paginator/read-more.ts +0 -67
  108. package/src/list/paginator/up-down.ts +0 -51
  109. package/src/main.ts +0 -14
  110. package/src/plugins/admin-only-elem.ts +0 -40
  111. package/src/plugins/conf-remoter.ts +0 -54
  112. package/src/plugins/dark-mode.ts +0 -12
  113. package/src/plugins/editor/_kit.ts +0 -57
  114. package/src/plugins/editor/_plug.ts +0 -60
  115. package/src/plugins/editor/_sample.ts +0 -8
  116. package/src/plugins/editor/closable.ts +0 -44
  117. package/src/plugins/editor/emoticons.scss +0 -72
  118. package/src/plugins/editor/emoticons.ts +0 -293
  119. package/src/plugins/editor/header-event.ts +0 -35
  120. package/src/plugins/editor/header-link.ts +0 -31
  121. package/src/plugins/editor/header-user.ts +0 -98
  122. package/src/plugins/editor/index.ts +0 -40
  123. package/src/plugins/editor/local-storage.ts +0 -36
  124. package/src/plugins/editor/mover.ts +0 -29
  125. package/src/plugins/editor/preview.scss +0 -7
  126. package/src/plugins/editor/preview.ts +0 -41
  127. package/src/plugins/editor/state-edit.ts +0 -116
  128. package/src/plugins/editor/state-reply.ts +0 -91
  129. package/src/plugins/editor/submit-add.ts +0 -33
  130. package/src/plugins/editor/submit-btn.ts +0 -25
  131. package/src/plugins/editor/submit.ts +0 -73
  132. package/src/plugins/editor/textarea.ts +0 -55
  133. package/src/plugins/editor/upload.ts +0 -145
  134. package/src/plugins/editor-kit.ts +0 -161
  135. package/src/plugins/index.ts +0 -16
  136. package/src/plugins/list/copyright.ts +0 -16
  137. package/src/plugins/list/count.ts +0 -31
  138. package/src/plugins/list/dropdown.ts +0 -95
  139. package/src/plugins/list/error-dialog.ts +0 -22
  140. package/src/plugins/list/fetch.ts +0 -64
  141. package/src/plugins/list/goto-first.ts +0 -23
  142. package/src/plugins/list/goto.ts +0 -72
  143. package/src/plugins/list/index.ts +0 -25
  144. package/src/plugins/list/loading.ts +0 -17
  145. package/src/plugins/list/no-comment.ts +0 -25
  146. package/src/plugins/list/reach-bottom.ts +0 -46
  147. package/src/plugins/list/sidebar-btn.ts +0 -39
  148. package/src/plugins/list/time-ticking.ts +0 -22
  149. package/src/plugins/list/unread-badge.ts +0 -26
  150. package/src/plugins/list/unread.ts +0 -38
  151. package/src/plugins/list/with-editor.ts +0 -59
  152. package/src/plugins/markdown.ts +0 -10
  153. package/src/plugins/stat.ts +0 -82
  154. package/src/plugins/version-check.ts +0 -36
  155. package/src/service.ts +0 -91
  156. package/src/style/_color.scss +0 -41
  157. package/src/style/_extend.scss +0 -20
  158. package/src/style/_variables.scss +0 -3
  159. package/src/style/comment.scss +0 -360
  160. package/src/style/editor.scss +0 -194
  161. package/src/style/list.scss +0 -212
  162. package/src/style/main.scss +0 -486
  163. package/src/style/pagination.scss +0 -58
  164. package/src/style/sidebar-layer.scss +0 -92
  165. package/types/config.ts +0 -153
  166. package/types/context.ts +0 -84
  167. package/types/data.ts +0 -271
  168. package/types/editor.ts +0 -95
  169. package/types/event.ts +0 -40
  170. package/types/global.d.ts +0 -1
  171. package/types/index.ts +0 -7
  172. package/types/plugin.ts +0 -3
  173. package/types/sidebar.ts +0 -3
@@ -1,194 +0,0 @@
1
- .atk-main-editor {
2
- $editor-padding: 10px;
3
- position: relative;
4
- overflow: hidden;
5
- background: var(--at-color-bg);
6
- border: 1px solid var(--at-color-border);
7
- border-radius: $block-radius;
8
- margin-bottom: 10px;
9
-
10
- @media only screen and (max-width: 768px) {
11
- margin-bottom: 7px;
12
- }
13
-
14
- &.editor-traveling {
15
- margin-top: 5px;
16
- margin-bottom: 10px;
17
- }
18
-
19
- & > .atk-header {
20
- display: flex;
21
- flex-direction: row;
22
- padding: 10px 14px 0;
23
-
24
- input {
25
- flex: 1;
26
- width: 100%;
27
- font-size: 14px;
28
- background: transparent;
29
- border: 2px solid transparent;
30
- border-radius: calc($block-radius / 2);
31
- padding: 6px 5px;
32
- resize: none;
33
- outline: none;
34
-
35
- &:not(:last-child) {
36
- margin-right: 2px;
37
- }
38
- }
39
- }
40
-
41
- & > .atk-textarea-wrap {
42
- position: relative;
43
-
44
- & > .atk-textarea {
45
- display: block;
46
- overflow: hidden;
47
- color: var(--at-color-font);
48
- font-size: 15px;
49
- background-color: var(--at-color-bg);
50
- border: 2px solid transparent;
51
- border-radius: calc($block-radius / 2);
52
- width: 100%;
53
- min-height: 120px;
54
- margin-top: 2px;
55
- padding: 10px 20px;
56
- resize: none;
57
- word-wrap: break-word;
58
- outline: none;
59
- }
60
-
61
- & > .atk-comment-closed {
62
- pointer-events: none;
63
- color: var(--at-color-meta);
64
- font-size: 12px;
65
- background-color: var(--at-color-bg);
66
- border-top: 1px solid var(--at-color-border);
67
- padding: 5px 15px;
68
- margin-top: 10px;
69
- // background: repeating-linear-gradient(145deg, #f2f2f2, #f2f2f2 15px, #fff 0, #fff 30px);
70
- }
71
-
72
- & > .atk-send-reply {
73
- z-index: 2;
74
- position: absolute;
75
- right: 7px;
76
- bottom: 2px;
77
- max-width: calc(100% - 20px);
78
- height: 30px;
79
- line-height: 30px;
80
- font-size: 14px;
81
- background: var(--at-color-bg-grey-transl);
82
- padding: 0 30px 0 10px;
83
- overflow: hidden;
84
- text-overflow: ellipsis;
85
- white-space: nowrap;
86
- cursor: pointer;
87
- border-radius: calc($block-radius / 2);
88
-
89
- .atk-text {
90
- }
91
-
92
- .atk-cancel {
93
- position: absolute;
94
- right: 0;
95
- bottom: 0;
96
- height: 30px;
97
- text-align: center;
98
- width: 30px;
99
- line-height: 30px;
100
- font-weight: 700;
101
-
102
- &:hover {
103
- color: var(--at-color-deep);
104
- }
105
- }
106
- }
107
- }
108
-
109
- & > .atk-plug-panel-wrap {
110
- position: relative;
111
- height: 180px;
112
- width: 100%;
113
- overflow: hidden;
114
- border-top: 1px solid var(--at-color-border);
115
- animation: 0.3s both atkFadeIn;
116
- transition: 0.2s height ease-in-out;
117
- }
118
-
119
- & > .atk-bottom {
120
- display: flex;
121
- flex-direction: row;
122
- justify-content: space-between;
123
- padding: 5px 5px 5px 10px;
124
-
125
- & > .atk-item {
126
- display: flex;
127
- flex-direction: row;
128
- align-items: center;
129
- }
130
-
131
- .atk-plug-btn {
132
- padding: 0 8px;
133
- line-height: 24px;
134
- cursor: pointer;
135
- color: var(--at-color-grey);
136
- font-size: $font-size;
137
- user-select: none;
138
- border-radius: calc($block-radius / 2);
139
-
140
- &:not(:last-child) {
141
- margin-right: 2px;
142
- }
143
-
144
- &:hover {
145
- background: var(--at-color-bg-grey);
146
- }
147
-
148
- &.active {
149
- color: var(--at-color-main);
150
-
151
- svg.markdown path {
152
- fill: var(--at-color-main);
153
- }
154
- }
155
-
156
- i {
157
- color: var(--at-color-grey);
158
- display: inline-flex;
159
- vertical-align: sub;
160
- margin-left: 4px;
161
- svg.markdown path {
162
- fill: var(--at-color-grey);
163
- }
164
- }
165
- }
166
-
167
- .atk-send-btn {
168
- background: var(--at-color-main);
169
- color: #fff;
170
- font-size: $font-size;
171
- border: none;
172
- margin: 0;
173
- height: 30px;
174
- width: 8em;
175
- cursor: pointer;
176
- transition: opacity 0.3s ease-in-out;
177
- outline: none;
178
- border-radius: calc($block-radius / 2);
179
-
180
- &:active {
181
- opacity: 0.9;
182
- }
183
- }
184
- }
185
-
186
- & > .atk-notify-wrap {
187
- z-index: 3;
188
- position: absolute;
189
- right: -2px;
190
- bottom: 40px;
191
- width: 225px;
192
- opacity: 0.83;
193
- }
194
- }
@@ -1,212 +0,0 @@
1
- .artalk > .atk-list {
2
- position: relative;
3
-
4
- & > .atk-list-header {
5
- display: flex;
6
- flex-direction: row;
7
- padding: 10px 17px 10px 17px;
8
-
9
- .atk-text {
10
- display: inline-block;
11
- }
12
-
13
- /* 下拉选择层 */
14
- .atk-dropdown-wrap {
15
- position: relative;
16
- cursor: pointer;
17
-
18
- .atk-arrow-down-icon {
19
- cursor: pointer;
20
- vertical-align: middle;
21
- border-top: 5px solid var(--at-color-grey);
22
- border-left: 3px solid transparent;
23
- border-right: 3px solid transparent;
24
- margin-top: -1px;
25
- margin-left: 0.8rem;
26
- display: inline-block;
27
- }
28
-
29
- &:hover {
30
- .atk-dropdown {
31
- display: block;
32
- }
33
- }
34
-
35
- .atk-dropdown {
36
- z-index: 3;
37
- display: none;
38
- height: auto !important;
39
- max-height: calc(100vh - 2.7rem);
40
- overflow-y: auto;
41
- position: absolute;
42
- top: 100%;
43
- right: 0;
44
- width: 100%;
45
- background-color: var(--at-color-bg);
46
- padding: 0.6rem 0;
47
- border: 1px solid var(--at-color-border);
48
- text-align: center;
49
- border-radius: $block-radius;
50
- white-space: nowrap;
51
- margin: 0;
52
- list-style: none;
53
- }
54
-
55
- .atk-dropdown-item {
56
- span, a {
57
- display: block;
58
- line-height: 2rem;
59
- position: relative;
60
- border-bottom: none;
61
- font-weight: 400;
62
- padding: 0 1.5rem;
63
-
64
- &:hover {
65
- color: var(--at-color-main);
66
- }
67
- }
68
-
69
- &.active span, a {
70
- color: var(--at-color-main);
71
- }
72
- }
73
- }
74
-
75
- .atk-comment-count {
76
- font-size: 15px;
77
-
78
- .atk-comment-count-num {
79
- font-size: 22px;
80
- margin-right: 4px;
81
- }
82
- }
83
-
84
- .atk-right-action {
85
- display: flex;
86
- flex: 1;
87
- flex-direction: row;
88
- align-items: center;
89
- justify-content: flex-end;
90
-
91
- & > span {
92
- font-size: 14px;
93
- color: var(--at-color-meta);
94
- cursor: pointer;
95
- user-select: none;
96
- position: relative;
97
-
98
- &.atk-on, &.atk-on * {
99
- color: var(--at-color-main);
100
- }
101
-
102
- &:not(:last-child):not(.atk-hide) {
103
- margin-right: 10px;
104
- padding-right: 10px;
105
- }
106
-
107
- .atk-unread-badge {
108
- position: absolute;
109
- top: -5px;
110
- left: -6px;
111
- color: #fff;
112
- background: var(--at-color-pink);
113
- text-align: center;
114
- min-width: 16px;
115
- height: 16px;
116
- padding: 0 3px;
117
- border-radius: 8px;
118
- line-height: 16px;
119
- font-size: 12px;
120
- }
121
- }
122
- }
123
- }
124
-
125
- & > .atk-list-body {
126
- min-height: 150px;
127
-
128
- .atk-list-comments-wrap {
129
- .atk-main-editor {
130
- }
131
- }
132
- }
133
-
134
- & > .atk-list-footer {
135
- text-align: right;
136
-
137
- @media only screen and (max-width: 768px) {
138
- float: initial;
139
- text-align: center;
140
- }
141
-
142
- .atk-copyright {
143
- display: block;
144
- font-size: 12px;
145
- color: var(--at-color-meta);
146
- padding-right: 15px;
147
-
148
- a {
149
- color: var(--at-color-main);
150
- text-decoration: none;
151
- }
152
- }
153
- }
154
- }
155
-
156
- .atk-list-no-comment {
157
- height: 150px;
158
- display: flex;
159
- font-size: 19px;
160
- justify-content: center;
161
- align-items: center;
162
- word-break: break-word;
163
- text-align: center;
164
- }
165
-
166
- .atk-list-read-more {
167
- border-top: 1px dashed var(--at-color-border);
168
- margin-top: 28px;
169
- padding-bottom: 25px;
170
-
171
- @media only screen and (max-width: 768px) {
172
- padding-bottom: 10px;
173
- }
174
-
175
- &.atk-err .atk-text {
176
- color: var(--at-color-red) !important;
177
- }
178
-
179
- .atk-list-read-more-inner {
180
- cursor: pointer;
181
- user-select: none;
182
- padding: 0 15px;
183
- font-size: $font-size;
184
- border-radius: $block-radius;
185
- border: 1px solid transparent;
186
- display: flex;
187
- height: 30px;
188
- flex-direction: row;
189
- place-content: center;
190
- align-items: center;
191
- width: 120px;
192
- margin: 0 auto;
193
- margin-top: -15px;
194
- background: var(--at-color-bg);
195
- border-color: var(--at-color-border);
196
-
197
- & > .atk-loading-icon {
198
- height: 15px;
199
- width: 15px;
200
- }
201
-
202
- & > .atk-text {
203
- color: var(--at-color-meta);
204
- }
205
-
206
- &:hover {
207
- background: var(--at-color-bg-grey);
208
- & > .atk-text {
209
- }
210
- }
211
- }
212
- }