@nebularstreams/libmui 2.5.76 → 2.5.78

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.76",
4
+ "version": "2.5.78",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "scripts": {
package/src/index.js CHANGED
@@ -23,10 +23,12 @@ import {OverflowMenu} from "./util/widgets.core";
23
23
  import {confirm, confirmPromise} from "./util/fuckingconfirm"
24
24
  import clone from "./util/util.clone"
25
25
  import Tokenizer from "./util/util.tokenizer"
26
- import {CoolContentTicker, CoolGenericTicker, GenericButtonTicker, optionsPrompt} from "./widgets/CoolContentTicker";
26
+ import {CoolContentTicker, CoolGenericTicker, GenericButtonTicker, ThematicWrapper, optionsPrompt} from "./widgets/CoolContentTicker";
27
27
  import EmptyButton from "./widgets/EmptyButton";
28
28
  import CoolerEmpty from "./widgets/CoolerEmpty";
29
29
  import tainter from "./util/tainter"
30
+ import {ConfirmPromise} from "./util/widgets.core.js"
31
+ import {makeLocalUrl, makeLocalPath} from "./util/filepath.js"
30
32
 
31
33
  import MainState, {implement as MainStateImplement} from "./app/MainState";
32
34
 
@@ -72,6 +74,7 @@ export {
72
74
  SwitchWidget,
73
75
  Separator,
74
76
  TitleBarWidget,
77
+ ThematicWrapper,
75
78
 
76
79
  // SelectFileMinibutton
77
80
  FileSelectButton,
@@ -94,17 +97,20 @@ export {
94
97
  optionsPrompt,
95
98
  Tokenizer,
96
99
 
100
+ MainState,
101
+ MainStateImplement,
102
+
103
+ // micro utils
97
104
  clearModal,
98
105
  clone,
99
106
  confirm,
100
107
  confirmPromise,
108
+ ConfirmPromise,
101
109
  defineWidget,
110
+ makeLocalPath,
111
+ makeLocalUrl,
102
112
  processImage,
103
113
  popupMessage,
104
114
  startApp,
105
- tainter,
106
-
107
- MainState,
108
- MainStateImplement
109
-
115
+ tainter
110
116
  }
@@ -0,0 +1,10 @@
1
+ const
2
+ AGENT = "Windows NT",
3
+ isWindows = () => navigator.userAgent.indexOf(AGENT) !== -1,
4
+ SEPARATOR_WINDOWS = "\\",
5
+ SEPARATOR_LINUX = "/",
6
+ SEPARATOR = isWindows() ? SEPARATOR_WINDOWS : SEPARATOR_LINUX,
7
+ makeLocalPath = (pathArray) => pathArray.join(SEPARATOR),
8
+ makeLocalUrl = (base, pathArray) => ["file://", ...base.split(SEPARATOR_WINDOWS), ...pathArray].join(SEPARATOR_LINUX);
9
+
10
+ export {makeLocalPath, makeLocalUrl}
@@ -85,7 +85,7 @@ const
85
85
  optionsPrompt(items, index, onAdd, onDelete, undefined, !noUpdate);
86
86
  }
87
87
  } else {
88
- onSelect(item, index, e.metaKey, e.shiftKey);
88
+ onSelect && onSelect(item, index, e.metaKey, e.shiftKey);
89
89
  }
90
90
  }
91
91
  },
@@ -234,4 +234,4 @@ const
234
234
  }
235
235
  );
236
236
 
237
- export {CoolContentTicker, CoolGenericTicker, GenericButtonTicker, optionsPrompt};
237
+ export {CoolContentTicker, CoolGenericTicker, GenericButtonTicker, ThematicWrapper, optionsPrompt};