Skip to content
Merged
83 changes: 55 additions & 28 deletions README.md

Large diffs are not rendered by default.

18 changes: 17 additions & 1 deletion docs/src/components/AVAnnotateDemo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,11 @@
<div
class="bg-gray-50 rounded-lg shadow-md border border-ink-200 max-h-[600px] flex flex-col overflow-clip"
>
<IIIFPlayer.Transcript {annotations}>
<IIIFPlayer.Transcript
{annotations}
searchSeekBehavior="activate"
scrollToSeek={false}
>
<IIIFPlayer.TranscriptSearch />
<IIIFPlayer.TranscriptSegments annotations={filteredAnnotations}>
{#snippet segment({
Expand Down Expand Up @@ -484,4 +488,16 @@
:global(.avannotate-demo [data-audio-control="time"]) {
@apply text-sm text-gray-600 font-medium;
}

:global(.avannotate-demo .follow-along-switch) {
@apply self-start inline-flex items-center gap-2 px-3 py-1 mb-2 rounded-full border border-ink-300 bg-white text-sm text-gray-700 transition-colors;
}

:global(.avannotate-demo .follow-along-switch[aria-checked="true"]) {
@apply bg-terracotta-500 border-terracotta-500 text-white;
}

:global(.avannotate-demo .jump-to-current) {
@apply self-start px-3 py-1 mb-2 rounded-full bg-terracotta-500 text-white text-sm transition-colors hover:bg-terracotta-600;
}
</style>
17 changes: 16 additions & 1 deletion docs/src/components/AutoTranscriptDemo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@
<div
class="bg-gray-50 rounded-lg shadow-md border border-ink-200 max-h-[600px] flex flex-col overflow-clip"
>
<IIIFPlayer.Transcript>
<IIIFPlayer.Transcript
searchSeekBehavior="activate"
scrollToSeek={false}
>
<IIIFPlayer.TranscriptSearch />
<IIIFPlayer.TranscriptSegments />
</IIIFPlayer.Transcript>
Expand Down Expand Up @@ -152,4 +155,16 @@
:global(.auto-transcript-demo [data-audio-control="time"]) {
@apply text-sm text-gray-600 font-medium;
}

:global(.auto-transcript-demo .follow-along-switch) {
@apply self-start inline-flex items-center gap-2 px-3 py-1 mb-2 rounded-full border border-ink-300 bg-white text-sm text-gray-700 transition-colors;
}

:global(.auto-transcript-demo .follow-along-switch[aria-checked="true"]) {
@apply bg-terracotta-500 border-terracotta-500 text-white;
}

:global(.auto-transcript-demo .jump-to-current) {
@apply self-start px-3 py-1 mb-2 rounded-full bg-terracotta-500 text-white text-sm transition-colors hover:bg-terracotta-600;
}
</style>
18 changes: 17 additions & 1 deletion docs/src/components/HTMLAnnotationsDemo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@
<div
class="bg-gray-50 rounded-lg shadow-md border border-ink-200 max-h-[600px] flex flex-col overflow-clip"
>
<IIIFPlayer.Transcript {annotations}>
<IIIFPlayer.Transcript
{annotations}
searchSeekBehavior="activate"
scrollToSeek={false}
>
<IIIFPlayer.TranscriptSearch />
<IIIFPlayer.TranscriptSegments>
{#snippet text({ annotation })}
Expand Down Expand Up @@ -142,4 +146,16 @@
:global(.html-annotations-demo [data-audio-control="time"]) {
@apply text-sm text-gray-600 font-medium;
}

:global(.html-annotations-demo .follow-along-switch) {
@apply self-start inline-flex items-center gap-2 px-3 py-1 mb-2 rounded-full border border-ink-300 bg-white text-sm text-gray-700 transition-colors;
}

:global(.html-annotations-demo .follow-along-switch[aria-checked="true"]) {
@apply bg-terracotta-500 border-terracotta-500 text-white;
}

:global(.html-annotations-demo .jump-to-current) {
@apply self-start px-3 py-1 mb-2 rounded-full bg-terracotta-500 text-white text-sm transition-colors hover:bg-terracotta-600;
}
</style>
20 changes: 19 additions & 1 deletion docs/src/components/IIIFTranscriptDemo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@
<div
class="bg-gray-50 rounded-lg shadow-md border border-ink-200 max-h-[600px] flex flex-col overflow-clip"
>
<IIIFPlayer.Transcript {annotations}>
<IIIFPlayer.Transcript
{annotations}
searchSeekBehavior="activate"
scrollToSeek={false}
>
<IIIFPlayer.TranscriptSearch />
<IIIFPlayer.TranscriptSegments />
</IIIFPlayer.Transcript>
Expand Down Expand Up @@ -176,4 +180,18 @@
:global(.iiif-transcript-demo [data-audio-control="time"]) {
@apply text-sm text-gray-600 font-medium;
}

/* Reading mode: the "Follow along" switch and "Jump to current" button
ship bare (semantics + state only) — this is the demo's own skin. */
:global(.iiif-transcript-demo .follow-along-switch) {
@apply self-start inline-flex items-center gap-2 px-3 py-1 mb-2 rounded-full border border-ink-300 bg-white text-sm text-gray-700 transition-colors;
}

:global(.iiif-transcript-demo .follow-along-switch[aria-checked="true"]) {
@apply bg-terracotta-500 border-terracotta-500 text-white;
}

:global(.iiif-transcript-demo .jump-to-current) {
@apply self-start px-3 py-1 mb-2 rounded-full bg-terracotta-500 text-white text-sm transition-colors hover:bg-terracotta-600;
}
</style>
Loading