kaplay-plugin-ui 1.2.1 → 1.4.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/global.d.ts CHANGED
@@ -22,6 +22,29 @@ declare global {
22
22
  */
23
23
  var addButton: Plugin['addButton'];
24
24
 
25
+ /**
26
+ * Add a modal dialog.
27
+ *
28
+ * @param opt - The modal options.
29
+ *
30
+ * @example
31
+ * ```js
32
+ * const modal = addModal({
33
+ * title: 'Pause',
34
+ * text: 'Take a break?',
35
+ * actions: [
36
+ * { text: 'Resume' },
37
+ * { text: 'Quit', onClick: () => go('menu') },
38
+ * ],
39
+ * });
40
+ *
41
+ * modal.destroy();
42
+ * ```
43
+ *
44
+ * @returns The modal object with `content` and `actions`.
45
+ */
46
+ var addModal: Plugin['addModal'];
47
+
25
48
  /**
26
49
  * Retrieve the theme.
27
50
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaplay-plugin-ui",
3
- "version": "1.2.1",
3
+ "version": "1.4.0",
4
4
  "description": "Kaplay plugin UI",
5
5
  "author": "Mark <mark@remarkablemark.org> (https://remarkablemark.org)",
6
6
  "main": "./dist/plugin.cjs",