@krizaka/ui 4.7.0 → 4.8.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-D3tpDLE4.d.ts → RotatingWord-CkDcPH9x.d.ts} +2 -2
- package/dist/account-menu.js +2 -2
- package/dist/account-menu.js.map +1 -1
- package/dist/account-settings.d.ts +9 -9
- package/dist/account-settings.js +4 -4
- package/dist/account-settings.js.map +1 -1
- package/dist/achievement.d.ts +3 -3
- package/dist/achievement.js +1 -1
- package/dist/achievement.js.map +1 -1
- package/dist/action-bar.d.ts +1 -1
- package/dist/action-bar.js +5 -5
- package/dist/action-bar.js.map +1 -1
- package/dist/activity-feed.d.ts +2 -2
- package/dist/activity-feed.js +1 -1
- package/dist/activity-feed.js.map +1 -1
- package/dist/alert.d.ts +1 -1
- package/dist/alert.js.map +1 -1
- package/dist/analysis-report.d.ts +1 -1
- package/dist/analysis-report.js +4 -4
- package/dist/analysis-report.js.map +1 -1
- package/dist/anatomy-plate.d.ts +1 -1
- package/dist/anatomy-plate.js +1 -1
- package/dist/anatomy-plate.js.map +1 -1
- package/dist/app-header/search.d.ts +1 -1
- package/dist/app-header/search.js +2 -2
- package/dist/app-header/search.js.map +1 -1
- package/dist/app-header.d.ts +2 -2
- package/dist/app-header.js.map +1 -1
- package/dist/app-shell.d.ts +8 -8
- package/dist/app-shell.js +4 -4
- package/dist/app-shell.js.map +1 -1
- package/dist/architecture-diagram.d.ts +1 -1
- package/dist/architecture-diagram.js.map +1 -1
- package/dist/argument-card.d.ts +2 -2
- package/dist/argument-card.js +6 -6
- package/dist/argument-card.js.map +1 -1
- package/dist/auth-layout.d.ts +1 -1
- package/dist/auth-layout.js.map +1 -1
- package/dist/avatar.d.ts +2 -2
- package/dist/avatar.js.map +1 -1
- package/dist/badge.d.ts +1 -1
- package/dist/badge.js +1 -1
- package/dist/bird-plate.d.ts +1 -1
- package/dist/bird-plate.js +2 -2
- package/dist/bird-plate.js.map +1 -1
- package/dist/button/text-link.d.ts +8 -0
- package/dist/button/text-link.js +6 -0
- package/dist/button/text-link.js.map +1 -0
- package/dist/button.d.ts +2 -2
- package/dist/button.js +3 -3
- package/dist/captcha.d.ts +2 -2
- package/dist/captcha.js +3 -3
- package/dist/captcha.js.map +1 -1
- package/dist/card-grid.d.ts +1 -1
- package/dist/card-grid.js +1 -1
- package/dist/card-grid.js.map +1 -1
- package/dist/card.d.ts +9 -9
- package/dist/card.js +1 -1
- package/dist/card.js.map +1 -1
- package/dist/catalogue-page.d.ts +2 -2
- package/dist/catalogue-page.js.map +1 -1
- package/dist/changelog-page.d.ts +1 -1
- package/dist/changelog-page.js +2 -2
- package/dist/changelog-page.js.map +1 -1
- package/dist/chapter.d.ts +3 -3
- package/dist/chapter.js +2 -2
- package/dist/chapter.js.map +1 -1
- package/dist/chat.d.ts +3 -3
- package/dist/chat.js +1 -1
- package/dist/chat.js.map +1 -1
- package/dist/checkbox.d.ts +1 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/chip-link.d.ts +1 -1
- package/dist/chip-link.js +1 -1
- package/dist/chip-row.d.ts +2 -2
- package/dist/chip-row.js +1 -1
- package/dist/chip-row.js.map +1 -1
- package/dist/chip.d.ts +4 -5
- package/dist/chip.js +2 -2
- package/dist/choice-grid.d.ts +1 -1
- package/dist/choice-grid.js +2 -2
- package/dist/choice-grid.js.map +1 -1
- package/dist/{chunk-S6NYGOJT.js → chunk-22IORLB5.js} +1 -1
- package/dist/chunk-22IORLB5.js.map +1 -0
- package/dist/{chunk-QA3WETWT.js → chunk-2P7Y3LNN.js} +1 -1
- package/dist/chunk-2P7Y3LNN.js.map +1 -0
- package/dist/{chunk-OGWB76BR.js → chunk-3CEMOJBL.js} +2 -2
- package/dist/chunk-3CEMOJBL.js.map +1 -0
- package/dist/{chunk-WC3SO4CE.js → chunk-3SWWUJJL.js} +2 -2
- package/dist/chunk-3SWWUJJL.js.map +1 -0
- package/dist/{chunk-S2O4NSN5.js → chunk-3TCHVNNB.js} +1 -1
- package/dist/chunk-3TCHVNNB.js.map +1 -0
- package/dist/{chunk-7P7I5OQV.js → chunk-5KBYZLU4.js} +2 -2
- package/dist/chunk-5KBYZLU4.js.map +1 -0
- package/dist/{chunk-WKQ5CB3I.js → chunk-6ARAO3TR.js} +1 -1
- package/dist/{chunk-WKQ5CB3I.js.map → chunk-6ARAO3TR.js.map} +1 -1
- package/dist/{chunk-QHVV2JGF.js → chunk-6LF6IZZM.js} +2 -2
- package/dist/chunk-6LF6IZZM.js.map +1 -0
- package/dist/{chunk-HP7BDMVK.js → chunk-7B5Q76JR.js} +2 -2
- package/dist/chunk-7B5Q76JR.js.map +1 -0
- package/dist/{chunk-F2UZ2WWL.js → chunk-7KIIAOQH.js} +1 -1
- package/dist/{chunk-F2UZ2WWL.js.map → chunk-7KIIAOQH.js.map} +1 -1
- package/dist/{chunk-ADRUEPYC.js → chunk-7MA3UODW.js} +2 -2
- package/dist/{chunk-ADRUEPYC.js.map → chunk-7MA3UODW.js.map} +1 -1
- package/dist/{chunk-KH3JOEPY.js → chunk-7PVLEALV.js} +1 -1
- package/dist/chunk-7PVLEALV.js.map +1 -0
- package/dist/{chunk-QVHSV6RA.js → chunk-7UBLUGNW.js} +1 -1
- package/dist/chunk-7UBLUGNW.js.map +1 -0
- package/dist/{chunk-YTYNKMNS.js → chunk-BKMHN4UA.js} +5 -5
- package/dist/chunk-BKMHN4UA.js.map +1 -0
- package/dist/{chunk-4QH6CP2Y.js → chunk-BRYRZWLV.js} +1 -1
- package/dist/{chunk-4QH6CP2Y.js.map → chunk-BRYRZWLV.js.map} +1 -1
- package/dist/{chunk-43PTCDTL.js → chunk-BVN7JFOP.js} +1 -1
- package/dist/chunk-BVN7JFOP.js.map +1 -0
- package/dist/{chunk-5RWHDX5J.js → chunk-BYKA3FHX.js} +2 -2
- package/dist/chunk-BYKA3FHX.js.map +1 -0
- package/dist/{chunk-5PFCELGW.js → chunk-DIOAQOR5.js} +1 -1
- package/dist/chunk-DIOAQOR5.js.map +1 -0
- package/dist/{chunk-HJFRHYCI.js → chunk-DTGRZXYO.js} +2 -2
- package/dist/{chunk-P7AFIKWG.js → chunk-DVC4YQI2.js} +2 -2
- package/dist/chunk-DVC4YQI2.js.map +1 -0
- package/dist/{chunk-V5RO6JYI.js → chunk-E3LFHTUV.js} +2 -2
- package/dist/chunk-E3LFHTUV.js.map +1 -0
- package/dist/{chunk-WEVYKZIF.js → chunk-EAXIDRMB.js} +1 -1
- package/dist/chunk-EAXIDRMB.js.map +1 -0
- package/dist/{chunk-WU4VLSEA.js → chunk-EYMS6VRF.js} +1 -1
- package/dist/chunk-EYMS6VRF.js.map +1 -0
- package/dist/{chunk-LH5J3VLZ.js → chunk-F7EJZV53.js} +1 -1
- package/dist/chunk-F7EJZV53.js.map +1 -0
- package/dist/{chunk-VPO27AFS.js → chunk-G3L7AKZJ.js} +1 -1
- package/dist/chunk-G3L7AKZJ.js.map +1 -0
- package/dist/{chunk-EB45EVPJ.js → chunk-G5NROYGK.js} +3 -3
- package/dist/chunk-G5NROYGK.js.map +1 -0
- package/dist/{chunk-HKEAYSFS.js → chunk-GQMINKT3.js} +1 -1
- package/dist/{chunk-ENOS6ETI.js.map → chunk-GQMINKT3.js.map} +1 -1
- package/dist/{chunk-3X3OF4TI.js → chunk-H4NXYAL7.js} +1 -1
- package/dist/{chunk-3X3OF4TI.js.map → chunk-H4NXYAL7.js.map} +1 -1
- package/dist/{chunk-KR2W4ONJ.js → chunk-H7I6YLI6.js} +1 -1
- package/dist/chunk-H7I6YLI6.js.map +1 -0
- package/dist/{chunk-PJNR4NTS.js → chunk-HC2TY45B.js} +4 -4
- package/dist/{chunk-NSLXEDIS.js → chunk-HHBTM4AU.js} +1 -1
- package/dist/chunk-HHBTM4AU.js.map +1 -0
- package/dist/{chunk-XVRKKYWU.js → chunk-HVUR3UNK.js} +2 -2
- package/dist/{chunk-XVRKKYWU.js.map → chunk-HVUR3UNK.js.map} +1 -1
- package/dist/{chunk-V7W4RLRW.js → chunk-HWIDTLLO.js} +3 -3
- package/dist/chunk-HWIDTLLO.js.map +1 -0
- package/dist/{chunk-W675RFOA.js → chunk-ISC2QBXJ.js} +1 -1
- package/dist/chunk-ISC2QBXJ.js.map +1 -0
- package/dist/{chunk-7DYZTEE3.js → chunk-IWPB6SSW.js} +1 -1
- package/dist/chunk-IWPB6SSW.js.map +1 -0
- package/dist/{chunk-TVLRE7S3.js → chunk-JDVWUF5W.js} +2 -2
- package/dist/{chunk-TVLRE7S3.js.map → chunk-JDVWUF5W.js.map} +1 -1
- package/dist/{chunk-757ZTGU5.js → chunk-JE2NY4XE.js} +4 -4
- package/dist/chunk-JE2NY4XE.js.map +1 -0
- package/dist/{chunk-HLEBSAGC.js → chunk-KBSZ6JRF.js} +2 -2
- package/dist/chunk-KBSZ6JRF.js.map +1 -0
- package/dist/{chunk-Y3P5B4XS.js → chunk-KCU45KQ3.js} +3 -3
- package/dist/chunk-KCU45KQ3.js.map +1 -0
- package/dist/{chunk-ST5P5HNI.js → chunk-L4YBG5US.js} +4 -4
- package/dist/{chunk-ST5P5HNI.js.map → chunk-L4YBG5US.js.map} +1 -1
- package/dist/{chunk-NG6G6V5E.js → chunk-LFH3LEWR.js} +1 -1
- package/dist/chunk-LFH3LEWR.js.map +1 -0
- package/dist/{chunk-YATTFMDV.js → chunk-LSQQSJ6J.js} +2 -2
- package/dist/{chunk-YATTFMDV.js.map → chunk-LSQQSJ6J.js.map} +1 -1
- package/dist/{chunk-LNAAWT4Y.js → chunk-MJWOZ3JI.js} +1 -1
- package/dist/chunk-MJWOZ3JI.js.map +1 -0
- package/dist/{chunk-KID32IRJ.js → chunk-MXHJMTZ5.js} +1 -1
- package/dist/{chunk-KID32IRJ.js.map → chunk-MXHJMTZ5.js.map} +1 -1
- package/dist/{chunk-GHAN7OOE.js → chunk-N6LAWI4F.js} +2 -2
- package/dist/chunk-N6LAWI4F.js.map +1 -0
- package/dist/{chunk-5VZ37TY3.js → chunk-NFJWD5BT.js} +2 -2
- package/dist/chunk-NFJWD5BT.js.map +1 -0
- package/dist/{chunk-ZPOVOEO3.js → chunk-NJLIHGU4.js} +2 -2
- package/dist/chunk-NJLIHGU4.js.map +1 -0
- package/dist/{chunk-PRD7JRQX.js → chunk-ONCQWOTH.js} +4 -4
- package/dist/{chunk-PRD7JRQX.js.map → chunk-ONCQWOTH.js.map} +1 -1
- package/dist/{chunk-ENOS6ETI.js → chunk-OZC6CDZF.js} +1 -1
- package/dist/{chunk-HKEAYSFS.js.map → chunk-OZC6CDZF.js.map} +1 -1
- package/dist/{chunk-TXFX4PMN.js → chunk-OZY4C4W5.js} +1 -1
- package/dist/{chunk-TXFX4PMN.js.map → chunk-OZY4C4W5.js.map} +1 -1
- package/dist/{chunk-NPMGYLJV.js → chunk-PIRYDEX2.js} +3 -3
- package/dist/chunk-PIRYDEX2.js.map +1 -0
- package/dist/{chunk-C57KK5VB.js → chunk-PM23USOC.js} +1 -1
- package/dist/chunk-PM23USOC.js.map +1 -0
- package/dist/{chunk-PGBF3UBX.js → chunk-QKL5TECH.js} +1 -1
- package/dist/chunk-QKL5TECH.js.map +1 -0
- package/dist/{chunk-Z47KIPCT.js → chunk-QY5JEUJT.js} +1 -1
- package/dist/chunk-QY5JEUJT.js.map +1 -0
- package/dist/{chunk-FVGFPB73.js → chunk-RPVKF4RR.js} +1 -1
- package/dist/{chunk-FVGFPB73.js.map → chunk-RPVKF4RR.js.map} +1 -1
- package/dist/{chunk-NM2DEHFZ.js → chunk-RXYKJIC4.js} +1 -1
- package/dist/chunk-RXYKJIC4.js.map +1 -0
- package/dist/{chunk-W64RAX4N.js → chunk-TKYNYIJS.js} +5 -5
- package/dist/chunk-TKYNYIJS.js.map +1 -0
- package/dist/{chunk-S4TLZRGZ.js → chunk-UMXWOA3I.js} +1 -1
- package/dist/chunk-UMXWOA3I.js.map +1 -0
- package/dist/{chunk-VA4NPCUQ.js → chunk-VD7QFUAP.js} +3 -3
- package/dist/chunk-VD7QFUAP.js.map +1 -0
- package/dist/{chunk-MDSP7DJR.js → chunk-VQELCPQJ.js} +5 -5
- package/dist/chunk-VQELCPQJ.js.map +1 -0
- package/dist/{chunk-2FCQCWIK.js → chunk-VXNBXW3P.js} +5 -5
- package/dist/chunk-VXNBXW3P.js.map +1 -0
- package/dist/{chunk-B47WSPMP.js → chunk-WPUDPH2Q.js} +1 -1
- package/dist/chunk-WPUDPH2Q.js.map +1 -0
- package/dist/{chunk-SG2RKUVJ.js → chunk-WTZUMVJI.js} +5 -5
- package/dist/chunk-WTZUMVJI.js.map +1 -0
- package/dist/{chunk-EDQLPCM4.js → chunk-WVZF6WK3.js} +2 -2
- package/dist/chunk-WVZF6WK3.js.map +1 -0
- package/dist/{chunk-5D7NMUF6.js → chunk-XDAETKWM.js} +2 -2
- package/dist/chunk-XDAETKWM.js.map +1 -0
- package/dist/{chunk-QD6SNXF5.js → chunk-XDWSGNL4.js} +3 -3
- package/dist/chunk-XDWSGNL4.js.map +1 -0
- package/dist/{chunk-SB5WSVPI.js → chunk-ZFH2BYXW.js} +2 -2
- package/dist/chunk-ZFH2BYXW.js.map +1 -0
- package/dist/{chunk-XVLWVTQA.js → chunk-ZI7K742O.js} +1 -1
- package/dist/{chunk-XVLWVTQA.js.map → chunk-ZI7K742O.js.map} +1 -1
- package/dist/{chunk-NQENOT6L.js → chunk-ZRRWSKV3.js} +8 -8
- package/dist/chunk-ZRRWSKV3.js.map +1 -0
- package/dist/cn.js +1 -1
- package/dist/code-block.d.ts +2 -2
- package/dist/code-block.js +2 -2
- package/dist/code-block.js.map +1 -1
- package/dist/collection-switcher.d.ts +1 -1
- package/dist/collection-switcher.js +1 -1
- package/dist/collection-switcher.js.map +1 -1
- package/dist/columns.d.ts +2 -2
- package/dist/columns.js.map +1 -1
- package/dist/combobox.js +4 -4
- package/dist/command.d.ts +10 -10
- package/dist/command.js +4 -4
- package/dist/command.js.map +1 -1
- package/dist/comparison-table.d.ts +1 -1
- package/dist/comparison-table.js +1 -1
- package/dist/comparison-table.js.map +1 -1
- package/dist/component-page.d.ts +1 -1
- package/dist/component-page.js.map +1 -1
- package/dist/confirm-button.d.ts +1 -1
- package/dist/confirm-button.js +4 -4
- package/dist/contact-page.d.ts +1 -1
- package/dist/contact-page.js.map +1 -1
- package/dist/continue-prompt.d.ts +1 -1
- package/dist/continue-prompt.js +1 -1
- package/dist/continue-prompt.js.map +1 -1
- package/dist/copy-button.d.ts +1 -1
- package/dist/copy-button.js +4 -4
- package/dist/copy-button.js.map +1 -1
- package/dist/countdown.d.ts +1 -1
- package/dist/countdown.js.map +1 -1
- package/dist/cover-hero.d.ts +1 -1
- package/dist/cover-hero.js +5 -5
- package/dist/cover-hero.js.map +1 -1
- package/dist/cta-panel.d.ts +1 -1
- package/dist/cta-panel.js +1 -1
- package/dist/cta-panel.js.map +1 -1
- package/dist/dashboard-layout.d.ts +2 -2
- package/dist/dashboard-layout.js.map +1 -1
- package/dist/data-table.d.ts +5 -5
- package/dist/data-table.js +9 -9
- package/dist/date-picker.d.ts +11 -11
- package/dist/date-picker.js +5 -5
- package/dist/date-picker.js.map +1 -1
- package/dist/decision-list.d.ts +1 -1
- package/dist/decision-list.js +2 -2
- package/dist/decision-list.js.map +1 -1
- package/dist/description-list.d.ts +2 -2
- package/dist/description-list.js.map +1 -1
- package/dist/detail-layout.d.ts +5 -5
- package/dist/detail-layout.js +1 -1
- package/dist/detail-layout.js.map +1 -1
- package/dist/{dialog-DpUwec2g.d.ts → dialog-CFnxFGyn.d.ts} +7 -7
- package/dist/dialog.d.ts +2 -2
- package/dist/dialog.js +4 -4
- package/dist/dialog.js.map +1 -1
- package/dist/docs-article-page.d.ts +1 -1
- package/dist/docs-article-page.js.map +1 -1
- package/dist/docs-hub-page.d.ts +1 -1
- package/dist/docs-hub-page.js.map +1 -1
- package/dist/docs-layout.d.ts +1 -1
- package/dist/docs-layout.js +1 -1
- package/dist/docs-layout.js.map +1 -1
- package/dist/docs-nav.d.ts +1 -1
- package/dist/docs-nav.js +1 -1
- package/dist/docs-nav.js.map +1 -1
- package/dist/document-viewer.d.ts +2 -2
- package/dist/document-viewer.js +3 -3
- package/dist/document-viewer.js.map +1 -1
- package/dist/doodle.d.ts +1 -1
- package/dist/doodle.js +1 -1
- package/dist/doodle.js.map +1 -1
- package/dist/drop-overlay.d.ts +1 -1
- package/dist/drop-overlay.js +1 -1
- package/dist/drop-overlay.js.map +1 -1
- package/dist/dropdown-menu.d.ts +8 -8
- package/dist/dropdown-menu.js +2 -2
- package/dist/embed-facade.js +1 -1
- package/dist/empty-state.d.ts +1 -1
- package/dist/empty-state.js.map +1 -1
- package/dist/engine-flow.d.ts +1 -1
- package/dist/engine-flow.js +1 -1
- package/dist/engine-flow.js.map +1 -1
- package/dist/entity-header.d.ts +1 -1
- package/dist/entity-header.js +1 -1
- package/dist/entity-header.js.map +1 -1
- package/dist/environment-notice.d.ts +1 -1
- package/dist/environment-notice.js.map +1 -1
- package/dist/error-page.d.ts +1 -1
- package/dist/error-page.js +1 -1
- package/dist/error-page.js.map +1 -1
- package/dist/field.d.ts +3 -3
- package/dist/field.js +1 -1
- package/dist/field.js.map +1 -1
- package/dist/file-upload.d.ts +1 -1
- package/dist/file-upload.js +1 -1
- package/dist/file-upload.js.map +1 -1
- package/dist/filter-bar.d.ts +2 -2
- package/dist/filter-bar.js +4 -4
- package/dist/flock.d.ts +1 -1
- package/dist/flock.js +2 -2
- package/dist/flock.js.map +1 -1
- package/dist/footnote.d.ts +3 -3
- package/dist/footnote.js +1 -1
- package/dist/footnote.js.map +1 -1
- package/dist/force-update-screen.d.ts +1 -1
- package/dist/force-update-screen.js +3 -3
- package/dist/force-update-screen.js.map +1 -1
- package/dist/form/server.js.map +1 -1
- package/dist/form.d.ts +12 -12
- package/dist/form.js +4 -4
- package/dist/form.js.map +1 -1
- package/dist/{frame-CmDztC_y.d.ts → frame-D5HU_cG8.d.ts} +2 -2
- package/dist/gallery-page.d.ts +1 -1
- package/dist/gallery-page.js +1 -1
- package/dist/gallery-page.js.map +1 -1
- package/dist/genui.d.ts +2 -2
- package/dist/genui.js +9 -9
- package/dist/genui.js.map +1 -1
- package/dist/glossary-term.js +2 -2
- package/dist/glow-card.d.ts +1 -1
- package/dist/glow-card.js +1 -1
- package/dist/glow-card.js.map +1 -1
- package/dist/goal-gauge.d.ts +1 -1
- package/dist/goal-gauge.js +1 -1
- package/dist/goal-gauge.js.map +1 -1
- package/dist/grade-stamp.d.ts +1 -1
- package/dist/grade-stamp.js +2 -2
- package/dist/grade-stamp.js.map +1 -1
- package/dist/identity-card.d.ts +1 -1
- package/dist/identity-card.js +5 -5
- package/dist/identity-card.js.map +1 -1
- package/dist/image-cropper.d.ts +1 -1
- package/dist/image-cropper.js +3 -3
- package/dist/image-cropper.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/kanban.d.ts +1 -1
- package/dist/kanban.js.map +1 -1
- package/dist/kbd.d.ts +1 -1
- package/dist/kbd.js.map +1 -1
- package/dist/kind-config-editor.js +8 -8
- package/dist/kind-config-editor.js.map +1 -1
- package/dist/kpi-explained.js +1 -1
- package/dist/kpi-explained.js.map +1 -1
- package/dist/landing-page.d.ts +1 -1
- package/dist/landing-page.js.map +1 -1
- package/dist/landscape.d.ts +1 -1
- package/dist/landscape.js +2 -2
- package/dist/landscape.js.map +1 -1
- package/dist/language-switch.d.ts +10 -10
- package/dist/language-switch.js +1 -1
- package/dist/legal-page.d.ts +1 -1
- package/dist/legal-page.js.map +1 -1
- package/dist/{lightbox-MRB2YZEP.js → lightbox-JLWASIJC.js} +4 -4
- package/dist/link-card.d.ts +1 -1
- package/dist/link-card.js +4 -4
- package/dist/list.d.ts +1 -1
- package/dist/list.js +2 -2
- package/dist/list.js.map +1 -1
- package/dist/loader.d.ts +2 -2
- package/dist/loader.js +1 -1
- package/dist/loader.js.map +1 -1
- package/dist/longform-page.d.ts +1 -1
- package/dist/longform-page.js +1 -1
- package/dist/longform-page.js.map +1 -1
- package/dist/maintenance-screen.d.ts +1 -1
- package/dist/maintenance-screen.js +3 -3
- package/dist/maintenance-screen.js.map +1 -1
- package/dist/map/cards.d.ts +2 -2
- package/dist/map/cards.js +1 -1
- package/dist/map/cards.js.map +1 -1
- package/dist/map/pin.js +1 -1
- package/dist/map/sheet.d.ts +1 -1
- package/dist/map/sheet.js +1 -1
- package/dist/map/sheet.js.map +1 -1
- package/dist/map.d.ts +11 -11
- package/dist/map.js +4 -4
- package/dist/map.js.map +1 -1
- package/dist/margin-layout.d.ts +2 -2
- package/dist/margin-layout.js.map +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.js.map +1 -1
- package/dist/marketing-layout.d.ts +1 -1
- package/dist/marketing-layout.js.map +1 -1
- package/dist/mascot-quote.d.ts +1 -1
- package/dist/mascot-quote.js +2 -2
- package/dist/mascot-quote.js.map +1 -1
- package/dist/mascot-state.d.ts +5 -5
- package/dist/mascot-state.js +1 -1
- package/dist/mascot-state.js.map +1 -1
- package/dist/mascots.d.ts +2 -2
- package/dist/mascots.js +2 -2
- package/dist/mascots.js.map +1 -1
- package/dist/match-dialog.d.ts +1 -1
- package/dist/match-dialog.js +4 -4
- package/dist/match-dialog.js.map +1 -1
- package/dist/media-capture.d.ts +1 -1
- package/dist/media-capture.js +1 -1
- package/dist/media-capture.js.map +1 -1
- package/dist/media-carousel.js +5 -5
- package/dist/media-carousel.js.map +1 -1
- package/dist/media-gallery.d.ts +1 -1
- package/dist/media-gallery.js +1 -1
- package/dist/media-gallery.js.map +1 -1
- package/dist/media-player.d.ts +1 -1
- package/dist/media-player.js +4 -4
- package/dist/meter.d.ts +2 -2
- package/dist/meter.js +1 -1
- package/dist/money-input.d.ts +1 -1
- package/dist/money-input.js +3 -3
- package/dist/motion.d.ts +1 -1
- package/dist/motion.js +1 -1
- package/dist/native/form.d.ts +12 -12
- package/dist/native/form.js +4 -4
- package/dist/native/form.js.map +1 -1
- package/dist/native/list.d.ts +1 -1
- package/dist/native/list.js.map +1 -1
- package/dist/native/map.d.ts +4 -4
- package/dist/native/map.js +2 -2
- package/dist/native/map.js.map +1 -1
- package/dist/native/markdown.js.map +1 -1
- package/dist/native/media-capture.d.ts +1 -1
- package/dist/native/media-capture.js.map +1 -1
- package/dist/native/media-picker.d.ts +1 -1
- package/dist/native/media-picker.js.map +1 -1
- package/dist/native/vertical-video.d.ts +2 -2
- package/dist/native/vertical-video.js.map +1 -1
- package/dist/native/video-player.d.ts +1 -1
- package/dist/native/video-player.js.map +1 -1
- package/dist/native.d.ts +95 -95
- package/dist/native.js +13 -13
- package/dist/native.js.map +1 -1
- package/dist/nav-bar.d.ts +13 -13
- package/dist/nav-bar.js +5 -5
- package/dist/nav-bar.js.map +1 -1
- package/dist/notification-preferences.js +3 -3
- package/dist/number-ticker.d.ts +1 -1
- package/dist/number-ticker.js +1 -1
- package/dist/number-ticker.js.map +1 -1
- package/dist/opening-hours.d.ts +1 -1
- package/dist/opening-hours.js +1 -1
- package/dist/opening-hours.js.map +1 -1
- package/dist/{page-DPHDmDAQ.d.ts → page-Ufnb5TrQ.d.ts} +5 -5
- package/dist/page-header.d.ts +1 -1
- package/dist/page-header.js.map +1 -1
- package/dist/page-hero.d.ts +1 -1
- package/dist/page-hero.js +5 -5
- package/dist/page-hero.js.map +1 -1
- package/dist/page-index.d.ts +1 -1
- package/dist/page-index.js +2 -2
- package/dist/page-index.js.map +1 -1
- package/dist/page.d.ts +1 -1
- package/dist/page.js +3 -3
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.js +1 -1
- package/dist/pagination.js.map +1 -1
- package/dist/pausable-loop.js +2 -2
- package/dist/platform-bar.d.ts +102 -0
- package/dist/platform-bar.js +42 -0
- package/dist/platform-bar.js.map +1 -0
- package/dist/{player-lightbox-BYQ57OXT.js → player-lightbox-SJR3GB7U.js} +5 -5
- package/dist/player-lightbox-SJR3GB7U.js.map +1 -0
- package/dist/pointer-light.d.ts +1 -1
- package/dist/pointer-light.js.map +1 -1
- package/dist/popover.d.ts +1 -1
- package/dist/popover.js +1 -1
- package/dist/popover.js.map +1 -1
- package/dist/price-catalogue-editor.js +8 -8
- package/dist/price-catalogue-editor.js.map +1 -1
- package/dist/pricing-page.d.ts +1 -1
- package/dist/pricing-page.js +1 -1
- package/dist/pricing-page.js.map +1 -1
- package/dist/product-page.d.ts +1 -1
- package/dist/product-page.js +1 -1
- package/dist/product-page.js.map +1 -1
- package/dist/profile-card.d.ts +3 -3
- package/dist/profile-card.js +1 -1
- package/dist/profile-card.js.map +1 -1
- package/dist/progress.d.ts +1 -1
- package/dist/progress.js.map +1 -1
- package/dist/promise-card.d.ts +1 -1
- package/dist/promise-card.js +1 -1
- package/dist/promise-card.js.map +1 -1
- package/dist/promo-code-field.js +4 -4
- package/dist/proposal.js +5 -5
- package/dist/qr-code.js +6 -6
- package/dist/qr-code.js.map +1 -1
- package/dist/quota-meter.d.ts +1 -1
- package/dist/quota-meter.js +1 -1
- package/dist/quota-meter.js.map +1 -1
- package/dist/radio-group.d.ts +5 -5
- package/dist/radio-group.js +3 -3
- package/dist/radio-group.js.map +1 -1
- package/dist/rail-nav.d.ts +4 -4
- package/dist/rail-nav.js +3 -3
- package/dist/rail-nav.js.map +1 -1
- package/dist/recipes.js +1 -1
- package/dist/recipes.js.map +1 -1
- package/dist/retro-tv-playlist.d.ts +1 -1
- package/dist/retro-tv-playlist.js.map +1 -1
- package/dist/retro-tv.js +6 -6
- package/dist/retro-tv.js.map +1 -1
- package/dist/reviews.js +3 -3
- package/dist/{schema-Dkn0uX72.d.ts → schema-Dd05m48Q.d.ts} +1 -1
- package/dist/schema-form.js +7 -7
- package/dist/schema-form.js.map +1 -1
- package/dist/scroll-stage.d.ts +2 -2
- package/dist/scroll-stage.js +2 -2
- package/dist/scroll-stage.js.map +1 -1
- package/dist/search-field.d.ts +1 -1
- package/dist/search-field.js +2 -2
- package/dist/section-backdrop.d.ts +1 -1
- package/dist/section-backdrop.js +1 -1
- package/dist/separator.d.ts +1 -1
- package/dist/separator.js.map +1 -1
- package/dist/service-card.d.ts +1 -1
- package/dist/service-card.js +6 -6
- package/dist/service-card.js.map +1 -1
- package/dist/settings-layout.d.ts +3 -3
- package/dist/settings-layout.js +2 -2
- package/dist/shop/booking.d.ts +1 -1
- package/dist/shop/booking.js +4 -4
- package/dist/shop/booking.js.map +1 -1
- package/dist/shop/bulletin.d.ts +1 -1
- package/dist/shop/bulletin.js +2 -2
- package/dist/shop/bulletin.js.map +1 -1
- package/dist/shop/faq.d.ts +1 -1
- package/dist/shop/faq.js +3 -3
- package/dist/shop/faq.js.map +1 -1
- package/dist/shop/gallery.d.ts +1 -1
- package/dist/shop/gallery.js +3 -3
- package/dist/shop/gallery.js.map +1 -1
- package/dist/shop/hero.d.ts +1 -1
- package/dist/shop/hero.js +2 -2
- package/dist/shop/hero.js.map +1 -1
- package/dist/shop/policies.d.ts +1 -1
- package/dist/shop/policies.js +2 -2
- package/dist/shop/policies.js.map +1 -1
- package/dist/shop/reviews.d.ts +1 -1
- package/dist/shop/reviews.js +2 -2
- package/dist/shop/reviews.js.map +1 -1
- package/dist/shop/services.d.ts +1 -1
- package/dist/shop/services.js +4 -4
- package/dist/shop/services.js.map +1 -1
- package/dist/shop/social.d.ts +1 -1
- package/dist/shop/social.js +2 -2
- package/dist/shop/social.js.map +1 -1
- package/dist/shop/story.d.ts +1 -1
- package/dist/shop/story.js +2 -2
- package/dist/shop/story.js.map +1 -1
- package/dist/shop/team.d.ts +1 -1
- package/dist/shop/team.js +2 -2
- package/dist/shop/team.js.map +1 -1
- package/dist/shop/video.d.ts +1 -1
- package/dist/shop/video.js +2 -2
- package/dist/shop/video.js.map +1 -1
- package/dist/shop/visit.d.ts +1 -1
- package/dist/shop/visit.js +2 -2
- package/dist/shop/visit.js.map +1 -1
- package/dist/shop-composer.js +2 -2
- package/dist/shop-composer.js.map +1 -1
- package/dist/shop-gallery.d.ts +1 -1
- package/dist/shop-gallery.js +2 -2
- package/dist/shop-gallery.js.map +1 -1
- package/dist/shop.d.ts +3 -3
- package/dist/shop.js +2 -2
- package/dist/showcase.d.ts +1 -1
- package/dist/showcase.js +6 -6
- package/dist/showcase.js.map +1 -1
- package/dist/signature.d.ts +1 -1
- package/dist/signature.js +2 -2
- package/dist/signature.js.map +1 -1
- package/dist/site-cahier.d.ts +8 -5
- package/dist/site-cahier.js +24 -10
- package/dist/site-cahier.js.map +1 -1
- package/dist/site-footer.d.ts +21 -6
- package/dist/site-footer.js +15 -1
- package/dist/site-footer.js.map +1 -1
- package/dist/skeleton.d.ts +3 -3
- package/dist/skeleton.js.map +1 -1
- package/dist/skip-link.d.ts +1 -1
- package/dist/skip-link.js +1 -1
- package/dist/slider.d.ts +1 -1
- package/dist/slider.js +2 -2
- package/dist/slider.js.map +1 -1
- package/dist/slot-picker.d.ts +1 -1
- package/dist/slot-picker.js +1 -1
- package/dist/slot-picker.js.map +1 -1
- package/dist/specimen-tag.d.ts +2 -2
- package/dist/specimen-tag.js +2 -2
- package/dist/speed-lines.d.ts +1 -1
- package/dist/speed-lines.js +1 -1
- package/dist/speed-lines.js.map +1 -1
- package/dist/spinner.d.ts +2 -2
- package/dist/spinner.js +1 -1
- package/dist/spinner.js.map +1 -1
- package/dist/split-view.d.ts +1 -1
- package/dist/split-view.js.map +1 -1
- package/dist/stage-banner.d.ts +1 -1
- package/dist/stage-banner.js +1 -1
- package/dist/stage-banner.js.map +1 -1
- package/dist/stat.d.ts +2 -2
- package/dist/stat.js +1 -1
- package/dist/status-chip.js +4 -4
- package/dist/status-chip.js.map +1 -1
- package/dist/status-page.d.ts +1 -1
- package/dist/status-page.js.map +1 -1
- package/dist/step-progress.d.ts +1 -1
- package/dist/step-progress.js.map +1 -1
- package/dist/step-showcase.d.ts +2 -2
- package/dist/step-showcase.js +3 -3
- package/dist/step-showcase.js.map +1 -1
- package/dist/stepper.d.ts +1 -1
- package/dist/stepper.js +1 -1
- package/dist/stepper.js.map +1 -1
- package/dist/sticky-action.d.ts +1 -1
- package/dist/sticky-action.js.map +1 -1
- package/dist/stuck.d.ts +1 -1
- package/dist/stuck.js +1 -1
- package/dist/stuck.js.map +1 -1
- package/dist/swipe-deck.d.ts +2 -2
- package/dist/swipe-deck.js.map +1 -1
- package/dist/switch.d.ts +1 -1
- package/dist/switch.js +1 -1
- package/dist/tabs.d.ts +6 -6
- package/dist/tabs.js +1 -1
- package/dist/tabs.js.map +1 -1
- package/dist/tag-input.d.ts +1 -1
- package/dist/tag-input.js +4 -4
- package/dist/tag-input.js.map +1 -1
- package/dist/tag-selector.d.ts +1 -1
- package/dist/tag-selector.js +3 -3
- package/dist/tag-selector.js.map +1 -1
- package/dist/taped-photo.d.ts +1 -1
- package/dist/taped-photo.js +2 -2
- package/dist/terminal-replay.d.ts +1 -1
- package/dist/terminal-replay.js +3 -3
- package/dist/terminal-replay.js.map +1 -1
- package/dist/text-style/server.d.ts +1 -1
- package/dist/text-style/server.js.map +1 -1
- package/dist/text-style.d.ts +2 -2
- package/dist/text-style.js.map +1 -1
- package/dist/theme.d.ts +3 -3
- package/dist/theme.js +3 -3
- package/dist/theme.js.map +1 -1
- package/dist/toast.d.ts +1 -1
- package/dist/toast.js +2 -2
- package/dist/toast.js.map +1 -1
- package/dist/toc.d.ts +2 -2
- package/dist/toc.js +1 -1
- package/dist/toc.js.map +1 -1
- package/dist/tooltip.d.ts +1 -1
- package/dist/tooltip.js +2 -2
- package/dist/tree-view.d.ts +1 -1
- package/dist/tree-view.js +2 -2
- package/dist/tree-view.js.map +1 -1
- package/dist/update-prompt.d.ts +1 -1
- package/dist/update-prompt.js +3 -3
- package/dist/update-prompt.js.map +1 -1
- package/dist/upload-queue.d.ts +2 -2
- package/dist/upload-queue.js +1 -1
- package/dist/upload-queue.js.map +1 -1
- package/dist/usage.d.ts +4 -4
- package/dist/usage.js +3 -3
- package/dist/usage.js.map +1 -1
- package/dist/verified-badge.d.ts +1 -1
- package/dist/verified-badge.js.map +1 -1
- package/dist/versus-card.d.ts +1 -1
- package/dist/versus-card.js +2 -2
- package/dist/versus-card.js.map +1 -1
- package/dist/vertical-video.d.ts +2 -2
- package/dist/vertical-video.js +6 -6
- package/dist/vertical-video.js.map +1 -1
- package/dist/video-player.d.ts +1 -1
- package/dist/video-player.js +5 -5
- package/dist/video-trimmer.d.ts +1 -1
- package/dist/video-trimmer.js.map +1 -1
- package/dist/virtual.d.ts +2 -2
- package/dist/virtual.js +1 -1
- package/dist/wall.js +2 -2
- package/dist/wall.js.map +1 -1
- package/dist/waveform.d.ts +1 -1
- package/dist/waveform.js.map +1 -1
- package/package.json +28 -8
- package/registry/account-menu.json +1 -1
- package/registry/account-settings.json +18 -18
- package/registry/achievement.json +2 -2
- package/registry/action-bar.json +4 -4
- package/registry/activity-feed.json +3 -3
- package/registry/agenda.json +1 -1
- package/registry/alert.json +2 -2
- package/registry/analysis-report.json +2 -2
- package/registry/anatomy-plate.json +2 -2
- package/registry/app-frame.json +7 -7
- package/registry/app-header.json +5 -5
- package/registry/app-shell.json +3 -3
- package/registry/architecture-diagram.json +2 -2
- package/registry/argument-card.json +4 -4
- package/registry/auth-layout.json +2 -2
- package/registry/avatar.json +4 -4
- package/registry/badge.json +2 -2
- package/registry/bird-plate.json +2 -2
- package/registry/button.json +6 -2
- package/registry/captcha.json +2 -2
- package/registry/card-grid.json +2 -2
- package/registry/card.json +2 -2
- package/registry/catalogue-page.json +2 -2
- package/registry/changelog-page.json +3 -3
- package/registry/chapter.json +3 -3
- package/registry/chat.json +2 -2
- package/registry/checkbox.json +2 -2
- package/registry/chip-link.json +2 -2
- package/registry/chip-row.json +2 -2
- package/registry/chip.json +3 -3
- package/registry/choice-grid.json +3 -3
- package/registry/cn.json +1 -1
- package/registry/code-block.json +3 -3
- package/registry/collection-switcher.json +3 -3
- package/registry/columns.json +2 -2
- package/registry/combobox.json +3 -3
- package/registry/command.json +2 -2
- package/registry/comparison-table.json +2 -2
- package/registry/component-page.json +2 -2
- package/registry/confirm-button.json +2 -2
- package/registry/contact-page.json +2 -2
- package/registry/continue-prompt.json +2 -2
- package/registry/copy-button.json +3 -3
- package/registry/countdown.json +2 -2
- package/registry/cover-hero.json +4 -4
- package/registry/cta-panel.json +2 -2
- package/registry/dashboard-layout.json +3 -3
- package/registry/data-table.json +5 -5
- package/registry/date-picker.json +9 -9
- package/registry/decision-list.json +3 -3
- package/registry/description-list.json +2 -2
- package/registry/desktop-window.json +1 -1
- package/registry/detail-layout.json +2 -2
- package/registry/dialog.json +3 -3
- package/registry/docs-article-page.json +2 -2
- package/registry/docs-hub-page.json +2 -2
- package/registry/docs-layout.json +3 -3
- package/registry/docs-nav.json +2 -2
- package/registry/document-viewer.json +3 -3
- package/registry/doodle.json +2 -2
- package/registry/drop-overlay.json +2 -2
- package/registry/dropdown-menu.json +2 -2
- package/registry/elephant.json +1 -1
- package/registry/embed-facade.json +1 -1
- package/registry/empty-state.json +2 -2
- package/registry/engine-flow.json +2 -2
- package/registry/entity-header.json +3 -3
- package/registry/environment-notice.json +2 -2
- package/registry/error-page.json +2 -2
- package/registry/examples/platform-bar/demo.d.ts +4 -0
- package/registry/examples/platform-bar/demo.js +24 -0
- package/registry/examples/platform-bar/demo.tsx +20 -0
- package/registry/examples/platform-bar/live.d.ts +4 -0
- package/registry/examples/platform-bar/live.js +22 -0
- package/registry/examples/platform-bar/live.tsx +22 -0
- package/registry/examples/site-footer/hosted.d.ts +4 -0
- package/registry/examples/site-footer/hosted.js +25 -0
- package/registry/examples/site-footer/hosted.tsx +23 -0
- package/registry/field.json +2 -2
- package/registry/file-upload.json +3 -3
- package/registry/filter-bar.json +5 -5
- package/registry/flock.json +2 -2
- package/registry/footnote.json +2 -2
- package/registry/force-update-screen.json +2 -2
- package/registry/form.json +65 -65
- package/registry/gallery-page.json +2 -2
- package/registry/genui.json +3 -3
- 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 -2
- package/registry/grade-stamp.json +2 -2
- package/registry/identity-card.json +2 -2
- package/registry/image-cropper.json +2 -2
- package/registry/index.json +40 -9
- package/registry/kanban.json +2 -2
- package/registry/kbd.json +2 -2
- package/registry/kind-config-editor.json +3 -3
- package/registry/kpi-explained.json +2 -2
- package/registry/landing-page.json +2 -2
- package/registry/landscape.json +2 -2
- package/registry/language-switch.json +2 -2
- package/registry/legal-page.json +2 -2
- package/registry/link-card.json +4 -4
- package/registry/list.json +3 -3
- package/registry/loader.json +2 -2
- package/registry/longform-page.json +2 -2
- package/registry/maintenance-screen.json +2 -2
- package/registry/map.json +8 -8
- package/registry/margin-layout.json +2 -2
- package/registry/markdown.json +2 -2
- package/registry/marketing-layout.json +2 -2
- package/registry/mascot-quote.json +2 -2
- package/registry/mascot-state.json +3 -3
- package/registry/mascots.json +4 -4
- package/registry/match-dialog.json +2 -2
- package/registry/media-capture.json +3 -3
- package/registry/media-gallery.json +5 -5
- package/registry/meter.json +2 -2
- package/registry/money-input.json +2 -2
- package/registry/nav-bar.json +9 -9
- package/registry/next-actions.json +1 -1
- package/registry/notification-preferences.json +1 -1
- package/registry/number-ticker.json +2 -2
- package/registry/opening-hours.json +3 -3
- package/registry/page-header.json +2 -2
- package/registry/page-hero.json +4 -4
- package/registry/page-index.json +3 -3
- package/registry/page.json +2 -2
- package/registry/pagination.json +3 -3
- package/registry/platform-bar.json +179 -0
- package/registry/pointer-light.json +2 -2
- package/registry/popover.json +2 -2
- package/registry/price-catalogue-editor.json +2 -2
- package/registry/pricing-page.json +3 -3
- package/registry/product-page.json +2 -2
- package/registry/profile-card.json +4 -4
- package/registry/progress.json +2 -2
- package/registry/promise-card.json +2 -2
- package/registry/promo-code-field.json +1 -1
- package/registry/proposal.json +1 -1
- package/registry/qr-code.json +3 -3
- package/registry/quota-meter.json +2 -2
- package/registry/radio-group.json +15 -15
- package/registry/rail-nav.json +9 -9
- package/registry/recipes.json +2 -2
- package/registry/retro-tv.json +4 -4
- package/registry/reviews.json +1 -1
- package/registry/router.json +1 -1
- package/registry/schema-form.json +2 -2
- package/registry/scroll-stage.json +2 -2
- package/registry/search-field.json +3 -3
- package/registry/section-backdrop.json +2 -2
- package/registry/separator.json +2 -2
- package/registry/service-card.json +4 -4
- package/registry/settings-layout.json +2 -2
- package/registry/shop-composer.json +4 -4
- package/registry/shop-gallery.json +2 -2
- package/registry/shop.json +18 -18
- package/registry/showcase.json +2 -2
- package/registry/signature.json +2 -2
- package/registry/site-cahier.json +3 -3
- package/registry/site-footer.json +57 -20
- package/registry/sites.json +1 -1
- package/registry/skeleton.json +2 -2
- package/registry/skip-link.json +2 -2
- package/registry/slider.json +2 -2
- package/registry/slot-picker.json +3 -3
- package/registry/slot.json +1 -1
- package/registry/specimen-tag.json +2 -2
- package/registry/speed-lines.json +2 -2
- package/registry/spinner.json +3 -3
- package/registry/split-view.json +2 -2
- package/registry/stage-banner.json +2 -2
- package/registry/stat.json +2 -2
- package/registry/status-chip.json +3 -3
- package/registry/status-page.json +2 -2
- package/registry/step-progress.json +2 -2
- package/registry/step-showcase.json +3 -3
- package/registry/stepper.json +2 -2
- package/registry/sticky-action.json +2 -2
- package/registry/stuck.json +2 -2
- package/registry/swipe-deck.json +2 -2
- package/registry/switch.json +2 -2
- package/registry/tabs.json +2 -2
- package/registry/tag-input.json +2 -2
- package/registry/tag-selector.json +2 -2
- package/registry/taped-photo.json +2 -2
- package/registry/terminal-replay.json +3 -3
- package/registry/text-style.json +9 -9
- package/registry/theme.json +2 -2
- package/registry/toast.json +2 -2
- package/registry/toc.json +2 -2
- package/registry/tooltip.json +2 -2
- package/registry/tree-view.json +3 -3
- package/registry/update-prompt.json +2 -2
- package/registry/upload-queue.json +2 -2
- package/registry/usage.json +3 -3
- package/registry/verified-badge.json +2 -2
- package/registry/versus-card.json +2 -2
- package/registry/vertical-video.json +3 -3
- package/registry/video-player.json +3 -3
- package/registry/video-trimmer.json +2 -2
- package/registry/virtual.json +4 -4
- package/registry/wall.json +2 -2
- package/registry/waveform.json +2 -2
- package/dist/chunk-2FCQCWIK.js.map +0 -1
- package/dist/chunk-43PTCDTL.js.map +0 -1
- package/dist/chunk-5D7NMUF6.js.map +0 -1
- package/dist/chunk-5PFCELGW.js.map +0 -1
- package/dist/chunk-5RWHDX5J.js.map +0 -1
- package/dist/chunk-5VZ37TY3.js.map +0 -1
- package/dist/chunk-757ZTGU5.js.map +0 -1
- package/dist/chunk-7DYZTEE3.js.map +0 -1
- package/dist/chunk-7P7I5OQV.js.map +0 -1
- package/dist/chunk-B47WSPMP.js.map +0 -1
- package/dist/chunk-C57KK5VB.js.map +0 -1
- package/dist/chunk-EB45EVPJ.js.map +0 -1
- package/dist/chunk-EDQLPCM4.js.map +0 -1
- package/dist/chunk-GHAN7OOE.js.map +0 -1
- package/dist/chunk-HLEBSAGC.js.map +0 -1
- package/dist/chunk-HP7BDMVK.js.map +0 -1
- package/dist/chunk-KH3JOEPY.js.map +0 -1
- package/dist/chunk-KR2W4ONJ.js.map +0 -1
- package/dist/chunk-LH5J3VLZ.js.map +0 -1
- package/dist/chunk-LNAAWT4Y.js.map +0 -1
- package/dist/chunk-MDSP7DJR.js.map +0 -1
- package/dist/chunk-NG6G6V5E.js.map +0 -1
- package/dist/chunk-NM2DEHFZ.js.map +0 -1
- package/dist/chunk-NPMGYLJV.js.map +0 -1
- package/dist/chunk-NQENOT6L.js.map +0 -1
- package/dist/chunk-NSLXEDIS.js.map +0 -1
- package/dist/chunk-OGWB76BR.js.map +0 -1
- package/dist/chunk-P7AFIKWG.js.map +0 -1
- package/dist/chunk-PGBF3UBX.js.map +0 -1
- package/dist/chunk-QA3WETWT.js.map +0 -1
- package/dist/chunk-QD6SNXF5.js.map +0 -1
- package/dist/chunk-QHVV2JGF.js.map +0 -1
- package/dist/chunk-QVHSV6RA.js.map +0 -1
- package/dist/chunk-S2O4NSN5.js.map +0 -1
- package/dist/chunk-S4TLZRGZ.js.map +0 -1
- package/dist/chunk-S6NYGOJT.js.map +0 -1
- package/dist/chunk-SB5WSVPI.js.map +0 -1
- package/dist/chunk-SG2RKUVJ.js.map +0 -1
- package/dist/chunk-V5RO6JYI.js.map +0 -1
- package/dist/chunk-V7W4RLRW.js.map +0 -1
- package/dist/chunk-VA4NPCUQ.js.map +0 -1
- package/dist/chunk-VPO27AFS.js.map +0 -1
- package/dist/chunk-W64RAX4N.js.map +0 -1
- package/dist/chunk-W675RFOA.js.map +0 -1
- package/dist/chunk-WC3SO4CE.js.map +0 -1
- package/dist/chunk-WEVYKZIF.js.map +0 -1
- package/dist/chunk-WU4VLSEA.js.map +0 -1
- package/dist/chunk-Y3P5B4XS.js.map +0 -1
- package/dist/chunk-YTYNKMNS.js.map +0 -1
- package/dist/chunk-Z47KIPCT.js.map +0 -1
- package/dist/chunk-ZPOVOEO3.js.map +0 -1
- package/dist/player-lightbox-BYQ57OXT.js.map +0 -1
- /package/dist/{chunk-HJFRHYCI.js.map → chunk-DTGRZXYO.js.map} +0 -0
- /package/dist/{chunk-PJNR4NTS.js.map → chunk-HC2TY45B.js.map} +0 -0
- /package/dist/{lightbox-MRB2YZEP.js.map → lightbox-JLWASIJC.js.map} +0 -0
|
@@ -350,7 +350,7 @@
|
|
|
350
350
|
"files": [
|
|
351
351
|
{
|
|
352
352
|
"path": "meta.ts",
|
|
353
|
-
"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 | \"notification-preferences\"\n | \"quota-meter\"\n | \"environment-notice\"\n | \"embed-facade\"\n | \"reviews\"\n | \"margin-layout\"\n | \"analysis-report\"\n | \"status-chip\"\n | \"kind-config-editor\"\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"architecture-diagram\"\n | \"bird-plate\"\n | \"taped-photo\"\n | \"stuck\"\n | \"doodle\"\n | \"signature\"\n | \"grade-stamp\"\n | \"versus-card\"\n | \"speed-lines\"\n | \"site-cahier\"\n | \"text-style\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"chapter\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-frame\"\n | \"desktop-window\"\n | \"form-flow\"\n | \"grid\"\n | \"list-detail\"\n | \"state-screen\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\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 | \"chip-row\"\n | \"columns\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"copy-button\"\n | \"money-input\"\n | \"price-catalogue-editor\"\n | \"promo-code-field\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\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 | \"engine-flow\"\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 | \"glossary\"\n | \"glossary-term\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\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 | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"identity-card\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"shop-gallery\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"schema-form\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\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 | \"wall\";\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 Sovkora 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 * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `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 = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the thirteen domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"abuse\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\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 /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\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 /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\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"
|
|
353
|
+
"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 | \"notification-preferences\"\n | \"quota-meter\"\n | \"environment-notice\"\n | \"platform-bar\"\n | \"embed-facade\"\n | \"reviews\"\n | \"margin-layout\"\n | \"analysis-report\"\n | \"status-chip\"\n | \"kind-config-editor\"\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"architecture-diagram\"\n | \"bird-plate\"\n | \"taped-photo\"\n | \"stuck\"\n | \"doodle\"\n | \"signature\"\n | \"grade-stamp\"\n | \"versus-card\"\n | \"speed-lines\"\n | \"site-cahier\"\n | \"text-style\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"chapter\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-frame\"\n | \"desktop-window\"\n | \"form-flow\"\n | \"grid\"\n | \"list-detail\"\n | \"state-screen\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\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 | \"chip-row\"\n | \"columns\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"copy-button\"\n | \"money-input\"\n | \"price-catalogue-editor\"\n | \"promo-code-field\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\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 | \"engine-flow\"\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 | \"glossary\"\n | \"glossary-term\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\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 | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"identity-card\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"shop-gallery\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"schema-form\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\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 | \"wall\";\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 Sovkora 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 * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `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 = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the thirteen domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"abuse\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\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 /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\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 /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\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"
|
|
354
354
|
},
|
|
355
355
|
{
|
|
356
356
|
"path": "settings-layout/index.ts",
|
|
@@ -366,7 +366,7 @@
|
|
|
366
366
|
},
|
|
367
367
|
{
|
|
368
368
|
"path": "settings-layout/settings-layout.tsx",
|
|
369
|
-
"content": "// Server-safe. Settings, read from the products' account and administration screens: a list of sections on the left\n// (a row of chips that scrolls on a phone, a disclosure menu past five), the current section's forms on the right, each\n// form a titled card with its own save at the foot. The sections are links (one page each) or anchors (one long page),\n// alone or in titled groups.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { Button } from \"../button/button\";\nimport { SaveStatus } from \"./save-status\";\n\nexport const settingsLayout = tv({\n slots: {\n root: \"flex w-full flex-col gap-6\",\n head: \"flex flex-col gap-1\",\n title: \"font-display text-2xl font-extrabold tracking-tight text-fg\",\n description: \"max-w-2xl text-sm text-fg-secondary\",\n columns: \"grid grid-cols-1 gap-6 lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-10\",\n nav: \"-mx-4 overflow-x-auto overflow-y-hidden px-4 py-1 -my-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden lg:mx-0 lg:overflow-visible lg:px-0 lg:py-0 lg:my-0\",\n navList: \"flex w-max gap-2 lg:sticky lg:top-20 lg:w-auto lg:flex-col lg:gap-0.5\",\n navLink:\n \"flex h-9 items-center gap-2.5 whitespace-nowrap rounded-sm border border-border-default bg-surface-1 px-3.5 text-sm font-medium text-fg-secondary no-underline \" +\n \"hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring aria-[current]:border-accent aria-[current]:text-fg \" +\n \"lg:rounded-lg lg:border-transparent lg:bg-transparent lg:px-3 lg:hover:bg-surface-2 lg:aria-[current]:bg-accent-soft [&>svg]:h-4 [&>svg]:w-4\",\n // Past five sections a strip of chips is a puzzle: the sidebar groups them, a phone gets one menu (a disclosure: no script).\n sidebar: \"hidden lg:block\",\n sidebarList: \"flex flex-col gap-6 lg:sticky lg:top-20\",\n group: \"flex flex-col gap-1\",\n groupLabel: \"px-3 text-xs font-semibold text-fg-secondary\",\n groupLink:\n \"flex h-9 items-center gap-2.5 whitespace-nowrap rounded-lg px-3 text-sm font-medium text-fg-secondary no-underline hover:bg-surface-2 hover:text-fg \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring aria-[current]:bg-accent-soft aria-[current]:text-fg [&>svg]:h-4 [&>svg]:w-4\",\n groupItems: \"m-0 flex list-none flex-col gap-0.5 p-0\",\n menu: \"group lg:hidden\",\n menuSummary:\n \"flex h-11 cursor-pointer list-none items-center justify-between gap-3 rounded-lg border border-border-default bg-surface-1 px-3.5 text-sm font-medium text-fg \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden group-open:border-accent\",\n menuChevron: \"h-4 w-4 shrink-0 text-fg-secondary transition-transform group-open:rotate-180 motion-reduce:transition-none\",\n menuPanel: \"mt-2 rounded-lg border border-border-default bg-surface-1 p-2\",\n navBadge: \"ml-auto font-mono text-[11px] text-fg-secondary\",\n header: \"flex flex-wrap items-center gap-x-4 gap-y-3 border-b border-border-subtle pb-5\",\n content: \"flex min-w-0 flex-col gap-6\",\n section: \"rounded-xl border border-border-default bg-surface-1\",\n sectionHead: \"flex flex-col gap-1 px-5 pt-5\",\n sectionTitle: \"text-base font-bold text-fg\",\n sectionDescription: \"text-sm text-fg-secondary\",\n sectionBody: \"flex flex-col gap-4 px-5 py-5\",\n sectionFooter: \"flex flex-wrap items-center justify-end gap-2 border-t border-border-subtle bg-surface-2/40 px-5 py-3 rounded-b-xl\",\n // The flat look: no card, hairline-divided rows (Linear / Vercel / GitHub settings).\n rows: \"flex flex-col divide-y divide-border-subtle border-y border-border-subtle\",\n row: \"flex flex-col gap-2 py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6\",\n rowText: \"flex min-w-0 flex-col gap-0.5\",\n rowLabel: \"text-sm font-medium text-fg\",\n rowDescription: \"text-sm text-fg-secondary\",\n rowControl: \"flex min-w-0 shrink-0 items-center gap-2 text-sm text-fg sm:max-w-[60%] sm:justify-end\",\n },\n variants: {\n variant: {\n card: {},\n flat: {\n content: \"max-w-[45rem] gap-10\",\n section: \"rounded-none border-0 bg-transparent\",\n sectionHead: \"gap-0.5 px-0 pb-3 pt-0\",\n sectionBody: \"gap-0 px-0 py-0\",\n sectionFooter: \"justify-start border-t-0 bg-transparent px-0 pb-0 pt-4\",\n },\n },\n },\n defaultVariants: { variant: \"card\" },\n});\n\nexport interface SettingsNavItem {\n /** Its id (the anchor of a section on one long page). */\n id: string;\n /** Its words. */\n label: string;\n /** Where it leads: a page (`/settings/billing`) or an anchor (`#billing`). */\n href: string;\n /** Its icon (a signature icon). */\n icon?: React.ReactNode;\n /** The section shown now: `aria-current`. */\n current?: boolean;\n /** A small count or status after the label (`3`, `New`). */\n badge?: React.ReactNode;\n}\n\nexport interface SettingsNavGroup {\n /** Its id. */\n id: string;\n /** The group's title (`Library`, `Money`). */\n label: string;\n items: readonly SettingsNavItem[];\n}\n\n/** Past this many sections a phone gets one menu instead of a strip of chips (« never more than about 5 items in a horizontal tab bar »). */\nexport const SETTINGS_CHIPS_MAX = 5;\n\nconst isGrouped = (nav: readonly SettingsNavItem[] | readonly SettingsNavGroup[]): nav is readonly SettingsNavGroup[] => nav.length > 0 && \"items\" in nav[0]!;\n\nexport type SettingsLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The screen's title (`Settings`). */\n title?: React.ReactNode;\n /** One sentence under it. */\n description?: React.ReactNode;\n /** What the screen is about, above the sections: who the account is, with their actions. Replaces `title` and `description`. */\n header?: React.ReactNode;\n /** The sections, alone or in titled groups. */\n nav: readonly SettingsNavItem[] | readonly SettingsNavGroup[];\n /** The navigation's accessible name (`Settings sections`). */\n navLabel: string;\n /** The app's link component for the sections (Next's `Link`); an `<a>` otherwise. */\n linkAs?: React.ElementType;\n /**\n * `card` (each form a titled card) or `flat` (one calm column of at most 45rem, rows divided by hairlines).\n * @default \"card\"\n */\n variant?: \"card\" | \"flat\";\n /** The current section's forms (`SettingsSection`). */\n children: React.ReactNode;\n};\n\nfunction currentOf(item: SettingsNavItem): \"location\" | \"page\" | undefined {\n if (!item.current) return undefined;\n return item.href.startsWith(\"#\") ? \"location\" : \"page\";\n}\n\nfunction NavLink({ item, Link, className }: Readonly<{ item: SettingsNavItem; Link: React.ElementType; className: string }>) {\n const s = settingsLayout();\n return (\n <Link href={item.href} className={className} aria-current={currentOf(item)}>\n {item.icon}\n {item.label}\n {item.badge !== undefined && <span className={s.navBadge()}>{item.badge}</span>}\n </Link>\n );\n}\n\nfunction NavGroups({ groups, Link }: Readonly<{ groups: readonly SettingsNavGroup[]; Link: React.ElementType }>) {\n const s = settingsLayout();\n return (\n <div className={s.sidebarList()}>\n {groups.map((group) => (\n <div key={group.id} className={s.group()}>\n <h2 className={s.groupLabel()}>{group.label}</h2>\n <ul className={s.groupItems()}>\n {group.items.map((item) => (\n <li key={item.id}>\n <NavLink item={item} Link={Link} className={s.groupLink()} />\n </li>\n ))}\n </ul>\n </div>\n ))}\n </div>\n );\n}\n\n/** A settings screen: sections on the left (chips on a phone, one menu past five), forms on the right. */\nexport function SettingsLayout({ title, description, header, nav, navLabel, linkAs: Link = \"a\", variant = \"card\", className, children, ...props }: SettingsLayoutProps) {\n const s = settingsLayout({ variant });\n const groups: readonly SettingsNavGroup[] = isGrouped(nav) ? nav : [{ id: \"sections\", label: \"\", items: nav }];\n const items = groups.flatMap((g) => g.items);\n const asMenu = items.length > SETTINGS_CHIPS_MAX;\n const current = items.find((i) => i.current);\n return (\n <div className={s.root({ className })} {...props}>\n {header ? (\n <div className={s.header()}>{header}</div>\n ) : (\n (title || description) && (\n <div className={s.head()}>\n {title && <h1 className={s.title()}>{title}</h1>}\n {description && <p className={s.description()}>{description}</p>}\n </div>\n )\n )}\n <div className={s.columns()}>\n {asMenu ? (\n <nav aria-label={navLabel}>\n <details className={s.menu()} data-settings-menu=\"\">\n <summary className={s.menuSummary()}>\n <span className=\"truncate\">{current?.label ?? navLabel}</span>\n <svg aria-hidden viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className={s.menuChevron()}>\n <path d=\"m4 6 4 4 4-4\" />\n </svg>\n </summary>\n <div className={s.menuPanel()}>\n <NavGroups groups={groups} Link={Link} />\n </div>\n </details>\n <div className={s.sidebar()}>\n <NavGroups groups={groups} Link={Link} />\n </div>\n </nav>\n ) : (\n <nav aria-label={navLabel} className={s.nav()}>\n <ul className={s.navList()}>\n {items.map((item) => (\n <li key={item.id}>\n <NavLink item={item} Link={Link} className={s.navLink()} />\n </li>\n ))}\n </ul>\n </nav>\n )}\n <div className={s.content()}>{children}</div>\n </div>\n </div>\n );\n}\n\nexport interface SectionSaveLabels {\n /** “Save”. */\n save: string;\n /** “Saving…”. */\n saving: string;\n /** “Saved”. */\n saved: string;\n /** What failed, one sentence (“Could not save. Try again.”). */\n error: string;\n /** “Undo” — only shown after a save, when `onUndo` is given. */\n undo: string;\n /** “Discard changes” — only shown while dirty, when `onDiscard` is given. */\n discard: string;\n}\n\n/** The one save of a section: its dirty state, its status, its words. */\nexport interface SectionSave {\n /** Whether a field differs from what is saved: the save is enabled only then. */\n dirty: boolean;\n /** Where the save is (`useSaveStatus().status`). */\n status: SaveStatus;\n /** Saves the section (the form's submit, Enter included). */\n onSave: () => void;\n /** Puts the previous values back after a save, optimistic update included. */\n onUndo?: () => void;\n /** Throws the edits away while dirty. */\n onDiscard?: () => void;\n labels: SectionSaveLabels;\n}\n\nexport type SettingsSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /**\n * One save for the whole section: the section becomes a form, the foot shows the Save (enabled while dirty), the\n * result in a live region (saved, or the error as an alert) and an undo after a save. Replaces `footer`.\n */\n save?: SectionSave;\n /** The section's title: it names the region (and is its anchor's target when `id` is set). */\n title: React.ReactNode;\n /** What these settings change, in one sentence. */\n description?: React.ReactNode;\n /** At the foot: the section's own save (a Button), a note. */\n footer?: React.ReactNode;\n /**\n * `card` (a titled card) or `flat` (no card: a title, then hairline-divided `SettingsRow`s).\n * @default \"card\"\n */\n variant?: \"card\" | \"flat\";\n /** The fields (or, flat, the `SettingsRow`s). A section of a title, a sentence and a foot action has none. */\n children?: React.ReactNode;\n};\n\n/** A group of settings: a titled card with its fields and its own save, or flat rows under a title. */\nexport function SettingsSection({ title, description, footer, save, variant = \"card\", id, className, children, ...props }: SettingsSectionProps) {\n const s = settingsLayout({ variant });\n const auto = React.useId();\n const titleId = `${id ?? auto}-title`;\n const head = (\n <div className={s.sectionHead()}>\n <h2 id={titleId} className={s.sectionTitle()}>\n {title}\n </h2>\n {description && <p className={s.sectionDescription()}>{description}</p>}\n </div>\n );\n const body = children === undefined ? null : (\n <div className={variant === \"flat\" ? s.rows() : s.sectionBody()} data-settings-rows={variant === \"flat\" ? \"\" : undefined}>\n {children}\n </div>\n );\n return (\n <section id={id} aria-labelledby={titleId} data-dirty={save?.dirty ? \"\" : undefined} className={s.section({ className })} {...props}>\n {save ? (\n <form\n noValidate\n onSubmit={(event) => {\n event.preventDefault();\n if (save.dirty && save.status !== SaveStatus.Saving) save.onSave();\n }}\n >\n {head}\n {body}\n <div className={s.sectionFooter()}>\n <SaveFeedback save={save} />\n {save.onDiscard && save.dirty ? (\n <Button type=\"button\" variant=\"ghost\" onClick={save.onDiscard}>\n {save.labels.discard}\n </Button>\n ) : null}\n <Button type=\"submit\" variant=\"primary\" disabled={!save.dirty || save.status === SaveStatus.Saving} loading={save.status === SaveStatus.Saving}>\n {save.labels.save}\n </Button>\n </div>\n </form>\n ) : (\n <>\n {head}\n {body}\n {footer && <div className={s.sectionFooter()}>{footer}</div>}\n </>\n )}\n </section>\n );\n}\n\n/** The result of the last save: « Saved » (with Undo) in a polite live region, a failure as an alert. The region stays mounted so the change is announced. */\nfunction SaveFeedback({ save }: Readonly<{ save: SectionSave }>) {\n const failed = save.status === SaveStatus.Error;\n const saved = save.status === SaveStatus.Saved;\n let feedbackText = \"\";\n if (failed) feedbackText = save.labels.error;\n else if (saved) feedbackText = save.labels.saved;\n else if (save.status === SaveStatus.Saving) feedbackText = save.labels.saving;\n return (\n <div className=\"mr-auto flex min-w-0 items-center gap-2 text-sm\">\n <span role={failed ? \"alert\" : \"status\"} aria-live={failed ? \"assertive\" : \"polite\"} className={failed ? \"text-danger-text\" : \"text-fg-secondary\"}>\n {feedbackText}\n </span>\n {saved && save.onUndo ? (\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={save.onUndo}>\n {save.labels.undo}\n </Button>\n ) : null}\n </div>\n );\n}\n\nexport type SettingsRowProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** What the setting is (`Username`). */\n label: React.ReactNode;\n /** The help text under it, one sentence. */\n description?: React.ReactNode;\n /** The id of the control, so the label names it (a `<label htmlFor>`). Leave out for a plain value. */\n htmlFor?: string;\n /** The control or the value, on the right (stacked under the label on a phone). */\n children?: React.ReactNode;\n};\n\n/** One setting: its label and help on the left, its control or value on the right. Put rows in a flat `SettingsSection`. */\nexport function SettingsRow({ label, description, htmlFor, className, children, ...props }: SettingsRowProps) {\n const s = settingsLayout();\n const Label = htmlFor ? \"label\" : \"span\";\n return (\n <div className={s.row({ className })} {...props}>\n <div className={s.rowText()}>\n <Label className={s.rowLabel()} {...(htmlFor ? { htmlFor } : {})}>\n {label}\n </Label>\n {description && <span className={s.rowDescription()}>{description}</span>}\n </div>\n {children !== undefined && <div className={s.rowControl()}>{children}</div>}\n </div>\n );\n}\n"
|
|
369
|
+
"content": "// Server-safe. Settings, read from the products' account and administration screens: a list of sections on the left\n// (a row of chips that scrolls on a phone, a disclosure menu past five), the current section's forms on the right, each\n// form a titled card with its own save at the foot. The sections are links (one page each) or anchors (one long page),\n// alone or in titled groups.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { Button } from \"../button/button\";\nimport { SaveStatus } from \"./save-status\";\n\nexport const settingsLayout = tv({\n slots: {\n root: \"flex w-full flex-col gap-6\",\n head: \"flex flex-col gap-1\",\n title: \"font-display text-2xl font-extrabold tracking-tight text-fg\",\n description: \"max-w-2xl text-sm text-fg-secondary\",\n columns: \"grid grid-cols-1 gap-6 lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-10\",\n nav: \"-mx-4 overflow-x-auto overflow-y-hidden px-4 py-1 -my-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden lg:mx-0 lg:overflow-visible lg:px-0 lg:py-0 lg:my-0\",\n navList: \"flex w-max gap-2 lg:sticky lg:top-20 lg:w-auto lg:flex-col lg:gap-0.5\",\n navLink:\n \"flex h-9 items-center gap-2.5 whitespace-nowrap rounded-sm border border-border-default bg-surface-1 px-3.5 text-sm font-medium text-fg-secondary no-underline \" +\n \"hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring aria-[current]:border-accent aria-[current]:text-fg \" +\n \"lg:rounded-lg lg:border-transparent lg:bg-transparent lg:px-3 lg:hover:bg-surface-2 lg:aria-[current]:bg-accent-soft [&>svg]:h-4 [&>svg]:w-4\",\n // Past five sections a strip of chips is a puzzle: the sidebar groups them, a phone gets one menu (a disclosure: no script).\n sidebar: \"hidden lg:block\",\n sidebarList: \"flex flex-col gap-6 lg:sticky lg:top-20\",\n group: \"flex flex-col gap-1\",\n groupLabel: \"px-3 text-xs font-semibold text-fg-secondary\",\n groupLink:\n \"flex h-9 items-center gap-2.5 whitespace-nowrap rounded-lg px-3 text-sm font-medium text-fg-secondary no-underline hover:bg-surface-2 hover:text-fg \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring aria-[current]:bg-accent-soft aria-[current]:text-fg [&>svg]:h-4 [&>svg]:w-4\",\n groupItems: \"m-0 flex list-none flex-col gap-0.5 p-0\",\n menu: \"group lg:hidden\",\n menuSummary:\n \"flex h-11 cursor-pointer list-none items-center justify-between gap-3 rounded-lg border border-border-default bg-surface-1 px-3.5 text-sm font-medium text-fg \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden group-open:border-accent\",\n menuChevron: \"h-4 w-4 shrink-0 text-fg-secondary transition-transform group-open:rotate-180 motion-reduce:transition-none\",\n menuPanel: \"mt-2 rounded-lg border border-border-default bg-surface-1 p-2\",\n navBadge: \"ml-auto font-mono text-[11px] text-fg-secondary\",\n header: \"flex flex-wrap items-center gap-x-4 gap-y-3 border-b border-border-subtle pb-5\",\n content: \"flex min-w-0 flex-col gap-6\",\n section: \"rounded-xl border border-border-default bg-surface-1\",\n sectionHead: \"flex flex-col gap-1 px-5 pt-5\",\n sectionTitle: \"text-base font-bold text-fg\",\n sectionDescription: \"text-sm text-fg-secondary\",\n sectionBody: \"flex flex-col gap-4 px-5 py-5\",\n sectionFooter: \"flex flex-wrap items-center justify-end gap-2 border-t border-border-subtle bg-surface-2/40 px-5 py-3 rounded-b-xl\",\n // The flat look: no card, hairline-divided rows (Linear / Vercel / GitHub settings).\n rows: \"flex flex-col divide-y divide-border-subtle border-y border-border-subtle\",\n row: \"flex flex-col gap-2 py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6\",\n rowText: \"flex min-w-0 flex-col gap-0.5\",\n rowLabel: \"text-sm font-medium text-fg\",\n rowDescription: \"text-sm text-fg-secondary\",\n rowControl: \"flex min-w-0 shrink-0 items-center gap-2 text-sm text-fg sm:max-w-[60%] sm:justify-end\",\n },\n variants: {\n variant: {\n card: {},\n flat: {\n content: \"max-w-[45rem] gap-10\",\n section: \"rounded-none border-0 bg-transparent\",\n sectionHead: \"gap-0.5 px-0 pb-3 pt-0\",\n sectionBody: \"gap-0 px-0 py-0\",\n sectionFooter: \"justify-start border-t-0 bg-transparent px-0 pb-0 pt-4\",\n },\n },\n },\n defaultVariants: { variant: \"card\" },\n});\n\nexport interface SettingsNavItem {\n /** Its id (the anchor of a section on one long page). */\n id: string;\n /** Its words. */\n label: string;\n /** Where it leads: a page (`/settings/billing`) or an anchor (`#billing`). */\n href: string;\n /** Its icon (a signature icon). */\n icon?: React.ReactNode;\n /** The section shown now: `aria-current`. */\n current?: boolean;\n /** A small count or status after the label (`3`, `New`). */\n badge?: React.ReactNode;\n}\n\nexport interface SettingsNavGroup {\n /** Its id. */\n id: string;\n /** The group's title (`Library`, `Money`). */\n label: string;\n items: readonly SettingsNavItem[];\n}\n\n/** Past this many sections a phone gets one menu instead of a strip of chips (« never more than about 5 items in a horizontal tab bar »). */\nexport const SETTINGS_CHIPS_MAX = 5;\n\nconst isGrouped = (nav: readonly SettingsNavItem[] | readonly SettingsNavGroup[]): nav is readonly SettingsNavGroup[] => nav.length > 0 && \"items\" in nav[0]!;\n\nexport type SettingsLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The screen's title (`Settings`). */\n title?: React.ReactNode;\n /** One sentence under it. */\n description?: React.ReactNode;\n /** What the screen is about, above the sections: who the account is, with their actions. Replaces `title` and `description`. */\n header?: React.ReactNode;\n /** The sections, alone or in titled groups. */\n nav: readonly SettingsNavItem[] | readonly SettingsNavGroup[];\n /** The navigation's accessible name (`Settings sections`). */\n navLabel: string;\n /** The app's link component for the sections (Next's `Link`); an `<a>` otherwise. */\n linkAs?: React.ElementType;\n /**\n * `card` (each form a titled card) or `flat` (one calm column of at most 45rem, rows divided by hairlines).\n * @default \"card\"\n */\n variant?: \"card\" | \"flat\";\n /** The current section's forms (`SettingsSection`). */\n children: React.ReactNode;\n};\n\nfunction currentOf(item: SettingsNavItem): \"location\" | \"page\" | undefined {\n if (!item.current) return undefined;\n return item.href.startsWith(\"#\") ? \"location\" : \"page\";\n}\n\nfunction NavLink({ item, Link, className }: Readonly<{ item: SettingsNavItem; Link: React.ElementType; className: string }>) {\n const s = settingsLayout();\n return (\n <Link href={item.href} className={className} aria-current={currentOf(item)}>\n {item.icon}\n {item.label}\n {item.badge !== undefined && <span className={s.navBadge()}>{item.badge}</span>}\n </Link>\n );\n}\n\nfunction NavGroups({ groups, Link }: Readonly<{ groups: readonly SettingsNavGroup[]; Link: React.ElementType }>) {\n const s = settingsLayout();\n return (\n <div className={s.sidebarList()}>\n {groups.map((group) => (\n <div key={group.id} className={s.group()}>\n <h2 className={s.groupLabel()}>{group.label}</h2>\n <ul className={s.groupItems()}>\n {group.items.map((item) => (\n <li key={item.id}>\n <NavLink item={item} Link={Link} className={s.groupLink()} />\n </li>\n ))}\n </ul>\n </div>\n ))}\n </div>\n );\n}\n\n/** A settings screen: sections on the left (chips on a phone, one menu past five), forms on the right. */\nexport function SettingsLayout({ title, description, header, nav, navLabel, linkAs: Link = \"a\", variant = \"card\", className, children, ...props }: Readonly<SettingsLayoutProps>) {\n const s = settingsLayout({ variant });\n const groups: readonly SettingsNavGroup[] = isGrouped(nav) ? nav : [{ id: \"sections\", label: \"\", items: nav }];\n const items = groups.flatMap((g) => g.items);\n const asMenu = items.length > SETTINGS_CHIPS_MAX;\n const current = items.find((i) => i.current);\n return (\n <div className={s.root({ className })} {...props}>\n {header ? (\n <div className={s.header()}>{header}</div>\n ) : (\n (title || description) && (\n <div className={s.head()}>\n {title && <h1 className={s.title()}>{title}</h1>}\n {description && <p className={s.description()}>{description}</p>}\n </div>\n )\n )}\n <div className={s.columns()}>\n {asMenu ? (\n <nav aria-label={navLabel}>\n <details className={s.menu()} data-settings-menu=\"\">\n <summary className={s.menuSummary()}>\n <span className=\"truncate\">{current?.label ?? navLabel}</span>\n <svg aria-hidden viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className={s.menuChevron()}>\n <path d=\"m4 6 4 4 4-4\" />\n </svg>\n </summary>\n <div className={s.menuPanel()}>\n <NavGroups groups={groups} Link={Link} />\n </div>\n </details>\n <div className={s.sidebar()}>\n <NavGroups groups={groups} Link={Link} />\n </div>\n </nav>\n ) : (\n <nav aria-label={navLabel} className={s.nav()}>\n <ul className={s.navList()}>\n {items.map((item) => (\n <li key={item.id}>\n <NavLink item={item} Link={Link} className={s.navLink()} />\n </li>\n ))}\n </ul>\n </nav>\n )}\n <div className={s.content()}>{children}</div>\n </div>\n </div>\n );\n}\n\nexport interface SectionSaveLabels {\n /** “Save”. */\n save: string;\n /** “Saving…”. */\n saving: string;\n /** “Saved”. */\n saved: string;\n /** What failed, one sentence (“Could not save. Try again.”). */\n error: string;\n /** “Undo” — only shown after a save, when `onUndo` is given. */\n undo: string;\n /** “Discard changes” — only shown while dirty, when `onDiscard` is given. */\n discard: string;\n}\n\n/** The one save of a section: its dirty state, its status, its words. */\nexport interface SectionSave {\n /** Whether a field differs from what is saved: the save is enabled only then. */\n dirty: boolean;\n /** Where the save is (`useSaveStatus().status`). */\n status: SaveStatus;\n /** Saves the section (the form's submit, Enter included). */\n onSave: () => void;\n /** Puts the previous values back after a save, optimistic update included. */\n onUndo?: () => void;\n /** Throws the edits away while dirty. */\n onDiscard?: () => void;\n labels: SectionSaveLabels;\n}\n\nexport type SettingsSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /**\n * One save for the whole section: the section becomes a form, the foot shows the Save (enabled while dirty), the\n * result in a live region (saved, or the error as an alert) and an undo after a save. Replaces `footer`.\n */\n save?: SectionSave;\n /** The section's title: it names the region (and is its anchor's target when `id` is set). */\n title: React.ReactNode;\n /** What these settings change, in one sentence. */\n description?: React.ReactNode;\n /** At the foot: the section's own save (a Button), a note. */\n footer?: React.ReactNode;\n /**\n * `card` (a titled card) or `flat` (no card: a title, then hairline-divided `SettingsRow`s).\n * @default \"card\"\n */\n variant?: \"card\" | \"flat\";\n /** The fields (or, flat, the `SettingsRow`s). A section of a title, a sentence and a foot action has none. */\n children?: React.ReactNode;\n};\n\n/** A group of settings: a titled card with its fields and its own save, or flat rows under a title. */\nexport function SettingsSection({ title, description, footer, save, variant = \"card\", id, className, children, ...props }: Readonly<SettingsSectionProps>) {\n const s = settingsLayout({ variant });\n const auto = React.useId();\n const titleId = `${id ?? auto}-title`;\n const head = (\n <div className={s.sectionHead()}>\n <h2 id={titleId} className={s.sectionTitle()}>\n {title}\n </h2>\n {description && <p className={s.sectionDescription()}>{description}</p>}\n </div>\n );\n const body = children === undefined ? null : (\n <div className={variant === \"flat\" ? s.rows() : s.sectionBody()} data-settings-rows={variant === \"flat\" ? \"\" : undefined}>\n {children}\n </div>\n );\n return (\n <section id={id} aria-labelledby={titleId} data-dirty={save?.dirty ? \"\" : undefined} className={s.section({ className })} {...props}>\n {save ? (\n <form\n noValidate\n onSubmit={(event) => {\n event.preventDefault();\n if (save.dirty && save.status !== SaveStatus.Saving) save.onSave();\n }}\n >\n {head}\n {body}\n <div className={s.sectionFooter()}>\n <SaveFeedback save={save} />\n {save.onDiscard && save.dirty ? (\n <Button type=\"button\" variant=\"ghost\" onClick={save.onDiscard}>\n {save.labels.discard}\n </Button>\n ) : null}\n <Button type=\"submit\" variant=\"primary\" disabled={!save.dirty || save.status === SaveStatus.Saving} loading={save.status === SaveStatus.Saving}>\n {save.labels.save}\n </Button>\n </div>\n </form>\n ) : (\n <>\n {head}\n {body}\n {footer && <div className={s.sectionFooter()}>{footer}</div>}\n </>\n )}\n </section>\n );\n}\n\n/** The result of the last save: « Saved » (with Undo) in a polite live region, a failure as an alert. The region stays mounted so the change is announced. */\nfunction SaveFeedback({ save }: Readonly<{ save: SectionSave }>) {\n const failed = save.status === SaveStatus.Error;\n const saved = save.status === SaveStatus.Saved;\n let feedbackText = \"\";\n if (failed) feedbackText = save.labels.error;\n else if (saved) feedbackText = save.labels.saved;\n else if (save.status === SaveStatus.Saving) feedbackText = save.labels.saving;\n return (\n <div className=\"mr-auto flex min-w-0 items-center gap-2 text-sm\">\n <span role={failed ? \"alert\" : \"status\"} aria-live={failed ? \"assertive\" : \"polite\"} className={failed ? \"text-danger-text\" : \"text-fg-secondary\"}>\n {feedbackText}\n </span>\n {saved && save.onUndo ? (\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={save.onUndo}>\n {save.labels.undo}\n </Button>\n ) : null}\n </div>\n );\n}\n\nexport type SettingsRowProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** What the setting is (`Username`). */\n label: React.ReactNode;\n /** The help text under it, one sentence. */\n description?: React.ReactNode;\n /** The id of the control, so the label names it (a `<label htmlFor>`). Leave out for a plain value. */\n htmlFor?: string;\n /** The control or the value, on the right (stacked under the label on a phone). */\n children?: React.ReactNode;\n};\n\n/** One setting: its label and help on the left, its control or value on the right. Put rows in a flat `SettingsSection`. */\nexport function SettingsRow({ label, description, htmlFor, className, children, ...props }: Readonly<SettingsRowProps>) {\n const s = settingsLayout();\n const Label = htmlFor ? \"label\" : \"span\";\n return (\n <div className={s.row({ className })} {...props}>\n <div className={s.rowText()}>\n <Label className={s.rowLabel()} {...(htmlFor ? { htmlFor } : {})}>\n {label}\n </Label>\n {description && <span className={s.rowDescription()}>{description}</span>}\n </div>\n {children !== undefined && <div className={s.rowControl()}>{children}</div>}\n </div>\n );\n}\n"
|
|
370
370
|
}
|
|
371
371
|
],
|
|
372
372
|
"dependencies": [
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
"files": [
|
|
223
223
|
{
|
|
224
224
|
"path": "meta.ts",
|
|
225
|
-
"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 | \"notification-preferences\"\n | \"quota-meter\"\n | \"environment-notice\"\n | \"embed-facade\"\n | \"reviews\"\n | \"margin-layout\"\n | \"analysis-report\"\n | \"status-chip\"\n | \"kind-config-editor\"\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"architecture-diagram\"\n | \"bird-plate\"\n | \"taped-photo\"\n | \"stuck\"\n | \"doodle\"\n | \"signature\"\n | \"grade-stamp\"\n | \"versus-card\"\n | \"speed-lines\"\n | \"site-cahier\"\n | \"text-style\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"chapter\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-frame\"\n | \"desktop-window\"\n | \"form-flow\"\n | \"grid\"\n | \"list-detail\"\n | \"state-screen\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\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 | \"chip-row\"\n | \"columns\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"copy-button\"\n | \"money-input\"\n | \"price-catalogue-editor\"\n | \"promo-code-field\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\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 | \"engine-flow\"\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 | \"glossary\"\n | \"glossary-term\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\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 | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"identity-card\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"shop-gallery\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"schema-form\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\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 | \"wall\";\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 Sovkora 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 * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `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 = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the thirteen domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"abuse\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\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 /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\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 /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\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"
|
|
225
|
+
"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 | \"notification-preferences\"\n | \"quota-meter\"\n | \"environment-notice\"\n | \"platform-bar\"\n | \"embed-facade\"\n | \"reviews\"\n | \"margin-layout\"\n | \"analysis-report\"\n | \"status-chip\"\n | \"kind-config-editor\"\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"architecture-diagram\"\n | \"bird-plate\"\n | \"taped-photo\"\n | \"stuck\"\n | \"doodle\"\n | \"signature\"\n | \"grade-stamp\"\n | \"versus-card\"\n | \"speed-lines\"\n | \"site-cahier\"\n | \"text-style\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"chapter\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-frame\"\n | \"desktop-window\"\n | \"form-flow\"\n | \"grid\"\n | \"list-detail\"\n | \"state-screen\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\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 | \"chip-row\"\n | \"columns\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"copy-button\"\n | \"money-input\"\n | \"price-catalogue-editor\"\n | \"promo-code-field\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\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 | \"engine-flow\"\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 | \"glossary\"\n | \"glossary-term\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\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 | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"identity-card\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"shop-gallery\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"schema-form\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\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 | \"wall\";\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 Sovkora 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 * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `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 = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the thirteen domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"abuse\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\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 /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\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 /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\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"
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
228
|
"path": "shop-composer/commands.ts",
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
},
|
|
251
251
|
{
|
|
252
252
|
"path": "shop-composer/inspector.tsx",
|
|
253
|
-
"content": "\"use client\";\n\n// The inspector (ADR-007 §5): for the selected section, the variant as a radio group of live thumbnails, the settings as a form\n// generated from the zod schema of its type, the owner's own words (title and line, in each language), and the blocks as a\n// sortable list (Move up / Move down, no drag needed). The look of the whole page is the first tab's concern: see `LookPanel`.\nimport { Button } from \"@krizaka/ui/button\";\nimport { RadioGroup } from \"@krizaka/ui/radio-group\";\nimport * as React from \"react\";\n\nimport { sectionDefinition } from \"../shop/catalogue\";\nimport type { Section } from \"../shop/schema\";\nimport type { Command } from \"./commands\";\nimport { newKey } from \"./keys\";\nimport { fill, type ShopComposerMessages } from \"./messages\";\nimport { SettingsForm } from \"./settings-form\";\nimport { SectionThumbnail } from \"./thumbnails\";\n\nexport type InspectorProps = {\n section: Section;\n name: string;\n messages: ShopComposerMessages;\n run: (cmd: Command, merge?: string) => void;\n /** Bumped when the document changes from outside the form (undo, redo): the settings form remounts. */\n epoch: number;\n announce: (message: string) => void;\n onInvalid: (key: string, invalid: boolean) => void;\n /** The page's look, so a thumbnail wears it. */\n preset?: string;\n density?: \"compact\" | \"airy\";\n};\n\nfunction Words({ section, m, run }: Pick<InspectorProps, \"section\" | \"run\"> & { m: ShopComposerMessages }) {\n const id = React.useId();\n const text = section.text ?? {};\n const field = (name: \"title\" | \"lead\", label: string) => (\n <fieldset className=\"m-0 grid gap-1.5 border-0 p-0\">\n <legend className=\"mb-1 text-xs font-semibold text-fg-secondary\">{label}</legend>\n {([\"fr\", \"en\"] as const).map((lang) => (\n <div key={lang} className=\"flex flex-col gap-1\">\n <label htmlFor={`${id}-${name}-${lang}`} className=\"text-xs text-fg-secondary\">{lang === \"fr\" ? m.french : m.english}</label>\n <input\n id={`${id}-${name}-${lang}`}\n className=\"min-h-10 rounded-md border border-border-control bg-surface-1 px-3 text-sm text-fg focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring\"\n maxLength={600}\n value={text[name]?.[lang] ?? \"\"}\n onChange={(e) => {\n const next = { ...(text[name] ?? {}), [lang]: e.target.value || undefined };\n const empty = !next.fr && !next.en;\n run({ type: \"setText\", key: section.key, field: name, value: empty ? undefined : next }, `text:${section.key}:${name}:${lang}`);\n }}\n />\n </div>\n ))}\n </fieldset>\n );\n return (\n <section aria-label={m.words} className=\"grid gap-3\">\n <h3 className=\"m-0 text-sm font-semibold text-fg\">{m.words}</h3>\n {field(\"title\", m.titleField)}\n {field(\"lead\", m.leadField)}\n </section>\n );\n}\n\nfunction Blocks({ section, m, run, announce }: Pick<InspectorProps, \"section\" | \"run\" | \"announce\"> & { m: ShopComposerMessages }) {\n const def = sectionDefinition(section.type);\n const blocks = ((section.blocks ?? []) as { key: string; type: string }[]);\n if (def.blockTypes.length === 0) return null;\n const label = (b: { type: string }, i: number) => `${m.blockNames[b.type] ?? b.type} ${i + 1}`;\n const move = (i: number, to: number) => {\n const b = blocks[i]!;\n if (to < 0 || to >= blocks.length) return;\n run({ type: \"moveBlock\", key: section.key, blockKey: b.key, to });\n announce(fill(m.announceMoved, { name: label(b, i), n: to + 1, total: blocks.length }));\n };\n return (\n <section aria-label={m.blocks} className=\"grid gap-2\">\n <h3 className=\"m-0 text-sm font-semibold text-fg\">{m.blocks}</h3>\n {blocks.length > 0 && (\n <ol className=\"m-0 grid list-none gap-1 p-0\">\n {blocks.map((b, i) => (\n <li key={b.key} className=\"flex items-center gap-1 rounded-md border border-border-default bg-surface-1 ps-3\">\n <span className=\"min-w-0 flex-1 truncate text-sm text-fg\">{label(b, i)}</span>\n <Button size=\"sm\" variant=\"ghost\" disabled={i === 0} aria-label={`${m.moveUp}: ${label(b, i)}`} onClick={() => move(i, i - 1)}>↑</Button>\n <Button size=\"sm\" variant=\"ghost\" disabled={i === blocks.length - 1} aria-label={`${m.moveDown}: ${label(b, i)}`} onClick={() => move(i, i + 1)}>↓</Button>\n <Button size=\"sm\" variant=\"ghost\" aria-label={fill(m.removeBlock, { name: label(b, i) })} onClick={() => run({ type: \"removeBlock\", key: section.key, blockKey: b.key })}>×</Button>\n </li>\n ))}\n </ol>\n )}\n <div className=\"flex flex-wrap gap-2\">\n {def.blockTypes.map((type) => (\n <Button key={type} size=\"sm\" variant=\"outline\" onClick={() => run({ type: \"addBlock\", key: section.key, blockKey: newKey(\"b\"), blockType: type, settings: defaultBlockSettings(type) })}>\n {m.addBlock} · {m.blockNames[type] ?? type}\n </Button>\n ))}\n </div>\n </section>\n );\n}\n\n/** The first settings of a new block: what its schema needs to be valid (a product then fills the references). */\nfunction defaultBlockSettings(type: string): Record<string, unknown> {\n switch (type) {\n case \"fact\": return { kind: \"open-now\" };\n case \"note\": return { text: \"…\" };\n case \"flyer\": return { text: \"…\" };\n case \"photo\": return { mediaId: \"\" };\n case \"service\": return { serviceId: \"\" };\n case \"member\": return { memberId: \"\" };\n case \"reel\": return { platform: \"tiktok\", url: \"https://\" };\n case \"link\": return { platform: \"instagram\", url: \"https://\" };\n case \"question\": return { question: {}, answer: {} };\n default: return {};\n }\n}\n\nexport function Inspector({ section, name, messages: m, run, epoch, announce, onInvalid, preset, density }: Readonly<InspectorProps>) {\n const def = sectionDefinition(section.type);\n const label = React.useId();\n return (\n <div className=\"flex min-w-0 flex-col gap-6\">\n <section aria-labelledby={label} className=\"grid gap-2\">\n <h3 id={label} className=\"m-0 text-sm font-semibold text-fg\">{m.variant}</h3>\n {/* The thumbnail is a section: it holds links and buttons, so it sits beside the radio, never inside it. */}\n <RadioGroup.Root label={`${name}: ${m.variant}`} value={section.variant} onValueChange={(variant) => run({ type: \"setVariant\", key: section.key, variant })} className=\"grid grid-cols-1 gap-2 sm:grid-cols-2\">\n {def.variants.map((variant) => (\n <div\n key={variant}\n role=\"presentation\"\n data-checked={section.variant === variant ? \"\" : undefined}\n onClick={() => run({ type: \"setVariant\", key: section.key, variant })}\n className=\"grid cursor-pointer gap-2 rounded-lg border border-border-default bg-surface-1 p-2 data-[checked]:border-accent data-[checked]:bg-accent-soft\"\n >\n <SectionThumbnail type={section.type} variant={variant} preset={preset} density={density} />\n <RadioGroup.Item value={variant}>{m.variantNames[`${section.type}.${variant}`] ?? variant}</RadioGroup.Item>\n </div>\n ))}\n </RadioGroup.Root>\n </section>\n <SettingsForm\n key={`${section.key}:${epoch}`}\n section={section}\n messages={m}\n onValid={(settings) => run({ type: \"patchSettings\", key: section.key, patch: settings }, `settings:${section.key}`)}\n onInvalid={(invalid) => onInvalid(section.key, invalid)}\n />\n <Blocks section={section} m={m} run={run} announce={announce} />\n <Words section={section} m={m} run={run} />\n </div>\n );\n}\n"
|
|
253
|
+
"content": "\"use client\";\n\n// The inspector (ADR-007 §5): for the selected section, the variant as a radio group of live thumbnails, the settings as a form\n// generated from the zod schema of its type, the owner's own words (title and line, in each language), and the blocks as a\n// sortable list (Move up / Move down, no drag needed). The look of the whole page is the first tab's concern: see `LookPanel`.\nimport { Button } from \"@krizaka/ui/button\";\nimport { RadioGroup } from \"@krizaka/ui/radio-group\";\nimport * as React from \"react\";\n\nimport { sectionDefinition } from \"../shop/catalogue\";\nimport type { Section } from \"../shop/schema\";\nimport type { Command } from \"./commands\";\nimport { newKey } from \"./keys\";\nimport { fill, type ShopComposerMessages } from \"./messages\";\nimport { SettingsForm } from \"./settings-form\";\nimport { SectionThumbnail } from \"./thumbnails\";\n\nexport type InspectorProps = {\n section: Section;\n name: string;\n messages: ShopComposerMessages;\n run: (cmd: Command, merge?: string) => void;\n /** Bumped when the document changes from outside the form (undo, redo): the settings form remounts. */\n epoch: number;\n announce: (message: string) => void;\n onInvalid: (key: string, invalid: boolean) => void;\n /** The page's look, so a thumbnail wears it. */\n preset?: string;\n density?: \"compact\" | \"airy\";\n};\n\nfunction Words({ section, m, run }: Readonly<Pick<InspectorProps, \"section\" | \"run\"> & { m: ShopComposerMessages }>) {\n const id = React.useId();\n const text = section.text ?? {};\n const field = (name: \"title\" | \"lead\", label: string) => (\n <fieldset className=\"m-0 grid gap-1.5 border-0 p-0\">\n <legend className=\"mb-1 text-xs font-semibold text-fg-secondary\">{label}</legend>\n {([\"fr\", \"en\"] as const).map((lang) => (\n <div key={lang} className=\"flex flex-col gap-1\">\n <label htmlFor={`${id}-${name}-${lang}`} className=\"text-xs text-fg-secondary\">{lang === \"fr\" ? m.french : m.english}</label>\n <input\n id={`${id}-${name}-${lang}`}\n className=\"min-h-10 rounded-md border border-border-control bg-surface-1 px-3 text-sm text-fg focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring\"\n maxLength={600}\n value={text[name]?.[lang] ?? \"\"}\n onChange={(e) => {\n const next = { ...(text[name] ?? {}), [lang]: e.target.value || undefined };\n const empty = !next.fr && !next.en;\n run({ type: \"setText\", key: section.key, field: name, value: empty ? undefined : next }, `text:${section.key}:${name}:${lang}`);\n }}\n />\n </div>\n ))}\n </fieldset>\n );\n return (\n <section aria-label={m.words} className=\"grid gap-3\">\n <h3 className=\"m-0 text-sm font-semibold text-fg\">{m.words}</h3>\n {field(\"title\", m.titleField)}\n {field(\"lead\", m.leadField)}\n </section>\n );\n}\n\nfunction Blocks({ section, m, run, announce }: Readonly<Pick<InspectorProps, \"section\" | \"run\" | \"announce\"> & { m: ShopComposerMessages }>) {\n const def = sectionDefinition(section.type);\n const blocks = ((section.blocks ?? []) as { key: string; type: string }[]);\n if (def.blockTypes.length === 0) return null;\n const label = (b: { type: string }, i: number) => `${m.blockNames[b.type] ?? b.type} ${i + 1}`;\n const move = (i: number, to: number) => {\n const b = blocks[i]!;\n if (to < 0 || to >= blocks.length) return;\n run({ type: \"moveBlock\", key: section.key, blockKey: b.key, to });\n announce(fill(m.announceMoved, { name: label(b, i), n: to + 1, total: blocks.length }));\n };\n return (\n <section aria-label={m.blocks} className=\"grid gap-2\">\n <h3 className=\"m-0 text-sm font-semibold text-fg\">{m.blocks}</h3>\n {blocks.length > 0 && (\n <ol className=\"m-0 grid list-none gap-1 p-0\">\n {blocks.map((b, i) => (\n <li key={b.key} className=\"flex items-center gap-1 rounded-md border border-border-default bg-surface-1 ps-3\">\n <span className=\"min-w-0 flex-1 truncate text-sm text-fg\">{label(b, i)}</span>\n <Button size=\"sm\" variant=\"ghost\" disabled={i === 0} aria-label={`${m.moveUp}: ${label(b, i)}`} onClick={() => move(i, i - 1)}>↑</Button>\n <Button size=\"sm\" variant=\"ghost\" disabled={i === blocks.length - 1} aria-label={`${m.moveDown}: ${label(b, i)}`} onClick={() => move(i, i + 1)}>↓</Button>\n <Button size=\"sm\" variant=\"ghost\" aria-label={fill(m.removeBlock, { name: label(b, i) })} onClick={() => run({ type: \"removeBlock\", key: section.key, blockKey: b.key })}>×</Button>\n </li>\n ))}\n </ol>\n )}\n <div className=\"flex flex-wrap gap-2\">\n {def.blockTypes.map((type) => (\n <Button key={type} size=\"sm\" variant=\"outline\" onClick={() => run({ type: \"addBlock\", key: section.key, blockKey: newKey(\"b\"), blockType: type, settings: defaultBlockSettings(type) })}>\n {m.addBlock} · {m.blockNames[type] ?? type}\n </Button>\n ))}\n </div>\n </section>\n );\n}\n\n/** The first settings of a new block: what its schema needs to be valid (a product then fills the references). */\nfunction defaultBlockSettings(type: string): Record<string, unknown> {\n switch (type) {\n case \"fact\": return { kind: \"open-now\" };\n case \"note\": return { text: \"…\" };\n case \"flyer\": return { text: \"…\" };\n case \"photo\": return { mediaId: \"\" };\n case \"service\": return { serviceId: \"\" };\n case \"member\": return { memberId: \"\" };\n case \"reel\": return { platform: \"tiktok\", url: \"https://\" };\n case \"link\": return { platform: \"instagram\", url: \"https://\" };\n case \"question\": return { question: {}, answer: {} };\n default: return {};\n }\n}\n\nexport function Inspector({ section, name, messages: m, run, epoch, announce, onInvalid, preset, density }: Readonly<InspectorProps>) {\n const def = sectionDefinition(section.type);\n const label = React.useId();\n return (\n <div className=\"flex min-w-0 flex-col gap-6\">\n <section aria-labelledby={label} className=\"grid gap-2\">\n <h3 id={label} className=\"m-0 text-sm font-semibold text-fg\">{m.variant}</h3>\n {/* The thumbnail is a section: it holds links and buttons, so it sits beside the radio, never inside it. */}\n <RadioGroup.Root label={`${name}: ${m.variant}`} value={section.variant} onValueChange={(variant) => run({ type: \"setVariant\", key: section.key, variant })} className=\"grid grid-cols-1 gap-2 sm:grid-cols-2\">\n {def.variants.map((variant) => (\n <div\n key={variant}\n role=\"presentation\"\n data-checked={section.variant === variant ? \"\" : undefined}\n onClick={() => run({ type: \"setVariant\", key: section.key, variant })}\n className=\"grid cursor-pointer gap-2 rounded-lg border border-border-default bg-surface-1 p-2 data-[checked]:border-accent data-[checked]:bg-accent-soft\"\n >\n <SectionThumbnail type={section.type} variant={variant} preset={preset} density={density} />\n <RadioGroup.Item value={variant}>{m.variantNames[`${section.type}.${variant}`] ?? variant}</RadioGroup.Item>\n </div>\n ))}\n </RadioGroup.Root>\n </section>\n <SettingsForm\n key={`${section.key}:${epoch}`}\n section={section}\n messages={m}\n onValid={(settings) => run({ type: \"patchSettings\", key: section.key, patch: settings }, `settings:${section.key}`)}\n onInvalid={(invalid) => onInvalid(section.key, invalid)}\n />\n <Blocks section={section} m={m} run={run} announce={announce} />\n <Words section={section} m={m} run={run} />\n </div>\n );\n}\n"
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
256
|
"path": "shop-composer/keys.ts",
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
},
|
|
263
263
|
{
|
|
264
264
|
"path": "shop-composer/messages.ts",
|
|
265
|
-
"content": "// The composer's words (ADR-007 §5): every string is a prop — the product passes its translated copy. English is the default, so\n// a story or a first integration works without a catalogue; `{name}`, `{n}`, `{total}` are replaced by `fill`.\nimport type { SectionType } from \"../shop/catalogue\";\nimport type { DiffEntry } from \"./diff\";\n\nexport type ShopComposerMessages = {\n title: string;\n /** The outline's name. */\n sections: string;\n addSection: string;\n addSectionHint: string;\n /** « Show {name} » / the switch's accessible name. */\n toggleVisible: string;\n sectionMenu: string;\n moveUp: string;\n moveDown: string;\n moveTop: string;\n remove: string;\n /** Announcements. */\n announceMoved: string;\n announceCannotMove: string;\n announceAdded: string;\n announceRemoved: string;\n announceShown: string;\n announceHidden: string;\n announceUndone: string;\n announceRedone: string;\n hiddenNote: string;\n /** The inspector. */\n inspector: string;\n noSelection: string;\n backToSections: string;\n variant: string;\n settings: string;\n words: string;\n titleField: string;\n leadField: string;\n french: string;\n english: string;\n blocks: string;\n addBlock: string;\n removeBlock: string;\n /** The look. */\n look: string;\n /** The six looks, as a group of swatches. */\n lookChoice: string;\n /** Said when a look is applied (`{name}`). */\n lookApplied: string;\n /** The accent within the chosen look. */\n accentChoice: string;\n /** The names of the accents a look lists (`krizaka`, `folioviv:accent-2`…); an unknown one reads as its id. */\n accentNames: Readonly<Record<string, string>>;\n preset: string;\n density: string;\n densityCompact: string;\n densityAiry: string;\n /** The toolbar. */\n undo: string;\n redo: string;\n saved: string;\n saving: string;\n saveFailed: string;\n publish: string;\n discard: string;\n /** The preview. */\n preview: string;\n previewTitle: string;\n phone: string;\n desktop: string;\n viewPreview: string;\n closePreview: string;\n /** The publish dialog. */\n publishTitle: string;\n publishWhat: string;\n publishNothing: string;\n publishConfirm: string;\n cancel: string;\n problemsTitle: string;\n problemIn: string;\n /** The names. */\n sectionNames: Record<SectionType, string>;\n /** `type.variant` → « Poster ». */\n variantNames: Record<string, string>;\n blockNames: Record<string, string>;\n settingNames: Record<string, string>;\n optionNames: Record<string, string>;\n /** One line per kind of change, with `{name}` (the section) and `{from}` / `{to}` / `{n}`. */\n diff: Record<DiffEntry[\"kind\"], string>;\n};\n\n/** `fill(\"Moved to {n}\", { n: 2 })`. */\nexport const fill = (message: string, vars: Record<string, string | number>) => message.
|
|
265
|
+
"content": "// The composer's words (ADR-007 §5): every string is a prop — the product passes its translated copy. English is the default, so\n// a story or a first integration works without a catalogue; `{name}`, `{n}`, `{total}` are replaced by `fill`.\nimport type { SectionType } from \"../shop/catalogue\";\nimport type { DiffEntry } from \"./diff\";\n\nexport type ShopComposerMessages = {\n title: string;\n /** The outline's name. */\n sections: string;\n addSection: string;\n addSectionHint: string;\n /** « Show {name} » / the switch's accessible name. */\n toggleVisible: string;\n sectionMenu: string;\n moveUp: string;\n moveDown: string;\n moveTop: string;\n remove: string;\n /** Announcements. */\n announceMoved: string;\n announceCannotMove: string;\n announceAdded: string;\n announceRemoved: string;\n announceShown: string;\n announceHidden: string;\n announceUndone: string;\n announceRedone: string;\n hiddenNote: string;\n /** The inspector. */\n inspector: string;\n noSelection: string;\n backToSections: string;\n variant: string;\n settings: string;\n words: string;\n titleField: string;\n leadField: string;\n french: string;\n english: string;\n blocks: string;\n addBlock: string;\n removeBlock: string;\n /** The look. */\n look: string;\n /** The six looks, as a group of swatches. */\n lookChoice: string;\n /** Said when a look is applied (`{name}`). */\n lookApplied: string;\n /** The accent within the chosen look. */\n accentChoice: string;\n /** The names of the accents a look lists (`krizaka`, `folioviv:accent-2`…); an unknown one reads as its id. */\n accentNames: Readonly<Record<string, string>>;\n preset: string;\n density: string;\n densityCompact: string;\n densityAiry: string;\n /** The toolbar. */\n undo: string;\n redo: string;\n saved: string;\n saving: string;\n saveFailed: string;\n publish: string;\n discard: string;\n /** The preview. */\n preview: string;\n previewTitle: string;\n phone: string;\n desktop: string;\n viewPreview: string;\n closePreview: string;\n /** The publish dialog. */\n publishTitle: string;\n publishWhat: string;\n publishNothing: string;\n publishConfirm: string;\n cancel: string;\n problemsTitle: string;\n problemIn: string;\n /** The names. */\n sectionNames: Record<SectionType, string>;\n /** `type.variant` → « Poster ». */\n variantNames: Record<string, string>;\n blockNames: Record<string, string>;\n settingNames: Record<string, string>;\n optionNames: Record<string, string>;\n /** One line per kind of change, with `{name}` (the section) and `{from}` / `{to}` / `{n}`. */\n diff: Record<DiffEntry[\"kind\"], string>;\n};\n\n/** `fill(\"Moved to {n}\", { n: 2 })`. */\nexport const fill = (message: string, vars: Record<string, string | number>) => message.replaceAll(/\\{(\\w+)\\}/g, (_, k: string) => String(vars[k] ?? `{${k}}`));\n\nconst sectionNames: Record<SectionType, string> = {\n hero: \"Hero\", services: \"Services\", booking: \"Booking\", gallery: \"Photos\", video: \"Video\", reviews: \"Reviews\", bulletin: \"News\",\n team: \"Team\", visit: \"Visit\", story: \"Story\", social: \"Social\", faq: \"Questions\", policies: \"Policies\",\n};\n\nconst variantNames: Record<string, string> = {\n \"hero.poster\": \"Poster\", \"hero.split\": \"Split\", \"hero.banner\": \"Banner\", \"hero.tv\": \"Television\",\n \"services.menu\": \"Menu\", \"services.cards\": \"Cards\", \"services.index\": \"Index cards\", \"services.carousel\": \"Carousel\",\n \"booking.strip\": \"Next times\", \"booking.panel\": \"Closing call\", \"booking.sticky\": \"Phone bar\",\n \"gallery.mosaic\": \"Mosaic\", \"gallery.filmstrip\": \"Filmstrip\", \"gallery.wall\": \"Wall\", \"gallery.grid\": \"Grid\",\n \"video.tv\": \"Television\", \"video.shorts\": \"Reels\",\n \"reviews.summary-cards\": \"Score and reviews\", \"reviews.quote\": \"One quote\", \"reviews.strip\": \"Score line\",\n \"bulletin.board\": \"Board\", \"bulletin.banner\": \"Banner line\",\n \"team.row\": \"Row\", \"team.cards\": \"Cards\",\n \"visit.card\": \"Card\", \"visit.map\": \"Map\", \"visit.split\": \"Hours and map\",\n \"story.quote\": \"Quote\", \"story.owner\": \"Owner\",\n \"social.links\": \"Links\", \"social.facade\": \"Latest reel\",\n \"faq.list\": \"List\", \"policies.inline\": \"Inline\",\n};\n\nexport const defaultShopComposerMessages: ShopComposerMessages = {\n title: \"Shop page\",\n sections: \"Sections\",\n addSection: \"Add a section\",\n addSectionHint: \"Choose what to add to your page.\",\n toggleVisible: \"Show {name}\",\n sectionMenu: \"Actions for {name}\",\n moveUp: \"Move up\",\n moveDown: \"Move down\",\n moveTop: \"Move to top\",\n remove: \"Remove\",\n announceMoved: \"{name} moved to position {n} of {total}\",\n announceCannotMove: \"{name} cannot move further\",\n announceAdded: \"{name} added at position {n}\",\n announceRemoved: \"{name} removed\",\n announceShown: \"{name} is shown\",\n announceHidden: \"{name} is hidden\",\n announceUndone: \"Undone\",\n announceRedone: \"Redone\",\n hiddenNote: \"hidden\",\n inspector: \"Section\",\n noSelection: \"Choose a section to change how it is drawn.\",\n backToSections: \"Back to sections\",\n variant: \"How it is drawn\",\n settings: \"Settings\",\n words: \"Your words\",\n titleField: \"Title\",\n leadField: \"Line under the title\",\n french: \"French\",\n english: \"English\",\n blocks: \"Items\",\n addBlock: \"Add\",\n removeBlock: \"Remove {name}\",\n look: \"Look\",\n lookChoice: \"Look of the page\",\n lookApplied: \"Look: {name}\",\n accentChoice: \"Accent\",\n accentNames: { krizaka: \"Krizaka blue\", folioviv: \"Folioviv green\", \"folioviv:accent-2\": \"Copper\", verikora: \"Indigo\", sovkora: \"Orange\" },\n preset: \"Style\",\n density: \"Spacing\",\n densityCompact: \"Compact\",\n densityAiry: \"Airy\",\n undo: \"Undo\",\n redo: \"Redo\",\n saved: \"Saved\",\n saving: \"Saving…\",\n saveFailed: \"Not saved\",\n publish: \"Publish\",\n discard: \"Discard the draft\",\n preview: \"Preview\",\n previewTitle: \"Live preview of your page\",\n phone: \"Phone\",\n desktop: \"Desktop\",\n viewPreview: \"View\",\n closePreview: \"Close\",\n publishTitle: \"Publish this page\",\n publishWhat: \"What changes\",\n publishNothing: \"Nothing has changed since the last publication.\",\n publishConfirm: \"Publish\",\n cancel: \"Cancel\",\n problemsTitle: \"Fix {n} problem before publishing\",\n problemIn: \"{name}\",\n sectionNames,\n variantNames,\n blockNames: { fact: \"Fact\", service: \"Service\", photo: \"Photo\", note: \"Note\", sign: \"Sign\", reel: \"Reel\", flyer: \"Flyer\", member: \"Member\", link: \"Link\", question: \"Question\" },\n settingNames: { media: \"Photo\", focus: \"Crop\", source: \"Source\", groupBy: \"Group by\", columns: \"Columns\", aside: \"Beside the list\", serviceId: \"Service\", count: \"How many\", texture: \"Wall\", cabinet: \"Cabinet\", channel: \"Channel\", rule: \"Which reviews\", showPhone: \"Show the phone number\", body: \"Text\", show: \"Show\" },\n optionNames: { center: \"Centre\", top: \"Top\", bottom: \"Bottom\", all: \"All\", pick: \"Pick\", category: \"Category\", none: \"None\", hours: \"Hours\", plaster: \"Plaster\", brick: \"Brick\", ridge: \"Ridge\", zellige: \"Zellige\", cabinet: \"Cabinet\", portable: \"Portable\", best: \"Best\", latest: \"Latest\", cancellation: \"Cancellation\", prices: \"Prices\", \"booking-window\": \"Booking window\" },\n diff: {\n added: \"{name} added\",\n removed: \"{name} removed\",\n moved: \"{name} moved from {from} to {to}\",\n variant: \"{name} drawn as {to} (was {from})\",\n settings: \"{name}: settings changed\",\n blocks: \"{name}: items changed\",\n text: \"{name}: words changed\",\n disabled: \"{name} hidden\",\n enabled: \"{name} shown\",\n preset: \"Style changed to {to} (was {from})\",\n density: \"Spacing changed to {to} (was {from})\",\n },\n};\n"
|
|
266
266
|
},
|
|
267
267
|
{
|
|
268
268
|
"path": "shop-composer/meta.ts",
|
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
},
|
|
275
275
|
{
|
|
276
276
|
"path": "shop-composer/settings-form.tsx",
|
|
277
|
-
"content": "\"use client\";\n\n// The settings of a section, as a form generated from the zod schema of its type (ADR-007 §5): the form is `@krizaka/ui/form`\n// (TanStack Form behind the facade), the fields are the ones the schema describes (`fields.ts`). Every valid change is committed to\n// the document at once (so undo and the preview follow); an invalid value is said next to its field, stays in the field, and is\n// reported to the composer, which refuses to publish until it is fixed.\nimport { createKrizakaForm, FormField, Switch, TextArea, TextField, useFormContext } from \"@krizaka/ui/form\";\nimport { RadioGroup } from \"@krizaka/ui/radio-group\";\nimport * as React from \"react\";\n\nimport { type SectionDefinition, sectionDefinition } from \"../shop/catalogue\";\nimport type { Section } from \"../shop/schema\";\nimport { describeSettings, type FieldSpec } from \"./fields\";\nimport type { ShopComposerMessages } from \"./messages\";\n\ntype Factory = ReturnType<typeof createKrizakaForm>;\n// One form per section type, defined once (schema + defaults), as the facade asks.\nconst factories = new Map<string, Factory>();\nfunction factoryFor(def: SectionDefinition): Factory {\n let f = factories.get(def.type);\n if (!f) {\n f = createKrizakaForm({ schema: def.settings as never, defaultValues: def.settingsDefault as never }) as unknown as Factory;\n factories.set(def.type, f);\n }\n return f;\n}\n\nconst nameOf = (m: ShopComposerMessages, key: string) => m.settingNames[key] ?? key;\nconst optionName = (m: ShopComposerMessages, o: string | number) => m.optionNames[String(o)] ?? String(o);\n\nfunction Choice({ spec, m }: Readonly<{ spec: Extract<FieldSpec, { kind: \"choice\" }>; m: ShopComposerMessages }>) {\n return (\n <FormField name={spec.name}>\n {(f) => (\n <div className=\"grid gap-1.5\">\n <span aria-hidden className=\"text-xs font-semibold text-fg-secondary\">{nameOf(m, spec.name)}</span>\n <RadioGroup.Root label={nameOf(m, spec.name)} variant=\"segmented\" value={String(f.value)} onValueChange={(v) => f.setValue(spec.options.find((o) => String(o) === v))} onBlur={f.onBlur}>\n {spec.options.map((o) => (\n <RadioGroup.Segment key={String(o)} value={String(o)}>{optionName(m, o)}</RadioGroup.Segment>\n ))}\n </RadioGroup.Root>\n </div>\n )}\n </FormField>\n );\n}\n\nfunction Multi({ spec, m }: Readonly<{ spec: Extract<FieldSpec, { kind: \"multi\" }>; m: ShopComposerMessages }>) {\n return (\n <FormField name={spec.name}>\n {(f) => {\n const value = (f.value as string[] | undefined) ?? [];\n return (\n <fieldset className=\"m-0 flex flex-col gap-1.5 border-0 p-0\">\n <legend className=\"mb-1 text-xs font-semibold text-fg-secondary\">{nameOf(m, spec.name)}</legend>\n {spec.options.map((o) => (\n <label key={o} className=\"flex min-h-9 items-center gap-2 text-sm text-fg\">\n <input\n type=\"checkbox\"\n className=\"h-4 w-4 accent-accent\"\n checked={value.includes(o)}\n onChange={(e) => f.setValue(e.target.checked ? [...value, o] : value.filter((x) => x !== o))}\n />\n {optionName(m, o)}\n </label>\n ))}\n </fieldset>\n );\n }}\n </FormField>\n );\n}\n\nfunction Field({ spec, m }: Readonly<{ spec: FieldSpec; m: ShopComposerMessages }>) {\n switch (spec.kind) {\n case \"choice\":\n return <Choice spec={spec} m={m} />;\n case \"multi\":\n return <Multi spec={spec} m={m} />;\n case \"toggle\":\n return <Switch name={spec.name} label={nameOf(m, spec.name)} />;\n case \"text\":\n return <TextField name={spec.name} label={nameOf(m, spec.name)} />;\n case \"localized\":\n return (\n <div className=\"flex flex-col gap-2\">\n <TextArea name={`${spec.name}.fr`} label={`${nameOf(m, spec.name)} — ${m.french}`} rows={3} maxLength={600} />\n <TextArea name={`${spec.name}.en`} label={`${nameOf(m, spec.name)} — ${m.english}`} rows={3} maxLength={600} />\n </div>\n );\n }\n}\n\n/** What the schema is asked: an emptied text is an absent setting (an optional id), an emptied language an absent language. */\nfunction normalise(values: unknown): unknown {\n if (Array.isArray(values)) return values;\n if (typeof values !== \"object\" || values === null) return values;\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(values)) {\n if (v === \"\") continue;\n const inner = typeof v === \"object\" && v !== null && !Array.isArray(v) ? normalise(v) : v;\n out[k] = inner;\n }\n return out;\n}\n\n/** Reports the form's values: a valid set goes to `onValid`, an invalid one to `onInvalid` (and never reaches the document). */\nfunction Commit({ def, onValid, onInvalid }: { def: SectionDefinition; onValid: (settings: Record<string, unknown>) => void; onInvalid: (invalid: boolean) => void }) {\n const { api } = useFormContext();\n const latest = React.useRef({ onValid, onInvalid });\n React.useEffect(() => {\n latest.current = { onValid, onInvalid };\n });\n React.useEffect(() => {\n const sub = (api.store as { subscribe: (cb: () => void) => unknown }).subscribe(() => {\n const result = def.settings.safeParse(normalise(api.state.values));\n latest.current.onInvalid(!result.success);\n if (result.success) latest.current.onValid(result.data as Record<string, unknown>);\n });\n return () => {\n const s = sub as { unsubscribe?: () => void } | (() => void);\n if (typeof s === \"function\") s();\n else s?.unsubscribe?.();\n };\n }, [api, def]);\n return null;\n}\n\nexport type SettingsFormProps = {\n section: Section;\n messages: ShopComposerMessages;\n /** A valid set of settings: the composer commits it. */\n onValid: (settings: Record<string, unknown>) => void;\n /** Whether the form holds a value the schema refuses (publish waits). */\n onInvalid: (invalid: boolean) => void;\n};\n\n/** The form of a section's settings: remount it (a `key`) when the document is changed from outside (undo, redo). */\nexport function SettingsForm({ section, messages: m, onValid, onInvalid }: Readonly<SettingsFormProps>) {\n const def = sectionDefinition(section.type);\n const factory = factoryFor(def);\n const form = factory.useForm({ defaultValues: section.settings as never }) as unknown as { Form: (p: { \"aria-label\": string; className?: string; children: React.ReactNode }) => React.ReactElement };\n const specs = describeSettings(def.settings);\n if (specs.length === 0) return null;\n return (\n <form.Form aria-label={m.settings} className=\"flex flex-col gap-4\">\n {specs.map((spec) => (\n <Field key={spec.name} spec={spec} m={m} />\n ))}\n <Commit def={def} onValid={onValid} onInvalid={onInvalid} />\n </form.Form>\n );\n}\n"
|
|
277
|
+
"content": "\"use client\";\n\n// The settings of a section, as a form generated from the zod schema of its type (ADR-007 §5): the form is `@krizaka/ui/form`\n// (TanStack Form behind the facade), the fields are the ones the schema describes (`fields.ts`). Every valid change is committed to\n// the document at once (so undo and the preview follow); an invalid value is said next to its field, stays in the field, and is\n// reported to the composer, which refuses to publish until it is fixed.\nimport { createKrizakaForm, FormField, Switch, TextArea, TextField, useFormContext } from \"@krizaka/ui/form\";\nimport { RadioGroup } from \"@krizaka/ui/radio-group\";\nimport * as React from \"react\";\n\nimport { type SectionDefinition, sectionDefinition } from \"../shop/catalogue\";\nimport type { Section } from \"../shop/schema\";\nimport { describeSettings, type FieldSpec } from \"./fields\";\nimport type { ShopComposerMessages } from \"./messages\";\n\ntype Factory = ReturnType<typeof createKrizakaForm>;\n// One form per section type, defined once (schema + defaults), as the facade asks.\nconst factories = new Map<string, Factory>();\nfunction factoryFor(def: SectionDefinition): Factory {\n let f = factories.get(def.type);\n if (!f) {\n f = createKrizakaForm({ schema: def.settings as never, defaultValues: def.settingsDefault as never }) as unknown as Factory;\n factories.set(def.type, f);\n }\n return f;\n}\n\nconst nameOf = (m: ShopComposerMessages, key: string) => m.settingNames[key] ?? key;\nconst optionName = (m: ShopComposerMessages, o: string | number) => m.optionNames[String(o)] ?? String(o);\n\nfunction Choice({ spec, m }: Readonly<{ spec: Extract<FieldSpec, { kind: \"choice\" }>; m: ShopComposerMessages }>) {\n return (\n <FormField name={spec.name}>\n {(f) => (\n <div className=\"grid gap-1.5\">\n <span aria-hidden className=\"text-xs font-semibold text-fg-secondary\">{nameOf(m, spec.name)}</span>\n <RadioGroup.Root label={nameOf(m, spec.name)} variant=\"segmented\" value={String(f.value)} onValueChange={(v) => f.setValue(spec.options.find((o) => String(o) === v))} onBlur={f.onBlur}>\n {spec.options.map((o) => (\n <RadioGroup.Segment key={String(o)} value={String(o)}>{optionName(m, o)}</RadioGroup.Segment>\n ))}\n </RadioGroup.Root>\n </div>\n )}\n </FormField>\n );\n}\n\nfunction Multi({ spec, m }: Readonly<{ spec: Extract<FieldSpec, { kind: \"multi\" }>; m: ShopComposerMessages }>) {\n return (\n <FormField name={spec.name}>\n {(f) => {\n const value = (f.value as string[] | undefined) ?? [];\n return (\n <fieldset className=\"m-0 flex flex-col gap-1.5 border-0 p-0\">\n <legend className=\"mb-1 text-xs font-semibold text-fg-secondary\">{nameOf(m, spec.name)}</legend>\n {spec.options.map((o) => (\n <label key={o} className=\"flex min-h-9 items-center gap-2 text-sm text-fg\">\n <input\n type=\"checkbox\"\n className=\"h-4 w-4 accent-accent\"\n checked={value.includes(o)}\n onChange={(e) => f.setValue(e.target.checked ? [...value, o] : value.filter((x) => x !== o))}\n />\n {optionName(m, o)}\n </label>\n ))}\n </fieldset>\n );\n }}\n </FormField>\n );\n}\n\nfunction Field({ spec, m }: Readonly<{ spec: FieldSpec; m: ShopComposerMessages }>) {\n switch (spec.kind) {\n case \"choice\":\n return <Choice spec={spec} m={m} />;\n case \"multi\":\n return <Multi spec={spec} m={m} />;\n case \"toggle\":\n return <Switch name={spec.name} label={nameOf(m, spec.name)} />;\n case \"text\":\n return <TextField name={spec.name} label={nameOf(m, spec.name)} />;\n case \"localized\":\n return (\n <div className=\"flex flex-col gap-2\">\n <TextArea name={`${spec.name}.fr`} label={`${nameOf(m, spec.name)} — ${m.french}`} rows={3} maxLength={600} />\n <TextArea name={`${spec.name}.en`} label={`${nameOf(m, spec.name)} — ${m.english}`} rows={3} maxLength={600} />\n </div>\n );\n }\n}\n\n/** What the schema is asked: an emptied text is an absent setting (an optional id), an emptied language an absent language. */\nfunction normalise(values: unknown): unknown {\n if (Array.isArray(values)) return values;\n if (typeof values !== \"object\" || values === null) return values;\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(values)) {\n if (v === \"\") continue;\n const inner = typeof v === \"object\" && v !== null && !Array.isArray(v) ? normalise(v) : v;\n out[k] = inner;\n }\n return out;\n}\n\n/** Reports the form's values: a valid set goes to `onValid`, an invalid one to `onInvalid` (and never reaches the document). */\nfunction Commit({ def, onValid, onInvalid }: Readonly<{ def: SectionDefinition; onValid: (settings: Record<string, unknown>) => void; onInvalid: (invalid: boolean) => void }>) {\n const { api } = useFormContext();\n const latest = React.useRef({ onValid, onInvalid });\n React.useEffect(() => {\n latest.current = { onValid, onInvalid };\n });\n React.useEffect(() => {\n const sub = (api.store as { subscribe: (cb: () => void) => unknown }).subscribe(() => {\n const result = def.settings.safeParse(normalise(api.state.values));\n latest.current.onInvalid(!result.success);\n if (result.success) latest.current.onValid(result.data as Record<string, unknown>);\n });\n return () => {\n const s = sub as { unsubscribe?: () => void } | (() => void);\n if (typeof s === \"function\") s();\n else s?.unsubscribe?.();\n };\n }, [api, def]);\n return null;\n}\n\nexport type SettingsFormProps = {\n section: Section;\n messages: ShopComposerMessages;\n /** A valid set of settings: the composer commits it. */\n onValid: (settings: Record<string, unknown>) => void;\n /** Whether the form holds a value the schema refuses (publish waits). */\n onInvalid: (invalid: boolean) => void;\n};\n\n/** The form of a section's settings: remount it (a `key`) when the document is changed from outside (undo, redo). */\nexport function SettingsForm({ section, messages: m, onValid, onInvalid }: Readonly<SettingsFormProps>) {\n const def = sectionDefinition(section.type);\n const factory = factoryFor(def);\n const form = factory.useForm({ defaultValues: section.settings as never }) as unknown as { Form: (p: { \"aria-label\": string; className?: string; children: React.ReactNode }) => React.ReactElement };\n const specs = describeSettings(def.settings);\n if (specs.length === 0) return null;\n return (\n <form.Form aria-label={m.settings} className=\"flex flex-col gap-4\">\n {specs.map((spec) => (\n <Field key={spec.name} spec={spec} m={m} />\n ))}\n <Commit def={def} onValid={onValid} onInvalid={onInvalid} />\n </form.Form>\n );\n}\n"
|
|
278
278
|
},
|
|
279
279
|
{
|
|
280
280
|
"path": "shop-composer/thumbnails.tsx",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"files": [
|
|
135
135
|
{
|
|
136
136
|
"path": "meta.ts",
|
|
137
|
-
"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 | \"notification-preferences\"\n | \"quota-meter\"\n | \"environment-notice\"\n | \"embed-facade\"\n | \"reviews\"\n | \"margin-layout\"\n | \"analysis-report\"\n | \"status-chip\"\n | \"kind-config-editor\"\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"architecture-diagram\"\n | \"bird-plate\"\n | \"taped-photo\"\n | \"stuck\"\n | \"doodle\"\n | \"signature\"\n | \"grade-stamp\"\n | \"versus-card\"\n | \"speed-lines\"\n | \"site-cahier\"\n | \"text-style\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"chapter\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-frame\"\n | \"desktop-window\"\n | \"form-flow\"\n | \"grid\"\n | \"list-detail\"\n | \"state-screen\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\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 | \"chip-row\"\n | \"columns\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"copy-button\"\n | \"money-input\"\n | \"price-catalogue-editor\"\n | \"promo-code-field\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\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 | \"engine-flow\"\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 | \"glossary\"\n | \"glossary-term\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\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 | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"identity-card\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"shop-gallery\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"schema-form\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\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 | \"wall\";\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 Sovkora 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 * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `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 = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the thirteen domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"abuse\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\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 /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\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 /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\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"
|
|
137
|
+
"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 | \"notification-preferences\"\n | \"quota-meter\"\n | \"environment-notice\"\n | \"platform-bar\"\n | \"embed-facade\"\n | \"reviews\"\n | \"margin-layout\"\n | \"analysis-report\"\n | \"status-chip\"\n | \"kind-config-editor\"\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"architecture-diagram\"\n | \"bird-plate\"\n | \"taped-photo\"\n | \"stuck\"\n | \"doodle\"\n | \"signature\"\n | \"grade-stamp\"\n | \"versus-card\"\n | \"speed-lines\"\n | \"site-cahier\"\n | \"text-style\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"chapter\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-frame\"\n | \"desktop-window\"\n | \"form-flow\"\n | \"grid\"\n | \"list-detail\"\n | \"state-screen\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\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 | \"chip-row\"\n | \"columns\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"copy-button\"\n | \"money-input\"\n | \"price-catalogue-editor\"\n | \"promo-code-field\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\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 | \"engine-flow\"\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 | \"glossary\"\n | \"glossary-term\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\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 | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"identity-card\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"shop-gallery\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"schema-form\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\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 | \"wall\";\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 Sovkora 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 * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `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 = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the thirteen domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"abuse\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\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 /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\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 /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\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"
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"path": "shop-gallery/index.ts",
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
156
|
"path": "shop-gallery/shop-gallery.tsx",
|
|
157
|
-
"content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { type ShopGalleryLabels, shopGalleryLabels } from \"./labels\";\n\n// The lightbox is a lazy chunk: nothing of it is loaded until a photo is opened.\nconst Lightbox = React.lazy(() => import(\"./lightbox\"));\n\nexport type ShopGalleryPhoto = {\n id: string;\n /** The tile's image. */\n src: string;\n /** What it shows, in words: the tile's name and the lightbox's caption. */\n alt: string;\n /** The widths the product holds (`/a-400.avif 400w, /a-800.avif 800w, /a-1200.avif 1200w`). */\n srcSet?: string;\n /** The lightbox's image at full resolution (default: `src`). */\n fullSrc?: string;\n fullSrcSet?: string;\n};\n\nexport type ShopGalleryProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n /** The shop's photos, in order, already unique. */\n photos: readonly ShopGalleryPhoto[];\n /** The gallery's accessible name (`Photos of the salon`). */\n label: string;\n /** The tiles' `sizes` (default: the bento's share of a 72 rem page on a desktop, 78 vw on a phone). */\n sizes?: string;\n /** Translated texts; `shopGalleryLabelsFr` for French. */\n labels?: Partial<ShopGalleryLabels>;\n};\n\nconst BENTO = 5;\n\nconst styles = `\n.kz-sg{position:relative}\n.kz-sg-list{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(2,1fr);gap:.5rem}\n.kz-sg-tile{position:relative;display:block;width:100%;height:100%;padding:0;overflow:hidden;cursor:zoom-in;border:1px solid var(--kz-border-subtle);border-radius:var(--kz-shop-photo-radius,.75rem);background:var(--kz-surface-2);color:var(--kz-text-on-media)}\n.kz-sg-tile img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}\n.kz-sg-tile:focus-visible{outline:2px solid var(--kz-ring);outline-offset:2px}\n.kz-sg-list>li{aspect-ratio:1/1;min-width:0}\n.kz-sg-list>li:first-child:nth-last-child(odd){grid-column:span 2;aspect-ratio:16/10}\n.kz-sg-more,.kz-sg-count{display:none}\n.kz-sg[data-strip=true] .kz-sg-list{display:flex;gap:.75rem;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin-inline:-1rem;padding-inline:1rem;scroll-padding-inline:1rem;-webkit-mask-image:linear-gradient(to right,transparent,currentcolor 1.25rem,currentcolor calc(100% - 1.25rem),transparent);mask-image:linear-gradient(to right,transparent,currentcolor 1.25rem,currentcolor calc(100% - 1.25rem),transparent)}\n.kz-sg[data-strip=true] .kz-sg-list::-webkit-scrollbar{display:none}\n.kz-sg[data-strip=true] .kz-sg-list>li{flex:0 0 78%;aspect-ratio:4/5;scroll-snap-align:start}\n.kz-sg[data-strip=true] .kz-sg-list>li:first-child:nth-last-child(odd){grid-column:auto;aspect-ratio:4/5}\n.kz-sg[data-strip=true] .kz-sg-count{display:block;margin:.5rem 0 0;text-align:end;font:600 .75rem/1 var(--kz-font-mono,monospace);color:var(--kz-text-secondary)}\n@media (prefers-reduced-motion:no-preference){.kz-sg[data-strip=true] .kz-sg-list{scroll-behavior:smooth}.kz-sg-tile img{transition:transform .35s ease}.kz-sg-tile:hover img{transform:scale(1.03)}}\n@media (min-width:40rem){\n.kz-sg-list{gap:.75rem}\n.kz-sg[data-strip=true] .kz-sg-list{display:grid;overflow:visible;margin-inline:0;padding-inline:0;-webkit-mask-image:none;mask-image:none}\n.kz-sg[data-strip=true] .kz-sg-count{display:none}\n.kz-sg[data-count=\"1\"] .kz-sg-list{grid-template-columns:1fr}\n.kz-sg[data-count=\"1\"] .kz-sg-list>li{aspect-ratio:16/9}\n.kz-sg[data-count=\"2\"] .kz-sg-list>li,.kz-sg[data-count=\"2\"] .kz-sg-list>li:first-child:nth-last-child(odd){aspect-ratio:4/3;grid-column:auto}\n.kz-sg:not([data-count=\"1\"]):not([data-count=\"2\"]) .kz-sg-list{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));aspect-ratio:2/1}\n.kz-sg:not([data-count=\"1\"]):not([data-count=\"2\"]) .kz-sg-list>li,.kz-sg[data-strip=true] .kz-sg-list>li{aspect-ratio:auto;flex:none}\n.kz-sg:not([data-count=\"1\"]):not([data-count=\"2\"]) .kz-sg-list>li:first-child{grid-column:1/3;grid-row:1/3;aspect-ratio:auto}\n.kz-sg[data-count=\"3\"] .kz-sg-list>li:nth-child(n+2){grid-column:3/5}\n.kz-sg[data-count=\"4\"] .kz-sg-list>li:nth-child(2){grid-column:3/5}\n.kz-sg[data-strip=true] .kz-sg-list>li:nth-child(n+6){display:none}\n.kz-sg[data-more=true] .kz-sg-list>li:nth-child(5) .kz-sg-more{position:absolute;inset:0;display:grid;place-items:center;background:color-mix(in srgb,var(--kz-scrim-strong) 62%,transparent);font:700 1.125rem/1.2 var(--kz-font-sans,system-ui);text-align:center}\n}\n`;\n\n/** A shop's photos: a bento mosaic (one 2×2 lead and four tiles, the last one « + N photos »), a snap strip on a phone, and a lightbox. */\nexport function ShopGallery({ photos, label, sizes, labels: given, className, ...props }: ShopGalleryProps) {\n const labels = { ...shopGalleryLabels, ...given };\n const total = photos.length;\n const strip = total >= BENTO;\n const [open, setOpen] = React.useState<number | null>(null);\n const [current, setCurrent] = React.useState(1);\n const tiles = React.useRef<(HTMLButtonElement | null)[]>([]);\n const opener = React.useRef<number>(0);\n if (total === 0) return null;\n\n const tileSizes = sizes ?? (strip ? \"(min-width: 40rem) 36rem, 78vw\" : \"(min-width: 40rem) 36rem, 50vw\");\n const onScroll = (event: React.UIEvent<HTMLUListElement>) => {\n const list = event.currentTarget;\n const first = list.children[0] as HTMLElement | undefined;\n const step = first ? first.offsetWidth + 12 : 0;\n if (step > 0) setCurrent(Math.min(total, Math.max(1, Math.round(list.scrollLeft / step) + 1)));\n };\n return (\n <div className={cn(\"kz-sg\", className)} data-count={total} data-strip={strip || undefined} data-more={total > BENTO || undefined} role=\"group\" aria-label={label} {...props}>\n <style>{styles}</style>\n <ul className=\"kz-sg-list\" onScroll={strip ? onScroll : undefined}>\n {photos.map((photo, i) => (\n <li key={photo.id}>\n <button\n type=\"button\"\n ref={(node) => {\n tiles.current[i] = node;\n }}\n className=\"kz-sg-tile\"\n aria-label={i === BENTO - 1 && total > BENTO ? `${labels.more(total - BENTO + 1)}: ${labels.open(photo.alt, i + 1, total)}` : labels.open(photo.alt, i + 1, total)}\n onClick={() => {\n opener.current = i;\n setOpen(i);\n }}\n >\n <img src={photo.src} srcSet={photo.srcSet} sizes={photo.srcSet ? tileSizes : undefined} alt=\"\" loading=\"lazy\" decoding=\"async\" />\n {i === BENTO - 1 && total > BENTO && <span className=\"kz-sg-more\" aria-hidden>{labels.more(total - BENTO + 1)}</span>}\n </button>\n </li>\n ))}\n </ul>\n {strip && <p className=\"kz-sg-count\" aria-hidden>{labels.counter(current, total)}</p>}\n {open !== null && (\n <React.Suspense fallback={null}>\n <Lightbox\n photos={photos}\n index={open}\n onIndexChange={setOpen}\n onClose={() => setOpen(null)}\n label={label}\n labels={labels}\n returnFocus={() => tiles.current[opener.current] ?? null}\n />\n </React.Suspense>\n )}\n </div>\n );\n}\n"
|
|
157
|
+
"content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { type ShopGalleryLabels, shopGalleryLabels } from \"./labels\";\n\n// The lightbox is a lazy chunk: nothing of it is loaded until a photo is opened.\nconst Lightbox = React.lazy(() => import(\"./lightbox\"));\n\nexport type ShopGalleryPhoto = {\n id: string;\n /** The tile's image. */\n src: string;\n /** What it shows, in words: the tile's name and the lightbox's caption. */\n alt: string;\n /** The widths the product holds (`/a-400.avif 400w, /a-800.avif 800w, /a-1200.avif 1200w`). */\n srcSet?: string;\n /** The lightbox's image at full resolution (default: `src`). */\n fullSrc?: string;\n fullSrcSet?: string;\n};\n\nexport type ShopGalleryProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n /** The shop's photos, in order, already unique. */\n photos: readonly ShopGalleryPhoto[];\n /** The gallery's accessible name (`Photos of the salon`). */\n label: string;\n /** The tiles' `sizes` (default: the bento's share of a 72 rem page on a desktop, 78 vw on a phone). */\n sizes?: string;\n /** Translated texts; `shopGalleryLabelsFr` for French. */\n labels?: Partial<ShopGalleryLabels>;\n};\n\nconst BENTO = 5;\n\nconst styles = `\n.kz-sg{position:relative}\n.kz-sg-list{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(2,1fr);gap:.5rem}\n.kz-sg-tile{position:relative;display:block;width:100%;height:100%;padding:0;overflow:hidden;cursor:zoom-in;border:1px solid var(--kz-border-subtle);border-radius:var(--kz-shop-photo-radius,.75rem);background:var(--kz-surface-2);color:var(--kz-text-on-media)}\n.kz-sg-tile img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}\n.kz-sg-tile:focus-visible{outline:2px solid var(--kz-ring);outline-offset:2px}\n.kz-sg-list>li{aspect-ratio:1/1;min-width:0}\n.kz-sg-list>li:first-child:nth-last-child(odd){grid-column:span 2;aspect-ratio:16/10}\n.kz-sg-more,.kz-sg-count{display:none}\n.kz-sg[data-strip=true] .kz-sg-list{display:flex;gap:.75rem;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin-inline:-1rem;padding-inline:1rem;scroll-padding-inline:1rem;-webkit-mask-image:linear-gradient(to right,transparent,currentcolor 1.25rem,currentcolor calc(100% - 1.25rem),transparent);mask-image:linear-gradient(to right,transparent,currentcolor 1.25rem,currentcolor calc(100% - 1.25rem),transparent)}\n.kz-sg[data-strip=true] .kz-sg-list::-webkit-scrollbar{display:none}\n.kz-sg[data-strip=true] .kz-sg-list>li{flex:0 0 78%;aspect-ratio:4/5;scroll-snap-align:start}\n.kz-sg[data-strip=true] .kz-sg-list>li:first-child:nth-last-child(odd){grid-column:auto;aspect-ratio:4/5}\n.kz-sg[data-strip=true] .kz-sg-count{display:block;margin:.5rem 0 0;text-align:end;font:600 .75rem/1 var(--kz-font-mono,monospace);color:var(--kz-text-secondary)}\n@media (prefers-reduced-motion:no-preference){.kz-sg[data-strip=true] .kz-sg-list{scroll-behavior:smooth}.kz-sg-tile img{transition:transform .35s ease}.kz-sg-tile:hover img{transform:scale(1.03)}}\n@media (min-width:40rem){\n.kz-sg-list{gap:.75rem}\n.kz-sg[data-strip=true] .kz-sg-list{display:grid;overflow:visible;margin-inline:0;padding-inline:0;-webkit-mask-image:none;mask-image:none}\n.kz-sg[data-strip=true] .kz-sg-count{display:none}\n.kz-sg[data-count=\"1\"] .kz-sg-list{grid-template-columns:1fr}\n.kz-sg[data-count=\"1\"] .kz-sg-list>li{aspect-ratio:16/9}\n.kz-sg[data-count=\"2\"] .kz-sg-list>li,.kz-sg[data-count=\"2\"] .kz-sg-list>li:first-child:nth-last-child(odd){aspect-ratio:4/3;grid-column:auto}\n.kz-sg:not([data-count=\"1\"]):not([data-count=\"2\"]) .kz-sg-list{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));aspect-ratio:2/1}\n.kz-sg:not([data-count=\"1\"]):not([data-count=\"2\"]) .kz-sg-list>li,.kz-sg[data-strip=true] .kz-sg-list>li{aspect-ratio:auto;flex:none}\n.kz-sg:not([data-count=\"1\"]):not([data-count=\"2\"]) .kz-sg-list>li:first-child{grid-column:1/3;grid-row:1/3;aspect-ratio:auto}\n.kz-sg[data-count=\"3\"] .kz-sg-list>li:nth-child(n+2){grid-column:3/5}\n.kz-sg[data-count=\"4\"] .kz-sg-list>li:nth-child(2){grid-column:3/5}\n.kz-sg[data-strip=true] .kz-sg-list>li:nth-child(n+6){display:none}\n.kz-sg[data-more=true] .kz-sg-list>li:nth-child(5) .kz-sg-more{position:absolute;inset:0;display:grid;place-items:center;background:color-mix(in srgb,var(--kz-scrim-strong) 62%,transparent);font:700 1.125rem/1.2 var(--kz-font-sans,system-ui);text-align:center}\n}\n`;\n\n/** A shop's photos: a bento mosaic (one 2×2 lead and four tiles, the last one « + N photos »), a snap strip on a phone, and a lightbox. */\nexport function ShopGallery({ photos, label, sizes, labels: given, className, ...props }: Readonly<ShopGalleryProps>) {\n const labels = { ...shopGalleryLabels, ...given };\n const total = photos.length;\n const strip = total >= BENTO;\n const [open, setOpen] = React.useState<number | null>(null);\n const [current, setCurrent] = React.useState(1);\n const tiles = React.useRef<(HTMLButtonElement | null)[]>([]);\n const opener = React.useRef<number>(0);\n if (total === 0) return null;\n\n const tileSizes = sizes ?? (strip ? \"(min-width: 40rem) 36rem, 78vw\" : \"(min-width: 40rem) 36rem, 50vw\");\n const onScroll = (event: React.UIEvent<HTMLUListElement>) => {\n const list = event.currentTarget;\n const first = list.children[0] as HTMLElement | undefined;\n const step = first ? first.offsetWidth + 12 : 0;\n if (step > 0) setCurrent(Math.min(total, Math.max(1, Math.round(list.scrollLeft / step) + 1)));\n };\n return (\n <div className={cn(\"kz-sg\", className)} data-count={total} data-strip={strip || undefined} data-more={total > BENTO || undefined} role=\"group\" aria-label={label} {...props}>\n <style>{styles}</style>\n <ul className=\"kz-sg-list\" onScroll={strip ? onScroll : undefined}>\n {photos.map((photo, i) => (\n <li key={photo.id}>\n <button\n type=\"button\"\n ref={(node) => {\n tiles.current[i] = node;\n }}\n className=\"kz-sg-tile\"\n aria-label={i === BENTO - 1 && total > BENTO ? `${labels.more(total - BENTO + 1)}: ${labels.open(photo.alt, i + 1, total)}` : labels.open(photo.alt, i + 1, total)}\n onClick={() => {\n opener.current = i;\n setOpen(i);\n }}\n >\n <img src={photo.src} srcSet={photo.srcSet} sizes={photo.srcSet ? tileSizes : undefined} alt=\"\" loading=\"lazy\" decoding=\"async\" />\n {i === BENTO - 1 && total > BENTO && <span className=\"kz-sg-more\" aria-hidden>{labels.more(total - BENTO + 1)}</span>}\n </button>\n </li>\n ))}\n </ul>\n {strip && <p className=\"kz-sg-count\" aria-hidden>{labels.counter(current, total)}</p>}\n {open !== null && (\n <React.Suspense fallback={null}>\n <Lightbox\n photos={photos}\n index={open}\n onIndexChange={setOpen}\n onClose={() => setOpen(null)}\n label={label}\n labels={labels}\n returnFocus={() => tiles.current[opener.current] ?? null}\n />\n </React.Suspense>\n )}\n </div>\n );\n}\n"
|
|
158
158
|
}
|
|
159
159
|
],
|
|
160
160
|
"dependencies": [],
|