@schukai/monster 1.29.0 → 1.30.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG +26 -2
- package/README.md +3 -3
- package/dist/modules/constants.js +1 -1
- package/dist/modules/constraints/abstract.js +1 -1
- package/dist/modules/constraints/abstractoperator.js +1 -1
- package/dist/modules/constraints/andoperator.js +1 -1
- package/dist/modules/constraints/invalid.js +1 -1
- package/dist/modules/constraints/isarray.js +1 -1
- package/dist/modules/constraints/isobject.js +1 -1
- package/dist/modules/constraints/namespace.js +1 -1
- package/dist/modules/constraints/oroperator.js +1 -1
- package/dist/modules/constraints/valid.js +1 -1
- package/dist/modules/data/buildmap.js +2 -2
- package/dist/modules/data/buildtree.js +2 -2
- package/dist/modules/data/datasource/namespace.js +1 -1
- package/dist/modules/data/datasource/restapi/writeerror.js +1 -1
- package/dist/modules/data/datasource/restapi.js +2 -2
- package/dist/modules/data/datasource/storage/localstorage.js +1 -1
- package/dist/modules/data/datasource/storage/namespace.js +1 -1
- package/dist/modules/data/datasource/storage/sessionstorage.js +1 -1
- package/dist/modules/data/datasource/storage.js +1 -1
- package/dist/modules/data/datasource.js +1 -1
- package/dist/modules/data/diff.js +2 -2
- package/dist/modules/data/extend.js +1 -1
- package/dist/modules/data/namespace.js +1 -1
- package/dist/modules/data/pathfinder.js +2 -2
- package/dist/modules/data/pipe.js +1 -1
- package/dist/modules/data/transformer.js +2 -2
- package/dist/modules/dom/assembler.js +1 -1
- package/dist/modules/dom/attributes.js +2 -2
- package/dist/modules/dom/constants.js +2 -2
- package/dist/modules/dom/customcontrol.js +1 -1
- package/dist/modules/dom/customelement.js +2 -2
- package/dist/modules/dom/events.js +1 -1
- package/dist/modules/dom/focusmanager.js +1 -1
- package/dist/modules/dom/locale.js +1 -1
- package/dist/modules/dom/namespace.js +1 -1
- package/dist/modules/dom/resource/data.js +1 -1
- package/dist/modules/dom/resource/link/stylesheet.js +1 -1
- package/dist/modules/dom/resource/link.js +1 -1
- package/dist/modules/dom/resource/script.js +1 -1
- package/dist/modules/dom/resource.js +1 -1
- package/dist/modules/dom/resourcemanager.js +2 -2
- package/dist/modules/dom/template.js +2 -2
- package/dist/modules/dom/theme.js +1 -1
- package/dist/modules/dom/updater.js +2 -2
- package/dist/modules/dom/util.js +1 -1
- package/dist/modules/dom/worker/factory.js +2 -2
- package/dist/modules/i18n/formatter.js +2 -2
- package/dist/modules/i18n/locale.js +1 -1
- package/dist/modules/i18n/namespace.js +1 -1
- package/dist/modules/i18n/provider.js +1 -1
- package/dist/modules/i18n/providers/fetch.js +1 -1
- package/dist/modules/i18n/providers/namespace.js +1 -1
- package/dist/modules/i18n/translations.js +1 -1
- package/dist/modules/logging/handler/console.js +1 -1
- package/dist/modules/logging/handler/namespace.js +1 -1
- package/dist/modules/logging/handler.js +1 -1
- package/dist/modules/logging/logentry.js +1 -1
- package/dist/modules/logging/logger.js +1 -1
- package/dist/modules/logging/namespace.js +1 -1
- package/dist/modules/math/namespace.js +1 -1
- package/dist/modules/math/random.js +2 -2
- package/dist/modules/monster.js +1 -1
- package/dist/modules/namespace.js +1 -1
- package/dist/modules/text/formatter.js +2 -2
- package/dist/modules/text/namespace.js +1 -1
- package/dist/modules/types/base.js +1 -1
- package/dist/modules/types/basewithoptions.js +2 -2
- package/dist/modules/types/binary.js +1 -1
- package/dist/modules/types/dataurl.js +2 -2
- package/dist/modules/types/global.js +1 -1
- package/dist/modules/types/id.js +2 -2
- package/dist/modules/types/is.js +1 -1
- package/dist/modules/types/mediatype.js +2 -2
- package/dist/modules/types/namespace.js +1 -1
- package/dist/modules/types/node.js +1 -1
- package/dist/modules/types/nodelist.js +1 -1
- package/dist/modules/types/noderecursiveiterator.js +1 -1
- package/dist/modules/types/observer.js +1 -1
- package/dist/modules/types/observerlist.js +1 -1
- package/dist/modules/types/proxyobserver.js +2 -2
- package/dist/modules/types/queue.js +1 -1
- package/dist/modules/types/randomid.js +1 -1
- package/dist/modules/types/regex.js +1 -1
- package/dist/modules/types/stack.js +1 -1
- package/dist/modules/types/tokenlist.js +1 -1
- package/dist/modules/types/typeof.js +1 -1
- package/dist/modules/types/uniquequeue.js +2 -2
- package/dist/modules/types/uuid.js +2 -2
- package/dist/modules/types/validate.js +1 -1
- package/dist/modules/types/version.js +2 -2
- package/dist/modules/util/clone.js +1 -1
- package/dist/modules/util/comparator.js +1 -1
- package/dist/modules/util/deadmansswitch.js +1 -1
- package/dist/modules/util/freeze.js +1 -1
- package/dist/modules/util/namespace.js +1 -1
- package/dist/modules/util/processing.js +1 -1
- package/dist/modules/util/trimspaces.js +2 -2
- package/dist/monster.dev.js +508 -313
- package/dist/monster.dev.js.map +1 -1
- package/dist/monster.js +2 -2
- package/package.json +1 -1
- package/source/constraints/andoperator.js +5 -5
- package/source/constraints/invalid.js +3 -3
- package/source/constraints/isarray.js +3 -3
- package/source/constraints/isobject.js +3 -3
- package/source/constraints/oroperator.js +5 -5
- package/source/constraints/valid.js +3 -3
- package/source/data/buildmap.js +12 -5
- package/source/data/buildtree.js +2 -2
- package/source/data/datasource/restapi.js +3 -3
- package/source/data/datasource/storage/localstorage.js +2 -2
- package/source/data/datasource/storage/sessionstorage.js +2 -2
- package/source/data/datasource/storage.js +3 -3
- package/source/data/datasource.js +3 -3
- package/source/data/diff.js +3 -3
- package/source/data/extend.js +2 -2
- package/source/data/pathfinder.js +5 -4
- package/source/data/pipe.js +3 -3
- package/source/data/transformer.js +3 -3
- package/source/dom/assembler.js +2 -2
- package/source/dom/attributes.js +27 -27
- package/source/dom/constants.js +11 -1
- package/source/dom/customcontrol.js +1 -1
- package/source/dom/customelement.js +117 -30
- package/source/dom/events.js +6 -6
- package/source/dom/focusmanager.js +2 -2
- package/source/dom/locale.js +2 -2
- package/source/dom/resource/data.js +2 -2
- package/source/dom/resource/link/stylesheet.js +2 -2
- package/source/dom/resource/link.js +2 -2
- package/source/dom/resource/script.js +2 -2
- package/source/dom/resource.js +2 -2
- package/source/dom/resourcemanager.js +2 -2
- package/source/dom/template.js +5 -5
- package/source/dom/theme.js +3 -3
- package/source/dom/updater.js +25 -17
- package/source/dom/util.js +6 -6
- package/source/dom/worker/factory.js +2 -2
- package/source/i18n/formatter.js +4 -4
- package/source/i18n/locale.js +4 -4
- package/source/i18n/provider.js +2 -2
- package/source/i18n/providers/fetch.js +3 -3
- package/source/i18n/translations.js +4 -4
- package/source/logging/handler/console.js +2 -2
- package/source/logging/handler.js +2 -2
- package/source/logging/logentry.js +2 -2
- package/source/logging/logger.js +2 -2
- package/source/math/random.js +2 -2
- package/source/namespace.js +1 -1
- package/source/text/formatter.js +3 -3
- package/source/types/base.js +2 -2
- package/source/types/basewithoptions.js +32 -6
- package/source/types/binary.js +4 -4
- package/source/types/dataurl.js +4 -4
- package/source/types/global.js +4 -4
- package/source/types/id.js +2 -2
- package/source/types/is.js +20 -20
- package/source/types/mediatype.js +4 -4
- package/source/types/node.js +2 -2
- package/source/types/nodelist.js +2 -2
- package/source/types/noderecursiveiterator.js +4 -4
- package/source/types/observer.js +3 -3
- package/source/types/observerlist.js +2 -2
- package/source/types/proxyobserver.js +5 -5
- package/source/types/queue.js +3 -3
- package/source/types/randomid.js +2 -2
- package/source/types/regex.js +2 -2
- package/source/types/stack.js +2 -2
- package/source/types/tokenlist.js +2 -2
- package/source/types/typeof.js +3 -3
- package/source/types/uniquequeue.js +2 -2
- package/source/types/uuid.js +2 -2
- package/source/types/validate.js +20 -20
- package/source/types/version.js +6 -6
- package/source/util/clone.js +2 -2
- package/source/util/comparator.js +3 -3
- package/source/util/deadmansswitch.js +3 -3
- package/source/util/freeze.js +2 -2
- package/source/util/processing.js +3 -3
- package/source/util/trimspaces.js +2 -2
- package/test/cases/dom/customelement.js +236 -3
- package/test/cases/dom/resource/link.js +3 -5
- package/test/cases/dom/updater.js +76 -3
- package/test/cases/monster.js +1 -1
- package/test/util/jsdom.js +1 -0
- package/test/web/monster-dev.html +3 -3
- package/test/web/monster.html +2 -2
- package/test/web/test.html +3 -2
- package/test/web/tests.js +7 -13
package/dist/monster.dev.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/** Monster 1.
|
1
|
+
/** Monster 1.30.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
|
2
2
|
(function webpackUniversalModuleDefinition(root, factory) {
|
3
3
|
if(typeof exports === 'object' && typeof module === 'object')
|
4
4
|
module.exports = factory();
|
@@ -140,7 +140,7 @@ var Monster = new Namespace("Monster");
|
|
140
140
|
*
|
141
141
|
* ```
|
142
142
|
* <script type="module">
|
143
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
143
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
144
144
|
* function hello() {
|
145
145
|
* console.log('Hello World!');
|
146
146
|
* }
|
@@ -387,7 +387,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
387
387
|
*
|
388
388
|
* ```
|
389
389
|
* <script type="module">
|
390
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
390
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
391
391
|
* new Monster.Types.Base()
|
392
392
|
* </script>
|
393
393
|
* ```
|
@@ -396,7 +396,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
396
396
|
*
|
397
397
|
* ```
|
398
398
|
* <script type="module">
|
399
|
-
* import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
399
|
+
* import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/base.js';
|
400
400
|
* new Base()
|
401
401
|
* </script>
|
402
402
|
* ```
|
@@ -455,6 +455,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
455
455
|
|
456
456
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
457
457
|
|
458
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
459
|
+
|
460
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
461
|
+
|
458
462
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
459
463
|
|
460
464
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
@@ -513,7 +517,7 @@ var AbstractOperator = /*#__PURE__*/function (_AbstractConstraint) {
|
|
513
517
|
return _this;
|
514
518
|
}
|
515
519
|
|
516
|
-
return AbstractOperator;
|
520
|
+
return _createClass(AbstractOperator);
|
517
521
|
}(_abstract_js__WEBPACK_IMPORTED_MODULE_1__.AbstractConstraint);
|
518
522
|
|
519
523
|
(0,_namespace_js__WEBPACK_IMPORTED_MODULE_0__.assignToNamespace)('Monster.Constraints', AbstractOperator);
|
@@ -568,7 +572,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
568
572
|
*
|
569
573
|
* ```
|
570
574
|
* <script type="module">
|
571
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
575
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
572
576
|
* new Monster.Constraint.AndOperator();
|
573
577
|
* </script>
|
574
578
|
* ```
|
@@ -577,16 +581,16 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
577
581
|
*
|
578
582
|
* ```
|
579
583
|
* <script type="module">
|
580
|
-
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
584
|
+
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraints/andoperator.js';
|
581
585
|
* new AndOperator();
|
582
586
|
* </script>
|
583
587
|
* ```
|
584
588
|
*
|
585
589
|
* @example
|
586
590
|
*
|
587
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
588
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
589
|
-
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
591
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraints/valid.js';
|
592
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraints/invalid.js';
|
593
|
+
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraints/andoperator.js';
|
590
594
|
*
|
591
595
|
* new AndOperator(
|
592
596
|
* new Valid(), new Valid()).isValid()
|
@@ -688,7 +692,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
688
692
|
*
|
689
693
|
* ```
|
690
694
|
* <script type="module">
|
691
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
695
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
692
696
|
* new Monster.Constraint.Invalid();
|
693
697
|
* </script>
|
694
698
|
* ```
|
@@ -697,14 +701,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
697
701
|
*
|
698
702
|
* ```
|
699
703
|
* <script type="module">
|
700
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
704
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraints/invalid.js';
|
701
705
|
* new Invalid();
|
702
706
|
* </script>
|
703
707
|
* ```
|
704
708
|
*
|
705
709
|
* @example
|
706
710
|
*
|
707
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
711
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraints/invalid.js';
|
708
712
|
*
|
709
713
|
* new Invalid().isValid()
|
710
714
|
* .then(()=>console.log(true))
|
@@ -799,7 +803,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
799
803
|
*
|
800
804
|
* ```
|
801
805
|
* <script type="module">
|
802
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
806
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
803
807
|
* new Monster.Constraint.IsArray()
|
804
808
|
* </script>
|
805
809
|
* ```
|
@@ -808,14 +812,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
808
812
|
*
|
809
813
|
* ```
|
810
814
|
* <script type="module">
|
811
|
-
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
815
|
+
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraints/isarray.js';
|
812
816
|
* console.log(new IsArray())
|
813
817
|
* </script>
|
814
818
|
* ```
|
815
819
|
*
|
816
820
|
* @example
|
817
821
|
*
|
818
|
-
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
822
|
+
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraints/isarray.js';
|
819
823
|
*
|
820
824
|
* new IsArray()
|
821
825
|
* .isValid([])
|
@@ -904,7 +908,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
904
908
|
*
|
905
909
|
* ```
|
906
910
|
* <script type="module">
|
907
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
911
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
908
912
|
* Monster.Types.isIterable(null) // ↦ false
|
909
913
|
* Monster.Types.isIterable('hello') // ↦ true
|
910
914
|
* Monster.Types.isIterable([]) // ↦ true
|
@@ -915,7 +919,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
915
919
|
*
|
916
920
|
* ```
|
917
921
|
* <script type="module">
|
918
|
-
* import {isIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
922
|
+
* import {isIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/is.js';
|
919
923
|
* isIterable(null) // ↦ false
|
920
924
|
* isIterable('hello') // ↦ true
|
921
925
|
* isIterable([]) // ↦ true
|
@@ -943,7 +947,7 @@ function isIterable(value) {
|
|
943
947
|
*
|
944
948
|
* ```
|
945
949
|
* <script type="module">
|
946
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
950
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
947
951
|
* Monster.Types.isPrimitive('2') // ↦ false
|
948
952
|
* Monster.Types.isPrimitive([]) // ↦ true
|
949
953
|
* </script>
|
@@ -953,7 +957,7 @@ function isIterable(value) {
|
|
953
957
|
*
|
954
958
|
* ```
|
955
959
|
* <script type="module">
|
956
|
-
* import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
960
|
+
* import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/is.js';
|
957
961
|
* isPrimitive('2')) // ↦ true
|
958
962
|
* isPrimitive([])) // ↦ false
|
959
963
|
* </script>
|
@@ -991,7 +995,7 @@ function isPrimitive(value) {
|
|
991
995
|
*
|
992
996
|
* ```
|
993
997
|
* <script type="module">
|
994
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
998
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
995
999
|
* Monster.Types.isSymbol('2') // ↦ false
|
996
1000
|
* Monster.Types.isSymbol(Symbol('test') // ↦ true
|
997
1001
|
* </script>
|
@@ -1001,7 +1005,7 @@ function isPrimitive(value) {
|
|
1001
1005
|
*
|
1002
1006
|
* ```
|
1003
1007
|
* <script type="module">
|
1004
|
-
* import {isSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1008
|
+
* import {isSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/is.js';
|
1005
1009
|
* isSymbol(Symbol('a'))) // ↦ true
|
1006
1010
|
* isSymbol([]) // ↦ false
|
1007
1011
|
* </script>
|
@@ -1027,7 +1031,7 @@ function isSymbol(value) {
|
|
1027
1031
|
*
|
1028
1032
|
* ```
|
1029
1033
|
* <script type="module">
|
1030
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1034
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
1031
1035
|
* Monster.Types.isBoolean('2') // ↦ false
|
1032
1036
|
* Monster.Types.isBoolean([]) // ↦ false
|
1033
1037
|
* Monster.Types.isBoolean(true) // ↦ true
|
@@ -1038,7 +1042,7 @@ function isSymbol(value) {
|
|
1038
1042
|
*
|
1039
1043
|
* ```
|
1040
1044
|
* <script type="module">
|
1041
|
-
* import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1045
|
+
* import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/is.js';
|
1042
1046
|
* isBoolean('2')) // ↦ false
|
1043
1047
|
* isBoolean([])) // ↦ false
|
1044
1048
|
* isBoolean(2>4)) // ↦ true
|
@@ -1069,7 +1073,7 @@ function isBoolean(value) {
|
|
1069
1073
|
*
|
1070
1074
|
* ```
|
1071
1075
|
* <script type="module">
|
1072
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1076
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
1073
1077
|
* Monster.Types.isString('2') // ↦ true
|
1074
1078
|
* Monster.Types.isString([]) // ↦ false
|
1075
1079
|
* </script>
|
@@ -1079,7 +1083,7 @@ function isBoolean(value) {
|
|
1079
1083
|
*
|
1080
1084
|
* ```
|
1081
1085
|
* <script type="module">
|
1082
|
-
* import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1086
|
+
* import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/is.js';
|
1083
1087
|
* isString('2')) // ↦ true
|
1084
1088
|
* isString([])) // ↦ false
|
1085
1089
|
* </script>
|
@@ -1109,7 +1113,7 @@ function isString(value) {
|
|
1109
1113
|
*
|
1110
1114
|
* ```
|
1111
1115
|
* <script type="module">
|
1112
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1116
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
1113
1117
|
* Monster.Types.isObject('2') // ↦ false
|
1114
1118
|
* Monster.Types.isObject([]) // ↦ false
|
1115
1119
|
* Monster.Types.isObject({}) // ↦ true
|
@@ -1120,7 +1124,7 @@ function isString(value) {
|
|
1120
1124
|
*
|
1121
1125
|
* ```
|
1122
1126
|
* <script type="module">
|
1123
|
-
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1127
|
+
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/is.js';
|
1124
1128
|
* isObject('2')) // ↦ false
|
1125
1129
|
* isObject([])) // ↦ false
|
1126
1130
|
* </script>
|
@@ -1153,7 +1157,7 @@ function isObject(value) {
|
|
1153
1157
|
*
|
1154
1158
|
* ```
|
1155
1159
|
* <script type="module">
|
1156
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1160
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
1157
1161
|
* Monster.Types.isInstance('2') // ↦ false
|
1158
1162
|
* Monster.Types.isInstance([]) // ↦ false
|
1159
1163
|
* Monster.Types.isInstance({}) // ↦ true
|
@@ -1164,7 +1168,7 @@ function isObject(value) {
|
|
1164
1168
|
*
|
1165
1169
|
* ```
|
1166
1170
|
* <script type="module">
|
1167
|
-
* import {isInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1171
|
+
* import {isInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/is.js';
|
1168
1172
|
* isInstance('2')) // ↦ false
|
1169
1173
|
* isInstance([])) // ↦ false
|
1170
1174
|
* </script>
|
@@ -1194,7 +1198,7 @@ function isInstance(value, instance) {
|
|
1194
1198
|
*
|
1195
1199
|
* ```
|
1196
1200
|
* <script type="module">
|
1197
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1201
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
1198
1202
|
* Monster.Types.isArray('2') // ↦ false
|
1199
1203
|
* Monster.Types.isArray([]) // ↦ true
|
1200
1204
|
* </script>
|
@@ -1204,7 +1208,7 @@ function isInstance(value, instance) {
|
|
1204
1208
|
*
|
1205
1209
|
* ```
|
1206
1210
|
* <script type="module">
|
1207
|
-
* import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1211
|
+
* import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/is.js';
|
1208
1212
|
* isArray('2')) // ↦ false
|
1209
1213
|
* isArray([])) // ↦ true
|
1210
1214
|
* </script>
|
@@ -1231,7 +1235,7 @@ function isArray(value) {
|
|
1231
1235
|
*
|
1232
1236
|
* ```
|
1233
1237
|
* <script type="module">
|
1234
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1238
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
1235
1239
|
* Monster.Types.isFunction(()=>{}) // ↦ true
|
1236
1240
|
* Monster.Types.isFunction('2') // ↦ false
|
1237
1241
|
* Monster.Types.isFunction([]) // ↦ false
|
@@ -1242,7 +1246,7 @@ function isArray(value) {
|
|
1242
1246
|
*
|
1243
1247
|
* ```
|
1244
1248
|
* <script type="module">
|
1245
|
-
* import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1249
|
+
* import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/is.js';
|
1246
1250
|
* isFunction(()=>{}) // ↦ true
|
1247
1251
|
* isFunction('2')) // ↦ false
|
1248
1252
|
* isFunction([])) // ↦ false
|
@@ -1276,7 +1280,7 @@ function isFunction(value) {
|
|
1276
1280
|
*
|
1277
1281
|
* ```
|
1278
1282
|
* <script type="module">
|
1279
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1283
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
1280
1284
|
* Monster.Types.isInteger(()=>{}) // ↦ true
|
1281
1285
|
* Monster.Types.isInteger('2') // ↦ false
|
1282
1286
|
* Monster.Types.isInteger(2) // ↦ true
|
@@ -1287,7 +1291,7 @@ function isFunction(value) {
|
|
1287
1291
|
*
|
1288
1292
|
* ```
|
1289
1293
|
* <script type="module">
|
1290
|
-
* import {isInteger} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1294
|
+
* import {isInteger} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/is.js';
|
1291
1295
|
* isInteger(()=>{}) // ↦ true
|
1292
1296
|
* isInteger('2')) // ↦ false
|
1293
1297
|
* isInteger(2)) // ↦ true
|
@@ -1360,7 +1364,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1360
1364
|
*
|
1361
1365
|
* ```
|
1362
1366
|
* <script type="module">
|
1363
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1367
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
1364
1368
|
* console.log(new Monster.Constraint.IsObject())
|
1365
1369
|
* </script>
|
1366
1370
|
* ```
|
@@ -1369,14 +1373,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1369
1373
|
*
|
1370
1374
|
* ```
|
1371
1375
|
* <script type="module">
|
1372
|
-
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1376
|
+
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraints/isobject.js';
|
1373
1377
|
* console.log(new IsObject())
|
1374
1378
|
* </script>
|
1375
1379
|
* ```
|
1376
1380
|
*
|
1377
1381
|
* @example
|
1378
1382
|
*
|
1379
|
-
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1383
|
+
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraints/isobject.js';
|
1380
1384
|
*
|
1381
1385
|
* new IsObject()
|
1382
1386
|
* .isValid({})
|
@@ -1479,7 +1483,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1479
1483
|
*
|
1480
1484
|
* ```
|
1481
1485
|
* <script type="module">
|
1482
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1486
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
1483
1487
|
* new Monster.Constraint.OrOperator();
|
1484
1488
|
* </script>
|
1485
1489
|
* ```
|
@@ -1488,16 +1492,16 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1488
1492
|
*
|
1489
1493
|
* ```
|
1490
1494
|
* <script type="module">
|
1491
|
-
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1495
|
+
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraint/oroperator.js';
|
1492
1496
|
* new OrOperator();
|
1493
1497
|
* </script>
|
1494
1498
|
* ```
|
1495
1499
|
*
|
1496
1500
|
* @example
|
1497
1501
|
*
|
1498
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1499
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1500
|
-
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1502
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraints/valid.js';
|
1503
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraints/invalid.js';
|
1504
|
+
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraints/oroperator.js';
|
1501
1505
|
*
|
1502
1506
|
* new OrOperator(
|
1503
1507
|
* new Valid(), new Invalid()).isValid()
|
@@ -1622,7 +1626,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1622
1626
|
*
|
1623
1627
|
* ```
|
1624
1628
|
* <script type="module">
|
1625
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1629
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
1626
1630
|
* new Monster.Constraint.Valid();
|
1627
1631
|
* </script>
|
1628
1632
|
* ```
|
@@ -1631,14 +1635,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1631
1635
|
*
|
1632
1636
|
* ```
|
1633
1637
|
* <script type="module">
|
1634
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1638
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraints/valid.js';
|
1635
1639
|
* new Valid();
|
1636
1640
|
* </script>
|
1637
1641
|
* ```
|
1638
1642
|
*
|
1639
1643
|
* @example
|
1640
1644
|
*
|
1641
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1645
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/constraints/valid.js';
|
1642
1646
|
*
|
1643
1647
|
* new Valid().isValid()
|
1644
1648
|
* .then(()=>console.log(true))
|
@@ -1688,6 +1692,7 @@ var Valid = /*#__PURE__*/function (_AbstractConstraint) {
|
|
1688
1692
|
|
1689
1693
|
__webpack_require__.r(__webpack_exports__);
|
1690
1694
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1695
|
+
/* harmony export */ "PARENT": function() { return /* binding */ PARENT; },
|
1691
1696
|
/* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_0__.Monster; },
|
1692
1697
|
/* harmony export */ "buildMap": function() { return /* binding */ buildMap; },
|
1693
1698
|
/* harmony export */ "assembleParts": function() { return /* binding */ assembleParts; }
|
@@ -1737,6 +1742,11 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1737
1742
|
|
1738
1743
|
|
1739
1744
|
|
1745
|
+
/**
|
1746
|
+
* @type {string} parent symbol
|
1747
|
+
*/
|
1748
|
+
|
1749
|
+
var PARENT = '^';
|
1740
1750
|
/**
|
1741
1751
|
* With the help of the function `buildMap()`, maps can be easily created from data objects.
|
1742
1752
|
*
|
@@ -1747,7 +1757,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1747
1757
|
*
|
1748
1758
|
* ```
|
1749
1759
|
* <script type="module">
|
1750
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1760
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
1751
1761
|
* console.log(Monster.Data.buildMap())
|
1752
1762
|
* </script>
|
1753
1763
|
* ```
|
@@ -1756,7 +1766,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1756
1766
|
*
|
1757
1767
|
* ```
|
1758
1768
|
* <script type="module">
|
1759
|
-
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1769
|
+
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/data/buildmap.js';
|
1760
1770
|
* console.log(buildMap())
|
1761
1771
|
* </script>
|
1762
1772
|
* ```
|
@@ -1767,7 +1777,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1767
1777
|
*
|
1768
1778
|
* @example
|
1769
1779
|
*
|
1770
|
-
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1780
|
+
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/data/buildmap.js';
|
1771
1781
|
* // a typical data structure as reported by an api
|
1772
1782
|
*
|
1773
1783
|
* let map;
|
@@ -1945,7 +1955,7 @@ function buildFlatMap(subject, selector, key, parentMap) {
|
|
1945
1955
|
var sub = buildFlatMap.call(result, o, parts.join(_pathfinder_js__WEBPACK_IMPORTED_MODULE_4__.DELIMITER), copyKey, o);
|
1946
1956
|
|
1947
1957
|
if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_1__.isObject)(sub) && parentMap !== undefined) {
|
1948
|
-
sub[
|
1958
|
+
sub[PARENT] = parentMap;
|
1949
1959
|
}
|
1950
1960
|
|
1951
1961
|
currentMap.set(kk, sub);
|
@@ -1998,7 +2008,7 @@ function buildFlatMap(subject, selector, key, parentMap) {
|
|
1998
2008
|
* Alternatively to a string selector a callback can be specified. this must return a map.
|
1999
2009
|
*
|
2000
2010
|
* @example
|
2001
|
-
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2011
|
+
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/data/buildmap.js';
|
2002
2012
|
*
|
2003
2013
|
* let obj = {
|
2004
2014
|
* "data": [
|
@@ -2139,7 +2149,7 @@ function build(subject, definition, defaultValue) {
|
|
2139
2149
|
if (definition === undefined) return defaultValue ? defaultValue : subject;
|
2140
2150
|
(0,_types_validate_js__WEBPACK_IMPORTED_MODULE_2__.validateString)(definition);
|
2141
2151
|
|
2142
|
-
var regexp = /*#__PURE__*/_wrapRegExp(/(\$\{([
|
2152
|
+
var regexp = /*#__PURE__*/_wrapRegExp(/(\$\{([a-z\^A-Z.\-_0-9]*)\})/gm, {
|
2143
2153
|
placeholder: 1,
|
2144
2154
|
path: 2
|
2145
2155
|
});
|
@@ -2201,7 +2211,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
2201
2211
|
*
|
2202
2212
|
* ```
|
2203
2213
|
* <script type="module">
|
2204
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2214
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
2205
2215
|
* console.log(Monster.Types.validateIterable('2')) // ↦ TypeError
|
2206
2216
|
* console.log(Monster.Types.validateIterable([])) // ↦ value
|
2207
2217
|
* </script>
|
@@ -2211,7 +2221,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
2211
2221
|
*
|
2212
2222
|
* ```
|
2213
2223
|
* <script type="module">
|
2214
|
-
* import {validateIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2224
|
+
* import {validateIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/validate.js';
|
2215
2225
|
* console.log(validateIterable('2')) // ↦ TypeError
|
2216
2226
|
* console.log(validateIterable([])) // ↦ value
|
2217
2227
|
* </script>
|
@@ -2242,7 +2252,7 @@ function validateIterable(value) {
|
|
2242
2252
|
*
|
2243
2253
|
* ```
|
2244
2254
|
* <script type="module">
|
2245
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2255
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
2246
2256
|
* console.log(Monster.Types.validatePrimitive('2')) // ↦ value
|
2247
2257
|
* console.log(Monster.Types.validatePrimitive([])) // ↦ TypeError
|
2248
2258
|
* </script>
|
@@ -2252,7 +2262,7 @@ function validateIterable(value) {
|
|
2252
2262
|
*
|
2253
2263
|
* ```
|
2254
2264
|
* <script type="module">
|
2255
|
-
* import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2265
|
+
* import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/validate.js';
|
2256
2266
|
* console.log(validatePrimitive('2')) // ↦ value
|
2257
2267
|
* console.log(validatePrimitive([])) // ↦ TypeError
|
2258
2268
|
* </script>
|
@@ -2284,7 +2294,7 @@ function validatePrimitive(value) {
|
|
2284
2294
|
*
|
2285
2295
|
* ```
|
2286
2296
|
* <script type="module">
|
2287
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2297
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
2288
2298
|
* console.log(Monster.Types.validateBoolean(true)) // ↦ value
|
2289
2299
|
* console.log(Monster.Types.validateBoolean('2')) // ↦ TypeError
|
2290
2300
|
* console.log(Monster.Types.validateBoolean([])) // ↦ TypeError
|
@@ -2295,7 +2305,7 @@ function validatePrimitive(value) {
|
|
2295
2305
|
*
|
2296
2306
|
* ```
|
2297
2307
|
* <script type="module">
|
2298
|
-
* import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2308
|
+
* import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/validate.js';
|
2299
2309
|
* console.log(validateBoolean(false)) // ↦ value
|
2300
2310
|
* console.log(validateBoolean('2')) // ↦ TypeError
|
2301
2311
|
* console.log(validateBoolean([])) // ↦ TypeError
|
@@ -2326,7 +2336,7 @@ function validateBoolean(value) {
|
|
2326
2336
|
*
|
2327
2337
|
* ```
|
2328
2338
|
* <script type="module">
|
2329
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2339
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
2330
2340
|
* console.log(Monster.Types.validateString('2')) // ↦ value
|
2331
2341
|
* console.log(Monster.Types.validateString([])) // ↦ TypeError
|
2332
2342
|
* </script>
|
@@ -2336,7 +2346,7 @@ function validateBoolean(value) {
|
|
2336
2346
|
*
|
2337
2347
|
* ```
|
2338
2348
|
* <script type="module">
|
2339
|
-
* import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2349
|
+
* import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/validate.js';
|
2340
2350
|
* console.log(validateString('2')) // ↦ value
|
2341
2351
|
* console.log(validateString([])) // ↦ TypeError
|
2342
2352
|
* </script>
|
@@ -2365,7 +2375,7 @@ function validateString(value) {
|
|
2365
2375
|
*
|
2366
2376
|
* ```
|
2367
2377
|
* <script type="module">
|
2368
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2378
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
2369
2379
|
* console.log(Monster.Types.validateObject({})) // ↦ value
|
2370
2380
|
* console.log(Monster.Types.validateObject('2')) // ↦ TypeError
|
2371
2381
|
* console.log(Monster.Types.validateObject([])) // ↦ TypeError
|
@@ -2376,7 +2386,7 @@ function validateString(value) {
|
|
2376
2386
|
*
|
2377
2387
|
* ```
|
2378
2388
|
* <script type="module">
|
2379
|
-
* import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2389
|
+
* import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/validate.js';
|
2380
2390
|
* console.log(validateObject({})) // ↦ value
|
2381
2391
|
* console.log(validateObject('2')) // ↦ TypeError
|
2382
2392
|
* console.log(validateObject([])) // ↦ TypeError
|
@@ -2406,7 +2416,7 @@ function validateObject(value) {
|
|
2406
2416
|
*
|
2407
2417
|
* ```
|
2408
2418
|
* <script type="module">
|
2409
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2419
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
2410
2420
|
* console.log(Monster.Types.validateInstance({}, Object)) // ↦ value
|
2411
2421
|
* console.log(Monster.Types.validateInstance('2', Object)) // ↦ TypeError
|
2412
2422
|
* console.log(Monster.Types.validateInstance([], Object)) // ↦ TypeError
|
@@ -2417,7 +2427,7 @@ function validateObject(value) {
|
|
2417
2427
|
*
|
2418
2428
|
* ```
|
2419
2429
|
* <script type="module">
|
2420
|
-
* import {validateInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2430
|
+
* import {validateInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/validate.js';
|
2421
2431
|
* console.log(validateInstance({}, Object)) // ↦ value
|
2422
2432
|
* console.log(validateInstance('2', Object)) // ↦ TypeError
|
2423
2433
|
* console.log(validateInstance([], Object)) // ↦ TypeError
|
@@ -2457,7 +2467,7 @@ function validateInstance(value, instance) {
|
|
2457
2467
|
*
|
2458
2468
|
* ```
|
2459
2469
|
* <script type="module">
|
2460
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2470
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
2461
2471
|
* console.log(Monster.Types.validateArray('2')) // ↦ TypeError
|
2462
2472
|
* console.log(Monster.Types.validateArray([])) // ↦ value
|
2463
2473
|
* </script>
|
@@ -2467,7 +2477,7 @@ function validateInstance(value, instance) {
|
|
2467
2477
|
*
|
2468
2478
|
* ```
|
2469
2479
|
* <script type="module">
|
2470
|
-
* import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2480
|
+
* import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/validate.js';
|
2471
2481
|
* console.log(validateArray('2')) // ↦ TypeError
|
2472
2482
|
* console.log(validateArray([])) // ↦ value
|
2473
2483
|
* </script>
|
@@ -2496,7 +2506,7 @@ function validateArray(value) {
|
|
2496
2506
|
*
|
2497
2507
|
* ```
|
2498
2508
|
* <script type="module">
|
2499
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2509
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
2500
2510
|
* console.log(Monster.Types.validateSymbol('2')) // ↦ TypeError
|
2501
2511
|
* console.log(Monster.Types.validateSymbol([])) // ↦ value
|
2502
2512
|
* </script>
|
@@ -2506,7 +2516,7 @@ function validateArray(value) {
|
|
2506
2516
|
*
|
2507
2517
|
* ```
|
2508
2518
|
* <script type="module">
|
2509
|
-
* import {validateSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2519
|
+
* import {validateSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/validate.js';
|
2510
2520
|
* console.log(validateSymbol('2')) // ↦ TypeError
|
2511
2521
|
* console.log(validateSymbol()) // ↦ value
|
2512
2522
|
* </script>
|
@@ -2535,7 +2545,7 @@ function validateSymbol(value) {
|
|
2535
2545
|
*
|
2536
2546
|
* ```
|
2537
2547
|
* <script type="module">
|
2538
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2548
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
2539
2549
|
* console.log(Monster.Types.validateFunction(()=>{})) // ↦ value
|
2540
2550
|
* console.log(Monster.Types.validateFunction('2')) // ↦ TypeError
|
2541
2551
|
* console.log(Monster.Types.validateFunction([])) // ↦ TypeError
|
@@ -2546,7 +2556,7 @@ function validateSymbol(value) {
|
|
2546
2556
|
*
|
2547
2557
|
* ```
|
2548
2558
|
* <script type="module">
|
2549
|
-
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2559
|
+
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/validate.js';
|
2550
2560
|
* console.log(validateFunction(()=>{})) // ↦ value
|
2551
2561
|
* console.log(validateFunction('2')) // ↦ TypeError
|
2552
2562
|
* console.log(validateFunction([])) // ↦ TypeError
|
@@ -2576,7 +2586,7 @@ function validateFunction(value) {
|
|
2576
2586
|
*
|
2577
2587
|
* ```
|
2578
2588
|
* <script type="module">
|
2579
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2589
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
2580
2590
|
* console.log(Monster.Types.validateInteger(true)) // ↦ TypeError
|
2581
2591
|
* console.log(Monster.Types.validateInteger('2')) // ↦ TypeError
|
2582
2592
|
* console.log(Monster.Types.validateInteger(2)) // ↦ value
|
@@ -2587,7 +2597,7 @@ function validateFunction(value) {
|
|
2587
2597
|
*
|
2588
2598
|
* ```
|
2589
2599
|
* <script type="module">
|
2590
|
-
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2600
|
+
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/validate.js';
|
2591
2601
|
* console.log(validateInteger(true)) // ↦ TypeError
|
2592
2602
|
* console.log(validateInteger('2')) // ↦ TypeError
|
2593
2603
|
* console.log(validateInteger(2)) // ↦ value
|
@@ -2653,7 +2663,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
2653
2663
|
*
|
2654
2664
|
* ```
|
2655
2665
|
* <script type="module">
|
2656
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2666
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
2657
2667
|
* Monster.Util.clone({})
|
2658
2668
|
* </script>
|
2659
2669
|
* ```
|
@@ -2662,7 +2672,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
2662
2672
|
*
|
2663
2673
|
* ```
|
2664
2674
|
* <script type="module">
|
2665
|
-
* import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2675
|
+
* import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/util/clone.js';
|
2666
2676
|
* clone({})
|
2667
2677
|
* </script>
|
2668
2678
|
* ```
|
@@ -2874,7 +2884,7 @@ function getGlobal() {
|
|
2874
2884
|
*
|
2875
2885
|
* ```
|
2876
2886
|
* <script type="module">
|
2877
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2887
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
2878
2888
|
* Monster.Types.getGlobalObject('document')
|
2879
2889
|
* // ↦ { }
|
2880
2890
|
* </script>
|
@@ -2884,7 +2894,7 @@ function getGlobal() {
|
|
2884
2894
|
*
|
2885
2895
|
* ```
|
2886
2896
|
* <script type="module">
|
2887
|
-
* import {getGlobalObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2897
|
+
* import {getGlobalObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/global.js';
|
2888
2898
|
* getGlobalObject('document')
|
2889
2899
|
* // ↦ { }
|
2890
2900
|
* </script>
|
@@ -2916,7 +2926,7 @@ function getGlobalObject(name) {
|
|
2916
2926
|
*
|
2917
2927
|
* ```
|
2918
2928
|
* <script type="module">
|
2919
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2929
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
2920
2930
|
* console.log(Monster.Types.getGlobalFunction('parseInt')) // ↦ f parseInt() { }
|
2921
2931
|
* </script>
|
2922
2932
|
* ```
|
@@ -2925,7 +2935,7 @@ function getGlobalObject(name) {
|
|
2925
2935
|
*
|
2926
2936
|
* ```
|
2927
2937
|
* <script type="module">
|
2928
|
-
* import {getGlobalFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2938
|
+
* import {getGlobalFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/global.js';
|
2929
2939
|
* console.log(getGlobalFunction('parseInt')) // ↦ f parseInt() { }
|
2930
2940
|
* </script>
|
2931
2941
|
* ```
|
@@ -2976,7 +2986,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
2976
2986
|
*
|
2977
2987
|
* ```
|
2978
2988
|
* <script type="module">
|
2979
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2989
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
2980
2990
|
* console.log(Monster.Types.typeOf())
|
2981
2991
|
* </script>
|
2982
2992
|
* ```
|
@@ -2985,14 +2995,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
2985
2995
|
*
|
2986
2996
|
* ```
|
2987
2997
|
* <script type="module">
|
2988
|
-
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2998
|
+
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/typeof.js';
|
2989
2999
|
* console.log(typeOf())
|
2990
3000
|
* </script>
|
2991
3001
|
* ```
|
2992
3002
|
*
|
2993
3003
|
* @example
|
2994
3004
|
*
|
2995
|
-
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3005
|
+
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/typeof.js';
|
2996
3006
|
*
|
2997
3007
|
* console.log(typeOf(undefined)); // ↦ undefined
|
2998
3008
|
* console.log(typeOf("")); // ↦ string
|
@@ -3111,7 +3121,7 @@ var WILDCARD = '*';
|
|
3111
3121
|
*
|
3112
3122
|
* ```
|
3113
3123
|
* <script type="module">
|
3114
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3124
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
3115
3125
|
* console.log(new Monster.Data.Pathfinder())
|
3116
3126
|
* </script>
|
3117
3127
|
* ```
|
@@ -3120,7 +3130,7 @@ var WILDCARD = '*';
|
|
3120
3130
|
*
|
3121
3131
|
* ```
|
3122
3132
|
* <script type="module">
|
3123
|
-
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3133
|
+
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/data/pathfinder.js';
|
3124
3134
|
* console.log(new Pathfinder())
|
3125
3135
|
* </script>
|
3126
3136
|
* ```
|
@@ -3162,7 +3172,7 @@ var WILDCARD = '*';
|
|
3162
3172
|
*
|
3163
3173
|
* @example
|
3164
3174
|
*
|
3165
|
-
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3175
|
+
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/data/pathfinder.js';
|
3166
3176
|
*
|
3167
3177
|
* let value = new Pathfinder({
|
3168
3178
|
* a: {
|
@@ -3188,7 +3198,7 @@ var WILDCARD = '*';
|
|
3188
3198
|
*
|
3189
3199
|
* @example
|
3190
3200
|
*
|
3191
|
-
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3201
|
+
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/data/pathfinder.js';
|
3192
3202
|
*
|
3193
3203
|
* let p = new Pathfinder({
|
3194
3204
|
* a: {
|
@@ -3603,7 +3613,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
3603
3613
|
*
|
3604
3614
|
* ```
|
3605
3615
|
* <script type="module">
|
3606
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3616
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
3607
3617
|
* console.log(new Monster.Types.Stack())
|
3608
3618
|
* </script>
|
3609
3619
|
* ```
|
@@ -3612,7 +3622,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
3612
3622
|
*
|
3613
3623
|
* ```
|
3614
3624
|
* <script type="module">
|
3615
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3625
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/stack.js';
|
3616
3626
|
* console.log(new Stack())
|
3617
3627
|
* </script>
|
3618
3628
|
* ```
|
@@ -3747,7 +3757,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
3747
3757
|
*
|
3748
3758
|
* ```
|
3749
3759
|
* <script type="module">
|
3750
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3760
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
3751
3761
|
* Monster.Data.Diff(a, b)
|
3752
3762
|
* </script>
|
3753
3763
|
* ```
|
@@ -3756,14 +3766,14 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
3756
3766
|
*
|
3757
3767
|
* ```
|
3758
3768
|
* <script type="module">
|
3759
|
-
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3769
|
+
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/data/diff.js';
|
3760
3770
|
* Diff(a, b)
|
3761
3771
|
* </script>
|
3762
3772
|
* ```
|
3763
3773
|
*
|
3764
3774
|
* @example
|
3765
3775
|
*
|
3766
|
-
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3776
|
+
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/data/diff.js';
|
3767
3777
|
*
|
3768
3778
|
* // given are two objects x and y.
|
3769
3779
|
*
|
@@ -4009,7 +4019,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
4009
4019
|
*
|
4010
4020
|
* ```
|
4011
4021
|
* <script type="module">
|
4012
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4022
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
4013
4023
|
* Monster.Data.extend(a, b)
|
4014
4024
|
* </script>
|
4015
4025
|
* ```
|
@@ -4018,7 +4028,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
4018
4028
|
*
|
4019
4029
|
* ```
|
4020
4030
|
* <script type="module">
|
4021
|
-
* import {extend} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4031
|
+
* import {extend} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/data/extend.js';
|
4022
4032
|
* extend(a, b)
|
4023
4033
|
* </script>
|
4024
4034
|
* ```
|
@@ -4147,7 +4157,7 @@ var DELIMITER = '|';
|
|
4147
4157
|
*
|
4148
4158
|
* ```
|
4149
4159
|
* <script type="module">
|
4150
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4160
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
4151
4161
|
* new Monster.Data.Pipe()
|
4152
4162
|
* </script>
|
4153
4163
|
* ```
|
@@ -4156,7 +4166,7 @@ var DELIMITER = '|';
|
|
4156
4166
|
*
|
4157
4167
|
* ```
|
4158
4168
|
* <script type="module">
|
4159
|
-
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4169
|
+
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/data/pipe.js';
|
4160
4170
|
* new Pipe()
|
4161
4171
|
* </script>
|
4162
4172
|
* ```
|
@@ -4167,7 +4177,7 @@ var DELIMITER = '|';
|
|
4167
4177
|
* the word is then converted to uppercase letters and a prefix Hello is added. the two backslash safe the space char.
|
4168
4178
|
*
|
4169
4179
|
* @example
|
4170
|
-
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4180
|
+
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/data/pipe.js';
|
4171
4181
|
*
|
4172
4182
|
* let obj = {
|
4173
4183
|
* a: {
|
@@ -4329,7 +4339,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
4329
4339
|
*
|
4330
4340
|
* ```
|
4331
4341
|
* <script type="module">
|
4332
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4342
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
4333
4343
|
* new Monster.Data.Transformer()
|
4334
4344
|
* </script>
|
4335
4345
|
* ```
|
@@ -4338,7 +4348,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
4338
4348
|
*
|
4339
4349
|
* ```
|
4340
4350
|
* <script type="module">
|
4341
|
-
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4351
|
+
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/data/transformer.js';
|
4342
4352
|
* new Transformer()
|
4343
4353
|
* </script>
|
4344
4354
|
* ```
|
@@ -4424,7 +4434,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
4424
4434
|
*
|
4425
4435
|
* @example
|
4426
4436
|
*
|
4427
|
-
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4437
|
+
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/data/transformer.js';
|
4428
4438
|
*
|
4429
4439
|
* const transformer = new Transformer("tolower")
|
4430
4440
|
*
|
@@ -4957,7 +4967,7 @@ var internalCounter = new Map();
|
|
4957
4967
|
*
|
4958
4968
|
* ```
|
4959
4969
|
* <script type="module">
|
4960
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4970
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
4961
4971
|
* console.log(new Monster.Types.ID())
|
4962
4972
|
* </script>
|
4963
4973
|
* ```
|
@@ -4966,7 +4976,7 @@ var internalCounter = new Map();
|
|
4966
4976
|
*
|
4967
4977
|
* ```
|
4968
4978
|
* <script type="module">
|
4969
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4979
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/id.js';
|
4970
4980
|
* console.log(new ID())
|
4971
4981
|
* </script>
|
4972
4982
|
* ```
|
@@ -5089,7 +5099,7 @@ var ATTRIBUTEPREFIX = "data-monster-";
|
|
5089
5099
|
*
|
5090
5100
|
* ```
|
5091
5101
|
* <script type="module">
|
5092
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5102
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
5093
5103
|
* console.log(new Monster.DOM.Assembler())
|
5094
5104
|
* </script>
|
5095
5105
|
* ```
|
@@ -5098,7 +5108,7 @@ var ATTRIBUTEPREFIX = "data-monster-";
|
|
5098
5108
|
*
|
5099
5109
|
* ```
|
5100
5110
|
* <script type="module">
|
5101
|
-
* import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5111
|
+
* import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/assembler.js';
|
5102
5112
|
* console.log(new Assembler())
|
5103
5113
|
* </script>
|
5104
5114
|
* ```
|
@@ -5239,7 +5249,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5239
5249
|
*
|
5240
5250
|
* ```
|
5241
5251
|
* <script type="module">
|
5242
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5252
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
5243
5253
|
* new Monster.Types.ProxyObserver()
|
5244
5254
|
* </script>
|
5245
5255
|
* ```
|
@@ -5248,7 +5258,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5248
5258
|
*
|
5249
5259
|
* ```
|
5250
5260
|
* <script type="module">
|
5251
|
-
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5261
|
+
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/proxyobserver.js';
|
5252
5262
|
* new ProxyObserver()
|
5253
5263
|
* </script>
|
5254
5264
|
* ```
|
@@ -5259,9 +5269,9 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5259
5269
|
*
|
5260
5270
|
* @example
|
5261
5271
|
*
|
5262
|
-
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5263
|
-
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5264
|
-
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5272
|
+
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/proxyobserver.js';
|
5273
|
+
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/observer.js';
|
5274
|
+
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/is.js';
|
5265
5275
|
*
|
5266
5276
|
* const o = new Observer(function () {
|
5267
5277
|
* if (isObject(this) && this instanceof ProxyObserver) {
|
@@ -5586,14 +5596,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5586
5596
|
* You can call the method via the monster namespace `new Monster.Types.Observer()`.
|
5587
5597
|
*
|
5588
5598
|
* ```
|
5589
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5599
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
5590
5600
|
* new Monster.Types.Observer()
|
5591
5601
|
* ```
|
5592
5602
|
*
|
5593
5603
|
* Alternatively, you can also integrate this function individually.
|
5594
5604
|
*
|
5595
5605
|
* ```
|
5596
|
-
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5606
|
+
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/observer.js';
|
5597
5607
|
* new Observer()
|
5598
5608
|
* ```
|
5599
5609
|
*
|
@@ -5622,7 +5632,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5622
5632
|
*
|
5623
5633
|
* @example
|
5624
5634
|
*
|
5625
|
-
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5635
|
+
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/observer.js';
|
5626
5636
|
*
|
5627
5637
|
* const observer = new Observer(function(a, b, c) {
|
5628
5638
|
* console.log(this, a, b, c); // ↦ "a", 2, true
|
@@ -5822,7 +5832,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5822
5832
|
*
|
5823
5833
|
* ```
|
5824
5834
|
* <script type="module">
|
5825
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5835
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
5826
5836
|
* new Monster.Types.TokenList("myclass row")
|
5827
5837
|
* </script>
|
5828
5838
|
* ```
|
@@ -5831,7 +5841,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5831
5841
|
*
|
5832
5842
|
* ```
|
5833
5843
|
* <script type="module">
|
5834
|
-
* import {TokenList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5844
|
+
* import {TokenList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/tokenlist.js';
|
5835
5845
|
* new TokenList("myclass row")
|
5836
5846
|
* </script>
|
5837
5847
|
* ```
|
@@ -6254,7 +6264,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6254
6264
|
*
|
6255
6265
|
* ```
|
6256
6266
|
* <script type="module">
|
6257
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6267
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
6258
6268
|
* new Monster.Types.UniqueQueue()
|
6259
6269
|
* </script>
|
6260
6270
|
* ```
|
@@ -6263,7 +6273,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6263
6273
|
*
|
6264
6274
|
* ```
|
6265
6275
|
* <script type="module">
|
6266
|
-
* import {UniqueQueue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6276
|
+
* import {UniqueQueue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/uniquequeue.js';
|
6267
6277
|
* new UniqueQueue()
|
6268
6278
|
* </script>
|
6269
6279
|
* ```
|
@@ -6398,7 +6408,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6398
6408
|
*
|
6399
6409
|
* ```
|
6400
6410
|
* <script type="module">
|
6401
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6411
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
6402
6412
|
* new Monster.Types.Queue()
|
6403
6413
|
* </script>
|
6404
6414
|
* ```
|
@@ -6407,14 +6417,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6407
6417
|
*
|
6408
6418
|
* ```
|
6409
6419
|
* <script type="module">
|
6410
|
-
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6420
|
+
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/queue.js';
|
6411
6421
|
* new Queue()
|
6412
6422
|
* </script>
|
6413
6423
|
* ```
|
6414
6424
|
*
|
6415
6425
|
* @example
|
6416
6426
|
*
|
6417
|
-
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6427
|
+
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/queue.js';
|
6418
6428
|
*
|
6419
6429
|
* const queue = new Queue;
|
6420
6430
|
*
|
@@ -6583,7 +6593,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6583
6593
|
*
|
6584
6594
|
* ```
|
6585
6595
|
* <script type="module">
|
6586
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6596
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
6587
6597
|
* console.log(new Monster.Types.ObserverList())
|
6588
6598
|
* console.log(new Monster.Types.ObserverList())
|
6589
6599
|
* </script>
|
@@ -6593,7 +6603,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6593
6603
|
*
|
6594
6604
|
* ```
|
6595
6605
|
* <script type="module">
|
6596
|
-
* import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6606
|
+
* import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/observerlist.js';
|
6597
6607
|
* console.log(ObserverList())
|
6598
6608
|
* console.log(ObserverList())
|
6599
6609
|
* </script>
|
@@ -6753,7 +6763,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
6753
6763
|
*
|
6754
6764
|
* ```
|
6755
6765
|
* <script type="module">
|
6756
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6766
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
6757
6767
|
* console.log(Monster.DOM.findClosestObjectLink())
|
6758
6768
|
* </script>
|
6759
6769
|
* ```
|
@@ -6762,7 +6772,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
6762
6772
|
*
|
6763
6773
|
* ```
|
6764
6774
|
* <script type="module">
|
6765
|
-
* import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6775
|
+
* import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/updater.js';
|
6766
6776
|
* console.log(findClosestObjectLink())
|
6767
6777
|
* </script>
|
6768
6778
|
* ```
|
@@ -6783,7 +6793,7 @@ function findClosestObjectLink(element) {
|
|
6783
6793
|
*
|
6784
6794
|
* ```
|
6785
6795
|
* <script type="module">
|
6786
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6796
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
6787
6797
|
* Monster.DOM.addToObjectLink();
|
6788
6798
|
* </script>
|
6789
6799
|
* ```
|
@@ -6792,7 +6802,7 @@ function findClosestObjectLink(element) {
|
|
6792
6802
|
*
|
6793
6803
|
* ```
|
6794
6804
|
* <script type="module">
|
6795
|
-
* import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6805
|
+
* import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/attributes.js';
|
6796
6806
|
* addToObjectLink();
|
6797
6807
|
* </script>
|
6798
6808
|
* ```
|
@@ -6824,7 +6834,7 @@ function addToObjectLink(element, symbol, object) {
|
|
6824
6834
|
*
|
6825
6835
|
* ```
|
6826
6836
|
* <script type="module">
|
6827
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6837
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
6828
6838
|
* Monster.DOM.removeObjectLink();
|
6829
6839
|
* </script>
|
6830
6840
|
* ```
|
@@ -6833,7 +6843,7 @@ function addToObjectLink(element, symbol, object) {
|
|
6833
6843
|
*
|
6834
6844
|
* ```
|
6835
6845
|
* <script type="module">
|
6836
|
-
* import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6846
|
+
* import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/attributes.js';
|
6837
6847
|
* removeObjectLink();
|
6838
6848
|
* </script>
|
6839
6849
|
* ```
|
@@ -6864,7 +6874,7 @@ function removeObjectLink(element, symbol) {
|
|
6864
6874
|
*
|
6865
6875
|
* ```
|
6866
6876
|
* <script type="module">
|
6867
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6877
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
6868
6878
|
* Monster.DOM.hasObjectLink();
|
6869
6879
|
* </script>
|
6870
6880
|
* ```
|
@@ -6873,7 +6883,7 @@ function removeObjectLink(element, symbol) {
|
|
6873
6883
|
*
|
6874
6884
|
* ```
|
6875
6885
|
* <script type="module">
|
6876
|
-
* import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6886
|
+
* import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/attributes.js';
|
6877
6887
|
* hasObjectLink();
|
6878
6888
|
* </script>
|
6879
6889
|
* ```
|
@@ -6909,7 +6919,7 @@ function hasObjectLink(element, symbol) {
|
|
6909
6919
|
*
|
6910
6920
|
* ```
|
6911
6921
|
* <script type="module">
|
6912
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6922
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
6913
6923
|
* Monster.DOM.getLinkedObjects();
|
6914
6924
|
* </script>
|
6915
6925
|
* ```
|
@@ -6918,7 +6928,7 @@ function hasObjectLink(element, symbol) {
|
|
6918
6928
|
*
|
6919
6929
|
* ```
|
6920
6930
|
* <script type="module">
|
6921
|
-
* import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6931
|
+
* import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/attributes.js';
|
6922
6932
|
* getLinkedObjects();
|
6923
6933
|
* </script>
|
6924
6934
|
* ```
|
@@ -6952,7 +6962,7 @@ function getLinkedObjects(element, symbol) {
|
|
6952
6962
|
*
|
6953
6963
|
* ```
|
6954
6964
|
* <script type="module">
|
6955
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6965
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
6956
6966
|
* Monster.DOM.toggleAttributeToken();
|
6957
6967
|
* </script>
|
6958
6968
|
* ```
|
@@ -6961,7 +6971,7 @@ function getLinkedObjects(element, symbol) {
|
|
6961
6971
|
*
|
6962
6972
|
* ```
|
6963
6973
|
* <script type="module">
|
6964
|
-
* import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6974
|
+
* import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/attributes.js';
|
6965
6975
|
* toggleAttributeToken();
|
6966
6976
|
* </script>
|
6967
6977
|
* ```
|
@@ -6990,13 +7000,13 @@ function toggleAttributeToken(element, key, token) {
|
|
6990
7000
|
return element;
|
6991
7001
|
}
|
6992
7002
|
/**
|
6993
|
-
*
|
7003
|
+
* This method can be used to add a token to an attribute. Tokens are always separated by a space.
|
6994
7004
|
*
|
6995
7005
|
* You can call the method via the monster namespace `new Monster.DOM.addAttributeToken()`.
|
6996
7006
|
*
|
6997
7007
|
* ```
|
6998
7008
|
* <script type="module">
|
6999
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7009
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
7000
7010
|
* Monster.DOM.addAttributeToken();
|
7001
7011
|
* </script>
|
7002
7012
|
* ```
|
@@ -7005,7 +7015,7 @@ function toggleAttributeToken(element, key, token) {
|
|
7005
7015
|
*
|
7006
7016
|
* ```
|
7007
7017
|
* <script type="module">
|
7008
|
-
* import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7018
|
+
* import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/attributes.js';
|
7009
7019
|
* addAttributeToken();
|
7010
7020
|
* </script>
|
7011
7021
|
* ```
|
@@ -7042,7 +7052,7 @@ function addAttributeToken(element, key, token) {
|
|
7042
7052
|
*
|
7043
7053
|
* ```
|
7044
7054
|
* <script type="module">
|
7045
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7055
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
7046
7056
|
* Monster.DOM.removeAttributeToken();
|
7047
7057
|
* </script>
|
7048
7058
|
* ```
|
@@ -7051,7 +7061,7 @@ function addAttributeToken(element, key, token) {
|
|
7051
7061
|
*
|
7052
7062
|
* ```
|
7053
7063
|
* <script type="module">
|
7054
|
-
* import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7064
|
+
* import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/attributes.js';
|
7055
7065
|
* removeAttributeToken();
|
7056
7066
|
* </script>
|
7057
7067
|
* ```
|
@@ -7087,7 +7097,7 @@ function removeAttributeToken(element, key, token) {
|
|
7087
7097
|
*
|
7088
7098
|
* ```
|
7089
7099
|
* <script type="module">
|
7090
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7100
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
7091
7101
|
* Monster.DOM.containsAttributeToken();
|
7092
7102
|
* </script>
|
7093
7103
|
* ```
|
@@ -7096,7 +7106,7 @@ function removeAttributeToken(element, key, token) {
|
|
7096
7106
|
*
|
7097
7107
|
* ```
|
7098
7108
|
* <script type="module">
|
7099
|
-
* import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7109
|
+
* import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/attributes.js';
|
7100
7110
|
* containsAttributeToken();
|
7101
7111
|
* </script>
|
7102
7112
|
* ```
|
@@ -7129,7 +7139,7 @@ function containsAttributeToken(element, key, token) {
|
|
7129
7139
|
*
|
7130
7140
|
* ```
|
7131
7141
|
* <script type="module">
|
7132
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7142
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
7133
7143
|
* Monster.DOM.replaceAttributeToken();
|
7134
7144
|
* </script>
|
7135
7145
|
* ```
|
@@ -7138,7 +7148,7 @@ function containsAttributeToken(element, key, token) {
|
|
7138
7148
|
*
|
7139
7149
|
* ```
|
7140
7150
|
* <script type="module">
|
7141
|
-
* import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7151
|
+
* import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/attributes.js';
|
7142
7152
|
* replaceAttributeToken();
|
7143
7153
|
* </script>
|
7144
7154
|
* ```
|
@@ -7174,7 +7184,7 @@ function replaceAttributeToken(element, key, from, to) {
|
|
7174
7184
|
*
|
7175
7185
|
* ```
|
7176
7186
|
* <script type="module">
|
7177
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7187
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
7178
7188
|
* Monster.DOM.clearAttributeTokens();
|
7179
7189
|
* </script>
|
7180
7190
|
* ```
|
@@ -7183,7 +7193,7 @@ function replaceAttributeToken(element, key, from, to) {
|
|
7183
7193
|
*
|
7184
7194
|
* ```
|
7185
7195
|
* <script type="module">
|
7186
|
-
* import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7196
|
+
* import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/attributes.js';
|
7187
7197
|
* clearAttributeTokens();
|
7188
7198
|
* </script>
|
7189
7199
|
* ```
|
@@ -7231,7 +7241,7 @@ function clearAttributeTokens(element, key) {
|
|
7231
7241
|
*
|
7232
7242
|
* ```
|
7233
7243
|
* <script type="module">
|
7234
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7244
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
7235
7245
|
* Monster.DOM.findClosestByAttribute();
|
7236
7246
|
* </script>
|
7237
7247
|
* ```
|
@@ -7240,7 +7250,7 @@ function clearAttributeTokens(element, key) {
|
|
7240
7250
|
*
|
7241
7251
|
* ```
|
7242
7252
|
* <script type="module">
|
7243
|
-
* import {findClosestByAttribute} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7253
|
+
* import {findClosestByAttribute} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/attributes.js';
|
7244
7254
|
* findClosestByAttribute();
|
7245
7255
|
* </script>
|
7246
7256
|
* ```
|
@@ -7298,7 +7308,7 @@ function findClosestByAttribute(element, key, value) {
|
|
7298
7308
|
*
|
7299
7309
|
* ```
|
7300
7310
|
* <script type="module">
|
7301
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7311
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
7302
7312
|
* Monster.DOM.findClosestByClass();
|
7303
7313
|
* </script>
|
7304
7314
|
* ```
|
@@ -7307,7 +7317,7 @@ function findClosestByAttribute(element, key, value) {
|
|
7307
7317
|
*
|
7308
7318
|
* ```
|
7309
7319
|
* <script type="module">
|
7310
|
-
* import {findClosestByClass} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7320
|
+
* import {findClosestByClass} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/attributes.js';
|
7311
7321
|
* findClosestByClass();
|
7312
7322
|
* </script>
|
7313
7323
|
* ```
|
@@ -7401,7 +7411,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
7401
7411
|
/* harmony export */ "ATTRIBUTE_VALUE": function() { return /* binding */ ATTRIBUTE_VALUE; },
|
7402
7412
|
/* harmony export */ "objectUpdaterLinkSymbol": function() { return /* binding */ objectUpdaterLinkSymbol; },
|
7403
7413
|
/* harmony export */ "ATTRIBUTE_TEMPLATE_PREFIX": function() { return /* binding */ ATTRIBUTE_TEMPLATE_PREFIX; },
|
7404
|
-
/* harmony export */ "ATTRIBUTE_UPDATER_SELECT_THIS": function() { return /* binding */ ATTRIBUTE_UPDATER_SELECT_THIS; }
|
7414
|
+
/* harmony export */ "ATTRIBUTE_UPDATER_SELECT_THIS": function() { return /* binding */ ATTRIBUTE_UPDATER_SELECT_THIS; },
|
7415
|
+
/* harmony export */ "ATTRIBUTE_OPTIONS_SELECTOR": function() { return /* binding */ ATTRIBUTE_OPTIONS_SELECTOR; }
|
7405
7416
|
/* harmony export */ });
|
7406
7417
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
7407
7418
|
|
@@ -7434,6 +7445,15 @@ var ATTRIBUTE_PREFIX = 'data-monster-';
|
|
7434
7445
|
*/
|
7435
7446
|
|
7436
7447
|
var ATTRIBUTE_OPTIONS = ATTRIBUTE_PREFIX + 'options';
|
7448
|
+
/**
|
7449
|
+
* This is the name of the attribute to pass options to a control
|
7450
|
+
*
|
7451
|
+
* @memberOf Monster.DOM
|
7452
|
+
* @since 1.30.0
|
7453
|
+
* @type {string}
|
7454
|
+
*/
|
7455
|
+
|
7456
|
+
var ATTRIBUTE_OPTIONS_SELECTOR = ATTRIBUTE_PREFIX + 'options-selector';
|
7437
7457
|
/**
|
7438
7458
|
* @memberOf Monster.DOM
|
7439
7459
|
* @type {string}
|
@@ -7841,7 +7861,7 @@ var attachedInternalSymbol = Symbol('attachedInternal');
|
|
7841
7861
|
*
|
7842
7862
|
* ```
|
7843
7863
|
* <script type="module">
|
7844
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7864
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
7845
7865
|
* document.createElement('monster-')
|
7846
7866
|
* </script>
|
7847
7867
|
* ```
|
@@ -8377,7 +8397,7 @@ var attributeObserverSymbol = Symbol('attributeObserver');
|
|
8377
8397
|
*
|
8378
8398
|
* ```
|
8379
8399
|
* <script type="module">
|
8380
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
8400
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
8381
8401
|
* document.createElement('monster-')
|
8382
8402
|
* </script>
|
8383
8403
|
* ```
|
@@ -8490,7 +8510,7 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
8490
8510
|
|
8491
8511
|
_this = _super.call(this);
|
8492
8512
|
_this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol] = new _types_proxyobserver_js__WEBPACK_IMPORTED_MODULE_8__.ProxyObserver({
|
8493
|
-
'options': (0,_data_extend_js__WEBPACK_IMPORTED_MODULE_1__.extend)({}, _this.defaults, getOptionsFromAttributes.call(_assertThisInitialized(_this)))
|
8513
|
+
'options': (0,_data_extend_js__WEBPACK_IMPORTED_MODULE_1__.extend)({}, _this.defaults, getOptionsFromAttributes.call(_assertThisInitialized(_this)), getOptionsFromScriptTag.call(_assertThisInitialized(_this)))
|
8494
8514
|
});
|
8495
8515
|
_this[attributeObserverSymbol] = {};
|
8496
8516
|
initOptionObserver.call(_assertThisInitialized(_this));
|
@@ -8535,6 +8555,19 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
8535
8555
|
* }
|
8536
8556
|
* })),'application/json',true).toString()
|
8537
8557
|
* ```
|
8558
|
+
*
|
8559
|
+
* The attribute data-monster-options-selector can be used to access a script tag that contains additional configuration.
|
8560
|
+
*
|
8561
|
+
* As value a selector must be specified, which belongs to a script tag and contains the configuration as json.
|
8562
|
+
*
|
8563
|
+
* ```
|
8564
|
+
* <script id="id-for-this-config" type="application/json">
|
8565
|
+
* {
|
8566
|
+
* "config-key": "config-value"
|
8567
|
+
* }
|
8568
|
+
* </script>
|
8569
|
+
* ```
|
8570
|
+
*
|
8538
8571
|
*
|
8539
8572
|
* @property {boolean} disabled=false Object The Boolean disabled attribute, when present, makes the element not mutable, focusable, or even submitted with the form.
|
8540
8573
|
* @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
|
@@ -8647,7 +8680,7 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
8647
8680
|
key: "setOptions",
|
8648
8681
|
value: function setOptions(options) {
|
8649
8682
|
if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isString)(options)) {
|
8650
|
-
options = parseOptionsJSON(options);
|
8683
|
+
options = parseOptionsJSON.call(this, options);
|
8651
8684
|
}
|
8652
8685
|
|
8653
8686
|
var self = this;
|
@@ -8687,7 +8720,9 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
8687
8720
|
|
8688
8721
|
try {
|
8689
8722
|
initCSSStylesheet.call(this);
|
8690
|
-
} catch (e) {
|
8723
|
+
} catch (e) {
|
8724
|
+
(0,_attributes_js__WEBPACK_IMPORTED_MODULE_11__.addAttributeToken)(self, _constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_ERRORMESSAGE, e.toString());
|
8725
|
+
}
|
8691
8726
|
}
|
8692
8727
|
|
8693
8728
|
if (!(elements instanceof NodeList)) {
|
@@ -8997,7 +9032,7 @@ function initOptionObserver() {
|
|
8997
9032
|
}
|
8998
9033
|
})); // disabled
|
8999
9034
|
|
9000
|
-
self[attributeObserverSymbol][_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED] = function (
|
9035
|
+
self[attributeObserverSymbol][_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED] = function () {
|
9001
9036
|
if (self.hasAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED)) {
|
9002
9037
|
self.setOption(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED, true);
|
9003
9038
|
} else {
|
@@ -9017,16 +9052,48 @@ function initOptionObserver() {
|
|
9017
9052
|
/**
|
9018
9053
|
* @private
|
9019
9054
|
* @return {object}
|
9020
|
-
* @throws {
|
9055
|
+
* @throws {TypeError} value is not a object
|
9056
|
+
*/
|
9057
|
+
|
9058
|
+
|
9059
|
+
function getOptionsFromScriptTag() {
|
9060
|
+
var self = this;
|
9061
|
+
|
9062
|
+
if (!self.hasAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_OPTIONS_SELECTOR)) {
|
9063
|
+
return {};
|
9064
|
+
}
|
9065
|
+
|
9066
|
+
var node = document.querySelector(self.getAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_OPTIONS_SELECTOR));
|
9067
|
+
|
9068
|
+
if (!(node instanceof HTMLScriptElement)) {
|
9069
|
+
(0,_attributes_js__WEBPACK_IMPORTED_MODULE_11__.addAttributeToken)(self, _constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_ERRORMESSAGE, 'the selector ' + _constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_OPTIONS_SELECTOR + ' for options was specified (' + self.getAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_OPTIONS_SELECTOR) + ') but not found.');
|
9070
|
+
return {};
|
9071
|
+
}
|
9072
|
+
|
9073
|
+
var obj = {};
|
9074
|
+
|
9075
|
+
try {
|
9076
|
+
obj = parseOptionsJSON.call(this, node.textContent.trim());
|
9077
|
+
} catch (e) {
|
9078
|
+
(0,_attributes_js__WEBPACK_IMPORTED_MODULE_11__.addAttributeToken)(self, _constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_ERRORMESSAGE, 'when analyzing the configuration from the script tag there was an error. ' + e);
|
9079
|
+
}
|
9080
|
+
|
9081
|
+
return obj;
|
9082
|
+
}
|
9083
|
+
/**
|
9084
|
+
* @private
|
9085
|
+
* @return {object}
|
9021
9086
|
*/
|
9022
9087
|
|
9023
9088
|
|
9024
9089
|
function getOptionsFromAttributes() {
|
9090
|
+
var self = this;
|
9091
|
+
|
9025
9092
|
if (this.hasAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_OPTIONS)) {
|
9026
9093
|
try {
|
9027
|
-
return parseOptionsJSON(this.getAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_OPTIONS));
|
9094
|
+
return parseOptionsJSON.call(self, this.getAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_OPTIONS));
|
9028
9095
|
} catch (e) {
|
9029
|
-
|
9096
|
+
(0,_attributes_js__WEBPACK_IMPORTED_MODULE_11__.addAttributeToken)(self, _constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_ERRORMESSAGE, 'the options attribute ' + _constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_OPTIONS + ' does not contain a valid json definition (actual: ' + this.getAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_OPTIONS) + ').' + e);
|
9030
9097
|
}
|
9031
9098
|
}
|
9032
9099
|
|
@@ -9040,23 +9107,28 @@ function getOptionsFromAttributes() {
|
|
9040
9107
|
|
9041
9108
|
|
9042
9109
|
function parseOptionsJSON(data) {
|
9043
|
-
|
9044
|
-
|
9045
|
-
try {
|
9046
|
-
var dataUrl = (0,_types_dataurl_js__WEBPACK_IMPORTED_MODULE_4__.parseDataURL)(data);
|
9047
|
-
data = dataUrl.content;
|
9048
|
-
} catch (e) {}
|
9110
|
+
var self = this,
|
9111
|
+
obj = {};
|
9049
9112
|
|
9050
|
-
|
9051
|
-
|
9052
|
-
|
9053
|
-
|
9054
|
-
|
9055
|
-
|
9056
|
-
|
9113
|
+
if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isString)(data)) {
|
9114
|
+
return obj;
|
9115
|
+
} // the configuration can be specified as a data url.
|
9116
|
+
|
9117
|
+
|
9118
|
+
try {
|
9119
|
+
var dataUrl = (0,_types_dataurl_js__WEBPACK_IMPORTED_MODULE_4__.parseDataURL)(data);
|
9120
|
+
data = dataUrl.content;
|
9121
|
+
} catch (e) {}
|
9122
|
+
|
9123
|
+
try {
|
9124
|
+
var _obj = JSON.parse(data);
|
9125
|
+
|
9126
|
+
return (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_9__.validateObject)(_obj);
|
9127
|
+
} catch (e) {
|
9128
|
+
throw e;
|
9057
9129
|
}
|
9058
9130
|
|
9059
|
-
return
|
9131
|
+
return obj;
|
9060
9132
|
}
|
9061
9133
|
/**
|
9062
9134
|
* @private
|
@@ -9084,6 +9156,7 @@ function initHtmlContent() {
|
|
9084
9156
|
* @memberOf Monster.DOM
|
9085
9157
|
* @this CustomElement
|
9086
9158
|
* @since 1.16.0
|
9159
|
+
* @throws {TypeError} value is not an instance of
|
9087
9160
|
*/
|
9088
9161
|
|
9089
9162
|
|
@@ -9097,13 +9170,55 @@ function initCSSStylesheet() {
|
|
9097
9170
|
var styleSheet = this.constructor.getCSSStyleSheet();
|
9098
9171
|
|
9099
9172
|
if (styleSheet instanceof CSSStyleSheet) {
|
9100
|
-
|
9173
|
+
if (styleSheet.cssRules.length > 0) {
|
9174
|
+
this.shadowRoot.adoptedStyleSheets = [styleSheet];
|
9175
|
+
}
|
9101
9176
|
} else if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isArray)(styleSheet)) {
|
9102
|
-
|
9177
|
+
var assign = [];
|
9178
|
+
|
9179
|
+
var _iterator3 = _createForOfIteratorHelper(styleSheet),
|
9180
|
+
_step3;
|
9181
|
+
|
9182
|
+
try {
|
9183
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
9184
|
+
var s = _step3.value;
|
9185
|
+
|
9186
|
+
if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isString)(s)) {
|
9187
|
+
var trimedStyleSheet = s.trim();
|
9188
|
+
|
9189
|
+
if (trimedStyleSheet !== '') {
|
9190
|
+
var style = document.createElement('style');
|
9191
|
+
style.innerHTML = trimedStyleSheet;
|
9192
|
+
self.shadowRoot.prepend(style);
|
9193
|
+
}
|
9194
|
+
|
9195
|
+
continue;
|
9196
|
+
}
|
9197
|
+
|
9198
|
+
(0,_types_validate_js__WEBPACK_IMPORTED_MODULE_9__.validateInstance)(s, CSSStyleSheet);
|
9199
|
+
|
9200
|
+
if (s.cssRules.length > 0) {
|
9201
|
+
assign.push(s);
|
9202
|
+
}
|
9203
|
+
}
|
9204
|
+
} catch (err) {
|
9205
|
+
_iterator3.e(err);
|
9206
|
+
} finally {
|
9207
|
+
_iterator3.f();
|
9208
|
+
}
|
9209
|
+
|
9210
|
+
if (assign.length > 0) {
|
9211
|
+
this.shadowRoot.adoptedStyleSheets = assign;
|
9212
|
+
}
|
9103
9213
|
} else if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isString)(styleSheet)) {
|
9104
|
-
var
|
9105
|
-
|
9106
|
-
|
9214
|
+
var _trimedStyleSheet = styleSheet.trim();
|
9215
|
+
|
9216
|
+
if (_trimedStyleSheet !== '') {
|
9217
|
+
var _style = document.createElement('style');
|
9218
|
+
|
9219
|
+
_style.innerHTML = styleSheet;
|
9220
|
+
self.shadowRoot.prepend(_style);
|
9221
|
+
}
|
9107
9222
|
}
|
9108
9223
|
|
9109
9224
|
return self;
|
@@ -9257,7 +9372,7 @@ var internal = Symbol('internal');
|
|
9257
9372
|
*
|
9258
9373
|
* ```
|
9259
9374
|
* <script type="module">
|
9260
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9375
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
9261
9376
|
* new Monster.Types.DataUrl()
|
9262
9377
|
* </script>
|
9263
9378
|
* ```
|
@@ -9266,7 +9381,7 @@ var internal = Symbol('internal');
|
|
9266
9381
|
*
|
9267
9382
|
* ```
|
9268
9383
|
* <script type="module">
|
9269
|
-
* import {DataUrl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9384
|
+
* import {DataUrl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/dataurl.js';
|
9270
9385
|
* new DataUrl()
|
9271
9386
|
* </script>
|
9272
9387
|
* ```
|
@@ -9346,7 +9461,7 @@ var DataUrl = /*#__PURE__*/function (_Base) {
|
|
9346
9461
|
*
|
9347
9462
|
* ```
|
9348
9463
|
* <script type="module">
|
9349
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9464
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
9350
9465
|
* console.log(Monster.Types.parseDataURL())
|
9351
9466
|
* </script>
|
9352
9467
|
* ```
|
@@ -9355,7 +9470,7 @@ var DataUrl = /*#__PURE__*/function (_Base) {
|
|
9355
9470
|
*
|
9356
9471
|
* ```
|
9357
9472
|
* <script type="module">
|
9358
|
-
* import {parseDataURL} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9473
|
+
* import {parseDataURL} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/dataurl.js';
|
9359
9474
|
* console.log(parseDataURL())
|
9360
9475
|
* </script>
|
9361
9476
|
* ```
|
@@ -9493,7 +9608,7 @@ var internal = Symbol('internal');
|
|
9493
9608
|
*
|
9494
9609
|
* ```
|
9495
9610
|
* <script type="module">
|
9496
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9611
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
9497
9612
|
* console.log(new Monster.Types.MediaType())
|
9498
9613
|
* </script>
|
9499
9614
|
* ```
|
@@ -9502,7 +9617,7 @@ var internal = Symbol('internal');
|
|
9502
9617
|
*
|
9503
9618
|
* ```
|
9504
9619
|
* <script type="module">
|
9505
|
-
* import {MediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9620
|
+
* import {MediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/mediatype.js';
|
9506
9621
|
* console.log(new MediaType())
|
9507
9622
|
* </script>
|
9508
9623
|
* ```
|
@@ -9620,7 +9735,7 @@ var MediaType = /*#__PURE__*/function (_Base) {
|
|
9620
9735
|
*
|
9621
9736
|
* ```
|
9622
9737
|
* <script type="module">
|
9623
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9738
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
9624
9739
|
* console.log(Monster.Types.parseMediaType())
|
9625
9740
|
* </script>
|
9626
9741
|
* ```
|
@@ -9629,7 +9744,7 @@ var MediaType = /*#__PURE__*/function (_Base) {
|
|
9629
9744
|
*
|
9630
9745
|
* ```
|
9631
9746
|
* <script type="module">
|
9632
|
-
* import {parseMediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9747
|
+
* import {parseMediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/dataurl.js';
|
9633
9748
|
* console.log(parseMediaType())
|
9634
9749
|
* </script>
|
9635
9750
|
* ```
|
@@ -9654,7 +9769,7 @@ var MediaType = /*#__PURE__*/function (_Base) {
|
|
9654
9769
|
|
9655
9770
|
|
9656
9771
|
function parseMediaType(mediatype) {
|
9657
|
-
var regex = /*#__PURE__*/_wrapRegExp(/([A-Za-z]+|\*)\/(([
|
9772
|
+
var regex = /*#__PURE__*/_wrapRegExp(/([A-Za-z]+|\*)\/(([a-zA-Z0-9.\+_\-]+)|\*|)(\s*;\s*([a-zA-Z0-9]+)\s*(=\s*("?[A-Za-z0-9_\-]+"?))?)*/g, {
|
9658
9773
|
type: 1,
|
9659
9774
|
subtype: 2,
|
9660
9775
|
parameter: 4
|
@@ -9768,7 +9883,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
9768
9883
|
*
|
9769
9884
|
* ```
|
9770
9885
|
* <script type="module">
|
9771
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9886
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
9772
9887
|
* new Monster.DOM.Template()
|
9773
9888
|
* </script>
|
9774
9889
|
* ```
|
@@ -9777,7 +9892,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
9777
9892
|
*
|
9778
9893
|
* ```
|
9779
9894
|
* <script type="module">
|
9780
|
-
* import {Template} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9895
|
+
* import {Template} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/template.js';
|
9781
9896
|
* new Template()
|
9782
9897
|
* </script>
|
9783
9898
|
* ```
|
@@ -9855,7 +9970,7 @@ var Template = /*#__PURE__*/function (_Base) {
|
|
9855
9970
|
*
|
9856
9971
|
* ```
|
9857
9972
|
* <script type="module">
|
9858
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9973
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
9859
9974
|
* Monster.DOM.findDocumentTemplate()
|
9860
9975
|
* </script>
|
9861
9976
|
* ```
|
@@ -9864,14 +9979,14 @@ var Template = /*#__PURE__*/function (_Base) {
|
|
9864
9979
|
*
|
9865
9980
|
* ```
|
9866
9981
|
* <script type="module">
|
9867
|
-
* import {findTemplate} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9982
|
+
* import {findTemplate} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/template.js';
|
9868
9983
|
* findDocumentTemplate()
|
9869
9984
|
* </script>
|
9870
9985
|
* ```
|
9871
9986
|
*
|
9872
9987
|
* @example
|
9873
9988
|
*
|
9874
|
-
* import { findDocumentTemplate } from "https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9989
|
+
* import { findDocumentTemplate } from "https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/template.js";
|
9875
9990
|
*
|
9876
9991
|
* const template = document.createElement("template");
|
9877
9992
|
* template.id = "myTemplate";
|
@@ -10043,7 +10158,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
10043
10158
|
*
|
10044
10159
|
* ```
|
10045
10160
|
* <script type="module">
|
10046
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
10161
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
10047
10162
|
* console.log(new Monster.DOM.Theme())
|
10048
10163
|
* </script>
|
10049
10164
|
* ```
|
@@ -10052,14 +10167,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
10052
10167
|
*
|
10053
10168
|
* ```
|
10054
10169
|
* <script type="module">
|
10055
|
-
* import {Theme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
10170
|
+
* import {Theme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/theme.js';
|
10056
10171
|
* console.log(new Theme())
|
10057
10172
|
* </script>
|
10058
10173
|
* ```
|
10059
10174
|
*
|
10060
10175
|
* @example
|
10061
10176
|
*
|
10062
|
-
* import {getDocumentTheme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
10177
|
+
* import {getDocumentTheme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/theme.js';
|
10063
10178
|
*
|
10064
10179
|
* const theme = getDocumentTheme();
|
10065
10180
|
* console.log(theme.getName());
|
@@ -10246,7 +10361,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
10246
10361
|
*
|
10247
10362
|
* ```
|
10248
10363
|
* <script type="module">
|
10249
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
10364
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
10250
10365
|
* new Monster.DOM.Updater()
|
10251
10366
|
* </script>
|
10252
10367
|
* ```
|
@@ -10255,14 +10370,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
10255
10370
|
*
|
10256
10371
|
* ```
|
10257
10372
|
* <script type="module">
|
10258
|
-
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
10373
|
+
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/updater.js';
|
10259
10374
|
* new Updater()
|
10260
10375
|
* </script>
|
10261
10376
|
* ```
|
10262
10377
|
*
|
10263
10378
|
* @example
|
10264
10379
|
*
|
10265
|
-
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
10380
|
+
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/updater.js';
|
10266
10381
|
*
|
10267
10382
|
* // First we prepare the html document.
|
10268
10383
|
* // This is done here via script, but can also be inserted into the document as pure html.
|
@@ -10813,7 +10928,9 @@ function insertElement(change) {
|
|
10813
10928
|
if (!available.has(node.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_INSERT_REFERENCE))) {
|
10814
10929
|
try {
|
10815
10930
|
containerElement.removeChild(node);
|
10816
|
-
} catch (e) {
|
10931
|
+
} catch (e) {
|
10932
|
+
containerElement.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, (containerElement.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE) + ", " + e.message).trim());
|
10933
|
+
}
|
10817
10934
|
}
|
10818
10935
|
}
|
10819
10936
|
};
|
@@ -10957,37 +11074,65 @@ function runUpdateContent(container, parts, subject) {
|
|
10957
11074
|
if (container.matches(query)) {
|
10958
11075
|
iterator.add(container);
|
10959
11076
|
}
|
11077
|
+
/**
|
11078
|
+
* @type {HTMLElement} element
|
11079
|
+
*/
|
10960
11080
|
|
10961
|
-
iterator.forEach(function (key, element) {
|
10962
|
-
if (mem.has(element)) return;
|
10963
|
-
mem.add(element);
|
10964
|
-
var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE);
|
10965
|
-
var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(attributes);
|
10966
|
-
var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_3__.Pipe(cmd);
|
10967
11081
|
|
10968
|
-
|
10969
|
-
|
10970
|
-
});
|
11082
|
+
var _iterator6 = _createForOfIteratorHelper(iterator.entries()),
|
11083
|
+
_step6;
|
10971
11084
|
|
10972
|
-
|
11085
|
+
try {
|
11086
|
+
var _loop2 = function _loop2() {
|
11087
|
+
var _step6$value = _slicedToArray(_step6.value, 1),
|
11088
|
+
element = _step6$value[0];
|
10973
11089
|
|
10974
|
-
|
10975
|
-
|
10976
|
-
|
10977
|
-
|
10978
|
-
element.
|
10979
|
-
|
11090
|
+
if (mem.has(element)) return {
|
11091
|
+
v: void 0
|
11092
|
+
};
|
11093
|
+
mem.add(element);
|
11094
|
+
var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE);
|
11095
|
+
var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(attributes);
|
11096
|
+
var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_3__.Pipe(cmd);
|
11097
|
+
|
11098
|
+
_this2[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.forEach(function (f, n) {
|
11099
|
+
pipe.setCallback(n, f);
|
11100
|
+
});
|
11101
|
+
|
11102
|
+
var value = void 0;
|
10980
11103
|
|
10981
|
-
|
10982
|
-
|
10983
|
-
|
11104
|
+
try {
|
11105
|
+
element.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE);
|
11106
|
+
value = pipe.run(subject);
|
11107
|
+
} catch (e) {
|
11108
|
+
element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, e.message);
|
10984
11109
|
}
|
10985
11110
|
|
10986
|
-
|
10987
|
-
|
10988
|
-
|
11111
|
+
if (value instanceof HTMLElement) {
|
11112
|
+
while (element.firstChild) {
|
11113
|
+
element.removeChild(element.firstChild);
|
11114
|
+
}
|
11115
|
+
|
11116
|
+
try {
|
11117
|
+
element.appendChild(value);
|
11118
|
+
} catch (e) {
|
11119
|
+
element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, (element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE) + ", " + e.message).trim());
|
11120
|
+
}
|
11121
|
+
} else {
|
11122
|
+
element.innerHTML = value;
|
11123
|
+
}
|
11124
|
+
};
|
11125
|
+
|
11126
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
11127
|
+
var _ret2 = _loop2();
|
11128
|
+
|
11129
|
+
if (_typeof(_ret2) === "object") return _ret2.v;
|
10989
11130
|
}
|
10990
|
-
})
|
11131
|
+
} catch (err) {
|
11132
|
+
_iterator6.e(err);
|
11133
|
+
} finally {
|
11134
|
+
_iterator6.f();
|
11135
|
+
}
|
10991
11136
|
}
|
10992
11137
|
}
|
10993
11138
|
/**
|
@@ -11037,45 +11182,65 @@ function runUpdateAttributes(container, parts, subject) {
|
|
11037
11182
|
iterator.add(container);
|
11038
11183
|
}
|
11039
11184
|
|
11040
|
-
iterator.
|
11041
|
-
|
11042
|
-
mem.add(element);
|
11043
|
-
var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES);
|
11185
|
+
var _iterator7 = _createForOfIteratorHelper(iterator.entries()),
|
11186
|
+
_step7;
|
11044
11187
|
|
11045
|
-
|
11046
|
-
|
11047
|
-
|
11188
|
+
try {
|
11189
|
+
var _loop3 = function _loop3() {
|
11190
|
+
var _step7$value = _slicedToArray(_step7.value, 1),
|
11191
|
+
element = _step7$value[0];
|
11048
11192
|
|
11049
|
-
|
11050
|
-
|
11051
|
-
|
11052
|
-
|
11053
|
-
var
|
11054
|
-
self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.forEach(function (f, n) {
|
11055
|
-
pipe.setCallback(n, f, element);
|
11056
|
-
});
|
11057
|
-
var value = void 0;
|
11193
|
+
if (mem.has(element)) return {
|
11194
|
+
v: void 0
|
11195
|
+
};
|
11196
|
+
mem.add(element);
|
11197
|
+
var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES);
|
11058
11198
|
|
11059
|
-
|
11060
|
-
|
11061
|
-
|
11062
|
-
} catch (e) {
|
11063
|
-
element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, e.message);
|
11064
|
-
}
|
11199
|
+
var _loop4 = function _loop4() {
|
11200
|
+
var _Object$entries8$_i = _slicedToArray(_Object$entries8[_i9], 2),
|
11201
|
+
def = _Object$entries8$_i[1];
|
11065
11202
|
|
11066
|
-
|
11067
|
-
|
11068
|
-
|
11069
|
-
|
11070
|
-
|
11203
|
+
def = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def);
|
11204
|
+
var i = def.indexOf(' ');
|
11205
|
+
var name = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def.substr(0, i));
|
11206
|
+
var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def.substr(i));
|
11207
|
+
var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_3__.Pipe(cmd);
|
11208
|
+
self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.forEach(function (f, n) {
|
11209
|
+
pipe.setCallback(n, f, element);
|
11210
|
+
});
|
11211
|
+
var value = void 0;
|
11071
11212
|
|
11072
|
-
|
11213
|
+
try {
|
11214
|
+
element.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE);
|
11215
|
+
value = pipe.run(subject);
|
11216
|
+
} catch (e) {
|
11217
|
+
element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, e.message);
|
11218
|
+
}
|
11219
|
+
|
11220
|
+
if (value === undefined) {
|
11221
|
+
element.removeAttribute(name);
|
11222
|
+
} else if (element.getAttribute(name) !== value) {
|
11223
|
+
element.setAttribute(name, value);
|
11224
|
+
}
|
11225
|
+
|
11226
|
+
handleInputControlAttributeUpdate.call(_this3, element, name, value);
|
11227
|
+
};
|
11228
|
+
|
11229
|
+
for (var _i9 = 0, _Object$entries8 = Object.entries(attributes.split(',')); _i9 < _Object$entries8.length; _i9++) {
|
11230
|
+
_loop4();
|
11231
|
+
}
|
11073
11232
|
};
|
11074
11233
|
|
11075
|
-
for (
|
11076
|
-
|
11234
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
11235
|
+
var _ret3 = _loop3();
|
11236
|
+
|
11237
|
+
if (_typeof(_ret3) === "object") return _ret3.v;
|
11077
11238
|
}
|
11078
|
-
})
|
11239
|
+
} catch (err) {
|
11240
|
+
_iterator7.e(err);
|
11241
|
+
} finally {
|
11242
|
+
_iterator7.f();
|
11243
|
+
}
|
11079
11244
|
}
|
11080
11245
|
}
|
11081
11246
|
/**
|
@@ -11208,7 +11373,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
11208
11373
|
*
|
11209
11374
|
* ```
|
11210
11375
|
* <script type="module">
|
11211
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11376
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
11212
11377
|
* Monster.Util.trimSpaces(" hello ")
|
11213
11378
|
* </script>
|
11214
11379
|
* ```
|
@@ -11217,7 +11382,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
11217
11382
|
*
|
11218
11383
|
* ```
|
11219
11384
|
* <script type="module">
|
11220
|
-
* import {trimSpaces} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11385
|
+
* import {trimSpaces} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/util/trimspaces.js';
|
11221
11386
|
* trimSpaces(' hello \\ ')
|
11222
11387
|
* </script>
|
11223
11388
|
* ```
|
@@ -11322,7 +11487,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
11322
11487
|
*
|
11323
11488
|
* ```
|
11324
11489
|
* <script type="module">
|
11325
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11490
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
11326
11491
|
* new Monster.DOM.fireEvent()
|
11327
11492
|
* </script>
|
11328
11493
|
* ```
|
@@ -11331,7 +11496,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
11331
11496
|
*
|
11332
11497
|
* ```
|
11333
11498
|
* <script type="module">
|
11334
|
-
* import {fireEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11499
|
+
* import {fireEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/events.js';
|
11335
11500
|
* fireEvent()
|
11336
11501
|
* </script>
|
11337
11502
|
* ```
|
@@ -11383,7 +11548,7 @@ function fireEvent(element, type) {
|
|
11383
11548
|
*
|
11384
11549
|
* ```
|
11385
11550
|
* <script type="module">
|
11386
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11551
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
11387
11552
|
* new Monster.DOM.fireCustomEvent()
|
11388
11553
|
* </script>
|
11389
11554
|
* ```
|
@@ -11392,7 +11557,7 @@ function fireEvent(element, type) {
|
|
11392
11557
|
*
|
11393
11558
|
* ```
|
11394
11559
|
* <script type="module">
|
11395
|
-
* import {fireCustomEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11560
|
+
* import {fireCustomEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/events.js';
|
11396
11561
|
* fireCustomEvent()
|
11397
11562
|
* </script>
|
11398
11563
|
* ```
|
@@ -11451,7 +11616,7 @@ function fireCustomEvent(element, type, detail) {
|
|
11451
11616
|
*
|
11452
11617
|
* ```
|
11453
11618
|
* <script type="module">
|
11454
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11619
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
11455
11620
|
* new Monster.DOM.findTargetElementFromEvent()
|
11456
11621
|
* </script>
|
11457
11622
|
* ```
|
@@ -11460,7 +11625,7 @@ function fireCustomEvent(element, type, detail) {
|
|
11460
11625
|
*
|
11461
11626
|
* ```
|
11462
11627
|
* <script type="module">
|
11463
|
-
* import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11628
|
+
* import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/events.js';
|
11464
11629
|
* findTargetElementFromEvent()
|
11465
11630
|
* </script>
|
11466
11631
|
* ```
|
@@ -11531,7 +11696,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
11531
11696
|
*
|
11532
11697
|
* ```
|
11533
11698
|
* <script type="module">
|
11534
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11699
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
11535
11700
|
* console.log(Monster.DOM.getDocument())
|
11536
11701
|
* </script>
|
11537
11702
|
* ```
|
@@ -11540,7 +11705,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
11540
11705
|
*
|
11541
11706
|
* ```
|
11542
11707
|
* <script type="module">
|
11543
|
-
* import {getDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11708
|
+
* import {getDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/util.js';
|
11544
11709
|
* console.log(getDocument())
|
11545
11710
|
* </script>
|
11546
11711
|
* ```
|
@@ -11595,7 +11760,7 @@ function getDocument() {
|
|
11595
11760
|
*
|
11596
11761
|
* ```
|
11597
11762
|
* <script type="module">
|
11598
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11763
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
11599
11764
|
* console.log(Monster.DOM.getWindow())
|
11600
11765
|
* </script>
|
11601
11766
|
* ```
|
@@ -11604,7 +11769,7 @@ function getDocument() {
|
|
11604
11769
|
*
|
11605
11770
|
* ```
|
11606
11771
|
* <script type="module">
|
11607
|
-
* import {getWindow} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11772
|
+
* import {getWindow} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/util.js';
|
11608
11773
|
* console.log(getWindow(null))
|
11609
11774
|
* </script>
|
11610
11775
|
* ```
|
@@ -11664,7 +11829,7 @@ function getWindow() {
|
|
11664
11829
|
*
|
11665
11830
|
* ```
|
11666
11831
|
* <script type="module">
|
11667
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11832
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
11668
11833
|
* console.log(Monster.DOM.getDocumentFragmentFromString())
|
11669
11834
|
* </script>
|
11670
11835
|
* ```
|
@@ -11673,7 +11838,7 @@ function getWindow() {
|
|
11673
11838
|
*
|
11674
11839
|
* ```
|
11675
11840
|
* <script type="module">
|
11676
|
-
* import {getDocumentFragmentFromString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11841
|
+
* import {getDocumentFragmentFromString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/util.js';
|
11677
11842
|
* console.log(getDocumentFragmentFromString('<div></div>'))
|
11678
11843
|
* </script>
|
11679
11844
|
* ```
|
@@ -11763,7 +11928,7 @@ var DEFAULT_LANGUAGE = 'en';
|
|
11763
11928
|
*
|
11764
11929
|
* ```
|
11765
11930
|
* <script type="module">
|
11766
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11931
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
11767
11932
|
* new Monster.DOM.getLocaleOfDocument()
|
11768
11933
|
* </script>
|
11769
11934
|
* ```
|
@@ -11772,7 +11937,7 @@ var DEFAULT_LANGUAGE = 'en';
|
|
11772
11937
|
*
|
11773
11938
|
* ```
|
11774
11939
|
* <script type="module">
|
11775
|
-
* import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11940
|
+
* import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/locale.js';
|
11776
11941
|
* new getLocaleOfDocument()
|
11777
11942
|
* </script>
|
11778
11943
|
* ```
|
@@ -11865,7 +12030,7 @@ var localeStringSymbol = Symbol('localeString');
|
|
11865
12030
|
*
|
11866
12031
|
* ```
|
11867
12032
|
* <script type="module">
|
11868
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12033
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
11869
12034
|
* new Monster.I18n.Locale()
|
11870
12035
|
* </script>
|
11871
12036
|
* ```
|
@@ -11874,7 +12039,7 @@ var localeStringSymbol = Symbol('localeString');
|
|
11874
12039
|
*
|
11875
12040
|
* ```
|
11876
12041
|
* <script type="module">
|
11877
|
-
* import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12042
|
+
* import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/i18n/locale.js';
|
11878
12043
|
* new Locale()
|
11879
12044
|
* </script>
|
11880
12045
|
* ```
|
@@ -12067,7 +12232,7 @@ var Locale = /*#__PURE__*/function (_Base) {
|
|
12067
12232
|
*
|
12068
12233
|
* ```
|
12069
12234
|
* <script type="module">
|
12070
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12235
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
12071
12236
|
* new Monster.I18n.createLocale()
|
12072
12237
|
* </script>
|
12073
12238
|
* ```
|
@@ -12076,7 +12241,7 @@ var Locale = /*#__PURE__*/function (_Base) {
|
|
12076
12241
|
*
|
12077
12242
|
* ```
|
12078
12243
|
* <script type="module">
|
12079
|
-
* import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12244
|
+
* import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/i18n/locale.js';
|
12080
12245
|
* createLocale()
|
12081
12246
|
* </script>
|
12082
12247
|
* ```
|
@@ -12252,7 +12417,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12252
12417
|
*
|
12253
12418
|
* ```
|
12254
12419
|
* <script type="module">
|
12255
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12420
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
12256
12421
|
* new Monster.I18n.Provider()
|
12257
12422
|
* </script>
|
12258
12423
|
* ```
|
@@ -12261,7 +12426,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12261
12426
|
*
|
12262
12427
|
* ```
|
12263
12428
|
* <script type="module">
|
12264
|
-
* import {Provider} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12429
|
+
* import {Provider} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/i18n/provider.js';
|
12265
12430
|
* new Provider()
|
12266
12431
|
* </script>
|
12267
12432
|
* ```
|
@@ -12358,24 +12523,39 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12358
12523
|
/**
|
12359
12524
|
* This is the base class with options from which some monster classes are derived.
|
12360
12525
|
*
|
12361
|
-
*
|
12526
|
+
* This class is actually only used as a base class.
|
12527
|
+
*
|
12528
|
+
* However, you can also create an instance directly via the monster namespace `new Monster.Types.BaseWithOptions()`.
|
12362
12529
|
*
|
12363
|
-
* ```
|
12530
|
+
* ```html
|
12364
12531
|
* <script type="module">
|
12365
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12532
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
12366
12533
|
* new Monster.Types.BaseWithOptions()
|
12367
12534
|
* </script>
|
12368
12535
|
* ```
|
12369
12536
|
*
|
12370
12537
|
* Alternatively, you can also integrate this function individually.
|
12371
12538
|
*
|
12372
|
-
* ```
|
12539
|
+
* ```html
|
12373
12540
|
* <script type="module">
|
12374
|
-
* import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12541
|
+
* import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/basewithoptions.js';
|
12375
12542
|
* new BaseWithOptions()
|
12376
12543
|
* </script>
|
12377
12544
|
* ```
|
12545
|
+
*
|
12546
|
+
* Classes that require the possibility of options can be derived directly from this class.
|
12547
|
+
* Derived classes almost always override the `defaul` getter with their own values.
|
12378
12548
|
*
|
12549
|
+
* ```javascript
|
12550
|
+
* class My extends BaseWithOptions {
|
12551
|
+
* get defaults() {
|
12552
|
+
* return Object.assign({}, super.defaults, {
|
12553
|
+
* mykey: true
|
12554
|
+
* });
|
12555
|
+
* }
|
12556
|
+
* }
|
12557
|
+
* ```
|
12558
|
+
*
|
12379
12559
|
* The class was formerly called Object.
|
12380
12560
|
*
|
12381
12561
|
* @since 1.13.0
|
@@ -12407,7 +12587,18 @@ var BaseWithOptions = /*#__PURE__*/function (_Base) {
|
|
12407
12587
|
return _this;
|
12408
12588
|
}
|
12409
12589
|
/**
|
12410
|
-
*
|
12590
|
+
* This getter provides the options. Derived classes overwrite
|
12591
|
+
* this getter with their own values. It is good karma to always include
|
12592
|
+
* the values from the parent class.
|
12593
|
+
*
|
12594
|
+
* ```javascript
|
12595
|
+
* get defaults() {
|
12596
|
+
* return Object.assign({}, super.defaults, {
|
12597
|
+
* mykey: true
|
12598
|
+
* });
|
12599
|
+
* }
|
12600
|
+
*
|
12601
|
+
* ```
|
12411
12602
|
*
|
12412
12603
|
* @return {object}
|
12413
12604
|
*/
|
@@ -12512,7 +12703,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12512
12703
|
*
|
12513
12704
|
* ```
|
12514
12705
|
* <script type="module">
|
12515
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12706
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
12516
12707
|
* new Monster.I18n.Translations()
|
12517
12708
|
* </script>
|
12518
12709
|
* ```
|
@@ -12521,15 +12712,15 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12521
12712
|
*
|
12522
12713
|
* ```
|
12523
12714
|
* <script type="module">
|
12524
|
-
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12715
|
+
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/i18n/translations.js';
|
12525
12716
|
* new Translations()
|
12526
12717
|
* </script>
|
12527
12718
|
* ```
|
12528
12719
|
*
|
12529
12720
|
* @example
|
12530
12721
|
*
|
12531
|
-
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12532
|
-
* import {parseLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12722
|
+
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/i18n/translations.js';
|
12723
|
+
* import {parseLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/i18n/locale.js';
|
12533
12724
|
*
|
12534
12725
|
* const translation = new Translations(parseLocale('en-GB'));
|
12535
12726
|
*
|
@@ -12801,7 +12992,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12801
12992
|
*
|
12802
12993
|
* ```
|
12803
12994
|
* <script type="module">
|
12804
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12995
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
12805
12996
|
* new Monster.I18n.Providers.Fetch()
|
12806
12997
|
* </script>
|
12807
12998
|
* ```
|
@@ -12810,14 +13001,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12810
13001
|
*
|
12811
13002
|
* ```
|
12812
13003
|
* <script type="module">
|
12813
|
-
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13004
|
+
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/i18n/providers/fetch.js';
|
12814
13005
|
* new Fetch()
|
12815
13006
|
* </script>
|
12816
13007
|
* ```
|
12817
13008
|
*
|
12818
13009
|
* @example <caption>das ist ein test</caption>
|
12819
13010
|
*
|
12820
|
-
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13011
|
+
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/i18n/providers/fetch.js';
|
12821
13012
|
*
|
12822
13013
|
* // fetch from API
|
12823
13014
|
* const translation = new Fetch('https://example.com/${language}.json').getTranslation('en-GB');
|
@@ -13047,7 +13238,7 @@ var workingDataSymbol = Symbol('workingData');
|
|
13047
13238
|
*
|
13048
13239
|
* ```
|
13049
13240
|
* <script type="module">
|
13050
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13241
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
13051
13242
|
* new Monster.Text.Formatter()
|
13052
13243
|
* </script>
|
13053
13244
|
* ```
|
@@ -13056,7 +13247,7 @@ var workingDataSymbol = Symbol('workingData');
|
|
13056
13247
|
*
|
13057
13248
|
* ```
|
13058
13249
|
* <script type="module">
|
13059
|
-
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13250
|
+
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/text/formatter.js';
|
13060
13251
|
* new Formatter()
|
13061
13252
|
* </script>
|
13062
13253
|
* ```
|
@@ -13101,7 +13292,7 @@ var workingDataSymbol = Symbol('workingData');
|
|
13101
13292
|
*
|
13102
13293
|
* @example
|
13103
13294
|
*
|
13104
|
-
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13295
|
+
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/text/formatter.js';
|
13105
13296
|
*
|
13106
13297
|
* new Formatter({
|
13107
13298
|
* a: {
|
@@ -13446,7 +13637,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
13446
13637
|
*
|
13447
13638
|
* ```
|
13448
13639
|
* <script type="module">
|
13449
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13640
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
13450
13641
|
* console.log(new Monster.Logging.Handler())
|
13451
13642
|
* </script>
|
13452
13643
|
* ```
|
@@ -13455,7 +13646,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
13455
13646
|
*
|
13456
13647
|
* ```
|
13457
13648
|
* <script type="module">
|
13458
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13649
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/logging/handler.js';
|
13459
13650
|
* console.log(new Handler())
|
13460
13651
|
* </script>
|
13461
13652
|
* ```
|
@@ -13693,7 +13884,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
13693
13884
|
*
|
13694
13885
|
* ```
|
13695
13886
|
* <script type="module">
|
13696
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13887
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
13697
13888
|
* console.log(new Monster.Logging.LogEntry())
|
13698
13889
|
* </script>
|
13699
13890
|
* ```
|
@@ -13702,7 +13893,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
13702
13893
|
*
|
13703
13894
|
* ```
|
13704
13895
|
* <script type="module">
|
13705
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13896
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/logging/logentry.js';
|
13706
13897
|
* console.log(new LogEntry())
|
13707
13898
|
* </script>
|
13708
13899
|
* ```
|
@@ -13888,7 +14079,7 @@ var OFF = 0;
|
|
13888
14079
|
*
|
13889
14080
|
* ```
|
13890
14081
|
* <script type="module">
|
13891
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14082
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
13892
14083
|
* new Monster.Logging.Logger()
|
13893
14084
|
* </script>
|
13894
14085
|
* ```
|
@@ -13897,7 +14088,7 @@ var OFF = 0;
|
|
13897
14088
|
*
|
13898
14089
|
* ```
|
13899
14090
|
* <script type="module">
|
13900
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14091
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/logging/logger.js';
|
13901
14092
|
* new Logger()
|
13902
14093
|
* </script>
|
13903
14094
|
* ```
|
@@ -14197,7 +14388,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14197
14388
|
*
|
14198
14389
|
* ```
|
14199
14390
|
* <script type="module">
|
14200
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14391
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
14201
14392
|
* console.log(new Monster.Logging.Handler.ConsoleHandler())
|
14202
14393
|
* </script>
|
14203
14394
|
* ```
|
@@ -14206,7 +14397,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14206
14397
|
*
|
14207
14398
|
* ```
|
14208
14399
|
* <script type="module">
|
14209
|
-
* import {ConsoleHandler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14400
|
+
* import {ConsoleHandler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/logging/handler/console.js';
|
14210
14401
|
* console.log(new ConsoleHandler())
|
14211
14402
|
* </script>
|
14212
14403
|
* ```
|
@@ -14282,7 +14473,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
14282
14473
|
*
|
14283
14474
|
* ```
|
14284
14475
|
* <script type="module">
|
14285
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14476
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
14286
14477
|
* Monster.Math.random(1,10)
|
14287
14478
|
* // ↦ 5
|
14288
14479
|
* </script>
|
@@ -14292,7 +14483,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
14292
14483
|
*
|
14293
14484
|
* ```
|
14294
14485
|
* <script type="module">
|
14295
|
-
* import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14486
|
+
* import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/math/random.js';
|
14296
14487
|
* random(1,10)
|
14297
14488
|
* // ↦ 5
|
14298
14489
|
* </script>
|
@@ -14414,6 +14605,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
14414
14605
|
|
14415
14606
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
14416
14607
|
|
14608
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
14609
|
+
|
14610
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
14611
|
+
|
14417
14612
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
14418
14613
|
|
14419
14614
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
@@ -14449,7 +14644,7 @@ var internalCounter = 0;
|
|
14449
14644
|
*
|
14450
14645
|
* ```
|
14451
14646
|
* <script type="module">
|
14452
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14647
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
14453
14648
|
* console.log(new Monster.Types.RandomID())
|
14454
14649
|
* </script>
|
14455
14650
|
* ```
|
@@ -14458,7 +14653,7 @@ var internalCounter = 0;
|
|
14458
14653
|
*
|
14459
14654
|
* ```
|
14460
14655
|
* <script type="module">
|
14461
|
-
* import {RandomID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14656
|
+
* import {RandomID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/randomid.js';
|
14462
14657
|
* console.log(new RandomID())
|
14463
14658
|
* </script>
|
14464
14659
|
* ```
|
@@ -14490,7 +14685,7 @@ var RandomID = /*#__PURE__*/function (_ID) {
|
|
14490
14685
|
return _this;
|
14491
14686
|
}
|
14492
14687
|
|
14493
|
-
return RandomID;
|
14688
|
+
return _createClass(RandomID);
|
14494
14689
|
}(_id_js__WEBPACK_IMPORTED_MODULE_3__.ID);
|
14495
14690
|
|
14496
14691
|
(0,_namespace_js__WEBPACK_IMPORTED_MODULE_1__.assignToNamespace)('Monster.Types', RandomID);
|
@@ -14541,7 +14736,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14541
14736
|
*
|
14542
14737
|
* ```
|
14543
14738
|
* <script type="module">
|
14544
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14739
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
14545
14740
|
* console.log(new Monster.Types.Version('1.2.3')) // ↦ 1.2.3
|
14546
14741
|
* console.log(new Monster.Types.Version('1')) // ↦ 1.0.0
|
14547
14742
|
* </script>
|
@@ -14551,7 +14746,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14551
14746
|
*
|
14552
14747
|
* ```
|
14553
14748
|
* <script type="module">
|
14554
|
-
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14749
|
+
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/version.js';
|
14555
14750
|
* console.log(new Version('1.2.3')) // ↦ 1.2.3
|
14556
14751
|
* console.log(new Version('1')) // ↦ 1.0.0
|
14557
14752
|
* </script>
|
@@ -14559,7 +14754,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14559
14754
|
*
|
14560
14755
|
* @example
|
14561
14756
|
*
|
14562
|
-
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14757
|
+
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/version.js';
|
14563
14758
|
*
|
14564
14759
|
* new Version('1.0.0') // ↦ 1.0.0
|
14565
14760
|
* new Version(1) // ↦ 1.0.0
|
@@ -14693,7 +14888,7 @@ var monsterVersion;
|
|
14693
14888
|
*
|
14694
14889
|
* ```
|
14695
14890
|
* <script type="module">
|
14696
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14891
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
14697
14892
|
* console.log(Monster.getVersion())
|
14698
14893
|
* </script>
|
14699
14894
|
* ```
|
@@ -14702,7 +14897,7 @@ var monsterVersion;
|
|
14702
14897
|
*
|
14703
14898
|
* ```
|
14704
14899
|
* <script type="module">
|
14705
|
-
* import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14900
|
+
* import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/version.js';
|
14706
14901
|
* console.log(getVersion())
|
14707
14902
|
* </script>
|
14708
14903
|
* ```
|
@@ -14721,7 +14916,7 @@ function getVersion() {
|
|
14721
14916
|
/**#@+ dont touch, replaced by make with package.json version */
|
14722
14917
|
|
14723
14918
|
|
14724
|
-
monsterVersion = new Version('1.
|
14919
|
+
monsterVersion = new Version('1.30.0');
|
14725
14920
|
/**#@-*/
|
14726
14921
|
|
14727
14922
|
return monsterVersion;
|
@@ -14777,7 +14972,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14777
14972
|
*
|
14778
14973
|
* ```
|
14779
14974
|
* <script type="module">
|
14780
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14975
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
14781
14976
|
* new Monster.Util.Comparator()
|
14782
14977
|
* </script>
|
14783
14978
|
* ```
|
@@ -14786,7 +14981,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14786
14981
|
*
|
14787
14982
|
* ```
|
14788
14983
|
* <script type="module">
|
14789
|
-
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14984
|
+
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/util/comparator.js';
|
14790
14985
|
* console.log(new Comparator())
|
14791
14986
|
* </script>
|
14792
14987
|
* ```
|
@@ -14811,7 +15006,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14811
15006
|
*
|
14812
15007
|
* @example
|
14813
15008
|
*
|
14814
|
-
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
15009
|
+
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/util/comparator.js';
|
14815
15010
|
*
|
14816
15011
|
* console.log(new Comparator().lessThanOrEqual(2, 5))
|
14817
15012
|
* // ↦ true
|
@@ -15024,7 +15219,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
15024
15219
|
*
|
15025
15220
|
* ```
|
15026
15221
|
* <script type="module">
|
15027
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
15222
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
|
15028
15223
|
* Monster.Util.deepFreeze({})
|
15029
15224
|
* </script>
|
15030
15225
|
* ```
|
@@ -15033,7 +15228,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
15033
15228
|
*
|
15034
15229
|
* ```
|
15035
15230
|
* <script type="module">
|
15036
|
-
* import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
15231
|
+
* import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/util/freeze.js';
|
15037
15232
|
* deepFreeze({})
|
15038
15233
|
* </script>
|
15039
15234
|
* ```
|