@hanology/cham-browser 0.4.18 → 0.4.20
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/package.json +1 -1
- package/template/src/components/AnnotationPane.vue +20 -7
- package/template/src/components/AnnotationTooltip.vue +25 -13
- package/template/src/components/ReadingProgress.vue +5 -2
- package/template/src/components/SectionBlock.vue +16 -4
- package/template/src/components/SideNav.vue +8 -5
- package/template/src/components/VerticalScroll.vue +7 -7
- package/template/src/styles/main.css +18 -1
- package/template/src/views/PieceView.vue +21 -13
package/package.json
CHANGED
|
@@ -36,7 +36,7 @@ function kindLabel(ann: Annotation): string {
|
|
|
36
36
|
etymology: '詞源',
|
|
37
37
|
note: '備注',
|
|
38
38
|
definition: '釋義',
|
|
39
|
-
commentary: '
|
|
39
|
+
commentary: '注',
|
|
40
40
|
translation: '譯文',
|
|
41
41
|
person: '人名',
|
|
42
42
|
place: '地名',
|
|
@@ -311,21 +311,26 @@ onBeforeUnmount(() => document.removeEventListener('keydown', onKeydown))
|
|
|
311
311
|
.ann-pane.vertical {
|
|
312
312
|
writing-mode: vertical-rl;
|
|
313
313
|
text-orientation: mixed;
|
|
314
|
-
width:
|
|
314
|
+
width: 220px;
|
|
315
315
|
}
|
|
316
316
|
|
|
317
317
|
.ann-pane.vertical .ann-pane-body {
|
|
318
|
-
|
|
319
|
-
|
|
318
|
+
display: flex;
|
|
319
|
+
flex-direction: row;
|
|
320
|
+
overflow-y: auto;
|
|
321
|
+
overflow-x: hidden;
|
|
320
322
|
}
|
|
321
323
|
|
|
322
324
|
.ann-pane.vertical .ann-pane-entry {
|
|
323
|
-
padding:
|
|
325
|
+
padding: 10px 6px;
|
|
324
326
|
border-bottom: none;
|
|
325
|
-
border-left: 1px solid var(--border-light);
|
|
326
327
|
border-right: 3px solid transparent;
|
|
327
328
|
}
|
|
328
329
|
|
|
330
|
+
.ann-pane.vertical .ann-pane-entry + .ann-pane-entry {
|
|
331
|
+
border-top: 1px solid var(--border-light);
|
|
332
|
+
}
|
|
333
|
+
|
|
329
334
|
.ann-pane.vertical .ann-pane-entry.active {
|
|
330
335
|
border-right-color: var(--vermillion);
|
|
331
336
|
}
|
|
@@ -335,7 +340,7 @@ onBeforeUnmount(() => document.removeEventListener('keydown', onKeydown))
|
|
|
335
340
|
}
|
|
336
341
|
|
|
337
342
|
.ann-pane.vertical .ann-pane-entry-head {
|
|
338
|
-
flex-direction:
|
|
343
|
+
flex-direction: row;
|
|
339
344
|
gap: 4px;
|
|
340
345
|
}
|
|
341
346
|
|
|
@@ -343,4 +348,12 @@ onBeforeUnmount(() => document.removeEventListener('keydown', onKeydown))
|
|
|
343
348
|
line-height: 2;
|
|
344
349
|
letter-spacing: 1px;
|
|
345
350
|
}
|
|
351
|
+
|
|
352
|
+
.ann-pane.vertical .ann-pane-header {
|
|
353
|
+
flex-direction: row;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.ann-pane.vertical .ann-pane-close {
|
|
357
|
+
writing-mode: horizontal-tb;
|
|
358
|
+
}
|
|
346
359
|
</style>
|
|
@@ -54,7 +54,7 @@ function kindLabel(ann: Annotation): string {
|
|
|
54
54
|
etymology: '詞源',
|
|
55
55
|
note: '備注',
|
|
56
56
|
definition: '釋義',
|
|
57
|
-
commentary: '
|
|
57
|
+
commentary: '注',
|
|
58
58
|
translation: '譯文',
|
|
59
59
|
person: '人名',
|
|
60
60
|
place: '地名',
|
|
@@ -414,26 +414,33 @@ onBeforeUnmount(() => {
|
|
|
414
414
|
.ann-card.vertical {
|
|
415
415
|
writing-mode: vertical-rl;
|
|
416
416
|
text-orientation: mixed;
|
|
417
|
+
flex-direction: row;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.ann-card.vertical .ann-card-head {
|
|
421
|
+
padding: 10px 6px;
|
|
417
422
|
}
|
|
418
423
|
|
|
419
424
|
.ann-card.vertical .ann-card-scroll {
|
|
420
425
|
display: flex;
|
|
421
426
|
flex-direction: row;
|
|
422
|
-
padding:
|
|
427
|
+
padding: 8px 6px;
|
|
428
|
+
overflow-y: auto;
|
|
423
429
|
}
|
|
424
430
|
|
|
425
431
|
.ann-card.vertical .ann-entry {
|
|
426
432
|
border-bottom: none;
|
|
427
|
-
padding: 8px
|
|
433
|
+
padding: 8px 0;
|
|
428
434
|
}
|
|
429
435
|
|
|
430
436
|
.ann-card.vertical .ann-entry + .ann-entry {
|
|
431
437
|
border-top: 1px solid var(--border-light);
|
|
432
|
-
margin-top: 4px;
|
|
433
438
|
}
|
|
434
439
|
|
|
435
440
|
.ann-card.vertical .ann-card-close {
|
|
436
441
|
writing-mode: horizontal-tb;
|
|
442
|
+
top: 4px;
|
|
443
|
+
right: 4px;
|
|
437
444
|
}
|
|
438
445
|
|
|
439
446
|
.ann-card.vertical .ann-pron-h {
|
|
@@ -442,7 +449,6 @@ onBeforeUnmount(() => {
|
|
|
442
449
|
|
|
443
450
|
.ann-card.vertical .ann-entry-body {
|
|
444
451
|
padding-left: 0;
|
|
445
|
-
padding-top: 4px;
|
|
446
452
|
}
|
|
447
453
|
|
|
448
454
|
.ann-card.vertical .ann-text {
|
|
@@ -453,6 +459,15 @@ onBeforeUnmount(() => {
|
|
|
453
459
|
.ann-sheet.vertical {
|
|
454
460
|
writing-mode: vertical-rl;
|
|
455
461
|
text-orientation: mixed;
|
|
462
|
+
flex-direction: row;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.ann-sheet.vertical .ann-sheet-handle {
|
|
466
|
+
writing-mode: horizontal-tb;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.ann-sheet.vertical .ann-sheet-head {
|
|
470
|
+
writing-mode: horizontal-tb;
|
|
456
471
|
}
|
|
457
472
|
|
|
458
473
|
.ann-sheet.vertical .ann-sheet-scroll {
|
|
@@ -460,17 +475,18 @@ onBeforeUnmount(() => {
|
|
|
460
475
|
flex-direction: column;
|
|
461
476
|
overflow-x: auto;
|
|
462
477
|
overflow-y: hidden;
|
|
463
|
-
padding:
|
|
478
|
+
padding: 8px 0 24px;
|
|
464
479
|
}
|
|
465
480
|
|
|
466
481
|
.ann-sheet.vertical .ann-entry {
|
|
482
|
+
flex-shrink: 0;
|
|
467
483
|
border-bottom: none;
|
|
468
|
-
|
|
469
|
-
|
|
484
|
+
padding: 0 14px;
|
|
485
|
+
border-right: 1px solid var(--border-light);
|
|
470
486
|
}
|
|
471
487
|
|
|
472
488
|
.ann-sheet.vertical .ann-entry:first-child {
|
|
473
|
-
border-
|
|
489
|
+
border-right: none;
|
|
474
490
|
}
|
|
475
491
|
|
|
476
492
|
.ann-sheet.vertical .ann-pron-h {
|
|
@@ -481,8 +497,4 @@ onBeforeUnmount(() => {
|
|
|
481
497
|
white-space: pre-line;
|
|
482
498
|
line-height: 2;
|
|
483
499
|
}
|
|
484
|
-
|
|
485
|
-
.ann-sheet.vertical .ann-sheet-handle {
|
|
486
|
-
writing-mode: horizontal-tb;
|
|
487
|
-
}
|
|
488
500
|
</style>
|
|
@@ -67,17 +67,20 @@ onUnmounted(detach)
|
|
|
67
67
|
.rp {
|
|
68
68
|
position: fixed;
|
|
69
69
|
z-index: 1001;
|
|
70
|
-
background: linear-gradient(90deg, var(--vermillion), var(--vermillion-light));
|
|
71
70
|
pointer-events: none;
|
|
72
71
|
will-change: width, height;
|
|
72
|
+
transition: width 0.1s ease, height 0.1s ease;
|
|
73
73
|
}
|
|
74
74
|
.rp:not(.rp-v) {
|
|
75
75
|
top: 0; left: 0;
|
|
76
76
|
height: 2px;
|
|
77
|
+
background: var(--vermillion);
|
|
78
|
+
box-shadow: 0 0 8px rgba(194, 58, 43, 0.3);
|
|
77
79
|
}
|
|
78
80
|
.rp-v {
|
|
79
81
|
top: 0; left: 0;
|
|
80
82
|
width: 2px;
|
|
81
|
-
background:
|
|
83
|
+
background: var(--vermillion);
|
|
84
|
+
box-shadow: 0 0 8px rgba(194, 58, 43, 0.3);
|
|
82
85
|
}
|
|
83
86
|
</style>
|
|
@@ -172,39 +172,51 @@ const paragraphsHtml = computed(() => {
|
|
|
172
172
|
text-orientation: mixed;
|
|
173
173
|
height: 100vh;
|
|
174
174
|
flex-shrink: 0;
|
|
175
|
-
padding: 32px
|
|
175
|
+
padding: 32px 24px;
|
|
176
176
|
border-right: 1px solid var(--border);
|
|
177
177
|
overflow-x: auto;
|
|
178
178
|
overflow-y: hidden;
|
|
179
179
|
opacity: 1;
|
|
180
180
|
transform: none;
|
|
181
181
|
transition: none;
|
|
182
|
+
scrollbar-width: thin;
|
|
183
|
+
scrollbar-color: var(--gold) transparent;
|
|
182
184
|
}
|
|
185
|
+
.sb-vertical::-webkit-scrollbar { height: 3px; }
|
|
186
|
+
.sb-vertical::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }
|
|
183
187
|
.sb-vertical .sb-header {
|
|
184
188
|
flex-direction: column;
|
|
185
189
|
align-items: flex-start;
|
|
186
190
|
margin-bottom: 0;
|
|
187
|
-
margin-left:
|
|
191
|
+
margin-left: 20px;
|
|
188
192
|
padding-bottom: 0;
|
|
189
193
|
border-bottom: none;
|
|
190
194
|
padding-left: 16px;
|
|
191
|
-
border-left:
|
|
195
|
+
border-left: 2px solid var(--vermillion);
|
|
192
196
|
}
|
|
193
197
|
.sb-vertical .sb-num {
|
|
194
198
|
width: auto; height: auto;
|
|
195
199
|
border-radius: 0;
|
|
196
200
|
background: none;
|
|
197
201
|
color: var(--vermillion);
|
|
198
|
-
font-size:
|
|
202
|
+
font-size: 16px;
|
|
203
|
+
}
|
|
204
|
+
.sb-vertical .sb-header h3 {
|
|
205
|
+
font-size: 20px;
|
|
206
|
+
letter-spacing: 6px;
|
|
199
207
|
}
|
|
200
208
|
.sb-vertical .sb-text {
|
|
201
209
|
margin-left: 16px;
|
|
202
210
|
text-align: start;
|
|
211
|
+
font-size: var(--body-font-size, 16px);
|
|
212
|
+
line-height: 2.2;
|
|
213
|
+
letter-spacing: 1px;
|
|
203
214
|
}
|
|
204
215
|
.sb-vertical .sb-text :deep(p) {
|
|
205
216
|
margin-bottom: 0;
|
|
206
217
|
margin-left: 12px;
|
|
207
218
|
text-indent: 0;
|
|
219
|
+
line-height: 2.4;
|
|
208
220
|
}
|
|
209
221
|
.sb-vertical .sb-ann-entry {
|
|
210
222
|
margin-bottom: 0;
|
|
@@ -347,10 +347,13 @@ function toggleSettings() { settingsOpen.value = !settingsOpen.value }
|
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
@media (max-width: 768px) {
|
|
350
|
-
.sidenav { width: 44px; padding: 8px 0; gap:
|
|
351
|
-
.sn-brand { width:
|
|
352
|
-
.sn-seal { font-size:
|
|
353
|
-
.sn-btn { width:
|
|
354
|
-
.sn-
|
|
350
|
+
.sidenav { width: 44px; padding: 8px 0; gap: 5px; }
|
|
351
|
+
.sn-brand { width: 30px; height: 36px; margin-bottom: 2px; }
|
|
352
|
+
.sn-seal { font-size: 14px; }
|
|
353
|
+
.sn-btn { width: 28px; height: 28px; }
|
|
354
|
+
.sn-btn svg { width: 15px; height: 15px; }
|
|
355
|
+
.sn-context { font-size: 10px; max-height: 70px; }
|
|
356
|
+
.sn-settings { width: 180px; right: 52px; padding: 12px; }
|
|
357
|
+
.sn-layout-tag { width: 20px; height: 20px; font-size: 10px; }
|
|
355
358
|
}
|
|
356
359
|
</style>
|
|
@@ -58,7 +58,7 @@ function onTap(event: MouseEvent) {
|
|
|
58
58
|
.v-scroll {
|
|
59
59
|
writing-mode: vertical-rl;
|
|
60
60
|
text-orientation: mixed;
|
|
61
|
-
height: calc(100vh -
|
|
61
|
+
height: calc(100vh - 100px);
|
|
62
62
|
overflow-x: auto; overflow-y: hidden;
|
|
63
63
|
padding: 32px 24px;
|
|
64
64
|
background: var(--surface);
|
|
@@ -67,15 +67,15 @@ function onTap(event: MouseEvent) {
|
|
|
67
67
|
box-shadow: 0 4px 16px rgba(var(--shadow-rgb), 0.08);
|
|
68
68
|
position: relative;
|
|
69
69
|
scrollbar-width: thin;
|
|
70
|
-
scrollbar-color: var(--gold)
|
|
70
|
+
scrollbar-color: var(--gold) transparent;
|
|
71
71
|
}
|
|
72
|
-
.v-scroll::-webkit-scrollbar { height:
|
|
72
|
+
.v-scroll::-webkit-scrollbar { height: 3px; }
|
|
73
73
|
.v-scroll::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }
|
|
74
74
|
|
|
75
75
|
.v-scroll-title {
|
|
76
76
|
font-size: 36px; font-weight: 900; color: var(--ink);
|
|
77
|
-
letter-spacing:
|
|
78
|
-
padding-left:
|
|
77
|
+
letter-spacing: 10px; margin-left: 24px;
|
|
78
|
+
padding-left: 20px; border-left: 3px solid var(--vermillion);
|
|
79
79
|
line-height: 1.6;
|
|
80
80
|
}
|
|
81
81
|
.v-scroll-author {
|
|
@@ -84,9 +84,9 @@ function onTap(event: MouseEvent) {
|
|
|
84
84
|
}
|
|
85
85
|
.v-scroll-clickable { cursor: pointer; transition: color 0.15s; }
|
|
86
86
|
.v-scroll-clickable:hover { color: var(--vermillion); }
|
|
87
|
-
.v-scroll-body { margin-left:
|
|
87
|
+
.v-scroll-body { margin-left: 24px; }
|
|
88
88
|
.v-scroll-line {
|
|
89
|
-
font-size: var(--main-font-size, 24px); line-height: 2.4; letter-spacing:
|
|
89
|
+
font-size: var(--main-font-size, 24px); line-height: 2.4; letter-spacing: 6px;
|
|
90
90
|
color: var(--ink); display: block;
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -228,8 +228,9 @@ button { font-family: inherit; }
|
|
|
228
228
|
scrollbar-width: thin;
|
|
229
229
|
scrollbar-color: var(--gold) transparent;
|
|
230
230
|
scroll-snap-type: x proximity;
|
|
231
|
+
scroll-padding: 0 48px;
|
|
231
232
|
}
|
|
232
|
-
.v-page::-webkit-scrollbar { height:
|
|
233
|
+
.v-page::-webkit-scrollbar { height: 3px; }
|
|
233
234
|
.v-page::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }
|
|
234
235
|
|
|
235
236
|
/* ===== VIEW LOADING STATE ===== */
|
|
@@ -284,3 +285,19 @@ button { font-family: inherit; }
|
|
|
284
285
|
object-fit: contain;
|
|
285
286
|
animation: pulse 1.2s ease-in-out infinite;
|
|
286
287
|
}
|
|
288
|
+
|
|
289
|
+
/* ===== LAYOUT TRANSITION ===== */
|
|
290
|
+
.v-root, .h-root {
|
|
291
|
+
transition: opacity 0.2s ease;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/* ===== DARK MODE VERTICAL WARMTH ===== */
|
|
295
|
+
[data-theme="dark"] .v-scroll,
|
|
296
|
+
[data-theme="oled"] .v-scroll {
|
|
297
|
+
box-shadow: 0 0 40px rgba(194, 58, 43, 0.03), 0 4px 16px rgba(0, 0, 0, 0.2);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
[data-theme="dark"] .sb-vertical,
|
|
301
|
+
[data-theme="oled"] .sb-vertical {
|
|
302
|
+
border-right-color: var(--border-light);
|
|
303
|
+
}
|
|
@@ -742,13 +742,13 @@ function tcy(n: number): string {
|
|
|
742
742
|
align-items: flex-start;
|
|
743
743
|
justify-content: center;
|
|
744
744
|
gap: 16px;
|
|
745
|
-
padding: 40px
|
|
745
|
+
padding: 40px 20px;
|
|
746
746
|
border-right: 1px solid var(--border);
|
|
747
747
|
scroll-snap-align: start;
|
|
748
748
|
}
|
|
749
749
|
.v-poem-title {
|
|
750
750
|
font-size: 40px; font-weight: 900;
|
|
751
|
-
letter-spacing:
|
|
751
|
+
letter-spacing: 10px; color: var(--ink);
|
|
752
752
|
padding-left: 20px;
|
|
753
753
|
border-left: 4px solid var(--vermillion);
|
|
754
754
|
line-height: 1.6;
|
|
@@ -783,7 +783,7 @@ function tcy(n: number): string {
|
|
|
783
783
|
flex-shrink: 0;
|
|
784
784
|
display: flex;
|
|
785
785
|
align-items: center;
|
|
786
|
-
padding:
|
|
786
|
+
padding: 20px 16px;
|
|
787
787
|
}
|
|
788
788
|
|
|
789
789
|
.v-multipart {
|
|
@@ -791,15 +791,15 @@ function tcy(n: number): string {
|
|
|
791
791
|
flex-direction: row-reverse;
|
|
792
792
|
align-items: flex-start;
|
|
793
793
|
gap: 0;
|
|
794
|
-
max-height: calc(100vh -
|
|
794
|
+
max-height: calc(100vh - 100px);
|
|
795
795
|
overflow-x: auto;
|
|
796
796
|
overflow-y: hidden;
|
|
797
|
-
padding:
|
|
797
|
+
padding: 20px 16px;
|
|
798
798
|
scrollbar-width: thin;
|
|
799
|
-
scrollbar-color: var(--gold)
|
|
799
|
+
scrollbar-color: var(--gold) transparent;
|
|
800
800
|
}
|
|
801
801
|
|
|
802
|
-
.v-multipart::-webkit-scrollbar { height:
|
|
802
|
+
.v-multipart::-webkit-scrollbar { height: 3px; }
|
|
803
803
|
.v-multipart::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }
|
|
804
804
|
|
|
805
805
|
.v-section {
|
|
@@ -831,15 +831,17 @@ function tcy(n: number): string {
|
|
|
831
831
|
flex-direction: row;
|
|
832
832
|
align-items: center;
|
|
833
833
|
justify-content: center;
|
|
834
|
-
padding: 24px
|
|
834
|
+
padding: 24px 16px;
|
|
835
835
|
gap: 32px;
|
|
836
836
|
scroll-snap-align: start;
|
|
837
|
+
background: var(--surface);
|
|
838
|
+
border-right: 1px solid var(--border-light);
|
|
837
839
|
}
|
|
838
840
|
.v-nav-spacer { flex: 1; }
|
|
839
841
|
.v-nav-btn {
|
|
840
842
|
writing-mode: vertical-rl;
|
|
841
843
|
text-orientation: mixed;
|
|
842
|
-
padding: 20px
|
|
844
|
+
padding: 20px 14px;
|
|
843
845
|
background: var(--surface);
|
|
844
846
|
border: 1px solid var(--border-light);
|
|
845
847
|
border-radius: 6px;
|
|
@@ -1345,10 +1347,16 @@ function tcy(n: number): string {
|
|
|
1345
1347
|
@media (max-width: 768px) {
|
|
1346
1348
|
/* ─── 直排模式 ─── */
|
|
1347
1349
|
.v-page { margin-right: var(--nav-width, 44px); }
|
|
1348
|
-
.v-title-col { padding:
|
|
1349
|
-
.v-poem-title { font-size:
|
|
1350
|
-
.v-poem-author { font-size:
|
|
1351
|
-
.v-poem-col { padding:
|
|
1350
|
+
.v-title-col { padding: 20px 12px; }
|
|
1351
|
+
.v-poem-title { font-size: 28px; letter-spacing: 6px; padding-left: 12px; }
|
|
1352
|
+
.v-poem-author { font-size: 18px; letter-spacing: 4px; }
|
|
1353
|
+
.v-poem-col { padding: 12px 8px; }
|
|
1354
|
+
.v-inline-nav { padding: 0 4px; }
|
|
1355
|
+
.v-inav { width: 26px; height: 36px; font-size: 12px; }
|
|
1356
|
+
.v-inav-spacer { width: 26px; height: 36px; }
|
|
1357
|
+
.v-nav { padding: 16px 8px; gap: 20px; }
|
|
1358
|
+
.v-nav-btn { padding: 14px 10px; }
|
|
1359
|
+
.v-nav-title { font-size: 16px; letter-spacing: 2px; }
|
|
1352
1360
|
|
|
1353
1361
|
/* ─── 橫排模式導航 ─── */
|
|
1354
1362
|
.h-nav { padding: 0 16px; }
|