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

5
node_modules/css-tree/lib/syntax/config/generator.js generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import * as node from '../node/index-generate.js';
export default {
node
};

View File

@@ -1,9 +1,10 @@
var data = require('../../../data');
import { cssWideKeywords } from '../../lexer/generic-const.js';
import definitions from '../../data.js';
import * as node from '../node/index.js';
module.exports = {
export default {
generic: true,
types: data.types,
atrules: data.atrules,
properties: data.properties,
node: require('../node')
cssWideKeywords,
...definitions,
node
};

View File

@@ -1,48 +1,4 @@
const hasOwnProperty = Object.prototype.hasOwnProperty;
const shape = {
generic: true,
types: appendOrAssign,
atrules: {
prelude: appendOrAssignOrNull,
descriptors: appendOrAssignOrNull
},
properties: appendOrAssign,
parseContext: assign,
scope: deepAssign,
atrule: ['parse'],
pseudo: ['parse'],
node: ['name', 'structure', 'parse', 'generate', 'walkContext']
};
function isObject(value) {
return value && value.constructor === Object;
}
function copy(value) {
return isObject(value)
? Object.assign({}, value)
: value;
}
function assign(dest, src) {
return Object.assign(dest, src);
}
function deepAssign(dest, src) {
for (const key in src) {
if (hasOwnProperty.call(src, key)) {
if (isObject(dest[key])) {
deepAssign(dest[key], copy(src[key]));
} else {
dest[key] = copy(src[key]);
}
}
}
return dest;
}
function append(a, b) {
function appendOrSet(a, b) {
if (typeof b === 'string' && /^\s*\|/.test(b)) {
return typeof a === 'string'
? a + b
@@ -52,89 +8,116 @@ function append(a, b) {
return b || null;
}
function appendOrAssign(a, b) {
if (typeof b === 'string') {
return append(a, b);
}
function sliceProps(obj, props) {
const result = Object.create(null);
const result = Object.assign({}, a);
for (let key in b) {
if (hasOwnProperty.call(b, key)) {
result[key] = append(hasOwnProperty.call(a, key) ? a[key] : undefined, b[key]);
for (const [key, value] of Object.entries(obj)) {
if (value) {
result[key] = {};
for (const prop of Object.keys(value)) {
if (props.includes(prop)) {
result[key][prop] = value[prop];
}
}
}
}
return result;
}
function appendOrAssignOrNull(a, b) {
const result = appendOrAssign(a, b);
export default function mix(dest, src) {
const result = { ...dest };
return !isObject(result) || Object.keys(result).length
? result
: null;
}
for (const [prop, value] of Object.entries(src)) {
switch (prop) {
case 'generic':
result[prop] = Boolean(value);
break;
function mix(dest, src, shape) {
for (const key in shape) {
if (hasOwnProperty.call(shape, key) === false) {
continue;
}
case 'cssWideKeywords':
result[prop] = dest[prop]
? [...dest[prop], ...value]
: value || [];
break;
if (shape[key] === true) {
if (key in src) {
if (hasOwnProperty.call(src, key)) {
dest[key] = copy(src[key]);
case 'units':
result[prop] = { ...dest[prop] };
for (const [name, patch] of Object.entries(value)) {
result[prop][name] = Array.isArray(patch) ? patch : [];
}
}
} else if (shape[key]) {
if (typeof shape[key] === 'function') {
const fn = shape[key];
dest[key] = fn({}, dest[key]);
dest[key] = fn(dest[key] || {}, src[key]);
} else if (isObject(shape[key])) {
const result = {};
break;
for (let name in dest[key]) {
result[name] = mix({}, dest[key][name], shape[key]);
}
case 'atrules':
result[prop] = { ...dest[prop] };
for (let name in src[key]) {
result[name] = mix(result[name] || {}, src[key][name], shape[key]);
}
for (const [name, atrule] of Object.entries(value)) {
const exists = result[prop][name] || {};
const current = result[prop][name] = {
prelude: exists.prelude || null,
descriptors: {
...exists.descriptors
}
};
dest[key] = result;
} else if (Array.isArray(shape[key])) {
const res = {};
const innerShape = shape[key].reduce(function(s, k) {
s[k] = true;
return s;
}, {});
if (!atrule) {
continue;
}
for (const [name, value] of Object.entries(dest[key] || {})) {
res[name] = {};
if (value) {
mix(res[name], value, innerShape);
current.prelude = atrule.prelude
? appendOrSet(current.prelude, atrule.prelude)
: current.prelude || null;
for (const [descriptorName, descriptorValue] of Object.entries(atrule.descriptors || {})) {
current.descriptors[descriptorName] = descriptorValue
? appendOrSet(current.descriptors[descriptorName], descriptorValue)
: null;
}
if (!Object.keys(current.descriptors).length) {
current.descriptors = null;
}
}
break;
for (const name in src[key]) {
if (hasOwnProperty.call(src[key], name)) {
if (!res[name]) {
res[name] = {};
}
if (src[key] && src[key][name]) {
mix(res[name], src[key][name], innerShape);
}
}
case 'types':
case 'properties':
result[prop] = { ...dest[prop] };
for (const [name, syntax] of Object.entries(value)) {
result[prop][name] = appendOrSet(result[prop][name], syntax);
}
break;
dest[key] = res;
}
case 'scope':
case 'features':
result[prop] = { ...dest[prop] };
for (const [name, props] of Object.entries(value)) {
result[prop][name] = { ...result[prop][name], ...props };
}
break;
case 'parseContext':
result[prop] = {
...dest[prop],
...value
};
break;
case 'atrule':
case 'pseudo':
result[prop] = {
...dest[prop],
...sliceProps(value, ['parse'])
};
break;
case 'node':
result[prop] = {
...dest[prop],
...sliceProps(value, ['name', 'structure', 'parse', 'generate', 'walkContext'])
};
break;
}
}
return dest;
}
module.exports = (dest, src) => mix(dest, src, shape);
return result;
}

View File

@@ -0,0 +1,15 @@
import { Selector } from '../scope/index.js';
import pseudo from '../pseudo/index.js';
import * as node from '../node/index-parse-selector.js';
export default {
parseContext: {
default: 'SelectorList',
selectorList: 'SelectorList',
selector: 'Selector'
},
scope: { Selector },
atrule: {},
pseudo,
node
};

View File

@@ -1,25 +1,45 @@
module.exports = {
import * as scope from '../scope/index.js';
import atrule from '../atrule/index.js';
import pseudo from '../pseudo/index.js';
import * as node from '../node/index-parse.js';
export default {
parseContext: {
default: 'StyleSheet',
stylesheet: 'StyleSheet',
atrule: 'Atrule',
atrulePrelude: function(options) {
atrulePrelude(options) {
return this.AtrulePrelude(options.atrule ? String(options.atrule) : null);
},
mediaQueryList: 'MediaQueryList',
mediaQuery: 'MediaQuery',
condition(options) {
return this.Condition(options.kind);
},
rule: 'Rule',
selectorList: 'SelectorList',
selector: 'Selector',
block: function() {
block() {
return this.Block(true);
},
declarationList: 'DeclarationList',
declaration: 'Declaration',
value: 'Value'
},
scope: require('../scope'),
atrule: require('../atrule'),
pseudo: require('../pseudo'),
node: require('../node')
features: {
supports: {
selector() {
return this.Selector();
}
},
container: {
style() {
return this.Declaration();
}
}
},
scope,
atrule,
pseudo,
node
};

View File

@@ -1,3 +1,5 @@
module.exports = {
node: require('../node')
import * as node from '../node/index.js';
export default {
node
};