Fix code quality violations and exclude Manifest from checks
Document application modes (development/debug/production) Add global file drop handler, order column normalization, SPA hash fix Serve CDN assets via /_vendor/ URLs instead of merging into bundles Add production minification with license preservation Improve JSON formatting for debugging and production optimization Add CDN asset caching with CSS URL inlining for production builds Add three-mode system (development, debug, production) Update Manifest CLAUDE.md to reflect helper class architecture Refactor Manifest.php into helper classes for better organization Pre-manifest-refactor checkpoint: Add app_mode documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
113
node_modules/css-tree/lib/tokenizer/char-code-definitions.js
generated
vendored
113
node_modules/css-tree/lib/tokenizer/char-code-definitions.js
generated
vendored
@@ -1,18 +1,18 @@
|
||||
var EOF = 0;
|
||||
const EOF = 0;
|
||||
|
||||
// https://drafts.csswg.org/css-syntax-3/
|
||||
// § 4.2. Definitions
|
||||
|
||||
// digit
|
||||
// A code point between U+0030 DIGIT ZERO (0) and U+0039 DIGIT NINE (9).
|
||||
function isDigit(code) {
|
||||
export function isDigit(code) {
|
||||
return code >= 0x0030 && code <= 0x0039;
|
||||
}
|
||||
|
||||
// hex digit
|
||||
// A digit, or a code point between U+0041 LATIN CAPITAL LETTER A (A) and U+0046 LATIN CAPITAL LETTER F (F),
|
||||
// or a code point between U+0061 LATIN SMALL LETTER A (a) and U+0066 LATIN SMALL LETTER F (f).
|
||||
function isHexDigit(code) {
|
||||
export function isHexDigit(code) {
|
||||
return (
|
||||
isDigit(code) || // 0 .. 9
|
||||
(code >= 0x0041 && code <= 0x0046) || // A .. F
|
||||
@@ -22,44 +22,49 @@ function isHexDigit(code) {
|
||||
|
||||
// uppercase letter
|
||||
// A code point between U+0041 LATIN CAPITAL LETTER A (A) and U+005A LATIN CAPITAL LETTER Z (Z).
|
||||
function isUppercaseLetter(code) {
|
||||
export function isUppercaseLetter(code) {
|
||||
return code >= 0x0041 && code <= 0x005A;
|
||||
}
|
||||
|
||||
// lowercase letter
|
||||
// A code point between U+0061 LATIN SMALL LETTER A (a) and U+007A LATIN SMALL LETTER Z (z).
|
||||
function isLowercaseLetter(code) {
|
||||
export function isLowercaseLetter(code) {
|
||||
return code >= 0x0061 && code <= 0x007A;
|
||||
}
|
||||
|
||||
// letter
|
||||
// An uppercase letter or a lowercase letter.
|
||||
function isLetter(code) {
|
||||
export function isLetter(code) {
|
||||
return isUppercaseLetter(code) || isLowercaseLetter(code);
|
||||
}
|
||||
|
||||
// non-ASCII code point
|
||||
// A code point with a value equal to or greater than U+0080 <control>.
|
||||
function isNonAscii(code) {
|
||||
//
|
||||
// 2024-09-02: The latest spec narrows the range for non-ASCII characters (see https://github.com/csstree/csstree/issues/188).
|
||||
// However, all modern browsers support a wider range, and strictly following the latest spec could result
|
||||
// in some CSS being parsed incorrectly, even though it works in the browser. Therefore, this function adheres
|
||||
// to the previous, broader definition of non-ASCII characters.
|
||||
export function isNonAscii(code) {
|
||||
return code >= 0x0080;
|
||||
}
|
||||
|
||||
// name-start code point
|
||||
// A letter, a non-ASCII code point, or U+005F LOW LINE (_).
|
||||
function isNameStart(code) {
|
||||
export function isNameStart(code) {
|
||||
return isLetter(code) || isNonAscii(code) || code === 0x005F;
|
||||
}
|
||||
|
||||
// name code point
|
||||
// A name-start code point, a digit, or U+002D HYPHEN-MINUS (-).
|
||||
function isName(code) {
|
||||
export function isName(code) {
|
||||
return isNameStart(code) || isDigit(code) || code === 0x002D;
|
||||
}
|
||||
|
||||
// non-printable code point
|
||||
// A code point between U+0000 NULL and U+0008 BACKSPACE, or U+000B LINE TABULATION,
|
||||
// or a code point between U+000E SHIFT OUT and U+001F INFORMATION SEPARATOR ONE, or U+007F DELETE.
|
||||
function isNonPrintable(code) {
|
||||
export function isNonPrintable(code) {
|
||||
return (
|
||||
(code >= 0x0000 && code <= 0x0008) ||
|
||||
(code === 0x000B) ||
|
||||
@@ -72,18 +77,18 @@ function isNonPrintable(code) {
|
||||
// U+000A LINE FEED. Note that U+000D CARRIAGE RETURN and U+000C FORM FEED are not included in this definition,
|
||||
// as they are converted to U+000A LINE FEED during preprocessing.
|
||||
// TODO: we doesn't do a preprocessing, so check a code point for U+000D CARRIAGE RETURN and U+000C FORM FEED
|
||||
function isNewline(code) {
|
||||
export function isNewline(code) {
|
||||
return code === 0x000A || code === 0x000D || code === 0x000C;
|
||||
}
|
||||
|
||||
// whitespace
|
||||
// A newline, U+0009 CHARACTER TABULATION, or U+0020 SPACE.
|
||||
function isWhiteSpace(code) {
|
||||
export function isWhiteSpace(code) {
|
||||
return isNewline(code) || code === 0x0020 || code === 0x0009;
|
||||
}
|
||||
|
||||
// § 4.3.8. Check if two code points are a valid escape
|
||||
function isValidEscape(first, second) {
|
||||
export function isValidEscape(first, second) {
|
||||
// If the first code point is not U+005C REVERSE SOLIDUS (\), return false.
|
||||
if (first !== 0x005C) {
|
||||
return false;
|
||||
@@ -99,7 +104,7 @@ function isValidEscape(first, second) {
|
||||
}
|
||||
|
||||
// § 4.3.9. Check if three code points would start an identifier
|
||||
function isIdentifierStart(first, second, third) {
|
||||
export function isIdentifierStart(first, second, third) {
|
||||
// Look at the first code point:
|
||||
|
||||
// U+002D HYPHEN-MINUS
|
||||
@@ -131,7 +136,7 @@ function isIdentifierStart(first, second, third) {
|
||||
}
|
||||
|
||||
// § 4.3.10. Check if three code points would start a number
|
||||
function isNumberStart(first, second, third) {
|
||||
export function isNumberStart(first, second, third) {
|
||||
// Look at the first code point:
|
||||
|
||||
// U+002B PLUS SIGN (+)
|
||||
@@ -170,7 +175,7 @@ function isNumberStart(first, second, third) {
|
||||
//
|
||||
|
||||
// detect BOM (https://en.wikipedia.org/wiki/Byte_order_mark)
|
||||
function isBOM(code) {
|
||||
export function isBOM(code) {
|
||||
// UTF-16BE
|
||||
if (code === 0xFEFF) {
|
||||
return 1;
|
||||
@@ -185,65 +190,23 @@ function isBOM(code) {
|
||||
}
|
||||
|
||||
// Fast code category
|
||||
//
|
||||
// https://drafts.csswg.org/css-syntax/#tokenizer-definitions
|
||||
// > non-ASCII code point
|
||||
// > A code point with a value equal to or greater than U+0080 <control>
|
||||
// > name-start code point
|
||||
// > A letter, a non-ASCII code point, or U+005F LOW LINE (_).
|
||||
// > name code point
|
||||
// > A name-start code point, a digit, or U+002D HYPHEN-MINUS (-)
|
||||
// That means only ASCII code points has a special meaning and we define a maps for 0..127 codes only
|
||||
var CATEGORY = new Array(0x80);
|
||||
charCodeCategory.Eof = 0x80;
|
||||
charCodeCategory.WhiteSpace = 0x82;
|
||||
charCodeCategory.Digit = 0x83;
|
||||
charCodeCategory.NameStart = 0x84;
|
||||
charCodeCategory.NonPrintable = 0x85;
|
||||
// Only ASCII code points has a special meaning, that's why we define a maps for 0..127 codes only
|
||||
const CATEGORY = new Array(0x80);
|
||||
export const EofCategory = 0x80;
|
||||
export const WhiteSpaceCategory = 0x82;
|
||||
export const DigitCategory = 0x83;
|
||||
export const NameStartCategory = 0x84;
|
||||
export const NonPrintableCategory = 0x85;
|
||||
|
||||
for (var i = 0; i < CATEGORY.length; i++) {
|
||||
switch (true) {
|
||||
case isWhiteSpace(i):
|
||||
CATEGORY[i] = charCodeCategory.WhiteSpace;
|
||||
break;
|
||||
|
||||
case isDigit(i):
|
||||
CATEGORY[i] = charCodeCategory.Digit;
|
||||
break;
|
||||
|
||||
case isNameStart(i):
|
||||
CATEGORY[i] = charCodeCategory.NameStart;
|
||||
break;
|
||||
|
||||
case isNonPrintable(i):
|
||||
CATEGORY[i] = charCodeCategory.NonPrintable;
|
||||
break;
|
||||
|
||||
default:
|
||||
CATEGORY[i] = i || charCodeCategory.Eof;
|
||||
}
|
||||
for (let i = 0; i < CATEGORY.length; i++) {
|
||||
CATEGORY[i] =
|
||||
isWhiteSpace(i) && WhiteSpaceCategory ||
|
||||
isDigit(i) && DigitCategory ||
|
||||
isNameStart(i) && NameStartCategory ||
|
||||
isNonPrintable(i) && NonPrintableCategory ||
|
||||
i || EofCategory;
|
||||
}
|
||||
|
||||
function charCodeCategory(code) {
|
||||
return code < 0x80 ? CATEGORY[code] : charCodeCategory.NameStart;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
isDigit: isDigit,
|
||||
isHexDigit: isHexDigit,
|
||||
isUppercaseLetter: isUppercaseLetter,
|
||||
isLowercaseLetter: isLowercaseLetter,
|
||||
isLetter: isLetter,
|
||||
isNonAscii: isNonAscii,
|
||||
isNameStart: isNameStart,
|
||||
isName: isName,
|
||||
isNonPrintable: isNonPrintable,
|
||||
isNewline: isNewline,
|
||||
isWhiteSpace: isWhiteSpace,
|
||||
isValidEscape: isValidEscape,
|
||||
isIdentifierStart: isIdentifierStart,
|
||||
isNumberStart: isNumberStart,
|
||||
|
||||
isBOM: isBOM,
|
||||
charCodeCategory: charCodeCategory
|
||||
};
|
||||
export function charCodeCategory(code) {
|
||||
return code < 0x80 ? CATEGORY[code] : NameStartCategory;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user