artalk 2.7.2 → 2.7.3
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 +21 -0
- package/dist/Artalk.cjs +2 -0
- package/dist/Artalk.cjs.map +1 -0
- package/dist/Artalk.iife.js +1 -1
- package/dist/Artalk.iife.js.map +1 -1
- package/dist/Artalk.js +1 -1
- package/dist/Artalk.js.map +1 -1
- package/dist/{Artalk.es.js → Artalk.mjs} +96 -76
- package/dist/Artalk.mjs.map +1 -0
- package/dist/ArtalkLite.cjs +2 -0
- package/dist/ArtalkLite.cjs.map +1 -0
- package/dist/ArtalkLite.iife.js +1 -1
- package/dist/ArtalkLite.iife.js.map +1 -1
- package/dist/ArtalkLite.js +1 -1
- package/dist/ArtalkLite.js.map +1 -1
- package/dist/{ArtalkLite.es.js → ArtalkLite.mjs} +96 -81
- package/dist/ArtalkLite.mjs.map +1 -0
- package/dist/i18n/jp.cjs +1 -0
- package/dist/i18n/jp.d.cts +3 -0
- package/dist/i18n/jp.d.ts +3 -0
- package/dist/i18n/jp.mjs +93 -0
- package/dist/i18n/zh-TW.cjs +1 -0
- package/dist/i18n/zh-TW.d.cts +3 -0
- package/dist/i18n/zh-TW.d.ts +3 -0
- package/dist/i18n/zh-TW.mjs +93 -0
- package/dist/main.d.cts +1476 -0
- package/dist/main.d.ts +1476 -0
- package/package.json +60 -28
- package/dist/Artalk.es.js.map +0 -1
- package/dist/ArtalkLite.es.js.map +0 -1
- package/dist/src/api/_base.d.ts +0 -17
- package/dist/src/api/_options.d.ts +0 -24
- package/dist/src/api/_request.d.ts +0 -12
- package/dist/src/api/admin.d.ts +0 -10
- package/dist/src/api/captcha.d.ts +0 -14
- package/dist/src/api/comment.d.ts +0 -29
- package/dist/src/api/index.d.ts +0 -29
- package/dist/src/api/page.d.ts +0 -22
- package/dist/src/api/site.d.ts +0 -17
- package/dist/src/api/system.d.ts +0 -33
- package/dist/src/api/upload.d.ts +0 -11
- package/dist/src/api/user.d.ts +0 -42
- package/dist/src/artalk.d.ts +0 -35
- package/dist/src/comment/actions.d.ts +0 -17
- package/dist/src/comment/comment.d.ts +0 -66
- package/dist/src/comment/height-limit.d.ts +0 -30
- package/dist/src/comment/index.d.ts +0 -2
- package/dist/src/comment/render.d.ts +0 -46
- package/dist/src/comment/renders/actions.d.ts +0 -5
- package/dist/src/comment/renders/avatar.d.ts +0 -5
- package/dist/src/comment/renders/content.d.ts +0 -5
- package/dist/src/comment/renders/header.d.ts +0 -5
- package/dist/src/comment/renders/index.d.ts +0 -2
- package/dist/src/comment/renders/pending.d.ts +0 -5
- package/dist/src/comment/renders/reply-at.d.ts +0 -5
- package/dist/src/comment/renders/reply-to.d.ts +0 -5
- package/dist/src/components/action-btn.d.ts +0 -50
- package/dist/src/components/checker/admin.d.ts +0 -3
- package/dist/src/components/checker/captcha-renders.d.ts +0 -5
- package/dist/src/components/checker/captcha.d.ts +0 -3
- package/dist/src/components/checker/index.d.ts +0 -53
- package/dist/src/components/dialog.d.ts +0 -16
- package/dist/src/components/error-dialog.d.ts +0 -8
- package/dist/src/components/pagination.d.ts +0 -31
- package/dist/src/components/read-more-btn.d.ts +0 -33
- package/dist/src/config.d.ts +0 -24
- package/dist/src/context.d.ts +0 -45
- package/dist/src/data.d.ts +0 -27
- package/dist/src/defaults.d.ts +0 -3
- package/dist/src/editor/editor.d.ts +0 -31
- package/dist/src/editor/state.d.ts +0 -20
- package/dist/src/editor/ui.d.ts +0 -25
- package/dist/src/i18n/en.d.ts +0 -73
- package/dist/src/i18n/external.d.ts +0 -74
- package/dist/src/i18n/index.d.ts +0 -236
- package/dist/src/i18n/jp.d.ts +0 -73
- package/dist/src/i18n/zh-CN.d.ts +0 -3
- package/dist/src/i18n/zh-TW.d.ts +0 -73
- package/dist/src/layer/index.d.ts +0 -4
- package/dist/src/layer/layer-manager.d.ts +0 -9
- package/dist/src/layer/layer.d.ts +0 -12
- package/dist/src/layer/scrollbar-helper.d.ts +0 -5
- package/dist/src/layer/sidebar-layer.d.ts +0 -20
- package/dist/src/layer/wrap.d.ts +0 -13
- package/dist/src/lib/component.d.ts +0 -7
- package/dist/src/lib/detect.d.ts +0 -10
- package/dist/src/lib/event-manager.d.ts +0 -28
- package/dist/src/lib/highlight.d.ts +0 -1
- package/dist/src/lib/marked-renderer.d.ts +0 -4
- package/dist/src/lib/marked.d.ts +0 -11
- package/dist/src/lib/sanitizer.d.ts +0 -1
- package/dist/src/lib/ui.d.ts +0 -24
- package/dist/src/lib/user.d.ts +0 -21
- package/dist/src/lib/utils.d.ts +0 -41
- package/dist/src/list/comment.d.ts +0 -3
- package/dist/src/list/layout.d.ts +0 -23
- package/dist/src/list/list.d.ts +0 -14
- package/dist/src/list/nest.d.ts +0 -10
- package/dist/src/list/page.d.ts +0 -2
- package/dist/src/list/paginator/index.d.ts +0 -25
- package/dist/src/list/paginator/read-more.d.ts +0 -18
- package/dist/src/list/paginator/up-down.d.ts +0 -14
- package/dist/src/main.d.ts +0 -7
- package/dist/src/plugins/admin-only-elem.d.ts +0 -2
- package/dist/src/plugins/conf-remoter.d.ts +0 -2
- package/dist/src/plugins/dark-mode.d.ts +0 -2
- package/dist/src/plugins/editor/_kit.d.ts +0 -33
- package/dist/src/plugins/editor/_plug.d.ts +0 -29
- package/dist/src/plugins/editor/_sample.d.ts +0 -5
- package/dist/src/plugins/editor/closable.d.ts +0 -7
- package/dist/src/plugins/editor/emoticons.d.ts +0 -30
- package/dist/src/plugins/editor/header-event.d.ts +0 -6
- package/dist/src/plugins/editor/header-link.d.ts +0 -6
- package/dist/src/plugins/editor/header-user.d.ts +0 -16
- package/dist/src/plugins/editor/index.d.ts +0 -6
- package/dist/src/plugins/editor/local-storage.d.ts +0 -6
- package/dist/src/plugins/editor/mover.d.ts +0 -6
- package/dist/src/plugins/editor/preview.d.ts +0 -7
- package/dist/src/plugins/editor/state-edit.d.ts +0 -11
- package/dist/src/plugins/editor/state-reply.d.ts +0 -8
- package/dist/src/plugins/editor/submit-add.d.ts +0 -18
- package/dist/src/plugins/editor/submit-btn.d.ts +0 -5
- package/dist/src/plugins/editor/submit.d.ts +0 -17
- package/dist/src/plugins/editor/textarea.d.ts +0 -8
- package/dist/src/plugins/editor/upload.d.ts +0 -9
- package/dist/src/plugins/editor-kit.d.ts +0 -42
- package/dist/src/plugins/index.d.ts +0 -2
- package/dist/src/plugins/list/copyright.d.ts +0 -2
- package/dist/src/plugins/list/count.d.ts +0 -2
- package/dist/src/plugins/list/dropdown.d.ts +0 -2
- package/dist/src/plugins/list/error-dialog.d.ts +0 -2
- package/dist/src/plugins/list/fetch.d.ts +0 -2
- package/dist/src/plugins/list/goto-first.d.ts +0 -3
- package/dist/src/plugins/list/goto.d.ts +0 -2
- package/dist/src/plugins/list/index.d.ts +0 -3
- package/dist/src/plugins/list/loading.d.ts +0 -2
- package/dist/src/plugins/list/no-comment.d.ts +0 -2
- package/dist/src/plugins/list/reach-bottom.d.ts +0 -2
- package/dist/src/plugins/list/sidebar-btn.d.ts +0 -2
- package/dist/src/plugins/list/time-ticking.d.ts +0 -3
- package/dist/src/plugins/list/unread-badge.d.ts +0 -2
- package/dist/src/plugins/list/unread.d.ts +0 -2
- package/dist/src/plugins/list/with-editor.d.ts +0 -2
- package/dist/src/plugins/markdown.d.ts +0 -2
- package/dist/src/plugins/stat.d.ts +0 -13
- package/dist/src/plugins/version-check.d.ts +0 -2
- package/dist/src/service.d.ts +0 -36
- package/dist/tests/e2e/comment-add.spec.d.ts +0 -1
- package/dist/types/config.d.ts +0 -110
- package/dist/types/context.d.ts +0 -62
- package/dist/types/data.d.ts +0 -194
- package/dist/types/editor.d.ts +0 -76
- package/dist/types/event.d.ts +0 -39
- package/dist/types/global.d.ts +0 -1
- package/dist/types/index.d.ts +0 -7
- package/dist/types/plugin.d.ts +0 -2
- package/dist/types/sidebar.d.ts +0 -3
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
type BtnClickHandler = (btnEl: HTMLElement, dialog: Dialog) => boolean | void;
|
|
2
|
-
/**
|
|
3
|
-
* 对话框
|
|
4
|
-
*/
|
|
5
|
-
export default class Dialog {
|
|
6
|
-
$el: HTMLElement;
|
|
7
|
-
$content: HTMLElement;
|
|
8
|
-
$actions: HTMLElement;
|
|
9
|
-
constructor(contentEl: HTMLElement);
|
|
10
|
-
/** 按钮 · 确定 */
|
|
11
|
-
setYes(handler: BtnClickHandler): this;
|
|
12
|
-
/** 按钮 · 取消 */
|
|
13
|
-
setNo(handler: BtnClickHandler): this;
|
|
14
|
-
private onBtnClick;
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export interface PaginationOptions {
|
|
2
|
-
/** 每页条数 */
|
|
3
|
-
pageSize: number;
|
|
4
|
-
/** 回调函数 */
|
|
5
|
-
onChange: (offset: number) => void;
|
|
6
|
-
}
|
|
7
|
-
export default class Pagination {
|
|
8
|
-
private opts;
|
|
9
|
-
total: number;
|
|
10
|
-
$el: HTMLElement;
|
|
11
|
-
$input: HTMLInputElement;
|
|
12
|
-
inputTimer?: number;
|
|
13
|
-
$prevBtn: HTMLElement;
|
|
14
|
-
$nextBtn: HTMLElement;
|
|
15
|
-
page: number;
|
|
16
|
-
get pageSize(): number;
|
|
17
|
-
get offset(): number;
|
|
18
|
-
get maxPage(): number;
|
|
19
|
-
constructor(total: number, opts: PaginationOptions);
|
|
20
|
-
update(offset: number, total: number): void;
|
|
21
|
-
setInput(page: number): void;
|
|
22
|
-
input(now?: boolean): void;
|
|
23
|
-
prev(): void;
|
|
24
|
-
next(): void;
|
|
25
|
-
getHasMore(): boolean;
|
|
26
|
-
change(page: number): void;
|
|
27
|
-
checkDisabled(): void;
|
|
28
|
-
keydown(e: KeyboardEvent): void;
|
|
29
|
-
/** 加载 */
|
|
30
|
-
setLoading(isLoading: boolean): void;
|
|
31
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export interface ReadMoreBtnOptions {
|
|
2
|
-
/** 回调函数 */
|
|
3
|
-
onClick: (offset: number) => void;
|
|
4
|
-
pageSize: number;
|
|
5
|
-
text?: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* 阅读更多按钮
|
|
9
|
-
*/
|
|
10
|
-
export default class ReadMoreBtn {
|
|
11
|
-
opts: ReadMoreBtnOptions;
|
|
12
|
-
$el: HTMLElement;
|
|
13
|
-
private $loading;
|
|
14
|
-
private $text;
|
|
15
|
-
private offset;
|
|
16
|
-
private total;
|
|
17
|
-
private origText;
|
|
18
|
-
/** 是否有更多内容 */
|
|
19
|
-
get hasMore(): boolean;
|
|
20
|
-
constructor(opts: ReadMoreBtnOptions);
|
|
21
|
-
click(): void;
|
|
22
|
-
/** 显示 */
|
|
23
|
-
show(): void;
|
|
24
|
-
/** 隐藏 */
|
|
25
|
-
hide(): void;
|
|
26
|
-
/** 加载 */
|
|
27
|
-
setLoading(isLoading: boolean): void;
|
|
28
|
-
/** 错误提示 */
|
|
29
|
-
showErr(errMsg: string): void;
|
|
30
|
-
/** 更新数据 */
|
|
31
|
-
update(offset: number, total: number): void;
|
|
32
|
-
checkDisabled(): void;
|
|
33
|
-
}
|
package/dist/src/config.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ArtalkConfig, ContextApi } from '../types';
|
|
2
|
-
import type { ApiOptions } from './api/_options';
|
|
3
|
-
/**
|
|
4
|
-
* Merges the user custom config with the default config
|
|
5
|
-
*
|
|
6
|
-
* @param customConf - The custom config object which is provided by the user
|
|
7
|
-
* @returns The config for Artalk instance creation
|
|
8
|
-
*/
|
|
9
|
-
export declare function handelCustomConf(customConf: Partial<ArtalkConfig>): ArtalkConfig;
|
|
10
|
-
/**
|
|
11
|
-
* Handle the config which is provided by the server
|
|
12
|
-
*
|
|
13
|
-
* @param conf - The Server response config for control the frontend of Artalk remotely
|
|
14
|
-
* @returns The config for Artalk instance creation
|
|
15
|
-
*/
|
|
16
|
-
export declare function handleConfFormServer(conf: Partial<ArtalkConfig>): Partial<ArtalkConfig>;
|
|
17
|
-
/**
|
|
18
|
-
* Convert Artalk Config to ApiOptions for Api client
|
|
19
|
-
*
|
|
20
|
-
* @param conf - Artalk config
|
|
21
|
-
* @param ctx - If `ctx` not provided, `checkAdmin` and `checkCaptcha` will be disabled
|
|
22
|
-
* @returns ApiOptions for Api client instance creation
|
|
23
|
-
*/
|
|
24
|
-
export declare function convertApiOptions(conf: Partial<ArtalkConfig>, ctx?: ContextApi): ApiOptions;
|
package/dist/src/context.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/// <reference types="marked" />
|
|
2
|
-
import type { ArtalkConfig, CommentData, ListFetchParams, ContextApi, SidebarShowPayload } from '../types';
|
|
3
|
-
import type { TInjectedServices } from './service';
|
|
4
|
-
import { CheckerCaptchaPayload, CheckerPayload } from './components/checker';
|
|
5
|
-
import { DataManager } from './data';
|
|
6
|
-
import * as I18n from './i18n';
|
|
7
|
-
interface Context extends TInjectedServices {
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Artalk Context
|
|
11
|
-
*/
|
|
12
|
-
declare class Context implements ContextApi {
|
|
13
|
-
conf: ArtalkConfig;
|
|
14
|
-
data: DataManager;
|
|
15
|
-
$root: HTMLElement;
|
|
16
|
-
private events;
|
|
17
|
-
constructor(conf: ArtalkConfig, $root?: HTMLElement);
|
|
18
|
-
inject(depName: string, obj: any): void;
|
|
19
|
-
get(depName: string): any;
|
|
20
|
-
getApi(): any;
|
|
21
|
-
getData(): DataManager;
|
|
22
|
-
replyComment(commentData: CommentData, $comment: HTMLElement): void;
|
|
23
|
-
editComment(commentData: CommentData, $comment: HTMLElement): void;
|
|
24
|
-
fetch(params: Partial<ListFetchParams>): void;
|
|
25
|
-
reload(): void;
|
|
26
|
-
listGotoFirst(): void;
|
|
27
|
-
editorShowLoading(): void;
|
|
28
|
-
editorHideLoading(): void;
|
|
29
|
-
editorShowNotify(msg: any, type: any): void;
|
|
30
|
-
editorResetState(): void;
|
|
31
|
-
showSidebar(payload?: SidebarShowPayload): void;
|
|
32
|
-
hideSidebar(): void;
|
|
33
|
-
checkAdmin(payload: CheckerPayload): void;
|
|
34
|
-
checkCaptcha(payload: CheckerCaptchaPayload): void;
|
|
35
|
-
on(name: any, handler: any): void;
|
|
36
|
-
off(name: any, handler: any): void;
|
|
37
|
-
trigger(name: any, payload?: any): void;
|
|
38
|
-
$t(key: I18n.I18nKeys, args?: {
|
|
39
|
-
[key: string]: string;
|
|
40
|
-
}): string;
|
|
41
|
-
setDarkMode(darkMode: boolean | 'auto'): void;
|
|
42
|
-
updateConf(nConf: Partial<ArtalkConfig>): void;
|
|
43
|
-
getMarked(): typeof import("marked").marked | undefined;
|
|
44
|
-
}
|
|
45
|
-
export default Context;
|
package/dist/src/data.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { NotifyData, PageData, CommentData, DataManagerApi, ListFetchParams, ListLastFetchData, EventPayloadMap } from '../types';
|
|
2
|
-
import EventManager from './lib/event-manager';
|
|
3
|
-
export declare class DataManager implements DataManagerApi {
|
|
4
|
-
protected events: EventManager<EventPayloadMap>;
|
|
5
|
-
private loading;
|
|
6
|
-
private listLastFetch?;
|
|
7
|
-
private comments;
|
|
8
|
-
private unreads;
|
|
9
|
-
private page?;
|
|
10
|
-
constructor(events: EventManager<EventPayloadMap>);
|
|
11
|
-
getLoading(): boolean;
|
|
12
|
-
setLoading(val: boolean): void;
|
|
13
|
-
getListLastFetch(): ListLastFetchData | undefined;
|
|
14
|
-
setListLastFetch(val: ListLastFetchData): void;
|
|
15
|
-
getComments(): CommentData[];
|
|
16
|
-
fetchComments(params: Partial<ListFetchParams>): void;
|
|
17
|
-
findComment(id: number): CommentData | undefined;
|
|
18
|
-
clearComments(): void;
|
|
19
|
-
loadComments(partialComments: CommentData[]): void;
|
|
20
|
-
insertComment(comment: CommentData): void;
|
|
21
|
-
updateComment(comment: CommentData): void;
|
|
22
|
-
deleteComment(id: number): void;
|
|
23
|
-
getUnreads(): NotifyData[];
|
|
24
|
-
updateUnreads(unread: NotifyData[]): void;
|
|
25
|
-
getPage(): PageData | undefined;
|
|
26
|
-
updatePage(pageData: PageData): void;
|
|
27
|
-
}
|
package/dist/src/defaults.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { CommentData, ContextApi, EditorApi } from '../../types';
|
|
2
|
-
import Component from '../lib/component';
|
|
3
|
-
import { EditorUI } from './ui';
|
|
4
|
-
declare class Editor extends Component implements EditorApi {
|
|
5
|
-
private ui;
|
|
6
|
-
private state;
|
|
7
|
-
getUI(): EditorUI;
|
|
8
|
-
getPlugs(): import("../plugins/editor-kit").PlugManager | undefined;
|
|
9
|
-
getState(): import('../../types').EditorState;
|
|
10
|
-
constructor(ctx: ContextApi);
|
|
11
|
-
getHeaderInputEls(): {
|
|
12
|
-
nick: HTMLInputElement;
|
|
13
|
-
email: HTMLInputElement;
|
|
14
|
-
link: HTMLInputElement;
|
|
15
|
-
};
|
|
16
|
-
getContentFinal(): string;
|
|
17
|
-
getContentRaw(): string;
|
|
18
|
-
getContentMarked(): string;
|
|
19
|
-
setContent(val: string): void;
|
|
20
|
-
insertContent(val: string): void;
|
|
21
|
-
focus(): void;
|
|
22
|
-
reset(): void;
|
|
23
|
-
resetState(): void;
|
|
24
|
-
setReply(comment: CommentData, $comment: HTMLElement): void;
|
|
25
|
-
setEditComment(comment: CommentData, $comment: HTMLElement): void;
|
|
26
|
-
showNotify(msg: string, type: any): void;
|
|
27
|
-
showLoading(): void;
|
|
28
|
-
hideLoading(): void;
|
|
29
|
-
submit(): void;
|
|
30
|
-
}
|
|
31
|
-
export default Editor;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { EditorState, CommentData } from '../../types';
|
|
2
|
-
import type Editor from './editor';
|
|
3
|
-
export default class EditorStateManager {
|
|
4
|
-
private editor;
|
|
5
|
-
constructor(editor: Editor);
|
|
6
|
-
private stateCurt;
|
|
7
|
-
private stateUnmountFn;
|
|
8
|
-
/** Get current state */
|
|
9
|
-
get(): EditorState;
|
|
10
|
-
/**
|
|
11
|
-
* Switch editor state
|
|
12
|
-
*
|
|
13
|
-
* @param state The state to switch
|
|
14
|
-
* @param payload The cause of state switch
|
|
15
|
-
*/
|
|
16
|
-
switch(state: EditorState, payload?: {
|
|
17
|
-
$comment: HTMLElement;
|
|
18
|
-
comment: CommentData;
|
|
19
|
-
}): void;
|
|
20
|
-
}
|
package/dist/src/editor/ui.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
declare const Sel: {
|
|
2
|
-
$header: string;
|
|
3
|
-
$nick: string;
|
|
4
|
-
$email: string;
|
|
5
|
-
$link: string;
|
|
6
|
-
$textareaWrap: string;
|
|
7
|
-
$textarea: string;
|
|
8
|
-
$bottom: string;
|
|
9
|
-
$submitBtn: string;
|
|
10
|
-
$notifyWrap: string;
|
|
11
|
-
$plugBtnWrap: string;
|
|
12
|
-
$plugPanelWrap: string;
|
|
13
|
-
};
|
|
14
|
-
export interface EditorUI extends Record<keyof typeof Sel, HTMLElement> {
|
|
15
|
-
$el: HTMLElement;
|
|
16
|
-
$nick: HTMLInputElement;
|
|
17
|
-
$email: HTMLInputElement;
|
|
18
|
-
$link: HTMLInputElement;
|
|
19
|
-
$textarea: HTMLTextAreaElement;
|
|
20
|
-
$submitBtn: HTMLButtonElement;
|
|
21
|
-
$sendReply?: HTMLElement;
|
|
22
|
-
$editCancelBtn?: HTMLElement;
|
|
23
|
-
}
|
|
24
|
-
export declare function render(): EditorUI;
|
|
25
|
-
export {};
|
package/dist/src/i18n/en.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
placeholder: string;
|
|
3
|
-
noComment: string;
|
|
4
|
-
send: string;
|
|
5
|
-
save: string;
|
|
6
|
-
nick: string;
|
|
7
|
-
email: string;
|
|
8
|
-
link: string;
|
|
9
|
-
emoticon: string;
|
|
10
|
-
preview: string;
|
|
11
|
-
image: string;
|
|
12
|
-
uploadFail: string;
|
|
13
|
-
commentFail: string;
|
|
14
|
-
restoredMsg: string;
|
|
15
|
-
onlyAdminCanReply: string;
|
|
16
|
-
uploadLoginMsg: string;
|
|
17
|
-
counter: string;
|
|
18
|
-
sortLatest: string;
|
|
19
|
-
sortOldest: string;
|
|
20
|
-
sortBest: string;
|
|
21
|
-
sortAuthor: string;
|
|
22
|
-
openComment: string;
|
|
23
|
-
closeComment: string;
|
|
24
|
-
listLoadFailMsg: string;
|
|
25
|
-
listRetry: string;
|
|
26
|
-
loadMore: string;
|
|
27
|
-
admin: string;
|
|
28
|
-
reply: string;
|
|
29
|
-
voteUp: string;
|
|
30
|
-
voteDown: string;
|
|
31
|
-
voteFail: string;
|
|
32
|
-
readMore: string;
|
|
33
|
-
actionConfirm: string;
|
|
34
|
-
collapse: string;
|
|
35
|
-
collapsed: string;
|
|
36
|
-
collapsedMsg: string;
|
|
37
|
-
expand: string;
|
|
38
|
-
approved: string;
|
|
39
|
-
pending: string;
|
|
40
|
-
pendingMsg: string;
|
|
41
|
-
edit: string;
|
|
42
|
-
editCancel: string;
|
|
43
|
-
delete: string;
|
|
44
|
-
deleteConfirm: string;
|
|
45
|
-
pin: string;
|
|
46
|
-
unpin: string;
|
|
47
|
-
seconds: string;
|
|
48
|
-
minutes: string;
|
|
49
|
-
hours: string;
|
|
50
|
-
days: string;
|
|
51
|
-
now: string;
|
|
52
|
-
adminCheck: string;
|
|
53
|
-
captchaCheck: string;
|
|
54
|
-
confirm: string;
|
|
55
|
-
cancel: string;
|
|
56
|
-
msgCenter: string;
|
|
57
|
-
ctrlCenter: string;
|
|
58
|
-
frontend: string;
|
|
59
|
-
backend: string;
|
|
60
|
-
loading: string;
|
|
61
|
-
loadFail: string;
|
|
62
|
-
editing: string;
|
|
63
|
-
editFail: string;
|
|
64
|
-
deleting: string;
|
|
65
|
-
deleteFail: string;
|
|
66
|
-
reqGot: string;
|
|
67
|
-
reqAborted: string;
|
|
68
|
-
updateMsg: string;
|
|
69
|
-
currentVersion: string;
|
|
70
|
-
ignore: string;
|
|
71
|
-
open: string;
|
|
72
|
-
};
|
|
73
|
-
export default _default;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import type { I18n } from '.';
|
|
2
|
-
export declare const GLOBAL_LOCALES_KEY = "ArtalkI18n";
|
|
3
|
-
export declare function defineLocaleExternal(lang: string, locale: I18n, aliases?: string[]): {
|
|
4
|
-
placeholder: string;
|
|
5
|
-
noComment: string;
|
|
6
|
-
send: string;
|
|
7
|
-
save: string;
|
|
8
|
-
nick: string;
|
|
9
|
-
email: string;
|
|
10
|
-
link: string;
|
|
11
|
-
emoticon: string;
|
|
12
|
-
preview: string;
|
|
13
|
-
image: string;
|
|
14
|
-
uploadFail: string;
|
|
15
|
-
commentFail: string;
|
|
16
|
-
restoredMsg: string;
|
|
17
|
-
onlyAdminCanReply: string;
|
|
18
|
-
uploadLoginMsg: string;
|
|
19
|
-
counter: string;
|
|
20
|
-
sortLatest: string;
|
|
21
|
-
sortOldest: string;
|
|
22
|
-
sortBest: string;
|
|
23
|
-
sortAuthor: string;
|
|
24
|
-
openComment: string;
|
|
25
|
-
closeComment: string;
|
|
26
|
-
listLoadFailMsg: string;
|
|
27
|
-
listRetry: string;
|
|
28
|
-
loadMore: string;
|
|
29
|
-
admin: string;
|
|
30
|
-
reply: string;
|
|
31
|
-
voteUp: string;
|
|
32
|
-
voteDown: string;
|
|
33
|
-
voteFail: string;
|
|
34
|
-
readMore: string;
|
|
35
|
-
actionConfirm: string;
|
|
36
|
-
collapse: string;
|
|
37
|
-
collapsed: string;
|
|
38
|
-
collapsedMsg: string;
|
|
39
|
-
expand: string;
|
|
40
|
-
approved: string;
|
|
41
|
-
pending: string;
|
|
42
|
-
pendingMsg: string;
|
|
43
|
-
edit: string;
|
|
44
|
-
editCancel: string;
|
|
45
|
-
delete: string;
|
|
46
|
-
deleteConfirm: string;
|
|
47
|
-
pin: string;
|
|
48
|
-
unpin: string;
|
|
49
|
-
seconds: string;
|
|
50
|
-
minutes: string;
|
|
51
|
-
hours: string;
|
|
52
|
-
days: string;
|
|
53
|
-
now: string;
|
|
54
|
-
adminCheck: string;
|
|
55
|
-
captchaCheck: string;
|
|
56
|
-
confirm: string;
|
|
57
|
-
cancel: string;
|
|
58
|
-
msgCenter: string;
|
|
59
|
-
ctrlCenter: string;
|
|
60
|
-
frontend: string;
|
|
61
|
-
backend: string;
|
|
62
|
-
loading: string;
|
|
63
|
-
loadFail: string;
|
|
64
|
-
editing: string;
|
|
65
|
-
editFail: string;
|
|
66
|
-
deleting: string;
|
|
67
|
-
deleteFail: string;
|
|
68
|
-
reqGot: string;
|
|
69
|
-
reqAborted: string;
|
|
70
|
-
updateMsg: string;
|
|
71
|
-
currentVersion: string;
|
|
72
|
-
ignore: string;
|
|
73
|
-
open: string;
|
|
74
|
-
};
|
package/dist/src/i18n/index.d.ts
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import en from './en';
|
|
2
|
-
export type I18n = typeof en;
|
|
3
|
-
export type I18nKeys = keyof I18n;
|
|
4
|
-
export declare const internal: {
|
|
5
|
-
en: {
|
|
6
|
-
placeholder: string;
|
|
7
|
-
noComment: string;
|
|
8
|
-
send: string;
|
|
9
|
-
save: string;
|
|
10
|
-
nick: string;
|
|
11
|
-
email: string;
|
|
12
|
-
link: string;
|
|
13
|
-
emoticon: string;
|
|
14
|
-
preview: string;
|
|
15
|
-
image: string;
|
|
16
|
-
uploadFail: string;
|
|
17
|
-
commentFail: string;
|
|
18
|
-
restoredMsg: string;
|
|
19
|
-
onlyAdminCanReply: string;
|
|
20
|
-
uploadLoginMsg: string;
|
|
21
|
-
counter: string;
|
|
22
|
-
sortLatest: string;
|
|
23
|
-
sortOldest: string;
|
|
24
|
-
sortBest: string;
|
|
25
|
-
sortAuthor: string;
|
|
26
|
-
openComment: string;
|
|
27
|
-
closeComment: string;
|
|
28
|
-
listLoadFailMsg: string;
|
|
29
|
-
listRetry: string;
|
|
30
|
-
loadMore: string;
|
|
31
|
-
admin: string;
|
|
32
|
-
reply: string;
|
|
33
|
-
voteUp: string;
|
|
34
|
-
voteDown: string;
|
|
35
|
-
voteFail: string;
|
|
36
|
-
readMore: string;
|
|
37
|
-
actionConfirm: string;
|
|
38
|
-
collapse: string;
|
|
39
|
-
collapsed: string;
|
|
40
|
-
collapsedMsg: string;
|
|
41
|
-
expand: string;
|
|
42
|
-
approved: string;
|
|
43
|
-
pending: string;
|
|
44
|
-
pendingMsg: string;
|
|
45
|
-
edit: string;
|
|
46
|
-
editCancel: string;
|
|
47
|
-
delete: string;
|
|
48
|
-
deleteConfirm: string;
|
|
49
|
-
pin: string;
|
|
50
|
-
unpin: string;
|
|
51
|
-
seconds: string;
|
|
52
|
-
minutes: string;
|
|
53
|
-
hours: string;
|
|
54
|
-
days: string;
|
|
55
|
-
now: string;
|
|
56
|
-
adminCheck: string;
|
|
57
|
-
captchaCheck: string;
|
|
58
|
-
confirm: string;
|
|
59
|
-
cancel: string;
|
|
60
|
-
msgCenter: string;
|
|
61
|
-
ctrlCenter: string;
|
|
62
|
-
frontend: string;
|
|
63
|
-
backend: string;
|
|
64
|
-
loading: string;
|
|
65
|
-
loadFail: string;
|
|
66
|
-
editing: string;
|
|
67
|
-
editFail: string;
|
|
68
|
-
deleting: string;
|
|
69
|
-
deleteFail: string;
|
|
70
|
-
reqGot: string;
|
|
71
|
-
reqAborted: string;
|
|
72
|
-
updateMsg: string;
|
|
73
|
-
currentVersion: string;
|
|
74
|
-
ignore: string;
|
|
75
|
-
open: string;
|
|
76
|
-
};
|
|
77
|
-
'en-US': {
|
|
78
|
-
placeholder: string;
|
|
79
|
-
noComment: string;
|
|
80
|
-
send: string;
|
|
81
|
-
save: string;
|
|
82
|
-
nick: string;
|
|
83
|
-
email: string;
|
|
84
|
-
link: string;
|
|
85
|
-
emoticon: string;
|
|
86
|
-
preview: string;
|
|
87
|
-
image: string;
|
|
88
|
-
uploadFail: string;
|
|
89
|
-
commentFail: string;
|
|
90
|
-
restoredMsg: string;
|
|
91
|
-
onlyAdminCanReply: string;
|
|
92
|
-
uploadLoginMsg: string;
|
|
93
|
-
counter: string;
|
|
94
|
-
sortLatest: string;
|
|
95
|
-
sortOldest: string;
|
|
96
|
-
sortBest: string;
|
|
97
|
-
sortAuthor: string;
|
|
98
|
-
openComment: string;
|
|
99
|
-
closeComment: string;
|
|
100
|
-
listLoadFailMsg: string;
|
|
101
|
-
listRetry: string;
|
|
102
|
-
loadMore: string;
|
|
103
|
-
admin: string;
|
|
104
|
-
reply: string;
|
|
105
|
-
voteUp: string;
|
|
106
|
-
voteDown: string;
|
|
107
|
-
voteFail: string;
|
|
108
|
-
readMore: string;
|
|
109
|
-
actionConfirm: string;
|
|
110
|
-
collapse: string;
|
|
111
|
-
collapsed: string;
|
|
112
|
-
collapsedMsg: string;
|
|
113
|
-
expand: string;
|
|
114
|
-
approved: string;
|
|
115
|
-
pending: string;
|
|
116
|
-
pendingMsg: string;
|
|
117
|
-
edit: string;
|
|
118
|
-
editCancel: string;
|
|
119
|
-
delete: string;
|
|
120
|
-
deleteConfirm: string;
|
|
121
|
-
pin: string;
|
|
122
|
-
unpin: string;
|
|
123
|
-
seconds: string;
|
|
124
|
-
minutes: string;
|
|
125
|
-
hours: string;
|
|
126
|
-
days: string;
|
|
127
|
-
now: string;
|
|
128
|
-
adminCheck: string;
|
|
129
|
-
captchaCheck: string;
|
|
130
|
-
confirm: string;
|
|
131
|
-
cancel: string;
|
|
132
|
-
msgCenter: string;
|
|
133
|
-
ctrlCenter: string;
|
|
134
|
-
frontend: string;
|
|
135
|
-
backend: string;
|
|
136
|
-
loading: string;
|
|
137
|
-
loadFail: string;
|
|
138
|
-
editing: string;
|
|
139
|
-
editFail: string;
|
|
140
|
-
deleting: string;
|
|
141
|
-
deleteFail: string;
|
|
142
|
-
reqGot: string;
|
|
143
|
-
reqAborted: string;
|
|
144
|
-
updateMsg: string;
|
|
145
|
-
currentVersion: string;
|
|
146
|
-
ignore: string;
|
|
147
|
-
open: string;
|
|
148
|
-
};
|
|
149
|
-
'zh-CN': {
|
|
150
|
-
placeholder: string;
|
|
151
|
-
noComment: string;
|
|
152
|
-
send: string;
|
|
153
|
-
save: string;
|
|
154
|
-
nick: string;
|
|
155
|
-
email: string;
|
|
156
|
-
link: string;
|
|
157
|
-
emoticon: string;
|
|
158
|
-
preview: string;
|
|
159
|
-
image: string;
|
|
160
|
-
uploadFail: string;
|
|
161
|
-
commentFail: string;
|
|
162
|
-
restoredMsg: string;
|
|
163
|
-
onlyAdminCanReply: string;
|
|
164
|
-
uploadLoginMsg: string;
|
|
165
|
-
counter: string;
|
|
166
|
-
sortLatest: string;
|
|
167
|
-
sortOldest: string;
|
|
168
|
-
sortBest: string;
|
|
169
|
-
sortAuthor: string;
|
|
170
|
-
openComment: string;
|
|
171
|
-
closeComment: string;
|
|
172
|
-
listLoadFailMsg: string;
|
|
173
|
-
listRetry: string;
|
|
174
|
-
loadMore: string;
|
|
175
|
-
admin: string;
|
|
176
|
-
reply: string;
|
|
177
|
-
voteUp: string;
|
|
178
|
-
voteDown: string;
|
|
179
|
-
voteFail: string;
|
|
180
|
-
readMore: string;
|
|
181
|
-
actionConfirm: string;
|
|
182
|
-
collapse: string;
|
|
183
|
-
collapsed: string;
|
|
184
|
-
collapsedMsg: string;
|
|
185
|
-
expand: string;
|
|
186
|
-
approved: string;
|
|
187
|
-
pending: string;
|
|
188
|
-
pendingMsg: string;
|
|
189
|
-
edit: string;
|
|
190
|
-
editCancel: string;
|
|
191
|
-
delete: string;
|
|
192
|
-
deleteConfirm: string;
|
|
193
|
-
pin: string;
|
|
194
|
-
unpin: string;
|
|
195
|
-
seconds: string;
|
|
196
|
-
minutes: string;
|
|
197
|
-
hours: string;
|
|
198
|
-
days: string;
|
|
199
|
-
now: string;
|
|
200
|
-
adminCheck: string;
|
|
201
|
-
captchaCheck: string;
|
|
202
|
-
confirm: string;
|
|
203
|
-
cancel: string;
|
|
204
|
-
msgCenter: string;
|
|
205
|
-
ctrlCenter: string;
|
|
206
|
-
frontend: string;
|
|
207
|
-
backend: string;
|
|
208
|
-
loading: string;
|
|
209
|
-
loadFail: string;
|
|
210
|
-
editing: string;
|
|
211
|
-
editFail: string;
|
|
212
|
-
deleting: string;
|
|
213
|
-
deleteFail: string;
|
|
214
|
-
reqGot: string;
|
|
215
|
-
reqAborted: string;
|
|
216
|
-
updateMsg: string;
|
|
217
|
-
currentVersion: string;
|
|
218
|
-
ignore: string;
|
|
219
|
-
open: string;
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
/**
|
|
223
|
-
* find a locale object by language name
|
|
224
|
-
*/
|
|
225
|
-
export declare function findLocaleSet(lang: string): I18n;
|
|
226
|
-
/**
|
|
227
|
-
* Set system locale
|
|
228
|
-
*/
|
|
229
|
-
export declare function setLocale(locale: I18n | string): void;
|
|
230
|
-
/**
|
|
231
|
-
* Get an i18n message by key
|
|
232
|
-
*/
|
|
233
|
-
export declare function t(key: I18nKeys, args?: {
|
|
234
|
-
[key: string]: string;
|
|
235
|
-
}): string;
|
|
236
|
-
export default t;
|