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

69
node_modules/csso/lib/compress.js generated vendored
View File

@@ -1,17 +1,15 @@
var List = require('css-tree').List;
var clone = require('css-tree').clone;
var usageUtils = require('./usage');
var clean = require('./clean');
var replace = require('./replace');
var restructure = require('./restructure');
var walk = require('css-tree').walk;
import { List, clone, walk } from 'css-tree';
import { buildIndex } from './usage.js';
import clean from './clean/index.js';
import replace from './replace/index.js';
import restructure from './restructure/index.js';
function readChunk(children, specialComments) {
var buffer = new List();
var nonSpaceTokenInBuffer = false;
var protectedComment;
function readChunk(input, specialComments) {
const children = new List();
let nonSpaceTokenInBuffer = false;
let protectedComment;
children.nextUntil(children.head, function(node, item, list) {
input.nextUntil(input.head, (node, item, list) => {
if (node.type === 'Comment') {
if (!specialComments || node.value.charAt(0) !== '!') {
list.remove(item);
@@ -24,6 +22,7 @@ function readChunk(children, specialComments) {
list.remove(item);
protectedComment = node;
return;
}
@@ -31,7 +30,7 @@ function readChunk(children, specialComments) {
nonSpaceTokenInBuffer = true;
}
buffer.insert(list.remove(item));
children.insert(list.remove(item));
});
return {
@@ -39,15 +38,15 @@ function readChunk(children, specialComments) {
stylesheet: {
type: 'StyleSheet',
loc: null,
children: buffer
children
}
};
}
function compressChunk(ast, firstAtrulesAllowed, num, options) {
options.logger('Compress block #' + num, null, true);
options.logger(`Compress block #${num}`, null, true);
var seed = 1;
let seed = 1;
if (ast.type === 'StyleSheet') {
ast.firstAtrulesAllowed = firstAtrulesAllowed;
@@ -56,7 +55,7 @@ function compressChunk(ast, firstAtrulesAllowed, num, options) {
walk(ast, {
visit: 'Atrule',
enter: function markScopes(node) {
enter(node) {
if (node.block !== null) {
node.block.id = seed++;
}
@@ -81,7 +80,7 @@ function compressChunk(ast, firstAtrulesAllowed, num, options) {
}
function getCommentsOption(options) {
var comments = 'comments' in options ? options.comments : 'exclamation';
let comments = 'comments' in options ? options.comments : 'exclamation';
if (typeof comments === 'boolean') {
comments = comments ? 'exclamation' : false;
@@ -117,27 +116,27 @@ function wrapBlock(block) {
})
})
},
block: block
block
});
}
module.exports = function compress(ast, options) {
export default function compress(ast, options) {
ast = ast || { type: 'StyleSheet', loc: null, children: new List() };
options = options || {};
var compressOptions = {
const compressOptions = {
logger: typeof options.logger === 'function' ? options.logger : function() {},
restructuring: getRestructureOption(options),
forceMediaMerge: Boolean(options.forceMediaMerge),
usage: options.usage ? usageUtils.buildIndex(options.usage) : false
usage: options.usage ? buildIndex(options.usage) : false
};
var specialComments = getCommentsOption(options);
var firstAtrulesAllowed = true;
var input;
var output = new List();
var chunk;
var chunkNum = 1;
var chunkChildren;
const output = new List();
let specialComments = getCommentsOption(options);
let firstAtrulesAllowed = true;
let input;
let chunk;
let chunkNum = 1;
let chunkChildren;
if (options.clone) {
ast = clone(ast);
@@ -157,7 +156,7 @@ module.exports = function compress(ast, options) {
if (chunk.comment) {
// add \n before comment if there is another content in output
if (!output.isEmpty()) {
if (!output.isEmpty) {
output.insert(List.createItem({
type: 'Raw',
value: '\n'
@@ -167,7 +166,7 @@ module.exports = function compress(ast, options) {
output.insert(List.createItem(chunk.comment));
// add \n after comment if chunk is not empty
if (!chunkChildren.isEmpty()) {
if (!chunkChildren.isEmpty) {
output.insert(List.createItem({
type: 'Raw',
value: '\n'
@@ -175,8 +174,8 @@ module.exports = function compress(ast, options) {
}
}
if (firstAtrulesAllowed && !chunkChildren.isEmpty()) {
var lastRule = chunkChildren.last();
if (firstAtrulesAllowed && !chunkChildren.isEmpty) {
const lastRule = chunkChildren.last;
if (lastRule.type !== 'Atrule' ||
(lastRule.name !== 'import' && lastRule.name !== 'charset')) {
@@ -189,9 +188,9 @@ module.exports = function compress(ast, options) {
}
output.appendList(chunkChildren);
} while (!input.isEmpty());
} while (!input.isEmpty);
return {
ast: ast
ast
};
};