@inpageedit/core 0.12.1 → 0.13.0-alpha.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/BasePlugin-Bf2UuIHF.js +64 -0
- package/dist/BasePlugin-Bf2UuIHF.js.map +1 -0
- package/dist/{PluginPrefSync-Ziogy_o-.js → PluginPrefSync-Dn1Xsiqz.js} +6 -4
- package/dist/PluginPrefSync-Dn1Xsiqz.js.map +1 -0
- package/dist/{PluginStoreApp-Bnvyl-Oc.js → PluginStoreApp-CpOLArL7.js} +2 -2
- package/dist/{PluginStoreApp-Bnvyl-Oc.js.map → PluginStoreApp-CpOLArL7.js.map} +1 -1
- package/dist/WatchlistAction-BbNAyryN.js +5 -0
- package/dist/WatchlistAction-BbNAyryN.js.map +1 -0
- package/dist/endpoints-DgyuoRZd.js +1507 -0
- package/dist/endpoints-DgyuoRZd.js.map +1 -0
- package/dist/{index-BvuaLEFc.js → index-2RfILgXm.js} +11 -10
- package/dist/{index-BvuaLEFc.js.map → index-2RfILgXm.js.map} +1 -1
- package/dist/{index-eARjMi7f.js → index-BCdABp0e.js} +23 -22
- package/dist/{index-eARjMi7f.js.map → index-BCdABp0e.js.map} +1 -1
- package/dist/{index-zHTGCjfF.js → index-BJ7_Q1mB.js} +8 -7
- package/dist/{index-zHTGCjfF.js.map → index-BJ7_Q1mB.js.map} +1 -1
- package/dist/{index-Dnmv-xDn.js → index-BNh95-x2.js} +37 -49
- package/dist/index-BNh95-x2.js.map +1 -0
- package/dist/{index-B3FUDhxl.js → index-BQ-cHWkJ.js} +15 -16
- package/dist/{index-B3FUDhxl.js.map → index-BQ-cHWkJ.js.map} +1 -1
- package/dist/{index-B3YJdjxo.js → index-BwdWyHLe.js} +77 -76
- package/dist/{index-B3YJdjxo.js.map → index-BwdWyHLe.js.map} +1 -1
- package/dist/{index-Ccr3YhkP.js → index-CCRMmnwk.js} +10 -9
- package/dist/{index-Ccr3YhkP.js.map → index-CCRMmnwk.js.map} +1 -1
- package/dist/{index-Bd70aDMT.js → index-CnIpUF9x.js} +7 -6
- package/dist/{index-Bd70aDMT.js.map → index-CnIpUF9x.js.map} +1 -1
- package/dist/{index-D5zX93bn.js → index-CyG7_IYz.js} +47 -45
- package/dist/{index-D5zX93bn.js.map → index-CyG7_IYz.js.map} +1 -1
- package/dist/index-DdTiZqwt.js +3744 -0
- package/dist/index-DdTiZqwt.js.map +1 -0
- package/dist/{index-BRjEc8b8.js → index-eSlbrNqF.js} +6 -6
- package/dist/{index-BRjEc8b8.js.map → index-eSlbrNqF.js.map} +1 -1
- package/dist/index.d.ts +1723 -31
- package/dist/index.js +73 -9
- package/dist/index.js.map +1 -1
- package/dist/models/index.js +486 -0
- package/dist/models/index.js.map +1 -0
- package/dist/plugins/index.js +23 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/services/index.js +16 -0
- package/dist/services/index.js.map +1 -0
- package/dist/style.css +1 -1
- package/lib/index.umd.js +10 -10
- package/lib/index.umd.js.map +1 -1
- package/package.json +22 -25
- package/dist/InPageEdit.d.ts +0 -42
- package/dist/PluginPrefSync-Ziogy_o-.js.map +0 -1
- package/dist/__test__/utils/constants.d.ts +0 -3
- package/dist/components/ActionButton.d.ts +0 -6
- package/dist/components/CheckBox.d.ts +0 -10
- package/dist/components/Icon/IconEdit.d.ts +0 -2
- package/dist/components/Icon/IconQuickEdit.d.ts +0 -2
- package/dist/components/InputBox.d.ts +0 -11
- package/dist/components/MBox/index.d.ts +0 -14
- package/dist/components/MwUserLinks.d.ts +0 -6
- package/dist/components/ProgressBar/index.d.ts +0 -7
- package/dist/components/RadioBox.d.ts +0 -10
- package/dist/components/TabView/index.d.ts +0 -19
- package/dist/components/TwinSwapInput/index.d.ts +0 -19
- package/dist/components/index.d.ts +0 -8
- package/dist/components/utils.d.ts +0 -4
- package/dist/constants/endpoints.d.ts +0 -8
- package/dist/decorators/Preferences.d.ts +0 -35
- package/dist/index-DgQNTfPR.js +0 -5829
- package/dist/index-DgQNTfPR.js.map +0 -1
- package/dist/index-Dnmv-xDn.js.map +0 -1
- package/dist/models/MemoryStorage.d.ts +0 -10
- package/dist/models/WikiPage/index.d.ts +0 -76
- package/dist/models/WikiPage/types/PageInfo.d.ts +0 -58
- package/dist/models/WikiPage/types/PageParseData.d.ts +0 -17
- package/dist/models/WikiPage/types/WatchlistAction.d.ts +0 -6
- package/dist/models/WikiTitle/index.d.ts +0 -89
- package/dist/models/WikiTitle/index.spec.d.ts +0 -1
- package/dist/plugins/BasePlugin.d.ts +0 -25
- package/dist/plugins/_debug/index.d.ts +0 -8
- package/dist/plugins/analytics/index.d.ts +0 -41
- package/dist/plugins/in-article-links/index.d.ts +0 -44
- package/dist/plugins/plugin-store/index.d.ts +0 -56
- package/dist/plugins/plugin-store/schema.d.ts +0 -41
- package/dist/plugins/preferences-ui/PluginPrefSync.d.ts +0 -28
- package/dist/plugins/preferences-ui/index.d.ts +0 -48
- package/dist/plugins/quick-diff/components/DiffTable.d.ts +0 -23
- package/dist/plugins/quick-diff/index.d.ts +0 -85
- package/dist/plugins/quick-edit/index.d.ts +0 -79
- package/dist/plugins/quick-move/index.d.ts +0 -47
- package/dist/plugins/quick-preview/index.d.ts +0 -37
- package/dist/plugins/quick-redirect/index.d.ts +0 -48
- package/dist/plugins/toolbox/index.d.ts +0 -65
- package/dist/polyfills/Promise.withResolvers.d.ts +0 -5
- package/dist/polyfills/index.d.ts +0 -0
- package/dist/services/ApiService.d.ts +0 -14
- package/dist/services/CurrentPageService.d.ts +0 -28
- package/dist/services/ModalService.d.ts +0 -27
- package/dist/services/PreferencesService.d.ts +0 -94
- package/dist/services/ResourceLoaderService.d.ts +0 -17
- package/dist/services/WikiMetadataService.d.ts +0 -108
- package/dist/services/WikiPageService.d.ts +0 -20
- package/dist/services/WikiTitleService.d.ts +0 -70
- package/dist/services/storage/index.d.ts +0 -40
- package/dist/services/storage/managers/IDBStorageManager.d.ts +0 -28
- package/dist/services/storage/managers/LocalStorageManager.d.ts +0 -27
- package/dist/types/WikiMetadata.d.ts +0 -131
- package/dist/utils/computeable.d.ts +0 -2
- package/dist/utils/defineAsyncPlugin.d.ts +0 -2
- package/dist/utils/interpolate.d.ts +0 -20
- package/dist/utils/interpolate.spec.d.ts +0 -1
- package/dist/utils/makeCallable.d.ts +0 -3
- package/dist/utils/noop.d.ts +0 -1
- package/dist/utils/sleep.d.ts +0 -1
- package/dist/utils/string.d.ts +0 -7
- package/dist/utils/url.d.ts +0 -24
- package/dist/utils/vueHooks.d.ts +0 -6
- package/dist/utils/vueReactivity.d.ts +0 -2
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Inject, InPageEdit, Service } from '../InPageEdit';
|
|
2
|
-
import { IWikiPage, WikiPageConstructor } from '../models/WikiPage';
|
|
3
|
-
import { PageInfo } from '../models/WikiPage/types/PageInfo';
|
|
4
|
-
import { IWikiTitle } from '../models/WikiTitle/index.js';
|
|
5
|
-
declare module '../InPageEdit' {
|
|
6
|
-
interface InPageEdit {
|
|
7
|
-
wikiPage: WikiPageService;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export declare class WikiPageService extends Service {
|
|
11
|
-
ctx: InPageEdit;
|
|
12
|
-
static readonly inject: Inject;
|
|
13
|
-
WikiPage: WikiPageConstructor;
|
|
14
|
-
constructor(ctx: InPageEdit);
|
|
15
|
-
createInstance(payload: Record<string, any>, noCache?: boolean): Promise<IWikiPage>;
|
|
16
|
-
newFromTitle(title: string | IWikiTitle, converttitles?: boolean, rvsection?: number | string, noCache?: boolean): Promise<IWikiPage>;
|
|
17
|
-
newFromPageId(pageid: number, rvsection?: number | string, noCache?: boolean): Promise<IWikiPage>;
|
|
18
|
-
newFromRevision(revid: number, rvsection?: number | string, noCache?: boolean): Promise<IWikiPage>;
|
|
19
|
-
newBlankPage(init?: Partial<PageInfo>): IWikiPage;
|
|
20
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { Inject, InPageEdit, Service } from '../InPageEdit';
|
|
2
|
-
import { IWikiTitle, WikiTitleConstructor } from '../models/WikiTitle/index.js';
|
|
3
|
-
declare module '../InPageEdit' {
|
|
4
|
-
interface InPageEdit {
|
|
5
|
-
wikiTitle: WikiTitleService;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
export interface WikiLinkMetadata {
|
|
9
|
-
title?: IWikiTitle;
|
|
10
|
-
pageId?: number;
|
|
11
|
-
revId?: number;
|
|
12
|
-
url: URL;
|
|
13
|
-
params: URLSearchParams;
|
|
14
|
-
hash: string;
|
|
15
|
-
action: 'view' | 'edit' | 'create' | 'diff' | string;
|
|
16
|
-
}
|
|
17
|
-
export declare class WikiTitleService extends Service {
|
|
18
|
-
ctx: InPageEdit;
|
|
19
|
-
static readonly inject: Inject;
|
|
20
|
-
readonly Title: WikiTitleConstructor;
|
|
21
|
-
constructor(ctx: InPageEdit);
|
|
22
|
-
private readonly logger;
|
|
23
|
-
newTitle(title: string, namespace?: number): IWikiTitle;
|
|
24
|
-
newMainPageTitle(): IWikiTitle;
|
|
25
|
-
newTitleFromUrl(url: string | URL): Promise<IWikiTitle | null>;
|
|
26
|
-
private _cachedTitles;
|
|
27
|
-
private newTitleFromAnyId;
|
|
28
|
-
newTitleFromPageId(pageId: number): Promise<IWikiTitle | null>;
|
|
29
|
-
newTitleFromRevision(revId: number): Promise<IWikiTitle | null>;
|
|
30
|
-
/**
|
|
31
|
-
* Resolve **special** special pages to it's real target
|
|
32
|
-
*
|
|
33
|
-
* If target is self or cannot be resolved, return null
|
|
34
|
-
* @example
|
|
35
|
-
* ```
|
|
36
|
-
* Special:MyPage -> User:<username>
|
|
37
|
-
* Special:Edit/Page_Title -> Page_Title
|
|
38
|
-
* Special:NewSection/Page_Title -> Page_Title (section=new)
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
resolveSpecialPageTarget(input: IWikiTitle | string): {
|
|
42
|
-
title: IWikiTitle;
|
|
43
|
-
action?: string | undefined;
|
|
44
|
-
section?: number | 'new' | undefined;
|
|
45
|
-
} | null;
|
|
46
|
-
private readonly wiki;
|
|
47
|
-
/**
|
|
48
|
-
* @example "https://example.com"
|
|
49
|
-
*/
|
|
50
|
-
private readonly wikiBaseUrl;
|
|
51
|
-
/**
|
|
52
|
-
* Article path, with trailing slash
|
|
53
|
-
* @example "/wiki/" (if wgArticlePath is "/wiki/$1")
|
|
54
|
-
*/
|
|
55
|
-
private readonly wikiArticlePath;
|
|
56
|
-
/**
|
|
57
|
-
* Article base URL, with trailing slash
|
|
58
|
-
* @example "https://example.com/wiki/" (if wgArticlePath is "/wiki/$1")
|
|
59
|
-
*/
|
|
60
|
-
private readonly wikiArticleBaseUrl;
|
|
61
|
-
/**
|
|
62
|
-
* Script base URL, **without** trailing slash
|
|
63
|
-
* @example "https://example.com/w" (if wgScriptPath is "/w")
|
|
64
|
-
*/
|
|
65
|
-
private readonly wikiIndexPhpUrl;
|
|
66
|
-
isWikiLink(url: string): boolean;
|
|
67
|
-
static readonly REG_SKIPPED_HREF: RegExp;
|
|
68
|
-
validateHrefAttr(href: string | null): boolean;
|
|
69
|
-
parseWikiLink(link: string | URL): WikiLinkMetadata | null;
|
|
70
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { InPageEdit, Service } from '../../InPageEdit.js';
|
|
2
|
-
import { LocalStorageManager } from './managers/LocalStorageManager.js';
|
|
3
|
-
import { IDBStorageManager } from './managers/IDBStorageManager.js';
|
|
4
|
-
declare module '../../InPageEdit' {
|
|
5
|
-
interface InPageEdit {
|
|
6
|
-
storage: StorageService;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
export interface StorageServiceConfig {
|
|
10
|
-
dbName: string;
|
|
11
|
-
}
|
|
12
|
-
export declare class StorageService extends Service<StorageServiceConfig> {
|
|
13
|
-
config: StorageServiceConfig;
|
|
14
|
-
readonly kv: IDBStorageManager<any>;
|
|
15
|
-
readonly simpleKV: LocalStorageManager<any>;
|
|
16
|
-
readonly memoryKV: LocalStorageManager<any>;
|
|
17
|
-
constructor(ctx: InPageEdit, config: StorageServiceConfig);
|
|
18
|
-
createDatabase<T = any>(storeName: string, ttl?: number, version?: number, engine?: 'indexedDB' | 'localStorage' | 'sessionStorage' | 'memory'): AbstractIPEStorageManager<T>;
|
|
19
|
-
}
|
|
20
|
-
export interface TypedStorageEntry<T = any> {
|
|
21
|
-
/** last update time */
|
|
22
|
-
time: number;
|
|
23
|
-
/** stored value */
|
|
24
|
-
value: T;
|
|
25
|
-
/** version */
|
|
26
|
-
version?: number;
|
|
27
|
-
}
|
|
28
|
-
export interface AbstractIPEStorageManager<T = unknown> {
|
|
29
|
-
get(key: string, ttl?: number, setter?: () => Promise<any> | any): Promise<T | null>;
|
|
30
|
-
set(key: string, value: null | undefined): Promise<void>;
|
|
31
|
-
set(record: Record<string, T | null | undefined>): Promise<Record<string, TypedStorageEntry<T> | void>>;
|
|
32
|
-
set(key: string, value: T): Promise<TypedStorageEntry<T>>;
|
|
33
|
-
has(key: string, ttl?: number): Promise<boolean>;
|
|
34
|
-
delete(key: string): Promise<void>;
|
|
35
|
-
keys(): AsyncIterable<string>;
|
|
36
|
-
values(): AsyncIterable<TypedStorageEntry<T>>;
|
|
37
|
-
entries(): AsyncIterable<[string, TypedStorageEntry<T>]>;
|
|
38
|
-
updatedAt(key: string): Promise<number>;
|
|
39
|
-
clear(): Promise<this>;
|
|
40
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { IDBPlus } from 'idb-plus';
|
|
2
|
-
import { AbstractIPEStorageManager, TypedStorageEntry } from '../index.js';
|
|
3
|
-
export declare class IDBStorageManager<T = unknown> implements AbstractIPEStorageManager<T> {
|
|
4
|
-
readonly dbName: string;
|
|
5
|
-
readonly storeName: string;
|
|
6
|
-
ttl: number;
|
|
7
|
-
version?: number | undefined;
|
|
8
|
-
readonly db: IDBPlus<string, TypedStorageEntry<T>>;
|
|
9
|
-
keys: () => AsyncIterable<string>;
|
|
10
|
-
values: () => AsyncIterable<TypedStorageEntry<T>>;
|
|
11
|
-
entries: () => AsyncIterable<[string, TypedStorageEntry<T>]>;
|
|
12
|
-
constructor(dbName: string, storeName: string, ttl?: number, version?: number | undefined);
|
|
13
|
-
private _clearExpiredEntries;
|
|
14
|
-
get(key: string, ttl?: number, setter?: () => Promise<T> | T): Promise<T | null>;
|
|
15
|
-
set(key: string, value: null | undefined): Promise<void>;
|
|
16
|
-
set(key: string, value: T): Promise<TypedStorageEntry<T>>;
|
|
17
|
-
set(record: Record<string, T | null | undefined>): Promise<Record<string, TypedStorageEntry<T> | void>>;
|
|
18
|
-
has(key: string, ttl?: number): Promise<boolean>;
|
|
19
|
-
delete(key: string): Promise<void>;
|
|
20
|
-
updatedAt(key: string): Promise<number>;
|
|
21
|
-
private loadFromDB;
|
|
22
|
-
private checkIfExpired;
|
|
23
|
-
/**
|
|
24
|
-
* [DANGER] Use with caution!
|
|
25
|
-
* Delete all data from the database.
|
|
26
|
-
*/
|
|
27
|
-
clear(): Promise<this>;
|
|
28
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { AbstractIPEStorageManager, TypedStorageEntry } from '../index.js';
|
|
2
|
-
export declare class LocalStorageManager<T = unknown> implements AbstractIPEStorageManager<T> {
|
|
3
|
-
dbName?: string | undefined;
|
|
4
|
-
readonly storeName?: string | undefined;
|
|
5
|
-
ttl: number;
|
|
6
|
-
version?: number | undefined;
|
|
7
|
-
engine: 'localStorage' | 'sessionStorage' | 'memory';
|
|
8
|
-
private db;
|
|
9
|
-
constructor(dbName?: string | undefined, storeName?: string | undefined, ttl?: number, version?: number | undefined, engine?: 'localStorage' | 'sessionStorage' | 'memory');
|
|
10
|
-
private makeKey;
|
|
11
|
-
private load;
|
|
12
|
-
private getRaw;
|
|
13
|
-
private setRaw;
|
|
14
|
-
private deleteSync;
|
|
15
|
-
private isExpired;
|
|
16
|
-
get(key: string, ttl?: number, setter?: () => Promise<T> | T): Promise<T | null>;
|
|
17
|
-
set(key: string, value: null | undefined): Promise<void>;
|
|
18
|
-
set(key: string, value: T): Promise<TypedStorageEntry<T>>;
|
|
19
|
-
set(record: Record<string, T | null | undefined>): Promise<Record<string, TypedStorageEntry<T> | void>>;
|
|
20
|
-
has(key: string, ttl?: number): Promise<boolean>;
|
|
21
|
-
delete(key: string): Promise<void>;
|
|
22
|
-
updatedAt(key: string): Promise<number>;
|
|
23
|
-
clear(): Promise<this>;
|
|
24
|
-
keys(): AsyncIterable<string>;
|
|
25
|
-
values(): AsyncIterable<TypedStorageEntry<T>>;
|
|
26
|
-
entries(): AsyncIterable<[string, TypedStorageEntry<T>]>;
|
|
27
|
-
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
export interface WikiSiteInfo {
|
|
2
|
-
general: WikiSiteGeneralInfo;
|
|
3
|
-
specialpagealiases: WikiSpecialPageAlias[];
|
|
4
|
-
namespacealiases: WikiNameSpaceAlias[];
|
|
5
|
-
magicwords: WikiMagicWord[];
|
|
6
|
-
namespaces: Record<string, WikiNamespace>;
|
|
7
|
-
}
|
|
8
|
-
export interface WikiSiteGeneralInfo {
|
|
9
|
-
mainpage: string;
|
|
10
|
-
base: string;
|
|
11
|
-
sitename: string;
|
|
12
|
-
mainpageisdomainroot: boolean;
|
|
13
|
-
logo: string;
|
|
14
|
-
generator: string;
|
|
15
|
-
phpversion: string;
|
|
16
|
-
phpsapi: string;
|
|
17
|
-
dbtype: string;
|
|
18
|
-
dbversion: string;
|
|
19
|
-
imagewhitelistenabled: boolean;
|
|
20
|
-
langconversion: boolean;
|
|
21
|
-
titleconversion: boolean;
|
|
22
|
-
linkprefixcharset: string;
|
|
23
|
-
linkprefix: string;
|
|
24
|
-
linktrail: string;
|
|
25
|
-
legaltitlechars: string;
|
|
26
|
-
invalidusernamechars: string;
|
|
27
|
-
allunicodefixes: boolean;
|
|
28
|
-
fixarabicunicode: boolean;
|
|
29
|
-
fixmalayalamunicode: boolean;
|
|
30
|
-
'git-hash'?: string;
|
|
31
|
-
'git-branch'?: string;
|
|
32
|
-
case: 'first-letter' | string;
|
|
33
|
-
lang: string;
|
|
34
|
-
fallback?: {
|
|
35
|
-
code: string;
|
|
36
|
-
}[];
|
|
37
|
-
variants: {
|
|
38
|
-
code: string;
|
|
39
|
-
name: string;
|
|
40
|
-
}[];
|
|
41
|
-
rtl: boolean;
|
|
42
|
-
fallback8bitEncoding: string;
|
|
43
|
-
readonly: boolean;
|
|
44
|
-
writeapi: boolean;
|
|
45
|
-
maxarticlesize: number;
|
|
46
|
-
timezone: string;
|
|
47
|
-
timeoffset: number;
|
|
48
|
-
articlepath: string;
|
|
49
|
-
scriptpath: string;
|
|
50
|
-
script: string;
|
|
51
|
-
variantarticlepath: string | false;
|
|
52
|
-
server: string;
|
|
53
|
-
servername: string;
|
|
54
|
-
wikiid: string;
|
|
55
|
-
time: string;
|
|
56
|
-
misermode: boolean;
|
|
57
|
-
uploadsenabled: boolean;
|
|
58
|
-
maxuploadsize: number;
|
|
59
|
-
minuploadchunksize: number;
|
|
60
|
-
galleryoptions: {
|
|
61
|
-
imagesPerRow: number;
|
|
62
|
-
imageWidth: number;
|
|
63
|
-
imageHeight: number;
|
|
64
|
-
captionLength: boolean;
|
|
65
|
-
showBytes: boolean;
|
|
66
|
-
showDimensions: boolean;
|
|
67
|
-
mode: 'traditional' | string;
|
|
68
|
-
};
|
|
69
|
-
thumblimits: Record<`${number}`, number>;
|
|
70
|
-
imagelimits: Record<`${number}`, {
|
|
71
|
-
width: number;
|
|
72
|
-
height: number;
|
|
73
|
-
}>;
|
|
74
|
-
favicon: string;
|
|
75
|
-
centralidlookupprovider: string;
|
|
76
|
-
allcentralidlookupproviders: string[];
|
|
77
|
-
interwikimagic: boolean;
|
|
78
|
-
magiclinks: Record<string, boolean>;
|
|
79
|
-
categorycollation: 'uppercase' | string;
|
|
80
|
-
citeresponsivereferences: boolean;
|
|
81
|
-
}
|
|
82
|
-
export interface WikiSpecialPageAlias {
|
|
83
|
-
realname: string;
|
|
84
|
-
aliases: string[];
|
|
85
|
-
}
|
|
86
|
-
export interface WikiNameSpaceAlias {
|
|
87
|
-
id: number;
|
|
88
|
-
alias: string;
|
|
89
|
-
}
|
|
90
|
-
export interface WikiNamespace {
|
|
91
|
-
canonical?: string;
|
|
92
|
-
case: 'first-letter' | string;
|
|
93
|
-
content: boolean;
|
|
94
|
-
id: number;
|
|
95
|
-
name: string;
|
|
96
|
-
namespaceprotection?: string;
|
|
97
|
-
nonincludable: boolean;
|
|
98
|
-
subpages: boolean;
|
|
99
|
-
}
|
|
100
|
-
export interface WikiMagicWord {
|
|
101
|
-
name: string;
|
|
102
|
-
aliases: string[];
|
|
103
|
-
'case-sensitive': boolean;
|
|
104
|
-
}
|
|
105
|
-
export interface WikiUserInfo extends Partial<WikiUserBlockInfo> {
|
|
106
|
-
id: number;
|
|
107
|
-
name: string;
|
|
108
|
-
groups: string[];
|
|
109
|
-
rights: string[];
|
|
110
|
-
options: WikiUserOptions;
|
|
111
|
-
}
|
|
112
|
-
export interface WikiUserBlockInfo {
|
|
113
|
-
blockid: number;
|
|
114
|
-
blockedby: string;
|
|
115
|
-
blockedbyid: string;
|
|
116
|
-
blockreason: string;
|
|
117
|
-
blockedtimestamp: string;
|
|
118
|
-
blockexpiry: string;
|
|
119
|
-
}
|
|
120
|
-
type IntBool = 0 | 1;
|
|
121
|
-
export interface WikiUserOptions {
|
|
122
|
-
minordefault: IntBool;
|
|
123
|
-
watchcreations: IntBool;
|
|
124
|
-
watchdefault: IntBool;
|
|
125
|
-
watchdeletion: IntBool;
|
|
126
|
-
watchuploads: IntBool;
|
|
127
|
-
watchmoves: IntBool;
|
|
128
|
-
language: string;
|
|
129
|
-
[key: string]: unknown;
|
|
130
|
-
}
|
|
131
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* interpolate
|
|
3
|
-
* - 具名插值:`{{expr}}`,其中 expr 可为标识符或简单表达式(如 `{{ name || "world" }}`、`{{ name ? 'hi ' + name : '' }}`)。
|
|
4
|
-
* - 匿名插值:使用 `{{ $1 }}`、`{{ $2 }}`...,可用可变参数或数组提供位置参数。
|
|
5
|
-
* - 具名与匿名可混用;若缺失值,替换为空字符串。
|
|
6
|
-
*
|
|
7
|
-
* 示例:
|
|
8
|
-
* ```ts
|
|
9
|
-
* interpolate('hello, {{ name }}') // 'hello, '
|
|
10
|
-
* interpolate('hello, {{ name || "world" }}') // 'hello, world'
|
|
11
|
-
* interpolate('hello, {{ name || "world" }}', { name: 'dragon' }) // 'hello, dragon'
|
|
12
|
-
* interpolate('hello, {{ $1 }}. {{ $2 }}', 'dragon', 'yeah') // 'hello, dragon. yeah'
|
|
13
|
-
* interpolate('hello, {{ $1 }}. {{ $2 }}', ['dragon', 'yeah']) // 'hello, dragon. yeah'
|
|
14
|
-
* interpolate('hello, {{ $1 }}. {{ greeting || "" }}', { $1: 'dragon', greeting: 'yeah' }) // 'hello, dragon. yeah'
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export declare function interpolate(template: string): string;
|
|
18
|
-
export declare function interpolate(template: string, context: Record<string, unknown>): string;
|
|
19
|
-
export declare function interpolate(template: string, ...numricContext: string[]): string;
|
|
20
|
-
export declare function interpolate(template: string, numricContext: string[]): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const CALLABLE_APPLY_SYMBOL: unique symbol;
|
|
2
|
-
export declare const CALLABLE_CTOR_SYMBOL: unique symbol;
|
|
3
|
-
export declare function makeCallable<C extends object, M extends keyof C>(instance: C, method: M): C & ((...args: C[M] extends (...a: infer P) => any ? P : never) => C[M] extends (...a: any[]) => infer R ? R : never);
|
package/dist/utils/noop.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const noop: () => void;
|
package/dist/utils/sleep.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const sleep: (ms?: number) => Promise<unknown>;
|
package/dist/utils/string.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare function capitalize(source: string): string;
|
|
2
|
-
export declare function uncapitalize(source: string): string;
|
|
3
|
-
export declare function camelCase(source: string): string;
|
|
4
|
-
export declare function paramCase(source: string): string;
|
|
5
|
-
export declare function snakeCase(source: string): string;
|
|
6
|
-
export declare function trimSlash(source: string): string;
|
|
7
|
-
export declare function ensureSlash(source: string): string;
|
package/dist/utils/url.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transform a plain object into a URL search params string.
|
|
3
|
-
*
|
|
4
|
-
* @example
|
|
5
|
-
* ```
|
|
6
|
-
* makeURLSearchParams({ str: '123' }) // str=123
|
|
7
|
-
* makeURLSearchParams({ num: 123 }) // num=123
|
|
8
|
-
* makeURLSearchParams({ bool: true }) // bool=true
|
|
9
|
-
* makeURLSearchParams({ arr: [1, 2, 3] }) // arr=1&arr=2&arr=3
|
|
10
|
-
* makeURLSearchParams({ plainObj: { a: 1, b: 2 } }) // plainObj[a]=1&plainObj[b]=2
|
|
11
|
-
* makeURLSearchParams({ obj: <object> }) // obj=<object>.toString() (if object is not a primitive type)
|
|
12
|
-
* makeURLSearchParams({ empty: '' }) // empty=
|
|
13
|
-
* makeURLSearchParams({ null: null, undefined: undefined }) // (ignored)
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
export declare const makeSearchParams: (params?: Record<string, any>) => URLSearchParams;
|
|
17
|
-
/**
|
|
18
|
-
* Create a URL object with the given parameters.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```
|
|
22
|
-
* makeURL('https://example.com?existing=1', { foo: 'bar' }, 'baz') // https://example.com?existing=1&foo=bar#baz
|
|
23
|
-
*/
|
|
24
|
-
export declare const makeURL: (url: string | URL, params?: Record<string, any>, hash?: string) => URL;
|
package/dist/utils/vueHooks.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { InPageEdit } from '../InPageEdit';
|
|
2
|
-
import { App, createApp } from 'vue';
|
|
3
|
-
export declare const IPEInjectKey: unique symbol;
|
|
4
|
-
export declare const injectIPE: (ipe: InPageEdit, app?: App) => InPageEdit;
|
|
5
|
-
export declare const useIPE: () => InPageEdit;
|
|
6
|
-
export declare const createVueAppWithIPE: (ipe: InPageEdit, ...args: Parameters<typeof createApp>) => App<Element>;
|