tw5-typed 0.2.10 → 0.2.11

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/widget.d.ts +14 -1
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "description": "Types for tiddlywiki",
3
3
  "license": "MIT",
4
4
  "name": "tw5-typed",
5
- "version": "0.2.10",
5
+ "version": "0.2.11",
6
6
  "url": "https://github.com/tiddly-gittly/tw5-typed",
7
7
  "homepage": "https://github.com/tiddly-gittly/tw5-typed",
8
8
  "bugs": {
package/src/widget.d.ts CHANGED
@@ -120,7 +120,7 @@ declare module 'tiddlywiki' {
120
120
  * @param event
121
121
  * @returns handled
122
122
  */
123
- invokeAction: (triggeringWidget: Widget, event: IWidgetEvent) => boolean | undefined;
123
+ invokeAction(triggeringWidget: Widget, event: IWidgetEvent): boolean | undefined;
124
124
 
125
125
  /**
126
126
  * Lifecycle method: Render this widget into the DOM
@@ -199,4 +199,17 @@ declare module 'tiddlywiki' {
199
199
  export interface TW_TextNode extends Node {
200
200
  textContent: string;
201
201
  }
202
+
203
+ export interface ModalWidget {
204
+ new (wiki: Wiki): ModalWidget;
205
+ adjustPageClass(): void;
206
+ /**
207
+ *
208
+ * @param title
209
+ * @param options
210
+ * variables: optional hashmap of variables to wrap around the widget
211
+ * downloadLink: normally is used for "Right-click to save changes"
212
+ */
213
+ display(title: string, options?: { downloadLink?: string; event?: IWidgetEvent; variables?: unknown }): void;
214
+ }
202
215
  }