@waline/client 2.4.2 → 2.6.0
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 +42 -0
- package/dist/legacy.js +1 -1
- package/dist/legacy.js.map +1 -1
- package/dist/pageview.cjs.js +1 -1
- package/dist/pageview.cjs.js.map +1 -1
- 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 +43 -1
- package/dist/shim.esm.d.ts +43 -1
- 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 +43 -1
- 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 +43 -1
- package/dist/waline.esm.d.ts +43 -1
- 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 +21 -22
- package/src/comment.ts +7 -2
- package/src/components/CommentBox.vue +121 -4
- package/src/components/CommentCard.vue +1 -1
- package/src/components/Icons.ts +20 -0
- package/src/components/ImageWall.vue +166 -0
- package/src/composables/like.ts +1 -1
- package/src/config/default.ts +91 -1
- package/src/config/i18n/en.ts +2 -0
- package/src/config/i18n/generate.ts +2 -0
- package/src/config/i18n/jp.ts +8 -0
- package/src/config/i18n/pt-BR.ts +8 -0
- package/src/config/i18n/ru.ts +8 -0
- package/src/config/i18n/vi-VN.ts +8 -0
- package/src/config/i18n/zh-CN.ts +2 -0
- package/src/config/i18n/zh-TW.ts +2 -0
- package/src/init.ts +0 -3
- package/src/pageview.ts +2 -1
- package/src/styles/card.scss +1 -0
- package/src/styles/emoji.scss +112 -94
- package/src/styles/gif.scss +70 -0
- package/src/styles/index.scss +3 -0
- package/src/styles/panel.scss +0 -4
- package/src/typings/base.ts +40 -0
- package/src/typings/locale.ts +2 -0
- package/src/typings/waline.ts +8 -0
- package/src/utils/config.ts +5 -2
package/dist/waline.cjs.d.ts
CHANGED
|
@@ -37,6 +37,40 @@ interface WalineEmojiInfo {
|
|
|
37
37
|
items: string[];
|
|
38
38
|
}
|
|
39
39
|
declare type WalineEmojiMaps = Record<string, string>;
|
|
40
|
+
interface WalineSearchResult extends Record<string, unknown> {
|
|
41
|
+
/**
|
|
42
|
+
* Image link
|
|
43
|
+
*/
|
|
44
|
+
src: string;
|
|
45
|
+
/**
|
|
46
|
+
* Image title, optional
|
|
47
|
+
*/
|
|
48
|
+
title?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Image preview link, optional
|
|
51
|
+
*
|
|
52
|
+
* @default src
|
|
53
|
+
*/
|
|
54
|
+
preview?: string;
|
|
55
|
+
}
|
|
56
|
+
interface WalineSearchOptions {
|
|
57
|
+
/**
|
|
58
|
+
* Search action
|
|
59
|
+
*/
|
|
60
|
+
search: (word: string) => Promise<WalineSearchResult[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Default search action
|
|
63
|
+
*
|
|
64
|
+
* @default () => search('')
|
|
65
|
+
*/
|
|
66
|
+
default?: () => Promise<WalineSearchResult[]>;
|
|
67
|
+
/**
|
|
68
|
+
* Fetch more action
|
|
69
|
+
*
|
|
70
|
+
* @default (word) => search(word)
|
|
71
|
+
*/
|
|
72
|
+
more?: (word: string, currectCount: number) => Promise<WalineSearchResult[]>;
|
|
73
|
+
}
|
|
40
74
|
declare type WalineMeta = 'nick' | 'mail' | 'link';
|
|
41
75
|
declare type WalineImageUploader = (image: File) => Promise<string>;
|
|
42
76
|
declare type WalineHighlighter = (code: string, lang: string) => string;
|
|
@@ -145,6 +179,8 @@ interface WalineLocale extends WalineDateLocale, WalineLevelLocale {
|
|
|
145
179
|
word: string;
|
|
146
180
|
wordHint: string;
|
|
147
181
|
anonymous: string;
|
|
182
|
+
gif: string;
|
|
183
|
+
gifSearchPlaceholder: string;
|
|
148
184
|
}
|
|
149
185
|
|
|
150
186
|
interface WalineProps {
|
|
@@ -278,6 +314,12 @@ interface WalineProps {
|
|
|
278
314
|
* @default ['//unpkg.com/@waline/emojis@1.0.1/weibo']
|
|
279
315
|
*/
|
|
280
316
|
emoji?: (string | WalineEmojiInfo)[] | false;
|
|
317
|
+
/**
|
|
318
|
+
* 设置搜索功能
|
|
319
|
+
*
|
|
320
|
+
* Customize Search feature
|
|
321
|
+
*/
|
|
322
|
+
search?: WalineSearchOptions | false;
|
|
281
323
|
/**
|
|
282
324
|
* 代码高亮
|
|
283
325
|
*
|
|
@@ -524,4 +566,4 @@ interface WalineRecentCommentsResult {
|
|
|
524
566
|
}
|
|
525
567
|
declare const RecentComments: ({ el, serverURL, count, lang, }: WalineRecentCommentsOptions) => Promise<WalineRecentCommentsResult>;
|
|
526
568
|
|
|
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 };
|
|
569
|
+
export { RecentComments, WalineAbort, WalineComment, WalineCommentCountOptions, WalineCommentData, WalineCommentStatus, WalineDateLocale, WalineEmojiInfo, WalineEmojiMaps, WalineHighlighter, WalineImageUploader, WalineInitOptions, WalineInstance, WalineLevelLocale, WalineLocale, WalineMeta, WalinePageviewCountOptions, WalineProps, WalineRecentCommentsOptions, WalineRecentCommentsResult, WalineSearchOptions, WalineSearchResult, WalineTexRenderer, commentCount, defaultLocales, init, pageviewCount, version };
|