pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc/treemd



Module Name:    pkgsrc
Committed By:   pin
Date:           Sun Nov 23 09:12:47 UTC 2025

Modified Files:
        pkgsrc/textproc/treemd: Makefile cargo-depends.mk distinfo

Log Message:
textproc/treemd: update to 0.3.2

[0.3.2] - 2025-11-22
Fixed

    BSD and Unix Platform Support - Fixed compilation error on NetBSD and other BSD systems
        External URL opening now supports all Unix-like platforms (NetBSD, FreeBSD, OpenBSD, etc.)
        Platform detection changed from explicit Linux-only to fallback for all non-macOS/Windows systems
        All BSD variants now use xdg-open command for opening external links
        Resolves compilation error: "cannot find value open_cmd in this scope"

Technical

    Platform Detection (src/tui/app.rs:1402-1407)
        Changed from OS-specific #[cfg(target_os = "linux")] to inclusive #[cfg(not(any(target_os = "macos", target_os = "windows")))]
        macOS continues to use open command
        Windows continues to use start command
        All other Unix-like systems (Linux, *BSD, etc.) use xdg-open

Platform-Specific Notes

    BSD Systems (NetBSD, FreeBSD, OpenBSD)
        External links now open correctly in default browser
        Full compilation support without errors
        Special thanks for NetBSD testing by @0323pin

    All Platforms
        No functional changes for existing macOS, Windows, or Linux users
        More robust platform detection for edge cases

[0.3.1] - 2025-11-21
Fixed

    Theme Color Mode Application - Improved theme initialization order for more consistent color rendering
        Color mode now applied before custom colors for better accuracy
        Theme-specific 256-color variants now correctly loaded based on color mode
        Fixes color inconsistencies when using custom theme colors with 256-color fallback

Changed

    Code Formatting - Applied consistent code formatting throughout codebase
    Documentation - Enhanced README with more detailed interactive mode instructions
        Added comprehensive keyboard shortcuts for interactive mode
        Clarified table navigation and editing workflow
        Better organization of feature descriptions

Technical

    Theme Architecture (src/tui/theme.rs)
        Added from_name_256() method to load theme-specific 256-color variants
        Reordered with_color_mode() to apply before with_custom_colors()
        Each theme now has dedicated 256-color palette matching official theme colors
        Better color accuracy in 256-color terminals

    App State (src/tui/app.rs)
        Updated theme initialization: from_name() → with_color_mode() → with_custom_colors()
        Custom colors now properly respect color mode constraints
        Improved formatting consistency

[0.3.0] - 2025-11-20
Added

    Interactive Element Navigation System - Complete system for navigating and interacting with markdown elements
        Press i to enter interactive mode and navigate all interactive elements
        Interactive element types: Details blocks, Links, Checkboxes, Code blocks, Tables, and Images
        Navigate with Tab/Shift+Tab, j/k, or Up/Down arrow keys
        Auto-scroll to keep selected element in viewport
        Element-specific actions (expand details, follow links, toggle checkboxes, copy code/images)
        Visual selection indicator (→ arrow) for current element
        Status bar guidance showing available actions for each element type

    Details/Collapsible Blocks - HTML <details> element support in markdown
        <details><summary>Title</summary>Content</details> now renders as expandable sections
        Collapsible blocks with expand/collapse indicators (▼/▶)
        Nested content support within details blocks
        Toggle expansion with Enter key in interactive mode
        Automatic re-indexing when expansion state changes

    Interactive Table Editing and Navigation
        Press Enter on a table in interactive mode to enter table navigation
        Navigate cells with h/j/k/l or arrow keys
        Copy individual cell with y, entire row with Y, full table with r
        Edit cell values with Enter key - inline editor with Esc to cancel
        Cell position shown in status bar: [TABLE] Cell(row,col)
        Save edited cells directly to file with automatic reload

    Enhanced Interactive Element Interactions
        Details blocks: Press Enter to toggle expand/collapse
        Links: Press Enter to follow, works with all link types (anchors, relative files, wikilinks, external URLs)
        Checkboxes: Press Space to toggle, saves to file automatically
        Code blocks: Press y to copy code to clipboard
        Images: Press y to copy image path, i to view image info
        Full keyboard support for all interactive operations

Technical

    New Interactive Module (src/tui/interactive.rs - 614 lines)
        InteractiveState struct for managing interactive elements
        ElementId and ElementType enums for element identification
        DetailMode enum for fine-grained navigation (tables, lists)
        Element indexing from parsed blocks
        Navigation methods: next(), previous(), enter(), exit()
        Table-specific navigation: table_move_up/down/left/right()
        Cell and row retrieval: get_table_cell(), get_table_row()
        Status text generation for UI feedback

    Parser Enhancement (src/parser/content.rs)
        extract_details_blocks() for preprocessing <details> HTML
        Recursive parsing of nested content within details blocks
        Placeholder-based approach for proper block structure integration
        Block::Details variant with summary and nested blocks

    App State Integration (src/tui/app.rs)
        interactive_state: InteractiveState field
        AppMode::Interactive and AppMode::CellEdit modes
        enter_interactive_mode() - Index elements and begin navigation
        exit_interactive_mode() - Return to normal mode
        activate_interactive_element() - Dispatch to element-specific handlers
        Cell edit state: cell_edit_value, cell_edit_row, cell_edit_col
        enter_cell_edit_mode() and save_edited_cell() for table editing
        reindex_interactive_elements() after state changes
        copy_table_cell(), copy_table_row(), copy_table_markdown()
        scroll_to_interactive_element() for auto-scroll to viewport

    Event Handling (src/tui/mod.rs)
        Interactive mode key bindings: Tab, j/k, Up/Down, Enter, Space, y, Esc
        Table navigation mode: h/j/k/l, y/Y/r for copying, Enter for edit
        Cell edit mode: Character input, Backspace for delete, Enter to save, Esc to cancel
        Mode-specific status message updates
        Integration with existing help, search, and link follow modes

    Rendering Enhancement (src/tui/ui.rs)
        render_markdown_enhanced() updated for interactive elements
        Details block rendering with expand/collapse indicators
        Interactive element selection highlighting
        Table cell highlighting during edit mode
        Cell edit overlay popup
        Status text reflecting interactive mode state
        Support for rendering nested blocks within details

    File I/O for Table Editing
        replace_table_cell_in_markdown() - Find and update cells in markdown
        replace_table_cell_in_file() - Locate target table in file
        replace_cell_in_row() - Parse and modify individual cells
        Automatic document reload after table edits
        State preservation after interactive changes

Changed

    Keyboard Shortcuts - New keybinding i for interactive mode
        i - Enter interactive element navigation mode
        In interactive mode: Tab, j/k, Up/Down to navigate
        Element-specific actions: Enter, Space, y, r to interact

    App Rendering - Enhanced UI for interactive state
        Title bar, outline, content, and status all reflect interactive mode
        Selection indicators on all element types
        Table cells highlight in edit mode
        Status bar shows element-specific guidance

    Documentation Updates
        Help screen includes new interactive mode section
        Keybinding reference updated with interactive shortcuts
        Cell editing workflow documented

Platform-Specific Notes

    All Platforms
        Interactive navigation works identically across OS
        Table editing saves directly to file with cross-platform paths
        Status messages provide consistent feedback


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/textproc/treemd/Makefile \
    pkgsrc/textproc/treemd/cargo-depends.mk pkgsrc/textproc/treemd/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/treemd/Makefile
diff -u pkgsrc/textproc/treemd/Makefile:1.4 pkgsrc/textproc/treemd/Makefile:1.5
--- pkgsrc/textproc/treemd/Makefile:1.4 Tue Nov 18 13:40:18 2025
+++ pkgsrc/textproc/treemd/Makefile     Sun Nov 23 09:12:47 2025
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.4 2025/11/18 13:40:18 pin Exp $
+# $NetBSD: Makefile,v 1.5 2025/11/23 09:12:47 pin Exp $
 
-DISTNAME=      treemd-0.2.3
+DISTNAME=      treemd-0.3.2
 CATEGORIES=    textproc
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=Epistates/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -15,5 +15,7 @@ LICENSE=      mit
 RUST_REQ=      1.85.0
 USE_TOOLS+=    pkg-config
 
+DEPENDS+=      xdg-utils-[0-9]*:../../misc/xdg-utils
+
 .include "../../lang/rust/cargo.mk"
 .include "../../mk/bsd.pkg.mk"
Index: pkgsrc/textproc/treemd/cargo-depends.mk
diff -u pkgsrc/textproc/treemd/cargo-depends.mk:1.4 pkgsrc/textproc/treemd/cargo-depends.mk:1.5
--- pkgsrc/textproc/treemd/cargo-depends.mk:1.4 Tue Nov 18 13:40:18 2025
+++ pkgsrc/textproc/treemd/cargo-depends.mk     Sun Nov 23 09:12:47 2025
@@ -1,4 +1,4 @@
-# $NetBSD: cargo-depends.mk,v 1.4 2025/11/18 13:40:18 pin Exp $
+# $NetBSD: cargo-depends.mk,v 1.5 2025/11/23 09:12:47 pin Exp $
 
 CARGO_CRATE_DEPENDS+=  addr2line-0.25.1
 CARGO_CRATE_DEPENDS+=  adler2-2.0.1
Index: pkgsrc/textproc/treemd/distinfo
diff -u pkgsrc/textproc/treemd/distinfo:1.4 pkgsrc/textproc/treemd/distinfo:1.5
--- pkgsrc/textproc/treemd/distinfo:1.4 Tue Nov 18 13:40:18 2025
+++ pkgsrc/textproc/treemd/distinfo     Sun Nov 23 09:12:47 2025
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2025/11/18 13:40:18 pin Exp $
+$NetBSD: distinfo,v 1.5 2025/11/23 09:12:47 pin Exp $
 
 BLAKE2s (addr2line-0.25.1.crate) = cc5c422ec48ccef5c2c46379d2f600644609490afafea5020f2020815d1146e6
 SHA512 (addr2line-0.25.1.crate) = c400f3b6ccaff8a1c0d7d82c708a1784b8fd5ba64b6e420e85819d59b1cadb55fa59c852925093b921469f272d1d5140cf12f013ae75d1e1bc85021097df8fc2
@@ -627,9 +627,9 @@ Size (tracing-subscriber-0.3.20.crate) =
 BLAKE2s (tree_magic_mini-3.2.0.crate) = e3c62f82f8c429d5628526addb79cc9cce1ab85a82c92a54f7d2b63473d13668
 SHA512 (tree_magic_mini-3.2.0.crate) = 7151639da4a20f3e0da8059f0b6b05dbb497462ce0ca23df8b07c5e515d49dbb905371259a51f5cba634f62b1dfb9d79aa0ee212e31a74f46f30715a82ee4e8d
 Size (tree_magic_mini-3.2.0.crate) = 15962 bytes
-BLAKE2s (treemd-0.2.3.tar.gz) = 21f714c16dd2cf92c9d783ba2606e3e4ff8261e9f4e84e784feeeef5e23794a0
-SHA512 (treemd-0.2.3.tar.gz) = c4f0b192a702bf5c1847f053cc2b7f372b4f0a29be2309b32fa85543fe462e64254a8315462880cdaa83a5fea63fa7bfb7be863a7ff56e3eb2dfc6e846fdd8a6
-Size (treemd-0.2.3.tar.gz) = 1660305 bytes
+BLAKE2s (treemd-0.3.2.tar.gz) = 397166d83d7b39d07de2cd7568fe0ff8a7b2923122c8e830618f499f4b0976ac
+SHA512 (treemd-0.3.2.tar.gz) = 0ba651d61dfebd51df24290350d9db3c457eb23c608438df668483c6b800f2f1fa0c24e36b3385b2d6f33f7bb796d354fe9ea5f971596890af38a3c928c5ad37
+Size (treemd-0.3.2.tar.gz) = 329262 bytes
 BLAKE2s (unicase-2.8.1.crate) = 6a87002c4bd702bb961347b5ecac9404f9a65359b563c199608a3eaaf66195ea
 SHA512 (unicase-2.8.1.crate) = 99a3944a5c987376bdea5fe6c0797e881bc8e6f629c56120ce811c8ebbed0a3ba24617decb74d6939699c8fc994c662eb292869ab407c0ba0ec460a32ede0190
 Size (unicase-2.8.1.crate) = 24088 bytes



Home | Main Index | Thread Index | Old Index