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:
root
2026-01-14 10:38:22 +00:00
parent bb9046af1b
commit d523f0f600
2355 changed files with 231384 additions and 32223 deletions

View File

@@ -1,68 +1,102 @@
var TYPE = require('../../tokenizer').TYPE;
import {
Comma,
EOF,
Ident,
LeftCurlyBracket,
LeftParenthesis,
Function as FunctionToken,
Semicolon
} from '../../tokenizer/index.js';
var WHITESPACE = TYPE.WhiteSpace;
var COMMENT = TYPE.Comment;
var IDENT = TYPE.Ident;
var LEFTPARENTHESIS = TYPE.LeftParenthesis;
module.exports = {
name: 'MediaQuery',
structure: {
children: [[
'Identifier',
'MediaFeature',
'WhiteSpace'
]]
},
parse: function() {
this.scanner.skipSC();
var children = this.createList();
var child = null;
var space = null;
scan:
while (!this.scanner.eof) {
switch (this.scanner.tokenType) {
case COMMENT:
this.scanner.next();
continue;
case WHITESPACE:
space = this.WhiteSpace();
continue;
case IDENT:
child = this.Identifier();
break;
case LEFTPARENTHESIS:
child = this.MediaFeature();
break;
default:
break scan;
}
if (space !== null) {
children.push(space);
space = null;
}
children.push(child);
}
if (child === null) {
this.error('Identifier or parenthesis is expected');
}
return {
type: 'MediaQuery',
loc: this.getLocationFromList(children),
children: children
};
},
generate: function(node) {
this.children(node);
}
export const name = 'MediaQuery';
export const structure = {
modifier: [String, null],
mediaType: [String, null],
condition: ['Condition', null]
};
export function parse() {
const start = this.tokenStart;
let modifier = null;
let mediaType = null;
let condition = null;
this.skipSC();
if (this.tokenType === Ident && this.lookupTypeNonSC(1) !== LeftParenthesis) {
// [ not | only ]? <media-type>
const ident = this.consume(Ident);
const identLowerCase = ident.toLowerCase();
if (identLowerCase === 'not' || identLowerCase === 'only') {
this.skipSC();
modifier = identLowerCase;
mediaType = this.consume(Ident);
} else {
mediaType = ident;
}
switch (this.lookupTypeNonSC(0)) {
case Ident: {
// and <media-condition-without-or>
this.skipSC();
this.eatIdent('and');
condition = this.Condition('media');
break;
}
case LeftCurlyBracket:
case Semicolon:
case Comma:
case EOF:
break;
default:
this.error('Identifier or parenthesis is expected');
}
} else {
switch (this.tokenType) {
case Ident:
case LeftParenthesis:
case FunctionToken: {
// <media-condition>
condition = this.Condition('media');
break;
}
case LeftCurlyBracket:
case Semicolon:
case EOF:
break;
default:
this.error('Identifier or parenthesis is expected');
}
}
return {
type: 'MediaQuery',
loc: this.getLocation(start, this.tokenStart),
modifier,
mediaType,
condition
};
}
export function generate(node) {
if (node.mediaType) {
if (node.modifier) {
this.token(Ident, node.modifier);
}
this.token(Ident, node.mediaType);
if (node.condition) {
this.token(Ident, 'and');
this.node(node.condition);
}
} else if (node.condition) {
this.node(node.condition);
}
}