tw5-typed 0.2.10 → 0.2.12
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 +1 -1
- package/src/widget.d.ts +18 -1
package/package.json
CHANGED
package/src/widget.d.ts
CHANGED
|
@@ -64,6 +64,10 @@ declare module 'tiddlywiki' {
|
|
|
64
64
|
@param parseTreeNodes default to `this.parseTreeNode.children`, can be undefined
|
|
65
65
|
*/
|
|
66
66
|
makeChildWidgets(parseTreeNodes?: IParseTreeNode[], options?: { variables?: unknown }): void;
|
|
67
|
+
/*
|
|
68
|
+
Initialise widget properties. These steps are pulled out of the constructor so that we can reuse them in subclasses
|
|
69
|
+
*/
|
|
70
|
+
initialise(parseTreeNode: IParseTreeNode, options?: { document?: Document; parentWidget?: Widget; wiki?: ITiddlyWiki }): void;
|
|
67
71
|
/**
|
|
68
72
|
* Remove any DOM nodes created by this widget or its children
|
|
69
73
|
*
|
|
@@ -120,7 +124,7 @@ declare module 'tiddlywiki' {
|
|
|
120
124
|
* @param event
|
|
121
125
|
* @returns handled
|
|
122
126
|
*/
|
|
123
|
-
invokeAction
|
|
127
|
+
invokeAction(triggeringWidget: Widget, event: IWidgetEvent): boolean | undefined;
|
|
124
128
|
|
|
125
129
|
/**
|
|
126
130
|
* Lifecycle method: Render this widget into the DOM
|
|
@@ -199,4 +203,17 @@ declare module 'tiddlywiki' {
|
|
|
199
203
|
export interface TW_TextNode extends Node {
|
|
200
204
|
textContent: string;
|
|
201
205
|
}
|
|
206
|
+
|
|
207
|
+
export interface ModalWidget {
|
|
208
|
+
new (wiki: Wiki): ModalWidget;
|
|
209
|
+
adjustPageClass(): void;
|
|
210
|
+
/**
|
|
211
|
+
*
|
|
212
|
+
* @param title
|
|
213
|
+
* @param options
|
|
214
|
+
* variables: optional hashmap of variables to wrap around the widget
|
|
215
|
+
* downloadLink: normally is used for "Right-click to save changes"
|
|
216
|
+
*/
|
|
217
|
+
display(title: string, options?: { downloadLink?: string; event?: IWidgetEvent; variables?: unknown }): void;
|
|
218
|
+
}
|
|
202
219
|
}
|