@waline/client 2.5.1 → 2.6.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 +41 -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 +42 -1
- package/dist/shim.esm.d.ts +42 -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 +42 -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 +42 -1
- package/dist/waline.esm.d.ts +42 -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 -32
- package/src/comment.ts +7 -2
- package/src/components/CommentBox.vue +88 -71
- package/src/components/CommentCard.vue +19 -17
- package/src/components/ImageWall.vue +34 -22
- package/src/composables/userInfo.ts +1 -1
- package/src/config/default.ts +93 -1
- package/src/config/i18n/en.ts +1 -0
- package/src/config/i18n/generate.ts +1 -0
- package/src/config/i18n/jp.ts +1 -0
- package/src/config/i18n/pt-BR.ts +1 -0
- package/src/config/i18n/ru.ts +1 -0
- package/src/config/i18n/vi-VN.ts +1 -0
- package/src/config/i18n/zh-CN.ts +1 -0
- package/src/config/i18n/zh-TW.ts +3 -2
- package/src/init.ts +0 -4
- package/src/pageview.ts +7 -2
- package/src/styles/emoji.scss +23 -0
- package/src/styles/gif.scss +6 -5
- package/src/typings/base.ts +40 -0
- package/src/typings/locale.ts +1 -0
- package/src/typings/waline.ts +8 -0
- package/src/utils/config.ts +5 -2
- package/src/utils/fetch.ts +3 -0
- package/src/utils/index.ts +0 -2
- package/src/utils/markedMathExtension.ts +1 -0
- package/LICENSE +0 -339
- package/src/utils/fetchGif.ts +0 -63
- package/src/utils/throttle.ts +0 -15
package/dist/legacy.d.ts
CHANGED
|
@@ -36,6 +36,40 @@ interface WalineEmojiInfo {
|
|
|
36
36
|
*/
|
|
37
37
|
items: string[];
|
|
38
38
|
}
|
|
39
|
+
interface WalineSearchResult extends Record<string, unknown> {
|
|
40
|
+
/**
|
|
41
|
+
* Image link
|
|
42
|
+
*/
|
|
43
|
+
src: string;
|
|
44
|
+
/**
|
|
45
|
+
* Image title, optional
|
|
46
|
+
*/
|
|
47
|
+
title?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Image preview link, optional
|
|
50
|
+
*
|
|
51
|
+
* @default src
|
|
52
|
+
*/
|
|
53
|
+
preview?: string;
|
|
54
|
+
}
|
|
55
|
+
interface WalineSearchOptions {
|
|
56
|
+
/**
|
|
57
|
+
* Search action
|
|
58
|
+
*/
|
|
59
|
+
search: (word: string) => Promise<WalineSearchResult[]>;
|
|
60
|
+
/**
|
|
61
|
+
* Default search action
|
|
62
|
+
*
|
|
63
|
+
* @default () => search('')
|
|
64
|
+
*/
|
|
65
|
+
default?: () => Promise<WalineSearchResult[]>;
|
|
66
|
+
/**
|
|
67
|
+
* Fetch more action
|
|
68
|
+
*
|
|
69
|
+
* @default (word) => search(word)
|
|
70
|
+
*/
|
|
71
|
+
more?: (word: string, currectCount: number) => Promise<WalineSearchResult[]>;
|
|
72
|
+
}
|
|
39
73
|
declare type WalineMeta = 'nick' | 'mail' | 'link';
|
|
40
74
|
declare type WalineImageUploader = (image: File) => Promise<string>;
|
|
41
75
|
declare type WalineHighlighter = (code: string, lang: string) => string;
|
|
@@ -79,6 +113,7 @@ interface WalineLocale extends WalineDateLocale, WalineLevelLocale {
|
|
|
79
113
|
anonymous: string;
|
|
80
114
|
gif: string;
|
|
81
115
|
gifSearchPlaceholder: string;
|
|
116
|
+
profile: string;
|
|
82
117
|
}
|
|
83
118
|
|
|
84
119
|
interface WalineProps {
|
|
@@ -212,6 +247,12 @@ interface WalineProps {
|
|
|
212
247
|
* @default ['//unpkg.com/@waline/emojis@1.0.1/weibo']
|
|
213
248
|
*/
|
|
214
249
|
emoji?: (string | WalineEmojiInfo)[] | false;
|
|
250
|
+
/**
|
|
251
|
+
* 设置搜索功能
|
|
252
|
+
*
|
|
253
|
+
* Customize Search feature
|
|
254
|
+
*/
|
|
255
|
+
search?: WalineSearchOptions | false;
|
|
215
256
|
/**
|
|
216
257
|
* 代码高亮
|
|
217
258
|
*
|