@nebularstreams/libmui 2.5.100 → 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.100",
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,22 +555,25 @@ const
553
555
  })]
554
556
  : isJson
555
557
  ? [
556
- m(attrs.CodeMirror, {
557
- doc: rawValue,
558
- schema: metaDef.schema,
559
- templates: metaDef.templates,
560
- hint: metaDef.dynamicHint ? metaDef.dynamicHint(targetParameters) : metaDef.hint,
561
- empty: metaDef.empty,
562
- onSave: (content) => {
563
- if (content !== null) {
564
- set(content || "");
565
- onchange(UPDATECODE, targetParameters, metaKey, undefined, metaDef);
566
- if (!content) {
567
- 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
+ }
568
573
  }
569
574
  }
570
- }
571
- })
575
+ })
576
+ ])
572
577
  ]
573
578
  : isNumber
574
579
  ? [