@dbmx/toasts 0.0.113 → 0.0.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/client-DNGFXeJC.js +3 -0
- package/cjs/index-BRNom8-w.js +1 -0
- package/cjs/index-BmEeThD3.js +373 -0
- package/cjs/index-CZejuTOQ.js +373 -0
- package/cjs/index.cjs +1 -1
- package/esm/client-LVu5aGfu.js +4 -0
- package/esm/client-LVu5aGfu.js.map +1 -0
- package/esm/index-BOcMxjWG.js +374 -0
- package/esm/index-BOcMxjWG.js.map +1 -0
- package/esm/index-CN8GHxFc.js +2 -0
- package/esm/index-CN8GHxFc.js.map +1 -0
- package/esm/index-CTysOXjn.js +374 -0
- package/esm/index-CTysOXjn.js.map +1 -0
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/package.json +3 -3
- package/rollup_stats/sunburst_stats.html +2229 -2124
- package/rollup_stats/treemap_stats.html +2231 -2124
- package/cjs/node_modules/stylis/src/Enum.cjs +0 -21
- package/cjs/node_modules/stylis/src/Middleware.cjs +0 -18
- package/cjs/node_modules/stylis/src/Parser.cjs +0 -190
- package/cjs/node_modules/stylis/src/Serializer.cjs +0 -43
- package/cjs/node_modules/stylis/src/Tokenizer.cjs +0 -248
- package/cjs/node_modules/stylis/src/Utility.cjs +0 -132
- package/esm/node_modules/stylis/src/Enum.js +0 -12
- package/esm/node_modules/stylis/src/Enum.js.map +0 -1
- package/esm/node_modules/stylis/src/Middleware.js +0 -17
- package/esm/node_modules/stylis/src/Middleware.js.map +0 -1
- package/esm/node_modules/stylis/src/Parser.js +0 -185
- package/esm/node_modules/stylis/src/Parser.js.map +0 -1
- package/esm/node_modules/stylis/src/Serializer.js +0 -41
- package/esm/node_modules/stylis/src/Serializer.js.map +0 -1
- package/esm/node_modules/stylis/src/Tokenizer.js +0 -231
- package/esm/node_modules/stylis/src/Tokenizer.js.map +0 -1
- package/esm/node_modules/stylis/src/Utility.js +0 -118
- package/esm/node_modules/stylis/src/Utility.js.map +0 -1
- package/esm/src/assets/images/toasts/sdmx_datagrid.png.js +0 -4
- package/esm/src/assets/images/toasts/sdmx_datagrid.png.js.map +0 -1
- package/esm/src/components/HelloWorld/index.js +0 -18
- package/esm/src/components/HelloWorld/index.js.map +0 -1
- package/esm/src/components/HelloWorld/style.css.js +0 -4
- package/esm/src/components/HelloWorld/style.css.js.map +0 -1
- package/esm/src/components/SdmxDatagrid/LoadingBox.js +0 -24
- package/esm/src/components/SdmxDatagrid/LoadingBox.js.map +0 -1
- package/esm/src/components/SdmxDatagrid/SDMXGrid.js +0 -122
- package/esm/src/components/SdmxDatagrid/SDMXGrid.js.map +0 -1
- package/esm/src/components/SdmxDatagrid/index.js +0 -171
- package/esm/src/components/SdmxDatagrid/index.js.map +0 -1
- package/esm/src/components/SdmxDatagrid/messages.js +0 -31
- package/esm/src/components/SdmxDatagrid/messages.js.map +0 -1
- package/esm/src/components/SdmxDatagrid/utils.js +0 -166
- package/esm/src/components/SdmxDatagrid/utils.js.map +0 -1
- package/esm/src/index.js +0 -73
- package/esm/src/index.js.map +0 -1
- package/esm/src/webComponents/HelloWorld/index.js +0 -55
- package/esm/src/webComponents/HelloWorld/index.js.map +0 -1
- package/esm/src/webComponents/SDMXDatagrid/index.js +0 -87
- package/esm/src/webComponents/SDMXDatagrid/index.js.map +0 -1
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var MS = '-ms-';
|
|
4
|
-
var MOZ = '-moz-';
|
|
5
|
-
var WEBKIT = '-webkit-';
|
|
6
|
-
var COMMENT = 'comm';
|
|
7
|
-
var RULESET = 'rule';
|
|
8
|
-
var DECLARATION = 'decl';
|
|
9
|
-
var IMPORT = '@import';
|
|
10
|
-
var KEYFRAMES = '@keyframes';
|
|
11
|
-
var LAYER = '@layer';
|
|
12
|
-
|
|
13
|
-
exports.COMMENT = COMMENT;
|
|
14
|
-
exports.DECLARATION = DECLARATION;
|
|
15
|
-
exports.IMPORT = IMPORT;
|
|
16
|
-
exports.KEYFRAMES = KEYFRAMES;
|
|
17
|
-
exports.LAYER = LAYER;
|
|
18
|
-
exports.MOZ = MOZ;
|
|
19
|
-
exports.MS = MS;
|
|
20
|
-
exports.RULESET = RULESET;
|
|
21
|
-
exports.WEBKIT = WEBKIT;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var Utility = require('./Utility.cjs');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @param {function[]} collection
|
|
7
|
-
* @return {function}
|
|
8
|
-
*/
|
|
9
|
-
function middleware(collection) {
|
|
10
|
-
var length = Utility.sizeof(collection);
|
|
11
|
-
return function (element, index, children, callback) {
|
|
12
|
-
var output = '';
|
|
13
|
-
for (var i = 0; i < length; i++) output += collection[i](element, index, children, callback) || '';
|
|
14
|
-
return output;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
exports.middleware = middleware;
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var Enum = require('./Enum.cjs');
|
|
4
|
-
var Utility = require('./Utility.cjs');
|
|
5
|
-
var Tokenizer = require('./Tokenizer.cjs');
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @param {string} value
|
|
9
|
-
* @return {object[]}
|
|
10
|
-
*/
|
|
11
|
-
function compile(value) {
|
|
12
|
-
return Tokenizer.dealloc(parse('', null, null, null, [''], value = Tokenizer.alloc(value), 0, [0], value));
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @param {string} value
|
|
17
|
-
* @param {object} root
|
|
18
|
-
* @param {object?} parent
|
|
19
|
-
* @param {string[]} rule
|
|
20
|
-
* @param {string[]} rules
|
|
21
|
-
* @param {string[]} rulesets
|
|
22
|
-
* @param {number[]} pseudo
|
|
23
|
-
* @param {number[]} points
|
|
24
|
-
* @param {string[]} declarations
|
|
25
|
-
* @return {object}
|
|
26
|
-
*/
|
|
27
|
-
function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
|
28
|
-
var index = 0;
|
|
29
|
-
var offset = 0;
|
|
30
|
-
var length = pseudo;
|
|
31
|
-
var atrule = 0;
|
|
32
|
-
var property = 0;
|
|
33
|
-
var previous = 0;
|
|
34
|
-
var variable = 1;
|
|
35
|
-
var scanning = 1;
|
|
36
|
-
var ampersand = 1;
|
|
37
|
-
var character = 0;
|
|
38
|
-
var type = '';
|
|
39
|
-
var props = rules;
|
|
40
|
-
var children = rulesets;
|
|
41
|
-
var reference = rule;
|
|
42
|
-
var characters = type;
|
|
43
|
-
while (scanning) switch (previous = character, character = Tokenizer.next()) {
|
|
44
|
-
// (
|
|
45
|
-
case 40:
|
|
46
|
-
if (previous != 108 && Utility.charat(characters, length - 1) == 58) {
|
|
47
|
-
if (Utility.indexof(characters += Utility.replace(Tokenizer.delimit(character), '&', '&\f'), '&\f') != -1) ampersand = -1;
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
// " ' [
|
|
51
|
-
case 34:
|
|
52
|
-
case 39:
|
|
53
|
-
case 91:
|
|
54
|
-
characters += Tokenizer.delimit(character);
|
|
55
|
-
break;
|
|
56
|
-
// \t \n \r \s
|
|
57
|
-
case 9:
|
|
58
|
-
case 10:
|
|
59
|
-
case 13:
|
|
60
|
-
case 32:
|
|
61
|
-
characters += Tokenizer.whitespace(previous);
|
|
62
|
-
break;
|
|
63
|
-
// \
|
|
64
|
-
case 92:
|
|
65
|
-
characters += Tokenizer.escaping(Tokenizer.caret() - 1, 7);
|
|
66
|
-
continue;
|
|
67
|
-
// /
|
|
68
|
-
case 47:
|
|
69
|
-
switch (Tokenizer.peek()) {
|
|
70
|
-
case 42:
|
|
71
|
-
case 47:
|
|
72
|
-
Utility.append(comment(Tokenizer.commenter(Tokenizer.next(), Tokenizer.caret()), root, parent), declarations);
|
|
73
|
-
break;
|
|
74
|
-
default:
|
|
75
|
-
characters += '/';
|
|
76
|
-
}
|
|
77
|
-
break;
|
|
78
|
-
// {
|
|
79
|
-
case 123 * variable:
|
|
80
|
-
points[index++] = Utility.strlen(characters) * ampersand;
|
|
81
|
-
// } ; \0
|
|
82
|
-
case 125 * variable:
|
|
83
|
-
case 59:
|
|
84
|
-
case 0:
|
|
85
|
-
switch (character) {
|
|
86
|
-
// \0 }
|
|
87
|
-
case 0:
|
|
88
|
-
case 125:
|
|
89
|
-
scanning = 0;
|
|
90
|
-
// ;
|
|
91
|
-
case 59 + offset:
|
|
92
|
-
if (ampersand == -1) characters = Utility.replace(characters, /\f/g, '');
|
|
93
|
-
if (property > 0 && Utility.strlen(characters) - length) Utility.append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(Utility.replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations);
|
|
94
|
-
break;
|
|
95
|
-
// @ ;
|
|
96
|
-
case 59:
|
|
97
|
-
characters += ';';
|
|
98
|
-
// { rule/at-rule
|
|
99
|
-
default:
|
|
100
|
-
Utility.append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets);
|
|
101
|
-
if (character === 123) if (offset === 0) parse(characters, root, reference, reference, props, rulesets, length, points, children);else switch (atrule === 99 && Utility.charat(characters, 3) === 110 ? 100 : atrule) {
|
|
102
|
-
// d l m s
|
|
103
|
-
case 100:
|
|
104
|
-
case 108:
|
|
105
|
-
case 109:
|
|
106
|
-
case 115:
|
|
107
|
-
parse(value, reference, reference, rule && Utility.append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children);
|
|
108
|
-
break;
|
|
109
|
-
default:
|
|
110
|
-
parse(characters, reference, reference, reference, [''], children, 0, points, children);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo;
|
|
114
|
-
break;
|
|
115
|
-
// :
|
|
116
|
-
case 58:
|
|
117
|
-
length = 1 + Utility.strlen(characters), property = previous;
|
|
118
|
-
default:
|
|
119
|
-
if (variable < 1) if (character == 123) --variable;else if (character == 125 && variable++ == 0 && Tokenizer.prev() == 125) continue;
|
|
120
|
-
switch (characters += Utility.from(character), character * variable) {
|
|
121
|
-
// &
|
|
122
|
-
case 38:
|
|
123
|
-
ampersand = offset > 0 ? 1 : (characters += '\f', -1);
|
|
124
|
-
break;
|
|
125
|
-
// ,
|
|
126
|
-
case 44:
|
|
127
|
-
points[index++] = (Utility.strlen(characters) - 1) * ampersand, ampersand = 1;
|
|
128
|
-
break;
|
|
129
|
-
// @
|
|
130
|
-
case 64:
|
|
131
|
-
// -
|
|
132
|
-
if (Tokenizer.peek() === 45) characters += Tokenizer.delimit(Tokenizer.next());
|
|
133
|
-
atrule = Tokenizer.peek(), offset = length = Utility.strlen(type = characters += Tokenizer.identifier(Tokenizer.caret())), character++;
|
|
134
|
-
break;
|
|
135
|
-
// -
|
|
136
|
-
case 45:
|
|
137
|
-
if (previous === 45 && Utility.strlen(characters) == 2) variable = 0;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
return rulesets;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* @param {string} value
|
|
145
|
-
* @param {object} root
|
|
146
|
-
* @param {object?} parent
|
|
147
|
-
* @param {number} index
|
|
148
|
-
* @param {number} offset
|
|
149
|
-
* @param {string[]} rules
|
|
150
|
-
* @param {number[]} points
|
|
151
|
-
* @param {string} type
|
|
152
|
-
* @param {string[]} props
|
|
153
|
-
* @param {string[]} children
|
|
154
|
-
* @param {number} length
|
|
155
|
-
* @return {object}
|
|
156
|
-
*/
|
|
157
|
-
function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length) {
|
|
158
|
-
var post = offset - 1;
|
|
159
|
-
var rule = offset === 0 ? rules : [''];
|
|
160
|
-
var size = Utility.sizeof(rule);
|
|
161
|
-
for (var i = 0, j = 0, k = 0; i < index; ++i) for (var x = 0, y = Utility.substr(value, post + 1, post = Utility.abs(j = points[i])), z = value; x < size; ++x) if (z = Utility.trim(j > 0 ? rule[x] + ' ' + y : Utility.replace(y, /&\f/g, rule[x]))) props[k++] = z;
|
|
162
|
-
return Tokenizer.node(value, root, parent, offset === 0 ? Enum.RULESET : type, props, children, length);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* @param {number} value
|
|
167
|
-
* @param {object} root
|
|
168
|
-
* @param {object?} parent
|
|
169
|
-
* @return {object}
|
|
170
|
-
*/
|
|
171
|
-
function comment(value, root, parent) {
|
|
172
|
-
return Tokenizer.node(value, root, parent, Enum.COMMENT, Utility.from(Tokenizer.char()), Utility.substr(value, 2, -2), 0);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* @param {string} value
|
|
177
|
-
* @param {object} root
|
|
178
|
-
* @param {object?} parent
|
|
179
|
-
* @param {number} length
|
|
180
|
-
* @return {object}
|
|
181
|
-
*/
|
|
182
|
-
function declaration(value, root, parent, length) {
|
|
183
|
-
return Tokenizer.node(value, root, parent, Enum.DECLARATION, Utility.substr(value, 0, length), Utility.substr(value, length + 1, -1), length);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
exports.comment = comment;
|
|
187
|
-
exports.compile = compile;
|
|
188
|
-
exports.declaration = declaration;
|
|
189
|
-
exports.parse = parse;
|
|
190
|
-
exports.ruleset = ruleset;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var Enum = require('./Enum.cjs');
|
|
4
|
-
var Utility = require('./Utility.cjs');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @param {object[]} children
|
|
8
|
-
* @param {function} callback
|
|
9
|
-
* @return {string}
|
|
10
|
-
*/
|
|
11
|
-
function serialize(children, callback) {
|
|
12
|
-
var output = '';
|
|
13
|
-
var length = Utility.sizeof(children);
|
|
14
|
-
for (var i = 0; i < length; i++) output += callback(children[i], i, children, callback) || '';
|
|
15
|
-
return output;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @param {object} element
|
|
20
|
-
* @param {number} index
|
|
21
|
-
* @param {object[]} children
|
|
22
|
-
* @param {function} callback
|
|
23
|
-
* @return {string}
|
|
24
|
-
*/
|
|
25
|
-
function stringify(element, index, children, callback) {
|
|
26
|
-
switch (element.type) {
|
|
27
|
-
case Enum.LAYER:
|
|
28
|
-
if (element.children.length) break;
|
|
29
|
-
case Enum.IMPORT:
|
|
30
|
-
case Enum.DECLARATION:
|
|
31
|
-
return element.return = element.return || element.value;
|
|
32
|
-
case Enum.COMMENT:
|
|
33
|
-
return '';
|
|
34
|
-
case Enum.KEYFRAMES:
|
|
35
|
-
return element.return = element.value + '{' + serialize(element.children, callback) + '}';
|
|
36
|
-
case Enum.RULESET:
|
|
37
|
-
element.value = element.props.join(',');
|
|
38
|
-
}
|
|
39
|
-
return Utility.strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : '';
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
exports.serialize = serialize;
|
|
43
|
-
exports.stringify = stringify;
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var Utility = require('./Utility.cjs');
|
|
4
|
-
|
|
5
|
-
exports.line = 1;
|
|
6
|
-
exports.column = 1;
|
|
7
|
-
exports.length = 0;
|
|
8
|
-
exports.position = 0;
|
|
9
|
-
exports.character = 0;
|
|
10
|
-
exports.characters = '';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @param {string} value
|
|
14
|
-
* @param {object | null} root
|
|
15
|
-
* @param {object | null} parent
|
|
16
|
-
* @param {string} type
|
|
17
|
-
* @param {string[] | string} props
|
|
18
|
-
* @param {object[] | string} children
|
|
19
|
-
* @param {number} length
|
|
20
|
-
*/
|
|
21
|
-
function node(value, root, parent, type, props, children, length) {
|
|
22
|
-
return {
|
|
23
|
-
value: value,
|
|
24
|
-
root: root,
|
|
25
|
-
parent: parent,
|
|
26
|
-
type: type,
|
|
27
|
-
props: props,
|
|
28
|
-
children: children,
|
|
29
|
-
line: exports.line,
|
|
30
|
-
column: exports.column,
|
|
31
|
-
length: length,
|
|
32
|
-
return: ''
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @param {object} root
|
|
38
|
-
* @param {object} props
|
|
39
|
-
* @return {object}
|
|
40
|
-
*/
|
|
41
|
-
function copy(root, props) {
|
|
42
|
-
return Utility.assign(node('', null, null, '', null, null, 0), root, {
|
|
43
|
-
length: -root.length
|
|
44
|
-
}, props);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @return {number}
|
|
49
|
-
*/
|
|
50
|
-
function char() {
|
|
51
|
-
return exports.character;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @return {number}
|
|
56
|
-
*/
|
|
57
|
-
function prev() {
|
|
58
|
-
exports.character = exports.position > 0 ? Utility.charat(exports.characters, --exports.position) : 0;
|
|
59
|
-
if (exports.column--, exports.character === 10) exports.column = 1, exports.line--;
|
|
60
|
-
return exports.character;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* @return {number}
|
|
65
|
-
*/
|
|
66
|
-
function next() {
|
|
67
|
-
exports.character = exports.position < exports.length ? Utility.charat(exports.characters, exports.position++) : 0;
|
|
68
|
-
if (exports.column++, exports.character === 10) exports.column = 1, exports.line++;
|
|
69
|
-
return exports.character;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* @return {number}
|
|
74
|
-
*/
|
|
75
|
-
function peek() {
|
|
76
|
-
return Utility.charat(exports.characters, exports.position);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* @return {number}
|
|
81
|
-
*/
|
|
82
|
-
function caret() {
|
|
83
|
-
return exports.position;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* @param {number} begin
|
|
88
|
-
* @param {number} end
|
|
89
|
-
* @return {string}
|
|
90
|
-
*/
|
|
91
|
-
function slice(begin, end) {
|
|
92
|
-
return Utility.substr(exports.characters, begin, end);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* @param {number} type
|
|
97
|
-
* @return {number}
|
|
98
|
-
*/
|
|
99
|
-
function token(type) {
|
|
100
|
-
switch (type) {
|
|
101
|
-
// \0 \t \n \r \s whitespace token
|
|
102
|
-
case 0:
|
|
103
|
-
case 9:
|
|
104
|
-
case 10:
|
|
105
|
-
case 13:
|
|
106
|
-
case 32:
|
|
107
|
-
return 5;
|
|
108
|
-
// ! + , / > @ ~ isolate token
|
|
109
|
-
case 33:
|
|
110
|
-
case 43:
|
|
111
|
-
case 44:
|
|
112
|
-
case 47:
|
|
113
|
-
case 62:
|
|
114
|
-
case 64:
|
|
115
|
-
case 126:
|
|
116
|
-
// ; { } breakpoint token
|
|
117
|
-
case 59:
|
|
118
|
-
case 123:
|
|
119
|
-
case 125:
|
|
120
|
-
return 4;
|
|
121
|
-
// : accompanied token
|
|
122
|
-
case 58:
|
|
123
|
-
return 3;
|
|
124
|
-
// " ' ( [ opening delimit token
|
|
125
|
-
case 34:
|
|
126
|
-
case 39:
|
|
127
|
-
case 40:
|
|
128
|
-
case 91:
|
|
129
|
-
return 2;
|
|
130
|
-
// ) ] closing delimit token
|
|
131
|
-
case 41:
|
|
132
|
-
case 93:
|
|
133
|
-
return 1;
|
|
134
|
-
}
|
|
135
|
-
return 0;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* @param {string} value
|
|
140
|
-
* @return {any[]}
|
|
141
|
-
*/
|
|
142
|
-
function alloc(value) {
|
|
143
|
-
return exports.line = exports.column = 1, exports.length = Utility.strlen(exports.characters = value), exports.position = 0, [];
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* @param {any} value
|
|
148
|
-
* @return {any}
|
|
149
|
-
*/
|
|
150
|
-
function dealloc(value) {
|
|
151
|
-
return exports.characters = '', value;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* @param {number} type
|
|
156
|
-
* @return {string}
|
|
157
|
-
*/
|
|
158
|
-
function delimit(type) {
|
|
159
|
-
return Utility.trim(slice(exports.position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* @param {number} type
|
|
164
|
-
* @return {string}
|
|
165
|
-
*/
|
|
166
|
-
function whitespace(type) {
|
|
167
|
-
while (exports.character = peek()) if (exports.character < 33) next();else break;
|
|
168
|
-
return token(type) > 2 || token(exports.character) > 3 ? '' : ' ';
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* @param {number} index
|
|
173
|
-
* @param {number} count
|
|
174
|
-
* @return {string}
|
|
175
|
-
*/
|
|
176
|
-
function escaping(index, count) {
|
|
177
|
-
while (--count && next())
|
|
178
|
-
// not 0-9 A-F a-f
|
|
179
|
-
if (exports.character < 48 || exports.character > 102 || exports.character > 57 && exports.character < 65 || exports.character > 70 && exports.character < 97) break;
|
|
180
|
-
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* @param {number} type
|
|
185
|
-
* @return {number}
|
|
186
|
-
*/
|
|
187
|
-
function delimiter(type) {
|
|
188
|
-
while (next()) switch (exports.character) {
|
|
189
|
-
// ] ) " '
|
|
190
|
-
case type:
|
|
191
|
-
return exports.position;
|
|
192
|
-
// " '
|
|
193
|
-
case 34:
|
|
194
|
-
case 39:
|
|
195
|
-
if (type !== 34 && type !== 39) delimiter(exports.character);
|
|
196
|
-
break;
|
|
197
|
-
// (
|
|
198
|
-
case 40:
|
|
199
|
-
if (type === 41) delimiter(type);
|
|
200
|
-
break;
|
|
201
|
-
// \
|
|
202
|
-
case 92:
|
|
203
|
-
next();
|
|
204
|
-
break;
|
|
205
|
-
}
|
|
206
|
-
return exports.position;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* @param {number} type
|
|
211
|
-
* @param {number} index
|
|
212
|
-
* @return {number}
|
|
213
|
-
*/
|
|
214
|
-
function commenter(type, index) {
|
|
215
|
-
while (next())
|
|
216
|
-
// //
|
|
217
|
-
if (type + exports.character === 47 + 10) break;
|
|
218
|
-
// /*
|
|
219
|
-
else if (type + exports.character === 42 + 42 && peek() === 47) break;
|
|
220
|
-
return '/*' + slice(index, exports.position - 1) + '*' + Utility.from(type === 47 ? type : next());
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* @param {number} index
|
|
225
|
-
* @return {string}
|
|
226
|
-
*/
|
|
227
|
-
function identifier(index) {
|
|
228
|
-
while (!token(peek())) next();
|
|
229
|
-
return slice(index, exports.position);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
exports.alloc = alloc;
|
|
233
|
-
exports.caret = caret;
|
|
234
|
-
exports.char = char;
|
|
235
|
-
exports.commenter = commenter;
|
|
236
|
-
exports.copy = copy;
|
|
237
|
-
exports.dealloc = dealloc;
|
|
238
|
-
exports.delimit = delimit;
|
|
239
|
-
exports.delimiter = delimiter;
|
|
240
|
-
exports.escaping = escaping;
|
|
241
|
-
exports.identifier = identifier;
|
|
242
|
-
exports.next = next;
|
|
243
|
-
exports.node = node;
|
|
244
|
-
exports.peek = peek;
|
|
245
|
-
exports.prev = prev;
|
|
246
|
-
exports.slice = slice;
|
|
247
|
-
exports.token = token;
|
|
248
|
-
exports.whitespace = whitespace;
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @param {number}
|
|
5
|
-
* @return {number}
|
|
6
|
-
*/
|
|
7
|
-
var abs = Math.abs;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @param {number}
|
|
11
|
-
* @return {string}
|
|
12
|
-
*/
|
|
13
|
-
var from = String.fromCharCode;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @param {object}
|
|
17
|
-
* @return {object}
|
|
18
|
-
*/
|
|
19
|
-
var assign = Object.assign;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @param {string} value
|
|
23
|
-
* @param {number} length
|
|
24
|
-
* @return {number}
|
|
25
|
-
*/
|
|
26
|
-
function hash(value, length) {
|
|
27
|
-
return charat(value, 0) ^ 45 ? (((length << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @param {string} value
|
|
32
|
-
* @return {string}
|
|
33
|
-
*/
|
|
34
|
-
function trim(value) {
|
|
35
|
-
return value.trim();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @param {string} value
|
|
40
|
-
* @param {RegExp} pattern
|
|
41
|
-
* @return {string?}
|
|
42
|
-
*/
|
|
43
|
-
function match(value, pattern) {
|
|
44
|
-
return (value = pattern.exec(value)) ? value[0] : value;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @param {string} value
|
|
49
|
-
* @param {(string|RegExp)} pattern
|
|
50
|
-
* @param {string} replacement
|
|
51
|
-
* @return {string}
|
|
52
|
-
*/
|
|
53
|
-
function replace(value, pattern, replacement) {
|
|
54
|
-
return value.replace(pattern, replacement);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @param {string} value
|
|
59
|
-
* @param {string} search
|
|
60
|
-
* @return {number}
|
|
61
|
-
*/
|
|
62
|
-
function indexof(value, search) {
|
|
63
|
-
return value.indexOf(search);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @param {string} value
|
|
68
|
-
* @param {number} index
|
|
69
|
-
* @return {number}
|
|
70
|
-
*/
|
|
71
|
-
function charat(value, index) {
|
|
72
|
-
return value.charCodeAt(index) | 0;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @param {string} value
|
|
77
|
-
* @param {number} begin
|
|
78
|
-
* @param {number} end
|
|
79
|
-
* @return {string}
|
|
80
|
-
*/
|
|
81
|
-
function substr(value, begin, end) {
|
|
82
|
-
return value.slice(begin, end);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* @param {string} value
|
|
87
|
-
* @return {number}
|
|
88
|
-
*/
|
|
89
|
-
function strlen(value) {
|
|
90
|
-
return value.length;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* @param {any[]} value
|
|
95
|
-
* @return {number}
|
|
96
|
-
*/
|
|
97
|
-
function sizeof(value) {
|
|
98
|
-
return value.length;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @param {any} value
|
|
103
|
-
* @param {any[]} array
|
|
104
|
-
* @return {any}
|
|
105
|
-
*/
|
|
106
|
-
function append(value, array) {
|
|
107
|
-
return array.push(value), value;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @param {string[]} array
|
|
112
|
-
* @param {function} callback
|
|
113
|
-
* @return {string}
|
|
114
|
-
*/
|
|
115
|
-
function combine(array, callback) {
|
|
116
|
-
return array.map(callback).join('');
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
exports.abs = abs;
|
|
120
|
-
exports.append = append;
|
|
121
|
-
exports.assign = assign;
|
|
122
|
-
exports.charat = charat;
|
|
123
|
-
exports.combine = combine;
|
|
124
|
-
exports.from = from;
|
|
125
|
-
exports.hash = hash;
|
|
126
|
-
exports.indexof = indexof;
|
|
127
|
-
exports.match = match;
|
|
128
|
-
exports.replace = replace;
|
|
129
|
-
exports.sizeof = sizeof;
|
|
130
|
-
exports.strlen = strlen;
|
|
131
|
-
exports.substr = substr;
|
|
132
|
-
exports.trim = trim;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var MS = '-ms-';
|
|
2
|
-
var MOZ = '-moz-';
|
|
3
|
-
var WEBKIT = '-webkit-';
|
|
4
|
-
var COMMENT = 'comm';
|
|
5
|
-
var RULESET = 'rule';
|
|
6
|
-
var DECLARATION = 'decl';
|
|
7
|
-
var IMPORT = '@import';
|
|
8
|
-
var KEYFRAMES = '@keyframes';
|
|
9
|
-
var LAYER = '@layer';
|
|
10
|
-
|
|
11
|
-
export { COMMENT, DECLARATION, IMPORT, KEYFRAMES, LAYER, MOZ, MS, RULESET, WEBKIT };
|
|
12
|
-
//# sourceMappingURL=Enum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Enum.js","sources":["../../../../node_modules/stylis/src/Enum.js"],"sourcesContent":["export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\n"],"names":["MS","MOZ","WEBKIT","COMMENT","RULESET","DECLARATION","IMPORT","KEYFRAMES","LAYER"],"mappings":"AAAO,IAAIA,EAAE,GAAG,OAAM;AACf,IAAIC,GAAG,GAAG,QAAO;AACjB,IAAIC,MAAM,GAAG,WAAU;AAEvB,IAAIC,OAAO,GAAG,OAAM;AACpB,IAAIC,OAAO,GAAG,OAAM;AACpB,IAAIC,WAAW,GAAG,OAAM;AAIxB,IAAIC,MAAM,GAAG,UAAS;AAMtB,IAAIC,SAAS,GAAG,aAAY;AAI5B,IAAIC,KAAK,GAAG;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { sizeof } from './Utility.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @param {function[]} collection
|
|
5
|
-
* @return {function}
|
|
6
|
-
*/
|
|
7
|
-
function middleware(collection) {
|
|
8
|
-
var length = sizeof(collection);
|
|
9
|
-
return function (element, index, children, callback) {
|
|
10
|
-
var output = '';
|
|
11
|
-
for (var i = 0; i < length; i++) output += collection[i](element, index, children, callback) || '';
|
|
12
|
-
return output;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { middleware };
|
|
17
|
-
//# sourceMappingURL=Middleware.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Middleware.js","sources":["../../../../node_modules/stylis/src/Middleware.js"],"sourcesContent":["import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n"],"names":["middleware","collection","length","sizeof","element","index","children","callback","output","i"],"mappings":";;AAMA;AACA;AACA;AACA;AACO,SAASA,UAAUA,CAAEC,UAAU,EAAE;AACvC,EAAA,IAAIC,MAAM,GAAGC,MAAM,CAACF,UAAU,CAAC,CAAA;EAE/B,OAAO,UAAUG,OAAO,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,QAAQ,EAAE;IACpD,IAAIC,MAAM,GAAG,EAAE,CAAA;AAEf,IAAA,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGP,MAAM,EAAEO,CAAC,EAAE,EAC9BD,MAAM,IAAIP,UAAU,CAACQ,CAAC,CAAC,CAACL,OAAO,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,QAAQ,CAAC,IAAI,EAAE,CAAA;AAElE,IAAA,OAAOC,MAAM,CAAA;GACb,CAAA;AACF;;;;","x_google_ignoreList":[0]}
|