@universityofmaryland/web-model-library 1.0.0 → 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 +5 -6
- package/dist/attributes/checks.d.ts.map +1 -1
- package/dist/attributes/checks.js +338 -340
- 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 +4 -4
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes/names.d.ts +4 -6
- package/dist/attributes/names.d.ts.map +1 -1
- package/dist/attributes/names.js +7 -8
- package/dist/attributes/names.js.map +1 -1
- package/dist/attributes/values.d.ts +13 -11
- package/dist/attributes/values.d.ts.map +1 -1
- package/dist/attributes/values.js +7 -3
- package/dist/attributes/values.js.map +1 -1
- package/dist/attributes.js +21 -22
- 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 +23 -16
- package/dist/slots/index.d.ts.map +1 -1
- package/dist/slots/mapping.d.ts +4 -0
- package/dist/slots/mapping.d.ts.map +1 -1
- package/dist/slots/mapping.js +8 -4
- package/dist/slots/mapping.js.map +1 -1
- package/dist/slots.d.ts +0 -4
- package/dist/slots.js +41 -36
- 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 -740
- 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 -146
- package/dist/attributes/names.mjs.map +0 -1
- package/dist/attributes/values.mjs +0 -81
- package/dist/attributes/values.mjs.map +0 -1
- package/dist/attributes.mjs +0 -23
- 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 -97
- package/dist/slots/mapping.mjs.map +0 -1
- package/dist/slots.mjs +0 -74
- 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,467 +0,0 @@
|
|
|
1
|
-
import { __require as requireSymbols } from "./symbols.mjs";
|
|
2
|
-
import { __require as requireMapGenerator } from "./map-generator.mjs";
|
|
3
|
-
import { __require as requireStringify } from "./stringify.mjs";
|
|
4
|
-
import { __require as requireContainer } from "./container.mjs";
|
|
5
|
-
import { __require as requireDocument } from "./document.mjs";
|
|
6
|
-
import { __require as requireResult } from "./result.mjs";
|
|
7
|
-
import { __require as requireParse } from "./parse.mjs";
|
|
8
|
-
import { __require as requireRoot } from "./root.mjs";
|
|
9
|
-
var lazyResult;
|
|
10
|
-
var hasRequiredLazyResult;
|
|
11
|
-
function requireLazyResult() {
|
|
12
|
-
if (hasRequiredLazyResult) return lazyResult;
|
|
13
|
-
hasRequiredLazyResult = 1;
|
|
14
|
-
let { isClean, my } = requireSymbols();
|
|
15
|
-
let MapGenerator = requireMapGenerator();
|
|
16
|
-
let stringify = requireStringify();
|
|
17
|
-
let Container = requireContainer();
|
|
18
|
-
let Document = requireDocument();
|
|
19
|
-
let Result = requireResult();
|
|
20
|
-
let parse = requireParse();
|
|
21
|
-
let Root = requireRoot();
|
|
22
|
-
const TYPE_TO_CLASS_NAME = {
|
|
23
|
-
atrule: "AtRule",
|
|
24
|
-
comment: "Comment",
|
|
25
|
-
decl: "Declaration",
|
|
26
|
-
document: "Document",
|
|
27
|
-
root: "Root",
|
|
28
|
-
rule: "Rule"
|
|
29
|
-
};
|
|
30
|
-
const PLUGIN_PROPS = {
|
|
31
|
-
AtRule: true,
|
|
32
|
-
AtRuleExit: true,
|
|
33
|
-
Comment: true,
|
|
34
|
-
CommentExit: true,
|
|
35
|
-
Declaration: true,
|
|
36
|
-
DeclarationExit: true,
|
|
37
|
-
Document: true,
|
|
38
|
-
DocumentExit: true,
|
|
39
|
-
Once: true,
|
|
40
|
-
OnceExit: true,
|
|
41
|
-
postcssPlugin: true,
|
|
42
|
-
prepare: true,
|
|
43
|
-
Root: true,
|
|
44
|
-
RootExit: true,
|
|
45
|
-
Rule: true,
|
|
46
|
-
RuleExit: true
|
|
47
|
-
};
|
|
48
|
-
const NOT_VISITORS = {
|
|
49
|
-
Once: true,
|
|
50
|
-
postcssPlugin: true,
|
|
51
|
-
prepare: true
|
|
52
|
-
};
|
|
53
|
-
const CHILDREN = 0;
|
|
54
|
-
function isPromise(obj) {
|
|
55
|
-
return typeof obj === "object" && typeof obj.then === "function";
|
|
56
|
-
}
|
|
57
|
-
function getEvents(node) {
|
|
58
|
-
let key = false;
|
|
59
|
-
let type = TYPE_TO_CLASS_NAME[node.type];
|
|
60
|
-
if (node.type === "decl") {
|
|
61
|
-
key = node.prop.toLowerCase();
|
|
62
|
-
} else if (node.type === "atrule") {
|
|
63
|
-
key = node.name.toLowerCase();
|
|
64
|
-
}
|
|
65
|
-
if (key && node.append) {
|
|
66
|
-
return [
|
|
67
|
-
type,
|
|
68
|
-
type + "-" + key,
|
|
69
|
-
CHILDREN,
|
|
70
|
-
type + "Exit",
|
|
71
|
-
type + "Exit-" + key
|
|
72
|
-
];
|
|
73
|
-
} else if (key) {
|
|
74
|
-
return [type, type + "-" + key, type + "Exit", type + "Exit-" + key];
|
|
75
|
-
} else if (node.append) {
|
|
76
|
-
return [type, CHILDREN, type + "Exit"];
|
|
77
|
-
} else {
|
|
78
|
-
return [type, type + "Exit"];
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
function toStack(node) {
|
|
82
|
-
let events;
|
|
83
|
-
if (node.type === "document") {
|
|
84
|
-
events = ["Document", CHILDREN, "DocumentExit"];
|
|
85
|
-
} else if (node.type === "root") {
|
|
86
|
-
events = ["Root", CHILDREN, "RootExit"];
|
|
87
|
-
} else {
|
|
88
|
-
events = getEvents(node);
|
|
89
|
-
}
|
|
90
|
-
return {
|
|
91
|
-
eventIndex: 0,
|
|
92
|
-
events,
|
|
93
|
-
iterator: 0,
|
|
94
|
-
node,
|
|
95
|
-
visitorIndex: 0,
|
|
96
|
-
visitors: []
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
function cleanMarks(node) {
|
|
100
|
-
node[isClean] = false;
|
|
101
|
-
if (node.nodes) node.nodes.forEach((i) => cleanMarks(i));
|
|
102
|
-
return node;
|
|
103
|
-
}
|
|
104
|
-
let postcss = {};
|
|
105
|
-
class LazyResult {
|
|
106
|
-
constructor(processor, css, opts) {
|
|
107
|
-
this.stringified = false;
|
|
108
|
-
this.processed = false;
|
|
109
|
-
let root;
|
|
110
|
-
if (typeof css === "object" && css !== null && (css.type === "root" || css.type === "document")) {
|
|
111
|
-
root = cleanMarks(css);
|
|
112
|
-
} else if (css instanceof LazyResult || css instanceof Result) {
|
|
113
|
-
root = cleanMarks(css.root);
|
|
114
|
-
if (css.map) {
|
|
115
|
-
if (typeof opts.map === "undefined") opts.map = {};
|
|
116
|
-
if (!opts.map.inline) opts.map.inline = false;
|
|
117
|
-
opts.map.prev = css.map;
|
|
118
|
-
}
|
|
119
|
-
} else {
|
|
120
|
-
let parser = parse;
|
|
121
|
-
if (opts.syntax) parser = opts.syntax.parse;
|
|
122
|
-
if (opts.parser) parser = opts.parser;
|
|
123
|
-
if (parser.parse) parser = parser.parse;
|
|
124
|
-
try {
|
|
125
|
-
root = parser(css, opts);
|
|
126
|
-
} catch (error) {
|
|
127
|
-
this.processed = true;
|
|
128
|
-
this.error = error;
|
|
129
|
-
}
|
|
130
|
-
if (root && !root[my]) {
|
|
131
|
-
Container.rebuild(root);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
this.result = new Result(processor, root, opts);
|
|
135
|
-
this.helpers = { ...postcss, postcss, result: this.result };
|
|
136
|
-
this.plugins = this.processor.plugins.map((plugin) => {
|
|
137
|
-
if (typeof plugin === "object" && plugin.prepare) {
|
|
138
|
-
return { ...plugin, ...plugin.prepare(this.result) };
|
|
139
|
-
} else {
|
|
140
|
-
return plugin;
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
async() {
|
|
145
|
-
if (this.error) return Promise.reject(this.error);
|
|
146
|
-
if (this.processed) return Promise.resolve(this.result);
|
|
147
|
-
if (!this.processing) {
|
|
148
|
-
this.processing = this.runAsync();
|
|
149
|
-
}
|
|
150
|
-
return this.processing;
|
|
151
|
-
}
|
|
152
|
-
catch(onRejected) {
|
|
153
|
-
return this.async().catch(onRejected);
|
|
154
|
-
}
|
|
155
|
-
finally(onFinally) {
|
|
156
|
-
return this.async().then(onFinally, onFinally);
|
|
157
|
-
}
|
|
158
|
-
getAsyncError() {
|
|
159
|
-
throw new Error("Use process(css).then(cb) to work with async plugins");
|
|
160
|
-
}
|
|
161
|
-
handleError(error, node) {
|
|
162
|
-
let plugin = this.result.lastPlugin;
|
|
163
|
-
try {
|
|
164
|
-
if (node) node.addToError(error);
|
|
165
|
-
this.error = error;
|
|
166
|
-
if (error.name === "CssSyntaxError" && !error.plugin) {
|
|
167
|
-
error.plugin = plugin.postcssPlugin;
|
|
168
|
-
error.setMessage();
|
|
169
|
-
} else if (plugin.postcssVersion) {
|
|
170
|
-
if (false) ;
|
|
171
|
-
}
|
|
172
|
-
} catch (err) {
|
|
173
|
-
if (console && console.error) console.error(err);
|
|
174
|
-
}
|
|
175
|
-
return error;
|
|
176
|
-
}
|
|
177
|
-
prepareVisitors() {
|
|
178
|
-
this.listeners = {};
|
|
179
|
-
let add = (plugin, type, cb) => {
|
|
180
|
-
if (!this.listeners[type]) this.listeners[type] = [];
|
|
181
|
-
this.listeners[type].push([plugin, cb]);
|
|
182
|
-
};
|
|
183
|
-
for (let plugin of this.plugins) {
|
|
184
|
-
if (typeof plugin === "object") {
|
|
185
|
-
for (let event in plugin) {
|
|
186
|
-
if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) {
|
|
187
|
-
throw new Error(
|
|
188
|
-
`Unknown event ${event} in ${plugin.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`
|
|
189
|
-
);
|
|
190
|
-
}
|
|
191
|
-
if (!NOT_VISITORS[event]) {
|
|
192
|
-
if (typeof plugin[event] === "object") {
|
|
193
|
-
for (let filter in plugin[event]) {
|
|
194
|
-
if (filter === "*") {
|
|
195
|
-
add(plugin, event, plugin[event][filter]);
|
|
196
|
-
} else {
|
|
197
|
-
add(
|
|
198
|
-
plugin,
|
|
199
|
-
event + "-" + filter.toLowerCase(),
|
|
200
|
-
plugin[event][filter]
|
|
201
|
-
);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
} else if (typeof plugin[event] === "function") {
|
|
205
|
-
add(plugin, event, plugin[event]);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
212
|
-
}
|
|
213
|
-
async runAsync() {
|
|
214
|
-
this.plugin = 0;
|
|
215
|
-
for (let i = 0; i < this.plugins.length; i++) {
|
|
216
|
-
let plugin = this.plugins[i];
|
|
217
|
-
let promise = this.runOnRoot(plugin);
|
|
218
|
-
if (isPromise(promise)) {
|
|
219
|
-
try {
|
|
220
|
-
await promise;
|
|
221
|
-
} catch (error) {
|
|
222
|
-
throw this.handleError(error);
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
this.prepareVisitors();
|
|
227
|
-
if (this.hasListener) {
|
|
228
|
-
let root = this.result.root;
|
|
229
|
-
while (!root[isClean]) {
|
|
230
|
-
root[isClean] = true;
|
|
231
|
-
let stack = [toStack(root)];
|
|
232
|
-
while (stack.length > 0) {
|
|
233
|
-
let promise = this.visitTick(stack);
|
|
234
|
-
if (isPromise(promise)) {
|
|
235
|
-
try {
|
|
236
|
-
await promise;
|
|
237
|
-
} catch (e) {
|
|
238
|
-
let node = stack[stack.length - 1].node;
|
|
239
|
-
throw this.handleError(e, node);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
if (this.listeners.OnceExit) {
|
|
245
|
-
for (let [plugin, visitor] of this.listeners.OnceExit) {
|
|
246
|
-
this.result.lastPlugin = plugin;
|
|
247
|
-
try {
|
|
248
|
-
if (root.type === "document") {
|
|
249
|
-
let roots = root.nodes.map(
|
|
250
|
-
(subRoot) => visitor(subRoot, this.helpers)
|
|
251
|
-
);
|
|
252
|
-
await Promise.all(roots);
|
|
253
|
-
} else {
|
|
254
|
-
await visitor(root, this.helpers);
|
|
255
|
-
}
|
|
256
|
-
} catch (e) {
|
|
257
|
-
throw this.handleError(e);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
this.processed = true;
|
|
263
|
-
return this.stringify();
|
|
264
|
-
}
|
|
265
|
-
runOnRoot(plugin) {
|
|
266
|
-
this.result.lastPlugin = plugin;
|
|
267
|
-
try {
|
|
268
|
-
if (typeof plugin === "object" && plugin.Once) {
|
|
269
|
-
if (this.result.root.type === "document") {
|
|
270
|
-
let roots = this.result.root.nodes.map(
|
|
271
|
-
(root) => plugin.Once(root, this.helpers)
|
|
272
|
-
);
|
|
273
|
-
if (isPromise(roots[0])) {
|
|
274
|
-
return Promise.all(roots);
|
|
275
|
-
}
|
|
276
|
-
return roots;
|
|
277
|
-
}
|
|
278
|
-
return plugin.Once(this.result.root, this.helpers);
|
|
279
|
-
} else if (typeof plugin === "function") {
|
|
280
|
-
return plugin(this.result.root, this.result);
|
|
281
|
-
}
|
|
282
|
-
} catch (error) {
|
|
283
|
-
throw this.handleError(error);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
stringify() {
|
|
287
|
-
if (this.error) throw this.error;
|
|
288
|
-
if (this.stringified) return this.result;
|
|
289
|
-
this.stringified = true;
|
|
290
|
-
this.sync();
|
|
291
|
-
let opts = this.result.opts;
|
|
292
|
-
let str = stringify;
|
|
293
|
-
if (opts.syntax) str = opts.syntax.stringify;
|
|
294
|
-
if (opts.stringifier) str = opts.stringifier;
|
|
295
|
-
if (str.stringify) str = str.stringify;
|
|
296
|
-
let map = new MapGenerator(str, this.result.root, this.result.opts);
|
|
297
|
-
let data = map.generate();
|
|
298
|
-
this.result.css = data[0];
|
|
299
|
-
this.result.map = data[1];
|
|
300
|
-
return this.result;
|
|
301
|
-
}
|
|
302
|
-
sync() {
|
|
303
|
-
if (this.error) throw this.error;
|
|
304
|
-
if (this.processed) return this.result;
|
|
305
|
-
this.processed = true;
|
|
306
|
-
if (this.processing) {
|
|
307
|
-
throw this.getAsyncError();
|
|
308
|
-
}
|
|
309
|
-
for (let plugin of this.plugins) {
|
|
310
|
-
let promise = this.runOnRoot(plugin);
|
|
311
|
-
if (isPromise(promise)) {
|
|
312
|
-
throw this.getAsyncError();
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
this.prepareVisitors();
|
|
316
|
-
if (this.hasListener) {
|
|
317
|
-
let root = this.result.root;
|
|
318
|
-
while (!root[isClean]) {
|
|
319
|
-
root[isClean] = true;
|
|
320
|
-
this.walkSync(root);
|
|
321
|
-
}
|
|
322
|
-
if (this.listeners.OnceExit) {
|
|
323
|
-
if (root.type === "document") {
|
|
324
|
-
for (let subRoot of root.nodes) {
|
|
325
|
-
this.visitSync(this.listeners.OnceExit, subRoot);
|
|
326
|
-
}
|
|
327
|
-
} else {
|
|
328
|
-
this.visitSync(this.listeners.OnceExit, root);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
return this.result;
|
|
333
|
-
}
|
|
334
|
-
then(onFulfilled, onRejected) {
|
|
335
|
-
return this.async().then(onFulfilled, onRejected);
|
|
336
|
-
}
|
|
337
|
-
toString() {
|
|
338
|
-
return this.css;
|
|
339
|
-
}
|
|
340
|
-
visitSync(visitors, node) {
|
|
341
|
-
for (let [plugin, visitor] of visitors) {
|
|
342
|
-
this.result.lastPlugin = plugin;
|
|
343
|
-
let promise;
|
|
344
|
-
try {
|
|
345
|
-
promise = visitor(node, this.helpers);
|
|
346
|
-
} catch (e) {
|
|
347
|
-
throw this.handleError(e, node.proxyOf);
|
|
348
|
-
}
|
|
349
|
-
if (node.type !== "root" && node.type !== "document" && !node.parent) {
|
|
350
|
-
return true;
|
|
351
|
-
}
|
|
352
|
-
if (isPromise(promise)) {
|
|
353
|
-
throw this.getAsyncError();
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
visitTick(stack) {
|
|
358
|
-
let visit = stack[stack.length - 1];
|
|
359
|
-
let { node, visitors } = visit;
|
|
360
|
-
if (node.type !== "root" && node.type !== "document" && !node.parent) {
|
|
361
|
-
stack.pop();
|
|
362
|
-
return;
|
|
363
|
-
}
|
|
364
|
-
if (visitors.length > 0 && visit.visitorIndex < visitors.length) {
|
|
365
|
-
let [plugin, visitor] = visitors[visit.visitorIndex];
|
|
366
|
-
visit.visitorIndex += 1;
|
|
367
|
-
if (visit.visitorIndex === visitors.length) {
|
|
368
|
-
visit.visitors = [];
|
|
369
|
-
visit.visitorIndex = 0;
|
|
370
|
-
}
|
|
371
|
-
this.result.lastPlugin = plugin;
|
|
372
|
-
try {
|
|
373
|
-
return visitor(node.toProxy(), this.helpers);
|
|
374
|
-
} catch (e) {
|
|
375
|
-
throw this.handleError(e, node);
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
if (visit.iterator !== 0) {
|
|
379
|
-
let iterator = visit.iterator;
|
|
380
|
-
let child;
|
|
381
|
-
while (child = node.nodes[node.indexes[iterator]]) {
|
|
382
|
-
node.indexes[iterator] += 1;
|
|
383
|
-
if (!child[isClean]) {
|
|
384
|
-
child[isClean] = true;
|
|
385
|
-
stack.push(toStack(child));
|
|
386
|
-
return;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
visit.iterator = 0;
|
|
390
|
-
delete node.indexes[iterator];
|
|
391
|
-
}
|
|
392
|
-
let events = visit.events;
|
|
393
|
-
while (visit.eventIndex < events.length) {
|
|
394
|
-
let event = events[visit.eventIndex];
|
|
395
|
-
visit.eventIndex += 1;
|
|
396
|
-
if (event === CHILDREN) {
|
|
397
|
-
if (node.nodes && node.nodes.length) {
|
|
398
|
-
node[isClean] = true;
|
|
399
|
-
visit.iterator = node.getIterator();
|
|
400
|
-
}
|
|
401
|
-
return;
|
|
402
|
-
} else if (this.listeners[event]) {
|
|
403
|
-
visit.visitors = this.listeners[event];
|
|
404
|
-
return;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
stack.pop();
|
|
408
|
-
}
|
|
409
|
-
walkSync(node) {
|
|
410
|
-
node[isClean] = true;
|
|
411
|
-
let events = getEvents(node);
|
|
412
|
-
for (let event of events) {
|
|
413
|
-
if (event === CHILDREN) {
|
|
414
|
-
if (node.nodes) {
|
|
415
|
-
node.each((child) => {
|
|
416
|
-
if (!child[isClean]) this.walkSync(child);
|
|
417
|
-
});
|
|
418
|
-
}
|
|
419
|
-
} else {
|
|
420
|
-
let visitors = this.listeners[event];
|
|
421
|
-
if (visitors) {
|
|
422
|
-
if (this.visitSync(visitors, node.toProxy())) return;
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
warnings() {
|
|
428
|
-
return this.sync().warnings();
|
|
429
|
-
}
|
|
430
|
-
get content() {
|
|
431
|
-
return this.stringify().content;
|
|
432
|
-
}
|
|
433
|
-
get css() {
|
|
434
|
-
return this.stringify().css;
|
|
435
|
-
}
|
|
436
|
-
get map() {
|
|
437
|
-
return this.stringify().map;
|
|
438
|
-
}
|
|
439
|
-
get messages() {
|
|
440
|
-
return this.sync().messages;
|
|
441
|
-
}
|
|
442
|
-
get opts() {
|
|
443
|
-
return this.result.opts;
|
|
444
|
-
}
|
|
445
|
-
get processor() {
|
|
446
|
-
return this.result.processor;
|
|
447
|
-
}
|
|
448
|
-
get root() {
|
|
449
|
-
return this.sync().root;
|
|
450
|
-
}
|
|
451
|
-
get [Symbol.toStringTag]() {
|
|
452
|
-
return "LazyResult";
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
LazyResult.registerPostcss = (dependant) => {
|
|
456
|
-
postcss = dependant;
|
|
457
|
-
};
|
|
458
|
-
lazyResult = LazyResult;
|
|
459
|
-
LazyResult.default = LazyResult;
|
|
460
|
-
Root.registerLazyResult(LazyResult);
|
|
461
|
-
Document.registerLazyResult(LazyResult);
|
|
462
|
-
return lazyResult;
|
|
463
|
-
}
|
|
464
|
-
export {
|
|
465
|
-
requireLazyResult as __require
|
|
466
|
-
};
|
|
467
|
-
//# sourceMappingURL=lazy-result.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-result.mjs","sources":["../../../../../../node_modules/postcss/lib/lazy-result.js"],"sourcesContent":["'use strict'\n\nlet { isClean, my } = require('./symbols')\nlet MapGenerator = require('./map-generator')\nlet stringify = require('./stringify')\nlet Container = require('./container')\nlet Document = require('./document')\nlet warnOnce = require('./warn-once')\nlet Result = require('./result')\nlet parse = require('./parse')\nlet Root = require('./root')\n\nconst TYPE_TO_CLASS_NAME = {\n atrule: 'AtRule',\n comment: 'Comment',\n decl: 'Declaration',\n document: 'Document',\n root: 'Root',\n rule: 'Rule'\n}\n\nconst PLUGIN_PROPS = {\n AtRule: true,\n AtRuleExit: true,\n Comment: true,\n CommentExit: true,\n Declaration: true,\n DeclarationExit: true,\n Document: true,\n DocumentExit: true,\n Once: true,\n OnceExit: true,\n postcssPlugin: true,\n prepare: true,\n Root: true,\n RootExit: true,\n Rule: true,\n RuleExit: true\n}\n\nconst NOT_VISITORS = {\n Once: true,\n postcssPlugin: true,\n prepare: true\n}\n\nconst CHILDREN = 0\n\nfunction isPromise(obj) {\n return typeof obj === 'object' && typeof obj.then === 'function'\n}\n\nfunction getEvents(node) {\n let key = false\n let type = TYPE_TO_CLASS_NAME[node.type]\n if (node.type === 'decl') {\n key = node.prop.toLowerCase()\n } else if (node.type === 'atrule') {\n key = node.name.toLowerCase()\n }\n\n if (key && node.append) {\n return [\n type,\n type + '-' + key,\n CHILDREN,\n type + 'Exit',\n type + 'Exit-' + key\n ]\n } else if (key) {\n return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key]\n } else if (node.append) {\n return [type, CHILDREN, type + 'Exit']\n } else {\n return [type, type + 'Exit']\n }\n}\n\nfunction toStack(node) {\n let events\n if (node.type === 'document') {\n events = ['Document', CHILDREN, 'DocumentExit']\n } else if (node.type === 'root') {\n events = ['Root', CHILDREN, 'RootExit']\n } else {\n events = getEvents(node)\n }\n\n return {\n eventIndex: 0,\n events,\n iterator: 0,\n node,\n visitorIndex: 0,\n visitors: []\n }\n}\n\nfunction cleanMarks(node) {\n node[isClean] = false\n if (node.nodes) node.nodes.forEach(i => cleanMarks(i))\n return node\n}\n\nlet postcss = {}\n\nclass LazyResult {\n constructor(processor, css, opts) {\n this.stringified = false\n this.processed = false\n\n let root\n if (\n typeof css === 'object' &&\n css !== null &&\n (css.type === 'root' || css.type === 'document')\n ) {\n root = cleanMarks(css)\n } else if (css instanceof LazyResult || css instanceof Result) {\n root = cleanMarks(css.root)\n if (css.map) {\n if (typeof opts.map === 'undefined') opts.map = {}\n if (!opts.map.inline) opts.map.inline = false\n opts.map.prev = css.map\n }\n } else {\n let parser = parse\n if (opts.syntax) parser = opts.syntax.parse\n if (opts.parser) parser = opts.parser\n if (parser.parse) parser = parser.parse\n\n try {\n root = parser(css, opts)\n } catch (error) {\n this.processed = true\n this.error = error\n }\n\n if (root && !root[my]) {\n /* c8 ignore next 2 */\n Container.rebuild(root)\n }\n }\n\n this.result = new Result(processor, root, opts)\n this.helpers = { ...postcss, postcss, result: this.result }\n this.plugins = this.processor.plugins.map(plugin => {\n if (typeof plugin === 'object' && plugin.prepare) {\n return { ...plugin, ...plugin.prepare(this.result) }\n } else {\n return plugin\n }\n })\n }\n\n async() {\n if (this.error) return Promise.reject(this.error)\n if (this.processed) return Promise.resolve(this.result)\n if (!this.processing) {\n this.processing = this.runAsync()\n }\n return this.processing\n }\n\n catch(onRejected) {\n return this.async().catch(onRejected)\n }\n\n finally(onFinally) {\n return this.async().then(onFinally, onFinally)\n }\n\n getAsyncError() {\n throw new Error('Use process(css).then(cb) to work with async plugins')\n }\n\n handleError(error, node) {\n let plugin = this.result.lastPlugin\n try {\n if (node) node.addToError(error)\n this.error = error\n if (error.name === 'CssSyntaxError' && !error.plugin) {\n error.plugin = plugin.postcssPlugin\n error.setMessage()\n } else if (plugin.postcssVersion) {\n if (process.env.NODE_ENV !== 'production') {\n let pluginName = plugin.postcssPlugin\n let pluginVer = plugin.postcssVersion\n let runtimeVer = this.result.processor.version\n let a = pluginVer.split('.')\n let b = runtimeVer.split('.')\n\n if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) {\n // eslint-disable-next-line no-console\n console.error(\n 'Unknown error from PostCSS plugin. Your current PostCSS ' +\n 'version is ' +\n runtimeVer +\n ', but ' +\n pluginName +\n ' uses ' +\n pluginVer +\n '. Perhaps this is the source of the error below.'\n )\n }\n }\n }\n } catch (err) {\n /* c8 ignore next 3 */\n // eslint-disable-next-line no-console\n if (console && console.error) console.error(err)\n }\n return error\n }\n\n prepareVisitors() {\n this.listeners = {}\n let add = (plugin, type, cb) => {\n if (!this.listeners[type]) this.listeners[type] = []\n this.listeners[type].push([plugin, cb])\n }\n for (let plugin of this.plugins) {\n if (typeof plugin === 'object') {\n for (let event in plugin) {\n if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) {\n throw new Error(\n `Unknown event ${event} in ${plugin.postcssPlugin}. ` +\n `Try to update PostCSS (${this.processor.version} now).`\n )\n }\n if (!NOT_VISITORS[event]) {\n if (typeof plugin[event] === 'object') {\n for (let filter in plugin[event]) {\n if (filter === '*') {\n add(plugin, event, plugin[event][filter])\n } else {\n add(\n plugin,\n event + '-' + filter.toLowerCase(),\n plugin[event][filter]\n )\n }\n }\n } else if (typeof plugin[event] === 'function') {\n add(plugin, event, plugin[event])\n }\n }\n }\n }\n }\n this.hasListener = Object.keys(this.listeners).length > 0\n }\n\n async runAsync() {\n this.plugin = 0\n for (let i = 0; i < this.plugins.length; i++) {\n let plugin = this.plugins[i]\n let promise = this.runOnRoot(plugin)\n if (isPromise(promise)) {\n try {\n await promise\n } catch (error) {\n throw this.handleError(error)\n }\n }\n }\n\n this.prepareVisitors()\n if (this.hasListener) {\n let root = this.result.root\n while (!root[isClean]) {\n root[isClean] = true\n let stack = [toStack(root)]\n while (stack.length > 0) {\n let promise = this.visitTick(stack)\n if (isPromise(promise)) {\n try {\n await promise\n } catch (e) {\n let node = stack[stack.length - 1].node\n throw this.handleError(e, node)\n }\n }\n }\n }\n\n if (this.listeners.OnceExit) {\n for (let [plugin, visitor] of this.listeners.OnceExit) {\n this.result.lastPlugin = plugin\n try {\n if (root.type === 'document') {\n let roots = root.nodes.map(subRoot =>\n visitor(subRoot, this.helpers)\n )\n\n await Promise.all(roots)\n } else {\n await visitor(root, this.helpers)\n }\n } catch (e) {\n throw this.handleError(e)\n }\n }\n }\n }\n\n this.processed = true\n return this.stringify()\n }\n\n runOnRoot(plugin) {\n this.result.lastPlugin = plugin\n try {\n if (typeof plugin === 'object' && plugin.Once) {\n if (this.result.root.type === 'document') {\n let roots = this.result.root.nodes.map(root =>\n plugin.Once(root, this.helpers)\n )\n\n if (isPromise(roots[0])) {\n return Promise.all(roots)\n }\n\n return roots\n }\n\n return plugin.Once(this.result.root, this.helpers)\n } else if (typeof plugin === 'function') {\n return plugin(this.result.root, this.result)\n }\n } catch (error) {\n throw this.handleError(error)\n }\n }\n\n stringify() {\n if (this.error) throw this.error\n if (this.stringified) return this.result\n this.stringified = true\n\n this.sync()\n\n let opts = this.result.opts\n let str = stringify\n if (opts.syntax) str = opts.syntax.stringify\n if (opts.stringifier) str = opts.stringifier\n if (str.stringify) str = str.stringify\n\n let map = new MapGenerator(str, this.result.root, this.result.opts)\n let data = map.generate()\n this.result.css = data[0]\n this.result.map = data[1]\n\n return this.result\n }\n\n sync() {\n if (this.error) throw this.error\n if (this.processed) return this.result\n this.processed = true\n\n if (this.processing) {\n throw this.getAsyncError()\n }\n\n for (let plugin of this.plugins) {\n let promise = this.runOnRoot(plugin)\n if (isPromise(promise)) {\n throw this.getAsyncError()\n }\n }\n\n this.prepareVisitors()\n if (this.hasListener) {\n let root = this.result.root\n while (!root[isClean]) {\n root[isClean] = true\n this.walkSync(root)\n }\n if (this.listeners.OnceExit) {\n if (root.type === 'document') {\n for (let subRoot of root.nodes) {\n this.visitSync(this.listeners.OnceExit, subRoot)\n }\n } else {\n this.visitSync(this.listeners.OnceExit, root)\n }\n }\n }\n\n return this.result\n }\n\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== 'production') {\n if (!('from' in this.opts)) {\n warnOnce(\n 'Without `from` option PostCSS could generate wrong source map ' +\n 'and will not find Browserslist config. Set it to CSS file path ' +\n 'or to `undefined` to prevent this warning.'\n )\n }\n }\n return this.async().then(onFulfilled, onRejected)\n }\n\n toString() {\n return this.css\n }\n\n visitSync(visitors, node) {\n for (let [plugin, visitor] of visitors) {\n this.result.lastPlugin = plugin\n let promise\n try {\n promise = visitor(node, this.helpers)\n } catch (e) {\n throw this.handleError(e, node.proxyOf)\n }\n if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n return true\n }\n if (isPromise(promise)) {\n throw this.getAsyncError()\n }\n }\n }\n\n visitTick(stack) {\n let visit = stack[stack.length - 1]\n let { node, visitors } = visit\n\n if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n stack.pop()\n return\n }\n\n if (visitors.length > 0 && visit.visitorIndex < visitors.length) {\n let [plugin, visitor] = visitors[visit.visitorIndex]\n visit.visitorIndex += 1\n if (visit.visitorIndex === visitors.length) {\n visit.visitors = []\n visit.visitorIndex = 0\n }\n this.result.lastPlugin = plugin\n try {\n return visitor(node.toProxy(), this.helpers)\n } catch (e) {\n throw this.handleError(e, node)\n }\n }\n\n if (visit.iterator !== 0) {\n let iterator = visit.iterator\n let child\n while ((child = node.nodes[node.indexes[iterator]])) {\n node.indexes[iterator] += 1\n if (!child[isClean]) {\n child[isClean] = true\n stack.push(toStack(child))\n return\n }\n }\n visit.iterator = 0\n delete node.indexes[iterator]\n }\n\n let events = visit.events\n while (visit.eventIndex < events.length) {\n let event = events[visit.eventIndex]\n visit.eventIndex += 1\n if (event === CHILDREN) {\n if (node.nodes && node.nodes.length) {\n node[isClean] = true\n visit.iterator = node.getIterator()\n }\n return\n } else if (this.listeners[event]) {\n visit.visitors = this.listeners[event]\n return\n }\n }\n stack.pop()\n }\n\n walkSync(node) {\n node[isClean] = true\n let events = getEvents(node)\n for (let event of events) {\n if (event === CHILDREN) {\n if (node.nodes) {\n node.each(child => {\n if (!child[isClean]) this.walkSync(child)\n })\n }\n } else {\n let visitors = this.listeners[event]\n if (visitors) {\n if (this.visitSync(visitors, node.toProxy())) return\n }\n }\n }\n }\n\n warnings() {\n return this.sync().warnings()\n }\n\n get content() {\n return this.stringify().content\n }\n\n get css() {\n return this.stringify().css\n }\n\n get map() {\n return this.stringify().map\n }\n\n get messages() {\n return this.sync().messages\n }\n\n get opts() {\n return this.result.opts\n }\n\n get processor() {\n return this.result.processor\n }\n\n get root() {\n return this.sync().root\n }\n\n get [Symbol.toStringTag]() {\n return 'LazyResult'\n }\n}\n\nLazyResult.registerPostcss = dependant => {\n postcss = dependant\n}\n\nmodule.exports = LazyResult\nLazyResult.default = LazyResult\n\nRoot.registerLazyResult(LazyResult)\nDocument.registerLazyResult(LazyResult)\n"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$6","require$$7","require$$8"],"mappings":";;;;;;;;;;;;;AAEA,MAAI,EAAE,SAAS,GAAA,IAAOA,eAAA;AACtB,MAAI,eAAeC,oBAAA;AACnB,MAAI,YAAYC,iBAAA;AAChB,MAAI,YAAYC,iBAAA;AAChB,MAAI,W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0]}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
var list_1;
|
|
2
|
-
var hasRequiredList;
|
|
3
|
-
function requireList() {
|
|
4
|
-
if (hasRequiredList) return list_1;
|
|
5
|
-
hasRequiredList = 1;
|
|
6
|
-
let list = {
|
|
7
|
-
comma(string) {
|
|
8
|
-
return list.split(string, [","], true);
|
|
9
|
-
},
|
|
10
|
-
space(string) {
|
|
11
|
-
let spaces = [" ", "\n", " "];
|
|
12
|
-
return list.split(string, spaces);
|
|
13
|
-
},
|
|
14
|
-
split(string, separators, last) {
|
|
15
|
-
let array = [];
|
|
16
|
-
let current = "";
|
|
17
|
-
let split = false;
|
|
18
|
-
let func = 0;
|
|
19
|
-
let inQuote = false;
|
|
20
|
-
let prevQuote = "";
|
|
21
|
-
let escape = false;
|
|
22
|
-
for (let letter of string) {
|
|
23
|
-
if (escape) {
|
|
24
|
-
escape = false;
|
|
25
|
-
} else if (letter === "\\") {
|
|
26
|
-
escape = true;
|
|
27
|
-
} else if (inQuote) {
|
|
28
|
-
if (letter === prevQuote) {
|
|
29
|
-
inQuote = false;
|
|
30
|
-
}
|
|
31
|
-
} else if (letter === '"' || letter === "'") {
|
|
32
|
-
inQuote = true;
|
|
33
|
-
prevQuote = letter;
|
|
34
|
-
} else if (letter === "(") {
|
|
35
|
-
func += 1;
|
|
36
|
-
} else if (letter === ")") {
|
|
37
|
-
if (func > 0) func -= 1;
|
|
38
|
-
} else if (func === 0) {
|
|
39
|
-
if (separators.includes(letter)) split = true;
|
|
40
|
-
}
|
|
41
|
-
if (split) {
|
|
42
|
-
if (current !== "") array.push(current.trim());
|
|
43
|
-
current = "";
|
|
44
|
-
split = false;
|
|
45
|
-
} else {
|
|
46
|
-
current += letter;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if (last || current !== "") array.push(current.trim());
|
|
50
|
-
return array;
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
list_1 = list;
|
|
54
|
-
list.default = list;
|
|
55
|
-
return list_1;
|
|
56
|
-
}
|
|
57
|
-
export {
|
|
58
|
-
requireList as __require
|
|
59
|
-
};
|
|
60
|
-
//# sourceMappingURL=list.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list.mjs","sources":["../../../../../../node_modules/postcss/lib/list.js"],"sourcesContent":["'use strict'\n\nlet list = {\n comma(string) {\n return list.split(string, [','], true)\n },\n\n space(string) {\n let spaces = [' ', '\\n', '\\t']\n return list.split(string, spaces)\n },\n\n split(string, separators, last) {\n let array = []\n let current = ''\n let split = false\n\n let func = 0\n let inQuote = false\n let prevQuote = ''\n let escape = false\n\n for (let letter of string) {\n if (escape) {\n escape = false\n } else if (letter === '\\\\') {\n escape = true\n } else if (inQuote) {\n if (letter === prevQuote) {\n inQuote = false\n }\n } else if (letter === '\"' || letter === \"'\") {\n inQuote = true\n prevQuote = letter\n } else if (letter === '(') {\n func += 1\n } else if (letter === ')') {\n if (func > 0) func -= 1\n } else if (func === 0) {\n if (separators.includes(letter)) split = true\n }\n\n if (split) {\n if (current !== '') array.push(current.trim())\n current = ''\n split = false\n } else {\n current += letter\n }\n }\n\n if (last || current !== '') array.push(current.trim())\n return array\n }\n}\n\nmodule.exports = list\nlist.default = list\n"],"names":[],"mappings":";;;;;AAEA,MAAI,OAAO;AAAA,IACT,MAAM,QAAQ;AACZ,aAAO,KAAK,MAAM,QAAQ,CAAC,GAAG,GAAG,IAAI;AAAA,IACzC;AAAA,IAEE,MAAM,QAAQ;AACZ,UAAI,SAAS,CAAC,KAAK,MAAM,GAAI;AAC7B,aAAO,KAAK,MAAM,QAAQ,MAAM;AAAA,IACpC;AAAA,IAEE,MAAM,QAAQ,YAAY,MAAM;AAC9B,UAAI,QAAQ,CAAA;AACZ,UAAI,UAAU;AACd,UAAI,QAAQ;AAEZ,UAAI,OAAO;AACX,UAAI,UAAU;AACd,UAAI,YAAY;AAChB,UAAI,SAAS;AAEb,eAAS,UAAU,QAAQ;AACzB,YAAI,QAAQ;AACV,mBAAS;AAAA,QACjB,WAAiB,WAAW,MAAM;AAC1B,mBAAS;AAAA,QACjB,WAAiB,SAAS;AAClB,cAAI,WAAW,WAAW;AACxB,sBAAU;AAAA,UACpB;AAAA,QACA,WAAiB,WAAW,OAAO,WAAW,KAAK;AAC3C,oBAAU;AACV,sBAAY;AAAA,QACpB,WAAiB,WAAW,KAAK;AACzB,kBAAQ;AAAA,QAChB,WAAiB,WAAW,KAAK;AACzB,cAAI,OAAO,EAAG,SAAQ;AAAA,QAC9B,WAAiB,SAAS,GAAG;AACrB,cAAI,WAAW,SAAS,MAAM,EAAG,SAAQ;AAAA,QACjD;AAEM,YAAI,OAAO;AACT,cAAI,YAAY,GAAI,OAAM,KAAK,QAAQ,KAAI,CAAE;AAC7C,oBAAU;AACV,kBAAQ;AAAA,QAChB,OAAa;AACL,qBAAW;AAAA,QACnB;AAAA,MACA;AAEI,UAAI,QAAQ,YAAY,GAAI,OAAM,KAAK,QAAQ,KAAI,CAAE;AACrD,aAAO;AAAA,IACX;AAAA,EACA;AAEA,WAAiB;AACjB,OAAK,UAAU;;;","x_google_ignoreList":[0]}
|