Set up comprehensive frontend testing infrastructure
- Install Jest for unit testing with React Testing Library - Install Playwright for end-to-end testing - Configure Jest with proper TypeScript support and module mapping - Create test setup files and utilities for both unit and e2e tests Components: * Jest configuration with coverage thresholds * Playwright configuration with browser automation * Unit tests for LoginForm, AuthContext, and useSocketIO hook * E2E tests for authentication, dashboard, and agents workflows * GitHub Actions workflow for automated testing * Mock data and API utilities for consistent testing * Test documentation with best practices Testing features: - Unit tests with 70% coverage threshold - E2E tests with API mocking and user journey testing - CI/CD integration for automated test runs - Cross-browser testing support with Playwright - Authentication system testing end-to-end 🚀 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
52
frontend/node_modules/cssstyle/lib/properties/background.js
generated
vendored
Normal file
52
frontend/node_modules/cssstyle/lib/properties/background.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
// FIXME:
|
||||
// * support multiple backgrounds
|
||||
// * also fix longhands
|
||||
|
||||
const parsers = require("../parsers");
|
||||
const strings = require("../utils/strings");
|
||||
const backgroundImage = require("./backgroundImage");
|
||||
const backgroundPosition = require("./backgroundPosition");
|
||||
const backgroundRepeat = require("./backgroundRepeat");
|
||||
const backgroundAttachment = require("./backgroundAttachment");
|
||||
const backgroundColor = require("./backgroundColor");
|
||||
|
||||
const shorthandFor = new Map([
|
||||
["background-image", backgroundImage],
|
||||
["background-position", backgroundPosition],
|
||||
["background-repeat", backgroundRepeat],
|
||||
["background-attachment", backgroundAttachment],
|
||||
["background-color", backgroundColor]
|
||||
]);
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (/^none$/i.test(v)) {
|
||||
for (const [key] of shorthandFor) {
|
||||
this._setProperty(key, "");
|
||||
}
|
||||
this._setProperty("background", strings.asciiLowercase(v));
|
||||
} else if (parsers.hasVarFunc(v)) {
|
||||
for (const [key] of shorthandFor) {
|
||||
this._setProperty(key, "");
|
||||
}
|
||||
this._setProperty("background", v);
|
||||
} else {
|
||||
this._shorthandSetter("background", v, shorthandFor);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
let val = this.getPropertyValue("background");
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return val;
|
||||
}
|
||||
val = this._shorthandGetter("background", shorthandFor);
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return "";
|
||||
}
|
||||
return val;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
32
frontend/node_modules/cssstyle/lib/properties/backgroundAttachment.js
generated
vendored
Normal file
32
frontend/node_modules/cssstyle/lib/properties/backgroundAttachment.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = ["fixed", "scroll", "local"];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("background", "");
|
||||
this._setProperty("background-attachment", v);
|
||||
} else {
|
||||
this._setProperty("background-attachment", module.exports.parse(v));
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("background-attachment");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
35
frontend/node_modules/cssstyle/lib/properties/backgroundColor.js
generated
vendored
Normal file
35
frontend/node_modules/cssstyle/lib/properties/backgroundColor.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("background", "");
|
||||
this._setProperty("background-color", v);
|
||||
} else {
|
||||
this._setProperty("background-color", module.exports.parse(v));
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("background-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
31
frontend/node_modules/cssstyle/lib/properties/backgroundImage.js
generated
vendored
Normal file
31
frontend/node_modules/cssstyle/lib/properties/backgroundImage.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
return parsers.parseImage(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v, ["none"]) === "string") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("background", "");
|
||||
this._setProperty("background-image", v);
|
||||
} else {
|
||||
this._setProperty("background-image", module.exports.parse(v));
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("background-image");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
52
frontend/node_modules/cssstyle/lib/properties/backgroundPosition.js
generated
vendored
Normal file
52
frontend/node_modules/cssstyle/lib/properties/backgroundPosition.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const parts = parsers.splitValue(v);
|
||||
if (!parts.length || parts.length > 2) {
|
||||
return;
|
||||
}
|
||||
const validKeywordsX = ["left", "center", "right"];
|
||||
const validKeywordsY = ["top", "center", "bottom"];
|
||||
if (parts.length === 1) {
|
||||
const dim = parsers.parseMeasurement(parts[0]);
|
||||
if (dim) {
|
||||
return dim;
|
||||
}
|
||||
const validKeywords = new Set([...validKeywordsX, ...validKeywordsY]);
|
||||
return parsers.parseKeyword(v, [...validKeywords]);
|
||||
}
|
||||
const [partX, partY] = parts;
|
||||
const posX = parsers.parseMeasurement(partX) || parsers.parseKeyword(partX, validKeywordsX);
|
||||
if (posX) {
|
||||
const posY = parsers.parseMeasurement(partY) || parsers.parseKeyword(partY, validKeywordsY);
|
||||
if (posY) {
|
||||
return `${posX} ${posY}`;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("background", "");
|
||||
this._setProperty("background-position", v);
|
||||
} else {
|
||||
this._setProperty("background-position", module.exports.parse(v));
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("background-position");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
32
frontend/node_modules/cssstyle/lib/properties/backgroundRepeat.js
generated
vendored
Normal file
32
frontend/node_modules/cssstyle/lib/properties/backgroundRepeat.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = ["repeat", "repeat-x", "repeat-y", "no-repeat", "space", "round"];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("background", "");
|
||||
this._setProperty("background-repeat", v);
|
||||
} else {
|
||||
this._setProperty("background-repeat", module.exports.parse(v));
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("background-repeat");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
42
frontend/node_modules/cssstyle/lib/properties/border.js
generated
vendored
Normal file
42
frontend/node_modules/cssstyle/lib/properties/border.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
const borderWidth = require("./borderWidth");
|
||||
const borderStyle = require("./borderStyle");
|
||||
const borderColor = require("./borderColor");
|
||||
|
||||
const shorthandFor = new Map([
|
||||
["border-width", borderWidth],
|
||||
["border-style", borderStyle],
|
||||
["border-color", borderColor]
|
||||
]);
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (/^none$/i.test(v)) {
|
||||
v = "";
|
||||
}
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
for (const [key] of shorthandFor) {
|
||||
this._setProperty(key, "");
|
||||
}
|
||||
this._setProperty("border", v);
|
||||
} else {
|
||||
this._midShorthandSetter("border", v, shorthandFor, ["top", "right", "bottom", "left"]);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
let val = this.getPropertyValue("border");
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return val;
|
||||
}
|
||||
val = this._shorthandGetter("border", shorthandFor);
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return "";
|
||||
}
|
||||
return val;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
40
frontend/node_modules/cssstyle/lib/properties/borderBottom.js
generated
vendored
Normal file
40
frontend/node_modules/cssstyle/lib/properties/borderBottom.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
const borderTopWidth = require("./borderTopWidth");
|
||||
const borderTopStyle = require("./borderTopStyle");
|
||||
const borderTopColor = require("./borderTopColor");
|
||||
|
||||
const shorthandFor = new Map([
|
||||
["border-bottom-width", borderTopWidth],
|
||||
["border-bottom-style", borderTopStyle],
|
||||
["border-bottom-color", borderTopColor]
|
||||
]);
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
for (const [key] of shorthandFor) {
|
||||
this._setProperty(key, "");
|
||||
}
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-bottom", v);
|
||||
} else {
|
||||
this._shorthandSetter("border-bottom", v, shorthandFor);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
let val = this.getPropertyValue("border-bottom");
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return val;
|
||||
}
|
||||
val = this._shorthandGetter("border-bottom", shorthandFor);
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return "";
|
||||
}
|
||||
return val;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
35
frontend/node_modules/cssstyle/lib/properties/borderBottomColor.js
generated
vendored
Normal file
35
frontend/node_modules/cssstyle/lib/properties/borderBottomColor.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-bottom", "");
|
||||
this._setProperty("border-color", "");
|
||||
}
|
||||
this._setProperty("border-bottom-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-bottom-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
50
frontend/node_modules/cssstyle/lib/properties/borderBottomStyle.js
generated
vendored
Normal file
50
frontend/node_modules/cssstyle/lib/properties/borderBottomStyle.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = [
|
||||
"none",
|
||||
"hidden",
|
||||
"dotted",
|
||||
"dashed",
|
||||
"solid",
|
||||
"double",
|
||||
"groove",
|
||||
"ridge",
|
||||
"inset",
|
||||
"outset"
|
||||
];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
const val = module.exports.parse(v);
|
||||
if (val === "none" || val === "hidden") {
|
||||
this._setProperty("border-bottom-style", "");
|
||||
this._setProperty("border-bottom-color", "");
|
||||
this._setProperty("border-bottom-width", "");
|
||||
return;
|
||||
}
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-bottom", "");
|
||||
this._setProperty("border-style", "");
|
||||
}
|
||||
this._setProperty("border-bottom-style", val);
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-bottom-style");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
36
frontend/node_modules/cssstyle/lib/properties/borderBottomWidth.js
generated
vendored
Normal file
36
frontend/node_modules/cssstyle/lib/properties/borderBottomWidth.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = ["thin", "medium", "thick"];
|
||||
const key = parsers.parseKeyword(v, keywords);
|
||||
if (key) {
|
||||
return key;
|
||||
}
|
||||
return parsers.parseLength(v, true);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-bottom", "");
|
||||
this._setProperty("border-width", "");
|
||||
}
|
||||
this._setProperty("border-bottom-width", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-bottom-width");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
26
frontend/node_modules/cssstyle/lib/properties/borderCollapse.js
generated
vendored
Normal file
26
frontend/node_modules/cssstyle/lib/properties/borderCollapse.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
return parsers.parseKeyword(v, ["collapse", "separate"]);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("border-collapse", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-collapse");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
43
frontend/node_modules/cssstyle/lib/properties/borderColor.js
generated
vendored
Normal file
43
frontend/node_modules/cssstyle/lib/properties/borderColor.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-color", v);
|
||||
} else {
|
||||
const positions = ["top", "right", "bottom", "left"];
|
||||
this._implicitSetter(
|
||||
"border",
|
||||
"color",
|
||||
v,
|
||||
module.exports.isValid,
|
||||
module.exports.parse,
|
||||
positions
|
||||
);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
40
frontend/node_modules/cssstyle/lib/properties/borderLeft.js
generated
vendored
Normal file
40
frontend/node_modules/cssstyle/lib/properties/borderLeft.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
const borderTopWidth = require("./borderTopWidth");
|
||||
const borderTopStyle = require("./borderTopStyle");
|
||||
const borderTopColor = require("./borderTopColor");
|
||||
|
||||
const shorthandFor = new Map([
|
||||
["border-left-width", borderTopWidth],
|
||||
["border-left-style", borderTopStyle],
|
||||
["border-left-color", borderTopColor]
|
||||
]);
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
for (const [key] of shorthandFor) {
|
||||
this._setProperty(key, "");
|
||||
}
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-left", v);
|
||||
} else {
|
||||
this._shorthandSetter("border-left", v, shorthandFor);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
let val = this.getPropertyValue("border-left");
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return val;
|
||||
}
|
||||
val = this._shorthandGetter("border-left", shorthandFor);
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return "";
|
||||
}
|
||||
return val;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
35
frontend/node_modules/cssstyle/lib/properties/borderLeftColor.js
generated
vendored
Normal file
35
frontend/node_modules/cssstyle/lib/properties/borderLeftColor.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-left", "");
|
||||
this._setProperty("border-color", "");
|
||||
}
|
||||
this._setProperty("border-left-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-left-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
50
frontend/node_modules/cssstyle/lib/properties/borderLeftStyle.js
generated
vendored
Normal file
50
frontend/node_modules/cssstyle/lib/properties/borderLeftStyle.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = [
|
||||
"none",
|
||||
"hidden",
|
||||
"dotted",
|
||||
"dashed",
|
||||
"solid",
|
||||
"double",
|
||||
"groove",
|
||||
"ridge",
|
||||
"inset",
|
||||
"outset"
|
||||
];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
const val = module.exports.parse(v);
|
||||
if (val === "none" || val === "hidden") {
|
||||
this._setProperty("border-left-style", "");
|
||||
this._setProperty("border-left-color", "");
|
||||
this._setProperty("border-left-width", "");
|
||||
return;
|
||||
}
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-left", "");
|
||||
this._setProperty("border-style", "");
|
||||
}
|
||||
this._setProperty("border-left-style", val);
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-left-style");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
36
frontend/node_modules/cssstyle/lib/properties/borderLeftWidth.js
generated
vendored
Normal file
36
frontend/node_modules/cssstyle/lib/properties/borderLeftWidth.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = ["thin", "medium", "thick"];
|
||||
const key = parsers.parseKeyword(v, keywords);
|
||||
if (key) {
|
||||
return key;
|
||||
}
|
||||
return parsers.parseLength(v, true);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-left", "");
|
||||
this._setProperty("border-width", "");
|
||||
}
|
||||
this._setProperty("border-left-width", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-left-width");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
40
frontend/node_modules/cssstyle/lib/properties/borderRight.js
generated
vendored
Normal file
40
frontend/node_modules/cssstyle/lib/properties/borderRight.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
const borderTopWidth = require("./borderTopWidth");
|
||||
const borderTopStyle = require("./borderTopStyle");
|
||||
const borderTopColor = require("./borderTopColor");
|
||||
|
||||
const shorthandFor = new Map([
|
||||
["border-right-width", borderTopWidth],
|
||||
["border-right-style", borderTopStyle],
|
||||
["border-right-color", borderTopColor]
|
||||
]);
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
for (const [key] of shorthandFor) {
|
||||
this._setProperty(key, "");
|
||||
}
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-right", v);
|
||||
} else {
|
||||
this._shorthandSetter("border-right", v, shorthandFor);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
let val = this.getPropertyValue("border-right");
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return val;
|
||||
}
|
||||
val = this._shorthandGetter("border-right", shorthandFor);
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return "";
|
||||
}
|
||||
return val;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
35
frontend/node_modules/cssstyle/lib/properties/borderRightColor.js
generated
vendored
Normal file
35
frontend/node_modules/cssstyle/lib/properties/borderRightColor.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-right", "");
|
||||
this._setProperty("border-color", "");
|
||||
}
|
||||
this._setProperty("border-right-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-right-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
50
frontend/node_modules/cssstyle/lib/properties/borderRightStyle.js
generated
vendored
Normal file
50
frontend/node_modules/cssstyle/lib/properties/borderRightStyle.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = [
|
||||
"none",
|
||||
"hidden",
|
||||
"dotted",
|
||||
"dashed",
|
||||
"solid",
|
||||
"double",
|
||||
"groove",
|
||||
"ridge",
|
||||
"inset",
|
||||
"outset"
|
||||
];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
const val = module.exports.parse(v);
|
||||
if (val === "none" || val === "hidden") {
|
||||
this._setProperty("border-right-style", "");
|
||||
this._setProperty("border-right-color", "");
|
||||
this._setProperty("border-right-width", "");
|
||||
return;
|
||||
}
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-right", "");
|
||||
this._setProperty("border-style", "");
|
||||
}
|
||||
this._setProperty("border-right-style", val);
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-right-style");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
36
frontend/node_modules/cssstyle/lib/properties/borderRightWidth.js
generated
vendored
Normal file
36
frontend/node_modules/cssstyle/lib/properties/borderRightWidth.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = ["thin", "medium", "thick"];
|
||||
const key = parsers.parseKeyword(v, keywords);
|
||||
if (key) {
|
||||
return key;
|
||||
}
|
||||
return parsers.parseLength(v, true);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-right", "");
|
||||
this._setProperty("border-width", "");
|
||||
}
|
||||
this._setProperty("border-right-width", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-right-width");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
45
frontend/node_modules/cssstyle/lib/properties/borderSpacing.js
generated
vendored
Normal file
45
frontend/node_modules/cssstyle/lib/properties/borderSpacing.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
if (v === "") {
|
||||
return v;
|
||||
}
|
||||
const key = parsers.parseKeyword(v);
|
||||
if (key) {
|
||||
return key;
|
||||
}
|
||||
const parts = parsers.splitValue(v);
|
||||
if (!parts.length || parts.length > 2) {
|
||||
return;
|
||||
}
|
||||
const val = [];
|
||||
for (const part of parts) {
|
||||
const dim = parsers.parseLength(part);
|
||||
if (!dim) {
|
||||
return;
|
||||
}
|
||||
val.push(dim);
|
||||
}
|
||||
return val.join(" ");
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("border-spacing", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-spacing");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
54
frontend/node_modules/cssstyle/lib/properties/borderStyle.js
generated
vendored
Normal file
54
frontend/node_modules/cssstyle/lib/properties/borderStyle.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = [
|
||||
"none",
|
||||
"hidden",
|
||||
"dotted",
|
||||
"dashed",
|
||||
"solid",
|
||||
"double",
|
||||
"groove",
|
||||
"ridge",
|
||||
"inset",
|
||||
"outset"
|
||||
];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (/^none$/i.test(v)) {
|
||||
v = "";
|
||||
}
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-style", v);
|
||||
return;
|
||||
}
|
||||
const positions = ["top", "right", "bottom", "left"];
|
||||
this._implicitSetter(
|
||||
"border",
|
||||
"style",
|
||||
v,
|
||||
module.exports.isValid,
|
||||
module.exports.parse,
|
||||
positions
|
||||
);
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-style");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
40
frontend/node_modules/cssstyle/lib/properties/borderTop.js
generated
vendored
Normal file
40
frontend/node_modules/cssstyle/lib/properties/borderTop.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
const borderTopWidth = require("./borderTopWidth");
|
||||
const borderTopStyle = require("./borderTopStyle");
|
||||
const borderTopColor = require("./borderTopColor");
|
||||
|
||||
const shorthandFor = new Map([
|
||||
["border-top-width", borderTopWidth],
|
||||
["border-top-style", borderTopStyle],
|
||||
["border-top-color", borderTopColor]
|
||||
]);
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
for (const [key] of shorthandFor) {
|
||||
this._setProperty(key, "");
|
||||
}
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-top", v);
|
||||
} else {
|
||||
this._shorthandSetter("border-top", v, shorthandFor);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
let val = this.getPropertyValue("border-top");
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return val;
|
||||
}
|
||||
val = this._shorthandGetter("border-top", shorthandFor);
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return "";
|
||||
}
|
||||
return val;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
35
frontend/node_modules/cssstyle/lib/properties/borderTopColor.js
generated
vendored
Normal file
35
frontend/node_modules/cssstyle/lib/properties/borderTopColor.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-top", "");
|
||||
this._setProperty("border-color", "");
|
||||
}
|
||||
this._setProperty("border-top-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-top-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
50
frontend/node_modules/cssstyle/lib/properties/borderTopStyle.js
generated
vendored
Normal file
50
frontend/node_modules/cssstyle/lib/properties/borderTopStyle.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = [
|
||||
"none",
|
||||
"hidden",
|
||||
"dotted",
|
||||
"dashed",
|
||||
"solid",
|
||||
"double",
|
||||
"groove",
|
||||
"ridge",
|
||||
"inset",
|
||||
"outset"
|
||||
];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
const val = module.exports.parse(v);
|
||||
if (val === "none" || val === "hidden" || v === "") {
|
||||
this._setProperty("border-top-style", "");
|
||||
this._setProperty("border-top-color", "");
|
||||
this._setProperty("border-top-width", "");
|
||||
return;
|
||||
}
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-top", "");
|
||||
this._setProperty("border-style", "");
|
||||
}
|
||||
this._setProperty("border-top-style", val);
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-top-style");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
36
frontend/node_modules/cssstyle/lib/properties/borderTopWidth.js
generated
vendored
Normal file
36
frontend/node_modules/cssstyle/lib/properties/borderTopWidth.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = ["thin", "medium", "thick"];
|
||||
const key = parsers.parseKeyword(v, keywords);
|
||||
if (key) {
|
||||
return key;
|
||||
}
|
||||
return parsers.parseLength(v, true);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-top", "");
|
||||
this._setProperty("border-width", "");
|
||||
}
|
||||
this._setProperty("border-top-width", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-top-width");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
44
frontend/node_modules/cssstyle/lib/properties/borderWidth.js
generated
vendored
Normal file
44
frontend/node_modules/cssstyle/lib/properties/borderWidth.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = ["thin", "medium", "thick"];
|
||||
const key = parsers.parseKeyword(v, keywords);
|
||||
if (key) {
|
||||
return key;
|
||||
}
|
||||
return parsers.parseLength(v, true);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("border", "");
|
||||
this._setProperty("border-width", v);
|
||||
} else {
|
||||
const positions = ["top", "right", "bottom", "left"];
|
||||
this._implicitSetter(
|
||||
"border",
|
||||
"width",
|
||||
v,
|
||||
module.exports.isValid,
|
||||
module.exports.parse,
|
||||
positions
|
||||
);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("border-width");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/bottom.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/bottom.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const dim = parsers.parseMeasurement(v);
|
||||
if (dim) {
|
||||
return dim;
|
||||
}
|
||||
return parsers.parseKeyword(v, ["auto"]);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("bottom", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("bottom");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
40
frontend/node_modules/cssstyle/lib/properties/clear.js
generated
vendored
Normal file
40
frontend/node_modules/cssstyle/lib/properties/clear.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = [
|
||||
"inline-start",
|
||||
"inline-end",
|
||||
"block-start",
|
||||
"block-end",
|
||||
"left",
|
||||
"right",
|
||||
"top",
|
||||
"bottom",
|
||||
"both-inline",
|
||||
"both-block",
|
||||
"both",
|
||||
"none"
|
||||
];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("clear", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("clear");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
54
frontend/node_modules/cssstyle/lib/properties/clip.js
generated
vendored
Normal file
54
frontend/node_modules/cssstyle/lib/properties/clip.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
// deprecated
|
||||
// @see https://drafts.fxtf.org/css-masking/#clip-property
|
||||
|
||||
const parsers = require("../parsers");
|
||||
const strings = require("../utils/strings");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
if (v === "") {
|
||||
return v;
|
||||
}
|
||||
const val = parsers.parseKeyword(v, ["auto"]);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
// parse legacy <shape>
|
||||
v = strings.asciiLowercase(v);
|
||||
const matches = v.match(/^rect\(\s*(.*)\s*\)$/);
|
||||
if (!matches) {
|
||||
return;
|
||||
}
|
||||
const parts = matches[1].split(/\s*,\s*/);
|
||||
if (parts.length !== 4) {
|
||||
return;
|
||||
}
|
||||
const valid = parts.every(function (part, index) {
|
||||
const measurement = parsers.parseMeasurement(part.trim());
|
||||
parts[index] = measurement;
|
||||
return typeof measurement === "string";
|
||||
});
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
return `rect(${parts.join(", ")})`;
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("clip", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("clip");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/color.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/color.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
73
frontend/node_modules/cssstyle/lib/properties/flex.js
generated
vendored
Normal file
73
frontend/node_modules/cssstyle/lib/properties/flex.js
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
const flexGrow = require("./flexGrow");
|
||||
const flexShrink = require("./flexShrink");
|
||||
const flexBasis = require("./flexBasis");
|
||||
|
||||
const shorthandFor = new Map([
|
||||
["flex-grow", flexGrow],
|
||||
["flex-shrink", flexShrink],
|
||||
["flex-basis", flexBasis]
|
||||
]);
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const key = parsers.parseKeyword(v, ["auto", "none"]);
|
||||
if (key) {
|
||||
if (key === "auto") {
|
||||
return "1 1 auto";
|
||||
}
|
||||
if (key === "none") {
|
||||
return "0 0 auto";
|
||||
}
|
||||
if (key === "initial") {
|
||||
return "0 1 auto";
|
||||
}
|
||||
return;
|
||||
}
|
||||
const obj = parsers.parseShorthand(v, shorthandFor);
|
||||
if (obj) {
|
||||
const flex = {
|
||||
"flex-grow": "1",
|
||||
"flex-shrink": "1",
|
||||
"flex-basis": "0%"
|
||||
};
|
||||
const items = Object.entries(obj);
|
||||
for (const [property, value] of items) {
|
||||
flex[property] = value;
|
||||
}
|
||||
return [...Object.values(flex)].join(" ");
|
||||
}
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._shorthandSetter("flex", "", shorthandFor);
|
||||
this._setProperty("flex", v);
|
||||
} else {
|
||||
this._shorthandSetter("flex", module.exports.parse(v), shorthandFor);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
let val = this.getPropertyValue("flex");
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return val;
|
||||
}
|
||||
val = this._shorthandGetter("flex", shorthandFor);
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return "";
|
||||
}
|
||||
return val;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
33
frontend/node_modules/cssstyle/lib/properties/flexBasis.js
generated
vendored
Normal file
33
frontend/node_modules/cssstyle/lib/properties/flexBasis.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseMeasurement(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
const keywords = ["content", "auto", "min-content", "max-content"];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("flex", "");
|
||||
this._setProperty("flex-basis", v);
|
||||
} else {
|
||||
this._setProperty("flex-basis", module.exports.parse(v));
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("flex-basis");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
28
frontend/node_modules/cssstyle/lib/properties/flexGrow.js
generated
vendored
Normal file
28
frontend/node_modules/cssstyle/lib/properties/flexGrow.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
return parsers.parseNumber(v, true);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("flex", "");
|
||||
this._setProperty("flex-grow", v);
|
||||
} else {
|
||||
this._setProperty("flex-grow", module.exports.parse(v));
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("flex-grow");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
28
frontend/node_modules/cssstyle/lib/properties/flexShrink.js
generated
vendored
Normal file
28
frontend/node_modules/cssstyle/lib/properties/flexShrink.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
return parsers.parseNumber(v, true);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("flex", "");
|
||||
this._setProperty("flex-shrink", v);
|
||||
} else {
|
||||
this._setProperty("flex-shrink", module.exports.parse(v));
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("flex-shrink");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
27
frontend/node_modules/cssstyle/lib/properties/float.js
generated
vendored
Normal file
27
frontend/node_modules/cssstyle/lib/properties/float.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = ["left", "right", "none", "inline-start", "inline-end"];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("float", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("float");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/floodColor.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/floodColor.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("flood-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("flood-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
189
frontend/node_modules/cssstyle/lib/properties/font.js
generated
vendored
Normal file
189
frontend/node_modules/cssstyle/lib/properties/font.js
generated
vendored
Normal file
@@ -0,0 +1,189 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
const fontStyle = require("./fontStyle");
|
||||
const fontVariant = require("./fontVariant");
|
||||
const fontWeight = require("./fontWeight");
|
||||
const fontSize = require("./fontSize");
|
||||
const lineHeight = require("./lineHeight");
|
||||
const fontFamily = require("./fontFamily");
|
||||
|
||||
const shorthandFor = new Map([
|
||||
["font-style", fontStyle],
|
||||
["font-variant", fontVariant],
|
||||
["font-weight", fontWeight],
|
||||
["font-size", fontSize],
|
||||
["line-height", lineHeight],
|
||||
["font-family", fontFamily]
|
||||
]);
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = ["caption", "icon", "menu", "message-box", "small-caption", "status-bar"];
|
||||
const key = parsers.parseKeyword(v, keywords);
|
||||
if (key) {
|
||||
return key;
|
||||
}
|
||||
const [fontBlock, ...families] = parsers.splitValue(v, {
|
||||
delimiter: ","
|
||||
});
|
||||
const [fontBlockA, fontBlockB] = parsers.splitValue(fontBlock, {
|
||||
delimiter: "/"
|
||||
});
|
||||
const font = {
|
||||
"font-style": "normal",
|
||||
"font-variant": "normal",
|
||||
"font-weight": "normal"
|
||||
};
|
||||
const fontFamilies = new Set();
|
||||
if (fontBlockB) {
|
||||
const [lineB, ...familiesB] = fontBlockB.trim().split(" ");
|
||||
if (!lineB || !lineHeight.isValid(lineB) || !familiesB.length) {
|
||||
return;
|
||||
}
|
||||
const lineHeightB = lineHeight.parse(lineB);
|
||||
const familyB = familiesB.join(" ");
|
||||
if (fontFamily.isValid(familyB)) {
|
||||
fontFamilies.add(fontFamily.parse(familyB));
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
const parts = parsers.splitValue(fontBlockA.trim());
|
||||
const properties = ["font-style", "font-variant", "font-weight", "font-size"];
|
||||
for (const part of parts) {
|
||||
if (part === "normal") {
|
||||
continue;
|
||||
} else {
|
||||
for (const property of properties) {
|
||||
switch (property) {
|
||||
case "font-style":
|
||||
case "font-variant":
|
||||
case "font-weight":
|
||||
case "font-size": {
|
||||
const value = shorthandFor.get(property);
|
||||
if (value.isValid(part)) {
|
||||
font[property] = value.parse(part);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Object.hasOwn(font, "font-size")) {
|
||||
font["line-height"] = lineHeightB;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// FIXME: Switch to toReversed() when we can drop Node.js 18 support.
|
||||
const revParts = [...parsers.splitValue(fontBlockA.trim())].reverse();
|
||||
const revFontFamily = [];
|
||||
const properties = ["font-style", "font-variant", "font-weight", "line-height"];
|
||||
font["font-style"] = "normal";
|
||||
font["font-variant"] = "normal";
|
||||
font["font-weight"] = "normal";
|
||||
font["line-height"] = "normal";
|
||||
let fontSizeA;
|
||||
for (const part of revParts) {
|
||||
if (fontSizeA) {
|
||||
if (part === "normal") {
|
||||
continue;
|
||||
} else {
|
||||
for (const property of properties) {
|
||||
switch (property) {
|
||||
case "font-style":
|
||||
case "font-variant":
|
||||
case "font-weight":
|
||||
case "line-height": {
|
||||
const value = shorthandFor.get(property);
|
||||
if (value.isValid(part)) {
|
||||
font[property] = value.parse(part);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (fontSize.isValid(part)) {
|
||||
fontSizeA = fontSize.parse(part);
|
||||
} else if (fontFamily.isValid(part)) {
|
||||
revFontFamily.push(part);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
const family = revFontFamily.reverse().join(" ");
|
||||
if (fontSizeA && fontFamily.isValid(family)) {
|
||||
font["font-size"] = fontSizeA;
|
||||
fontFamilies.add(fontFamily.parse(family));
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
for (const family of families) {
|
||||
if (fontFamily.isValid(family)) {
|
||||
fontFamilies.add(fontFamily.parse(family));
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
font["font-family"] = [...fontFamilies].join(", ");
|
||||
return font;
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (v === "" || parsers.hasVarFunc(v)) {
|
||||
for (const [key] of shorthandFor) {
|
||||
this._setProperty(key, "");
|
||||
}
|
||||
this._setProperty("font", v);
|
||||
} else {
|
||||
const obj = module.exports.parse(v);
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
const str = new Set();
|
||||
for (const [key] of shorthandFor) {
|
||||
const val = obj[key];
|
||||
if (typeof val === "string") {
|
||||
this._setProperty(key, val);
|
||||
if (val && val !== "normal" && !str.has(val)) {
|
||||
if (key === "line-height") {
|
||||
str.add(`/ ${val}`);
|
||||
} else {
|
||||
str.add(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this._setProperty("font", [...str].join(" "));
|
||||
}
|
||||
},
|
||||
get() {
|
||||
const val = this.getPropertyValue("font");
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return val;
|
||||
}
|
||||
const str = new Set();
|
||||
for (const [key] of shorthandFor) {
|
||||
const v = this.getPropertyValue(key);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
return "";
|
||||
}
|
||||
if (v && v !== "normal" && !str.has(v)) {
|
||||
if (key === "line-height") {
|
||||
str.add(`/ ${v}`);
|
||||
} else {
|
||||
str.add(`${v}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
return [...str].join(" ");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
95
frontend/node_modules/cssstyle/lib/properties/fontFamily.js
generated
vendored
Normal file
95
frontend/node_modules/cssstyle/lib/properties/fontFamily.js
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
if (v === "") {
|
||||
return v;
|
||||
}
|
||||
const keywords = [
|
||||
"serif",
|
||||
"sans-serif",
|
||||
"cursive",
|
||||
"fantasy",
|
||||
"monospace",
|
||||
"system-ui",
|
||||
"math",
|
||||
"ui-serif",
|
||||
"ui-sans-serif",
|
||||
"ui-monospace",
|
||||
"ui-rounded"
|
||||
];
|
||||
const genericValues = ["fangsong", "kai", "khmer-mul", "nastaliq"];
|
||||
const val = parsers.splitValue(v, {
|
||||
delimiter: ","
|
||||
});
|
||||
const font = [];
|
||||
let valid = false;
|
||||
for (const i of val) {
|
||||
const str = parsers.parseString(i);
|
||||
if (str) {
|
||||
font.push(str);
|
||||
valid = true;
|
||||
continue;
|
||||
}
|
||||
const key = parsers.parseKeyword(i, keywords);
|
||||
if (key) {
|
||||
font.push(key);
|
||||
valid = true;
|
||||
continue;
|
||||
}
|
||||
const obj = parsers.parseFunction(i);
|
||||
if (obj) {
|
||||
const { name, value } = obj;
|
||||
if (name === "generic" && genericValues.includes(value)) {
|
||||
font.push(`${name}(${value})`);
|
||||
valid = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// This implementation does not strictly follow the specification.
|
||||
// The spec does not require the first letter of the font-family to be
|
||||
// capitalized, and unquoted font-family names are not restricted to ASCII.
|
||||
// However, in the real world, the first letter of the ASCII font-family
|
||||
// names are capitalized, and unquoted font-family names do not contain
|
||||
// spaces, e.g. `Times`. And non-ASCII font-family names are quoted even
|
||||
// without spaces, e.g. `"メイリオ"`.
|
||||
// @see https://drafts.csswg.org/css-fonts/#font-family-prop
|
||||
if (
|
||||
i !== "undefined" &&
|
||||
/^(?:[A-Z][A-Za-z\d-]+(?:\s+[A-Z][A-Za-z\d-]+)*|-?[a-z][a-z-]+)$/.test(i)
|
||||
) {
|
||||
font.push(i.trim());
|
||||
valid = true;
|
||||
continue;
|
||||
}
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
return font.join(", ");
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("font", "");
|
||||
this._setProperty("font-family", v);
|
||||
} else {
|
||||
this._setProperty("font-family", module.exports.parse(v));
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("font-family");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
47
frontend/node_modules/cssstyle/lib/properties/fontSize.js
generated
vendored
Normal file
47
frontend/node_modules/cssstyle/lib/properties/fontSize.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseMeasurement(v, true);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
const keywords = [
|
||||
"xx-small",
|
||||
"x-small",
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"x-large",
|
||||
"xx-large",
|
||||
"xxx-large",
|
||||
"smaller",
|
||||
"larger"
|
||||
];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("font", "");
|
||||
this._setProperty("font-size", v);
|
||||
} else {
|
||||
this._setProperty("font-size", module.exports.parse(v));
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("font-size");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
32
frontend/node_modules/cssstyle/lib/properties/fontStyle.js
generated
vendored
Normal file
32
frontend/node_modules/cssstyle/lib/properties/fontStyle.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const keywords = ["normal", "italic", "oblique"];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("font", "");
|
||||
this._setProperty("font-style", v);
|
||||
} else {
|
||||
this._setProperty("font-style", module.exports.parse(v));
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("font-style");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
36
frontend/node_modules/cssstyle/lib/properties/fontVariant.js
generated
vendored
Normal file
36
frontend/node_modules/cssstyle/lib/properties/fontVariant.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const num = parsers.parseNumber(v, true);
|
||||
if (num && parseFloat(num) <= 1000) {
|
||||
return num;
|
||||
}
|
||||
const keywords = ["normal", "none", "small-caps"];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("font", "");
|
||||
this._setProperty("font-valiant", v);
|
||||
} else {
|
||||
this._setProperty("font-variant", module.exports.parse(v));
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("font-variant");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
36
frontend/node_modules/cssstyle/lib/properties/fontWeight.js
generated
vendored
Normal file
36
frontend/node_modules/cssstyle/lib/properties/fontWeight.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const num = parsers.parseNumber(v, true);
|
||||
if (num && parseFloat(num) <= 1000) {
|
||||
return num;
|
||||
}
|
||||
const keywords = ["normal", "bold", "lighter", "bolder"];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("font", "");
|
||||
this._setProperty("font-weight", v);
|
||||
} else {
|
||||
this._setProperty("font-weight", module.exports.parse(v));
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("font-weight");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
31
frontend/node_modules/cssstyle/lib/properties/height.js
generated
vendored
Normal file
31
frontend/node_modules/cssstyle/lib/properties/height.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const dim = parsers.parseMeasurement(v, true);
|
||||
if (dim) {
|
||||
return dim;
|
||||
}
|
||||
const keywords = ["auto", "min-content", "max-content", "fit-content"];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("height", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("height");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/left.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/left.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const dim = parsers.parseMeasurement(v);
|
||||
if (dim) {
|
||||
return dim;
|
||||
}
|
||||
return parsers.parseKeyword(v, ["auto"]);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("left", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("left");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/lightingColor.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/lightingColor.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("lighting-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("lighting-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
39
frontend/node_modules/cssstyle/lib/properties/lineHeight.js
generated
vendored
Normal file
39
frontend/node_modules/cssstyle/lib/properties/lineHeight.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseKeyword(v, ["normal"]);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
const num = parsers.parseNumber(v, true);
|
||||
if (num) {
|
||||
return num;
|
||||
}
|
||||
return parsers.parseMeasurement(v, true);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("font", "");
|
||||
this._setProperty("line-height", v);
|
||||
} else {
|
||||
this._setProperty("line-height", module.exports.parse(v));
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("line-height");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
58
frontend/node_modules/cssstyle/lib/properties/margin.js
generated
vendored
Normal file
58
frontend/node_modules/cssstyle/lib/properties/margin.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
const positions = ["top", "right", "bottom", "left"];
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseMeasurement(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v, ["auto"]);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._implicitSetter(
|
||||
"margin",
|
||||
"",
|
||||
"",
|
||||
module.exports.isValid,
|
||||
module.exports.parse,
|
||||
positions
|
||||
);
|
||||
this._setProperty("margin", v);
|
||||
} else {
|
||||
this._implicitSetter(
|
||||
"margin",
|
||||
"",
|
||||
v,
|
||||
module.exports.isValid,
|
||||
module.exports.parse,
|
||||
positions
|
||||
);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
const val = this._implicitGetter("margin", positions);
|
||||
if (val === "") {
|
||||
return this.getPropertyValue("margin");
|
||||
}
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return "";
|
||||
}
|
||||
return val;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
40
frontend/node_modules/cssstyle/lib/properties/marginBottom.js
generated
vendored
Normal file
40
frontend/node_modules/cssstyle/lib/properties/marginBottom.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseMeasurement(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v, ["auto"]);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("margin", "");
|
||||
this._setProperty("margin-bottom", v);
|
||||
} else {
|
||||
this._subImplicitSetter("margin", "bottom", v, module.exports.isValid, module.exports.parse, [
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left"
|
||||
]);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("margin-bottom");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
40
frontend/node_modules/cssstyle/lib/properties/marginLeft.js
generated
vendored
Normal file
40
frontend/node_modules/cssstyle/lib/properties/marginLeft.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseMeasurement(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v, ["auto"]);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("margin", "");
|
||||
this._setProperty("margin-left", v);
|
||||
} else {
|
||||
this._subImplicitSetter("margin", "left", v, module.exports.isValid, module.exports.parse, [
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left"
|
||||
]);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("margin-left");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
40
frontend/node_modules/cssstyle/lib/properties/marginRight.js
generated
vendored
Normal file
40
frontend/node_modules/cssstyle/lib/properties/marginRight.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseMeasurement(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v, ["auto"]);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("margin", "");
|
||||
this._setProperty("margin-right", v);
|
||||
} else {
|
||||
this._subImplicitSetter("margin", "right", v, module.exports.isValid, module.exports.parse, [
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left"
|
||||
]);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("margin-right");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
40
frontend/node_modules/cssstyle/lib/properties/marginTop.js
generated
vendored
Normal file
40
frontend/node_modules/cssstyle/lib/properties/marginTop.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseMeasurement(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v, ["auto"]);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("margin", "");
|
||||
this._setProperty("margin-top", v);
|
||||
} else {
|
||||
this._subImplicitSetter("margin", "top", v, module.exports.isValid, module.exports.parse, [
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left"
|
||||
]);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("margin-top");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
46
frontend/node_modules/cssstyle/lib/properties/opacity.js
generated
vendored
Normal file
46
frontend/node_modules/cssstyle/lib/properties/opacity.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
let num = parsers.parseNumber(v);
|
||||
if (num) {
|
||||
num = parseFloat(num);
|
||||
if (num < 0) {
|
||||
return "0";
|
||||
} else if (num > 1) {
|
||||
return "1";
|
||||
}
|
||||
return `${num}`;
|
||||
}
|
||||
let pct = parsers.parsePercent(v);
|
||||
if (pct) {
|
||||
pct = parseFloat(pct);
|
||||
if (pct < 0) {
|
||||
return "0%";
|
||||
} else if (pct > 100) {
|
||||
return "100%";
|
||||
}
|
||||
return `${pct}%`;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("opacity", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("opacity");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/outlineColor.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/outlineColor.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("outline-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("outline-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
58
frontend/node_modules/cssstyle/lib/properties/padding.js
generated
vendored
Normal file
58
frontend/node_modules/cssstyle/lib/properties/padding.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
const positions = ["top", "right", "bottom", "left"];
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseMeasurement(v, true);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._implicitSetter(
|
||||
"padding",
|
||||
"",
|
||||
"",
|
||||
module.exports.isValid,
|
||||
module.exports.parse,
|
||||
positions
|
||||
);
|
||||
this._setProperty("padding", v);
|
||||
} else {
|
||||
this._implicitSetter(
|
||||
"padding",
|
||||
"",
|
||||
v,
|
||||
module.exports.isValid,
|
||||
module.exports.parse,
|
||||
positions
|
||||
);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
const val = this._implicitGetter("padding", positions);
|
||||
if (val === "") {
|
||||
return this.getPropertyValue("padding");
|
||||
}
|
||||
if (parsers.hasVarFunc(val)) {
|
||||
return "";
|
||||
}
|
||||
return val;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
42
frontend/node_modules/cssstyle/lib/properties/paddingBottom.js
generated
vendored
Normal file
42
frontend/node_modules/cssstyle/lib/properties/paddingBottom.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseMeasurement(v, true);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("padding", "");
|
||||
this._setProperty("padding-bottom", v);
|
||||
} else {
|
||||
this._subImplicitSetter(
|
||||
"padding",
|
||||
"bottom",
|
||||
v,
|
||||
module.exports.isValid,
|
||||
module.exports.parse,
|
||||
["top", "right", "bottom", "left"]
|
||||
);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("padding-bottom");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
40
frontend/node_modules/cssstyle/lib/properties/paddingLeft.js
generated
vendored
Normal file
40
frontend/node_modules/cssstyle/lib/properties/paddingLeft.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseMeasurement(v, true);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("padding", "");
|
||||
this._setProperty("padding-left", v);
|
||||
} else {
|
||||
this._subImplicitSetter("padding", "left", v, module.exports.isValid, module.exports.parse, [
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left"
|
||||
]);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("padding-left");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
40
frontend/node_modules/cssstyle/lib/properties/paddingRight.js
generated
vendored
Normal file
40
frontend/node_modules/cssstyle/lib/properties/paddingRight.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseMeasurement(v, true);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("padding", "");
|
||||
this._setProperty("padding-right", v);
|
||||
} else {
|
||||
this._subImplicitSetter("padding", "right", v, module.exports.isValid, module.exports.parse, [
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left"
|
||||
]);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("padding-right");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
40
frontend/node_modules/cssstyle/lib/properties/paddingTop.js
generated
vendored
Normal file
40
frontend/node_modules/cssstyle/lib/properties/paddingTop.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseMeasurement(v, true);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
if (parsers.hasVarFunc(v)) {
|
||||
this._setProperty("padding", "");
|
||||
this._setProperty("padding-top", v);
|
||||
} else {
|
||||
this._subImplicitSetter("padding", "top", v, module.exports.isValid, module.exports.parse, [
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left"
|
||||
]);
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("padding-top");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/right.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/right.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const dim = parsers.parseMeasurement(v);
|
||||
if (dim) {
|
||||
return dim;
|
||||
}
|
||||
return parsers.parseKeyword(v, ["auto"]);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("right", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("right");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/stopColor.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/stopColor.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("stop-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("stop-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/top.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/top.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const dim = parsers.parseMeasurement(v);
|
||||
if (dim) {
|
||||
return dim;
|
||||
}
|
||||
return parsers.parseKeyword(v, ["auto"]);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("top", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("top");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("-webkit-border-after-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("-webkit-border-after-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("-webkit-border-before-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("-webkit-border-before-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("-webkit-border-end-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("-webkit-border-end-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("-webkit-border-start-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("-webkit-border-start-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("-webkit-column-rule-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("-webkit-column-rule-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("-webkit-tap-highlight-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("-webkit-tap-highlight-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("-webkit-text-emphasis-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("-webkit-text-emphasis-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/webkitTextFillColor.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/webkitTextFillColor.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("-webkit-text-fill-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("-webkit-text-fill-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
30
frontend/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js
generated
vendored
Normal file
30
frontend/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const val = parsers.parseColor(v);
|
||||
if (val) {
|
||||
return val;
|
||||
}
|
||||
return parsers.parseKeyword(v);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "" || typeof parsers.parseKeyword(v) === "string") {
|
||||
return true;
|
||||
}
|
||||
return parsers.isValidColor(v);
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("-webkit-text-stroke-color", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("-webkit-text-stroke-color");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
31
frontend/node_modules/cssstyle/lib/properties/width.js
generated
vendored
Normal file
31
frontend/node_modules/cssstyle/lib/properties/width.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
|
||||
const parsers = require("../parsers");
|
||||
|
||||
module.exports.parse = function parse(v) {
|
||||
const dim = parsers.parseMeasurement(v, true);
|
||||
if (dim) {
|
||||
return dim;
|
||||
}
|
||||
const keywords = ["auto", "min-content", "max-content", "fit-content"];
|
||||
return parsers.parseKeyword(v, keywords);
|
||||
};
|
||||
|
||||
module.exports.isValid = function isValid(v) {
|
||||
if (v === "") {
|
||||
return true;
|
||||
}
|
||||
return typeof module.exports.parse(v) === "string";
|
||||
};
|
||||
|
||||
module.exports.definition = {
|
||||
set(v) {
|
||||
v = parsers.prepareValue(v, this._global);
|
||||
this._setProperty("width", module.exports.parse(v));
|
||||
},
|
||||
get() {
|
||||
return this.getPropertyValue("width");
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
Reference in New Issue
Block a user