dsh-ai-book-shelf 2.5.1 → 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.
Files changed (3) hide show
  1. package/README.md +28 -25
  2. package/client.js +2 -2
  3. package/package.json +1 -1
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.1-2ea44f)](https://github.com/0avatar0/dsh-ai-book-shelf/releases/tag/v2.5.1)
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,25 +11,27 @@ comparison.
11
11
 
12
12
  ## Install
13
13
 
14
- 1. Download `dsh-ai-book-shelf-2.5.1.tgz` from the
15
- [latest release](https://github.com/0avatar0/dsh-ai-book-shelf/releases/tag/v2.5.1),
16
- or install from npm with `dsh-ai-book-shelf@2.5.1`.
17
- 2. In DSH open **Plugins → Add plugin** and choose the downloaded tgz, or paste
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
18
  the npm package spec.
19
- 3. Reload the plugin and open **AI 书架 / AI Book Shelf** in the sidebar.
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.
20
22
 
21
23
  Chinese step-by-step guide: [INSTALL-zh.md](INSTALL-zh.md). Publishing and npm
22
24
  instructions: [PUBLISHING.md](PUBLISHING.md).
23
25
 
24
26
  ## What it does
25
27
 
26
- - **Shelf** — scans the archive shelf (the first registered workspace by
28
+ - **Shelf** 鈥?scans the archive shelf (the first registered workspace by
27
29
  default, which is `D:\BookLib` on this deployment), plus any extra
28
30
  `libraryDirs`, for supported book files.
29
- - **Copies external books** — a book opened or imported from outside the
31
+ - **Copies external books** 鈥?a book opened or imported from outside the
30
32
  archive shelf is copied into `archiveDir` first. Identical files are reused;
31
33
  a name collision gets a ` (2)` suffix rather than overwriting anything.
32
- - **Public-domain search** — the **Search books** tab queries Project Gutenberg
34
+ - **Public-domain search** 鈥?the **Search books** tab queries Project Gutenberg
33
35
  (Gutendex, with the Gutenberg website search as a fallback), a Chinese-only
34
36
  Project Gutenberg catalog (`lang=zh`), Chinese Wikisource, Chinese Wikibooks,
35
37
  and Standard Ebooks, then saves the chosen book (EPUB, or an HTML book for
@@ -48,24 +50,24 @@ instructions: [PUBLISHING.md](PUBLISHING.md).
48
50
  can be added with the **+** button. The built-in Chinese catalogs cover
49
51
  traditional Chinese Gutenberg titles and Wikisource; other catalogs are
50
52
  mostly English.
51
- - **Reader** — parses the book into chapters, sanitizes HTML, and renders a
53
+ - **Reader** 鈥?parses the book into chapters, sanitizes HTML, and renders a
52
54
  comfortable serif reading page with per-book progress. EPUB keeps its OPF
53
55
  spine, headings, lists, tables, images and TOC; PDF/Text/Markdown/HTML/FB2/
54
56
  DOCX are normalized into readable chapters.
55
- - **Ask while selecting** — the floating selection bar contains a question
56
- field to the left of **解释**. Type a specific question and press Enter or
57
- **解释**, 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
58
60
  together with the book, chapter, selection, and nearby context; the right
59
61
  rail opens and streams the answer.
60
- - **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
61
63
  turns to the model, so pronouns and earlier details stay in context. You can
62
64
  stop the stream, copy the answer, or use quick asks (translate / example /
63
65
  background).
64
- - **Per-book annotations** — every completed explanation and its follow-ups are
66
+ - **Per-book annotations** 鈥?every completed explanation and its follow-ups are
65
67
  saved on the Host under the archive directory. Opening a book opens the right
66
68
  annotation rail with that book's saved records; click a record to reopen its
67
69
  Q&A thread and continue asking. Records survive browser reloads and restarts.
68
- - **Paper mode** — a separate paper library for English PDFs, with virtual
70
+ - **Paper mode** 鈥?a separate paper library for English PDFs, with virtual
69
71
  folders (create, drag papers in, rename), paragraph-level translation into a
70
72
  JSON translation file, manual correction, retranslation, whole-paper
71
73
  translation saved as a new Chinese paper, and a bilingual compare view.
@@ -87,17 +89,17 @@ instructions: [PUBLISHING.md](PUBLISHING.md).
87
89
  translation box is resizable from its bottom edge, auto-fits its text on
88
90
  first open, remembers its height/collapsed state, and can be collapsed
89
91
  individually or all at once. Translation text supports AI explanation.
90
- - **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
91
93
  and papers; the paper compare view also zooms its source/translation text.
92
- - **AI panels** — explanations are expanded by default and can be collapsed
93
- individually or with one “Collapse all” action.
94
- - **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
95
97
  chapter, including PDF/HTML/DOCX books. Results show chapter, occurrence and
96
98
  a text snippet; clicking one jumps to the chapter and highlights every match.
97
99
  The reader toolbar shows the shortcut next to the search button. Simplified
98
- Chinese queries also match traditional text (`陈文龙` finds `陳文龍`).
99
- - **Keyboard** — `Ctrl/Cmd+Shift+E` explains the current selection,
100
- `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.
101
103
 
102
104
  ## Supported formats
103
105
 
@@ -109,7 +111,7 @@ instructions: [PUBLISHING.md](PUBLISHING.md).
109
111
  | `.md` / `.markdown` | Headings, paragraphs, lists, quotes, code blocks |
110
112
  | `.html` / `.htm` / `.xhtml` | Sanitized HTML body |
111
113
  | `.fb2` | FictionBook XML |
112
- | `.docx` | Word paragraphs and Heading 1–3 chapters |
114
+ | `.docx` | Word paragraphs and Heading 1鈥? chapters |
113
115
  | `.mobi` / `.azw3` / `.azw` | Convert to EPUB or PDF first (for example with Calibre) |
114
116
 
115
117
  PDF extraction uses a vendored PDF.js runtime under `vendor/pdfjs/`; the package
@@ -174,3 +176,4 @@ explanations over SSE.
174
176
  Plugin code is released under the [MIT License](LICENSE). The bundled PDF.js
175
177
  runtime keeps its own Apache-2.0 license under `vendor/pdfjs/LICENSE`; bundled
176
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ai-book-shelf",
3
- "version": "2.5.1",
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",