@krizaka/ui 3.54.0 → 3.55.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/README.md +1 -0
- package/dist/account-menu.d.ts +6 -2
- package/dist/account-menu.js +8 -1
- package/dist/account-menu.js.map +1 -1
- package/dist/account-settings.js +28 -88
- package/dist/account-settings.js.map +1 -1
- package/dist/anatomy-plate.d.ts +4 -1
- package/dist/anatomy-plate.js +4 -0
- package/dist/anatomy-plate.js.map +1 -1
- package/dist/app-header/search.d.ts +63 -0
- package/dist/app-header/search.js +70 -0
- package/dist/app-header/search.js.map +1 -0
- package/dist/app-header.d.ts +88 -4
- package/dist/app-header.js +63 -5
- package/dist/app-header.js.map +1 -1
- package/dist/app-shell.js +31 -40
- package/dist/app-shell.js.map +1 -1
- package/dist/argument-card.js +3 -3
- package/dist/bird-plate.d.ts +3 -1
- package/dist/bird-plate.js +2 -2
- package/dist/bird-plate.js.map +1 -1
- package/dist/blocks.css +162 -27
- package/dist/chat.js +2 -2
- package/dist/chat.js.map +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/chip.js +5 -98
- package/dist/chip.js.map +1 -1
- package/dist/choice-grid.js +28 -88
- package/dist/choice-grid.js.map +1 -1
- package/dist/{chunk-YGIN2YIY.js → chunk-3X3OF4TI.js} +2 -2
- package/dist/chunk-3X3OF4TI.js.map +1 -0
- package/dist/chunk-5VEVYDVC.js +11 -0
- package/dist/chunk-5VEVYDVC.js.map +1 -0
- package/dist/chunk-7U5TXA5Q.js +105 -0
- package/dist/chunk-7U5TXA5Q.js.map +1 -0
- package/dist/{chunk-KBQD6HE3.js → chunk-AEP3K4YD.js} +3 -3
- package/dist/{chunk-KBQD6HE3.js.map → chunk-AEP3K4YD.js.map} +1 -1
- package/dist/chunk-BDIU5LZB.js +18 -0
- package/dist/chunk-BDIU5LZB.js.map +1 -0
- package/dist/chunk-CSRKYZ53.js +39 -0
- package/dist/chunk-CSRKYZ53.js.map +1 -0
- package/dist/chunk-HEKDKM5Y.js +128 -0
- package/dist/chunk-HEKDKM5Y.js.map +1 -0
- package/dist/chunk-KGLRZMCY.js +16 -0
- package/dist/chunk-KGLRZMCY.js.map +1 -0
- package/dist/chunk-KID32IRJ.js +18 -0
- package/dist/chunk-KID32IRJ.js.map +1 -0
- package/dist/{chunk-ZQW7LF4Y.js → chunk-OIMXKRXF.js} +2 -2
- package/dist/{chunk-YHKTYFOQ.js → chunk-QWKCNSPF.js} +271 -47
- package/dist/chunk-QWKCNSPF.js.map +1 -0
- package/dist/{chunk-4LYKBSOG.js → chunk-USPOIQV5.js} +2 -2
- package/dist/chunk-USPOIQV5.js.map +1 -0
- package/dist/{chunk-7NRSPHAF.js → chunk-VB7MWE2N.js} +2 -2
- package/dist/{chunk-7NRSPHAF.js.map → chunk-VB7MWE2N.js.map} +1 -1
- package/dist/chunk-VIPSZXO4.js +103 -0
- package/dist/chunk-VIPSZXO4.js.map +1 -0
- package/dist/chunk-YCZ7N6Q6.js +385 -0
- package/dist/chunk-YCZ7N6Q6.js.map +1 -0
- package/dist/code-block.js +81 -98
- package/dist/code-block.js.map +1 -1
- package/dist/combobox.js +2 -2
- package/dist/component-page.d.ts +4 -1
- package/dist/component-page.js +5 -0
- package/dist/component-page.js.map +1 -1
- package/dist/continue-prompt.d.ts +4 -1
- package/dist/continue-prompt.js +4 -0
- package/dist/continue-prompt.js.map +1 -1
- package/dist/data-table.d.ts +60 -4
- package/dist/data-table.js +19 -7
- package/dist/date-picker.js +2 -2
- package/dist/date-picker.js.map +1 -1
- package/dist/detail-layout.d.ts +28 -17
- package/dist/detail-layout.js +73 -16
- package/dist/detail-layout.js.map +1 -1
- package/dist/doodle.d.ts +21 -0
- package/dist/doodle.js +39 -0
- package/dist/doodle.js.map +1 -0
- package/dist/drop-overlay.d.ts +12 -4
- package/dist/drop-overlay.js +16 -6
- package/dist/drop-overlay.js.map +1 -1
- package/dist/elephant.d.ts +2 -0
- package/dist/elephant.js +4 -0
- package/dist/elephant.js.map +1 -1
- package/dist/field.js +1 -1
- package/dist/field.js.map +1 -1
- package/dist/filter-bar.js +2 -2
- package/dist/force-update-screen.d.ts +5 -1
- package/dist/force-update-screen.js +4 -0
- package/dist/force-update-screen.js.map +1 -1
- package/dist/gallery-page.d.ts +4 -1
- package/dist/gallery-page.js +4 -0
- package/dist/gallery-page.js.map +1 -1
- package/dist/genui.js +5 -5
- package/dist/image-cropper.d.ts +10 -2
- package/dist/image-cropper.js +4 -0
- package/dist/image-cropper.js.map +1 -1
- package/dist/kanban.d.ts +3 -0
- package/dist/kanban.js +4 -0
- package/dist/kanban.js.map +1 -1
- package/dist/landscape.d.ts +4 -1
- package/dist/landscape.js +4 -0
- package/dist/landscape.js.map +1 -1
- package/dist/list.js +1 -1
- package/dist/maintenance-screen.d.ts +5 -1
- package/dist/maintenance-screen.js +4 -0
- package/dist/maintenance-screen.js.map +1 -1
- package/dist/map.js +6 -0
- package/dist/map.js.map +1 -1
- package/dist/markdown.d.ts +5 -1
- package/dist/markdown.js +12 -5
- package/dist/markdown.js.map +1 -1
- package/dist/match-dialog.d.ts +4 -1
- package/dist/match-dialog.js +4 -0
- package/dist/match-dialog.js.map +1 -1
- package/dist/media-capture.d.ts +6 -1
- package/dist/media-capture.js +4 -0
- package/dist/media-capture.js.map +1 -1
- package/dist/meter.js +5 -121
- package/dist/meter.js.map +1 -1
- package/dist/native/map.js +6 -0
- package/dist/native/map.js.map +1 -1
- package/dist/native/markdown.d.ts +9 -2
- package/dist/native/markdown.js +46 -7
- package/dist/native/markdown.js.map +1 -1
- package/dist/native/media-capture.d.ts +1 -0
- package/dist/native/media-capture.js +5 -0
- package/dist/native/media-capture.js.map +1 -1
- package/dist/native/vertical-video.d.ts +8 -2
- package/dist/native/vertical-video.js +6 -0
- package/dist/native/vertical-video.js.map +1 -1
- package/dist/native.d.ts +94 -4
- package/dist/native.js +1236 -1110
- package/dist/native.js.map +1 -1
- package/dist/nav-bar/me.d.ts +32 -0
- package/dist/nav-bar/me.js +23 -0
- package/dist/nav-bar/me.js.map +1 -0
- package/dist/nav-bar.d.ts +60 -2
- package/dist/nav-bar.js +92 -48
- package/dist/nav-bar.js.map +1 -1
- package/dist/notification-preferences.d.ts +151 -0
- package/dist/notification-preferences.js +77 -0
- package/dist/notification-preferences.js.map +1 -0
- package/dist/page-header.js +1 -1
- package/dist/page-header.js.map +1 -1
- package/dist/pointer-light.js +5 -0
- package/dist/pointer-light.js.map +1 -1
- package/dist/product-page.d.ts +4 -1
- package/dist/product-page.js +4 -0
- package/dist/product-page.js.map +1 -1
- package/dist/profile-card.d.ts +119 -1
- package/dist/profile-card.js +68 -21
- package/dist/profile-card.js.map +1 -1
- package/dist/promise-card.d.ts +4 -1
- package/dist/promise-card.js +4 -0
- package/dist/promise-card.js.map +1 -1
- package/dist/quota-meter.d.ts +113 -0
- package/dist/quota-meter.js +58 -0
- package/dist/quota-meter.js.map +1 -0
- package/dist/radio-group.js +6 -8
- package/dist/radio-group.js.map +1 -1
- package/dist/rail-nav.d.ts +18 -2
- package/dist/rail-nav.js +25 -2
- package/dist/rail-nav.js.map +1 -1
- package/dist/retro-tv.d.ts +30 -0
- package/dist/retro-tv.js +124 -0
- package/dist/retro-tv.js.map +1 -0
- package/dist/router.d.ts +12 -1
- package/dist/router.js +85 -8
- package/dist/router.js.map +1 -1
- package/dist/scroll-stage.d.ts +5 -1
- package/dist/scroll-stage.js +5 -0
- package/dist/scroll-stage.js.map +1 -1
- package/dist/search-field.js +1 -1
- package/dist/showcase.d.ts +9 -2
- package/dist/showcase.js +5 -0
- package/dist/showcase.js.map +1 -1
- package/dist/signature.d.ts +19 -0
- package/dist/signature.js +39 -0
- package/dist/signature.js.map +1 -0
- package/dist/site-footer.js +1 -1
- package/dist/sites.js +1 -1
- package/dist/sites.js.map +1 -1
- package/dist/slot.d.ts +1 -1
- package/dist/stat.js +1 -1
- package/dist/stat.js.map +1 -1
- package/dist/status-page.d.ts +4 -1
- package/dist/status-page.js +5 -0
- package/dist/status-page.js.map +1 -1
- package/dist/stuck.d.ts +27 -0
- package/dist/stuck.js +26 -0
- package/dist/stuck.js.map +1 -0
- package/dist/swipe-deck.d.ts +9 -2
- package/dist/swipe-deck.js +5 -0
- package/dist/swipe-deck.js.map +1 -1
- package/dist/switch.js +4 -32
- package/dist/switch.js.map +1 -1
- package/dist/tabs.d.ts +47 -8
- package/dist/tabs.js +62 -12
- package/dist/tabs.js.map +1 -1
- package/dist/tag-input.js +2 -2
- package/dist/tag-selector.js +1 -1
- package/dist/terminal-replay.d.ts +4 -1
- package/dist/terminal-replay.js +4 -0
- package/dist/terminal-replay.js.map +1 -1
- package/dist/tree-view.js +4 -0
- package/dist/tree-view.js.map +1 -1
- package/dist/update-prompt.d.ts +5 -1
- package/dist/update-prompt.js +4 -0
- package/dist/update-prompt.js.map +1 -1
- package/dist/video-player.js +7 -376
- package/dist/video-player.js.map +1 -1
- package/dist/video-trimmer.d.ts +6 -1
- package/dist/video-trimmer.js +4 -0
- package/dist/video-trimmer.js.map +1 -1
- package/package.json +141 -29
- package/registry/account-menu.json +9 -8
- package/registry/account-settings.json +2 -2
- package/registry/achievement.json +3 -4
- package/registry/action-bar.json +3 -3
- package/registry/action-sheet.json +1 -0
- package/registry/activity-feed.json +2 -1
- package/registry/agenda.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/anatomy-plate.json +13 -5
- package/registry/app-header.json +470 -23
- package/registry/app-shell.json +2 -2
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +3 -2
- package/registry/badge.json +2 -1
- package/registry/bird-plate.json +16 -2
- package/registry/button.json +7 -6
- package/registry/captcha.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +7 -6
- package/registry/catalogue-page.json +3 -4
- package/registry/changelog-page.json +3 -5
- package/registry/chapter.json +1 -1
- package/registry/chat.json +3 -2
- package/registry/checkbox.json +4 -3
- package/registry/chip-link.json +2 -2
- package/registry/chip-row.json +2 -2
- package/registry/chip.json +3 -2
- package/registry/choice-grid.json +3 -4
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +3 -2
- package/registry/command.json +2 -2
- package/registry/comparison-table.json +1 -1
- package/registry/component-page.json +14 -5
- package/registry/confirm-button.json +4 -4
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +13 -5
- package/registry/countdown.json +4 -3
- package/registry/cover-hero.json +3 -4
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +63 -7
- package/registry/date-picker.json +5 -4
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +2 -1
- package/registry/detail-layout.json +30 -6
- package/registry/dialog.json +7 -6
- package/registry/docs-article-page.json +3 -4
- 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 +3 -5
- package/registry/doodle.json +209 -0
- package/registry/drop-overlay.json +30 -16
- package/registry/dropdown-menu.json +2 -2
- package/registry/elephant.json +15 -7
- package/registry/empty-state.json +2 -1
- package/registry/engine-flow.json +1 -1
- package/registry/error-page.json +3 -5
- package/registry/examples/app-header/family.d.ts +4 -0
- package/registry/examples/app-header/family.js +41 -0
- package/registry/examples/app-header/family.tsx +37 -0
- package/registry/examples/app-header/native/family.d.ts +4 -0
- package/registry/examples/app-header/native/family.dark.png +0 -0
- package/registry/examples/app-header/native/family.js +25 -0
- package/registry/examples/app-header/native/family.light.png +0 -0
- package/registry/examples/app-header/native/family.tsx +33 -0
- package/registry/examples/data-table/applicant-files.d.ts +4 -0
- package/registry/examples/data-table/applicant-files.js +24 -0
- package/registry/examples/data-table/applicant-files.tsx +23 -0
- package/registry/examples/data-table/checks.d.ts +4 -0
- package/registry/examples/data-table/checks.js +25 -0
- package/registry/examples/data-table/checks.tsx +24 -0
- package/registry/examples/detail-layout/profile.d.ts +4 -0
- package/registry/examples/detail-layout/profile.js +26 -0
- package/registry/examples/detail-layout/profile.tsx +21 -0
- package/registry/examples/doodle/kinds.d.ts +4 -0
- package/registry/examples/doodle/kinds.js +17 -0
- package/registry/examples/doodle/kinds.tsx +14 -0
- package/registry/examples/doodle/margin.d.ts +4 -0
- package/registry/examples/doodle/margin.js +17 -0
- package/registry/examples/doodle/margin.tsx +17 -0
- package/registry/examples/markdown/native/basic.dark.png +0 -0
- package/registry/examples/markdown/native/basic.light.png +0 -0
- package/registry/examples/markdown/native/wide-table.d.ts +4 -0
- package/registry/examples/markdown/native/wide-table.dark.png +0 -0
- package/registry/examples/markdown/native/wide-table.js +23 -0
- package/registry/examples/markdown/native/wide-table.light.png +0 -0
- package/registry/examples/markdown/native/wide-table.tsx +22 -0
- package/registry/examples/markdown/wide-table.d.ts +4 -0
- package/registry/examples/markdown/wide-table.js +28 -0
- package/registry/examples/markdown/wide-table.tsx +23 -0
- package/registry/examples/nav-bar/family-product.js +2 -4
- package/registry/examples/nav-bar/family-product.tsx +3 -5
- package/registry/examples/notification-preferences/default.d.ts +4 -0
- package/registry/examples/notification-preferences/default.js +29 -0
- package/registry/examples/notification-preferences/default.tsx +28 -0
- package/registry/examples/profile-card/banner.d.ts +4 -0
- package/registry/examples/profile-card/banner.js +28 -0
- package/registry/examples/profile-card/banner.tsx +24 -0
- package/registry/examples/profile-card/native/banner.d.ts +4 -0
- package/registry/examples/profile-card/native/banner.dark.png +0 -0
- package/registry/examples/profile-card/native/banner.js +22 -0
- package/registry/examples/profile-card/native/banner.light.png +0 -0
- package/registry/examples/profile-card/native/banner.tsx +18 -0
- package/registry/examples/quota-meter/default.d.ts +4 -0
- package/registry/examples/quota-meter/default.js +26 -0
- package/registry/examples/quota-meter/default.tsx +20 -0
- package/registry/examples/quota-meter/full.d.ts +4 -0
- package/registry/examples/quota-meter/full.js +25 -0
- package/registry/examples/quota-meter/full.tsx +18 -0
- package/registry/examples/rail-nav/shortcuts.d.ts +4 -0
- package/registry/examples/rail-nav/shortcuts.js +49 -0
- package/registry/examples/rail-nav/shortcuts.tsx +40 -0
- package/registry/examples/retro-tv/cabinet.d.ts +4 -0
- package/registry/examples/retro-tv/cabinet.js +12 -0
- package/registry/examples/retro-tv/cabinet.tsx +7 -0
- package/registry/examples/retro-tv/portable.d.ts +4 -0
- package/registry/examples/retro-tv/portable.js +12 -0
- package/registry/examples/retro-tv/portable.tsx +7 -0
- package/registry/examples/signature/both.d.ts +4 -0
- package/registry/examples/signature/both.js +11 -0
- package/registry/examples/signature/both.tsx +6 -0
- package/registry/examples/signature/variants.d.ts +4 -0
- package/registry/examples/signature/variants.js +14 -0
- package/registry/examples/signature/variants.tsx +11 -0
- package/registry/examples/stuck/card.d.ts +4 -0
- package/registry/examples/stuck/card.js +13 -0
- package/registry/examples/stuck/card.tsx +14 -0
- package/registry/examples/stuck/holds.d.ts +4 -0
- package/registry/examples/stuck/holds.js +12 -0
- package/registry/examples/stuck/holds.tsx +16 -0
- package/registry/examples/stuck/tag.d.ts +4 -0
- package/registry/examples/stuck/tag.js +12 -0
- package/registry/examples/stuck/tag.tsx +13 -0
- package/registry/examples/tabs/binder.d.ts +4 -0
- package/registry/examples/tabs/binder.js +22 -0
- package/registry/examples/tabs/binder.tsx +20 -0
- package/registry/examples/tabs/native/binder.d.ts +4 -0
- package/registry/examples/tabs/native/binder.dark.png +0 -0
- package/registry/examples/tabs/native/binder.js +26 -0
- package/registry/examples/tabs/native/binder.light.png +0 -0
- package/registry/examples/tabs/native/binder.tsx +22 -0
- package/registry/fab.json +1 -0
- package/registry/field.json +3 -2
- package/registry/file-upload.json +6 -11
- package/registry/filter-bar.json +2 -2
- package/registry/flock.json +3 -4
- package/registry/footnote.json +2 -3
- package/registry/force-update-screen.json +14 -5
- package/registry/form.json +5 -4
- package/registry/gallery-page.json +14 -5
- package/registry/genui.json +2 -2
- package/registry/glossary-term.json +1 -1
- package/registry/glossary.json +1 -1
- package/registry/glow-card.json +2 -2
- package/registry/goal-gauge.json +2 -1
- package/registry/header.json +1 -0
- package/registry/how-it-works-page.json +3 -5
- package/registry/image-cropper.json +13 -5
- package/registry/image-viewer.json +3 -4
- package/registry/index.json +301 -87
- package/registry/iso.json +1 -1
- package/registry/kanban.json +13 -5
- package/registry/kbd.json +1 -1
- package/registry/kpi-explained.json +2 -2
- package/registry/landing-page.json +3 -5
- package/registry/landscape.json +13 -5
- package/registry/language-switch.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +1 -1
- package/registry/list.json +2 -1
- package/registry/loader.json +2 -1
- package/registry/longform-page.json +1 -1
- package/registry/maintenance-screen.json +14 -5
- package/registry/map.json +3 -2
- package/registry/markdown.json +86 -9
- 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 +12 -11
- package/registry/mascots.json +2 -1
- package/registry/match-dialog.json +14 -5
- package/registry/media-capture.json +14 -5
- package/registry/media-gallery.json +3 -5
- package/registry/media-grid.json +1 -1
- package/registry/media-picker.json +2 -3
- package/registry/meta-row.json +2 -1
- package/registry/meter.json +4 -3
- package/registry/nav-bar.json +100 -9
- package/registry/next-actions.json +1 -1
- package/registry/notification-preferences.json +250 -0
- package/registry/number-ticker.json +2 -1
- package/registry/onboarding.json +1 -0
- package/registry/opening-hours.json +1 -1
- package/registry/otp-input.json +1 -0
- package/registry/page-header.json +2 -2
- package/registry/page-hero.json +1 -1
- package/registry/page-index.json +1 -1
- package/registry/page.json +3 -3
- package/registry/pagination.json +2 -1
- package/registry/permission-prompt.json +2 -2
- package/registry/photo-grid.json +4 -4
- package/registry/pointer-light.json +6 -2
- package/registry/popover.json +2 -2
- package/registry/pricing-page.json +4 -6
- package/registry/product-page.json +14 -5
- package/registry/profile-card.json +232 -8
- package/registry/progress.json +4 -3
- package/registry/promise-card.json +13 -5
- package/registry/pull-to-refresh.json +1 -0
- package/registry/quota-meter.json +308 -0
- package/registry/radio-group.json +4 -3
- package/registry/rail-nav.json +48 -10
- package/registry/recipes.json +1 -1
- package/registry/retro-tv.json +478 -0
- package/registry/router.json +3 -3
- package/registry/screen.json +1 -0
- package/registry/scroll-stage.json +14 -5
- package/registry/search-field.json +3 -2
- package/registry/section-backdrop.json +1 -1
- package/registry/segmented.json +1 -0
- package/registry/separator.json +2 -2
- package/registry/service-card.json +1 -1
- package/registry/settings-layout.json +2 -1
- package/registry/showcase.json +14 -5
- package/registry/signature.json +185 -0
- package/registry/site-footer.json +3 -3
- package/registry/sites.json +2 -2
- package/registry/skeleton.json +2 -1
- package/registry/skip-link.json +1 -1
- package/registry/slider.json +5 -4
- package/registry/slot-picker.json +1 -1
- package/registry/slot.json +2 -2
- package/registry/specimen-tag.json +1 -1
- package/registry/spinner.json +4 -3
- package/registry/splash-handoff.json +1 -0
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +2 -3
- package/registry/stat.json +2 -2
- package/registry/status-page.json +13 -5
- package/registry/step-progress.json +2 -1
- package/registry/step-showcase.json +3 -5
- package/registry/stepper.json +2 -1
- package/registry/sticky-action.json +1 -1
- package/registry/stuck.json +219 -0
- package/registry/swipe-deck.json +14 -5
- package/registry/swipeable-row.json +1 -0
- package/registry/switch.json +3 -2
- package/registry/tab-bar.json +1 -0
- package/registry/tabs.json +154 -22
- package/registry/tag-input.json +1 -1
- package/registry/tag-selector.json +2 -1
- package/registry/taped-photo.json +1 -1
- package/registry/terminal-replay.json +14 -5
- package/registry/text-style.json +5 -5
- package/registry/theme.json +2 -1
- package/registry/toast.json +2 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +2 -2
- package/registry/tree-view.json +6 -2
- package/registry/txt.json +1 -0
- package/registry/update-prompt.json +14 -5
- package/registry/upload-queue.json +1 -1
- package/registry/verified-badge.json +6 -6
- package/registry/vertical-video.json +8 -3
- package/registry/video-player.json +5 -6
- package/registry/video-trimmer.json +13 -5
- package/registry/virtual.json +2 -2
- package/registry/waveform.json +4 -3
- package/dist/chunk-4LYKBSOG.js.map +0 -1
- package/dist/chunk-HHFWK2HH.js +0 -163
- package/dist/chunk-HHFWK2HH.js.map +0 -1
- package/dist/chunk-R3LTSMS5.js +0 -75
- package/dist/chunk-R3LTSMS5.js.map +0 -1
- package/dist/chunk-YGIN2YIY.js.map +0 -1
- package/dist/chunk-YHKTYFOQ.js.map +0 -1
- /package/dist/{chunk-ZQW7LF4Y.js.map → chunk-OIMXKRXF.js.map} +0 -0
package/dist/code-block.js
CHANGED
|
@@ -8,80 +8,20 @@ import {
|
|
|
8
8
|
} from "./chunk-WU4VLSEA.js";
|
|
9
9
|
|
|
10
10
|
// src/code-block/code-block.tsx
|
|
11
|
-
import * as
|
|
11
|
+
import * as React4 from "react";
|
|
12
12
|
|
|
13
13
|
// src/tabs/tabs.tsx
|
|
14
14
|
import { Slot, Tabs as TabsPrimitive } from "radix-ui";
|
|
15
|
-
import * as
|
|
15
|
+
import * as React2 from "react";
|
|
16
16
|
import { tv } from "tailwind-variants";
|
|
17
|
-
|
|
18
|
-
// src/router/route-state.tsx
|
|
19
|
-
import * as React from "react";
|
|
20
|
-
import { jsx } from "react/jsx-runtime";
|
|
21
|
-
var CHANGE = "kz-route-state";
|
|
22
|
-
var browserAdapter = {
|
|
23
|
-
search: () => typeof window === "undefined" ? "" : window.location.search,
|
|
24
|
-
navigate: (search, { replace }) => {
|
|
25
|
-
const url = `${window.location.pathname}${search}${window.location.hash}`;
|
|
26
|
-
window.history[replace ? "replaceState" : "pushState"](window.history.state, "", url);
|
|
27
|
-
window.dispatchEvent(new Event(CHANGE));
|
|
28
|
-
},
|
|
29
|
-
subscribe: (onChange) => {
|
|
30
|
-
window.addEventListener("popstate", onChange);
|
|
31
|
-
window.addEventListener(CHANGE, onChange);
|
|
32
|
-
return () => {
|
|
33
|
-
window.removeEventListener("popstate", onChange);
|
|
34
|
-
window.removeEventListener(CHANGE, onChange);
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var AdapterContext = React.createContext(browserAdapter);
|
|
39
|
-
function readRouteValue(search, key, { values, default: fallback }) {
|
|
40
|
-
const raw = new URLSearchParams(search).get(key);
|
|
41
|
-
if (raw === null) return fallback;
|
|
42
|
-
return !values || values.includes(raw) ? raw : fallback;
|
|
43
|
-
}
|
|
44
|
-
function writeRouteValue(search, key, value, fallback) {
|
|
45
|
-
const params = new URLSearchParams(search);
|
|
46
|
-
if (value === fallback) params.delete(key);
|
|
47
|
-
else params.set(key, value);
|
|
48
|
-
const text = params.toString();
|
|
49
|
-
return text ? `?${text}` : "";
|
|
50
|
-
}
|
|
51
|
-
function useRouteState(key, { values, default: fallback, history = "push" }) {
|
|
52
|
-
const adapter = React.useContext(AdapterContext);
|
|
53
|
-
const search = React.useSyncExternalStore(adapter.subscribe, adapter.search, () => "");
|
|
54
|
-
const value = key === void 0 ? fallback : readRouteValue(search, key, { values, default: fallback });
|
|
55
|
-
const set = React.useCallback(
|
|
56
|
-
(next) => {
|
|
57
|
-
if (key === void 0) return;
|
|
58
|
-
adapter.navigate(writeRouteValue(adapter.search(), key, next, fallback), { replace: history === "replace" });
|
|
59
|
-
},
|
|
60
|
-
[adapter, key, fallback, history]
|
|
61
|
-
);
|
|
62
|
-
return [value, set];
|
|
63
|
-
}
|
|
64
|
-
function useRouteBinding(routeKey, routeValues, props) {
|
|
65
|
-
const initial = props.defaultValue ?? props.value ?? routeValues?.[0] ?? "";
|
|
66
|
-
const [value, set] = useRouteState(routeKey, { values: routeValues, default: initial });
|
|
67
|
-
if (routeKey === void 0) return props;
|
|
68
|
-
return {
|
|
69
|
-
...props,
|
|
70
|
-
value,
|
|
71
|
-
defaultValue: void 0,
|
|
72
|
-
onValueChange: (next) => {
|
|
73
|
-
set(next);
|
|
74
|
-
props.onValueChange?.(next);
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
}
|
|
17
|
+
import { useRouteBinding } from "@krizaka/ui/router";
|
|
78
18
|
|
|
79
19
|
// src/sliding-indicator.ts
|
|
80
|
-
import * as
|
|
81
|
-
var useIsoLayoutEffect = typeof window === "undefined" ?
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
var useIsoLayoutEffect = typeof window === "undefined" ? React.useEffect : React.useLayoutEffect;
|
|
82
22
|
function useSlidingIndicator({ item, active, prefer, follow = false }) {
|
|
83
|
-
const ref =
|
|
84
|
-
const place =
|
|
23
|
+
const ref = React.useRef(null);
|
|
24
|
+
const place = React.useCallback((target) => {
|
|
85
25
|
const list = ref.current;
|
|
86
26
|
if (!list) return;
|
|
87
27
|
if (!(target instanceof HTMLElement) || !list.contains(target)) {
|
|
@@ -96,7 +36,7 @@ function useSlidingIndicator({ item, active, prefer, follow = false }) {
|
|
|
96
36
|
list.style.setProperty("--kz-ind-h", `${a.height}px`);
|
|
97
37
|
list.setAttribute("data-indicator", "on");
|
|
98
38
|
}, []);
|
|
99
|
-
const rest =
|
|
39
|
+
const rest = React.useCallback(
|
|
100
40
|
() => {
|
|
101
41
|
const list = ref.current;
|
|
102
42
|
const hovered = follow ? list?.querySelector(`${item}:hover`) : null;
|
|
@@ -104,7 +44,7 @@ function useSlidingIndicator({ item, active, prefer, follow = false }) {
|
|
|
104
44
|
},
|
|
105
45
|
[place, active, prefer, item, follow]
|
|
106
46
|
);
|
|
107
|
-
const follow_ =
|
|
47
|
+
const follow_ = React.useCallback((target) => {
|
|
108
48
|
const hit = target instanceof Element ? target.closest(item) : null;
|
|
109
49
|
if (hit && ref.current?.contains(hit)) place(hit);
|
|
110
50
|
else rest();
|
|
@@ -132,7 +72,7 @@ function useSlidingIndicator({ item, active, prefer, follow = false }) {
|
|
|
132
72
|
}
|
|
133
73
|
|
|
134
74
|
// src/tabs/tabs.tsx
|
|
135
|
-
import { jsx
|
|
75
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
136
76
|
var tabs = tv({
|
|
137
77
|
slots: {
|
|
138
78
|
root: "flex gap-4 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:flex-row",
|
|
@@ -158,33 +98,76 @@ var tabs = tv({
|
|
|
158
98
|
pills: {
|
|
159
99
|
list: "gap-1.5 overflow-x-auto overflow-y-hidden overscroll-x-contain pt-1 -mt-1 pb-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden before:left-0 before:top-0 before:h-(--kz-ind-h) before:w-(--kz-ind-w) before:translate-x-(--kz-ind-x) before:translate-y-(--kz-ind-y) before:rounded-sm before:border before:border-accent before:bg-accent-soft",
|
|
160
100
|
trigger: "h-9 rounded-sm border border-border-default bg-surface-1 px-4 text-xs text-fg-secondary hover:border-border-strong hover:text-fg data-[state=active]:border-accent data-[state=active]:bg-accent-soft data-[state=active]:text-fg group-data-[indicator=on]/tabs:data-[state=active]:border-transparent group-data-[indicator=on]/tabs:data-[state=active]:bg-transparent"
|
|
101
|
+
},
|
|
102
|
+
/*
|
|
103
|
+
* Binder dividers (intercalaires, #648): organise collections, tags and statuses. Each tab is a divider with a
|
|
104
|
+
* coloured top edge (`hue`), its words and a count; the active one is the page's colour and joins the content
|
|
105
|
+
* under the list's line. Too many dividers scroll sideways, the edges fading. No paper texture: organisation only.
|
|
106
|
+
*/
|
|
107
|
+
binder: {
|
|
108
|
+
list: "items-end gap-1 overflow-x-auto overflow-y-hidden overscroll-x-contain border-b border-border-default px-3 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden [mask-image:linear-gradient(to_right,transparent,black_12px,black_calc(100%-12px),transparent)]",
|
|
109
|
+
trigger: "relative -mb-px min-h-10 rounded-t-lg border border-b-0 border-border-default bg-surface-2 px-3.5 pb-2 pt-2.5 text-sm text-fg-secondary before:absolute before:inset-x-0 before:-top-px before:h-1 before:rounded-t-lg before:bg-(--kz-hue,var(--kz-accent)) hover:bg-surface-3 hover:text-fg data-[state=active]:z-[1] data-[state=active]:bg-surface-1 data-[state=active]:pb-2.5 data-[state=active]:text-fg data-[state=active]:shadow-[0_1px_0_0_var(--kz-surface-1)] motion-reduce:transition-none"
|
|
161
110
|
}
|
|
162
111
|
}
|
|
163
112
|
},
|
|
164
113
|
defaultVariants: { variant: "underline" }
|
|
165
114
|
});
|
|
166
|
-
var
|
|
115
|
+
var HUE = {
|
|
116
|
+
accent: "var(--kz-accent)",
|
|
117
|
+
success: "var(--kz-success-text)",
|
|
118
|
+
warning: "var(--kz-warning-text)",
|
|
119
|
+
danger: "var(--kz-danger-text)",
|
|
120
|
+
neutral: "var(--kz-text-muted)"
|
|
121
|
+
};
|
|
122
|
+
var hueStyle = (hue, style) => hue ? { ...style, ["--kz-hue"]: HUE[hue] } : style;
|
|
123
|
+
function TabCount({ count }) {
|
|
124
|
+
if (count === void 0) return null;
|
|
125
|
+
return /* @__PURE__ */ jsx("span", { "data-tab-count": "", className: "font-mono text-xs font-medium tabular-nums text-fg-secondary", children: count });
|
|
126
|
+
}
|
|
127
|
+
function AddButton({ add }) {
|
|
128
|
+
return /* @__PURE__ */ jsxs(
|
|
129
|
+
"button",
|
|
130
|
+
{
|
|
131
|
+
type: "button",
|
|
132
|
+
onClick: add.onAdd,
|
|
133
|
+
className: "mb-1 ml-1 inline-flex min-h-9 shrink-0 items-center gap-1.5 rounded-lg px-2.5 text-sm font-medium text-fg-secondary hover:bg-surface-2 hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, focusable: "false", children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14" }) }),
|
|
136
|
+
add.label
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
var VariantContext = React2.createContext("underline");
|
|
167
142
|
function TabsRoot({ variant = "underline", className, routeKey, routeValues, ...rest }) {
|
|
168
143
|
const props = useRouteBinding(routeKey, routeValues, rest);
|
|
169
|
-
return /* @__PURE__ */
|
|
144
|
+
return /* @__PURE__ */ jsx(VariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsx(TabsPrimitive.Root, { "data-variant": variant, className: tabs({ variant }).root({ className }), ...props }) });
|
|
170
145
|
}
|
|
171
|
-
function TabsList({ className, ...props }) {
|
|
172
|
-
const variant =
|
|
146
|
+
function TabsList({ className, add, ...props }) {
|
|
147
|
+
const variant = React2.useContext(VariantContext);
|
|
173
148
|
const { ref } = useSlidingIndicator({ item: "[role=tab]", active: "[role=tab][data-state=active]" });
|
|
174
|
-
|
|
149
|
+
const list = /* @__PURE__ */ jsx(TabsPrimitive.List, { ref, "data-variant": variant, className: tabs({ variant }).list({ className: cn(add && "min-w-0 flex-1 border-b-0", className) }), ...props });
|
|
150
|
+
if (!add) return list;
|
|
151
|
+
return /* @__PURE__ */ jsxs("div", { "data-tabs-row": "", className: cn("flex min-w-0 items-end", variant === "binder" && "border-b border-border-default"), children: [
|
|
152
|
+
list,
|
|
153
|
+
/* @__PURE__ */ jsx(AddButton, { add })
|
|
154
|
+
] });
|
|
175
155
|
}
|
|
176
|
-
function TabsTrigger({ className, ...props }) {
|
|
177
|
-
const variant =
|
|
178
|
-
return /* @__PURE__ */
|
|
156
|
+
function TabsTrigger({ className, count, hue, style, children, ...props }) {
|
|
157
|
+
const variant = React2.useContext(VariantContext);
|
|
158
|
+
return /* @__PURE__ */ jsxs(TabsPrimitive.Trigger, { className: tabs({ variant }).trigger({ className }), style: hueStyle(hue, style), "data-hue": hue, ...props, children: [
|
|
159
|
+
children,
|
|
160
|
+
/* @__PURE__ */ jsx(TabCount, { count })
|
|
161
|
+
] });
|
|
179
162
|
}
|
|
180
163
|
function TabsContent({ className, ...props }) {
|
|
181
|
-
return /* @__PURE__ */
|
|
164
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.Content, { className: tabs().content({ className }), ...props });
|
|
182
165
|
}
|
|
183
|
-
var NavContext =
|
|
166
|
+
var NavContext = React2.createContext(null);
|
|
184
167
|
|
|
185
168
|
// src/code-block/tokens.tsx
|
|
186
169
|
import { renderTokens } from "@tanstack/highlight/core";
|
|
187
|
-
import * as
|
|
170
|
+
import * as React3 from "react";
|
|
188
171
|
|
|
189
172
|
// src/code-block/highlighter.ts
|
|
190
173
|
import { createHighlighter } from "@tanstack/highlight/core";
|
|
@@ -195,7 +178,7 @@ import { html } from "@tanstack/highlight/languages/html";
|
|
|
195
178
|
import { java } from "@tanstack/highlight/languages/java";
|
|
196
179
|
import { js } from "@tanstack/highlight/languages/js";
|
|
197
180
|
import { json } from "@tanstack/highlight/languages/json";
|
|
198
|
-
import { jsx as
|
|
181
|
+
import { jsx as jsx2 } from "@tanstack/highlight/languages/jsx";
|
|
199
182
|
import { kotlin } from "@tanstack/highlight/languages/kotlin";
|
|
200
183
|
import { plaintext } from "@tanstack/highlight/languages/plaintext";
|
|
201
184
|
import { shell } from "@tanstack/highlight/languages/shell";
|
|
@@ -203,7 +186,7 @@ import { ts } from "@tanstack/highlight/languages/ts";
|
|
|
203
186
|
import { tsx } from "@tanstack/highlight/languages/tsx";
|
|
204
187
|
import { yaml } from "@tanstack/highlight/languages/yaml";
|
|
205
188
|
var codeHighlighter = createHighlighter({
|
|
206
|
-
languages: [css, diff, { ...env, aliases: [...env.aliases ?? [], "properties"] }, html, java, js, json,
|
|
189
|
+
languages: [css, diff, { ...env, aliases: [...env.aliases ?? [], "properties"] }, html, java, js, json, jsx2, kotlin, plaintext, shell, ts, tsx, yaml],
|
|
207
190
|
fallbackLanguage: "plaintext"
|
|
208
191
|
});
|
|
209
192
|
|
|
@@ -211,7 +194,7 @@ var codeHighlighter = createHighlighter({
|
|
|
211
194
|
var toReact = (node, key) => {
|
|
212
195
|
if (node.type === "text") return node.value;
|
|
213
196
|
const data = Object.fromEntries(Object.entries(node.data ?? {}).map(([name, value]) => [`data-${name}`, value]));
|
|
214
|
-
return
|
|
197
|
+
return React3.createElement("span", { key, className: node.classNames.join(" "), ...data }, node.children.map(toReact));
|
|
215
198
|
};
|
|
216
199
|
function highlight(code, language = "text", { lineNumbers, annotations } = {}) {
|
|
217
200
|
const { tokens } = codeHighlighter.tokenize(code, { lang: language });
|
|
@@ -223,10 +206,10 @@ function normalizeCodeLanguage(language) {
|
|
|
223
206
|
}
|
|
224
207
|
|
|
225
208
|
// src/code-block/code-block.tsx
|
|
226
|
-
import { jsx as
|
|
209
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
227
210
|
function CodeBlock({ code, language = "text", file, copyLabel, copiedLabel, highlight: colour = true, lineNumbers, annotations, onCopy, className, ...props }) {
|
|
228
|
-
const [copied, setCopied] =
|
|
229
|
-
|
|
211
|
+
const [copied, setCopied] = React4.useState(false);
|
|
212
|
+
React4.useEffect(() => {
|
|
230
213
|
if (!copied) return;
|
|
231
214
|
const t = setTimeout(() => setCopied(false), 1800);
|
|
232
215
|
return () => clearTimeout(t);
|
|
@@ -235,24 +218,24 @@ function CodeBlock({ code, language = "text", file, copyLabel, copiedLabel, high
|
|
|
235
218
|
setCopied(true);
|
|
236
219
|
onCopy?.();
|
|
237
220
|
});
|
|
238
|
-
return /* @__PURE__ */
|
|
239
|
-
file || language !== "text" || copyLabel ? /* @__PURE__ */
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
language !== "text" && /* @__PURE__ */
|
|
221
|
+
return /* @__PURE__ */ jsxs2("figure", { className: cn("kz-code", className), ...props, children: [
|
|
222
|
+
file || language !== "text" || copyLabel ? /* @__PURE__ */ jsxs2("figcaption", { className: "kz-code-bar", children: [
|
|
223
|
+
/* @__PURE__ */ jsxs2("span", { className: "kz-code-file", children: [
|
|
224
|
+
language !== "text" && /* @__PURE__ */ jsx3("span", { className: "kz-code-lang", children: language }),
|
|
242
225
|
file
|
|
243
226
|
] }),
|
|
244
|
-
copyLabel ? /* @__PURE__ */
|
|
245
|
-
copied ? /* @__PURE__ */
|
|
246
|
-
/* @__PURE__ */
|
|
227
|
+
copyLabel ? /* @__PURE__ */ jsxs2("button", { type: "button", className: "kz-code-copy", onClick: copy, "data-copied": copied ? "" : void 0, children: [
|
|
228
|
+
copied ? /* @__PURE__ */ jsx3(CheckGlyph, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx3(CopyGlyph, { className: "h-3.5 w-3.5" }),
|
|
229
|
+
/* @__PURE__ */ jsx3("span", { "aria-live": "polite", children: copied ? copiedLabel ?? copyLabel : copyLabel })
|
|
247
230
|
] }) : null
|
|
248
231
|
] }) : null,
|
|
249
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ jsx3("pre", { tabIndex: 0, className: lineNumbers ? "th-code--line-numbers" : void 0, "data-focus": annotations?.some((a) => a.kind === "focus") ? "" : void 0, children: /* @__PURE__ */ jsx3("code", { "data-language": language, children: colour ? highlight(code, language, { lineNumbers, annotations }) : code }) })
|
|
250
233
|
] });
|
|
251
234
|
}
|
|
252
235
|
function CodeTabs({ label, tabs: tabs2, defaultValue, className, ...props }) {
|
|
253
|
-
return /* @__PURE__ */
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
-
tabs2.map((t) => /* @__PURE__ */
|
|
236
|
+
return /* @__PURE__ */ jsxs2(TabsRoot, { defaultValue: defaultValue ?? tabs2[0]?.id, variant: "segmented", className: cn("kz-code-tabs", className), ...props, children: [
|
|
237
|
+
/* @__PURE__ */ jsx3(TabsList, { "aria-label": label, children: tabs2.map((t) => /* @__PURE__ */ jsx3(TabsTrigger, { value: t.id, children: t.label }, t.id)) }),
|
|
238
|
+
tabs2.map((t) => /* @__PURE__ */ jsx3(TabsContent, { value: t.id, children: t.content }, t.id))
|
|
256
239
|
] });
|
|
257
240
|
}
|
|
258
241
|
export {
|
package/dist/code-block.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/code-block/code-block.tsx","../src/tabs/tabs.tsx","../src/router/route-state.tsx","../src/sliding-indicator.ts","../src/code-block/tokens.tsx","../src/code-block/highlighter.ts"],"sourcesContent":["// Client (the copy button, the tabs). A sample of code (blocks.css): its language and its file name, the code\n// highlighted by TanStack Highlight (it scrolls sideways, never shrinks, and takes the keyboard's focus to scroll),\n// lines numbered or set apart (highlighted, added, removed, in focus), a copy button that says it copied in a polite\n// live region. CodeTabs puts several ways to write the same thing (Maven · Gradle · npm) under\n// the tabs of @krizaka/ui.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { CheckGlyph, CopyGlyph } from \"../glyphs\";\nimport { TabsContent, TabsList, TabsRoot, TabsTrigger } from \"../tabs/tabs\";\nimport { type CodeAnnotation, highlight } from \"./tokens\";\n\nexport type CodeBlockProps = Omit<React.HTMLAttributes<HTMLElement>, \"children\"> & {\n /** The code, as it is copied. */\n code: string;\n /**\n * Its language, shown as a tag and used by the highlighter: `ts`, `tsx`, `js`, `jsx`, `json`, `yaml`, `bash`, `html`\n * (`xml`), `css`, `java`, `kotlin`, `diff`, `properties`. Another one is shown as plain text.\n */\n language?: string;\n /** The file it belongs in (`pom.xml`, `application.yml`), or what it is (`Terminal`). */\n file?: React.ReactNode;\n /** The copy button's words, passed translated. Without them there is no copy button (a sample inside a text, say). */\n copyLabel?: string;\n /** What the button says once the code is copied (announced politely). */\n copiedLabel?: string;\n /**\n * Colours comments, strings, keywords, types, tags and numbers (the tokens' roles).\n * @default true\n */\n highlight?: boolean;\n /** A number before every line. */\n lineNumbers?: boolean;\n /** Lines set apart: `highlight`, `added`, `removed`, `error`, `warning`, `dim`, or `focus` (all the others are dimmed). */\n annotations?: readonly CodeAnnotation[];\n /** Called after the code is copied. */\n onCopy?: () => void;\n};\n\n/** A code sample: language and file name, highlighted code that scrolls sideways, a copy button. */\nexport function CodeBlock({ code, language = \"text\", file, copyLabel, copiedLabel, highlight: colour = true, lineNumbers, annotations, onCopy, className, ...props }: CodeBlockProps) {\n const [copied, setCopied] = React.useState(false);\n React.useEffect(() => {\n if (!copied) return;\n const t = setTimeout(() => setCopied(false), 1800);\n return () => clearTimeout(t);\n }, [copied]);\n const copy = () =>\n navigator.clipboard?.writeText(code).then(() => {\n setCopied(true);\n onCopy?.();\n });\n return (\n <figure className={cn(\"kz-code\", className)} {...props}>\n {file || language !== \"text\" || copyLabel ? (\n <figcaption className=\"kz-code-bar\">\n <span className=\"kz-code-file\">\n {language !== \"text\" && <span className=\"kz-code-lang\">{language}</span>}\n {file}\n </span>\n {copyLabel ? (\n <button type=\"button\" className=\"kz-code-copy\" onClick={copy} data-copied={copied ? \"\" : undefined}>\n {copied ? <CheckGlyph className=\"h-3.5 w-3.5\" /> : <CopyGlyph className=\"h-3.5 w-3.5\" />}\n <span aria-live=\"polite\">{copied ? (copiedLabel ?? copyLabel) : copyLabel}</span>\n </button>\n ) : null}\n </figcaption>\n ) : null}\n <pre tabIndex={0} className={lineNumbers ? \"th-code--line-numbers\" : undefined} data-focus={annotations?.some((a) => a.kind === \"focus\") ? \"\" : undefined}>\n <code data-language={language}>{colour ? highlight(code, language, { lineNumbers, annotations }) : code}</code>\n </pre>\n </figure>\n );\n}\n\nexport type CodeTabsProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"dir\" | \"defaultValue\"> & {\n /** What the tabs choose between (`Build tool`): the tab list's accessible name. */\n label: string;\n /** The ways to write it: an id, the tab's words, its sample (a `CodeBlock`). */\n tabs: readonly { id: string; label: React.ReactNode; content: React.ReactNode }[];\n /** The tab open at first. Defaults to the first one. */\n defaultValue?: string;\n};\n\n/** Several ways to write the same thing (Maven · Gradle · npm): segmented tabs above code samples. */\nexport function CodeTabs({ label, tabs, defaultValue, className, ...props }: CodeTabsProps) {\n return (\n <TabsRoot defaultValue={defaultValue ?? tabs[0]?.id} variant=\"segmented\" className={cn(\"kz-code-tabs\", className)} {...props}>\n <TabsList aria-label={label}>\n {tabs.map((t) => (\n <TabsTrigger key={t.id} value={t.id}>\n {t.label}\n </TabsTrigger>\n ))}\n </TabsList>\n {tabs.map((t) => (\n <TabsContent key={t.id} value={t.id}>\n {t.content}\n </TabsContent>\n ))}\n </TabsRoot>\n );\n}\n","// Client (a context). Radix Tabs does the roles (tablist, tab, tabpanel), the aria-selected / aria-controls wiring,\n// the roving focus (arrows, Home, End) and automatic activation: this file only holds the three looks.\nimport { Slot, Tabs as TabsPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { useRouteBinding } from \"../router\";\nimport { useSlidingIndicator } from \"../sliding-indicator\";\n\nexport const tabs = tv({\n slots: {\n root: \"flex gap-4 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:flex-row\",\n // One light glides from the active tab to the next (`before:`, placed by useSlidingIndicator); until it is placed\n // (server render), each trigger carries its own active style.\n list:\n \"group/tabs relative isolate flex shrink-0 data-[orientation=vertical]:flex-col \" +\n \"before:pointer-events-none before:absolute before:-z-10 before:opacity-0 before:transition-[translate,width,height,opacity] before:duration-300 \" +\n \"motion-reduce:before:transition-none data-[indicator=on]:before:opacity-100\",\n trigger:\n \"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-colors \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40\",\n content: \"kz-tabs-panel min-w-0 flex-1 rounded-lg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring data-[state=inactive]:hidden\",\n },\n variants: {\n variant: {\n /* The section of a page: a line under the list, the active tab underlined in the accent. */\n underline: {\n list:\n \"gap-1 border-border-default data-[orientation=horizontal]:border-b data-[orientation=vertical]:border-r before:rounded-sm before:bg-accent \" +\n \"data-[orientation=horizontal]:before:-bottom-px data-[orientation=horizontal]:before:left-0 data-[orientation=horizontal]:before:h-0.5 \" +\n \"data-[orientation=horizontal]:before:w-(--kz-ind-w) data-[orientation=horizontal]:before:translate-x-(--kz-ind-x) \" +\n \"data-[orientation=vertical]:before:-right-px data-[orientation=vertical]:before:top-0 data-[orientation=vertical]:before:w-0.5 \" +\n \"data-[orientation=vertical]:before:h-(--kz-ind-h) data-[orientation=vertical]:before:translate-y-(--kz-ind-y)\",\n trigger:\n \"relative rounded-md px-3 py-2.5 text-sm text-fg-secondary hover:text-fg data-[state=active]:text-fg \" +\n \"after:absolute after:rounded-sm after:bg-transparent data-[state=active]:after:bg-accent \" +\n \"data-[orientation=horizontal]:after:inset-x-2 data-[orientation=horizontal]:after:-bottom-px data-[orientation=horizontal]:after:h-0.5 \" +\n \"data-[orientation=vertical]:justify-start data-[orientation=vertical]:after:inset-y-1.5 data-[orientation=vertical]:after:-right-px data-[orientation=vertical]:after:w-0.5 \" +\n \"group-data-[indicator=on]/tabs:data-[state=active]:after:bg-transparent\",\n },\n /* A view switch: equal segments in a track, the active one filled. */\n segmented: {\n list:\n \"inline-grid auto-cols-fr grid-flow-col gap-1 self-start rounded-xl border border-border-default bg-surface-1 p-1 data-[orientation=vertical]:grid-flow-row \" +\n \"before:left-0 before:top-0 before:h-(--kz-ind-h) before:w-(--kz-ind-w) before:translate-x-(--kz-ind-x) before:translate-y-(--kz-ind-y) before:rounded-lg before:bg-accent before:shadow-sm\",\n trigger:\n \"min-h-8 rounded-lg px-3 py-1.5 text-xs text-fg-secondary hover:bg-surface-2 hover:text-fg \" +\n \"data-[state=active]:bg-accent data-[state=active]:text-on-accent data-[state=active]:shadow-sm data-[state=active]:hover:bg-accent \" +\n \"transition-colors group-data-[indicator=on]/tabs:data-[state=active]:bg-transparent group-data-[indicator=on]/tabs:data-[state=active]:shadow-none\",\n },\n /* Pills that scroll sideways on a phone: a feed's sections. */\n pills: {\n list:\n \"gap-1.5 overflow-x-auto overflow-y-hidden overscroll-x-contain pt-1 -mt-1 pb-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden \" +\n \"before:left-0 before:top-0 before:h-(--kz-ind-h) before:w-(--kz-ind-w) before:translate-x-(--kz-ind-x) before:translate-y-(--kz-ind-y) \" +\n \"before:rounded-sm before:border before:border-accent before:bg-accent-soft\",\n trigger:\n \"h-9 rounded-sm border border-border-default bg-surface-1 px-4 text-xs text-fg-secondary hover:border-border-strong hover:text-fg \" +\n \"data-[state=active]:border-accent data-[state=active]:bg-accent-soft data-[state=active]:text-fg \" +\n \"group-data-[indicator=on]/tabs:data-[state=active]:border-transparent group-data-[indicator=on]/tabs:data-[state=active]:bg-transparent\",\n },\n },\n },\n defaultVariants: { variant: \"underline\" },\n});\n\nexport type TabsVariants = VariantProps<typeof tabs>;\ntype Variant = NonNullable<TabsVariants[\"variant\"]>;\n\nconst VariantContext = React.createContext<Variant>(\"underline\");\n\nexport type TabsRootProps = React.ComponentProps<typeof TabsPrimitive.Root> & {\n /** underline (the sections of a page) · segmented (a view switch) · pills (a feed's sections). */\n variant?: TabsVariants[\"variant\"];\n /** Binds the active tab to this search parameter of the URL (`?tab=…`): the URL is the state. Without it the state is local — only for an ephemeral choice. */\n routeKey?: string;\n /** The values the parameter may hold (the tabs' `value`s); the first is the default unless `defaultValue` says otherwise. */\n routeValues?: readonly string[];\n};\n\n/** `value`/`defaultValue` + `onValueChange`, `orientation` (horizontal by default), `variant` for the list. */\nexport function TabsRoot({ variant = \"underline\", className, routeKey, routeValues, ...rest }: TabsRootProps) {\n const props = useRouteBinding(routeKey, routeValues, rest);\n return (\n <VariantContext.Provider value={variant}>\n <TabsPrimitive.Root data-variant={variant} className={tabs({ variant }).root({ className })} {...props} />\n </VariantContext.Provider>\n );\n}\n\n/** The tabs. Name it (`aria-label`) when no heading says what it switches. One light glides to the active tab. */\nexport function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {\n const variant = React.useContext(VariantContext);\n const { ref } = useSlidingIndicator<HTMLDivElement>({ item: \"[role=tab]\", active: \"[role=tab][data-state=active]\" });\n return <TabsPrimitive.List ref={ref} data-variant={variant} className={tabs({ variant }).list({ className })} {...props} />;\n}\n\nexport function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n const variant = React.useContext(VariantContext);\n return <TabsPrimitive.Trigger className={tabs({ variant }).trigger({ className })} {...props} />;\n}\n\nexport function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return <TabsPrimitive.Content className={tabs().content({ className })} {...props} />;\n}\n\n// ── Route mode: tabs that are links; the URL is the state (Oussama, 2026-10-22) ──────────────────────────────────────\n\n/**\n * Is the link `href` the tab of the route `current` (a path, with its search: `/docs/api?tab=x`)? The path must equal the\n * link's (a trailing slash, a locale-free comparison and the hash do not count); with `exact` false (the default) a deeper\n * path of the same section counts too (`/docs/api/x` is in `/docs/api`); every search parameter of the link must be in\n * `current`. The hub link (`/`) is only ever active on `/` itself.\n */\nexport function isTabActive(current: string, href: string, exact = false): boolean {\n const split = (value: string) => {\n const url = new URL(value.split(\"#\")[0]!, \"https://tabs.invalid\");\n return { path: url.pathname.replace(/\\/+$/, \"\") || \"/\", search: url.searchParams };\n };\n const here = split(current);\n const target = split(href);\n const samePath = here.path === target.path;\n const deeper = !exact && target.path !== \"/\" && here.path.startsWith(`${target.path}/`);\n if (!samePath && !deeper) return false;\n for (const [key, value] of target.search) if (here.search.get(key) !== value) return false;\n return true;\n}\n\ninterface NavState {\n current: string;\n variant: Variant;\n}\nconst NavContext = React.createContext<NavState | null>(null);\n\nexport type TabsNavProps = Omit<React.ComponentProps<\"nav\">, \"children\"> & {\n /** The navigation's accessible name (« Sections »). */\n label: string;\n /** The current route, passed in: the path with its search (`usePathname()` + `useSearchParams()`, `/docs?tab=api`). The active tab comes from it; no local state. */\n current: string;\n /** underline (the sections of a page) · segmented (a view switch) · pills (a feed's sections). */\n variant?: TabsVariants[\"variant\"];\n /** The tabs: `Tabs.NavLink`. */\n children: React.ReactNode;\n};\n\n/**\n * Tabs as routes: a `nav` of links, the URL is the state. Per WAI-ARIA these are links, not a tablist: each tab is an\n * anchor, the active one carries `aria-current=\"page\"`, the keyboard is the page's own (Tab walks the links, Enter\n * follows one) and there is no panel — the page is the panel. The same looks and the same gliding light as `Tabs.List`.\n */\nexport function TabsNav({ label, current, variant = \"underline\", className, children, ...props }: TabsNavProps) {\n const { ref } = useSlidingIndicator<HTMLElement>({ item: \"[data-tabs-link]\", active: \"[data-tabs-link][data-state=active]\" });\n const value = React.useMemo(() => ({ current, variant }), [current, variant]);\n return (\n <NavContext.Provider value={value}>\n <nav ref={ref} aria-label={label} data-variant={variant} data-orientation=\"horizontal\" className={tabs({ variant }).list({ className })} {...props}>\n {children}\n </nav>\n </NavContext.Provider>\n );\n}\n\nexport type TabsNavLinkProps = React.ComponentProps<\"a\"> & {\n /** Where the tab goes (`/docs/api`, `/docs?tab=api`). */\n href: string;\n /** Match this path only, not the pages below it. */\n exact?: boolean;\n /** Renders your router's `<Link>` (pass it as the only child; the `href` goes on this part and on the link). */\n asChild?: boolean;\n};\n\n/** One tab of `Tabs.Nav`: an anchor that is active when the current route is its `href`. */\nexport function TabsNavLink({ href, exact, asChild, className, children, ...props }: TabsNavLinkProps) {\n const ctx = React.useContext(NavContext);\n if (!ctx) throw new Error(\"Tabs.NavLink must be inside <Tabs.Nav>\");\n const active = isTabActive(ctx.current, href, exact);\n const Comp = asChild ? Slot.Root : \"a\";\n return (\n <Comp\n data-tabs-link=\"\"\n data-state={active ? \"active\" : \"inactive\"}\n data-orientation=\"horizontal\"\n aria-current={active ? \"page\" : undefined}\n {...(asChild ? {} : { href })}\n className={cn(tabs({ variant: ctx.variant }).trigger(), \"no-underline\", className)}\n {...props}\n >\n {children}\n </Comp>\n );\n}\n\n/** `Tabs.Root/List/Trigger/Content` — `variant` underline · segmented · pills on the root. `Tabs.Nav` + `Tabs.NavLink`: the same tabs as routes. */\nexport const Tabs = { Root: TabsRoot, List: TabsList, Trigger: TabsTrigger, Content: TabsContent, Nav: TabsNav, NavLink: TabsNavLink };\n","// Client. The URL is the state: a selection the user would want to share, reload or come back to (a tab, a type, a\n// filter) lives in a search parameter, never in `useState` (Oussama, 2026-10-22: « changer les tabs doit changer les routes »).\n// One primitive reads and writes it: `useRouteState`. The selection components take `routeKey` and bind to it.\nimport * as React from \"react\";\n\n/** How a router moves and reads the address: the browser's by default, your framework's through `RouteStateProvider`. */\nexport interface RouteAdapter {\n /** The current query string, with or without `?` (`\"\"` on the server). */\n search: () => string;\n /** Go to `search` (`?type=bail`, or `\"\"`), keeping the path and the hash; `replace` keeps the history as it is. */\n navigate: (search: string, options: { replace: boolean }) => void;\n /** Calls `onChange` when the address changes under you (back, forward, another navigation); returns the unsubscribe. */\n subscribe: (onChange: () => void) => () => void;\n}\n\nconst CHANGE = \"kz-route-state\";\n\n/** The History API: any web app (Vite, a static site). Next.js apps pass their router's adapter once, in the layout. */\nexport const browserAdapter: RouteAdapter = {\n search: () => (typeof window === \"undefined\" ? \"\" : window.location.search),\n navigate: (search, { replace }) => {\n const url = `${window.location.pathname}${search}${window.location.hash}`;\n window.history[replace ? \"replaceState\" : \"pushState\"](window.history.state, \"\", url);\n window.dispatchEvent(new Event(CHANGE));\n },\n subscribe: (onChange) => {\n window.addEventListener(\"popstate\", onChange);\n window.addEventListener(CHANGE, onChange);\n return () => {\n window.removeEventListener(\"popstate\", onChange);\n window.removeEventListener(CHANGE, onChange);\n };\n },\n};\n\nconst AdapterContext = React.createContext<RouteAdapter>(browserAdapter);\n\nexport interface RouteStateProviderProps {\n /** How your router reads the query string, navigates and tells about changes. */\n adapter: RouteAdapter;\n children: React.ReactNode;\n}\n\n/** Gives `useRouteState` your router: `<RouteStateProvider adapter={nextAdapter}>` once, in the root layout. */\nexport function RouteStateProvider({ adapter, children }: RouteStateProviderProps) {\n return <AdapterContext.Provider value={adapter}>{children}</AdapterContext.Provider>;\n}\n\nexport interface RouteStateOptions<V extends string> {\n /** The values the parameter may hold, as a const list: anything else in the address reads as the default. Omit for free text. */\n values?: readonly V[];\n /** The value when the parameter is absent. It is never written to the address (a clean URL). */\n default: V;\n /** `push` (the default) keeps each change in the history, `replace` overwrites it: use `replace` for a filter typed or toggled in passing. */\n history?: \"push\" | \"replace\";\n}\n\n/** The value a query string holds for `key`, checked against `values`. Pure: the hook and the tests share it. */\nexport function readRouteValue<V extends string>(search: string, key: string, { values, default: fallback }: Pick<RouteStateOptions<V>, \"values\" | \"default\">): V {\n const raw = new URLSearchParams(search).get(key);\n if (raw === null) return fallback;\n return !values || (values as readonly string[]).includes(raw) ? (raw as V) : fallback;\n}\n\n/** The query string with `key` set to `value` (removed when it is the default); every other parameter is kept. Pure. */\nexport function writeRouteValue(search: string, key: string, value: string, fallback: string): string {\n const params = new URLSearchParams(search);\n if (value === fallback) params.delete(key);\n else params.set(key, value);\n const text = params.toString();\n return text ? `?${text}` : \"\";\n}\n\n/**\n * A value kept in the URL's search parameter `key`: `const [type, setType] = useRouteState(\"type\", { values: TYPES, default: \"auto\" })`\n * with `const TYPES = [\"auto\", \"lease\", \"contract\", \"invoice\", \"other\"] as const`. The value is typed from the list, an\n * unknown one in the address reads as the default, the default is not written, other parameters are kept.\n * `key` undefined makes the hook inert (it returns the default) so a component can call it unconditionally.\n */\nexport function useRouteState<V extends string>(key: string | undefined, { values, default: fallback, history = \"push\" }: RouteStateOptions<V>): readonly [V, (next: V) => void] {\n const adapter = React.useContext(AdapterContext);\n const search = React.useSyncExternalStore(adapter.subscribe, adapter.search, () => \"\");\n const value = key === undefined ? fallback : readRouteValue(search, key, { values, default: fallback });\n const set = React.useCallback(\n (next: V) => {\n if (key === undefined) return;\n adapter.navigate(writeRouteValue(adapter.search(), key, next, fallback), { replace: history === \"replace\" });\n },\n [adapter, key, fallback, history],\n );\n return [value, set] as const;\n}\n\n/** What a selection component spreads on its root: `value` and `onValueChange` bound to the URL when `routeKey` is set. */\nexport interface RouteBindable {\n value?: string | null;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n}\n\n/** The props of a selection component bound to the URL (`routeKey`), or its own, unchanged, when there is no `routeKey`. */\nexport function useRouteBinding<P extends RouteBindable>(routeKey: string | undefined, routeValues: readonly string[] | undefined, props: P): P {\n const initial = props.defaultValue ?? props.value ?? routeValues?.[0] ?? \"\";\n const [value, set] = useRouteState<string>(routeKey, { values: routeValues, default: initial });\n if (routeKey === undefined) return props;\n return {\n ...props,\n value,\n defaultValue: undefined,\n onValueChange: (next: string) => {\n set(next);\n props.onValueChange?.(next);\n },\n };\n}\n","// The shared sliding indicator (NavBar, Tabs): one element that glides from item to item instead of each item lighting\n// up on its own. It writes the target's box as CSS variables on the list (`--kz-ind-x/y/w/h`) and `data-indicator=\"on\"`\n// — no re-render, no animation frame: the glide is a CSS transition (none under reduced motion). Before hydration the\n// items keep their own active style, so nothing flashes.\nimport * as React from \"react\";\n\nconst useIsoLayoutEffect = typeof window === \"undefined\" ? React.useEffect : React.useLayoutEffect;\n\n/**\n * `item`: the selector of an item; `active`: of the current one, where the light rests; `prefer`: an item that, when\n * present, holds the light before the current one (the NavBar's open menu); `follow`: the light follows the pointer\n * and the focus — over anything that is not an item (an open menu's panel) it goes back to rest.\n */\nexport function useSlidingIndicator<T extends HTMLElement>({ item, active, prefer, follow = false }: { item: string; active: string; prefer?: string; follow?: boolean }) {\n const ref = React.useRef<T>(null);\n const place = React.useCallback((target: Element | null) => {\n const list = ref.current;\n if (!list) return;\n if (!(target instanceof HTMLElement) || !list.contains(target)) {\n list.removeAttribute(\"data-indicator\");\n return;\n }\n const a = target.getBoundingClientRect();\n const b = list.getBoundingClientRect();\n list.style.setProperty(\"--kz-ind-x\", `${a.left - b.left + list.scrollLeft}px`);\n list.style.setProperty(\"--kz-ind-y\", `${a.top - b.top + list.scrollTop}px`);\n list.style.setProperty(\"--kz-ind-w\", `${a.width}px`);\n list.style.setProperty(\"--kz-ind-h\", `${a.height}px`);\n list.setAttribute(\"data-indicator\", \"on\");\n }, []);\n const rest = React.useCallback(\n () => {\n const list = ref.current;\n // An item re-rendered under a resting pointer (a menu closing) keeps the light the pointer gave it.\n const hovered = follow ? list?.querySelector(`${item}:hover`) : null;\n place((prefer ? list?.querySelector(prefer) : null) ?? hovered ?? list?.querySelector(active) ?? null);\n },\n [place, active, prefer, item, follow],\n );\n const follow_ = React.useCallback((target: EventTarget) => {\n const hit = target instanceof Element ? target.closest(item) : null;\n if (hit && ref.current?.contains(hit)) place(hit);\n else rest();\n }, [item, place, rest]);\n\n useIsoLayoutEffect(() => {\n const list = ref.current;\n if (!list) return;\n rest();\n const resize = new ResizeObserver(rest);\n resize.observe(list);\n const changes = new MutationObserver(rest);\n changes.observe(list, { subtree: true, attributes: true, attributeFilter: [\"data-state\", \"aria-current\", \"data-active\"] });\n return () => {\n resize.disconnect();\n changes.disconnect();\n };\n }, [rest]);\n\n const handlers = follow\n ? {\n onPointerOver: (e: React.PointerEvent) => follow_(e.target),\n onPointerLeave: rest,\n onFocus: (e: React.FocusEvent) => follow_(e.target),\n onBlur: rest,\n }\n : {};\n return { ref, handlers };\n}\n","// Code → React nodes, from TanStack Highlight's tokens: spans with the `th-*` classes that blocks.css paints with the\n// tokens' text roles (≥ 4.5:1 on the code surface, both themes). No raw HTML: the nodes are elements and text.\nimport { type HighlightDecoration, type HighlightRenderNode, renderTokens } from \"@tanstack/highlight/core\";\nimport * as React from \"react\";\n\nimport { codeHighlighter } from \"./highlighter\";\n\n/** What an annotation says about its lines. */\nexport type AnnotationKind = \"highlight\" | \"added\" | \"removed\" | \"focus\" | \"dim\" | \"error\" | \"warning\";\n\n/** Lines of a sample set apart: one line (`3`) or a range (`[3, 5]`), counted from 1. */\nexport type CodeAnnotation = {\n lines: number | readonly [number, number];\n kind: AnnotationKind;\n};\n\nexport type HighlightOptions = {\n /** A number before every line. */\n lineNumbers?: boolean;\n /** Lines set apart: highlighted, added, removed, in focus (the others are dimmed), dimmed, error, warning. */\n annotations?: readonly CodeAnnotation[];\n};\n\nconst toReact = (node: HighlightRenderNode, key: number): React.ReactNode => {\n if (node.type === \"text\") return node.value;\n const data = Object.fromEntries(Object.entries(node.data ?? {}).map(([name, value]) => [`data-${name}`, value]));\n return React.createElement(\"span\", { key, className: node.classNames.join(\" \"), ...data }, node.children.map(toReact));\n};\n\n/** Splits `code` into text and coloured spans (`th-keyword`, `th-string`…), and into lines when numbered or annotated. */\nexport function highlight(code: string, language = \"text\", { lineNumbers, annotations }: HighlightOptions = {}): React.ReactNode[] {\n const { tokens } = codeHighlighter.tokenize(code, { lang: language });\n const decorations: HighlightDecoration[] = (annotations ?? []).map(({ lines, kind }) => ({ lines, className: `kz-line kz-line-${kind}`, data: { kind } }));\n return renderTokens(tokens, { lineNumbers, decorations }).map(toReact);\n}\n\n/** The language a sample is tokenized in (`bash` → `shell`, `xml` → `html`, unknown → `plaintext`). */\nexport function normalizeCodeLanguage(language?: string): string {\n return codeHighlighter.normalizeLanguage(language);\n}\n","// The highlighter of every code sample: TanStack Highlight (a deterministic, synchronous tokenizer — the same markup on\n// the server and on the client) with the grammars a Krizaka page shows. Each grammar is registered by hand: nothing\n// else is bundled. An unknown language is plain text, never an error.\nimport { createHighlighter } from \"@tanstack/highlight/core\";\nimport { css } from \"@tanstack/highlight/languages/css\";\nimport { diff } from \"@tanstack/highlight/languages/diff\";\nimport { env } from \"@tanstack/highlight/languages/env\";\nimport { html } from \"@tanstack/highlight/languages/html\";\nimport { java } from \"@tanstack/highlight/languages/java\";\nimport { js } from \"@tanstack/highlight/languages/js\";\nimport { json } from \"@tanstack/highlight/languages/json\";\nimport { jsx } from \"@tanstack/highlight/languages/jsx\";\nimport { kotlin } from \"@tanstack/highlight/languages/kotlin\";\nimport { plaintext } from \"@tanstack/highlight/languages/plaintext\";\nimport { shell } from \"@tanstack/highlight/languages/shell\";\nimport { ts } from \"@tanstack/highlight/languages/ts\";\nimport { tsx } from \"@tanstack/highlight/languages/tsx\";\nimport { yaml } from \"@tanstack/highlight/languages/yaml\";\n\n/** The languages a sample can be written in, with the names they answer to (`bash`, `xml`, `yml`, `kt`, `properties`…). */\nexport const codeHighlighter = createHighlighter({\n languages: [css, diff, { ...env, aliases: [...(env.aliases ?? []), \"properties\"] }, html, java, js, json, jsx, kotlin, plaintext, shell, ts, tsx, yaml],\n fallbackLanguage: \"plaintext\",\n});\n"],"mappings":";;;;;;;;;;AAKA,YAAYA,YAAW;;;ACHvB,SAAS,MAAM,QAAQ,qBAAqB;AAC5C,YAAYC,YAAW;AACvB,SAAS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":["../src/code-block/code-block.tsx","../src/tabs/tabs.tsx","../src/sliding-indicator.ts","../src/code-block/tokens.tsx","../src/code-block/highlighter.ts"],"sourcesContent":["// Client (the copy button, the tabs). A sample of code (blocks.css): its language and its file name, the code\n// highlighted by TanStack Highlight (it scrolls sideways, never shrinks, and takes the keyboard's focus to scroll),\n// lines numbered or set apart (highlighted, added, removed, in focus), a copy button that says it copied in a polite\n// live region. CodeTabs puts several ways to write the same thing (Maven · Gradle · npm) under\n// the tabs of @krizaka/ui.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { CheckGlyph, CopyGlyph } from \"../glyphs\";\nimport { TabsContent, TabsList, TabsRoot, TabsTrigger } from \"../tabs/tabs\";\nimport { type CodeAnnotation, highlight } from \"./tokens\";\n\nexport type CodeBlockProps = Omit<React.HTMLAttributes<HTMLElement>, \"children\"> & {\n /** The code, as it is copied. */\n code: string;\n /**\n * Its language, shown as a tag and used by the highlighter: `ts`, `tsx`, `js`, `jsx`, `json`, `yaml`, `bash`, `html`\n * (`xml`), `css`, `java`, `kotlin`, `diff`, `properties`. Another one is shown as plain text.\n */\n language?: string;\n /** The file it belongs in (`pom.xml`, `application.yml`), or what it is (`Terminal`). */\n file?: React.ReactNode;\n /** The copy button's words, passed translated. Without them there is no copy button (a sample inside a text, say). */\n copyLabel?: string;\n /** What the button says once the code is copied (announced politely). */\n copiedLabel?: string;\n /**\n * Colours comments, strings, keywords, types, tags and numbers (the tokens' roles).\n * @default true\n */\n highlight?: boolean;\n /** A number before every line. */\n lineNumbers?: boolean;\n /** Lines set apart: `highlight`, `added`, `removed`, `error`, `warning`, `dim`, or `focus` (all the others are dimmed). */\n annotations?: readonly CodeAnnotation[];\n /** Called after the code is copied. */\n onCopy?: () => void;\n};\n\n/** A code sample: language and file name, highlighted code that scrolls sideways, a copy button. */\nexport function CodeBlock({ code, language = \"text\", file, copyLabel, copiedLabel, highlight: colour = true, lineNumbers, annotations, onCopy, className, ...props }: CodeBlockProps) {\n const [copied, setCopied] = React.useState(false);\n React.useEffect(() => {\n if (!copied) return;\n const t = setTimeout(() => setCopied(false), 1800);\n return () => clearTimeout(t);\n }, [copied]);\n const copy = () =>\n navigator.clipboard?.writeText(code).then(() => {\n setCopied(true);\n onCopy?.();\n });\n return (\n <figure className={cn(\"kz-code\", className)} {...props}>\n {file || language !== \"text\" || copyLabel ? (\n <figcaption className=\"kz-code-bar\">\n <span className=\"kz-code-file\">\n {language !== \"text\" && <span className=\"kz-code-lang\">{language}</span>}\n {file}\n </span>\n {copyLabel ? (\n <button type=\"button\" className=\"kz-code-copy\" onClick={copy} data-copied={copied ? \"\" : undefined}>\n {copied ? <CheckGlyph className=\"h-3.5 w-3.5\" /> : <CopyGlyph className=\"h-3.5 w-3.5\" />}\n <span aria-live=\"polite\">{copied ? (copiedLabel ?? copyLabel) : copyLabel}</span>\n </button>\n ) : null}\n </figcaption>\n ) : null}\n <pre tabIndex={0} className={lineNumbers ? \"th-code--line-numbers\" : undefined} data-focus={annotations?.some((a) => a.kind === \"focus\") ? \"\" : undefined}>\n <code data-language={language}>{colour ? highlight(code, language, { lineNumbers, annotations }) : code}</code>\n </pre>\n </figure>\n );\n}\n\nexport type CodeTabsProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"dir\" | \"defaultValue\"> & {\n /** What the tabs choose between (`Build tool`): the tab list's accessible name. */\n label: string;\n /** The ways to write it: an id, the tab's words, its sample (a `CodeBlock`). */\n tabs: readonly { id: string; label: React.ReactNode; content: React.ReactNode }[];\n /** The tab open at first. Defaults to the first one. */\n defaultValue?: string;\n};\n\n/** Several ways to write the same thing (Maven · Gradle · npm): segmented tabs above code samples. */\nexport function CodeTabs({ label, tabs, defaultValue, className, ...props }: CodeTabsProps) {\n return (\n <TabsRoot defaultValue={defaultValue ?? tabs[0]?.id} variant=\"segmented\" className={cn(\"kz-code-tabs\", className)} {...props}>\n <TabsList aria-label={label}>\n {tabs.map((t) => (\n <TabsTrigger key={t.id} value={t.id}>\n {t.label}\n </TabsTrigger>\n ))}\n </TabsList>\n {tabs.map((t) => (\n <TabsContent key={t.id} value={t.id}>\n {t.content}\n </TabsContent>\n ))}\n </TabsRoot>\n );\n}\n","// Client (a context). Radix Tabs does the roles (tablist, tab, tabpanel), the aria-selected / aria-controls wiring,\n// the roving focus (arrows, Home, End) and automatic activation: this file only holds the three looks.\nimport { Slot, Tabs as TabsPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { useRouteBinding } from \"../router\";\nimport { useSlidingIndicator } from \"../sliding-indicator\";\n\nexport const tabs = tv({\n slots: {\n root: \"flex gap-4 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:flex-row\",\n // One light glides from the active tab to the next (`before:`, placed by useSlidingIndicator); until it is placed\n // (server render), each trigger carries its own active style.\n list:\n \"group/tabs relative isolate flex shrink-0 data-[orientation=vertical]:flex-col \" +\n \"before:pointer-events-none before:absolute before:-z-10 before:opacity-0 before:transition-[translate,width,height,opacity] before:duration-300 \" +\n \"motion-reduce:before:transition-none data-[indicator=on]:before:opacity-100\",\n trigger:\n \"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-colors \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40\",\n content: \"kz-tabs-panel min-w-0 flex-1 rounded-lg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring data-[state=inactive]:hidden\",\n },\n variants: {\n variant: {\n /* The section of a page: a line under the list, the active tab underlined in the accent. */\n underline: {\n list:\n \"gap-1 border-border-default data-[orientation=horizontal]:border-b data-[orientation=vertical]:border-r before:rounded-sm before:bg-accent \" +\n \"data-[orientation=horizontal]:before:-bottom-px data-[orientation=horizontal]:before:left-0 data-[orientation=horizontal]:before:h-0.5 \" +\n \"data-[orientation=horizontal]:before:w-(--kz-ind-w) data-[orientation=horizontal]:before:translate-x-(--kz-ind-x) \" +\n \"data-[orientation=vertical]:before:-right-px data-[orientation=vertical]:before:top-0 data-[orientation=vertical]:before:w-0.5 \" +\n \"data-[orientation=vertical]:before:h-(--kz-ind-h) data-[orientation=vertical]:before:translate-y-(--kz-ind-y)\",\n trigger:\n \"relative rounded-md px-3 py-2.5 text-sm text-fg-secondary hover:text-fg data-[state=active]:text-fg \" +\n \"after:absolute after:rounded-sm after:bg-transparent data-[state=active]:after:bg-accent \" +\n \"data-[orientation=horizontal]:after:inset-x-2 data-[orientation=horizontal]:after:-bottom-px data-[orientation=horizontal]:after:h-0.5 \" +\n \"data-[orientation=vertical]:justify-start data-[orientation=vertical]:after:inset-y-1.5 data-[orientation=vertical]:after:-right-px data-[orientation=vertical]:after:w-0.5 \" +\n \"group-data-[indicator=on]/tabs:data-[state=active]:after:bg-transparent\",\n },\n /* A view switch: equal segments in a track, the active one filled. */\n segmented: {\n list:\n \"inline-grid auto-cols-fr grid-flow-col gap-1 self-start rounded-xl border border-border-default bg-surface-1 p-1 data-[orientation=vertical]:grid-flow-row \" +\n \"before:left-0 before:top-0 before:h-(--kz-ind-h) before:w-(--kz-ind-w) before:translate-x-(--kz-ind-x) before:translate-y-(--kz-ind-y) before:rounded-lg before:bg-accent before:shadow-sm\",\n trigger:\n \"min-h-8 rounded-lg px-3 py-1.5 text-xs text-fg-secondary hover:bg-surface-2 hover:text-fg \" +\n \"data-[state=active]:bg-accent data-[state=active]:text-on-accent data-[state=active]:shadow-sm data-[state=active]:hover:bg-accent \" +\n \"transition-colors group-data-[indicator=on]/tabs:data-[state=active]:bg-transparent group-data-[indicator=on]/tabs:data-[state=active]:shadow-none\",\n },\n /* Pills that scroll sideways on a phone: a feed's sections. */\n pills: {\n list:\n \"gap-1.5 overflow-x-auto overflow-y-hidden overscroll-x-contain pt-1 -mt-1 pb-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden \" +\n \"before:left-0 before:top-0 before:h-(--kz-ind-h) before:w-(--kz-ind-w) before:translate-x-(--kz-ind-x) before:translate-y-(--kz-ind-y) \" +\n \"before:rounded-sm before:border before:border-accent before:bg-accent-soft\",\n trigger:\n \"h-9 rounded-sm border border-border-default bg-surface-1 px-4 text-xs text-fg-secondary hover:border-border-strong hover:text-fg \" +\n \"data-[state=active]:border-accent data-[state=active]:bg-accent-soft data-[state=active]:text-fg \" +\n \"group-data-[indicator=on]/tabs:data-[state=active]:border-transparent group-data-[indicator=on]/tabs:data-[state=active]:bg-transparent\",\n },\n /*\n * Binder dividers (intercalaires, #648): organise collections, tags and statuses. Each tab is a divider with a\n * coloured top edge (`hue`), its words and a count; the active one is the page's colour and joins the content\n * under the list's line. Too many dividers scroll sideways, the edges fading. No paper texture: organisation only.\n */\n binder: {\n list:\n \"items-end gap-1 overflow-x-auto overflow-y-hidden overscroll-x-contain border-b border-border-default px-3 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden \" +\n \"[mask-image:linear-gradient(to_right,transparent,black_12px,black_calc(100%-12px),transparent)]\",\n trigger:\n \"relative -mb-px min-h-10 rounded-t-lg border border-b-0 border-border-default bg-surface-2 px-3.5 pb-2 pt-2.5 text-sm text-fg-secondary \" +\n \"before:absolute before:inset-x-0 before:-top-px before:h-1 before:rounded-t-lg before:bg-(--kz-hue,var(--kz-accent)) \" +\n \"hover:bg-surface-3 hover:text-fg data-[state=active]:z-[1] data-[state=active]:bg-surface-1 data-[state=active]:pb-2.5 data-[state=active]:text-fg \" +\n \"data-[state=active]:shadow-[0_1px_0_0_var(--kz-surface-1)] motion-reduce:transition-none\",\n },\n },\n },\n defaultVariants: { variant: \"underline\" },\n});\n\n/**\n * A divider's colour (`variant=\"binder\"`): the brand's accent by default, or a role of the theme — every one reads at 3:1 or\n * more on both themes. The colour is never the only signal: the words and the count say it.\n */\nexport type TabsHue = \"accent\" | \"success\" | \"warning\" | \"danger\" | \"neutral\";\n// The text roles where the fill role is too light on a light page (success, warning: 2:1): every edge reaches 3:1, tested.\nconst HUE: Record<TabsHue, string> = {\n accent: \"var(--kz-accent)\",\n success: \"var(--kz-success-text)\",\n warning: \"var(--kz-warning-text)\",\n danger: \"var(--kz-danger-text)\",\n neutral: \"var(--kz-text-muted)\",\n};\n/** The style that paints a divider's edge (`--kz-hue`), merged with the host's. */\nconst hueStyle = (hue: TabsHue | undefined, style: React.CSSProperties | undefined) =>\n hue ? { ...style, [\"--kz-hue\" as string]: HUE[hue] } : style;\n\n/** The count after a tab's words: part of its name (« Clients 12 »), muted, tabular. */\nfunction TabCount({ count }: { count: number | undefined }) {\n if (count === undefined) return null;\n return <span data-tab-count=\"\" className=\"font-mono text-xs font-medium tabular-nums text-fg-secondary\">{count}</span>;\n}\n\n/** « + Intercalaire »: a button after the dividers (outside the tab list: a tablist holds only tabs). */\nfunction AddButton({ add }: { add: TabsAdd }) {\n return (\n <button\n type=\"button\"\n onClick={add.onAdd}\n className=\"mb-1 ml-1 inline-flex min-h-9 shrink-0 items-center gap-1.5 rounded-lg px-2.5 text-sm font-medium text-fg-secondary hover:bg-surface-2 hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\"\n >\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden focusable=\"false\">\n <path d=\"M12 5v14M5 12h14\" />\n </svg>\n {add.label}\n </button>\n );\n}\n\nexport type TabsAdd = {\n /** Its words (« Intercalaire », « New tag ») — passed translated. */\n label: string;\n /** Adds a divider (opens the host's form). */\n onAdd: () => void;\n};\n\nexport type TabsVariants = VariantProps<typeof tabs>;\ntype Variant = NonNullable<TabsVariants[\"variant\"]>;\n\nconst VariantContext = React.createContext<Variant>(\"underline\");\n\nexport type TabsRootProps = React.ComponentProps<typeof TabsPrimitive.Root> & {\n /** underline (the sections of a page) · segmented (a view switch) · pills (a feed's sections) · binder (dividers that organise collections, tags, statuses). */\n variant?: TabsVariants[\"variant\"];\n /** Binds the active tab to this search parameter of the URL (`?tab=…`): the URL is the state. Without it the state is local — only for an ephemeral choice. */\n routeKey?: string;\n /** The values the parameter may hold (the tabs' `value`s); the first is the default unless `defaultValue` says otherwise. */\n routeValues?: readonly string[];\n};\n\n/** `value`/`defaultValue` + `onValueChange`, `orientation` (horizontal by default), `variant` for the list. */\nexport function TabsRoot({ variant = \"underline\", className, routeKey, routeValues, ...rest }: TabsRootProps) {\n const props = useRouteBinding(routeKey, routeValues, rest);\n return (\n <VariantContext.Provider value={variant}>\n <TabsPrimitive.Root data-variant={variant} className={tabs({ variant }).root({ className })} {...props} />\n </VariantContext.Provider>\n );\n}\n\nexport type TabsListProps = React.ComponentProps<typeof TabsPrimitive.List> & {\n /** A « + » button after the tabs (`variant=\"binder\"`: « + Intercalaire »): its words and what it does. */\n add?: TabsAdd;\n};\n\n/** The tabs. Name it (`aria-label`) when no heading says what it switches. One light glides to the active tab. */\nexport function TabsList({ className, add, ...props }: TabsListProps) {\n const variant = React.useContext(VariantContext);\n const { ref } = useSlidingIndicator<HTMLDivElement>({ item: \"[role=tab]\", active: \"[role=tab][data-state=active]\" });\n const list = <TabsPrimitive.List ref={ref} data-variant={variant} className={tabs({ variant }).list({ className: cn(add && \"min-w-0 flex-1 border-b-0\", className) })} {...props} />;\n if (!add) return list;\n return (\n <div data-tabs-row=\"\" className={cn(\"flex min-w-0 items-end\", variant === \"binder\" && \"border-b border-border-default\")}>\n {list}\n <AddButton add={add} />\n </div>\n );\n}\n\nexport type TabsTriggerProps = React.ComponentProps<typeof TabsPrimitive.Trigger> & {\n /** A count after the words (clients in a collection, unread): part of the tab's name. */\n count?: number;\n /** `variant=\"binder\"`: the divider's colour (the accent by default). */\n hue?: TabsHue;\n};\n\nexport function TabsTrigger({ className, count, hue, style, children, ...props }: TabsTriggerProps) {\n const variant = React.useContext(VariantContext);\n return (\n <TabsPrimitive.Trigger className={tabs({ variant }).trigger({ className })} style={hueStyle(hue, style)} data-hue={hue} {...props}>\n {children}\n <TabCount count={count} />\n </TabsPrimitive.Trigger>\n );\n}\n\nexport function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return <TabsPrimitive.Content className={tabs().content({ className })} {...props} />;\n}\n\n// ── Route mode: tabs that are links; the URL is the state (Oussama, 2026-10-22) ──────────────────────────────────────\n\n/**\n * Is the link `href` the tab of the route `current` (a path, with its search: `/docs/api?tab=x`)? The path must equal the\n * link's (a trailing slash, a locale-free comparison and the hash do not count); with `exact` false (the default) a deeper\n * path of the same section counts too (`/docs/api/x` is in `/docs/api`); every search parameter of the link must be in\n * `current`. The hub link (`/`) is only ever active on `/` itself.\n */\nexport function isTabActive(current: string, href: string, exact = false): boolean {\n const split = (value: string) => {\n const url = new URL(value.split(\"#\")[0]!, \"https://tabs.invalid\");\n return { path: url.pathname.replace(/\\/+$/, \"\") || \"/\", search: url.searchParams };\n };\n const here = split(current);\n const target = split(href);\n const samePath = here.path === target.path;\n const deeper = !exact && target.path !== \"/\" && here.path.startsWith(`${target.path}/`);\n if (!samePath && !deeper) return false;\n for (const [key, value] of target.search) if (here.search.get(key) !== value) return false;\n return true;\n}\n\ninterface NavState {\n current: string;\n variant: Variant;\n}\nconst NavContext = React.createContext<NavState | null>(null);\n\nexport type TabsNavProps = Omit<React.ComponentProps<\"nav\">, \"children\"> & {\n /** A « + » button after the tabs (`variant=\"binder\"`: « + Intercalaire »). */\n add?: TabsAdd;\n /** The navigation's accessible name (« Sections »). */\n label: string;\n /** The current route, passed in: the path with its search (`usePathname()` + `useSearchParams()`, `/docs?tab=api`). The active tab comes from it; no local state. */\n current: string;\n /** underline (the sections of a page) · segmented (a view switch) · pills (a feed's sections) · binder (dividers). */\n variant?: TabsVariants[\"variant\"];\n /** The tabs: `Tabs.NavLink`. */\n children: React.ReactNode;\n};\n\n/**\n * Tabs as routes: a `nav` of links, the URL is the state. Per WAI-ARIA these are links, not a tablist: each tab is an\n * anchor, the active one carries `aria-current=\"page\"`, the keyboard is the page's own (Tab walks the links, Enter\n * follows one) and there is no panel — the page is the panel. The same looks and the same gliding light as `Tabs.List`.\n */\nexport function TabsNav({ label, current, variant = \"underline\", add, className, children, ...props }: TabsNavProps) {\n const { ref } = useSlidingIndicator<HTMLElement>({ item: \"[data-tabs-link]\", active: \"[data-tabs-link][data-state=active]\" });\n const value = React.useMemo(() => ({ current, variant }), [current, variant]);\n const nav = (\n <nav ref={ref} aria-label={label} data-variant={variant} data-orientation=\"horizontal\" className={tabs({ variant }).list({ className: cn(add && \"min-w-0 flex-1 border-b-0\", className) })} {...props}>\n {children}\n </nav>\n );\n return (\n <NavContext.Provider value={value}>\n {add ? (\n <div data-tabs-row=\"\" className={cn(\"flex min-w-0 items-end\", variant === \"binder\" && \"border-b border-border-default\")}>\n {nav}\n <AddButton add={add} />\n </div>\n ) : (\n nav\n )}\n </NavContext.Provider>\n );\n}\n\nexport type TabsNavLinkProps = React.ComponentProps<\"a\"> & {\n /** Where the tab goes (`/docs/api`, `/docs?tab=api`). */\n href: string;\n /** Match this path only, not the pages below it. */\n exact?: boolean;\n /** Renders your router's `<Link>` (pass it as the only child; the `href` goes on this part and on the link). */\n asChild?: boolean;\n /** A count after the words (not with `asChild`: put it in your link). */\n count?: number;\n /** `variant=\"binder\"`: the divider's colour (the accent by default). */\n hue?: TabsHue;\n};\n\n/** One tab of `Tabs.Nav`: an anchor that is active when the current route is its `href`. */\nexport function TabsNavLink({ href, exact, asChild, count, hue, style, className, children, ...props }: TabsNavLinkProps) {\n const ctx = React.useContext(NavContext);\n if (!ctx) throw new Error(\"Tabs.NavLink must be inside <Tabs.Nav>\");\n const active = isTabActive(ctx.current, href, exact);\n const Comp = asChild ? Slot.Root : \"a\";\n return (\n <Comp\n data-tabs-link=\"\"\n data-state={active ? \"active\" : \"inactive\"}\n data-orientation=\"horizontal\"\n aria-current={active ? \"page\" : undefined}\n {...(asChild ? {} : { href })}\n data-hue={hue}\n style={hueStyle(hue, style)}\n className={cn(tabs({ variant: ctx.variant }).trigger(), \"no-underline\", className)}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <TabCount count={count} />\n </>\n )}\n </Comp>\n );\n}\n\n/** `Tabs.Root/List/Trigger/Content` — `variant` underline · segmented · pills · binder on the root. `Tabs.Nav` + `Tabs.NavLink`: the same tabs as routes. */\nexport const Tabs = { Root: TabsRoot, List: TabsList, Trigger: TabsTrigger, Content: TabsContent, Nav: TabsNav, NavLink: TabsNavLink };\n","// The shared sliding indicator (NavBar, Tabs): one element that glides from item to item instead of each item lighting\n// up on its own. It writes the target's box as CSS variables on the list (`--kz-ind-x/y/w/h`) and `data-indicator=\"on\"`\n// — no re-render, no animation frame: the glide is a CSS transition (none under reduced motion). Before hydration the\n// items keep their own active style, so nothing flashes.\nimport * as React from \"react\";\n\nconst useIsoLayoutEffect = typeof window === \"undefined\" ? React.useEffect : React.useLayoutEffect;\n\n/**\n * `item`: the selector of an item; `active`: of the current one, where the light rests; `prefer`: an item that, when\n * present, holds the light before the current one (the NavBar's open menu); `follow`: the light follows the pointer\n * and the focus — over anything that is not an item (an open menu's panel) it goes back to rest.\n */\nexport function useSlidingIndicator<T extends HTMLElement>({ item, active, prefer, follow = false }: { item: string; active: string; prefer?: string; follow?: boolean }) {\n const ref = React.useRef<T>(null);\n const place = React.useCallback((target: Element | null) => {\n const list = ref.current;\n if (!list) return;\n if (!(target instanceof HTMLElement) || !list.contains(target)) {\n list.removeAttribute(\"data-indicator\");\n return;\n }\n const a = target.getBoundingClientRect();\n const b = list.getBoundingClientRect();\n list.style.setProperty(\"--kz-ind-x\", `${a.left - b.left + list.scrollLeft}px`);\n list.style.setProperty(\"--kz-ind-y\", `${a.top - b.top + list.scrollTop}px`);\n list.style.setProperty(\"--kz-ind-w\", `${a.width}px`);\n list.style.setProperty(\"--kz-ind-h\", `${a.height}px`);\n list.setAttribute(\"data-indicator\", \"on\");\n }, []);\n const rest = React.useCallback(\n () => {\n const list = ref.current;\n // An item re-rendered under a resting pointer (a menu closing) keeps the light the pointer gave it.\n const hovered = follow ? list?.querySelector(`${item}:hover`) : null;\n place((prefer ? list?.querySelector(prefer) : null) ?? hovered ?? list?.querySelector(active) ?? null);\n },\n [place, active, prefer, item, follow],\n );\n const follow_ = React.useCallback((target: EventTarget) => {\n const hit = target instanceof Element ? target.closest(item) : null;\n if (hit && ref.current?.contains(hit)) place(hit);\n else rest();\n }, [item, place, rest]);\n\n useIsoLayoutEffect(() => {\n const list = ref.current;\n if (!list) return;\n rest();\n const resize = new ResizeObserver(rest);\n resize.observe(list);\n const changes = new MutationObserver(rest);\n changes.observe(list, { subtree: true, attributes: true, attributeFilter: [\"data-state\", \"aria-current\", \"data-active\"] });\n return () => {\n resize.disconnect();\n changes.disconnect();\n };\n }, [rest]);\n\n const handlers = follow\n ? {\n onPointerOver: (e: React.PointerEvent) => follow_(e.target),\n onPointerLeave: rest,\n onFocus: (e: React.FocusEvent) => follow_(e.target),\n onBlur: rest,\n }\n : {};\n return { ref, handlers };\n}\n","// Code → React nodes, from TanStack Highlight's tokens: spans with the `th-*` classes that blocks.css paints with the\n// tokens' text roles (≥ 4.5:1 on the code surface, both themes). No raw HTML: the nodes are elements and text.\nimport { type HighlightDecoration, type HighlightRenderNode, renderTokens } from \"@tanstack/highlight/core\";\nimport * as React from \"react\";\n\nimport { codeHighlighter } from \"./highlighter\";\n\n/** What an annotation says about its lines. */\nexport type AnnotationKind = \"highlight\" | \"added\" | \"removed\" | \"focus\" | \"dim\" | \"error\" | \"warning\";\n\n/** Lines of a sample set apart: one line (`3`) or a range (`[3, 5]`), counted from 1. */\nexport type CodeAnnotation = {\n lines: number | readonly [number, number];\n kind: AnnotationKind;\n};\n\nexport type HighlightOptions = {\n /** A number before every line. */\n lineNumbers?: boolean;\n /** Lines set apart: highlighted, added, removed, in focus (the others are dimmed), dimmed, error, warning. */\n annotations?: readonly CodeAnnotation[];\n};\n\nconst toReact = (node: HighlightRenderNode, key: number): React.ReactNode => {\n if (node.type === \"text\") return node.value;\n const data = Object.fromEntries(Object.entries(node.data ?? {}).map(([name, value]) => [`data-${name}`, value]));\n return React.createElement(\"span\", { key, className: node.classNames.join(\" \"), ...data }, node.children.map(toReact));\n};\n\n/** Splits `code` into text and coloured spans (`th-keyword`, `th-string`…), and into lines when numbered or annotated. */\nexport function highlight(code: string, language = \"text\", { lineNumbers, annotations }: HighlightOptions = {}): React.ReactNode[] {\n const { tokens } = codeHighlighter.tokenize(code, { lang: language });\n const decorations: HighlightDecoration[] = (annotations ?? []).map(({ lines, kind }) => ({ lines, className: `kz-line kz-line-${kind}`, data: { kind } }));\n return renderTokens(tokens, { lineNumbers, decorations }).map(toReact);\n}\n\n/** The language a sample is tokenized in (`bash` → `shell`, `xml` → `html`, unknown → `plaintext`). */\nexport function normalizeCodeLanguage(language?: string): string {\n return codeHighlighter.normalizeLanguage(language);\n}\n","// The highlighter of every code sample: TanStack Highlight (a deterministic, synchronous tokenizer — the same markup on\n// the server and on the client) with the grammars a Krizaka page shows. Each grammar is registered by hand: nothing\n// else is bundled. An unknown language is plain text, never an error.\nimport { createHighlighter } from \"@tanstack/highlight/core\";\nimport { css } from \"@tanstack/highlight/languages/css\";\nimport { diff } from \"@tanstack/highlight/languages/diff\";\nimport { env } from \"@tanstack/highlight/languages/env\";\nimport { html } from \"@tanstack/highlight/languages/html\";\nimport { java } from \"@tanstack/highlight/languages/java\";\nimport { js } from \"@tanstack/highlight/languages/js\";\nimport { json } from \"@tanstack/highlight/languages/json\";\nimport { jsx } from \"@tanstack/highlight/languages/jsx\";\nimport { kotlin } from \"@tanstack/highlight/languages/kotlin\";\nimport { plaintext } from \"@tanstack/highlight/languages/plaintext\";\nimport { shell } from \"@tanstack/highlight/languages/shell\";\nimport { ts } from \"@tanstack/highlight/languages/ts\";\nimport { tsx } from \"@tanstack/highlight/languages/tsx\";\nimport { yaml } from \"@tanstack/highlight/languages/yaml\";\n\n/** The languages a sample can be written in, with the names they answer to (`bash`, `xml`, `yml`, `kt`, `properties`…). */\nexport const codeHighlighter = createHighlighter({\n languages: [css, diff, { ...env, aliases: [...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C,IAAI,MAAK,GAC1G;AAAA,KACF;AAEJ;AAYO,SAAS,SAAS,EAAE,OAAO,MAAAE,OAAM,cAAc,WAAW,GAAG,MAAM,GAAkB;AAC1F,SACE,gBAAAD,MAAC,YAAS,cAAc,gBAAgBC,MAAK,CAAC,GAAG,IAAI,SAAQ,aAAY,WAAW,GAAG,gBAAgB,SAAS,GAAI,GAAG,OACrH;AAAA,oBAAAF,KAAC,YAAS,cAAY,OACnB,UAAAE,MAAK,IAAI,CAAC,MACT,gBAAAF,KAAC,eAAuB,OAAO,EAAE,IAC9B,YAAE,SADa,EAAE,EAEpB,CACD,GACH;AAAA,IACCE,MAAK,IAAI,CAAC,MACT,gBAAAF,KAAC,eAAuB,OAAO,EAAE,IAC9B,YAAE,WADa,EAAE,EAEpB,CACD;AAAA,KACH;AAEJ;","names":["React","React","React","jsx","jsx","jsxs","tabs"]}
|
package/dist/combobox.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
Combobox,
|
|
4
4
|
combobox,
|
|
5
5
|
comboboxLabels
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-AEP3K4YD.js";
|
|
7
|
+
import "./chunk-VIPSZXO4.js";
|
|
8
8
|
import "./chunk-D3T54RSL.js";
|
|
9
9
|
import "./chunk-ZIXB33X7.js";
|
|
10
10
|
import "./chunk-FZBWEDQI.js";
|
package/dist/component-page.d.ts
CHANGED
|
@@ -35,7 +35,10 @@ type ComponentPageProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
|
|
|
35
35
|
/** The side column: related components, source, the version. */
|
|
36
36
|
aside?: React.ReactNode;
|
|
37
37
|
};
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* A component's page: name, summary, facts, live preview, install, then its sections; facts and related aside.
|
|
40
|
+
* @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.
|
|
41
|
+
*/
|
|
39
42
|
declare function ComponentPage({ back, eyebrow, title, summary, facts, preview, install, sections, aside, ...props }: ComponentPageProps): React.JSX.Element;
|
|
40
43
|
|
|
41
44
|
export { ComponentPage, type ComponentPageProps, type ComponentPageSection };
|
package/dist/component-page.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
warnDeprecated
|
|
3
|
+
} from "./chunk-KGLRZMCY.js";
|
|
4
|
+
|
|
1
5
|
// src/component-page/component-page.tsx
|
|
2
6
|
import { CodeBlock } from "@krizaka/ui/code-block";
|
|
3
7
|
import { DetailLayout } from "@krizaka/ui/detail-layout";
|
|
4
8
|
import { Facts, Section } from "@krizaka/ui/page";
|
|
5
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
10
|
function ComponentPage({ back, eyebrow, title, summary, facts, preview, install, sections, aside, ...props }) {
|
|
11
|
+
warnDeprecated("component-page");
|
|
7
12
|
return /* @__PURE__ */ jsxs(DetailLayout, { back, eyebrow, title, meta: /* @__PURE__ */ jsx("span", { children: summary }), aside, ...props, children: [
|
|
8
13
|
facts && facts.length > 0 && /* @__PURE__ */ jsx(Facts, { items: facts }),
|
|
9
14
|
/* @__PURE__ */ jsx("div", { className: "kz-tpl-stage", children: preview }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/component-page/component-page.tsx"],"sourcesContent":["// Server-safe. The page of one component of a design system (what ui.krizaka.com draws from the registry): its\n// name, summary, status and platforms; the live preview with its code; installation; when to use it and when not; its\n// examples; its props; its accessibility — the facts in a side column that goes under the content on a phone.\nimport { CodeBlock } from \"@krizaka/ui/code-block\";\nimport { DetailLayout } from \"@krizaka/ui/detail-layout\";\nimport { type Fact, Facts, Section } from \"@krizaka/ui/page\";\nimport type * as React from \"react\";\n\nexport interface ComponentPageSection {\n /** The section's anchor. */\n id: string;\n /** Its title (`When to use`, `Props`). */\n title: React.ReactNode;\n /** Its content (lists, a props table, examples). */\n children: React.ReactNode;\n}\n\nexport type ComponentPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The way back to the catalogue (your router's link). */\n back?: React.ReactNode;\n /** The category (`Blocks`, `Forms`). */\n eyebrow?: React.ReactNode;\n /** The component's name: the `h1`. */\n title: React.ReactNode;\n /** Its summary, in one sentence. */\n summary: React.ReactNode;\n /** Its status and platforms. */\n facts?: readonly Fact[];\n /** The live preview of its first example (a framed stage with its code). */\n preview: React.ReactNode;\n /** The line to install or import it, and the copy words. */\n install?: { code: string; language?: string; copyLabel: string; copiedLabel: string; file?: React.ReactNode };\n /** The sections, in reading order: when to use / not, examples, props, accessibility. */\n sections: readonly ComponentPageSection[];\n /** The side column: related components, source, the version. */\n aside?: React.ReactNode;\n};\n\n
|
|
1
|
+
{"version":3,"sources":["../src/component-page/component-page.tsx"],"sourcesContent":["// Server-safe. The page of one component of a design system (what ui.krizaka.com draws from the registry): its\n// name, summary, status and platforms; the live preview with its code; installation; when to use it and when not; its\n// examples; its props; its accessibility — the facts in a side column that goes under the content on a phone.\nimport { CodeBlock } from \"@krizaka/ui/code-block\";\nimport { DetailLayout } from \"@krizaka/ui/detail-layout\";\nimport { type Fact, Facts, Section } from \"@krizaka/ui/page\";\nimport type * as React from \"react\";\n\nimport { warnDeprecated } from \"../deprecated\";\n\nexport interface ComponentPageSection {\n /** The section's anchor. */\n id: string;\n /** Its title (`When to use`, `Props`). */\n title: React.ReactNode;\n /** Its content (lists, a props table, examples). */\n children: React.ReactNode;\n}\n\nexport type ComponentPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The way back to the catalogue (your router's link). */\n back?: React.ReactNode;\n /** The category (`Blocks`, `Forms`). */\n eyebrow?: React.ReactNode;\n /** The component's name: the `h1`. */\n title: React.ReactNode;\n /** Its summary, in one sentence. */\n summary: React.ReactNode;\n /** Its status and platforms. */\n facts?: readonly Fact[];\n /** The live preview of its first example (a framed stage with its code). */\n preview: React.ReactNode;\n /** The line to install or import it, and the copy words. */\n install?: { code: string; language?: string; copyLabel: string; copiedLabel: string; file?: React.ReactNode };\n /** The sections, in reading order: when to use / not, examples, props, accessibility. */\n sections: readonly ComponentPageSection[];\n /** The side column: related components, source, the version. */\n aside?: React.ReactNode;\n};\n\n/**\n * A component's page: name, summary, facts, live preview, install, then its sections; facts and related aside.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function ComponentPage({ back, eyebrow, title, summary, facts, preview, install, sections, aside, ...props }: ComponentPageProps) {\n warnDeprecated(\"component-page\");\n return (\n <DetailLayout back={back} eyebrow={eyebrow} title={title} meta={<span>{summary}</span>} aside={aside} {...props}>\n {facts && facts.length > 0 && <Facts items={facts} />}\n <div className=\"kz-tpl-stage\">{preview}</div>\n {install && <CodeBlock code={install.code} language={install.language ?? \"bash\"} file={install.file} copyLabel={install.copyLabel} copiedLabel={install.copiedLabel} />}\n <div className=\"kz-tpl-flush\">\n {sections.map((s) => (\n <Section key={s.id} id={s.id} title={s.title} headingSize=\"sm\" spacing=\"sm\" size=\"full\" divider>\n {s.children}\n </Section>\n ))}\n </div>\n </DetailLayout>\n );\n}\n"],"mappings":";;;;;AAGA,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAoB,OAAO,eAAe;AA0CtC,SAAgE,KAAhE;AAHG,SAAS,cAAc,EAAE,MAAM,SAAS,OAAO,SAAS,OAAO,SAAS,SAAS,UAAU,OAAO,GAAG,MAAM,GAAuB;AACvI,iBAAe,gBAAgB;AAC/B,SACE,qBAAC,gBAAa,MAAY,SAAkB,OAAc,MAAM,oBAAC,UAAM,mBAAQ,GAAS,OAAe,GAAG,OACvG;AAAA,aAAS,MAAM,SAAS,KAAK,oBAAC,SAAM,OAAO,OAAO;AAAA,IACnD,oBAAC,SAAI,WAAU,gBAAgB,mBAAQ;AAAA,IACtC,WAAW,oBAAC,aAAU,MAAM,QAAQ,MAAM,UAAU,QAAQ,YAAY,QAAQ,MAAM,QAAQ,MAAM,WAAW,QAAQ,WAAW,aAAa,QAAQ,aAAa;AAAA,IACrK,oBAAC,SAAI,WAAU,gBACZ,mBAAS,IAAI,CAAC,MACb,oBAAC,WAAmB,IAAI,EAAE,IAAI,OAAO,EAAE,OAAO,aAAY,MAAK,SAAQ,MAAK,MAAK,QAAO,SAAO,MAC5F,YAAE,YADS,EAAE,EAEhB,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -42,7 +42,10 @@ type ContinuePromptProps = Omit<React.HTMLAttributes<HTMLDivElement>, "title"> &
|
|
|
42
42
|
/** A brand scope (`krizaka` → `.brand-krizaka`). */
|
|
43
43
|
brand?: string;
|
|
44
44
|
};
|
|
45
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* A last call: a question, what counts, the closing words, the one action that continues — a `button`, or a link.
|
|
47
|
+
* @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.
|
|
48
|
+
*/
|
|
46
49
|
declare function ContinuePrompt({ title, count, countdown, children, actionLabel, onAction, href, actionKey, actionIcon, caption, highlight, hint, status, variant, brand, className, ...props }: ContinuePromptProps): React.JSX.Element;
|
|
47
50
|
|
|
48
51
|
export { ContinuePrompt, type ContinuePromptProps };
|
package/dist/continue-prompt.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
warnDeprecated
|
|
3
|
+
} from "./chunk-KGLRZMCY.js";
|
|
1
4
|
import {
|
|
2
5
|
brandClass,
|
|
3
6
|
cn,
|
|
@@ -169,6 +172,7 @@ function ContinuePrompt({
|
|
|
169
172
|
className,
|
|
170
173
|
...props
|
|
171
174
|
}) {
|
|
175
|
+
warnDeprecated("continue-prompt");
|
|
172
176
|
const arcade = variant === "arcade";
|
|
173
177
|
const inner = /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
174
178
|
actionKey && /* @__PURE__ */ jsx3("span", { className: "kzs-prompt-key", "aria-hidden": true, children: actionKey }),
|