@nebularstreams/libmui 2.5.64 → 2.5.66

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.64",
4
+ "version": "2.5.66",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "scripts": {
@@ -216,10 +216,15 @@ function tokenizeUrl(tokenizedUrl, parameters, options) {
216
216
  }
217
217
  }
218
218
 
219
- function sanitizeFilename(filename) {
219
+ const
220
+ REGEX_DOTS = /[^0-9A-Z.-]+/gi,
221
+ REGEX_NODOTS = /[^0-9A-Z-]+/gi;
222
+
223
+ function sanitizeFilename(filename, withDots = true) {
224
+ withDots = withDots || filename?.endsWith(".");
220
225
  return filename ? filename.trim()
221
226
  .toLowerCase()
222
- .replace(/[^0-9A-Z.-]+/gi, "") : null;
227
+ .replace(withDots ? REGEX_DOTS : REGEX_NODOTS, "") : null;
223
228
  }
224
229
 
225
230
 
@@ -883,7 +883,7 @@ const
883
883
  emptyIcon: metaDef.emptyIcon || metaDef.icon,
884
884
  confirm: metaDef.confirm,
885
885
  icon: metaDef.icon || attrs.icon,
886
- hint: metaDef.title,
886
+ hint: metaDef.hint,
887
887
  label: metaDef.label,
888
888
  title: metaDef.question,
889
889
  itemsKey: typeof metaDef.optionsKey === "function" ? () => {