Base UI
NPM Installation / build (16.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (16.x, windows-latest) (push) Has been cancelled
NPM Installation / build (17.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (17.x, windows-latest) (push) Has been cancelled
NPM Installation / build (18.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (18.x, windows-latest) (push) Has been cancelled

This commit is contained in:
2026-06-25 11:15:13 +07:00
parent c539fe47af
commit cc038a7372
20561 changed files with 1811255 additions and 41 deletions
+17
View File
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ensureObject;
function ensureObject(obj) {
var props = [];
for (var _i = 1; _i < arguments.length; _i++) {
props[_i - 1] = arguments[_i];
}
while (props.length > 0) {
var prop = props.shift();
if (!obj[prop]) {
obj[prop] = {};
}
obj = obj[prop];
}
}
//# sourceMappingURL=ensureObject.js.map
+18
View File
@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = getProp;
function getProp(obj) {
var props = [];
for (var _i = 1; _i < arguments.length; _i++) {
props[_i - 1] = arguments[_i];
}
while (props.length > 0) {
var prop = props.shift();
if (!obj[prop]) {
return undefined;
}
obj = obj[prop];
}
return obj;
}
//# sourceMappingURL=getProp.js.map
+18
View File
@@ -0,0 +1,18 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MAX_NESTING_DEPTH = exports.resolveMaxNestingDepth = exports.stripComments = exports.ensureObject = exports.getProp = exports.unesc = void 0;
var unesc_1 = require("./unesc");
Object.defineProperty(exports, "unesc", { enumerable: true, get: function () { return __importDefault(unesc_1).default; } });
var getProp_1 = require("./getProp");
Object.defineProperty(exports, "getProp", { enumerable: true, get: function () { return __importDefault(getProp_1).default; } });
var ensureObject_1 = require("./ensureObject");
Object.defineProperty(exports, "ensureObject", { enumerable: true, get: function () { return __importDefault(ensureObject_1).default; } });
var stripComments_1 = require("./stripComments");
Object.defineProperty(exports, "stripComments", { enumerable: true, get: function () { return __importDefault(stripComments_1).default; } });
var maxNestingDepth_1 = require("./maxNestingDepth");
Object.defineProperty(exports, "resolveMaxNestingDepth", { enumerable: true, get: function () { return __importDefault(maxNestingDepth_1).default; } });
Object.defineProperty(exports, "MAX_NESTING_DEPTH", { enumerable: true, get: function () { return maxNestingDepth_1.MAX_NESTING_DEPTH; } });
//# sourceMappingURL=index.js.map
+25
View File
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MAX_NESTING_DEPTH = void 0;
exports.default = resolveMaxNestingDepth;
/**
* The default maximum selector nesting depth allowed when parsing or
* serializing a selector. Going beyond this would otherwise recurse deeply
* enough to overflow the call stack (CVE-2026-9358 / CWE-674). Real-world
* selectors never get anywhere near this, so it acts purely as a safety net
* that turns an uncatchable stack overflow into a catchable error.
*/
exports.MAX_NESTING_DEPTH = 256;
/**
* Coerce a user-supplied nesting-depth limit into a safe value. Anything that
* is not a non-negative safe integer (NaN, Infinity, negative numbers, or a
* non-number) would disable or break the guard, so it falls back to the
* default.
*
* @param {unknown} value the limit provided through the `maxNestingDepth` option
* @returns {number} a safe, non-negative integer limit
*/
function resolveMaxNestingDepth(value) {
return Number.isSafeInteger(value) && value >= 0 ? value : exports.MAX_NESTING_DEPTH;
}
//# sourceMappingURL=maxNestingDepth.js.map
+20
View File
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = stripComments;
function stripComments(str) {
var s = "";
var commentStart = str.indexOf("/*");
var lastEnd = 0;
while (commentStart >= 0) {
s = s + str.slice(lastEnd, commentStart);
var commentEnd = str.indexOf("*/", commentStart + 2);
if (commentEnd < 0) {
return s;
}
lastEnd = commentEnd + 2;
commentStart = str.indexOf("/*", lastEnd);
}
s = s + str.slice(lastEnd);
return s;
}
//# sourceMappingURL=stripComments.js.map
+72
View File
@@ -0,0 +1,72 @@
"use strict";
// Many thanks for this post which made this migration much easier.
// https://mathiasbynens.be/notes/css-escapes
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = unesc;
/**
*
* @param {string} str
* @returns {[string, number]|undefined}
*/
function gobbleHex(str) {
var lower = str.toLowerCase();
var hex = "";
var spaceTerminated = false;
for (var i = 0; i < 6 && lower[i] !== undefined; i++) {
var code = lower.charCodeAt(i);
// check to see if we are dealing with a valid hex char [a-f|0-9]
var valid = (code >= 97 && code <= 102) || (code >= 48 && code <= 57);
// https://drafts.csswg.org/css-syntax/#consume-escaped-code-point
spaceTerminated = code === 32;
if (!valid) {
break;
}
hex += lower[i];
}
if (hex.length === 0) {
return undefined;
}
var codePoint = parseInt(hex, 16);
var isSurrogate = codePoint >= 0xd800 && codePoint <= 0xdfff;
// Add special case for
// "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point"
// https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point
if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10ffff) {
return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)];
}
return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)];
}
var CONTAINS_ESCAPE = /\\/;
function unesc(str) {
var needToProcess = CONTAINS_ESCAPE.test(str);
if (!needToProcess) {
return str;
}
var ret = "";
for (var i = 0; i < str.length; i++) {
if (str[i] === "\\") {
var gobbled = gobbleHex(str.slice(i + 1, i + 7));
if (gobbled !== undefined) {
ret += gobbled[0];
i += gobbled[1];
continue;
}
// Retain a pair of \\ if double escaped `\\\\`
// https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e
if (str[i + 1] === "\\") {
ret += "\\";
i++;
continue;
}
// if \\ is at the end of the string retain it
// https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb
if (str.length === i + 1) {
ret += str[i];
}
continue;
}
ret += str[i];
}
return ret;
}
//# sourceMappingURL=unesc.js.map