feat: Implement complete style detection and preservation foundation

- Add StyleDetectionEngine with one-layer-deep nested element analysis
- Add HTMLPreservationEngine for direct HTML manipulation without lossy conversion
- Implement structure-preserving content parsing that maintains element positions
- Add multi-property element support for links (href + content), images (src + alt), buttons
- Create comprehensive test suite with real DOM element validation
- Replace markdown-based system foundation with HTML-first architecture
- Preserve all element attributes (classes, IDs, data-*, aria-*) during editing
- Generate human-readable style names from detected nested elements
- Support template extraction with multiple insertion points for complex elements

Foundation complete for Phase 2 style-aware editor interface per CLASSES.md specification.
This commit is contained in:
2025-09-19 19:33:56 +02:00
parent 968e64a57e
commit 67f9f242b5
6 changed files with 2032 additions and 3 deletions

View File

@@ -11,7 +11,8 @@ export default [
output: {
file: 'dist/insertr.js',
format: 'iife',
name: 'Insertr'
name: 'Insertr',
exports: 'default'
},
plugins: [
nodeResolve()
@@ -23,11 +24,12 @@ export default [
output: {
file: 'dist/insertr.min.js',
format: 'iife',
name: 'Insertr'
name: 'Insertr',
exports: 'default'
},
plugins: [
nodeResolve(),
terser()
]
}
];
];