@sarimarcus/content-sites-ui 0.41.0 → 0.41.1
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.1 (2026-10-21)
|
|
6
|
+
|
|
7
|
+
- `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).
|
|
8
|
+
|
|
5
9
|
## 0.41.0 (2026-10-20)
|
|
6
10
|
|
|
7
11
|
- `editorial`: new `EraChip`, a Chip link from an article or monument to its era's section on the chronology page (`eraHref`), rendering nothing without an era; new `ChronologyTimeline`, a vertical rail of a site's eras (heading anchor, range, intro, dated entry rows, related dossiers, compact one-line markers for empty eras), with `groupByEra` and the `TimelineItem` type. No change to existing components' markup (SLA-3251).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sarimarcus/content-sites-ui",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.1",
|
|
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.
|
|
53
|
+
"@sarimarcus/content-sites-core": "0.41.1"
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -20,6 +20,8 @@ interface Props {
|
|
|
20
20
|
indexLabel?: string;
|
|
21
21
|
dossiersLabel?: string;
|
|
22
22
|
emptyLabel?: string;
|
|
23
|
+
/** Heads the entries without a `yearLabel` when an era also has dated ones, which then render first (order kept within each run); '' keeps one run in the given order. */
|
|
24
|
+
undatedLabel?: string;
|
|
23
25
|
class?: string;
|
|
24
26
|
}
|
|
25
27
|
|
|
@@ -31,13 +33,19 @@ const {
|
|
|
31
33
|
indexLabel = LABELS.chronologyTimeline.indexLabel,
|
|
32
34
|
dossiersLabel = LABELS.chronologyTimeline.dossiersLabel,
|
|
33
35
|
emptyLabel = LABELS.chronologyTimeline.emptyLabel,
|
|
36
|
+
undatedLabel = LABELS.chronologyTimeline.undatedLabel,
|
|
34
37
|
class: className,
|
|
35
38
|
} = Astro.props;
|
|
36
39
|
|
|
37
40
|
const ordered = [...eras].sort((a, b) => a.startYear - b.startYear);
|
|
38
41
|
const rows = ordered.map((era) => {
|
|
39
42
|
const entries = items[era.id] ?? [];
|
|
40
|
-
|
|
43
|
+
const dated = entries.filter((item) => item.yearLabel);
|
|
44
|
+
const undated = entries.filter((item) => !item.yearLabel);
|
|
45
|
+
const runs = undatedLabel && dated.length && undated.length
|
|
46
|
+
? [{ entries: dated, label: '' }, { entries: undated, label: undatedLabel }]
|
|
47
|
+
: [{ entries, label: '' }];
|
|
48
|
+
return { era, runs, full: entries.length > 0 || emptyEra === 'show' };
|
|
41
49
|
});
|
|
42
50
|
const fullEras = rows.filter((r) => r.full).map((r) => r.era);
|
|
43
51
|
|
|
@@ -53,15 +61,15 @@ const thumbSizes = '(min-width: 640px) 128px, 64px';
|
|
|
53
61
|
<div class:list={['w-full', className]} data-chronology>
|
|
54
62
|
{index && fullEras.length > 1 && (
|
|
55
63
|
<nav aria-label={indexLabel} class="mb-12 md:mb-16">
|
|
56
|
-
<ol class="
|
|
64
|
+
<ol class="-m-1 flex gap-2 overflow-x-auto p-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">
|
|
57
65
|
{fullEras.map((era) => (
|
|
58
|
-
<li><Chip href={`#${era.anchor}`} tone="outlineQuiet" accent="primary">{era.label}</Chip></li>
|
|
66
|
+
<li class="shrink-0"><Chip href={`#${era.anchor}`} tone="outlineQuiet" accent="primary" class="whitespace-nowrap">{era.label}</Chip></li>
|
|
59
67
|
))}
|
|
60
68
|
</ol>
|
|
61
69
|
</nav>
|
|
62
70
|
)}
|
|
63
71
|
<ol class="grid">
|
|
64
|
-
{rows.map(({ era,
|
|
72
|
+
{rows.map(({ era, runs, full }) => full ? (
|
|
65
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}>
|
|
66
74
|
<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">
|
|
67
75
|
<span class="relative mt-3 size-3 rotate-45 bg-primary ring-4 ring-background md:mt-4 md:size-3.5"></span>
|
|
@@ -70,9 +78,11 @@ const thumbSizes = '(min-width: 640px) 128px, 64px';
|
|
|
70
78
|
<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>
|
|
71
79
|
<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">
|
|
72
80
|
<p class="mt-4 max-w-measure text-lg leading-relaxed text-foreground">{era.intro}</p>
|
|
73
|
-
{entries.length > 0 && (
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
{runs.map((run) => run.entries.length > 0 && (
|
|
82
|
+
<>
|
|
83
|
+
{run.label && <p id={`${era.anchor}-undated`} class="mt-8 text-sm font-semibold text-muted-foreground">{run.label}</p>}
|
|
84
|
+
<ol aria-labelledby={run.label ? `${era.anchor}-undated` : undefined} class:list={[run.label ? 'mt-3' : 'mt-8', 'divide-y divide-border border-y border-border']}>
|
|
85
|
+
{run.entries.map((item) => (
|
|
76
86
|
<li class="group/entry relative flex items-start gap-3 py-5 sm:gap-6">
|
|
77
87
|
<div class="min-w-0 flex-1">
|
|
78
88
|
<h3 class="text-lg font-semibold leading-snug text-foreground text-pretty">
|
|
@@ -99,7 +109,8 @@ const thumbSizes = '(min-width: 640px) 128px, 64px';
|
|
|
99
109
|
</li>
|
|
100
110
|
))}
|
|
101
111
|
</ol>
|
|
102
|
-
|
|
112
|
+
</>
|
|
113
|
+
))}
|
|
103
114
|
{era.dossiers && era.dossiers.length > 0 && (
|
|
104
115
|
<div class="mt-8">
|
|
105
116
|
<p id={`${era.anchor}-dossiers`} class="text-sm font-semibold text-foreground">{dossiersLabel}</p>
|