book-index-ui 0.4.2 → 0.6.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/dist/index.d.ts CHANGED
@@ -1199,6 +1199,15 @@ declare interface IndexBrowserProps {
1199
1199
  onQueryChange?: (query: string) => void;
1200
1200
  /** 标题栏右侧自定义内容 */
1201
1201
  headerRight?: default_2.ReactNode;
1202
+ /**
1203
+ * 结果条目的展示形态。
1204
+ * - 'compact'(默认):紧凑单行列表,适合插件侧栏等窄容器
1205
+ * - 'card':书目卡片(竖排书名「封面」+ 信息区),适合宽屏站点
1206
+ * 默认值保持 'compact',既有消费者观感不变。
1207
+ */
1208
+ resultVariant?: 'compact' | 'card';
1209
+ /** 完全自定义条目渲染,优先级高于 resultVariant */
1210
+ renderEntry?: (entry: IndexEntry) => default_2.ReactNode;
1202
1211
  }
1203
1212
 
1204
1213
  declare interface IndexCounts {
@@ -1333,6 +1342,12 @@ export declare interface IndexEntry {
1333
1342
  edition?: string;
1334
1343
  /** 卷数 */
1335
1344
  juan_count?: number;
1345
+ /**
1346
+ * UI 直接展示的計量文本(如「一百三十篇」「十二卷」),与 measures 一致。
1347
+ * 索引分片里本就有该字段(抽样 works 分片约 3300+ 条带此字段),
1348
+ * 只是此前漏在 IndexEntry 类型里声明,导致 IndexBrowser 里读取它时 tsc 报错。
1349
+ */
1350
+ measure_info?: string;
1336
1351
  /** 是否有文字资源 */
1337
1352
  has_text?: boolean;
1338
1353
  /** 是否有图片资源 */