@schukai/monster 1.14.0 → 1.15.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. package/CHANGELOG +38 -0
  2. package/README.md +5 -5
  3. package/dist/modules/constants.js +2 -2
  4. package/dist/modules/constraints/abstract.js +2 -2
  5. package/dist/modules/constraints/abstractoperator.js +2 -2
  6. package/dist/modules/constraints/andoperator.js +2 -2
  7. package/dist/modules/constraints/invalid.js +2 -2
  8. package/dist/modules/constraints/isarray.js +2 -2
  9. package/dist/modules/constraints/isobject.js +2 -2
  10. package/dist/modules/constraints/namespace.js +1 -1
  11. package/dist/modules/constraints/oroperator.js +2 -2
  12. package/dist/modules/constraints/valid.js +2 -2
  13. package/dist/modules/data/buildmap.js +2 -2
  14. package/dist/modules/data/diff.js +2 -2
  15. package/dist/modules/data/extend.js +2 -2
  16. package/dist/modules/data/namespace.js +1 -1
  17. package/dist/modules/data/pathfinder.js +2 -2
  18. package/dist/modules/data/pipe.js +2 -2
  19. package/dist/modules/data/transformer.js +2 -2
  20. package/dist/modules/dom/assembler.js +2 -2
  21. package/dist/modules/dom/attributes.js +2 -2
  22. package/dist/modules/dom/constants.js +1 -1
  23. package/dist/modules/dom/customcontrol.js +2 -2
  24. package/dist/modules/dom/customelement.js +2 -2
  25. package/dist/modules/dom/events.js +2 -2
  26. package/dist/modules/dom/locale.js +2 -2
  27. package/dist/modules/dom/namespace.js +1 -1
  28. package/dist/modules/dom/template.js +2 -2
  29. package/dist/modules/dom/theme.js +2 -2
  30. package/dist/modules/dom/updater.js +2 -2
  31. package/dist/modules/dom/util.js +2 -2
  32. package/dist/modules/i18n/locale.js +2 -2
  33. package/dist/modules/i18n/namespace.js +1 -1
  34. package/dist/modules/i18n/provider.js +2 -2
  35. package/dist/modules/i18n/providers/fetch.js +2 -2
  36. package/dist/modules/i18n/providers/namespace.js +1 -1
  37. package/dist/modules/i18n/translations.js +2 -2
  38. package/dist/modules/logging/handler/console.js +2 -2
  39. package/dist/modules/logging/handler/namespace.js +1 -1
  40. package/dist/modules/logging/handler.js +2 -2
  41. package/dist/modules/logging/logentry.js +2 -2
  42. package/dist/modules/logging/logger.js +2 -2
  43. package/dist/modules/logging/namespace.js +1 -1
  44. package/dist/modules/math/namespace.js +1 -1
  45. package/dist/modules/math/random.js +2 -2
  46. package/dist/modules/monster.js +2 -2
  47. package/dist/modules/namespace.js +2 -2
  48. package/dist/modules/text/formatter.js +2 -2
  49. package/dist/modules/text/namespace.js +1 -1
  50. package/dist/modules/types/base.js +2 -2
  51. package/dist/modules/types/basewithoptions.js +2 -2
  52. package/dist/modules/types/global.js +2 -2
  53. package/dist/modules/types/id.js +2 -2
  54. package/dist/modules/types/is.js +2 -2
  55. package/dist/modules/types/namespace.js +1 -1
  56. package/dist/modules/types/observer.js +2 -2
  57. package/dist/modules/types/observerlist.js +2 -2
  58. package/dist/modules/types/proxyobserver.js +2 -2
  59. package/dist/modules/types/queue.js +2 -2
  60. package/dist/modules/types/randomid.js +2 -2
  61. package/dist/modules/types/stack.js +2 -2
  62. package/dist/modules/types/tokenlist.js +2 -2
  63. package/dist/modules/types/typeof.js +2 -2
  64. package/dist/modules/types/uniquequeue.js +2 -2
  65. package/dist/modules/types/validate.js +2 -2
  66. package/dist/modules/types/version.js +2 -2
  67. package/dist/modules/util/clone.js +2 -2
  68. package/dist/modules/util/comparator.js +2 -2
  69. package/dist/modules/util/freeze.js +2 -2
  70. package/dist/modules/util/namespace.js +1 -1
  71. package/dist/monster.dev.js +8263 -7501
  72. package/dist/monster.dev.js.map +1 -1
  73. package/dist/monster.js +2 -9
  74. package/package.json +1 -1
  75. package/source/constants.js +6 -5
  76. package/source/constraints/abstract.js +2 -2
  77. package/source/constraints/abstractoperator.js +4 -4
  78. package/source/constraints/andoperator.js +8 -8
  79. package/source/constraints/invalid.js +6 -6
  80. package/source/constraints/isarray.js +7 -7
  81. package/source/constraints/isobject.js +7 -7
  82. package/source/constraints/namespace.js +2 -2
  83. package/source/constraints/oroperator.js +8 -8
  84. package/source/constraints/valid.js +7 -7
  85. package/source/data/buildmap.js +15 -15
  86. package/source/data/diff.js +9 -9
  87. package/source/data/extend.js +55 -13
  88. package/source/data/namespace.js +2 -2
  89. package/source/data/pathfinder.js +13 -14
  90. package/source/data/pipe.js +8 -8
  91. package/source/data/transformer.js +10 -11
  92. package/source/dom/assembler.js +7 -7
  93. package/source/dom/attributes.js +27 -28
  94. package/source/dom/constants.js +1 -2
  95. package/source/dom/customcontrol.js +90 -128
  96. package/source/dom/customelement.js +166 -71
  97. package/source/dom/events.js +9 -9
  98. package/source/dom/locale.js +5 -5
  99. package/source/dom/namespace.js +2 -2
  100. package/source/dom/template.js +30 -19
  101. package/source/dom/theme.js +8 -9
  102. package/source/dom/updater.js +43 -26
  103. package/source/dom/util.js +11 -11
  104. package/source/i18n/locale.js +7 -7
  105. package/source/i18n/namespace.js +1 -1
  106. package/source/i18n/provider.js +6 -6
  107. package/source/i18n/providers/fetch.js +10 -10
  108. package/source/i18n/translations.js +5 -5
  109. package/source/logging/handler/console.js +5 -5
  110. package/source/logging/handler/namespace.js +1 -1
  111. package/source/logging/handler.js +8 -8
  112. package/source/logging/logentry.js +5 -5
  113. package/source/logging/logger.js +5 -5
  114. package/source/logging/namespace.js +2 -2
  115. package/source/math/namespace.js +2 -2
  116. package/source/math/random.js +5 -5
  117. package/source/monster.js +48 -44
  118. package/source/namespace.js +2 -2
  119. package/source/text/formatter.js +6 -7
  120. package/source/text/namespace.js +1 -1
  121. package/source/types/base.js +4 -5
  122. package/source/types/basewithoptions.js +10 -9
  123. package/source/types/global.js +7 -7
  124. package/source/types/id.js +7 -7
  125. package/source/types/is.js +22 -22
  126. package/source/types/namespace.js +2 -2
  127. package/source/types/observer.js +7 -7
  128. package/source/types/observerlist.js +4 -4
  129. package/source/types/proxyobserver.js +32 -26
  130. package/source/types/queue.js +13 -7
  131. package/source/types/randomid.js +6 -6
  132. package/source/types/stack.js +11 -4
  133. package/source/types/tokenlist.js +9 -9
  134. package/source/types/typeof.js +5 -5
  135. package/source/types/uniquequeue.js +14 -7
  136. package/source/types/validate.js +27 -27
  137. package/source/types/version.js +9 -9
  138. package/source/util/clone.js +6 -6
  139. package/source/util/comparator.js +7 -7
  140. package/source/util/freeze.js +7 -7
  141. package/source/util/namespace.js +2 -2
  142. package/test/cases/data/extend.js +66 -13
  143. package/test/cases/dom/customcontrol.js +17 -3
  144. package/test/cases/dom/customelement.js +65 -7
  145. package/test/cases/dom/template.js +40 -1
  146. package/test/cases/monster.js +1 -1
  147. package/test/cases/types/proxyobserver.js +9 -0
  148. package/test/web/monster-dev.html +3 -3
  149. package/test/web/monster.html +2 -2
  150. package/test/web/test.html +3 -3
  151. package/test/web/tests.js +3 -3
@@ -1,24 +1,24 @@
1
1
  'use strict';
2
2
 
3
+ import {PROPERTY_KEY_INTERNALDATA} from "../../constants.js";
4
+ import {extend} from "../../data/extend.js";
3
5
  /**
4
6
  * @author schukai GmbH
5
7
  */
6
-
8
+ import {assignToNamespace, Monster} from '../../namespace.js';
7
9
  import {Formatter} from "../../text/formatter.js";
8
- import {Monster} from "../../types/base.js";
9
10
  import {getGlobalFunction} from "../../types/global.js";
10
- import {validateInstance, validateObject, validateString} from "../../types/validate.js";
11
- import {isString, isObject, isInstance} from "../../types/is.js";
11
+ import {isInstance, isString} from "../../types/is.js";
12
+ import {validateObject, validateString} from "../../types/validate.js";
12
13
  import {parseLocale} from "../locale.js";
13
14
  import {Provider} from "../provider.js";
14
- import {PROPERTY_KEY_OPTIONS} from "../../constants.js";
15
15
  import {Translations} from "../translations.js";
16
16
 
17
17
  /**
18
18
  * @private
19
19
  * @type {symbol}
20
20
  */
21
- const optionsSymbol = Symbol.for(PROPERTY_KEY_OPTIONS);
21
+ const optionsSymbol = Symbol.for(PROPERTY_KEY_INTERNALDATA);
22
22
 
23
23
  /**
24
24
  * The fetch provider retrieves a JSON file from the given URL and returns a translation object.
@@ -27,7 +27,7 @@ const optionsSymbol = Symbol.for(PROPERTY_KEY_OPTIONS);
27
27
  *
28
28
  * ```
29
29
  * <script type="module">
30
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/i18n/providers/fetch.js';
30
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/i18n/providers/fetch.js';
31
31
  * console.log(new Monster.I18n.Providers.Fetch())
32
32
  * </script>
33
33
  * ```
@@ -36,7 +36,7 @@ const optionsSymbol = Symbol.for(PROPERTY_KEY_OPTIONS);
36
36
  *
37
37
  * ```
38
38
  * <script type="module">
39
- * import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/i18n/providers/fetch.js';
39
+ * import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/i18n/providers/fetch.js';
40
40
  * console.log(new Fetch())
41
41
  * </script>
42
42
  * ```
@@ -69,7 +69,7 @@ class Fetch extends Provider {
69
69
  validateString(url);
70
70
 
71
71
  this.url = url;
72
- this[optionsSymbol] = Object.assign({}, super.defaults, this.defaults, validateObject(options));
72
+ this[optionsSymbol] = extend({}, super.defaults, this.defaults, validateObject(options));
73
73
 
74
74
  }
75
75
 
@@ -117,5 +117,5 @@ class Fetch extends Provider {
117
117
  }
118
118
 
119
119
 
120
- Monster.assignToNamespace('Monster.I18n.Providers', Fetch);
120
+ assignToNamespace('Monster.I18n.Providers', Fetch);
121
121
  export {Monster, Fetch}
@@ -3,8 +3,8 @@
3
3
  /**
4
4
  * @author schukai GmbH
5
5
  */
6
-
7
- import {Monster, Base} from "../types/base.js";
6
+ import {assignToNamespace, Monster} from '../namespace.js';
7
+ import {Base} from "../types/base.js";
8
8
  import {isObject, isString} from "../types/is.js";
9
9
  import {validateInstance, validateInteger, validateObject, validateString} from "../types/validate.js";
10
10
  import {Locale, parseLocale} from "./locale.js";
@@ -17,7 +17,7 @@ import {Locale, parseLocale} from "./locale.js";
17
17
  *
18
18
  * ```
19
19
  * <script type="module">
20
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/i18n/translations.js';
20
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/i18n/translations.js';
21
21
  * console.log(new Monster.I18n.Translations())
22
22
  * </script>
23
23
  * ```
@@ -26,7 +26,7 @@ import {Locale, parseLocale} from "./locale.js";
26
26
  *
27
27
  * ```
28
28
  * <script type="module">
29
- * import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/i18n/translations.js';
29
+ * import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/i18n/translations.js';
30
30
  * console.log(new Translations())
31
31
  * </script>
32
32
  * ```
@@ -205,5 +205,5 @@ class Translations extends Base {
205
205
  }
206
206
 
207
207
 
208
- Monster.assignToNamespace('Monster.I18n', Translations);
208
+ assignToNamespace('Monster.I18n', Translations);
209
209
  export {Monster, Translations}
@@ -4,16 +4,16 @@
4
4
  * @author schukai GmbH
5
5
  */
6
6
 
7
- import {Monster} from '../../namespace.js';
8
- import {Base} from '../../types/base.js';
9
7
  import {Handler} from '../../logging/handler.js';
8
+ import {Base} from '../../types/base.js';
9
+ import {assignToNamespace, Monster} from '../namespace.js';
10
10
 
11
11
  /**
12
12
  * you can call the method via the monster namespace `new Monster.Logging.Handler.ConsoleHandler()`.
13
13
  *
14
14
  * ```
15
15
  * <script type="module">
16
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/logging/handler/console.js';
16
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/logging/handler/console.js';
17
17
  * console.log(new Monster.Logging.Handler.ConsoleHandler())
18
18
  * </script>
19
19
  * ```
@@ -22,7 +22,7 @@ import {Handler} from '../../logging/handler.js';
22
22
  *
23
23
  * ```
24
24
  * <script type="module">
25
- * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/logging/handler/console.js';
25
+ * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/logging/handler/console.js';
26
26
  * console.log(new ConsoleHandler())
27
27
  * </script>
28
28
  * ```
@@ -38,5 +38,5 @@ class ConsoleHandler extends Base {
38
38
  }
39
39
 
40
40
 
41
- Monster.assignToNamespace('Monster.Logging', ConsoleHandler);
41
+ assignToNamespace('Monster.Logging', ConsoleHandler);
42
42
  export {Monster, Handler};
@@ -10,4 +10,4 @@
10
10
  * @private
11
11
  * @type {string}
12
12
  */
13
- const namespace="Monster.Logging.Handler";
13
+ const namespace = "Monster.Logging.Handler";
@@ -4,18 +4,18 @@
4
4
  * @author schukai GmbH
5
5
  */
6
6
 
7
- import {Monster} from '../namespace.js';
7
+ import {assignToNamespace, Monster} from '../namespace.js';
8
8
  import {Base} from '../types/base.js';
9
- import {ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN} from "./logger.js";
10
- import {LogEntry} from "./logentry.js";
11
9
  import {validateInstance, validateInteger} from "../types/validate.js";
10
+ import {LogEntry} from "./logentry.js";
11
+ import {ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN} from "./logger.js";
12
12
 
13
13
  /**
14
14
  * you can call the method via the monster namespace `new Monster.Logging.Handler()`.
15
15
  *
16
16
  * ```
17
17
  * <script type="module">
18
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/logging/handler.js';
18
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/logging/handler.js';
19
19
  * console.log(new Monster.Logging.Handler())
20
20
  * </script>
21
21
  * ```
@@ -24,7 +24,7 @@ import {validateInstance, validateInteger} from "../types/validate.js";
24
24
  *
25
25
  * ```
26
26
  * <script type="module">
27
- * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/logging/handler.js';
27
+ * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/logging/handler.js';
28
28
  * console.log(new Handler())
29
29
  * </script>
30
30
  * ```
@@ -39,8 +39,8 @@ class Handler extends Base {
39
39
 
40
40
  /**
41
41
  * Loglevel
42
- *
43
- * @type {integer}
42
+ *
43
+ * @type {integer}
44
44
  */
45
45
  this.loglevel = OFF;
46
46
  }
@@ -180,5 +180,5 @@ class Handler extends Base {
180
180
  }
181
181
 
182
182
 
183
- Monster.assignToNamespace('Monster.Logging', Handler);
183
+ assignToNamespace('Monster.Logging', Handler);
184
184
  export {Monster, Handler};
@@ -4,9 +4,9 @@
4
4
  * @author schukai GmbH
5
5
  */
6
6
 
7
- import {Monster} from '../namespace.js';
7
+ import {assignToNamespace, Monster} from '../namespace.js';
8
+ import {Base} from '../types/base.js';
8
9
  import {validateInteger} from '../types/validate.js';
9
- import {Base} from '../types/base.js';
10
10
 
11
11
 
12
12
  /**
@@ -14,7 +14,7 @@ import {Base} from '../types/base.js';
14
14
  *
15
15
  * ```
16
16
  * <script type="module">
17
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/logging/logentry.js';
17
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/logging/logentry.js';
18
18
  * console.log(new Monster.Logging.LogEntry())
19
19
  * </script>
20
20
  * ```
@@ -23,7 +23,7 @@ import {Base} from '../types/base.js';
23
23
  *
24
24
  * ```
25
25
  * <script type="module">
26
- * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/logging/logentry.js';
26
+ * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/logging/logentry.js';
27
27
  * console.log(new LogEntry())
28
28
  * </script>
29
29
  * ```
@@ -64,5 +64,5 @@ class LogEntry extends Base {
64
64
 
65
65
  }
66
66
 
67
- Monster.assignToNamespace('Monster.Logging', LogEntry);
67
+ assignToNamespace('Monster.Logging', LogEntry);
68
68
  export {Monster, LogEntry}
@@ -4,11 +4,11 @@
4
4
  * @author schukai GmbH
5
5
  */
6
6
 
7
- import {Monster} from '../namespace.js';
8
- import {validateInteger, validateObject, validateString} from '../types/validate.js';
9
7
  import {Handler} from '../logging/handler.js';
10
8
  import {LogEntry} from '../logging/logentry.js';
9
+ import {assignToNamespace, Monster} from '../namespace.js';
11
10
  import {Base} from '../types/base.js';
11
+ import {validateInteger, validateObject, validateString} from '../types/validate.js';
12
12
 
13
13
 
14
14
  /**
@@ -65,7 +65,7 @@ const OFF = 0;
65
65
  *
66
66
  * ```
67
67
  * <script type="module">
68
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/logging/logger.js';
68
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/logging/logger.js';
69
69
  * console.log(new Monster.Logging.Logger())
70
70
  * </script>
71
71
  * ```
@@ -74,7 +74,7 @@ const OFF = 0;
74
74
  *
75
75
  * ```
76
76
  * <script type="module">
77
- * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/logging/logger.js';
77
+ * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/logging/logger.js';
78
78
  * console.log(new Logger())
79
79
  * </script>
80
80
  * ```
@@ -256,7 +256,7 @@ class Logger extends Base {
256
256
 
257
257
  }
258
258
 
259
- Monster.assignToNamespace('Monster.Logging', Logger);
259
+ assignToNamespace('Monster.Logging', Logger);
260
260
  export {Monster, Logger, ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF};
261
261
 
262
262
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * Namespace for logging.
5
- *
5
+ *
6
6
  * @namespace Monster/Logging
7
7
  * @author schukai GmbH
8
8
  */
@@ -12,4 +12,4 @@
12
12
  * @private
13
13
  * @type {string}
14
14
  */
15
- const namespace="Monster.Logging";
15
+ const namespace = "Monster.Logging";
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * Namespace for math.
5
- *
5
+ *
6
6
  * @namespace Monster/Math
7
7
  * @author schukai GmbH
8
8
  */
@@ -12,4 +12,4 @@
12
12
  * @private
13
13
  * @type {string}
14
14
  */
15
- const namespace="Monster.Math";
15
+ const namespace = "Monster.Math";
@@ -4,8 +4,8 @@
4
4
  * @author schukai GmbH
5
5
  */
6
6
 
7
-
8
- import {Monster, getGlobal} from '../types/global.js';
7
+ import {assignToNamespace, Monster} from '../namespace.js';
8
+ import {getGlobal} from '../types/global.js';
9
9
 
10
10
 
11
11
  /**
@@ -15,7 +15,7 @@ import {Monster, getGlobal} from '../types/global.js';
15
15
  *
16
16
  * ```
17
17
  * <script type="module">
18
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/math/random.js';
18
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/math/random.js';
19
19
  * console.log(Monster.Math.random(1,10)) // ↦ 5
20
20
  * </script>
21
21
  * ```
@@ -24,7 +24,7 @@ import {Monster, getGlobal} from '../types/global.js';
24
24
  *
25
25
  * ```
26
26
  * <script type="module">
27
- * import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/math/random.js';
27
+ * import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/math/random.js';
28
28
  * console.log(random(1,10)) // ↦ 5
29
29
  * </script>
30
30
  * ```
@@ -120,7 +120,7 @@ function create(min, max) {
120
120
 
121
121
  }
122
122
 
123
- Monster.assignToNamespace('Monster.Math', random);
123
+ assignToNamespace('Monster.Math', random);
124
124
  export {Monster, random}
125
125
 
126
126
 
package/source/monster.js CHANGED
@@ -7,61 +7,65 @@
7
7
 
8
8
  'use strict';
9
9
 
10
- import {Monster} from './namespace.js';
10
+ import './constants.js';
11
+ import './constraints/abstract.js';
12
+ import './constraints/abstractoperator.js';
13
+ import './constraints/andoperator.js';
14
+ import './constraints/invalid.js';
15
+ import './constraints/isarray.js';
11
16
 
17
+ // find packages/monster/source/ -type f -name "*.js" -not -name "*namespace*" -not -iname "monster.js"
18
+ import './constraints/isobject.js';
19
+ import './constraints/oroperator.js';
20
+ import './constraints/valid.js';
21
+ import './data/buildmap.js';
22
+ import './data/diff.js';
23
+ import './data/extend.js';
24
+ import './data/pathfinder.js';
25
+ import './data/pipe.js';
26
+ import './data/transformer.js';
27
+ import './dom/assembler.js';
28
+ import './dom/attributes.js';
29
+ import './dom/constants.js';
30
+ import './dom/customcontrol.js';
31
+ import './dom/customelement.js';
32
+ import './dom/events.js';
33
+ import './dom/locale.js';
34
+ import './dom/template.js';
35
+ import './dom/theme.js';
36
+ import './dom/updater.js';
37
+ import './dom/util.js';
38
+ import './i18n/locale.js';
39
+ import './i18n/provider.js';
40
+ import './i18n/providers/fetch.js';
41
+ import './i18n/translations.js';
42
+ import './logging/handler.js';
43
+ import './logging/handler/console.js';
44
+ import './logging/logentry.js';
45
+ import './logging/logger.js';
46
+ import './math/random.js';
47
+ import {Monster} from './namespace.js';
48
+ import './text/formatter.js';
12
49
  import './types/base.js';
13
- import './types/queue.js';
14
- import './types/observer.js';
50
+ import './types/basewithoptions.js';
15
51
  import './types/global.js';
16
- import './types/observerlist.js';
52
+ import './types/id.js';
17
53
  import './types/is.js';
54
+ import './types/observer.js';
55
+ import './types/observerlist.js';
18
56
  import './types/proxyobserver.js';
19
- import './types/uniquequeue.js';
57
+ import './types/queue.js';
58
+ import './types/randomid.js';
59
+ import './types/stack.js';
20
60
  import './types/tokenlist.js';
21
61
  import './types/typeof.js';
22
- import './types/version.js';
23
- import './types/id.js';
24
- import './types/randomid.js';
62
+ import './types/uniquequeue.js';
25
63
  import './types/validate.js';
26
- import './types/stack.js';
27
- import './constraints/isobject.js';
28
- import './constraints/valid.js';
29
- import './constraints/invalid.js';
30
- import './constraints/abstractoperator.js';
31
- import './constraints/oroperator.js';
32
- import './constraints/andoperator.js';
33
- import './constraints/abstract.js';
34
- import './constraints/isarray.js';
35
- import './logging/logger.js';
36
- import './logging/handler.js';
37
- import './logging/logentry.js';
38
- import './logging/handler/console.js';
39
- import './dom/updater.js';
40
- import './dom/attributes.js';
41
- import './dom/template.js';
42
- import './dom/util.js';
43
- import './dom/constants.js';
44
- import './dom/assembler.js';
45
- import './dom/theme.js';
46
- import './dom/events.js';
47
- import './dom/customelement.js';
48
- import './util/comparator.js';
64
+ import './types/version.js';
49
65
  import './util/clone.js';
66
+ import './util/comparator.js';
50
67
  import './util/freeze.js';
51
- import './data/pathfinder.js';
52
- import './data/pipe.js';
53
- import './data/extend.js';
54
- import './data/diff.js';
55
- import './data/buildmap.js';
56
- import './data/transformer.js';
57
- import './math/random.js';
58
- import './text/formatter.js';
59
- import './i18n/locale.js';
60
- import './i18n/provider.js';
61
- import './i18n/translations.js';
62
- import './i18n/providers/fetch.js';
63
68
 
64
- Monster.Util.deepFreeze(Monster);
65
69
 
66
70
  let rootName
67
71
  try {
@@ -65,7 +65,7 @@ export const Monster = new Namespace("Monster");
65
65
  *
66
66
  * ```
67
67
  * <script type="module">
68
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/namespace.js';
68
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/namespace.js';
69
69
  * function hello() {
70
70
  * console.log('Hello World!');
71
71
  * }
@@ -166,5 +166,5 @@ function namespaceFor(parts) {
166
166
  }
167
167
 
168
168
 
169
- assignToNamespace('Monster', assignToNamespace);
169
+ assignToNamespace('Monster', assignToNamespace, Namespace);
170
170
  export {assignToNamespace}
@@ -1,11 +1,10 @@
1
1
  'use strict';
2
2
 
3
+ import {Pipe} from "../data/pipe.js";
3
4
  /**
4
5
  * @author schukai GmbH
5
6
  */
6
-
7
- import {Pipe} from "../data/pipe.js";
8
- import {Monster} from '../namespace.js';
7
+ import {assignToNamespace, Monster} from '../namespace.js';
9
8
  import {Base} from "../types/base.js";
10
9
  import {validateObject, validateString} from "../types/validate.js";
11
10
 
@@ -19,7 +18,7 @@ import {validateObject, validateString} from "../types/validate.js";
19
18
  *
20
19
  * ```
21
20
  * <script type="module">
22
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/text/formatter.js';
21
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/text/formatter.js';
23
22
  * console.log(new Monster.Text.Formatter())
24
23
  * </script>
25
24
  * ```
@@ -28,7 +27,7 @@ import {validateObject, validateString} from "../types/validate.js";
28
27
  *
29
28
  * ```
30
29
  * <script type="module">
31
- * import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/text/formatter.js';
30
+ * import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/text/formatter.js';
32
31
  * console.log(new Formatter())
33
32
  * </script>
34
33
  * ```
@@ -129,7 +128,7 @@ function tokenizer(text) {
129
128
  text = text.substring(startIndex)
130
129
  }
131
130
 
132
- let endIndex = text.substring(self.openMarker.length).indexOf(self.closeMarker)+self.openMarker.length;
131
+ let endIndex = text.substring(self.openMarker.length).indexOf(self.closeMarker) + self.openMarker.length;
133
132
 
134
133
  if (endIndex === -1) {
135
134
  throw new Error("syntax error in formatter template")
@@ -147,5 +146,5 @@ function tokenizer(text) {
147
146
  return formatted.join('');
148
147
  }
149
148
 
150
- Monster.assignToNamespace('Monster.Text', Formatter);
149
+ assignToNamespace('Monster.Text', Formatter);
151
150
  export {Monster, Formatter}
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * Namespace for texts.
5
- *
5
+ *
6
6
  * @namespace Monster/Text
7
7
  * @author schukai GmbH
8
8
  */
@@ -4,8 +4,7 @@
4
4
  * @author schukai GmbH
5
5
  */
6
6
 
7
- import {Monster} from '../namespace.js';
8
-
7
+ import {assignToNamespace, Monster} from '../namespace.js';
9
8
 
10
9
  /**
11
10
  * This is the base class from which all monster classes are derived.
@@ -14,7 +13,7 @@ import {Monster} from '../namespace.js';
14
13
  *
15
14
  * ```
16
15
  * <script type="module">
17
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/types/base.js';
16
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/types/base.js';
18
17
  * console.log(new Monster.Types.Base())
19
18
  * </script>
20
19
  * ```
@@ -23,7 +22,7 @@ import {Monster} from '../namespace.js';
23
22
  *
24
23
  * ```
25
24
  * <script type="module">
26
- * import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/types/base.js';
25
+ * import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/types/base.js';
27
26
  * console.log(new Base())
28
27
  * </script>
29
28
  * ```
@@ -47,5 +46,5 @@ class Base extends Object {
47
46
 
48
47
  }
49
48
 
50
- Monster.assignToNamespace('Monster.Types', Base);
49
+ assignToNamespace('Monster.Types', Base);
51
50
  export {Monster, Base}
@@ -1,19 +1,20 @@
1
1
  'use strict';
2
2
 
3
+ import {PROPERTY_KEY_INTERNALDATA} from "../constants.js";
4
+ import {extend} from "../data/extend.js";
5
+ import {Pathfinder} from "../data/pathfinder.js";
3
6
  /**
4
7
  * @author schukai GmbH
5
8
  */
6
-
7
- import {Monster, Pathfinder} from "../data/pathfinder.js";
9
+ import {assignToNamespace, Monster} from '../namespace.js';
8
10
  import {Base} from "./base.js";
9
11
  import {validateObject} from "./validate.js";
10
- import {PROPERTY_KEY_OPTIONS} from "../constants.js";
11
12
 
12
13
  /**
13
14
  * @private
14
15
  * @type {symbol}
15
16
  */
16
- const optionsSymbol = Symbol.for(PROPERTY_KEY_OPTIONS);
17
+ const optionsSymbol = Symbol.for(PROPERTY_KEY_INTERNALDATA);
17
18
 
18
19
  /**
19
20
  * This is the base class with options from which some monster classes are derived.
@@ -22,7 +23,7 @@ const optionsSymbol = Symbol.for(PROPERTY_KEY_OPTIONS);
22
23
  *
23
24
  * ```
24
25
  * <script type="module">
25
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/types/basewithoptions.js';
26
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/types/basewithoptions.js';
26
27
  * console.log(new Monster.Types.BaseWithOptions())
27
28
  * </script>
28
29
  * ```
@@ -31,7 +32,7 @@ const optionsSymbol = Symbol.for(PROPERTY_KEY_OPTIONS);
31
32
  *
32
33
  * ```
33
34
  * <script type="module">
34
- * import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.0/dist/modules/types/basewithoptions.js';
35
+ * import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.3/dist/modules/types/basewithoptions.js';
35
36
  * console.log(new BaseWithOptions())
36
37
  * </script>
37
38
  * ```
@@ -55,13 +56,13 @@ class BaseWithOptions extends Base {
55
56
  options = {};
56
57
  }
57
58
 
58
- this[optionsSymbol] = Object.assign({}, this.defaults, validateObject(options));
59
+ this[optionsSymbol] = extend({}, this.defaults, validateObject(options));
59
60
 
60
61
  }
61
62
 
62
63
  /**
63
64
  * can be overridden by child class values
64
- *
65
+ *
65
66
  * @return {object}
66
67
  */
67
68
  get defaults() {
@@ -92,5 +93,5 @@ class BaseWithOptions extends Base {
92
93
 
93
94
  }
94
95
 
95
- Monster.assignToNamespace('Monster.Types', BaseWithOptions);
96
+ assignToNamespace('Monster.Types', BaseWithOptions);
96
97
  export {Monster, BaseWithOptions}