Commit Graph

9 Commits

Author SHA1 Message Date
d08612205b Remove .claude directory from version control 2025-11-26 18:26:49 +01:00
31c757f1fe v1.1.0 - Polish and critical bug fixes
## Bug Fixes
- Fixed critical issue where clicking + on one counter would update multiple counters
- Fixed page scrolling to top when clicking counter buttons
- Fixed counter widgets causing Obsidian to crash or behave erratically
- Fixed counters not working independently in edit mode

## Improvements
- Added support for negative numbers (counters can now go below zero)
- Improved counter targeting using position-based tracking in edit mode
- Improved counter targeting using section info in reading mode
- Better event handling to prevent unwanted side effects
2025-11-26 18:21:24 +01:00
bb4a6e5d0b Fix counter to update only clicked instance
- Track each counter by its original text instead of label
- Use indexOf to find and replace specific counter occurrence
- Pass originalText to createCounterElement method
- Update both MarkdownPostProcessor and Live Preview widget
- Prevents all counters with same label from updating together

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 10:58:09 +01:00
cc9e9d4cba Add Live Preview support and reorder counter elements
- Move buttons to right side of number (number, -, +, label)
- Add CodeMirror ViewPlugin for Live Preview rendering
- Counter now works in edit mode (Live Preview)
- Create CounterWidget for editor decorations
- Use Decoration.replace to render counters in editor

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 10:42:35 +01:00
63258fa1f3 Fix counter increment logic and improve button styling
- Store currentValue in mutable variable to track state properly
- Counter now increments/decrements correctly beyond 1/-1
- Reduce button size from 24px to 16px
- Reduce font size and spacing for more compact appearance
- Improve vertical alignment with inline text
- Fix regex in updateSource to match new pattern

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 10:38:35 +01:00
99ebde08c9 Fix counter rendering in Obsidian
- Remove start-of-line anchor from regex to match anywhere in text
- Improve text node processing to handle inline counters
- Simplify markdown post processor logic
- Remove unused editor-change event handler

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 10:34:33 +01:00
5f5f2f63ba Fix TypeScript errors and build plugin
- Add proper type annotation for node variable
- Add null check in forEach callback
- Plugin now builds successfully

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 10:21:46 +01:00
ff1298c7d3 Fix counter syntax to use empty parentheses
- Change syntax from ~ (number) to ~ ( )
- Counter now starts at 0 when using empty parentheses
- Update README with correct syntax examples

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 10:18:40 +01:00
9295e8055a Initial commit: Counter plugin for Obsidian
- Add counter syntax: ~ (number) label
- Implement interactive +/- buttons
- Add CSS styling for counter UI
- Include build configuration and dependencies
2025-11-26 10:14:58 +01:00