book-index-ui 0.48.5 → 0.50.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.
- package/README.md +11 -12
- package/dist/index.cjs +627 -623
- package/dist/index.d.ts +270 -71
- package/dist/index.js +10057 -9727
- package/dist/storage-entry-DizSSpIx.cjs +2 -0
- package/dist/{storage-entry-BdyLwZMZ.js → storage-entry-DttQnKTJ.js} +255 -284
- package/dist/storage.cjs +1 -1
- package/dist/storage.d.ts +131 -34
- package/dist/storage.js +5 -5
- package/package.json +1 -1
- package/dist/storage-entry-BNx9e7zn.cjs +0 -2
package/README.md
CHANGED
|
@@ -211,18 +211,17 @@ npm run build:lib # 输出 dist/ 给 npm 发布
|
|
|
211
211
|
|
|
212
212
|
Apache 2.0
|
|
213
213
|
|
|
214
|
-
## schema-v2
|
|
214
|
+
## schema-v2 派生字段(overview#458)
|
|
215
215
|
|
|
216
|
-
|
|
216
|
+
详情页(`BookDetailLayout` 及其下各页)直接读 build 产物的 `_` 字段,没有中间的归一/兼容层:
|
|
217
217
|
|
|
218
|
-
| 记录 |
|
|
219
|
-
|
|
220
|
-
| Work | `_books
|
|
221
|
-
|
|
|
222
|
-
|
|
|
223
|
-
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
| Entity | `_works` | `works` | 不动 |
|
|
218
|
+
| 记录 | 页面读的字段 |
|
|
219
|
+
|---|---|
|
|
220
|
+
| Work | `_books`(版本卡)、`_edition_count`、`_classifications`(优先 zongmu)、`_related`(含 `direction`)、`_collections`;著录文字仍读源档的 `indexed_by` |
|
|
221
|
+
| Book | `_collections`(所属丛编与册次);上级作品的版本取自 Work 的 `_books` |
|
|
222
|
+
| Collection | `_members`(前 20 项)+`_member_count`;上级丛编读源档的 `contained_in` |
|
|
223
|
+
| Entity | `_works` |
|
|
224
|
+
|
|
225
|
+
卡片里 `{id, h:1}` 的枢纽引用没有 title,名称取自 `_hubs.json`:`IndexStorage.getHubs?()` 提供(`BundleStorage` 默认读 `${basePath}/_hubs.json`,可用 `hubsPath` 改相对路径);不提供时枢纽引用无名,页面回退显示 ID。`BookDetailLayout` 会给传入的 `transport` 套一层 `withHubTitles`(只补枢纽卡的 `title`,不改字段形状)。夹具取自 book-index `schema-v2` 的 `build/contract-sample/`(`tests/unit/fixtures/contract-sample/`)。
|
|
227
226
|
|
|
228
|
-
|
|
227
|
+
`tests/unit/DerivedGolden.test.tsx` 用 `tests/unit/fixtures/derived-golden/`(真实 build 产物里挑的 47 个样本)逐字节比对整页渲染,改页面后输出有意变化时才重新生成(见该测试文件头部)。
|