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:
193
node_modules/css-tree/lib/syntax/node/UnicodeRange.js
generated
vendored
193
node_modules/css-tree/lib/syntax/node/UnicodeRange.js
generated
vendored
@@ -1,32 +1,29 @@
|
||||
var isHexDigit = require('../../tokenizer').isHexDigit;
|
||||
var cmpChar = require('../../tokenizer').cmpChar;
|
||||
var TYPE = require('../../tokenizer').TYPE;
|
||||
var NAME = require('../../tokenizer').NAME;
|
||||
import {
|
||||
isHexDigit,
|
||||
Ident,
|
||||
Number,
|
||||
Dimension
|
||||
} from '../../tokenizer/index.js';
|
||||
|
||||
var IDENT = TYPE.Ident;
|
||||
var NUMBER = TYPE.Number;
|
||||
var DIMENSION = TYPE.Dimension;
|
||||
var PLUSSIGN = 0x002B; // U+002B PLUS SIGN (+)
|
||||
var HYPHENMINUS = 0x002D; // U+002D HYPHEN-MINUS (-)
|
||||
var QUESTIONMARK = 0x003F; // U+003F QUESTION MARK (?)
|
||||
var U = 0x0075; // U+0075 LATIN SMALL LETTER U (u)
|
||||
const PLUSSIGN = 0x002B; // U+002B PLUS SIGN (+)
|
||||
const HYPHENMINUS = 0x002D; // U+002D HYPHEN-MINUS (-)
|
||||
const QUESTIONMARK = 0x003F; // U+003F QUESTION MARK (?)
|
||||
|
||||
function eatHexSequence(offset, allowDash) {
|
||||
for (var pos = this.scanner.tokenStart + offset, len = 0; pos < this.scanner.tokenEnd; pos++) {
|
||||
var code = this.scanner.source.charCodeAt(pos);
|
||||
let len = 0;
|
||||
|
||||
for (let pos = this.tokenStart + offset; pos < this.tokenEnd; pos++) {
|
||||
const code = this.charCodeAt(pos);
|
||||
|
||||
if (code === HYPHENMINUS && allowDash && len !== 0) {
|
||||
if (eatHexSequence.call(this, offset + len + 1, false) === 0) {
|
||||
this.error();
|
||||
}
|
||||
|
||||
eatHexSequence.call(this, offset + len + 1, false);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!isHexDigit(code)) {
|
||||
this.error(
|
||||
allowDash && len !== 0
|
||||
? 'HyphenMinus' + (len < 6 ? ' or hex digit' : '') + ' is expected'
|
||||
? 'Hyphen minus' + (len < 6 ? ' or hex digit' : '') + ' is expected'
|
||||
: (len < 6 ? 'Hex digit is expected' : 'Unexpected input'),
|
||||
pos
|
||||
);
|
||||
@@ -37,25 +34,25 @@ function eatHexSequence(offset, allowDash) {
|
||||
};
|
||||
}
|
||||
|
||||
this.scanner.next();
|
||||
this.next();
|
||||
return len;
|
||||
}
|
||||
|
||||
function eatQuestionMarkSequence(max) {
|
||||
var count = 0;
|
||||
let count = 0;
|
||||
|
||||
while (this.scanner.isDelim(QUESTIONMARK)) {
|
||||
while (this.isDelim(QUESTIONMARK)) {
|
||||
if (++count > max) {
|
||||
this.error('Too many question marks');
|
||||
}
|
||||
|
||||
this.scanner.next();
|
||||
this.next();
|
||||
}
|
||||
}
|
||||
|
||||
function startsWith(code) {
|
||||
if (this.scanner.source.charCodeAt(this.scanner.tokenStart) !== code) {
|
||||
this.error(NAME[code] + ' is expected');
|
||||
if (this.charCodeAt(this.tokenStart) !== code) {
|
||||
this.error((code === PLUSSIGN ? 'Plus sign' : 'Hyphen minus') + ' is expected');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,95 +76,81 @@ function startsWith(code) {
|
||||
// u <number-token> <number-token> |
|
||||
// u '+' '?'+
|
||||
function scanUnicodeRange() {
|
||||
var hexLength = 0;
|
||||
let hexLength = 0;
|
||||
|
||||
// u '+' <ident-token> '?'*
|
||||
// u '+' '?'+
|
||||
if (this.scanner.isDelim(PLUSSIGN)) {
|
||||
this.scanner.next();
|
||||
switch (this.tokenType) {
|
||||
case Number:
|
||||
// u <number-token> '?'*
|
||||
// u <number-token> <dimension-token>
|
||||
// u <number-token> <number-token>
|
||||
hexLength = eatHexSequence.call(this, 1, true);
|
||||
|
||||
if (this.isDelim(QUESTIONMARK)) {
|
||||
eatQuestionMarkSequence.call(this, 6 - hexLength);
|
||||
break;
|
||||
}
|
||||
|
||||
if (this.tokenType === Dimension ||
|
||||
this.tokenType === Number) {
|
||||
startsWith.call(this, HYPHENMINUS);
|
||||
eatHexSequence.call(this, 1, false);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case Dimension:
|
||||
// u <dimension-token> '?'*
|
||||
hexLength = eatHexSequence.call(this, 1, true);
|
||||
|
||||
if (this.scanner.tokenType === IDENT) {
|
||||
hexLength = eatHexSequence.call(this, 0, true);
|
||||
if (hexLength > 0) {
|
||||
eatQuestionMarkSequence.call(this, 6 - hexLength);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.scanner.isDelim(QUESTIONMARK)) {
|
||||
this.scanner.next();
|
||||
eatQuestionMarkSequence.call(this, 5);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
this.error('Hex digit or question mark is expected');
|
||||
return;
|
||||
default:
|
||||
// u '+' <ident-token> '?'*
|
||||
// u '+' '?'+
|
||||
this.eatDelim(PLUSSIGN);
|
||||
|
||||
if (this.tokenType === Ident) {
|
||||
hexLength = eatHexSequence.call(this, 0, true);
|
||||
if (hexLength > 0) {
|
||||
eatQuestionMarkSequence.call(this, 6 - hexLength);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (this.isDelim(QUESTIONMARK)) {
|
||||
this.next();
|
||||
eatQuestionMarkSequence.call(this, 5);
|
||||
break;
|
||||
}
|
||||
|
||||
this.error('Hex digit or question mark is expected');
|
||||
}
|
||||
|
||||
// u <number-token> '?'*
|
||||
// u <number-token> <dimension-token>
|
||||
// u <number-token> <number-token>
|
||||
if (this.scanner.tokenType === NUMBER) {
|
||||
startsWith.call(this, PLUSSIGN);
|
||||
hexLength = eatHexSequence.call(this, 1, true);
|
||||
|
||||
if (this.scanner.isDelim(QUESTIONMARK)) {
|
||||
eatQuestionMarkSequence.call(this, 6 - hexLength);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.scanner.tokenType === DIMENSION ||
|
||||
this.scanner.tokenType === NUMBER) {
|
||||
startsWith.call(this, HYPHENMINUS);
|
||||
eatHexSequence.call(this, 1, false);
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// u <dimension-token> '?'*
|
||||
if (this.scanner.tokenType === DIMENSION) {
|
||||
startsWith.call(this, PLUSSIGN);
|
||||
hexLength = eatHexSequence.call(this, 1, true);
|
||||
|
||||
if (hexLength > 0) {
|
||||
eatQuestionMarkSequence.call(this, 6 - hexLength);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
this.error();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
name: 'UnicodeRange',
|
||||
structure: {
|
||||
value: String
|
||||
},
|
||||
parse: function() {
|
||||
var start = this.scanner.tokenStart;
|
||||
|
||||
// U or u
|
||||
if (!cmpChar(this.scanner.source, start, U)) {
|
||||
this.error('U is expected');
|
||||
}
|
||||
|
||||
if (!cmpChar(this.scanner.source, start + 1, PLUSSIGN)) {
|
||||
this.error('Plus sign is expected');
|
||||
}
|
||||
|
||||
this.scanner.next();
|
||||
scanUnicodeRange.call(this);
|
||||
|
||||
return {
|
||||
type: 'UnicodeRange',
|
||||
loc: this.getLocation(start, this.scanner.tokenStart),
|
||||
value: this.scanner.substrToCursor(start)
|
||||
};
|
||||
},
|
||||
generate: function(node) {
|
||||
this.chunk(node.value);
|
||||
}
|
||||
export const name = 'UnicodeRange';
|
||||
export const structure = {
|
||||
value: String
|
||||
};
|
||||
|
||||
export function parse() {
|
||||
const start = this.tokenStart;
|
||||
|
||||
// U or u
|
||||
this.eatIdent('u');
|
||||
scanUnicodeRange.call(this);
|
||||
|
||||
return {
|
||||
type: 'UnicodeRange',
|
||||
loc: this.getLocation(start, this.tokenStart),
|
||||
value: this.substrToCursor(start)
|
||||
};
|
||||
}
|
||||
|
||||
export function generate(node) {
|
||||
this.tokenize(node.value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user