Plugin Directory

Changeset 3435896


Ignore:
Timestamp:
01/09/2026 12:30:59 PM (3 months ago)
Author:
noricku
Message:

Deploy version 1.11.0

  • Updated to version 1.11.0
  • Package created via automated build process
  • Validated package contents and size

🤖 Automated deployment via wporg-deploy.sh

Location:
markdown-renderer-for-github/trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • markdown-renderer-for-github/trunk/assets/css/mermaid-zoom-modal.css

    r3428419 r3435896  
    188188    max-width: none !important;
    189189    max-height: none !important;
    190     width: auto !important;
    191     height: auto !important;
    192190    cursor: default;
     191    background: #fff;
     192    border-radius: 4px;
     193    padding: 16px;
    193194}
    194195
     
    417418    }
    418419}
     420
     421/* Clickable diagram indicator - single source of truth for cursor */
     422.gfmr-mermaid-container[role="button"] {
     423    cursor: zoom-in;
     424    transition: opacity 0.2s ease;
     425}
     426
     427.gfmr-mermaid-container[role="button"]:hover {
     428    opacity: 0.9;
     429}
     430
     431.gfmr-mermaid-container[role="button"]:focus {
     432    outline: 2px solid var(--gfmr-primary-color, #0969da);
     433    outline-offset: 2px;
     434    border-radius: 4px;
     435}
     436
     437.gfmr-mermaid-container[role="button"]:focus:not(:focus-visible) {
     438    outline: none;
     439}
  • markdown-renderer-for-github/trunk/assets/js/gfmr-main.js

    r3435320 r3435896  
    772772    },
    773773
     774    /**
     775     * Add lightbox trigger to Mermaid diagram container
     776     * @param {HTMLElement} container - Outer container
     777     * @param {HTMLElement} innerContainer - Inner container with SVG
     778     */
     779    addLightboxTrigger(container, innerContainer) {
     780      // Set ARIA attributes (cursor style is defined in CSS)
     781      container.setAttribute('role', 'button');
     782      container.setAttribute('tabindex', '0');
     783      container.setAttribute('aria-label', 'Click to expand diagram');
     784      container.setAttribute('aria-haspopup', 'dialog');
     785      container.setAttribute('aria-expanded', 'false');
     786
     787      let touchEndTime = 0;
     788
     789      const openLightbox = () => {
     790        if (window.wpGfm?.lightbox) {
     791          window.wpGfm.lightbox.open(innerContainer);
     792        }
     793      };
     794
     795      // Record touch end time
     796      container.addEventListener('touchend', () => {
     797        touchEndTime = Date.now();
     798      });
     799
     800      // Click handler (ignore clicks immediately after touch)
     801      container.addEventListener('click', (e) => {
     802        if (Date.now() - touchEndTime < 300) return;
     803        if (e.target.closest('.gfmr-copy-button')) return;
     804        openLightbox();
     805      });
     806
     807      // Keyboard accessibility
     808      container.addEventListener('keydown', (e) => {
     809        if (e.key === 'Enter' || e.key === ' ') {
     810          e.preventDefault();
     811          openLightbox();
     812        }
     813      });
     814    },
     815
    774816    // Language detection - delegate to external module
    775817    detectLanguage(element) {
     
    12811323            this.addCopyButton(innerContainer, content, "mermaid");
    12821324
     1325            // Add click-to-expand functionality
     1326            this.addLightboxTrigger(outerContainer, innerContainer);
     1327
    12831328            console.log(
    12841329              "[WP GFM v2 Hotfix] Mermaid processing completed with dual-container centering",
  • markdown-renderer-for-github/trunk/changelog.txt

    r3435379 r3435896  
    77
    88## [Unreleased]
     9
     10## [1.11.0] - 2026-01-09
     11### Added
     12- Add -y/--yes flag for non-interactive deployment
     13- Add Mermaid diagram lightbox with zoom and pan
     14### Documentation
     15- Add deployment best practices and troubleshooting
     16
     17## [1.10.3] - 2026-01-09
     18### Fixed
     19- Fix undefined GFMR_PLUGIN_DIR constant causing production failure
     20- Include production vendor dependencies in release package
     21- Add GFMR_PATH to PHPStan baseline
     22- Remove duplicate changelog entries
     23### Documentation
     24- Add v1.10.1 changelog entries
     25- Update v1.10.2 changelog
    926
    1027## [1.10.2] - 2026-01-09
  • markdown-renderer-for-github/trunk/includes/class-gfmr-asset-manager.php

    r3435320 r3435896  
    4848            true
    4949        );
     50
     51        // Mermaid Lightbox module - conditional loading
     52        if ( $this->may_have_mermaid_content() ) {
     53            wp_enqueue_script(
     54                'gfmr-mermaid-lightbox',
     55                $plugin_url . 'assets/js/gfmr-mermaid-lightbox.js',
     56                array( 'gfmr-main' ),
     57                $cache_buster,
     58                true
     59            );
     60        }
    5061
    5162        // Preload critical libraries to reduce FOUC
     
    263274
    264275    /**
     276     * Check if content may contain Mermaid diagrams
     277     *
     278     * @return bool Possibility of Mermaid diagrams existing
     279     */
     280    public function may_have_mermaid_content() {
     281        global $post;
     282
     283        if ( ! $post ) {
     284            return false;
     285        }
     286
     287        $content = $post->post_content;
     288
     289        // Check Mermaid code block notation
     290        if ( preg_match( '/```mermaid/i', $content ) ) {
     291            return true;
     292        }
     293
     294        // Check Mermaid class in HTML
     295        if ( strpos( $content, 'language-mermaid' ) !== false ) {
     296            return true;
     297        }
     298
     299        // Check Mermaid diagram types
     300        $mermaid_types = array( 'flowchart', 'sequenceDiagram', 'classDiagram', 'stateDiagram', 'erDiagram', 'gantt', 'pie', 'gitGraph', 'journey' );
     301        foreach ( $mermaid_types as $type ) {
     302            if ( strpos( $content, $type ) !== false ) {
     303                return true;
     304            }
     305        }
     306
     307        return false;
     308    }
     309
     310    /**
    265311     * Preload critical libraries to reduce FOUC
    266312     *
  • markdown-renderer-for-github/trunk/markdown-renderer-for-github.php

    r3435379 r3435896  
    44 * Plugin URI:        https://github.com/wakalab/markdown-renderer-for-github
    55 * Description:       Renders GFM (GitHub Flavored Markdown) content beautifully on the front end using JavaScript libraries. It supports syntax highlighting for code blocks and diagram rendering with Mermaid.js.
    6  * Version:           1.10.2
     6 * Version:           1.11.0
    77 * Requires at least: 6.0
    88 * Requires PHP:      8.1
  • markdown-renderer-for-github/trunk/readme.txt

    r3435379 r3435896  
    66Tested up to: 6.9
    77Requires PHP: 8.1
    8 Stable tag: 1.10.2
     8Stable tag: 1.11.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    127127== Changelog ==
    128128
    129 = 1.10.1 =
     129= 1.11.0 =
     130* Add -y/--yes flag for non-interactive deployment
     131* Add Mermaid diagram lightbox with zoom and pan
     132* Add deployment best practices and troubleshooting
     133
     134= 1.10.3 =
     135* Fix undefined GFMR_PLUGIN_DIR constant causing production failure
     136* Include production vendor dependencies in release package
     137* Add GFMR_PATH to PHPStan baseline
     138* Remove duplicate changelog entries
     139* Add v1.10.1 changelog entries
     140* Update v1.10.2 changelog
     141
     142= 1.10.2 =
    130143* Fix undefined GFMR_PLUGIN_DIR constant causing production failure
    131144* Include production vendor dependencies (highlight.php) in release package
     145* Add GFMR_PATH to PHPStan baseline
    132146
    133147= 1.10.0 =
     
    205219* Stabilize Mermaid/Shiki rendering in editor preview
    206220* Clean up security audit temporary result files
    207 
    208 = 1.7.0 =
    209 * Add commit-language setting for English commit messages
    210 * Add i18n workflow for translate.wordpress.org
    211 * Fix Mermaid User Journey diagram not rendering in editor
    212 * WordPress 6.8+ iframe compatibility and CI optimization
    213 * Update readme.txt and changelog for WordPress.org i18n
    214 
    215 = 1.6.0 =
    216 * Convert Japanese comments to English for WordPress.org compliance
    217221
    218222== Upgrade Notice ==
Note: See TracChangeset for help on using the changeset viewer.