@nebularstreams/libmui 2.5.99 → 2.5.101

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.99",
4
+ "version": "2.5.101",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "scripts": {
@@ -29,7 +29,9 @@ const
29
29
  NEEDS_UPDATE = "needsUpdate",
30
30
  REBUILD_CHILDREN = "_rebuild_children",
31
31
  NEEDS_DELETE = "delete",
32
-
32
+ KeyWrapper = defineWidget(
33
+ ({children}) => [children]
34
+ ),
33
35
  ToggleWidget = defineWidget(
34
36
  ({attrs}) => m(ButtonNew, {
35
37
  text: attrs.text,
@@ -553,21 +555,25 @@ const
553
555
  })]
554
556
  : isJson
555
557
  ? [
556
- m(attrs.CodeMirror, {
557
- doc: rawValue,
558
- schema: metaDef.schema,
559
- hint: metaDef.dynamicHint ? metaDef.dynamicHint(targetParameters) : metaDef.hint,
560
- empty: metaDef.empty,
561
- onSave: (content) => {
562
- if (content !== null) {
563
- set(content || "");
564
- onchange(UPDATECODE, targetParameters, metaKey, undefined, metaDef);
565
- if (!content) {
566
- Notification.add(metaDef.hint + " cleared");
558
+ m(KeyWrapper, [
559
+ m(attrs.CodeMirror, {
560
+ key: parameters.id,
561
+ doc: rawValue,
562
+ schema: metaDef.schema,
563
+ templates: metaDef.templates,
564
+ hint: metaDef.dynamicHint ? metaDef.dynamicHint(targetParameters) : metaDef.hint,
565
+ empty: metaDef.empty,
566
+ onSave: (content) => {
567
+ if (content !== null) {
568
+ set(content || "");
569
+ onchange(UPDATECODE, targetParameters, metaKey, undefined, metaDef);
570
+ if (!content) {
571
+ Notification.add(metaDef.hint + " cleared");
572
+ }
567
573
  }
568
574
  }
569
- }
570
- })
575
+ })
576
+ ])
571
577
  ]
572
578
  : isNumber
573
579
  ? [