@master/css 2.0.0-rc.69 → 2.0.0-rc.70
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/README.md +6 -8
- package/dist/index.d.ts +2 -40
- package/dist/index.mjs +1 -42
- package/package.json +1 -1
- package/src/base.css +1 -0
- package/src/index.css +1 -0
- package/src/theme.css +1 -0
- package/src/utilities.css +1 -0
- package/src/variants.css +1 -0
- package/dist/_virtual/_commonjsHelpers.cjs +0 -10
- package/dist/_virtual/_commonjsHelpers.mjs +0 -7
- package/dist/_virtual/css-escape.cjs +0 -5
- package/dist/_virtual/css-escape.mjs +0 -3
- package/dist/animation-rule.cjs +0 -24
- package/dist/animation-rule.d.ts +0 -11
- package/dist/animation-rule.mjs +0 -22
- package/dist/bin/index.cjs +0 -11
- package/dist/bin/index.d.ts +0 -1
- package/dist/bin/index.mjs +0 -9
- package/dist/common.cjs +0 -208
- package/dist/common.d.ts +0 -40
- package/dist/common.mjs +0 -180
- package/dist/config/animations.cjs +0 -113
- package/dist/config/animations.d.ts +0 -110
- package/dist/config/animations.mjs +0 -111
- package/dist/config/at.cjs +0 -19
- package/dist/config/at.d.ts +0 -16
- package/dist/config/at.mjs +0 -17
- package/dist/config/functions.cjs +0 -141
- package/dist/config/functions.d.ts +0 -138
- package/dist/config/functions.mjs +0 -139
- package/dist/config/index.cjs +0 -40
- package/dist/config/index.d.ts +0 -12
- package/dist/config/index.mjs +0 -29
- package/dist/config/modes.cjs +0 -312
- package/dist/config/modes.d.ts +0 -309
- package/dist/config/modes.mjs +0 -310
- package/dist/config/rules.cjs +0 -2277
- package/dist/config/rules.d.ts +0 -1485
- package/dist/config/rules.mjs +0 -2275
- package/dist/config/screens.cjs +0 -17
- package/dist/config/screens.d.ts +0 -14
- package/dist/config/screens.mjs +0 -15
- package/dist/config/selectors.cjs +0 -25
- package/dist/config/selectors.d.ts +0 -22
- package/dist/config/selectors.mjs +0 -23
- package/dist/config/utilities.cjs +0 -446
- package/dist/config/utilities.d.ts +0 -443
- package/dist/config/utilities.mjs +0 -444
- package/dist/config/variables.cjs +0 -99
- package/dist/config/variables.d.ts +0 -423
- package/dist/config/variables.mjs +0 -97
- package/dist/core.cjs +0 -674
- package/dist/core.d.ts +0 -128
- package/dist/core.mjs +0 -672
- package/dist/create.cjs +0 -10
- package/dist/create.d.ts +0 -3
- package/dist/create.mjs +0 -8
- package/dist/declarers/core.group.cjs +0 -99
- package/dist/declarers/core.group.d.ts +0 -2
- package/dist/declarers/core.group.mjs +0 -97
- package/dist/declarers/core.variable.cjs +0 -9
- package/dist/declarers/core.variable.d.ts +0 -4
- package/dist/declarers/core.variable.mjs +0 -7
- package/dist/declarers/index.cjs +0 -13
- package/dist/declarers/index.d.ts +0 -10
- package/dist/declarers/index.mjs +0 -11
- package/dist/declarers/pair.cjs +0 -12
- package/dist/declarers/pair.d.ts +0 -4
- package/dist/declarers/pair.mjs +0 -10
- package/dist/factories/with-syntax-layer.cjs +0 -83
- package/dist/factories/with-syntax-layer.d.ts +0 -26
- package/dist/factories/with-syntax-layer.mjs +0 -81
- package/dist/function-transformers/core.calc.cjs +0 -225
- package/dist/function-transformers/core.calc.d.ts +0 -2
- package/dist/function-transformers/core.calc.mjs +0 -223
- package/dist/function-transformers/core.variable.cjs +0 -23
- package/dist/function-transformers/core.variable.d.ts +0 -7
- package/dist/function-transformers/core.variable.mjs +0 -21
- package/dist/function-transformers/index.cjs +0 -11
- package/dist/function-transformers/index.d.ts +0 -8
- package/dist/function-transformers/index.mjs +0 -9
- package/dist/index.cjs +0 -118
- package/dist/layer.cjs +0 -52
- package/dist/layer.d.ts +0 -16
- package/dist/layer.mjs +0 -50
- package/dist/non-layer.cjs +0 -55
- package/dist/non-layer.d.ts +0 -12
- package/dist/non-layer.mjs +0 -53
- package/dist/polyfills/css-escape.cjs +0 -9
- package/dist/polyfills/css-escape.d.ts +0 -0
- package/dist/polyfills/css-escape.mjs +0 -7
- package/dist/polyfills/css-escape2.cjs +0 -76
- package/dist/polyfills/css-escape2.mjs +0 -74
- package/dist/register-global.cjs +0 -7
- package/dist/register-global.d.ts +0 -5
- package/dist/register-global.mjs +0 -5
- package/dist/rule.cjs +0 -16
- package/dist/rule.d.ts +0 -7
- package/dist/rule.mjs +0 -14
- package/dist/shared/utils/css-escape.cjs +0 -56
- package/dist/shared/utils/css-escape.mjs +0 -54
- package/dist/shared/utils/find-native-css-rule-index.cjs +0 -12
- package/dist/shared/utils/find-native-css-rule-index.mjs +0 -10
- package/dist/syntax-layer.cjs +0 -8
- package/dist/syntax-layer.d.ts +0 -18
- package/dist/syntax-layer.mjs +0 -6
- package/dist/syntax-rule-type.cjs +0 -27
- package/dist/syntax-rule-type.d.ts +0 -28
- package/dist/syntax-rule-type.mjs +0 -25
- package/dist/syntax-rule.cjs +0 -506
- package/dist/syntax-rule.d.ts +0 -44
- package/dist/syntax-rule.mjs +0 -504
- package/dist/transformers/auto-fill-solid.cjs +0 -31
- package/dist/transformers/auto-fill-solid.d.ts +0 -2
- package/dist/transformers/auto-fill-solid.mjs +0 -29
- package/dist/transformers/index.cjs +0 -9
- package/dist/transformers/index.d.ts +0 -6
- package/dist/transformers/index.mjs +0 -7
- package/dist/types/common.cjs +0 -2
- package/dist/types/common.d.ts +0 -1
- package/dist/types/common.mjs +0 -1
- package/dist/types/config.cjs +0 -2
- package/dist/types/config.d.ts +0 -79
- package/dist/types/config.mjs +0 -1
- package/dist/types/syntax.cjs +0 -2
- package/dist/types/syntax.d.ts +0 -89
- package/dist/types/syntax.mjs +0 -1
- package/dist/utils/compare-rule-priority.cjs +0 -143
- package/dist/utils/compare-rule-priority.d.ts +0 -7
- package/dist/utils/compare-rule-priority.mjs +0 -138
- package/dist/utils/equal-at-rules.cjs +0 -22
- package/dist/utils/equal-at-rules.d.ts +0 -2
- package/dist/utils/equal-at-rules.mjs +0 -20
- package/dist/utils/equal-declarations.cjs +0 -10
- package/dist/utils/equal-declarations.d.ts +0 -2
- package/dist/utils/equal-declarations.mjs +0 -8
- package/dist/utils/equal-selectors.cjs +0 -69
- package/dist/utils/equal-selectors.d.ts +0 -2
- package/dist/utils/equal-selectors.mjs +0 -67
- package/dist/utils/equal-variants.cjs +0 -10
- package/dist/utils/equal-variants.d.ts +0 -2
- package/dist/utils/equal-variants.mjs +0 -8
- package/dist/utils/extend-config.cjs +0 -97
- package/dist/utils/extend-config.d.ts +0 -11
- package/dist/utils/extend-config.mjs +0 -95
- package/dist/utils/flatten-meta-object.cjs +0 -38
- package/dist/utils/flatten-meta-object.d.ts +0 -13
- package/dist/utils/flatten-meta-object.mjs +0 -36
- package/dist/utils/flatten-object.cjs +0 -19
- package/dist/utils/flatten-object.d.ts +0 -1
- package/dist/utils/flatten-object.mjs +0 -17
- package/dist/utils/generate-at.cjs +0 -30
- package/dist/utils/generate-at.d.ts +0 -2
- package/dist/utils/generate-at.mjs +0 -28
- package/dist/utils/generate-css.cjs +0 -13
- package/dist/utils/generate-css.d.ts +0 -1
- package/dist/utils/generate-css.mjs +0 -11
- package/dist/utils/generate-selector.cjs +0 -50
- package/dist/utils/generate-selector.d.ts +0 -2
- package/dist/utils/generate-selector.mjs +0 -48
- package/dist/utils/get-single-at-number-rule-node.cjs +0 -9
- package/dist/utils/get-single-at-number-rule-node.d.ts +0 -2
- package/dist/utils/get-single-at-number-rule-node.mjs +0 -7
- package/dist/utils/hex-to-rgb.cjs +0 -30
- package/dist/utils/hex-to-rgb.d.ts +0 -1
- package/dist/utils/hex-to-rgb.mjs +0 -28
- package/dist/utils/is-core-rule.cjs +0 -9
- package/dist/utils/is-core-rule.d.ts +0 -1
- package/dist/utils/is-core-rule.mjs +0 -7
- package/dist/utils/minify-extended-config.cjs +0 -64
- package/dist/utils/minify-extended-config.d.ts +0 -9
- package/dist/utils/minify-extended-config.mjs +0 -62
- package/dist/utils/nest-meta-object.cjs +0 -25
- package/dist/utils/nest-meta-object.d.ts +0 -7
- package/dist/utils/nest-meta-object.mjs +0 -23
- package/dist/utils/parse-at.cjs +0 -156
- package/dist/utils/parse-at.d.ts +0 -39
- package/dist/utils/parse-at.mjs +0 -154
- package/dist/utils/parse-pair.cjs +0 -48
- package/dist/utils/parse-pair.d.ts +0 -8
- package/dist/utils/parse-pair.mjs +0 -46
- package/dist/utils/parse-selector.cjs +0 -114
- package/dist/utils/parse-selector.d.ts +0 -19
- package/dist/utils/parse-selector.mjs +0 -112
- package/dist/utils/parse-value.cjs +0 -39
- package/dist/utils/parse-value.d.ts +0 -2
- package/dist/utils/parse-value.mjs +0 -37
- package/dist/utils/replace-char-outside-quotes.cjs +0 -21
- package/dist/utils/replace-char-outside-quotes.d.ts +0 -1
- package/dist/utils/replace-char-outside-quotes.mjs +0 -19
- package/dist/utils/sort-readable-classes.cjs +0 -86
- package/dist/utils/sort-readable-classes.d.ts +0 -7
- package/dist/utils/sort-readable-classes.mjs +0 -84
- package/dist/utils/split-char-outside-quotes.cjs +0 -29
- package/dist/utils/split-char-outside-quotes.d.ts +0 -1
- package/dist/utils/split-char-outside-quotes.mjs +0 -27
- package/dist/variable-rule.cjs +0 -92
- package/dist/variable-rule.d.ts +0 -33
- package/dist/variable-rule.mjs +0 -87
package/dist/layer.cjs
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
class Layer {
|
|
4
|
-
name;
|
|
5
|
-
css;
|
|
6
|
-
rules = [];
|
|
7
|
-
tokenCounts = new Map();
|
|
8
|
-
constructor(name, css){
|
|
9
|
-
this.name = name;
|
|
10
|
-
this.css = css;
|
|
11
|
-
}
|
|
12
|
-
attach() {
|
|
13
|
-
this.css.rules.push(this);
|
|
14
|
-
}
|
|
15
|
-
detach() {
|
|
16
|
-
this.css.rules.splice(this.css.rules.indexOf(this), 1);
|
|
17
|
-
}
|
|
18
|
-
insert(rule, index = this.rules.length) {
|
|
19
|
-
if (this.rules.find(({ key })=>key === rule.key)) return;
|
|
20
|
-
this.rules.splice(index, 0, rule);
|
|
21
|
-
// should attach after inserting, because this.text is possibly empty
|
|
22
|
-
if (!this.css.rules.includes(this)) {
|
|
23
|
-
this.attach();
|
|
24
|
-
}
|
|
25
|
-
return index;
|
|
26
|
-
}
|
|
27
|
-
delete(key) {
|
|
28
|
-
const index = this.rules.findIndex((rule)=>rule.key === key);
|
|
29
|
-
if (index === -1) return;
|
|
30
|
-
const deletedRule = this.rules[index];
|
|
31
|
-
this.rules.splice(index, 1);
|
|
32
|
-
if (this.rules.length === 0) {
|
|
33
|
-
this.detach();
|
|
34
|
-
}
|
|
35
|
-
return deletedRule;
|
|
36
|
-
}
|
|
37
|
-
reset() {
|
|
38
|
-
this.rules.length = 0;
|
|
39
|
-
const indexOfLayer = this.css.rules.indexOf(this);
|
|
40
|
-
if (indexOfLayer !== -1) {
|
|
41
|
-
this.css.rules.splice(indexOfLayer, 1);
|
|
42
|
-
}
|
|
43
|
-
this.tokenCounts.clear();
|
|
44
|
-
}
|
|
45
|
-
get text() {
|
|
46
|
-
const ruleText = this.rules.map(({ text })=>text).join('');
|
|
47
|
-
if (!ruleText) return '';
|
|
48
|
-
return '@layer ' + this.name + '{' + ruleText + '}';
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
module.exports = Layer;
|
package/dist/layer.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Rule } from './rule';
|
|
2
|
-
import MasterCSS from './core';
|
|
3
|
-
import VariableRule from './variable-rule';
|
|
4
|
-
export default class Layer {
|
|
5
|
-
name: string;
|
|
6
|
-
css: MasterCSS;
|
|
7
|
-
readonly rules: (Rule | VariableRule)[];
|
|
8
|
-
readonly tokenCounts: Map<string, number>;
|
|
9
|
-
constructor(name: string, css: MasterCSS);
|
|
10
|
-
attach(): void;
|
|
11
|
-
detach(): void;
|
|
12
|
-
insert(rule: Rule | VariableRule, index?: number): number | undefined;
|
|
13
|
-
delete(key: string): Rule | VariableRule | undefined;
|
|
14
|
-
reset(): void;
|
|
15
|
-
get text(): string;
|
|
16
|
-
}
|
package/dist/layer.mjs
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
class Layer {
|
|
2
|
-
name;
|
|
3
|
-
css;
|
|
4
|
-
rules = [];
|
|
5
|
-
tokenCounts = new Map();
|
|
6
|
-
constructor(name, css){
|
|
7
|
-
this.name = name;
|
|
8
|
-
this.css = css;
|
|
9
|
-
}
|
|
10
|
-
attach() {
|
|
11
|
-
this.css.rules.push(this);
|
|
12
|
-
}
|
|
13
|
-
detach() {
|
|
14
|
-
this.css.rules.splice(this.css.rules.indexOf(this), 1);
|
|
15
|
-
}
|
|
16
|
-
insert(rule, index = this.rules.length) {
|
|
17
|
-
if (this.rules.find(({ key })=>key === rule.key)) return;
|
|
18
|
-
this.rules.splice(index, 0, rule);
|
|
19
|
-
// should attach after inserting, because this.text is possibly empty
|
|
20
|
-
if (!this.css.rules.includes(this)) {
|
|
21
|
-
this.attach();
|
|
22
|
-
}
|
|
23
|
-
return index;
|
|
24
|
-
}
|
|
25
|
-
delete(key) {
|
|
26
|
-
const index = this.rules.findIndex((rule)=>rule.key === key);
|
|
27
|
-
if (index === -1) return;
|
|
28
|
-
const deletedRule = this.rules[index];
|
|
29
|
-
this.rules.splice(index, 1);
|
|
30
|
-
if (this.rules.length === 0) {
|
|
31
|
-
this.detach();
|
|
32
|
-
}
|
|
33
|
-
return deletedRule;
|
|
34
|
-
}
|
|
35
|
-
reset() {
|
|
36
|
-
this.rules.length = 0;
|
|
37
|
-
const indexOfLayer = this.css.rules.indexOf(this);
|
|
38
|
-
if (indexOfLayer !== -1) {
|
|
39
|
-
this.css.rules.splice(indexOfLayer, 1);
|
|
40
|
-
}
|
|
41
|
-
this.tokenCounts.clear();
|
|
42
|
-
}
|
|
43
|
-
get text() {
|
|
44
|
-
const ruleText = this.rules.map(({ text })=>text).join('');
|
|
45
|
-
if (!ruleText) return '';
|
|
46
|
-
return '@layer ' + this.name + '{' + ruleText + '}';
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { Layer as default };
|
package/dist/non-layer.cjs
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var findNativeCssRuleIndex = require('./shared/utils/find-native-css-rule-index.cjs');
|
|
4
|
-
|
|
5
|
-
class NonLayer {
|
|
6
|
-
css;
|
|
7
|
-
rules = [];
|
|
8
|
-
tokenCounts = new Map();
|
|
9
|
-
constructor(css){
|
|
10
|
-
this.css = css;
|
|
11
|
-
}
|
|
12
|
-
insert(rule) {
|
|
13
|
-
if (this.rules.includes(rule)) return;
|
|
14
|
-
const sheet = this.css.style?.sheet;
|
|
15
|
-
if (sheet) {
|
|
16
|
-
try {
|
|
17
|
-
const insertedIndex = sheet.insertRule(rule.text, sheet.cssRules.length);
|
|
18
|
-
rule.native = sheet.cssRules[insertedIndex];
|
|
19
|
-
} catch (error) {
|
|
20
|
-
console.error(error);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
this.rules.push(rule);
|
|
24
|
-
this.css.rules.push(rule);
|
|
25
|
-
}
|
|
26
|
-
delete(name) {
|
|
27
|
-
const rule = this.rules.find((rule)=>rule.name === name);
|
|
28
|
-
if (!rule) return;
|
|
29
|
-
const sheet = this.css.style?.sheet;
|
|
30
|
-
if (sheet) {
|
|
31
|
-
const foundIndex = findNativeCssRuleIndex(sheet.cssRules, rule.native);
|
|
32
|
-
if (foundIndex !== -1) {
|
|
33
|
-
sheet.deleteRule(foundIndex);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
this.rules.splice(this.rules.indexOf(rule), 1);
|
|
37
|
-
this.css.rules.splice(this.css.rules.indexOf(rule), 1);
|
|
38
|
-
return rule;
|
|
39
|
-
}
|
|
40
|
-
get text() {
|
|
41
|
-
return this.rules.map(({ text })=>text).join('');
|
|
42
|
-
}
|
|
43
|
-
reset() {
|
|
44
|
-
for (const rule of this.rules){
|
|
45
|
-
const foundIndex = this.css.rules.indexOf(rule);
|
|
46
|
-
if (foundIndex !== -1) {
|
|
47
|
-
this.css.rules.splice(foundIndex, 1);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
this.rules.length = 0;
|
|
51
|
-
this.tokenCounts.clear();
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
module.exports = NonLayer;
|
package/dist/non-layer.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import MasterCSS from './core';
|
|
2
|
-
import { Rule } from './rule';
|
|
3
|
-
export default class NonLayer {
|
|
4
|
-
css: MasterCSS;
|
|
5
|
-
readonly rules: Rule[];
|
|
6
|
-
readonly tokenCounts: Map<string, number>;
|
|
7
|
-
constructor(css: MasterCSS);
|
|
8
|
-
insert(rule: Rule): void;
|
|
9
|
-
delete(name: string): Rule | undefined;
|
|
10
|
-
get text(): string;
|
|
11
|
-
reset(): void;
|
|
12
|
-
}
|
package/dist/non-layer.mjs
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import findNativeCSSRuleIndex from './shared/utils/find-native-css-rule-index.mjs';
|
|
2
|
-
|
|
3
|
-
class NonLayer {
|
|
4
|
-
css;
|
|
5
|
-
rules = [];
|
|
6
|
-
tokenCounts = new Map();
|
|
7
|
-
constructor(css){
|
|
8
|
-
this.css = css;
|
|
9
|
-
}
|
|
10
|
-
insert(rule) {
|
|
11
|
-
if (this.rules.includes(rule)) return;
|
|
12
|
-
const sheet = this.css.style?.sheet;
|
|
13
|
-
if (sheet) {
|
|
14
|
-
try {
|
|
15
|
-
const insertedIndex = sheet.insertRule(rule.text, sheet.cssRules.length);
|
|
16
|
-
rule.native = sheet.cssRules[insertedIndex];
|
|
17
|
-
} catch (error) {
|
|
18
|
-
console.error(error);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
this.rules.push(rule);
|
|
22
|
-
this.css.rules.push(rule);
|
|
23
|
-
}
|
|
24
|
-
delete(name) {
|
|
25
|
-
const rule = this.rules.find((rule)=>rule.name === name);
|
|
26
|
-
if (!rule) return;
|
|
27
|
-
const sheet = this.css.style?.sheet;
|
|
28
|
-
if (sheet) {
|
|
29
|
-
const foundIndex = findNativeCSSRuleIndex(sheet.cssRules, rule.native);
|
|
30
|
-
if (foundIndex !== -1) {
|
|
31
|
-
sheet.deleteRule(foundIndex);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
this.rules.splice(this.rules.indexOf(rule), 1);
|
|
35
|
-
this.css.rules.splice(this.css.rules.indexOf(rule), 1);
|
|
36
|
-
return rule;
|
|
37
|
-
}
|
|
38
|
-
get text() {
|
|
39
|
-
return this.rules.map(({ text })=>text).join('');
|
|
40
|
-
}
|
|
41
|
-
reset() {
|
|
42
|
-
for (const rule of this.rules){
|
|
43
|
-
const foundIndex = this.css.rules.indexOf(rule);
|
|
44
|
-
if (foundIndex !== -1) {
|
|
45
|
-
this.css.rules.splice(foundIndex, 1);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
this.rules.length = 0;
|
|
49
|
-
this.tokenCounts.clear();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export { NonLayer as default };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _commonjsHelpers = require('../_virtual/_commonjsHelpers.cjs');
|
|
4
|
-
var cssEscape$1 = require('./css-escape2.cjs');
|
|
5
|
-
|
|
6
|
-
var cssEscapeExports = cssEscape$1.__require();
|
|
7
|
-
var cssEscape = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(cssEscapeExports);
|
|
8
|
-
|
|
9
|
-
module.exports = cssEscape;
|
|
File without changes
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs } from '../_virtual/_commonjsHelpers.mjs';
|
|
2
|
-
import { __require as requireCssEscape } from './css-escape2.mjs';
|
|
3
|
-
|
|
4
|
-
var cssEscapeExports = requireCssEscape();
|
|
5
|
-
var cssEscape = /*@__PURE__*/getDefaultExportFromCjs(cssEscapeExports);
|
|
6
|
-
|
|
7
|
-
export { cssEscape as default };
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _commonjsHelpers = require('../_virtual/_commonjsHelpers.cjs');
|
|
4
|
-
var cssEscape = require('../_virtual/css-escape.cjs');
|
|
5
|
-
|
|
6
|
-
var hasRequiredCssEscape;
|
|
7
|
-
|
|
8
|
-
function requireCssEscape () {
|
|
9
|
-
if (hasRequiredCssEscape) return cssEscape.__exports;
|
|
10
|
-
hasRequiredCssEscape = 1;
|
|
11
|
-
(()=>{
|
|
12
|
-
const root = typeof _commonjsHelpers.commonjsGlobal !== 'undefined' ? _commonjsHelpers.commonjsGlobal : window;
|
|
13
|
-
if (!root.CSS && !root.CSS?.escape) {
|
|
14
|
-
// https://drafts.csswg.org/cssom/#serialize-an-identifier
|
|
15
|
-
const cssEscape = function(value) {
|
|
16
|
-
if (arguments.length == 0) {
|
|
17
|
-
throw new TypeError('`CSS.escape` requires an argument.');
|
|
18
|
-
}
|
|
19
|
-
const string = String(value);
|
|
20
|
-
const length = string.length;
|
|
21
|
-
let index = -1;
|
|
22
|
-
let result = '';
|
|
23
|
-
let codeUnit;
|
|
24
|
-
const firstCodeUnit = string.charCodeAt(0);
|
|
25
|
-
if (// If the character is the first character and is a `-` (U+002D), and
|
|
26
|
-
// there is no second character, […]
|
|
27
|
-
length == 1 && firstCodeUnit == 0x002D) {
|
|
28
|
-
return '\\' + string;
|
|
29
|
-
}
|
|
30
|
-
while(++index < length){
|
|
31
|
-
codeUnit = string.charCodeAt(index);
|
|
32
|
-
// Note: there’s no need to special-case astral symbols, surrogate
|
|
33
|
-
// pairs, or lone surrogates.
|
|
34
|
-
// If the character is NULL (U+0000), then the REPLACEMENT CHARACTER
|
|
35
|
-
// (U+FFFD).
|
|
36
|
-
if (codeUnit == 0x0000) {
|
|
37
|
-
result += '\uFFFD';
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
if (// If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
|
|
41
|
-
// U+007F, […]
|
|
42
|
-
codeUnit >= 0x0001 && codeUnit <= 0x001F || codeUnit == 0x007F || // If the character is the first character and is in the range [0-9]
|
|
43
|
-
// (U+0030 to U+0039), […]
|
|
44
|
-
index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039 || // If the character is the second character and is in the range [0-9]
|
|
45
|
-
// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
|
|
46
|
-
index == 1 && codeUnit >= 0x0030 && codeUnit <= 0x0039 && firstCodeUnit == 0x002D) {
|
|
47
|
-
// https://drafts.csswg.org/cssom/#escape-a-character-as-code-point
|
|
48
|
-
result += '\\' + codeUnit.toString(16) + ' ';
|
|
49
|
-
continue;
|
|
50
|
-
}
|
|
51
|
-
// If the character is not handled by one of the above syntaxes and is
|
|
52
|
-
// greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or
|
|
53
|
-
// is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to
|
|
54
|
-
// U+005A), or [a-z] (U+0061 to U+007A), […]
|
|
55
|
-
if (codeUnit >= 0x0080 || codeUnit == 0x002D || codeUnit == 0x005F || codeUnit >= 0x0030 && codeUnit <= 0x0039 || codeUnit >= 0x0041 && codeUnit <= 0x005A || codeUnit >= 0x0061 && codeUnit <= 0x007A) {
|
|
56
|
-
// the character itself
|
|
57
|
-
result += string.charAt(index);
|
|
58
|
-
continue;
|
|
59
|
-
}
|
|
60
|
-
// Otherwise, the escaped character.
|
|
61
|
-
// https://drafts.csswg.org/cssom/#escape-a-character
|
|
62
|
-
result += '\\' + string.charAt(index);
|
|
63
|
-
}
|
|
64
|
-
return result;
|
|
65
|
-
};
|
|
66
|
-
if (!root.CSS) {
|
|
67
|
-
root.CSS = {};
|
|
68
|
-
}
|
|
69
|
-
root.CSS.escape = cssEscape;
|
|
70
|
-
globalThis.CSS.escape = cssEscape;
|
|
71
|
-
}
|
|
72
|
-
})();
|
|
73
|
-
return cssEscape.__exports;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
exports.__require = requireCssEscape;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { commonjsGlobal } from '../_virtual/_commonjsHelpers.mjs';
|
|
2
|
-
import { __exports as cssEscape } from '../_virtual/css-escape.mjs';
|
|
3
|
-
|
|
4
|
-
var hasRequiredCssEscape;
|
|
5
|
-
|
|
6
|
-
function requireCssEscape () {
|
|
7
|
-
if (hasRequiredCssEscape) return cssEscape;
|
|
8
|
-
hasRequiredCssEscape = 1;
|
|
9
|
-
(()=>{
|
|
10
|
-
const root = typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : window;
|
|
11
|
-
if (!root.CSS && !root.CSS?.escape) {
|
|
12
|
-
// https://drafts.csswg.org/cssom/#serialize-an-identifier
|
|
13
|
-
const cssEscape = function(value) {
|
|
14
|
-
if (arguments.length == 0) {
|
|
15
|
-
throw new TypeError('`CSS.escape` requires an argument.');
|
|
16
|
-
}
|
|
17
|
-
const string = String(value);
|
|
18
|
-
const length = string.length;
|
|
19
|
-
let index = -1;
|
|
20
|
-
let result = '';
|
|
21
|
-
let codeUnit;
|
|
22
|
-
const firstCodeUnit = string.charCodeAt(0);
|
|
23
|
-
if (// If the character is the first character and is a `-` (U+002D), and
|
|
24
|
-
// there is no second character, […]
|
|
25
|
-
length == 1 && firstCodeUnit == 0x002D) {
|
|
26
|
-
return '\\' + string;
|
|
27
|
-
}
|
|
28
|
-
while(++index < length){
|
|
29
|
-
codeUnit = string.charCodeAt(index);
|
|
30
|
-
// Note: there’s no need to special-case astral symbols, surrogate
|
|
31
|
-
// pairs, or lone surrogates.
|
|
32
|
-
// If the character is NULL (U+0000), then the REPLACEMENT CHARACTER
|
|
33
|
-
// (U+FFFD).
|
|
34
|
-
if (codeUnit == 0x0000) {
|
|
35
|
-
result += '\uFFFD';
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
if (// If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
|
|
39
|
-
// U+007F, […]
|
|
40
|
-
codeUnit >= 0x0001 && codeUnit <= 0x001F || codeUnit == 0x007F || // If the character is the first character and is in the range [0-9]
|
|
41
|
-
// (U+0030 to U+0039), […]
|
|
42
|
-
index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039 || // If the character is the second character and is in the range [0-9]
|
|
43
|
-
// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
|
|
44
|
-
index == 1 && codeUnit >= 0x0030 && codeUnit <= 0x0039 && firstCodeUnit == 0x002D) {
|
|
45
|
-
// https://drafts.csswg.org/cssom/#escape-a-character-as-code-point
|
|
46
|
-
result += '\\' + codeUnit.toString(16) + ' ';
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
// If the character is not handled by one of the above syntaxes and is
|
|
50
|
-
// greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or
|
|
51
|
-
// is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to
|
|
52
|
-
// U+005A), or [a-z] (U+0061 to U+007A), […]
|
|
53
|
-
if (codeUnit >= 0x0080 || codeUnit == 0x002D || codeUnit == 0x005F || codeUnit >= 0x0030 && codeUnit <= 0x0039 || codeUnit >= 0x0041 && codeUnit <= 0x005A || codeUnit >= 0x0061 && codeUnit <= 0x007A) {
|
|
54
|
-
// the character itself
|
|
55
|
-
result += string.charAt(index);
|
|
56
|
-
continue;
|
|
57
|
-
}
|
|
58
|
-
// Otherwise, the escaped character.
|
|
59
|
-
// https://drafts.csswg.org/cssom/#escape-a-character
|
|
60
|
-
result += '\\' + string.charAt(index);
|
|
61
|
-
}
|
|
62
|
-
return result;
|
|
63
|
-
};
|
|
64
|
-
if (!root.CSS) {
|
|
65
|
-
root.CSS = {};
|
|
66
|
-
}
|
|
67
|
-
root.CSS.escape = cssEscape;
|
|
68
|
-
globalThis.CSS.escape = cssEscape;
|
|
69
|
-
}
|
|
70
|
-
})();
|
|
71
|
-
return cssEscape;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export { requireCssEscape as __require };
|
package/dist/register-global.cjs
DELETED
package/dist/register-global.mjs
DELETED
package/dist/rule.cjs
DELETED
package/dist/rule.d.ts
DELETED
package/dist/rule.mjs
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function cssEscape(value) {
|
|
4
|
-
if (typeof CSS !== 'undefined') return CSS.escape(value);
|
|
5
|
-
if (arguments.length == 0) {
|
|
6
|
-
throw new TypeError('`CSS.escape` requires an argument.');
|
|
7
|
-
}
|
|
8
|
-
const string = String(value);
|
|
9
|
-
const length = string.length;
|
|
10
|
-
let index = -1;
|
|
11
|
-
let result = '';
|
|
12
|
-
let codeUnit;
|
|
13
|
-
const firstCodeUnit = string.charCodeAt(0);
|
|
14
|
-
if (// If the character is the first character and is a `-` (U+002D), and
|
|
15
|
-
// there is no second character, […]
|
|
16
|
-
length == 1 && firstCodeUnit == 0x002D) {
|
|
17
|
-
return '\\' + string;
|
|
18
|
-
}
|
|
19
|
-
while(++index < length){
|
|
20
|
-
codeUnit = string.charCodeAt(index);
|
|
21
|
-
// Note: there’s no need to special-case astral symbols, surrogate
|
|
22
|
-
// pairs, or lone surrogates.
|
|
23
|
-
// If the character is NULL (U+0000), then the REPLACEMENT CHARACTER
|
|
24
|
-
// (U+FFFD).
|
|
25
|
-
if (codeUnit == 0x0000) {
|
|
26
|
-
result += '\uFFFD';
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
if (// If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
|
|
30
|
-
// U+007F, […]
|
|
31
|
-
codeUnit >= 0x0001 && codeUnit <= 0x001F || codeUnit == 0x007F || // If the character is the first character and is in the range [0-9]
|
|
32
|
-
// (U+0030 to U+0039), […]
|
|
33
|
-
index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039 || // If the character is the second character and is in the range [0-9]
|
|
34
|
-
// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
|
|
35
|
-
index == 1 && codeUnit >= 0x0030 && codeUnit <= 0x0039 && firstCodeUnit == 0x002D) {
|
|
36
|
-
// https://drafts.csswg.org/cssom/#escape-a-character-as-code-point
|
|
37
|
-
result += '\\' + codeUnit.toString(16) + ' ';
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
// If the character is not handled by one of the above rules and is
|
|
41
|
-
// greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or
|
|
42
|
-
// is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to
|
|
43
|
-
// U+005A), or [a-z] (U+0061 to U+007A), […]
|
|
44
|
-
if (codeUnit >= 0x0080 || codeUnit == 0x002D || codeUnit == 0x005F || codeUnit >= 0x0030 && codeUnit <= 0x0039 || codeUnit >= 0x0041 && codeUnit <= 0x005A || codeUnit >= 0x0061 && codeUnit <= 0x007A) {
|
|
45
|
-
// the character itself
|
|
46
|
-
result += string.charAt(index);
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
// Otherwise, the escaped character.
|
|
50
|
-
// https://drafts.csswg.org/cssom/#escape-a-character
|
|
51
|
-
result += '\\' + string.charAt(index);
|
|
52
|
-
}
|
|
53
|
-
return result;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
module.exports = cssEscape;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
function cssEscape(value) {
|
|
2
|
-
if (typeof CSS !== 'undefined') return CSS.escape(value);
|
|
3
|
-
if (arguments.length == 0) {
|
|
4
|
-
throw new TypeError('`CSS.escape` requires an argument.');
|
|
5
|
-
}
|
|
6
|
-
const string = String(value);
|
|
7
|
-
const length = string.length;
|
|
8
|
-
let index = -1;
|
|
9
|
-
let result = '';
|
|
10
|
-
let codeUnit;
|
|
11
|
-
const firstCodeUnit = string.charCodeAt(0);
|
|
12
|
-
if (// If the character is the first character and is a `-` (U+002D), and
|
|
13
|
-
// there is no second character, […]
|
|
14
|
-
length == 1 && firstCodeUnit == 0x002D) {
|
|
15
|
-
return '\\' + string;
|
|
16
|
-
}
|
|
17
|
-
while(++index < length){
|
|
18
|
-
codeUnit = string.charCodeAt(index);
|
|
19
|
-
// Note: there’s no need to special-case astral symbols, surrogate
|
|
20
|
-
// pairs, or lone surrogates.
|
|
21
|
-
// If the character is NULL (U+0000), then the REPLACEMENT CHARACTER
|
|
22
|
-
// (U+FFFD).
|
|
23
|
-
if (codeUnit == 0x0000) {
|
|
24
|
-
result += '\uFFFD';
|
|
25
|
-
continue;
|
|
26
|
-
}
|
|
27
|
-
if (// If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
|
|
28
|
-
// U+007F, […]
|
|
29
|
-
codeUnit >= 0x0001 && codeUnit <= 0x001F || codeUnit == 0x007F || // If the character is the first character and is in the range [0-9]
|
|
30
|
-
// (U+0030 to U+0039), […]
|
|
31
|
-
index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039 || // If the character is the second character and is in the range [0-9]
|
|
32
|
-
// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
|
|
33
|
-
index == 1 && codeUnit >= 0x0030 && codeUnit <= 0x0039 && firstCodeUnit == 0x002D) {
|
|
34
|
-
// https://drafts.csswg.org/cssom/#escape-a-character-as-code-point
|
|
35
|
-
result += '\\' + codeUnit.toString(16) + ' ';
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
// If the character is not handled by one of the above rules and is
|
|
39
|
-
// greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or
|
|
40
|
-
// is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to
|
|
41
|
-
// U+005A), or [a-z] (U+0061 to U+007A), […]
|
|
42
|
-
if (codeUnit >= 0x0080 || codeUnit == 0x002D || codeUnit == 0x005F || codeUnit >= 0x0030 && codeUnit <= 0x0039 || codeUnit >= 0x0041 && codeUnit <= 0x005A || codeUnit >= 0x0061 && codeUnit <= 0x007A) {
|
|
43
|
-
// the character itself
|
|
44
|
-
result += string.charAt(index);
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
// Otherwise, the escaped character.
|
|
48
|
-
// https://drafts.csswg.org/cssom/#escape-a-character
|
|
49
|
-
result += '\\' + string.charAt(index);
|
|
50
|
-
}
|
|
51
|
-
return result;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { cssEscape as default };
|
package/dist/syntax-layer.cjs
DELETED
package/dist/syntax-layer.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import Layer from './layer';
|
|
2
|
-
declare const SyntaxLayer: {
|
|
3
|
-
new (...args: any[]): {
|
|
4
|
-
rules: import("./syntax-rule").SyntaxRule[];
|
|
5
|
-
insert(syntaxRule: import("./syntax-rule").SyntaxRule): number | undefined;
|
|
6
|
-
delete(key: string): import("./syntax-rule").SyntaxRule | undefined;
|
|
7
|
-
insertVariables(syntaxRule: import("./syntax-rule").SyntaxRule): void;
|
|
8
|
-
insertAnimations(syntaxRule: import("./syntax-rule").SyntaxRule): void;
|
|
9
|
-
readonly tokenCounts: Map<string, number>;
|
|
10
|
-
name: string;
|
|
11
|
-
css: import("./core").default;
|
|
12
|
-
attach(): void;
|
|
13
|
-
detach(): void;
|
|
14
|
-
reset(): void;
|
|
15
|
-
readonly text: string;
|
|
16
|
-
};
|
|
17
|
-
} & typeof Layer;
|
|
18
|
-
export default SyntaxLayer;
|