@universityofmaryland/web-model-library 1.0.1 → 1.0.2-beta.0
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 +1 -1
- package/dist/_virtual/___vite-browser-external.js +6 -7
- package/dist/_virtual/___vite-browser-external.js.map +1 -1
- package/dist/_virtual/__vite-browser-external.js +3 -2
- package/dist/_virtual/__vite-browser-external.js.map +1 -1
- package/dist/_virtual/_commonjsHelpers.js +4 -4
- package/dist/_virtual/_commonjsHelpers.js.map +1 -1
- package/dist/_virtual/index.js +7 -6
- package/dist/_virtual/index.js.map +1 -1
- package/dist/_virtual/picocolors.browser.js +3 -3
- package/dist/_virtual/picocolors.browser.js.map +1 -1
- package/dist/_virtual/postcss.js +7 -6
- package/dist/_virtual/postcss.js.map +1 -1
- package/dist/_virtual/symbols.js +3 -3
- package/dist/_virtual/symbols.js.map +1 -1
- package/dist/attributes/checks.d.ts +1 -0
- package/dist/attributes/checks.d.ts.map +1 -1
- package/dist/attributes/checks.js +317 -331
- package/dist/attributes/checks.js.map +1 -1
- package/dist/attributes/handler.d.ts +1 -2
- package/dist/attributes/handler.d.ts.map +1 -1
- package/dist/attributes/handler.js +20 -19
- package/dist/attributes/handler.js.map +1 -1
- package/dist/attributes/index.d.ts +3 -3
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes/names.d.ts +3 -3
- package/dist/attributes/names.d.ts.map +1 -1
- package/dist/attributes/names.js +5 -3
- package/dist/attributes/names.js.map +1 -1
- package/dist/attributes/values.d.ts +10 -11
- package/dist/attributes/values.d.ts.map +1 -1
- package/dist/attributes/values.js +3 -2
- package/dist/attributes/values.js.map +1 -1
- package/dist/attributes.js +21 -21
- package/dist/attributes.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/model.js +7 -7
- package/dist/model.js.map +1 -1
- package/dist/node_modules/nanoid/non-secure/index.js +3 -3
- package/dist/node_modules/nanoid/non-secure/index.js.map +1 -1
- package/dist/node_modules/picocolors/picocolors.browser.js +8 -8
- package/dist/node_modules/picocolors/picocolors.browser.js.map +1 -1
- package/dist/node_modules/postcss/lib/at-rule.js +5 -5
- package/dist/node_modules/postcss/lib/at-rule.js.map +1 -1
- package/dist/node_modules/postcss/lib/comment.js +5 -5
- package/dist/node_modules/postcss/lib/comment.js.map +1 -1
- package/dist/node_modules/postcss/lib/container.js +69 -62
- package/dist/node_modules/postcss/lib/container.js.map +1 -1
- package/dist/node_modules/postcss/lib/css-syntax-error.js +30 -19
- package/dist/node_modules/postcss/lib/css-syntax-error.js.map +1 -1
- package/dist/node_modules/postcss/lib/declaration.js +8 -8
- package/dist/node_modules/postcss/lib/declaration.js.map +1 -1
- package/dist/node_modules/postcss/lib/document.js +5 -5
- package/dist/node_modules/postcss/lib/document.js.map +1 -1
- package/dist/node_modules/postcss/lib/fromJSON.js +19 -19
- package/dist/node_modules/postcss/lib/fromJSON.js.map +1 -1
- package/dist/node_modules/postcss/lib/input.js +51 -37
- package/dist/node_modules/postcss/lib/input.js.map +1 -1
- package/dist/node_modules/postcss/lib/lazy-result.js +67 -67
- package/dist/node_modules/postcss/lib/lazy-result.js.map +1 -1
- package/dist/node_modules/postcss/lib/list.js +3 -3
- package/dist/node_modules/postcss/lib/list.js.map +1 -1
- package/dist/node_modules/postcss/lib/map-generator.js +27 -18
- package/dist/node_modules/postcss/lib/map-generator.js.map +1 -1
- package/dist/node_modules/postcss/lib/no-work-result.js +54 -51
- package/dist/node_modules/postcss/lib/no-work-result.js.map +1 -1
- package/dist/node_modules/postcss/lib/node.js +91 -38
- package/dist/node_modules/postcss/lib/node.js.map +1 -1
- package/dist/node_modules/postcss/lib/parse.js +13 -13
- package/dist/node_modules/postcss/lib/parse.js.map +1 -1
- package/dist/node_modules/postcss/lib/parser.js +21 -20
- package/dist/node_modules/postcss/lib/parser.js.map +1 -1
- package/dist/node_modules/postcss/lib/postcss.js +4 -3
- package/dist/node_modules/postcss/lib/postcss.js.map +1 -1
- package/dist/node_modules/postcss/lib/postcss2.js +43 -43
- package/dist/node_modules/postcss/lib/postcss2.js.map +1 -1
- package/dist/node_modules/postcss/lib/previous-map.js +14 -12
- package/dist/node_modules/postcss/lib/previous-map.js.map +1 -1
- package/dist/node_modules/postcss/lib/processor.js +13 -13
- package/dist/node_modules/postcss/lib/processor.js.map +1 -1
- package/dist/node_modules/postcss/lib/result.js +12 -12
- package/dist/node_modules/postcss/lib/result.js.map +1 -1
- package/dist/node_modules/postcss/lib/root.js +5 -5
- package/dist/node_modules/postcss/lib/root.js.map +1 -1
- package/dist/node_modules/postcss/lib/rule.js +13 -13
- package/dist/node_modules/postcss/lib/rule.js.map +1 -1
- package/dist/node_modules/postcss/lib/stringifier.js +3 -3
- package/dist/node_modules/postcss/lib/stringifier.js.map +1 -1
- package/dist/node_modules/postcss/lib/stringify.js +5 -5
- package/dist/node_modules/postcss/lib/stringify.js.map +1 -1
- package/dist/node_modules/postcss/lib/symbols.js +8 -8
- package/dist/node_modules/postcss/lib/symbols.js.map +1 -1
- package/dist/node_modules/postcss/lib/tokenize.js +5 -5
- package/dist/node_modules/postcss/lib/tokenize.js.map +1 -1
- package/dist/node_modules/postcss/lib/warning.js +3 -3
- package/dist/node_modules/postcss/lib/warning.js.map +1 -1
- package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.js +3 -3
- package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.js.map +1 -1
- package/dist/slots/create.js +3 -3
- package/dist/slots/create.js.map +1 -1
- package/dist/slots/element.js +3 -3
- package/dist/slots/element.js.map +1 -1
- package/dist/slots/index.d.ts +15 -16
- package/dist/slots/index.d.ts.map +1 -1
- package/dist/slots/mapping.js +3 -3
- package/dist/slots/mapping.js.map +1 -1
- package/dist/slots.d.ts +0 -4
- package/dist/slots.js +41 -40
- package/dist/slots.js.map +1 -1
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/index.d.ts.map +1 -1
- package/dist/utilities/lifecycle.js +4 -4
- package/dist/utilities/lifecycle.js.map +1 -1
- package/dist/utilities/register.js +6 -6
- package/dist/utilities/register.js.map +1 -1
- package/dist/utilities/styles.d.ts +1 -2
- package/dist/utilities/styles.d.ts.map +1 -1
- package/dist/utilities/styles.js +15 -10
- package/dist/utilities/styles.js.map +1 -1
- package/dist/utilities.js +10 -10
- package/dist/utilities.js.map +1 -1
- package/package.json +13 -12
- package/dist/_virtual/___vite-browser-external.mjs +0 -7
- package/dist/_virtual/___vite-browser-external.mjs.map +0 -1
- package/dist/_virtual/__vite-browser-external.mjs +0 -5
- package/dist/_virtual/__vite-browser-external.mjs.map +0 -1
- package/dist/_virtual/_commonjsHelpers.mjs +0 -37
- package/dist/_virtual/_commonjsHelpers.mjs.map +0 -1
- package/dist/_virtual/index.mjs +0 -8
- package/dist/_virtual/index.mjs.map +0 -1
- package/dist/_virtual/picocolors.browser.mjs +0 -5
- package/dist/_virtual/picocolors.browser.mjs.map +0 -1
- package/dist/_virtual/postcss.mjs +0 -8
- package/dist/_virtual/postcss.mjs.map +0 -1
- package/dist/_virtual/symbols.mjs +0 -5
- package/dist/_virtual/symbols.mjs.map +0 -1
- package/dist/attributes/checks.mjs +0 -752
- package/dist/attributes/checks.mjs.map +0 -1
- package/dist/attributes/handler.mjs +0 -206
- package/dist/attributes/handler.mjs.map +0 -1
- package/dist/attributes/names.mjs +0 -143
- package/dist/attributes/names.mjs.map +0 -1
- package/dist/attributes/values.mjs +0 -84
- package/dist/attributes/values.mjs.map +0 -1
- package/dist/attributes.mjs +0 -22
- package/dist/attributes.mjs.map +0 -1
- package/dist/index.mjs +0 -13
- package/dist/index.mjs.map +0 -1
- package/dist/model.mjs +0 -259
- package/dist/model.mjs.map +0 -1
- package/dist/node_modules/nanoid/non-secure/index.mjs +0 -31
- package/dist/node_modules/nanoid/non-secure/index.mjs.map +0 -1
- package/dist/node_modules/picocolors/picocolors.browser.mjs +0 -17
- package/dist/node_modules/picocolors/picocolors.browser.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/at-rule.mjs +0 -30
- package/dist/node_modules/postcss/lib/at-rule.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/comment.mjs +0 -21
- package/dist/node_modules/postcss/lib/comment.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/container.mjs +0 -383
- package/dist/node_modules/postcss/lib/container.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/css-syntax-error.mjs +0 -92
- package/dist/node_modules/postcss/lib/css-syntax-error.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/declaration.mjs +0 -27
- package/dist/node_modules/postcss/lib/declaration.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/document.mjs +0 -34
- package/dist/node_modules/postcss/lib/document.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/fromJSON.mjs +0 -67
- package/dist/node_modules/postcss/lib/fromJSON.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/input.mjs +0 -216
- package/dist/node_modules/postcss/lib/input.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/lazy-result.mjs +0 -467
- package/dist/node_modules/postcss/lib/lazy-result.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/list.mjs +0 -60
- package/dist/node_modules/postcss/lib/list.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/map-generator.mjs +0 -314
- package/dist/node_modules/postcss/lib/map-generator.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/no-work-result.mjs +0 -113
- package/dist/node_modules/postcss/lib/no-work-result.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/node.mjs +0 -335
- package/dist/node_modules/postcss/lib/node.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/parse.mjs +0 -30
- package/dist/node_modules/postcss/lib/parse.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/parser.mjs +0 -543
- package/dist/node_modules/postcss/lib/parser.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/postcss.mjs +0 -29
- package/dist/node_modules/postcss/lib/postcss.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/postcss2.mjs +0 -110
- package/dist/node_modules/postcss/lib/postcss2.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/previous-map.mjs +0 -123
- package/dist/node_modules/postcss/lib/previous-map.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/processor.mjs +0 -61
- package/dist/node_modules/postcss/lib/processor.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/result.mjs +0 -44
- package/dist/node_modules/postcss/lib/result.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/root.mjs +0 -58
- package/dist/node_modules/postcss/lib/root.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/rule.mjs +0 -33
- package/dist/node_modules/postcss/lib/rule.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/stringifier.mjs +0 -308
- package/dist/node_modules/postcss/lib/stringifier.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/stringify.mjs +0 -19
- package/dist/node_modules/postcss/lib/stringify.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/symbols.mjs +0 -13
- package/dist/node_modules/postcss/lib/symbols.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/tokenize.mjs +0 -219
- package/dist/node_modules/postcss/lib/tokenize.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/warning.mjs +0 -40
- package/dist/node_modules/postcss/lib/warning.mjs.map +0 -1
- package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.mjs +0 -130
- package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.mjs.map +0 -1
- package/dist/slots/create.mjs +0 -50
- package/dist/slots/create.mjs.map +0 -1
- package/dist/slots/element.mjs +0 -42
- package/dist/slots/element.mjs.map +0 -1
- package/dist/slots/mapping.mjs +0 -101
- package/dist/slots/mapping.mjs.map +0 -1
- package/dist/slots.mjs +0 -78
- package/dist/slots.mjs.map +0 -1
- package/dist/utilities/lifecycle.mjs +0 -21
- package/dist/utilities/lifecycle.mjs.map +0 -1
- package/dist/utilities/register.mjs +0 -32
- package/dist/utilities/register.mjs.map +0 -1
- package/dist/utilities/styles.mjs +0 -80
- package/dist/utilities/styles.mjs.map +0 -1
- package/dist/utilities.mjs +0 -11
- package/dist/utilities.mjs.map +0 -1
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
import { __require as requireSymbols } from "./symbols.mjs";
|
|
2
|
-
import { __require as requireDeclaration } from "./declaration.mjs";
|
|
3
|
-
import { __require as requireComment } from "./comment.mjs";
|
|
4
|
-
import { __require as requireNode } from "./node.mjs";
|
|
5
|
-
var container;
|
|
6
|
-
var hasRequiredContainer;
|
|
7
|
-
function requireContainer() {
|
|
8
|
-
if (hasRequiredContainer) return container;
|
|
9
|
-
hasRequiredContainer = 1;
|
|
10
|
-
let { isClean, my } = requireSymbols();
|
|
11
|
-
let Declaration = requireDeclaration();
|
|
12
|
-
let Comment = requireComment();
|
|
13
|
-
let Node = requireNode();
|
|
14
|
-
let parse, Rule, AtRule, Root;
|
|
15
|
-
function cleanSource(nodes) {
|
|
16
|
-
return nodes.map((i) => {
|
|
17
|
-
if (i.nodes) i.nodes = cleanSource(i.nodes);
|
|
18
|
-
delete i.source;
|
|
19
|
-
return i;
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
function markDirtyUp(node) {
|
|
23
|
-
node[isClean] = false;
|
|
24
|
-
if (node.proxyOf.nodes) {
|
|
25
|
-
for (let i of node.proxyOf.nodes) {
|
|
26
|
-
markDirtyUp(i);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
class Container extends Node {
|
|
31
|
-
append(...children) {
|
|
32
|
-
for (let child of children) {
|
|
33
|
-
let nodes = this.normalize(child, this.last);
|
|
34
|
-
for (let node of nodes) this.proxyOf.nodes.push(node);
|
|
35
|
-
}
|
|
36
|
-
this.markDirty();
|
|
37
|
-
return this;
|
|
38
|
-
}
|
|
39
|
-
cleanRaws(keepBetween) {
|
|
40
|
-
super.cleanRaws(keepBetween);
|
|
41
|
-
if (this.nodes) {
|
|
42
|
-
for (let node of this.nodes) node.cleanRaws(keepBetween);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
each(callback) {
|
|
46
|
-
if (!this.proxyOf.nodes) return void 0;
|
|
47
|
-
let iterator = this.getIterator();
|
|
48
|
-
let index, result;
|
|
49
|
-
while (this.indexes[iterator] < this.proxyOf.nodes.length) {
|
|
50
|
-
index = this.indexes[iterator];
|
|
51
|
-
result = callback(this.proxyOf.nodes[index], index);
|
|
52
|
-
if (result === false) break;
|
|
53
|
-
this.indexes[iterator] += 1;
|
|
54
|
-
}
|
|
55
|
-
delete this.indexes[iterator];
|
|
56
|
-
return result;
|
|
57
|
-
}
|
|
58
|
-
every(condition) {
|
|
59
|
-
return this.nodes.every(condition);
|
|
60
|
-
}
|
|
61
|
-
getIterator() {
|
|
62
|
-
if (!this.lastEach) this.lastEach = 0;
|
|
63
|
-
if (!this.indexes) this.indexes = {};
|
|
64
|
-
this.lastEach += 1;
|
|
65
|
-
let iterator = this.lastEach;
|
|
66
|
-
this.indexes[iterator] = 0;
|
|
67
|
-
return iterator;
|
|
68
|
-
}
|
|
69
|
-
getProxyProcessor() {
|
|
70
|
-
return {
|
|
71
|
-
get(node, prop) {
|
|
72
|
-
if (prop === "proxyOf") {
|
|
73
|
-
return node;
|
|
74
|
-
} else if (!node[prop]) {
|
|
75
|
-
return node[prop];
|
|
76
|
-
} else if (prop === "each" || typeof prop === "string" && prop.startsWith("walk")) {
|
|
77
|
-
return (...args) => {
|
|
78
|
-
return node[prop](
|
|
79
|
-
...args.map((i) => {
|
|
80
|
-
if (typeof i === "function") {
|
|
81
|
-
return (child, index) => i(child.toProxy(), index);
|
|
82
|
-
} else {
|
|
83
|
-
return i;
|
|
84
|
-
}
|
|
85
|
-
})
|
|
86
|
-
);
|
|
87
|
-
};
|
|
88
|
-
} else if (prop === "every" || prop === "some") {
|
|
89
|
-
return (cb) => {
|
|
90
|
-
return node[prop](
|
|
91
|
-
(child, ...other) => cb(child.toProxy(), ...other)
|
|
92
|
-
);
|
|
93
|
-
};
|
|
94
|
-
} else if (prop === "root") {
|
|
95
|
-
return () => node.root().toProxy();
|
|
96
|
-
} else if (prop === "nodes") {
|
|
97
|
-
return node.nodes.map((i) => i.toProxy());
|
|
98
|
-
} else if (prop === "first" || prop === "last") {
|
|
99
|
-
return node[prop].toProxy();
|
|
100
|
-
} else {
|
|
101
|
-
return node[prop];
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
set(node, prop, value) {
|
|
105
|
-
if (node[prop] === value) return true;
|
|
106
|
-
node[prop] = value;
|
|
107
|
-
if (prop === "name" || prop === "params" || prop === "selector") {
|
|
108
|
-
node.markDirty();
|
|
109
|
-
}
|
|
110
|
-
return true;
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
index(child) {
|
|
115
|
-
if (typeof child === "number") return child;
|
|
116
|
-
if (child.proxyOf) child = child.proxyOf;
|
|
117
|
-
return this.proxyOf.nodes.indexOf(child);
|
|
118
|
-
}
|
|
119
|
-
insertAfter(exist, add) {
|
|
120
|
-
let existIndex = this.index(exist);
|
|
121
|
-
let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
|
|
122
|
-
existIndex = this.index(exist);
|
|
123
|
-
for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node);
|
|
124
|
-
let index;
|
|
125
|
-
for (let id in this.indexes) {
|
|
126
|
-
index = this.indexes[id];
|
|
127
|
-
if (existIndex < index) {
|
|
128
|
-
this.indexes[id] = index + nodes.length;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
this.markDirty();
|
|
132
|
-
return this;
|
|
133
|
-
}
|
|
134
|
-
insertBefore(exist, add) {
|
|
135
|
-
let existIndex = this.index(exist);
|
|
136
|
-
let type = existIndex === 0 ? "prepend" : false;
|
|
137
|
-
let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse();
|
|
138
|
-
existIndex = this.index(exist);
|
|
139
|
-
for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node);
|
|
140
|
-
let index;
|
|
141
|
-
for (let id in this.indexes) {
|
|
142
|
-
index = this.indexes[id];
|
|
143
|
-
if (existIndex <= index) {
|
|
144
|
-
this.indexes[id] = index + nodes.length;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
this.markDirty();
|
|
148
|
-
return this;
|
|
149
|
-
}
|
|
150
|
-
normalize(nodes, sample) {
|
|
151
|
-
if (typeof nodes === "string") {
|
|
152
|
-
nodes = cleanSource(parse(nodes).nodes);
|
|
153
|
-
} else if (Array.isArray(nodes)) {
|
|
154
|
-
nodes = nodes.slice(0);
|
|
155
|
-
for (let i of nodes) {
|
|
156
|
-
if (i.parent) i.parent.removeChild(i, "ignore");
|
|
157
|
-
}
|
|
158
|
-
} else if (nodes.type === "root" && this.type !== "document") {
|
|
159
|
-
nodes = nodes.nodes.slice(0);
|
|
160
|
-
for (let i of nodes) {
|
|
161
|
-
if (i.parent) i.parent.removeChild(i, "ignore");
|
|
162
|
-
}
|
|
163
|
-
} else if (nodes.type) {
|
|
164
|
-
nodes = [nodes];
|
|
165
|
-
} else if (nodes.prop) {
|
|
166
|
-
if (typeof nodes.value === "undefined") {
|
|
167
|
-
throw new Error("Value field is missed in node creation");
|
|
168
|
-
} else if (typeof nodes.value !== "string") {
|
|
169
|
-
nodes.value = String(nodes.value);
|
|
170
|
-
}
|
|
171
|
-
nodes = [new Declaration(nodes)];
|
|
172
|
-
} else if (nodes.selector) {
|
|
173
|
-
nodes = [new Rule(nodes)];
|
|
174
|
-
} else if (nodes.name) {
|
|
175
|
-
nodes = [new AtRule(nodes)];
|
|
176
|
-
} else if (nodes.text) {
|
|
177
|
-
nodes = [new Comment(nodes)];
|
|
178
|
-
} else {
|
|
179
|
-
throw new Error("Unknown node type in node creation");
|
|
180
|
-
}
|
|
181
|
-
let processed = nodes.map((i) => {
|
|
182
|
-
if (!i[my]) Container.rebuild(i);
|
|
183
|
-
i = i.proxyOf;
|
|
184
|
-
if (i.parent) i.parent.removeChild(i);
|
|
185
|
-
if (i[isClean]) markDirtyUp(i);
|
|
186
|
-
if (typeof i.raws.before === "undefined") {
|
|
187
|
-
if (sample && typeof sample.raws.before !== "undefined") {
|
|
188
|
-
i.raws.before = sample.raws.before.replace(/\S/g, "");
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
i.parent = this.proxyOf;
|
|
192
|
-
return i;
|
|
193
|
-
});
|
|
194
|
-
return processed;
|
|
195
|
-
}
|
|
196
|
-
prepend(...children) {
|
|
197
|
-
children = children.reverse();
|
|
198
|
-
for (let child of children) {
|
|
199
|
-
let nodes = this.normalize(child, this.first, "prepend").reverse();
|
|
200
|
-
for (let node of nodes) this.proxyOf.nodes.unshift(node);
|
|
201
|
-
for (let id in this.indexes) {
|
|
202
|
-
this.indexes[id] = this.indexes[id] + nodes.length;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
this.markDirty();
|
|
206
|
-
return this;
|
|
207
|
-
}
|
|
208
|
-
push(child) {
|
|
209
|
-
child.parent = this;
|
|
210
|
-
this.proxyOf.nodes.push(child);
|
|
211
|
-
return this;
|
|
212
|
-
}
|
|
213
|
-
removeAll() {
|
|
214
|
-
for (let node of this.proxyOf.nodes) node.parent = void 0;
|
|
215
|
-
this.proxyOf.nodes = [];
|
|
216
|
-
this.markDirty();
|
|
217
|
-
return this;
|
|
218
|
-
}
|
|
219
|
-
removeChild(child) {
|
|
220
|
-
child = this.index(child);
|
|
221
|
-
this.proxyOf.nodes[child].parent = void 0;
|
|
222
|
-
this.proxyOf.nodes.splice(child, 1);
|
|
223
|
-
let index;
|
|
224
|
-
for (let id in this.indexes) {
|
|
225
|
-
index = this.indexes[id];
|
|
226
|
-
if (index >= child) {
|
|
227
|
-
this.indexes[id] = index - 1;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
this.markDirty();
|
|
231
|
-
return this;
|
|
232
|
-
}
|
|
233
|
-
replaceValues(pattern, opts, callback) {
|
|
234
|
-
if (!callback) {
|
|
235
|
-
callback = opts;
|
|
236
|
-
opts = {};
|
|
237
|
-
}
|
|
238
|
-
this.walkDecls((decl) => {
|
|
239
|
-
if (opts.props && !opts.props.includes(decl.prop)) return;
|
|
240
|
-
if (opts.fast && !decl.value.includes(opts.fast)) return;
|
|
241
|
-
decl.value = decl.value.replace(pattern, callback);
|
|
242
|
-
});
|
|
243
|
-
this.markDirty();
|
|
244
|
-
return this;
|
|
245
|
-
}
|
|
246
|
-
some(condition) {
|
|
247
|
-
return this.nodes.some(condition);
|
|
248
|
-
}
|
|
249
|
-
walk(callback) {
|
|
250
|
-
return this.each((child, i) => {
|
|
251
|
-
let result;
|
|
252
|
-
try {
|
|
253
|
-
result = callback(child, i);
|
|
254
|
-
} catch (e) {
|
|
255
|
-
throw child.addToError(e);
|
|
256
|
-
}
|
|
257
|
-
if (result !== false && child.walk) {
|
|
258
|
-
result = child.walk(callback);
|
|
259
|
-
}
|
|
260
|
-
return result;
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
walkAtRules(name, callback) {
|
|
264
|
-
if (!callback) {
|
|
265
|
-
callback = name;
|
|
266
|
-
return this.walk((child, i) => {
|
|
267
|
-
if (child.type === "atrule") {
|
|
268
|
-
return callback(child, i);
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
if (name instanceof RegExp) {
|
|
273
|
-
return this.walk((child, i) => {
|
|
274
|
-
if (child.type === "atrule" && name.test(child.name)) {
|
|
275
|
-
return callback(child, i);
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
return this.walk((child, i) => {
|
|
280
|
-
if (child.type === "atrule" && child.name === name) {
|
|
281
|
-
return callback(child, i);
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
walkComments(callback) {
|
|
286
|
-
return this.walk((child, i) => {
|
|
287
|
-
if (child.type === "comment") {
|
|
288
|
-
return callback(child, i);
|
|
289
|
-
}
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
walkDecls(prop, callback) {
|
|
293
|
-
if (!callback) {
|
|
294
|
-
callback = prop;
|
|
295
|
-
return this.walk((child, i) => {
|
|
296
|
-
if (child.type === "decl") {
|
|
297
|
-
return callback(child, i);
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
if (prop instanceof RegExp) {
|
|
302
|
-
return this.walk((child, i) => {
|
|
303
|
-
if (child.type === "decl" && prop.test(child.prop)) {
|
|
304
|
-
return callback(child, i);
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
return this.walk((child, i) => {
|
|
309
|
-
if (child.type === "decl" && child.prop === prop) {
|
|
310
|
-
return callback(child, i);
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
walkRules(selector, callback) {
|
|
315
|
-
if (!callback) {
|
|
316
|
-
callback = selector;
|
|
317
|
-
return this.walk((child, i) => {
|
|
318
|
-
if (child.type === "rule") {
|
|
319
|
-
return callback(child, i);
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
if (selector instanceof RegExp) {
|
|
324
|
-
return this.walk((child, i) => {
|
|
325
|
-
if (child.type === "rule" && selector.test(child.selector)) {
|
|
326
|
-
return callback(child, i);
|
|
327
|
-
}
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
return this.walk((child, i) => {
|
|
331
|
-
if (child.type === "rule" && child.selector === selector) {
|
|
332
|
-
return callback(child, i);
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
get first() {
|
|
337
|
-
if (!this.proxyOf.nodes) return void 0;
|
|
338
|
-
return this.proxyOf.nodes[0];
|
|
339
|
-
}
|
|
340
|
-
get last() {
|
|
341
|
-
if (!this.proxyOf.nodes) return void 0;
|
|
342
|
-
return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
Container.registerParse = (dependant) => {
|
|
346
|
-
parse = dependant;
|
|
347
|
-
};
|
|
348
|
-
Container.registerRule = (dependant) => {
|
|
349
|
-
Rule = dependant;
|
|
350
|
-
};
|
|
351
|
-
Container.registerAtRule = (dependant) => {
|
|
352
|
-
AtRule = dependant;
|
|
353
|
-
};
|
|
354
|
-
Container.registerRoot = (dependant) => {
|
|
355
|
-
Root = dependant;
|
|
356
|
-
};
|
|
357
|
-
container = Container;
|
|
358
|
-
Container.default = Container;
|
|
359
|
-
Container.rebuild = (node) => {
|
|
360
|
-
if (node.type === "atrule") {
|
|
361
|
-
Object.setPrototypeOf(node, AtRule.prototype);
|
|
362
|
-
} else if (node.type === "rule") {
|
|
363
|
-
Object.setPrototypeOf(node, Rule.prototype);
|
|
364
|
-
} else if (node.type === "decl") {
|
|
365
|
-
Object.setPrototypeOf(node, Declaration.prototype);
|
|
366
|
-
} else if (node.type === "comment") {
|
|
367
|
-
Object.setPrototypeOf(node, Comment.prototype);
|
|
368
|
-
} else if (node.type === "root") {
|
|
369
|
-
Object.setPrototypeOf(node, Root.prototype);
|
|
370
|
-
}
|
|
371
|
-
node[my] = true;
|
|
372
|
-
if (node.nodes) {
|
|
373
|
-
node.nodes.forEach((child) => {
|
|
374
|
-
Container.rebuild(child);
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
};
|
|
378
|
-
return container;
|
|
379
|
-
}
|
|
380
|
-
export {
|
|
381
|
-
requireContainer as __require
|
|
382
|
-
};
|
|
383
|
-
//# sourceMappingURL=container.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"container.mjs","sources":["../../../../../../node_modules/postcss/lib/container.js"],"sourcesContent":["'use strict'\n\nlet { isClean, my } = require('./symbols')\nlet Declaration = require('./declaration')\nlet Comment = require('./comment')\nlet Node = require('./node')\n\nlet parse, Rule, AtRule, Root\n\nfunction cleanSource(nodes) {\n return nodes.map(i => {\n if (i.nodes) i.nodes = cleanSource(i.nodes)\n delete i.source\n return i\n })\n}\n\nfunction markDirtyUp(node) {\n node[isClean] = false\n if (node.proxyOf.nodes) {\n for (let i of node.proxyOf.nodes) {\n markDirtyUp(i)\n }\n }\n}\n\nclass Container extends Node {\n append(...children) {\n for (let child of children) {\n let nodes = this.normalize(child, this.last)\n for (let node of nodes) this.proxyOf.nodes.push(node)\n }\n\n this.markDirty()\n\n return this\n }\n\n cleanRaws(keepBetween) {\n super.cleanRaws(keepBetween)\n if (this.nodes) {\n for (let node of this.nodes) node.cleanRaws(keepBetween)\n }\n }\n\n each(callback) {\n if (!this.proxyOf.nodes) return undefined\n let iterator = this.getIterator()\n\n let index, result\n while (this.indexes[iterator] < this.proxyOf.nodes.length) {\n index = this.indexes[iterator]\n result = callback(this.proxyOf.nodes[index], index)\n if (result === false) break\n\n this.indexes[iterator] += 1\n }\n\n delete this.indexes[iterator]\n return result\n }\n\n every(condition) {\n return this.nodes.every(condition)\n }\n\n getIterator() {\n if (!this.lastEach) this.lastEach = 0\n if (!this.indexes) this.indexes = {}\n\n this.lastEach += 1\n let iterator = this.lastEach\n this.indexes[iterator] = 0\n\n return iterator\n }\n\n getProxyProcessor() {\n return {\n get(node, prop) {\n if (prop === 'proxyOf') {\n return node\n } else if (!node[prop]) {\n return node[prop]\n } else if (\n prop === 'each' ||\n (typeof prop === 'string' && prop.startsWith('walk'))\n ) {\n return (...args) => {\n return node[prop](\n ...args.map(i => {\n if (typeof i === 'function') {\n return (child, index) => i(child.toProxy(), index)\n } else {\n return i\n }\n })\n )\n }\n } else if (prop === 'every' || prop === 'some') {\n return cb => {\n return node[prop]((child, ...other) =>\n cb(child.toProxy(), ...other)\n )\n }\n } else if (prop === 'root') {\n return () => node.root().toProxy()\n } else if (prop === 'nodes') {\n return node.nodes.map(i => i.toProxy())\n } else if (prop === 'first' || prop === 'last') {\n return node[prop].toProxy()\n } else {\n return node[prop]\n }\n },\n\n set(node, prop, value) {\n if (node[prop] === value) return true\n node[prop] = value\n if (prop === 'name' || prop === 'params' || prop === 'selector') {\n node.markDirty()\n }\n return true\n }\n }\n }\n\n index(child) {\n if (typeof child === 'number') return child\n if (child.proxyOf) child = child.proxyOf\n return this.proxyOf.nodes.indexOf(child)\n }\n\n insertAfter(exist, add) {\n let existIndex = this.index(exist)\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()\n existIndex = this.index(exist)\n for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (existIndex < index) {\n this.indexes[id] = index + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n insertBefore(exist, add) {\n let existIndex = this.index(exist)\n let type = existIndex === 0 ? 'prepend' : false\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse()\n existIndex = this.index(exist)\n for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (existIndex <= index) {\n this.indexes[id] = index + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n normalize(nodes, sample) {\n if (typeof nodes === 'string') {\n nodes = cleanSource(parse(nodes).nodes)\n } else if (Array.isArray(nodes)) {\n nodes = nodes.slice(0)\n for (let i of nodes) {\n if (i.parent) i.parent.removeChild(i, 'ignore')\n }\n } else if (nodes.type === 'root' && this.type !== 'document') {\n nodes = nodes.nodes.slice(0)\n for (let i of nodes) {\n if (i.parent) i.parent.removeChild(i, 'ignore')\n }\n } else if (nodes.type) {\n nodes = [nodes]\n } else if (nodes.prop) {\n if (typeof nodes.value === 'undefined') {\n throw new Error('Value field is missed in node creation')\n } else if (typeof nodes.value !== 'string') {\n nodes.value = String(nodes.value)\n }\n nodes = [new Declaration(nodes)]\n } else if (nodes.selector) {\n nodes = [new Rule(nodes)]\n } else if (nodes.name) {\n nodes = [new AtRule(nodes)]\n } else if (nodes.text) {\n nodes = [new Comment(nodes)]\n } else {\n throw new Error('Unknown node type in node creation')\n }\n\n let processed = nodes.map(i => {\n /* c8 ignore next */\n if (!i[my]) Container.rebuild(i)\n i = i.proxyOf\n if (i.parent) i.parent.removeChild(i)\n if (i[isClean]) markDirtyUp(i)\n if (typeof i.raws.before === 'undefined') {\n if (sample && typeof sample.raws.before !== 'undefined') {\n i.raws.before = sample.raws.before.replace(/\\S/g, '')\n }\n }\n i.parent = this.proxyOf\n return i\n })\n\n return processed\n }\n\n prepend(...children) {\n children = children.reverse()\n for (let child of children) {\n let nodes = this.normalize(child, this.first, 'prepend').reverse()\n for (let node of nodes) this.proxyOf.nodes.unshift(node)\n for (let id in this.indexes) {\n this.indexes[id] = this.indexes[id] + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n push(child) {\n child.parent = this\n this.proxyOf.nodes.push(child)\n return this\n }\n\n removeAll() {\n for (let node of this.proxyOf.nodes) node.parent = undefined\n this.proxyOf.nodes = []\n\n this.markDirty()\n\n return this\n }\n\n removeChild(child) {\n child = this.index(child)\n this.proxyOf.nodes[child].parent = undefined\n this.proxyOf.nodes.splice(child, 1)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (index >= child) {\n this.indexes[id] = index - 1\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n replaceValues(pattern, opts, callback) {\n if (!callback) {\n callback = opts\n opts = {}\n }\n\n this.walkDecls(decl => {\n if (opts.props && !opts.props.includes(decl.prop)) return\n if (opts.fast && !decl.value.includes(opts.fast)) return\n\n decl.value = decl.value.replace(pattern, callback)\n })\n\n this.markDirty()\n\n return this\n }\n\n some(condition) {\n return this.nodes.some(condition)\n }\n\n walk(callback) {\n return this.each((child, i) => {\n let result\n try {\n result = callback(child, i)\n } catch (e) {\n throw child.addToError(e)\n }\n if (result !== false && child.walk) {\n result = child.walk(callback)\n }\n\n return result\n })\n }\n\n walkAtRules(name, callback) {\n if (!callback) {\n callback = name\n return this.walk((child, i) => {\n if (child.type === 'atrule') {\n return callback(child, i)\n }\n })\n }\n if (name instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'atrule' && name.test(child.name)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'atrule' && child.name === name) {\n return callback(child, i)\n }\n })\n }\n\n walkComments(callback) {\n return this.walk((child, i) => {\n if (child.type === 'comment') {\n return callback(child, i)\n }\n })\n }\n\n walkDecls(prop, callback) {\n if (!callback) {\n callback = prop\n return this.walk((child, i) => {\n if (child.type === 'decl') {\n return callback(child, i)\n }\n })\n }\n if (prop instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'decl' && prop.test(child.prop)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'decl' && child.prop === prop) {\n return callback(child, i)\n }\n })\n }\n\n walkRules(selector, callback) {\n if (!callback) {\n callback = selector\n\n return this.walk((child, i) => {\n if (child.type === 'rule') {\n return callback(child, i)\n }\n })\n }\n if (selector instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'rule' && selector.test(child.selector)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'rule' && child.selector === selector) {\n return callback(child, i)\n }\n })\n }\n\n get first() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[0]\n }\n\n get last() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]\n }\n}\n\nContainer.registerParse = dependant => {\n parse = dependant\n}\n\nContainer.registerRule = dependant => {\n Rule = dependant\n}\n\nContainer.registerAtRule = dependant => {\n AtRule = dependant\n}\n\nContainer.registerRoot = dependant => {\n Root = dependant\n}\n\nmodule.exports = Container\nContainer.default = Container\n\n/* c8 ignore start */\nContainer.rebuild = node => {\n if (node.type === 'atrule') {\n Object.setPrototypeOf(node, AtRule.prototype)\n } else if (node.type === 'rule') {\n Object.setPrototypeOf(node, Rule.prototype)\n } else if (node.type === 'decl') {\n Object.setPrototypeOf(node, Declaration.prototype)\n } else if (node.type === 'comment') {\n Object.setPrototypeOf(node, Comment.prototype)\n } else if (node.type === 'root') {\n Object.setPrototypeOf(node, Root.prototype)\n }\n\n node[my] = true\n\n if (node.nodes) {\n node.nodes.forEach(child => {\n Container.rebuild(child)\n })\n }\n}\n/* c8 ignore stop */\n"],"names":["require$$0","require$$1","require$$2","require$$3"],"mappings":";;;;;;;;;AAEA,MAAI,EAAE,SAAS,GAAE,IAAKA,eAAA;AACtB,MAAI,cAAcC,mBAAA;AAClB,MAAI,UAAUC,eAAA;AACd,MAAI,OAAOC,YAAA;AAEX,MAAI,OAAO,MAAM,QAAQ;AAEzB,WAAS,YAAY,OAAO;AAC1B,WAAO,MAAM,IAAI,OAAK;AACpB,UAAI,EAAE,MAAO,GAAE,QAAQ,YAAY,EAAE,KAAK;AAC1C,aAAO,EAAE;AACT,aAAO;AAAA,IACX,CAAG;AAAA,EACH;AAEA,WAAS,YAAY,MAAM;AACzB,SAAK,OAAO,IAAI;AAChB,QAAI,KAAK,QAAQ,OAAO;AACtB,eAAS,KAAK,KAAK,QAAQ,OAAO;AAChC,oBAAY,CAAC;AAAA,MACnB;AAAA,IACA;AAAA,EACA;AAAA,EAEA,MAAM,kBAAkB,KAAK;AAAA,IAC3B,UAAU,UAAU;AAClB,eAAS,SAAS,UAAU;AAC1B,YAAI,QAAQ,KAAK,UAAU,OAAO,KAAK,IAAI;AAC3C,iBAAS,QAAQ,MAAO,MAAK,QAAQ,MAAM,KAAK,IAAI;AAAA,MAC1D;AAEI,WAAK,UAAS;AAEd,aAAO;AAAA,IACX;AAAA,IAEE,UAAU,aAAa;AACrB,YAAM,UAAU,WAAW;AAC3B,UAAI,KAAK,OAAO;AACd,iBAAS,QAAQ,KAAK,MAAO,MAAK,UAAU,WAAW;AAAA,MAC7D;AAAA,IACA;AAAA,IAEE,KAAK,UAAU;AACb,UAAI,CAAC,KAAK,QAAQ,MAAO,QAAO;AACh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,SAAS;AAAA,IAChD,WAAa,KAAK,SAAS,QAAQ;AAC/B,aAAO,eAAe,MAAM,KAAK,SAAS;AAAA,IAC9C,WAAa,KAAK,SAAS,QAAQ;AAC/B,aAAO,eAAe,MAAM,YAAY,SAAS;AAAA,IACrD,WAAa,KAAK,SAAS,WAAW;AAClC,aAAO,eAAe,MAAM,QAAQ,SAAS;AAAA,IACjD,WAAa,KAAK,SAAS,QAAQ;AAC/B,aAAO,eAAe,MAAM,KAAK,SAAS;AAAA,IAC9C;AAEE,SAAK,EAAE,IAAI;AAEX,QAAI,KAAK,OAAO;AACd,WAAK,MAAM,QAAQ,WAAS;AAC1B,kBAAU,QAAQ,KAAK;AAAA,MAC7B,CAAK;AAAA,IACL;AAAA,EACA;;;","x_google_ignoreList":[0]}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { __require as requirePicocolors_browser } from "../../picocolors/picocolors.browser.mjs";
|
|
2
|
-
import require$$2 from "../../../_virtual/___vite-browser-external.mjs";
|
|
3
|
-
var cssSyntaxError;
|
|
4
|
-
var hasRequiredCssSyntaxError;
|
|
5
|
-
function requireCssSyntaxError() {
|
|
6
|
-
if (hasRequiredCssSyntaxError) return cssSyntaxError;
|
|
7
|
-
hasRequiredCssSyntaxError = 1;
|
|
8
|
-
let pico = /* @__PURE__ */ requirePicocolors_browser();
|
|
9
|
-
let terminalHighlight = require$$2;
|
|
10
|
-
class CssSyntaxError extends Error {
|
|
11
|
-
constructor(message, line, column, source, file, plugin) {
|
|
12
|
-
super(message);
|
|
13
|
-
this.name = "CssSyntaxError";
|
|
14
|
-
this.reason = message;
|
|
15
|
-
if (file) {
|
|
16
|
-
this.file = file;
|
|
17
|
-
}
|
|
18
|
-
if (source) {
|
|
19
|
-
this.source = source;
|
|
20
|
-
}
|
|
21
|
-
if (plugin) {
|
|
22
|
-
this.plugin = plugin;
|
|
23
|
-
}
|
|
24
|
-
if (typeof line !== "undefined" && typeof column !== "undefined") {
|
|
25
|
-
if (typeof line === "number") {
|
|
26
|
-
this.line = line;
|
|
27
|
-
this.column = column;
|
|
28
|
-
} else {
|
|
29
|
-
this.line = line.line;
|
|
30
|
-
this.column = line.column;
|
|
31
|
-
this.endLine = column.line;
|
|
32
|
-
this.endColumn = column.column;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
this.setMessage();
|
|
36
|
-
if (Error.captureStackTrace) {
|
|
37
|
-
Error.captureStackTrace(this, CssSyntaxError);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
setMessage() {
|
|
41
|
-
this.message = this.plugin ? this.plugin + ": " : "";
|
|
42
|
-
this.message += this.file ? this.file : "<css input>";
|
|
43
|
-
if (typeof this.line !== "undefined") {
|
|
44
|
-
this.message += ":" + this.line + ":" + this.column;
|
|
45
|
-
}
|
|
46
|
-
this.message += ": " + this.reason;
|
|
47
|
-
}
|
|
48
|
-
showSourceCode(color) {
|
|
49
|
-
if (!this.source) return "";
|
|
50
|
-
let css = this.source;
|
|
51
|
-
if (color == null) color = pico.isColorSupported;
|
|
52
|
-
if (terminalHighlight) {
|
|
53
|
-
if (color) css = terminalHighlight(css);
|
|
54
|
-
}
|
|
55
|
-
let lines = css.split(/\r?\n/);
|
|
56
|
-
let start = Math.max(this.line - 3, 0);
|
|
57
|
-
let end = Math.min(this.line + 2, lines.length);
|
|
58
|
-
let maxWidth = String(end).length;
|
|
59
|
-
let mark, aside;
|
|
60
|
-
if (color) {
|
|
61
|
-
let { bold, gray, red } = pico.createColors(true);
|
|
62
|
-
mark = (text) => bold(red(text));
|
|
63
|
-
aside = (text) => gray(text);
|
|
64
|
-
} else {
|
|
65
|
-
mark = aside = (str) => str;
|
|
66
|
-
}
|
|
67
|
-
return lines.slice(start, end).map((line, index) => {
|
|
68
|
-
let number = start + 1 + index;
|
|
69
|
-
let gutter = " " + (" " + number).slice(-maxWidth) + " | ";
|
|
70
|
-
if (number === this.line) {
|
|
71
|
-
let spacing = aside(gutter.replace(/\d/g, " ")) + line.slice(0, this.column - 1).replace(/[^\t]/g, " ");
|
|
72
|
-
return mark(">") + aside(gutter) + line + "\n " + spacing + mark("^");
|
|
73
|
-
}
|
|
74
|
-
return " " + aside(gutter) + line;
|
|
75
|
-
}).join("\n");
|
|
76
|
-
}
|
|
77
|
-
toString() {
|
|
78
|
-
let code = this.showSourceCode();
|
|
79
|
-
if (code) {
|
|
80
|
-
code = "\n\n" + code + "\n";
|
|
81
|
-
}
|
|
82
|
-
return this.name + ": " + this.message + code;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
cssSyntaxError = CssSyntaxError;
|
|
86
|
-
CssSyntaxError.default = CssSyntaxError;
|
|
87
|
-
return cssSyntaxError;
|
|
88
|
-
}
|
|
89
|
-
export {
|
|
90
|
-
requireCssSyntaxError as __require
|
|
91
|
-
};
|
|
92
|
-
//# sourceMappingURL=css-syntax-error.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"css-syntax-error.mjs","sources":["../../../../../../node_modules/postcss/lib/css-syntax-error.js"],"sourcesContent":["'use strict'\n\nlet pico = require('picocolors')\n\nlet terminalHighlight = require('./terminal-highlight')\n\nclass CssSyntaxError extends Error {\n constructor(message, line, column, source, file, plugin) {\n super(message)\n this.name = 'CssSyntaxError'\n this.reason = message\n\n if (file) {\n this.file = file\n }\n if (source) {\n this.source = source\n }\n if (plugin) {\n this.plugin = plugin\n }\n if (typeof line !== 'undefined' && typeof column !== 'undefined') {\n if (typeof line === 'number') {\n this.line = line\n this.column = column\n } else {\n this.line = line.line\n this.column = line.column\n this.endLine = column.line\n this.endColumn = column.column\n }\n }\n\n this.setMessage()\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, CssSyntaxError)\n }\n }\n\n setMessage() {\n this.message = this.plugin ? this.plugin + ': ' : ''\n this.message += this.file ? this.file : '<css input>'\n if (typeof this.line !== 'undefined') {\n this.message += ':' + this.line + ':' + this.column\n }\n this.message += ': ' + this.reason\n }\n\n showSourceCode(color) {\n if (!this.source) return ''\n\n let css = this.source\n if (color == null) color = pico.isColorSupported\n if (terminalHighlight) {\n if (color) css = terminalHighlight(css)\n }\n\n let lines = css.split(/\\r?\\n/)\n let start = Math.max(this.line - 3, 0)\n let end = Math.min(this.line + 2, lines.length)\n\n let maxWidth = String(end).length\n\n let mark, aside\n if (color) {\n let { bold, gray, red } = pico.createColors(true)\n mark = text => bold(red(text))\n aside = text => gray(text)\n } else {\n mark = aside = str => str\n }\n\n return lines\n .slice(start, end)\n .map((line, index) => {\n let number = start + 1 + index\n let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '\n if (number === this.line) {\n let spacing =\n aside(gutter.replace(/\\d/g, ' ')) +\n line.slice(0, this.column - 1).replace(/[^\\t]/g, ' ')\n return mark('>') + aside(gutter) + line + '\\n ' + spacing + mark('^')\n }\n return ' ' + aside(gutter) + line\n })\n .join('\\n')\n }\n\n toString() {\n let code = this.showSourceCode()\n if (code) {\n code = '\\n\\n' + code + '\\n'\n }\n return this.name + ': ' + this.message + code\n }\n}\n\nmodule.exports = CssSyntaxError\nCssSyntaxError.default = CssSyntaxError\n"],"names":["require$$0","require$$1"],"mappings":";;;;;;;AAEA,MAAI,OAAOA,0CAAA;AAEX,MAAI,oBAAoBC;AAAAA,EAExB,MAAM,uBAAuB,MAAM;AAAA,IACjC,YAAY,SAAS,MAAM,QAAQ,QAAQ,MAAM,QAAQ;AACvD,YAAM,OAAO;AACb,WAAK,OAAO;AACZ,WAAK,SAAS;AAEd,UAAI,MAAM;AACR,aAAK,OAAO;AAAA,MAClB;AACI,UAAI,QAAQ;AACV,aAAK,SAAS;AAAA,MACpB;AACI,UAAI,QAAQ;AACV,aAAK,SAAS;AAAA,MACpB;AACI,UAAI,OAAO,SAAS,eAAe,OAAO,WAAW,aAAa;AAChE,YAAI,OAAO,SAAS,UAAU;AAC5B,eAAK,OAAO;AACZ,eAAK,SAAS;AAAA,QACtB,OAAa;AACL,eAAK,OAAO,KAAK;AACjB,eAAK,SAAS,K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,cAAI,UACF,MAAM,OAAO,QAAQ,OAAO,GAAG,CAAC,IAChC,KAAK,MAAM,GAAG,KAAK,SAAS,CAAC,EAAE,QAAQ,UAAU,GAAG;AACtD,iBAAO,KAAK,GAAG,IAAI,MAAM,MAAM,IAAI,OAAO,QAAQ,UAAU,KAAK,GAAG;AAAA,QAC9E;AACQ,eAAO,MAAM,MAAM,MAAM,IAAI;AAAA,MACrC,CAAO,EACA,KAAK,IAAI;AAAA,IAChB;AAAA,IAEE,WAAW;AACT,UAAI,OAAO,KAAK,eAAc;AAC9B,UAAI,MAAM;AACR,eAAO,SAAS,OAAO;AAAA,MAC7B;AACI,aAAO,KAAK,OAAO,OAAO,KAAK,UAAU;AAAA,IAC7C;AAAA,EACA;AAEA,mBAAiB;AACjB,iBAAe,UAAU;;;","x_google_ignoreList":[0]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { __require as requireNode } from "./node.mjs";
|
|
2
|
-
var declaration;
|
|
3
|
-
var hasRequiredDeclaration;
|
|
4
|
-
function requireDeclaration() {
|
|
5
|
-
if (hasRequiredDeclaration) return declaration;
|
|
6
|
-
hasRequiredDeclaration = 1;
|
|
7
|
-
let Node = requireNode();
|
|
8
|
-
class Declaration extends Node {
|
|
9
|
-
constructor(defaults) {
|
|
10
|
-
if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
|
|
11
|
-
defaults = { ...defaults, value: String(defaults.value) };
|
|
12
|
-
}
|
|
13
|
-
super(defaults);
|
|
14
|
-
this.type = "decl";
|
|
15
|
-
}
|
|
16
|
-
get variable() {
|
|
17
|
-
return this.prop.startsWith("--") || this.prop[0] === "$";
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
declaration = Declaration;
|
|
21
|
-
Declaration.default = Declaration;
|
|
22
|
-
return declaration;
|
|
23
|
-
}
|
|
24
|
-
export {
|
|
25
|
-
requireDeclaration as __require
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=declaration.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"declaration.mjs","sources":["../../../../../../node_modules/postcss/lib/declaration.js"],"sourcesContent":["'use strict'\n\nlet Node = require('./node')\n\nclass Declaration extends Node {\n constructor(defaults) {\n if (\n defaults &&\n typeof defaults.value !== 'undefined' &&\n typeof defaults.value !== 'string'\n ) {\n defaults = { ...defaults, value: String(defaults.value) }\n }\n super(defaults)\n this.type = 'decl'\n }\n\n get variable() {\n return this.prop.startsWith('--') || this.prop[0] === '$'\n }\n}\n\nmodule.exports = Declaration\nDeclaration.default = Declaration\n"],"names":["require$$0"],"mappings":";;;;;;AAEA,MAAI,OAAOA,YAAA;AAAA,EAEX,MAAM,oBAAoB,KAAK;AAAA,IAC7B,YAAY,UAAU;AACpB,UACE,YACA,OAAO,SAAS,UAAU,eAC1B,OAAO,SAAS,UAAU,UAC1B;AACA,mBAAW,EAAE,GAAG,UAAU,OAAO,OAAO,SAAS,KAAK,EAAC;AAAA,MAC7D;AACI,YAAM,QAAQ;AACd,WAAK,OAAO;AAAA,IAChB;AAAA,IAEE,IAAI,WAAW;AACb,aAAO,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,KAAK,CAAC,MAAM;AAAA,IAC1D;AAAA,EACA;AAEA,gBAAiB;AACjB,cAAY,UAAU;;;","x_google_ignoreList":[0]}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { __require as requireContainer } from "./container.mjs";
|
|
2
|
-
var document;
|
|
3
|
-
var hasRequiredDocument;
|
|
4
|
-
function requireDocument() {
|
|
5
|
-
if (hasRequiredDocument) return document;
|
|
6
|
-
hasRequiredDocument = 1;
|
|
7
|
-
let Container = requireContainer();
|
|
8
|
-
let LazyResult, Processor;
|
|
9
|
-
class Document extends Container {
|
|
10
|
-
constructor(defaults) {
|
|
11
|
-
super({ type: "document", ...defaults });
|
|
12
|
-
if (!this.nodes) {
|
|
13
|
-
this.nodes = [];
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
toResult(opts = {}) {
|
|
17
|
-
let lazy = new LazyResult(new Processor(), this, opts);
|
|
18
|
-
return lazy.stringify();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
Document.registerLazyResult = (dependant) => {
|
|
22
|
-
LazyResult = dependant;
|
|
23
|
-
};
|
|
24
|
-
Document.registerProcessor = (dependant) => {
|
|
25
|
-
Processor = dependant;
|
|
26
|
-
};
|
|
27
|
-
document = Document;
|
|
28
|
-
Document.default = Document;
|
|
29
|
-
return document;
|
|
30
|
-
}
|
|
31
|
-
export {
|
|
32
|
-
requireDocument as __require
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=document.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document.mjs","sources":["../../../../../../node_modules/postcss/lib/document.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Document extends Container {\n constructor(defaults) {\n // type needs to be passed to super, otherwise child roots won't be normalized correctly\n super({ type: 'document', ...defaults })\n\n if (!this.nodes) {\n this.nodes = []\n }\n }\n\n toResult(opts = {}) {\n let lazy = new LazyResult(new Processor(), this, opts)\n\n return lazy.stringify()\n }\n}\n\nDocument.registerLazyResult = dependant => {\n LazyResult = dependant\n}\n\nDocument.registerProcessor = dependant => {\n Processor = dependant\n}\n\nmodule.exports = Document\nDocument.default = Document\n"],"names":["require$$0"],"mappings":";;;;;;AAEA,MAAI,YAAYA,iBAAA;AAEhB,MAAI,YAAY;AAAA,EAEhB,MAAM,iBAAiB,UAAU;AAAA,IAC/B,YAAY,UAAU;AAEpB,YAAM,EAAE,MAAM,YAAY,GAAG,SAAQ,CAAE;AAEvC,UAAI,CAAC,KAAK,OAAO;AACf,aAAK,QAAQ,CAAA;AAAA,MACnB;AAAA,IACA;AAAA,IAEE,SAAS,OAAO,IAAI;AAClB,UAAI,OAAO,IAAI,WAAW,IAAI,UAAS,GAAI,MAAM,IAAI;AAErD,aAAO,KAAK,UAAS;AAAA,IACzB;AAAA,EACA;AAEA,WAAS,qBAAqB,eAAa;AACzC,iBAAa;AAAA,EACf;AAEA,WAAS,oBAAoB,eAAa;AACxC,gBAAY;AAAA,EACd;AAEA,aAAiB;AACjB,WAAS,UAAU;;;","x_google_ignoreList":[0]}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { __require as requireDeclaration } from "./declaration.mjs";
|
|
2
|
-
import { __require as requirePreviousMap } from "./previous-map.mjs";
|
|
3
|
-
import { __require as requireComment } from "./comment.mjs";
|
|
4
|
-
import { __require as requireAtRule } from "./at-rule.mjs";
|
|
5
|
-
import { __require as requireInput } from "./input.mjs";
|
|
6
|
-
import { __require as requireRoot } from "./root.mjs";
|
|
7
|
-
import { __require as requireRule } from "./rule.mjs";
|
|
8
|
-
var fromJSON_1;
|
|
9
|
-
var hasRequiredFromJSON;
|
|
10
|
-
function requireFromJSON() {
|
|
11
|
-
if (hasRequiredFromJSON) return fromJSON_1;
|
|
12
|
-
hasRequiredFromJSON = 1;
|
|
13
|
-
let Declaration = requireDeclaration();
|
|
14
|
-
let PreviousMap = requirePreviousMap();
|
|
15
|
-
let Comment = requireComment();
|
|
16
|
-
let AtRule = requireAtRule();
|
|
17
|
-
let Input = requireInput();
|
|
18
|
-
let Root = requireRoot();
|
|
19
|
-
let Rule = requireRule();
|
|
20
|
-
function fromJSON(json, inputs) {
|
|
21
|
-
if (Array.isArray(json)) return json.map((n) => fromJSON(n));
|
|
22
|
-
let { inputs: ownInputs, ...defaults } = json;
|
|
23
|
-
if (ownInputs) {
|
|
24
|
-
inputs = [];
|
|
25
|
-
for (let input of ownInputs) {
|
|
26
|
-
let inputHydrated = { ...input, __proto__: Input.prototype };
|
|
27
|
-
if (inputHydrated.map) {
|
|
28
|
-
inputHydrated.map = {
|
|
29
|
-
...inputHydrated.map,
|
|
30
|
-
__proto__: PreviousMap.prototype
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
inputs.push(inputHydrated);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
if (defaults.nodes) {
|
|
37
|
-
defaults.nodes = json.nodes.map((n) => fromJSON(n, inputs));
|
|
38
|
-
}
|
|
39
|
-
if (defaults.source) {
|
|
40
|
-
let { inputId, ...source } = defaults.source;
|
|
41
|
-
defaults.source = source;
|
|
42
|
-
if (inputId != null) {
|
|
43
|
-
defaults.source.input = inputs[inputId];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
if (defaults.type === "root") {
|
|
47
|
-
return new Root(defaults);
|
|
48
|
-
} else if (defaults.type === "decl") {
|
|
49
|
-
return new Declaration(defaults);
|
|
50
|
-
} else if (defaults.type === "rule") {
|
|
51
|
-
return new Rule(defaults);
|
|
52
|
-
} else if (defaults.type === "comment") {
|
|
53
|
-
return new Comment(defaults);
|
|
54
|
-
} else if (defaults.type === "atrule") {
|
|
55
|
-
return new AtRule(defaults);
|
|
56
|
-
} else {
|
|
57
|
-
throw new Error("Unknown node type: " + json.type);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
fromJSON_1 = fromJSON;
|
|
61
|
-
fromJSON.default = fromJSON;
|
|
62
|
-
return fromJSON_1;
|
|
63
|
-
}
|
|
64
|
-
export {
|
|
65
|
-
requireFromJSON as __require
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=fromJSON.mjs.map
|