@cedros/data-react 0.1.7 → 0.1.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.
Files changed (33) hide show
  1. package/dist/docsContract.d.ts +56 -0
  2. package/dist/docsContract.js +136 -0
  3. package/dist/react/docs.d.ts +14 -0
  4. package/dist/react/docs.js +207 -0
  5. package/dist/react/index.d.ts +2 -1
  6. package/dist/react/index.js +1 -0
  7. package/dist/react/server.d.ts +2 -1
  8. package/dist/react/server.js +1 -0
  9. package/dist/react/types.d.ts +17 -0
  10. package/dist/site-templates/BlogTemplates.js +16 -12
  11. package/dist/site-templates/DocsSidebar.d.ts +1 -1
  12. package/dist/site-templates/DocsSidebar.js +2 -2
  13. package/dist/site-templates/DocsTemplates.js +13 -14
  14. package/dist/site-templates/SiteFooter.js +1 -1
  15. package/dist/site-templates/SiteLayout.js +1 -1
  16. package/dist/site-templates/TopNav.js +1 -1
  17. package/dist/site-templates/blog-styles.css +259 -0
  18. package/dist/site-templates/blogControls.js +2 -2
  19. package/dist/site-templates/blogTemplateUi.d.ts +10 -0
  20. package/dist/site-templates/blogTemplateUi.js +4 -0
  21. package/dist/site-templates/content-styles.css +127 -309
  22. package/dist/site-templates/contentIndex.d.ts +4 -11
  23. package/dist/site-templates/contentIndex.js +10 -0
  24. package/dist/site-templates/contentUi.js +4 -3
  25. package/dist/site-templates/dashboard-styles.css +109 -0
  26. package/dist/site-templates/docs-layout.css +372 -0
  27. package/dist/site-templates/docs-styles.css +288 -96
  28. package/dist/site-templates/docsNavigation.d.ts +23 -3
  29. package/dist/site-templates/docsNavigation.js +178 -75
  30. package/dist/site-templates/index.d.ts +2 -1
  31. package/dist/site-templates/index.js +2 -1
  32. package/dist/site-templates/styles.css +283 -201
  33. package/package.json +1 -1
@@ -1,35 +1,75 @@
1
1
  @import "./docs-styles.css";
2
+ @import "./docs-layout.css";
3
+ @import "./blog-styles.css";
2
4
  @import "./monetization-styles.css";
3
5
 
4
6
  .cedros-site__controls {
5
- margin-top: 1rem;
6
7
  display: grid;
7
- grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
8
- gap: 0.7rem;
8
+ gap: 1rem;
9
+ }
10
+
11
+ .cedros-site__controls--docs {
12
+ padding: 1.15rem 1.2rem 1.25rem;
13
+ }
14
+
15
+ .cedros-site__controls-header {
16
+ display: flex;
17
+ align-items: flex-start;
18
+ justify-content: space-between;
19
+ gap: 1rem;
20
+ }
21
+
22
+ .cedros-site__controls-grid {
23
+ display: grid;
24
+ grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
25
+ gap: 0.9rem;
9
26
  align-items: end;
10
27
  }
11
28
 
12
29
  .cedros-site__control {
13
30
  display: grid;
14
- gap: 0.35rem;
15
- font-size: 0.78rem;
31
+ gap: 0.42rem;
16
32
  color: var(--cds-muted);
17
33
  }
18
34
 
35
+ .cedros-site__control span {
36
+ font-size: 0.77rem;
37
+ font-weight: 700;
38
+ letter-spacing: 0.02em;
39
+ }
40
+
19
41
  .cedros-site__control input,
20
42
  .cedros-site__control select {
21
43
  width: 100%;
22
- border: 1px solid var(--cds-border);
23
- border-radius: calc(var(--cds-radius) - 2px);
24
- background: color-mix(in srgb, var(--cds-bg) 90%, var(--cds-muted-bg) 10%);
44
+ min-height: 2.75rem;
45
+ border: 1px solid color-mix(in srgb, var(--cds-border) 88%, transparent);
46
+ border-radius: calc(var(--cds-radius) - 0.05rem);
47
+ background: color-mix(in srgb, var(--cds-panel) 86%, transparent);
25
48
  color: var(--cds-fg);
26
- height: 2.25rem;
27
- padding: 0 0.6rem;
49
+ padding: 0 0.85rem;
50
+ box-shadow: inset 0 1px 0 rgb(255 255 255 / 38%);
51
+ transition:
52
+ border-color 140ms ease,
53
+ box-shadow 140ms ease,
54
+ background 140ms ease;
55
+ }
56
+
57
+ .cedros-site__control input::placeholder {
58
+ color: color-mix(in srgb, var(--cds-muted) 74%, transparent);
59
+ }
60
+
61
+ .cedros-site__control input:focus,
62
+ .cedros-site__control select:focus {
63
+ outline: none;
64
+ border-color: color-mix(in srgb, var(--cds-link) 48%, var(--cds-border) 52%);
65
+ box-shadow: 0 0 0 0.24rem color-mix(in srgb, var(--cds-link) 12%, transparent);
66
+ background: var(--cds-panel);
28
67
  }
29
68
 
30
69
  .cedros-site__control-actions {
31
70
  display: inline-flex;
32
- gap: 0.5rem;
71
+ flex-wrap: wrap;
72
+ gap: 0.55rem;
33
73
  align-items: center;
34
74
  }
35
75
 
@@ -38,382 +78,160 @@
38
78
  }
39
79
 
40
80
  .cedros-site__content-grid {
41
- margin-top: 1rem;
81
+ margin-top: 0;
42
82
  display: grid;
43
- gap: 0.85rem;
83
+ gap: 1rem;
44
84
  }
45
85
 
46
86
  .cedros-site__content-grid--docs {
47
- grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
87
+ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
48
88
  }
49
89
 
50
90
  .cedros-site__entry-card {
51
91
  display: grid;
52
- gap: 0.6rem;
92
+ gap: 0.75rem;
53
93
  }
54
94
 
55
95
  .cedros-site__entry-header {
56
96
  display: flex;
57
97
  align-items: flex-start;
58
98
  justify-content: space-between;
59
- gap: 0.6rem;
99
+ gap: 0.75rem;
60
100
  }
61
101
 
62
102
  .cedros-site__entry-title {
63
103
  margin: 0;
64
- font-size: 1rem;
104
+ font-size: 1.02rem;
105
+ line-height: 1.25;
106
+ letter-spacing: -0.03em;
107
+ }
108
+
109
+ .cedros-site__entry-title--docs {
110
+ font-size: 1.18rem;
65
111
  }
66
112
 
67
113
  .cedros-site__entry-title a {
68
114
  text-decoration: none;
115
+ color: var(--cds-fg);
69
116
  }
70
117
 
71
118
  .cedros-site__entry-title a:hover {
72
- text-decoration: underline;
119
+ color: var(--cds-link-strong);
73
120
  }
74
121
 
75
122
  .cedros-site__entry-meta {
76
123
  margin: 0;
77
124
  font-size: 0.78rem;
78
125
  color: var(--cds-muted);
126
+ line-height: 1.6;
79
127
  }
80
128
 
81
129
  .cedros-site__tag-list {
82
130
  display: inline-flex;
83
131
  flex-wrap: wrap;
84
- gap: 0.35rem;
85
- }
86
-
87
- .cedros-site__pagination {
88
- margin-top: 0.8rem;
89
- display: inline-flex;
90
- flex-wrap: wrap;
91
- gap: 0.45rem;
92
- }
93
-
94
- .cedros-site__breadcrumbs {
95
- margin-top: 0.2rem;
96
- display: inline-flex;
97
- flex-wrap: wrap;
98
- align-items: center;
99
132
  gap: 0.45rem;
100
- font-size: 0.78rem;
101
- color: var(--cds-muted);
102
133
  }
103
134
 
104
- .cedros-site__breadcrumbs a {
105
- color: var(--cds-muted);
106
- text-decoration: none;
107
- }
108
-
109
- .cedros-site__breadcrumbs a:hover {
110
- color: var(--cds-fg);
111
- text-decoration: underline;
135
+ .cedros-site__tag-list .cedros-site__pill:hover {
136
+ border-color: color-mix(in srgb, var(--cds-link) 34%, var(--cds-border) 66%);
137
+ background: var(--cds-link-soft);
138
+ color: var(--cds-link-strong);
112
139
  }
113
140
 
114
- .cedros-site__docs-page {
115
- margin-top: 0.85rem;
116
- display: grid;
141
+ .cedros-site__pagination {
142
+ display: flex;
143
+ align-items: center;
144
+ justify-content: space-between;
117
145
  gap: 1rem;
118
- grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
119
- align-items: start;
120
146
  }
121
147
 
122
- .cedros-site__docs-page--article {
123
- grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(220px, 260px);
124
- }
125
-
126
- .cedros-site__docs-main {
127
- min-width: 0;
128
- }
129
-
130
- .cedros-site__docs-sidebar {
131
- position: sticky;
132
- top: 0.95rem;
133
- display: grid;
134
- gap: 0.75rem;
135
- }
136
-
137
- .cedros-site__docs-sidebar-title {
148
+ .cedros-site__pagination-meta {
138
149
  margin: 0;
139
- font-size: 0.95rem;
140
- }
141
-
142
- .cedros-site__docs-search {
143
- display: grid;
144
- gap: 0.45rem;
145
- }
146
-
147
- .cedros-site__docs-root-link {
148
150
  font-size: 0.8rem;
149
- text-decoration: none;
150
151
  color: var(--cds-muted);
151
152
  }
152
153
 
153
- .cedros-site__docs-root-link:hover {
154
- color: var(--cds-fg);
155
- text-decoration: underline;
156
- }
157
-
158
- .cedros-site__docs-section {
159
- display: grid;
160
- gap: 0.35rem;
161
- }
162
-
163
- .cedros-site__docs-section-title {
164
- margin: 0;
165
- font-size: 0.72rem;
166
- color: var(--cds-muted);
167
- text-transform: uppercase;
168
- letter-spacing: 0.03em;
169
- }
170
-
171
- .cedros-site__docs-section-links {
172
- display: grid;
173
- gap: 0.2rem;
174
- }
175
-
176
- .cedros-site__docs-item {
177
- border: 1px solid transparent;
178
- border-radius: calc(var(--cds-radius) - 2px);
179
- padding: 0.35rem 0.48rem;
180
- text-decoration: none;
181
- color: var(--cds-muted);
182
- font-size: 0.79rem;
154
+ .cedros-site__pagination-links {
183
155
  display: inline-flex;
184
- align-items: center;
185
- justify-content: space-between;
156
+ flex-wrap: wrap;
186
157
  gap: 0.45rem;
187
158
  }
188
159
 
189
- .cedros-site__docs-item:hover {
190
- color: var(--cds-fg);
191
- background: var(--cds-muted-bg);
192
- border-color: var(--cds-border);
193
- }
194
-
195
- .cedros-site__docs-item--active {
196
- color: var(--cds-fg);
197
- border-color: color-mix(in srgb, var(--cds-link) 50%, var(--cds-border) 50%);
198
- background: color-mix(in srgb, var(--cds-link) 9%, var(--cds-muted-bg) 91%);
199
- }
200
-
201
- .cedros-site__docs-item--depth-0 {
202
- padding-left: 0;
203
- }
204
-
205
- .cedros-site__docs-item--depth-1 {
206
- padding-left: 0.9rem;
207
- }
208
-
209
- .cedros-site__docs-item--depth-2 {
210
- padding-left: 1.3rem;
211
- }
212
-
213
- .cedros-site__docs-item-badge {
214
- border: 1px solid var(--cds-border);
215
- border-radius: 999px;
216
- padding: 0.05rem 0.38rem;
217
- font-size: 0.67rem;
218
- color: var(--cds-muted);
219
- }
220
-
221
- .cedros-site__article-layout {
222
- margin-top: 0.85rem;
223
- display: grid;
224
- gap: 1rem;
225
- grid-template-columns: minmax(0, 1fr) minmax(220px, 270px);
226
- align-items: start;
227
- }
228
-
229
- .cedros-site__article {
230
- min-width: 0;
231
- }
232
-
233
- .cedros-site__article-header {
234
- display: grid;
235
- gap: 0.55rem;
236
- }
237
-
238
- .cedros-site__prose {
239
- margin-top: 1rem;
240
- display: grid;
241
- gap: 0.85rem;
242
- line-height: 1.65;
243
- }
244
-
245
- .cedros-site__prose :where(h2, h3, h4) {
246
- margin: 1rem 0 0;
247
- line-height: 1.25;
248
- }
249
-
250
- .cedros-site__prose p {
251
- margin: 0;
252
- }
253
-
254
- .cedros-site__prose pre {
255
- margin: 0;
256
- padding: 0.9rem;
257
- border-radius: calc(var(--cds-radius) - 2px);
258
- border: 1px solid var(--cds-border);
259
- overflow-x: auto;
260
- background: color-mix(in srgb, var(--cds-muted-bg) 85%, var(--cds-bg) 15%);
261
- font-size: 0.82rem;
262
- }
263
-
264
- .cedros-site__prose code {
265
- font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
266
- }
267
-
268
- .cedros-site__prose :not(pre) > code {
269
- border: 1px solid var(--cds-border);
270
- border-radius: 0.3rem;
271
- background: color-mix(in srgb, var(--cds-muted-bg) 85%, var(--cds-bg) 15%);
272
- padding: 0.1rem 0.3rem;
273
- }
274
-
275
- .cedros-site__prose blockquote {
276
- margin: 0;
277
- padding: 0.6rem 0.8rem;
278
- border-left: 3px solid var(--cds-border);
279
- color: var(--cds-muted);
280
- background: color-mix(in srgb, var(--cds-muted-bg) 72%, var(--cds-bg) 28%);
281
- border-radius: calc(var(--cds-radius) - 2px);
282
- }
283
-
284
- .cedros-site__prose img {
285
- max-width: 100%;
286
- height: auto;
287
- border-radius: calc(var(--cds-radius) - 2px);
288
- }
289
-
290
- .cedros-site__content-warning {
291
- margin: 0;
160
+ .cedros-site__breadcrumbs {
161
+ display: inline-flex;
162
+ flex-wrap: wrap;
163
+ align-items: center;
164
+ gap: 0.3rem;
165
+ font-size: 0.78rem;
292
166
  color: var(--cds-muted);
293
- border: 1px dashed var(--cds-border);
294
- border-radius: calc(var(--cds-radius) - 2px);
295
- padding: 0.65rem 0.8rem;
296
- background: color-mix(in srgb, var(--cds-muted-bg) 78%, var(--cds-bg) 22%);
297
- }
298
-
299
- .cedros-site__toc {
300
- position: sticky;
301
- top: 1rem;
302
- display: grid;
303
- gap: 0.55rem;
304
167
  }
305
168
 
306
- .cedros-site__toc-title {
307
- margin: 0;
308
- font-size: 0.9rem;
309
- }
310
-
311
- .cedros-site__toc-links {
312
- display: grid;
313
- gap: 0.35rem;
314
- }
315
-
316
- .cedros-site__toc-link {
317
- color: var(--cds-muted);
169
+ .cedros-site__breadcrumbs a {
170
+ color: inherit;
318
171
  text-decoration: none;
319
- font-size: 0.8rem;
320
- }
321
-
322
- .cedros-site__toc-link--depth-2 {
323
- padding-left: 0;
324
- }
325
-
326
- .cedros-site__toc-link--depth-3 {
327
- padding-left: 0.65rem;
328
- }
329
-
330
- .cedros-site__toc-link--depth-4 {
331
- padding-left: 1.3rem;
332
172
  }
333
173
 
334
- .cedros-site__toc-link:hover {
174
+ .cedros-site__breadcrumbs a:hover {
335
175
  color: var(--cds-fg);
336
176
  }
337
177
 
338
- .cedros-site__doc-footer {
339
- margin-top: 1rem;
340
- padding-top: 0.9rem;
341
- border-top: 1px solid var(--cds-border);
342
- display: inline-flex;
343
- flex-wrap: wrap;
344
- gap: 0.45rem;
345
- }
346
-
347
- .cedros-site__empty-state {
348
- margin-top: 1rem;
178
+ .cedros-site__breadcrumbs-separator {
179
+ color: color-mix(in srgb, var(--cds-muted) 56%, transparent);
349
180
  }
350
181
 
351
- .cedros-site__pill--active {
352
- background: var(--cds-link);
353
- color: var(--cds-bg);
354
- border-color: var(--cds-link);
355
- }
356
-
357
- .cedros-site__filter-dimensions {
358
- display: grid;
359
- gap: 0.6rem;
182
+ .cedros-site__section-heading {
183
+ display: flex;
184
+ align-items: flex-end;
185
+ justify-content: space-between;
186
+ gap: 0.85rem;
360
187
  }
361
188
 
362
- .cedros-site__filter-group {
363
- display: grid;
364
- gap: 0.3rem;
189
+ .cedros-site__docs-entry-card {
190
+ height: 100%;
191
+ align-content: start;
192
+ background:
193
+ linear-gradient(180deg, color-mix(in srgb, var(--cds-panel) 90%, transparent), color-mix(in srgb, var(--cds-panel) 78%, var(--cds-bg) 22%)),
194
+ var(--cds-panel);
195
+ transition:
196
+ transform 160ms ease,
197
+ border-color 160ms ease,
198
+ box-shadow 160ms ease;
365
199
  }
366
200
 
367
- .cedros-site__filter-group-label {
368
- font-size: 0.72rem;
369
- color: var(--cds-muted);
370
- text-transform: uppercase;
371
- letter-spacing: 0.03em;
201
+ .cedros-site__docs-entry-card:hover {
202
+ transform: translateY(-2px);
203
+ border-color: color-mix(in srgb, var(--cds-link) 28%, var(--cds-border) 72%);
204
+ box-shadow: var(--cds-shadow-lg);
372
205
  }
373
206
 
374
- .cedros-site__bookmark {
375
- background: none;
376
- border: 1px solid var(--cds-border);
377
- border-radius: calc(var(--cds-radius) - 2px);
378
- padding: 0.25rem 0.4rem;
379
- cursor: pointer;
380
- color: var(--cds-muted);
381
- display: inline-flex;
207
+ .cedros-site__docs-entry-head {
208
+ display: flex;
382
209
  align-items: center;
210
+ justify-content: space-between;
211
+ gap: 0.75rem;
212
+ flex-wrap: wrap;
383
213
  }
384
214
 
385
- .cedros-site__bookmark:hover,
386
- .cedros-site__bookmark[aria-pressed="true"] {
387
- color: var(--cds-link);
388
- border-color: var(--cds-link);
389
- }
390
-
391
- .cedros-site__search-input {
392
- width: 100%;
215
+ .cedros-site__docs-entry-footer {
216
+ margin-top: auto;
393
217
  }
394
218
 
395
- @media (max-width: 900px) {
396
- .cedros-site__docs-page,
397
- .cedros-site__docs-page--article {
398
- grid-template-columns: 1fr;
399
- }
400
-
401
- .cedros-site__docs-sidebar {
402
- position: static;
403
- }
404
-
405
- .cedros-site__article-layout {
406
- grid-template-columns: 1fr;
219
+ @media (max-width: 700px) {
220
+ .cedros-site__controls-header,
221
+ .cedros-site__section-heading,
222
+ .cedros-site__pagination,
223
+ .cedros-site__article-top {
224
+ align-items: flex-start;
225
+ flex-direction: column;
407
226
  }
408
227
 
409
- .cedros-site__toc {
410
- position: static;
228
+ .cedros-site__control-actions,
229
+ .cedros-site__pagination-links {
230
+ width: 100%;
411
231
  }
412
- }
413
232
 
414
- @media (max-width: 700px) {
415
- .cedros-site__control-actions {
416
- flex-wrap: wrap;
233
+ .cedros-site__control-actions .cedros-site__button,
234
+ .cedros-site__pagination-links .cedros-site__button {
235
+ flex: 1 1 auto;
417
236
  }
418
237
  }
419
-
@@ -1,3 +1,4 @@
1
+ import type { DocsEntryRecord } from "../docsContract.js";
1
2
  export interface PaginationResult<T> {
2
3
  items: T[];
3
4
  page: number;
@@ -33,22 +34,14 @@ export interface FilterDimension {
33
34
  export interface FilterDimensionValues {
34
35
  [dimensionKey: string]: string;
35
36
  }
36
- export interface DocsIndexEntry {
37
- slug: string;
38
- title: string;
39
- description?: string;
40
- category?: string;
41
- tags?: string[];
42
- lastUpdated?: string;
43
- bodyMarkdown?: string;
44
- bodyHtml?: string;
45
- bodyText?: string;
46
- searchText?: string;
37
+ export interface DocsIndexEntry extends DocsEntryRecord {
47
38
  }
48
39
  export interface DocsIndexQuery {
49
40
  query?: string;
50
41
  category?: string;
51
42
  tag?: string;
43
+ productSlug?: string;
44
+ sectionKey?: string;
52
45
  sort?: "updated-desc" | "updated-asc" | "title-asc" | "title-desc";
53
46
  page?: number;
54
47
  pageSize?: number;
@@ -118,6 +118,12 @@ function matchesDocsQuery(entry, query) {
118
118
  if (query.tag && !entry.tags?.includes(query.tag)) {
119
119
  return false;
120
120
  }
121
+ if (query.productSlug && entry.productSlug !== query.productSlug) {
122
+ return false;
123
+ }
124
+ if (query.sectionKey && entry.sectionKey !== query.sectionKey) {
125
+ return false;
126
+ }
121
127
  if (!query.query) {
122
128
  return true;
123
129
  }
@@ -164,7 +170,11 @@ function buildDocsSearchText(entry) {
164
170
  entry.title,
165
171
  entry.description,
166
172
  entry.category,
173
+ entry.productLabel,
174
+ entry.sectionLabel,
167
175
  ...(entry.tags ?? []),
176
+ ...(entry.aliases ?? []),
177
+ entry.badge,
168
178
  entry.searchText,
169
179
  entry.bodyText,
170
180
  entry.bodyMarkdown,
@@ -1,17 +1,18 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { Fragment } from "react";
2
3
  import { buildContentListHref } from "./contentIndex.js";
3
4
  export function ContentPagination({ basePath, page, totalPages, query }) {
4
5
  if (totalPages <= 1) {
5
6
  return null;
6
7
  }
7
8
  const visiblePages = buildVisiblePages(page, totalPages);
8
- return (_jsxs("nav", { className: "cedros-site__pagination", "aria-label": "Pagination", children: [_jsx("a", { href: buildContentListHref(basePath, { ...query, page: Math.max(1, page - 1) }), className: `cedros-site__nav-link${page === 1 ? " cedros-site__nav-link--disabled" : ""}`, "aria-disabled": page === 1 ? "true" : undefined, children: "Previous" }), visiblePages.map((entryPage) => (_jsx("a", { href: buildContentListHref(basePath, { ...query, page: entryPage }), className: `cedros-site__nav-link${entryPage === page ? " cedros-site__nav-link--active" : ""}`, "aria-current": entryPage === page ? "page" : undefined, children: entryPage }, entryPage))), _jsx("a", { href: buildContentListHref(basePath, { ...query, page: Math.min(totalPages, page + 1) }), className: `cedros-site__nav-link${page === totalPages ? " cedros-site__nav-link--disabled" : ""}`, "aria-disabled": page === totalPages ? "true" : undefined, children: "Next" })] }));
9
+ return (_jsxs("nav", { className: "cedros-site__pagination", "aria-label": "Pagination", children: [_jsxs("p", { className: "cedros-site__pagination-meta", children: ["Page ", page, " of ", totalPages] }), _jsxs("div", { className: "cedros-site__pagination-links", children: [_jsx("a", { href: buildContentListHref(basePath, { ...query, page: Math.max(1, page - 1) }), className: `cedros-site__button cedros-site__button--ghost${page === 1 ? " cedros-site__button--disabled" : ""}`, "aria-disabled": page === 1 ? "true" : undefined, children: "Previous" }), visiblePages.map((entryPage) => (_jsx("a", { href: buildContentListHref(basePath, { ...query, page: entryPage }), className: `cedros-site__button cedros-site__button--ghost${entryPage === page ? " cedros-site__button--active" : ""}`, "aria-current": entryPage === page ? "page" : undefined, children: entryPage }, entryPage))), _jsx("a", { href: buildContentListHref(basePath, { ...query, page: Math.min(totalPages, page + 1) }), className: `cedros-site__button cedros-site__button--ghost${page === totalPages ? " cedros-site__button--disabled" : ""}`, "aria-disabled": page === totalPages ? "true" : undefined, children: "Next" })] })] }));
9
10
  }
10
11
  export function Breadcrumbs({ trail, className = "cedros-site__breadcrumbs" }) {
11
12
  if (trail.length === 0) {
12
13
  return null;
13
14
  }
14
- return (_jsx("nav", { className: className, "aria-label": "Breadcrumb", children: trail.map((entry) => (_jsx("a", { href: entry.href, children: entry.label }, entry.href))) }));
15
+ return (_jsx("nav", { className: className, "aria-label": "Breadcrumb", children: trail.map((entry, index) => (_jsxs(Fragment, { children: [index > 0 && (_jsx("span", { className: "cedros-site__breadcrumbs-separator", "aria-hidden": "true", children: "/" })), _jsx("a", { href: entry.href, children: entry.label })] }, entry.href))) }));
15
16
  }
16
17
  function buildVisiblePages(page, totalPages) {
17
18
  const start = Math.max(1, page - 2);