@yyds-dudu/dsh-novel-reader 0.0.0-stage → 1.0.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.
@@ -0,0 +1,8 @@
1
+ # Bundle 补丁:加载本包主入口(Host 半)。
2
+ # package.json 的 dsh.client 声明让 Web 端加载 ./client(浏览器半),
3
+ # 在输入框旁渲染 📖 图标。
4
+ - insert:
5
+ - id: novel-reader
6
+ # 必须是已发布的包名——加载器按此说明符 import。
7
+ # 带引号是因为 YAML 的普通标量不允许以 '@' 开头。
8
+ name: "@yyds-dudu/dsh-novel-reader"
package/docs/DETAIL.md ADDED
@@ -0,0 +1 @@
1
+ ![输入框旁的浮动小说阅读器](preview.svg)
@@ -0,0 +1,15 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="640" height="300" viewBox="0 0 640 300">
2
+ <rect width="640" height="300" rx="20" fill="#eef2f8"/>
3
+ <rect x="40" y="210" width="560" height="56" rx="14" fill="#fff" stroke="#c6d0dd" stroke-width="2"/>
4
+ <rect x="60" y="230" width="340" height="14" rx="7" fill="#dde4ee"/>
5
+ <circle cx="574" cy="238" r="14" fill="#2f6fed"/>
6
+ <rect x="120" y="44" width="400" height="168" rx="14" fill="#fffdf6" stroke="#b9c5d4" stroke-width="2"/>
7
+ <rect x="120" y="44" width="400" height="32" rx="14" fill="#f1f4f9"/>
8
+ <circle cx="140" cy="60" r="5" fill="#f5a623"/>
9
+ <rect x="156" y="57" width="120" height="7" rx="3" fill="#b9c5d4"/>
10
+ <rect x="430" y="55" width="16" height="10" rx="3" fill="#c6d0dd"/>
11
+ <rect x="452" y="55" width="16" height="10" rx="3" fill="#c6d0dd"/>
12
+ <rect x="474" y="55" width="16" height="10" rx="3" fill="#c6d0dd"/>
13
+ <path d="M150 100h340M150 116h340M150 132h300M150 148h340M150 164h260M150 180h190" stroke="#d8cbb0" stroke-width="6" stroke-linecap="round"/>
14
+ <rect x="440" y="190" width="64" height="18" rx="9" fill="#2f6fed"/>
15
+ </svg>
Binary file
Binary file
Binary file
package/icon.svg ADDED
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
+ <rect x="7" y="5" width="16" height="24" rx="2" fill="#2f6fed"/>
3
+ <rect x="10" y="5" width="16" height="24" rx="2" fill="#ffffff" stroke="#2f6fed" stroke-width="1.5"/>
4
+ <path d="M13 11h10M13 15h10M13 19h7" stroke="#2f6fed" stroke-width="1.5" stroke-linecap="round"/>
5
+ <circle cx="26" cy="26" r="6" fill="#f5a623"/>
6
+ <path d="M23.5 26l1.8 1.8 3.5-3.8" fill="none" stroke="#fff" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
7
+ </svg>
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ /** Host 端:阅读器完全运行在 Client(Web 层),这里只做空实现占位。 */
2
+ export function apply() {}
package/locale/en.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "meta": {
3
+ "title": "Novel Reader",
4
+ "description": "Import txt novels and read them in a floating, draggable window beside the input box."
5
+ },
6
+ "name": "Novel",
7
+ "import": "Import txt",
8
+ "importing": "Importing...",
9
+ "settings": "Settings",
10
+ "close": "Close",
11
+ "pin": "Pin open",
12
+ "unpin": "Unpin",
13
+ "prevChapter": "Previous chapter",
14
+ "nextChapter": "Next chapter",
15
+ "prevPage": "Previous page",
16
+ "nextPage": "Next page",
17
+ "chapterJump": "Chapter",
18
+ "chapterPlaceholder": "Select a chapter",
19
+ "noBook": "No book imported",
20
+ "importHint": "Click \"Import txt\" to choose a novel file (UTF-8 / GBK supported)",
21
+ "settingsTitle": "Reading settings",
22
+ "fontSize": "Font size",
23
+ "lineHeight": "Line height",
24
+ "fontFamily": "Font family",
25
+ "textColor": "Text color",
26
+ "backgroundColor": "Background color",
27
+ "bgOpacity": "Background opacity",
28
+ "windowWidth": "Window width",
29
+ "windowHeight": "Window height",
30
+ "customChapterRegex": "Custom chapter regex",
31
+ "borderStyleGroup": "Window border",
32
+ "readerBorderGroup": "Reading area border",
33
+ "panelBorderGroup": "Settings panel border",
34
+ "panelGroup": "Settings panel style",
35
+ "readerGroup": "Reading area style",
36
+ "readerTextGroup": "Text & layout",
37
+ "readerSizeGroup": "Window size",
38
+ "panelTextGroup": "Panel text & font",
39
+ "panelSizeGroup": "Panel size",
40
+ "readerFollowLabel": "Reading area follows input",
41
+ "panelFollowLabel": "Panel follows input",
42
+ "panelFontSize": "Font size",
43
+ "panelLineHeight": "Line height",
44
+ "panelFontFamily": "Font",
45
+ "chapterGroup": "Chapter detection",
46
+ "actionGroup": "Actions",
47
+ "borderRadius": "Corner radius",
48
+ "borderVisible": "Show border",
49
+ "regexHint": "One regex per line; leave empty to use built-in rules",
50
+ "reset": "Reset",
51
+ "done": "Done",
52
+ "profileGroup": "Saved profiles",
53
+ "profileName": "Profile name",
54
+ "profileSave": "Save current",
55
+ "profileSelect": "Apply",
56
+ "profileDelete": "Delete",
57
+ "profileNone": "No saved profiles yet",
58
+ "profileSaved": "Saved: {name}",
59
+ "profileDeleted": "Deleted: {name}",
60
+ "profileApplied": "Applied: {name}",
61
+ "profileEmptyName": "Enter a profile name first",
62
+ "profileConfirmDelete": "Delete profile \"{name}\"?",
63
+ "chapterCount": "chapters",
64
+ "page": "Page",
65
+ "noChapters": "No chapter detected; read the whole file as one",
66
+ "decodeError": "Unable to decode this file (tried UTF-8 and GBK)",
67
+ "importFailed": "Import failed",
68
+ "byteUnavailable": "Your browser does not expose file encoding detection; UTF-8 fallback failed. Try re-saving the file as UTF-8.",
69
+ "styleTip": "Click 📖 to open · Mouse out closes · Click again to reopen · Drag the title bar to move",
70
+ "resizeHint": "Drag the window edge to resize; changes are saved automatically"
71
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "meta": {
3
+ "title": "小说阅读器",
4
+ "description": "导入 txt 小说,在输入框旁的浮动可拖拽窗口里阅读。"
5
+ },
6
+ "name": "小说",
7
+ "import": "导入 txt",
8
+ "importing": "导入中…",
9
+ "settings": "设置",
10
+ "close": "关闭",
11
+ "pin": "钉住常开",
12
+ "unpin": "取消钉住",
13
+ "prevChapter": "上一章",
14
+ "nextChapter": "下一章",
15
+ "prevPage": "上一页",
16
+ "nextPage": "下一页",
17
+ "chapterJump": "章节",
18
+ "chapterPlaceholder": "选择章节",
19
+ "noBook": "尚未导入小说",
20
+ "importHint": "点击「导入 txt」选择小说文件(支持 UTF-8 / GBK)",
21
+ "settingsTitle": "阅读设置",
22
+ "fontSize": "字号",
23
+ "lineHeight": "行距",
24
+ "fontFamily": "字体",
25
+ "textColor": "文字颜色",
26
+ "backgroundColor": "背景颜色",
27
+ "bgOpacity": "背景透明度",
28
+ "windowWidth": "窗口宽度",
29
+ "windowHeight": "窗口高度",
30
+ "customChapterRegex": "自定义章节正则",
31
+ "borderStyleGroup": "窗口边框",
32
+ "readerBorderGroup": "阅读区边框",
33
+ "panelBorderGroup": "设置面板边框",
34
+ "panelGroup": "设置面板样式",
35
+ "readerGroup": "阅读区样式",
36
+ "readerTextGroup": "阅读区文字与排版",
37
+ "readerSizeGroup": "阅读区尺寸",
38
+ "panelTextGroup": "面板文字与字体",
39
+ "panelSizeGroup": "面板尺寸",
40
+ "readerFollowLabel": "阅读区跟随输入框",
41
+ "panelFollowLabel": "面板跟随输入框",
42
+ "panelFontSize": "字号",
43
+ "panelLineHeight": "行距",
44
+ "panelFontFamily": "字体",
45
+ "chapterGroup": "章节识别",
46
+ "actionGroup": "操作",
47
+ "borderRadius": "圆角大小",
48
+ "borderVisible": "显示边框",
49
+ "regexHint": "每行一条正则;留空则用内置规则",
50
+ "reset": "恢复默认",
51
+ "done": "完成",
52
+ "profileGroup": "已保存配置",
53
+ "profileName": "配置名称",
54
+ "profileSave": "保存当前配置",
55
+ "profileSelect": "应用",
56
+ "profileDelete": "删除",
57
+ "profileNone": "暂无保存的配置",
58
+ "profileSaved": "已保存:{name}",
59
+ "profileDeleted": "已删除:{name}",
60
+ "profileApplied": "已应用:{name}",
61
+ "profileEmptyName": "请先输入配置名称",
62
+ "profileConfirmDelete": "确定删除配置「{name}」?",
63
+ "chapterCount": "章",
64
+ "page": "页",
65
+ "noChapters": "未识别到章节,将整本作为一章阅读",
66
+ "decodeError": "无法解码该文件(已尝试 UTF-8 与 GBK)",
67
+ "importFailed": "导入失败",
68
+ "byteUnavailable": "当前浏览器无法获取文件原始字节,UTF-8 解码失败。请将文件另存为 UTF-8 后重试。",
69
+ "styleTip": "点击 📖 打开 · 鼠标移出收起 · 再点图标重开 · 拖动标题栏移动窗口",
70
+ "resizeHint": "拖动窗口边缘可调整大小,改动会自动保存"
71
+ }
package/package.json CHANGED
@@ -1,6 +1,61 @@
1
1
  {
2
2
  "name": "@yyds-dudu/dsh-novel-reader",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "DSH 小说阅读器:在输入框旁悬浮一个轻量小说阅读面板,支持 txt 导入、章节识别跳转、点击翻页、悬浮/钉住、样式自定义、阅读进度记忆与多套样式配置。",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "keywords": [
8
+ "dsh-plugin",
9
+ "deepseek-harness",
10
+ "novel-reader",
11
+ "小说阅读器",
12
+ "摸鱼"
13
+ ],
14
+ "homepage": "https://github.com/yyds-dudu/dsh-novel-reader#readme",
15
+ "bugs": {
16
+ "url": "https://github.com/yyds-dudu/dsh-novel-reader/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/yyds-dudu/dsh-novel-reader.git"
21
+ },
22
+ "publishConfig": {
23
+ "access": "public",
24
+ "registry": "https://registry.npmjs.org/"
25
+ },
26
+ "engines": {
27
+ "node": ">=22"
28
+ },
29
+ "exports": {
30
+ ".": "./index.js",
31
+ "./client": "./client.js",
32
+ "./locale/*.json": "./locale/*.json",
33
+ "./icon": "./icon.svg"
34
+ },
35
+ "files": [
36
+ "index.js",
37
+ "client.js",
38
+ "cordis.patch.yml",
39
+ "locale/*.json",
40
+ "icon.svg",
41
+ "README.md",
42
+ "docs"
43
+ ],
44
+ "peerDependencies": {
45
+ "@deepseek-ai/cordis": "^4.0.2",
46
+ "@deepseek-ai/dsh-client-ui-conversation": "^0.1.5-rc.3 || ^0.2.0-rc.1",
47
+ "react": "^18.2.0"
48
+ },
49
+ "dsh": {
50
+ "bundle": {
51
+ "patch": "./cordis.patch.yml"
52
+ },
53
+ "client": {
54
+ "platform": "web",
55
+ "immediately": true,
56
+ "inject": [
57
+ "@deepseek-ai/dsh-client-ui-conversation"
58
+ ]
59
+ }
60
+ }
61
+ }