@schukai/monster 1.24.0 → 1.25.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. package/CHANGELOG +14 -0
  2. package/README.md +4 -4
  3. package/dist/modules/constants.js +2 -2
  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 +1 -1
  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 +1 -1
  14. package/dist/modules/data/datasource/namespace.js +1 -1
  15. package/dist/modules/data/datasource/restapi/writeerror.js +1 -1
  16. package/dist/modules/data/datasource/restapi.js +1 -1
  17. package/dist/modules/data/datasource/storage/localstorage.js +1 -1
  18. package/dist/modules/data/datasource/storage/namespace.js +1 -1
  19. package/dist/modules/data/datasource/storage/sessionstorage.js +1 -1
  20. package/dist/modules/data/datasource/storage.js +1 -1
  21. package/dist/modules/data/datasource.js +1 -1
  22. package/dist/modules/data/diff.js +1 -1
  23. package/dist/modules/data/extend.js +1 -1
  24. package/dist/modules/data/namespace.js +1 -1
  25. package/dist/modules/data/pathfinder.js +1 -1
  26. package/dist/modules/data/pipe.js +1 -1
  27. package/dist/modules/data/transformer.js +2 -2
  28. package/dist/modules/dom/assembler.js +1 -1
  29. package/dist/modules/dom/attributes.js +1 -1
  30. package/dist/modules/dom/constants.js +2 -2
  31. package/dist/modules/dom/customcontrol.js +1 -1
  32. package/dist/modules/dom/customelement.js +1 -1
  33. package/dist/modules/dom/events.js +1 -1
  34. package/dist/modules/dom/focusmanager.js +2 -0
  35. package/dist/modules/dom/locale.js +1 -1
  36. package/dist/modules/dom/namespace.js +1 -1
  37. package/dist/modules/dom/resource/data.js +2 -0
  38. package/dist/modules/dom/resource/link/stylesheet.js +2 -0
  39. package/dist/modules/dom/resource/link.js +2 -0
  40. package/dist/modules/dom/resource/script.js +2 -0
  41. package/dist/modules/dom/resource.js +2 -0
  42. package/dist/modules/dom/resourcemanager.js +2 -0
  43. package/dist/modules/dom/template.js +1 -1
  44. package/dist/modules/dom/theme.js +1 -1
  45. package/dist/modules/dom/updater.js +1 -1
  46. package/dist/modules/dom/util.js +1 -1
  47. package/dist/modules/dom/worker/factory.js +2 -0
  48. package/dist/modules/i18n/locale.js +1 -1
  49. package/dist/modules/i18n/namespace.js +1 -1
  50. package/dist/modules/i18n/provider.js +1 -1
  51. package/dist/modules/i18n/providers/fetch.js +1 -1
  52. package/dist/modules/i18n/providers/namespace.js +1 -1
  53. package/dist/modules/i18n/translations.js +1 -1
  54. package/dist/modules/logging/handler/console.js +1 -1
  55. package/dist/modules/logging/handler/namespace.js +1 -1
  56. package/dist/modules/logging/handler.js +1 -1
  57. package/dist/modules/logging/logentry.js +1 -1
  58. package/dist/modules/logging/logger.js +1 -1
  59. package/dist/modules/logging/namespace.js +1 -1
  60. package/dist/modules/math/namespace.js +1 -1
  61. package/dist/modules/math/random.js +2 -2
  62. package/dist/modules/monster.js +1 -1
  63. package/dist/modules/namespace.js +1 -1
  64. package/dist/modules/text/formatter.js +1 -1
  65. package/dist/modules/text/namespace.js +1 -1
  66. package/dist/modules/types/base.js +1 -1
  67. package/dist/modules/types/basewithoptions.js +1 -1
  68. package/dist/modules/types/binary.js +1 -1
  69. package/dist/modules/types/dataurl.js +1 -1
  70. package/dist/modules/types/global.js +1 -1
  71. package/dist/modules/types/id.js +1 -1
  72. package/dist/modules/types/is.js +1 -1
  73. package/dist/modules/types/mediatype.js +1 -1
  74. package/dist/modules/types/namespace.js +1 -1
  75. package/dist/modules/types/observer.js +1 -1
  76. package/dist/modules/types/observerlist.js +1 -1
  77. package/dist/modules/types/proxyobserver.js +1 -1
  78. package/dist/modules/types/queue.js +1 -1
  79. package/dist/modules/types/randomid.js +1 -1
  80. package/dist/modules/types/stack.js +1 -1
  81. package/dist/modules/types/tokenlist.js +1 -1
  82. package/dist/modules/types/typeof.js +1 -1
  83. package/dist/modules/types/uniquequeue.js +1 -1
  84. package/dist/modules/types/uuid.js +2 -0
  85. package/dist/modules/types/validate.js +1 -1
  86. package/dist/modules/types/version.js +2 -2
  87. package/dist/modules/util/clone.js +1 -1
  88. package/dist/modules/util/comparator.js +1 -1
  89. package/dist/modules/util/freeze.js +1 -1
  90. package/dist/modules/util/namespace.js +1 -1
  91. package/dist/modules/util/processing.js +1 -1
  92. package/dist/modules/util/trimspaces.js +1 -1
  93. package/dist/monster.dev.js +549 -249
  94. package/dist/monster.dev.js.map +1 -1
  95. package/dist/monster.js +2 -2
  96. package/package.json +1 -1
  97. package/source/constants.js +11 -2
  98. package/source/constraints/andoperator.js +5 -5
  99. package/source/constraints/invalid.js +3 -3
  100. package/source/constraints/isarray.js +3 -3
  101. package/source/constraints/isobject.js +3 -3
  102. package/source/constraints/oroperator.js +5 -5
  103. package/source/constraints/valid.js +3 -3
  104. package/source/data/buildmap.js +4 -4
  105. package/source/data/datasource/restapi.js +3 -3
  106. package/source/data/datasource/storage/localstorage.js +2 -2
  107. package/source/data/datasource/storage/sessionstorage.js +2 -2
  108. package/source/data/datasource/storage.js +3 -3
  109. package/source/data/datasource.js +3 -3
  110. package/source/data/diff.js +3 -3
  111. package/source/data/extend.js +2 -2
  112. package/source/data/pathfinder.js +4 -4
  113. package/source/data/pipe.js +3 -3
  114. package/source/data/transformer.js +7 -5
  115. package/source/dom/assembler.js +2 -2
  116. package/source/dom/attributes.js +24 -24
  117. package/source/dom/constants.js +278 -9
  118. package/source/dom/customcontrol.js +1 -1
  119. package/source/dom/customelement.js +1 -1
  120. package/source/dom/events.js +4 -4
  121. package/source/dom/focusmanager.js +251 -0
  122. package/source/dom/locale.js +4 -3
  123. package/source/dom/resource/data.js +170 -0
  124. package/source/dom/resource/link/stylesheet.js +54 -0
  125. package/source/dom/resource/link.js +125 -0
  126. package/source/dom/resource/script.js +112 -0
  127. package/source/dom/resource.js +268 -0
  128. package/source/dom/resourcemanager.js +214 -0
  129. package/source/dom/template.js +40 -10
  130. package/source/dom/theme.js +3 -3
  131. package/source/dom/updater.js +7 -7
  132. package/source/dom/util.js +6 -6
  133. package/source/dom/worker/factory.js +134 -0
  134. package/source/i18n/locale.js +4 -4
  135. package/source/i18n/provider.js +2 -2
  136. package/source/i18n/providers/fetch.js +2 -2
  137. package/source/i18n/translations.js +3 -3
  138. package/source/logging/handler/console.js +2 -2
  139. package/source/logging/handler.js +2 -2
  140. package/source/logging/logentry.js +2 -2
  141. package/source/logging/logger.js +2 -2
  142. package/source/math/random.js +9 -5
  143. package/source/namespace.js +1 -1
  144. package/source/text/formatter.js +3 -3
  145. package/source/types/base.js +4 -4
  146. package/source/types/basewithoptions.js +2 -2
  147. package/source/types/binary.js +4 -4
  148. package/source/types/dataurl.js +4 -4
  149. package/source/types/global.js +4 -4
  150. package/source/types/id.js +2 -2
  151. package/source/types/is.js +23 -23
  152. package/source/types/mediatype.js +4 -4
  153. package/source/types/observer.js +3 -3
  154. package/source/types/observerlist.js +2 -2
  155. package/source/types/proxyobserver.js +5 -5
  156. package/source/types/queue.js +3 -3
  157. package/source/types/randomid.js +2 -2
  158. package/source/types/stack.js +2 -2
  159. package/source/types/tokenlist.js +2 -2
  160. package/source/types/typeof.js +3 -3
  161. package/source/types/uniquequeue.js +2 -2
  162. package/source/types/uuid.js +102 -0
  163. package/source/types/validate.js +20 -20
  164. package/source/types/version.js +6 -6
  165. package/source/util/clone.js +2 -2
  166. package/source/util/comparator.js +4 -4
  167. package/source/util/freeze.js +5 -5
  168. package/source/util/processing.js +3 -3
  169. package/source/util/trimspaces.js +3 -3
  170. package/test/cases/data/datasource/restapi.js +1 -1
  171. package/test/cases/data/transformer.js +2 -0
  172. package/test/cases/dom/customelement.js +0 -3
  173. package/test/cases/dom/focusmanager.js +111 -0
  174. package/test/cases/dom/locale.js +1 -4
  175. package/test/cases/dom/resource/data.js +129 -0
  176. package/test/cases/dom/resource/link/stylesheet.js +101 -0
  177. package/test/cases/dom/resource/link.js +101 -0
  178. package/test/cases/dom/resource/script.js +115 -0
  179. package/test/cases/dom/resourcemanager.js +118 -0
  180. package/test/cases/dom/worker/factory.js +63 -0
  181. package/test/cases/monster.js +1 -1
  182. package/test/cases/types/uuid.js +42 -0
  183. package/test/cases/util/freeze.js +30 -4
  184. package/test/util/cleanupdom.js +48 -0
  185. package/test/util/jsdom.js +23 -9
  186. package/test/web/import.js +8 -0
  187. package/test/web/monster-dev.html +3 -3
  188. package/test/web/monster.html +2 -2
  189. package/test/web/test.html +3 -3
  190. package/test/web/tests.js +7 -7
@@ -20,7 +20,7 @@ import {ATTRIBUTE_OBJECTLINK} from "./constants.js";
20
20
  *
21
21
  * ```
22
22
  * <script type="module">
23
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/updater.js';
23
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/updater.js';
24
24
  * console.log(Monster.DOM.findClosestObjectLink())
25
25
  * </script>
26
26
  * ```
@@ -29,7 +29,7 @@ import {ATTRIBUTE_OBJECTLINK} from "./constants.js";
29
29
  *
30
30
  * ```
31
31
  * <script type="module">
32
- * import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/updater.js';
32
+ * import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/updater.js';
33
33
  * console.log(findClosestObjectLink())
34
34
  * </script>
35
35
  * ```
@@ -50,7 +50,7 @@ function findClosestObjectLink(element) {
50
50
  *
51
51
  * ```
52
52
  * <script type="module">
53
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
53
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
54
54
  * Monster.DOM.addToObjectLink();
55
55
  * </script>
56
56
  * ```
@@ -59,7 +59,7 @@ function findClosestObjectLink(element) {
59
59
  *
60
60
  * ```
61
61
  * <script type="module">
62
- * import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
62
+ * import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
63
63
  * addToObjectLink();
64
64
  * </script>
65
65
  * ```
@@ -92,7 +92,7 @@ function addToObjectLink(element, symbol, object) {
92
92
  *
93
93
  * ```
94
94
  * <script type="module">
95
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
95
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
96
96
  * Monster.DOM.removeObjectLink();
97
97
  * </script>
98
98
  * ```
@@ -101,7 +101,7 @@ function addToObjectLink(element, symbol, object) {
101
101
  *
102
102
  * ```
103
103
  * <script type="module">
104
- * import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
104
+ * import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
105
105
  * removeObjectLink();
106
106
  * </script>
107
107
  * ```
@@ -134,7 +134,7 @@ function removeObjectLink(element, symbol) {
134
134
  *
135
135
  * ```
136
136
  * <script type="module">
137
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
137
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
138
138
  * Monster.DOM.hasObjectLink();
139
139
  * </script>
140
140
  * ```
@@ -143,7 +143,7 @@ function removeObjectLink(element, symbol) {
143
143
  *
144
144
  * ```
145
145
  * <script type="module">
146
- * import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
146
+ * import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
147
147
  * hasObjectLink();
148
148
  * </script>
149
149
  * ```
@@ -180,7 +180,7 @@ function hasObjectLink(element, symbol) {
180
180
  *
181
181
  * ```
182
182
  * <script type="module">
183
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
183
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
184
184
  * Monster.DOM.getLinkedObjects();
185
185
  * </script>
186
186
  * ```
@@ -189,7 +189,7 @@ function hasObjectLink(element, symbol) {
189
189
  *
190
190
  * ```
191
191
  * <script type="module">
192
- * import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
192
+ * import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
193
193
  * getLinkedObjects();
194
194
  * </script>
195
195
  * ```
@@ -225,7 +225,7 @@ function getLinkedObjects(element, symbol) {
225
225
  *
226
226
  * ```
227
227
  * <script type="module">
228
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
228
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
229
229
  * Monster.DOM.toggleAttributeToken();
230
230
  * </script>
231
231
  * ```
@@ -234,7 +234,7 @@ function getLinkedObjects(element, symbol) {
234
234
  *
235
235
  * ```
236
236
  * <script type="module">
237
- * import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
237
+ * import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
238
238
  * toggleAttributeToken();
239
239
  * </script>
240
240
  * ```
@@ -269,7 +269,7 @@ function toggleAttributeToken(element, key, token) {
269
269
  *
270
270
  * ```
271
271
  * <script type="module">
272
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
272
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
273
273
  * Monster.DOM.addAttributeToken();
274
274
  * </script>
275
275
  * ```
@@ -278,7 +278,7 @@ function toggleAttributeToken(element, key, token) {
278
278
  *
279
279
  * ```
280
280
  * <script type="module">
281
- * import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
281
+ * import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
282
282
  * addAttributeToken();
283
283
  * </script>
284
284
  * ```
@@ -315,7 +315,7 @@ function addAttributeToken(element, key, token) {
315
315
  *
316
316
  * ```
317
317
  * <script type="module">
318
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
318
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
319
319
  * Monster.DOM.removeAttributeToken();
320
320
  * </script>
321
321
  * ```
@@ -324,7 +324,7 @@ function addAttributeToken(element, key, token) {
324
324
  *
325
325
  * ```
326
326
  * <script type="module">
327
- * import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
327
+ * import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
328
328
  * removeAttributeToken();
329
329
  * </script>
330
330
  * ```
@@ -360,7 +360,7 @@ function removeAttributeToken(element, key, token) {
360
360
  *
361
361
  * ```
362
362
  * <script type="module">
363
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
363
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
364
364
  * Monster.DOM.containsAttributeToken();
365
365
  * </script>
366
366
  * ```
@@ -369,7 +369,7 @@ function removeAttributeToken(element, key, token) {
369
369
  *
370
370
  * ```
371
371
  * <script type="module">
372
- * import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
372
+ * import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
373
373
  * containsAttributeToken();
374
374
  * </script>
375
375
  * ```
@@ -402,7 +402,7 @@ function containsAttributeToken(element, key, token) {
402
402
  *
403
403
  * ```
404
404
  * <script type="module">
405
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
405
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
406
406
  * Monster.DOM.replaceAttributeToken();
407
407
  * </script>
408
408
  * ```
@@ -411,7 +411,7 @@ function containsAttributeToken(element, key, token) {
411
411
  *
412
412
  * ```
413
413
  * <script type="module">
414
- * import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
414
+ * import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
415
415
  * replaceAttributeToken();
416
416
  * </script>
417
417
  * ```
@@ -447,7 +447,7 @@ function replaceAttributeToken(element, key, from, to) {
447
447
  *
448
448
  * ```
449
449
  * <script type="module">
450
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
450
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
451
451
  * Monster.DOM.clearAttributeTokens();
452
452
  * </script>
453
453
  * ```
@@ -456,7 +456,7 @@ function replaceAttributeToken(element, key, from, to) {
456
456
  *
457
457
  * ```
458
458
  * <script type="module">
459
- * import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
459
+ * import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
460
460
  * clearAttributeTokens();
461
461
  * </script>
462
462
  * ```
@@ -486,7 +486,7 @@ function clearAttributeTokens(element, key) {
486
486
  *
487
487
  * ```
488
488
  * <script type="module">
489
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
489
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
490
490
  * Monster.DOM.findClosestByAttribute();
491
491
  * </script>
492
492
  * ```
@@ -495,7 +495,7 @@ function clearAttributeTokens(element, key) {
495
495
  *
496
496
  * ```
497
497
  * <script type="module">
498
- * import {findClosestByAttribute} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/attributes.js';
498
+ * import {findClosestByAttribute} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
499
499
  * findClosestByAttribute();
500
500
  * </script>
501
501
  * ```
@@ -5,29 +5,29 @@ import {Monster} from '../namespace.js';
5
5
  * @author schukai GmbH
6
6
  */
7
7
 
8
+
8
9
  /**
10
+ * default theme
9
11
  * @memberOf Monster.DOM
10
- * @since 1.8.0
11
12
  * @type {string}
12
13
  */
13
- const ATTRIBUTE_PREFIX = 'data-monster-';
14
+ const DEFAULT_THEME = 'monster';
14
15
 
15
16
  /**
16
- * This is the name of the attribute to pass options to a control
17
- *
18
17
  * @memberOf Monster.DOM
19
18
  * @since 1.8.0
20
19
  * @type {string}
21
20
  */
22
- const ATTRIBUTE_OPTIONS = ATTRIBUTE_PREFIX + 'options';
23
-
21
+ const ATTRIBUTE_PREFIX = 'data-monster-';
24
22
 
25
23
  /**
26
- * default theme
24
+ * This is the name of the attribute to pass options to a control
25
+ *
27
26
  * @memberOf Monster.DOM
27
+ * @since 1.8.0
28
28
  * @type {string}
29
29
  */
30
- const DEFAULT_THEME = 'monster';
30
+ const ATTRIBUTE_OPTIONS = ATTRIBUTE_PREFIX + 'options';
31
31
 
32
32
  /**
33
33
  * @memberOf Monster.DOM
@@ -126,9 +126,278 @@ const ATTRIBUTE_ERRORMESSAGE = ATTRIBUTE_PREFIX + 'error';
126
126
  */
127
127
  const objectUpdaterLinkSymbol = Symbol('monsterUpdater');
128
128
 
129
+ /**
130
+ * @memberOf Monster.DOM
131
+ * @type {string}
132
+ * @since 1.25.0
133
+ */
134
+ const TAG_SCRIPT = 'script';
135
+
136
+ /**
137
+ * @memberOf Monster.DOM
138
+ * @type {string}
139
+ * @since 1.25.0
140
+ */
141
+ const TAG_STYLE = 'style';
142
+
143
+ /**
144
+ * @memberOf Monster.DOM
145
+ * @type {string}
146
+ * @since 1.25.0
147
+ */
148
+ const TAG_LINK = 'link';
149
+
150
+ /**
151
+ * @memberOf Monster.DOM
152
+ * @type {string}
153
+ * @since 1.25.0
154
+ */
155
+
156
+ const ATTRIBUTE_ID = 'id';
157
+
158
+ /**
159
+ * @memberOf Monster.DOM
160
+ * @type {string}
161
+ * @since 1.25.0
162
+ */
163
+
164
+ const ATTRIBUTE_CLASS = 'class';
165
+
166
+ /**
167
+ * @memberOf Monster.DOM
168
+ * @type {string}
169
+ * @since 1.25.0
170
+ */
171
+ const ATTRIBUTE_TITLE = 'title';
172
+
173
+ /**
174
+ * @memberOf Monster.DOM
175
+ * @type {string}
176
+ * @since 1.25.0
177
+ */
178
+ const ATTRIBUTE_SRC = 'src';
179
+ /**
180
+ * @memberOf Monster.DOM
181
+ * @type {string}
182
+ * @since 1.25.0
183
+ */
184
+ const ATTRIBUTE_HREF = 'href';
185
+
186
+ /**
187
+ * @memberOf Monster.DOM
188
+ * @type {string}
189
+ * @since 1.25.0
190
+ */
191
+ const ATTRIBUTE_TYPE = 'type';
192
+
193
+ /**
194
+ * @memberOf Monster.DOM
195
+ * @type {string}
196
+ * @since 1.25.0
197
+ */
198
+ const ATTRIBUTE_NONCE = 'nonce';
199
+
200
+ /**
201
+ * @memberOf Monster.DOM
202
+ * @type {string}
203
+ * @since 1.25.0
204
+ */
205
+ const ATTRIBUTE_TRANSLATE = 'translate';
206
+
207
+
208
+ /**
209
+ * @memberOf Monster.DOM
210
+ * @type {string}
211
+ * @since 1.25.0
212
+ */
213
+ const ATTRIBUTE_TABINDEX = 'tabindex';
214
+
215
+
216
+ /**
217
+ * @memberOf Monster.DOM
218
+ * @type {string}
219
+ * @since 1.25.0
220
+ */
221
+ const ATTRIBUTE_SPELLCHECK = 'spellcheck';
222
+
223
+
224
+ /**
225
+ * @memberOf Monster.DOM
226
+ * @type {string}
227
+ * @since 1.25.0
228
+ */
229
+ const ATTRIBUTE_SLOT = 'slot';
230
+
231
+
232
+ /**
233
+ * @memberOf Monster.DOM
234
+ * @type {string}
235
+ * @since 1.25.0
236
+ */
237
+ const ATTRIBUTE_PART = 'part';
238
+
239
+
240
+ /**
241
+ * @memberOf Monster.DOM
242
+ * @type {string}
243
+ * @since 1.25.0
244
+ */
245
+ const ATTRIBUTE_LANG = 'lang';
246
+
247
+
248
+ /**
249
+ * @memberOf Monster.DOM
250
+ * @type {string}
251
+ * @since 1.25.0
252
+ */
253
+ const ATTRIBUTE_ITEMTYPE = 'itemtype';
254
+
255
+
256
+ /**
257
+ * @memberOf Monster.DOM
258
+ * @type {string}
259
+ * @since 1.25.0
260
+ */
261
+ const ATTRIBUTE_ITEMSCOPE = 'itemscope';
262
+
263
+
264
+ /**
265
+ * @memberOf Monster.DOM
266
+ * @type {string}
267
+ * @since 1.25.0
268
+ */
269
+ const ATTRIBUTE_ITEMREF = 'itemref';
270
+
271
+
272
+ /**
273
+ * @memberOf Monster.DOM
274
+ * @type {string}
275
+ * @since 1.25.0
276
+ */
277
+ const ATTRIBUTE_ITEMID = 'itemid';
278
+
279
+
280
+ /**
281
+ * @memberOf Monster.DOM
282
+ * @type {string}
283
+ * @since 1.25.0
284
+ */
285
+ const ATTRIBUTE_ITEMPROP = 'itemprop';
286
+
287
+
288
+ /**
289
+ * @memberOf Monster.DOM
290
+ * @type {string}
291
+ * @since 1.25.0
292
+ */
293
+ const ATTRIBUTE_IS = 'is';
294
+
295
+
296
+ /**
297
+ * @memberOf Monster.DOM
298
+ * @type {string}
299
+ * @since 1.25.0
300
+ */
301
+ const ATTRIBUTE_INPUTMODE = 'inputmode';
302
+
303
+
304
+ /**
305
+ * @memberOf Monster.DOM
306
+ * @type {string}
307
+ * @since 1.25.0
308
+ */
309
+ const ATTRIBUTE_ACCESSKEY = 'accesskey';
310
+
311
+ /**
312
+ * @memberOf Monster.DOM
313
+ * @type {string}
314
+ * @since 1.25.0
315
+ */
316
+ const ATTRIBUTE_AUTOCAPITALIZE = 'autocapitalize';
317
+
318
+ /**
319
+ * @memberOf Monster.DOM
320
+ * @type {string}
321
+ * @since 1.25.0
322
+ */
323
+ const ATTRIBUTE_AUTOFOCUS = 'autofocus';
324
+
325
+ /**
326
+ * @memberOf Monster.DOM
327
+ * @type {string}
328
+ * @since 1.25.0
329
+ */
330
+ const ATTRIBUTE_CONTENTEDITABLE = 'contenteditable';
331
+
332
+ /**
333
+ * @memberOf Monster.DOM
334
+ * @type {string}
335
+ * @since 1.25.0
336
+ */
337
+ const ATTRIBUTE_DIR = 'dir';
338
+
339
+ /**
340
+ * @memberOf Monster.DOM
341
+ * @type {string}
342
+ * @since 1.25.0
343
+ */
344
+ const ATTRIBUTE_DRAGGABLE = 'draggable';
345
+
346
+
347
+ /**
348
+ * @memberOf Monster.DOM
349
+ * @type {string}
350
+ * @since 1.25.0
351
+ */
352
+ const ATTRIBUTE_ENTERKEYHINT = 'enterkeyhint';
353
+ /**
354
+ * @memberOf Monster.DOM
355
+ * @type {string}
356
+ * @since 1.25.0
357
+ */
358
+ const ATTRIBUTE_EXPORTPARTS = 'exportparts';
359
+ /**
360
+ * @memberOf Monster.DOM
361
+ * @type {string}
362
+ * @since 1.25.0
363
+ */
364
+ const ATTRIBUTE_HIDDEN = 'hidden';
365
+
129
366
 
130
367
  export {
131
368
  Monster,
369
+ ATTRIBUTE_HIDDEN,
370
+ ATTRIBUTE_EXPORTPARTS,
371
+ ATTRIBUTE_ENTERKEYHINT,
372
+ ATTRIBUTE_DRAGGABLE,
373
+ ATTRIBUTE_DIR,
374
+ ATTRIBUTE_CONTENTEDITABLE,
375
+ ATTRIBUTE_AUTOFOCUS,
376
+ ATTRIBUTE_AUTOCAPITALIZE,
377
+ ATTRIBUTE_ACCESSKEY,
378
+ TAG_SCRIPT,
379
+ TAG_LINK,
380
+ ATTRIBUTE_INPUTMODE,
381
+ ATTRIBUTE_IS,
382
+ ATTRIBUTE_ITEMPROP,
383
+ ATTRIBUTE_ITEMID,
384
+ ATTRIBUTE_ITEMREF,
385
+ ATTRIBUTE_ITEMSCOPE,
386
+ TAG_STYLE,
387
+ ATTRIBUTE_ITEMTYPE,
388
+ ATTRIBUTE_HREF,
389
+ ATTRIBUTE_LANG,
390
+ ATTRIBUTE_PART,
391
+ ATTRIBUTE_SLOT,
392
+ ATTRIBUTE_SPELLCHECK,
393
+ ATTRIBUTE_SRC,
394
+ ATTRIBUTE_TABINDEX,
395
+ ATTRIBUTE_TRANSLATE,
396
+ ATTRIBUTE_NONCE,
397
+ ATTRIBUTE_TYPE,
398
+ ATTRIBUTE_TITLE,
399
+ ATTRIBUTE_CLASS,
400
+ ATTRIBUTE_ID,
132
401
  ATTRIBUTE_PREFIX,
133
402
  ATTRIBUTE_OPTIONS,
134
403
  DEFAULT_THEME,
@@ -146,4 +415,4 @@ export {
146
415
  ATTRIBUTE_ERRORMESSAGE,
147
416
  ATTRIBUTE_VALUE,
148
417
  objectUpdaterLinkSymbol
149
- }
418
+ }
@@ -30,7 +30,7 @@ const attachedInternalSymbol = Symbol('attachedInternal');
30
30
  *
31
31
  * ```
32
32
  * <script type="module">
33
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/customcontrol.js';
33
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/customcontrol.js';
34
34
  * document.createElement('monster-')
35
35
  * </script>
36
36
  * ```
@@ -96,7 +96,7 @@ const attributeObserverSymbol = Symbol('attributeObserver');
96
96
  *
97
97
  * ```
98
98
  * <script type="module">
99
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/customelement.js';
99
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/customelement.js';
100
100
  * document.createElement('monster-')
101
101
  * </script>
102
102
  * ```
@@ -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.24.0/dist/modules/dom/events.js';
16
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/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.24.0/dist/modules/dom/events.js';
25
+ * import {fireEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/events.js';
26
26
  * console.log(fireEvent())
27
27
  * </script>
28
28
  * ```
@@ -73,7 +73,7 @@ function fireEvent(element, type) {
73
73
  *
74
74
  * ```
75
75
  * <script type="module">
76
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/events.js';
76
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/events.js';
77
77
  * console.log(new Monster.DOM.findTargetElementFromEvent())
78
78
  * </script>
79
79
  * ```
@@ -82,7 +82,7 @@ function fireEvent(element, type) {
82
82
  *
83
83
  * ```
84
84
  * <script type="module">
85
- * import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.24.0/dist/modules/dom/events.js';
85
+ * import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/events.js';
86
86
  * console.log(findTargetElementFromEvent())
87
87
  * </script>
88
88
  * ```