22 Commits

Author SHA1 Message Date
b8f13b4ae5 chore: added remaining tasks for NPM publication to TODO 2025-12-17 15:50:57 +01:00
1aea8b0d7d test: add browser test files for all bundle formats
Phase 6 Complete:
-  Created test/umd-test.html (UMD bundle verification)
-  Created test/minified-test.html (production build test)
-  Created test/esm-test.html (ES Module format test)

Each test file demonstrates:
- Bundle loading and initialization
- marked.js peer dependency integration
- Control panels and event system
- Complete feature showcase
- Usage examples and code snippets

Tests verify all build outputs work correctly in browsers.
Open any test/*.html file in a browser to verify functionality.
2025-12-16 22:47:56 +01:00
fa9ae3b9ff build: configure npm package for publication
Phase 4-5 Complete:
-  Updated package.json to v1.0.0 with proper entry points
-  Added peer dependency on marked.js (^11.0.0 || ^12.0.0 || ^13.0.0)
-  Set module type to ESM to fix Rollup warnings
-  Configured files array for distribution (dist/ only)
-  Added prepublishOnly script (build + test)
-  Created .npmignore to exclude dev files
-  Created CHANGELOG.md following Keep a Changelog format

Package details:
- Main: dist/testdrive-jsui.cjs.js (CommonJS)
- Module: dist/testdrive-jsui.esm.js (ES Module)
- Browser: dist/testdrive-jsui.min.js (107KB minified)
- Style: dist/testdrive-jsui.css
- Total package size: 445.9 KB (13 files)

npm pack --dry-run verified successfully!
2025-12-16 22:46:31 +01:00
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
fd12bbd34a docs: add npm publication workplan and update TODO
- Created comprehensive NPM_PUBLICATION_PLAN.md with 9 phases
- Covers bundling, testing, and npm publication process
- Uses Rollup with marked.js as peer dependency
- Targets 3-5 day implementation timeline
- Updated TODO.md with current active tasks
2025-12-16 22:26:31 +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
f2d9d853d5 docs: add comprehensive feature documentation
Created feature documentation structure:

docs/features/README.md:
- Overview of all control panels
- Configuration examples
- Use case scenarios
- Feature toggle documentation

docs/features/section-editing.md:
- Complete section editing guide
- How it works (automatic detection, states, visual feedback)
- Configuration options
- Advanced features (metadata, events, section types)
- Examples and troubleshooting
- Best practices

Remaining documentation to be created:
- edit-control.md
- status-control.md
- contents-control.md
- debug-control.md
- keyboard-shortcuts.md
- themes.md

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

Co-Authored-By: Claude <noreply@anthropic.com)
2025-12-16 13:52:18 +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
7759f9e427 feat: add single-file standalone editor
Created full-editor-standalone.html that embeds all JavaScript inline.
This file can be copied anywhere and opened directly without needing
any other files or dependencies (except marked.js from CDN).

Perfect for distribution and testing.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 13:24:43 +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
b84770e2d3 feat: add standalone JavaScript proof of concept
Created examples/standalone.html demonstrating testdrive-jsui as a pure
JavaScript library that works without any backend.

Features:
- Opens directly in browser (file:// works)
- Markdown rendering using marked.js from CDN
- Save/load content to browser localStorage
- Download markdown files
- No Python/Ruby/Java required

Validates JavaScript-first architecture:
- All rendering happens in browser
- Backend adapters are truly optional
- Zero coupling to any specific backend

Added examples/README.md:
- Usage instructions (just open in browser!)
- Architecture validation notes
- Next steps for full implementation

This proves the concept that testdrive-jsui can be a standalone
JavaScript library with language adapters being optional integration
helpers, not core functionality providers.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 12:06:50 +01:00
ab4679126e docs: establish JavaScript-first architecture and refactoring plan
Clarified that testdrive-jsui is a JavaScript library with optional
backend adapters, not a Python package with JavaScript assets.

Added ARCHITECTURE.md:
- Core principle: JavaScript provides all functionality
- Python/Ruby/Java are integration adapters only
- Clear layer separation: JS library vs language adapters
- Distribution models: CDN, npm, with adapters
- Anti-patterns to avoid
- Success metrics

Added JS_FIRST_REFACTORING.md:
- Phase 1: Create standalone JavaScript bundle
- Phase 2: Refactor Python as thin adapter
- Phase 3: Build and distribution
- Concrete implementation steps with code examples
- Timeline: 2-4 days of focused work

Key Changes in Approach:
- JavaScript does ALL rendering (using marked.js)
- Backend adapters only serve assets and pass config
- No HTML generation in Python/Ruby/Java
- Library works completely standalone in browser

This establishes foundation for true language-agnostic design.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 12:04:12 +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
6a6543228a docs: add cleanup report and standalone reusability plan
Added comprehensive documentation for post-migration cleanup and future
standalone development:

- CLEANUP_REPORT.md: Identifies 6 cleanup opportunities after migration
  completion (empty dirs, legacy wrappers, relicts, documentation updates)

- STANDALONE_PLAN.md: 5-phase plan to achieve 95% standalone maturity
  (move rendering engine to capability, create examples, update docs,
  testing, PyPI distribution)

- CLAUDE.md: Updated with migration completion status

These documents provide clear roadmap for making testdrive-jsui truly
pip-installable and reusable independently from MarkiTect.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 11:10:56 +01:00
f5ce02cf8d docs: Complete Phase 4 migration documentation
Update documentation to reflect Phase 4 completion:
- Mark Phase 4 as complete in MIGRATION_STATUS.md
- Update executive summary with Phase 4 achievements
- Update CLAUDE.md migration status to reflect all phases complete
- Document removal of 29 legacy files
- Establish single source of truth: /capabilities/testdrive-jsui/js/

Phase 4 Cleanup Summary:
-  Removed /markitect/static/js/ directory (all JS files)
-  Removed /markitect/static/editor.js (unused)
-  Preserved /markitect/static/css/ (still in use)
-  Clean codebase with no duplicate JavaScript files

Migration Status: FULLY COMPLETE - All 4 phases done

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 10:26:46 +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
7ef23c2905 chore: Fixed line endings i tutorials and provided Introduction 2025-11-03 21:46:15 +01:00
03656a1f19 doc: Tutorials for new users 2025-11-03 21:36:45 +01:00
9fbd10ffbc churn: enabling deterministic install 2025-11-03 20:52:12 +01:00
63a59377b8 init: seeding the project repo 2025-11-03 20:28:51 +01:00
Coulomb Social
5d56e62051 Initial commit 2025-11-03 19:19:47 +00:00