@nebularstreams/libmui 2.5.71 → 2.5.73

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nebularstreams/libmui",
3
3
  "description": "Micro UI based on Mithril",
4
- "version": "2.5.71",
4
+ "version": "2.5.73",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "scripts": {
package/src/index.js CHANGED
@@ -27,7 +27,6 @@ import {CoolContentTicker, CoolGenericTicker, GenericButtonTicker, optionsPrompt
27
27
  import EmptyButton from "./widgets/EmptyButton";
28
28
  import CoolerEmpty from "./widgets/CoolerEmpty";
29
29
  import tainter from "./util/tainter"
30
- import UploadFile from "./widgets/UploadFile.js"
31
30
 
32
31
  import MainState, {implement as MainStateImplement} from "./app/MainState";
33
32
 
@@ -1,8 +1,8 @@
1
1
  import {ConfirmPromise} from "./widgets.core";
2
2
 
3
3
  function confirm(text, onAction, onCancel = undefined, optionYes = "YES", optionNo = "NO") {
4
- ConfirmPromise(null, text, [optionNo, optionYes], onCancel)
5
- .then(({idx}) => {
4
+ confirmPromise(text, [optionNo, optionYes], onCancel)
5
+ .then((idx) => {
6
6
  if (idx) onAction(idx); else if (onCancel) onCancel();
7
7
  })
8
8
  .catch(() => {
@@ -1,7 +1,7 @@
1
1
  import m from 'mithril';
2
2
  import {defineWidget, ButtonNew} from "./Basic.js"
3
3
  import {promptName} from "./OverflowUtils"
4
- import {confirmPromise} from "../util/fuckingconfirm"
4
+ import {confirmPromise} from "../util/fuckingconfirm.js"
5
5
 
6
6
  const
7
7
  ThematicWrapper = defineWidget(
@@ -21,12 +21,11 @@ const
21
21
 
22
22
  confirmPromise(
23
23
  "Choose an action for this preset",
24
-
25
24
  onAdd && allowUpdate
26
25
  ? ["DELETE", "RENAME", "UPDATE", "CANCEL"]
27
26
  : ["DELETE", "RENAME", "CANCEL"]
28
27
  )
29
- .then(({idx}) => {
28
+ .then((idx) => {
30
29
 
31
30
  if (idx === 0) {
32
31
  items.splice(index, 1);