@schukai/monster 1.15.0 → 1.15.2
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG +6 -0
- package/README.md +5 -5
- package/dist/modules/constants.js +1 -1
- package/dist/modules/constraints/abstract.js +2 -2
- package/dist/modules/constraints/abstractoperator.js +2 -2
- package/dist/modules/constraints/andoperator.js +2 -2
- package/dist/modules/constraints/invalid.js +2 -2
- package/dist/modules/constraints/isarray.js +2 -2
- package/dist/modules/constraints/isobject.js +2 -2
- package/dist/modules/constraints/namespace.js +1 -1
- package/dist/modules/constraints/oroperator.js +2 -2
- package/dist/modules/constraints/valid.js +2 -2
- package/dist/modules/data/buildmap.js +2 -2
- package/dist/modules/data/diff.js +2 -2
- package/dist/modules/data/extend.js +2 -2
- package/dist/modules/data/namespace.js +1 -1
- package/dist/modules/data/pathfinder.js +2 -2
- package/dist/modules/data/pipe.js +2 -2
- package/dist/modules/data/transformer.js +2 -2
- package/dist/modules/dom/assembler.js +2 -2
- package/dist/modules/dom/attributes.js +2 -2
- package/dist/modules/dom/constants.js +2 -2
- package/dist/modules/dom/customcontrol.js +2 -2
- package/dist/modules/dom/customelement.js +2 -2
- package/dist/modules/dom/events.js +2 -2
- package/dist/modules/dom/locale.js +2 -2
- package/dist/modules/dom/namespace.js +1 -1
- package/dist/modules/dom/template.js +2 -2
- package/dist/modules/dom/theme.js +2 -2
- package/dist/modules/dom/updater.js +2 -2
- package/dist/modules/dom/util.js +2 -2
- package/dist/modules/i18n/locale.js +2 -2
- package/dist/modules/i18n/namespace.js +1 -1
- package/dist/modules/i18n/provider.js +2 -2
- package/dist/modules/i18n/providers/fetch.js +2 -2
- package/dist/modules/i18n/providers/namespace.js +1 -1
- package/dist/modules/i18n/translations.js +2 -2
- package/dist/modules/logging/handler/console.js +2 -2
- package/dist/modules/logging/handler/namespace.js +1 -1
- package/dist/modules/logging/handler.js +2 -2
- package/dist/modules/logging/logentry.js +2 -2
- package/dist/modules/logging/logger.js +2 -2
- 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 +2 -2
- package/dist/modules/namespace.js +2 -2
- package/dist/modules/text/formatter.js +2 -2
- package/dist/modules/text/namespace.js +1 -1
- package/dist/modules/types/base.js +2 -2
- package/dist/modules/types/basewithoptions.js +2 -2
- package/dist/modules/types/global.js +2 -2
- package/dist/modules/types/id.js +2 -2
- package/dist/modules/types/is.js +2 -2
- package/dist/modules/types/namespace.js +1 -1
- package/dist/modules/types/observer.js +2 -2
- package/dist/modules/types/observerlist.js +2 -2
- package/dist/modules/types/proxyobserver.js +2 -2
- package/dist/modules/types/queue.js +2 -2
- package/dist/modules/types/randomid.js +2 -2
- package/dist/modules/types/stack.js +2 -2
- package/dist/modules/types/tokenlist.js +2 -2
- package/dist/modules/types/typeof.js +2 -2
- package/dist/modules/types/uniquequeue.js +2 -2
- package/dist/modules/types/validate.js +2 -2
- package/dist/modules/types/version.js +2 -2
- package/dist/modules/util/clone.js +2 -2
- package/dist/modules/util/comparator.js +2 -2
- package/dist/modules/util/freeze.js +2 -2
- package/dist/modules/util/namespace.js +1 -1
- package/dist/monster.dev.js +7321 -7322
- package/dist/monster.dev.js.map +1 -1
- package/dist/monster.js +2 -9
- package/package.json +1 -1
- package/source/constraints/abstract.js +1 -1
- package/source/constraints/abstractoperator.js +2 -2
- package/source/constraints/andoperator.js +7 -7
- package/source/constraints/invalid.js +4 -4
- package/source/constraints/isarray.js +6 -6
- package/source/constraints/isobject.js +6 -6
- package/source/constraints/namespace.js +2 -2
- package/source/constraints/oroperator.js +7 -7
- package/source/constraints/valid.js +6 -6
- package/source/data/buildmap.js +3 -3
- package/source/data/diff.js +8 -8
- package/source/data/extend.js +6 -6
- package/source/data/namespace.js +2 -2
- package/source/data/pathfinder.js +12 -12
- package/source/data/pipe.js +7 -7
- package/source/data/transformer.js +9 -9
- package/source/dom/assembler.js +6 -6
- package/source/dom/attributes.js +26 -27
- package/source/dom/constants.js +1 -1
- package/source/dom/customcontrol.js +80 -82
- package/source/dom/customelement.js +87 -87
- package/source/dom/events.js +7 -7
- package/source/dom/locale.js +4 -4
- package/source/dom/namespace.js +2 -2
- package/source/dom/template.js +23 -18
- package/source/dom/theme.js +7 -8
- package/source/dom/updater.js +18 -23
- package/source/dom/util.js +10 -10
- package/source/i18n/locale.js +5 -5
- package/source/i18n/namespace.js +1 -1
- package/source/i18n/provider.js +4 -4
- package/source/i18n/providers/fetch.js +7 -7
- package/source/i18n/translations.js +4 -4
- package/source/logging/handler/console.js +4 -4
- package/source/logging/handler/namespace.js +1 -1
- package/source/logging/handler.js +7 -7
- package/source/logging/logentry.js +4 -4
- package/source/logging/logger.js +4 -4
- package/source/logging/namespace.js +2 -2
- package/source/math/namespace.js +2 -2
- package/source/math/random.js +4 -4
- package/source/monster.js +42 -44
- package/source/namespace.js +2 -2
- package/source/text/formatter.js +5 -5
- package/source/text/namespace.js +1 -1
- package/source/types/base.js +3 -3
- package/source/types/basewithoptions.js +7 -7
- package/source/types/global.js +6 -6
- package/source/types/id.js +5 -5
- package/source/types/is.js +21 -21
- package/source/types/namespace.js +2 -2
- package/source/types/observer.js +6 -6
- package/source/types/observerlist.js +3 -3
- package/source/types/proxyobserver.js +21 -21
- package/source/types/queue.js +4 -4
- package/source/types/randomid.js +5 -5
- package/source/types/stack.js +3 -3
- package/source/types/tokenlist.js +8 -8
- package/source/types/typeof.js +4 -4
- package/source/types/uniquequeue.js +7 -7
- package/source/types/validate.js +26 -26
- package/source/types/version.js +7 -7
- package/source/util/clone.js +5 -5
- package/source/util/comparator.js +6 -6
- package/source/util/freeze.js +6 -6
- package/source/util/namespace.js +2 -2
- package/test/cases/dom/template.js +40 -1
- package/test/cases/monster.js +1 -1
- package/test/web/monster-dev.html +3 -3
- package/test/web/monster.html +2 -2
- package/test/web/test.html +3 -3
- package/test/web/tests.js +2 -2
package/source/i18n/locale.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
/**
|
4
4
|
* @author schukai GmbH
|
5
5
|
*/
|
6
|
-
import {
|
6
|
+
import {assignToNamespace, Monster} from '../namespace.js';
|
7
7
|
import {Base} from "../types/base.js";
|
8
8
|
import {validateString} from "../types/validate.js";
|
9
9
|
import {clone} from "../util/clone.js";
|
@@ -23,7 +23,7 @@ const localeStringSymbol = Symbol('localeString');
|
|
23
23
|
*
|
24
24
|
* ```
|
25
25
|
* <script type="module">
|
26
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
26
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/locale.js';
|
27
27
|
* console.log(new Monster.I18n.Locale())
|
28
28
|
* </script>
|
29
29
|
* ```
|
@@ -32,7 +32,7 @@ const localeStringSymbol = Symbol('localeString');
|
|
32
32
|
*
|
33
33
|
* ```
|
34
34
|
* <script type="module">
|
35
|
-
* import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
35
|
+
* import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/locale.js';
|
36
36
|
* console.log(new Locale())
|
37
37
|
* </script>
|
38
38
|
* ```
|
@@ -189,7 +189,7 @@ class Locale extends Base {
|
|
189
189
|
*
|
190
190
|
* ```
|
191
191
|
* <script type="module">
|
192
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
192
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/locale.js';
|
193
193
|
* console.log(new Monster.I18n.createLocale())
|
194
194
|
* </script>
|
195
195
|
* ```
|
@@ -198,7 +198,7 @@ class Locale extends Base {
|
|
198
198
|
*
|
199
199
|
* ```
|
200
200
|
* <script type="module">
|
201
|
-
* import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
201
|
+
* import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/locale.js';
|
202
202
|
* console.log(createLocale())
|
203
203
|
* </script>
|
204
204
|
* ```
|
package/source/i18n/namespace.js
CHANGED
package/source/i18n/provider.js
CHANGED
@@ -3,19 +3,19 @@
|
|
3
3
|
/**
|
4
4
|
* @author schukai GmbH
|
5
5
|
*/
|
6
|
-
import {
|
6
|
+
import {assignToNamespace, Monster} from '../namespace.js';
|
7
7
|
import {BaseWithOptions} from "../types/basewithoptions.js";
|
8
8
|
import {Locale} from "./locale.js"
|
9
9
|
import {Translations} from "./translations.js"
|
10
10
|
|
11
11
|
/**
|
12
12
|
* A provider makes a translation object available.
|
13
|
-
*
|
13
|
+
*
|
14
14
|
* You can call the method via the monster namespace `new Monster.I18n.Provider()`.
|
15
15
|
*
|
16
16
|
* ```
|
17
17
|
* <script type="module">
|
18
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
18
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/provider.js';
|
19
19
|
* console.log(new Monster.I18n.Provider())
|
20
20
|
* </script>
|
21
21
|
* ```
|
@@ -24,7 +24,7 @@ import {Translations} from "./translations.js"
|
|
24
24
|
*
|
25
25
|
* ```
|
26
26
|
* <script type="module">
|
27
|
-
* import {Provider} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
27
|
+
* import {Provider} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/provider.js';
|
28
28
|
* console.log(new Provider())
|
29
29
|
* </script>
|
30
30
|
* ```
|
@@ -1,18 +1,18 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
+
import {PROPERTY_KEY_INTERNALDATA} from "../../constants.js";
|
4
|
+
import {extend} from "../../data/extend.js";
|
3
5
|
/**
|
4
6
|
* @author schukai GmbH
|
5
7
|
*/
|
6
|
-
import {
|
8
|
+
import {assignToNamespace, Monster} from '../../namespace.js';
|
7
9
|
import {Formatter} from "../../text/formatter.js";
|
8
10
|
import {getGlobalFunction} from "../../types/global.js";
|
9
|
-
import {
|
10
|
-
import {
|
11
|
+
import {isInstance, isString} from "../../types/is.js";
|
12
|
+
import {validateObject, validateString} from "../../types/validate.js";
|
11
13
|
import {parseLocale} from "../locale.js";
|
12
14
|
import {Provider} from "../provider.js";
|
13
|
-
import {PROPERTY_KEY_INTERNALDATA} from "../../constants.js";
|
14
15
|
import {Translations} from "../translations.js";
|
15
|
-
import {extend} from "../../data/extend.js";
|
16
16
|
|
17
17
|
/**
|
18
18
|
* @private
|
@@ -27,7 +27,7 @@ const optionsSymbol = Symbol.for(PROPERTY_KEY_INTERNALDATA);
|
|
27
27
|
*
|
28
28
|
* ```
|
29
29
|
* <script type="module">
|
30
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
30
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/providers/fetch.js';
|
31
31
|
* console.log(new Monster.I18n.Providers.Fetch())
|
32
32
|
* </script>
|
33
33
|
* ```
|
@@ -36,7 +36,7 @@ const optionsSymbol = Symbol.for(PROPERTY_KEY_INTERNALDATA);
|
|
36
36
|
*
|
37
37
|
* ```
|
38
38
|
* <script type="module">
|
39
|
-
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
39
|
+
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/providers/fetch.js';
|
40
40
|
* console.log(new Fetch())
|
41
41
|
* </script>
|
42
42
|
* ```
|
@@ -3,8 +3,8 @@
|
|
3
3
|
/**
|
4
4
|
* @author schukai GmbH
|
5
5
|
*/
|
6
|
-
import {
|
7
|
-
import {
|
6
|
+
import {assignToNamespace, Monster} from '../namespace.js';
|
7
|
+
import {Base} from "../types/base.js";
|
8
8
|
import {isObject, isString} from "../types/is.js";
|
9
9
|
import {validateInstance, validateInteger, validateObject, validateString} from "../types/validate.js";
|
10
10
|
import {Locale, parseLocale} from "./locale.js";
|
@@ -17,7 +17,7 @@ import {Locale, parseLocale} from "./locale.js";
|
|
17
17
|
*
|
18
18
|
* ```
|
19
19
|
* <script type="module">
|
20
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
20
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/translations.js';
|
21
21
|
* console.log(new Monster.I18n.Translations())
|
22
22
|
* </script>
|
23
23
|
* ```
|
@@ -26,7 +26,7 @@ import {Locale, parseLocale} from "./locale.js";
|
|
26
26
|
*
|
27
27
|
* ```
|
28
28
|
* <script type="module">
|
29
|
-
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
29
|
+
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/translations.js';
|
30
30
|
* console.log(new Translations())
|
31
31
|
* </script>
|
32
32
|
* ```
|
@@ -4,16 +4,16 @@
|
|
4
4
|
* @author schukai GmbH
|
5
5
|
*/
|
6
6
|
|
7
|
-
import {Monster, assignToNamespace} from '../namespace.js';
|
8
|
-
import {Base} from '../../types/base.js';
|
9
7
|
import {Handler} from '../../logging/handler.js';
|
8
|
+
import {Base} from '../../types/base.js';
|
9
|
+
import {assignToNamespace, Monster} from '../namespace.js';
|
10
10
|
|
11
11
|
/**
|
12
12
|
* you can call the method via the monster namespace `new Monster.Logging.Handler.ConsoleHandler()`.
|
13
13
|
*
|
14
14
|
* ```
|
15
15
|
* <script type="module">
|
16
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
16
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/handler/console.js';
|
17
17
|
* console.log(new Monster.Logging.Handler.ConsoleHandler())
|
18
18
|
* </script>
|
19
19
|
* ```
|
@@ -22,7 +22,7 @@ import {Handler} from '../../logging/handler.js';
|
|
22
22
|
*
|
23
23
|
* ```
|
24
24
|
* <script type="module">
|
25
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
25
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/handler/console.js';
|
26
26
|
* console.log(new ConsoleHandler())
|
27
27
|
* </script>
|
28
28
|
* ```
|
@@ -4,18 +4,18 @@
|
|
4
4
|
* @author schukai GmbH
|
5
5
|
*/
|
6
6
|
|
7
|
-
import {
|
7
|
+
import {assignToNamespace, Monster} from '../namespace.js';
|
8
8
|
import {Base} from '../types/base.js';
|
9
|
-
import {ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN} from "./logger.js";
|
10
|
-
import {LogEntry} from "./logentry.js";
|
11
9
|
import {validateInstance, validateInteger} from "../types/validate.js";
|
10
|
+
import {LogEntry} from "./logentry.js";
|
11
|
+
import {ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN} from "./logger.js";
|
12
12
|
|
13
13
|
/**
|
14
14
|
* you can call the method via the monster namespace `new Monster.Logging.Handler()`.
|
15
15
|
*
|
16
16
|
* ```
|
17
17
|
* <script type="module">
|
18
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
18
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/handler.js';
|
19
19
|
* console.log(new Monster.Logging.Handler())
|
20
20
|
* </script>
|
21
21
|
* ```
|
@@ -24,7 +24,7 @@ import {validateInstance, validateInteger} from "../types/validate.js";
|
|
24
24
|
*
|
25
25
|
* ```
|
26
26
|
* <script type="module">
|
27
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
27
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/handler.js';
|
28
28
|
* console.log(new Handler())
|
29
29
|
* </script>
|
30
30
|
* ```
|
@@ -39,8 +39,8 @@ class Handler extends Base {
|
|
39
39
|
|
40
40
|
/**
|
41
41
|
* Loglevel
|
42
|
-
*
|
43
|
-
* @type {integer}
|
42
|
+
*
|
43
|
+
* @type {integer}
|
44
44
|
*/
|
45
45
|
this.loglevel = OFF;
|
46
46
|
}
|
@@ -4,9 +4,9 @@
|
|
4
4
|
* @author schukai GmbH
|
5
5
|
*/
|
6
6
|
|
7
|
-
import {
|
7
|
+
import {assignToNamespace, Monster} from '../namespace.js';
|
8
|
+
import {Base} from '../types/base.js';
|
8
9
|
import {validateInteger} from '../types/validate.js';
|
9
|
-
import {Base} from '../types/base.js';
|
10
10
|
|
11
11
|
|
12
12
|
/**
|
@@ -14,7 +14,7 @@ import {Base} from '../types/base.js';
|
|
14
14
|
*
|
15
15
|
* ```
|
16
16
|
* <script type="module">
|
17
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
17
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/logentry.js';
|
18
18
|
* console.log(new Monster.Logging.LogEntry())
|
19
19
|
* </script>
|
20
20
|
* ```
|
@@ -23,7 +23,7 @@ import {Base} from '../types/base.js';
|
|
23
23
|
*
|
24
24
|
* ```
|
25
25
|
* <script type="module">
|
26
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
26
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/logentry.js';
|
27
27
|
* console.log(new LogEntry())
|
28
28
|
* </script>
|
29
29
|
* ```
|
package/source/logging/logger.js
CHANGED
@@ -4,11 +4,11 @@
|
|
4
4
|
* @author schukai GmbH
|
5
5
|
*/
|
6
6
|
|
7
|
-
import {Monster, assignToNamespace} from '../namespace.js';
|
8
|
-
import {validateInteger, validateObject, validateString} from '../types/validate.js';
|
9
7
|
import {Handler} from '../logging/handler.js';
|
10
8
|
import {LogEntry} from '../logging/logentry.js';
|
9
|
+
import {assignToNamespace, Monster} from '../namespace.js';
|
11
10
|
import {Base} from '../types/base.js';
|
11
|
+
import {validateInteger, validateObject, validateString} from '../types/validate.js';
|
12
12
|
|
13
13
|
|
14
14
|
/**
|
@@ -65,7 +65,7 @@ const OFF = 0;
|
|
65
65
|
*
|
66
66
|
* ```
|
67
67
|
* <script type="module">
|
68
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
68
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/logger.js';
|
69
69
|
* console.log(new Monster.Logging.Logger())
|
70
70
|
* </script>
|
71
71
|
* ```
|
@@ -74,7 +74,7 @@ const OFF = 0;
|
|
74
74
|
*
|
75
75
|
* ```
|
76
76
|
* <script type="module">
|
77
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
77
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/logger.js';
|
78
78
|
* console.log(new Logger())
|
79
79
|
* </script>
|
80
80
|
* ```
|
package/source/math/namespace.js
CHANGED
package/source/math/random.js
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
* @author schukai GmbH
|
5
5
|
*/
|
6
6
|
|
7
|
-
import {
|
8
|
-
import {
|
7
|
+
import {assignToNamespace, Monster} from '../namespace.js';
|
8
|
+
import {getGlobal} from '../types/global.js';
|
9
9
|
|
10
10
|
|
11
11
|
/**
|
@@ -15,7 +15,7 @@ import { getGlobal} from '../types/global.js';
|
|
15
15
|
*
|
16
16
|
* ```
|
17
17
|
* <script type="module">
|
18
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
18
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/math/random.js';
|
19
19
|
* console.log(Monster.Math.random(1,10)) // ↦ 5
|
20
20
|
* </script>
|
21
21
|
* ```
|
@@ -24,7 +24,7 @@ import { getGlobal} from '../types/global.js';
|
|
24
24
|
*
|
25
25
|
* ```
|
26
26
|
* <script type="module">
|
27
|
-
* import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
27
|
+
* import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/math/random.js';
|
28
28
|
* console.log(random(1,10)) // ↦ 5
|
29
29
|
* </script>
|
30
30
|
* ```
|
package/source/monster.js
CHANGED
@@ -7,67 +7,65 @@
|
|
7
7
|
|
8
8
|
'use strict';
|
9
9
|
|
10
|
-
import
|
11
|
-
|
12
|
-
// find . -type f -name "*.js" -not -name "*namespace*" -not -iname "monster.js"
|
13
|
-
|
14
|
-
import './constraints/isobject.js';
|
15
|
-
import './constraints/valid.js';
|
16
|
-
import './constraints/invalid.js';
|
10
|
+
import './constants.js';
|
11
|
+
import './constraints/abstract.js';
|
17
12
|
import './constraints/abstractoperator.js';
|
18
|
-
import './constraints/oroperator.js';
|
19
13
|
import './constraints/andoperator.js';
|
20
|
-
import './constraints/
|
14
|
+
import './constraints/invalid.js';
|
21
15
|
import './constraints/isarray.js';
|
22
|
-
|
23
|
-
|
24
|
-
import './
|
25
|
-
import './
|
26
|
-
import './
|
27
|
-
import './
|
16
|
+
|
17
|
+
// find packages/monster/source/ -type f -name "*.js" -not -name "*namespace*" -not -iname "monster.js"
|
18
|
+
import './constraints/isobject.js';
|
19
|
+
import './constraints/oroperator.js';
|
20
|
+
import './constraints/valid.js';
|
21
|
+
import './data/buildmap.js';
|
22
|
+
import './data/diff.js';
|
23
|
+
import './data/extend.js';
|
24
|
+
import './data/pathfinder.js';
|
25
|
+
import './data/pipe.js';
|
26
|
+
import './data/transformer.js';
|
27
|
+
import './dom/assembler.js';
|
28
28
|
import './dom/attributes.js';
|
29
|
-
import './dom/template.js';
|
30
|
-
import './dom/util.js';
|
31
|
-
import './dom/locale.js';
|
32
|
-
import './dom/customcontrol.js';
|
33
29
|
import './dom/constants.js';
|
34
|
-
import './dom/
|
35
|
-
import './dom/theme.js';
|
36
|
-
import './dom/events.js';
|
30
|
+
import './dom/customcontrol.js';
|
37
31
|
import './dom/customelement.js';
|
38
|
-
import './
|
39
|
-
import './
|
32
|
+
import './dom/events.js';
|
33
|
+
import './dom/locale.js';
|
34
|
+
import './dom/template.js';
|
35
|
+
import './dom/theme.js';
|
36
|
+
import './dom/updater.js';
|
37
|
+
import './dom/util.js';
|
40
38
|
import './i18n/locale.js';
|
41
39
|
import './i18n/provider.js';
|
42
|
-
import './
|
43
|
-
import './
|
44
|
-
import './
|
45
|
-
import './
|
40
|
+
import './i18n/providers/fetch.js';
|
41
|
+
import './i18n/translations.js';
|
42
|
+
import './logging/handler.js';
|
43
|
+
import './logging/handler/console.js';
|
44
|
+
import './logging/logentry.js';
|
45
|
+
import './logging/logger.js';
|
46
|
+
import './math/random.js';
|
47
|
+
import {Monster} from './namespace.js';
|
48
|
+
import './text/formatter.js';
|
49
|
+
import './types/base.js';
|
46
50
|
import './types/basewithoptions.js';
|
51
|
+
import './types/global.js';
|
52
|
+
import './types/id.js';
|
47
53
|
import './types/is.js';
|
54
|
+
import './types/observer.js';
|
55
|
+
import './types/observerlist.js';
|
48
56
|
import './types/proxyobserver.js';
|
49
|
-
import './types/
|
57
|
+
import './types/queue.js';
|
58
|
+
import './types/randomid.js';
|
59
|
+
import './types/stack.js';
|
50
60
|
import './types/tokenlist.js';
|
51
61
|
import './types/typeof.js';
|
52
|
-
import './types/
|
53
|
-
import './types/version.js';
|
54
|
-
import './types/id.js';
|
55
|
-
import './types/randomid.js';
|
62
|
+
import './types/uniquequeue.js';
|
56
63
|
import './types/validate.js';
|
57
|
-
import './types/
|
58
|
-
import './util/comparator.js';
|
64
|
+
import './types/version.js';
|
59
65
|
import './util/clone.js';
|
66
|
+
import './util/comparator.js';
|
60
67
|
import './util/freeze.js';
|
61
|
-
import './constants.js';
|
62
|
-
import './data/pathfinder.js';
|
63
|
-
import './data/pipe.js';
|
64
|
-
import './data/extend.js';
|
65
|
-
import './data/diff.js';
|
66
|
-
import './data/buildmap.js';
|
67
|
-
import './data/transformer.js';
|
68
|
-
import './math/random.js';
|
69
68
|
|
70
|
-
Monster.Util.deepFreeze(Monster);
|
71
69
|
|
72
70
|
let rootName
|
73
71
|
try {
|
package/source/namespace.js
CHANGED
@@ -65,7 +65,7 @@ export const Monster = new Namespace("Monster");
|
|
65
65
|
*
|
66
66
|
* ```
|
67
67
|
* <script type="module">
|
68
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
68
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/namespace.js';
|
69
69
|
* function hello() {
|
70
70
|
* console.log('Hello World!');
|
71
71
|
* }
|
@@ -166,5 +166,5 @@ function namespaceFor(parts) {
|
|
166
166
|
}
|
167
167
|
|
168
168
|
|
169
|
-
assignToNamespace('Monster', assignToNamespace);
|
169
|
+
assignToNamespace('Monster', assignToNamespace, Namespace);
|
170
170
|
export {assignToNamespace}
|
package/source/text/formatter.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
+
import {Pipe} from "../data/pipe.js";
|
3
4
|
/**
|
4
5
|
* @author schukai GmbH
|
5
6
|
*/
|
6
|
-
import {
|
7
|
-
import {Pipe} from "../data/pipe.js";
|
7
|
+
import {assignToNamespace, Monster} from '../namespace.js';
|
8
8
|
import {Base} from "../types/base.js";
|
9
9
|
import {validateObject, validateString} from "../types/validate.js";
|
10
10
|
|
@@ -18,7 +18,7 @@ import {validateObject, validateString} from "../types/validate.js";
|
|
18
18
|
*
|
19
19
|
* ```
|
20
20
|
* <script type="module">
|
21
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
21
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/text/formatter.js';
|
22
22
|
* console.log(new Monster.Text.Formatter())
|
23
23
|
* </script>
|
24
24
|
* ```
|
@@ -27,7 +27,7 @@ import {validateObject, validateString} from "../types/validate.js";
|
|
27
27
|
*
|
28
28
|
* ```
|
29
29
|
* <script type="module">
|
30
|
-
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
30
|
+
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/text/formatter.js';
|
31
31
|
* console.log(new Formatter())
|
32
32
|
* </script>
|
33
33
|
* ```
|
@@ -128,7 +128,7 @@ function tokenizer(text) {
|
|
128
128
|
text = text.substring(startIndex)
|
129
129
|
}
|
130
130
|
|
131
|
-
let endIndex = text.substring(self.openMarker.length).indexOf(self.closeMarker)+self.openMarker.length;
|
131
|
+
let endIndex = text.substring(self.openMarker.length).indexOf(self.closeMarker) + self.openMarker.length;
|
132
132
|
|
133
133
|
if (endIndex === -1) {
|
134
134
|
throw new Error("syntax error in formatter template")
|
package/source/text/namespace.js
CHANGED
package/source/types/base.js
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
* @author schukai GmbH
|
5
5
|
*/
|
6
6
|
|
7
|
-
import {
|
7
|
+
import {assignToNamespace, Monster} from '../namespace.js';
|
8
8
|
|
9
9
|
/**
|
10
10
|
* This is the base class from which all monster classes are derived.
|
@@ -13,7 +13,7 @@ import {Monster, assignToNamespace} from '../namespace.js';
|
|
13
13
|
*
|
14
14
|
* ```
|
15
15
|
* <script type="module">
|
16
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
16
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/base.js';
|
17
17
|
* console.log(new Monster.Types.Base())
|
18
18
|
* </script>
|
19
19
|
* ```
|
@@ -22,7 +22,7 @@ import {Monster, assignToNamespace} from '../namespace.js';
|
|
22
22
|
*
|
23
23
|
* ```
|
24
24
|
* <script type="module">
|
25
|
-
* import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
25
|
+
* import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/base.js';
|
26
26
|
* console.log(new Base())
|
27
27
|
* </script>
|
28
28
|
* ```
|
@@ -1,14 +1,14 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
+
import {PROPERTY_KEY_INTERNALDATA} from "../constants.js";
|
4
|
+
import {extend} from "../data/extend.js";
|
5
|
+
import {Pathfinder} from "../data/pathfinder.js";
|
3
6
|
/**
|
4
7
|
* @author schukai GmbH
|
5
8
|
*/
|
6
|
-
import {
|
7
|
-
import {Pathfinder} from "../data/pathfinder.js";
|
9
|
+
import {assignToNamespace, Monster} from '../namespace.js';
|
8
10
|
import {Base} from "./base.js";
|
9
11
|
import {validateObject} from "./validate.js";
|
10
|
-
import {PROPERTY_KEY_INTERNALDATA} from "../constants.js";
|
11
|
-
import {extend} from "../data/extend.js";
|
12
12
|
|
13
13
|
/**
|
14
14
|
* @private
|
@@ -23,7 +23,7 @@ const optionsSymbol = Symbol.for(PROPERTY_KEY_INTERNALDATA);
|
|
23
23
|
*
|
24
24
|
* ```
|
25
25
|
* <script type="module">
|
26
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
26
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/basewithoptions.js';
|
27
27
|
* console.log(new Monster.Types.BaseWithOptions())
|
28
28
|
* </script>
|
29
29
|
* ```
|
@@ -32,7 +32,7 @@ const optionsSymbol = Symbol.for(PROPERTY_KEY_INTERNALDATA);
|
|
32
32
|
*
|
33
33
|
* ```
|
34
34
|
* <script type="module">
|
35
|
-
* import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.
|
35
|
+
* import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/basewithoptions.js';
|
36
36
|
* console.log(new BaseWithOptions())
|
37
37
|
* </script>
|
38
38
|
* ```
|
@@ -62,7 +62,7 @@ class BaseWithOptions extends Base {
|
|
62
62
|
|
63
63
|
/**
|
64
64
|
* can be overridden by child class values
|
65
|
-
*
|
65
|
+
*
|
66
66
|
* @return {object}
|
67
67
|
*/
|
68
68
|
get defaults() {
|