@inpageedit/core 0.14.5 → 0.16.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/{ActionButton-CRjo_l3y.js → ActionButton-B6OUgtHx.js} +2 -2
- package/dist/{ActionButton-CRjo_l3y.js.map → ActionButton-B6OUgtHx.js.map} +1 -1
- package/dist/CheckBox-Dx3r3LQz.js +13 -0
- package/dist/CheckBox-Dx3r3LQz.js.map +1 -0
- package/dist/IconQuickDiff-BkbxyY-d.js +29 -0
- package/dist/IconQuickDiff-BkbxyY-d.js.map +1 -0
- package/dist/IconQuickEdit-BiRYADU_.js +68 -0
- package/dist/IconQuickEdit-BiRYADU_.js.map +1 -0
- package/dist/IconUpload-Bz4BW_nc.js +27 -0
- package/dist/IconUpload-Bz4BW_nc.js.map +1 -0
- package/dist/InPageEdit.js +20 -0
- package/dist/InPageEdit.js.map +1 -0
- package/dist/InputBox-D2ZRTMFP.js +42 -0
- package/dist/InputBox-D2ZRTMFP.js.map +1 -0
- package/dist/PluginImagesUsed-BVyvFA1_.js +90 -0
- package/dist/PluginImagesUsed-BVyvFA1_.js.map +1 -0
- package/dist/{PluginPrefSync-CbFuuC19.js → PluginPrefSync-CUKkx4Qk.js} +11 -11
- package/dist/{PluginPrefSync-CbFuuC19.js.map → PluginPrefSync-CUKkx4Qk.js.map} +1 -1
- package/dist/{PluginStoreApp-MbC3G9tu.js → PluginStoreApp-CoOAw1fr.js} +4 -4
- package/dist/{PluginStoreApp-MbC3G9tu.js.map → PluginStoreApp-CoOAw1fr.js.map} +1 -1
- package/dist/PluginTemplatesUsed-CdjT1wR4.js +76 -0
- package/dist/PluginTemplatesUsed-CdjT1wR4.js.map +1 -0
- package/dist/{index-CM_6yF2v.js → Promise.withResolvers-C4chhLB1.js} +17 -11
- package/dist/Promise.withResolvers-C4chhLB1.js.map +1 -0
- package/dist/{RadioBox-0UuxlcWZ.js → RadioBox-B0z9YHQg.js} +2 -2
- package/dist/{RadioBox-0UuxlcWZ.js.map → RadioBox-B0z9YHQg.js.map} +1 -1
- package/dist/components/index.js +75 -46
- package/dist/components/index.js.map +1 -1
- package/dist/{BasePlugin-DD7l-5Xw.js → core.js} +28 -10
- package/dist/core.js.map +1 -0
- package/dist/{index-De25v1_Q.js → index-1tsXE6ax.js} +11 -10
- package/dist/index-1tsXE6ax.js.map +1 -0
- package/dist/{index-WfXtYVMt.js → index-B32tFyLB.js} +132 -100
- package/dist/index-B32tFyLB.js.map +1 -0
- package/dist/index-BPTMltVf.js +170 -0
- package/dist/index-BPTMltVf.js.map +1 -0
- package/dist/{index-DKCZDN-Q.js → index-BYlcHc-O.js} +23 -25
- package/dist/index-BYlcHc-O.js.map +1 -0
- package/dist/{index-CnR6CqkM.js → index-C4qm_X_A.js} +11 -11
- package/dist/{index-CnR6CqkM.js.map → index-C4qm_X_A.js.map} +1 -1
- package/dist/index-CAtPo7xJ.js +793 -0
- package/dist/index-CAtPo7xJ.js.map +1 -0
- package/dist/{index-DensW9qt.js → index-CVCy0wPP.js} +9 -8
- package/dist/index-CVCy0wPP.js.map +1 -0
- package/dist/index-CYfkwXRf.js +1631 -0
- package/dist/index-CYfkwXRf.js.map +1 -0
- package/dist/index-DZa9mxN4.js +168 -0
- package/dist/index-DZa9mxN4.js.map +1 -0
- package/dist/{index-BpQ6VGMz.js → index-Dm2vgYkZ.js} +89 -67
- package/dist/index-Dm2vgYkZ.js.map +1 -0
- package/dist/{index-BanevHQ2.js → index-NWWeW3tX.js} +87 -84
- package/dist/index-NWWeW3tX.js.map +1 -0
- package/dist/index-QnWieXQc.js +4932 -0
- package/dist/index-QnWieXQc.js.map +1 -0
- package/dist/{index-B3jld2sl.js → index-bQ0CVu3l.js} +13 -17
- package/dist/{index-B3jld2sl.js.map → index-bQ0CVu3l.js.map} +1 -1
- package/dist/index-ygc4AMy4.js +44 -0
- package/dist/index-ygc4AMy4.js.map +1 -0
- package/dist/{index-DD5CVCfD.js → index-z_qDGCMT.js} +2 -2
- package/dist/{index-DD5CVCfD.js.map → index-z_qDGCMT.js.map} +1 -1
- package/dist/index.d.ts +411 -163
- package/dist/index.js +24 -26
- package/dist/index.js.map +1 -1
- package/dist/{makeCallable-LDU0xZMJ.js → makeCallable-Cg4zUG4c.js} +2 -2
- package/dist/{makeCallable-LDU0xZMJ.js.map → makeCallable-Cg4zUG4c.js.map} +1 -1
- package/dist/models/index.js +7 -7
- package/dist/models/index.js.map +1 -1
- package/dist/plugins/index.js +18 -14
- package/dist/plugins/index.js.map +1 -1
- package/dist/services/index.js +11 -9
- package/dist/style.css +1 -1
- package/dist/{vueHooks-l04s8cIl.js → vueHooks-Bs93iP61.js} +1519 -1492
- package/dist/vueHooks-Bs93iP61.js.map +1 -0
- package/lib/index.umd.js +19 -13
- package/lib/index.umd.js.map +1 -1
- package/lib/style.css +1 -1
- package/package.json +38 -27
- package/dist/BasePlugin-DD7l-5Xw.js.map +0 -1
- package/dist/IconQuickEdit-CMCQncyj.js +0 -27
- package/dist/IconQuickEdit-CMCQncyj.js.map +0 -1
- package/dist/InputBox-nQKtiWtZ.js +0 -30
- package/dist/InputBox-nQKtiWtZ.js.map +0 -1
- package/dist/Preferences-C10tZMl1.js +0 -2701
- package/dist/Preferences-C10tZMl1.js.map +0 -1
- package/dist/WatchlistAction-BbNAyryN.js +0 -5
- package/dist/WatchlistAction-BbNAyryN.js.map +0 -1
- package/dist/index-7R2LfhNn.js +0 -220
- package/dist/index-7R2LfhNn.js.map +0 -1
- package/dist/index-BXNyXvre.js +0 -116
- package/dist/index-BXNyXvre.js.map +0 -1
- package/dist/index-BanevHQ2.js.map +0 -1
- package/dist/index-BjDTD66_.js +0 -491
- package/dist/index-BjDTD66_.js.map +0 -1
- package/dist/index-BpQ6VGMz.js.map +0 -1
- package/dist/index-CG38LlAh.js +0 -46
- package/dist/index-CG38LlAh.js.map +0 -1
- package/dist/index-CM_6yF2v.js.map +0 -1
- package/dist/index-DKCZDN-Q.js.map +0 -1
- package/dist/index-De25v1_Q.js.map +0 -1
- package/dist/index-DensW9qt.js.map +0 -1
- package/dist/index-DxaqNWv4.js +0 -3090
- package/dist/index-DxaqNWv4.js.map +0 -1
- package/dist/index-WfXtYVMt.js.map +0 -1
- package/dist/vueHooks-l04s8cIl.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -10,11 +10,13 @@ import { IDBPlus } from "idb-plus";
|
|
|
10
10
|
import "@/styles/index.scss";
|
|
11
11
|
import Schema, { default as Schema$1 } from "schemastery";
|
|
12
12
|
import * as jsx_dom0 from "jsx-dom";
|
|
13
|
-
import { JSX, ReactElement, ReactNode } from "jsx-dom";
|
|
13
|
+
import { JSX, ReactElement, ReactNode, SVGProps } from "jsx-dom";
|
|
14
14
|
import { JSX as JSX$1 } from "jsx-dom/jsx-runtime";
|
|
15
15
|
import { JSX as JSX$2 } from "vue/jsx-runtime";
|
|
16
16
|
import * as vue0 from "vue";
|
|
17
17
|
import { App } from "vue";
|
|
18
|
+
import "./plugins/quick-preview/style.scss";
|
|
19
|
+
import "./plugins/quick-upload/style.scss";
|
|
18
20
|
import "./plugins/toolbox/styles.scss";
|
|
19
21
|
export * from "@inpageedit/logger";
|
|
20
22
|
export * from "wiki-saikou/browser";
|
|
@@ -22,19 +24,6 @@ export * from "@inpageedit/modal";
|
|
|
22
24
|
|
|
23
25
|
//#region rolldown:runtime
|
|
24
26
|
//#endregion
|
|
25
|
-
//#region src/services/ApiService.d.ts
|
|
26
|
-
// ↓ '@/InPageEdit'
|
|
27
|
-
declare module '.' {
|
|
28
|
-
interface InPageEdit {
|
|
29
|
-
api: MwApi;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
interface ApiServiceOptions extends Partial<FexiosConfigs> {}
|
|
33
|
-
declare class ApiService {
|
|
34
|
-
ctx: InPageEdit;
|
|
35
|
-
constructor(ctx: InPageEdit, options?: Partial<ApiServiceOptions>);
|
|
36
|
-
}
|
|
37
|
-
//#endregion
|
|
38
27
|
//#region src/types/WikiMetadata.d.ts
|
|
39
28
|
interface WikiSiteInfo {
|
|
40
29
|
general: WikiSiteGeneralInfo;
|
|
@@ -42,6 +31,7 @@ interface WikiSiteInfo {
|
|
|
42
31
|
namespacealiases: WikiNameSpaceAlias[];
|
|
43
32
|
magicwords: WikiMagicWord[];
|
|
44
33
|
namespaces: Record<string, WikiNamespace>;
|
|
34
|
+
repos: WikiFileRepo[];
|
|
45
35
|
}
|
|
46
36
|
interface WikiSiteGeneralInfo {
|
|
47
37
|
mainpage: string;
|
|
@@ -166,6 +156,35 @@ interface WikiUserOptions {
|
|
|
166
156
|
language: string;
|
|
167
157
|
[key: string]: unknown;
|
|
168
158
|
}
|
|
159
|
+
interface WikiFileRepo {
|
|
160
|
+
name: string;
|
|
161
|
+
displayname: string;
|
|
162
|
+
rootUrl: string;
|
|
163
|
+
local: boolean;
|
|
164
|
+
url: string;
|
|
165
|
+
thumbUrl: string;
|
|
166
|
+
initialCapital: boolean;
|
|
167
|
+
scriptDirUrl: string;
|
|
168
|
+
canUpload: boolean;
|
|
169
|
+
}
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region src/services/ApiService.d.ts
|
|
172
|
+
// ↓ '@/InPageEdit'
|
|
173
|
+
declare module '.' {
|
|
174
|
+
interface InPageEdit {
|
|
175
|
+
api: MwApi;
|
|
176
|
+
apiService: ApiService;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
interface ApiServiceOptions extends Partial<FexiosConfigs> {}
|
|
180
|
+
declare class ApiService {
|
|
181
|
+
ctx: InPageEdit;
|
|
182
|
+
private options;
|
|
183
|
+
api: MwApi;
|
|
184
|
+
constructor(ctx: InPageEdit, options?: Partial<ApiServiceOptions>);
|
|
185
|
+
private _apiClients;
|
|
186
|
+
getClientByFileRepo(repo: WikiFileRepo): MwApi;
|
|
187
|
+
}
|
|
169
188
|
//#endregion
|
|
170
189
|
//#region src/models/WikiTitle/index.d.ts
|
|
171
190
|
interface IWikiTitle {
|
|
@@ -332,102 +351,6 @@ declare class ModalService {
|
|
|
332
351
|
notify: (...args: Parameters<typeof CustomIPEModal.notify>) => CustomIPEModal;
|
|
333
352
|
}
|
|
334
353
|
//#endregion
|
|
335
|
-
//#region src/services/storage/managers/LocalStorageManager.d.ts
|
|
336
|
-
declare class LocalStorageManager<T = unknown> implements AbstractIPEStorageManager<T> {
|
|
337
|
-
dbName?: string | undefined;
|
|
338
|
-
readonly storeName?: string | undefined;
|
|
339
|
-
ttl: number;
|
|
340
|
-
version?: number | string | undefined;
|
|
341
|
-
engine: 'localStorage' | 'sessionStorage' | 'memory';
|
|
342
|
-
private db;
|
|
343
|
-
constructor(dbName?: string | undefined, storeName?: string | undefined, ttl?: number, version?: number | string | undefined, engine?: 'localStorage' | 'sessionStorage' | 'memory');
|
|
344
|
-
private makeKey;
|
|
345
|
-
private load;
|
|
346
|
-
private getRaw;
|
|
347
|
-
private setRaw;
|
|
348
|
-
private deleteSync;
|
|
349
|
-
private isExpired;
|
|
350
|
-
get(key: string, ttl?: number, setter?: () => Promise<T> | T): Promise<T | null>;
|
|
351
|
-
set(key: string, value: null | undefined): Promise<void>;
|
|
352
|
-
set(key: string, value: T): Promise<TypedStorageEntry<T>>;
|
|
353
|
-
set(record: Record<string, T | null | undefined>): Promise<Record<string, TypedStorageEntry<T> | void>>;
|
|
354
|
-
has(key: string, ttl?: number): Promise<boolean>;
|
|
355
|
-
delete(key: string): Promise<void>;
|
|
356
|
-
updatedAt(key: string): Promise<number>;
|
|
357
|
-
clear(): Promise<this>;
|
|
358
|
-
keys(): AsyncIterable<string>;
|
|
359
|
-
values(): AsyncIterable<TypedStorageEntry<T>>;
|
|
360
|
-
entries(): AsyncIterable<[string, TypedStorageEntry<T>]>;
|
|
361
|
-
}
|
|
362
|
-
//#endregion
|
|
363
|
-
//#region src/services/storage/managers/IDBStorageManager.d.ts
|
|
364
|
-
declare class IDBStorageManager<T = unknown> implements AbstractIPEStorageManager<T> {
|
|
365
|
-
readonly dbName: string;
|
|
366
|
-
readonly storeName: string;
|
|
367
|
-
ttl: number;
|
|
368
|
-
version?: number | string | undefined;
|
|
369
|
-
readonly db: IDBPlus<string, TypedStorageEntry<T>>;
|
|
370
|
-
keys: () => AsyncIterable<string>;
|
|
371
|
-
values: () => AsyncIterable<TypedStorageEntry<T>>;
|
|
372
|
-
entries: () => AsyncIterable<[string, TypedStorageEntry<T>]>;
|
|
373
|
-
constructor(dbName: string, storeName: string, ttl?: number, version?: number | string | undefined);
|
|
374
|
-
private _clearExpiredEntries;
|
|
375
|
-
get(key: string, ttl?: number, setter?: () => Promise<T> | T): Promise<T | null>;
|
|
376
|
-
set(key: string, value: null | undefined): Promise<void>;
|
|
377
|
-
set(key: string, value: T): Promise<TypedStorageEntry<T>>;
|
|
378
|
-
set(record: Record<string, T | null | undefined>): Promise<Record<string, TypedStorageEntry<T> | void>>;
|
|
379
|
-
has(key: string, ttl?: number): Promise<boolean>;
|
|
380
|
-
delete(key: string): Promise<void>;
|
|
381
|
-
updatedAt(key: string): Promise<number>;
|
|
382
|
-
private loadFromDB;
|
|
383
|
-
private checkIfExpired;
|
|
384
|
-
/**
|
|
385
|
-
* [DANGER] Use with caution!
|
|
386
|
-
* Delete all data from the database.
|
|
387
|
-
*/
|
|
388
|
-
clear(): Promise<this>;
|
|
389
|
-
}
|
|
390
|
-
//#endregion
|
|
391
|
-
//#region src/services/storage/index.d.ts
|
|
392
|
-
// ↓ '@/InPageEdit'
|
|
393
|
-
declare module '.' {
|
|
394
|
-
interface InPageEdit {
|
|
395
|
-
storage: StorageService;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
interface StorageServiceConfig {
|
|
399
|
-
dbName: string;
|
|
400
|
-
}
|
|
401
|
-
declare class StorageService extends Service<StorageServiceConfig> {
|
|
402
|
-
config: StorageServiceConfig;
|
|
403
|
-
readonly kv: IDBStorageManager<any>;
|
|
404
|
-
readonly simpleKV: LocalStorageManager<any>;
|
|
405
|
-
readonly memoryKV: LocalStorageManager<any>;
|
|
406
|
-
constructor(ctx: InPageEdit, config: StorageServiceConfig);
|
|
407
|
-
createDatabase<T = any>(storeName: string, ttl?: number, version?: number | string, engine?: 'indexedDB' | 'localStorage' | 'sessionStorage' | 'memory'): AbstractIPEStorageManager<T>;
|
|
408
|
-
}
|
|
409
|
-
interface TypedStorageEntry<T = any> {
|
|
410
|
-
/** last update time */
|
|
411
|
-
time: number;
|
|
412
|
-
/** stored value */
|
|
413
|
-
value: T;
|
|
414
|
-
/** version */
|
|
415
|
-
version?: number | string;
|
|
416
|
-
}
|
|
417
|
-
interface AbstractIPEStorageManager<T = unknown> {
|
|
418
|
-
get(key: string, ttl?: number, setter?: () => Promise<any> | any): Promise<T | null>;
|
|
419
|
-
set(key: string, value: null | undefined): Promise<void>;
|
|
420
|
-
set(record: Record<string, T | null | undefined>): Promise<Record<string, TypedStorageEntry<T> | void>>;
|
|
421
|
-
set(key: string, value: T): Promise<TypedStorageEntry<T>>;
|
|
422
|
-
has(key: string, ttl?: number): Promise<boolean>;
|
|
423
|
-
delete(key: string): Promise<void>;
|
|
424
|
-
keys(): AsyncIterable<string>;
|
|
425
|
-
values(): AsyncIterable<TypedStorageEntry<T>>;
|
|
426
|
-
entries(): AsyncIterable<[string, TypedStorageEntry<T>]>;
|
|
427
|
-
updatedAt(key: string): Promise<number>;
|
|
428
|
-
clear(): Promise<this>;
|
|
429
|
-
}
|
|
430
|
-
//#endregion
|
|
431
354
|
//#region src/services/WikiMetadataService.d.ts
|
|
432
355
|
// ↓ '@/InPageEdit'
|
|
433
356
|
declare module '.' {
|
|
@@ -469,7 +392,7 @@ declare class WikiMetadataService extends Service {
|
|
|
469
392
|
private getCacheKey;
|
|
470
393
|
fetchFromApi<T extends keyof WikiMetadataKindMap>(kind: T): Promise<WikiMetadataKindMap[T]>;
|
|
471
394
|
fetchFromCache<T extends keyof WikiMetadataKindMap>(kind: T): Promise<WikiMetadataKindMap[T] | null>;
|
|
472
|
-
saveToCache<T extends keyof WikiMetadataKindMap>(kind: T, data: WikiMetadataKindMap[T]): Promise<TypedStorageEntry<
|
|
395
|
+
saveToCache<T extends keyof WikiMetadataKindMap>(kind: T, data: WikiMetadataKindMap[T]): Promise<TypedStorageEntry<WikiSiteInfo | WikiUserInfo>>;
|
|
473
396
|
invalidateCache<T extends keyof WikiMetadataKindMap>(kind: T): Promise<void>;
|
|
474
397
|
private onClearCache;
|
|
475
398
|
get _raw(): WikiMetadataKindMap;
|
|
@@ -489,6 +412,7 @@ declare class WikiMetadataService extends Service {
|
|
|
489
412
|
get isUserBlocked(): boolean | "" | undefined;
|
|
490
413
|
get userGroups(): string[];
|
|
491
414
|
get userRights(): string[];
|
|
415
|
+
get fileRepos(): WikiFileRepo[];
|
|
492
416
|
/**
|
|
493
417
|
* Base URL, without trailing slash
|
|
494
418
|
* @example "https://mediawiki.org"
|
|
@@ -544,6 +468,138 @@ declare class WikiMetadataService extends Service {
|
|
|
544
468
|
getBlockInfo(): WikiUserBlockInfo | null;
|
|
545
469
|
}
|
|
546
470
|
//#endregion
|
|
471
|
+
//#region src/services/storage/managers/LocalStorageManager.d.ts
|
|
472
|
+
declare class LocalStorageManager<T = unknown> implements AbstractIPEStorageManager<T> {
|
|
473
|
+
dbName?: string | undefined;
|
|
474
|
+
readonly storeName?: string | undefined;
|
|
475
|
+
ttl: number;
|
|
476
|
+
version?: number | string | undefined;
|
|
477
|
+
engine: 'localStorage' | 'sessionStorage' | 'memory';
|
|
478
|
+
private db;
|
|
479
|
+
constructor(dbName?: string | undefined, storeName?: string | undefined, ttl?: number, version?: number | string | undefined, engine?: 'localStorage' | 'sessionStorage' | 'memory');
|
|
480
|
+
private makeKey;
|
|
481
|
+
private load;
|
|
482
|
+
private getRaw;
|
|
483
|
+
private setRaw;
|
|
484
|
+
private deleteSync;
|
|
485
|
+
private isExpired;
|
|
486
|
+
get(key: string, ttl?: number, setter?: () => Promise<T> | T): Promise<T | null>;
|
|
487
|
+
set(key: string, value: null | undefined): Promise<void>;
|
|
488
|
+
set(key: string, value: T): Promise<TypedStorageEntry<T>>;
|
|
489
|
+
set(record: Record<string, T | null | undefined>): Promise<Record<string, TypedStorageEntry<T> | void>>;
|
|
490
|
+
has(key: string, ttl?: number): Promise<boolean>;
|
|
491
|
+
delete(key: string): Promise<void>;
|
|
492
|
+
updatedAt(key: string): Promise<number>;
|
|
493
|
+
clear(): Promise<this>;
|
|
494
|
+
keys(): AsyncIterable<string>;
|
|
495
|
+
values(): AsyncIterable<TypedStorageEntry<T>>;
|
|
496
|
+
entries(): AsyncIterable<[string, TypedStorageEntry<T>]>;
|
|
497
|
+
}
|
|
498
|
+
//#endregion
|
|
499
|
+
//#region src/services/storage/managers/IDBStorageManager.d.ts
|
|
500
|
+
declare class IDBStorageManager<T = unknown> implements AbstractIPEStorageManager<T> {
|
|
501
|
+
readonly dbName: string;
|
|
502
|
+
readonly storeName: string;
|
|
503
|
+
ttl: number;
|
|
504
|
+
version?: number | string | undefined;
|
|
505
|
+
readonly db: IDBPlus<string, TypedStorageEntry<T>>;
|
|
506
|
+
keys: () => AsyncIterable<string>;
|
|
507
|
+
values: () => AsyncIterable<TypedStorageEntry<T>>;
|
|
508
|
+
entries: () => AsyncIterable<[string, TypedStorageEntry<T>]>;
|
|
509
|
+
constructor(dbName: string, storeName: string, ttl?: number, version?: number | string | undefined);
|
|
510
|
+
private _clearExpiredEntries;
|
|
511
|
+
get(key: string, ttl?: number, setter?: () => Promise<T> | T): Promise<T | null>;
|
|
512
|
+
set(key: string, value: null | undefined): Promise<void>;
|
|
513
|
+
set(key: string, value: T): Promise<TypedStorageEntry<T>>;
|
|
514
|
+
set(record: Record<string, T | null | undefined>): Promise<Record<string, TypedStorageEntry<T> | void>>;
|
|
515
|
+
has(key: string, ttl?: number): Promise<boolean>;
|
|
516
|
+
delete(key: string): Promise<void>;
|
|
517
|
+
updatedAt(key: string): Promise<number>;
|
|
518
|
+
private loadFromDB;
|
|
519
|
+
private checkIfExpired;
|
|
520
|
+
/**
|
|
521
|
+
* [DANGER] Use with caution!
|
|
522
|
+
* Delete all data from the database.
|
|
523
|
+
*/
|
|
524
|
+
clear(): Promise<this>;
|
|
525
|
+
}
|
|
526
|
+
//#endregion
|
|
527
|
+
//#region src/services/storage/index.d.ts
|
|
528
|
+
// ↓ '@/InPageEdit'
|
|
529
|
+
declare module '.' {
|
|
530
|
+
interface InPageEdit {
|
|
531
|
+
storage: StorageService;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
interface StorageServiceConfig {
|
|
535
|
+
dbName: string;
|
|
536
|
+
}
|
|
537
|
+
declare class StorageService extends Service<StorageServiceConfig> {
|
|
538
|
+
config: StorageServiceConfig;
|
|
539
|
+
readonly kv: IDBStorageManager<any>;
|
|
540
|
+
readonly simpleKV: LocalStorageManager<any>;
|
|
541
|
+
readonly memoryKV: LocalStorageManager<any>;
|
|
542
|
+
constructor(ctx: InPageEdit, config: StorageServiceConfig);
|
|
543
|
+
createDatabase<T = any>(storeName: string, ttl?: number, version?: number | string, engine?: 'indexedDB' | 'localStorage' | 'sessionStorage' | 'memory'): AbstractIPEStorageManager<T>;
|
|
544
|
+
}
|
|
545
|
+
interface TypedStorageEntry<T = any> {
|
|
546
|
+
/** last update time */
|
|
547
|
+
time: number;
|
|
548
|
+
/** stored value */
|
|
549
|
+
value: T;
|
|
550
|
+
/** version */
|
|
551
|
+
version?: number | string;
|
|
552
|
+
}
|
|
553
|
+
interface AbstractIPEStorageManager<T = unknown> {
|
|
554
|
+
get(key: string, ttl?: number, setter?: () => Promise<any> | any): Promise<T | null>;
|
|
555
|
+
set(key: string, value: null | undefined): Promise<void>;
|
|
556
|
+
set(record: Record<string, T | null | undefined>): Promise<Record<string, TypedStorageEntry<T> | void>>;
|
|
557
|
+
set(key: string, value: T): Promise<TypedStorageEntry<T>>;
|
|
558
|
+
has(key: string, ttl?: number): Promise<boolean>;
|
|
559
|
+
delete(key: string): Promise<void>;
|
|
560
|
+
keys(): AsyncIterable<string>;
|
|
561
|
+
values(): AsyncIterable<TypedStorageEntry<T>>;
|
|
562
|
+
entries(): AsyncIterable<[string, TypedStorageEntry<T>]>;
|
|
563
|
+
updatedAt(key: string): Promise<number>;
|
|
564
|
+
clear(): Promise<this>;
|
|
565
|
+
}
|
|
566
|
+
//#endregion
|
|
567
|
+
//#region src/services/ThemeService.d.ts
|
|
568
|
+
type ThemePreference = 'light' | 'dark' | 'auto' | 'fandom';
|
|
569
|
+
type ThemeMode = 'light' | 'dark';
|
|
570
|
+
// ↓ '@/InPageEdit'
|
|
571
|
+
declare module '.' {
|
|
572
|
+
interface InPageEdit {
|
|
573
|
+
theme: ThemeService;
|
|
574
|
+
}
|
|
575
|
+
interface Events {
|
|
576
|
+
'theme/changed'(payload: {
|
|
577
|
+
ctx: InPageEdit;
|
|
578
|
+
theme: ThemeMode;
|
|
579
|
+
}): void;
|
|
580
|
+
}
|
|
581
|
+
interface PreferencesMap {
|
|
582
|
+
theme: ThemePreference;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
declare class ThemeService extends Service {
|
|
586
|
+
ctx: InPageEdit;
|
|
587
|
+
private _mediaQueryList;
|
|
588
|
+
private _observer;
|
|
589
|
+
private readonly _handleSystemThemeChange;
|
|
590
|
+
private readonly _handleBodyClassChange;
|
|
591
|
+
constructor(ctx: InPageEdit);
|
|
592
|
+
protected start(): Promise<void>;
|
|
593
|
+
protected stop(): void;
|
|
594
|
+
private _onSystemThemeChange;
|
|
595
|
+
private _onBodyClassChange;
|
|
596
|
+
applyTheme(): Promise<void>;
|
|
597
|
+
private updateFandomObserver;
|
|
598
|
+
private getTheme;
|
|
599
|
+
private applyThemeClass;
|
|
600
|
+
get currentTheme(): ThemeMode;
|
|
601
|
+
}
|
|
602
|
+
//#endregion
|
|
547
603
|
//#region src/models/WikiPage/types/PageInfo.d.ts
|
|
548
604
|
/**
|
|
549
605
|
* @url https://www.mediawiki.org/wiki/Content_handlers
|
|
@@ -631,8 +687,12 @@ declare enum WatchlistAction {
|
|
|
631
687
|
nochange = "nochange",
|
|
632
688
|
}
|
|
633
689
|
//#endregion
|
|
634
|
-
//#region src/models/WikiPage/
|
|
635
|
-
|
|
690
|
+
//#region src/models/WikiPage/types/WikiPageActionEdit.d.ts
|
|
691
|
+
/**
|
|
692
|
+
* Request body of MediaWiki edit action
|
|
693
|
+
* @see https://www.mediawiki.org/wiki/API:Edit
|
|
694
|
+
*/
|
|
695
|
+
interface WikiPageActionEditRequest {
|
|
636
696
|
text?: string;
|
|
637
697
|
prependtext?: string;
|
|
638
698
|
appendtext?: string;
|
|
@@ -644,6 +704,20 @@ interface WikiPageEditPayload {
|
|
|
644
704
|
starttimestamp?: string;
|
|
645
705
|
baserevid?: number;
|
|
646
706
|
}
|
|
707
|
+
/**
|
|
708
|
+
* Result of MediaWiki edit action
|
|
709
|
+
* @see https://www.mediawiki.org/wiki/API:Edit
|
|
710
|
+
*/
|
|
711
|
+
interface WikiPageActionEditResult {
|
|
712
|
+
result: 'Success' | 'Failure';
|
|
713
|
+
pageid: number;
|
|
714
|
+
title: string;
|
|
715
|
+
contentmodel: string;
|
|
716
|
+
nochange?: boolean;
|
|
717
|
+
watched?: boolean;
|
|
718
|
+
}
|
|
719
|
+
//#endregion
|
|
720
|
+
//#region src/models/WikiPage/index.d.ts
|
|
647
721
|
interface IWikiPage {
|
|
648
722
|
pageInfo: PageInfo;
|
|
649
723
|
parse(params?: MwApiParams$1): Promise<FexiosFinalContext<MwApiResponse<{
|
|
@@ -652,15 +726,15 @@ interface IWikiPage {
|
|
|
652
726
|
preview(text: string, params?: MwApiParams$1): Promise<FexiosFinalContext<MwApiResponse<{
|
|
653
727
|
parse: PageParseData;
|
|
654
728
|
}>>>;
|
|
655
|
-
edit(payload:
|
|
729
|
+
edit(payload: WikiPageActionEditRequest & MwApiParams$1, /** @deprecated Append params in `payload` instead */
|
|
656
730
|
params?: MwApiParams$1): Promise<FexiosFinalContext<MwApiResponse<{
|
|
657
|
-
|
|
731
|
+
edit: WikiPageActionEditResult;
|
|
658
732
|
}>>>;
|
|
659
|
-
createOnly(payload: Pick<
|
|
733
|
+
createOnly(payload: Pick<WikiPageActionEditRequest, 'summary' | 'watchlist'> & {
|
|
660
734
|
text: string;
|
|
661
735
|
recreate?: boolean;
|
|
662
736
|
}, params?: MwApiParams$1): Promise<FexiosFinalContext<MwApiResponse<{
|
|
663
|
-
|
|
737
|
+
edit: WikiPageActionEditResult;
|
|
664
738
|
}>>>;
|
|
665
739
|
delete(reason?: string, params?: MwApiParams$1): Promise<FexiosFinalContext<MwApiResponse<{
|
|
666
740
|
delete: {
|
|
@@ -752,7 +826,7 @@ declare class WikiTitleService extends Service {
|
|
|
752
826
|
readonly Title: WikiTitleConstructor;
|
|
753
827
|
constructor(ctx: InPageEdit);
|
|
754
828
|
private readonly logger;
|
|
755
|
-
newTitle(title: string, namespace?: number): IWikiTitle;
|
|
829
|
+
newTitle(title: string | IWikiTitle, namespace?: number): IWikiTitle;
|
|
756
830
|
newMainPageTitle(): IWikiTitle;
|
|
757
831
|
newTitleFromUrl(url: string | URL): Promise<any>;
|
|
758
832
|
private _cachedTitles;
|
|
@@ -867,16 +941,16 @@ declare class PreferencesService extends Service {
|
|
|
867
941
|
* @tips 你可以通过重载 PreferencesMap 来定义你的配置项类型,以自动获得类型推导
|
|
868
942
|
*/
|
|
869
943
|
get(): Promise<PreferencesMap>;
|
|
870
|
-
get<K extends keyof PreferencesMap>(key: K, fallback?: ComputeAble<PreferencesMap[K]>): Promise<PreferencesMap[K] | null>;
|
|
944
|
+
get<K$1 extends keyof PreferencesMap>(key: K$1, fallback?: ComputeAble<PreferencesMap[K$1]>): Promise<PreferencesMap[K$1] | null>;
|
|
871
945
|
get<U = unknown>(key: string, fallback?: ComputeAble<U>): Promise<U | null>;
|
|
872
946
|
/**
|
|
873
947
|
* 获取全部注册的配置项以及最终生效的值
|
|
874
948
|
* 未保存的配置项将使用默认值
|
|
875
949
|
*/
|
|
876
950
|
getAll(): Promise<PreferencesMap>;
|
|
877
|
-
set<K extends keyof PreferencesMap>(key: K, value: PreferencesMap[K] | undefined | null): Promise<PreferencesMap[K] | void>;
|
|
951
|
+
set<K$1 extends keyof PreferencesMap>(key: K$1, value: PreferencesMap[K$1] | undefined | null): Promise<PreferencesMap[K$1] | void>;
|
|
878
952
|
set<U = unknown>(key: string, value: U | undefined | null): Promise<U | void>;
|
|
879
|
-
setMany(input: { [K in keyof PreferencesMap]?: PreferencesMap[K] | undefined | null }): Promise<{ [K in keyof PreferencesMap]?: PreferencesMap[K] | undefined | null }>;
|
|
953
|
+
setMany(input: { [K in keyof PreferencesMap]?: PreferencesMap[K$1] | undefined | null }): Promise<{ [K in keyof PreferencesMap]?: PreferencesMap[K$1] | undefined | null }>;
|
|
880
954
|
setMany<U = unknown>(input: Record<string, U | undefined | null>): Promise<Record<string, U | undefined | null>>;
|
|
881
955
|
defaultOf<T extends keyof PreferencesMap>(key: T): PreferencesMap[T] | undefined;
|
|
882
956
|
defaultOf<U = unknown>(key: string): U | undefined;
|
|
@@ -1197,6 +1271,104 @@ declare class I18nService extends Service {
|
|
|
1197
1271
|
private onClearCache;
|
|
1198
1272
|
}
|
|
1199
1273
|
//#endregion
|
|
1274
|
+
//#region src/models/MemoryStorage.d.ts
|
|
1275
|
+
declare class MemoryStorage implements Storage {
|
|
1276
|
+
private values;
|
|
1277
|
+
get length(): number;
|
|
1278
|
+
clear(): void;
|
|
1279
|
+
getItem(key: string): string | null;
|
|
1280
|
+
setItem(key: string, value: string): void;
|
|
1281
|
+
removeItem(key: string): void;
|
|
1282
|
+
key(index: number): string | null;
|
|
1283
|
+
}
|
|
1284
|
+
declare const useMemoryStorage: () => MemoryStorage;
|
|
1285
|
+
//#endregion
|
|
1286
|
+
//#region src/services/WikiFileService.d.ts
|
|
1287
|
+
// ↓ '@/InPageEdit.js'
|
|
1288
|
+
declare module '.' {
|
|
1289
|
+
interface InPageEdit {
|
|
1290
|
+
wikiFile: WikiFileService;
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
/**
|
|
1294
|
+
* @see https://www.mediawiki.org/wiki/API:Upload
|
|
1295
|
+
*/
|
|
1296
|
+
interface UploadFileParams {
|
|
1297
|
+
file: File;
|
|
1298
|
+
filekey: string;
|
|
1299
|
+
url: string;
|
|
1300
|
+
filename: string;
|
|
1301
|
+
comment: string;
|
|
1302
|
+
text: string;
|
|
1303
|
+
tags: string[] | string;
|
|
1304
|
+
watchlist: WatchlistAction;
|
|
1305
|
+
ignorewarnings: boolean;
|
|
1306
|
+
filesize: number;
|
|
1307
|
+
offset: number;
|
|
1308
|
+
chunk: File;
|
|
1309
|
+
stash: boolean;
|
|
1310
|
+
checkstatus: boolean;
|
|
1311
|
+
}
|
|
1312
|
+
type UploadFileResult = {
|
|
1313
|
+
result: 'Success';
|
|
1314
|
+
filename: string;
|
|
1315
|
+
imageinfo: WikiImageInfo;
|
|
1316
|
+
} | {
|
|
1317
|
+
result: 'Failure' | 'Warning' | 'Continue' | 'Poll';
|
|
1318
|
+
filekey: string;
|
|
1319
|
+
sessionkey?: string;
|
|
1320
|
+
warnings?: {
|
|
1321
|
+
/** file with this filekey already exists */
|
|
1322
|
+
exists?: string;
|
|
1323
|
+
/** uploaded file is the same as stored file with this timestamp */
|
|
1324
|
+
nochange?: {
|
|
1325
|
+
timestamp: string;
|
|
1326
|
+
};
|
|
1327
|
+
/** uploaded file is duplicated with these files */
|
|
1328
|
+
duplicate?: string[];
|
|
1329
|
+
};
|
|
1330
|
+
imageinfo: never;
|
|
1331
|
+
};
|
|
1332
|
+
interface WikiImageInfo {
|
|
1333
|
+
timestamp: string;
|
|
1334
|
+
user: string;
|
|
1335
|
+
userid: number;
|
|
1336
|
+
size: number;
|
|
1337
|
+
width: number;
|
|
1338
|
+
height: number;
|
|
1339
|
+
duration: number;
|
|
1340
|
+
parsedcomment: string;
|
|
1341
|
+
comment: string;
|
|
1342
|
+
html: string;
|
|
1343
|
+
canonicaltitle: string;
|
|
1344
|
+
url: string;
|
|
1345
|
+
descriptionurl: string;
|
|
1346
|
+
sha1: string;
|
|
1347
|
+
metadata: {
|
|
1348
|
+
name: string;
|
|
1349
|
+
value: any;
|
|
1350
|
+
}[];
|
|
1351
|
+
commonmetadata: unknown[];
|
|
1352
|
+
extmetadata: unknown;
|
|
1353
|
+
mime: string;
|
|
1354
|
+
mediatype: string;
|
|
1355
|
+
bitdepth: number;
|
|
1356
|
+
}
|
|
1357
|
+
declare class WikiFileService extends Service {
|
|
1358
|
+
ctx: InPageEdit;
|
|
1359
|
+
constructor(ctx: InPageEdit);
|
|
1360
|
+
get fileRepos(): WikiFileRepo[];
|
|
1361
|
+
get defaultFileRepo(): WikiFileRepo | undefined;
|
|
1362
|
+
get localFileRepo(): WikiFileRepo | undefined;
|
|
1363
|
+
get writableFileRepo(): WikiFileRepo | undefined;
|
|
1364
|
+
getFileName(title: string | IWikiTitle): string;
|
|
1365
|
+
getHashPath(title: string | IWikiTitle, hashLevel?: number): string;
|
|
1366
|
+
getFileUrl(title: string | IWikiTitle, repo?: WikiFileRepo): string;
|
|
1367
|
+
upload(params: Partial<UploadFileParams>, repo?: WikiFileRepo): Promise<wiki_saikou0.FexiosFinalContext<wiki_saikou0.MwApiResponse<{
|
|
1368
|
+
upload: UploadFileResult;
|
|
1369
|
+
}>>>;
|
|
1370
|
+
}
|
|
1371
|
+
//#endregion
|
|
1200
1372
|
//#region src/InPageEdit.d.ts
|
|
1201
1373
|
interface InPageEditCoreConfig {
|
|
1202
1374
|
apiConfigs: Partial<FexiosConfigs>;
|
|
@@ -1235,20 +1407,6 @@ interface InPageEdit {
|
|
|
1235
1407
|
[InPageEdit.events]: Events<this>;
|
|
1236
1408
|
}
|
|
1237
1409
|
//#endregion
|
|
1238
|
-
//#region src/constants/endpoints.d.ts
|
|
1239
|
-
declare enum Endpoints {
|
|
1240
|
-
ANALYTICS_API_BASE = "https://analytics.ipe.wiki/api/v6",
|
|
1241
|
-
ANALYTICS_DASH_URL = "https://analytics.ipe.wiki",
|
|
1242
|
-
GITHUB_URL = "https://github.com/inpageedit/inpageedit-next",
|
|
1243
|
-
GITHUB_OWNER = "inpageedit",
|
|
1244
|
-
GITHUB_REPO = "inpageedit-next",
|
|
1245
|
-
HOME_URL = "https://www.ipe.wiki/",
|
|
1246
|
-
UPDATE_LOGS_URL = "https://www.ipe.wiki/changelogs/",
|
|
1247
|
-
PLUGIN_REGISTRY_URL = "https://registry.ipe.wiki/registry.v1.json",
|
|
1248
|
-
I18N_INDEX_URL = "https://registry.ipe.wiki/i18n/index.json",
|
|
1249
|
-
QQ_GROUP_ID = "1026023666",
|
|
1250
|
-
}
|
|
1251
|
-
//#endregion
|
|
1252
1410
|
//#region src/plugins/BasePlugin.d.ts
|
|
1253
1411
|
interface DisposeHandler {
|
|
1254
1412
|
(ctx: InPageEdit): Promise<void> | void;
|
|
@@ -1274,6 +1432,20 @@ declare class BasePlugin<ConfigType extends unknown = any> {
|
|
|
1274
1432
|
get logger(): Logger;
|
|
1275
1433
|
}
|
|
1276
1434
|
//#endregion
|
|
1435
|
+
//#region src/constants/endpoints.d.ts
|
|
1436
|
+
declare enum Endpoints {
|
|
1437
|
+
ANALYTICS_API_BASE = "https://analytics.ipe.wiki/api/v6",
|
|
1438
|
+
ANALYTICS_DASH_URL = "https://analytics.ipe.wiki",
|
|
1439
|
+
GITHUB_URL = "https://github.com/inpageedit/inpageedit-next",
|
|
1440
|
+
GITHUB_OWNER = "inpageedit",
|
|
1441
|
+
GITHUB_REPO = "inpageedit-next",
|
|
1442
|
+
HOME_URL = "https://www.ipe.wiki/",
|
|
1443
|
+
UPDATE_LOGS_URL = "https://www.ipe.wiki/changelogs/",
|
|
1444
|
+
PLUGIN_REGISTRY_URL = "https://registry.ipe.wiki/registry.v1.json",
|
|
1445
|
+
I18N_INDEX_URL = "https://registry.ipe.wiki/i18n/index.json",
|
|
1446
|
+
QQ_GROUP_ID = "1026023666",
|
|
1447
|
+
}
|
|
1448
|
+
//#endregion
|
|
1277
1449
|
//#region src/decorators/Preferences.d.ts
|
|
1278
1450
|
type AnyConstructor<T = any> = new (...args: any[]) => T;
|
|
1279
1451
|
type PreferenceAugmented<D, C extends AnyConstructor> = C & {
|
|
@@ -1405,7 +1577,9 @@ type InputBoxProps = {
|
|
|
1405
1577
|
id?: string;
|
|
1406
1578
|
name: string;
|
|
1407
1579
|
value?: string;
|
|
1580
|
+
placeholder?: string;
|
|
1408
1581
|
disabled?: boolean;
|
|
1582
|
+
required?: boolean;
|
|
1409
1583
|
labelProps?: JSX.IntrinsicElements['label'];
|
|
1410
1584
|
inputProps?: JSX.IntrinsicElements['input'];
|
|
1411
1585
|
} & JSX.IntrinsicElements['div'];
|
|
@@ -1422,17 +1596,17 @@ type RadioBoxProps = {
|
|
|
1422
1596
|
} & JSX.IntrinsicElements['label'];
|
|
1423
1597
|
declare const RadioBox: (props: RadioBoxProps) => jsx_dom0.ReactElement;
|
|
1424
1598
|
//#endregion
|
|
1425
|
-
//#region src/
|
|
1426
|
-
declare
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
declare const
|
|
1599
|
+
//#region src/components/Icon/IconEdit.d.ts
|
|
1600
|
+
declare const IconEdit: (props: SVGProps<SVGSVGElement>) => jsx_dom0.ReactElement;
|
|
1601
|
+
//#endregion
|
|
1602
|
+
//#region src/components/Icon/IconQuickDiff.d.ts
|
|
1603
|
+
declare const IconQuickDiff: (props: SVGProps<SVGSVGElement>) => jsx_dom0.ReactElement;
|
|
1604
|
+
//#endregion
|
|
1605
|
+
//#region src/components/Icon/IconQuickEdit.d.ts
|
|
1606
|
+
declare const IconQuickEdit: (props: SVGProps<SVGSVGElement>) => jsx_dom0.ReactElement;
|
|
1607
|
+
//#endregion
|
|
1608
|
+
//#region src/components/Icon/IconUpload.d.ts
|
|
1609
|
+
declare const IconUpload: (props: SVGProps<SVGSVGElement>) => jsx_dom0.ReactElement;
|
|
1436
1610
|
//#endregion
|
|
1437
1611
|
//#region src/plugins/analytics/index.d.ts
|
|
1438
1612
|
// ↓ '@/InPageEdit'
|
|
@@ -1440,6 +1614,13 @@ declare module '.' {
|
|
|
1440
1614
|
interface InPageEdit {
|
|
1441
1615
|
analytics: PluginAnalytics;
|
|
1442
1616
|
}
|
|
1617
|
+
interface Events {
|
|
1618
|
+
'analytics/event'(payload: {
|
|
1619
|
+
feature: string;
|
|
1620
|
+
subtype?: string;
|
|
1621
|
+
page?: string;
|
|
1622
|
+
}): void;
|
|
1623
|
+
}
|
|
1443
1624
|
}
|
|
1444
1625
|
interface IPEBeaconPayload {
|
|
1445
1626
|
siteApi: string;
|
|
@@ -1469,7 +1650,7 @@ declare class PluginAnalytics extends BasePlugin {
|
|
|
1469
1650
|
private _registerUnloadHandler;
|
|
1470
1651
|
private _showConfirmNotify;
|
|
1471
1652
|
private _initPluginListeners;
|
|
1472
|
-
addEvent(feature: string, subtype?: string, page?: string): this;
|
|
1653
|
+
addEvent(feature: string, subtype?: string, page?: string): this | undefined;
|
|
1473
1654
|
private sendBeacon;
|
|
1474
1655
|
/**
|
|
1475
1656
|
* 清理资源
|
|
@@ -1646,12 +1827,23 @@ declare class PluginPluginStore extends BasePlugin {
|
|
|
1646
1827
|
}
|
|
1647
1828
|
//#endregion
|
|
1648
1829
|
//#region src/plugins/preferences-ui/components/PreferencesApp.vue.d.ts
|
|
1649
|
-
declare const __VLS_export:
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1830
|
+
declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
1831
|
+
props: vue0.PublicProps & (typeof globalThis extends {
|
|
1832
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
1833
|
+
} ? P : {});
|
|
1834
|
+
expose: (exposed: vue0.ShallowUnwrapRef<{
|
|
1835
|
+
getValue(): any;
|
|
1836
|
+
mergeValue(details: Record<string, unknown>): void;
|
|
1837
|
+
selectTab(name: string): void;
|
|
1838
|
+
}>) => void;
|
|
1839
|
+
attrs: any;
|
|
1840
|
+
slots: {};
|
|
1841
|
+
emit: {};
|
|
1842
|
+
}>) => vue0.VNode & {
|
|
1843
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
1844
|
+
};
|
|
1654
1845
|
declare const _default: typeof __VLS_export;
|
|
1846
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
1655
1847
|
//#endregion
|
|
1656
1848
|
//#region src/plugins/preferences-ui/index.d.ts
|
|
1657
1849
|
// ↓ '@/InPageEdit'
|
|
@@ -1783,6 +1975,10 @@ declare class PluginQuickDiff extends BasePlugin {
|
|
|
1783
1975
|
private injectQuickEdit;
|
|
1784
1976
|
readonly COMPARE_API_DEFAULT_OPTIONS: Partial<CompareApiRequestOptions>;
|
|
1785
1977
|
comparePages(options: Partial<CompareApiRequestOptions>, modal?: IPEModal, modalOptions?: Partial<IPEModalOptions>): IPEModal;
|
|
1978
|
+
createQuickDiffButton(payload: Partial<CompareApiRequestOptions>, options?: {
|
|
1979
|
+
label?: ReactNode;
|
|
1980
|
+
icon?: ReactNode;
|
|
1981
|
+
}): HTMLAnchorElement;
|
|
1786
1982
|
}
|
|
1787
1983
|
//#endregion
|
|
1788
1984
|
//#region src/plugins/quick-edit/index.d.ts
|
|
@@ -1850,9 +2046,9 @@ declare class PluginQuickEdit extends BasePlugin {
|
|
|
1850
2046
|
constructor(ctx: InPageEdit);
|
|
1851
2047
|
protected start(): Promise<void> | void;
|
|
1852
2048
|
showModal(payload?: string | Partial<QuickEditOptions>): Promise<void>;
|
|
1853
|
-
handleSubmit(payload: QuickEditSubmitPayload): Promise<
|
|
1854
|
-
|
|
1855
|
-
}
|
|
2049
|
+
handleSubmit(payload: QuickEditSubmitPayload): Promise<wiki_saikou0.FexiosFinalContext<wiki_saikou0.MwApiResponse<{
|
|
2050
|
+
edit: WikiPageActionEditResult;
|
|
2051
|
+
}>>>;
|
|
1856
2052
|
static readonly BUILT_IN_FONT_OPTIONS: string[];
|
|
1857
2053
|
getEditFontOptions(): Promise<{
|
|
1858
2054
|
className: string;
|
|
@@ -1861,6 +2057,10 @@ declare class PluginQuickEdit extends BasePlugin {
|
|
|
1861
2057
|
getWikiPageFromPayload(payload: Partial<QuickEditOptions>): Promise<IWikiPage>;
|
|
1862
2058
|
private injectToolbox;
|
|
1863
2059
|
protected removeToolbox(ctx: InPageEdit): void;
|
|
2060
|
+
createQuickEditButton(payload: Partial<QuickEditOptions>, options?: {
|
|
2061
|
+
icon?: ReactNode;
|
|
2062
|
+
label?: ReactNode;
|
|
2063
|
+
}): HTMLAnchorElement;
|
|
1864
2064
|
}
|
|
1865
2065
|
//#endregion
|
|
1866
2066
|
//#region src/plugins/quick-move/index.d.ts
|
|
@@ -1906,9 +2106,9 @@ declare class PluginQuickMove extends BasePlugin {
|
|
|
1906
2106
|
protected start(): Promise<void> | void;
|
|
1907
2107
|
private injectToolbox;
|
|
1908
2108
|
showModal(options?: Partial<QuickMoveOptions>): Promise<CustomIPEModal>;
|
|
1909
|
-
movePage(options: MovePageOptions): Promise<
|
|
2109
|
+
movePage(options: MovePageOptions): Promise<wiki_saikou0.FexiosFinalContext<wiki_saikou0.MwApiResponse<{
|
|
1910
2110
|
success: boolean;
|
|
1911
|
-
}
|
|
2111
|
+
}>>>;
|
|
1912
2112
|
}
|
|
1913
2113
|
//#endregion
|
|
1914
2114
|
//#region src/plugins/quick-preview/index.d.ts
|
|
@@ -1942,6 +2142,14 @@ declare class PluginQuickPreview extends BasePlugin {
|
|
|
1942
2142
|
protected stop(): Promise<void> | void;
|
|
1943
2143
|
previewWikitext(text: string, params?: MwApiParams, wikiPage?: IWikiPage, modal?: IPEModal, modalOptions?: Partial<IPEModalOptions>): IPEModal;
|
|
1944
2144
|
private injectQuickEdit;
|
|
2145
|
+
private _contentTypeCache;
|
|
2146
|
+
private fetchContentType;
|
|
2147
|
+
getPreviewType(fileOrUrl: File | string): Promise<"unknown" | "image" | "video" | "audio" | "html" | "markdown" | "text" | "pdf">;
|
|
2148
|
+
previewFile(fileOrUrl: File | string, alt?: string): Promise<CustomIPEModal | undefined>;
|
|
2149
|
+
private _objectUrls;
|
|
2150
|
+
private getObjectUrl;
|
|
2151
|
+
getPreviewElement(fileOrUrl: File | string, alt?: string): Promise<jsx_dom0.ReactElement | null>;
|
|
2152
|
+
previewWikiPage(title: string): void;
|
|
1945
2153
|
}
|
|
1946
2154
|
//#endregion
|
|
1947
2155
|
//#region src/plugins/quick-redirect/index.d.ts
|
|
@@ -1987,9 +2195,46 @@ declare class PluginQuickRedirect extends BasePlugin {
|
|
|
1987
2195
|
protected start(): Promise<void> | void;
|
|
1988
2196
|
protected stop(): Promise<void> | void;
|
|
1989
2197
|
showModal(options?: Partial<QuickRedirectOptions>): Promise<CustomIPEModal>;
|
|
1990
|
-
redirectPage(options: RedirectPageOptions): Promise<
|
|
1991
|
-
|
|
1992
|
-
}
|
|
2198
|
+
redirectPage(options: RedirectPageOptions): Promise<wiki_saikou0.FexiosFinalContext<wiki_saikou0.MwApiResponse<{
|
|
2199
|
+
edit: WikiPageActionEditResult;
|
|
2200
|
+
}>>>;
|
|
2201
|
+
}
|
|
2202
|
+
//#endregion
|
|
2203
|
+
//#region src/plugins/quick-upload/index.d.ts
|
|
2204
|
+
// ↓ '@/InPageEdit'
|
|
2205
|
+
declare module '.' {
|
|
2206
|
+
interface InPageEdit {
|
|
2207
|
+
quickUpload: PluginQuickUpload;
|
|
2208
|
+
}
|
|
2209
|
+
interface Preferences {
|
|
2210
|
+
'quickUpload.summary': string;
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
declare class PluginQuickUpload extends BasePlugin {
|
|
2214
|
+
ctx: InPageEdit;
|
|
2215
|
+
constructor(ctx: InPageEdit);
|
|
2216
|
+
protected start(): Promise<void>;
|
|
2217
|
+
protected stop(): Promise<void>;
|
|
2218
|
+
private injectToolbox;
|
|
2219
|
+
private formatFileSize;
|
|
2220
|
+
private isFileAccepted;
|
|
2221
|
+
private getDefaultPreviewPlaceholder;
|
|
2222
|
+
private safeId;
|
|
2223
|
+
showModal(): Promise<CustomIPEModal>;
|
|
2224
|
+
}
|
|
2225
|
+
//#endregion
|
|
2226
|
+
//#region src/plugins/quick-usage/index.d.ts
|
|
2227
|
+
// ↓ '@/InPageEdit'
|
|
2228
|
+
declare module '.' {
|
|
2229
|
+
interface InPageEdit {
|
|
2230
|
+
quickUsage: PluginQuickUsage;
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
declare class PluginQuickUsage extends BasePlugin {
|
|
2234
|
+
ctx: InPageEdit;
|
|
2235
|
+
constructor(ctx: InPageEdit);
|
|
2236
|
+
protected start(): Promise<void>;
|
|
2237
|
+
getWrapperForQuickEdit(modal: IPEModal): Element | SVGElement;
|
|
1993
2238
|
}
|
|
1994
2239
|
//#endregion
|
|
1995
2240
|
//#region src/plugins/toolbox/index.d.ts
|
|
@@ -2067,10 +2312,13 @@ declare class PluginToolbox extends Service {
|
|
|
2067
2312
|
toggle(force?: boolean): void;
|
|
2068
2313
|
}
|
|
2069
2314
|
declare namespace index_d_exports$1 {
|
|
2070
|
-
export { AbstractIPEStorageManager, ApiService, ApiServiceOptions, CurrentPageService, CustomIPEModal, InPageEditPreferenceUICategory, InPageEditPreferenceUIRegistryItem, ModalService, PreferencesService, ResourceLoaderService, StorageService, StorageServiceConfig, TypedStorageEntry, WikiLinkMetadata, WikiMetadataService, WikiPageService, WikiTitleService };
|
|
2315
|
+
export { AbstractIPEStorageManager, ApiService, ApiServiceOptions, CurrentPageService, CustomIPEModal, InPageEditPreferenceUICategory, InPageEditPreferenceUIRegistryItem, ModalService, PreferencesService, ResourceLoaderService, StorageService, StorageServiceConfig, ThemeService, TypedStorageEntry, UploadFileParams, UploadFileResult, WikiFileService, WikiImageInfo, WikiLinkMetadata, WikiMetadataService, WikiPageService, WikiTitleService };
|
|
2316
|
+
}
|
|
2317
|
+
declare namespace core_d_exports {
|
|
2318
|
+
export { AbstractIPEStorageManager, ActionButton, ActionButtonProps, ApiService, ApiServiceOptions, BasePlugin, CheckBox, CheckBoxProps, CompareApiRequestOptions, CompareApiResponse, ContentModelMap, CordisError, CordisSymbols, CurrentPageService, CustomIPEModal, EffectScope, Endpoints, Events, ForkScope, IPEBeaconPayload, IPEBeaconUsage, IPEPlugin, IPERegistry, IWikiPage, IWikiTitle, IconEdit, IconQuickDiff, IconQuickEdit, IconUpload, InArticleWikiAnchorMetadata, InPageEdit, InPageEditCoreConfig, InPageEditPreferenceUICategory, InPageEditPreferenceUIRegistryItem, Inject, InputBox, InputBoxProps, Lifecycle, MBox, MBoxElement, MBoxProps, MainScope, MemoryStorage, ModalService, MovePageOptions, PageInfo, PageParseData, PluginAnalytics, PluginInArticleLinks, PluginPluginStore, PluginPreferencesUI, PluginQuickDiff, PluginQuickEdit, PluginQuickMove, PluginQuickPreview, PluginQuickRedirect, PluginQuickUpload, PluginQuickUsage, PluginStoreRegistrySource, PluginToolbox, PreferencesMap, PreferencesService, ProgressBar, QuickEditEventPayload, QuickEditOptions, QuickEditSubmitPayload, QuickMoveOptions, QuickRedirectOptions, RadioBox, RadioBoxProps, RedirectPageOptions, RegisterPreferences, ResourceLoaderService, Schema, ScopeStatus, Service, StorageService, StorageServiceConfig, TabContent, TabLabel, TabView, TabViewLabelOptions, ThemeService, TwinSwapElement, TwinSwapInput, TwinSwapInputInput, TwinSwapInputProps, TypedStorageEntry, UploadFileParams, UploadFileResult, WatchlistAction, WikiFileRepo, WikiFileService, WikiImageInfo, WikiLinkMetadata, WikiMagicWord, WikiMetadataService, WikiNameSpaceAlias, WikiNamespace, WikiPageConstructor, WikiPageService, WikiSiteGeneralInfo, WikiSiteInfo, WikiSpecialPageAlias, WikiTitleConstructor, WikiTitleService, WikiUserBlockInfo, WikiUserInfo, WikiUserOptions, createWikiPageModel, createWikiTitleModel, useMemoryStorage };
|
|
2071
2319
|
}
|
|
2072
2320
|
declare namespace index_d_exports {
|
|
2073
|
-
export { AbstractIPEStorageManager, ActionButton, ActionButtonProps, ApiService, ApiServiceOptions, BasePlugin, CheckBox, CheckBoxProps, CompareApiRequestOptions, CompareApiResponse, ContentModelMap, CordisError, CordisSymbols, CurrentPageService, CustomIPEModal, EffectScope, Endpoints, Events, ForkScope, IPEBeaconPayload, IPEBeaconUsage, IPEPlugin, IPERegistry, IWikiPage, IWikiTitle, InArticleWikiAnchorMetadata, InPageEdit, InPageEditCoreConfig, InPageEditPreferenceUICategory, InPageEditPreferenceUIRegistryItem, Inject, InputBox, InputBoxProps, Lifecycle, MBox, MBoxElement, MBoxProps, MainScope, MemoryStorage, ModalService, MovePageOptions, PageInfo, PageParseData, PluginAnalytics, PluginInArticleLinks, PluginPluginStore, PluginPreferencesUI, PluginQuickDiff, PluginQuickEdit, PluginQuickMove, PluginQuickPreview, PluginQuickRedirect, PluginStoreRegistrySource, PluginToolbox, PreferencesMap, PreferencesService, ProgressBar, QuickEditEventPayload, QuickEditOptions, QuickEditSubmitPayload, QuickMoveOptions, QuickRedirectOptions, RadioBox, RadioBoxProps, RedirectPageOptions, RegisterPreferences, ResourceLoaderService, Schema, ScopeStatus, Service, StorageService, StorageServiceConfig, TabContent, TabLabel, TabView, TabViewLabelOptions, TwinSwapElement, TwinSwapInput, TwinSwapInputInput, TwinSwapInputProps, TypedStorageEntry, WatchlistAction, WikiLinkMetadata, WikiMagicWord, WikiMetadataService, WikiNameSpaceAlias, WikiNamespace, WikiPageConstructor,
|
|
2321
|
+
export { AbstractIPEStorageManager, ActionButton, ActionButtonProps, ApiService, ApiServiceOptions, BasePlugin, CheckBox, CheckBoxProps, CompareApiRequestOptions, CompareApiResponse, ContentModelMap, CordisError, CordisSymbols, CurrentPageService, CustomIPEModal, EffectScope, Endpoints, Events, ForkScope, IPEBeaconPayload, IPEBeaconUsage, IPEPlugin, IPERegistry, IWikiPage, IWikiTitle, IconEdit, IconQuickDiff, IconQuickEdit, IconUpload, InArticleWikiAnchorMetadata, InPageEdit, InPageEditCoreConfig, InPageEditPreferenceUICategory, InPageEditPreferenceUIRegistryItem, Inject, InputBox, InputBoxProps, Lifecycle, MBox, MBoxElement, MBoxProps, MainScope, MemoryStorage, ModalService, MovePageOptions, PageInfo, PageParseData, PluginAnalytics, PluginInArticleLinks, PluginPluginStore, PluginPreferencesUI, PluginQuickDiff, PluginQuickEdit, PluginQuickMove, PluginQuickPreview, PluginQuickRedirect, PluginQuickUpload, PluginQuickUsage, PluginStoreRegistrySource, PluginToolbox, PreferencesMap, PreferencesService, ProgressBar, QuickEditEventPayload, QuickEditOptions, QuickEditSubmitPayload, QuickMoveOptions, QuickRedirectOptions, RadioBox, RadioBoxProps, RedirectPageOptions, RegisterPreferences, ResourceLoaderService, Schema, ScopeStatus, Service, StorageService, StorageServiceConfig, TabContent, TabLabel, TabView, TabViewLabelOptions, ThemeService, TwinSwapElement, TwinSwapInput, TwinSwapInputInput, TwinSwapInputProps, TypedStorageEntry, UploadFileParams, UploadFileResult, WatchlistAction, WikiFileRepo, WikiFileService, WikiImageInfo, WikiLinkMetadata, WikiMagicWord, WikiMetadataService, WikiNameSpaceAlias, WikiNamespace, WikiPageConstructor, WikiPageService, WikiSiteGeneralInfo, WikiSiteInfo, WikiSpecialPageAlias, WikiTitleConstructor, WikiTitleService, WikiUserBlockInfo, WikiUserInfo, WikiUserOptions, createWikiPageModel, createWikiTitleModel, useMemoryStorage };
|
|
2074
2322
|
}
|
|
2075
2323
|
declare global {
|
|
2076
2324
|
const ipe: InPageEdit;
|
|
@@ -2106,4 +2354,4 @@ declare global {
|
|
|
2106
2354
|
}
|
|
2107
2355
|
}
|
|
2108
2356
|
//#endregion
|
|
2109
|
-
export { AbstractIPEStorageManager, ActionButton, ActionButtonProps, ApiService, ApiServiceOptions, BasePlugin, CheckBox, CheckBoxProps, CompareApiRequestOptions, CompareApiResponse, ContentModelMap, CordisError, CordisSymbols, CurrentPageService, CustomIPEModal, EffectScope, Endpoints, Events, ForkScope, IPEBeaconPayload, IPEBeaconUsage, IPEPlugin, IPERegistry, IWikiPage, IWikiTitle, InArticleWikiAnchorMetadata, InPageEdit, InPageEditCoreConfig, InPageEditPreferenceUICategory, InPageEditPreferenceUIRegistryItem, Inject, InputBox, InputBoxProps, Lifecycle, MBox, MBoxElement, MBoxProps, MainScope, MemoryStorage, ModalService, MovePageOptions, PageInfo, PageParseData, PluginAnalytics, PluginInArticleLinks, PluginPluginStore, PluginPreferencesUI, PluginQuickDiff, PluginQuickEdit, PluginQuickMove, PluginQuickPreview, PluginQuickRedirect, PluginStoreRegistrySource, PluginToolbox, PreferencesMap, PreferencesService, ProgressBar, QuickEditEventPayload, QuickEditOptions, QuickEditSubmitPayload, QuickMoveOptions, QuickRedirectOptions, RadioBox, RadioBoxProps, RedirectPageOptions, RegisterPreferences, ResourceLoaderService, Schema, ScopeStatus, Service, StorageService, StorageServiceConfig, TabContent, TabLabel, TabView, TabViewLabelOptions, TwinSwapElement, TwinSwapInput, TwinSwapInputInput, TwinSwapInputProps, TypedStorageEntry, WatchlistAction, WikiLinkMetadata, WikiMagicWord, WikiMetadataService, WikiNameSpaceAlias, WikiNamespace, WikiPageConstructor,
|
|
2357
|
+
export { AbstractIPEStorageManager, ActionButton, ActionButtonProps, ApiService, ApiServiceOptions, BasePlugin, CheckBox, CheckBoxProps, CompareApiRequestOptions, CompareApiResponse, ContentModelMap, CordisError, CordisSymbols, CurrentPageService, CustomIPEModal, EffectScope, Endpoints, Events, ForkScope, IPEBeaconPayload, IPEBeaconUsage, IPEPlugin, IPERegistry, IWikiPage, IWikiTitle, IconEdit, IconQuickDiff, IconQuickEdit, IconUpload, InArticleWikiAnchorMetadata, InPageEdit, InPageEditCoreConfig, InPageEditPreferenceUICategory, InPageEditPreferenceUIRegistryItem, Inject, InputBox, InputBoxProps, Lifecycle, MBox, MBoxElement, MBoxProps, MainScope, MemoryStorage, ModalService, MovePageOptions, PageInfo, PageParseData, PluginAnalytics, PluginInArticleLinks, PluginPluginStore, PluginPreferencesUI, PluginQuickDiff, PluginQuickEdit, PluginQuickMove, PluginQuickPreview, PluginQuickRedirect, PluginQuickUpload, PluginQuickUsage, PluginStoreRegistrySource, PluginToolbox, PreferencesMap, PreferencesService, ProgressBar, QuickEditEventPayload, QuickEditOptions, QuickEditSubmitPayload, QuickMoveOptions, QuickRedirectOptions, RadioBox, RadioBoxProps, RedirectPageOptions, RegisterPreferences, ResourceLoaderService, Schema, ScopeStatus, Service, StorageService, StorageServiceConfig, TabContent, TabLabel, TabView, TabViewLabelOptions, ThemeService, TwinSwapElement, TwinSwapInput, TwinSwapInputInput, TwinSwapInputProps, TypedStorageEntry, UploadFileParams, UploadFileResult, WatchlistAction, WikiFileRepo, WikiFileService, WikiImageInfo, WikiLinkMetadata, WikiMagicWord, WikiMetadataService, WikiNameSpaceAlias, WikiNamespace, WikiPageConstructor, WikiPageService, WikiSiteGeneralInfo, WikiSiteInfo, WikiSpecialPageAlias, WikiTitleConstructor, WikiTitleService, WikiUserBlockInfo, WikiUserInfo, WikiUserOptions, createWikiPageModel, createWikiTitleModel, useMemoryStorage };
|