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:
59
node_modules/csso/lib/restructure/utils.js
generated
vendored
59
node_modules/csso/lib/restructure/utils.js
generated
vendored
@@ -1,8 +1,8 @@
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
const { hasOwnProperty } = Object.prototype;
|
||||
|
||||
function isEqualSelectors(a, b) {
|
||||
var cursor1 = a.head;
|
||||
var cursor2 = b.head;
|
||||
export function isEqualSelectors(a, b) {
|
||||
let cursor1 = a.head;
|
||||
let cursor2 = b.head;
|
||||
|
||||
while (cursor1 !== null && cursor2 !== null && cursor1.data.id === cursor2.data.id) {
|
||||
cursor1 = cursor1.next;
|
||||
@@ -12,9 +12,9 @@ function isEqualSelectors(a, b) {
|
||||
return cursor1 === null && cursor2 === null;
|
||||
}
|
||||
|
||||
function isEqualDeclarations(a, b) {
|
||||
var cursor1 = a.head;
|
||||
var cursor2 = b.head;
|
||||
export function isEqualDeclarations(a, b) {
|
||||
let cursor1 = a.head;
|
||||
let cursor2 = b.head;
|
||||
|
||||
while (cursor1 !== null && cursor2 !== null && cursor1.data.id === cursor2.data.id) {
|
||||
cursor1 = cursor1.next;
|
||||
@@ -24,23 +24,23 @@ function isEqualDeclarations(a, b) {
|
||||
return cursor1 === null && cursor2 === null;
|
||||
}
|
||||
|
||||
function compareDeclarations(declarations1, declarations2) {
|
||||
var result = {
|
||||
export function compareDeclarations(declarations1, declarations2) {
|
||||
const result = {
|
||||
eq: [],
|
||||
ne1: [],
|
||||
ne2: [],
|
||||
ne2overrided: []
|
||||
};
|
||||
|
||||
var fingerprints = Object.create(null);
|
||||
var declarations2hash = Object.create(null);
|
||||
const fingerprints = Object.create(null);
|
||||
const declarations2hash = Object.create(null);
|
||||
|
||||
for (var cursor = declarations2.head; cursor; cursor = cursor.next) {
|
||||
for (let cursor = declarations2.head; cursor; cursor = cursor.next) {
|
||||
declarations2hash[cursor.data.id] = true;
|
||||
}
|
||||
|
||||
for (var cursor = declarations1.head; cursor; cursor = cursor.next) {
|
||||
var data = cursor.data;
|
||||
for (let cursor = declarations1.head; cursor; cursor = cursor.next) {
|
||||
const data = cursor.data;
|
||||
|
||||
if (data.fingerprint) {
|
||||
fingerprints[data.fingerprint] = data.important;
|
||||
@@ -54,8 +54,8 @@ function compareDeclarations(declarations1, declarations2) {
|
||||
}
|
||||
}
|
||||
|
||||
for (var cursor = declarations2.head; cursor; cursor = cursor.next) {
|
||||
var data = cursor.data;
|
||||
for (let cursor = declarations2.head; cursor; cursor = cursor.next) {
|
||||
const data = cursor.data;
|
||||
|
||||
if (declarations2hash[data.id]) {
|
||||
// when declarations1 has an overriding declaration, this is not a difference
|
||||
@@ -72,13 +72,13 @@ function compareDeclarations(declarations1, declarations2) {
|
||||
return result;
|
||||
}
|
||||
|
||||
function addSelectors(dest, source) {
|
||||
source.each(function(sourceData) {
|
||||
var newStr = sourceData.id;
|
||||
var cursor = dest.head;
|
||||
export function addSelectors(dest, source) {
|
||||
source.forEach((sourceData) => {
|
||||
const newStr = sourceData.id;
|
||||
let cursor = dest.head;
|
||||
|
||||
while (cursor) {
|
||||
var nextStr = cursor.data.id;
|
||||
const nextStr = cursor.data.id;
|
||||
|
||||
if (nextStr === newStr) {
|
||||
return;
|
||||
@@ -98,11 +98,11 @@ function addSelectors(dest, source) {
|
||||
}
|
||||
|
||||
// check if simpleselectors has no equal specificity and element selector
|
||||
function hasSimilarSelectors(selectors1, selectors2) {
|
||||
var cursor1 = selectors1.head;
|
||||
export function hasSimilarSelectors(selectors1, selectors2) {
|
||||
let cursor1 = selectors1.head;
|
||||
|
||||
while (cursor1 !== null) {
|
||||
var cursor2 = selectors2.head;
|
||||
let cursor2 = selectors2.head;
|
||||
|
||||
while (cursor2 !== null) {
|
||||
if (cursor1.data.compareMarker === cursor2.data.compareMarker) {
|
||||
@@ -119,7 +119,7 @@ function hasSimilarSelectors(selectors1, selectors2) {
|
||||
}
|
||||
|
||||
// test node can't to be skipped
|
||||
function unsafeToSkipNode(node) {
|
||||
export function unsafeToSkipNode(node) {
|
||||
switch (node.type) {
|
||||
case 'Rule':
|
||||
// unsafe skip ruleset with selector similarities
|
||||
@@ -140,12 +140,3 @@ function unsafeToSkipNode(node) {
|
||||
// unsafe by default
|
||||
return true;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isEqualSelectors: isEqualSelectors,
|
||||
isEqualDeclarations: isEqualDeclarations,
|
||||
compareDeclarations: compareDeclarations,
|
||||
addSelectors: addSelectors,
|
||||
hasSimilarSelectors: hasSimilarSelectors,
|
||||
unsafeToSkipNode: unsafeToSkipNode
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user