@schukai/monster 2.0.2 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
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
- <script id="polyfill" src="https://polyfill.io/v3/polyfill.min.js?features=Array.from,Array.isArray,Array.prototype.entries,Array.prototype.fill,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.keys,Array.prototype.lastIndexOf,Array.prototype.map,Array.prototype.reduce,Array.prototype.sort,ArrayBuffer,atob,DataView,document,DocumentFragment,Element,Event,globalThis,HTMLDocument,HTMLTemplateElement,JSON,Map,Math.log2,Number.isInteger,Object.assign,Object.defineProperty,Object.entries,Object.getOwnPropertyDescriptor,Object.getPrototypeOf,Object.keys,Promise,Reflect,Reflect.defineProperty,Reflect.get,Reflect.getOwnPropertyDescriptor,Reflect.setPrototypeOf,Set,String.prototype.endsWith,String.prototype.matchAll,String.prototype.padStart,String.prototype.startsWith,String.prototype.trim,Symbol,Symbol.iterator,WeakMap,WeakSet"
77
- crossorigin="anonymous"
78
- referrerpolicy="no-referrer"></script>
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schukai/monster",
3
- "version": "2.0.2",
3
+ "version": "2.0.5",
4
4
  "description": "Monster is a simple library for creating fast, robust and lightweight websites.",
5
5
  "keywords": [
6
6
  "framework",
@@ -27,7 +27,7 @@ import {
27
27
  import {findDocumentTemplate, Template} from "./template.mjs";
28
28
  import {Updater} from "./updater.mjs";
29
29
 
30
- export {CustomElement, initMethodSymbol, assembleMethodSymbol, attributeObserverSymbol, registerCustomElement, assignUpdaterToElement}
30
+ export {CustomElement, initMethodSymbol, assembleMethodSymbol, attributeObserverSymbol, registerCustomElement, assignUpdaterToElement, getSlottedElements}
31
31
 
32
32
  /**
33
33
  * @memberOf Monster.DOM
@@ -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
+ ATTRIBUTE_TEMPLATE_PREFIX,
56
+ ATTRIBUTE_ROLE,
57
+ ATTRIBUTE_DISABLED,
58
+ ATTRIBUTE_VALUE,
59
+ ATTRIBUTE_OBJECTLINK,
60
+ ATTRIBUTE_ERRORMESSAGE,
61
+ TAG_SCRIPT,
62
+ TAG_STYLE,
63
+ TAG_LINK,
64
+ ATTRIBUTE_ID,
65
+ ATTRIBUTE_CLASS,
66
+ ATTRIBUTE_TITLE,
67
+ ATTRIBUTE_SRC,
68
+ ATTRIBUTE_HREF,
69
+ ATTRIBUTE_TYPE,
70
+ ATTRIBUTE_NONCE,
71
+ ATTRIBUTE_TRANSLATE,
72
+ ATTRIBUTE_TABINDEX,
73
+ ATTRIBUTE_SPELLCHECK,
74
+ ATTRIBUTE_SLOT,
75
+ ATTRIBUTE_PART,
76
+ ATTRIBUTE_LANG,
77
+ ATTRIBUTE_ITEMTYPE,
78
+ ATTRIBUTE_ITEMSCOPE,
79
+ ATTRIBUTE_ITEMREF,
80
+ ATTRIBUTE_ITEMID,
81
+ ATTRIBUTE_ITEMPROP,
82
+ ATTRIBUTE_IS,
83
+ ATTRIBUTE_INPUTMODE,
84
+ ATTRIBUTE_ACCESSKEY,
85
+ ATTRIBUTE_AUTOCAPITALIZE,
86
+ ATTRIBUTE_AUTOFOCUS,
87
+ ATTRIBUTE_CONTENTEDITABLE,
88
+ ATTRIBUTE_DIR,
89
+ ATTRIBUTE_DRAGGABLE,
90
+ ATTRIBUTE_ENTERKEYHINT,
91
+ ATTRIBUTE_EXPORTPARTS,
92
+ ATTRIBUTE_HIDDEN,
93
+ objectUpdaterLinkSymbol,
16
94
 
17
- import './constants.mjs';
18
- // find packages/monster/source/ -type f -name "*.mjs" -not -name "*namespace*" -not -iname "monster.mjs"
19
- import './constraints/isobject.mjs';
20
- import './constraints/valid.mjs';
21
- import './constraints/invalid.mjs';
22
- import './constraints/abstractoperator.mjs';
23
- import './constraints/oroperator.mjs';
24
- import './constraints/andoperator.mjs';
25
- import './constraints/abstract.mjs';
26
- import './constraints/isarray.mjs';
27
- import './logging/logger.mjs';
28
- import './logging/handler.mjs';
29
- import './logging/logentry.mjs';
30
- import './logging/handler/console.mjs';
31
- import './text/formatter.mjs';
32
- import './dom/resource/script.mjs';
33
- import './dom/resource/data.mjs';
34
- import './dom/resource/link/stylesheet.mjs';
35
- import './dom/resource/link.mjs';
36
- import './dom/resource.mjs';
37
- import './dom/updater.mjs';
38
- import './dom/attributes.mjs';
39
- import './dom/template.mjs';
40
- import './dom/util.mjs';
41
- import './dom/ready.mjs';
42
- import './dom/resourcemanager.mjs';
43
- import './dom/locale.mjs';
44
- import './dom/customcontrol.mjs';
45
- import './dom/constants.mjs';
46
- import './dom/assembler.mjs';
47
- import './dom/theme.mjs';
48
- import './dom/worker/factory.mjs';
49
- import './dom/focusmanager.mjs';
50
- import './dom/events.mjs';
51
- import './dom/customelement.mjs';
52
- import './i18n/formatter.mjs';
53
- import './i18n/providers/fetch.mjs';
54
- import './i18n/translations.mjs';
55
- import './i18n/locale.mjs';
56
- import './i18n/provider.mjs';
57
- import './types/queue.mjs';
58
- import './types/binary.mjs';
59
- import './types/regex.mjs';
60
- import './types/observer.mjs';
61
- import './types/observerlist.mjs';
62
- import './types/basewithoptions.mjs';
63
- import './types/is.mjs';
64
- import './types/proxyobserver.mjs';
65
- import './types/uniquequeue.mjs';
66
- import './types/node.mjs';
67
- import './types/tokenlist.mjs';
68
- import './types/typeof.mjs';
69
- import './types/uuid.mjs';
70
- import './types/mediatype.mjs';
71
- import './types/dataurl.mjs';
72
- import './types/base.mjs';
73
- import './types/version.mjs';
74
- import './types/nodelist.mjs';
75
- import './types/id.mjs';
76
- import './types/randomid.mjs';
77
- import './types/noderecursiveiterator.mjs';
78
- import './types/validate.mjs';
79
- import './types/stack.mjs';
80
- import './util/deadmansswitch.mjs';
81
- import './util/comparator.mjs';
82
- import './util/trimspaces.mjs';
83
- import './util/clone.mjs';
84
- import './util/freeze.mjs';
85
- import './util/processing.mjs';
86
- import './constants.mjs';
87
- import './data/pathfinder.mjs';
88
- import './data/pipe.mjs';
89
- import './data/extend.mjs';
90
- import './data/diff.mjs';
91
- import './data/buildmap.mjs';
92
- import './data/datasource.mjs';
93
- import './data/buildtree.mjs';
94
- import './data/transformer.mjs';
95
- import './data/datasource/storage.mjs';
96
- import './data/datasource/restapi.mjs';
97
- import './data/datasource/storage/sessionstorage.mjs';
98
- import './data/datasource/storage/localstorage.mjs';
99
- import './data/datasource/restapi/writeerror.mjs';
100
- import './math/random.mjs';
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 {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
 
@@ -137,7 +137,7 @@ function getMonsterVersion() {
137
137
  }
138
138
 
139
139
  /** don't touch, replaced by make with package.json version */
140
- monsterVersion = new Version('2.0.2')
140
+ monsterVersion = new Version('2.0.5')
141
141
 
142
142
  return monsterVersion;
143
143
 
@@ -7,7 +7,7 @@ describe('Monster', function () {
7
7
  let monsterVersion
8
8
 
9
9
  /** don´t touch, replaced by make with package.json version */
10
- monsterVersion = new Version('2.0.2')
10
+ monsterVersion = new Version('2.0.5')
11
11
 
12
12
  let m = getMonsterVersion();
13
13