@waline/client 2.3.2 → 2.4.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/component.esm.js +1 -1
- package/dist/component.esm.js.map +1 -1
- package/dist/component.js +1 -1
- package/dist/component.js.map +1 -1
- package/dist/legacy.d.ts +4 -9
- package/dist/legacy.js +1 -1
- package/dist/legacy.js.map +1 -1
- package/dist/pageview.cjs.d.ts +47 -0
- package/dist/pageview.cjs.js +1 -1
- package/dist/pageview.cjs.js.map +1 -1
- package/dist/pageview.esm.d.ts +47 -0
- package/dist/pageview.esm.js +1 -1
- package/dist/pageview.esm.js.map +1 -1
- package/dist/pageview.js +1 -1
- package/dist/pageview.js.map +1 -1
- package/dist/shim.d.ts +46 -11
- package/dist/shim.esm.d.ts +46 -11
- package/dist/shim.esm.js +1 -1
- package/dist/shim.esm.js.map +1 -1
- package/dist/shim.js +1 -1
- package/dist/shim.js.map +1 -1
- package/dist/waline.cjs.d.ts +46 -11
- package/dist/waline.cjs.js +1 -1
- package/dist/waline.cjs.js.map +1 -1
- package/dist/waline.css +1 -1
- package/dist/waline.css.map +1 -1
- package/dist/waline.d.ts +46 -11
- package/dist/waline.esm.d.ts +46 -11
- package/dist/waline.esm.js +1 -1
- package/dist/waline.esm.js.map +1 -1
- package/dist/waline.js +1 -1
- package/dist/waline.js.map +1 -1
- package/package.json +19 -5
- package/src/components/CommentCard.vue +80 -14
- package/src/components/Icons.ts +28 -2
- package/src/components/Waline.vue +115 -2
- package/src/composables/index.ts +1 -0
- package/src/composables/like.ts +14 -0
- package/src/composables/userInfo.ts +9 -1
- package/src/config/i18n/en.ts +2 -0
- package/src/config/i18n/generate.ts +2 -0
- package/src/config/i18n/jp.ts +2 -0
- package/src/config/i18n/pt-BR.ts +2 -0
- package/src/config/i18n/ru.ts +2 -0
- package/src/config/i18n/vi-VN.ts +2 -0
- package/src/config/i18n/zh-CN.ts +2 -0
- package/src/config/i18n/zh-TW.ts +2 -0
- package/src/styles/card.scss +55 -27
- package/src/styles/nomalize.scss +0 -1
- package/src/styles/panel.scss +0 -1
- package/src/typings/comment.ts +56 -1
- package/src/typings/locale.ts +3 -8
- package/src/typings/waline.ts +1 -1
- package/src/utils/config.ts +1 -1
- package/src/utils/fetch.ts +77 -4
package/dist/waline.cjs.d.ts
CHANGED
|
@@ -43,20 +43,57 @@ declare type WalineHighlighter = (code: string, lang: string) => string;
|
|
|
43
43
|
declare type WalineTexRenderer = (blockMode: boolean, tex: string) => string;
|
|
44
44
|
|
|
45
45
|
interface WalineCommentData {
|
|
46
|
+
/**
|
|
47
|
+
* User Nickname
|
|
48
|
+
*/
|
|
46
49
|
nick: string;
|
|
50
|
+
/**
|
|
51
|
+
* User email
|
|
52
|
+
*/
|
|
47
53
|
mail: string;
|
|
54
|
+
/**
|
|
55
|
+
* User link
|
|
56
|
+
*/
|
|
48
57
|
link?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Content of comment
|
|
60
|
+
*/
|
|
49
61
|
comment: string;
|
|
62
|
+
/**
|
|
63
|
+
* User Agent
|
|
64
|
+
*/
|
|
50
65
|
ua: string;
|
|
66
|
+
/**
|
|
67
|
+
* Parent comment id
|
|
68
|
+
*/
|
|
51
69
|
pid?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Root comment id
|
|
72
|
+
*/
|
|
52
73
|
rid?: string;
|
|
74
|
+
/**
|
|
75
|
+
* User id being at
|
|
76
|
+
*/
|
|
53
77
|
at?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Comment link
|
|
80
|
+
*/
|
|
54
81
|
url: string;
|
|
55
82
|
}
|
|
83
|
+
declare type WalineCommentStatus = 'approved' | 'waiting' | 'spam';
|
|
56
84
|
interface WalineComment extends Exclude<WalineCommentData, 'ua'> {
|
|
85
|
+
/**
|
|
86
|
+
* User avatar
|
|
87
|
+
*/
|
|
57
88
|
avatar: string;
|
|
58
|
-
|
|
89
|
+
/**
|
|
90
|
+
* User type
|
|
91
|
+
*/
|
|
92
|
+
type?: 'administrator' | 'guest' | `verify:${string}`;
|
|
59
93
|
objectId: string;
|
|
94
|
+
/**
|
|
95
|
+
* Time ISOString when the comment is created
|
|
96
|
+
*/
|
|
60
97
|
createdAt: string;
|
|
61
98
|
insertedAt: string;
|
|
62
99
|
updatedAt: string;
|
|
@@ -67,6 +104,9 @@ interface WalineComment extends Exclude<WalineCommentData, 'ua'> {
|
|
|
67
104
|
level?: number;
|
|
68
105
|
addr?: string;
|
|
69
106
|
label?: string;
|
|
107
|
+
user_id?: string | number;
|
|
108
|
+
status?: WalineCommentStatus;
|
|
109
|
+
like?: number;
|
|
70
110
|
}
|
|
71
111
|
|
|
72
112
|
interface WalineDateLocale {
|
|
@@ -76,14 +116,7 @@ interface WalineDateLocale {
|
|
|
76
116
|
days: string;
|
|
77
117
|
now: string;
|
|
78
118
|
}
|
|
79
|
-
|
|
80
|
-
level0: string;
|
|
81
|
-
level1: string;
|
|
82
|
-
level2: string;
|
|
83
|
-
level3: string;
|
|
84
|
-
level4: string;
|
|
85
|
-
level5: string;
|
|
86
|
-
}
|
|
119
|
+
declare type WalineLevelLocale = Record<`level${number}`, string>;
|
|
87
120
|
interface WalineLocale extends WalineDateLocale, WalineLevelLocale {
|
|
88
121
|
nick: string;
|
|
89
122
|
nickError: string;
|
|
@@ -94,6 +127,8 @@ interface WalineLocale extends WalineDateLocale, WalineLevelLocale {
|
|
|
94
127
|
placeholder: string;
|
|
95
128
|
sofa: string;
|
|
96
129
|
submit: string;
|
|
130
|
+
like: string;
|
|
131
|
+
cancelLike: string;
|
|
97
132
|
reply: string;
|
|
98
133
|
cancelReply: string;
|
|
99
134
|
comment: string;
|
|
@@ -240,7 +275,7 @@ interface WalineProps {
|
|
|
240
275
|
*
|
|
241
276
|
* Set Emojis
|
|
242
277
|
*
|
|
243
|
-
* @default ['
|
|
278
|
+
* @default ['//unpkg.com/@waline/emojis@1.0.1/weibo']
|
|
244
279
|
*/
|
|
245
280
|
emoji?: (string | WalineEmojiInfo)[] | false;
|
|
246
281
|
/**
|
|
@@ -489,4 +524,4 @@ interface WalineRecentCommentsResult {
|
|
|
489
524
|
}
|
|
490
525
|
declare const RecentComments: ({ el, serverURL, count, lang, }: WalineRecentCommentsOptions) => Promise<WalineRecentCommentsResult>;
|
|
491
526
|
|
|
492
|
-
export { RecentComments, WalineAbort, WalineComment, WalineCommentCountOptions, WalineCommentData, WalineDateLocale, WalineEmojiInfo, WalineEmojiMaps, WalineHighlighter, WalineImageUploader, WalineInitOptions, WalineInstance, WalineLevelLocale, WalineLocale, WalineMeta, WalinePageviewCountOptions, WalineProps, WalineRecentCommentsOptions, WalineRecentCommentsResult, WalineTexRenderer, commentCount, defaultLocales, init, pageviewCount, version };
|
|
527
|
+
export { RecentComments, WalineAbort, WalineComment, WalineCommentCountOptions, WalineCommentData, WalineCommentStatus, WalineDateLocale, WalineEmojiInfo, WalineEmojiMaps, WalineHighlighter, WalineImageUploader, WalineInitOptions, WalineInstance, WalineLevelLocale, WalineLocale, WalineMeta, WalinePageviewCountOptions, WalineProps, WalineRecentCommentsOptions, WalineRecentCommentsResult, WalineTexRenderer, commentCount, defaultLocales, init, pageviewCount, version };
|