@schukai/monster 1.15.5 → 1.17.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. package/CHANGELOG +25 -0
  2. package/README.md +4 -4
  3. package/dist/modules/constants.js +1 -1
  4. package/dist/modules/constraints/abstract.js +1 -1
  5. package/dist/modules/constraints/abstractoperator.js +1 -1
  6. package/dist/modules/constraints/andoperator.js +1 -1
  7. package/dist/modules/constraints/invalid.js +1 -1
  8. package/dist/modules/constraints/isarray.js +1 -1
  9. package/dist/modules/constraints/isobject.js +1 -1
  10. package/dist/modules/constraints/namespace.js +2 -2
  11. package/dist/modules/constraints/oroperator.js +1 -1
  12. package/dist/modules/constraints/valid.js +1 -1
  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 +1 -1
  16. package/dist/modules/data/namespace.js +2 -2
  17. package/dist/modules/data/pathfinder.js +2 -2
  18. package/dist/modules/data/pipe.js +1 -1
  19. package/dist/modules/data/transformer.js +1 -1
  20. package/dist/modules/dom/assembler.js +1 -1
  21. package/dist/modules/dom/attributes.js +1 -1
  22. package/dist/modules/dom/constants.js +1 -1
  23. package/dist/modules/dom/customcontrol.js +1 -1
  24. package/dist/modules/dom/customelement.js +1 -1
  25. package/dist/modules/dom/events.js +1 -1
  26. package/dist/modules/dom/locale.js +1 -1
  27. package/dist/modules/dom/namespace.js +2 -2
  28. package/dist/modules/dom/template.js +1 -1
  29. package/dist/modules/dom/theme.js +1 -1
  30. package/dist/modules/dom/updater.js +1 -1
  31. package/dist/modules/dom/util.js +1 -1
  32. package/dist/modules/i18n/locale.js +1 -1
  33. package/dist/modules/i18n/namespace.js +2 -2
  34. package/dist/modules/i18n/provider.js +1 -1
  35. package/dist/modules/i18n/providers/fetch.js +1 -1
  36. package/dist/modules/i18n/providers/namespace.js +2 -2
  37. package/dist/modules/i18n/translations.js +1 -1
  38. package/dist/modules/logging/handler/console.js +2 -2
  39. package/dist/modules/logging/handler/namespace.js +2 -2
  40. package/dist/modules/logging/handler.js +1 -1
  41. package/dist/modules/logging/logentry.js +1 -1
  42. package/dist/modules/logging/logger.js +1 -1
  43. package/dist/modules/logging/namespace.js +2 -2
  44. package/dist/modules/math/namespace.js +2 -2
  45. package/dist/modules/math/random.js +1 -1
  46. package/dist/modules/monster.js +1 -1
  47. package/dist/modules/namespace.js +1 -1
  48. package/dist/modules/text/formatter.js +1 -1
  49. package/dist/modules/text/namespace.js +2 -2
  50. package/dist/modules/types/base.js +1 -1
  51. package/dist/modules/types/basewithoptions.js +1 -1
  52. package/dist/modules/types/global.js +1 -1
  53. package/dist/modules/types/id.js +1 -1
  54. package/dist/modules/types/is.js +1 -1
  55. package/dist/modules/types/namespace.js +2 -2
  56. package/dist/modules/types/observer.js +1 -1
  57. package/dist/modules/types/observerlist.js +1 -1
  58. package/dist/modules/types/proxyobserver.js +1 -1
  59. package/dist/modules/types/queue.js +1 -1
  60. package/dist/modules/types/randomid.js +1 -1
  61. package/dist/modules/types/stack.js +1 -1
  62. package/dist/modules/types/tokenlist.js +1 -1
  63. package/dist/modules/types/typeof.js +1 -1
  64. package/dist/modules/types/uniquequeue.js +1 -1
  65. package/dist/modules/types/validate.js +1 -1
  66. package/dist/modules/types/version.js +2 -2
  67. package/dist/modules/util/clone.js +1 -1
  68. package/dist/modules/util/comparator.js +1 -1
  69. package/dist/modules/util/freeze.js +1 -1
  70. package/dist/modules/util/namespace.js +2 -2
  71. package/dist/monster.dev.js +1293 -943
  72. package/dist/monster.dev.js.map +1 -1
  73. package/dist/monster.js +2 -2
  74. package/package.json +1 -1
  75. package/source/constraints/abstract.js +1 -1
  76. package/source/constraints/abstractoperator.js +1 -1
  77. package/source/constraints/andoperator.js +6 -6
  78. package/source/constraints/invalid.js +4 -4
  79. package/source/constraints/isarray.js +4 -4
  80. package/source/constraints/isobject.js +4 -4
  81. package/source/constraints/namespace.js +3 -2
  82. package/source/constraints/oroperator.js +6 -6
  83. package/source/constraints/valid.js +4 -4
  84. package/source/data/buildmap.js +245 -12
  85. package/source/data/diff.js +7 -6
  86. package/source/data/extend.js +3 -3
  87. package/source/data/namespace.js +3 -2
  88. package/source/data/pathfinder.js +15 -11
  89. package/source/data/pipe.js +4 -4
  90. package/source/data/transformer.js +4 -4
  91. package/source/dom/assembler.js +4 -4
  92. package/source/dom/attributes.js +36 -46
  93. package/source/dom/constants.js +16 -14
  94. package/source/dom/customcontrol.js +12 -8
  95. package/source/dom/customelement.js +24 -11
  96. package/source/dom/events.js +6 -6
  97. package/source/dom/locale.js +5 -4
  98. package/source/dom/namespace.js +3 -2
  99. package/source/dom/template.js +6 -6
  100. package/source/dom/theme.js +5 -4
  101. package/source/dom/updater.js +11 -5
  102. package/source/dom/util.js +9 -9
  103. package/source/i18n/locale.js +27 -15
  104. package/source/i18n/namespace.js +3 -2
  105. package/source/i18n/provider.js +3 -3
  106. package/source/i18n/providers/fetch.js +22 -6
  107. package/source/i18n/providers/namespace.js +3 -2
  108. package/source/i18n/translations.js +3 -3
  109. package/source/logging/handler/console.js +34 -10
  110. package/source/logging/handler/namespace.js +3 -2
  111. package/source/logging/handler.js +4 -4
  112. package/source/logging/logentry.js +5 -5
  113. package/source/logging/logger.js +13 -13
  114. package/source/logging/namespace.js +3 -2
  115. package/source/math/namespace.js +3 -2
  116. package/source/math/random.js +3 -3
  117. package/source/namespace.js +1 -1
  118. package/source/text/formatter.js +3 -3
  119. package/source/text/namespace.js +3 -2
  120. package/source/types/base.js +3 -3
  121. package/source/types/basewithoptions.js +3 -3
  122. package/source/types/global.js +7 -7
  123. package/source/types/id.js +3 -3
  124. package/source/types/is.js +30 -30
  125. package/source/types/namespace.js +3 -2
  126. package/source/types/observer.js +4 -4
  127. package/source/types/observerlist.js +3 -3
  128. package/source/types/proxyobserver.js +6 -6
  129. package/source/types/queue.js +4 -4
  130. package/source/types/randomid.js +3 -3
  131. package/source/types/stack.js +3 -3
  132. package/source/types/tokenlist.js +3 -3
  133. package/source/types/typeof.js +4 -4
  134. package/source/types/uniquequeue.js +3 -3
  135. package/source/types/validate.js +34 -34
  136. package/source/types/version.js +7 -7
  137. package/source/util/clone.js +3 -3
  138. package/source/util/comparator.js +37 -7
  139. package/source/util/freeze.js +4 -4
  140. package/source/util/namespace.js +3 -2
  141. package/test/cases/data/buildmap.js +242 -16
  142. package/test/cases/data/diff.js +36 -3
  143. package/test/cases/data/pathfinder.js +298 -196
  144. package/test/cases/logging/handler/console.js +20 -0
  145. package/test/cases/monster.js +1 -1
  146. package/test/web/import.js +1 -0
  147. package/test/web/monster-dev.html +3 -3
  148. package/test/web/monster.html +2 -2
  149. package/test/web/test.html +2 -2
  150. package/test/web/tests.js +3 -3
@@ -27,7 +27,7 @@ const internalSymbol = Symbol('internalSymbol');
27
27
  *
28
28
  * ```
29
29
  * <script type="module">
30
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/customcontrol.js';
30
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/customcontrol.js';
31
31
  * console.log(new Monster.DOM.CustomControl())
32
32
  * </script>
33
33
  * ```
@@ -36,29 +36,36 @@ const internalSymbol = Symbol('internalSymbol');
36
36
  *
37
37
  * ```
38
38
  * <script type="module">
39
- * import {CustomControl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/customcontrol.js';
39
+ * import {CustomControl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/customcontrol.js';
40
40
  * console.log(new CustomControl())
41
41
  * </script>
42
42
  * ```
43
43
  *
44
+ * @summary A base class for customcontrols
44
45
  * @see https://www.npmjs.com/package/element-internals-polyfill
45
46
  * @see https://github.com/WICG/webcomponents
46
47
  * @see https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements
47
48
  * @since 1.14.0
48
49
  * @copyright schukai GmbH
49
- * @memberOf Monster/DOM
50
+ * @memberOf Monster.DOM
50
51
  */
51
52
  class CustomControl extends CustomElement {
52
53
 
53
54
  /**
55
+ * IMPORTANT: CustomControls instances are not created via the constructor, but either via a tag in the HTML or via <code>document.createElement()</code>.
54
56
  *
55
57
  * @throws {Error} the ElementInternals is not supported and a polyfill is necessary
58
+ * @summary create new Instance
56
59
  */
57
60
  constructor() {
58
61
  super();
59
62
 
60
63
  if (typeof this['attachInternals'] === 'function') {
61
- // currently only supported by chrome
64
+ /**
65
+ * currently only supported by chrome
66
+ * @property {Object}
67
+ * @private
68
+ */
62
69
  this[internalSymbol] = this.attachInternals();
63
70
  }
64
71
 
@@ -75,10 +82,6 @@ class CustomControl extends CustomElement {
75
82
  }
76
83
 
77
84
  /**
78
- * | option | description |
79
- * |----------------|---------------------------------|
80
- * | | |
81
- *
82
85
  * Derived classes can override and extend this method as follows.
83
86
  *
84
87
  * ```
@@ -284,6 +287,7 @@ class CustomControl extends CustomElement {
284
287
  * @private
285
288
  * @return {object}
286
289
  * @throws {Error} the ElementInternals is not supported and a polyfill is necessary
290
+ * @this CustomControl
287
291
  */
288
292
  function getInternal() {
289
293
  const self = this;
@@ -31,15 +31,25 @@ const internalDataSymbol = Symbol.for(PROPERTY_KEY_INTERNALDATA);
31
31
  const objectLinkSymbol = Symbol.for(OBJECTLINK_KEY_UPDATER);
32
32
 
33
33
  /**
34
+ * @memberOf Monster.DOM
34
35
  * @type {symbol}
35
36
  */
36
37
  const initMethodSymbol = Symbol('initMethodSymbol');
37
38
 
38
39
  /**
40
+ * @memberOf Monster.DOM
39
41
  * @type {symbol}
40
42
  */
41
43
  const assembleMethodSymbol = Symbol('assembleMethodSymbol');
42
44
 
45
+
46
+ /**
47
+ * HTMLElement
48
+ * @external HTMLElement
49
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
50
+ */
51
+
52
+
43
53
  /**
44
54
  * To define a new HTML element we need the power of CustomElement
45
55
  *
@@ -50,7 +60,7 @@ const assembleMethodSymbol = Symbol('assembleMethodSymbol');
50
60
  *
51
61
  * ```
52
62
  * <script type="module">
53
- * import {CustomElement} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/customelement.js';
63
+ * import {CustomElement} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/customelement.js';
54
64
  * console.log(new Monster.DOM.CustomElement())
55
65
  * </script>
56
66
  * ```
@@ -59,7 +69,7 @@ const assembleMethodSymbol = Symbol('assembleMethodSymbol');
59
69
  *
60
70
  * ```
61
71
  * <script type="module">
62
- * import {CustomElement} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/customelement.js';
72
+ * import {CustomElement} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/customelement.js';
63
73
  * console.log(new CustomElement())
64
74
  * </script>
65
75
  * ```
@@ -144,7 +154,8 @@ const assembleMethodSymbol = Symbol('assembleMethodSymbol');
144
154
  * @see https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements
145
155
  * @since 1.7.0
146
156
  * @copyright schukai GmbH
147
- * @memberOf Monster/DOM
157
+ * @memberOf Monster.DOM
158
+ * @extends external:HTMLElement
148
159
  */
149
160
  class CustomElement extends HTMLElement {
150
161
 
@@ -173,11 +184,6 @@ class CustomElement extends HTMLElement {
173
184
  }
174
185
 
175
186
  /**
176
- * | option | description |
177
- * |----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
178
- * | shadowMode | `open` Elements of the shadow root are accessible from JavaScript outside the root, for example using. `close` Denies access to the node(s) of a closed shadow root from JavaScript outside it |
179
- * | delegatesFocus | A boolean that, when set to true, specifies behavior that mitigates custom element issues around focusability. When a non-focusable part of the shadow DOM is clicked, the first focusable part is given focus, and the shadow host is given any available :focus styling. |
180
- * | templates.main | Main template |
181
187
  *
182
188
  * Derived classes can override and extend this method as follows.
183
189
  *
@@ -189,6 +195,11 @@ class CustomElement extends HTMLElement {
189
195
  * }
190
196
  * ```
191
197
  *
198
+ * @property {string} shadowMode=open `open` Elements of the shadow root are accessible from JavaScript outside the root, for example using. `close` Denies access to the node(s) of a closed shadow root from JavaScript outside it
199
+ * @property {Boolean} delegatesFocus=true A boolean that, when set to true, specifies behavior that mitigates custom element issues around focusability. When a non-focusable part of the shadow DOM is clicked, the first focusable part is given focus, and the shadow host is given any available :focus styling.
200
+ * @property {Object} templates Templates
201
+ * @property {string} templates.main=undefined Main template
202
+ *
192
203
  * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow
193
204
  * @return {{shadowMode: string, delegatesFocus: boolean}}
194
205
  * @since 1.8.0
@@ -439,6 +450,7 @@ class CustomElement extends HTMLElement {
439
450
  /**
440
451
  * @since 1.15.0
441
452
  * @private
453
+ * @this CustomElement
442
454
  */
443
455
  function initOptionObserver() {
444
456
  const self = this;
@@ -520,7 +532,8 @@ function initHtmlContent() {
520
532
  /**
521
533
  * @private
522
534
  * @return {CustomElement}
523
- * @memberOf Monster/DOM
535
+ * @memberOf Monster.DOM
536
+ * @this CustomElement
524
537
  * @since 1.16.0
525
538
  */
526
539
  function initCSSStylesheet() {
@@ -550,7 +563,7 @@ function initCSSStylesheet() {
550
563
  * @return {CustomElement}
551
564
  * @throws {Error} html is not set.
552
565
  * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow
553
- * @memberOf Monster/DOM
566
+ * @memberOf Monster.DOM
554
567
  * @since 1.8.0
555
568
  */
556
569
  function initShadowRoot() {
@@ -589,7 +602,7 @@ function initShadowRoot() {
589
602
  * @return {void}
590
603
  * @since 1.7.0
591
604
  * @copyright schukai GmbH
592
- * @memberOf Monster/DOM
605
+ * @memberOf Monster.DOM
593
606
  * @throws {DOMException} Failed to execute 'define' on 'CustomElementRegistry': is not a valid custom element name
594
607
  */
595
608
  function registerCustomElement(element) {
@@ -13,7 +13,7 @@ import {getDocument} from "./util.js";
13
13
  *
14
14
  * ```
15
15
  * <script type="module">
16
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/events.js';
16
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/events.js';
17
17
  * console.log(new Monster.DOM.fireEvent())
18
18
  * </script>
19
19
  * ```
@@ -22,7 +22,7 @@ import {getDocument} from "./util.js";
22
22
  *
23
23
  * ```
24
24
  * <script type="module">
25
- * import {fireEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/events.js';
25
+ * import {fireEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/events.js';
26
26
  * console.log(fireEvent())
27
27
  * </script>
28
28
  * ```
@@ -32,7 +32,7 @@ import {getDocument} from "./util.js";
32
32
  * @return {void}
33
33
  * @since 1.10.0
34
34
  * @copyright schukai GmbH
35
- * @memberOf Monster/DOM
35
+ * @memberOf Monster.DOM
36
36
  * @throws {TypeError} value is not an instance of HTMLElement or HTMLCollection
37
37
  */
38
38
  function fireEvent(element, type) {
@@ -71,7 +71,7 @@ function fireEvent(element, type) {
71
71
  *
72
72
  * ```
73
73
  * <script type="module">
74
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/events.js';
74
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/events.js';
75
75
  * console.log(new Monster.DOM.findTargetElementFromEvent())
76
76
  * </script>
77
77
  * ```
@@ -80,7 +80,7 @@ function fireEvent(element, type) {
80
80
  *
81
81
  * ```
82
82
  * <script type="module">
83
- * import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/events.js';
83
+ * import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/events.js';
84
84
  * console.log(findTargetElementFromEvent())
85
85
  * </script>
86
86
  * ```
@@ -90,7 +90,7 @@ function fireEvent(element, type) {
90
90
  * @param {string} attributeName
91
91
  * @param {string|null} attributeValue
92
92
  * @throws {Error} unsupported event
93
- * @memberOf Monster/DOM
93
+ * @memberOf Monster.DOM
94
94
  * @throws {TypeError} value is not a string
95
95
  * @throws {TypeError} value is not an instance of HTMLElement
96
96
  */
@@ -8,19 +8,20 @@ import {assignToNamespace, Monster} from '../namespace.js';
8
8
  import {getDocument} from "./util.js";
9
9
 
10
10
  /**
11
+ * @private
11
12
  * @type {string}
12
13
  */
13
14
  const DEFAULT_LANGUAGE = 'en';
14
15
 
15
16
  /**
16
17
  * With this function you can read the language version set by the document.
17
- * For this the attibute `lang` in the html tag is read. If no attribute is set, `en` is used as default.
18
+ * For this the attribute `lang` in the html tag is read. If no attribute is set, `en` is used as default.
18
19
  *
19
20
  * You can call the function via the monster namespace `new Monster.DOM.getLocaleOfDocument()`.
20
21
  *
21
22
  * ```
22
23
  * <script type="module">
23
- * import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/locale.js';
24
+ * import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/locale.js';
24
25
  * console.log(new Monster.DOM.getLocaleOfDocument())
25
26
  * </script>
26
27
  * ```
@@ -29,14 +30,14 @@ const DEFAULT_LANGUAGE = 'en';
29
30
  *
30
31
  * ```
31
32
  * <script type="module">
32
- * import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/locale.js';
33
+ * import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/locale.js';
33
34
  * console.log(new getLocaleOfDocument())
34
35
  * </script>
35
36
  * ```
36
37
  *
37
38
  * @since 1.13.0
38
39
  * @copyright schukai GmbH
39
- * @memberOf Monster/DOM
40
+ * @memberOf Monster.DOM
40
41
  * @throws {TypeError} value is not a string
41
42
  * @throws {Error} unsupported locale
42
43
  */
@@ -3,7 +3,8 @@
3
3
  /**
4
4
  * In this namespace you will find classes and methods for handling the DOM.
5
5
  *
6
- * @namespace Monster/DOM
6
+ * @namespace Monster.DOM
7
+ * @memberOf Monster
7
8
  * @author schukai GmbH
8
9
  */
9
10
 
@@ -11,4 +12,4 @@
11
12
  * @private
12
13
  * @type {string}
13
14
  */
14
- const namespace = "Monster.DOM";
15
+ export const namespace = "Monster.DOM";
@@ -14,7 +14,7 @@ import {getDocumentTheme} from "./theme.js";
14
14
  *
15
15
  * ```
16
16
  * <script type="module">
17
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/template.js';
17
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/template.js';
18
18
  * console.log(new Monster.DOM.Template())
19
19
  * </script>
20
20
  * ```
@@ -23,14 +23,14 @@ import {getDocumentTheme} from "./theme.js";
23
23
  *
24
24
  * ```
25
25
  * <script type="module">
26
- * import {Template} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/template.js';
26
+ * import {Template} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/template.js';
27
27
  * console.log(new Template())
28
28
  * </script>
29
29
  * ```
30
30
  *
31
31
  * @since 1.6.0
32
32
  * @copyright schukai GmbH
33
- * @memberOf Monster/DOM
33
+ * @memberOf Monster.DOM
34
34
  */
35
35
  class Template extends Base {
36
36
  /**
@@ -73,7 +73,7 @@ class Template extends Base {
73
73
  *
74
74
  * ```
75
75
  * <script type="module">
76
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/template.js';
76
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/template.js';
77
77
  * console.log(Monster.DOM.findDocumentTemplate())
78
78
  * </script>
79
79
  * ```
@@ -82,7 +82,7 @@ class Template extends Base {
82
82
  *
83
83
  * ```
84
84
  * <script type="module">
85
- * import {findTemplate} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/template.js';
85
+ * import {findTemplate} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/template.js';
86
86
  * console.log(findDocumentTemplate())
87
87
  * </script>
88
88
  * ```
@@ -92,7 +92,7 @@ class Template extends Base {
92
92
  * @return {Template}
93
93
  * @since 1.7.0
94
94
  * @copyright schukai GmbH
95
- * @memberOf Monster/DOM
95
+ * @memberOf Monster.DOM
96
96
  * @throws {Error} template id not found.
97
97
  * @throws {TypeError} value is not a string
98
98
  */
@@ -15,7 +15,7 @@ import {ATTRIBUTE_THEME_NAME, DEFAULT_THEME} from "./constants.js";
15
15
  *
16
16
  * ```
17
17
  * <script type="module">
18
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/theme.js';
18
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/theme.js';
19
19
  * console.log(new Monster.DOM.Theme())
20
20
  * </script>
21
21
  * ```
@@ -24,14 +24,14 @@ import {ATTRIBUTE_THEME_NAME, DEFAULT_THEME} from "./constants.js";
24
24
  *
25
25
  * ```
26
26
  * <script type="module">
27
- * import {Theme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/theme.js';
27
+ * import {Theme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/theme.js';
28
28
  * console.log(new Theme())
29
29
  * </script>
30
30
  * ```
31
31
  *
32
32
  * @example
33
33
  *
34
- * import {getDocumentTheme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/theme.js';
34
+ * import {getDocumentTheme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/theme.js';
35
35
  *
36
36
  * const theme = getDocumentTheme();
37
37
  * console.log(theme.getName());
@@ -39,7 +39,7 @@ import {ATTRIBUTE_THEME_NAME, DEFAULT_THEME} from "./constants.js";
39
39
  *
40
40
  * @since 1.7.0
41
41
  * @copyright schukai GmbH
42
- * @memberOf Monster/DOM
42
+ * @memberOf Monster.DOM
43
43
  */
44
44
  class Theme extends Base {
45
45
 
@@ -77,6 +77,7 @@ class Theme extends Base {
77
77
  * the default theme name is `monster`.
78
78
  *
79
79
  * @return {Theme}
80
+ * @memberOf Monster.DOM
80
81
  * @since 1.7.0
81
82
  */
82
83
  function getDocumentTheme() {
@@ -34,7 +34,7 @@ import {getDocument} from "./util.js";
34
34
  *
35
35
  * ```
36
36
  * <script type="module">
37
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/updater.js';
37
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/updater.js';
38
38
  * console.log(new Monster.DOM.Updater())
39
39
  * </script>
40
40
  * ```
@@ -43,14 +43,14 @@ import {getDocument} from "./util.js";
43
43
  *
44
44
  * ```
45
45
  * <script type="module">
46
- * import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/updater.js';
46
+ * import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/updater.js';
47
47
  * console.log(new Updater())
48
48
  * </script>
49
49
  * ```
50
50
  *
51
51
  * @example
52
52
  *
53
- * import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/updater.js';
53
+ * import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/updater.js';
54
54
  *
55
55
  * // First we prepare the html document.
56
56
  * // This is done here via script, but can also be inserted into the document as pure html.
@@ -76,7 +76,7 @@ import {getDocument} from "./util.js";
76
76
  *
77
77
  * @since 1.8.0
78
78
  * @copyright schukai GmbH
79
- * @memberOf Monster/DOM
79
+ * @memberOf Monster.DOM
80
80
  * @throws {Error} the value is not iterable
81
81
  * @throws {Error} pipes are not allowed when cloning a node.
82
82
  * @throws {Error} no template was found with the specified key.
@@ -244,7 +244,8 @@ class Updater extends Base {
244
244
  /**
245
245
  * @private
246
246
  * @since 1.9.0
247
- * @return {function}
247
+ * @return {function
248
+ * @this Updater
248
249
  */
249
250
  function getCheckStateCallback() {
250
251
  const self = this;
@@ -275,6 +276,7 @@ const symbol = Symbol('EventHandler');
275
276
  /**
276
277
  * @private
277
278
  * @return {function}
279
+ * @this Updater
278
280
  */
279
281
  function getControlEventHandler() {
280
282
 
@@ -385,6 +387,7 @@ function removeElement(change) {
385
387
  * @throws {Error} pipes are not allowed when cloning a node.
386
388
  * @throws {Error} no template was found with the specified key.
387
389
  * @throws {Error} the maximum depth for the recursion is reached.
390
+ * @this Updater
388
391
  */
389
392
  function insertElement(change) {
390
393
  const self = this;
@@ -539,6 +542,7 @@ function applyRecursive(node, key, path) {
539
542
  * @since 1.8.0
540
543
  * @param {object} change
541
544
  * @return {void}
545
+ * @this Updater
542
546
  */
543
547
  function updateContent(change) {
544
548
  const self = this;
@@ -615,6 +619,7 @@ function updateAttributes(change) {
615
619
  * @param {array} parts
616
620
  * @param {object} subject
617
621
  * @return {void}
622
+ * @this Updater
618
623
  */
619
624
  function runUpdateAttributes(container, parts, subject) {
620
625
 
@@ -673,6 +678,7 @@ function runUpdateAttributes(container, parts, subject) {
673
678
  * @param {string} name
674
679
  * @param {string|number|undefined} value
675
680
  * @return {void}
681
+ * @this Updater
676
682
  */
677
683
 
678
684
  function handleInputControlAttributeUpdate(element, name, value) {
@@ -13,7 +13,7 @@ import {validateString} from "../types/validate.js";
13
13
  *
14
14
  * ```
15
15
  * <script type="module">
16
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/util.js';
16
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/util.js';
17
17
  * console.log(Monster.DOM.getDocument())
18
18
  * </script>
19
19
  * ```
@@ -22,7 +22,7 @@ import {validateString} from "../types/validate.js";
22
22
  *
23
23
  * ```
24
24
  * <script type="module">
25
- * import {getDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/util.js';
25
+ * import {getDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/util.js';
26
26
  * console.log(getDocument())
27
27
  * </script>
28
28
  * ```
@@ -57,7 +57,7 @@ import {validateString} from "../types/validate.js";
57
57
  * @returns {object}
58
58
  * @since 1.6.0
59
59
  * @copyright schukai GmbH
60
- * @memberOf Monster/DOM
60
+ * @memberOf Monster.DOM
61
61
  * @throws {Error} not supported environment
62
62
  */
63
63
  function getDocument() {
@@ -74,7 +74,7 @@ function getDocument() {
74
74
  *
75
75
  * ```
76
76
  * <script type="module">
77
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/util.js';
77
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/util.js';
78
78
  * console.log(Monster.DOM.getWindow())
79
79
  * </script>
80
80
  * ```
@@ -83,7 +83,7 @@ function getDocument() {
83
83
  *
84
84
  * ```
85
85
  * <script type="module">
86
- * import {getWindow} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/util.js';
86
+ * import {getWindow} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/util.js';
87
87
  * console.log(getWindow(null))
88
88
  * </script>
89
89
  * ```
@@ -120,7 +120,7 @@ function getDocument() {
120
120
  * @returns {object}
121
121
  * @since 1.6.0
122
122
  * @copyright schukai GmbH
123
- * @memberOf Monster/DOM
123
+ * @memberOf Monster.DOM
124
124
  * @throws {Error} not supported environment
125
125
  */
126
126
  function getWindow() {
@@ -140,7 +140,7 @@ function getWindow() {
140
140
  *
141
141
  * ```
142
142
  * <script type="module">
143
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/util.js';
143
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/util.js';
144
144
  * console.log(Monster.DOM.getDocumentFragmentFromString())
145
145
  * </script>
146
146
  * ```
@@ -149,7 +149,7 @@ function getWindow() {
149
149
  *
150
150
  * ```
151
151
  * <script type="module">
152
- * import {getDocumentFragmentFromString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/dom/util.js';
152
+ * import {getDocumentFragmentFromString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/dom/util.js';
153
153
  * console.log(getDocumentFragmentFromString('<div></div>'))
154
154
  * </script>
155
155
  * ```
@@ -184,7 +184,7 @@ function getWindow() {
184
184
  * @returns {DocumentFragment}
185
185
  * @since 1.6.0
186
186
  * @copyright schukai GmbH
187
- * @memberOf Monster/DOM
187
+ * @memberOf Monster.DOM
188
188
  * @throws {Error} not supported environment
189
189
  * @throws {TypeError} value is not a string
190
190
  */
@@ -9,30 +9,32 @@ import {validateString} from "../types/validate.js";
9
9
  import {clone} from "../util/clone.js";
10
10
 
11
11
  /**
12
+ * @memberOf Monster.I18n
12
13
  * @type {symbol}
13
14
  */
14
15
  const propertiesSymbol = Symbol('properties');
15
16
 
16
17
  /**
17
18
  * @type {symbol}
19
+ * @memberOf Monster.I18n
18
20
  */
19
21
  const localeStringSymbol = Symbol('localeString');
20
22
 
21
23
  /**
22
- * You can call the method via the monster namespace `new Monster.I18n.Locale()`.
24
+ * You can create an instance via the monster namespace `new Monster.I18n.Locale()`.
23
25
  *
24
26
  * ```
25
27
  * <script type="module">
26
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/i18n/locale.js';
28
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/i18n/locale.js';
27
29
  * console.log(new Monster.I18n.Locale())
28
30
  * </script>
29
31
  * ```
30
32
  *
31
- * Alternatively, you can also integrate this function individually.
33
+ * Alternatively, you can also integrate this class individually.
32
34
  *
33
35
  * ```
34
36
  * <script type="module">
35
- * import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/i18n/locale.js';
37
+ * import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/i18n/locale.js';
36
38
  * console.log(new Locale())
37
39
  * </script>
38
40
  * ```
@@ -70,18 +72,18 @@ const localeStringSymbol = Symbol('localeString');
70
72
  *
71
73
  * @since 1.13.0
72
74
  * @copyright schukai GmbH
73
- * @memberOf Monster/I18n
75
+ * @memberOf Monster.I18n
74
76
  * @see https://datatracker.ietf.org/doc/html/rfc3066
75
77
  */
76
78
  class Locale extends Base {
77
79
 
78
80
  /**
79
- * @param {string|undefined} language
80
- * @param {string|undefined} region
81
- * @param {string|undefined} script
82
- * @param {string|undefined} variants
83
- * @param {string|undefined} extlang
84
- * @param {string|undefined} privateUse
81
+ * @param {string} language
82
+ * @param {string} [region]
83
+ * @param {string} [script]
84
+ * @param {string} [variants]
85
+ * @param {string} [extlang]
86
+ * @param {string} [privateUse]
85
87
  * @throws {Error} unsupported locale
86
88
  */
87
89
  constructor(language, region, script, variants, extlang, privateUse) {
@@ -170,7 +172,7 @@ class Locale extends Base {
170
172
  }
171
173
 
172
174
  /**
173
- * @return {object}
175
+ * @return {Monster.I18n.LocaleMap}
174
176
  */
175
177
  getMap() {
176
178
  return clone(this[propertiesSymbol])
@@ -179,6 +181,16 @@ class Locale extends Base {
179
181
 
180
182
  }
181
183
 
184
+ /**
185
+ * @typedef {Object} LocaleMap
186
+ * @property {string} language
187
+ * @property {string} script
188
+ * @property {string} region
189
+ * @property {string} variants
190
+ * @property {string} extlang
191
+ * @property {string} privateUse
192
+ * @memberOf Monster.I18n
193
+ */
182
194
 
183
195
  /**
184
196
  * Parse local according to rfc4646 standard
@@ -189,7 +201,7 @@ class Locale extends Base {
189
201
  *
190
202
  * ```
191
203
  * <script type="module">
192
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/i18n/locale.js';
204
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/i18n/locale.js';
193
205
  * console.log(new Monster.I18n.createLocale())
194
206
  * </script>
195
207
  * ```
@@ -198,7 +210,7 @@ class Locale extends Base {
198
210
  *
199
211
  * ```
200
212
  * <script type="module">
201
- * import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.5/dist/modules/i18n/locale.js';
213
+ * import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/i18n/locale.js';
202
214
  * console.log(createLocale())
203
215
  * </script>
204
216
  * ```
@@ -255,7 +267,7 @@ class Locale extends Base {
255
267
  * @returns {Locale}
256
268
  * @since 1.14.0
257
269
  * @copyright schukai GmbH
258
- * @memberOf Monster/I18n
270
+ * @memberOf Monster.I18n
259
271
  * @throws {TypeError} value is not a string
260
272
  * @throws {Error} unsupported locale
261
273
  */