@krizaka/ui 3.54.0 → 3.59.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/{RotatingWord-D9s7FXFD.d.ts → RotatingWord-COSabR2c.d.ts} +2 -1
- package/dist/account-menu.d.ts +8 -3
- package/dist/account-menu.js +8 -1
- package/dist/account-menu.js.map +1 -1
- package/dist/account-settings.d.ts +153 -61
- package/dist/account-settings.js +243 -160
- package/dist/account-settings.js.map +1 -1
- package/dist/achievement.d.ts +2 -1
- package/dist/action-bar.d.ts +3 -2
- package/dist/activity-feed.d.ts +2 -1
- package/dist/agenda.d.ts +2 -1
- package/dist/alert.d.ts +2 -1
- package/dist/anatomy-plate.d.ts +6 -2
- package/dist/anatomy-plate.js +4 -0
- package/dist/anatomy-plate.js.map +1 -1
- package/dist/app-header/search.d.ts +64 -0
- package/dist/app-header/search.js +70 -0
- package/dist/app-header/search.js.map +1 -0
- package/dist/app-header.d.ts +89 -4
- package/dist/app-header.js +63 -5
- package/dist/app-header.js.map +1 -1
- package/dist/app-shell.d.ts +26 -25
- package/dist/app-shell.js +31 -40
- package/dist/app-shell.js.map +1 -1
- package/dist/argument-card.d.ts +3 -2
- package/dist/argument-card.js +3 -3
- package/dist/audio-player.d.ts +2 -1
- package/dist/auth-layout.d.ts +11 -10
- package/dist/avatar/defaults.d.ts +2 -1
- package/dist/avatar.d.ts +2 -1
- package/dist/badge.d.ts +2 -1
- package/dist/bird-plate.d.ts +7 -3
- package/dist/bird-plate.js +2 -2
- package/dist/bird-plate.js.map +1 -1
- package/dist/blocks.css +235 -27
- package/dist/button.d.ts +2 -1
- package/dist/captcha.d.ts +2 -1
- package/dist/captcha.js +1 -0
- package/dist/captcha.js.map +1 -1
- package/dist/card-grid.d.ts +2 -1
- package/dist/card.d.ts +2 -1
- package/dist/catalogue-page.d.ts +82 -2
- package/dist/catalogue-page.js +156 -13
- package/dist/catalogue-page.js.map +1 -1
- package/dist/changelog-page.d.ts +2 -1
- package/dist/chapter.d.ts +2 -1
- package/dist/chat.d.ts +14 -13
- package/dist/chat.js +2 -2
- package/dist/chat.js.map +1 -1
- package/dist/checkbox.d.ts +2 -1
- package/dist/checkbox.js +1 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/chip-link.d.ts +2 -1
- package/dist/chip-row.d.ts +8 -7
- package/dist/chip.d.ts +55 -1
- package/dist/chip.js +14 -98
- package/dist/chip.js.map +1 -1
- package/dist/choice-grid.d.ts +3 -2
- package/dist/choice-grid.js +28 -88
- package/dist/choice-grid.js.map +1 -1
- package/dist/chunk-27AWSJTK.js +46 -0
- package/dist/chunk-27AWSJTK.js.map +1 -0
- package/dist/{chunk-YGIN2YIY.js → chunk-3X3OF4TI.js} +2 -2
- package/dist/chunk-3X3OF4TI.js.map +1 -0
- package/dist/{chunk-KBQD6HE3.js → chunk-4GQH27IT.js} +3 -3
- package/dist/{chunk-KBQD6HE3.js.map → chunk-4GQH27IT.js.map} +1 -1
- package/dist/{chunk-YHKTYFOQ.js → chunk-5LANVCK7.js} +383 -107
- package/dist/chunk-5LANVCK7.js.map +1 -0
- package/dist/{chunk-KDXRYUD3.js → chunk-5QEXOGO2.js} +3 -1
- package/dist/{chunk-KDXRYUD3.js.map → chunk-5QEXOGO2.js.map} +1 -1
- package/dist/chunk-5VEVYDVC.js +11 -0
- package/dist/chunk-5VEVYDVC.js.map +1 -0
- package/dist/chunk-7J2L4HOD.js +340 -0
- package/dist/chunk-7J2L4HOD.js.map +1 -0
- package/dist/chunk-BDIU5LZB.js +18 -0
- package/dist/chunk-BDIU5LZB.js.map +1 -0
- package/dist/chunk-BQ4EOR2O.js +177 -0
- package/dist/chunk-BQ4EOR2O.js.map +1 -0
- package/dist/chunk-CSRKYZ53.js +39 -0
- package/dist/chunk-CSRKYZ53.js.map +1 -0
- package/dist/chunk-F6JTHPHE.js +399 -0
- package/dist/chunk-F6JTHPHE.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-OGWB76BR.js +90 -0
- package/dist/chunk-OGWB76BR.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-UYGUSYIC.js +173 -0
- package/dist/chunk-UYGUSYIC.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-WOZP3JLW.js +51 -0
- package/dist/chunk-WOZP3JLW.js.map +1 -0
- package/dist/chunk-XVXFMVG3.js +27 -0
- package/dist/chunk-XVXFMVG3.js.map +1 -0
- package/dist/chunk-YCZ7N6Q6.js +385 -0
- package/dist/chunk-YCZ7N6Q6.js.map +1 -0
- package/dist/code-block.d.ts +2 -1
- package/dist/code-block.js +81 -98
- package/dist/code-block.js.map +1 -1
- package/dist/combobox.d.ts +20 -19
- package/dist/combobox.js +3 -2
- package/dist/command.d.ts +21 -20
- package/dist/comparison-table.d.ts +2 -1
- package/dist/component-page.d.ts +6 -2
- package/dist/component-page.js +5 -0
- package/dist/component-page.js.map +1 -1
- package/dist/confirm-button.d.ts +2 -1
- package/dist/contact-page.d.ts +2 -1
- package/dist/continue-prompt.d.ts +6 -2
- package/dist/continue-prompt.js +4 -0
- package/dist/continue-prompt.js.map +1 -1
- package/dist/countdown.d.ts +2 -1
- package/dist/cover-hero.d.ts +20 -19
- package/dist/cover-hero.js +25 -42
- package/dist/cover-hero.js.map +1 -1
- package/dist/cta-panel.d.ts +2 -1
- package/dist/dashboard-layout.d.ts +50 -2
- package/dist/dashboard-layout.js +66 -11
- package/dist/dashboard-layout.js.map +1 -1
- package/dist/data-table.d.ts +103 -4
- package/dist/data-table.js +23 -7
- package/dist/date-picker.d.ts +29 -28
- package/dist/date-picker.js +2 -2
- package/dist/date-picker.js.map +1 -1
- package/dist/decision-list.d.ts +2 -1
- package/dist/description-list.d.ts +2 -1
- package/dist/detail-layout.d.ts +147 -3
- package/dist/detail-layout.js +143 -17
- package/dist/detail-layout.js.map +1 -1
- package/dist/{dialog-D42QwYb_.d.ts → dialog-DpUwec2g.d.ts} +2 -1
- package/dist/dialog.d.ts +3 -2
- package/dist/docs-article-page.d.ts +2 -1
- package/dist/docs-hub-page.d.ts +2 -1
- package/dist/docs-layout.d.ts +2 -1
- package/dist/docs-nav.d.ts +3 -10
- package/dist/document-viewer.d.ts +5 -4
- package/dist/doodle.d.ts +32 -0
- package/dist/doodle.js +70 -0
- package/dist/doodle.js.map +1 -0
- package/dist/drop-overlay.d.ts +14 -5
- package/dist/drop-overlay.js +16 -6
- package/dist/drop-overlay.js.map +1 -1
- package/dist/dropdown-menu.d.ts +2 -1
- package/dist/dropdown-menu.js +13 -74
- package/dist/dropdown-menu.js.map +1 -1
- package/dist/elephant.d.ts +4 -1
- package/dist/elephant.js +4 -0
- package/dist/elephant.js.map +1 -1
- package/dist/empty-state.d.ts +2 -1
- package/dist/engine-flow.d.ts +2 -1
- package/dist/error-page.d.ts +2 -1
- package/dist/field.js +1 -1
- package/dist/field.js.map +1 -1
- package/dist/file-upload.d.ts +14 -13
- package/dist/filter-bar.d.ts +84 -11
- package/dist/filter-bar.js +6 -2
- package/dist/flock.d.ts +3 -2
- package/dist/footnote.d.ts +2 -1
- package/dist/force-update-screen.d.ts +13 -8
- package/dist/force-update-screen.js +4 -0
- package/dist/force-update-screen.js.map +1 -1
- package/dist/form/server.d.ts +2 -1
- package/dist/form.d.ts +2 -1
- package/dist/gallery-page.d.ts +6 -2
- package/dist/gallery-page.js +4 -0
- package/dist/gallery-page.js.map +1 -1
- package/dist/genui.d.ts +2 -1
- package/dist/genui.js +5 -5
- package/dist/{geometry-DX-W-Yyf.d.ts → geometry-DZ4Q3hDQ.d.ts} +2 -1
- package/dist/glossary-term.d.ts +2 -1
- package/dist/glossary.d.ts +2 -1
- package/dist/glow-card.d.ts +2 -1
- package/dist/goal-gauge.d.ts +2 -1
- package/dist/grade-stamp.d.ts +23 -0
- package/dist/grade-stamp.js +42 -0
- package/dist/grade-stamp.js.map +1 -0
- package/dist/how-it-works-page.d.ts +2 -1
- package/dist/image-cropper.d.ts +15 -6
- package/dist/image-cropper.js +4 -0
- package/dist/image-cropper.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +4 -4
- package/dist/iso.d.ts +2 -1
- package/dist/kanban.d.ts +5 -1
- package/dist/kanban.js +4 -0
- package/dist/kanban.js.map +1 -1
- package/dist/kbd.d.ts +2 -1
- package/dist/kind-config-editor.d.ts +152 -0
- package/dist/kind-config-editor.js +574 -0
- package/dist/kind-config-editor.js.map +1 -0
- package/dist/kpi-explained.d.ts +2 -1
- package/dist/landing-page.d.ts +2 -1
- package/dist/landscape.d.ts +6 -2
- package/dist/landscape.js +4 -0
- package/dist/landscape.js.map +1 -1
- package/dist/language-switch/server.d.ts +2 -1
- package/dist/language-switch.d.ts +11 -10
- package/dist/legal-page.d.ts +2 -1
- package/dist/link-card.d.ts +2 -1
- package/dist/list.d.ts +2 -1
- package/dist/list.js +1 -1
- package/dist/loader.d.ts +2 -1
- package/dist/longform-page.d.ts +2 -1
- package/dist/maintenance-screen.d.ts +10 -5
- package/dist/maintenance-screen.js +4 -0
- package/dist/maintenance-screen.js.map +1 -1
- package/dist/map.d.ts +8 -7
- package/dist/map.js +30 -0
- package/dist/map.js.map +1 -1
- package/dist/markdown.d.ts +7 -2
- package/dist/markdown.js +12 -5
- package/dist/markdown.js.map +1 -1
- package/dist/marketing-layout.d.ts +5 -4
- package/dist/marquee.d.ts +2 -1
- package/dist/mascot-quote.d.ts +2 -1
- package/dist/mascot-state.d.ts +3 -2
- package/dist/mascots.d.ts +4 -3
- package/dist/match-dialog.d.ts +6 -2
- package/dist/match-dialog.js +4 -0
- package/dist/match-dialog.js.map +1 -1
- package/dist/media-capture.d.ts +11 -5
- package/dist/media-capture.js +4 -0
- package/dist/media-capture.js.map +1 -1
- package/dist/media-gallery.d.ts +2 -1
- package/dist/media-grid.d.ts +3 -10
- package/dist/meta-row.d.ts +2 -1
- package/dist/meter.d.ts +2 -1
- package/dist/meter.js +5 -121
- package/dist/meter.js.map +1 -1
- package/dist/motion.d.ts +3 -2
- package/dist/native/form.d.ts +2 -1
- package/dist/native/list.d.ts +2 -1
- package/dist/native/map.d.ts +2 -1
- package/dist/native/map.js +30 -0
- package/dist/native/map.js.map +1 -1
- package/dist/native/markdown.d.ts +11 -3
- package/dist/native/markdown.js +46 -7
- package/dist/native/markdown.js.map +1 -1
- package/dist/native/media-capture.d.ts +3 -1
- package/dist/native/media-capture.js +5 -0
- package/dist/native/media-capture.js.map +1 -1
- package/dist/native/media-picker.d.ts +2 -1
- package/dist/native/vertical-video.d.ts +10 -3
- package/dist/native/vertical-video.js +6 -0
- package/dist/native/vertical-video.js.map +1 -1
- package/dist/native/video-player.d.ts +2 -1
- package/dist/native.d.ts +323 -4
- package/dist/native.js +1974 -1348
- package/dist/native.js.map +1 -1
- package/dist/nav-bar/me.d.ts +33 -0
- package/dist/nav-bar/me.js +23 -0
- package/dist/nav-bar/me.js.map +1 -0
- package/dist/nav-bar.d.ts +61 -2
- package/dist/nav-bar.js +92 -48
- package/dist/nav-bar.js.map +1 -1
- package/dist/next-actions.d.ts +2 -1
- package/dist/notification-preferences.d.ts +152 -0
- package/dist/notification-preferences.js +78 -0
- package/dist/notification-preferences.js.map +1 -0
- package/dist/number-ticker.d.ts +2 -1
- package/dist/opening-hours.d.ts +2 -1
- package/dist/page-header.d.ts +2 -1
- package/dist/page-header.js +1 -1
- package/dist/page-header.js.map +1 -1
- package/dist/page-hero.d.ts +2 -1
- package/dist/page-index.d.ts +2 -1
- package/dist/page.d.ts +2 -1
- package/dist/pagination.d.ts +2 -1
- package/dist/photo-grid.d.ts +2 -1
- package/dist/pointer-light.d.ts +2 -1
- package/dist/pointer-light.js +5 -0
- package/dist/pointer-light.js.map +1 -1
- package/dist/popover.d.ts +2 -1
- package/dist/pricing-page.d.ts +2 -1
- package/dist/product-page.d.ts +6 -2
- package/dist/product-page.js +4 -0
- package/dist/product-page.js.map +1 -1
- package/dist/profile-card.d.ts +120 -1
- package/dist/profile-card.js +68 -21
- package/dist/profile-card.js.map +1 -1
- package/dist/progress.d.ts +2 -1
- package/dist/promise-card.d.ts +6 -2
- package/dist/promise-card.js +4 -0
- package/dist/promise-card.js.map +1 -1
- package/dist/quota-meter.d.ts +114 -0
- package/dist/quota-meter.js +58 -0
- package/dist/quota-meter.js.map +1 -0
- package/dist/radio-group.d.ts +2 -1
- package/dist/radio-group.js +7 -9
- package/dist/radio-group.js.map +1 -1
- package/dist/rail-nav.d.ts +35 -18
- package/dist/rail-nav.js +45 -56
- package/dist/rail-nav.js.map +1 -1
- package/dist/recipes.d.ts +2 -1
- package/dist/retro-tv.d.ts +31 -0
- package/dist/retro-tv.js +124 -0
- package/dist/retro-tv.js.map +1 -0
- package/dist/router.d.ts +13 -1
- package/dist/router.js +85 -8
- package/dist/router.js.map +1 -1
- package/dist/scroll-stage.d.ts +7 -2
- package/dist/scroll-stage.js +5 -0
- package/dist/scroll-stage.js.map +1 -1
- package/dist/search-field.d.ts +2 -1
- package/dist/search-field.js +1 -1
- package/dist/section-backdrop.d.ts +2 -1
- package/dist/separator.d.ts +2 -1
- package/dist/service-card.d.ts +9 -8
- package/dist/settings-layout.d.ts +2 -1
- package/dist/settings-layout.js +10 -324
- package/dist/settings-layout.js.map +1 -1
- package/dist/showcase.d.ts +11 -3
- package/dist/showcase.js +5 -0
- package/dist/showcase.js.map +1 -1
- package/dist/signature.d.ts +20 -0
- package/dist/signature.js +39 -0
- package/dist/signature.js.map +1 -0
- package/dist/site-cahier.d.ts +187 -0
- package/dist/site-cahier.js +844 -0
- package/dist/site-cahier.js.map +1 -0
- package/dist/site-footer.d.ts +2 -1
- package/dist/site-footer.js +1 -1
- package/dist/sites.d.ts +2 -1
- package/dist/sites.js +1 -1
- package/dist/sites.js.map +1 -1
- package/dist/skeleton.d.ts +2 -1
- package/dist/skip-link.d.ts +2 -1
- package/dist/slider.d.ts +2 -1
- package/dist/slot-picker.d.ts +86 -13
- package/dist/slot-picker.js +98 -16
- package/dist/slot-picker.js.map +1 -1
- package/dist/slot.d.ts +1 -1
- package/dist/specimen-tag.d.ts +2 -1
- package/dist/speed-lines.d.ts +19 -0
- package/dist/speed-lines.js +45 -0
- package/dist/speed-lines.js.map +1 -0
- package/dist/spinner.d.ts +2 -1
- package/dist/split-view.d.ts +2 -1
- package/dist/stage-banner.d.ts +2 -1
- package/dist/stat.d.ts +2 -1
- package/dist/stat.js +1 -1
- package/dist/stat.js.map +1 -1
- package/dist/status-chip.d.ts +44 -0
- package/dist/status-chip.js +137 -0
- package/dist/status-chip.js.map +1 -0
- package/dist/status-page.d.ts +6 -2
- package/dist/status-page.js +5 -0
- package/dist/status-page.js.map +1 -1
- package/dist/step-progress.d.ts +2 -1
- package/dist/step-showcase.d.ts +2 -1
- package/dist/stepper.d.ts +2 -1
- package/dist/sticky-action.d.ts +28 -5
- package/dist/sticky-action.js +10 -4
- package/dist/sticky-action.js.map +1 -1
- package/dist/stuck.d.ts +28 -0
- package/dist/stuck.js +26 -0
- package/dist/stuck.js.map +1 -0
- package/dist/swipe-deck.d.ts +11 -3
- package/dist/swipe-deck.js +5 -0
- package/dist/swipe-deck.js.map +1 -1
- package/dist/switch.d.ts +2 -1
- package/dist/switch.js +4 -32
- package/dist/switch.js.map +1 -1
- package/dist/tabs.d.ts +48 -8
- package/dist/tabs.js +62 -12
- package/dist/tabs.js.map +1 -1
- package/dist/tag-input.d.ts +2 -1
- package/dist/tag-input.js +3 -2
- package/dist/tag-input.js.map +1 -1
- package/dist/tag-selector.d.ts +30 -4
- package/dist/tag-selector.js +90 -8
- package/dist/tag-selector.js.map +1 -1
- package/dist/taped-photo.d.ts +2 -1
- package/dist/taped-photo.js +3 -20
- package/dist/taped-photo.js.map +1 -1
- package/dist/terminal-replay.d.ts +6 -2
- package/dist/terminal-replay.js +5 -1
- package/dist/terminal-replay.js.map +1 -1
- package/dist/text-style/server.d.ts +2 -1
- package/dist/text-style.d.ts +2 -1
- package/dist/theme.d.ts +21 -1
- package/dist/theme.js +37 -1
- package/dist/theme.js.map +1 -1
- package/dist/toast.d.ts +2 -1
- package/dist/toc.d.ts +2 -1
- package/dist/tooltip.d.ts +2 -1
- package/dist/tree-view.d.ts +2 -1
- package/dist/tree-view.js +4 -0
- package/dist/tree-view.js.map +1 -1
- package/dist/update-prompt.d.ts +16 -11
- package/dist/update-prompt.js +4 -0
- package/dist/update-prompt.js.map +1 -1
- package/dist/upload-queue.d.ts +2 -1
- package/dist/verified-badge.d.ts +2 -1
- package/dist/versus-card.d.ts +40 -0
- package/dist/versus-card.js +40 -0
- package/dist/versus-card.js.map +1 -0
- package/dist/vertical-video.d.ts +2 -1
- package/dist/video-player.d.ts +20 -19
- package/dist/video-player.js +7 -376
- package/dist/video-player.js.map +1 -1
- package/dist/video-trimmer.d.ts +8 -2
- package/dist/video-trimmer.js +4 -0
- package/dist/video-trimmer.js.map +1 -1
- package/dist/virtual.d.ts +8 -7
- package/dist/waveform.d.ts +2 -1
- package/package.json +249 -52
- package/registry/account-menu.json +9 -8
- package/registry/account-settings.json +258 -6
- 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 +117 -8
- 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 +388 -12
- 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 +91 -5
- package/registry/data-table.json +215 -8
- 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 +226 -8
- 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 +302 -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/account-settings/appearance.d.ts +4 -0
- package/registry/examples/account-settings/appearance.js +40 -0
- package/registry/examples/account-settings/appearance.tsx +30 -0
- 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/catalogue-page/clients.d.ts +4 -0
- package/registry/examples/catalogue-page/clients.js +49 -0
- package/registry/examples/catalogue-page/clients.tsx +61 -0
- package/registry/examples/chip/marker-picker.d.ts +4 -0
- package/registry/examples/chip/marker-picker.js +17 -0
- package/registry/examples/chip/marker-picker.tsx +17 -0
- package/registry/examples/chip/native/marker-picker.d.ts +4 -0
- package/registry/examples/chip/native/marker-picker.dark.png +0 -0
- package/registry/examples/chip/native/marker-picker.js +18 -0
- package/registry/examples/chip/native/marker-picker.light.png +0 -0
- package/registry/examples/chip/native/marker-picker.tsx +16 -0
- package/registry/examples/chip/native/tags.d.ts +4 -0
- package/registry/examples/chip/native/tags.dark.png +0 -0
- package/registry/examples/chip/native/tags.js +22 -0
- package/registry/examples/chip/native/tags.light.png +0 -0
- package/registry/examples/chip/native/tags.tsx +20 -0
- package/registry/examples/chip/tags.d.ts +4 -0
- package/registry/examples/chip/tags.js +26 -0
- package/registry/examples/chip/tags.tsx +23 -0
- package/registry/examples/dashboard-layout/today.d.ts +4 -0
- package/registry/examples/dashboard-layout/today.js +54 -0
- package/registry/examples/dashboard-layout/today.tsx +63 -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/bulk.d.ts +4 -0
- package/registry/examples/data-table/bulk.js +45 -0
- package/registry/examples/data-table/bulk.tsx +34 -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/client.d.ts +4 -0
- package/registry/examples/detail-layout/client.js +40 -0
- package/registry/examples/detail-layout/client.tsx +39 -0
- package/registry/examples/detail-layout/new-invoice.d.ts +4 -0
- package/registry/examples/detail-layout/new-invoice.js +44 -0
- package/registry/examples/detail-layout/new-invoice.tsx +34 -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/bird-sketch.d.ts +4 -0
- package/registry/examples/doodle/bird-sketch.js +11 -0
- package/registry/examples/doodle/bird-sketch.tsx +12 -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-marks.d.ts +4 -0
- package/registry/examples/doodle/margin-marks.js +27 -0
- package/registry/examples/doodle/margin-marks.tsx +19 -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/filter-bar/views.d.ts +4 -0
- package/registry/examples/filter-bar/views.js +39 -0
- package/registry/examples/filter-bar/views.tsx +30 -0
- package/registry/examples/grade-stamp/coverage.d.ts +4 -0
- package/registry/examples/grade-stamp/coverage.js +12 -0
- package/registry/examples/grade-stamp/coverage.tsx +8 -0
- package/registry/examples/grade-stamp/lighthouse.d.ts +4 -0
- package/registry/examples/grade-stamp/lighthouse.js +12 -0
- package/registry/examples/grade-stamp/lighthouse.tsx +14 -0
- package/registry/examples/kind-config-editor/derived.d.ts +4 -0
- package/registry/examples/kind-config-editor/derived.js +26 -0
- package/registry/examples/kind-config-editor/derived.tsx +16 -0
- package/registry/examples/kind-config-editor/native/status-set.d.ts +4 -0
- package/registry/examples/kind-config-editor/native/status-set.dark.png +0 -0
- package/registry/examples/kind-config-editor/native/status-set.js +22 -0
- package/registry/examples/kind-config-editor/native/status-set.light.png +0 -0
- package/registry/examples/kind-config-editor/native/status-set.tsx +19 -0
- package/registry/examples/kind-config-editor/native/tag-set.d.ts +4 -0
- package/registry/examples/kind-config-editor/native/tag-set.dark.png +0 -0
- package/registry/examples/kind-config-editor/native/tag-set.js +20 -0
- package/registry/examples/kind-config-editor/native/tag-set.light.png +0 -0
- package/registry/examples/kind-config-editor/native/tag-set.tsx +18 -0
- package/registry/examples/kind-config-editor/status-set.d.ts +4 -0
- package/registry/examples/kind-config-editor/status-set.js +29 -0
- package/registry/examples/kind-config-editor/status-set.tsx +25 -0
- package/registry/examples/kind-config-editor/tag-set.d.ts +4 -0
- package/registry/examples/kind-config-editor/tag-set.js +20 -0
- package/registry/examples/kind-config-editor/tag-set.tsx +18 -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/site-cahier/java-releases.d.ts +4 -0
- package/registry/examples/site-cahier/java-releases.js +33 -0
- package/registry/examples/site-cahier/java-releases.tsx +32 -0
- package/registry/examples/site-cahier/motion-lab.d.ts +4 -0
- package/registry/examples/site-cahier/motion-lab.js +32 -0
- package/registry/examples/site-cahier/motion-lab.tsx +29 -0
- package/registry/examples/site-cahier/ts-changelog.d.ts +4 -0
- package/registry/examples/site-cahier/ts-changelog.js +24 -0
- package/registry/examples/site-cahier/ts-changelog.tsx +20 -0
- package/registry/examples/site-cahier/ts-doc.d.ts +4 -0
- package/registry/examples/site-cahier/ts-doc.js +38 -0
- package/registry/examples/site-cahier/ts-doc.tsx +27 -0
- package/registry/examples/site-cahier/ui-home.d.ts +4 -0
- package/registry/examples/site-cahier/ui-home.js +46 -0
- package/registry/examples/site-cahier/ui-home.tsx +40 -0
- package/registry/examples/slot-picker/weeks.d.ts +4 -0
- package/registry/examples/slot-picker/weeks.js +45 -0
- package/registry/examples/slot-picker/weeks.tsx +28 -0
- package/registry/examples/speed-lines/hero.d.ts +4 -0
- package/registry/examples/speed-lines/hero.js +11 -0
- package/registry/examples/speed-lines/hero.tsx +12 -0
- package/registry/examples/speed-lines/streaks.d.ts +4 -0
- package/registry/examples/speed-lines/streaks.js +11 -0
- package/registry/examples/speed-lines/streaks.tsx +12 -0
- package/registry/examples/status-chip/default.d.ts +4 -0
- package/registry/examples/status-chip/default.js +35 -0
- package/registry/examples/status-chip/default.tsx +32 -0
- package/registry/examples/status-chip/native/default.d.ts +4 -0
- package/registry/examples/status-chip/native/default.dark.png +0 -0
- package/registry/examples/status-chip/native/default.js +26 -0
- package/registry/examples/status-chip/native/default.light.png +0 -0
- package/registry/examples/status-chip/native/default.tsx +20 -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/examples/tag-selector/creatable.d.ts +4 -0
- package/registry/examples/tag-selector/creatable.js +41 -0
- package/registry/examples/tag-selector/creatable.tsx +29 -0
- package/registry/examples/tag-selector/native/tags.d.ts +4 -0
- package/registry/examples/tag-selector/native/tags.dark.png +0 -0
- package/registry/examples/tag-selector/native/tags.js +19 -0
- package/registry/examples/tag-selector/native/tags.light.png +0 -0
- package/registry/examples/tag-selector/native/tags.tsx +19 -0
- package/registry/examples/versus-card/alternatives.d.ts +4 -0
- package/registry/examples/versus-card/alternatives.js +20 -0
- package/registry/examples/versus-card/alternatives.tsx +14 -0
- package/registry/examples/versus-card/releases.d.ts +4 -0
- package/registry/examples/versus-card/releases.js +35 -0
- package/registry/examples/versus-card/releases.tsx +29 -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 +209 -9
- 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/grade-stamp.json +227 -0
- 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 +612 -105
- package/registry/iso.json +1 -1
- package/registry/kanban.json +13 -5
- package/registry/kbd.json +1 -1
- package/registry/kind-config-editor.json +565 -0
- 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-cahier.json +548 -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 +156 -10
- package/registry/slot.json +2 -2
- package/registry/specimen-tag.json +1 -1
- package/registry/speed-lines.json +174 -0
- 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-chip.json +350 -0
- 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 +38 -8
- 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 +190 -12
- 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 +4 -3
- 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/versus-card.json +194 -0
- 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 +0 -179
- package/dist/chunk-ZQW7LF4Y.js.map +0 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** The body of `GET /api/me`. `account` is the product's own shape, present only when `signedIn`. */
|
|
2
|
+
interface MeResponse<TAccount = unknown> {
|
|
3
|
+
signedIn: boolean;
|
|
4
|
+
/** Whether the product accepts new accounts (its `signupOpen` setting). */
|
|
5
|
+
signupOpen: boolean;
|
|
6
|
+
account?: TAccount;
|
|
7
|
+
}
|
|
8
|
+
/** The headers of the answer: per-visitor, never cached, varying with the session cookie. */
|
|
9
|
+
declare const meHeaders: {
|
|
10
|
+
readonly "Cache-Control": "private, no-store";
|
|
11
|
+
readonly Vary: "Cookie";
|
|
12
|
+
};
|
|
13
|
+
/** The 200 answer of `GET /api/me` for a route handler. A signed-out visitor never gets an `account`. */
|
|
14
|
+
declare function meResponse<TAccount>({ signedIn, signupOpen, account }: MeResponse<TAccount>): Response;
|
|
15
|
+
/** A Standard Schema of the body, for `krizakaFetch`: refuses anything that is not the contract. */
|
|
16
|
+
declare const meSchema: {
|
|
17
|
+
readonly "~standard": {
|
|
18
|
+
readonly version: 1;
|
|
19
|
+
readonly vendor: "krizaka";
|
|
20
|
+
readonly validate: (value: unknown) => {
|
|
21
|
+
value: MeResponse;
|
|
22
|
+
issues?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
issues: {
|
|
25
|
+
message: string;
|
|
26
|
+
}[];
|
|
27
|
+
value?: undefined;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { meHeaders, meResponse, meSchema };
|
|
33
|
+
export type { MeResponse };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/nav-bar/me.ts
|
|
2
|
+
var meHeaders = { "Cache-Control": "private, no-store", Vary: "Cookie" };
|
|
3
|
+
function meResponse({ signedIn, signupOpen, account }) {
|
|
4
|
+
const body = signedIn && account !== void 0 ? { signedIn, signupOpen, account } : { signedIn: false, signupOpen };
|
|
5
|
+
return new Response(JSON.stringify(body), { status: 200, headers: { ...meHeaders, "Content-Type": "application/json" } });
|
|
6
|
+
}
|
|
7
|
+
var meSchema = {
|
|
8
|
+
"~standard": {
|
|
9
|
+
version: 1,
|
|
10
|
+
vendor: "krizaka",
|
|
11
|
+
validate(value) {
|
|
12
|
+
const v = value;
|
|
13
|
+
if (v && typeof v === "object" && typeof v.signedIn === "boolean" && typeof v.signupOpen === "boolean" && (v.signedIn || !("account" in v))) return { value: v };
|
|
14
|
+
return { issues: [{ message: "Expected { signedIn: boolean, signupOpen: boolean, account?: \u2026 }." }] };
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
meHeaders,
|
|
20
|
+
meResponse,
|
|
21
|
+
meSchema
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=me.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/nav-bar/me.ts"],"sourcesContent":["// The « who is here » contract, the same for every product: `GET /api/me` answers 200 `{ signedIn, signupOpen, account? }`\n// with `Cache-Control: private, no-store` and `Vary: Cookie`. A public page asking who is there is not an error: signed\n// out is a 200 with `signedIn: false`, never a 401.\n\n/** The body of `GET /api/me`. `account` is the product's own shape, present only when `signedIn`. */\nexport interface MeResponse<TAccount = unknown> {\n signedIn: boolean;\n /** Whether the product accepts new accounts (its `signupOpen` setting). */\n signupOpen: boolean;\n account?: TAccount;\n}\n\n/** The headers of the answer: per-visitor, never cached, varying with the session cookie. */\nexport const meHeaders = { \"Cache-Control\": \"private, no-store\", Vary: \"Cookie\" } as const;\n\n/** The 200 answer of `GET /api/me` for a route handler. A signed-out visitor never gets an `account`. */\nexport function meResponse<TAccount>({ signedIn, signupOpen, account }: MeResponse<TAccount>): Response {\n const body: MeResponse<TAccount> = signedIn && account !== undefined ? { signedIn, signupOpen, account } : { signedIn: false, signupOpen };\n return new Response(JSON.stringify(body), { status: 200, headers: { ...meHeaders, \"Content-Type\": \"application/json\" } });\n}\n\n/** A Standard Schema of the body, for `krizakaFetch`: refuses anything that is not the contract. */\nexport const meSchema = {\n \"~standard\": {\n version: 1,\n vendor: \"krizaka\",\n validate(value: unknown) {\n const v = value as Partial<MeResponse> | null;\n if (v && typeof v === \"object\" && typeof v.signedIn === \"boolean\" && typeof v.signupOpen === \"boolean\" && (v.signedIn || !(\"account\" in v))) return { value: v as MeResponse };\n return { issues: [{ message: \"Expected { signedIn: boolean, signupOpen: boolean, account?: … }.\" }] };\n },\n },\n} as const;\n"],"mappings":";AAaO,IAAM,YAAY,EAAE,iBAAiB,qBAAqB,MAAM,SAAS;AAGzE,SAAS,WAAqB,EAAE,UAAU,YAAY,QAAQ,GAAmC;AACtG,QAAM,OAA6B,YAAY,YAAY,SAAY,EAAE,UAAU,YAAY,QAAQ,IAAI,EAAE,UAAU,OAAO,WAAW;AACzI,SAAO,IAAI,SAAS,KAAK,UAAU,IAAI,GAAG,EAAE,QAAQ,KAAK,SAAS,EAAE,GAAG,WAAW,gBAAgB,mBAAmB,EAAE,CAAC;AAC1H;AAGO,IAAM,WAAW;AAAA,EACtB,aAAa;AAAA,IACX,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS,OAAgB;AACvB,YAAM,IAAI;AACV,UAAI,KAAK,OAAO,MAAM,YAAY,OAAO,EAAE,aAAa,aAAa,OAAO,EAAE,eAAe,cAAc,EAAE,YAAY,EAAE,aAAa,IAAK,QAAO,EAAE,OAAO,EAAgB;AAC7K,aAAO,EAAE,QAAQ,CAAC,EAAE,SAAS,yEAAoE,CAAC,EAAE;AAAA,IACtG;AAAA,EACF;AACF;","names":[]}
|
package/dist/nav-bar.d.ts
CHANGED
|
@@ -4,6 +4,63 @@ import * as React from 'react';
|
|
|
4
4
|
import { LanguageSwitchProps } from './language-switch.js';
|
|
5
5
|
import { S as SiteId, F as FamilyLabels } from './sites-DlR8jicc.js';
|
|
6
6
|
|
|
7
|
+
/** The body of `GET /api/me`. `account` is the product's own shape, present only when `signedIn`. */
|
|
8
|
+
interface MeResponse<TAccount = unknown> {
|
|
9
|
+
signedIn: boolean;
|
|
10
|
+
/** Whether the product accepts new accounts (its `signupOpen` setting). */
|
|
11
|
+
signupOpen: boolean;
|
|
12
|
+
account?: TAccount;
|
|
13
|
+
}
|
|
14
|
+
/** The headers of the answer: per-visitor, never cached, varying with the session cookie. */
|
|
15
|
+
declare const meHeaders: {
|
|
16
|
+
readonly "Cache-Control": "private, no-store";
|
|
17
|
+
readonly Vary: "Cookie";
|
|
18
|
+
};
|
|
19
|
+
/** The 200 answer of `GET /api/me` for a route handler. A signed-out visitor never gets an `account`. */
|
|
20
|
+
declare function meResponse<TAccount>({ signedIn, signupOpen, account }: MeResponse<TAccount>): Response;
|
|
21
|
+
/** A Standard Schema of the body, for `krizakaFetch`: refuses anything that is not the contract. */
|
|
22
|
+
declare const meSchema: {
|
|
23
|
+
readonly "~standard": {
|
|
24
|
+
readonly version: 1;
|
|
25
|
+
readonly vendor: "krizaka";
|
|
26
|
+
readonly validate: (value: unknown) => {
|
|
27
|
+
value: MeResponse;
|
|
28
|
+
issues?: undefined;
|
|
29
|
+
} | {
|
|
30
|
+
issues: {
|
|
31
|
+
message: string;
|
|
32
|
+
}[];
|
|
33
|
+
value?: undefined;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
type NavBarSessionProps<TAccount = unknown> = {
|
|
39
|
+
/**
|
|
40
|
+
* Where the contract is served.
|
|
41
|
+
* @default "/api/me"
|
|
42
|
+
*/
|
|
43
|
+
endpoint?: string;
|
|
44
|
+
/** Signed out: the product's `ProductBarActions`, told whether sign-up is open. */
|
|
45
|
+
signedOut: (state: {
|
|
46
|
+
signupOpen: boolean;
|
|
47
|
+
}) => React.ReactNode;
|
|
48
|
+
/** Signed in: the product's `AccountMenu`, given the account. */
|
|
49
|
+
signedIn: (account: TAccount, state: {
|
|
50
|
+
signupOpen: boolean;
|
|
51
|
+
}) => React.ReactNode;
|
|
52
|
+
/** The hint's words while the answer is on its way (“Checking your session…”) — passed translated. */
|
|
53
|
+
hint: string;
|
|
54
|
+
/** Classes of the loading placeholder. */
|
|
55
|
+
className?: string;
|
|
56
|
+
};
|
|
57
|
+
declare const sessionKey: (endpoint: string) => readonly ["krizaka", "session", string];
|
|
58
|
+
/**
|
|
59
|
+
* The bar's session island: put it in `NavBar.Actions`. While the answer is on its way it reserves the place and says
|
|
60
|
+
* `hint` politely; if the request fails it shows the signed-out actions (the visitor can still sign in).
|
|
61
|
+
*/
|
|
62
|
+
declare function NavBarSession<TAccount = unknown>({ endpoint, signedOut, signedIn, hint, className }: NavBarSessionProps<TAccount>): React.JSX.Element;
|
|
63
|
+
|
|
7
64
|
declare const navBar: tailwind_variants.TVReturnType<{
|
|
8
65
|
floating: {
|
|
9
66
|
true: {
|
|
@@ -295,7 +352,7 @@ type NavBarRepoProps = Omit<React.ComponentProps<"a">, "children"> & {
|
|
|
295
352
|
/** The site's repository on GitHub, an icon link of `NavBar.Actions`. */
|
|
296
353
|
declare function NavBarRepo({ label, className, ...props }: NavBarRepoProps): React.JSX.Element;
|
|
297
354
|
/**
|
|
298
|
-
* `NavBar.Root/Brand/Family/Badge/Items/Link/Menu/MenuLink/Actions/Repo/Language/Mobile/MobileGroup/MobilePreferences/MobileLink` — the Krizaka navigation bar,
|
|
355
|
+
* `NavBar.Root/Brand/Family/Badge/Items/Link/Menu/MenuLink/Actions/Repo/Session/Language/Mobile/MobileGroup/MobilePreferences/MobileLink` — the Krizaka navigation bar,
|
|
299
356
|
* the same on every site of the family: floating, tightening on scroll, the family switcher on the brand, one light
|
|
300
357
|
* gliding between its items, accessible menus, a mobile panel.
|
|
301
358
|
*/
|
|
@@ -310,6 +367,7 @@ declare const NavBar: {
|
|
|
310
367
|
MenuLink: typeof NavBarMenuLink;
|
|
311
368
|
Actions: typeof NavBarActions;
|
|
312
369
|
Repo: typeof NavBarRepo;
|
|
370
|
+
Session: typeof NavBarSession;
|
|
313
371
|
Language: typeof NavBarLanguage;
|
|
314
372
|
Mobile: typeof NavBarMobile;
|
|
315
373
|
MobilePreferences: typeof NavBarMobilePreferences;
|
|
@@ -380,4 +438,5 @@ type ProductBarActionsProps = {
|
|
|
380
438
|
/** The product bar's actions: use the app. Put it in `NavBar.Actions` (`placement="bar"`) or in `NavBar.Mobile` (`placement="panel"`). */
|
|
381
439
|
declare function ProductBarActions({ signIn, tryIt, signupOpen, linkAs: Link, placement }: ProductBarActionsProps): React.JSX.Element;
|
|
382
440
|
|
|
383
|
-
export { NavBar, NavBarActions, NavBarBadge,
|
|
441
|
+
export { NavBar, NavBarActions, NavBarBadge, NavBarBrand, NavBarFamily, NavBarItems, NavBarLanguage, NavBarLink, NavBarMenu, NavBarMenuLink, NavBarMobile, NavBarMobileGroup, NavBarMobileLink, NavBarMobilePreferences, NavBarRepo, NavBarRoot, NavBarSession, ProductBarAction, ProductBarActions, meHeaders, meResponse, meSchema, navBar, placePanel, productBarActions, sessionKey };
|
|
442
|
+
export type { MeResponse, NavBarBadgeProps, NavBarBrandProps, NavBarFamilyProps, NavBarItemsProps, NavBarLanguageProps, NavBarLinkProps, NavBarMenuLinkProps, NavBarMenuProps, NavBarMobileGroupProps, NavBarMobileLinkProps, NavBarMobilePreferencesProps, NavBarMobileProps, NavBarRepoProps, NavBarRootProps, NavBarSessionProps, PlacePanel, ProductBarActionsProps, ProductBarLink, ProductBarState };
|
package/dist/nav-bar.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
GitHubGlyph,
|
|
8
8
|
familyLabels,
|
|
9
9
|
sitesByGroup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-USPOIQV5.js";
|
|
11
11
|
import {
|
|
12
12
|
useSlidingIndicator
|
|
13
13
|
} from "./chunk-4QN5YJ3D.js";
|
|
@@ -21,6 +21,24 @@ import {
|
|
|
21
21
|
cn
|
|
22
22
|
} from "./chunk-NSLXEDIS.js";
|
|
23
23
|
|
|
24
|
+
// src/nav-bar/me.ts
|
|
25
|
+
var meHeaders = { "Cache-Control": "private, no-store", Vary: "Cookie" };
|
|
26
|
+
function meResponse({ signedIn, signupOpen, account }) {
|
|
27
|
+
const body = signedIn && account !== void 0 ? { signedIn, signupOpen, account } : { signedIn: false, signupOpen };
|
|
28
|
+
return new Response(JSON.stringify(body), { status: 200, headers: { ...meHeaders, "Content-Type": "application/json" } });
|
|
29
|
+
}
|
|
30
|
+
var meSchema = {
|
|
31
|
+
"~standard": {
|
|
32
|
+
version: 1,
|
|
33
|
+
vendor: "krizaka",
|
|
34
|
+
validate(value) {
|
|
35
|
+
const v = value;
|
|
36
|
+
if (v && typeof v === "object" && typeof v.signedIn === "boolean" && typeof v.signupOpen === "boolean" && (v.signedIn || !("account" in v))) return { value: v };
|
|
37
|
+
return { issues: [{ message: "Expected { signedIn: boolean, signupOpen: boolean, account?: \u2026 }." }] };
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
24
42
|
// src/nav-bar/nav-bar.tsx
|
|
25
43
|
import { NavigationMenu as Nav, Slot } from "radix-ui";
|
|
26
44
|
import * as React from "react";
|
|
@@ -34,8 +52,28 @@ function placePanel({ trigger, root, panel, window: window2, gutter = 16 }) {
|
|
|
34
52
|
return Math.round(Math.max(nearest, Math.min(wanted, farthest)));
|
|
35
53
|
}
|
|
36
54
|
|
|
55
|
+
// src/nav-bar/session.tsx
|
|
56
|
+
import { krizakaFetch, useQuery } from "@krizaka/query";
|
|
57
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
58
|
+
var sessionKey = (endpoint) => ["krizaka", "session", endpoint];
|
|
59
|
+
function NavBarSession({ endpoint = "/api/me", signedOut, signedIn, hint, className }) {
|
|
60
|
+
const { data, isPending, isError } = useQuery({
|
|
61
|
+
queryKey: sessionKey(endpoint),
|
|
62
|
+
queryFn: ({ signal }) => krizakaFetch(endpoint, { schema: meSchema, signal, cache: "no-store" }),
|
|
63
|
+
staleTime: 3e4,
|
|
64
|
+
retry: false,
|
|
65
|
+
throwOnError: false
|
|
66
|
+
});
|
|
67
|
+
if (isPending) {
|
|
68
|
+
return /* @__PURE__ */ jsx("span", { role: "status", "aria-live": "polite", "data-state": "loading", className, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: hint }) });
|
|
69
|
+
}
|
|
70
|
+
const me = !isError && data ? data : { signedIn: false, signupOpen: false };
|
|
71
|
+
const state = { signupOpen: me.signupOpen };
|
|
72
|
+
return /* @__PURE__ */ jsx(Fragment, { children: me.signedIn && me.account !== void 0 ? signedIn(me.account, state) : signedOut(state) });
|
|
73
|
+
}
|
|
74
|
+
|
|
37
75
|
// src/nav-bar/nav-bar.tsx
|
|
38
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
76
|
+
import { Fragment as Fragment2, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
39
77
|
var navBar = tv({
|
|
40
78
|
slots: {
|
|
41
79
|
root: "group/nav relative z-40 mx-auto flex h-14 w-full items-center gap-2 border-border-subtle bg-surface-1 transition-[height,background-color,border-color,box-shadow] duration-300 motion-reduce:transition-none data-compact:h-12 data-compact:border-border-default data-compact:bg-surface-1 data-compact:shadow-lg",
|
|
@@ -109,11 +147,11 @@ function NavBarRoot({ label, compactAfter = 24, floating = true, className, chil
|
|
|
109
147
|
return () => window.removeEventListener("scroll", onScroll);
|
|
110
148
|
}, [compactAfter]);
|
|
111
149
|
const ctx = React.useMemo(() => ({ label, open, setOpen, panelId }), [label, open, panelId]);
|
|
112
|
-
return /* @__PURE__ */
|
|
150
|
+
return /* @__PURE__ */ jsx2(Context.Provider, { value: ctx, children: /* @__PURE__ */ jsx2("header", { "data-compact": compact ? "" : void 0, "data-floating": floating, className: navBar({ floating }).root({ className }), ...props, children }) });
|
|
113
151
|
}
|
|
114
152
|
function NavBarBrand({ asChild, className, ...props }) {
|
|
115
153
|
const Comp = asChild ? Slot.Root : "a";
|
|
116
|
-
return /* @__PURE__ */
|
|
154
|
+
return /* @__PURE__ */ jsx2(Comp, { className: s.brand({ className }), ...props });
|
|
117
155
|
}
|
|
118
156
|
function NavBarItems({ className, children, value: valueProp, defaultValue, onValueChange, delayDuration = 200, ...props }) {
|
|
119
157
|
const { label } = useNavBar();
|
|
@@ -155,14 +193,14 @@ function NavBarItems({ className, children, value: valueProp, defaultValue, onVa
|
|
|
155
193
|
window.removeEventListener("resize", place);
|
|
156
194
|
};
|
|
157
195
|
}, [value]);
|
|
158
|
-
return /* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
/* @__PURE__ */
|
|
196
|
+
return /* @__PURE__ */ jsx2(ItemsContext.Provider, { value: items, children: /* @__PURE__ */ jsxs(Nav.Root, { ref: root, "aria-label": label, className: s.items({ className }), value, onValueChange: setValue, delayDuration, ...props, children: [
|
|
197
|
+
/* @__PURE__ */ jsx2(Nav.List, { ref, className: s.list(), ...handlers, children }),
|
|
198
|
+
/* @__PURE__ */ jsx2(Nav.Viewport, { ref: viewport, className: s.viewport() })
|
|
161
199
|
] }) });
|
|
162
200
|
}
|
|
163
201
|
function NavBarLink({ active, className, itemClassName, onPointerEnter, ...props }) {
|
|
164
202
|
const { close } = React.useContext(ItemsContext);
|
|
165
|
-
return /* @__PURE__ */
|
|
203
|
+
return /* @__PURE__ */ jsx2(Nav.Item, { className: itemClassName, children: /* @__PURE__ */ jsx2(
|
|
166
204
|
Nav.Link,
|
|
167
205
|
{
|
|
168
206
|
"data-nav-item": "",
|
|
@@ -185,34 +223,34 @@ function NavBarMenu({ label, active, columns = 1, inlineUpTo = 3, inlineFrom = "
|
|
|
185
223
|
const dropdown = (hide) => /* @__PURE__ */ jsxs(Nav.Item, { className: cn(hide, className), ...props, children: [
|
|
186
224
|
/* @__PURE__ */ jsxs(Nav.Trigger, { "data-nav-item": "", "data-active": active ? "" : void 0, className: cn(s.item(), "group/trigger"), children: [
|
|
187
225
|
label,
|
|
188
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ jsx2("svg", { viewBox: "0 0 24 24", className: s.chevron(), fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx2("path", { d: "m6 9 6 6 6-6" }) })
|
|
189
227
|
] }),
|
|
190
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ jsx2(Nav.Content, { className: cn(s.panel(), columns === 2 && s.panelWide()), children })
|
|
191
229
|
] });
|
|
192
230
|
const inline = links.length > 0 && links.length <= inlineUpTo && links.every((c) => React.isValidElement(c) && c.type === NavBarMenuLink);
|
|
193
231
|
if (inline) {
|
|
194
|
-
return /* @__PURE__ */ jsxs(
|
|
232
|
+
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
195
233
|
inlineFrom !== "md" && dropdown(DROPDOWN_HIDE[inlineFrom]),
|
|
196
234
|
links.map((link) => {
|
|
197
235
|
const { title, href, active: here, asChild, children: child, icon: _icon, description: _description, className: linkClass, ...rest } = link.props;
|
|
198
|
-
return /* @__PURE__ */
|
|
236
|
+
return /* @__PURE__ */ jsx2(NavBarLink, { asChild, href: asChild ? void 0 : href, active: here, className: linkClass, itemClassName: INLINE_HIDE[inlineFrom], ...rest, children: asChild && React.isValidElement(child) ? React.cloneElement(child, void 0, title) : title }, link.key);
|
|
199
237
|
})
|
|
200
238
|
] });
|
|
201
239
|
}
|
|
202
240
|
return dropdown("");
|
|
203
241
|
}
|
|
204
242
|
function NavBarMenuLink({ title, description, icon, active, href, className, asChild, children, ...props }) {
|
|
205
|
-
const body = /* @__PURE__ */ jsxs(
|
|
206
|
-
icon && /* @__PURE__ */
|
|
243
|
+
const body = /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
244
|
+
icon && /* @__PURE__ */ jsx2("span", { className: s.menuIcon(), children: icon }),
|
|
207
245
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
description && /* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ jsx2("span", { className: s.menuTitle(), children: title }),
|
|
247
|
+
description && /* @__PURE__ */ jsx2("span", { className: s.menuText(), children: description })
|
|
210
248
|
] })
|
|
211
249
|
] });
|
|
212
|
-
return /* @__PURE__ */
|
|
250
|
+
return /* @__PURE__ */ jsx2(Nav.Link, { asChild, href: asChild ? void 0 : href, active, "aria-current": active ? "page" : void 0, "data-active": active ? "" : void 0, className: s.menuLink({ className }), ...props, children: asChild && React.isValidElement(children) ? React.cloneElement(children, void 0, body) : body });
|
|
213
251
|
}
|
|
214
252
|
function NavBarActions({ className, ...props }) {
|
|
215
|
-
return /* @__PURE__ */
|
|
253
|
+
return /* @__PURE__ */ jsx2("div", { className: s.actions({ className }), ...props });
|
|
216
254
|
}
|
|
217
255
|
function NavBarMobile({ openLabel, closeLabel, className, children, ...props }) {
|
|
218
256
|
const { label, open, setOpen, panelId } = useNavBar();
|
|
@@ -236,9 +274,9 @@ function NavBarMobile({ openLabel, closeLabel, className, children, ...props })
|
|
|
236
274
|
document.removeEventListener("pointerdown", onPress);
|
|
237
275
|
};
|
|
238
276
|
}, [open, setOpen, panelId]);
|
|
239
|
-
return /* @__PURE__ */ jsxs(
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
open && /* @__PURE__ */
|
|
277
|
+
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
278
|
+
/* @__PURE__ */ jsx2("button", { ref: toggle, type: "button", "aria-expanded": open, "aria-controls": panelId, "aria-label": open ? closeLabel : openLabel, onClick: () => setOpen(!open), className: s.toggle(), children: /* @__PURE__ */ jsx2("svg", { viewBox: "0 0 24 24", className: "h-4.5 w-4.5", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: open ? /* @__PURE__ */ jsx2("path", { d: "M18 6 6 18M6 6l12 12" }) : /* @__PURE__ */ jsx2("path", { d: "M4 7h16M4 12h16M4 17h10" }) }) }),
|
|
279
|
+
open && /* @__PURE__ */ jsx2(
|
|
242
280
|
"nav",
|
|
243
281
|
{
|
|
244
282
|
id: panelId,
|
|
@@ -248,7 +286,7 @@ function NavBarMobile({ openLabel, closeLabel, className, children, ...props })
|
|
|
248
286
|
if (e.target.closest("a")) setOpen(false);
|
|
249
287
|
},
|
|
250
288
|
...props,
|
|
251
|
-
children: /* @__PURE__ */
|
|
289
|
+
children: /* @__PURE__ */ jsx2(MobileContext.Provider, { value: true, children })
|
|
252
290
|
}
|
|
253
291
|
)
|
|
254
292
|
] });
|
|
@@ -256,13 +294,13 @@ function NavBarMobile({ openLabel, closeLabel, className, children, ...props })
|
|
|
256
294
|
function NavBarMobileGroup({ label, className, children, ...props }) {
|
|
257
295
|
const id = React.useId();
|
|
258
296
|
return /* @__PURE__ */ jsxs("div", { role: "group", "aria-labelledby": id, className: s.mobileGroup({ className }), ...props, children: [
|
|
259
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ jsx2("p", { id, className: s.mobileGroupTitle(), children: label }),
|
|
260
298
|
children
|
|
261
299
|
] });
|
|
262
300
|
}
|
|
263
301
|
function NavBarMobileLink({ active, asChild, className, ...props }) {
|
|
264
302
|
const Comp = asChild ? Slot.Root : "a";
|
|
265
|
-
return /* @__PURE__ */
|
|
303
|
+
return /* @__PURE__ */ jsx2(Comp, { "aria-current": active ? "page" : void 0, className: s.mobileLink({ className }), ...props });
|
|
266
304
|
}
|
|
267
305
|
var tagTone = {
|
|
268
306
|
upcoming: "bg-accent-soft text-fg ring-1 ring-inset ring-accent/40",
|
|
@@ -273,8 +311,8 @@ var tagTone = {
|
|
|
273
311
|
function FamilyName({ site, current, labels }) {
|
|
274
312
|
return /* @__PURE__ */ jsxs("span", { className: s.familyName(), children: [
|
|
275
313
|
site.name,
|
|
276
|
-
site.status !== "released" && /* @__PURE__ */
|
|
277
|
-
current && /* @__PURE__ */
|
|
314
|
+
site.status !== "released" && /* @__PURE__ */ jsx2("span", { className: cn(s.familyTag(), tagTone[site.status]), children: labels.status[site.status] }),
|
|
315
|
+
current && /* @__PURE__ */ jsx2("span", { className: cn(s.familyTag(), tagTone.current), children: labels.current })
|
|
278
316
|
] });
|
|
279
317
|
}
|
|
280
318
|
function NavBarFamily({ current, labels = familyLabels.en, defaultOpen, className }) {
|
|
@@ -283,12 +321,12 @@ function NavBarFamily({ current, labels = familyLabels.en, defaultOpen, classNam
|
|
|
283
321
|
const groups = sitesByGroup();
|
|
284
322
|
if (inMobile) {
|
|
285
323
|
return /* @__PURE__ */ jsxs("div", { role: "group", "aria-labelledby": `${id}-family`, className: s.mobileFamily({ className }), children: [
|
|
286
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ jsx2("p", { id: `${id}-family`, className: s.familyGroupTitle(), children: labels.family }),
|
|
287
325
|
groups.map(({ group, sites }) => /* @__PURE__ */ jsxs("div", { children: [
|
|
288
|
-
group !== "krizaka" && /* @__PURE__ */
|
|
289
|
-
/* @__PURE__ */
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
-
/* @__PURE__ */
|
|
326
|
+
group !== "krizaka" && /* @__PURE__ */ jsx2("p", { id: `${id}-${group}`, className: s.familyGroupTitle(), children: labels.groups[group] }),
|
|
327
|
+
/* @__PURE__ */ jsx2("ul", { "aria-labelledby": group !== "krizaka" ? `${id}-${group}` : `${id}-family`, className: "grid gap-0.5", children: sites.map((site) => /* @__PURE__ */ jsx2("li", { children: /* @__PURE__ */ jsxs("a", { href: site.url, "data-current": site.id === current ? "" : void 0, "aria-current": site.id === current ? "true" : void 0, className: s.mobileFamilyLink(), children: [
|
|
328
|
+
/* @__PURE__ */ jsx2("span", { className: s.familyMark(), children: /* @__PURE__ */ jsx2(FamilyMark, { mark: site.mark, size: 24 }) }),
|
|
329
|
+
/* @__PURE__ */ jsx2(FamilyName, { site, current: site.id === current, labels })
|
|
292
330
|
] }) }, site.id)) })
|
|
293
331
|
] }, group))
|
|
294
332
|
] });
|
|
@@ -296,20 +334,20 @@ function NavBarFamily({ current, labels = familyLabels.en, defaultOpen, classNam
|
|
|
296
334
|
const noHover = (e) => e.preventDefault();
|
|
297
335
|
const columns = [groups.filter((g) => g.group === "krizaka" || g.group === "products"), groups.filter((g) => g.group === "open-source" || g.group === "github")];
|
|
298
336
|
return /* @__PURE__ */ jsxs(Nav.Root, { "aria-label": labels.family, defaultValue: defaultOpen ? "family" : void 0, className: s.family({ className }), children: [
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
/* @__PURE__ */
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ jsx2(Nav.List, { className: "flex", children: /* @__PURE__ */ jsxs(Nav.Item, { value: "family", children: [
|
|
338
|
+
/* @__PURE__ */ jsx2(Nav.Trigger, { "aria-label": labels.family, onPointerMove: noHover, onPointerLeave: noHover, className: s.familyTrigger(), children: /* @__PURE__ */ jsx2("svg", { viewBox: "0 0 24 24", className: s.chevron(), fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx2("path", { d: "m6 9 6 6 6-6" }) }) }),
|
|
339
|
+
/* @__PURE__ */ jsx2(Nav.Content, { onPointerLeave: noHover, className: s.familyPanel(), children: columns.map((column, i) => /* @__PURE__ */ jsx2("div", { className: "grid content-start gap-3", children: column.map(({ group, sites }) => /* @__PURE__ */ jsxs("div", { children: [
|
|
340
|
+
/* @__PURE__ */ jsx2("p", { id: `${id}-${group}`, className: s.familyGroupTitle(), children: labels.groups[group] }),
|
|
341
|
+
/* @__PURE__ */ jsx2("ul", { "aria-labelledby": `${id}-${group}`, className: "grid gap-0.5", children: sites.map((site) => /* @__PURE__ */ jsx2("li", { children: /* @__PURE__ */ jsxs(Nav.Link, { href: site.url, "data-current": site.id === current ? "" : void 0, "aria-current": site.id === current ? "true" : void 0, className: s.familyLink(), children: [
|
|
342
|
+
/* @__PURE__ */ jsx2("span", { className: s.familyMark(), children: /* @__PURE__ */ jsx2(FamilyMark, { mark: site.mark, size: 28 }) }),
|
|
305
343
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ jsx2(FamilyName, { site, current: site.id === current, labels }),
|
|
345
|
+
/* @__PURE__ */ jsx2("span", { className: s.familyText(), children: labels.descriptions[site.id] })
|
|
308
346
|
] })
|
|
309
347
|
] }) }, site.id)) })
|
|
310
348
|
] }, group)) }, i)) })
|
|
311
349
|
] }) }),
|
|
312
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ jsx2(Nav.Viewport, { onPointerLeave: noHover, className: s.familyViewport() })
|
|
313
351
|
] });
|
|
314
352
|
}
|
|
315
353
|
function NavBarBadge({ env, version, className, children, ...props }) {
|
|
@@ -321,17 +359,17 @@ function NavBarBadge({ env, version, className, children, ...props }) {
|
|
|
321
359
|
}
|
|
322
360
|
function NavBarLanguage(props) {
|
|
323
361
|
const inMobile = React.useContext(MobileContext);
|
|
324
|
-
return /* @__PURE__ */
|
|
362
|
+
return /* @__PURE__ */ jsx2(LanguageSwitch, { variant: inMobile ? "inline" : "menu", ...props });
|
|
325
363
|
}
|
|
326
364
|
function NavBarMobilePreferences({ label, className, children, ...props }) {
|
|
327
365
|
const id = React.useId();
|
|
328
366
|
return /* @__PURE__ */ jsxs("div", { role: "group", "aria-labelledby": id, className: s.mobileGroup({ className }), ...props, children: [
|
|
329
|
-
/* @__PURE__ */
|
|
330
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ jsx2("p", { id, className: s.mobileGroupTitle(), children: label }),
|
|
368
|
+
/* @__PURE__ */ jsx2("div", { className: "flex flex-wrap items-center gap-2 px-3 py-1", children })
|
|
331
369
|
] });
|
|
332
370
|
}
|
|
333
371
|
function NavBarRepo({ label, className, ...props }) {
|
|
334
|
-
return /* @__PURE__ */
|
|
372
|
+
return /* @__PURE__ */ jsx2("a", { "aria-label": label, className: s.repo({ className }), ...props, children: /* @__PURE__ */ jsx2(GitHubGlyph, { size: 18 }) });
|
|
335
373
|
}
|
|
336
374
|
var NavBar = {
|
|
337
375
|
Root: NavBarRoot,
|
|
@@ -344,6 +382,7 @@ var NavBar = {
|
|
|
344
382
|
MenuLink: NavBarMenuLink,
|
|
345
383
|
Actions: NavBarActions,
|
|
346
384
|
Repo: NavBarRepo,
|
|
385
|
+
Session: NavBarSession,
|
|
347
386
|
Language: NavBarLanguage,
|
|
348
387
|
Mobile: NavBarMobile,
|
|
349
388
|
MobilePreferences: NavBarMobilePreferences,
|
|
@@ -352,7 +391,7 @@ var NavBar = {
|
|
|
352
391
|
};
|
|
353
392
|
|
|
354
393
|
// src/nav-bar/product-actions.tsx
|
|
355
|
-
import { Fragment as
|
|
394
|
+
import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
356
395
|
var ProductBarAction = { SignIn: "sign-in", Try: "try" };
|
|
357
396
|
function productBarActions({ signupOpen, hasTry }) {
|
|
358
397
|
return signupOpen && hasTry ? { primary: ProductBarAction.Try, secondary: ProductBarAction.SignIn } : { primary: ProductBarAction.SignIn, secondary: null };
|
|
@@ -361,8 +400,8 @@ function ProductBarActions({ signIn, tryIt, signupOpen, linkAs: Link = "a", plac
|
|
|
361
400
|
const { primary, secondary } = productBarActions({ signupOpen, hasTry: Boolean(tryIt) });
|
|
362
401
|
const link = (kind) => kind === ProductBarAction.Try && tryIt ? tryIt : signIn;
|
|
363
402
|
const panel = placement === "panel";
|
|
364
|
-
const button = (kind, variant) => /* @__PURE__ */
|
|
365
|
-
return /* @__PURE__ */ jsxs2(
|
|
403
|
+
const button = (kind, variant) => /* @__PURE__ */ jsx3(Button, { asChild: true, variant, size: panel ? "md" : "sm", className: panel ? variant === "primary" ? "mt-2 w-full font-bold" : "w-full" : variant === "primary" ? "ml-1 hidden font-bold md:inline-flex" : "hidden md:inline-flex", children: /* @__PURE__ */ jsx3(Link, { href: link(kind).href, children: link(kind).label }) }, kind);
|
|
404
|
+
return /* @__PURE__ */ jsxs2(Fragment3, { children: [
|
|
366
405
|
secondary ? button(secondary, "ghost") : null,
|
|
367
406
|
button(primary, "primary")
|
|
368
407
|
] });
|
|
@@ -384,10 +423,15 @@ export {
|
|
|
384
423
|
NavBarMobilePreferences,
|
|
385
424
|
NavBarRepo,
|
|
386
425
|
NavBarRoot,
|
|
426
|
+
NavBarSession,
|
|
387
427
|
ProductBarAction,
|
|
388
428
|
ProductBarActions,
|
|
429
|
+
meHeaders,
|
|
430
|
+
meResponse,
|
|
431
|
+
meSchema,
|
|
389
432
|
navBar,
|
|
390
433
|
placePanel,
|
|
391
|
-
productBarActions
|
|
434
|
+
productBarActions,
|
|
435
|
+
sessionKey
|
|
392
436
|
};
|
|
393
437
|
//# sourceMappingURL=nav-bar.js.map
|