Releases: RavenHogWarts/obsidian-ravenhogwarts-toolkit
Releases · RavenHogWarts/obsidian-ravenhogwarts-toolkit
Release list
v2.0.1
2.0.0
⚠️ 这是一个破坏性重构版本。插件几乎被完全重写,架构、工具系统、设置界面与国际化均重新设计。请仔细阅读下方说明后再升级。
💥 破坏性变更(Breaking Changes)
- 插件主类重命名:
CPlugin/AceCodeEditorPlugin→RHTPlugin,并统一主模块导出。 - 源码目录结构重组:废弃
src/components、src/core、src/lib三层,重组为src/model(管理器与接口)、src/settings(设置存储与设置页)、src/util(工具函数)、src/toolkit(各功能工具)。 tableEnhancements工具被完全移除:包括表格增强管理器、Markdown 表格解析器、公式引擎及 ag-grid 相关代码。- 设置接口变更:
IPluginSettings移至settings/IPluginSettings.ts,新增toolkit字段(Record<string, IToolSettings>);删除IToolSettings.version字段。 - 内部事件总线移除:删除自定义
EventBus,IPluginContext不再暴露emit/on/addCommand。 - 国际化调用方式变更:
t()→LL()。 - 最低 Obsidian 版本提升:
1.8.0→1.13.0。 - 赞助链接变更:微信/支付宝二维码 → Ko-fi。
🚀 新增功能(Added)
工具系统框架(核心)
- 引入全新的工具注册与管理框架,作为后续功能模块的基石:
ToolkitRegistry单例:提供工具的注册、查询(getAll)、注销与清空。BaseTool抽象类:继承 ObsidianComponent,封装初始化、加载/卸载、设置管理、启用状态与错误收集,减少各工具重复实现。@Toolkit装饰器:基于reflect-metadata,在类上声明id/name/version/description/icon元信息并自动注册到注册表。ToolkitManager:与插件生命周期深度集成,加载addChild/ 卸载removeChild,单个工具失败不中断其他工具加载。PluginContext:统一管理插件实例、设置存储与日志上下文。
文件夹脚手架(Folder Scaffolder)— 新工具
- 全新工具,支持基于模板批量生成文件夹结构。
- 提供结构树编辑器、模板编辑器、剪贴板结构导入、文件夹建议输入等组件。
文件夹模板(Folder Templates)— 大幅增强
- 重构为基于规则(Rule)的模板匹配系统:
RuleMatcher:按路径长度降序匹配,支持完全匹配、子目录匹配与根目录回退。VariableEngine+expressionEvaluator+variableContext:支持模板变量与表达式求值({{date}}、{{time}}、{{title}}等)。applyPolicy:模板应用策略。migrate:旧配置自动迁移。
- 通过
workspace.onLayoutReady延迟注册create事件,兼容 Obsidian UI 生命周期。
快速路径(Quick Path)— 增强
- 新增复制文件夹路径命令与菜单项。
- 文件菜单(
file-menu)、多选文件菜单(files-menu)、编辑器菜单(editor-menu)完整支持。 - 编辑器中可将当前文件/文件夹路径粘贴到光标处。
- 路径分隔符改为枚举(换行 / 逗号 / 分号 / 空格),新增独立设置界面(Toggle + Dropdown)。
React 化的设置界面
- 全新基于 React 19 的设置页,采用网格布局(
ObsidianSetting.Container)。 ObsidianSetting组件:将 Obsidian 原生 Setting 封装为可组合的 React 组件,支持ColorComponent、ProgressBarComponent、SearchComponent、SliderComponent、TextAreaComponent等控件及className/disabled/cta/warning/tooltip/visible等属性。- 每个工具渲染图标、版本号、描述,并提供独立「额外设置」入口。
- 新增通用设置布局组件
ToolSettingsLayout。
国际化(i18n)系统重构
- 迁移到 typesafe-i18n 库,翻译调用具备完整类型约束。
- 支持简体中文 / 繁体中文 / 英文三语。
- 统一术语:「文件夹 / 文件夾」统一改为「目录 / 目錄」。
工具函数库与 Obsidian 集成组件
Strings:字符串判空、默认值、邮箱校验、前缀匹配、安全小写转换。Objects:exists、isNullOrUndefined空值判断。processObTemplate/TemplateProcessEngine:Obsidian 模板占位符替换引擎。ObsidianAppContext+useObsidianAppHook:在 React 树中安全注入 Obsidian App 实例。MarkdownFileSuggestInput、FolderSuggestInput、FolderSuggest、FileListControl:文件 / 文件夹建议输入与选择列表控件。
测试与文档
- 新增 Jest 测试套件,覆盖
folderScaffolder(StructureBuilder、clipboardStructure)、folderTemplates(RuleMatcher、VariableEngine、applyPolicy、migrate、types)。 - 新增完整
docs/文档目录:架构、工具开发指南、设置系统、文件夹模板、国际化指南、测试指南、构建与发布。
🔄 变更(Changed)
- 构建脚本重构:CSS 改用 PostCSS + postcss-nesting 处理,支持更灵活的构建模式参数解析。
- 迁移到 pnpm workspace 管理(新增
pnpm-workspace.yaml)。 - 去除第三方依赖:
fs-extra→node:fs、builtin-modules→builtinModules、ensureDirSync→mkdirSync、dotenv→ 直接读取环境变量。 - 增强 GitHub Actions 发布工作流,添加构件证明(artifact attestations)生成。
- 启用 TypeScript 实验性装饰器与
emitDecoratorMetadata。
🐛 修复(Fixed)
- 修复文件夹模板的创建时延问题:插件加载时 vault 中已存在文件会触发批量
create事件,导致模板被误套用。改为按stat.ctime时间窗(5 秒阈值)过滤与短时去重(10 秒 TTL),并修复重命名后同名文件复用导致的漏处理问题。 - 修复
scripts/link-data.mjs中构建目标路径变量名(rootDir→projectRoot)指向错误的问题。 - 修复
EventBus导入路径大小写导致的模块解析问题。
🗑️ 移除(Removed)
- 整个
tableEnhancements工具模块(表格增强 / 公式 / ag-grid,约 −3,000 行)。 src/components、src/core、src/lib、types/types.ts等旧目录与文件。main.ts中的样板示例代码(ribbon 图标、状态栏、示例命令、模态、定时器等)。- 旧的
.eslintrc、.eslintignore、MAKEFILE、assets目录。 package-lock.json(改用pnpm-lock.yaml)。obsidian-extend.d.ts(改由obsidian-typings提供)。
📦 依赖(Dependencies)
- 新增:
react/react-dom^19.2.7、reflect-metadata^0.2.2、@tanstack/react-virtual、radix-ui、uuid。 - 开发依赖新增:
jest、ts-jest、typesafe-i18n、postcss、postcss-nesting、eslint-plugin-obsidianmd等。 - 环境要求:Node.js ≥ 22.x,Obsidian ≥ 1.13.0。
⬆️ 升级须知
- 本次为破坏性重构,升级前请务必备份配置。
- 升级到 Obsidian ≥ 1.13.0。
- 若依赖
tableEnhancements(表格增强)功能,请暂缓升级或寻找替代方案。 folderTemplates用户的旧配置会通过migrate自动迁移,建议升级后在设置页检查。- 升级后需在设置页重新启用所需工具。
Full Changelog: 1.4.1...2.0.0
1.4.1
🎉 This is a stable release
Version: 1.4.1
What's Changed
- feat(folder-templates): 添加忽略文件夹配置与判断 by @RavenHogWarts in #20
- chore: 精简构建与发布脚本配置 by @RavenHogWarts in #21
- refactor: 统一导入与整理前端数据处理函数 by @RavenHogWarts in #22
Full Changelog: 1.4.0...1.4.1
1.4.0
🎉 This is a stable release
Version: 1.4.0
English Changelog
Changes
✨ Features
中文更新日志
Changes
✨ 新功能
如何安装
- 下载
ravenhogwarts-toolkit.zip压缩文件 - 解压到你的 Obsidian 库的插件文件夹内: `/.obsidian/plugins/ravenhogwarts-toolkit/
- Reload Obsidian
- Enable ravenhogwarts-toolkit plugin in settings
1.3.2
🎉 This is a stable release
Version: 1.3.2
English Changelog
Changes
✨ Features
- 移除阅读进度工具,功能拆分至https://github.com/RavenHogWarts/obsidian-next-toc (#18) (135b224)
中文更新日志
Changes
✨ 新功能
- 移除阅读进度工具,功能拆分至https://github.com/RavenHogWarts/obsidian-next-toc (#18) (135b224)
如何安装
- 下载
ravenhogwarts-toolkit.zip压缩文件 - 解压到你的 Obsidian 库的插件文件夹内: `/.obsidian/plugins/ravenhogwarts-toolkit/
- Reload Obsidian
- Enable ravenhogwarts-toolkit plugin in settings
1.3.1
🎉 This is a stable release
Version: 1.3.1
English Changelog
Changes
🎨 Styles
- Refactor formula editor styles to improve code maintainability (b43c764)
🐛 Bug Fixes
- Fix reading progress animation and modal position issues (c7249d6)
- license: Update copyright information to RavenHogwarts (9807a0c)
中文更新日志
Changes
🎨 样式
- 重构公式编辑器样式,提升代码可维护性 (b43c764)
🐛 修复
如何安装
- 下载
ravenhogwarts-toolkit.zip压缩文件 - 解压到你的 Obsidian 库的插件文件夹内: `/.obsidian/plugins/ravenhogwarts-toolkit/
- Reload Obsidian
- Enable ravenhogwarts-toolkit plugin in settings
1.3.0
🎉 This is a stable release
Version: 1.3.0
English Changelog
Changes
♻️ Refactor
- Remove FrontMatterSorter related code (8fffe9c)
- Remove frontmatter sorting functionality and related code (2b8bd0c)
- Remove auto-update related code, simplify configuration (d039c4a)
✨ Features
- Optimize configuration merge logic, enhance toolkit configuration validation (e519426)
🐛 Bug Fixes
- i18n: Fix language setting logic and update documentation links (1f707f6)
中文更新日志
Changes
♻️ 重构
✨ 新功能
- 优化配置合并逻辑,增强toolkit配置验证 (e519426)
🐛 修复
- i18n: 修复语言设置逻辑并更新文档链接 (1f707f6)
如何安装
- 下载
ravenhogwarts-toolkit.zip压缩文件 - 解压到你的 Obsidian 库的插件文件夹内: `/.obsidian/plugins/ravenhogwarts-toolkit/
- Reload Obsidian
- Enable ravenhogwarts-toolkit plugin in settings
1.2.1
🎉 This is a stable release
Version: 1.2.1
English Changelog
Changes
🐛 Bug Fixes
- Fixed parameter name error in estimated reading time word count (cb68f13)
- Optimized table calculation service and unified floating-point precision fixes (43087b0)
中文更新日志
Changes
🐛 修复
如何安装
- 下载
ravenhogwarts-toolkit.zip压缩文件 - 解压到你的 Obsidian 库的插件文件夹内: `/.obsidian/plugins/ravenhogwarts-toolkit/
- Reload Obsidian
- Enable ravenhogwarts-toolkit plugin in settings
1.2.0
🎉 This is a stable release
Version: 1.2.0
English Changelog
Changes
♻️ Refactor
- Optimize internationalization calls and remove code editor settings component (8c019fa)
✨ Features
- i18n: Enhance translation function to support named parameter replacement (5dbc6b8)
Installation
- Download the files from the Assets section below
- Copy them to your vault's plugins folder:
<vault>/.obsidian/plugins/ravenhogwarts-toolkit/ - Reload Obsidian
- Enable plugin in settings
中文更新日志
Changes
♻️ 重构
- 优化国际化调用并移除代码编辑器设置组件 (8c019fa)
✨ 新功能
- i18n: 优化翻译函数支持命名参数替换 (5dbc6b8)
如何安装
- 下载
ravenhogwarts-toolkit.zip压缩文件 - 解压到你的 Obsidian 库的插件文件夹内: `/.obsidian/plugins/ravenhogwarts-toolkit/
- Reload Obsidian
- Enable ravenhogwarts-toolkit plugin in settings
1.1.0
🎉 This is a stable release
Version: 1.1.0
此版本更改了插件id,请备份data.json,进行插件重装
Changes
✨ New Features
- table-enhancements: implement table enhancements with AG Grid
- quick-path: 增加toolkit,快捷复制文件夹,文件路径
- quick-path: 增加命令 - 复制当前文件的路径 - 复制当前文件的父目录
- quick-path: 增加编辑器菜单 - 优化菜单显示 - 统一菜单设计
- frontmatter-sorter: 初步实现功能,设置页面待完善
- frontmatter-sorter: 功能完成,设置界面添加完成 - 增加输入组件,包含建议框 - 优化功能,增加提示
- release: 优化发布流程和文档
- manifest: add initial manifest-beta
- table-enhancements: add front matter key replacement functionality
- table-enhancements: implement formula modal for calculation management
- table-enhancements: enhance formula editor and modal for improved calculation management
- table-enhancements: expand formula functionality and improve UI components
- reading-progress: implement reading progress feature with UI components
- settings: enhance ToolkitOverview with logger integration and toolkit toggle functionality
- reading-progress: enhance reading progress feature with new UI components and functionality
- i18n: add return button translations for reading progress feature
- reading-progress: introduce reading progress feature with settings and UI enhancements
- reading-progress: enhance reading progress settings and UI
- reading-progress: add toolbar and drag functionality for TOC customization
- reading-progress: add return to bottom functionality and enhance return button UI
- reading-progress: add "Copy TOC" functionality and update styles
- reading-progress: Added horizontal padding to the ReadingProgress component to expand the touch area for better user interaction
- reading-progress: enhance tocGroup styling for improved layout and interaction
- reading-progress: refactor TOC handling and improve heading detection logic
- reading-progress: add toolbar visibility option and update localization
- i18n: enhance settings localization and structure
- settings: enhance developer settings with menu configuration
- quick-path: add file menu options for enhanced file management
- reading-progress: add heading number feature for table of contents
- reading-progress: add expand/collapse functionality to table of contents
- reading-progress: Add option to skip H1 numbering in table of contents
- updater: Add comprehensive update management system
- updater: Implement proxy-based download strategy and robust version parsing
- code-editor: Implement Monaco-powered code editor with advanced features
- code-editor: Add Monaco editor keybinding and scope management
- reading-progress: Enhance H1 handling and TOC display
- reading-progress,i18n: Enhance TOC and code editor localization
- code-editor: Add in-editor code block editing functionality
- code-editor: Add create code file option to file context menu
- code-editor: Add inline code block editing buttons and markdown post-processor
- reading-progress: Implement reading time and table of contents services
- code-editor: Enhance code block extraction with advanced parsing
- reading-progress: Enhance codeblock processing and improve TOC and reading time services
- toolkit: Add commands and menu items for reading progress and table enhancements
- reading-progress: Add customizable icon and fallback for reading time display
- frontmatter-sorter: Add folder sorting and improve batch sorting details
- icon: Add IconPicker component for flexible icon selection
- reading-progress: Enhance navigation and configuration with new interaction features
- i18n: Add new localization entries for navigation and progress buttons
- reading-progress: Add scroll to top/bottom commands with smooth scrolling
- reading-progress: Enhance heading text cleaning with comprehensive markdown parsing
- reading-progress: Add markdown rendering option for table of contents
- update-manager: Implement comprehensive update mechanism with enhanced progress tracking
- component: Add prefix support to Input component with corresponding styles
- base-manager: Add method to register ribbon icons for plugins
- code-editor: Migrate from Monaco to Ace editor and enhance snippet management
- env: Add dotenv support and create script to copy files to vault
🐛 Bug Fixes
- i18n: 翻译错误
- frontmatter-sorter: 修复配置更改后不生效的问题 - 优化notice,使用i18n
- frontmatter-sorter: 批量排序出错 - 优化精简规则
- frontmatter-sorter: 数组类型部分未保留源格式
- frontmatter: improve frontmatter parsing and writing for array types
- ReadingProgressManager: remove unnecessary logging of reading time content
- reading-progress: update return_to_cursor icons and Returns the cursor position to be displayed in the center of the page
- reading-progress: streamline TOC styles and improve rendering logic
- reading-progress: Solve primary theme button icon disappearance problem
- table-enhancement: Adapt the style of the components plugin.
- reading-progress: When the table of contents is set to fixed, documents without a table of contents still display the progress bar.
- reading-progress: Improve heading number display with dynamic visibility
- reading-progress: Add conditional rendering for table of contents
- reading-progress: Remove unnecessary justify-content CSS rule
- code-editor: Dynamically update editor theme based on Obsidian's dark/light mode when in auto theme mode
- code-editor: Normalize folder path in file creation logic
- reading-progress: Improve modal window positioning with container-type
- i18n: Normalize zh-TW language code to zh
- toolkit: Exclude obReader from toolkit initialization
- reading-progress: Adjust modal minimum height for better responsiveness
- styles: Remove max-width constraint from code block edit modal
- reading-progress: Refine TOC modal styling and transitions
- code-editor: Trim trailing newline in code block editing
- code-editor: Improve view registration and error handling
- reading-progress: Escape heading selector to prevent CSS selector parsing errors
- code-editor: Remove deprecated hover link source unregistration
- reading-progress: Enhance TOC generation with depth-aware heading numbering
- styles: Improve TOC item hover state and cursor interaction
- reading-progress: Update TOC menu icon to list-tree
- logger: Enhance notice logging and update card border style
- table-enhancements: Prevent menu item on folders in file menu
- module-config: Improve array and object handling in config updates
- update-manager: Conditionally log version check notice
- reading-progress: Improve scroll position calculation for heading detection
- update-manager: Simplify update check and performance logic
- reading-progress: Refine markdown syntax parsing in heading text cleaning
⚡ Performance
- style: 优化样式 - 增加开发者模式 - 优化logger
♻️ Refactors
- table-enhancements: 重构表格计算功能的UI交互
- release: enhance changelog generation logic in GitHub Actions
- useToolkitSettings: streamline toolkit initialization and sorting logic
- quickPath: Refactored command registration into separate methods for better organization.
- menu: simplify menu item handling and improve toolkit integration
- estimatedReadingTime: optimize reading time calculation and content cleaning
- table-enhancements: remove PERCENTAGE functionality from calculations and localization
- base-manager: streamline module management and enhance event handling
- release: add manifest preparation step for beta releases
- reading-progress: enhance reading time estimation and UI components
- reading-progress: enhance progress style configuration and UI components
- reading-progress: Enhance heading depth calculation and UI styling
- frontmatter-sorter: Improve event handling and config management
- reading-progress: Update return to cursor icon
- reading-progress: Optimize active heading detection and TOC rendering
- reading-progress: Simplify rendering and improve icon handling in reading time
- reading-progress: Modularize TOC component and extract utility functions
- reading-progress: Improve TOC link rendering and interaction
- settings: Restructure settings with new overview components and improved configuration management
- i18n: Update navigation button descriptions for English and Chinese locales
- release-workflow: Improve tag-based changelog generation for beta and stable releases
💄 Styles
- table-enhancements: 优化表格计算组件的布局和高度控制
- table: 优化表格计算组件的布局和交互
- settings: update version display and enhance localization
- reading-progress: center align reading progress container
🔧 Chores
- release: add write permissions for contents in GitHub Actions workflow
- ci: Update GitHub Actions workflow to use Node.js 18 and Yarn cache
- reading-progress: Improve active heading detection in source mode
- version: Bump beta version to 1.0.0-beta.31
- version: Bump beta version to 1.0.0-beta.32
Installation
- Download the files from the Assets section below
- Copy them to your vault's plugins folder:
<vault>/.obsidian/plugins/ravenhogwarts-toolkit/ - Reload Obsidian
- Enable plugin in settings