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/book-index-ui.css +156 -0
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +15 -0
- package/dist/index.js +2644 -2500
- package/dist/storage.d.ts +6 -0
- package/package.json +2 -2
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS 变量默认值(换肤接口)
|
|
3
|
+
*
|
|
4
|
+
* - VS Code 环境下会被 --vscode-* 覆盖
|
|
5
|
+
* - 非 VS Code 环境使用这里的默认值
|
|
6
|
+
* - 消费者(如 kaiyuanguji-web)在自己的 :root 里覆盖同名变量即可换肤;
|
|
7
|
+
* 若同时引入了本文件,请确保覆盖声明在 `book-index-ui/styles` 之后加载
|
|
8
|
+
*
|
|
9
|
+
* 组件内部一律以 `var(--bim-x, <默认值>)` 取色。本文件中新增变量的取值
|
|
10
|
+
* 与组件里原本写死的字面值逐一相同,因此不改变任何既有消费者的观感。
|
|
11
|
+
*/
|
|
12
|
+
:root {
|
|
13
|
+
/* ================= 原有变量(取值保持不变) ================= */
|
|
14
|
+
--bim-bg: var(--vscode-editor-background, #ffffff);
|
|
15
|
+
--bim-fg: var(--vscode-foreground, #333333);
|
|
16
|
+
--bim-input-bg: var(--vscode-input-background, #ffffff);
|
|
17
|
+
--bim-input-fg: var(--vscode-input-foreground, #333333);
|
|
18
|
+
--bim-input-border: var(--vscode-input-border, #cccccc);
|
|
19
|
+
--bim-widget-border: var(--vscode-widget-border, #e0e0e0);
|
|
20
|
+
--bim-link-fg: var(--vscode-textLink-foreground, #0066cc);
|
|
21
|
+
--bim-desc-fg: var(--vscode-descriptionForeground, #717171);
|
|
22
|
+
--bim-primary: var(--vscode-button-background, #0078d4);
|
|
23
|
+
--bim-primary-fg: var(--vscode-button-foreground, #ffffff);
|
|
24
|
+
--bim-primary-soft: color-mix(in srgb, var(--bim-primary) 15%, transparent);
|
|
25
|
+
--bim-danger: #f44336;
|
|
26
|
+
--bim-warning: #ff9800;
|
|
27
|
+
--bim-success: #4caf50;
|
|
28
|
+
--bim-sidebar-bg: var(--vscode-sideBar-background, #f3f3f3);
|
|
29
|
+
--bim-list-hover-bg: var(--vscode-list-hoverBackground, rgba(0, 0, 0, 0.04));
|
|
30
|
+
--bim-list-active-bg: var(--vscode-list-activeSelectionBackground, rgba(0, 120, 212, 0.1));
|
|
31
|
+
--bim-focus-border: var(--vscode-focusBorder, #0078d4);
|
|
32
|
+
|
|
33
|
+
/* ================= 新增:补齐组件已在用、此前只有内联回退值的变量 ================= */
|
|
34
|
+
|
|
35
|
+
/* ---- 底色层次 ---- */
|
|
36
|
+
--bim-bg-subtle: #fafafa;
|
|
37
|
+
--bim-widget-bg: #f8f8f8;
|
|
38
|
+
|
|
39
|
+
/* ---- 文字与描边 ---- */
|
|
40
|
+
--bim-muted: #888888;
|
|
41
|
+
--bim-border: #e5e5e5;
|
|
42
|
+
|
|
43
|
+
/* ---- 主色衍生 / 链接 ---- */
|
|
44
|
+
--bim-primary-bg: #fdf4f4;
|
|
45
|
+
--bim-link: #1976d2;
|
|
46
|
+
|
|
47
|
+
/* ---- 标签与点缀 ---- */
|
|
48
|
+
--bim-tag-bg: #f0f0f0;
|
|
49
|
+
--bim-accent-bg: #1976d2;
|
|
50
|
+
|
|
51
|
+
/* ---- 提示与警告 ---- */
|
|
52
|
+
--bim-info-fg: #0c5380;
|
|
53
|
+
--bim-info-bg: #e7f3ff;
|
|
54
|
+
--bim-info-border: #b3dbff;
|
|
55
|
+
--bim-warn-fg: #856404;
|
|
56
|
+
--bim-warn-bg: #fff3cd;
|
|
57
|
+
--bim-warn-border: #ffc107;
|
|
58
|
+
|
|
59
|
+
/* ================= 新增:原本写死在组件里、现已变量化 ================= */
|
|
60
|
+
|
|
61
|
+
/* ---- 条目类型徽章(Book / Work / Collection / Entity) ---- */
|
|
62
|
+
--bim-type-book: #c0392b;
|
|
63
|
+
--bim-type-work: #8e6f3e;
|
|
64
|
+
--bim-type-collection: #2471a3;
|
|
65
|
+
--bim-type-entity: #5b3e8e;
|
|
66
|
+
|
|
67
|
+
/* ---- 条目状态徽章 ---- */
|
|
68
|
+
--bim-status-draft: #e67e22;
|
|
69
|
+
--bim-status-official: #27ae60;
|
|
70
|
+
|
|
71
|
+
/* ---- 资源类型标记 ---- */
|
|
72
|
+
--bim-restype-text: #2196f3;
|
|
73
|
+
--bim-restype-image: #ff9800;
|
|
74
|
+
--bim-restype-text-image: #9c27b0;
|
|
75
|
+
--bim-restype-physical: #795548;
|
|
76
|
+
|
|
77
|
+
/* 资源缺册提示 */
|
|
78
|
+
--bim-missing-fg: #e67e22;
|
|
79
|
+
|
|
80
|
+
/* 影印件色彩模式标记(黑白 / 彩色) */
|
|
81
|
+
--bim-colormode-bw-bg: #f5f5f5;
|
|
82
|
+
--bim-colormode-bw-fg: #757575;
|
|
83
|
+
--bim-colormode-color-bg: #fff8e1;
|
|
84
|
+
--bim-colormode-color-fg: #f57f17;
|
|
85
|
+
|
|
86
|
+
/* ---- 资源导入进度 ---- */
|
|
87
|
+
--bim-progress-active: #f59e0b;
|
|
88
|
+
--bim-progress-done: #10b981;
|
|
89
|
+
--bim-progress-todo: #9ca3af;
|
|
90
|
+
|
|
91
|
+
/* ---- 整理本(CollatedEdition) ---- */
|
|
92
|
+
/* 搜索命中高亮底 */
|
|
93
|
+
--bim-highlight-bg: #fff59d;
|
|
94
|
+
/* 章节类型标记:类 / 书 / 序 / 结语 / 考证 */
|
|
95
|
+
--bim-section-lei: #8e6f3e;
|
|
96
|
+
--bim-section-shu: #c0392b;
|
|
97
|
+
--bim-section-xu: #1a5276;
|
|
98
|
+
--bim-section-jieyu: #7d6608;
|
|
99
|
+
--bim-section-kaozhen: #5d6d7e;
|
|
100
|
+
/* 章节标记(△ 等) */
|
|
101
|
+
--bim-section-tag-fg: #e74c3c;
|
|
102
|
+
/* 与底本匹配状态提示 */
|
|
103
|
+
--bim-matchstate-fg: #b78900;
|
|
104
|
+
|
|
105
|
+
/* ---- 版本传承(VersionLineageGraph / List) ---- */
|
|
106
|
+
/* 佚失标记 */
|
|
107
|
+
--bim-lost-fg: #c62828;
|
|
108
|
+
/* 关系置信度 */
|
|
109
|
+
--bim-confidence-certain: #2e7d32;
|
|
110
|
+
--bim-confidence-consensus: #1976d2;
|
|
111
|
+
--bim-confidence-probable: #ed6c02;
|
|
112
|
+
--bim-confidence-disputed: #c62828;
|
|
113
|
+
/*
|
|
114
|
+
* ⚠️ 历史遗留的不一致:同为 consensus(共识),
|
|
115
|
+
* VersionLineageList 的徽章用蓝色 #1976d2,
|
|
116
|
+
* VersionLineageGraph 的连线用灰色 #555。
|
|
117
|
+
* 变量化时为保证零变化,各自保留原值,故 Graph 单独用下面这个变量。
|
|
118
|
+
* 若要统一,把 --bim-lineage-edge-consensus 覆盖成
|
|
119
|
+
* var(--bim-confidence-consensus) 即可。
|
|
120
|
+
*/
|
|
121
|
+
--bim-lineage-edge-consensus: #555;
|
|
122
|
+
|
|
123
|
+
/* ---- 关系方向(RelationPanel) ---- */
|
|
124
|
+
--bim-relation-up: #2196f3;
|
|
125
|
+
--bim-relation-down: #4caf50;
|
|
126
|
+
--bim-relation-flat: #ff9800;
|
|
127
|
+
|
|
128
|
+
/* ================= 编辑器视图(主要在 guji-platform 插件中可见) ================= */
|
|
129
|
+
|
|
130
|
+
/*
|
|
131
|
+
* ⚠️ 历史遗留的不一致:条目类型(Work/Collection/Book/Entity)在
|
|
132
|
+
* 展示视图(IndexDetail)与编辑视图(IndexEditor / EntityPickerDialog)
|
|
133
|
+
* 用的是两套完全不同的配色:
|
|
134
|
+
* 展示:--bim-type-* work 泥金 / book 朱红 / collection 靛蓝 / entity 紫
|
|
135
|
+
* 编辑:--bim-editor-type-* work 绿 / book 橙 / collection 蓝 / entity 紫
|
|
136
|
+
* 变量化时为保证零变化各自保留。若要统一,把 --bim-editor-type-* 覆盖成
|
|
137
|
+
* 对应的 var(--bim-type-*) 即可。
|
|
138
|
+
*/
|
|
139
|
+
--bim-editor-type-work: #4caf50;
|
|
140
|
+
--bim-editor-type-collection: #2196f3;
|
|
141
|
+
--bim-editor-type-book: #ff9800;
|
|
142
|
+
--bim-editor-type-entity: #9c27b0;
|
|
143
|
+
|
|
144
|
+
/* 来源类型(SourceEditor) */
|
|
145
|
+
--bim-source-url: #2196f3;
|
|
146
|
+
--bim-source-bookid: #4caf50;
|
|
147
|
+
|
|
148
|
+
/* 轻量遮罩底(图片占位等) */
|
|
149
|
+
--bim-overlay-bg: #00000010;
|
|
150
|
+
|
|
151
|
+
/* 模式指示器当前态底色(ModeIndicator) */
|
|
152
|
+
--bim-mode-active-bg: #2196f3;
|
|
153
|
+
|
|
154
|
+
/* 书目卡片「封面」的点缀色(IndexBrowser resultVariant="card") */
|
|
155
|
+
--bim-cover-accent: #8e6f3e;
|
|
156
|
+
}
|