From 5ko at 5ko.fr Sun Jan 19 08:12:07 2025 From: 5ko at 5ko.fr (Petko Yotov) Date: Sun, 19 Jan 2025 17:12:07 +0100 Subject: [pmwiki-announce] PmWiki 2.4.0 released Message-ID: <3e8d47414ff128ded90db96a51f5d1b9@5ko.fr> Hello. PmWiki version 2.4.0 was published today, and is available at: https://www.pmwiki.org/pub/pmwiki/pmwiki-2.4.0.tgz https://www.pmwiki.org/pub/pmwiki/pmwiki-2.4.0.zip svn://www.pmwiki.org/pmwiki/tags/latest I'm happy to announce PmWiki version 2.4.0, a milestone that also marks 185 versions in 16 years of my journey as the core developer (Petko). Fun fact: that's 20 years in octal and 10000 years in binary. ;-) To mark the occasion, some extra work seemed appropriate. I hope you will find the new production interesting and useful. Structure changes: * Added a new pub/lib directory, moving core files such as pmwiki-utils.js, pmwiki-syntax.css, pmwiki-syntax.js, and pmwiki-darktoggle.js to it. * Added pmwiki-core.css which includes core styles previously injected into $HTMLStylesFmt. This change is aimed at improving performance and supporting stricter Content-Security-Policy. The styles include support for both light and dark themes and responsive layouts, with easier customization options. * Added pmwiki-lib.js, a new core JavaScript library for DOM manipulation, asynchronous operations, preference storage, and reporting. These functions can also be used by recipes. * Added $HTMLHeader1Fmt for insertion right after the
tag to facilitate early loading of scripts and styles, improving features like dark mode and easing core style overrides by skins. JavaScript and CSS updates: * Refactored the InsertWikiPageCSS() function. Added $WikiPageInlineCSS (default enabled); if set to 0, local styles will be served as a separate browser request ($PageUrl?action=pagecss), aligning with the stricter Content-Security-Policy. Form and textarea enhancements: * The edit form "Preview" button no longer requires validation. * Improved $EnableMergeLastMinorEdit behavior. * If $EnableEditAutoText is set to 2, any textarea with the autotext class will enable Cookbook:EditHelp. New shortcuts for line swapping (Alt+ArrowUp and Alt+ArrowDown) have been added. * Introduced $EditAutoBrackets to automatically insert closing characters in autotext textareas. If text is selected, typing an opening character will wrap the selection with matching characters. * If $EnablePmSyntax is set to 2, any textarea with the class pmsyntax will enable Cookbook:PmSyntax. The F8 key can now toggle syntax highlighting. * Added the (:input range:) element to forms. * Added support for data-labelvalue="1" attribute in form input elements color and range to display their values. (:input color c1 #ff4500 data-labelvalue=1:) (:input range r1 10 min=0 max=30 data-labelvalue=1:) New variables and enhancements: * Added $EnableUploadTargets and $UploadTargets to track files attached to a page. * Introduced $RehashedPassword, which contains a new hash when a user logs in with an outdated password hash, allowing add-ons to update the password hash. * Added $PagePathResolveFmt, if enabled, will resolve the current page name instead of $PagePathFmt. This is useful for wikis where both Main.Name and Name.HomePage (or Name.Name) exist, allowing the Name group to open instead of Main.Name. Table of contents updates: * The Table of Contents now uses