@schukai/monster 2.0.3 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +4 -4
- package/example/dom/customelement.mjs +1 -0
- package/package.json +1 -1
- package/source/monster.mjs +176 -85
- package/source/types/version.mjs +1 -1
- package/test/cases/monster.mjs +1 -1
package/README.md
CHANGED
@@ -72,10 +72,10 @@ We do try to work around some browser bugs, but on the whole we don't use polyfi
|
|
72
72
|
|
73
73
|
However, many functions can be mapped via [polyfill.io](https://polyfill.io/) and thus the compatibility can be increased.
|
74
74
|
|
75
|
-
```
|
76
|
-
|
77
|
-
|
78
|
-
|
75
|
+
```html
|
76
|
+
<script id="polyfill" src="https://polyfill.io/v3/polyfill.min.js?feat"
|
77
|
+
crossorigin="anonymous"
|
78
|
+
referrerpolicy="no-referrer"></script>
|
79
79
|
```
|
80
80
|
|
81
81
|
## Questions
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import {CustomElement} from '@schukai/monster/source/dom/CustomElement';
|
1
2
|
// In the example the user can use his own template by creating a template in the DOM with the ID `my-custom-element`.
|
2
3
|
// You can also specify a theme (for example `mytheme`), then it will search for the ID `my-custom-element-mytheme` and
|
3
4
|
// if not available for the ID `my-custom-element`.
|
package/package.json
CHANGED
package/source/monster.mjs
CHANGED
@@ -8,96 +8,187 @@
|
|
8
8
|
|
9
9
|
/**
|
10
10
|
* Main namespace for Monster.
|
11
|
-
*
|
11
|
+
*
|
12
12
|
* @namespace Monster
|
13
13
|
* @author schukai GmbH
|
14
14
|
*/
|
15
15
|
|
16
|
+
// development/script/grep-exports.cjs
|
17
|
+
export {IsObject} from "./constraints/isobject.mjs"
|
18
|
+
export {Invalid} from "./constraints/invalid.mjs"
|
19
|
+
export {AndOperator} from "./constraints/andoperator.mjs"
|
20
|
+
export {OrOperator} from "./constraints/oroperator.mjs"
|
21
|
+
export {AbstractConstraint} from "./constraints/abstract.mjs"
|
22
|
+
export {IsArray} from "./constraints/isarray.mjs"
|
23
|
+
export {AbstractOperator} from "./constraints/abstractoperator.mjs"
|
24
|
+
export {Valid} from "./constraints/valid.mjs"
|
25
|
+
export {Logger, ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF} from "./logging/logger.mjs"
|
26
|
+
export {LogEntry} from "./logging/logentry.mjs"
|
27
|
+
export {ConsoleHandler} from "./logging/handler/console.mjs"
|
28
|
+
export {Handler} from "./logging/handler.mjs"
|
29
|
+
export {Formatter} from "./text/formatter.mjs"
|
30
|
+
export {Stylesheet} from "./dom/resource/link/stylesheet.mjs"
|
31
|
+
export {Data} from "./dom/resource/data.mjs"
|
32
|
+
export {Link} from "./dom/resource/link.mjs"
|
33
|
+
export {Script} from "./dom/resource/script.mjs"
|
34
|
+
export {Updater} from "./dom/updater.mjs"
|
35
|
+
export {CustomControl} from "./dom/customcontrol.mjs"
|
36
|
+
export {getLocaleOfDocument} from "./dom/locale.mjs"
|
37
|
+
export {Theme, getDocumentTheme} from "./dom/theme.mjs"
|
38
|
+
export {Resource, KEY_DOCUMENT, KEY_QUERY, referenceSymbol} from "./dom/resource.mjs"
|
39
|
+
export {ResourceManager} from "./dom/resourcemanager.mjs"
|
40
|
+
export {getDocument, getWindow, getDocumentFragmentFromString} from "./dom/util.mjs"
|
41
|
+
export {
|
42
|
+
DEFAULT_THEME,
|
43
|
+
ATTRIBUTE_PREFIX,
|
44
|
+
ATTRIBUTE_OPTIONS,
|
45
|
+
ATTRIBUTE_OPTIONS_SELECTOR,
|
46
|
+
ATTRIBUTE_THEME_PREFIX,
|
47
|
+
ATTRIBUTE_THEME_NAME,
|
48
|
+
ATTRIBUTE_UPDATER_ATTRIBUTES,
|
49
|
+
ATTRIBUTE_UPDATER_SELECT_THIS,
|
50
|
+
ATTRIBUTE_UPDATER_REPLACE,
|
51
|
+
ATTRIBUTE_UPDATER_INSERT,
|
52
|
+
ATTRIBUTE_UPDATER_INSERT_REFERENCE,
|
53
|
+
ATTRIBUTE_UPDATER_REMOVE,
|
54
|
+
ATTRIBUTE_UPDATER_BIND,
|
55
|
+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20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
95
|
+
} from "./dom/constants.mjs"
|
96
|
+
export {
|
97
|
+
CustomElement,
|
98
|
+
initMethodSymbol,
|
99
|
+
assembleMethodSymbol,
|
100
|
+
attributeObserverSymbol,
|
101
|
+
registerCustomElement,
|
102
|
+
assignUpdaterToElement,
|
103
|
+
getSlottedElements
|
104
|
+
} from "./dom/customelement.mjs"
|
105
|
+
export {
|
106
|
+
findClosestObjectLink,
|
107
|
+
addToObjectLink,
|
108
|
+
removeObjectLink,
|
109
|
+
hasObjectLink,
|
110
|
+
getLinkedObjects,
|
111
|
+
toggleAttributeToken,
|
112
|
+
addAttributeToken,
|
113
|
+
removeAttributeToken,
|
114
|
+
containsAttributeToken,
|
115
|
+
replaceAttributeToken,
|
116
|
+
clearAttributeTokens,
|
117
|
+
findClosestByAttribute,
|
118
|
+
findClosestByClass
|
119
|
+
} from "./dom/attributes.mjs"
|
120
|
+
export {fireEvent, fireCustomEvent, findTargetElementFromEvent} from "./dom/events.mjs"
|
121
|
+
export {Factory} from "./dom/worker/factory.mjs"
|
122
|
+
export {Template} from "./dom/template.mjs"
|
123
|
+
export {domReady, windowReady} from "./dom/ready.mjs"
|
124
|
+
export {FocusManager} from "./dom/focusmanager.mjs"
|
125
|
+
export {ATTRIBUTEPREFIX, Assembler} from "./dom/assembler.mjs"
|
126
|
+
export {Translations} from "./i18n/translations.mjs"
|
127
|
+
export {Locale, parseLocale} from "./i18n/locale.mjs"
|
128
|
+
export {Formatter as I18nFormatter} from "./i18n/formatter.mjs"
|
129
|
+
export {Fetch} from "./i18n/providers/fetch.mjs"
|
130
|
+
export {Provider} from "./i18n/provider.mjs"
|
131
|
+
export {
|
132
|
+
internalSymbol,
|
133
|
+
internalStateSymbol
|
134
|
+
} from "./constants.mjs"
|
135
|
+
export {MediaType, parseMediaType} from "./types/mediatype.mjs"
|
136
|
+
export {typeOf} from "./types/typeof.mjs"
|
137
|
+
export {ObserverList} from "./types/observerlist.mjs"
|
138
|
+
export {RandomID} from "./types/randomid.mjs"
|
139
|
+
export {UUID} from "./types/uuid.mjs"
|
140
|
+
export {Observer} from "./types/observer.mjs"
|
141
|
+
export {TokenList} from "./types/tokenlist.mjs"
|
142
|
+
export {Queue} from "./types/queue.mjs"
|
143
|
+
export {Stack} from "./types/stack.mjs"
|
144
|
+
export {toBinary, fromBinary} from "./types/binary.mjs"
|
145
|
+
export {BaseWithOptions} from "./types/basewithoptions.mjs"
|
146
|
+
export {escapeString} from "./types/regex.mjs"
|
147
|
+
export {ProxyObserver} from "./types/proxyobserver.mjs"
|
148
|
+
export {NodeList} from "./types/nodelist.mjs"
|
149
|
+
export {Version, getMonsterVersion} from "./types/version.mjs"
|
150
|
+
export {Node} from "./types/node.mjs"
|
151
|
+
export {NodeRecursiveIterator} from "./types/noderecursiveiterator.mjs"
|
152
|
+
export {getGlobal, getGlobalObject, getGlobalFunction} from "./types/global.mjs"
|
153
|
+
export {DataUrl, parseDataURL} from "./types/dataurl.mjs"
|
154
|
+
export {
|
155
|
+
validateIterable,
|
156
|
+
validatePrimitive,
|
157
|
+
validateBoolean,
|
158
|
+
validateString,
|
159
|
+
validateObject,
|
160
|
+
validateInstance,
|
161
|
+
validateArray,
|
162
|
+
validateSymbol,
|
163
|
+
validateFunction,
|
164
|
+
validateInteger
|
165
|
+
} from "./types/validate.mjs"
|
166
|
+
export {UniqueQueue} from "./types/uniquequeue.mjs"
|
167
|
+
export {Base} from "./types/base.mjs"
|
168
|
+
export {
|
169
|
+
isIterable, isPrimitive, isSymbol, isBoolean, isString, isObject, isInstance, isArray, isFunction, isInteger
|
170
|
+
} from "./types/is.mjs"
|
171
|
+
export {ID} from "./types/id.mjs"
|
172
|
+
export {trimSpaces} from "./util/trimspaces.mjs"
|
173
|
+
export {DeadMansSwitch} from "./util/deadmansswitch.mjs"
|
174
|
+
export {deepFreeze} from "./util/freeze.mjs"
|
175
|
+
export {Comparator} from "./util/comparator.mjs"
|
176
|
+
export {clone} from "./util/clone.mjs"
|
177
|
+
export {Processing} from "./util/processing.mjs"
|
178
|
+
export {extend} from "./data/extend.mjs"
|
179
|
+
export {Pipe} from "./data/pipe.mjs"
|
180
|
+
export {buildMap, PARENT, assembleParts} from "./data/buildmap.mjs"
|
181
|
+
export {Datasource} from "./data/datasource.mjs"
|
182
|
+
export {buildTree} from "./data/buildtree.mjs"
|
183
|
+
export {Transformer} from "./data/transformer.mjs"
|
184
|
+
export {Pathfinder, DELIMITER, WILDCARD} from "./data/pathfinder.mjs"
|
185
|
+
export {diff} from "./data/diff.mjs"
|
186
|
+
export {RestAPI} from "./data/datasource/restapi.mjs"
|
187
|
+
export {SessionStorage} from "./data/datasource/storage/sessionstorage.mjs"
|
188
|
+
export {LocalStorage} from "./data/datasource/storage/localstorage.mjs"
|
189
|
+
export {WriteError} from "./data/datasource/restapi/writeerror.mjs"
|
190
|
+
export {Storage, storageObjectSymbol} from "./data/datasource/storage.mjs"
|
191
|
+
export {random} from "./math/random.mjs"
|
101
192
|
|
102
193
|
export {Monster}
|
103
194
|
|
package/source/types/version.mjs
CHANGED
package/test/cases/monster.mjs
CHANGED