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:
157
node_modules/css-tree/lib/syntax/node/Atrule.js
generated
vendored
157
node_modules/css-tree/lib/syntax/node/Atrule.js
generated
vendored
@@ -1,23 +1,22 @@
|
||||
var TYPE = require('../../tokenizer').TYPE;
|
||||
var rawMode = require('./Raw').mode;
|
||||
import {
|
||||
AtKeyword,
|
||||
Semicolon,
|
||||
LeftCurlyBracket,
|
||||
RightCurlyBracket
|
||||
} from '../../tokenizer/index.js';
|
||||
|
||||
var ATKEYWORD = TYPE.AtKeyword;
|
||||
var SEMICOLON = TYPE.Semicolon;
|
||||
var LEFTCURLYBRACKET = TYPE.LeftCurlyBracket;
|
||||
var RIGHTCURLYBRACKET = TYPE.RightCurlyBracket;
|
||||
|
||||
function consumeRaw(startToken) {
|
||||
return this.Raw(startToken, rawMode.leftCurlyBracketOrSemicolon, true);
|
||||
function consumeRaw() {
|
||||
return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon, true);
|
||||
}
|
||||
|
||||
function isDeclarationBlockAtrule() {
|
||||
for (var offset = 1, type; type = this.scanner.lookupType(offset); offset++) {
|
||||
if (type === RIGHTCURLYBRACKET) {
|
||||
for (let offset = 1, type; type = this.lookupType(offset); offset++) {
|
||||
if (type === RightCurlyBracket) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (type === LEFTCURLYBRACKET ||
|
||||
type === ATKEYWORD) {
|
||||
if (type === LeftCurlyBracket ||
|
||||
type === AtKeyword) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -25,83 +24,77 @@ function isDeclarationBlockAtrule() {
|
||||
return false;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
name: 'Atrule',
|
||||
structure: {
|
||||
name: String,
|
||||
prelude: ['AtrulePrelude', 'Raw', null],
|
||||
block: ['Block', null]
|
||||
},
|
||||
parse: function() {
|
||||
var start = this.scanner.tokenStart;
|
||||
var name;
|
||||
var nameLowerCase;
|
||||
var prelude = null;
|
||||
var block = null;
|
||||
|
||||
this.eat(ATKEYWORD);
|
||||
export const name = 'Atrule';
|
||||
export const walkContext = 'atrule';
|
||||
export const structure = {
|
||||
name: String,
|
||||
prelude: ['AtrulePrelude', 'Raw', null],
|
||||
block: ['Block', null]
|
||||
};
|
||||
|
||||
name = this.scanner.substrToCursor(start + 1);
|
||||
nameLowerCase = name.toLowerCase();
|
||||
this.scanner.skipSC();
|
||||
export function parse(isDeclaration = false) {
|
||||
const start = this.tokenStart;
|
||||
let name;
|
||||
let nameLowerCase;
|
||||
let prelude = null;
|
||||
let block = null;
|
||||
|
||||
// parse prelude
|
||||
if (this.scanner.eof === false &&
|
||||
this.scanner.tokenType !== LEFTCURLYBRACKET &&
|
||||
this.scanner.tokenType !== SEMICOLON) {
|
||||
if (this.parseAtrulePrelude) {
|
||||
prelude = this.parseWithFallback(this.AtrulePrelude.bind(this, name), consumeRaw);
|
||||
this.eat(AtKeyword);
|
||||
|
||||
// turn empty AtrulePrelude into null
|
||||
if (prelude.type === 'AtrulePrelude' && prelude.children.head === null) {
|
||||
prelude = null;
|
||||
}
|
||||
name = this.substrToCursor(start + 1);
|
||||
nameLowerCase = name.toLowerCase();
|
||||
this.skipSC();
|
||||
|
||||
// parse prelude
|
||||
if (this.eof === false &&
|
||||
this.tokenType !== LeftCurlyBracket &&
|
||||
this.tokenType !== Semicolon) {
|
||||
if (this.parseAtrulePrelude) {
|
||||
prelude = this.parseWithFallback(this.AtrulePrelude.bind(this, name, isDeclaration), consumeRaw);
|
||||
} else {
|
||||
prelude = consumeRaw.call(this, this.tokenIndex);
|
||||
}
|
||||
|
||||
this.skipSC();
|
||||
}
|
||||
|
||||
switch (this.tokenType) {
|
||||
case Semicolon:
|
||||
this.next();
|
||||
break;
|
||||
|
||||
case LeftCurlyBracket:
|
||||
if (hasOwnProperty.call(this.atrule, nameLowerCase) &&
|
||||
typeof this.atrule[nameLowerCase].block === 'function') {
|
||||
block = this.atrule[nameLowerCase].block.call(this, isDeclaration);
|
||||
} else {
|
||||
prelude = consumeRaw.call(this, this.scanner.tokenIndex);
|
||||
// TODO: should consume block content as Raw?
|
||||
block = this.Block(isDeclarationBlockAtrule.call(this));
|
||||
}
|
||||
|
||||
this.scanner.skipSC();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
switch (this.scanner.tokenType) {
|
||||
case SEMICOLON:
|
||||
this.scanner.next();
|
||||
break;
|
||||
return {
|
||||
type: 'Atrule',
|
||||
loc: this.getLocation(start, this.tokenStart),
|
||||
name,
|
||||
prelude,
|
||||
block
|
||||
};
|
||||
}
|
||||
|
||||
case LEFTCURLYBRACKET:
|
||||
if (this.atrule.hasOwnProperty(nameLowerCase) &&
|
||||
typeof this.atrule[nameLowerCase].block === 'function') {
|
||||
block = this.atrule[nameLowerCase].block.call(this);
|
||||
} else {
|
||||
// TODO: should consume block content as Raw?
|
||||
block = this.Block(isDeclarationBlockAtrule.call(this));
|
||||
}
|
||||
export function generate(node) {
|
||||
this.token(AtKeyword, '@' + node.name);
|
||||
|
||||
break;
|
||||
}
|
||||
if (node.prelude !== null) {
|
||||
this.node(node.prelude);
|
||||
}
|
||||
|
||||
return {
|
||||
type: 'Atrule',
|
||||
loc: this.getLocation(start, this.scanner.tokenStart),
|
||||
name: name,
|
||||
prelude: prelude,
|
||||
block: block
|
||||
};
|
||||
},
|
||||
generate: function(node) {
|
||||
this.chunk('@');
|
||||
this.chunk(node.name);
|
||||
|
||||
if (node.prelude !== null) {
|
||||
this.chunk(' ');
|
||||
this.node(node.prelude);
|
||||
}
|
||||
|
||||
if (node.block) {
|
||||
this.node(node.block);
|
||||
} else {
|
||||
this.chunk(';');
|
||||
}
|
||||
},
|
||||
walkContext: 'atrule'
|
||||
};
|
||||
if (node.block) {
|
||||
this.node(node.block);
|
||||
} else {
|
||||
this.token(Semicolon, ';');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user