Implement BEM-style enum naming and fetch() anti-aliasing policy

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-12-26 02:17:31 +00:00
parent a289eecf0f
commit 7d379b2402
50 changed files with 1041 additions and 577 deletions

View File

@@ -4698,13 +4698,16 @@ function init_jquery_plugin(jQuery) {
catch (error) {
console.warn('[JQHTML] Error stopping existing component during replacement:', error);
}
// Remove component classes (any class starting with capital letter)
// Remove component classes (any class starting with capital letter, except BEM classes)
const classes = element.attr('class');
if (classes) {
const classList = classes.split(/\s+/);
const nonComponentClasses = classList.filter((cls) => {
// Keep class if it doesn't start with capital letter
return !cls || cls[0] !== cls[0].toUpperCase() || cls[0] === cls[0].toLowerCase();
// Keep class if:
// 1. It's empty
// 2. It doesn't start with a capital letter
// 3. It's a BEM-style class (contains __) - these persist across reinitialization
return !cls || cls[0] !== cls[0].toUpperCase() || cls[0] === cls[0].toLowerCase() || cls.includes('__');
});
element.attr('class', nonComponentClasses.join(' '));
}
@@ -4981,7 +4984,7 @@ function init(jQuery) {
}
}
// Version - will be replaced during build with actual version from package.json
const version = '2.3.30';
const version = '2.3.31';
// Default export with all functionality
const jqhtml = {
// Core

File diff suppressed because one or more lines are too long

View File

@@ -4694,13 +4694,16 @@ function init_jquery_plugin(jQuery) {
catch (error) {
console.warn('[JQHTML] Error stopping existing component during replacement:', error);
}
// Remove component classes (any class starting with capital letter)
// Remove component classes (any class starting with capital letter, except BEM classes)
const classes = element.attr('class');
if (classes) {
const classList = classes.split(/\s+/);
const nonComponentClasses = classList.filter((cls) => {
// Keep class if it doesn't start with capital letter
return !cls || cls[0] !== cls[0].toUpperCase() || cls[0] === cls[0].toLowerCase();
// Keep class if:
// 1. It's empty
// 2. It doesn't start with a capital letter
// 3. It's a BEM-style class (contains __) - these persist across reinitialization
return !cls || cls[0] !== cls[0].toUpperCase() || cls[0] === cls[0].toLowerCase() || cls.includes('__');
});
element.attr('class', nonComponentClasses.join(' '));
}
@@ -4977,7 +4980,7 @@ function init(jQuery) {
}
}
// Version - will be replaced during build with actual version from package.json
const version = '2.3.30';
const version = '2.3.31';
// Default export with all functionality
const jqhtml = {
// Core

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
/**
* JQHTML Core v2.3.30
* JQHTML Core v2.3.31
* (c) 2025 JQHTML Team
* Released under the MIT License
*/
@@ -4699,13 +4699,16 @@ function init_jquery_plugin(jQuery) {
catch (error) {
console.warn('[JQHTML] Error stopping existing component during replacement:', error);
}
// Remove component classes (any class starting with capital letter)
// Remove component classes (any class starting with capital letter, except BEM classes)
const classes = element.attr('class');
if (classes) {
const classList = classes.split(/\s+/);
const nonComponentClasses = classList.filter((cls) => {
// Keep class if it doesn't start with capital letter
return !cls || cls[0] !== cls[0].toUpperCase() || cls[0] === cls[0].toLowerCase();
// Keep class if:
// 1. It's empty
// 2. It doesn't start with a capital letter
// 3. It's a BEM-style class (contains __) - these persist across reinitialization
return !cls || cls[0] !== cls[0].toUpperCase() || cls[0] === cls[0].toLowerCase() || cls.includes('__');
});
element.attr('class', nonComponentClasses.join(' '));
}
@@ -4982,7 +4985,7 @@ function init(jQuery) {
}
}
// Version - will be replaced during build with actual version from package.json
const version = '2.3.30';
const version = '2.3.31';
// Default export with all functionality
const jqhtml = {
// Core

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"version":3,"file":"jquery-plugin.d.ts","sourceRoot":"","sources":["../src/jquery-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAQpE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd;;WAEG;QACH,SAAS,IAAI,gBAAgB,GAAG,IAAI,CAAC;QACrC,SAAS,CAAC,cAAc,EAAE,oBAAoB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAC9F,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAE/E;;;;;;;WAOG;QACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;KACvC;CACF;AAGD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CA0apD"}
{"version":3,"file":"jquery-plugin.d.ts","sourceRoot":"","sources":["../src/jquery-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAQpE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd;;WAEG;QACH,SAAS,IAAI,gBAAgB,GAAG,IAAI,CAAC;QACrC,SAAS,CAAC,cAAc,EAAE,oBAAoB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAC9F,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAE/E;;;;;;;WAOG;QACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;KACvC;CACF;AAGD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CA6apD"}

View File

@@ -1,6 +1,6 @@
{
"name": "@jqhtml/core",
"version": "2.3.30",
"version": "2.3.31",
"description": "Core runtime library for JQHTML",
"type": "module",
"main": "./dist/index.js",