@waline/client
Advanced tools
Comparing version 2.11.2 to 2.11.3
@@ -1,2 +0,2 @@ | ||
!function(e,t){if("function"==typeof define&&define.amd)define("Waline",["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var n={exports:{}};t(n.exports),e.Waline=n.exports}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.commentCount=void 0;const t=e=>{let{serverURL:t,lang:n,paths:r,signal:o}=e;return fetch(`${t}/comment?type=count&url=${encodeURIComponent(r.join(","))}&lang=${n}`,{signal:o,headers:{}}).then((e=>e.json())).then((e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("object"==typeof e&&e.errno)throw new TypeError(`Fetch ${t} failed with ${e.errno}: ${e.errmsg}`);return e}(e,"comment count"))).then((e=>Array.isArray(e)?e:[e]))},n=e=>{const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/\/$/u,"")}(e);return/^(https?:)?\/\//.test(t)?t:`https://${t}`},r=e=>{"AbortError"!==e.name&&console.error(e.message)};e.commentCount=e=>{let{serverURL:o,path:i=window.location.pathname,selector:s=".waline-comment-count",lang:a="zh-CN"}=e;const l=new AbortController,c=document.querySelectorAll(s);return c.length&&t({serverURL:n(o),paths:Array.from(c).map((e=>(e=>{try{e=decodeURI(e)}catch(e){}return e})(e.dataset.path||e.getAttribute("id")||i))),lang:a,signal:l.signal}).then((e=>{c.forEach(((t,n)=>{t.innerText=e[n].toString()}))})).catch(r),l.abort.bind(l)};e.version="2.11.2"})); | ||
!function(e,t){if("function"==typeof define&&define.amd)define("Waline",["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var n={exports:{}};t(n.exports),e.Waline=n.exports}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.commentCount=void 0;const t=e=>{let{serverURL:t,lang:n,paths:r,signal:o}=e;return fetch(`${t}/comment?type=count&url=${encodeURIComponent(r.join(","))}&lang=${n}`,{signal:o,headers:{}}).then((e=>e.json())).then((e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("object"==typeof e&&e.errno)throw new TypeError(`Fetch ${t} failed with ${e.errno}: ${e.errmsg}`);return e}(e,"comment count"))).then((e=>Array.isArray(e)?e:[e]))},n=e=>{const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/\/$/u,"")}(e);return/^(https?:)?\/\//.test(t)?t:`https://${t}`},r=e=>{"AbortError"!==e.name&&console.error(e.message)};e.commentCount=e=>{let{serverURL:o,path:i=window.location.pathname,selector:s=".waline-comment-count",lang:a="zh-CN"}=e;const l=new AbortController,c=document.querySelectorAll(s);return c.length&&t({serverURL:n(o),paths:Array.from(c).map((e=>(e=>{try{e=decodeURI(e)}catch(e){}return e})(e.dataset.path||e.getAttribute("id")||i))),lang:a,signal:l.signal}).then((e=>{c.forEach(((t,n)=>{t.innerText=e[n].toString()}))})).catch(r),l.abort.bind(l)};e.version="2.11.3"})); | ||
//# sourceMappingURL=comment.js.map |
@@ -39,4 +39,6 @@ interface WalineEmojiInfo { | ||
} | ||
interface WalineSearchResult extends Record<string, unknown> { | ||
interface WalineSearchImageData extends Record<string, unknown> { | ||
/** | ||
* 图片链接 | ||
* | ||
* Image link | ||
@@ -46,8 +48,20 @@ */ | ||
/** | ||
* Image title, optional | ||
* 图片标题 | ||
* | ||
* @description 用于图片的 alt 属性 | ||
* | ||
* Image title | ||
* | ||
* @description Used for alt attribute of image | ||
*/ | ||
title?: string; | ||
/** | ||
* Image preview link, optional | ||
* 图片缩略图 | ||
* | ||
* @description 为了更好的加载性能,我们会优先在列表中使用此缩略图 | ||
* | ||
* Image preview link | ||
* | ||
* @description For better loading performance, we will use this thumbnail first in the list | ||
* | ||
* @default src | ||
@@ -57,19 +71,30 @@ */ | ||
} | ||
declare type WalineSearchResult = WalineSearchImageData[]; | ||
interface WalineSearchOptions { | ||
/** | ||
* 搜索操作 | ||
* | ||
* Search action | ||
*/ | ||
search: (word: string) => Promise<WalineSearchResult[]>; | ||
search: (word: string) => Promise<WalineSearchResult>; | ||
/** | ||
* Default search action | ||
* 打开列表时展示的默认结果 | ||
* | ||
* Default result when opening list | ||
* | ||
* @default () => search('') | ||
*/ | ||
default?: () => Promise<WalineSearchResult[]>; | ||
default?: () => Promise<WalineSearchResult>; | ||
/** | ||
* 获取更多的操作 | ||
* | ||
* @description 会在列表滚动到底部时触发,如果你的搜索服务支持分页功能,你应该设置此项实现无限滚动 | ||
* | ||
* Fetch more action | ||
* | ||
* @description It will be triggered when the list scrolls to the bottom. If your search service supports paging, you should set this to achieve infinite scrolling | ||
* | ||
* @default (word) => search(word) | ||
*/ | ||
more?: (word: string, currectCount: number) => Promise<WalineSearchResult[]>; | ||
more?: (word: string, currectCount: number) => Promise<WalineSearchResult>; | ||
} | ||
@@ -89,7 +114,17 @@ declare type WalineMeta = 'nick' | 'mail' | 'link'; | ||
declare type WalineLevelLocale = Record<`level${number}`, string>; | ||
interface WalineLocale extends WalineDateLocale, WalineLevelLocale { | ||
interface WalineReactionLocale { | ||
reactionTitle: string; | ||
reaction0: string; | ||
reaction1: string; | ||
reaction2: string; | ||
reaction3: string; | ||
reaction4: string; | ||
reaction5: string; | ||
reaction6: string; | ||
reaction7: string; | ||
reaction8: string; | ||
} | ||
interface WalineLocale extends WalineDateLocale, WalineLevelLocale, WalineReactionLocale { | ||
nick: string; | ||
nickError: string; | ||
mail: string; | ||
mailError: string; | ||
link: string; | ||
@@ -100,23 +135,13 @@ optional: string; | ||
submit: string; | ||
like: string; | ||
cancelLike: string; | ||
reply: string; | ||
cancelReply: string; | ||
comment: string; | ||
refresh: string; | ||
more: string; | ||
preview: string; | ||
emoji: string; | ||
uploadImage: string; | ||
uploading: string; | ||
login: string; | ||
logout: string; | ||
admin: string; | ||
sticky: string; | ||
word: string; | ||
wordHint: string; | ||
anonymous: string; | ||
gif: string; | ||
gifSearchPlaceholder: string; | ||
profile: string; | ||
approved: string; | ||
@@ -129,12 +154,14 @@ waiting: string; | ||
hottest: string; | ||
reactionTitle: string; | ||
reaction0: string; | ||
reaction1: string; | ||
reaction2: string; | ||
reaction3: string; | ||
reaction4: string; | ||
reaction5: string; | ||
reaction6: string; | ||
reaction7: string; | ||
reaction8: string; | ||
nickError: string; | ||
mailError: string; | ||
wordHint: string; | ||
like: string; | ||
cancelLike: string; | ||
reply: string; | ||
cancelReply: string; | ||
preview: string; | ||
emoji: string; | ||
uploadImage: string; | ||
profile: string; | ||
logout: string; | ||
} | ||
@@ -141,0 +168,0 @@ |
@@ -1,2 +0,2 @@ | ||
!function(e,t){if("function"==typeof define&&define.amd)define("Waline",["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var n={exports:{}};t(n.exports),e.Waline=n.exports}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.pageviewCount=void 0;e.version="2.11.2";const t={"Content-Type":"application/json"},n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("object"==typeof e&&e.errno)throw new TypeError(`Fetch ${t} failed with ${e.errno}: ${e.errmsg}`);return e},r=e=>{let{serverURL:t,lang:r,paths:o,signal:a}=e;return(e=>{let{serverURL:t,lang:r,paths:o,type:a,signal:i}=e;return fetch(`${t}/article?path=${encodeURIComponent(o.join(","))}&type=${encodeURIComponent(a.join(","))}&lang=${r}`,{signal:i}).then((e=>e.json())).then((e=>n(e,"article count")))})({serverURL:t,lang:r,paths:o,type:["time"],signal:a}).then((e=>Array.isArray(e)?e:[e]))},o=e=>(e=>{let{serverURL:r,lang:o,path:a,type:i,action:l}=e;return fetch(`${r}/article?lang=${o}`,{method:"POST",headers:t,body:JSON.stringify({path:a,type:i,action:l})}).then((e=>e.json())).then((e=>n(e,"article count")))})({...e,type:"time"}),a=e=>{const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/\/$/u,"")}(e);return/^(https?:)?\/\//.test(t)?t:`https://${t}`},i=e=>{"AbortError"!==e.name&&console.error(e.message)},l=e=>e.dataset.path||e.getAttribute("id"),s=(e,t)=>{t.forEach(((t,n)=>{t.innerText=e[n].toString()}))};e.pageviewCount=e=>{let{serverURL:t,path:n=window.location.pathname,selector:p=".waline-pageview-count",update:h=!0,lang:c="zh-CN"}=e;const f=new AbortController,g=Array.from(document.querySelectorAll(p)),u=e=>{const t=l(e);return null!==t&&n!==t},d=e=>r({serverURL:a(t),paths:e.map((e=>l(e)||n)),lang:c,signal:f.signal}).then((t=>s(t,e))).catch(i);if(h){const e=g.filter((e=>!u(e))),r=g.filter(u);o({serverURL:a(t),path:n,lang:c}).then((t=>s(new Array(e.length).fill(t),e))),r.length&&d(r)}else d(g);return f.abort.bind(f)}})); | ||
!function(e,t){if("function"==typeof define&&define.amd)define("Waline",["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var n={exports:{}};t(n.exports),e.Waline=n.exports}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.pageviewCount=void 0;e.version="2.11.3";const t={"Content-Type":"application/json"},n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("object"==typeof e&&e.errno)throw new TypeError(`Fetch ${t} failed with ${e.errno}: ${e.errmsg}`);return e},r=e=>{let{serverURL:t,lang:r,paths:o,signal:a}=e;return(e=>{let{serverURL:t,lang:r,paths:o,type:a,signal:i}=e;return fetch(`${t}/article?path=${encodeURIComponent(o.join(","))}&type=${encodeURIComponent(a.join(","))}&lang=${r}`,{signal:i}).then((e=>e.json())).then((e=>n(e,"article count")))})({serverURL:t,lang:r,paths:o,type:["time"],signal:a}).then((e=>Array.isArray(e)?e:[e]))},o=e=>(e=>{let{serverURL:r,lang:o,path:a,type:i,action:l}=e;return fetch(`${r}/article?lang=${o}`,{method:"POST",headers:t,body:JSON.stringify({path:a,type:i,action:l})}).then((e=>e.json())).then((e=>n(e,"article count")))})({...e,type:"time"}),a=e=>{const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/\/$/u,"")}(e);return/^(https?:)?\/\//.test(t)?t:`https://${t}`},i=e=>{"AbortError"!==e.name&&console.error(e.message)},l=e=>e.dataset.path||e.getAttribute("id"),s=(e,t)=>{t.forEach(((t,n)=>{t.innerText=e[n].toString()}))};e.pageviewCount=e=>{let{serverURL:t,path:n=window.location.pathname,selector:p=".waline-pageview-count",update:h=!0,lang:c="zh-CN"}=e;const f=new AbortController,g=Array.from(document.querySelectorAll(p)),u=e=>{const t=l(e);return null!==t&&n!==t},d=e=>r({serverURL:a(t),paths:e.map((e=>l(e)||n)),lang:c,signal:f.signal}).then((t=>s(t,e))).catch(i);if(h){const e=g.filter((e=>!u(e))),r=g.filter(u);o({serverURL:a(t),path:n,lang:c}).then((t=>s(new Array(e.length).fill(t),e))),r.length&&d(r)}else d(g);return f.abort.bind(f)}})); | ||
//# sourceMappingURL=pageview.js.map |
@@ -40,4 +40,6 @@ interface WalineEmojiInfo { | ||
declare type WalineEmojiMaps = Record<string, string>; | ||
interface WalineSearchResult extends Record<string, unknown> { | ||
interface WalineSearchImageData extends Record<string, unknown> { | ||
/** | ||
* 图片链接 | ||
* | ||
* Image link | ||
@@ -47,8 +49,20 @@ */ | ||
/** | ||
* Image title, optional | ||
* 图片标题 | ||
* | ||
* @description 用于图片的 alt 属性 | ||
* | ||
* Image title | ||
* | ||
* @description Used for alt attribute of image | ||
*/ | ||
title?: string; | ||
/** | ||
* Image preview link, optional | ||
* 图片缩略图 | ||
* | ||
* @description 为了更好的加载性能,我们会优先在列表中使用此缩略图 | ||
* | ||
* Image preview link | ||
* | ||
* @description For better loading performance, we will use this thumbnail first in the list | ||
* | ||
* @default src | ||
@@ -58,19 +72,30 @@ */ | ||
} | ||
declare type WalineSearchResult = WalineSearchImageData[]; | ||
interface WalineSearchOptions { | ||
/** | ||
* 搜索操作 | ||
* | ||
* Search action | ||
*/ | ||
search: (word: string) => Promise<WalineSearchResult[]>; | ||
search: (word: string) => Promise<WalineSearchResult>; | ||
/** | ||
* Default search action | ||
* 打开列表时展示的默认结果 | ||
* | ||
* Default result when opening list | ||
* | ||
* @default () => search('') | ||
*/ | ||
default?: () => Promise<WalineSearchResult[]>; | ||
default?: () => Promise<WalineSearchResult>; | ||
/** | ||
* 获取更多的操作 | ||
* | ||
* @description 会在列表滚动到底部时触发,如果你的搜索服务支持分页功能,你应该设置此项实现无限滚动 | ||
* | ||
* Fetch more action | ||
* | ||
* @description It will be triggered when the list scrolls to the bottom. If your search service supports paging, you should set this to achieve infinite scrolling | ||
* | ||
* @default (word) => search(word) | ||
*/ | ||
more?: (word: string, currectCount: number) => Promise<WalineSearchResult[]>; | ||
more?: (word: string, currectCount: number) => Promise<WalineSearchResult>; | ||
} | ||
@@ -166,7 +191,17 @@ declare type WalineMeta = 'nick' | 'mail' | 'link'; | ||
declare type WalineLevelLocale = Record<`level${number}`, string>; | ||
interface WalineLocale extends WalineDateLocale, WalineLevelLocale { | ||
interface WalineReactionLocale { | ||
reactionTitle: string; | ||
reaction0: string; | ||
reaction1: string; | ||
reaction2: string; | ||
reaction3: string; | ||
reaction4: string; | ||
reaction5: string; | ||
reaction6: string; | ||
reaction7: string; | ||
reaction8: string; | ||
} | ||
interface WalineLocale extends WalineDateLocale, WalineLevelLocale, WalineReactionLocale { | ||
nick: string; | ||
nickError: string; | ||
mail: string; | ||
mailError: string; | ||
link: string; | ||
@@ -177,23 +212,13 @@ optional: string; | ||
submit: string; | ||
like: string; | ||
cancelLike: string; | ||
reply: string; | ||
cancelReply: string; | ||
comment: string; | ||
refresh: string; | ||
more: string; | ||
preview: string; | ||
emoji: string; | ||
uploadImage: string; | ||
uploading: string; | ||
login: string; | ||
logout: string; | ||
admin: string; | ||
sticky: string; | ||
word: string; | ||
wordHint: string; | ||
anonymous: string; | ||
gif: string; | ||
gifSearchPlaceholder: string; | ||
profile: string; | ||
approved: string; | ||
@@ -206,12 +231,14 @@ waiting: string; | ||
hottest: string; | ||
reactionTitle: string; | ||
reaction0: string; | ||
reaction1: string; | ||
reaction2: string; | ||
reaction3: string; | ||
reaction4: string; | ||
reaction5: string; | ||
reaction6: string; | ||
reaction7: string; | ||
reaction8: string; | ||
nickError: string; | ||
mailError: string; | ||
wordHint: string; | ||
like: string; | ||
cancelLike: string; | ||
reply: string; | ||
cancelReply: string; | ||
preview: string; | ||
emoji: string; | ||
uploadImage: string; | ||
profile: string; | ||
logout: string; | ||
} | ||
@@ -610,2 +637,2 @@ | ||
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 }; | ||
export { RecentComments, WalineAbort, WalineComment, WalineCommentCountOptions, WalineCommentData, WalineCommentStatus, WalineDateLocale, WalineEmojiInfo, WalineEmojiMaps, WalineHighlighter, WalineImageUploader, WalineInitOptions, WalineInstance, WalineLevelLocale, WalineLocale, WalineMeta, WalinePageviewCountOptions, WalineProps, WalineReactionLocale, WalineRecentCommentsOptions, WalineRecentCommentsResult, WalineSearchImageData, WalineSearchOptions, WalineSearchResult, WalineTexRenderer, commentCount, defaultLocales, init, pageviewCount, version }; |
{ | ||
"name": "@waline/client", | ||
"version": "2.11.2", | ||
"version": "2.11.3", | ||
"description": "client for waline comment system", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
import { warning } from './logger'; | ||
import { resolveOldEmojiMap } from './valine'; | ||
import type { DeprecatedValineOptions } from './valine'; | ||
import { | ||
@@ -9,2 +7,4 @@ DROPPED_OPTIONS_WHICH_CAN_NOT_BE_POLYFILLED, | ||
} from './dropped'; | ||
import type { DeprecatedValineOptions } from './valine'; | ||
import type { DeprecatedWalineOptions } from './v1'; | ||
@@ -11,0 +11,0 @@ import type { WalineInitOptions } from '../typings'; |
@@ -7,5 +7,8 @@ import { useStorage } from '@vueuse/core'; | ||
export const VOTE_IDENTIFIER = 'id'; | ||
export const VOTE_INDEX = 'i'; | ||
export interface VoteLogItem { | ||
u: string; | ||
i: number; | ||
[VOTE_IDENTIFIER]: string; | ||
[VOTE_INDEX]: number; | ||
} | ||
@@ -12,0 +15,0 @@ |
@@ -42,4 +42,6 @@ export interface WalineEmojiInfo { | ||
export interface WalineSearchResult extends Record<string, unknown> { | ||
export interface WalineSearchImageData extends Record<string, unknown> { | ||
/** | ||
* 图片链接 | ||
* | ||
* Image link | ||
@@ -50,3 +52,9 @@ */ | ||
/** | ||
* Image title, optional | ||
* 图片标题 | ||
* | ||
* @description 用于图片的 alt 属性 | ||
* | ||
* Image title | ||
* | ||
* @description Used for alt attribute of image | ||
*/ | ||
@@ -56,4 +64,10 @@ title?: string; | ||
/** | ||
* Image preview link, optional | ||
* 图片缩略图 | ||
* | ||
* @description 为了更好的加载性能,我们会优先在列表中使用此缩略图 | ||
* | ||
* Image preview link | ||
* | ||
* @description For better loading performance, we will use this thumbnail first in the list | ||
* | ||
* @default src | ||
@@ -64,21 +78,33 @@ */ | ||
export type WalineSearchResult = WalineSearchImageData[]; | ||
export interface WalineSearchOptions { | ||
/** | ||
* 搜索操作 | ||
* | ||
* Search action | ||
*/ | ||
search: (word: string) => Promise<WalineSearchResult[]>; | ||
search: (word: string) => Promise<WalineSearchResult>; | ||
/** | ||
* Default search action | ||
* 打开列表时展示的默认结果 | ||
* | ||
* Default result when opening list | ||
* | ||
* @default () => search('') | ||
*/ | ||
default?: () => Promise<WalineSearchResult[]>; | ||
default?: () => Promise<WalineSearchResult>; | ||
/** | ||
* 获取更多的操作 | ||
* | ||
* @description 会在列表滚动到底部时触发,如果你的搜索服务支持分页功能,你应该设置此项实现无限滚动 | ||
* | ||
* Fetch more action | ||
* | ||
* @description It will be triggered when the list scrolls to the bottom. If your search service supports paging, you should set this to achieve infinite scrolling | ||
* | ||
* @default (word) => search(word) | ||
*/ | ||
more?: (word: string, currectCount: number) => Promise<WalineSearchResult[]>; | ||
more?: (word: string, currectCount: number) => Promise<WalineSearchResult>; | ||
} | ||
@@ -85,0 +111,0 @@ |
@@ -11,7 +11,21 @@ export interface WalineDateLocale { | ||
export interface WalineLocale extends WalineDateLocale, WalineLevelLocale { | ||
export interface WalineReactionLocale { | ||
reactionTitle: string; | ||
reaction0: string; | ||
reaction1: string; | ||
reaction2: string; | ||
reaction3: string; | ||
reaction4: string; | ||
reaction5: string; | ||
reaction6: string; | ||
reaction7: string; | ||
reaction8: string; | ||
} | ||
export interface WalineLocale | ||
extends WalineDateLocale, | ||
WalineLevelLocale, | ||
WalineReactionLocale { | ||
nick: string; | ||
nickError: string; | ||
mail: string; | ||
mailError: string; | ||
link: string; | ||
@@ -22,23 +36,15 @@ optional: string; | ||
submit: string; | ||
like: string; | ||
cancelLike: string; | ||
reply: string; | ||
cancelReply: string; | ||
comment: string; | ||
refresh: string; | ||
more: string; | ||
preview: string; | ||
emoji: string; | ||
uploadImage: string; | ||
uploading: string; | ||
login: string; | ||
logout: string; | ||
admin: string; | ||
sticky: string; | ||
word: string; | ||
wordHint: string; | ||
anonymous: string; | ||
gif: string; | ||
gifSearchPlaceholder: string; | ||
profile: string; | ||
// manage | ||
approved: string; | ||
@@ -48,15 +54,23 @@ waiting: string; | ||
unsticky: string; | ||
// sorting | ||
oldest: string; | ||
latest: string; | ||
hottest: string; | ||
reactionTitle: string; | ||
reaction0: string; | ||
reaction1: string; | ||
reaction2: string; | ||
reaction3: string; | ||
reaction4: string; | ||
reaction5: string; | ||
reaction6: string; | ||
reaction7: string; | ||
reaction8: string; | ||
// hint | ||
nickError: string; | ||
mailError: string; | ||
wordHint: string; | ||
// i18n | ||
like: string; | ||
cancelLike: string; | ||
reply: string; | ||
cancelReply: string; | ||
preview: string; | ||
emoji: string; | ||
uploadImage: string; | ||
profile: string; | ||
logout: string; | ||
} |
@@ -26,5 +26,7 @@ import { | ||
export interface WalineConfig extends Required<Omit<WalineProps, 'wordLimit'>> { | ||
export interface WalineConfig | ||
extends Required<Omit<WalineProps, 'wordLimit' | 'reaction'>> { | ||
locale: WalineLocale; | ||
wordLimit: [number, number] | false; | ||
reaction: string[]; | ||
} | ||
@@ -91,4 +93,8 @@ | ||
recaptchaV3Key, | ||
reaction: reaction === true ? defaultReaction : reaction || false, | ||
reaction: Array.isArray(reaction) | ||
? reaction | ||
: reaction === true | ||
? defaultReaction | ||
: [], | ||
...more, | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2226311
7377
9133
24