@davmash/bygone 0.8.6 → 0.8.8

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/web/index.html CHANGED
@@ -60,6 +60,34 @@
60
60
  <span id="tour-breadcrumb" class="tour-breadcrumb"></span>
61
61
  <button id="tour-next" type="button" title="Next tour item (Right or Page Down)">Next →</button>
62
62
  </nav>
63
+ <div id="tour-narration-controls" class="tour-narration-controls" role="group" aria-label="Tour narration">
64
+ <div class="tour-narration-transport" role="group" aria-label="Narration playback">
65
+ <button id="tour-narration-skip-back" type="button" title="Previous sentence" aria-label="Previous sentence" disabled>
66
+ <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/></svg>
67
+ </button>
68
+ <button id="tour-listen" type="button" title="Listen from the current tour item" aria-label="Listen from the current tour item">
69
+ <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path class="tour-icon-fill tour-play-pause-icon" d="m8 5 11 7-11 7Z"/></svg>
70
+ </button>
71
+ <button id="tour-stop" type="button" title="Stop narration" aria-label="Stop narration" disabled>
72
+ <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path class="tour-icon-fill" d="M6 6h12v12H6z"/></svg>
73
+ </button>
74
+ <button id="tour-narration-skip-ahead" type="button" title="Next sentence" aria-label="Next sentence" disabled>
75
+ <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M21 12a9 9 0 1 1-3-6.7L21 8"/><path d="M21 3v5h-5"/></svg>
76
+ </button>
77
+ </div>
78
+ <div class="tour-narration-settings">
79
+ <select id="tour-narration-voice" aria-label="Narration voice" title="Narration voice" disabled>
80
+ <option value="">System default voice</option>
81
+ </select>
82
+ <select id="tour-narration-rate" aria-label="Narration speed" title="Narration speed">
83
+ <option value="0.75">0.75×</option>
84
+ <option value="1">1×</option>
85
+ <option value="1.25">1.25×</option>
86
+ <option value="1.5">1.5×</option>
87
+ </select>
88
+ </div>
89
+ <span id="tour-narration-status" class="tour-narration-status" role="status" aria-live="polite" aria-atomic="true">Device voice ready</span>
90
+ </div>
63
91
  <div class="tour-narrative-layout">
64
92
  <div class="tour-narrative-prose">
65
93
  <div id="tour-narrative-chapter" class="tour-narrative-chapter"></div>
@@ -113,13 +141,13 @@
113
141
  <div id="change-toolbar" class="change-toolbar header-align-diff" hidden>
114
142
  <div class="change-toolbar-main">
115
143
  <div class="change-toolbar-nav">
116
- <button id="previous-file" class="change-button icon-button" type="button" title="Open previous file" aria-label="Previous file">
144
+ <button id="previous-file" class="change-button icon-button" type="button" title="Open previous file" data-tooltip="Open previous file" aria-label="Previous file">
117
145
  <svg viewBox="0 0 24 24" aria-hidden="true">
118
146
  <path d="M17 11l-5-5-5 5"></path>
119
147
  <path d="M17 18l-5-5-5 5"></path>
120
148
  </svg>
121
149
  </button>
122
- <button id="next-file" class="change-button icon-button" type="button" title="Open next file" aria-label="Next file">
150
+ <button id="next-file" class="change-button icon-button" type="button" title="Open next file" data-tooltip="Open next file" aria-label="Next file">
123
151
  <svg viewBox="0 0 24 24" aria-hidden="true">
124
152
  <path d="M7 13l5 5 5-5"></path>
125
153
  <path d="M7 6l5 5 5-5"></path>
@@ -155,8 +183,15 @@
155
183
  </svg>
156
184
  </button>
157
185
  </div>
186
+ <div class="change-toolbar-actions">
158
187
  <button id="toggle-word-wrap" class="change-button icon-button" type="button" title="Enable line wrapping (Alt+Z)" aria-label="Enable line wrapping" aria-pressed="false" hidden>
159
- <svg viewBox="0 0 24 24" aria-hidden="true">
188
+ <svg class="word-wrap-icon-off" viewBox="0 0 24 24" aria-hidden="true">
189
+ <path d="M4 6h13a3 3 0 0 1 0 6H9"></path>
190
+ <path d="M12 9l-3 3 3 3"></path>
191
+ <path d="M4 18h8"></path>
192
+ <path d="M5 4l14 16"></path>
193
+ </svg>
194
+ <svg class="word-wrap-icon-on" viewBox="0 0 24 24" aria-hidden="true">
160
195
  <path d="M4 6h13a3 3 0 0 1 0 6H9"></path>
161
196
  <path d="M12 9l-3 3 3 3"></path>
162
197
  <path d="M4 18h8"></path>
@@ -168,6 +203,7 @@
168
203
  <path d="M20 5v6h-6"></path>
169
204
  </svg>
170
205
  </button>
206
+ </div>
171
207
  </div>
172
208
  <div class="change-hint">F7 / Shift+F7 · Cmd/Ctrl+Shift+Up/Down to jump.</div>
173
209
  </div>
@@ -177,14 +213,14 @@
177
213
  <div id="history-left-time" class="history-time"></div>
178
214
  </div>
179
215
  <div class="history-nav">
180
- <button id="history-back" class="history-button icon-button" type="button" title="Open older commit" aria-label="Older commit">
216
+ <button id="history-back" class="history-button icon-button" type="button" title="Open older commit" data-tooltip="Open older commit" aria-label="Older commit">
181
217
  <svg viewBox="0 0 24 24" aria-hidden="true">
182
218
  <path d="M15 18l-6-6 6-6"></path>
183
219
  <path d="M10 18l-6-6 6-6" opacity="0.7"></path>
184
220
  </svg>
185
221
  </button>
186
222
  <div id="history-position" class="history-position" role="status" aria-live="polite" aria-atomic="true"></div>
187
- <button id="history-forward" class="history-button icon-button" type="button" title="Open newer commit" aria-label="Newer commit">
223
+ <button id="history-forward" class="history-button icon-button" type="button" title="Open newer commit" data-tooltip="Open newer commit" aria-label="Newer commit">
188
224
  <svg viewBox="0 0 24 24" aria-hidden="true">
189
225
  <path d="M9 18l6-6-6-6"></path>
190
226
  <path d="M14 18l6-6-6-6" opacity="0.7"></path>
package/web/presenter.css CHANGED
@@ -319,6 +319,121 @@ body.tour-discussion .tour-narrative-resizer {
319
319
  cursor: default;
320
320
  }
321
321
 
322
+ .tour-narration-controls {
323
+ display: flex;
324
+ flex-wrap: wrap;
325
+ gap: 6px;
326
+ align-items: center;
327
+ margin: -4px 0 12px;
328
+ padding: 5px;
329
+ border: 1px solid var(--tour-border);
330
+ border-radius: 8px;
331
+ background: rgba(255, 255, 255, 0.025);
332
+ }
333
+
334
+ .tour-narration-controls select {
335
+ height: 28px;
336
+ padding: 3px 7px;
337
+ color: var(--tour-muted);
338
+ border: 1px solid var(--tour-border);
339
+ border-radius: 5px;
340
+ background: rgba(255, 255, 255, 0.035);
341
+ font: inherit;
342
+ }
343
+
344
+ .tour-narration-transport,
345
+ .tour-narration-settings {
346
+ display: inline-flex;
347
+ align-items: center;
348
+ }
349
+
350
+ .tour-narration-transport {
351
+ overflow: hidden;
352
+ border: 1px solid var(--tour-border);
353
+ border-radius: 6px;
354
+ }
355
+
356
+ .tour-narration-transport button {
357
+ display: grid;
358
+ width: 30px;
359
+ height: 28px;
360
+ padding: 0;
361
+ place-items: center;
362
+ color: var(--tour-muted);
363
+ border: 0;
364
+ border-right: 1px solid var(--tour-border);
365
+ background: rgba(255, 255, 255, 0.035);
366
+ cursor: pointer;
367
+ }
368
+
369
+ .tour-narration-transport button:last-child {
370
+ border-right: 0;
371
+ }
372
+
373
+ .tour-narration-transport button svg {
374
+ width: 16px;
375
+ height: 16px;
376
+ fill: none;
377
+ stroke: currentColor;
378
+ stroke-width: 1.8;
379
+ stroke-linecap: round;
380
+ stroke-linejoin: round;
381
+ }
382
+
383
+ .tour-narration-transport button svg .tour-icon-fill {
384
+ fill: currentColor;
385
+ stroke: none;
386
+ }
387
+
388
+ .tour-narration-transport #tour-listen {
389
+ color: var(--tour-accent-bright);
390
+ }
391
+
392
+ .tour-narration-transport button:hover:not(:disabled),
393
+ .tour-narration-transport button:focus-visible,
394
+ .tour-narration-controls select:focus-visible {
395
+ color: #fff;
396
+ outline: none;
397
+ background: rgba(169, 159, 255, 0.13);
398
+ box-shadow: inset 0 0 0 1px rgba(169, 159, 255, 0.55);
399
+ }
400
+
401
+ .tour-narration-transport button:disabled,
402
+ .tour-narration-controls select:disabled {
403
+ opacity: 0.36;
404
+ }
405
+
406
+ .tour-narration-settings {
407
+ gap: 5px;
408
+ }
409
+
410
+ .tour-narration-controls select {
411
+ max-width: min(210px, 29vw);
412
+ }
413
+
414
+ .tour-narration-status {
415
+ margin-left: auto;
416
+ color: var(--tour-faint);
417
+ text-align: right;
418
+ }
419
+
420
+ .tour-narration-segment {
421
+ border-radius: 3px;
422
+ box-decoration-break: clone;
423
+ -webkit-box-decoration-break: clone;
424
+ transition: background-color 100ms ease, box-shadow 100ms ease;
425
+ }
426
+
427
+ .tour-narration-segment.is-speaking {
428
+ background: rgba(255, 211, 92, 0.18);
429
+ box-shadow: inset 0 -2px 0 rgba(255, 211, 92, 0.78);
430
+ }
431
+
432
+ .tour-narration-segment.is-speaking.is-paused {
433
+ background: rgba(169, 159, 255, 0.16);
434
+ box-shadow: inset 0 -2px 0 rgba(169, 159, 255, 0.72);
435
+ }
436
+
322
437
  .tour-breadcrumb {
323
438
  min-width: 0;
324
439
  color: var(--tour-muted);
@@ -674,6 +789,11 @@ body.tour-discussion .tour-narrative-nav {
674
789
  margin-bottom: clamp(22px, 4vh, 36px);
675
790
  }
676
791
 
792
+ body.tour-discussion .tour-narration-controls {
793
+ max-width: 1000px;
794
+ margin-bottom: clamp(18px, 3vh, 28px);
795
+ }
796
+
677
797
  body.tour-discussion .tour-narrative-layout {
678
798
  display: block;
679
799
  }
@@ -811,4 +931,20 @@ body.tour-discussion .tour-narrative-takeaway {
811
931
  min-width: 64px;
812
932
  padding-inline: 7px;
813
933
  }
934
+
935
+ .tour-narration-controls select {
936
+ max-width: 150px;
937
+ }
938
+
939
+ .tour-narration-status {
940
+ width: 100%;
941
+ margin-left: 0;
942
+ text-align: left;
943
+ }
944
+ }
945
+
946
+ @media (prefers-reduced-motion: reduce) {
947
+ .tour-narration-segment {
948
+ transition: none;
949
+ }
814
950
  }