@waline/client 2.5.0 → 2.6.1
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/LICENSE +339 -0
- 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 +40 -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 +41 -1
- package/dist/shim.esm.d.ts +41 -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 +41 -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 +41 -1
- package/dist/waline.esm.d.ts +41 -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 +31 -33
- package/src/comment.ts +7 -2
- package/src/components/CommentBox.vue +57 -63
- package/src/components/CommentCard.vue +1 -1
- package/src/components/ImageWall.vue +166 -0
- package/src/composables/like.ts +1 -1
- package/src/config/default.ts +91 -1
- package/src/init.ts +2 -10
- package/src/pageview.ts +7 -2
- package/src/styles/emoji.scss +112 -94
- package/src/styles/gif.scss +58 -139
- package/src/styles/index.scss +3 -0
- package/src/styles/panel.scss +0 -6
- package/src/typings/base.ts +40 -0
- package/src/typings/waline.ts +8 -0
- package/src/utils/config.ts +5 -2
- package/src/utils/index.ts +0 -2
- package/src/utils/fetchGif.ts +0 -62
- package/src/utils/throttle.ts +0 -16
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;
|
|
@@ -280,6 +314,12 @@ interface WalineProps {
|
|
|
280
314
|
* @default ['//unpkg.com/@waline/emojis@1.0.1/weibo']
|
|
281
315
|
*/
|
|
282
316
|
emoji?: (string | WalineEmojiInfo)[] | false;
|
|
317
|
+
/**
|
|
318
|
+
* 设置搜索功能
|
|
319
|
+
*
|
|
320
|
+
* Customize Search feature
|
|
321
|
+
*/
|
|
322
|
+
search?: WalineSearchOptions | false;
|
|
283
323
|
/**
|
|
284
324
|
* 代码高亮
|
|
285
325
|
*
|
|
@@ -526,4 +566,4 @@ interface WalineRecentCommentsResult {
|
|
|
526
566
|
}
|
|
527
567
|
declare const RecentComments: ({ el, serverURL, count, lang, }: WalineRecentCommentsOptions) => Promise<WalineRecentCommentsResult>;
|
|
528
568
|
|
|
529
|
-
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 };
|