@krizaka/ui 3.51.0 → 3.53.0
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/dist/action-bar.js +1 -1
- package/dist/argument-card.js +4 -4
- package/dist/blocks.css +293 -0
- package/dist/chapter.d.ts +89 -0
- package/dist/chapter.js +123 -0
- package/dist/chapter.js.map +1 -0
- package/dist/choice-grid.js +1 -1
- package/dist/choice-grid.js.map +1 -1
- package/dist/{chunk-IBDTAMPF.js → chunk-7JG3VR4C.js} +2 -2
- package/dist/{chunk-C7LTF5CC.js → chunk-ENOS6ETI.js} +2 -2
- package/dist/{chunk-C7LTF5CC.js.map → chunk-ENOS6ETI.js.map} +1 -1
- package/dist/{chunk-2AGSO3WH.js → chunk-FVGFPB73.js} +2 -2
- package/dist/{chunk-2AGSO3WH.js.map → chunk-FVGFPB73.js.map} +1 -1
- package/dist/chunk-YATTFMDV.js +45 -0
- package/dist/chunk-YATTFMDV.js.map +1 -0
- package/dist/cover-hero.js +1 -1
- package/dist/glossary-term.d.ts +12 -0
- package/dist/glossary-term.js +16 -0
- package/dist/glossary-term.js.map +1 -0
- package/dist/glossary.d.ts +20 -0
- package/dist/glossary.js +17 -0
- package/dist/glossary.js.map +1 -0
- package/dist/index.js +7 -7
- package/dist/kpi-explained.d.ts +66 -0
- package/dist/kpi-explained.js +84 -0
- package/dist/kpi-explained.js.map +1 -0
- package/dist/link-card.js +2 -2
- package/dist/media-grid.js +1 -1
- package/dist/media-grid.js.map +1 -1
- package/dist/next-actions.d.ts +27 -0
- package/dist/next-actions.js +27 -0
- package/dist/next-actions.js.map +1 -0
- package/dist/page-hero.js +1 -1
- package/dist/page-index.js +1 -1
- package/dist/service-card.js +1 -1
- package/dist/slot-picker.js +1 -1
- package/dist/text-style/server.d.ts +63 -0
- package/dist/text-style/server.js +109 -0
- package/dist/text-style/server.js.map +1 -0
- package/dist/text-style.d.ts +149 -0
- package/dist/text-style.js +399 -0
- package/dist/text-style.js.map +1 -0
- package/dist/tooltip.js +5 -37
- package/dist/tooltip.js.map +1 -1
- package/package.json +86 -8
- package/registry/account-menu.json +1 -1
- package/registry/account-settings.json +1 -1
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +2 -2
- package/registry/activity-feed.json +1 -1
- package/registry/agenda.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/anatomy-plate.json +1 -1
- package/registry/app-header.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +2 -2
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/bird-plate.json +1 -1
- package/registry/button.json +1 -1
- package/registry/captcha.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.json +1 -1
- package/registry/chapter.json +478 -0
- package/registry/chat.json +1 -1
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip-row.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +2 -2
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/comparison-table.json +1 -1
- package/registry/component-page.json +1 -1
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +1 -1
- package/registry/countdown.json +1 -1
- package/registry/cover-hero.json +2 -2
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +1 -1
- package/registry/date-picker.json +2 -2
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +1 -1
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +1 -1
- package/registry/docs-hub-page.json +1 -1
- package/registry/docs-layout.json +1 -1
- package/registry/docs-nav.json +1 -1
- package/registry/document-viewer.json +1 -1
- package/registry/drop-overlay.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/elephant.json +2 -2
- package/registry/empty-state.json +1 -1
- package/registry/engine-flow.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/chapter/detail.d.ts +4 -0
- package/registry/examples/chapter/detail.js +21 -0
- package/registry/examples/chapter/detail.tsx +16 -0
- package/registry/examples/chapter/foot.d.ts +4 -0
- package/registry/examples/chapter/foot.js +20 -0
- package/registry/examples/chapter/foot.tsx +15 -0
- package/registry/examples/chapter/head.d.ts +4 -0
- package/registry/examples/chapter/head.js +22 -0
- package/registry/examples/chapter/head.tsx +17 -0
- package/registry/examples/chapter/index.d.ts +4 -0
- package/registry/examples/chapter/index.js +34 -0
- package/registry/examples/chapter/index.tsx +30 -0
- package/registry/examples/chapter/reading-page.d.ts +4 -0
- package/registry/examples/chapter/reading-page.js +34 -0
- package/registry/examples/chapter/reading-page.tsx +25 -0
- package/registry/examples/glossary/shop-terms.d.ts +4 -0
- package/registry/examples/glossary/shop-terms.js +11 -0
- package/registry/examples/glossary/shop-terms.tsx +5 -0
- package/registry/examples/glossary-term/inline.d.ts +4 -0
- package/registry/examples/glossary-term/inline.js +15 -0
- package/registry/examples/glossary-term/inline.tsx +5 -0
- package/registry/examples/kpi-explained/founder-cockpit.d.ts +4 -0
- package/registry/examples/kpi-explained/founder-cockpit.js +11 -0
- package/registry/examples/kpi-explained/founder-cockpit.tsx +5 -0
- package/registry/examples/kpi-explained/salon-month.d.ts +4 -0
- package/registry/examples/kpi-explained/salon-month.js +11 -0
- package/registry/examples/kpi-explained/salon-month.tsx +5 -0
- package/registry/examples/next-actions/shop-owner.d.ts +4 -0
- package/registry/examples/next-actions/shop-owner.js +11 -0
- package/registry/examples/next-actions/shop-owner.tsx +5 -0
- package/registry/examples/text-style/compact-toolbar.d.ts +4 -0
- package/registry/examples/text-style/compact-toolbar.js +28 -0
- package/registry/examples/text-style/compact-toolbar.tsx +21 -0
- package/registry/examples/text-style/product-price.d.ts +4 -0
- package/registry/examples/text-style/product-price.js +26 -0
- package/registry/examples/text-style/product-price.tsx +17 -0
- package/registry/examples/text-style/storefront-title.d.ts +4 -0
- package/registry/examples/text-style/storefront-title.js +36 -0
- package/registry/examples/text-style/storefront-title.tsx +22 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +2 -2
- package/registry/filter-bar.json +1 -1
- package/registry/flock.json +1 -1
- package/registry/footnote.json +1 -1
- package/registry/force-update-screen.json +1 -1
- package/registry/form.json +2 -2
- package/registry/gallery-page.json +1 -1
- package/registry/genui.json +2 -2
- package/registry/glossary-term.json +144 -0
- package/registry/glossary.json +137 -0
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +199 -11
- package/registry/iso.json +1 -1
- package/registry/kanban.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/kpi-explained.json +364 -0
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/language-switch.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +2 -2
- package/registry/list.json +1 -1
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +1 -1
- package/registry/maintenance-screen.json +1 -1
- package/registry/map.json +2 -2
- package/registry/markdown.json +1 -1
- package/registry/marketing-layout.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +1 -1
- package/registry/mascot-state.json +1 -1
- package/registry/mascots.json +1 -1
- package/registry/match-dialog.json +1 -1
- package/registry/media-capture.json +1 -1
- package/registry/media-gallery.json +1 -1
- package/registry/media-grid.json +2 -2
- package/registry/meta-row.json +1 -1
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +2 -2
- package/registry/next-actions.json +142 -0
- package/registry/number-ticker.json +1 -1
- package/registry/opening-hours.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +2 -2
- package/registry/page-index.json +2 -2
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/photo-grid.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +1 -1
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/rail-nav.json +2 -2
- package/registry/recipes.json +1 -1
- package/registry/router.json +1 -1
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/service-card.json +2 -2
- package/registry/settings-layout.json +1 -1
- package/registry/showcase.json +1 -1
- package/registry/site-footer.json +2 -2
- package/registry/sites.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/skip-link.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot-picker.json +2 -2
- package/registry/slot.json +1 -1
- package/registry/specimen-tag.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/status-page.json +1 -1
- package/registry/step-progress.json +1 -1
- package/registry/step-showcase.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/sticky-action.json +1 -1
- package/registry/swipe-deck.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +1 -1
- package/registry/tag-selector.json +1 -1
- package/registry/taped-photo.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/text-style.json +378 -0
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +1 -1
- package/registry/update-prompt.json +1 -1
- package/registry/upload-queue.json +1 -1
- package/registry/verified-badge.json +1 -1
- package/registry/vertical-video.json +2 -2
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +1 -1
- package/registry/waveform.json +1 -1
- /package/dist/{chunk-IBDTAMPF.js.map → chunk-7JG3VR4C.js.map} +0 -0
package/dist/action-bar.js
CHANGED
package/dist/argument-card.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cardHoverClass
|
|
3
|
+
} from "./chunk-7JG3VR4C.js";
|
|
1
4
|
import {
|
|
2
5
|
Facts
|
|
3
6
|
} from "./chunk-YKEIOYJ5.js";
|
|
4
|
-
import {
|
|
5
|
-
cardHoverClass
|
|
6
|
-
} from "./chunk-IBDTAMPF.js";
|
|
7
7
|
import {
|
|
8
8
|
BlockLink
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FVGFPB73.js";
|
|
10
10
|
import {
|
|
11
11
|
ArrowGlyph,
|
|
12
12
|
ChevronGlyph
|
package/dist/blocks.css
CHANGED
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
.kz-frame[data-margin] { --kz-margin-x: max(8px, calc(var(--kz-gutter) - 12px)); }
|
|
56
56
|
.kz-heading-number,
|
|
57
|
+
.kz-chapter-no,
|
|
57
58
|
.kz-margin-note {
|
|
58
59
|
font-family: var(--kz-font-mono);
|
|
59
60
|
font-size: 13px;
|
|
@@ -140,6 +141,191 @@
|
|
|
140
141
|
.kz-heading-actions { grid-column: 1; grid-row: auto; }
|
|
141
142
|
}
|
|
142
143
|
|
|
144
|
+
/* ─── Explained figures, next actions and the host's glossary ─── */
|
|
145
|
+
.kz-kpi,
|
|
146
|
+
.kz-next-actions,
|
|
147
|
+
.kz-glossary {
|
|
148
|
+
min-width: 0;
|
|
149
|
+
color: var(--kz-text-primary);
|
|
150
|
+
}
|
|
151
|
+
.kz-kpi {
|
|
152
|
+
display: grid;
|
|
153
|
+
gap: 12px;
|
|
154
|
+
padding: clamp(16px, 3vw, 24px);
|
|
155
|
+
border: 1px solid var(--kz-border-default);
|
|
156
|
+
border-radius: 8px;
|
|
157
|
+
background: var(--kz-surface-1);
|
|
158
|
+
}
|
|
159
|
+
.kz-kpi-head,
|
|
160
|
+
.kz-next-action-heading {
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-wrap: wrap;
|
|
163
|
+
align-items: center;
|
|
164
|
+
justify-content: space-between;
|
|
165
|
+
gap: 8px 12px;
|
|
166
|
+
}
|
|
167
|
+
.kz-kpi-label,
|
|
168
|
+
.kz-next-actions-title,
|
|
169
|
+
.kz-glossary-title,
|
|
170
|
+
.kz-next-action-heading h3 {
|
|
171
|
+
margin: 0;
|
|
172
|
+
color: var(--kz-text-primary);
|
|
173
|
+
font-size: 1rem;
|
|
174
|
+
font-weight: 650;
|
|
175
|
+
line-height: 1.35;
|
|
176
|
+
}
|
|
177
|
+
.kz-kpi-state,
|
|
178
|
+
.kz-kpi-stale,
|
|
179
|
+
.kz-next-action-urgency {
|
|
180
|
+
display: inline-flex;
|
|
181
|
+
align-items: center;
|
|
182
|
+
min-height: 24px;
|
|
183
|
+
padding: 2px 8px;
|
|
184
|
+
border: 1px solid var(--kz-border-default);
|
|
185
|
+
border-radius: 999px;
|
|
186
|
+
color: var(--kz-text-primary);
|
|
187
|
+
background: var(--kz-surface-2);
|
|
188
|
+
font-size: 0.75rem;
|
|
189
|
+
font-weight: 650;
|
|
190
|
+
line-height: 1.3;
|
|
191
|
+
}
|
|
192
|
+
.kz-kpi-state[data-state="watch"],
|
|
193
|
+
.kz-kpi-stale,
|
|
194
|
+
.kz-next-action-urgency[data-urgency="medium"] {
|
|
195
|
+
border-color: color-mix(in srgb, var(--kz-warning) 38%, var(--kz-border-default));
|
|
196
|
+
background: color-mix(in srgb, var(--kz-warning) 10%, var(--kz-surface-1));
|
|
197
|
+
}
|
|
198
|
+
.kz-kpi-state[data-state="act"],
|
|
199
|
+
.kz-next-action-urgency[data-urgency="high"] {
|
|
200
|
+
border-color: color-mix(in srgb, var(--kz-danger) 38%, var(--kz-border-default));
|
|
201
|
+
background: color-mix(in srgb, var(--kz-danger) 10%, var(--kz-surface-1));
|
|
202
|
+
}
|
|
203
|
+
.kz-next-action-urgency[data-urgency="low"] {
|
|
204
|
+
border-color: color-mix(in srgb, var(--kz-success) 38%, var(--kz-border-default));
|
|
205
|
+
background: color-mix(in srgb, var(--kz-success) 10%, var(--kz-surface-1));
|
|
206
|
+
}
|
|
207
|
+
.kz-kpi-value {
|
|
208
|
+
margin: 0;
|
|
209
|
+
overflow-wrap: anywhere;
|
|
210
|
+
color: var(--kz-text-primary);
|
|
211
|
+
font-family: var(--kz-font-display);
|
|
212
|
+
font-size: clamp(1.75rem, 5vw, 2.5rem);
|
|
213
|
+
font-variant-numeric: var(--kz-figures, tabular-nums);
|
|
214
|
+
font-weight: 700;
|
|
215
|
+
line-height: 1.15;
|
|
216
|
+
}
|
|
217
|
+
.kz-kpi-meaning,
|
|
218
|
+
.kz-next-action-copy p {
|
|
219
|
+
margin: 0;
|
|
220
|
+
color: var(--kz-text-secondary);
|
|
221
|
+
font-size: 0.875rem;
|
|
222
|
+
line-height: 1.55;
|
|
223
|
+
}
|
|
224
|
+
.kz-kpi-details {
|
|
225
|
+
display: grid;
|
|
226
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
|
|
227
|
+
gap: 12px 20px;
|
|
228
|
+
margin: 0;
|
|
229
|
+
}
|
|
230
|
+
.kz-kpi-details > div { min-width: 0; }
|
|
231
|
+
.kz-kpi-details dt {
|
|
232
|
+
margin-bottom: 3px;
|
|
233
|
+
color: var(--kz-text-secondary);
|
|
234
|
+
font-size: 0.75rem;
|
|
235
|
+
font-weight: 650;
|
|
236
|
+
}
|
|
237
|
+
.kz-kpi-details dd {
|
|
238
|
+
margin: 0;
|
|
239
|
+
overflow-wrap: anywhere;
|
|
240
|
+
color: var(--kz-text-primary);
|
|
241
|
+
font-size: 0.875rem;
|
|
242
|
+
line-height: 1.5;
|
|
243
|
+
}
|
|
244
|
+
.kz-kpi-verify { display: inline-flex; margin-inline-start: 10px; }
|
|
245
|
+
.kz-kpi-freshness {
|
|
246
|
+
display: flex;
|
|
247
|
+
flex-wrap: wrap;
|
|
248
|
+
align-items: center;
|
|
249
|
+
gap: 6px 10px;
|
|
250
|
+
margin: 0;
|
|
251
|
+
color: var(--kz-text-secondary);
|
|
252
|
+
font-size: 0.75rem;
|
|
253
|
+
}
|
|
254
|
+
.kz-kpi-sparkline { min-width: 0; }
|
|
255
|
+
.kz-next-actions,
|
|
256
|
+
.kz-glossary {
|
|
257
|
+
display: grid;
|
|
258
|
+
gap: 16px;
|
|
259
|
+
}
|
|
260
|
+
.kz-next-actions-list {
|
|
261
|
+
display: grid;
|
|
262
|
+
gap: 10px;
|
|
263
|
+
margin: 0;
|
|
264
|
+
padding: 0;
|
|
265
|
+
list-style: none;
|
|
266
|
+
}
|
|
267
|
+
.kz-next-action {
|
|
268
|
+
display: grid;
|
|
269
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
270
|
+
align-items: start;
|
|
271
|
+
gap: 12px;
|
|
272
|
+
min-width: 0;
|
|
273
|
+
padding: 14px 16px;
|
|
274
|
+
border: 1px solid var(--kz-border-default);
|
|
275
|
+
border-radius: 8px;
|
|
276
|
+
background: var(--kz-surface-1);
|
|
277
|
+
}
|
|
278
|
+
.kz-next-action-rank { color: var(--kz-text-secondary); font-weight: 650; font-variant-numeric: var(--kz-figures, lining-nums tabular-nums); }
|
|
279
|
+
.kz-next-action-content {
|
|
280
|
+
display: grid;
|
|
281
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
282
|
+
align-items: center;
|
|
283
|
+
gap: 12px 20px;
|
|
284
|
+
min-width: 0;
|
|
285
|
+
}
|
|
286
|
+
.kz-next-action-copy { display: grid; min-width: 0; gap: 5px; }
|
|
287
|
+
.kz-next-action-control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
|
288
|
+
.kz-glossary-list { display: grid; gap: 12px; margin: 0; }
|
|
289
|
+
.kz-glossary-entry {
|
|
290
|
+
display: grid;
|
|
291
|
+
grid-template-columns: minmax(8rem, 1fr) minmax(0, 3fr);
|
|
292
|
+
gap: 8px 20px;
|
|
293
|
+
padding-block: 12px;
|
|
294
|
+
border-bottom: 1px solid var(--kz-border-subtle);
|
|
295
|
+
}
|
|
296
|
+
.kz-glossary-entry dt { color: var(--kz-text-primary); font-weight: 650; }
|
|
297
|
+
.kz-glossary-entry dd { margin: 0; color: var(--kz-text-secondary); line-height: 1.55; }
|
|
298
|
+
.kz-glossary-term {
|
|
299
|
+
border-radius: 2px;
|
|
300
|
+
color: inherit;
|
|
301
|
+
font-style: inherit;
|
|
302
|
+
text-decoration-line: underline;
|
|
303
|
+
text-decoration-color: var(--kz-accent);
|
|
304
|
+
text-decoration-style: dotted;
|
|
305
|
+
text-underline-offset: 0.2em;
|
|
306
|
+
cursor: help;
|
|
307
|
+
}
|
|
308
|
+
.kz-glossary-term:focus-visible {
|
|
309
|
+
outline: 2px solid var(--kz-ring, var(--kz-accent));
|
|
310
|
+
outline-offset: 3px;
|
|
311
|
+
}
|
|
312
|
+
@media (max-width: 520px) {
|
|
313
|
+
.kz-next-action-content { grid-template-columns: minmax(0, 1fr); }
|
|
314
|
+
.kz-glossary-entry { grid-template-columns: minmax(0, 1fr); gap: 4px; }
|
|
315
|
+
}
|
|
316
|
+
@media (prefers-reduced-motion: reduce) {
|
|
317
|
+
.kz-kpi, .kz-next-action, .kz-glossary-entry, .kz-glossary-term { animation: none; scroll-behavior: auto; transition: none; }
|
|
318
|
+
}
|
|
319
|
+
@media print {
|
|
320
|
+
.kz-kpi, .kz-next-actions, .kz-glossary, .kz-next-action, .kz-glossary-entry {
|
|
321
|
+
break-inside: avoid;
|
|
322
|
+
box-shadow: none;
|
|
323
|
+
background: transparent;
|
|
324
|
+
}
|
|
325
|
+
.kz-kpi, .kz-next-action, .kz-glossary-entry { border-color: currentColor; }
|
|
326
|
+
.kz-kpi-stale, .kz-kpi-state, .kz-next-action-urgency { border-color: currentColor; }
|
|
327
|
+
}
|
|
328
|
+
|
|
143
329
|
/* Ticks: a word between backticks in a sentence reads as code. */
|
|
144
330
|
.kz-ic {
|
|
145
331
|
padding: 0.08em 0.38em;
|
|
@@ -1075,6 +1261,113 @@ a.kz-fact:focus-visible { outline: 2px solid var(--kz-ring, var(--kz-accent)); o
|
|
|
1075
1261
|
.kz-footnotes li::marker { font-family: var(--kz-font-mono); color: var(--kz-paper-rule-margin); }
|
|
1076
1262
|
.kz-fn-back { color: var(--kz-accent-text); text-decoration: none; }
|
|
1077
1263
|
|
|
1264
|
+
/* ChapterIndex, ChapterHead, ChapterFoot (#617) — the chapters of a story on the notebook's lines, never boxes. Every row is
|
|
1265
|
+
one ruled line (--kz-chapter-line = the paper's module, 32 px): the number hangs in the margin left of the red rule
|
|
1266
|
+
(`[data-margin]`, moved to --kz-margin-x), the serif title is the link and its hit area is the whole row, the period is
|
|
1267
|
+
quiet on the right (under the title in a narrow column). The ruling is `[data-paper="lines"]`, shifted so a major line
|
|
1268
|
+
runs under the titles' baseline (--kz-chapter-baseline, in em of the title). No border per row, nothing moves. */
|
|
1269
|
+
.kz-chapters {
|
|
1270
|
+
--kz-chapter-line: var(--kz-paper-module, 32px);
|
|
1271
|
+
--kz-chapter-pad: var(--kz-paper-line, 8px);
|
|
1272
|
+
--kz-chapter-baseline: calc(var(--kz-chapter-line) / 2 + 0.36em);
|
|
1273
|
+
--kz-chapter-gap: 16px;
|
|
1274
|
+
container-type: inline-size;
|
|
1275
|
+
box-sizing: border-box;
|
|
1276
|
+
max-width: var(--kz-chapters-max, 46rem); /* the period stays within reach of its title */
|
|
1277
|
+
margin: 0;
|
|
1278
|
+
padding: var(--kz-chapter-pad) 0;
|
|
1279
|
+
list-style: none;
|
|
1280
|
+
font-size: 1.1875rem;
|
|
1281
|
+
}
|
|
1282
|
+
.kz-chapters[data-margin], .kz-chapter-head[data-margin] { --kz-margin-x: 3rem; }
|
|
1283
|
+
.kz-chapters[data-paper] { background-position: 0 calc(var(--kz-chapter-pad) + var(--kz-chapter-baseline)); }
|
|
1284
|
+
.kz-chapters ul { margin: 0; padding: 0; list-style: none; }
|
|
1285
|
+
.kz-chapter-row {
|
|
1286
|
+
position: relative;
|
|
1287
|
+
display: grid;
|
|
1288
|
+
grid-template-columns: var(--kz-margin-x) minmax(0, 1fr) auto;
|
|
1289
|
+
align-items: baseline;
|
|
1290
|
+
min-height: var(--kz-chapter-line);
|
|
1291
|
+
line-height: var(--kz-chapter-line);
|
|
1292
|
+
}
|
|
1293
|
+
.kz-chapter-row .kz-chapter-no { grid-column: 1; padding-right: 12px; text-align: right; white-space: nowrap; }
|
|
1294
|
+
.kz-chapter-link {
|
|
1295
|
+
grid-column: 2;
|
|
1296
|
+
min-width: 0;
|
|
1297
|
+
padding-left: var(--kz-chapter-gap);
|
|
1298
|
+
font-family: var(--kz-font-display);
|
|
1299
|
+
font-weight: 400;
|
|
1300
|
+
line-height: var(--kz-chapter-line);
|
|
1301
|
+
color: var(--kz-text-primary);
|
|
1302
|
+
text-decoration: none;
|
|
1303
|
+
overflow-wrap: anywhere;
|
|
1304
|
+
}
|
|
1305
|
+
.kz-chapter-link::after { content: ""; position: absolute; inset: 0; }
|
|
1306
|
+
.kz-chapter-link:focus-visible { outline: none; }
|
|
1307
|
+
.kz-chapter-link:focus-visible::after { outline: var(--kz-ring-width, 2px) solid var(--kz-ring); outline-offset: 0; }
|
|
1308
|
+
.kz-chapter-title { text-decoration-line: none; text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
|
|
1309
|
+
.kz-chapter-link:is(:hover, :focus-visible) .kz-chapter-title { text-decoration-line: underline; text-decoration-color: var(--kz-hue, var(--kz-accent)); }
|
|
1310
|
+
.kz-chapter-link[aria-current="page"] .kz-chapter-title { text-decoration-line: underline; text-decoration-color: var(--kz-paper-rule-margin); }
|
|
1311
|
+
.kz-chapter-new,
|
|
1312
|
+
.kz-chapter-period,
|
|
1313
|
+
.kz-chapter-meta {
|
|
1314
|
+
font-family: var(--kz-font-mono);
|
|
1315
|
+
font-size: 12.5px;
|
|
1316
|
+
line-height: 16px;
|
|
1317
|
+
font-variant-numeric: var(--kz-figures, lining-nums tabular-nums);
|
|
1318
|
+
}
|
|
1319
|
+
.kz-chapter-new { margin-left: 4px; white-space: nowrap; color: var(--kz-hue-text, var(--kz-accent-text)); }
|
|
1320
|
+
.kz-chapter-period { grid-column: 3; padding-left: var(--kz-chapter-gap); white-space: nowrap; color: var(--kz-text-secondary); }
|
|
1321
|
+
.kz-chapter-detail { grid-column: 2 / -1; padding-left: var(--kz-chapter-gap); font-size: 14.5px; color: var(--kz-text-secondary); }
|
|
1322
|
+
/* A narrow column: the row flows as text with a hanging indent — the number still in the margin (inline, so it shares the
|
|
1323
|
+
title's baseline), the title wraps from line to line, the period runs on after its last word: two ruled lines at most. */
|
|
1324
|
+
@container (max-width: 34rem) {
|
|
1325
|
+
.kz-chapter-row { display: block; padding-left: calc(var(--kz-margin-x) + var(--kz-chapter-gap)); }
|
|
1326
|
+
.kz-chapter-row .kz-chapter-no {
|
|
1327
|
+
display: inline-block;
|
|
1328
|
+
box-sizing: border-box;
|
|
1329
|
+
width: var(--kz-margin-x);
|
|
1330
|
+
margin-left: calc(-1 * (var(--kz-margin-x) + var(--kz-chapter-gap)));
|
|
1331
|
+
margin-right: var(--kz-chapter-gap);
|
|
1332
|
+
}
|
|
1333
|
+
.kz-chapter-link { display: inline; padding-left: 0; }
|
|
1334
|
+
.kz-chapter-period { display: inline-block; padding-left: 0; }
|
|
1335
|
+
.kz-chapter-detail { display: block; padding-left: 0; }
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
/* The foot: the previous and the next as two rows of the index, then one quiet line back to the story. */
|
|
1339
|
+
.kz-chapter-row[data-dir] .kz-chapter-period { color: var(--kz-text-secondary); }
|
|
1340
|
+
.kz-chapter-back { margin: 0; padding-left: calc(var(--kz-margin-x) + var(--kz-chapter-gap)); font-size: 14.5px; line-height: var(--kz-chapter-line); }
|
|
1341
|
+
.kz-chapter-back-link { color: var(--kz-text-secondary); text-decoration: none; text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
|
|
1342
|
+
.kz-chapter-back-link:is(:hover, :focus-visible) { color: var(--kz-text-primary); text-decoration-line: underline; text-decoration-color: var(--kz-hue, var(--kz-accent)); }
|
|
1343
|
+
.kz-chapter-back-link:focus-visible { outline: var(--kz-ring-width, 2px) solid var(--kz-ring); outline-offset: 2px; }
|
|
1344
|
+
|
|
1345
|
+
/* The head: the number in the margin beside the title's first line, one quiet meta line, the standfirst once. */
|
|
1346
|
+
.kz-chapter-head {
|
|
1347
|
+
display: grid;
|
|
1348
|
+
grid-template-columns: var(--kz-margin-x) minmax(0, 1fr);
|
|
1349
|
+
align-items: baseline;
|
|
1350
|
+
row-gap: 12px;
|
|
1351
|
+
padding-block: 8px;
|
|
1352
|
+
}
|
|
1353
|
+
.kz-chapter-head > * { grid-column: 2; margin: 0; padding-left: var(--kz-chapter-gap, 16px); min-width: 0; }
|
|
1354
|
+
.kz-chapter-head > .kz-chapter-no { grid-column: 1; grid-row: 1; padding: 0 12px 0 0; text-align: right; white-space: nowrap; }
|
|
1355
|
+
.kz-chapter-head-title {
|
|
1356
|
+
grid-row: 1;
|
|
1357
|
+
max-width: 22ch;
|
|
1358
|
+
font-family: var(--kz-font-display);
|
|
1359
|
+
font-size: clamp(1.85rem, 5.2vw, 2.75rem);
|
|
1360
|
+
font-weight: 400;
|
|
1361
|
+
line-height: 1.15;
|
|
1362
|
+
letter-spacing: -0.01em;
|
|
1363
|
+
color: var(--kz-text-primary);
|
|
1364
|
+
text-wrap: balance;
|
|
1365
|
+
overflow-wrap: anywhere;
|
|
1366
|
+
}
|
|
1367
|
+
.kz-chapter-meta { color: var(--kz-text-secondary); }
|
|
1368
|
+
.kz-chapter-standfirst { max-width: 60ch; font-size: 1.125rem; line-height: 1.6; color: var(--kz-text-secondary); text-wrap: pretty; }
|
|
1369
|
+
.kz-chapter-arrow { color: var(--kz-hue-text, var(--kz-paper-rule-margin)); }
|
|
1370
|
+
|
|
1078
1371
|
/* Mascot life — the Flock's birds at ease, in character (Mascot `life`). */
|
|
1079
1372
|
/* mascot-life:begin — generated by scripts/gen-mascot-life.mjs from src/mascots/life.ts; do not edit */
|
|
1080
1373
|
@keyframes kzb-breathe{0%,100%{transform:scale(1,1)}50%{transform:scale(.996,1.018)}}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { L as LinkComponent } from './block-link-BAg4eoZk.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
/** The notebook under the rows: `lines` (the ruling of `Page`, aligned on the rows) or `false` (the page's own paper). */
|
|
5
|
+
type ChapterPaper = "lines" | false;
|
|
6
|
+
interface ChapterEntry {
|
|
7
|
+
/** Its number, hung in the margin: `01`, `§ 1`. */
|
|
8
|
+
number: React.ReactNode;
|
|
9
|
+
/** The title, in the serif: the link. */
|
|
10
|
+
title: React.ReactNode;
|
|
11
|
+
/** Where it leads. */
|
|
12
|
+
href: string;
|
|
13
|
+
/** When it happened, quiet on the right (under the title on a phone): `janv. – mars 2026`, or a `<time>`. */
|
|
14
|
+
period?: React.ReactNode;
|
|
15
|
+
/** One more line under the title (what was faced → what was built). Off unless given: the chapter's page says it. */
|
|
16
|
+
detail?: React.ReactNode;
|
|
17
|
+
/** The latest chapter: a small mark after the title, in the hue (`newLabel`). */
|
|
18
|
+
isNew?: boolean;
|
|
19
|
+
/** The page the reader is on. */
|
|
20
|
+
current?: boolean;
|
|
21
|
+
}
|
|
22
|
+
type ChapterIndexProps = Omit<React.OlHTMLAttributes<HTMLOListElement>, "children"> & {
|
|
23
|
+
/** The chapters, in reading order. */
|
|
24
|
+
chapters: readonly ChapterEntry[];
|
|
25
|
+
/** The word of the latest chapter's mark. @default "New" */
|
|
26
|
+
newLabel?: React.ReactNode;
|
|
27
|
+
/** The accessible name of the list, when no heading names it (`aria-labelledby`). */
|
|
28
|
+
label?: string;
|
|
29
|
+
/** The ruling under the rows. `false` when the page is ruled already and the list starts on its module. @default "lines" */
|
|
30
|
+
paper?: ChapterPaper;
|
|
31
|
+
/** The app's router link (Next's `Link`), so internal chapters prefetch. */
|
|
32
|
+
linkAs?: LinkComponent;
|
|
33
|
+
};
|
|
34
|
+
/** The chapters of a story as a sober timeline: one ruled line each, the number in the margin, the title the link. */
|
|
35
|
+
declare function ChapterIndex({ chapters, newLabel, label, paper, linkAs, className, ...props }: ChapterIndexProps): React.JSX.Element;
|
|
36
|
+
type ChapterHeadProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
|
|
37
|
+
/** The chapter's number, hung in the margin: `01`, `Chapitre 1`. */
|
|
38
|
+
number: React.ReactNode;
|
|
39
|
+
/** The title: the page's `h1`. */
|
|
40
|
+
title: React.ReactNode;
|
|
41
|
+
/** When it happened: `janv. – mars 2026`. */
|
|
42
|
+
period?: React.ReactNode;
|
|
43
|
+
/** How long it reads: `8 min`. */
|
|
44
|
+
readingTime?: React.ReactNode;
|
|
45
|
+
/** What was faced: the first half of the standfirst. */
|
|
46
|
+
faced?: React.ReactNode;
|
|
47
|
+
/** What was built: its second half, after the arrow. */
|
|
48
|
+
built?: React.ReactNode;
|
|
49
|
+
/** The words a screen reader says before each half (the arrow is drawn, not read): `["What I faced", "What we built"]`. */
|
|
50
|
+
versusLabels?: readonly [string, string];
|
|
51
|
+
/** The level of the title. @default 1 */
|
|
52
|
+
level?: 1 | 2;
|
|
53
|
+
};
|
|
54
|
+
/** The head of a chapter: the number in the margin, the title, the period and the reading time, the standfirst once. */
|
|
55
|
+
declare function ChapterHead({ number, title, period, readingTime, faced, built, versusLabels, level, className, children, ...props }: ChapterHeadProps): React.JSX.Element;
|
|
56
|
+
interface ChapterLink {
|
|
57
|
+
/** Its number, in the margin: `02`. */
|
|
58
|
+
number?: React.ReactNode;
|
|
59
|
+
/** Its title, the link. */
|
|
60
|
+
title: React.ReactNode;
|
|
61
|
+
/** Where it leads. */
|
|
62
|
+
href: string;
|
|
63
|
+
}
|
|
64
|
+
type ChapterFootProps = Omit<React.HTMLAttributes<HTMLElement>, "children"> & {
|
|
65
|
+
/** The chapter before this one (none on the first). */
|
|
66
|
+
previous?: ChapterLink;
|
|
67
|
+
/** The chapter after this one (none on the latest). */
|
|
68
|
+
next?: ChapterLink;
|
|
69
|
+
/** The line back to the story: `{ href: "/", label: "Back to the story" }`. */
|
|
70
|
+
back?: {
|
|
71
|
+
href: string;
|
|
72
|
+
label: React.ReactNode;
|
|
73
|
+
};
|
|
74
|
+
/** The quiet words beside each link. @default { previous: "Previous", next: "Next" } */
|
|
75
|
+
labels?: {
|
|
76
|
+
previous: React.ReactNode;
|
|
77
|
+
next: React.ReactNode;
|
|
78
|
+
};
|
|
79
|
+
/** The accessible name of the navigation. @default "Chapters" */
|
|
80
|
+
label?: string;
|
|
81
|
+
/** The ruling under the links. @default "lines" */
|
|
82
|
+
paper?: ChapterPaper;
|
|
83
|
+
/** The app's router link (Next's `Link`). */
|
|
84
|
+
linkAs?: LinkComponent;
|
|
85
|
+
};
|
|
86
|
+
/** The foot of a chapter: the previous and the next on the ruled lines, then one line back to the story. */
|
|
87
|
+
declare function ChapterFoot({ previous, next, back, labels, label, paper, linkAs, className, ...props }: ChapterFootProps): React.JSX.Element;
|
|
88
|
+
|
|
89
|
+
export { type ChapterEntry, ChapterFoot, type ChapterFootProps, ChapterHead, type ChapterHeadProps, ChapterIndex, type ChapterIndexProps, type ChapterLink, LinkComponent };
|
package/dist/chapter.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BlockLink
|
|
3
|
+
} from "./chunk-FVGFPB73.js";
|
|
4
|
+
import {
|
|
5
|
+
cn
|
|
6
|
+
} from "./chunk-W675RFOA.js";
|
|
7
|
+
|
|
8
|
+
// src/chapter/chapter.tsx
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
function ChapterRow({
|
|
11
|
+
number,
|
|
12
|
+
title,
|
|
13
|
+
href,
|
|
14
|
+
aside,
|
|
15
|
+
mark,
|
|
16
|
+
detail,
|
|
17
|
+
current,
|
|
18
|
+
rel,
|
|
19
|
+
linkAs
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22
|
+
/* @__PURE__ */ jsx("span", { className: "kz-chapter-no", children: number }),
|
|
23
|
+
/* @__PURE__ */ jsxs(BlockLink, { href, linkAs, rel, className: "kz-chapter-link", "aria-current": current ? "page" : void 0, children: [
|
|
24
|
+
/* @__PURE__ */ jsx("span", { className: "kz-chapter-title", children: title }),
|
|
25
|
+
mark && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26
|
+
" ",
|
|
27
|
+
/* @__PURE__ */ jsx("span", { className: "kz-chapter-new", children: mark })
|
|
28
|
+
] })
|
|
29
|
+
] }),
|
|
30
|
+
aside && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
31
|
+
" ",
|
|
32
|
+
/* @__PURE__ */ jsx("span", { className: "kz-chapter-period", children: aside })
|
|
33
|
+
] }),
|
|
34
|
+
detail && /* @__PURE__ */ jsx("span", { className: "kz-chapter-detail", children: detail })
|
|
35
|
+
] });
|
|
36
|
+
}
|
|
37
|
+
function ChapterIndex({ chapters, newLabel = "New", label, paper = "lines", linkAs, className, ...props }) {
|
|
38
|
+
return (
|
|
39
|
+
// `role="list"`: a list without bullets is still a list to VoiceOver.
|
|
40
|
+
/* @__PURE__ */ jsx("ol", { role: "list", "aria-label": label, "data-paper": paper || void 0, "data-margin": "", className: cn("kz-chapters", className), ...props, children: chapters.map((c, i) => /* @__PURE__ */ jsx("li", { className: "kz-chapter-row", "data-new": c.isNew ? "" : void 0, "data-detail": c.detail ? "" : void 0, children: /* @__PURE__ */ jsx(ChapterRow, { number: c.number, title: c.title, href: c.href, aside: c.period, mark: c.isNew ? newLabel : void 0, detail: c.detail, current: c.current, linkAs }) }, i)) })
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
function ChapterHead({ number, title, period, readingTime, faced, built, versusLabels, level = 1, className, children, ...props }) {
|
|
44
|
+
const H = level === 1 ? "h1" : "h2";
|
|
45
|
+
const meta = [period, readingTime].filter((m) => m !== void 0 && m !== null && m !== "");
|
|
46
|
+
return /* @__PURE__ */ jsxs("header", { "data-margin": "", className: cn("kz-chapter-head", className), ...props, children: [
|
|
47
|
+
/* @__PURE__ */ jsx("p", { className: "kz-chapter-no", children: number }),
|
|
48
|
+
/* @__PURE__ */ jsx(H, { className: "kz-chapter-head-title", children: title }),
|
|
49
|
+
meta.length > 0 && /* @__PURE__ */ jsx("p", { className: "kz-chapter-meta", children: meta.map((m, i) => /* @__PURE__ */ jsxs("span", { children: [
|
|
50
|
+
i > 0 && /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: " \xB7 " }),
|
|
51
|
+
m
|
|
52
|
+
] }, i)) }),
|
|
53
|
+
faced && built && /* @__PURE__ */ jsxs("p", { className: "kz-chapter-standfirst", children: [
|
|
54
|
+
versusLabels && /* @__PURE__ */ jsxs("span", { className: "kz-sr-only", children: [
|
|
55
|
+
versusLabels[0],
|
|
56
|
+
", "
|
|
57
|
+
] }),
|
|
58
|
+
faced,
|
|
59
|
+
/* @__PURE__ */ jsx("span", { className: "kz-chapter-arrow", "aria-hidden": true, children: " \u2192 " }),
|
|
60
|
+
versusLabels && /* @__PURE__ */ jsxs("span", { className: "kz-sr-only", children: [
|
|
61
|
+
"; ",
|
|
62
|
+
versusLabels[1],
|
|
63
|
+
", "
|
|
64
|
+
] }),
|
|
65
|
+
built
|
|
66
|
+
] }),
|
|
67
|
+
children
|
|
68
|
+
] });
|
|
69
|
+
}
|
|
70
|
+
function ChapterFoot({
|
|
71
|
+
previous,
|
|
72
|
+
next,
|
|
73
|
+
back,
|
|
74
|
+
labels = { previous: "Previous", next: "Next" },
|
|
75
|
+
label = "Chapters",
|
|
76
|
+
paper = "lines",
|
|
77
|
+
linkAs,
|
|
78
|
+
className,
|
|
79
|
+
...props
|
|
80
|
+
}) {
|
|
81
|
+
return /* @__PURE__ */ jsxs("nav", { "aria-label": label, "data-paper": paper || void 0, "data-margin": "", className: cn("kz-chapters kz-chapter-foot", className), ...props, children: [
|
|
82
|
+
/* @__PURE__ */ jsxs("ul", { role: "list", children: [
|
|
83
|
+
previous && /* @__PURE__ */ jsx("li", { className: "kz-chapter-row", "data-dir": "previous", children: /* @__PURE__ */ jsx(
|
|
84
|
+
ChapterRow,
|
|
85
|
+
{
|
|
86
|
+
number: previous.number,
|
|
87
|
+
title: previous.title,
|
|
88
|
+
href: previous.href,
|
|
89
|
+
rel: "prev",
|
|
90
|
+
linkAs,
|
|
91
|
+
aside: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
92
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "\u2190 " }),
|
|
93
|
+
labels.previous
|
|
94
|
+
] })
|
|
95
|
+
}
|
|
96
|
+
) }),
|
|
97
|
+
next && /* @__PURE__ */ jsx("li", { className: "kz-chapter-row", "data-dir": "next", children: /* @__PURE__ */ jsx(
|
|
98
|
+
ChapterRow,
|
|
99
|
+
{
|
|
100
|
+
number: next.number,
|
|
101
|
+
title: next.title,
|
|
102
|
+
href: next.href,
|
|
103
|
+
rel: "next",
|
|
104
|
+
linkAs,
|
|
105
|
+
aside: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
106
|
+
labels.next,
|
|
107
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: " \u2192" })
|
|
108
|
+
] })
|
|
109
|
+
}
|
|
110
|
+
) })
|
|
111
|
+
] }),
|
|
112
|
+
back && /* @__PURE__ */ jsx("p", { className: "kz-chapter-back", children: /* @__PURE__ */ jsxs(BlockLink, { href: back.href, linkAs, className: "kz-chapter-back-link", children: [
|
|
113
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "\u21A9 " }),
|
|
114
|
+
back.label
|
|
115
|
+
] }) })
|
|
116
|
+
] });
|
|
117
|
+
}
|
|
118
|
+
export {
|
|
119
|
+
ChapterFoot,
|
|
120
|
+
ChapterHead,
|
|
121
|
+
ChapterIndex
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=chapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/chapter/chapter.tsx"],"sourcesContent":["// Server-safe. The chapters of a story on the Cahier (ADR-004, blocks.css, krizaka-ui#617): a sober timeline, never a\n// stack of boxes. The rows sit on the notebook's ruled lines (`data-paper=\"lines\"`, the ruling of `Page`), the number\n// hangs in the margin beside its red rule (`data-margin`), the serif title is the link, the period is quiet.\n// - `ChapterIndex` — the chapters in reading order, one ruled line each (two at most), the latest marked « New »;\n// - `ChapterHead` — the head of a chapter's page: number in the margin, title, one quiet meta line, the standfirst;\n// - `ChapterFoot` — its foot: the previous and next chapters on the lines, then one line back to the story.\n// No border per row, no card, no button: the paper carries the rhythm. Every word arrives as a prop.\nimport type * as React from \"react\";\n\nimport { BlockLink, type LinkComponent } from \"../block-link\";\nimport { cn } from \"../cn\";\n\n/** The notebook under the rows: `lines` (the ruling of `Page`, aligned on the rows) or `false` (the page's own paper). */\ntype ChapterPaper = \"lines\" | false;\n\nexport interface ChapterEntry {\n /** Its number, hung in the margin: `01`, `§ 1`. */\n number: React.ReactNode;\n /** The title, in the serif: the link. */\n title: React.ReactNode;\n /** Where it leads. */\n href: string;\n /** When it happened, quiet on the right (under the title on a phone): `janv. – mars 2026`, or a `<time>`. */\n period?: React.ReactNode;\n /** One more line under the title (what was faced → what was built). Off unless given: the chapter's page says it. */\n detail?: React.ReactNode;\n /** The latest chapter: a small mark after the title, in the hue (`newLabel`). */\n isNew?: boolean;\n /** The page the reader is on. */\n current?: boolean;\n}\n\n/** One ruled row: number in the margin, the title as the link (its hit area the whole row), an aside on the right. */\nfunction ChapterRow({\n number,\n title,\n href,\n aside,\n mark,\n detail,\n current,\n rel,\n linkAs,\n}: {\n number?: React.ReactNode;\n title: React.ReactNode;\n href: string;\n aside?: React.ReactNode;\n mark?: React.ReactNode;\n detail?: React.ReactNode;\n current?: boolean;\n rel?: string;\n linkAs?: LinkComponent;\n}) {\n return (\n <>\n <span className=\"kz-chapter-no\">{number}</span>\n <BlockLink href={href} linkAs={linkAs} rel={rel} className=\"kz-chapter-link\" aria-current={current ? \"page\" : undefined}>\n <span className=\"kz-chapter-title\">{title}</span>\n {mark && (\n <>\n {\" \"}\n <span className=\"kz-chapter-new\">{mark}</span>\n </>\n )}\n </BlockLink>\n {aside && (\n <>\n {/* A space, not a margin: in a narrow column the period runs on after the title, and starts flush when it wraps. */}{\" \"}\n <span className=\"kz-chapter-period\">{aside}</span>\n </>\n )}\n {detail && <span className=\"kz-chapter-detail\">{detail}</span>}\n </>\n );\n}\n\nexport type ChapterIndexProps = Omit<React.OlHTMLAttributes<HTMLOListElement>, \"children\"> & {\n /** The chapters, in reading order. */\n chapters: readonly ChapterEntry[];\n /** The word of the latest chapter's mark. @default \"New\" */\n newLabel?: React.ReactNode;\n /** The accessible name of the list, when no heading names it (`aria-labelledby`). */\n label?: string;\n /** The ruling under the rows. `false` when the page is ruled already and the list starts on its module. @default \"lines\" */\n paper?: ChapterPaper;\n /** The app's router link (Next's `Link`), so internal chapters prefetch. */\n linkAs?: LinkComponent;\n};\n\n/** The chapters of a story as a sober timeline: one ruled line each, the number in the margin, the title the link. */\nexport function ChapterIndex({ chapters, newLabel = \"New\", label, paper = \"lines\", linkAs, className, ...props }: ChapterIndexProps) {\n return (\n // `role=\"list\"`: a list without bullets is still a list to VoiceOver.\n <ol role=\"list\" aria-label={label} data-paper={paper || undefined} data-margin=\"\" className={cn(\"kz-chapters\", className)} {...props}>\n {chapters.map((c, i) => (\n <li key={i} className=\"kz-chapter-row\" data-new={c.isNew ? \"\" : undefined} data-detail={c.detail ? \"\" : undefined}>\n <ChapterRow number={c.number} title={c.title} href={c.href} aside={c.period} mark={c.isNew ? newLabel : undefined} detail={c.detail} current={c.current} linkAs={linkAs} />\n </li>\n ))}\n </ol>\n );\n}\n\nexport type ChapterHeadProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The chapter's number, hung in the margin: `01`, `Chapitre 1`. */\n number: React.ReactNode;\n /** The title: the page's `h1`. */\n title: React.ReactNode;\n /** When it happened: `janv. – mars 2026`. */\n period?: React.ReactNode;\n /** How long it reads: `8 min`. */\n readingTime?: React.ReactNode;\n /** What was faced: the first half of the standfirst. */\n faced?: React.ReactNode;\n /** What was built: its second half, after the arrow. */\n built?: React.ReactNode;\n /** The words a screen reader says before each half (the arrow is drawn, not read): `[\"What I faced\", \"What we built\"]`. */\n versusLabels?: readonly [string, string];\n /** The level of the title. @default 1 */\n level?: 1 | 2;\n};\n\n/** The head of a chapter: the number in the margin, the title, the period and the reading time, the standfirst once. */\nexport function ChapterHead({ number, title, period, readingTime, faced, built, versusLabels, level = 1, className, children, ...props }: ChapterHeadProps) {\n const H = level === 1 ? \"h1\" : \"h2\";\n const meta = [period, readingTime].filter((m) => m !== undefined && m !== null && m !== \"\");\n return (\n <header data-margin=\"\" className={cn(\"kz-chapter-head\", className)} {...props}>\n <p className=\"kz-chapter-no\">{number}</p>\n <H className=\"kz-chapter-head-title\">{title}</H>\n {meta.length > 0 && (\n <p className=\"kz-chapter-meta\">\n {meta.map((m, i) => (\n <span key={i}>\n {i > 0 && <span aria-hidden> · </span>}\n {m}\n </span>\n ))}\n </p>\n )}\n {faced && built && (\n <p className=\"kz-chapter-standfirst\">\n {versusLabels && <span className=\"kz-sr-only\">{versusLabels[0]}, </span>}\n {faced}\n <span className=\"kz-chapter-arrow\" aria-hidden>\n {\" → \"}\n </span>\n {versusLabels && <span className=\"kz-sr-only\">; {versusLabels[1]}, </span>}\n {built}\n </p>\n )}\n {children}\n </header>\n );\n}\n\nexport interface ChapterLink {\n /** Its number, in the margin: `02`. */\n number?: React.ReactNode;\n /** Its title, the link. */\n title: React.ReactNode;\n /** Where it leads. */\n href: string;\n}\n\nexport type ChapterFootProps = Omit<React.HTMLAttributes<HTMLElement>, \"children\"> & {\n /** The chapter before this one (none on the first). */\n previous?: ChapterLink;\n /** The chapter after this one (none on the latest). */\n next?: ChapterLink;\n /** The line back to the story: `{ href: \"/\", label: \"Back to the story\" }`. */\n back?: { href: string; label: React.ReactNode };\n /** The quiet words beside each link. @default { previous: \"Previous\", next: \"Next\" } */\n labels?: { previous: React.ReactNode; next: React.ReactNode };\n /** The accessible name of the navigation. @default \"Chapters\" */\n label?: string;\n /** The ruling under the links. @default \"lines\" */\n paper?: ChapterPaper;\n /** The app's router link (Next's `Link`). */\n linkAs?: LinkComponent;\n};\n\n/** The foot of a chapter: the previous and the next on the ruled lines, then one line back to the story. */\nexport function ChapterFoot({\n previous,\n next,\n back,\n labels = { previous: \"Previous\", next: \"Next\" },\n label = \"Chapters\",\n paper = \"lines\",\n linkAs,\n className,\n ...props\n}: ChapterFootProps) {\n return (\n <nav aria-label={label} data-paper={paper || undefined} data-margin=\"\" className={cn(\"kz-chapters kz-chapter-foot\", className)} {...props}>\n <ul role=\"list\">\n {previous && (\n <li className=\"kz-chapter-row\" data-dir=\"previous\">\n <ChapterRow\n number={previous.number}\n title={previous.title}\n href={previous.href}\n rel=\"prev\"\n linkAs={linkAs}\n aside={\n <>\n <span aria-hidden>← </span>\n {labels.previous}\n </>\n }\n />\n </li>\n )}\n {next && (\n <li className=\"kz-chapter-row\" data-dir=\"next\">\n <ChapterRow\n number={next.number}\n title={next.title}\n href={next.href}\n rel=\"next\"\n linkAs={linkAs}\n aside={\n <>\n {labels.next}\n <span aria-hidden> →</span>\n </>\n }\n />\n </li>\n )}\n </ul>\n {back && (\n <p className=\"kz-chapter-back\">\n <BlockLink href={back.href} linkAs={linkAs} className=\"kz-chapter-back-link\">\n <span aria-hidden>↩ </span>\n {back.label}\n </BlockLink>\n </p>\n )}\n </nav>\n );\n}\n"],"mappings":"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","names":[]}
|
package/dist/choice-grid.js
CHANGED
|
@@ -22,7 +22,7 @@ function BlockLink({
|
|
|
22
22
|
}) {
|
|
23
23
|
if (external) return /* @__PURE__ */ jsx("a", { href, target: "_blank", rel: rel ?? "noopener noreferrer", ...props });
|
|
24
24
|
const Comp = Link;
|
|
25
|
-
return /* @__PURE__ */ jsx(Comp, { href, ...props });
|
|
25
|
+
return /* @__PURE__ */ jsx(Comp, { href, rel, ...props });
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
// src/router/route-state.tsx
|