@universityofmaryland/web-model-library 1.0.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 +138 -0
- package/dist/_types.d.ts +77 -0
- package/dist/_types.d.ts.map +1 -0
- package/dist/_virtual/___vite-browser-external.js +8 -0
- package/dist/_virtual/___vite-browser-external.js.map +1 -0
- package/dist/_virtual/___vite-browser-external.mjs +7 -0
- package/dist/_virtual/___vite-browser-external.mjs.map +1 -0
- package/dist/_virtual/__vite-browser-external.js +4 -0
- package/dist/_virtual/__vite-browser-external.js.map +1 -0
- package/dist/_virtual/__vite-browser-external.mjs +5 -0
- package/dist/_virtual/__vite-browser-external.mjs.map +1 -0
- package/dist/_virtual/_commonjsHelpers.js +37 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/_commonjsHelpers.mjs +37 -0
- package/dist/_virtual/_commonjsHelpers.mjs.map +1 -0
- package/dist/_virtual/index.js +7 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index.mjs +8 -0
- package/dist/_virtual/index.mjs.map +1 -0
- package/dist/_virtual/picocolors.browser.js +5 -0
- package/dist/_virtual/picocolors.browser.js.map +1 -0
- package/dist/_virtual/picocolors.browser.mjs +5 -0
- package/dist/_virtual/picocolors.browser.mjs.map +1 -0
- package/dist/_virtual/postcss.js +7 -0
- package/dist/_virtual/postcss.js.map +1 -0
- package/dist/_virtual/postcss.mjs +8 -0
- package/dist/_virtual/postcss.mjs.map +1 -0
- package/dist/_virtual/symbols.js +5 -0
- package/dist/_virtual/symbols.js.map +1 -0
- package/dist/_virtual/symbols.mjs +5 -0
- package/dist/_virtual/symbols.mjs.map +1 -0
- package/dist/attributes/checks.d.ts +133 -0
- package/dist/attributes/checks.d.ts.map +1 -0
- package/dist/attributes/checks.js +757 -0
- package/dist/attributes/checks.js.map +1 -0
- package/dist/attributes/checks.mjs +740 -0
- package/dist/attributes/checks.mjs.map +1 -0
- package/dist/attributes/handler.d.ts +52 -0
- package/dist/attributes/handler.d.ts.map +1 -0
- package/dist/attributes/handler.js +205 -0
- package/dist/attributes/handler.js.map +1 -0
- package/dist/attributes/handler.mjs +206 -0
- package/dist/attributes/handler.mjs.map +1 -0
- package/dist/attributes/index.d.ts +7 -0
- package/dist/attributes/index.d.ts.map +1 -0
- package/dist/attributes/names.d.ts +132 -0
- package/dist/attributes/names.d.ts.map +1 -0
- package/dist/attributes/names.js +145 -0
- package/dist/attributes/names.js.map +1 -0
- package/dist/attributes/names.mjs +146 -0
- package/dist/attributes/names.mjs.map +1 -0
- package/dist/attributes/values.d.ts +70 -0
- package/dist/attributes/values.d.ts.map +1 -0
- package/dist/attributes/values.js +80 -0
- package/dist/attributes/values.js.map +1 -0
- package/dist/attributes/values.mjs +81 -0
- package/dist/attributes/values.mjs.map +1 -0
- package/dist/attributes.d.ts +2 -0
- package/dist/attributes.js +23 -0
- package/dist/attributes.js.map +1 -0
- package/dist/attributes.mjs +23 -0
- package/dist/attributes.mjs.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +13 -0
- package/dist/index.mjs.map +1 -0
- package/dist/model/index.d.ts +43 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model.d.ts +2 -0
- package/dist/model.js +259 -0
- package/dist/model.js.map +1 -0
- package/dist/model.mjs +259 -0
- package/dist/model.mjs.map +1 -0
- package/dist/node_modules/nanoid/non-secure/index.js +31 -0
- package/dist/node_modules/nanoid/non-secure/index.js.map +1 -0
- package/dist/node_modules/nanoid/non-secure/index.mjs +31 -0
- package/dist/node_modules/nanoid/non-secure/index.mjs.map +1 -0
- package/dist/node_modules/picocolors/picocolors.browser.js +17 -0
- package/dist/node_modules/picocolors/picocolors.browser.js.map +1 -0
- package/dist/node_modules/picocolors/picocolors.browser.mjs +17 -0
- package/dist/node_modules/picocolors/picocolors.browser.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/at-rule.js +30 -0
- package/dist/node_modules/postcss/lib/at-rule.js.map +1 -0
- package/dist/node_modules/postcss/lib/at-rule.mjs +30 -0
- package/dist/node_modules/postcss/lib/at-rule.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/comment.js +21 -0
- package/dist/node_modules/postcss/lib/comment.js.map +1 -0
- package/dist/node_modules/postcss/lib/comment.mjs +21 -0
- package/dist/node_modules/postcss/lib/comment.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/container.js +383 -0
- package/dist/node_modules/postcss/lib/container.js.map +1 -0
- package/dist/node_modules/postcss/lib/container.mjs +383 -0
- package/dist/node_modules/postcss/lib/container.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/css-syntax-error.js +92 -0
- package/dist/node_modules/postcss/lib/css-syntax-error.js.map +1 -0
- package/dist/node_modules/postcss/lib/css-syntax-error.mjs +92 -0
- package/dist/node_modules/postcss/lib/css-syntax-error.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/declaration.js +27 -0
- package/dist/node_modules/postcss/lib/declaration.js.map +1 -0
- package/dist/node_modules/postcss/lib/declaration.mjs +27 -0
- package/dist/node_modules/postcss/lib/declaration.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/document.js +34 -0
- package/dist/node_modules/postcss/lib/document.js.map +1 -0
- package/dist/node_modules/postcss/lib/document.mjs +34 -0
- package/dist/node_modules/postcss/lib/document.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/fromJSON.js +67 -0
- package/dist/node_modules/postcss/lib/fromJSON.js.map +1 -0
- package/dist/node_modules/postcss/lib/fromJSON.mjs +67 -0
- package/dist/node_modules/postcss/lib/fromJSON.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/input.js +216 -0
- package/dist/node_modules/postcss/lib/input.js.map +1 -0
- package/dist/node_modules/postcss/lib/input.mjs +216 -0
- package/dist/node_modules/postcss/lib/input.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/lazy-result.js +467 -0
- package/dist/node_modules/postcss/lib/lazy-result.js.map +1 -0
- package/dist/node_modules/postcss/lib/lazy-result.mjs +467 -0
- package/dist/node_modules/postcss/lib/lazy-result.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/list.js +60 -0
- package/dist/node_modules/postcss/lib/list.js.map +1 -0
- package/dist/node_modules/postcss/lib/list.mjs +60 -0
- package/dist/node_modules/postcss/lib/list.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/map-generator.js +314 -0
- package/dist/node_modules/postcss/lib/map-generator.js.map +1 -0
- package/dist/node_modules/postcss/lib/map-generator.mjs +314 -0
- package/dist/node_modules/postcss/lib/map-generator.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/no-work-result.js +113 -0
- package/dist/node_modules/postcss/lib/no-work-result.js.map +1 -0
- package/dist/node_modules/postcss/lib/no-work-result.mjs +113 -0
- package/dist/node_modules/postcss/lib/no-work-result.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/node.js +335 -0
- package/dist/node_modules/postcss/lib/node.js.map +1 -0
- package/dist/node_modules/postcss/lib/node.mjs +335 -0
- package/dist/node_modules/postcss/lib/node.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/parse.js +30 -0
- package/dist/node_modules/postcss/lib/parse.js.map +1 -0
- package/dist/node_modules/postcss/lib/parse.mjs +30 -0
- package/dist/node_modules/postcss/lib/parse.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/parser.js +543 -0
- package/dist/node_modules/postcss/lib/parser.js.map +1 -0
- package/dist/node_modules/postcss/lib/parser.mjs +543 -0
- package/dist/node_modules/postcss/lib/parser.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/postcss.js +28 -0
- package/dist/node_modules/postcss/lib/postcss.js.map +1 -0
- package/dist/node_modules/postcss/lib/postcss.mjs +29 -0
- package/dist/node_modules/postcss/lib/postcss.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/postcss2.js +110 -0
- package/dist/node_modules/postcss/lib/postcss2.js.map +1 -0
- package/dist/node_modules/postcss/lib/postcss2.mjs +110 -0
- package/dist/node_modules/postcss/lib/postcss2.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/previous-map.js +123 -0
- package/dist/node_modules/postcss/lib/previous-map.js.map +1 -0
- package/dist/node_modules/postcss/lib/previous-map.mjs +123 -0
- package/dist/node_modules/postcss/lib/previous-map.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/processor.js +61 -0
- package/dist/node_modules/postcss/lib/processor.js.map +1 -0
- package/dist/node_modules/postcss/lib/processor.mjs +61 -0
- package/dist/node_modules/postcss/lib/processor.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/result.js +44 -0
- package/dist/node_modules/postcss/lib/result.js.map +1 -0
- package/dist/node_modules/postcss/lib/result.mjs +44 -0
- package/dist/node_modules/postcss/lib/result.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/root.js +58 -0
- package/dist/node_modules/postcss/lib/root.js.map +1 -0
- package/dist/node_modules/postcss/lib/root.mjs +58 -0
- package/dist/node_modules/postcss/lib/root.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/rule.js +33 -0
- package/dist/node_modules/postcss/lib/rule.js.map +1 -0
- package/dist/node_modules/postcss/lib/rule.mjs +33 -0
- package/dist/node_modules/postcss/lib/rule.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/stringifier.js +308 -0
- package/dist/node_modules/postcss/lib/stringifier.js.map +1 -0
- package/dist/node_modules/postcss/lib/stringifier.mjs +308 -0
- package/dist/node_modules/postcss/lib/stringifier.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/stringify.js +19 -0
- package/dist/node_modules/postcss/lib/stringify.js.map +1 -0
- package/dist/node_modules/postcss/lib/stringify.mjs +19 -0
- package/dist/node_modules/postcss/lib/stringify.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/symbols.js +13 -0
- package/dist/node_modules/postcss/lib/symbols.js.map +1 -0
- package/dist/node_modules/postcss/lib/symbols.mjs +13 -0
- package/dist/node_modules/postcss/lib/symbols.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/tokenize.js +219 -0
- package/dist/node_modules/postcss/lib/tokenize.js.map +1 -0
- package/dist/node_modules/postcss/lib/tokenize.mjs +219 -0
- package/dist/node_modules/postcss/lib/tokenize.mjs.map +1 -0
- package/dist/node_modules/postcss/lib/warning.js +40 -0
- package/dist/node_modules/postcss/lib/warning.js.map +1 -0
- package/dist/node_modules/postcss/lib/warning.mjs +40 -0
- package/dist/node_modules/postcss/lib/warning.mjs.map +1 -0
- package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.js +130 -0
- package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.js.map +1 -0
- package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.mjs +130 -0
- package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.mjs.map +1 -0
- package/dist/slots/create.d.ts +15 -0
- package/dist/slots/create.d.ts.map +1 -0
- package/dist/slots/create.js +50 -0
- package/dist/slots/create.js.map +1 -0
- package/dist/slots/create.mjs +50 -0
- package/dist/slots/create.mjs.map +1 -0
- package/dist/slots/element.d.ts +3 -0
- package/dist/slots/element.d.ts.map +1 -0
- package/dist/slots/element.js +42 -0
- package/dist/slots/element.js.map +1 -0
- package/dist/slots/element.mjs +42 -0
- package/dist/slots/element.mjs.map +1 -0
- package/dist/slots/extract.d.ts +6 -0
- package/dist/slots/extract.d.ts.map +1 -0
- package/dist/slots/index.d.ts +140 -0
- package/dist/slots/index.d.ts.map +1 -0
- package/dist/slots/mapping.d.ts +82 -0
- package/dist/slots/mapping.d.ts.map +1 -0
- package/dist/slots/mapping.js +97 -0
- package/dist/slots/mapping.js.map +1 -0
- package/dist/slots/mapping.mjs +97 -0
- package/dist/slots/mapping.mjs.map +1 -0
- package/dist/slots/query.d.ts +9 -0
- package/dist/slots/query.d.ts.map +1 -0
- package/dist/slots/validate.d.ts +22 -0
- package/dist/slots/validate.d.ts.map +1 -0
- package/dist/slots.d.ts +6 -0
- package/dist/slots.js +73 -0
- package/dist/slots.js.map +1 -0
- package/dist/slots.mjs +74 -0
- package/dist/slots.mjs.map +1 -0
- package/dist/utilities/index.d.ts +4 -0
- package/dist/utilities/index.d.ts.map +1 -0
- package/dist/utilities/lifecycle.d.ts +12 -0
- package/dist/utilities/lifecycle.d.ts.map +1 -0
- package/dist/utilities/lifecycle.js +21 -0
- package/dist/utilities/lifecycle.js.map +1 -0
- package/dist/utilities/lifecycle.mjs +21 -0
- package/dist/utilities/lifecycle.mjs.map +1 -0
- package/dist/utilities/register.d.ts +17 -0
- package/dist/utilities/register.d.ts.map +1 -0
- package/dist/utilities/register.js +32 -0
- package/dist/utilities/register.js.map +1 -0
- package/dist/utilities/register.mjs +32 -0
- package/dist/utilities/register.mjs.map +1 -0
- package/dist/utilities/styles.d.ts +5 -0
- package/dist/utilities/styles.d.ts.map +1 -0
- package/dist/utilities/styles.js +79 -0
- package/dist/utilities/styles.js.map +1 -0
- package/dist/utilities/styles.mjs +80 -0
- package/dist/utilities/styles.mjs.map +1 -0
- package/dist/utilities.d.ts +2 -0
- package/dist/utilities.js +11 -0
- package/dist/utilities.js.map +1 -0
- package/dist/utilities.mjs +11 -0
- package/dist/utilities.mjs.map +1 -0
- package/package.json +69 -0
|
@@ -0,0 +1,27 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const container = require("./container.js");
|
|
4
|
+
var document;
|
|
5
|
+
var hasRequiredDocument;
|
|
6
|
+
function requireDocument() {
|
|
7
|
+
if (hasRequiredDocument) return document;
|
|
8
|
+
hasRequiredDocument = 1;
|
|
9
|
+
let Container = container.__require();
|
|
10
|
+
let LazyResult, Processor;
|
|
11
|
+
class Document extends Container {
|
|
12
|
+
constructor(defaults) {
|
|
13
|
+
super({ type: "document", ...defaults });
|
|
14
|
+
if (!this.nodes) {
|
|
15
|
+
this.nodes = [];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
toResult(opts = {}) {
|
|
19
|
+
let lazy = new LazyResult(new Processor(), this, opts);
|
|
20
|
+
return lazy.stringify();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
Document.registerLazyResult = (dependant) => {
|
|
24
|
+
LazyResult = dependant;
|
|
25
|
+
};
|
|
26
|
+
Document.registerProcessor = (dependant) => {
|
|
27
|
+
Processor = dependant;
|
|
28
|
+
};
|
|
29
|
+
document = Document;
|
|
30
|
+
Document.default = Document;
|
|
31
|
+
return document;
|
|
32
|
+
}
|
|
33
|
+
exports.__require = requireDocument;
|
|
34
|
+
//# sourceMappingURL=document.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.js","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,UAAAA,UAAA;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]}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const declaration = require("./declaration.js");
|
|
4
|
+
const previousMap = require("./previous-map.js");
|
|
5
|
+
const comment = require("./comment.js");
|
|
6
|
+
const atRule = require("./at-rule.js");
|
|
7
|
+
const input = require("./input.js");
|
|
8
|
+
const root = require("./root.js");
|
|
9
|
+
const rule = require("./rule.js");
|
|
10
|
+
var fromJSON_1;
|
|
11
|
+
var hasRequiredFromJSON;
|
|
12
|
+
function requireFromJSON() {
|
|
13
|
+
if (hasRequiredFromJSON) return fromJSON_1;
|
|
14
|
+
hasRequiredFromJSON = 1;
|
|
15
|
+
let Declaration = declaration.__require();
|
|
16
|
+
let PreviousMap = previousMap.__require();
|
|
17
|
+
let Comment = comment.__require();
|
|
18
|
+
let AtRule = atRule.__require();
|
|
19
|
+
let Input = input.__require();
|
|
20
|
+
let Root = root.__require();
|
|
21
|
+
let Rule = rule.__require();
|
|
22
|
+
function fromJSON(json, inputs) {
|
|
23
|
+
if (Array.isArray(json)) return json.map((n) => fromJSON(n));
|
|
24
|
+
let { inputs: ownInputs, ...defaults } = json;
|
|
25
|
+
if (ownInputs) {
|
|
26
|
+
inputs = [];
|
|
27
|
+
for (let input2 of ownInputs) {
|
|
28
|
+
let inputHydrated = { ...input2, __proto__: Input.prototype };
|
|
29
|
+
if (inputHydrated.map) {
|
|
30
|
+
inputHydrated.map = {
|
|
31
|
+
...inputHydrated.map,
|
|
32
|
+
__proto__: PreviousMap.prototype
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
inputs.push(inputHydrated);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (defaults.nodes) {
|
|
39
|
+
defaults.nodes = json.nodes.map((n) => fromJSON(n, inputs));
|
|
40
|
+
}
|
|
41
|
+
if (defaults.source) {
|
|
42
|
+
let { inputId, ...source } = defaults.source;
|
|
43
|
+
defaults.source = source;
|
|
44
|
+
if (inputId != null) {
|
|
45
|
+
defaults.source.input = inputs[inputId];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (defaults.type === "root") {
|
|
49
|
+
return new Root(defaults);
|
|
50
|
+
} else if (defaults.type === "decl") {
|
|
51
|
+
return new Declaration(defaults);
|
|
52
|
+
} else if (defaults.type === "rule") {
|
|
53
|
+
return new Rule(defaults);
|
|
54
|
+
} else if (defaults.type === "comment") {
|
|
55
|
+
return new Comment(defaults);
|
|
56
|
+
} else if (defaults.type === "atrule") {
|
|
57
|
+
return new AtRule(defaults);
|
|
58
|
+
} else {
|
|
59
|
+
throw new Error("Unknown node type: " + json.type);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
fromJSON_1 = fromJSON;
|
|
63
|
+
fromJSON.default = fromJSON;
|
|
64
|
+
return fromJSON_1;
|
|
65
|
+
}
|
|
66
|
+
exports.__require = requireFromJSON;
|
|
67
|
+
//# sourceMappingURL=fromJSON.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromJSON.js","sources":["../../../../../../node_modules/postcss/lib/fromJSON.js"],"sourcesContent":["'use strict'\n\nlet Declaration = require('./declaration')\nlet PreviousMap = require('./previous-map')\nlet Comment = require('./comment')\nlet AtRule = require('./at-rule')\nlet Input = require('./input')\nlet Root = require('./root')\nlet Rule = require('./rule')\n\nfunction fromJSON(json, inputs) {\n if (Array.isArray(json)) return json.map(n => fromJSON(n))\n\n let { inputs: ownInputs, ...defaults } = json\n if (ownInputs) {\n inputs = []\n for (let input of ownInputs) {\n let inputHydrated = { ...input, __proto__: Input.prototype }\n if (inputHydrated.map) {\n inputHydrated.map = {\n ...inputHydrated.map,\n __proto__: PreviousMap.prototype\n }\n }\n inputs.push(inputHydrated)\n }\n }\n if (defaults.nodes) {\n defaults.nodes = json.nodes.map(n => fromJSON(n, inputs))\n }\n if (defaults.source) {\n let { inputId, ...source } = defaults.source\n defaults.source = source\n if (inputId != null) {\n defaults.source.input = inputs[inputId]\n }\n }\n if (defaults.type === 'root') {\n return new Root(defaults)\n } else if (defaults.type === 'decl') {\n return new Declaration(defaults)\n } else if (defaults.type === 'rule') {\n return new Rule(defaults)\n } else if (defaults.type === 'comment') {\n return new Comment(defaults)\n } else if (defaults.type === 'atrule') {\n return new AtRule(defaults)\n } else {\n throw new Error('Unknown node type: ' + json.type)\n }\n}\n\nmodule.exports = fromJSON\nfromJSON.default = fromJSON\n"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$5","require$$6","input"],"mappings":";;;;;;;;;;;;;;AAEA,MAAI,cAAcA,YAAAA,UAAA;AAClB,MAAI,cAAcC,YAAAA,UAAA;AAClB,MAAI,UAAUC,QAAAA,UAAA;AACd,MAAI,SAASC,OAAAA,UAAA;AACb,MAAI,QAAQC,MAAAA,UAAA;AACZ,MAAI,OAAOC,KAAAA,UAAA;AACX,MAAI,OAAOC,KAAAA,UAAA;AAEX,WAAS,SAAS,MAAM,QAAQ;AAC9B,QAAI,MAAM,QAAQ,IAAI,EAAG,QAAO,KAAK,IAAI,OAAK,SAAS,CAAC,CAAC;AAEzD,QAAI,EAAE,QAAQ,WAAW,GAAG,SAAQ,IAAK;AACzC,QAAI,WAAW;AACb,eAAS,CAAA;AACT,eAASC,UAAS,WAAW;AAC3B,YAAI,gBAAgB,EAAE,GAAGA,QAAO,WAAW,MAAM,UAAS;AAC1D,YAAI,cAAc,KAAK;AACrB,wBAAc,MAAM;AAAA,YAClB,GAAG,cAAc;AAAA,YACjB,WAAW,YAAY;AAAA,UACjC;AAAA,QACA;AACM,eAAO,KAAK,aAAa;AAAA,MAC/B;AAAA,IACA;AACE,QAAI,SAAS,OAAO;AAClB,eAAS,QAAQ,KAAK,MAAM,IAAI,OAAK,SAAS,GAAG,MAAM,CAAC;AAAA,IAC5D;AACE,QAAI,SAAS,QAAQ;AACnB,UAAI,EAAE,SAAS,GAAG,OAAM,IAAK,SAAS;AACtC,eAAS,SAAS;AAClB,UAAI,WAAW,MAAM;AACnB,iBAAS,OAAO,QAAQ,OAAO,OAAO;AAAA,MAC5C;AAAA,IACA;AACE,QAAI,SAAS,SAAS,QAAQ;AAC5B,aAAO,IAAI,KAAK,QAAQ;AAAA,IAC5B,WAAa,SAAS,SAAS,QAAQ;AACnC,aAAO,IAAI,YAAY,QAAQ;AAAA,IACnC,WAAa,SAAS,SAAS,QAAQ;AACnC,aAAO,IAAI,KAAK,QAAQ;AAAA,IAC5B,WAAa,SAAS,SAAS,WAAW;AACtC,aAAO,IAAI,QAAQ,QAAQ;AAAA,IAC/B,WAAa,SAAS,SAAS,UAAU;AACrC,aAAO,IAAI,OAAO,QAAQ;AAAA,IAC9B,OAAS;AACL,YAAM,IAAI,MAAM,wBAAwB,KAAK,IAAI;AAAA,IACrD;AAAA,EACA;AAEA,eAAiB;AACjB,WAAS,UAAU;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromJSON.mjs","sources":["../../../../../../node_modules/postcss/lib/fromJSON.js"],"sourcesContent":["'use strict'\n\nlet Declaration = require('./declaration')\nlet PreviousMap = require('./previous-map')\nlet Comment = require('./comment')\nlet AtRule = require('./at-rule')\nlet Input = require('./input')\nlet Root = require('./root')\nlet Rule = require('./rule')\n\nfunction fromJSON(json, inputs) {\n if (Array.isArray(json)) return json.map(n => fromJSON(n))\n\n let { inputs: ownInputs, ...defaults } = json\n if (ownInputs) {\n inputs = []\n for (let input of ownInputs) {\n let inputHydrated = { ...input, __proto__: Input.prototype }\n if (inputHydrated.map) {\n inputHydrated.map = {\n ...inputHydrated.map,\n __proto__: PreviousMap.prototype\n }\n }\n inputs.push(inputHydrated)\n }\n }\n if (defaults.nodes) {\n defaults.nodes = json.nodes.map(n => fromJSON(n, inputs))\n }\n if (defaults.source) {\n let { inputId, ...source } = defaults.source\n defaults.source = source\n if (inputId != null) {\n defaults.source.input = inputs[inputId]\n }\n }\n if (defaults.type === 'root') {\n return new Root(defaults)\n } else if (defaults.type === 'decl') {\n return new Declaration(defaults)\n } else if (defaults.type === 'rule') {\n return new Rule(defaults)\n } else if (defaults.type === 'comment') {\n return new Comment(defaults)\n } else if (defaults.type === 'atrule') {\n return new AtRule(defaults)\n } else {\n throw new Error('Unknown node type: ' + json.type)\n }\n}\n\nmodule.exports = fromJSON\nfromJSON.default = fromJSON\n"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$5","require$$6"],"mappings":";;;;;;;;;;;;AAEA,MAAI,cAAcA,mBAAA;AAClB,MAAI,cAAcC,mBAAA;AAClB,MAAI,UAAUC,eAAA;AACd,MAAI,SAASC,cAAA;AACb,MAAI,QAAQC,aAAA;AACZ,MAAI,OAAOC,YAAA;AACX,MAAI,OAAOC,YAAA;AAEX,WAAS,SAAS,MAAM,QAAQ;AAC9B,QAAI,MAAM,QAAQ,IAAI,EAAG,QAAO,KAAK,IAAI,OAAK,SAAS,CAAC,CAAC;AAEzD,QAAI,EAAE,QAAQ,WAAW,GAAG,SAAQ,IAAK;AACzC,QAAI,WAAW;AACb,eAAS,CAAA;AACT,eAAS,SAAS,WAAW;AAC3B,YAAI,gBAAgB,EAAE,GAAG,OAAO,WAAW,MAAM,UAAS;AAC1D,YAAI,cAAc,KAAK;AACrB,wBAAc,MAAM;AAAA,YAClB,GAAG,cAAc;AAAA,YACjB,WAAW,YAAY;AAAA,UACjC;AAAA,QACA;AACM,eAAO,KAAK,aAAa;AAAA,MAC/B;AAAA,IACA;AACE,QAAI,SAAS,OAAO;AAClB,eAAS,QAAQ,KAAK,MAAM,IAAI,OAAK,SAAS,GAAG,MAAM,CAAC;AAAA,IAC5D;AACE,QAAI,SAAS,QAAQ;AACnB,UAAI,EAAE,SAAS,GAAG,OAAM,IAAK,SAAS;AACtC,eAAS,SAAS;AAClB,UAAI,WAAW,MAAM;AACnB,iBAAS,OAAO,QAAQ,OAAO,OAAO;AAAA,MAC5C;AAAA,IACA;AACE,QAAI,SAAS,SAAS,QAAQ;AAC5B,aAAO,IAAI,KAAK,QAAQ;AAAA,IAC5B,WAAa,SAAS,SAAS,QAAQ;AACnC,aAAO,IAAI,YAAY,QAAQ;AAAA,IACnC,WAAa,SAAS,SAAS,QAAQ;AACnC,aAAO,IAAI,KAAK,QAAQ;AAAA,IAC5B,WAAa,SAAS,SAAS,WAAW;AACtC,aAAO,IAAI,QAAQ,QAAQ;AAAA,IAC/B,WAAa,SAAS,SAAS,UAAU;AACrC,aAAO,IAAI,OAAO,QAAQ;AAAA,IAC9B,OAAS;AACL,YAAM,IAAI,MAAM,wBAAwB,KAAK,IAAI;AAAA,IACrD;AAAA,EACA;AAEA,eAAiB;AACjB,WAAS,UAAU;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const ___viteBrowserExternal_commonjsProxy = require("../../../_virtual/___vite-browser-external.js");
|
|
4
|
+
const index = require("../../nanoid/non-secure/index.js");
|
|
5
|
+
const cssSyntaxError = require("./css-syntax-error.js");
|
|
6
|
+
const previousMap = require("./previous-map.js");
|
|
7
|
+
var input;
|
|
8
|
+
var hasRequiredInput;
|
|
9
|
+
function requireInput() {
|
|
10
|
+
if (hasRequiredInput) return input;
|
|
11
|
+
hasRequiredInput = 1;
|
|
12
|
+
let { SourceMapConsumer, SourceMapGenerator } = ___viteBrowserExternal_commonjsProxy;
|
|
13
|
+
let { fileURLToPath, pathToFileURL } = ___viteBrowserExternal_commonjsProxy;
|
|
14
|
+
let { isAbsolute, resolve } = ___viteBrowserExternal_commonjsProxy;
|
|
15
|
+
let { nanoid } = /* @__PURE__ */ index.__require();
|
|
16
|
+
let terminalHighlight = ___viteBrowserExternal_commonjsProxy;
|
|
17
|
+
let CssSyntaxError = cssSyntaxError.__require();
|
|
18
|
+
let PreviousMap = previousMap.__require();
|
|
19
|
+
let fromOffsetCache = Symbol("fromOffsetCache");
|
|
20
|
+
let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
21
|
+
let pathAvailable = Boolean(resolve && isAbsolute);
|
|
22
|
+
class Input {
|
|
23
|
+
constructor(css, opts = {}) {
|
|
24
|
+
if (css === null || typeof css === "undefined" || typeof css === "object" && !css.toString) {
|
|
25
|
+
throw new Error(`PostCSS received ${css} instead of CSS string`);
|
|
26
|
+
}
|
|
27
|
+
this.css = css.toString();
|
|
28
|
+
if (this.css[0] === "\uFEFF" || this.css[0] === "") {
|
|
29
|
+
this.hasBOM = true;
|
|
30
|
+
this.css = this.css.slice(1);
|
|
31
|
+
} else {
|
|
32
|
+
this.hasBOM = false;
|
|
33
|
+
}
|
|
34
|
+
if (opts.from) {
|
|
35
|
+
if (!pathAvailable || /^\w+:\/\//.test(opts.from) || isAbsolute(opts.from)) {
|
|
36
|
+
this.file = opts.from;
|
|
37
|
+
} else {
|
|
38
|
+
this.file = resolve(opts.from);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (pathAvailable && sourceMapAvailable) {
|
|
42
|
+
let map = new PreviousMap(this.css, opts);
|
|
43
|
+
if (map.text) {
|
|
44
|
+
this.map = map;
|
|
45
|
+
let file = map.consumer().file;
|
|
46
|
+
if (!this.file && file) this.file = this.mapResolve(file);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (!this.file) {
|
|
50
|
+
this.id = "<input css " + nanoid(6) + ">";
|
|
51
|
+
}
|
|
52
|
+
if (this.map) this.map.file = this.from;
|
|
53
|
+
}
|
|
54
|
+
error(message, line, column, opts = {}) {
|
|
55
|
+
let result, endLine, endColumn;
|
|
56
|
+
if (line && typeof line === "object") {
|
|
57
|
+
let start = line;
|
|
58
|
+
let end = column;
|
|
59
|
+
if (typeof start.offset === "number") {
|
|
60
|
+
let pos = this.fromOffset(start.offset);
|
|
61
|
+
line = pos.line;
|
|
62
|
+
column = pos.col;
|
|
63
|
+
} else {
|
|
64
|
+
line = start.line;
|
|
65
|
+
column = start.column;
|
|
66
|
+
}
|
|
67
|
+
if (typeof end.offset === "number") {
|
|
68
|
+
let pos = this.fromOffset(end.offset);
|
|
69
|
+
endLine = pos.line;
|
|
70
|
+
endColumn = pos.col;
|
|
71
|
+
} else {
|
|
72
|
+
endLine = end.line;
|
|
73
|
+
endColumn = end.column;
|
|
74
|
+
}
|
|
75
|
+
} else if (!column) {
|
|
76
|
+
let pos = this.fromOffset(line);
|
|
77
|
+
line = pos.line;
|
|
78
|
+
column = pos.col;
|
|
79
|
+
}
|
|
80
|
+
let origin = this.origin(line, column, endLine, endColumn);
|
|
81
|
+
if (origin) {
|
|
82
|
+
result = new CssSyntaxError(
|
|
83
|
+
message,
|
|
84
|
+
origin.endLine === void 0 ? origin.line : { column: origin.column, line: origin.line },
|
|
85
|
+
origin.endLine === void 0 ? origin.column : { column: origin.endColumn, line: origin.endLine },
|
|
86
|
+
origin.source,
|
|
87
|
+
origin.file,
|
|
88
|
+
opts.plugin
|
|
89
|
+
);
|
|
90
|
+
} else {
|
|
91
|
+
result = new CssSyntaxError(
|
|
92
|
+
message,
|
|
93
|
+
endLine === void 0 ? line : { column, line },
|
|
94
|
+
endLine === void 0 ? column : { column: endColumn, line: endLine },
|
|
95
|
+
this.css,
|
|
96
|
+
this.file,
|
|
97
|
+
opts.plugin
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
result.input = { column, endColumn, endLine, line, source: this.css };
|
|
101
|
+
if (this.file) {
|
|
102
|
+
if (pathToFileURL) {
|
|
103
|
+
result.input.url = pathToFileURL(this.file).toString();
|
|
104
|
+
}
|
|
105
|
+
result.input.file = this.file;
|
|
106
|
+
}
|
|
107
|
+
return result;
|
|
108
|
+
}
|
|
109
|
+
fromOffset(offset) {
|
|
110
|
+
let lastLine, lineToIndex;
|
|
111
|
+
if (!this[fromOffsetCache]) {
|
|
112
|
+
let lines = this.css.split("\n");
|
|
113
|
+
lineToIndex = new Array(lines.length);
|
|
114
|
+
let prevIndex = 0;
|
|
115
|
+
for (let i = 0, l = lines.length; i < l; i++) {
|
|
116
|
+
lineToIndex[i] = prevIndex;
|
|
117
|
+
prevIndex += lines[i].length + 1;
|
|
118
|
+
}
|
|
119
|
+
this[fromOffsetCache] = lineToIndex;
|
|
120
|
+
} else {
|
|
121
|
+
lineToIndex = this[fromOffsetCache];
|
|
122
|
+
}
|
|
123
|
+
lastLine = lineToIndex[lineToIndex.length - 1];
|
|
124
|
+
let min = 0;
|
|
125
|
+
if (offset >= lastLine) {
|
|
126
|
+
min = lineToIndex.length - 1;
|
|
127
|
+
} else {
|
|
128
|
+
let max = lineToIndex.length - 2;
|
|
129
|
+
let mid;
|
|
130
|
+
while (min < max) {
|
|
131
|
+
mid = min + (max - min >> 1);
|
|
132
|
+
if (offset < lineToIndex[mid]) {
|
|
133
|
+
max = mid - 1;
|
|
134
|
+
} else if (offset >= lineToIndex[mid + 1]) {
|
|
135
|
+
min = mid + 1;
|
|
136
|
+
} else {
|
|
137
|
+
min = mid;
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
col: offset - lineToIndex[min] + 1,
|
|
144
|
+
line: min + 1
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
mapResolve(file) {
|
|
148
|
+
if (/^\w+:\/\//.test(file)) {
|
|
149
|
+
return file;
|
|
150
|
+
}
|
|
151
|
+
return resolve(this.map.consumer().sourceRoot || this.map.root || ".", file);
|
|
152
|
+
}
|
|
153
|
+
origin(line, column, endLine, endColumn) {
|
|
154
|
+
if (!this.map) return false;
|
|
155
|
+
let consumer = this.map.consumer();
|
|
156
|
+
let from = consumer.originalPositionFor({ column, line });
|
|
157
|
+
if (!from.source) return false;
|
|
158
|
+
let to;
|
|
159
|
+
if (typeof endLine === "number") {
|
|
160
|
+
to = consumer.originalPositionFor({ column: endColumn, line: endLine });
|
|
161
|
+
}
|
|
162
|
+
let fromUrl;
|
|
163
|
+
if (isAbsolute(from.source)) {
|
|
164
|
+
fromUrl = pathToFileURL(from.source);
|
|
165
|
+
} else {
|
|
166
|
+
fromUrl = new URL(
|
|
167
|
+
from.source,
|
|
168
|
+
this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
let result = {
|
|
172
|
+
column: from.column,
|
|
173
|
+
endColumn: to && to.column,
|
|
174
|
+
endLine: to && to.line,
|
|
175
|
+
line: from.line,
|
|
176
|
+
url: fromUrl.toString()
|
|
177
|
+
};
|
|
178
|
+
if (fromUrl.protocol === "file:") {
|
|
179
|
+
if (fileURLToPath) {
|
|
180
|
+
result.file = fileURLToPath(fromUrl);
|
|
181
|
+
} else {
|
|
182
|
+
throw new Error(`file: protocol is not available in this PostCSS build`);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
let source = consumer.sourceContentFor(from.source);
|
|
186
|
+
if (source) result.source = source;
|
|
187
|
+
return result;
|
|
188
|
+
}
|
|
189
|
+
toJSON() {
|
|
190
|
+
let json = {};
|
|
191
|
+
for (let name of ["hasBOM", "css", "file", "id"]) {
|
|
192
|
+
if (this[name] != null) {
|
|
193
|
+
json[name] = this[name];
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (this.map) {
|
|
197
|
+
json.map = { ...this.map };
|
|
198
|
+
if (json.map.consumerCache) {
|
|
199
|
+
json.map.consumerCache = void 0;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return json;
|
|
203
|
+
}
|
|
204
|
+
get from() {
|
|
205
|
+
return this.file || this.id;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
input = Input;
|
|
209
|
+
Input.default = Input;
|
|
210
|
+
if (terminalHighlight && terminalHighlight.registerInput) {
|
|
211
|
+
terminalHighlight.registerInput(Input);
|
|
212
|
+
}
|
|
213
|
+
return input;
|
|
214
|
+
}
|
|
215
|
+
exports.__require = requireInput;
|
|
216
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.js","sources":["../../../../../../node_modules/postcss/lib/input.js"],"sourcesContent":["'use strict'\n\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { fileURLToPath, pathToFileURL } = require('url')\nlet { isAbsolute, resolve } = require('path')\nlet { nanoid } = require('nanoid/non-secure')\n\nlet terminalHighlight = require('./terminal-highlight')\nlet CssSyntaxError = require('./css-syntax-error')\nlet PreviousMap = require('./previous-map')\n\nlet fromOffsetCache = Symbol('fromOffsetCache')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(resolve && isAbsolute)\n\nclass Input {\n constructor(css, opts = {}) {\n if (\n css === null ||\n typeof css === 'undefined' ||\n (typeof css === 'object' && !css.toString)\n ) {\n throw new Error(`PostCSS received ${css} instead of CSS string`)\n }\n\n this.css = css.toString()\n\n if (this.css[0] === '\\uFEFF' || this.css[0] === '\\uFFFE') {\n this.hasBOM = true\n this.css = this.css.slice(1)\n } else {\n this.hasBOM = false\n }\n\n if (opts.from) {\n if (\n !pathAvailable ||\n /^\\w+:\\/\\//.test(opts.from) ||\n isAbsolute(opts.from)\n ) {\n this.file = opts.from\n } else {\n this.file = resolve(opts.from)\n }\n }\n\n if (pathAvailable && sourceMapAvailable) {\n let map = new PreviousMap(this.css, opts)\n if (map.text) {\n this.map = map\n let file = map.consumer().file\n if (!this.file && file) this.file = this.mapResolve(file)\n }\n }\n\n if (!this.file) {\n this.id = '<input css ' + nanoid(6) + '>'\n }\n if (this.map) this.map.file = this.from\n }\n\n error(message, line, column, opts = {}) {\n let result, endLine, endColumn\n\n if (line && typeof line === 'object') {\n let start = line\n let end = column\n if (typeof start.offset === 'number') {\n let pos = this.fromOffset(start.offset)\n line = pos.line\n column = pos.col\n } else {\n line = start.line\n column = start.column\n }\n if (typeof end.offset === 'number') {\n let pos = this.fromOffset(end.offset)\n endLine = pos.line\n endColumn = pos.col\n } else {\n endLine = end.line\n endColumn = end.column\n }\n } else if (!column) {\n let pos = this.fromOffset(line)\n line = pos.line\n column = pos.col\n }\n\n let origin = this.origin(line, column, endLine, endColumn)\n if (origin) {\n result = new CssSyntaxError(\n message,\n origin.endLine === undefined\n ? origin.line\n : { column: origin.column, line: origin.line },\n origin.endLine === undefined\n ? origin.column\n : { column: origin.endColumn, line: origin.endLine },\n origin.source,\n origin.file,\n opts.plugin\n )\n } else {\n result = new CssSyntaxError(\n message,\n endLine === undefined ? line : { column, line },\n endLine === undefined ? column : { column: endColumn, line: endLine },\n this.css,\n this.file,\n opts.plugin\n )\n }\n\n result.input = { column, endColumn, endLine, line, source: this.css }\n if (this.file) {\n if (pathToFileURL) {\n result.input.url = pathToFileURL(this.file).toString()\n }\n result.input.file = this.file\n }\n\n return result\n }\n\n fromOffset(offset) {\n let lastLine, lineToIndex\n if (!this[fromOffsetCache]) {\n let lines = this.css.split('\\n')\n lineToIndex = new Array(lines.length)\n let prevIndex = 0\n\n for (let i = 0, l = lines.length; i < l; i++) {\n lineToIndex[i] = prevIndex\n prevIndex += lines[i].length + 1\n }\n\n this[fromOffsetCache] = lineToIndex\n } else {\n lineToIndex = this[fromOffsetCache]\n }\n lastLine = lineToIndex[lineToIndex.length - 1]\n\n let min = 0\n if (offset >= lastLine) {\n min = lineToIndex.length - 1\n } else {\n let max = lineToIndex.length - 2\n let mid\n while (min < max) {\n mid = min + ((max - min) >> 1)\n if (offset < lineToIndex[mid]) {\n max = mid - 1\n } else if (offset >= lineToIndex[mid + 1]) {\n min = mid + 1\n } else {\n min = mid\n break\n }\n }\n }\n return {\n col: offset - lineToIndex[min] + 1,\n line: min + 1\n }\n }\n\n mapResolve(file) {\n if (/^\\w+:\\/\\//.test(file)) {\n return file\n }\n return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file)\n }\n\n origin(line, column, endLine, endColumn) {\n if (!this.map) return false\n let consumer = this.map.consumer()\n\n let from = consumer.originalPositionFor({ column, line })\n if (!from.source) return false\n\n let to\n if (typeof endLine === 'number') {\n to = consumer.originalPositionFor({ column: endColumn, line: endLine })\n }\n\n let fromUrl\n\n if (isAbsolute(from.source)) {\n fromUrl = pathToFileURL(from.source)\n } else {\n fromUrl = new URL(\n from.source,\n this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)\n )\n }\n\n let result = {\n column: from.column,\n endColumn: to && to.column,\n endLine: to && to.line,\n line: from.line,\n url: fromUrl.toString()\n }\n\n if (fromUrl.protocol === 'file:') {\n if (fileURLToPath) {\n result.file = fileURLToPath(fromUrl)\n } else {\n /* c8 ignore next 2 */\n throw new Error(`file: protocol is not available in this PostCSS build`)\n }\n }\n\n let source = consumer.sourceContentFor(from.source)\n if (source) result.source = source\n\n return result\n }\n\n toJSON() {\n let json = {}\n for (let name of ['hasBOM', 'css', 'file', 'id']) {\n if (this[name] != null) {\n json[name] = this[name]\n }\n }\n if (this.map) {\n json.map = { ...this.map }\n if (json.map.consumerCache) {\n json.map.consumerCache = undefined\n }\n }\n return json\n }\n\n get from() {\n return this.file || this.id\n }\n}\n\nmodule.exports = Input\nInput.default = Input\n\nif (terminalHighlight && terminalHighlight.registerInput) {\n terminalHighlight.registerInput(Input)\n}\n"],"names":["require$$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