tw5-typed 0.3.4 → 0.3.6
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/package.json
CHANGED
package/src/boot/index.d.ts
CHANGED
|
@@ -20,6 +20,10 @@ declare module 'tiddlywiki' {
|
|
|
20
20
|
|
|
21
21
|
export interface IBoot {
|
|
22
22
|
argv: string[];
|
|
23
|
+
/**
|
|
24
|
+
* Parse any extra plugin references from `$tw.boot.argv[0]` that with `+` prefix.
|
|
25
|
+
*/
|
|
26
|
+
extraPlugins: string[];
|
|
23
27
|
boot: (callback?: () => void) => void;
|
|
24
28
|
files: IBootFilesIndex;
|
|
25
29
|
log: (logString: string) => void;
|
package/src/core.d.ts
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
/// <reference path="plugins/index.d.ts" />
|
|
8
8
|
|
|
9
9
|
declare module 'tiddlywiki' {
|
|
10
|
-
|
|
11
10
|
export interface IPluginInfo {
|
|
12
11
|
version: string;
|
|
13
12
|
'plugin-type': string;
|
|
@@ -32,7 +31,7 @@ declare module 'tiddlywiki' {
|
|
|
32
31
|
* Presents when we have $tw.syncadaptor
|
|
33
32
|
*/
|
|
34
33
|
syncer?: Syncer;
|
|
35
|
-
Syncer: { new(): Syncer };
|
|
34
|
+
Syncer: { new (): Syncer };
|
|
36
35
|
|
|
37
36
|
wiki: Wiki;
|
|
38
37
|
boot: IBoot;
|
|
@@ -139,5 +138,10 @@ declare module 'tiddlywiki' {
|
|
|
139
138
|
node: null | Record<string, any>;
|
|
140
139
|
/** Broswer features, if tw isn't running on a browser environment, the value will be `null` */
|
|
141
140
|
nodeWebKit: null | Record<string, any>;
|
|
141
|
+
platform: {
|
|
142
|
+
isLinux: boolean;
|
|
143
|
+
isMac: boolean;
|
|
144
|
+
isWindows: boolean;
|
|
145
|
+
};
|
|
142
146
|
}
|
|
143
147
|
}
|
package/src/hooks.d.ts
CHANGED
|
@@ -1,9 +1,34 @@
|
|
|
1
1
|
declare module 'tiddlywiki' {
|
|
2
2
|
export class Syncer {
|
|
3
|
+
pollTimerInterval: number;
|
|
3
4
|
syncadaptor?: SyncAdaptor;
|
|
4
5
|
/**
|
|
5
6
|
Synchronise from the server by reading the skinny tiddler list and queuing up loads for any tiddlers that we don't already have up to date
|
|
6
7
|
*/
|
|
7
8
|
syncFromServer(): void;
|
|
9
|
+
/**
|
|
10
|
+
Process the next task
|
|
11
|
+
*/
|
|
12
|
+
processTaskQueue(): void;
|
|
13
|
+
/**
|
|
14
|
+
Update the document body with the class "tc-dirty" if the wiki has unsaved/unsynced changes
|
|
15
|
+
*/
|
|
16
|
+
updateDirtyStatus(): void;
|
|
17
|
+
/**
|
|
18
|
+
Checks whether the wiki is dirty (ie the window shouldn't be closed)
|
|
19
|
+
*/
|
|
20
|
+
isDirty(): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Return an array of the tiddler titles that are subjected to syncing
|
|
23
|
+
*/
|
|
24
|
+
getSyncedTiddlers(): string[];
|
|
25
|
+
/**
|
|
26
|
+
* Get stringified revision number, for example, `'0'`.
|
|
27
|
+
*/
|
|
28
|
+
getTiddlerRevision(title: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Read (or re-read) the latest tiddler info from the store
|
|
31
|
+
*/
|
|
32
|
+
readTiddlerInfo(): void;
|
|
8
33
|
}
|
|
9
34
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare module 'tiddlywiki' {
|
|
2
|
+
export class NavigatorWidget extends Widget {
|
|
3
|
+
getStoryList(): string[] | null;
|
|
4
|
+
saveStoryList(storyList: string[]): void;
|
|
5
|
+
removeTitleFromStory(storyList: string[], title: string): void;
|
|
6
|
+
replaceFirstTitleInStory(
|
|
7
|
+
storyList: string[],
|
|
8
|
+
oldTitle: string,
|
|
9
|
+
newTitle: string,
|
|
10
|
+
): void;
|
|
11
|
+
addToStory(title: string, fromTitle: string): void;
|
|
12
|
+
addToHistory(title: string, fromPageRect): void;
|
|
13
|
+
handleNavigateEvent(event: Event): void;
|
|
14
|
+
handleCloseTiddlerEvent(event: Event): void;
|
|
15
|
+
handleCloseAllTiddlersEvent(event: Event): void;
|
|
16
|
+
handleCloseOtherTiddlersEvent(event: Event): void;
|
|
17
|
+
handleEditTiddlerEvent(event: Event): void;
|
|
18
|
+
handleDeleteTiddlerEvent(event: Event): void;
|
|
19
|
+
makeDraftTiddler(targetTitle): void;
|
|
20
|
+
generateDraftTitle(title): void;
|
|
21
|
+
handleSaveTiddlerEvent(event: Event): void;
|
|
22
|
+
handleCancelTiddlerEvent(event: Event): void;
|
|
23
|
+
handleNewTiddlerEvent(event: Event): void;
|
|
24
|
+
handleImportTiddlersEvent(event: Event): void;
|
|
25
|
+
handlePerformImportEvent(event: Event): void;
|
|
26
|
+
handleFoldTiddlerEvent(event: Event): void;
|
|
27
|
+
handleFoldOtherTiddlersEvent(event: Event): void;
|
|
28
|
+
handleFoldAllTiddlersEvent(event: Event): void;
|
|
29
|
+
handleUnfoldAllTiddlersEvent(event: Event): void;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
declare module '$:/core/modules/widgets/widget.js' {
|
|
33
|
+
import { NavigatorWidget } from 'tiddlywiki';
|
|
34
|
+
export { NavigatorWidget as navigator };
|
|
35
|
+
}
|