@sarimarcus/content-sites-ui 0.41.1 → 0.41.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All packages in the platform release in lockstep; entries are per release version.
4
4
 
5
+ ## 0.41.2 (2026-10-21)
6
+
7
+ - `editorial`: `ChronologyTimeline`'s era index is now `TableOfContents` (card variant) instead of a row of chips: a collapsed jump list on mobile, a sticky bar once the index scrolls away, and the era in view marked with `data-active` / `aria-current`. The era anchor ids move from the era heading to its `<li>`, so the scrollspy follows the whole era and the sticky bar hides after the last one. Its markup changes on every page that renders the timeline (SLA-3274).
8
+
5
9
  ## 0.41.1 (2026-10-21)
6
10
 
7
11
  - `editorial`: `ChronologyTimeline` heads an era's entries without a `yearLabel` with a quiet "Undated" label (new `undatedLabel` prop, `LABELS.chronologyTimeline.undatedLabel`) and renders them after the dated ones; an era with only dated or only undated entries keeps its markup, and `undatedLabel=""` keeps one run. The era index is now a single-row, horizontally scrolling strip instead of wrapping chips (SLA-3274).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarimarcus/content-sites-ui",
3
- "version": "0.41.1",
3
+ "version": "0.41.2",
4
4
  "description": "Universal Astro UI components, layout shell and design tokens shared by the content sites.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -50,6 +50,6 @@
50
50
  "@lucide/astro": "^1.23.0",
51
51
  "astro": "^7.0.6",
52
52
  "tailwindcss": "^4.1.18",
53
- "@sarimarcus/content-sites-core": "0.41.1"
53
+ "@sarimarcus/content-sites-core": "0.41.2"
54
54
  }
55
55
  }
@@ -4,7 +4,7 @@
4
4
  * so eraHref() links never dead-end; 'show' renders every era in full.
5
5
  */
6
6
  import type { EraDefinition } from '@sarimarcus/content-sites-core/eras';
7
- import Chip from '../primitives/Chip.astro';
7
+ import TableOfContents from '../composed/TableOfContents.astro';
8
8
  import LinkArrow from '../primitives/LinkArrow.astro';
9
9
  import ResponsivePicture from '../primitives/ResponsivePicture.astro';
10
10
  import { LABELS } from '../internal/labels';
@@ -60,21 +60,22 @@ const thumbSizes = '(min-width: 640px) 128px, 64px';
60
60
 
61
61
  <div class:list={['w-full', className]} data-chronology>
62
62
  {index && fullEras.length > 1 && (
63
- <nav aria-label={indexLabel} class="mb-12 md:mb-16">
64
- <ol class="-m-1 flex gap-2 overflow-x-auto p-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">
65
- {fullEras.map((era) => (
66
- <li class="shrink-0"><Chip href={`#${era.anchor}`} tone="outlineQuiet" accent="primary" class="whitespace-nowrap">{era.label}</Chip></li>
67
- ))}
68
- </ol>
69
- </nav>
63
+ <TableOfContents
64
+ class="mb-12 md:mb-16"
65
+ showHeader={false}
66
+ ariaLabel={indexLabel}
67
+ items={fullEras.map((era) => ({ label: era.label, href: `#${era.anchor}` }))}
68
+ sectionSelector="[data-chronology-era]"
69
+ hideMiniPastLastSection
70
+ />
70
71
  )}
71
72
  <ol class="grid">
72
73
  {rows.map(({ era, runs, full }) => full ? (
73
- <li class="group/era grid grid-cols-[1.25rem_minmax(0,1fr)] grid-rows-[auto_auto_1fr] gap-x-4 md:grid-cols-[10rem_1.25rem_minmax(0,1fr)] md:grid-rows-[auto_1fr] md:gap-x-6" data-chronology-era={era.id}>
74
+ <li class="scroll-mt-28 group/era grid grid-cols-[1.25rem_minmax(0,1fr)] grid-rows-[auto_auto_1fr] gap-x-4 md:grid-cols-[10rem_1.25rem_minmax(0,1fr)] md:grid-rows-[auto_1fr] md:gap-x-6" id={era.anchor} data-chronology-era={era.id}>
74
75
  <div class="relative col-start-1 row-span-3 flex justify-center md:col-start-2 md:row-span-2 before:absolute before:inset-y-0 before:left-1/2 before:w-0.5 before:-translate-x-1/2 before:bg-foreground/15 group-first/era:before:top-3 md:group-first/era:before:top-4" aria-hidden="true">
75
76
  <span class="relative mt-3 size-3 rotate-45 bg-primary ring-4 ring-background md:mt-4 md:size-3.5"></span>
76
77
  </div>
77
- <h2 id={era.anchor} class="col-start-2 row-start-1 scroll-mt-28 font-display text-3xl leading-tight text-balance text-foreground md:col-start-3 md:text-4xl">{era.label}</h2>
78
+ <h2 class="col-start-2 row-start-1 font-display text-3xl leading-tight text-balance text-foreground md:col-start-3 md:text-4xl">{era.label}</h2>
78
79
  <p class="col-start-2 row-start-2 mt-1 font-display text-lg tabular-nums text-secondary md:col-start-1 md:row-start-1 md:row-span-2 md:mt-4 md:self-start md:sticky md:top-28 md:text-right md:text-xl md:leading-snug">{era.rangeLabel}</p>
79
80
  <div class="col-start-2 row-start-3 pb-16 md:col-start-3 md:row-start-2 md:pb-24 group-last/era:pb-0">
80
81
  <p class="mt-4 max-w-measure text-lg leading-relaxed text-foreground">{era.intro}</p>
@@ -124,11 +125,11 @@ const thumbSizes = '(min-width: 640px) 128px, 64px';
124
125
  </div>
125
126
  </li>
126
127
  ) : (
127
- <li class="group/era grid grid-cols-[1.25rem_minmax(0,1fr)] gap-x-4 md:grid-cols-[10rem_1.25rem_minmax(0,1fr)] md:gap-x-6" data-chronology-era={era.id} data-chronology-empty>
128
+ <li class="scroll-mt-28 group/era grid grid-cols-[1.25rem_minmax(0,1fr)] gap-x-4 md:grid-cols-[10rem_1.25rem_minmax(0,1fr)] md:gap-x-6" id={era.anchor} data-chronology-era={era.id} data-chronology-empty>
128
129
  <div class="relative col-start-1 flex justify-center md:col-start-2 before:absolute before:inset-y-0 before:left-1/2 before:w-0.5 before:-translate-x-1/2 before:bg-foreground/15 group-first/era:before:top-2" aria-hidden="true">
129
130
  <span class="relative mt-2 size-2 rotate-45 border border-muted-foreground bg-background"></span>
130
131
  </div>
131
- <p id={era.anchor} class="col-start-2 flex scroll-mt-28 flex-wrap items-baseline gap-x-2 pb-10 text-sm text-muted-foreground md:col-start-3 group-last/era:pb-0">
132
+ <p class="col-start-2 flex flex-wrap items-baseline gap-x-2 pb-10 text-sm text-muted-foreground md:col-start-3 group-last/era:pb-0">
132
133
  <span class="font-display text-base text-foreground">{era.label}</span>
133
134
  <span aria-hidden="true">·</span>
134
135
  <span class="tabular-nums">{era.rangeLabel}</span>