@schukai/monster 3.23.0 → 3.25.0

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@schukai/monster",
3
- "version": "3.23.0",
3
+ "version": "3.25.0",
4
4
  "description": "Monster is a simple library for creating fast, robust and lightweight websites.",
5
5
  "keywords": [
6
6
  "framework",
@@ -8,6 +8,7 @@
8
8
  import {internalSymbol} from "../constants.mjs";
9
9
  import {extend} from "../data/extend.mjs";
10
10
  import {Pathfinder} from "../data/pathfinder.mjs";
11
+ import {Formatter} from "../text/formatter.mjs";
11
12
 
12
13
  import {parseDataURL} from "../types/dataurl.mjs";
13
14
  import {getGlobalObject} from "../types/global.mjs";
@@ -946,6 +947,11 @@ function initShadowRoot() {
946
947
  return this;
947
948
  }
948
949
 
950
+ const mapping = this.getOption("templateMapping", {});
951
+ if (isObject(mapping)) {
952
+ html = new Formatter(mapping).format(html);
953
+ }
954
+
949
955
  this.shadowRoot.innerHTML = html;
950
956
  return this;
951
957
  }
@@ -142,7 +142,7 @@ function getMonsterVersion() {
142
142
  }
143
143
 
144
144
  /** don't touch, replaced by make with package.json version */
145
- monsterVersion = new Version("3.23.0");
145
+ monsterVersion = new Version("3.25.0");
146
146
 
147
147
  return monsterVersion;
148
148
  }
@@ -7,7 +7,7 @@ describe('Monster', function () {
7
7
  let monsterVersion
8
8
 
9
9
  /** don´t touch, replaced by make with package.json version */
10
- monsterVersion = new Version("3.23.0")
10
+ monsterVersion = new Version("3.25.0")
11
11
 
12
12
  let m = getMonsterVersion();
13
13