Commit Graph

7 Commits

Author SHA1 Message Date
a7856f4b20 build: implement bundling system with Rollup
Phase 1-3 Complete:
-  Installed Rollup with all required plugins
-  Created rollup.config.js for UMD, ESM, CJS builds
-  Created src/index.js entry point
-  Created src/styles.css for CSS bundling
-  Added ES6 exports to debug-system.js
-  Excluded Node.js-only html-generator.js from bundle

Build outputs:
- dist/testdrive-jsui.js (217KB UMD)
- dist/testdrive-jsui.min.js (107KB minified!)
- dist/testdrive-jsui.esm.js (199KB ES Module)
- dist/testdrive-jsui.cjs.js (199KB CommonJS)
- dist/testdrive-jsui.css (minified, all styles inlined)

All builds include source maps for debugging.
2025-12-16 22:42:37 +01:00
66cbd5c3d8 docs: comprehensive feature documentation and HTML generation system
Added complete documentation for all TestDrive-JSUI controls and features,
plus flexible HTML generation system supporting standalone and external modes.

Documentation (8 files, 3,533 lines):
- docs/features/README.md: Central hub with overview, config, examples
- docs/features/section-editing.md: Section editing guide
- docs/features/edit-control.md: Document actions and editing tools
- docs/features/status-control.md: Real-time statistics and tracking
- docs/features/contents-control.md: Table of contents navigation
- docs/features/debug-control.md: Development and debugging tools
- docs/features/keyboard-shortcuts.md: Complete shortcuts reference
- docs/features/themes.md: Visual theming and customization

HTML Generation System (3 files, 1,104 lines):
- js/utils/html-generator.js: Dual-mode HTML generator class
  * Standalone mode: All CSS/JS embedded inline
  * External mode: References _jsui/ directory
  * Configurable options for title, content, controls, theme
  * Download and save functionality

- _jsui/ directory: External resources structure
  * README.md: Comprehensive usage guide
  * css/: Symlinked CSS files (base, editor, controls, themes)
  * js/: Symlinked JavaScript files (core, components, controls)
  * Enables smaller HTML files with browser caching

- examples/html-generator-demo.html: Interactive demo
  * Web-based configuration form
  * Side-by-side mode comparison
  * Live generation and preview
  * Download and copy functionality

Key Features:
- 4,637 total lines of documentation and code
- All controls documented with examples and troubleshooting
- Flexible deployment options (standalone vs external)
- Developer-friendly structure with clear guides
- Production-ready system

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 14:31:56 +01:00
177d5cdf69 feat: integrate advanced control panels with feature toggles
Added feature toggle system to TestDriveJSUI library:

Integration:
- Added control configuration (editControl, statusControl, contentsControl, debugControl)
- Added compass positioning configuration (nw, ne, e, se, s, sw, w)
- Implemented initializeAdvancedControls() method
- Updated destroy() to clean up all control panels
- Maintained backward compatibility with simple controls

Configuration:
- controls.editControl (default: true)
- controls.statusControl (default: true)
- controls.contentsControl (default: true)
- controls.debugControl (default: false)
- controls.simpleControls (default: false) - legacy mode

Usage:
new TestDriveJSUI({
    container: '#editor',
    controls: {
        editControl: true,
        statusControl: false,
        contentsControl: true
    }
});

This integrates the existing advanced control system (ControlBase, EditControl,
StatusControl, ContentsControl, DebugControl) into the new library API.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 13:50:31 +01:00
796c04709a feat: implement JavaScript-first TestDriveJSUI library (v1.0.0)
Completed Phase 1 refactoring to JavaScript-first architecture:

Core Library Implementation:
- Created js/testdrive-jsui.js main library class
- Integrated all existing components (SectionManager, DOMRenderer, DocumentControls)
- Added marked.js integration for markdown rendering
- Implemented event-driven API (on/off/emit)
- Support for edit/view modes and themes
- LocalStorage save/load functionality
- Download as markdown file
- Keyboard shortcuts (Ctrl+S, Escape)
- Auto-save capability (optional)

Examples:
- examples/full-editor.html - Complete demo with all features
- Updated examples/README.md with full documentation

Documentation:
- Updated README.md with JavaScript-first architecture section
- Added complete API reference (constructor, methods, events)
- Updated CLAUDE.md with library quick start and API
- Emphasized JavaScript-first design principles

Architecture:
- JavaScript provides ALL functionality
- Language adapters are optional integration helpers
- Works standalone in browser (no backend required)
- Clean separation: JS (functionality) vs Adapters (integration)

This completes the architectural shift documented in ARCHITECTURE.md
and JS_FIRST_REFACTORING.md Phase 1.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 12:14:58 +01:00
1fe4b6b9fa refactor: complete post-migration cleanup
Implemented all cleanup items from CLEANUP_REPORT.md:

Legacy Code Removal:
- Removed document-controls-legacy.js wrapper
- Updated 4 test files to use DocumentControls directly
- Updated scripts/list_components.py acronym mappings
- Updated tests/test_component_listing.py expectations

Archive and Organization:
- Moved relicts/ to docs/prototypes/ with README explaining history
- Moved MIGRATION_STATUS.md to docs/migration/
- Removed IMPLEMENTATION_NOTES.md legacy references

Test Verification:
- All 68 JavaScript tests passing (Jest)
- All 3 Python component tests passing
- No breaking changes to functionality

The codebase is now cleaner with no legacy wrappers or empty
directories. Migration is complete and documented.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 11:43:42 +01:00
891d785533 Complete Phase 1 & 3: TestDrive-JSUI capability migration
Phase 1 - File Migration:
- Copy missing files to capability (document-controls.js, test-document-navigator.js)
- Create legacy compatibility wrapper (document-controls-legacy.js)
- Install jest-environment-jsdom dependency
- All 84 automated tests passing (68 JS + 15 Python + 1 fixes)

Phase 3 - Template Updates:
- Update MIGRATION_STATUS.md with Phase 3 completion status
- Update CLAUDE.md with migration completion details
- Document verification results for both view and edit modes

Migration Status:
- All 24 original JavaScript files now in capability 
- File verification: 20 identical, 4 intentionally different 
- Test coverage: 59.11% (exceeds 58% requirement) 
- Ready for Phase 4 cleanup after verification period

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 10:19:56 +01:00
9d7964f9e5 feat: add refactored testdrive-jsui capability with consolidated architecture
Complete integration of refactored testdrive-jsui capability:

## Refactored Architecture
- js/ - All JavaScript source (controls, components, core)
- static/ - CSS, images, templates
- src/testdrive_jsui/ - Python package
- tests/ - Python tests

## Plugin Self-Declaration
- get_plugin_source_dir() - plugin declares own location
- get_asset_paths() - organized asset paths
- No hardcoded discovery logic

## Merged Content
- Baseline UI scaffold (tutorials, LICENSE, INTRODUCTION.md)
- Refactored capability implementation
- Comprehensive documentation

Ready for standalone use or integration with markitect.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 00:01:58 +01:00