dsh-ai-book-shelf 2.5.0 → 2.5.2

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/README.md CHANGED
@@ -1,7 +1,7 @@
1
- # AI Book Shelf / AI 书架
1
+ # AI Book Shelf / AI 涔︽灦
2
2
 
3
3
  [![GitHub](https://img.shields.io/badge/GitHub-0avatar0%2Fdsh--ai--book--shelf-181717?logo=github)](https://github.com/0avatar0/dsh-ai-book-shelf)
4
- [![Release](https://img.shields.io/badge/release-v2.5.0-2ea44f)](https://github.com/0avatar0/dsh-ai-book-shelf/releases/tag/v2.5.0)
4
+ [![Release](https://img.shields.io/badge/release-v2.5.2-2ea44f)](https://github.com/0avatar0/dsh-ai-book-shelf/releases/tag/v2.5.2)
5
5
  [![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
6
6
 
7
7
  A persistent DSH Web UI plugin that adds a full-page multi-format reader to the
@@ -11,23 +11,27 @@ comparison.
11
11
 
12
12
  ## Install
13
13
 
14
- 1. Download `dsh-ai-book-shelf-2.5.0.tgz` from the
15
- [latest release](https://github.com/0avatar0/dsh-ai-book-shelf/releases/tag/v2.5.0).
16
- 2. In DSH open **Plugins → Add plugin** and choose the downloaded tgz.
17
- 3. Reload the plugin and open **AI 书架 / AI Book Shelf** in the sidebar.
14
+ 1. Download `dsh-ai-book-shelf-2.5.2.tgz` from the
15
+ [latest release](https://github.com/0avatar0/dsh-ai-book-shelf/releases/tag/v2.5.2),
16
+ or install from npm with `dsh-ai-book-shelf@2.5.2`.
17
+ 2. In DSH open **Plugins 鈫?Add plugin** and choose the downloaded tgz, or paste
18
+ the npm package spec.
19
+ 3. DSH installs a third-party bundle disabled by default. In **Plugins**, switch
20
+ `dsh-ai-book-shelf` to **On** once; later updates keep it enabled.
21
+ 4. Refresh the page and open **AI 涔︽灦 / AI Book Shelf** in the sidebar.
18
22
 
19
23
  Chinese step-by-step guide: [INSTALL-zh.md](INSTALL-zh.md). Publishing and npm
20
24
  instructions: [PUBLISHING.md](PUBLISHING.md).
21
25
 
22
26
  ## What it does
23
27
 
24
- - **Shelf** — scans the archive shelf (the first registered workspace by
28
+ - **Shelf** 鈥?scans the archive shelf (the first registered workspace by
25
29
  default, which is `D:\BookLib` on this deployment), plus any extra
26
30
  `libraryDirs`, for supported book files.
27
- - **Copies external books** — a book opened or imported from outside the
31
+ - **Copies external books** 鈥?a book opened or imported from outside the
28
32
  archive shelf is copied into `archiveDir` first. Identical files are reused;
29
33
  a name collision gets a ` (2)` suffix rather than overwriting anything.
30
- - **Public-domain search** — the **Search books** tab queries Project Gutenberg
34
+ - **Public-domain search** 鈥?the **Search books** tab queries Project Gutenberg
31
35
  (Gutendex, with the Gutenberg website search as a fallback), a Chinese-only
32
36
  Project Gutenberg catalog (`lang=zh`), Chinese Wikisource, Chinese Wikibooks,
33
37
  and Standard Ebooks, then saves the chosen book (EPUB, or an HTML book for
@@ -46,24 +50,24 @@ instructions: [PUBLISHING.md](PUBLISHING.md).
46
50
  can be added with the **+** button. The built-in Chinese catalogs cover
47
51
  traditional Chinese Gutenberg titles and Wikisource; other catalogs are
48
52
  mostly English.
49
- - **Reader** — parses the book into chapters, sanitizes HTML, and renders a
53
+ - **Reader** 鈥?parses the book into chapters, sanitizes HTML, and renders a
50
54
  comfortable serif reading page with per-book progress. EPUB keeps its OPF
51
55
  spine, headings, lists, tables, images and TOC; PDF/Text/Markdown/HTML/FB2/
52
56
  DOCX are normalized into readable chapters.
53
- - **Ask while selecting** — the floating selection bar contains a question
54
- field to the left of **解释**. Type a specific question and press Enter or
55
- **解释**, or leave it blank for a direct explanation. The question is sent
57
+ - **Ask while selecting** 鈥?the floating selection bar contains a question
58
+ field to the left of **瑙i噴**. Type a specific question and press Enter or
59
+ **瑙i噴**, or leave it blank for a direct explanation. The question is sent
56
60
  together with the book, chapter, selection, and nearby context; the right
57
61
  rail opens and streams the answer.
58
- - **Follow-ups** — keep the whole Q&A thread in the panel and send the previous
62
+ - **Follow-ups** 鈥?keep the whole Q&A thread in the panel and send the previous
59
63
  turns to the model, so pronouns and earlier details stay in context. You can
60
64
  stop the stream, copy the answer, or use quick asks (translate / example /
61
65
  background).
62
- - **Per-book annotations** — every completed explanation and its follow-ups are
66
+ - **Per-book annotations** 鈥?every completed explanation and its follow-ups are
63
67
  saved on the Host under the archive directory. Opening a book opens the right
64
68
  annotation rail with that book's saved records; click a record to reopen its
65
69
  Q&A thread and continue asking. Records survive browser reloads and restarts.
66
- - **Paper mode** — a separate paper library for English PDFs, with virtual
70
+ - **Paper mode** 鈥?a separate paper library for English PDFs, with virtual
67
71
  folders (create, drag papers in, rename), paragraph-level translation into a
68
72
  JSON translation file, manual correction, retranslation, whole-paper
69
73
  translation saved as a new Chinese paper, and a bilingual compare view.
@@ -85,17 +89,17 @@ instructions: [PUBLISHING.md](PUBLISHING.md).
85
89
  translation box is resizable from its bottom edge, auto-fits its text on
86
90
  first open, remembers its height/collapsed state, and can be collapsed
87
91
  individually or all at once. Translation text supports AI explanation.
88
- - **Zoom** — Ctrl/Cmd + mouse wheel changes the reading font size in both books
92
+ - **Zoom** 鈥?Ctrl/Cmd + mouse wheel changes the reading font size in both books
89
93
  and papers; the paper compare view also zooms its source/translation text.
90
- - **AI panels** — explanations are expanded by default and can be collapsed
91
- individually or with one “Collapse all” action.
92
- - **Find in book** — `Ctrl/Cmd+F` opens a full-book search across every
94
+ - **AI panels** 鈥?explanations are expanded by default and can be collapsed
95
+ individually or with one 鈥淐ollapse all鈥?action.
96
+ - **Find in book** 鈥?`Ctrl/Cmd+F` opens a full-book search across every
93
97
  chapter, including PDF/HTML/DOCX books. Results show chapter, occurrence and
94
98
  a text snippet; clicking one jumps to the chapter and highlights every match.
95
99
  The reader toolbar shows the shortcut next to the search button. Simplified
96
- Chinese queries also match traditional text (`陈文龙` finds `陳文龍`).
97
- - **Keyboard** — `Ctrl/Cmd+Shift+E` explains the current selection,
98
- `Alt+←` / `Alt+→` move between chapters, `Esc` closes search/rail.
100
+ Chinese queries also match traditional text (`闄堟枃榫檂 finds `闄虫枃榫峘).
101
+ - **Keyboard** 鈥?`Ctrl/Cmd+Shift+E` explains the current selection,
102
+ `Alt+鈫恅 / `Alt+鈫抈 move between chapters, `Esc` closes search/rail.
99
103
 
100
104
  ## Supported formats
101
105
 
@@ -107,7 +111,7 @@ instructions: [PUBLISHING.md](PUBLISHING.md).
107
111
  | `.md` / `.markdown` | Headings, paragraphs, lists, quotes, code blocks |
108
112
  | `.html` / `.htm` / `.xhtml` | Sanitized HTML body |
109
113
  | `.fb2` | FictionBook XML |
110
- | `.docx` | Word paragraphs and Heading 1–3 chapters |
114
+ | `.docx` | Word paragraphs and Heading 1鈥? chapters |
111
115
  | `.mobi` / `.azw3` / `.azw` | Convert to EPUB or PDF first (for example with Calibre) |
112
116
 
113
117
  PDF extraction uses a vendored PDF.js runtime under `vendor/pdfjs/`; the package
@@ -172,3 +176,4 @@ explanations over SSE.
172
176
  Plugin code is released under the [MIT License](LICENSE). The bundled PDF.js
173
177
  runtime keeps its own Apache-2.0 license under `vendor/pdfjs/LICENSE`; bundled
174
178
  fonts keep the licenses in `vendor/pdfjs/standard_fonts/`.
179
+
package/client.js CHANGED
@@ -1,5 +1,5 @@
1
1
  window.__ModuleLoader__.load({
2
- id: '@local/dsh-epub-reader',
2
+ id: 'dsh-ai-book-shelf',
3
3
  factory(require) {
4
4
  const React = require('react')
5
5
  const h = React.createElement
@@ -4443,7 +4443,7 @@ window.__ModuleLoader__.load({
4443
4443
 
4444
4444
  ctx.effect(() => {
4445
4445
  const tag = document.createElement('style')
4446
- tag.dataset.plugin = '@local/dsh-epub-reader'
4446
+ tag.dataset.plugin = 'dsh-ai-book-shelf'
4447
4447
  tag.textContent = CSS
4448
4448
  document.head.append(tag)
4449
4449
  return () => tag.remove()
package/cordis.patch.yml CHANGED
@@ -12,6 +12,6 @@
12
12
  # explainModel: deepseek-flash
13
13
  - insert:
14
14
  - id: epub-reader
15
- name: '@local/dsh-epub-reader'
15
+ name: 'dsh-ai-book-shelf'
16
16
  config:
17
17
  libraryDirs: []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ai-book-shelf",
3
- "version": "2.5.0",
3
+ "version": "2.5.2",
4
4
  "description": "AI Book Shelf: read books and papers in Harness, search full text, explain and discuss with AI, translate papers and compare bilingual text.",
5
5
  "keywords": [
6
6
  "dsh-plugin",