book-index-ui 0.64.1 → 0.65.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/dist/index.cjs +72 -71
- package/dist/index.d.ts +27 -21
- package/dist/index.js +6459 -6417
- package/dist/{storage-entry-DZmVSoZe.js → storage-entry-DuObqdka.js} +268 -256
- package/dist/storage-entry-h5vhXs0r.cjs +2 -0
- package/dist/storage.cjs +1 -1
- package/dist/storage.d.ts +15 -14
- package/dist/storage.js +5 -5
- package/package.json +1 -1
- package/dist/storage-entry-B6014X77.cjs +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -126,12 +126,10 @@ export declare interface BaseDetailData {
|
|
|
126
126
|
/** 长篇附记(详情页展示,不进卡片/搜索摘要) */
|
|
127
127
|
appendix?: AppendixEntry[];
|
|
128
128
|
authors?: AuthorInfo[];
|
|
129
|
+
/** 别名(字符串);Book 上还可有 {book_title, type:'附刻'}=附刻之书(第 12 组 S2-T 起并入此处) */
|
|
129
130
|
additional_titles?: (string | {
|
|
130
131
|
book_title: string;
|
|
131
|
-
|
|
132
|
-
/** Book 附载篇目 */
|
|
133
|
-
attached_texts?: (string | {
|
|
134
|
-
book_title: string;
|
|
132
|
+
type?: string;
|
|
135
133
|
})[];
|
|
136
134
|
additional_works?: AdditionalWork[];
|
|
137
135
|
indexed_by?: IndexedByEntry[];
|
|
@@ -153,6 +151,9 @@ export declare interface BaseDetailData {
|
|
|
153
151
|
review?: ReviewInfo;
|
|
154
152
|
/** 存佚:extant 今存 / fragment 殘 / lost 佚 等 */
|
|
155
153
|
loss_status?: string;
|
|
154
|
+
/** 真偽:只在確定是偽書時寫(唯一值 forged),依據在 authenticity_basis */
|
|
155
|
+
authenticity?: 'forged' | (string & {});
|
|
156
|
+
authenticity_basis?: string;
|
|
156
157
|
/** 數據修訂號與修訂日期(詳情頁提要卡底部小字) */
|
|
157
158
|
revision?: number | string;
|
|
158
159
|
revised_at?: string;
|
|
@@ -444,16 +445,6 @@ export declare function bookIndexUriToId(uri: string | null | undefined): string
|
|
|
444
445
|
|
|
445
446
|
/** Book.lineage —— 单本书的版本节点信息 */
|
|
446
447
|
export declare interface BookLineage {
|
|
447
|
-
/**
|
|
448
|
-
* @deprecated 年代已并入 dating(第 1 组),数据里不再有;detail-model 的年份推断仍留着兜底读取,待另行清理。
|
|
449
|
-
*/
|
|
450
|
-
year?: number;
|
|
451
|
-
/** @deprecated 同上,见 dating.text */
|
|
452
|
-
year_text?: string;
|
|
453
|
-
/** @deprecated 同上,见 dating.year_uncertain */
|
|
454
|
-
year_uncertain?: boolean;
|
|
455
|
-
/** @deprecated 同上,见 dating.year_range */
|
|
456
|
-
year_range?: [number, number];
|
|
457
448
|
/** 存佚(年代见 dating,所出之本见 base_edition,关联见 related_books) */
|
|
458
449
|
status?: LineageStatus;
|
|
459
450
|
/** 现存范围说明 */
|
|
@@ -945,6 +936,8 @@ export declare interface CharGeometry {
|
|
|
945
936
|
zi?: string;
|
|
946
937
|
/** 规范层(norm.json):人审过的通行字,恰好一个字;缺省=该位没有逐位规范(overview#525) */
|
|
947
938
|
norm?: string;
|
|
939
|
+
/** 待审格(char v0.4 `pending_reason`,spec/02 §4.8):值是待审原因 */
|
|
940
|
+
pending?: string;
|
|
948
941
|
/** 图片格(char v0.3 `fig`,spec/02 §4.7):值是同章 fig.json 里的图 id;`char` 是 `□` */
|
|
949
942
|
fig?: string;
|
|
950
943
|
}
|
|
@@ -1054,6 +1047,8 @@ export declare interface CollatedJuan {
|
|
|
1054
1047
|
page_title?: string;
|
|
1055
1048
|
source_url?: string;
|
|
1056
1049
|
sections: CollatedSection[];
|
|
1050
|
+
/** 章的其余元数据(第 11 组起 page_title/source_url 等收在这里;读取时经 normalizeCollatedJuan 补到顶层) */
|
|
1051
|
+
meta?: Record<string, unknown>;
|
|
1057
1052
|
}
|
|
1058
1053
|
|
|
1059
1054
|
/** 整理本参考文献 */
|
|
@@ -1096,6 +1091,8 @@ export declare interface CollatedSection {
|
|
|
1096
1091
|
header_line?: string;
|
|
1097
1092
|
/** AI 生成的备注 */
|
|
1098
1093
|
ai_note?: string;
|
|
1094
|
+
/** 整理过程留下的解析证据(原下划线前缀字段,第 11 组收进这里),阅读器不显示 */
|
|
1095
|
+
evidence?: Record<string, unknown>;
|
|
1099
1096
|
}
|
|
1100
1097
|
|
|
1101
1098
|
export declare const CollectionCatalog: default_2.FC<CollectionCatalogProps>;
|
|
@@ -1883,10 +1880,9 @@ export declare function deriveEditionType(book: EraInferable): string;
|
|
|
1883
1880
|
/**
|
|
1884
1881
|
* 推断一个版本的朝代 / 纪年。
|
|
1885
1882
|
*
|
|
1886
|
-
*
|
|
1887
|
-
* 1.
|
|
1888
|
-
* 2.
|
|
1889
|
-
* 3. edition ∥ title 的题名前缀与特征词 —— 覆盖约 96%,但是**推断**
|
|
1883
|
+
* 回退,越靠前越可信:
|
|
1884
|
+
* 1. publication_info.year(含 dating.text 还原)—— 著录的出版年
|
|
1885
|
+
* 2. edition ∥ title 的题名前缀与特征词 —— 覆盖约 96%,但是**推断**
|
|
1890
1886
|
*
|
|
1891
1887
|
* UI 必须依 source 区分显示(推断的加 hover 提示),不要让读者误以为
|
|
1892
1888
|
* 「宋 · 慶元」是著录事实。
|
|
@@ -1896,7 +1892,7 @@ export declare function deriveEra(book: EraInferable): DerivedEra;
|
|
|
1896
1892
|
/**
|
|
1897
1893
|
* 推断可排序的公元年份。
|
|
1898
1894
|
*
|
|
1899
|
-
* 优先
|
|
1895
|
+
* 优先 dating.year,其次文本里的 4 位公元年,
|
|
1900
1896
|
* 最后用年号表折算「乾隆四十三年」→ 1736 + 43 - 1 = 1778。
|
|
1901
1897
|
*/
|
|
1902
1898
|
export declare function deriveYear(book: EraInferable): number | undefined;
|
|
@@ -2085,6 +2081,11 @@ export declare interface EntityDetailData extends BaseDetailData {
|
|
|
2085
2081
|
_works?: DerivedEntityWork[];
|
|
2086
2082
|
/** 外部数据库引用(CBDB 等) */
|
|
2087
2083
|
external_ids?: ExternalIds;
|
|
2084
|
+
/** CBDB 匹配过程元数据(2026-11-04 起,原 external_ids.cbdb_match/cbdb_source) */
|
|
2085
|
+
external_ids_meta?: {
|
|
2086
|
+
cbdb_match?: string;
|
|
2087
|
+
cbdb_source?: string;
|
|
2088
|
+
};
|
|
2088
2089
|
/** 是否草稿 */
|
|
2089
2090
|
isDraft?: boolean;
|
|
2090
2091
|
/** 印影等图(GUJI-538/544):图本体在 book-index-asset,`file` 是仓内相对路径,URL=资源根+file */
|
|
@@ -2382,7 +2383,6 @@ export declare interface EntityWorkRef {
|
|
|
2382
2383
|
export declare interface EraInferable {
|
|
2383
2384
|
title?: string;
|
|
2384
2385
|
edition?: string;
|
|
2385
|
-
lineage?: BookDetailData['lineage'];
|
|
2386
2386
|
publication_info?: BookDetailData['publication_info'];
|
|
2387
2387
|
/** 目录侧已考定的版本类型(受控词表);有则优先于现推 */
|
|
2388
2388
|
edition_type?: string;
|
|
@@ -2398,7 +2398,7 @@ export declare interface EraInferable {
|
|
|
2398
2398
|
export declare function eraRank(era: string): number;
|
|
2399
2399
|
|
|
2400
2400
|
/** 推断出的朝代及其可信来源 */
|
|
2401
|
-
export declare type EraSource = '
|
|
2401
|
+
export declare type EraSource = 'publication' | 'edition' | 'catalog' | 'none';
|
|
2402
2402
|
|
|
2403
2403
|
/**
|
|
2404
2404
|
* 可展开行(书目收录 / 考证):+/- 方块 + 主行 + 展开内容。
|
|
@@ -2415,6 +2415,7 @@ export declare function ExpandRow({ open, onToggle, main, action, children }: {
|
|
|
2415
2415
|
/** Entity.external_ids —— 外部数据库引用 */
|
|
2416
2416
|
export declare interface ExternalIds {
|
|
2417
2417
|
cbdb_id?: number;
|
|
2418
|
+
/** 旧位置(2026-11-04 前);现挪到顶层 external_ids_meta,过渡期两处都认 */
|
|
2418
2419
|
cbdb_match?: string;
|
|
2419
2420
|
cbdb_source?: string;
|
|
2420
2421
|
/** 形如 Q123456 */
|
|
@@ -2958,6 +2959,8 @@ export declare interface GujiPageChar {
|
|
|
2958
2959
|
zi?: string;
|
|
2959
2960
|
/** 规范层(norm.json):人审过的「异体→通行字」,恰好一个字、且与 `char` 不同;缺省=该位没有逐位规范(overview#525) */
|
|
2960
2961
|
norm?: string;
|
|
2962
|
+
/** 待审格(char v0.4 `pending_reason`,spec/02 §4.8):这格还在待审,值是待审原因;`char` 是机器字,机器没给字时是 `□`(与阙文同样显示) */
|
|
2963
|
+
pending?: string;
|
|
2961
2964
|
/** 图片格(char v0.3 `fig`,spec/02 §4.7):本格是图不是字,值是同章 fig.json 里的图 id;`char` 仍是 `□`。连续同 id 的格是同一张图 */
|
|
2962
2965
|
fig?: string;
|
|
2963
2966
|
}
|
|
@@ -4540,6 +4543,8 @@ declare const NAMESPACES: {
|
|
|
4540
4543
|
written: string;
|
|
4541
4544
|
measure: string;
|
|
4542
4545
|
loss: string;
|
|
4546
|
+
authenticity: string;
|
|
4547
|
+
forged: string;
|
|
4543
4548
|
earliest: string;
|
|
4544
4549
|
emendation: string;
|
|
4545
4550
|
alias: string;
|
|
@@ -4786,6 +4791,7 @@ declare const NAMESPACES: {
|
|
|
4786
4791
|
figLabel: string;
|
|
4787
4792
|
figPlain: string;
|
|
4788
4793
|
lacunaGuess: string;
|
|
4794
|
+
pendingReason: string;
|
|
4789
4795
|
upstream: string;
|
|
4790
4796
|
chapterFailed: string;
|
|
4791
4797
|
references: string;
|