feat: deploy enhanced ControlBase to MarkiTect md-render --edit

Successfully integrate improved TestDrive-JSUI controls with main MarkiTect system:

## Enhanced Control System
- Updated ControlBase with 5 advanced behaviors from reference implementation
- All controls now support icon-only collapsed state, drag/resize, position restoration
- Seamless integration with md-render --edit command

## Updated Components
- DebugControl: Enhanced with new ControlBase inheritance
- EditControl: Full document editing tools with export/formatting
- StatusControl: Real-time document statistics and metrics
- ContentsControl: Interactive table of contents navigation

## Deployment Integration
- All enhanced controls deployed via asset system
- Compatible with existing edit mode functionality
- Maintains backward compatibility with legacy systems

## Verification
- Successfully renders interactive HTML with md-render --edit
- All control behaviors working in production environment
- Asset deployment system properly handles enhanced controls

The enhanced control system is now live and functional in MarkiTect's editing environment.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-14 11:35:47 +01:00
parent 4262310302
commit 5b13c00d3e
5 changed files with 1678 additions and 1148 deletions

View File

@@ -3,10 +3,10 @@
* Implements the Robustness Principle with Fail Fast mode support
*/
class DebugControl {
class DebugControl extends ControlBase {
constructor() {
this.control = Object.create(Control);
this.control.config = {
super();
this.config = {
icon: '🪲',
title: 'Debug',
className: 'debug-control',
@@ -15,9 +15,13 @@ class DebugControl {
position: 'w'
};
// Bind methods to control
this.control.buildContent = () => {
const content = this.control.element.querySelector('.control-content');
// Store messages for debug display
this.messages = [];
}
buildContent() {
const content = this.element?.querySelector('.control-content');
if (content) {
const messages = window.MarkitectDebugSystem ?
window.MarkitectDebugSystem.getMessages() : [];
@@ -41,22 +45,7 @@ class DebugControl {
</button>
</div>
`;
this.control.isExpanded = true;
};
this.control.toggle = () => {
if (this.control.isExpanded) {
this.control.element.querySelector('.control-content').style.display = 'none';
this.control.isExpanded = false;
} else {
this.control.buildContent();
this.control.element.querySelector('.control-content').style.display = 'block';
}
};
}
createControl() {
return this.control.createControl();
}
}
}