From 334082cd9b38afa7d2152fbbc756d90ee4b61a37 Mon Sep 17 00:00:00 2001 From: "mula.liu" Date: Mon, 26 Oct 2026 17:24:22 +0800 Subject: [PATCH] =?UTF-8?q?release:=200.1.4=20=E2=80=94=20figures=20surviv?= =?UTF-8?q?e=20every=20conversion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three conversion fixes since 0.1.3, all found with the same two documents: - DOCX -> PDF kept the text and dropped the pictures, because AppKit's OOXML reader returns an attributed string with no attachments at all. An image-bearing DOCX now goes through Pandoc into HTML before the same printer, which keeps headings, tables and figures. Image-only DOCX files still take the page-scan path, and a machine without Pandoc falls back to the old text-only result rather than failing. - Markdown -> DOCX/RTF/HTML lost the same figures for a different reason: a Markdown image is a path, Pandoc has to open the file to embed it, and it resolves that path against its own working directory, which for a running Shift is nowhere near the document. It now gets --resource-path of the source folder. - A picture that did arrive printed as a cropped fragment. The layout sizes an attachment from the density header in the file - 72 dpi when it carries none - and ignores CSS, so a 1600 px screenshot asks for 1200 points on a 595 point page. The renderer fits oversized attachments to the text column, scaled and not resampled. Markdown and HTML documents with wide images are covered too. The Updates panel's install and discard buttons are one matched pair now, sized to the panel's own 12px scale instead of the dense 8.5px rows of the Runtime tab they were borrowed from, and the row drops the discard control while an install is counting down. Gates: cargo test --lib 152 passed / 2 ignored, pnpm check clean, pnpm test 38 passed. Artifacts verified from the built bundles, not the build log: the DMG carries 0.1.4, x86_64 + arm64, Signature=adhoc, and its bundled doc-render places a wide image at 499pt inside the page; the Windows exe carries the feed URL and the release public key. --- artifacts/README-macOS-universal.txt | 2 +- package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/artifacts/README-macOS-universal.txt b/artifacts/README-macOS-universal.txt index c0ef6fe..5edb2ed 100644 --- a/artifacts/README-macOS-universal.txt +++ b/artifacts/README-macOS-universal.txt @@ -1,4 +1,4 @@ -Shift 0.1.3 - macOS 通用(universal) +Shift 0.1.4 - macOS 通用(universal) 本文件说明 macOS 安装包是怎么打出来的、在其它机器上会遇到什么,以及如何自己校验。 完整细节见仓库 docs/RELEASE.md 的「macOS packaging」。 diff --git a/package.json b/package.json index f660e58..ca90514 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "shift", "private": true, - "version": "0.1.3", + "version": "0.1.4", "type": "module", "scripts": { "prepare:ocr": "bash scripts/prepare-ocr-assets.sh", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index b98dae7..cae93b6 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -3899,7 +3899,7 @@ dependencies = [ [[package]] name = "shift" -version = "0.1.3" +version = "0.1.4" dependencies = [ "base64 0.22.1", "calamine", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 0a763f8..689d30f 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shift" -version = "0.1.3" +version = "0.1.4" description = "A radial file utility with screenshot, recording and OCR." authors = ["Shift Contributors"] edition = "2021" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 4944969..b8c2bce 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "Shift", - "version": "0.1.3", + "version": "0.1.4", "identifier": "app.nex.shift", "build": { "beforeDevCommand": "pnpm dev",