@hanology/cham-browser 0.4.27 → 0.4.28

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanology/cham-browser",
3
- "version": "0.4.27",
3
+ "version": "0.4.28",
4
4
  "description": "CHAM — browser-compatible parser, serializer, and site generator for Classical Han Annotated Markdown",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -155,21 +155,27 @@ onBeforeUnmount(() => {
155
155
  <button class="ann-sheet-handle" @click="dismiss">
156
156
  <span class="ann-handle-bar" />
157
157
  </button>
158
- <div v-if="headword" class="ann-sheet-head" :class="dominantKind()">
159
- <span class="ann-headword">{{ headword }}</span>
160
- <span class="ann-badge-count" v-if="annotations.length > 1">{{ annotations.length }}</span>
161
- </div>
162
- <div class="ann-sheet-scroll">
163
- <div v-for="ann in annotations" :key="ann.id" class="ann-entry">
164
- <div class="ann-entry-header">
165
- <span class="ann-kind" :class="ann.kind">{{ kindLabel(ann) }}</span>
166
- <span v-if="layerLabel(ann)" class="ann-layer">{{ layerLabel(ann) }}</span>
167
- </div>
168
- <div class="ann-entry-body">
169
- <div v-if="getSegment(ann)" class="ann-pron-h"><PronunciationGroup :segment="getSegment(ann)!" /></div>
170
- <div v-if="ann.text && ann.kind !== 'pronunciation'" class="ann-text">{{ ann.text }}</div>
158
+ <div class="ann-sheet-body" :class="{ vertical }">
159
+ <div v-if="headword" class="ann-sheet-head" :class="dominantKind()">
160
+ <span class="ann-headword">{{ headword }}</span>
161
+ <span class="ann-badge-count" v-if="annotations.length > 1">{{ annotations.length }}</span>
162
+ </div>
163
+ <div class="ann-sheet-scroll">
164
+ <div v-for="ann in annotations" :key="ann.id" class="ann-entry">
165
+ <div class="ann-entry-header">
166
+ <span class="ann-kind" :class="ann.kind">{{ kindLabel(ann) }}</span>
167
+ <span v-if="layerLabel(ann)" class="ann-layer">{{ layerLabel(ann) }}</span>
168
+ </div>
169
+ <div class="ann-entry-body">
170
+ <div v-if="getSegment(ann)" class="ann-pron-h"><PronunciationGroup :segment="getSegment(ann)!" /></div>
171
+ <div v-if="ann.text && ann.kind !== 'pronunciation'" class="ann-text">{{ ann.text }}</div>
172
+ </div>
171
173
  </div>
172
174
  </div>
175
+ <div v-if="headword" class="ann-sheet-v-head" :class="dominantKind()">
176
+ <span class="ann-sheet-v-word">{{ headword }}</span>
177
+ <span v-if="annotations.length > 1" class="ann-badge-count-v">{{ annotations.length }}</span>
178
+ </div>
173
179
  </div>
174
180
  </div>
175
181
  </Transition>
@@ -467,50 +473,69 @@ onBeforeUnmount(() => {
467
473
  line-height: 2;
468
474
  }
469
475
 
470
- .ann-sheet.vertical {
471
- writing-mode: vertical-rl;
472
- text-orientation: mixed;
473
- flex-direction: row;
476
+ .ann-sheet-body {
477
+ flex: 1;
478
+ display: flex;
479
+ flex-direction: column;
480
+ overflow: hidden;
481
+ min-height: 0;
474
482
  }
475
483
 
476
- .ann-sheet.vertical .ann-sheet-handle {
477
- writing-mode: horizontal-tb;
478
- position: absolute;
479
- top: 0;
480
- left: 0;
481
- right: 0;
482
- padding: 6px 0 0;
483
- z-index: 1;
484
+ .ann-sheet-body.vertical {
485
+ flex-direction: row-reverse;
484
486
  }
485
487
 
486
- .ann-sheet.vertical .ann-sheet-head {
487
- writing-mode: horizontal-tb;
488
+ .ann-sheet-body.vertical > .ann-sheet-head {
489
+ display: none;
488
490
  }
489
491
 
490
- .ann-sheet.vertical .ann-sheet-scroll {
491
- display: flex;
492
- flex-direction: column;
493
- overflow-x: auto;
494
- overflow-y: hidden;
495
- padding: 8px 0 24px;
492
+ .ann-sheet-body:not(.vertical) > .ann-sheet-v-head {
493
+ display: none;
496
494
  }
497
495
 
498
- .ann-sheet.vertical .ann-entry {
496
+ .ann-sheet-v-head {
497
+ writing-mode: vertical-rl;
498
+ text-orientation: upright;
499
+ display: flex;
500
+ flex-direction: row;
501
+ align-items: center;
502
+ gap: 8px;
503
+ padding: 12px 10px;
504
+ border-left: 1px solid var(--border-light);
499
505
  flex-shrink: 0;
500
- border-bottom: none;
501
- padding: 0 14px;
502
- border-right: 1px solid var(--border-light);
503
506
  }
504
507
 
505
- .ann-sheet.vertical .ann-entry:first-child {
506
- border-right: none;
508
+ .ann-sheet-v-word {
509
+ font-family: var(--serif);
510
+ font-size: 20px;
511
+ font-weight: 900;
512
+ letter-spacing: 6px;
513
+ color: var(--ink);
514
+ }
515
+
516
+ .ann-badge-count-v {
517
+ font-family: var(--sans);
518
+ font-size: 11px;
519
+ font-weight: 700;
520
+ color: var(--ink-faint);
521
+ background: var(--surface-warm);
522
+ border: 1px solid var(--border-light);
523
+ border-radius: 10px;
524
+ padding: 2px 8px;
525
+ letter-spacing: 0;
526
+ writing-mode: horizontal-tb;
527
+ }
528
+
529
+ .ann-sheet-body.vertical .ann-sheet-scroll {
530
+ flex: 1;
531
+ min-width: 0;
507
532
  }
508
533
 
509
- .ann-sheet.vertical .ann-pron-h {
534
+ .ann-sheet-body.vertical .ann-pron-h {
510
535
  writing-mode: horizontal-tb;
511
536
  }
512
537
 
513
- .ann-sheet.vertical .ann-text {
538
+ .ann-sheet-body.vertical .ann-text {
514
539
  white-space: pre-line;
515
540
  line-height: 2;
516
541
  }