@krizaka/ui 3.21.0 → 3.23.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 +5 -0
- package/dist/achievement.js +1 -1
- package/dist/action-bar.js +4 -4
- package/dist/app-header.d.ts +79 -0
- package/dist/app-header.js +32 -0
- package/dist/app-header.js.map +1 -0
- package/dist/app-shell.d.ts +20 -2
- package/dist/app-shell.js +35 -20
- package/dist/app-shell.js.map +1 -1
- package/dist/argument-card.d.ts +4 -1
- package/dist/argument-card.js +8 -5
- package/dist/argument-card.js.map +1 -1
- package/dist/audio-player.d.ts +3 -2
- package/dist/audio-player.js +14 -10
- package/dist/audio-player.js.map +1 -1
- package/dist/blocks.css +28 -0
- package/dist/button.js +2 -1
- package/dist/captcha.d.ts +81 -0
- package/dist/captcha.js +162 -0
- package/dist/captcha.js.map +1 -0
- package/dist/card-grid.d.ts +10 -1
- package/dist/card-grid.js +3 -2
- package/dist/card-grid.js.map +1 -1
- package/dist/card.js +3 -3
- package/dist/changelog-page.d.ts +57 -3
- package/dist/changelog-page.js +117 -1
- package/dist/changelog-page.js.map +1 -1
- package/dist/choice-grid.js +1 -1
- package/dist/{chunk-5MH64NIL.js → chunk-2L67YTNV.js} +2 -2
- package/dist/{chunk-3IN6TOPM.js → chunk-6ZYRUOTA.js} +6 -3
- package/dist/chunk-6ZYRUOTA.js.map +1 -0
- package/dist/chunk-APNIVNIX.js +54 -0
- package/dist/chunk-APNIVNIX.js.map +1 -0
- package/dist/{chunk-FKBHWS4N.js → chunk-CEJDH6SA.js} +2 -2
- package/dist/{chunk-OWC2LZD2.js → chunk-CHOJUCVE.js} +6 -3
- package/dist/chunk-CHOJUCVE.js.map +1 -0
- package/dist/{chunk-3BC4XQ6C.js → chunk-DZU6RMYD.js} +6 -3
- package/dist/chunk-DZU6RMYD.js.map +1 -0
- package/dist/chunk-F7FVPPBB.js +1080 -0
- package/dist/chunk-F7FVPPBB.js.map +1 -0
- package/dist/{chunk-5Z7FWCV2.js → chunk-HBZPJ3EP.js} +2 -2
- package/dist/{chunk-C2BRIFJG.js → chunk-HJFRHYCI.js} +2 -2
- package/dist/{chunk-ZNMFG62E.js → chunk-KH3JOEPY.js} +3 -2
- package/dist/chunk-KH3JOEPY.js.map +1 -0
- package/dist/{chunk-BTMFZ66D.js → chunk-KM6VAKIE.js} +2 -2
- package/dist/{chunk-DGQMDJXK.js → chunk-LZNZLCOE.js} +2 -2
- package/dist/chunk-MQPC3P4T.js +126 -0
- package/dist/chunk-MQPC3P4T.js.map +1 -0
- package/dist/{chunk-2FRWNSRO.js → chunk-NSLXEDIS.js} +3 -2
- package/dist/chunk-NSLXEDIS.js.map +1 -0
- package/dist/{chunk-3GODX3D6.js → chunk-QDXV544C.js} +2 -2
- package/dist/chunk-QDXV544C.js.map +1 -0
- package/dist/{chunk-4LOMIQVX.js → chunk-W675RFOA.js} +3 -2
- package/dist/chunk-W675RFOA.js.map +1 -0
- package/dist/{chunk-G3ETON2A.js → chunk-WU4VLSEA.js} +3 -2
- package/dist/chunk-WU4VLSEA.js.map +1 -0
- package/dist/{chunk-IZ7MV6HM.js → chunk-XVFQZ3ZG.js} +3 -2
- package/dist/chunk-XVFQZ3ZG.js.map +1 -0
- package/dist/{chunk-LIPK4UCS.js → chunk-YCIBJ6OQ.js} +140 -209
- package/dist/chunk-YCIBJ6OQ.js.map +1 -0
- package/dist/cn.js +1 -1
- package/dist/code-block.js +2 -2
- package/dist/code-block.js.map +1 -1
- package/dist/command.js +3 -3
- package/dist/comparison-table.d.ts +44 -0
- package/dist/comparison-table.js +84 -0
- package/dist/comparison-table.js.map +1 -0
- package/dist/confirm-button.js +2 -2
- package/dist/continue-prompt.js +3 -3
- package/dist/continue-prompt.js.map +1 -1
- package/dist/cta-panel.js +1 -1
- package/dist/data-table.js +19 -1066
- package/dist/data-table.js.map +1 -1
- package/dist/date-picker.js +4 -4
- package/dist/decision-list.js +1 -1
- package/dist/dialog.js +3 -2
- package/dist/dialog.js.map +1 -1
- package/dist/docs-nav.d.ts +36 -0
- package/dist/docs-nav.js +44 -0
- package/dist/docs-nav.js.map +1 -0
- package/dist/dropdown-menu.js +1 -1
- package/dist/error-page.js +1 -1
- package/dist/field.js +1 -1
- package/dist/filter-bar.js +2 -2
- package/dist/force-update-screen.js +2 -1
- package/dist/force-update-screen.js.map +1 -1
- package/dist/gallery-page.js +1 -1
- package/dist/genui.d.ts +221 -0
- package/dist/genui.js +533 -0
- package/dist/genui.js.map +1 -0
- package/dist/glow-card.js +1 -1
- package/dist/goal-gauge.js +1 -1
- package/dist/how-it-works-page.js +1 -1
- package/dist/image-cropper.js +3 -3
- package/dist/index.d.ts +17 -24
- package/dist/index.js +4 -4
- package/dist/landscape.js +1 -1
- package/dist/link-card.d.ts +9 -2
- package/dist/link-card.js +5 -44
- package/dist/link-card.js.map +1 -1
- package/dist/longform-page.js +1 -1
- package/dist/maintenance-screen.js +2 -1
- package/dist/maintenance-screen.js.map +1 -1
- package/dist/map.js +3 -3
- package/dist/map.js.map +1 -1
- package/dist/markdown.js +2 -1
- package/dist/markdown.js.map +1 -1
- package/dist/marketing-layout.js +1 -1
- package/dist/marketing-layout.js.map +1 -1
- package/dist/marquee.js +1 -1
- package/dist/mascot-quote.js +1 -1
- package/dist/match-dialog.js +2 -1
- package/dist/match-dialog.js.map +1 -1
- package/dist/media-grid.d.ts +26 -4
- package/dist/media-grid.js +122 -163
- package/dist/media-grid.js.map +1 -1
- package/dist/meta-row.d.ts +54 -0
- package/dist/meta-row.js +35 -0
- package/dist/meta-row.js.map +1 -0
- package/dist/native/map.js +3 -3
- package/dist/native/map.js.map +1 -1
- package/dist/native.d.ts +42 -16
- package/dist/native.js +591 -537
- package/dist/native.js.map +1 -1
- package/dist/nav-bar.js +3 -3
- package/dist/page-hero.js +5 -5
- package/dist/page.js +2 -2
- package/dist/popover.js +1 -1
- package/dist/pricing-page.js +1 -1
- package/dist/product-page.js +1 -1
- package/dist/profile-card.js +1 -1
- package/dist/promise-card.js +1 -1
- package/dist/radio-group.js +2 -2
- package/dist/rail-nav.d.ts +149 -0
- package/dist/rail-nav.js +177 -0
- package/dist/rail-nav.js.map +1 -0
- package/dist/scroll-stage.js +1 -1
- package/dist/settings-layout.d.ts +75 -62
- package/dist/settings-layout.js +39 -6
- package/dist/settings-layout.js.map +1 -1
- package/dist/showcase.js +1 -1
- package/dist/site-footer.d.ts +48 -67
- package/dist/site-footer.js +36 -12
- package/dist/site-footer.js.map +1 -1
- package/dist/skip-link.js +1 -1
- package/dist/slider.js +2 -2
- package/dist/stage-banner.js +1 -1
- package/dist/step-showcase.d.ts +62 -0
- package/dist/step-showcase.js +227 -0
- package/dist/step-showcase.js.map +1 -0
- package/dist/tabs.js +1 -1
- package/dist/tabs.js.map +1 -1
- package/dist/terminal-replay.js +1 -1
- package/dist/theme.js +2 -1
- package/dist/theme.js.map +1 -1
- package/dist/toast.js +1 -1
- package/dist/toc.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/update-prompt.js +2 -1
- package/dist/update-prompt.js.map +1 -1
- package/dist/vertical-video.js +2 -2
- package/dist/video-player.js +3 -3
- package/dist/waveform.d.ts +93 -0
- package/dist/waveform.js +95 -0
- package/dist/waveform.js.map +1 -0
- package/package.json +138 -10
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/activity-feed.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/app-header.json +202 -0
- package/registry/app-shell.json +33 -9
- package/registry/argument-card.json +37 -5
- package/registry/audio-player.json +5 -3
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/button.json +3 -2
- package/registry/captcha.json +300 -0
- package/registry/card-grid.json +27 -3
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.json +11 -7
- package/registry/chat.json +1 -1
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/cn.json +1 -1
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/comparison-table.json +207 -0
- package/registry/component-page.json +1 -1
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +1 -1
- package/registry/countdown.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +1 -1
- package/registry/date-picker.json +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +1 -1
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +1 -1
- package/registry/docs-hub-page.json +1 -1
- package/registry/docs-layout.json +1 -1
- package/registry/docs-nav.json +177 -0
- package/registry/document-viewer.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/activity-feed/native/notifications.light.png +0 -0
- package/registry/examples/app-header/basic.d.ts +4 -0
- package/registry/examples/app-header/basic.js +23 -0
- package/registry/examples/app-header/basic.tsx +17 -0
- package/registry/examples/app-shell/desktop.d.ts +4 -0
- package/registry/examples/app-shell/desktop.js +41 -0
- package/registry/examples/app-shell/desktop.tsx +37 -0
- package/registry/examples/argument-card/hover-light.d.ts +4 -0
- package/registry/examples/argument-card/hover-light.js +17 -0
- package/registry/examples/argument-card/hover-light.tsx +19 -0
- package/registry/examples/argument-card/hover-quiet.d.ts +4 -0
- package/registry/examples/argument-card/hover-quiet.js +17 -0
- package/registry/examples/argument-card/hover-quiet.tsx +19 -0
- package/registry/examples/avatar/native/group.light.png +0 -0
- package/registry/examples/avatar/native/presence.light.png +0 -0
- package/registry/examples/avatar/native/sizes.light.png +0 -0
- package/registry/examples/badge/native/tones.light.png +0 -0
- package/registry/examples/button/native/ghost.light.png +0 -0
- package/registry/examples/captcha/disclosure.d.ts +4 -0
- package/registry/examples/captcha/disclosure.js +14 -0
- package/registry/examples/captcha/disclosure.tsx +11 -0
- package/registry/examples/captcha/form.d.ts +4 -0
- package/registry/examples/captcha/form.js +18 -0
- package/registry/examples/captcha/form.tsx +17 -0
- package/registry/examples/card/native/body.light.png +0 -0
- package/registry/examples/card/native/default.light.png +0 -0
- package/registry/examples/card/native/elevated.light.png +0 -0
- package/registry/examples/card/native/pressable.light.png +0 -0
- package/registry/examples/card-grid/hover-quiet.d.ts +4 -0
- package/registry/examples/card-grid/hover-quiet.js +18 -0
- package/registry/examples/card-grid/hover-quiet.tsx +20 -0
- package/registry/examples/changelog-page/releases.js +1 -1
- package/registry/examples/changelog-page/releases.tsx +1 -1
- package/registry/examples/chat/native/conversation.light.png +0 -0
- package/registry/examples/chat/native/inbox.light.png +0 -0
- package/registry/examples/chip/native/multiple.light.png +0 -0
- package/registry/examples/chip/native/removable.light.png +0 -0
- package/registry/examples/chip/native/single.light.png +0 -0
- package/registry/examples/chip/native/toggle.light.png +0 -0
- package/registry/examples/combobox/native/multiple.light.png +0 -0
- package/registry/examples/combobox/native/search.light.png +0 -0
- package/registry/examples/comparison-table/versus.d.ts +4 -0
- package/registry/examples/comparison-table/versus.js +28 -0
- package/registry/examples/comparison-table/versus.tsx +20 -0
- package/registry/examples/countdown/native/days.light.png +0 -0
- package/registry/examples/countdown/native/hours.light.png +0 -0
- package/registry/examples/countdown/native/sizes.light.png +0 -0
- package/registry/examples/countdown/native/urgent.light.png +0 -0
- package/registry/examples/countdown/native/with-label.light.png +0 -0
- package/registry/examples/date-picker/native/birth-date-wheel.light.png +0 -0
- package/registry/examples/date-picker/native/birth-date.light.png +0 -0
- package/registry/examples/date-picker/native/calendar.dark.png +0 -0
- package/registry/examples/date-picker/native/calendar.light.png +0 -0
- package/registry/examples/date-picker/native/day-strip.dark.png +0 -0
- package/registry/examples/date-picker/native/day-strip.light.png +0 -0
- package/registry/examples/date-picker/native/time-slots.dark.png +0 -0
- package/registry/examples/date-picker/native/time-slots.light.png +0 -0
- package/registry/examples/date-picker/native/time-wheel.light.png +0 -0
- package/registry/examples/description-list/native/job-details.light.png +0 -0
- package/registry/examples/dialog/native/sheet.dark.png +0 -0
- package/registry/examples/dialog/native/sheet.light.png +0 -0
- package/registry/examples/docs-nav/groups.d.ts +4 -0
- package/registry/examples/docs-nav/groups.js +21 -0
- package/registry/examples/docs-nav/groups.tsx +15 -0
- package/registry/examples/empty-state/native/default.light.png +0 -0
- package/registry/examples/field/native/default.light.png +0 -0
- package/registry/examples/field/native/select.light.png +0 -0
- package/registry/examples/force-update-screen/native/default.light.png +0 -0
- package/registry/examples/form/native/amount.light.png +0 -0
- package/registry/examples/form/native/audience.light.png +0 -0
- package/registry/examples/form/native/profile.light.png +0 -0
- package/registry/examples/form/native/settings.light.png +0 -0
- package/registry/examples/form/native/sign-up.light.png +0 -0
- package/registry/examples/form/native/upload.dark.png +0 -0
- package/registry/examples/form/native/upload.light.png +0 -0
- package/registry/examples/genui/streaming.d.ts +4 -0
- package/registry/examples/genui/streaming.js +18 -0
- package/registry/examples/genui/streaming.tsx +14 -0
- package/registry/examples/genui/table.d.ts +4 -0
- package/registry/examples/genui/table.js +19 -0
- package/registry/examples/genui/table.tsx +14 -0
- package/registry/examples/goal-gauge/native/default.light.png +0 -0
- package/registry/examples/header/native/large-title.light.png +0 -0
- package/registry/examples/link-card/hover-light.d.ts +4 -0
- package/registry/examples/link-card/hover-light.js +18 -0
- package/registry/examples/link-card/hover-light.tsx +20 -0
- package/registry/examples/link-card/hover-quiet.d.ts +4 -0
- package/registry/examples/link-card/hover-quiet.js +18 -0
- package/registry/examples/link-card/hover-quiet.tsx +20 -0
- package/registry/examples/loader/native/job-wait.light.png +0 -0
- package/registry/examples/maintenance-screen/native/default.light.png +0 -0
- package/registry/examples/map/native/places.light.png +0 -0
- package/registry/examples/markdown/native/basic.light.png +0 -0
- package/registry/examples/mascot-state/native/default.light.png +0 -0
- package/registry/examples/media-picker/native/story.light.png +0 -0
- package/registry/examples/meta-row/native/video.d.ts +4 -0
- package/registry/examples/meta-row/native/video.dark.png +0 -0
- package/registry/examples/meta-row/native/video.js +11 -0
- package/registry/examples/meta-row/native/video.light.png +0 -0
- package/registry/examples/meta-row/native/video.tsx +5 -0
- package/registry/examples/meta-row/status.d.ts +4 -0
- package/registry/examples/meta-row/status.js +12 -0
- package/registry/examples/meta-row/status.tsx +7 -0
- package/registry/examples/meta-row/video.d.ts +4 -0
- package/registry/examples/meta-row/video.js +12 -0
- package/registry/examples/meta-row/video.tsx +7 -0
- package/registry/examples/meter/native/credits.light.png +0 -0
- package/registry/examples/meter/native/split-ring.light.png +0 -0
- package/registry/examples/number-ticker/native/balance.light.png +0 -0
- package/registry/examples/onboarding/native/first-launch.light.png +0 -0
- package/registry/examples/otp-input/native/verify.light.png +0 -0
- package/registry/examples/pagination/native/cursor.light.png +0 -0
- package/registry/examples/pagination/native/pages.light.png +0 -0
- package/registry/examples/permission-prompt/native/blocked.light.png +0 -0
- package/registry/examples/permission-prompt/native/camera.light.png +0 -0
- package/registry/examples/profile-card/native/default.light.png +0 -0
- package/registry/examples/radio-group/native/buttons.light.png +0 -0
- package/registry/examples/radio-group/native/cards.light.png +0 -0
- package/registry/examples/radio-group/native/list.light.png +0 -0
- package/registry/examples/radio-group/native/segmented.light.png +0 -0
- package/registry/examples/rail-nav/expandable.d.ts +4 -0
- package/registry/examples/rail-nav/expandable.js +34 -0
- package/registry/examples/rail-nav/expandable.tsx +28 -0
- package/registry/examples/rail-nav/studio.d.ts +4 -0
- package/registry/examples/rail-nav/studio.js +43 -0
- package/registry/examples/rail-nav/studio.tsx +38 -0
- package/registry/examples/screen/native/app-shell.light.png +0 -0
- package/registry/examples/screen/native/auth.light.png +0 -0
- package/registry/examples/screen/native/map.light.png +0 -0
- package/registry/examples/screen/native/notifications.light.png +0 -0
- package/registry/examples/screen/native/profile.light.png +0 -0
- package/registry/examples/segmented/native/default.light.png +0 -0
- package/registry/examples/segmented/native/small.light.png +0 -0
- package/registry/examples/settings-layout/flat.d.ts +4 -0
- package/registry/examples/settings-layout/flat.js +26 -0
- package/registry/examples/settings-layout/flat.tsx +30 -0
- package/registry/examples/showcase/native/slides.light.png +0 -0
- package/registry/examples/site-footer/app.d.ts +4 -0
- package/registry/examples/site-footer/app.js +25 -0
- package/registry/examples/site-footer/app.tsx +22 -0
- package/registry/examples/site-footer/docs.d.ts +4 -0
- package/registry/examples/site-footer/docs.js +31 -0
- package/registry/examples/site-footer/docs.tsx +24 -0
- package/registry/examples/slider/native/default.light.png +0 -0
- package/registry/examples/slider/native/stepped.light.png +0 -0
- package/registry/examples/step-progress/native/sign-up.light.png +0 -0
- package/registry/examples/step-showcase/desktop.d.ts +4 -0
- package/registry/examples/step-showcase/desktop.js +24 -0
- package/registry/examples/step-showcase/desktop.tsx +19 -0
- package/registry/examples/step-showcase/phone.d.ts +4 -0
- package/registry/examples/step-showcase/phone.js +24 -0
- package/registry/examples/step-showcase/phone.tsx +19 -0
- package/registry/examples/stepper/native/run.light.png +0 -0
- package/registry/examples/swipeable-row/native/conversation.light.png +0 -0
- package/registry/examples/switch/native/settings.light.png +0 -0
- package/registry/examples/tab-bar/native/main-sections.light.png +0 -0
- package/registry/examples/tabs/native/sections.light.png +0 -0
- package/registry/examples/tabs/native/segmented.light.png +0 -0
- package/registry/examples/tag-selector/native/interests.light.png +0 -0
- package/registry/examples/toast/native/tones.light.png +0 -0
- package/registry/examples/txt/native/tones.dark.png +0 -0
- package/registry/examples/txt/native/tones.light.png +0 -0
- package/registry/examples/update-prompt/native/default.light.png +0 -0
- package/registry/examples/waveform/card.d.ts +4 -0
- package/registry/examples/waveform/card.js +18 -0
- package/registry/examples/waveform/card.tsx +16 -0
- package/registry/examples/waveform/native/card.d.ts +4 -0
- package/registry/examples/waveform/native/card.dark.png +0 -0
- package/registry/examples/waveform/native/card.js +19 -0
- package/registry/examples/waveform/native/card.light.png +0 -0
- package/registry/examples/waveform/native/card.tsx +19 -0
- package/registry/examples/waveform/sizes.d.ts +4 -0
- package/registry/examples/waveform/sizes.js +16 -0
- package/registry/examples/waveform/sizes.tsx +14 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +1 -1
- package/registry/force-update-screen.json +1 -1
- package/registry/form.json +1 -1
- package/registry/gallery-page.json +1 -1
- package/registry/genui.json +409 -0
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +323 -14
- package/registry/iso.json +1 -1
- package/registry/kanban.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +38 -6
- package/registry/list.json +1 -1
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +1 -1
- package/registry/maintenance-screen.json +1 -1
- package/registry/map.json +2 -2
- package/registry/markdown.json +1 -1
- package/registry/marketing-layout.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +1 -1
- package/registry/mascot-state.json +1 -1
- package/registry/mascots.json +1 -1
- package/registry/match-dialog.json +1 -1
- package/registry/media-capture.json +1 -1
- package/registry/media-grid.json +92 -6
- package/registry/meta-row.json +215 -0
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +13 -13
- package/registry/number-ticker.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/photo-grid.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +1 -1
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/rail-nav.json +493 -0
- package/registry/recipes.json +1 -1
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/settings-layout.json +104 -9
- package/registry/showcase.json +1 -1
- package/registry/site-footer.json +49 -17
- package/registry/sites.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/skip-link.json +2 -2
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/status-page.json +1 -1
- package/registry/step-progress.json +1 -1
- package/registry/step-showcase.json +296 -0
- package/registry/stepper.json +1 -1
- package/registry/swipe-deck.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +2 -2
- package/registry/tag-input.json +1 -1
- package/registry/tag-selector.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +1 -1
- package/registry/update-prompt.json +1 -1
- package/registry/verified-badge.json +1 -1
- package/registry/vertical-video.json +1 -1
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +1 -1
- package/registry/waveform.json +296 -0
- package/dist/chunk-2FRWNSRO.js.map +0 -1
- package/dist/chunk-3BC4XQ6C.js.map +0 -1
- package/dist/chunk-3GODX3D6.js.map +0 -1
- package/dist/chunk-3IN6TOPM.js.map +0 -1
- package/dist/chunk-4LOMIQVX.js.map +0 -1
- package/dist/chunk-G3ETON2A.js.map +0 -1
- package/dist/chunk-IZ7MV6HM.js.map +0 -1
- package/dist/chunk-LIPK4UCS.js.map +0 -1
- package/dist/chunk-OWC2LZD2.js.map +0 -1
- package/dist/chunk-ZNMFG62E.js.map +0 -1
- /package/dist/{chunk-5MH64NIL.js.map → chunk-2L67YTNV.js.map} +0 -0
- /package/dist/{chunk-FKBHWS4N.js.map → chunk-CEJDH6SA.js.map} +0 -0
- /package/dist/{chunk-5Z7FWCV2.js.map → chunk-HBZPJ3EP.js.map} +0 -0
- /package/dist/{chunk-C2BRIFJG.js.map → chunk-HJFRHYCI.js.map} +0 -0
- /package/dist/{chunk-BTMFZ66D.js.map → chunk-KM6VAKIE.js.map} +0 -0
- /package/dist/{chunk-DGQMDJXK.js.map → chunk-LZNZLCOE.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/update-prompt/update-prompt.tsx"],"sourcesContent":["// Server-safe. The soft invitation to update: a dismissible banner, in the flow of the page, never a blocker.\n// Every word is a prop (the app passes them translated); the version and the store URL come from `useAppConfig`.\nimport { Button } from \"@krizaka/ui/button\";\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const updatePrompt = tv({\n slots: {\n root: \"flex w-full flex-wrap items-center gap-3 rounded-xl border border-border-default bg-surface-1 p-4 text-sm text-fg\",\n mark: \"flex h-10 w-10 shrink-0 items-center justify-center [&>svg]:h-10 [&>svg]:w-10\",\n content: \"flex min-w-0 flex-1 flex-col gap-0.5\",\n title: \"font-semibold text-fg\",\n message: \"text-fg-secondary\",\n version: \"font-mono text-xs text-fg-tertiary\",\n actions: \"flex shrink-0 items-center gap-2\",\n },\n});\n\nexport type UpdatePromptProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The headline (“A new version is available”). */\n title: React.ReactNode;\n /** Why update, in a sentence — the backend's localized `message`. */\n message?: React.ReactNode;\n /** The versions, in words and mono (“1.2.0 → 1.4.0”). */\n versionLabel?: React.ReactNode;\n /** The product's mark (decorative), e.g. `<OrazakaLogo />`. */\n mark?: React.ReactNode;\n /** The button that updates (“Update”). */\n updateLabel: string;\n /** Opens the store page, or reloads the app on the new version. */\n onUpdate: () => void;\n /** The way out (“Later”). */\n laterLabel: string;\n /** Called by the way out: the hook remembers it for this version. */\n onLater: () => void;\n};\n\n/** The soft update: an invitation that can be dismissed, announced politely. */\nexport function UpdatePrompt({ title, message, versionLabel, mark, updateLabel, onUpdate, laterLabel, onLater, className, ...props }: UpdatePromptProps) {\n const s = updatePrompt();\n return (\n <section role=\"region\" aria-label={typeof title === \"string\" ? title : undefined} data-kind=\"update-soft\" className={s.root({ className })} {...props}>\n {mark && (\n <div aria-hidden className={s.mark()}>\n {mark}\n </div>\n )}\n <div className={s.content()}>\n <p className={s.title()}>{title}</p>\n {message && <p className={s.message()}>{message}</p>}\n {versionLabel && <p className={s.version()}>{versionLabel}</p>}\n </div>\n <div className={s.actions()}>\n <Button variant=\"ghost\" size=\"sm\" onClick={onLater}>\n {laterLabel}\n </Button>\n <Button variant=\"primary\" size=\"sm\" shape=\"cut\" onClick={onUpdate}>\n {updateLabel}\n </Button>\n </div>\n </section>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/update-prompt/update-prompt.tsx"],"sourcesContent":["// Server-safe. The soft invitation to update: a dismissible banner, in the flow of the page, never a blocker.\n// Every word is a prop (the app passes them translated); the version and the store URL come from `useAppConfig`.\nimport { Button } from \"@krizaka/ui/button\";\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const updatePrompt = tv({\n slots: {\n root: \"flex w-full flex-wrap items-center gap-3 rounded-xl border border-border-default bg-surface-1 p-4 text-sm text-fg\",\n mark: \"flex h-10 w-10 shrink-0 items-center justify-center [&>svg]:h-10 [&>svg]:w-10\",\n content: \"flex min-w-0 flex-1 flex-col gap-0.5\",\n title: \"font-semibold text-fg\",\n message: \"text-fg-secondary\",\n version: \"font-mono text-xs text-fg-tertiary\",\n actions: \"flex shrink-0 items-center gap-2\",\n },\n});\n\nexport type UpdatePromptProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The headline (“A new version is available”). */\n title: React.ReactNode;\n /** Why update, in a sentence — the backend's localized `message`. */\n message?: React.ReactNode;\n /** The versions, in words and mono (“1.2.0 → 1.4.0”). */\n versionLabel?: React.ReactNode;\n /** The product's mark (decorative), e.g. `<OrazakaLogo />`. */\n mark?: React.ReactNode;\n /** The button that updates (“Update”). */\n updateLabel: string;\n /** Opens the store page, or reloads the app on the new version. */\n onUpdate: () => void;\n /** The way out (“Later”). */\n laterLabel: string;\n /** Called by the way out: the hook remembers it for this version. */\n onLater: () => void;\n};\n\n/** The soft update: an invitation that can be dismissed, announced politely. */\nexport function UpdatePrompt({ title, message, versionLabel, mark, updateLabel, onUpdate, laterLabel, onLater, className, ...props }: UpdatePromptProps) {\n const s = updatePrompt();\n return (\n <section role=\"region\" aria-label={typeof title === \"string\" ? title : undefined} data-kind=\"update-soft\" className={s.root({ className })} {...props}>\n {mark && (\n <div aria-hidden className={s.mark()}>\n {mark}\n </div>\n )}\n <div className={s.content()}>\n <p className={s.title()}>{title}</p>\n {message && <p className={s.message()}>{message}</p>}\n {versionLabel && <p className={s.version()}>{versionLabel}</p>}\n </div>\n <div className={s.actions()}>\n <Button variant=\"ghost\" size=\"sm\" onClick={onLater}>\n {laterLabel}\n </Button>\n <Button variant=\"primary\" size=\"sm\" shape=\"cut\" onClick={onUpdate}>\n {updateLabel}\n </Button>\n </div>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;AAIA,SAAS,UAAU;AAuCX,cAIF,YAJE;AArCD,IAAM,eAAe,GAAG;AAAA,EAC7B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AACF,CAAC;AAsBM,SAAS,aAAa,EAAE,OAAO,SAAS,cAAc,MAAM,aAAa,UAAU,YAAY,SAAS,WAAW,GAAG,MAAM,GAAsB;AACvJ,QAAM,IAAI,aAAa;AACvB,SACE,qBAAC,aAAQ,MAAK,UAAS,cAAY,OAAO,UAAU,WAAW,QAAQ,QAAW,aAAU,eAAc,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAC7I;AAAA,YACC,oBAAC,SAAI,eAAW,MAAC,WAAW,EAAE,KAAK,GAChC,gBACH;AAAA,IAEF,qBAAC,SAAI,WAAW,EAAE,QAAQ,GACxB;AAAA,0BAAC,OAAE,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,MAC/B,WAAW,oBAAC,OAAE,WAAW,EAAE,QAAQ,GAAI,mBAAQ;AAAA,MAC/C,gBAAgB,oBAAC,OAAE,WAAW,EAAE,QAAQ,GAAI,wBAAa;AAAA,OAC5D;AAAA,IACA,qBAAC,SAAI,WAAW,EAAE,QAAQ,GACxB;AAAA,0BAAC,UAAO,SAAQ,SAAQ,MAAK,MAAK,SAAS,SACxC,sBACH;AAAA,MACA,oBAAC,UAAO,SAAQ,WAAU,MAAK,MAAK,OAAM,OAAM,SAAS,UACtD,uBACH;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
package/dist/vertical-video.js
CHANGED
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "./chunk-KB7OLYIJ.js";
|
|
5
5
|
import {
|
|
6
6
|
IconButton
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DZU6RMYD.js";
|
|
8
8
|
import "./chunk-D3T54RSL.js";
|
|
9
9
|
import {
|
|
10
10
|
cn
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NSLXEDIS.js";
|
|
12
12
|
|
|
13
13
|
// src/vertical-video/short-feed.tsx
|
|
14
14
|
import * as React from "react";
|
package/dist/video-player.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Slider
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-KM6VAKIE.js";
|
|
5
|
+
import "./chunk-HJFRHYCI.js";
|
|
6
|
+
import "./chunk-NSLXEDIS.js";
|
|
7
7
|
import {
|
|
8
8
|
clamp,
|
|
9
9
|
formatClock,
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
declare const waveform: tailwind_variants.TVReturnType<{
|
|
5
|
+
size: {
|
|
6
|
+
sm: {
|
|
7
|
+
root: string;
|
|
8
|
+
};
|
|
9
|
+
md: {
|
|
10
|
+
root: string;
|
|
11
|
+
};
|
|
12
|
+
lg: {
|
|
13
|
+
root: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
tone: {
|
|
17
|
+
accent: {
|
|
18
|
+
bar: string;
|
|
19
|
+
};
|
|
20
|
+
neutral: {
|
|
21
|
+
bar: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
}, {
|
|
25
|
+
root: string;
|
|
26
|
+
bar: string;
|
|
27
|
+
}, undefined, {
|
|
28
|
+
size: {
|
|
29
|
+
sm: {
|
|
30
|
+
root: string;
|
|
31
|
+
};
|
|
32
|
+
md: {
|
|
33
|
+
root: string;
|
|
34
|
+
};
|
|
35
|
+
lg: {
|
|
36
|
+
root: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
tone: {
|
|
40
|
+
accent: {
|
|
41
|
+
bar: string;
|
|
42
|
+
};
|
|
43
|
+
neutral: {
|
|
44
|
+
bar: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}, {
|
|
48
|
+
root: string;
|
|
49
|
+
bar: string;
|
|
50
|
+
}, tailwind_variants.TVReturnTypeLike<{
|
|
51
|
+
size: {
|
|
52
|
+
sm: {
|
|
53
|
+
root: string;
|
|
54
|
+
};
|
|
55
|
+
md: {
|
|
56
|
+
root: string;
|
|
57
|
+
};
|
|
58
|
+
lg: {
|
|
59
|
+
root: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
tone: {
|
|
63
|
+
accent: {
|
|
64
|
+
bar: string;
|
|
65
|
+
};
|
|
66
|
+
neutral: {
|
|
67
|
+
bar: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
}, {
|
|
71
|
+
root: string;
|
|
72
|
+
bar: string;
|
|
73
|
+
}>>;
|
|
74
|
+
type WaveformProps = {
|
|
75
|
+
/** The peaks, between 0 and 1, as many as you like (resampled to `bars`). Without them: a flat line. */
|
|
76
|
+
peaks?: readonly number[];
|
|
77
|
+
/** How many bars. Default 32. */
|
|
78
|
+
bars?: number;
|
|
79
|
+
/** sm · md (default) · lg: the height of the drawing. */
|
|
80
|
+
size?: "sm" | "md" | "lg";
|
|
81
|
+
/** accent (default, the brand's colour) · neutral (a quiet line beside text). */
|
|
82
|
+
tone?: "accent" | "neutral";
|
|
83
|
+
/** Moves gently while `true` (a sound playing); still otherwise. */
|
|
84
|
+
playing?: boolean;
|
|
85
|
+
/** When given, it is an image named by this (“Voice note, 0:42”); otherwise decorative and hidden from assistive technology. */
|
|
86
|
+
label?: string;
|
|
87
|
+
/** Classes merged last. */
|
|
88
|
+
className?: string;
|
|
89
|
+
};
|
|
90
|
+
/** A decorative waveform: the bars of a sound, in the accent or a neutral tone, breathing gently while it plays. */
|
|
91
|
+
declare function Waveform({ peaks, bars, size, tone, playing, label, className }: WaveformProps): React.JSX.Element;
|
|
92
|
+
|
|
93
|
+
export { Waveform, type WaveformProps, waveform };
|
package/dist/waveform.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// src/waveform/waveform.tsx
|
|
2
|
+
import * as React2 from "react";
|
|
3
|
+
import { tv } from "tailwind-variants";
|
|
4
|
+
|
|
5
|
+
// src/media.ts
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
function useLatest(value) {
|
|
8
|
+
const ref = React.useRef(value);
|
|
9
|
+
React.useLayoutEffect(() => {
|
|
10
|
+
ref.current = value;
|
|
11
|
+
});
|
|
12
|
+
return ref;
|
|
13
|
+
}
|
|
14
|
+
function useInView(ref, onChange, enabled = true, threshold = 0.25) {
|
|
15
|
+
const latest = useLatest(onChange);
|
|
16
|
+
React.useEffect(() => {
|
|
17
|
+
const element = ref.current;
|
|
18
|
+
if (!enabled || !element || typeof IntersectionObserver === "undefined") return;
|
|
19
|
+
const observer = new IntersectionObserver(([entry]) => entry && latest.current(entry.isIntersecting), { threshold });
|
|
20
|
+
observer.observe(element);
|
|
21
|
+
return () => observer.disconnect();
|
|
22
|
+
}, [ref, enabled, threshold, latest]);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// src/waveform/bars.ts
|
|
26
|
+
function resamplePeaks(peaks, count) {
|
|
27
|
+
if (peaks.length === 0) return Array.from({ length: count }, () => 0.15);
|
|
28
|
+
const out = Array.from({ length: count }, (_, i) => {
|
|
29
|
+
const from = Math.floor(i / count * peaks.length);
|
|
30
|
+
const to = Math.max(from + 1, Math.floor((i + 1) / count * peaks.length));
|
|
31
|
+
return Math.max(...peaks.slice(from, to).map(Math.abs));
|
|
32
|
+
});
|
|
33
|
+
const loudest = Math.max(...out, 1e-4);
|
|
34
|
+
return out.map((v) => Math.max(0.08, v / loudest));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// src/waveform/waveform.tsx
|
|
38
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
39
|
+
var waveform = tv({
|
|
40
|
+
slots: {
|
|
41
|
+
root: "flex w-full items-center justify-center gap-[2px]",
|
|
42
|
+
bar: "min-w-[2px] flex-1 rounded-full"
|
|
43
|
+
},
|
|
44
|
+
variants: {
|
|
45
|
+
size: {
|
|
46
|
+
sm: { root: "h-6" },
|
|
47
|
+
md: { root: "h-10" },
|
|
48
|
+
lg: { root: "h-16" }
|
|
49
|
+
},
|
|
50
|
+
tone: {
|
|
51
|
+
accent: { bar: "bg-accent" },
|
|
52
|
+
neutral: { bar: "bg-border-strong" }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
defaultVariants: { size: "md", tone: "accent" }
|
|
56
|
+
});
|
|
57
|
+
var MOTION = "@keyframes kz-wave{0%,100%{transform:scaleY(.45)}50%{transform:scaleY(1)}}@media (prefers-reduced-motion: no-preference){.kz-wave[data-playing] [data-bar]{animation:kz-wave 1.6s ease-in-out infinite;animation-delay:var(--kz-wave-delay,0s)}}.kz-wave[data-paused] [data-bar]{animation-play-state:paused}";
|
|
58
|
+
function Waveform({ peaks, bars = 32, size, tone, playing = false, label, className }) {
|
|
59
|
+
const s = waveform({ size, tone });
|
|
60
|
+
const root = React2.useRef(null);
|
|
61
|
+
const [visible, setVisible] = React2.useState(true);
|
|
62
|
+
useInView(root, setVisible, playing);
|
|
63
|
+
const shape = React2.useMemo(() => resamplePeaks(peaks ?? [], bars), [peaks, bars]);
|
|
64
|
+
const labelled = label !== void 0;
|
|
65
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
66
|
+
/* @__PURE__ */ jsx("style", { children: MOTION }),
|
|
67
|
+
/* @__PURE__ */ jsx(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
ref: root,
|
|
71
|
+
className: s.root({ className: ["kz-wave", className].filter(Boolean).join(" ") }),
|
|
72
|
+
"data-playing": playing || void 0,
|
|
73
|
+
"data-paused": playing && !visible ? "" : void 0,
|
|
74
|
+
role: labelled ? "img" : void 0,
|
|
75
|
+
"aria-label": label,
|
|
76
|
+
"aria-hidden": labelled ? void 0 : true,
|
|
77
|
+
children: shape.map((peak, i) => /* @__PURE__ */ jsx(
|
|
78
|
+
"span",
|
|
79
|
+
{
|
|
80
|
+
"data-bar": true,
|
|
81
|
+
"aria-hidden": true,
|
|
82
|
+
className: s.bar(),
|
|
83
|
+
style: { height: `${Math.round(peak * 100)}%`, "--kz-wave-delay": `${-(i * 7 % 11) * 0.14}s` }
|
|
84
|
+
},
|
|
85
|
+
i
|
|
86
|
+
))
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
] });
|
|
90
|
+
}
|
|
91
|
+
export {
|
|
92
|
+
Waveform,
|
|
93
|
+
waveform
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=waveform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/waveform/waveform.tsx","../src/media.ts","../src/waveform/bars.ts"],"sourcesContent":["// Client (the idle motion and the pause off screen). The bars of an AudioPlayer, drawn on their own: a decorative\n// waveform for a card, a banner or a sound's identity. Hidden from assistive technology unless it has a `label`.\n// Its motion runs only while `playing`, never under prefers-reduced-motion, and pauses when it leaves the screen.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { useInView } from \"../media\";\nimport { resamplePeaks } from \"./bars\";\n\nexport const waveform = tv({\n slots: {\n root: \"flex w-full items-center justify-center gap-[2px]\",\n bar: \"min-w-[2px] flex-1 rounded-full\",\n },\n variants: {\n size: {\n sm: { root: \"h-6\" },\n md: { root: \"h-10\" },\n lg: { root: \"h-16\" },\n },\n tone: {\n accent: { bar: \"bg-accent\" },\n neutral: { bar: \"bg-border-strong\" },\n },\n },\n defaultVariants: { size: \"md\", tone: \"accent\" },\n});\n\n// The idle motion: each bar breathes between 45 % and its height, staggered by its index. It is declared under a\n// no-preference query only, so a reduced-motion reader gets the still bars; `data-paused` holds it off screen.\nconst MOTION =\n \"@keyframes kz-wave{0%,100%{transform:scaleY(.45)}50%{transform:scaleY(1)}}\" +\n \"@media (prefers-reduced-motion: no-preference){.kz-wave[data-playing] [data-bar]{animation:kz-wave 1.6s ease-in-out infinite;animation-delay:var(--kz-wave-delay,0s)}}\" +\n \".kz-wave[data-paused] [data-bar]{animation-play-state:paused}\";\n\nexport type WaveformProps = {\n /** The peaks, between 0 and 1, as many as you like (resampled to `bars`). Without them: a flat line. */\n peaks?: readonly number[];\n /** How many bars. Default 32. */\n bars?: number;\n /** sm · md (default) · lg: the height of the drawing. */\n size?: \"sm\" | \"md\" | \"lg\";\n /** accent (default, the brand's colour) · neutral (a quiet line beside text). */\n tone?: \"accent\" | \"neutral\";\n /** Moves gently while `true` (a sound playing); still otherwise. */\n playing?: boolean;\n /** When given, it is an image named by this (“Voice note, 0:42”); otherwise decorative and hidden from assistive technology. */\n label?: string;\n /** Classes merged last. */\n className?: string;\n};\n\n/** A decorative waveform: the bars of a sound, in the accent or a neutral tone, breathing gently while it plays. */\nexport function Waveform({ peaks, bars = 32, size, tone, playing = false, label, className }: WaveformProps) {\n const s = waveform({ size, tone });\n const root = React.useRef<HTMLDivElement>(null);\n const [visible, setVisible] = React.useState(true);\n useInView(root, setVisible, playing);\n const shape = React.useMemo(() => resamplePeaks(peaks ?? [], bars), [peaks, bars]);\n const labelled = label !== undefined;\n\n return (\n <>\n <style>{MOTION}</style>\n <div\n ref={root}\n className={s.root({ className: [\"kz-wave\", className].filter(Boolean).join(\" \") })}\n data-playing={playing || undefined}\n data-paused={playing && !visible ? \"\" : undefined}\n role={labelled ? \"img\" : undefined}\n aria-label={label}\n aria-hidden={labelled ? undefined : true}\n >\n {shape.map((peak, i) => (\n <span\n key={i}\n data-bar\n aria-hidden\n className={s.bar()}\n style={{ height: `${Math.round(peak * 100)}%`, \"--kz-wave-delay\": `${-((i * 7) % 11) * 0.14}s` } as React.CSSProperties}\n />\n ))}\n </div>\n </>\n );\n}\n","// Shared by the data and media primitives (client): the clock format, the reduced-motion preference, the\n// in-view observer, a debounced callback. Never an entry of its own.\nimport * as React from \"react\";\n\n/** Seconds as a clock: `75` → `1:15`, `3725` → `1:02:05`. Negative or unknown values read `0:00`. */\nexport function formatClock(seconds: number): string {\n const s = Number.isFinite(seconds) && seconds > 0 ? Math.floor(seconds) : 0;\n const h = Math.floor(s / 3600);\n const m = Math.floor((s % 3600) / 60);\n const rest = String(s % 60).padStart(2, \"0\");\n return h > 0 ? `${h}:${String(m).padStart(2, \"0\")}:${rest}` : `${m}:${rest}`;\n}\n\n/** Clamps `value` between `min` and `max`. */\nexport const clamp = (value: number, min: number, max: number) => Math.min(max, Math.max(min, value));\n\nconst REDUCE = \"(prefers-reduced-motion: reduce)\";\nconst subscribeReduce = (notify: () => void) => {\n if (typeof window === \"undefined\" || !window.matchMedia) return () => undefined;\n const query = window.matchMedia(REDUCE);\n query.addEventListener?.(\"change\", notify);\n return () => query.removeEventListener?.(\"change\", notify);\n};\n\n/** `true` when the person asked for less motion (`prefers-reduced-motion: reduce`); follows a change of the setting. */\nexport function usePrefersReducedMotion(): boolean {\n return React.useSyncExternalStore(\n subscribeReduce,\n () => (typeof window !== \"undefined\" && window.matchMedia ? window.matchMedia(REDUCE).matches : false),\n () => false,\n );\n}\n\n/** The latest value of a callback, for an effect or an event that must not re-subscribe when it changes. */\nexport function useLatest<T>(value: T) {\n const ref = React.useRef(value);\n React.useLayoutEffect(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/** Calls `onChange(visible)` when at least `threshold` of the element enters or leaves the viewport. */\nexport function useInView(ref: React.RefObject<Element | null>, onChange: (visible: boolean) => void, enabled = true, threshold = 0.25) {\n const latest = useLatest(onChange);\n React.useEffect(() => {\n const element = ref.current;\n if (!enabled || !element || typeof IntersectionObserver === \"undefined\") return;\n const observer = new IntersectionObserver(([entry]) => entry && latest.current(entry.isIntersecting), { threshold });\n observer.observe(element);\n return () => observer.disconnect();\n }, [ref, enabled, threshold, latest]);\n}\n\n/** A value controlled by a prop when it is given, held inside otherwise; `set` calls `onChange` either way. */\nexport function useControllable<T>(value: T | undefined, defaultValue: T, onChange?: (next: T) => void) {\n const [inner, setInner] = React.useState(defaultValue);\n const controlled = value !== undefined;\n const current = controlled ? value : inner;\n const set = React.useCallback(\n (next: T) => {\n if (!controlled) setInner(next);\n onChange?.(next);\n },\n [controlled, onChange],\n );\n return [current, set] as const;\n}\n\n/** Starts a media element without an unhandled rejection (autoplay refused, the source replaced meanwhile). */\nexport function playSafely(media: HTMLMediaElement | null | undefined) {\n try {\n const started = media?.play() as Promise<void> | undefined;\n started?.catch?.(() => undefined);\n } catch {\n // Not playable here (no media support): the controls stay as they are.\n }\n}\n","// The bars of a waveform, shared by AudioPlayer (the seekable one) and Waveform (the decorative one). Pure: no React.\n\n/** Resamples peaks to `count` bars (the maximum of each slice), normalised to the loudest. No peaks: a flat line at 15 %. */\nexport function resamplePeaks(peaks: readonly number[], count: number): number[] {\n if (peaks.length === 0) return Array.from({ length: count }, () => 0.15);\n const out = Array.from({ length: count }, (_, i) => {\n const from = Math.floor((i / count) * peaks.length);\n const to = Math.max(from + 1, Math.floor(((i + 1) / count) * peaks.length));\n return Math.max(...peaks.slice(from, to).map(Math.abs));\n });\n const loudest = Math.max(...out, 0.0001);\n return out.map((v) => Math.max(0.08, v / loudest));\n}\n"],"mappings":";AAGA,YAAYA,YAAW;AACvB,SAAS,UAAU;;;ACFnB,YAAY,WAAW;AAgChB,SAAS,UAAa,OAAU;AACrC,QAAM,MAAY,aAAO,KAAK;AAC9B,EAAM,sBAAgB,MAAM;AAC1B,QAAI,UAAU;AAAA,EAChB,CAAC;AACD,SAAO;AACT;AAGO,SAAS,UAAU,KAAsC,UAAsC,UAAU,MAAM,YAAY,MAAM;AACtI,QAAM,SAAS,UAAU,QAAQ;AACjC,EAAM,gBAAU,MAAM;AACpB,UAAM,UAAU,IAAI;AACpB,QAAI,CAAC,WAAW,CAAC,WAAW,OAAO,yBAAyB,YAAa;AACzE,UAAM,WAAW,IAAI,qBAAqB,CAAC,CAAC,KAAK,MAAM,SAAS,OAAO,QAAQ,MAAM,cAAc,GAAG,EAAE,UAAU,CAAC;AACnH,aAAS,QAAQ,OAAO;AACxB,WAAO,MAAM,SAAS,WAAW;AAAA,EACnC,GAAG,CAAC,KAAK,SAAS,WAAW,MAAM,CAAC;AACtC;;;ACjDO,SAAS,cAAc,OAA0B,OAAyB;AAC/E,MAAI,MAAM,WAAW,EAAG,QAAO,MAAM,KAAK,EAAE,QAAQ,MAAM,GAAG,MAAM,IAAI;AACvE,QAAM,MAAM,MAAM,KAAK,EAAE,QAAQ,MAAM,GAAG,CAAC,GAAG,MAAM;AAClD,UAAM,OAAO,KAAK,MAAO,IAAI,QAAS,MAAM,MAAM;AAClD,UAAM,KAAK,KAAK,IAAI,OAAO,GAAG,KAAK,OAAQ,IAAI,KAAK,QAAS,MAAM,MAAM,CAAC;AAC1E,WAAO,KAAK,IAAI,GAAG,MAAM,MAAM,MAAM,EAAE,EAAE,IAAI,KAAK,GAAG,CAAC;AAAA,EACxD,CAAC;AACD,QAAM,UAAU,KAAK,IAAI,GAAG,KAAK,IAAM;AACvC,SAAO,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,MAAM,IAAI,OAAO,CAAC;AACnD;;;AFkDI,mBACE,KADF;AArDG,IAAM,WAAW,GAAG;AAAA,EACzB,OAAO;AAAA,IACL,MAAM;AAAA,IACN,KAAK;AAAA,EACP;AAAA,EACA,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI,EAAE,MAAM,MAAM;AAAA,MAClB,IAAI,EAAE,MAAM,OAAO;AAAA,MACnB,IAAI,EAAE,MAAM,OAAO;AAAA,IACrB;AAAA,IACA,MAAM;AAAA,MACJ,QAAQ,EAAE,KAAK,YAAY;AAAA,MAC3B,SAAS,EAAE,KAAK,mBAAmB;AAAA,IACrC;AAAA,EACF;AAAA,EACA,iBAAiB,EAAE,MAAM,MAAM,MAAM,SAAS;AAChD,CAAC;AAID,IAAM,SACJ;AAsBK,SAAS,SAAS,EAAE,OAAO,OAAO,IAAI,MAAM,MAAM,UAAU,OAAO,OAAO,UAAU,GAAkB;AAC3G,QAAM,IAAI,SAAS,EAAE,MAAM,KAAK,CAAC;AACjC,QAAM,OAAa,cAAuB,IAAI;AAC9C,QAAM,CAAC,SAAS,UAAU,IAAU,gBAAS,IAAI;AACjD,YAAU,MAAM,YAAY,OAAO;AACnC,QAAM,QAAc,eAAQ,MAAM,cAAc,SAAS,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC;AACjF,QAAM,WAAW,UAAU;AAE3B,SACE,iCACE;AAAA,wBAAC,WAAO,kBAAO;AAAA,IACf;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,WAAW,EAAE,KAAK,EAAE,WAAW,CAAC,WAAW,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAAE,CAAC;AAAA,QACjF,gBAAc,WAAW;AAAA,QACzB,eAAa,WAAW,CAAC,UAAU,KAAK;AAAA,QACxC,MAAM,WAAW,QAAQ;AAAA,QACzB,cAAY;AAAA,QACZ,eAAa,WAAW,SAAY;AAAA,QAEnC,gBAAM,IAAI,CAAC,MAAM,MAChB;AAAA,UAAC;AAAA;AAAA,YAEC,YAAQ;AAAA,YACR,eAAW;AAAA,YACX,WAAW,EAAE,IAAI;AAAA,YACjB,OAAO,EAAE,QAAQ,GAAG,KAAK,MAAM,OAAO,GAAG,CAAC,KAAK,mBAAmB,GAAG,EAAG,IAAI,IAAK,MAAM,IAAI,IAAI;AAAA;AAAA,UAJ1F;AAAA,QAKP,CACD;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;","names":["React"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krizaka/ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.23.0",
|
|
4
4
|
"description": "The Krizaka front-end platform's components: the primitives (button, card, dialog, toast, menu, field, tabs, chip, switch, slider, command palette, theme, countdown…) on the semantic --kz-* tokens, the animated marks (Krizaka, Orazaka, Orochia, Yasakia, Yororis) and the motion signature — web and /native.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"krizaka",
|
|
@@ -97,6 +97,10 @@
|
|
|
97
97
|
"types": "./dist/theme.d.ts",
|
|
98
98
|
"import": "./dist/theme.js"
|
|
99
99
|
},
|
|
100
|
+
"./captcha": {
|
|
101
|
+
"types": "./dist/captcha.d.ts",
|
|
102
|
+
"import": "./dist/captcha.js"
|
|
103
|
+
},
|
|
100
104
|
"./countdown": {
|
|
101
105
|
"types": "./dist/countdown.d.ts",
|
|
102
106
|
"import": "./dist/countdown.js"
|
|
@@ -189,6 +193,10 @@
|
|
|
189
193
|
"types": "./dist/progress.d.ts",
|
|
190
194
|
"import": "./dist/progress.js"
|
|
191
195
|
},
|
|
196
|
+
"./waveform": {
|
|
197
|
+
"types": "./dist/waveform.d.ts",
|
|
198
|
+
"import": "./dist/waveform.js"
|
|
199
|
+
},
|
|
192
200
|
"./section-backdrop": {
|
|
193
201
|
"types": "./dist/section-backdrop.d.ts",
|
|
194
202
|
"import": "./dist/section-backdrop.js"
|
|
@@ -241,6 +249,14 @@
|
|
|
241
249
|
"types": "./dist/marquee.d.ts",
|
|
242
250
|
"import": "./dist/marquee.js"
|
|
243
251
|
},
|
|
252
|
+
"./comparison-table": {
|
|
253
|
+
"types": "./dist/comparison-table.d.ts",
|
|
254
|
+
"import": "./dist/comparison-table.js"
|
|
255
|
+
},
|
|
256
|
+
"./step-showcase": {
|
|
257
|
+
"types": "./dist/step-showcase.d.ts",
|
|
258
|
+
"import": "./dist/step-showcase.js"
|
|
259
|
+
},
|
|
244
260
|
"./showcase": {
|
|
245
261
|
"types": "./dist/showcase.d.ts",
|
|
246
262
|
"import": "./dist/showcase.js"
|
|
@@ -261,6 +277,10 @@
|
|
|
261
277
|
"types": "./dist/data-table.d.ts",
|
|
262
278
|
"import": "./dist/data-table.js"
|
|
263
279
|
},
|
|
280
|
+
"./genui": {
|
|
281
|
+
"types": "./dist/genui.d.ts",
|
|
282
|
+
"import": "./dist/genui.js"
|
|
283
|
+
},
|
|
264
284
|
"./virtual": {
|
|
265
285
|
"types": "./dist/virtual.d.ts",
|
|
266
286
|
"import": "./dist/virtual.js"
|
|
@@ -345,6 +365,18 @@
|
|
|
345
365
|
"types": "./dist/description-list.d.ts",
|
|
346
366
|
"import": "./dist/description-list.js"
|
|
347
367
|
},
|
|
368
|
+
"./meta-row": {
|
|
369
|
+
"types": "./dist/meta-row.d.ts",
|
|
370
|
+
"import": "./dist/meta-row.js"
|
|
371
|
+
},
|
|
372
|
+
"./app-header": {
|
|
373
|
+
"types": "./dist/app-header.d.ts",
|
|
374
|
+
"import": "./dist/app-header.js"
|
|
375
|
+
},
|
|
376
|
+
"./rail-nav": {
|
|
377
|
+
"types": "./dist/rail-nav.d.ts",
|
|
378
|
+
"import": "./dist/rail-nav.js"
|
|
379
|
+
},
|
|
348
380
|
"./activity-feed": {
|
|
349
381
|
"types": "./dist/activity-feed.d.ts",
|
|
350
382
|
"import": "./dist/activity-feed.js"
|
|
@@ -437,6 +469,10 @@
|
|
|
437
469
|
"types": "./dist/docs-layout.d.ts",
|
|
438
470
|
"import": "./dist/docs-layout.js"
|
|
439
471
|
},
|
|
472
|
+
"./docs-nav": {
|
|
473
|
+
"types": "./dist/docs-nav.d.ts",
|
|
474
|
+
"import": "./dist/docs-nav.js"
|
|
475
|
+
},
|
|
440
476
|
"./scroll-stage": {
|
|
441
477
|
"types": "./dist/scroll-stage.d.ts",
|
|
442
478
|
"import": "./dist/scroll-stage.js"
|
|
@@ -641,7 +677,7 @@
|
|
|
641
677
|
],
|
|
642
678
|
"peerDependencies": {
|
|
643
679
|
"@krizaka/query": ">=0.2.1",
|
|
644
|
-
"@krizaka/tailwind": ">=3.
|
|
680
|
+
"@krizaka/tailwind": ">=3.23.0",
|
|
645
681
|
"@maplibre/maplibre-react-native": ">=11",
|
|
646
682
|
"@shopify/flash-list": ">=2",
|
|
647
683
|
"expo-camera": ">=16",
|
|
@@ -764,7 +800,7 @@
|
|
|
764
800
|
{
|
|
765
801
|
"name": "./native (bundled into the app by Metro, never downloaded: a regression guard, not a budget)",
|
|
766
802
|
"path": "dist/native.js",
|
|
767
|
-
"limit": "
|
|
803
|
+
"limit": "59 kB",
|
|
768
804
|
"gzip": true
|
|
769
805
|
},
|
|
770
806
|
{
|
|
@@ -823,6 +859,16 @@
|
|
|
823
859
|
"clsx"
|
|
824
860
|
]
|
|
825
861
|
},
|
|
862
|
+
{
|
|
863
|
+
"name": "./captcha",
|
|
864
|
+
"path": "dist/captcha.js",
|
|
865
|
+
"limit": "5 kB",
|
|
866
|
+
"gzip": true,
|
|
867
|
+
"ignore": [
|
|
868
|
+
"tailwind-variants",
|
|
869
|
+
"clsx"
|
|
870
|
+
]
|
|
871
|
+
},
|
|
826
872
|
{
|
|
827
873
|
"name": "./countdown",
|
|
828
874
|
"path": "dist/countdown.js",
|
|
@@ -886,7 +932,7 @@
|
|
|
886
932
|
{
|
|
887
933
|
"name": "./dialog",
|
|
888
934
|
"path": "dist/dialog.js",
|
|
889
|
-
"limit": "16.
|
|
935
|
+
"limit": "16.6 kB",
|
|
890
936
|
"gzip": true,
|
|
891
937
|
"ignore": [
|
|
892
938
|
"tailwind-variants",
|
|
@@ -1109,6 +1155,16 @@
|
|
|
1109
1155
|
"clsx"
|
|
1110
1156
|
]
|
|
1111
1157
|
},
|
|
1158
|
+
{
|
|
1159
|
+
"name": "./waveform",
|
|
1160
|
+
"path": "dist/waveform.js",
|
|
1161
|
+
"limit": "1.5 kB",
|
|
1162
|
+
"gzip": true,
|
|
1163
|
+
"ignore": [
|
|
1164
|
+
"tailwind-variants",
|
|
1165
|
+
"clsx"
|
|
1166
|
+
]
|
|
1167
|
+
},
|
|
1112
1168
|
{
|
|
1113
1169
|
"name": "./iso (a hero costs no client JavaScript: server components, static SVG)",
|
|
1114
1170
|
"path": "dist/iso.js",
|
|
@@ -1152,7 +1208,7 @@
|
|
|
1152
1208
|
{
|
|
1153
1209
|
"name": "./site-footer (the family's marks, still)",
|
|
1154
1210
|
"path": "dist/site-footer.js",
|
|
1155
|
-
"limit": "
|
|
1211
|
+
"limit": "11 kB",
|
|
1156
1212
|
"gzip": true,
|
|
1157
1213
|
"ignore": [
|
|
1158
1214
|
"tailwind-variants",
|
|
@@ -1205,6 +1261,26 @@
|
|
|
1205
1261
|
"clsx"
|
|
1206
1262
|
]
|
|
1207
1263
|
},
|
|
1264
|
+
{
|
|
1265
|
+
"name": "./comparison-table",
|
|
1266
|
+
"path": "dist/comparison-table.js",
|
|
1267
|
+
"limit": "2 kB",
|
|
1268
|
+
"gzip": true,
|
|
1269
|
+
"ignore": [
|
|
1270
|
+
"tailwind-variants",
|
|
1271
|
+
"clsx"
|
|
1272
|
+
]
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
"name": "./step-showcase",
|
|
1276
|
+
"path": "dist/step-showcase.js",
|
|
1277
|
+
"limit": "3.2 kB",
|
|
1278
|
+
"gzip": true,
|
|
1279
|
+
"ignore": [
|
|
1280
|
+
"tailwind-variants",
|
|
1281
|
+
"clsx"
|
|
1282
|
+
]
|
|
1283
|
+
},
|
|
1208
1284
|
{
|
|
1209
1285
|
"name": "./showcase",
|
|
1210
1286
|
"path": "dist/showcase.js",
|
|
@@ -1457,6 +1533,37 @@
|
|
|
1457
1533
|
"clsx"
|
|
1458
1534
|
]
|
|
1459
1535
|
},
|
|
1536
|
+
{
|
|
1537
|
+
"name": "./meta-row",
|
|
1538
|
+
"path": "dist/meta-row.js",
|
|
1539
|
+
"limit": "1 kB",
|
|
1540
|
+
"gzip": true,
|
|
1541
|
+
"ignore": [
|
|
1542
|
+
"tailwind-variants",
|
|
1543
|
+
"clsx"
|
|
1544
|
+
]
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
"name": "./app-header",
|
|
1548
|
+
"path": "dist/app-header.js",
|
|
1549
|
+
"limit": "1 kB",
|
|
1550
|
+
"gzip": true,
|
|
1551
|
+
"ignore": [
|
|
1552
|
+
"tailwind-variants",
|
|
1553
|
+
"clsx"
|
|
1554
|
+
]
|
|
1555
|
+
},
|
|
1556
|
+
{
|
|
1557
|
+
"name": "./rail-nav",
|
|
1558
|
+
"path": "dist/rail-nav.js",
|
|
1559
|
+
"limit": "3 kB",
|
|
1560
|
+
"gzip": true,
|
|
1561
|
+
"ignore": [
|
|
1562
|
+
"tailwind-variants",
|
|
1563
|
+
"clsx",
|
|
1564
|
+
"radix-ui"
|
|
1565
|
+
]
|
|
1566
|
+
},
|
|
1460
1567
|
{
|
|
1461
1568
|
"name": "./activity-feed",
|
|
1462
1569
|
"path": "dist/activity-feed.js",
|
|
@@ -1589,7 +1696,7 @@
|
|
|
1589
1696
|
{
|
|
1590
1697
|
"name": "./link-card",
|
|
1591
1698
|
"path": "dist/link-card.js",
|
|
1592
|
-
"limit": "1 kB",
|
|
1699
|
+
"limit": "1.25 kB",
|
|
1593
1700
|
"gzip": true,
|
|
1594
1701
|
"ignore": [
|
|
1595
1702
|
"tailwind-variants",
|
|
@@ -1685,7 +1792,7 @@
|
|
|
1685
1792
|
{
|
|
1686
1793
|
"name": "./app-shell",
|
|
1687
1794
|
"path": "dist/app-shell.js",
|
|
1688
|
-
"limit": "
|
|
1795
|
+
"limit": "18 kB",
|
|
1689
1796
|
"gzip": true,
|
|
1690
1797
|
"ignore": [
|
|
1691
1798
|
"tailwind-variants",
|
|
@@ -1705,7 +1812,7 @@
|
|
|
1705
1812
|
{
|
|
1706
1813
|
"name": "./settings-layout",
|
|
1707
1814
|
"path": "dist/settings-layout.js",
|
|
1708
|
-
"limit": "1.
|
|
1815
|
+
"limit": "1.5 kB",
|
|
1709
1816
|
"gzip": true,
|
|
1710
1817
|
"ignore": [
|
|
1711
1818
|
"tailwind-variants",
|
|
@@ -1762,6 +1869,16 @@
|
|
|
1762
1869
|
"clsx"
|
|
1763
1870
|
]
|
|
1764
1871
|
},
|
|
1872
|
+
{
|
|
1873
|
+
"name": "./docs-nav",
|
|
1874
|
+
"path": "dist/docs-nav.js",
|
|
1875
|
+
"limit": "1.2 kB",
|
|
1876
|
+
"gzip": true,
|
|
1877
|
+
"ignore": [
|
|
1878
|
+
"tailwind-variants",
|
|
1879
|
+
"clsx"
|
|
1880
|
+
]
|
|
1881
|
+
},
|
|
1765
1882
|
{
|
|
1766
1883
|
"name": "./scroll-stage",
|
|
1767
1884
|
"path": "dist/scroll-stage.js",
|
|
@@ -1954,7 +2071,7 @@
|
|
|
1954
2071
|
{
|
|
1955
2072
|
"name": "./changelog-page",
|
|
1956
2073
|
"path": "dist/changelog-page.js",
|
|
1957
|
-
"limit": "
|
|
2074
|
+
"limit": "2.4 kB",
|
|
1958
2075
|
"gzip": true,
|
|
1959
2076
|
"ignore": [
|
|
1960
2077
|
"tailwind-variants",
|
|
@@ -2168,6 +2285,17 @@
|
|
|
2168
2285
|
"tailwind-variants",
|
|
2169
2286
|
"clsx"
|
|
2170
2287
|
]
|
|
2288
|
+
},
|
|
2289
|
+
{
|
|
2290
|
+
"name": "./genui: GenUiStream (A2UI v0.9 validator, store, surface, base catalog with DataTable)",
|
|
2291
|
+
"path": "dist/genui.js",
|
|
2292
|
+
"import": "{ GenUiStream, baseGenUiCatalog }",
|
|
2293
|
+
"limit": "50 kB",
|
|
2294
|
+
"gzip": true,
|
|
2295
|
+
"ignore": [
|
|
2296
|
+
"tailwind-variants",
|
|
2297
|
+
"clsx"
|
|
2298
|
+
]
|
|
2171
2299
|
}
|
|
2172
2300
|
],
|
|
2173
2301
|
"dependencies": {
|
|
@@ -2186,7 +2314,7 @@
|
|
|
2186
2314
|
"tailwind-variants": "^3.3.1",
|
|
2187
2315
|
"@krizaka/intl": "^0.2.1",
|
|
2188
2316
|
"@krizaka/pacer": "^0.1.0",
|
|
2189
|
-
"@krizaka/tokens": "^3.
|
|
2317
|
+
"@krizaka/tokens": "^3.23.0"
|
|
2190
2318
|
},
|
|
2191
2319
|
"scripts": {
|
|
2192
2320
|
"build": "node -e \"const fs=require('node:fs');fs.rmSync('dist',{recursive:true,force:true});for(const f of fs.readdirSync('registry/examples',{recursive:true}))if(/\\.(js|d\\.ts)$/.test(f))fs.rmSync('registry/examples/'+f)\" && tsup && node -e \"require('node:fs').copyFileSync('src/motion.css','dist/motion.css');require('node:fs').copyFileSync('src/blocks.css','dist/blocks.css');require('node:fs').copyFileSync('src/story.css','dist/story.css')\" && node scripts/build-registry.mjs",
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
},
|
|
209
209
|
{
|
|
210
210
|
"path": "meta.ts",
|
|
211
|
-
"content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which ui.krizaka.com (apps/site) renders as\n// ui.krizaka.com/components/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"achievement\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"radio-group\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
|
|
211
|
+
"content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which ui.krizaka.com (apps/site) renders as\n// ui.krizaka.com/components/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"achievement\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"captcha\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"docs-nav\"\n | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"meta-row\"\n | \"waveform\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"radio-group\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
"path": "story-variant.ts",
|