@ash-qw/dsh-theme-prts 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # 变更记录
2
2
 
3
+ ## 2.5.0 - 2026-10-25
4
+
5
+ 以下为相对 `v2.4.0` 的变化:
6
+
7
+ - 主题文件读取、导出、导入及恢复新增阶段进度与取消操作。取消导入或恢复时,等待当前写入确认后尝试回退素材;最终保存与回退期间不可取消,回退失败时保留错误提示与备份恢复路径。
8
+ - 背景、头像和徽记图片、徽记素材包及主题文件支持拖拽添加,沿用原有文件校验。替换已有背景时,使用展示新旧图片的主题确认弹窗,支持取消和 Esc 关闭。
9
+ - 优化导入导出弹窗:移除导出按钮常驻选中外观,调整两个分块的悬停效果,并在选择文件、等待确认和处理期间保持对应分块高亮。
10
+ - 会话正文中的操作按钮、文件卡片、加载更早按钮、输入框按钮及主题导入导出按钮新增四角悬停与聚焦效果,支持淡入展开、移开淡出及按下锁定;四角尺寸随目标大小调整。工作区与会话卡片的操作按钮保留原有表现。
11
+ - 四角效果复用单个标记层,缓存目标尺寸,动画结束后停止逐帧更新;修复反复移入移出后的延迟、展开或松开后的二次偏移,并在页面失焦或隐藏时停止动画。
12
+ - 原生菜单选项保留宿主悬停与键盘聚焦背景,修复权限菜单与模型菜单效果不一致的问题;菜单外壳继续使用主题材质。
13
+ - 优化设置界面中正文徽记的拖拽排序:拖动时放大并轻微倾斜,相邻卡片平滑让位,松手落位后保存;保留键盘排序、取消和减少动态效果支持。
14
+ - 修复导入分区背景后输入框透明材质未及时初始化、消息泡尾尖与本体透明度和模糊不一致、工具记录文件路径布局异常,以及思考和上下文压缩摘要展开标题出现不协调深色底框的问题。
15
+ - 当前支持 DSH `0.2.1-rc.2` 的 Web 端与官方桌面客户端。新增交互有浏览器回归覆盖,并已本地部署;四角效果及菜单修复经用户在本地页面确认,桌面端新增功能尚未单独验收。DSH `0.2.0-rc.2` 用户请固定主题 `1.4.2`,`0.1.7-rc.2` 用户请固定 `1.0.2`,`0.1.2` 或 `0.1.5` 发布线用户请固定 `0.1.102`。运行环境要求不变。
16
+
3
17
  ## 2.4.0 - 2026-10-23
4
18
 
5
19
  以下为相对 `v2.3.1` 的变化:
package/README.en.md CHANGED
@@ -98,10 +98,14 @@ Conversation theme and background use separate settings pages. Enhanced composer
98
98
 
99
99
  Each background can have its own protected region. Open the modal editor from the image preview and drag the default box to move it, or drag its edges and corners to resize; percentage rulers are shown along the image edges. Sidebar previews compare narrow and wide tracks at the current sidebar height; conversation and full backgrounds use side-by-side landscape and portrait previews to show the crop; a notice appears only in settings when the entire region cannot fit. After saving, cover sizing stays centered unless a minimal shift is needed to keep the region visible. Oversized regions prioritize their horizontal center and vertical top, with offsets clamped to avoid empty edges. Clearing the region restores centered cropping; replacing the image clears the old region. Regions sync with images across the instance and are included in full theme exports and imports.
100
100
 
101
+ Background, avatar and emblem images, emblem bundles, and theme files can be dropped onto their respective upload areas. Add one file at a time; each area retains its existing type and size limits. Replacing a background opens a themed confirmation dialog showing the current and replacement images before saving.
102
+
101
103
  ### Theme import and export
102
104
 
103
105
  Click **导入与导出** beside Restore defaults at the bottom of theme settings to open the transfer dialog to download a `.prts-theme.json` file. **包含自定义素材** is checked by default and includes all theme preferences, configured backgrounds, user/AI avatars, and the hero/conversation emblem selection and order. Avatars retain original images and crop parameters; emblems retain original images and editing parameters. Backgrounds use their stored WebP images. Historical assets and temporary drafts are excluded. Uncheck the option to export preferences only.
104
106
 
105
107
  Import displays a summary before confirmation. Preferences-only files preserve destination assets; complete files replace assets and emblem order, with empty slots restoring defaults. Settings absent from older files retain their current values. Before confirmation, the importer lists fields it does not recognize and cannot preserve. Unsupported versions are rejected. The maximum file size is 160 MB. Chat data, accounts and connection credentials are not included.
106
108
 
109
+ Reading, exporting, importing and restoring show progress by stage. Reading and exporting can be cancelled. Cancelling an import or restore waits for the current write to settle, then attempts to roll back written assets. Cancellation is unavailable during final saving and rollback. The import or export section stays highlighted while its operation is active.
110
+
107
111
  A backup download starts before each import. Keep that file for recovery after a refresh, or use **恢复导入前配置** in the current page to restore the state before the latest import. Failed imports attempt to roll back confirmed asset writes. Connection loss or concurrent edits can prevent full recovery; the UI reports failures so the saved backup can be imported after checking the current state.
package/README.md CHANGED
@@ -100,10 +100,14 @@ npm run check
100
100
 
101
101
  背景图片可设置独立的保护区域:点击「保护重要区域」,在弹窗中拖动默认保护框移动或拖动四边或四角缩放,原图边缘显示百分比坐标尺。侧栏按当前高度并排预览较窄/较宽侧栏,正文与完整背景并排预览横向/纵向窗口,实时显示裁剪效果,无法保留完整区域时仅在设置中提示。保存后保持居中铺满,仅在必要时最小幅度移动图片以保住保护框;框无法完整容纳时,横向优先保留中心、纵向优先保留顶端,并限制偏移以避免露底。清除保护区域后恢复居中裁剪;替换图片会清除旧框。保护区域随图片在当前实例同步,并包含在完整主题导入导出中。
102
102
 
103
+ 背景、头像和徽记图片、徽记素材包以及主题文件均支持拖拽到对应上传区域,一次添加一个文件,沿用各入口的类型和大小限制。替换已有背景时,会先在主题弹窗中显示新旧图片,确认后保存。
104
+
103
105
  ### 导入与导出主题
104
106
 
105
107
  点击主题设置底部、与「恢复默认」并列的「导入与导出」,在弹窗中下载 `.prts-theme.json` 文件。「包含自定义素材」默认勾选:包含全部主题设置,以及当前已配置的背景图片、用户/AI 头像、首页与正文徽记及排列。头像保留原图和裁剪参数,徽记保留原图和编辑参数,背景保存当前使用的 WebP 图片;历史素材和临时草稿不包含在内。取消勾选则仅导出设置。
106
108
 
107
109
  导入时先读取文件并显示摘要,确认后保存到当前 DSH 实例。仅配置文件保留目标端现有素材;完整文件替换素材及徽记排列,空素材项恢复默认。旧文件缺少的设置保留当前值;遇到当前版本不认识的配置字段时,确认前会列出导入后无法保留的字段;不支持的文件版本会提示更新。文件最大 160 MB,不包含会话、账户或连接凭据。
108
110
 
111
+ 读取文件、导出、导入及恢复时会显示阶段进度。读取和导出可中途取消;导入或恢复取消后,会等待当前写入确认并尝试回退已写入素材。最终保存与回退阶段不可取消。导入、导出分块在对应操作期间保持高亮。
112
+
109
113
  每次导入前会发起当前配置备份下载,请确认保存。当前页面也可点击「恢复导入前配置」,恢复最近一次导入前的状态;刷新后请使用下载的备份文件。保存失败会尝试回退已确认写入的素材;若连接中断或其他页面并发修改导致无法完整恢复,会显示错误,可在确认当前状态后重新导入备份。