@bergetai/ui 0.14.2 → 0.16.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 +32 -46
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/components/alert/Alert.cjs +31 -0
- package/dist/components/alert/Alert.cjs.map +1 -0
- package/dist/components/alert/Alert.d.cts +14 -0
- package/dist/components/alert/Alert.d.cts.map +1 -0
- package/dist/components/alert/Alert.d.mts +14 -0
- package/dist/components/alert/Alert.d.mts.map +1 -0
- package/dist/components/alert/Alert.mjs +27 -0
- package/dist/components/alert/Alert.mjs.map +1 -0
- package/dist/components/alert/index.d.cts +3 -0
- package/dist/components/alert/index.d.mts +3 -0
- package/dist/components/alert-dialog/AlertDialog.cjs +95 -0
- package/dist/components/alert-dialog/AlertDialog.cjs.map +1 -0
- package/dist/components/alert-dialog/AlertDialog.d.cts +46 -0
- package/dist/components/alert-dialog/AlertDialog.d.cts.map +1 -0
- package/dist/components/alert-dialog/AlertDialog.d.mts +46 -0
- package/dist/components/alert-dialog/AlertDialog.d.mts.map +1 -0
- package/dist/components/alert-dialog/AlertDialog.mjs +83 -0
- package/dist/components/alert-dialog/AlertDialog.mjs.map +1 -0
- package/dist/components/alert-dialog/index.d.cts +2 -0
- package/dist/components/alert-dialog/index.d.mts +2 -0
- package/dist/components/badge/Badge.cjs +57 -0
- package/dist/components/badge/Badge.cjs.map +1 -0
- package/dist/components/badge/Badge.d.cts +16 -0
- package/dist/components/badge/Badge.d.cts.map +1 -0
- package/dist/components/badge/Badge.d.mts +16 -0
- package/dist/components/badge/Badge.d.mts.map +1 -0
- package/dist/components/badge/Badge.mjs +55 -0
- package/dist/components/badge/Badge.mjs.map +1 -0
- package/dist/components/badge/index.d.cts +2 -0
- package/dist/components/badge/index.d.mts +2 -0
- package/dist/components/berget-logo/BergetLogo.cjs +87 -0
- package/dist/components/berget-logo/BergetLogo.cjs.map +1 -0
- package/dist/components/berget-logo/BergetLogo.d.cts +14 -0
- package/dist/components/berget-logo/BergetLogo.d.cts.map +1 -0
- package/dist/components/berget-logo/BergetLogo.d.mts +14 -0
- package/dist/components/berget-logo/BergetLogo.d.mts.map +1 -0
- package/dist/components/berget-logo/BergetLogo.mjs +85 -0
- package/dist/components/berget-logo/BergetLogo.mjs.map +1 -0
- package/dist/components/berget-logo/index.d.cts +2 -0
- package/dist/components/berget-logo/index.d.mts +2 -0
- package/dist/components/box/Box.cjs +67 -0
- package/dist/components/box/Box.cjs.map +1 -0
- package/dist/components/box/Box.d.cts +21 -0
- package/dist/components/box/Box.d.cts.map +1 -0
- package/dist/components/box/Box.d.mts +21 -0
- package/dist/components/box/Box.d.mts.map +1 -0
- package/dist/components/box/Box.mjs +64 -0
- package/dist/components/box/Box.mjs.map +1 -0
- package/dist/components/box/index.d.cts +2 -0
- package/dist/components/box/index.d.mts +2 -0
- package/dist/components/bubble/index.d.cts +2 -0
- package/dist/components/bubble/index.d.mts +2 -0
- package/dist/components/button/Button.cjs +75 -0
- package/dist/components/button/Button.cjs.map +1 -0
- package/dist/components/button/Button.d.cts +19 -0
- package/dist/components/button/Button.d.cts.map +1 -0
- package/dist/components/button/Button.d.mts +19 -0
- package/dist/components/button/Button.d.mts.map +1 -0
- package/dist/components/button/Button.mjs +74 -0
- package/dist/components/button/Button.mjs.map +1 -0
- package/dist/components/button/index.d.cts +3 -0
- package/dist/components/button/index.d.mts +3 -0
- package/dist/components/card/Card.cjs +36 -0
- package/dist/components/card/Card.cjs.map +1 -0
- package/dist/components/card/Card.d.cts +15 -0
- package/dist/components/card/Card.d.cts.map +1 -0
- package/dist/components/card/Card.d.mts +15 -0
- package/dist/components/card/Card.d.mts.map +1 -0
- package/dist/components/card/Card.mjs +28 -0
- package/dist/components/card/Card.mjs.map +1 -0
- package/dist/components/card/index.d.cts +3 -0
- package/dist/components/card/index.d.mts +3 -0
- package/dist/components/checkbox/Checkbox.cjs +87 -0
- package/dist/components/checkbox/Checkbox.cjs.map +1 -0
- package/dist/components/checkbox/Checkbox.d.cts +18 -0
- package/dist/components/checkbox/Checkbox.d.cts.map +1 -0
- package/dist/components/checkbox/Checkbox.d.mts +18 -0
- package/dist/components/checkbox/Checkbox.d.mts.map +1 -0
- package/dist/components/checkbox/Checkbox.mjs +84 -0
- package/dist/components/checkbox/Checkbox.mjs.map +1 -0
- package/dist/components/checkbox/index.d.cts +2 -0
- package/dist/components/checkbox/index.d.mts +2 -0
- package/dist/components/code-block/CodeBlock.cjs +58 -0
- package/dist/components/code-block/CodeBlock.cjs.map +1 -0
- package/dist/components/code-block/CodeBlock.d.cts +10 -0
- package/dist/components/code-block/CodeBlock.d.cts.map +1 -0
- package/dist/components/code-block/CodeBlock.d.mts +10 -0
- package/dist/components/code-block/CodeBlock.d.mts.map +1 -0
- package/dist/components/code-block/CodeBlock.mjs +58 -0
- package/dist/components/code-block/CodeBlock.mjs.map +1 -0
- package/dist/components/container/Container.cjs +50 -0
- package/dist/components/container/Container.cjs.map +1 -0
- package/dist/components/container/Container.d.cts +17 -0
- package/dist/components/container/Container.d.cts.map +1 -0
- package/dist/components/container/Container.d.mts +17 -0
- package/dist/components/container/Container.d.mts.map +1 -0
- package/dist/components/container/Container.mjs +47 -0
- package/dist/components/container/Container.mjs.map +1 -0
- package/dist/components/container/index.d.cts +2 -0
- package/dist/components/container/index.d.mts +2 -0
- package/dist/components/country-select/CountrySelect.cjs +95 -0
- package/dist/components/country-select/CountrySelect.cjs.map +1 -0
- package/dist/components/country-select/CountrySelect.d.cts +16 -0
- package/dist/components/country-select/CountrySelect.d.cts.map +1 -0
- package/dist/components/country-select/CountrySelect.d.mts +16 -0
- package/dist/components/country-select/CountrySelect.d.mts.map +1 -0
- package/dist/components/country-select/CountrySelect.mjs +93 -0
- package/dist/components/country-select/CountrySelect.mjs.map +1 -0
- package/dist/components/country-select/countries.cjs +409 -0
- package/dist/components/country-select/countries.cjs.map +1 -0
- package/dist/components/country-select/countries.d.cts +17 -0
- package/dist/components/country-select/countries.d.cts.map +1 -0
- package/dist/components/country-select/countries.d.mts +17 -0
- package/dist/components/country-select/countries.d.mts.map +1 -0
- package/dist/components/country-select/countries.mjs +405 -0
- package/dist/components/country-select/countries.mjs.map +1 -0
- package/dist/components/country-select/index.d.cts +3 -0
- package/dist/components/country-select/index.d.mts +3 -0
- package/dist/components/dialog/Dialog.cjs +85 -0
- package/dist/components/dialog/Dialog.cjs.map +1 -0
- package/dist/components/dialog/Dialog.d.cts +35 -0
- package/dist/components/dialog/Dialog.d.cts.map +1 -0
- package/dist/components/dialog/Dialog.d.mts +35 -0
- package/dist/components/dialog/Dialog.d.mts.map +1 -0
- package/dist/components/dialog/Dialog.mjs +74 -0
- package/dist/components/dialog/Dialog.mjs.map +1 -0
- package/dist/components/dialog/index.d.cts +2 -0
- package/dist/components/dialog/index.d.mts +2 -0
- package/dist/components/divider/Divider.cjs +72 -0
- package/dist/components/divider/Divider.cjs.map +1 -0
- package/dist/components/divider/Divider.mjs +70 -0
- package/dist/components/divider/Divider.mjs.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenu.cjs +101 -0
- package/dist/components/dropdown-menu/DropdownMenu.cjs.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.cts +62 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.cts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.mts +62 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.mts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenu.mjs +85 -0
- package/dist/components/dropdown-menu/DropdownMenu.mjs.map +1 -0
- package/dist/components/dropdown-menu/index.d.cts +3 -0
- package/dist/components/dropdown-menu/index.d.mts +3 -0
- package/dist/components/empty/Empty.cjs +51 -0
- package/dist/components/empty/Empty.cjs.map +1 -0
- package/dist/components/empty/Empty.d.cts +17 -0
- package/dist/components/empty/Empty.d.cts.map +1 -0
- package/dist/components/empty/Empty.d.mts +17 -0
- package/dist/components/empty/Empty.d.mts.map +1 -0
- package/dist/components/empty/Empty.mjs +44 -0
- package/dist/components/empty/Empty.mjs.map +1 -0
- package/dist/components/empty/index.d.cts +3 -0
- package/dist/components/empty/index.d.mts +3 -0
- package/dist/components/field/index.d.cts +2 -0
- package/dist/components/field/index.d.mts +2 -0
- package/dist/components/fog-illustration/FogIllustration.cjs +342 -0
- package/dist/components/fog-illustration/FogIllustration.cjs.map +1 -0
- package/dist/components/fog-illustration/FogIllustration.d.cts +35 -0
- package/dist/components/fog-illustration/FogIllustration.d.cts.map +1 -0
- package/dist/components/fog-illustration/FogIllustration.d.mts +35 -0
- package/dist/components/fog-illustration/FogIllustration.d.mts.map +1 -0
- package/dist/components/fog-illustration/FogIllustration.mjs +341 -0
- package/dist/components/fog-illustration/FogIllustration.mjs.map +1 -0
- package/dist/components/grid/Grid.cjs +51 -0
- package/dist/components/grid/Grid.cjs.map +1 -0
- package/dist/components/grid/Grid.d.cts +25 -0
- package/dist/components/grid/Grid.d.cts.map +1 -0
- package/dist/components/grid/Grid.d.mts +25 -0
- package/dist/components/grid/Grid.d.mts.map +1 -0
- package/dist/components/grid/Grid.mjs +48 -0
- package/dist/components/grid/Grid.mjs.map +1 -0
- package/dist/components/grid/index.d.cts +2 -0
- package/dist/components/grid/index.d.mts +2 -0
- package/dist/components/icon/Icon.cjs +30 -0
- package/dist/components/icon/Icon.cjs.map +1 -0
- package/dist/components/icon/Icon.d.cts +14 -0
- package/dist/components/icon/Icon.d.cts.map +1 -0
- package/dist/components/icon/Icon.d.mts +14 -0
- package/dist/components/icon/Icon.d.mts.map +1 -0
- package/dist/components/icon/Icon.mjs +28 -0
- package/dist/components/icon/Icon.mjs.map +1 -0
- package/dist/components/icon/index.d.cts +2 -0
- package/dist/components/icon/index.d.mts +2 -0
- package/dist/components/input/index.d.cts +2 -0
- package/dist/components/input/index.d.mts +2 -0
- package/dist/components/input-group/InputGroup.cjs +41 -0
- package/dist/components/input-group/InputGroup.cjs.map +1 -0
- package/dist/components/input-group/InputGroup.d.cts +33 -0
- package/dist/components/input-group/InputGroup.d.cts.map +1 -0
- package/dist/components/input-group/InputGroup.d.mts +33 -0
- package/dist/components/input-group/InputGroup.d.mts.map +1 -0
- package/dist/components/input-group/InputGroup.mjs +36 -0
- package/dist/components/input-group/InputGroup.mjs.map +1 -0
- package/dist/components/input-group/index.d.cts +3 -0
- package/dist/components/input-group/index.d.mts +3 -0
- package/dist/components/item/Item.cjs +65 -0
- package/dist/components/item/Item.cjs.map +1 -0
- package/dist/components/item/Item.d.cts +24 -0
- package/dist/components/item/Item.d.cts.map +1 -0
- package/dist/components/item/Item.d.mts +24 -0
- package/dist/components/item/Item.d.mts.map +1 -0
- package/dist/components/item/Item.mjs +54 -0
- package/dist/components/item/Item.mjs.map +1 -0
- package/dist/components/item/index.d.cts +3 -0
- package/dist/components/item/index.d.mts +3 -0
- package/dist/components/label/index.d.cts +2 -0
- package/dist/components/label/index.d.mts +2 -0
- package/dist/components/language-select/LanguageSelect.cjs +48 -0
- package/dist/components/language-select/LanguageSelect.cjs.map +1 -0
- package/dist/components/language-select/LanguageSelect.d.cts +17 -0
- package/dist/components/language-select/LanguageSelect.d.cts.map +1 -0
- package/dist/components/language-select/LanguageSelect.d.mts +17 -0
- package/dist/components/language-select/LanguageSelect.d.mts.map +1 -0
- package/dist/components/language-select/LanguageSelect.mjs +46 -0
- package/dist/components/language-select/LanguageSelect.mjs.map +1 -0
- package/dist/components/language-select/index.d.cts +2 -0
- package/dist/components/language-select/index.d.mts +2 -0
- package/dist/components/link/Link.cjs +71 -0
- package/dist/components/link/Link.cjs.map +1 -0
- package/dist/components/link/Link.d.cts +18 -0
- package/dist/components/link/Link.d.cts.map +1 -0
- package/dist/components/link/Link.d.mts +18 -0
- package/dist/components/link/Link.d.mts.map +1 -0
- package/dist/components/link/Link.mjs +68 -0
- package/dist/components/link/Link.mjs.map +1 -0
- package/dist/components/link/index.d.cts +2 -0
- package/dist/components/link/index.d.mts +2 -0
- package/dist/components/list/List.cjs +71 -0
- package/dist/components/list/List.cjs.map +1 -0
- package/dist/components/list/List.d.cts +24 -0
- package/dist/components/list/List.d.cts.map +1 -0
- package/dist/components/list/List.d.mts +24 -0
- package/dist/components/list/List.d.mts.map +1 -0
- package/dist/components/list/List.mjs +66 -0
- package/dist/components/list/List.mjs.map +1 -0
- package/dist/components/list/index.d.cts +2 -0
- package/dist/components/list/index.d.mts +2 -0
- package/dist/components/message/index.d.cts +2 -0
- package/dist/components/message/index.d.mts +2 -0
- package/dist/components/message-scroller/index.d.cts +2 -0
- package/dist/components/message-scroller/index.d.mts +2 -0
- package/dist/components/model-card/ModelCard.cjs +108 -0
- package/dist/components/model-card/ModelCard.cjs.map +1 -0
- package/dist/components/model-card/ModelCard.d.cts +58 -0
- package/dist/components/model-card/ModelCard.d.cts.map +1 -0
- package/dist/components/model-card/ModelCard.d.mts +58 -0
- package/dist/components/model-card/ModelCard.d.mts.map +1 -0
- package/dist/components/model-card/ModelCard.mjs +106 -0
- package/dist/components/model-card/ModelCard.mjs.map +1 -0
- package/dist/components/model-card/index.d.cts +3 -0
- package/dist/components/model-card/index.d.mts +3 -0
- package/dist/components/model-logo/ModelLogo.cjs +98 -0
- package/dist/components/model-logo/ModelLogo.cjs.map +1 -0
- package/dist/components/model-logo/ModelLogo.d.cts +32 -0
- package/dist/components/model-logo/ModelLogo.d.cts.map +1 -0
- package/dist/components/model-logo/ModelLogo.d.mts +32 -0
- package/dist/components/model-logo/ModelLogo.d.mts.map +1 -0
- package/dist/components/model-logo/ModelLogo.mjs +95 -0
- package/dist/components/model-logo/ModelLogo.mjs.map +1 -0
- package/dist/components/model-logo/index.d.cts +2 -0
- package/dist/components/model-logo/index.d.mts +2 -0
- package/dist/components/navigation-menu/NavigationMenu.cjs +65 -0
- package/dist/components/navigation-menu/NavigationMenu.cjs.map +1 -0
- package/dist/components/navigation-menu/NavigationMenu.d.cts +11 -0
- package/dist/components/navigation-menu/NavigationMenu.d.cts.map +1 -0
- package/dist/components/navigation-menu/NavigationMenu.d.mts +11 -0
- package/dist/components/navigation-menu/NavigationMenu.d.mts.map +1 -0
- package/dist/components/navigation-menu/NavigationMenu.mjs +57 -0
- package/dist/components/navigation-menu/NavigationMenu.mjs.map +1 -0
- package/dist/components/navigation-menu/index.d.cts +3 -0
- package/dist/components/navigation-menu/index.d.mts +3 -0
- package/dist/components/neural-flow/NeuralFlow.cjs +1038 -0
- package/dist/components/neural-flow/NeuralFlow.cjs.map +1 -0
- package/dist/components/neural-flow/NeuralFlow.d.cts +47 -0
- package/dist/components/neural-flow/NeuralFlow.d.cts.map +1 -0
- package/dist/components/neural-flow/NeuralFlow.d.mts +47 -0
- package/dist/components/neural-flow/NeuralFlow.d.mts.map +1 -0
- package/dist/components/neural-flow/NeuralFlow.mjs +1032 -0
- package/dist/components/neural-flow/NeuralFlow.mjs.map +1 -0
- package/dist/components/neural-flow/index.d.cts +2 -0
- package/dist/components/neural-flow/index.d.mts +2 -0
- package/dist/components/neural-flow/mnist-samples.cjs +73 -0
- package/dist/components/neural-flow/mnist-samples.cjs.map +1 -0
- package/dist/components/neural-flow/mnist-samples.mjs +73 -0
- package/dist/components/neural-flow/mnist-samples.mjs.map +1 -0
- package/dist/components/neural-flow/sparse-weights.cjs +21 -0
- package/dist/components/neural-flow/sparse-weights.cjs.map +1 -0
- package/dist/components/neural-flow/sparse-weights.mjs +21 -0
- package/dist/components/neural-flow/sparse-weights.mjs.map +1 -0
- package/dist/components/progress/Progress.cjs +25 -0
- package/dist/components/progress/Progress.cjs.map +1 -0
- package/dist/components/progress/Progress.d.cts +8 -0
- package/dist/components/progress/Progress.d.cts.map +1 -0
- package/dist/components/progress/Progress.d.mts +8 -0
- package/dist/components/progress/Progress.d.mts.map +1 -0
- package/dist/components/progress/Progress.mjs +19 -0
- package/dist/components/progress/Progress.mjs.map +1 -0
- package/dist/components/progress/index.d.cts +3 -0
- package/dist/components/progress/index.d.mts +3 -0
- package/dist/components/search-input/SearchInput.cjs +28 -0
- package/dist/components/search-input/SearchInput.cjs.map +1 -0
- package/dist/components/search-input/SearchInput.d.cts +10 -0
- package/dist/components/search-input/SearchInput.d.cts.map +1 -0
- package/dist/components/search-input/SearchInput.d.mts +10 -0
- package/dist/components/search-input/SearchInput.d.mts.map +1 -0
- package/dist/components/search-input/SearchInput.mjs +26 -0
- package/dist/components/search-input/SearchInput.mjs.map +1 -0
- package/dist/components/search-input/index.d.cts +2 -0
- package/dist/components/search-input/index.d.mts +2 -0
- package/dist/components/select/index.d.cts +2 -0
- package/dist/components/select/index.d.mts +2 -0
- package/dist/components/sidebar/Sidebar.cjs +203 -0
- package/dist/components/sidebar/Sidebar.cjs.map +1 -0
- package/dist/components/sidebar/Sidebar.d.cts +69 -0
- package/dist/components/sidebar/Sidebar.d.cts.map +1 -0
- package/dist/components/sidebar/Sidebar.d.mts +69 -0
- package/dist/components/sidebar/Sidebar.d.mts.map +1 -0
- package/dist/components/sidebar/Sidebar.mjs +150 -0
- package/dist/components/sidebar/Sidebar.mjs.map +1 -0
- package/dist/components/sidebar/index.d.cts +3 -0
- package/dist/components/sidebar/index.d.mts +3 -0
- package/dist/components/skeleton/Skeleton.cjs +20 -0
- package/dist/components/skeleton/Skeleton.cjs.map +1 -0
- package/dist/components/skeleton/Skeleton.d.cts +7 -0
- package/dist/components/skeleton/Skeleton.d.cts.map +1 -0
- package/dist/components/skeleton/Skeleton.d.mts +7 -0
- package/dist/components/skeleton/Skeleton.d.mts.map +1 -0
- package/dist/components/skeleton/Skeleton.mjs +18 -0
- package/dist/components/skeleton/Skeleton.mjs.map +1 -0
- package/dist/components/skeleton/index.d.cts +2 -0
- package/dist/components/skeleton/index.d.mts +2 -0
- package/dist/components/slider/Slider.cjs +23 -0
- package/dist/components/slider/Slider.cjs.map +1 -0
- package/dist/components/slider/Slider.d.cts +20 -0
- package/dist/components/slider/Slider.d.cts.map +1 -0
- package/dist/components/slider/Slider.d.mts +20 -0
- package/dist/components/slider/Slider.d.mts.map +1 -0
- package/dist/components/slider/Slider.mjs +23 -0
- package/dist/components/slider/Slider.mjs.map +1 -0
- package/dist/components/slider/index.d.cts +2 -0
- package/dist/components/slider/index.d.mts +2 -0
- package/dist/components/switch/Switch.cjs +85 -0
- package/dist/components/switch/Switch.cjs.map +1 -0
- package/dist/components/switch/Switch.d.cts +21 -0
- package/dist/components/switch/Switch.d.cts.map +1 -0
- package/dist/components/switch/Switch.d.mts +21 -0
- package/dist/components/switch/Switch.d.mts.map +1 -0
- package/dist/components/switch/Switch.mjs +81 -0
- package/dist/components/switch/Switch.mjs.map +1 -0
- package/dist/components/switch/index.d.cts +2 -0
- package/dist/components/switch/index.d.mts +2 -0
- package/dist/components/table/Table.cjs +67 -0
- package/dist/components/table/Table.cjs.map +1 -0
- package/dist/components/table/Table.d.cts +13 -0
- package/dist/components/table/Table.d.cts.map +1 -0
- package/dist/components/table/Table.d.mts +13 -0
- package/dist/components/table/Table.d.mts.map +1 -0
- package/dist/components/table/Table.mjs +58 -0
- package/dist/components/table/Table.mjs.map +1 -0
- package/dist/components/table/index.d.cts +2 -0
- package/dist/components/table/index.d.mts +2 -0
- package/dist/components/text-area/index.d.cts +2 -0
- package/dist/components/text-area/index.d.mts +2 -0
- package/dist/components/theme-provider/ThemeProvider.cjs +81 -0
- package/dist/components/theme-provider/ThemeProvider.cjs.map +1 -0
- package/dist/components/theme-provider/ThemeProvider.d.cts +21 -0
- package/dist/components/theme-provider/ThemeProvider.d.cts.map +1 -0
- package/dist/components/theme-provider/ThemeProvider.d.mts +21 -0
- package/dist/components/theme-provider/ThemeProvider.d.mts.map +1 -0
- package/dist/components/theme-provider/ThemeProvider.mjs +78 -0
- package/dist/components/theme-provider/ThemeProvider.mjs.map +1 -0
- package/dist/components/theme-provider/ThemeToggle.cjs +56 -0
- package/dist/components/theme-provider/ThemeToggle.cjs.map +1 -0
- package/dist/components/theme-provider/ThemeToggle.d.cts +12 -0
- package/dist/components/theme-provider/ThemeToggle.d.cts.map +1 -0
- package/dist/components/theme-provider/ThemeToggle.d.mts +12 -0
- package/dist/components/theme-provider/ThemeToggle.d.mts.map +1 -0
- package/dist/components/theme-provider/ThemeToggle.mjs +54 -0
- package/dist/components/theme-provider/ThemeToggle.mjs.map +1 -0
- package/dist/components/theme-provider/index.d.cts +3 -0
- package/dist/components/theme-provider/index.d.mts +3 -0
- package/dist/components/tooltip/Tooltip.cjs +28 -0
- package/dist/components/tooltip/Tooltip.cjs.map +1 -0
- package/dist/components/tooltip/Tooltip.d.cts +14 -0
- package/dist/components/tooltip/Tooltip.d.cts.map +1 -0
- package/dist/components/tooltip/Tooltip.d.mts +14 -0
- package/dist/components/tooltip/Tooltip.d.mts.map +1 -0
- package/dist/components/tooltip/Tooltip.mjs +23 -0
- package/dist/components/tooltip/Tooltip.mjs.map +1 -0
- package/dist/components/tooltip/index.d.cts +3 -0
- package/dist/components/tooltip/index.d.mts +3 -0
- package/dist/components/typography/Typography.cjs +69 -0
- package/dist/components/typography/Typography.cjs.map +1 -0
- package/dist/components/typography/Typography.d.cts +14 -0
- package/dist/components/typography/Typography.d.cts.map +1 -0
- package/dist/components/typography/Typography.d.mts +14 -0
- package/dist/components/typography/Typography.d.mts.map +1 -0
- package/dist/components/typography/Typography.mjs +67 -0
- package/dist/components/typography/Typography.mjs.map +1 -0
- package/dist/components/typography/index.d.cts +2 -0
- package/dist/components/typography/index.d.mts +2 -0
- package/dist/components/window-frame/WindowFrame.cjs +47 -0
- package/dist/components/window-frame/WindowFrame.cjs.map +1 -0
- package/dist/components/window-frame/WindowFrame.d.cts +19 -0
- package/dist/components/window-frame/WindowFrame.d.cts.map +1 -0
- package/dist/components/window-frame/WindowFrame.d.mts +19 -0
- package/dist/components/window-frame/WindowFrame.d.mts.map +1 -0
- package/dist/components/window-frame/WindowFrame.mjs +46 -0
- package/dist/components/window-frame/WindowFrame.mjs.map +1 -0
- package/dist/components/window-frame/index.d.cts +2 -0
- package/dist/components/window-frame/index.d.mts +2 -0
- package/dist/hooks/use-mobile.cjs +23 -0
- package/dist/hooks/use-mobile.cjs.map +1 -0
- package/dist/hooks/use-mobile.mjs +21 -0
- package/dist/hooks/use-mobile.mjs.map +1 -0
- package/dist/index.cjs +280 -5937
- package/dist/index.d.cts +101 -840
- package/dist/index.d.mts +101 -0
- package/dist/index.mjs +58 -0
- package/dist/lib/shiki-theme.cjs +10 -0
- package/dist/lib/shiki-theme.cjs.map +1 -0
- package/dist/lib/shiki-theme.d.cts +4 -0
- package/dist/lib/shiki-theme.d.cts.map +1 -0
- package/dist/lib/shiki-theme.d.mts +4 -0
- package/dist/lib/shiki-theme.d.mts.map +1 -0
- package/dist/lib/shiki-theme.mjs +11 -0
- package/dist/lib/shiki-theme.mjs.map +1 -0
- package/dist/lib/shiki.cjs +31 -0
- package/dist/lib/shiki.cjs.map +1 -0
- package/dist/lib/shiki.d.cts +6 -0
- package/dist/lib/shiki.d.cts.map +1 -0
- package/dist/lib/shiki.d.mts +6 -0
- package/dist/lib/shiki.d.mts.map +1 -0
- package/dist/lib/shiki.mjs +30 -0
- package/dist/lib/shiki.mjs.map +1 -0
- package/dist/lib/terminal.d.cts +12 -0
- package/dist/lib/terminal.d.cts.map +1 -0
- package/dist/lib/terminal.d.mts +12 -0
- package/dist/lib/terminal.d.mts.map +1 -0
- package/dist/lib/utils.cjs +43 -0
- package/dist/lib/utils.cjs.map +1 -0
- package/dist/lib/utils.mjs +41 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/dist/neural-flow.cjs +3 -1015
- package/dist/neural-flow.d.cts +3 -47
- package/dist/neural-flow.d.mts +3 -0
- package/dist/neural-flow.mjs +1 -0
- package/dist/primitives/alert.cjs +43 -0
- package/dist/primitives/alert.cjs.map +1 -0
- package/dist/primitives/alert.d.cts +8 -0
- package/dist/primitives/alert.d.cts.map +1 -0
- package/dist/primitives/alert.d.mts +8 -0
- package/dist/primitives/alert.d.mts.map +1 -0
- package/dist/primitives/alert.mjs +39 -0
- package/dist/primitives/alert.mjs.map +1 -0
- package/dist/primitives/bubble.cjs +80 -0
- package/dist/primitives/bubble.cjs.map +1 -0
- package/dist/primitives/bubble.d.cts +19 -0
- package/dist/primitives/bubble.d.cts.map +1 -0
- package/dist/primitives/bubble.d.mts +19 -0
- package/dist/primitives/bubble.d.mts.map +1 -0
- package/dist/primitives/bubble.mjs +75 -0
- package/dist/primitives/bubble.mjs.map +1 -0
- package/dist/primitives/button.cjs +47 -0
- package/dist/primitives/button.cjs.map +1 -0
- package/dist/primitives/button.d.cts +11 -0
- package/dist/primitives/button.d.cts.map +1 -0
- package/dist/primitives/button.d.mts +11 -0
- package/dist/primitives/button.d.mts.map +1 -0
- package/dist/primitives/button.mjs +46 -0
- package/dist/primitives/button.mjs.map +1 -0
- package/dist/primitives/card.cjs +67 -0
- package/dist/primitives/card.cjs.map +1 -0
- package/dist/primitives/card.d.cts +11 -0
- package/dist/primitives/card.d.cts.map +1 -0
- package/dist/primitives/card.d.mts +11 -0
- package/dist/primitives/card.d.mts.map +1 -0
- package/dist/primitives/card.mjs +59 -0
- package/dist/primitives/card.mjs.map +1 -0
- package/dist/primitives/checkbox.cjs +22 -0
- package/dist/primitives/checkbox.cjs.map +1 -0
- package/dist/primitives/checkbox.mjs +22 -0
- package/dist/primitives/checkbox.mjs.map +1 -0
- package/dist/primitives/command.cjs +69 -0
- package/dist/primitives/command.cjs.map +1 -0
- package/dist/primitives/command.mjs +62 -0
- package/dist/primitives/command.mjs.map +1 -0
- package/dist/primitives/dropdown-menu.cjs +155 -0
- package/dist/primitives/dropdown-menu.cjs.map +1 -0
- package/dist/primitives/dropdown-menu.d.cts +30 -0
- package/dist/primitives/dropdown-menu.d.cts.map +1 -0
- package/dist/primitives/dropdown-menu.d.mts +30 -0
- package/dist/primitives/dropdown-menu.d.mts.map +1 -0
- package/dist/primitives/dropdown-menu.mjs +139 -0
- package/dist/primitives/dropdown-menu.mjs.map +1 -0
- package/dist/primitives/empty.cjs +67 -0
- package/dist/primitives/empty.cjs.map +1 -0
- package/dist/primitives/empty.d.cts +8 -0
- package/dist/primitives/empty.d.cts.map +1 -0
- package/dist/primitives/empty.d.mts +8 -0
- package/dist/primitives/empty.d.mts.map +1 -0
- package/dist/primitives/empty.mjs +62 -0
- package/dist/primitives/empty.mjs.map +1 -0
- package/dist/primitives/field.cjs +121 -0
- package/dist/primitives/field.cjs.map +1 -0
- package/dist/primitives/field.d.cts +27 -0
- package/dist/primitives/field.d.cts.map +1 -0
- package/dist/primitives/field.d.mts +27 -0
- package/dist/primitives/field.d.mts.map +1 -0
- package/dist/primitives/field.mjs +112 -0
- package/dist/primitives/field.mjs.map +1 -0
- package/dist/primitives/input-group.cjs +88 -0
- package/dist/primitives/input-group.cjs.map +1 -0
- package/dist/primitives/input-group.d.cts +21 -0
- package/dist/primitives/input-group.d.cts.map +1 -0
- package/dist/primitives/input-group.d.mts +21 -0
- package/dist/primitives/input-group.d.mts.map +1 -0
- package/dist/primitives/input-group.mjs +81 -0
- package/dist/primitives/input-group.mjs.map +1 -0
- package/dist/primitives/input.cjs +20 -0
- package/dist/primitives/input.cjs.map +1 -0
- package/dist/primitives/input.d.cts +6 -0
- package/dist/primitives/input.d.cts.map +1 -0
- package/dist/primitives/input.d.mts +6 -0
- package/dist/primitives/input.d.mts.map +1 -0
- package/dist/primitives/input.mjs +18 -0
- package/dist/primitives/input.mjs.map +1 -0
- package/dist/primitives/item.cjs +135 -0
- package/dist/primitives/item.cjs.map +1 -0
- package/dist/primitives/item.d.cts +18 -0
- package/dist/primitives/item.d.cts.map +1 -0
- package/dist/primitives/item.d.mts +18 -0
- package/dist/primitives/item.d.mts.map +1 -0
- package/dist/primitives/item.mjs +124 -0
- package/dist/primitives/item.mjs.map +1 -0
- package/dist/primitives/label.cjs +18 -0
- package/dist/primitives/label.cjs.map +1 -0
- package/dist/primitives/label.d.cts +6 -0
- package/dist/primitives/label.d.cts.map +1 -0
- package/dist/primitives/label.d.mts +6 -0
- package/dist/primitives/label.d.mts.map +1 -0
- package/dist/primitives/label.mjs +16 -0
- package/dist/primitives/label.mjs.map +1 -0
- package/dist/primitives/message-scroller.cjs +69 -0
- package/dist/primitives/message-scroller.cjs.map +1 -0
- package/dist/primitives/message-scroller.d.cts +13 -0
- package/dist/primitives/message-scroller.d.cts.map +1 -0
- package/dist/primitives/message-scroller.d.mts +13 -0
- package/dist/primitives/message-scroller.d.mts.map +1 -0
- package/dist/primitives/message-scroller.mjs +62 -0
- package/dist/primitives/message-scroller.mjs.map +1 -0
- package/dist/primitives/message.cjs +58 -0
- package/dist/primitives/message.cjs.map +1 -0
- package/dist/primitives/message.d.cts +13 -0
- package/dist/primitives/message.d.cts.map +1 -0
- package/dist/primitives/message.d.mts +13 -0
- package/dist/primitives/message.d.mts.map +1 -0
- package/dist/primitives/message.mjs +51 -0
- package/dist/primitives/message.mjs.map +1 -0
- package/dist/primitives/navigation-menu.cjs +44 -0
- package/dist/primitives/navigation-menu.cjs.map +1 -0
- package/dist/primitives/navigation-menu.d.cts +9 -0
- package/dist/primitives/navigation-menu.d.cts.map +1 -0
- package/dist/primitives/navigation-menu.d.mts +9 -0
- package/dist/primitives/navigation-menu.d.mts.map +1 -0
- package/dist/primitives/navigation-menu.mjs +41 -0
- package/dist/primitives/navigation-menu.mjs.map +1 -0
- package/dist/primitives/popover.cjs +40 -0
- package/dist/primitives/popover.cjs.map +1 -0
- package/dist/primitives/popover.mjs +36 -0
- package/dist/primitives/popover.mjs.map +1 -0
- package/dist/primitives/progress.cjs +50 -0
- package/dist/primitives/progress.cjs.map +1 -0
- package/dist/primitives/progress.d.cts +10 -0
- package/dist/primitives/progress.d.cts.map +1 -0
- package/dist/primitives/progress.d.mts +10 -0
- package/dist/primitives/progress.d.mts.map +1 -0
- package/dist/primitives/progress.mjs +46 -0
- package/dist/primitives/progress.mjs.map +1 -0
- package/dist/primitives/select.cjs +111 -0
- package/dist/primitives/select.cjs.map +1 -0
- package/dist/primitives/select.d.cts +18 -0
- package/dist/primitives/select.d.cts.map +1 -0
- package/dist/primitives/select.d.mts +18 -0
- package/dist/primitives/select.d.mts.map +1 -0
- package/dist/primitives/select.mjs +100 -0
- package/dist/primitives/select.mjs.map +1 -0
- package/dist/primitives/separator.cjs +17 -0
- package/dist/primitives/separator.cjs.map +1 -0
- package/dist/primitives/separator.d.cts +6 -0
- package/dist/primitives/separator.d.cts.map +1 -0
- package/dist/primitives/separator.d.mts +6 -0
- package/dist/primitives/separator.d.mts.map +1 -0
- package/dist/primitives/separator.mjs +17 -0
- package/dist/primitives/separator.mjs.map +1 -0
- package/dist/primitives/sheet.cjs +78 -0
- package/dist/primitives/sheet.cjs.map +1 -0
- package/dist/primitives/sheet.mjs +72 -0
- package/dist/primitives/sheet.mjs.map +1 -0
- package/dist/primitives/sidebar.cjs +413 -0
- package/dist/primitives/sidebar.cjs.map +1 -0
- package/dist/primitives/sidebar.d.cts +66 -0
- package/dist/primitives/sidebar.d.cts.map +1 -0
- package/dist/primitives/sidebar.d.mts +66 -0
- package/dist/primitives/sidebar.d.mts.map +1 -0
- package/dist/primitives/sidebar.mjs +388 -0
- package/dist/primitives/sidebar.mjs.map +1 -0
- package/dist/primitives/skeleton.cjs +15 -0
- package/dist/primitives/skeleton.cjs.map +1 -0
- package/dist/primitives/skeleton.mjs +15 -0
- package/dist/primitives/skeleton.mjs.map +1 -0
- package/dist/primitives/slider.cjs +35 -0
- package/dist/primitives/slider.cjs.map +1 -0
- package/dist/primitives/slider.d.cts +6 -0
- package/dist/primitives/slider.d.cts.map +1 -0
- package/dist/primitives/slider.d.mts +6 -0
- package/dist/primitives/slider.d.mts.map +1 -0
- package/dist/primitives/slider.mjs +35 -0
- package/dist/primitives/slider.mjs.map +1 -0
- package/dist/primitives/table.cjs +78 -0
- package/dist/primitives/table.cjs.map +1 -0
- package/dist/primitives/table.mjs +69 -0
- package/dist/primitives/table.mjs.map +1 -0
- package/dist/primitives/textarea.cjs +18 -0
- package/dist/primitives/textarea.cjs.map +1 -0
- package/dist/primitives/textarea.d.cts +6 -0
- package/dist/primitives/textarea.d.cts.map +1 -0
- package/dist/primitives/textarea.d.mts +6 -0
- package/dist/primitives/textarea.d.mts.map +1 -0
- package/dist/primitives/textarea.mjs +16 -0
- package/dist/primitives/textarea.mjs.map +1 -0
- package/dist/primitives/tooltip.cjs +46 -0
- package/dist/primitives/tooltip.cjs.map +1 -0
- package/dist/primitives/tooltip.d.cts +9 -0
- package/dist/primitives/tooltip.d.cts.map +1 -0
- package/dist/primitives/tooltip.d.mts +9 -0
- package/dist/primitives/tooltip.d.mts.map +1 -0
- package/dist/primitives/tooltip.mjs +43 -0
- package/dist/primitives/tooltip.mjs.map +1 -0
- package/dist/shiki.cjs +6 -80
- package/dist/shiki.d.cts +3 -10
- package/dist/shiki.d.mts +3 -0
- package/dist/shiki.mjs +3 -0
- package/dist/styles/index.css +11 -0
- package/package.json +20 -13
- package/dist/chunk-3LBFYXI6.js +0 -42
- package/dist/chunk-3LBFYXI6.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -840
- package/dist/index.js +0 -5685
- package/dist/index.js.map +0 -1
- package/dist/neural-flow.cjs.map +0 -1
- package/dist/neural-flow.d.ts +0 -47
- package/dist/neural-flow.js +0 -978
- package/dist/neural-flow.js.map +0 -1
- package/dist/shiki.cjs.map +0 -1
- package/dist/shiki.d.ts +0 -10
- package/dist/shiki.js +0 -11
- package/dist/shiki.js.map +0 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_utils = require("../../lib/utils.cjs");
|
|
4
|
+
const require_Typography = require("../typography/Typography.cjs");
|
|
5
|
+
const require_Card = require("../card/Card.cjs");
|
|
6
|
+
const require_ModelLogo = require("../model-logo/ModelLogo.cjs");
|
|
7
|
+
let react = require("react");
|
|
8
|
+
react = require_runtime.__toESM(react, 1);
|
|
9
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
|
+
//#region src/components/model-card/ModelCard.tsx
|
|
11
|
+
const lifecycleLabels = {
|
|
12
|
+
preview: "Preview",
|
|
13
|
+
active: "Active",
|
|
14
|
+
deprecated: "Deprecated"
|
|
15
|
+
};
|
|
16
|
+
/** Per-status styling for the lifecycle tab (tint classes come from
|
|
17
|
+
* index.css; deprecated uses the granite neutral). Brightens when the
|
|
18
|
+
* card (`group`) is hovered. */
|
|
19
|
+
const lifecycleStyles = {
|
|
20
|
+
preview: "berget-tint berget-tint-warning",
|
|
21
|
+
active: "berget-tint berget-tint-success",
|
|
22
|
+
deprecated: "bg-berget-brand-granite-700 text-berget-muted-foreground"
|
|
23
|
+
};
|
|
24
|
+
const ModelCard = react.forwardRef(({ icon, provider, category, eyebrow, title, lifecycle, description, columns, meta, href, external, className, children, ...props }, ref) => {
|
|
25
|
+
const titleId = react.useId();
|
|
26
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
27
|
+
ref,
|
|
28
|
+
href,
|
|
29
|
+
"aria-labelledby": titleId,
|
|
30
|
+
...external ? {
|
|
31
|
+
target: "_blank",
|
|
32
|
+
rel: "noopener noreferrer"
|
|
33
|
+
} : {},
|
|
34
|
+
className: require_utils.cn("group block", className),
|
|
35
|
+
...props,
|
|
36
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Card.Card, {
|
|
37
|
+
variant: "filled",
|
|
38
|
+
className: "relative flex h-full flex-col bg-berget-card-filled-bg p-5 transition-all hover:bg-[color-mix(in_oklab,var(--berget-brand-granite-100)_5%,var(--berget-card-filled-bg))] sm:p-6",
|
|
39
|
+
children: [
|
|
40
|
+
lifecycle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
41
|
+
className: "absolute top-0 right-0 z-10 overflow-hidden rounded-bl-berget-sm",
|
|
42
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
43
|
+
className: require_utils.cn("inline-flex h-6 items-center whitespace-nowrap border-0! px-8 text-sm", lifecycleStyles[lifecycle]),
|
|
44
|
+
children: lifecycleLabels[lifecycle]
|
|
45
|
+
})
|
|
46
|
+
}),
|
|
47
|
+
(icon || provider || category) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
48
|
+
className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-berget-xs border border-berget-border bg-white/5 text-berget-foreground",
|
|
49
|
+
children: icon ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ModelLogo.ModelLogo, {
|
|
50
|
+
provider,
|
|
51
|
+
category
|
|
52
|
+
})
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [
|
|
55
|
+
eyebrow && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
|
|
56
|
+
variant: "xs",
|
|
57
|
+
color: "muted",
|
|
58
|
+
className: "font-medium uppercase leading-none tracking-[0.25em]",
|
|
59
|
+
children: eyebrow
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
62
|
+
className: require_utils.cn("flex items-baseline gap-3", lifecycle && "pr-24"),
|
|
63
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
|
|
64
|
+
as: "h3",
|
|
65
|
+
id: titleId,
|
|
66
|
+
variant: "h5",
|
|
67
|
+
className: "min-w-0 truncate whitespace-nowrap leading-tight",
|
|
68
|
+
style: { fontFeatureSettings: "normal" },
|
|
69
|
+
children: title
|
|
70
|
+
})
|
|
71
|
+
}),
|
|
72
|
+
description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
|
|
73
|
+
variant: "xs",
|
|
74
|
+
color: "muted",
|
|
75
|
+
className: "leading-none",
|
|
76
|
+
children: description
|
|
77
|
+
})
|
|
78
|
+
] }),
|
|
79
|
+
columns && columns.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
80
|
+
className: "grid grid-cols-2",
|
|
81
|
+
children: columns.map((col, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
|
|
82
|
+
variant: "xs",
|
|
83
|
+
color: "muted",
|
|
84
|
+
className: "leading-none",
|
|
85
|
+
children: col.label
|
|
86
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
|
|
87
|
+
variant: "body",
|
|
88
|
+
className: "tabular-nums leading-none",
|
|
89
|
+
style: { fontFeatureSettings: "normal" },
|
|
90
|
+
children: col.value
|
|
91
|
+
})] }, i))
|
|
92
|
+
}),
|
|
93
|
+
meta && meta.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
|
|
94
|
+
variant: "xs",
|
|
95
|
+
color: "muted",
|
|
96
|
+
className: "text-[0.65rem] uppercase tracking-[0.15em]",
|
|
97
|
+
children: meta.map((item, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [i > 0 && " ▪ ", item] }, i))
|
|
98
|
+
}),
|
|
99
|
+
children
|
|
100
|
+
]
|
|
101
|
+
})
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
ModelCard.displayName = "ModelCard";
|
|
105
|
+
//#endregion
|
|
106
|
+
exports.ModelCard = ModelCard;
|
|
107
|
+
|
|
108
|
+
//# sourceMappingURL=ModelCard.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelCard.cjs","names":["React","cn","Card","ModelLogo","Typography"],"sources":["../../../src/components/model-card/ModelCard.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport { Card } from '../card';\nimport { type ModelCategory, type ModelLogoProvider, ModelLogo } from '../model-logo';\nimport { Typography } from '../typography';\n\n/**\n * ModelCard — a whole-card link tile for presenting AI models in a grid:\n * provider mark, category eyebrow, model name, optional lifecycle tab,\n * per-unit price columns, and fine-print capability facts.\n *\n * Presentational only: all copy is passed in as props; the card itself\n * owns no strings and no domain types.\n */\n/** Lifecycle status shown as a corner tab on the card. */\nexport type ModelLifecycle = 'preview' | 'active' | 'deprecated';\n\nconst lifecycleLabels: Record<ModelLifecycle, string> = {\n preview: 'Preview',\n active: 'Active',\n deprecated: 'Deprecated',\n};\n\n/** Per-status styling for the lifecycle tab (tint classes come from\n * index.css; deprecated uses the granite neutral). Brightens when the\n * card (`group`) is hovered. */\nconst lifecycleStyles: Record<ModelLifecycle, string> = {\n preview: 'berget-tint berget-tint-warning',\n active: 'berget-tint berget-tint-success',\n deprecated: 'bg-berget-brand-granite-700 text-berget-muted-foreground',\n};\n\nexport type { ModelCategory, ModelLogoProvider };\n\nexport interface ModelCardProps extends Omit<React.ComponentProps<'a'>, 'title' | 'children'> {\n /** Provider mark, rendered in a bordered square at the top of the card. */\n icon?: React.ReactNode;\n /**\n * Model family for the icon square — resolved to a bundled brand mark\n * (e.g. `'mistralai'`, `'moonshotai'`, `'berget'`). Ignored when `icon`\n * is set.\n */\n provider?: string;\n /** Fallback category for the icon square when no brand mark exists\n * (maps to the `model_type` values from `GET /v1/models`). */\n category?: ModelCategory;\n /** Small category label above the title (rendered uppercase). */\n eyebrow?: string;\n /** The model name — rendered as an `h3` and truncated when too long. */\n title: React.ReactNode;\n /**\n * Lifecycle status rendered as a corner tab: `preview` (yellow),\n * `active` (green), `deprecated` (gray).\n */\n lifecycle?: ModelLifecycle;\n /** Secondary line under the title, e.g. the provider name. */\n description?: React.ReactNode;\n /** Label-above-value columns, e.g. per-million-token input/output prices. */\n columns?: { label: React.ReactNode; value: React.ReactNode }[];\n /**\n * Fine-print capability facts rendered in one uppercase row with\n * square separators drawn by the card, e.g. ['Vision', '262K context'].\n */\n meta?: React.ReactNode[];\n /** Link target for the whole card. */\n href: string;\n /** Opens the link in a new tab (adds `target`/`rel`). */\n external?: boolean;\n /** Extra content rendered at the bottom of the card. */\n children?: React.ReactNode;\n}\n\nconst ModelCard = React.forwardRef<HTMLAnchorElement, ModelCardProps>(\n (\n {\n icon,\n provider,\n category,\n eyebrow,\n title,\n lifecycle,\n description,\n columns,\n meta,\n href,\n external,\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const titleId = React.useId();\n\n return (\n <a\n ref={ref}\n href={href}\n aria-labelledby={titleId}\n {...(external ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n className={cn('group block', className)}\n {...props}\n >\n <Card\n variant=\"filled\"\n className=\"relative flex h-full flex-col bg-berget-card-filled-bg p-5 transition-all hover:bg-[color-mix(in_oklab,var(--berget-brand-granite-100)_5%,var(--berget-card-filled-bg))] sm:p-6\"\n >\n {lifecycle && (\n <div className=\"absolute top-0 right-0 z-10 overflow-hidden rounded-bl-berget-sm\">\n <div\n className={cn(\n 'inline-flex h-6 items-center whitespace-nowrap border-0! px-8 text-sm',\n lifecycleStyles[lifecycle],\n )}\n >\n {lifecycleLabels[lifecycle]}\n </div>\n </div>\n )}\n {(icon || provider || category) && (\n <div className=\"flex h-12 w-12 shrink-0 items-center justify-center rounded-berget-xs border border-berget-border bg-white/5 text-berget-foreground\">\n {icon ?? <ModelLogo provider={provider} category={category} />}\n </div>\n )}\n\n {/* Identity cluster: eyebrow, title, description — cb tightly\n grouped; the card's flex gap separates it from other groups. */}\n <header>\n {eyebrow && (\n <Typography\n variant=\"xs\"\n color=\"muted\"\n className=\"font-medium uppercase leading-none tracking-[0.25em]\"\n >\n {eyebrow}\n </Typography>\n )}\n <div className={cn('flex items-baseline gap-3', lifecycle && 'pr-24')}>\n <Typography\n as=\"h3\"\n id={titleId}\n variant=\"h5\"\n className=\"min-w-0 truncate whitespace-nowrap leading-tight\"\n style={{ fontFeatureSettings: 'normal' }}\n >\n {title}\n </Typography>\n </div>\n {description && (\n <Typography variant=\"xs\" color=\"muted\" className=\"leading-none\">\n {description}\n </Typography>\n )}\n </header>\n\n {columns && columns.length > 0 && (\n <div className=\"grid grid-cols-2\">\n {columns.map((col, i) => (\n <div key={i}>\n <Typography variant=\"xs\" color=\"muted\" className=\"leading-none\">\n {col.label}\n </Typography>\n <Typography\n variant=\"body\"\n className=\"tabular-nums leading-none\"\n style={{ fontFeatureSettings: 'normal' }}\n >\n {col.value}\n </Typography>\n </div>\n ))}\n </div>\n )}\n\n {meta && meta.length > 0 && (\n <Typography\n variant=\"xs\"\n color=\"muted\"\n className=\"text-[0.65rem] uppercase tracking-[0.15em]\"\n >\n {meta.map((item, i) => (\n <React.Fragment key={i}>\n {i > 0 && ' ▪ '}\n {item}\n </React.Fragment>\n ))}\n </Typography>\n )}\n\n {children}\n </Card>\n </a>\n );\n },\n);\nModelCard.displayName = 'ModelCard';\n\nexport { ModelCard };\n"],"mappings":";;;;;;;;;;AAmBA,MAAM,kBAAkD;CACtD,SAAS;CACT,QAAQ;CACR,YAAY;AACd;;;;AAKA,MAAM,kBAAkD;CACtD,SAAS;CACT,QAAQ;CACR,YAAY;AACd;AA0CA,MAAM,YAAYA,MAAM,YAEpB,EACE,MACA,UACA,UACA,SACA,OACA,WACA,aACA,SACA,MACA,MACA,UACA,WACA,UACA,GAAG,SAEL,QACG;CACH,MAAM,UAAUA,MAAM,MAAM;CAE5B,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;EACO;EACC;EACN,mBAAiB;EACjB,GAAK,WAAW;GAAE,QAAQ;GAAU,KAAK;EAAsB,IAAI,CAAC;EACpE,WAAWC,cAAAA,GAAG,eAAe,SAAS;EACtC,GAAI;EAEJ,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAACC,aAAAA,MAAD;GACE,SAAQ;GACR,WAAU;GAFZ,UAAA;IAIG,aACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAK,WAAU;KACb,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;MACE,WAAWD,cAAAA,GACT,yEACA,gBAAgB,UAClB;MAEC,UAAA,gBAAgB;KACd,CAAA;IACF,CAAA;KAEL,QAAQ,YAAY,aACpB,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAK,WAAU;KACZ,UAAA,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAACE,kBAAAA,WAAD;MAAqB;MAAoB;KAAW,CAAA;IAC1D,CAAA;IAKP,iBAAA,GAAA,kBAAA,KAAA,CAAC,UAAD,EAAA,UAAA;KACG,WACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,YAAD;MACE,SAAQ;MACR,OAAM;MACN,WAAU;MAET,UAAA;KACS,CAAA;KAEd,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;MAAK,WAAWH,cAAAA,GAAG,6BAA6B,aAAa,OAAO;MAClE,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACG,mBAAAA,YAAD;OACE,IAAG;OACH,IAAI;OACJ,SAAQ;OACR,WAAU;OACV,OAAO,EAAE,qBAAqB,SAAS;OAEtC,UAAA;MACS,CAAA;KACT,CAAA;KACJ,eACC,iBAAA,GAAA,kBAAA,IAAA,CAACA,mBAAAA,YAAD;MAAY,SAAQ;MAAK,OAAM;MAAQ,WAAU;MAC9C,UAAA;KACS,CAAA;IAER,EAAA,CAAA;IAEP,WAAW,QAAQ,SAAS,KAC3B,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAK,WAAU;KACZ,UAAA,QAAQ,KAAK,KAAK,MACjB,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,mBAAAA,YAAD;MAAY,SAAQ;MAAK,OAAM;MAAQ,WAAU;MAC9C,UAAA,IAAI;KACK,CAAA,GACZ,iBAAA,GAAA,kBAAA,IAAA,CAACA,mBAAAA,YAAD;MACE,SAAQ;MACR,WAAU;MACV,OAAO,EAAE,qBAAqB,SAAS;MAEtC,UAAA,IAAI;KACK,CAAA,CACT,EAAA,GAXK,CAWL,CACN;IACE,CAAA;IAGN,QAAQ,KAAK,SAAS,KACrB,iBAAA,GAAA,kBAAA,IAAA,CAACA,mBAAAA,YAAD;KACE,SAAQ;KACR,OAAM;KACN,WAAU;KAET,UAAA,KAAK,KAAK,MAAM,MACf,iBAAA,GAAA,kBAAA,KAAA,CAACJ,MAAM,UAAP,EAAA,UAAA,CACG,IAAI,KAAK,OACT,IACa,EAAA,GAHK,CAGL,CACjB;IACS,CAAA;IAGb;GACG;;CACL,CAAA;AAEP,CACF;AACA,UAAU,cAAc"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ModelCategory, ModelLogoProvider } from "../model-logo/ModelLogo.cjs";
|
|
2
|
+
import "../model-logo/index.cjs";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
//#region src/components/model-card/ModelCard.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* ModelCard — a whole-card link tile for presenting AI models in a grid:
|
|
7
|
+
* provider mark, category eyebrow, model name, optional lifecycle tab,
|
|
8
|
+
* per-unit price columns, and fine-print capability facts.
|
|
9
|
+
*
|
|
10
|
+
* Presentational only: all copy is passed in as props; the card itself
|
|
11
|
+
* owns no strings and no domain types.
|
|
12
|
+
*/
|
|
13
|
+
/** Lifecycle status shown as a corner tab on the card. */
|
|
14
|
+
export type ModelLifecycle = 'preview' | 'active' | 'deprecated';
|
|
15
|
+
export interface ModelCardProps extends Omit<React.ComponentProps<'a'>, 'title' | 'children'> {
|
|
16
|
+
/** Provider mark, rendered in a bordered square at the top of the card. */
|
|
17
|
+
icon?: React.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Model family for the icon square — resolved to a bundled brand mark
|
|
20
|
+
* (e.g. `'mistralai'`, `'moonshotai'`, `'berget'`). Ignored when `icon`
|
|
21
|
+
* is set.
|
|
22
|
+
*/
|
|
23
|
+
provider?: string;
|
|
24
|
+
/** Fallback category for the icon square when no brand mark exists
|
|
25
|
+
* (maps to the `model_type` values from `GET /v1/models`). */
|
|
26
|
+
category?: ModelCategory;
|
|
27
|
+
/** Small category label above the title (rendered uppercase). */
|
|
28
|
+
eyebrow?: string;
|
|
29
|
+
/** The model name — rendered as an `h3` and truncated when too long. */
|
|
30
|
+
title: React.ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* Lifecycle status rendered as a corner tab: `preview` (yellow),
|
|
33
|
+
* `active` (green), `deprecated` (gray).
|
|
34
|
+
*/
|
|
35
|
+
lifecycle?: ModelLifecycle;
|
|
36
|
+
/** Secondary line under the title, e.g. the provider name. */
|
|
37
|
+
description?: React.ReactNode;
|
|
38
|
+
/** Label-above-value columns, e.g. per-million-token input/output prices. */
|
|
39
|
+
columns?: {
|
|
40
|
+
label: React.ReactNode;
|
|
41
|
+
value: React.ReactNode;
|
|
42
|
+
}[];
|
|
43
|
+
/**
|
|
44
|
+
* Fine-print capability facts rendered in one uppercase row with
|
|
45
|
+
* square separators drawn by the card, e.g. ['Vision', '262K context'].
|
|
46
|
+
*/
|
|
47
|
+
meta?: React.ReactNode[];
|
|
48
|
+
/** Link target for the whole card. */
|
|
49
|
+
href: string;
|
|
50
|
+
/** Opens the link in a new tab (adds `target`/`rel`). */
|
|
51
|
+
external?: boolean;
|
|
52
|
+
/** Extra content rendered at the bottom of the card. */
|
|
53
|
+
children?: React.ReactNode;
|
|
54
|
+
}
|
|
55
|
+
declare const ModelCard: React.ForwardRefExoticComponent<Omit<ModelCardProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
56
|
+
//#endregion
|
|
57
|
+
export { ModelCard, type ModelCategory, type ModelLogoProvider };
|
|
58
|
+
//# sourceMappingURL=ModelCard.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelCard.d.cts","names":[],"sources":["../../../src/components/model-card/ModelCard.tsx"],"mappings":";;;;;;;;;;;;;YAiBY;iBAmBK,uBAAuB,KAAK,MAAM;;EAEjD,OAAO,MAAM;;;;;;EAMb;;;EAGA,WAAW;;EAEX;;EAEA,OAAO,MAAM;;;;;EAKb,YAAY;;EAEZ,cAAc,MAAM;;EAEpB;IAAY,OAAO,MAAM;IAAW,OAAO,MAAM;;;;;;EAKjD,OAAO,MAAM;;EAEb;;EAEA;;EAEA,WAAW,MAAM;;cAGb,WAAS,MAAA,0BAAA,KAAA,yBAAA,MAAA,cAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ModelCategory, ModelLogoProvider } from "../model-logo/ModelLogo.mjs";
|
|
2
|
+
import "../model-logo/index.mjs";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
//#region src/components/model-card/ModelCard.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* ModelCard — a whole-card link tile for presenting AI models in a grid:
|
|
7
|
+
* provider mark, category eyebrow, model name, optional lifecycle tab,
|
|
8
|
+
* per-unit price columns, and fine-print capability facts.
|
|
9
|
+
*
|
|
10
|
+
* Presentational only: all copy is passed in as props; the card itself
|
|
11
|
+
* owns no strings and no domain types.
|
|
12
|
+
*/
|
|
13
|
+
/** Lifecycle status shown as a corner tab on the card. */
|
|
14
|
+
export type ModelLifecycle = 'preview' | 'active' | 'deprecated';
|
|
15
|
+
export interface ModelCardProps extends Omit<React.ComponentProps<'a'>, 'title' | 'children'> {
|
|
16
|
+
/** Provider mark, rendered in a bordered square at the top of the card. */
|
|
17
|
+
icon?: React.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Model family for the icon square — resolved to a bundled brand mark
|
|
20
|
+
* (e.g. `'mistralai'`, `'moonshotai'`, `'berget'`). Ignored when `icon`
|
|
21
|
+
* is set.
|
|
22
|
+
*/
|
|
23
|
+
provider?: string;
|
|
24
|
+
/** Fallback category for the icon square when no brand mark exists
|
|
25
|
+
* (maps to the `model_type` values from `GET /v1/models`). */
|
|
26
|
+
category?: ModelCategory;
|
|
27
|
+
/** Small category label above the title (rendered uppercase). */
|
|
28
|
+
eyebrow?: string;
|
|
29
|
+
/** The model name — rendered as an `h3` and truncated when too long. */
|
|
30
|
+
title: React.ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* Lifecycle status rendered as a corner tab: `preview` (yellow),
|
|
33
|
+
* `active` (green), `deprecated` (gray).
|
|
34
|
+
*/
|
|
35
|
+
lifecycle?: ModelLifecycle;
|
|
36
|
+
/** Secondary line under the title, e.g. the provider name. */
|
|
37
|
+
description?: React.ReactNode;
|
|
38
|
+
/** Label-above-value columns, e.g. per-million-token input/output prices. */
|
|
39
|
+
columns?: {
|
|
40
|
+
label: React.ReactNode;
|
|
41
|
+
value: React.ReactNode;
|
|
42
|
+
}[];
|
|
43
|
+
/**
|
|
44
|
+
* Fine-print capability facts rendered in one uppercase row with
|
|
45
|
+
* square separators drawn by the card, e.g. ['Vision', '262K context'].
|
|
46
|
+
*/
|
|
47
|
+
meta?: React.ReactNode[];
|
|
48
|
+
/** Link target for the whole card. */
|
|
49
|
+
href: string;
|
|
50
|
+
/** Opens the link in a new tab (adds `target`/`rel`). */
|
|
51
|
+
external?: boolean;
|
|
52
|
+
/** Extra content rendered at the bottom of the card. */
|
|
53
|
+
children?: React.ReactNode;
|
|
54
|
+
}
|
|
55
|
+
declare const ModelCard: React.ForwardRefExoticComponent<Omit<ModelCardProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
56
|
+
//#endregion
|
|
57
|
+
export { ModelCard, type ModelCategory, type ModelLogoProvider };
|
|
58
|
+
//# sourceMappingURL=ModelCard.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelCard.d.mts","names":[],"sources":["../../../src/components/model-card/ModelCard.tsx"],"mappings":";;;;;;;;;;;;;YAiBY;iBAmBK,uBAAuB,KAAK,MAAM;;EAEjD,OAAO,MAAM;;;;;;EAMb;;;EAGA,WAAW;;EAEX;;EAEA,OAAO,MAAM;;;;;EAKb,YAAY;;EAEZ,cAAc,MAAM;;EAEpB;IAAY,OAAO,MAAM;IAAW,OAAO,MAAM;;;;;;EAKjD,OAAO,MAAM;;EAEb;;EAEA;;EAEA,WAAW,MAAM;;cAGb,WAAS,MAAA,0BAAA,KAAA,yBAAA,MAAA,cAAA"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.mjs";
|
|
3
|
+
import { Typography } from "../typography/Typography.mjs";
|
|
4
|
+
import { Card } from "../card/Card.mjs";
|
|
5
|
+
import { ModelLogo } from "../model-logo/ModelLogo.mjs";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/model-card/ModelCard.tsx
|
|
9
|
+
const lifecycleLabels = {
|
|
10
|
+
preview: "Preview",
|
|
11
|
+
active: "Active",
|
|
12
|
+
deprecated: "Deprecated"
|
|
13
|
+
};
|
|
14
|
+
/** Per-status styling for the lifecycle tab (tint classes come from
|
|
15
|
+
* index.css; deprecated uses the granite neutral). Brightens when the
|
|
16
|
+
* card (`group`) is hovered. */
|
|
17
|
+
const lifecycleStyles = {
|
|
18
|
+
preview: "berget-tint berget-tint-warning",
|
|
19
|
+
active: "berget-tint berget-tint-success",
|
|
20
|
+
deprecated: "bg-berget-brand-granite-700 text-berget-muted-foreground"
|
|
21
|
+
};
|
|
22
|
+
const ModelCard = React.forwardRef(({ icon, provider, category, eyebrow, title, lifecycle, description, columns, meta, href, external, className, children, ...props }, ref) => {
|
|
23
|
+
const titleId = React.useId();
|
|
24
|
+
return /* @__PURE__ */ jsx("a", {
|
|
25
|
+
ref,
|
|
26
|
+
href,
|
|
27
|
+
"aria-labelledby": titleId,
|
|
28
|
+
...external ? {
|
|
29
|
+
target: "_blank",
|
|
30
|
+
rel: "noopener noreferrer"
|
|
31
|
+
} : {},
|
|
32
|
+
className: cn("group block", className),
|
|
33
|
+
...props,
|
|
34
|
+
children: /* @__PURE__ */ jsxs(Card, {
|
|
35
|
+
variant: "filled",
|
|
36
|
+
className: "relative flex h-full flex-col bg-berget-card-filled-bg p-5 transition-all hover:bg-[color-mix(in_oklab,var(--berget-brand-granite-100)_5%,var(--berget-card-filled-bg))] sm:p-6",
|
|
37
|
+
children: [
|
|
38
|
+
lifecycle && /* @__PURE__ */ jsx("div", {
|
|
39
|
+
className: "absolute top-0 right-0 z-10 overflow-hidden rounded-bl-berget-sm",
|
|
40
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
41
|
+
className: cn("inline-flex h-6 items-center whitespace-nowrap border-0! px-8 text-sm", lifecycleStyles[lifecycle]),
|
|
42
|
+
children: lifecycleLabels[lifecycle]
|
|
43
|
+
})
|
|
44
|
+
}),
|
|
45
|
+
(icon || provider || category) && /* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-berget-xs border border-berget-border bg-white/5 text-berget-foreground",
|
|
47
|
+
children: icon ?? /* @__PURE__ */ jsx(ModelLogo, {
|
|
48
|
+
provider,
|
|
49
|
+
category
|
|
50
|
+
})
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ jsxs("header", { children: [
|
|
53
|
+
eyebrow && /* @__PURE__ */ jsx(Typography, {
|
|
54
|
+
variant: "xs",
|
|
55
|
+
color: "muted",
|
|
56
|
+
className: "font-medium uppercase leading-none tracking-[0.25em]",
|
|
57
|
+
children: eyebrow
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ jsx("div", {
|
|
60
|
+
className: cn("flex items-baseline gap-3", lifecycle && "pr-24"),
|
|
61
|
+
children: /* @__PURE__ */ jsx(Typography, {
|
|
62
|
+
as: "h3",
|
|
63
|
+
id: titleId,
|
|
64
|
+
variant: "h5",
|
|
65
|
+
className: "min-w-0 truncate whitespace-nowrap leading-tight",
|
|
66
|
+
style: { fontFeatureSettings: "normal" },
|
|
67
|
+
children: title
|
|
68
|
+
})
|
|
69
|
+
}),
|
|
70
|
+
description && /* @__PURE__ */ jsx(Typography, {
|
|
71
|
+
variant: "xs",
|
|
72
|
+
color: "muted",
|
|
73
|
+
className: "leading-none",
|
|
74
|
+
children: description
|
|
75
|
+
})
|
|
76
|
+
] }),
|
|
77
|
+
columns && columns.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
78
|
+
className: "grid grid-cols-2",
|
|
79
|
+
children: columns.map((col, i) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Typography, {
|
|
80
|
+
variant: "xs",
|
|
81
|
+
color: "muted",
|
|
82
|
+
className: "leading-none",
|
|
83
|
+
children: col.label
|
|
84
|
+
}), /* @__PURE__ */ jsx(Typography, {
|
|
85
|
+
variant: "body",
|
|
86
|
+
className: "tabular-nums leading-none",
|
|
87
|
+
style: { fontFeatureSettings: "normal" },
|
|
88
|
+
children: col.value
|
|
89
|
+
})] }, i))
|
|
90
|
+
}),
|
|
91
|
+
meta && meta.length > 0 && /* @__PURE__ */ jsx(Typography, {
|
|
92
|
+
variant: "xs",
|
|
93
|
+
color: "muted",
|
|
94
|
+
className: "text-[0.65rem] uppercase tracking-[0.15em]",
|
|
95
|
+
children: meta.map((item, i) => /* @__PURE__ */ jsxs(React.Fragment, { children: [i > 0 && " ▪ ", item] }, i))
|
|
96
|
+
}),
|
|
97
|
+
children
|
|
98
|
+
]
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
ModelCard.displayName = "ModelCard";
|
|
103
|
+
//#endregion
|
|
104
|
+
export { ModelCard };
|
|
105
|
+
|
|
106
|
+
//# sourceMappingURL=ModelCard.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelCard.mjs","names":[],"sources":["../../../src/components/model-card/ModelCard.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport { Card } from '../card';\nimport { type ModelCategory, type ModelLogoProvider, ModelLogo } from '../model-logo';\nimport { Typography } from '../typography';\n\n/**\n * ModelCard — a whole-card link tile for presenting AI models in a grid:\n * provider mark, category eyebrow, model name, optional lifecycle tab,\n * per-unit price columns, and fine-print capability facts.\n *\n * Presentational only: all copy is passed in as props; the card itself\n * owns no strings and no domain types.\n */\n/** Lifecycle status shown as a corner tab on the card. */\nexport type ModelLifecycle = 'preview' | 'active' | 'deprecated';\n\nconst lifecycleLabels: Record<ModelLifecycle, string> = {\n preview: 'Preview',\n active: 'Active',\n deprecated: 'Deprecated',\n};\n\n/** Per-status styling for the lifecycle tab (tint classes come from\n * index.css; deprecated uses the granite neutral). Brightens when the\n * card (`group`) is hovered. */\nconst lifecycleStyles: Record<ModelLifecycle, string> = {\n preview: 'berget-tint berget-tint-warning',\n active: 'berget-tint berget-tint-success',\n deprecated: 'bg-berget-brand-granite-700 text-berget-muted-foreground',\n};\n\nexport type { ModelCategory, ModelLogoProvider };\n\nexport interface ModelCardProps extends Omit<React.ComponentProps<'a'>, 'title' | 'children'> {\n /** Provider mark, rendered in a bordered square at the top of the card. */\n icon?: React.ReactNode;\n /**\n * Model family for the icon square — resolved to a bundled brand mark\n * (e.g. `'mistralai'`, `'moonshotai'`, `'berget'`). Ignored when `icon`\n * is set.\n */\n provider?: string;\n /** Fallback category for the icon square when no brand mark exists\n * (maps to the `model_type` values from `GET /v1/models`). */\n category?: ModelCategory;\n /** Small category label above the title (rendered uppercase). */\n eyebrow?: string;\n /** The model name — rendered as an `h3` and truncated when too long. */\n title: React.ReactNode;\n /**\n * Lifecycle status rendered as a corner tab: `preview` (yellow),\n * `active` (green), `deprecated` (gray).\n */\n lifecycle?: ModelLifecycle;\n /** Secondary line under the title, e.g. the provider name. */\n description?: React.ReactNode;\n /** Label-above-value columns, e.g. per-million-token input/output prices. */\n columns?: { label: React.ReactNode; value: React.ReactNode }[];\n /**\n * Fine-print capability facts rendered in one uppercase row with\n * square separators drawn by the card, e.g. ['Vision', '262K context'].\n */\n meta?: React.ReactNode[];\n /** Link target for the whole card. */\n href: string;\n /** Opens the link in a new tab (adds `target`/`rel`). */\n external?: boolean;\n /** Extra content rendered at the bottom of the card. */\n children?: React.ReactNode;\n}\n\nconst ModelCard = React.forwardRef<HTMLAnchorElement, ModelCardProps>(\n (\n {\n icon,\n provider,\n category,\n eyebrow,\n title,\n lifecycle,\n description,\n columns,\n meta,\n href,\n external,\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const titleId = React.useId();\n\n return (\n <a\n ref={ref}\n href={href}\n aria-labelledby={titleId}\n {...(external ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n className={cn('group block', className)}\n {...props}\n >\n <Card\n variant=\"filled\"\n className=\"relative flex h-full flex-col bg-berget-card-filled-bg p-5 transition-all hover:bg-[color-mix(in_oklab,var(--berget-brand-granite-100)_5%,var(--berget-card-filled-bg))] sm:p-6\"\n >\n {lifecycle && (\n <div className=\"absolute top-0 right-0 z-10 overflow-hidden rounded-bl-berget-sm\">\n <div\n className={cn(\n 'inline-flex h-6 items-center whitespace-nowrap border-0! px-8 text-sm',\n lifecycleStyles[lifecycle],\n )}\n >\n {lifecycleLabels[lifecycle]}\n </div>\n </div>\n )}\n {(icon || provider || category) && (\n <div className=\"flex h-12 w-12 shrink-0 items-center justify-center rounded-berget-xs border border-berget-border bg-white/5 text-berget-foreground\">\n {icon ?? <ModelLogo provider={provider} category={category} />}\n </div>\n )}\n\n {/* Identity cluster: eyebrow, title, description — cb tightly\n grouped; the card's flex gap separates it from other groups. */}\n <header>\n {eyebrow && (\n <Typography\n variant=\"xs\"\n color=\"muted\"\n className=\"font-medium uppercase leading-none tracking-[0.25em]\"\n >\n {eyebrow}\n </Typography>\n )}\n <div className={cn('flex items-baseline gap-3', lifecycle && 'pr-24')}>\n <Typography\n as=\"h3\"\n id={titleId}\n variant=\"h5\"\n className=\"min-w-0 truncate whitespace-nowrap leading-tight\"\n style={{ fontFeatureSettings: 'normal' }}\n >\n {title}\n </Typography>\n </div>\n {description && (\n <Typography variant=\"xs\" color=\"muted\" className=\"leading-none\">\n {description}\n </Typography>\n )}\n </header>\n\n {columns && columns.length > 0 && (\n <div className=\"grid grid-cols-2\">\n {columns.map((col, i) => (\n <div key={i}>\n <Typography variant=\"xs\" color=\"muted\" className=\"leading-none\">\n {col.label}\n </Typography>\n <Typography\n variant=\"body\"\n className=\"tabular-nums leading-none\"\n style={{ fontFeatureSettings: 'normal' }}\n >\n {col.value}\n </Typography>\n </div>\n ))}\n </div>\n )}\n\n {meta && meta.length > 0 && (\n <Typography\n variant=\"xs\"\n color=\"muted\"\n className=\"text-[0.65rem] uppercase tracking-[0.15em]\"\n >\n {meta.map((item, i) => (\n <React.Fragment key={i}>\n {i > 0 && ' ▪ '}\n {item}\n </React.Fragment>\n ))}\n </Typography>\n )}\n\n {children}\n </Card>\n </a>\n );\n },\n);\nModelCard.displayName = 'ModelCard';\n\nexport { ModelCard };\n"],"mappings":";;;;;;;;AAmBA,MAAM,kBAAkD;CACtD,SAAS;CACT,QAAQ;CACR,YAAY;AACd;;;;AAKA,MAAM,kBAAkD;CACtD,SAAS;CACT,QAAQ;CACR,YAAY;AACd;AA0CA,MAAM,YAAY,MAAM,YAEpB,EACE,MACA,UACA,UACA,SACA,OACA,WACA,aACA,SACA,MACA,MACA,UACA,WACA,UACA,GAAG,SAEL,QACG;CACH,MAAM,UAAU,MAAM,MAAM;CAE5B,OACE,oBAAC,KAAD;EACO;EACC;EACN,mBAAiB;EACjB,GAAK,WAAW;GAAE,QAAQ;GAAU,KAAK;EAAsB,IAAI,CAAC;EACpE,WAAW,GAAG,eAAe,SAAS;EACtC,GAAI;EAEJ,UAAA,qBAAC,MAAD;GACE,SAAQ;GACR,WAAU;GAFZ,UAAA;IAIG,aACC,oBAAC,OAAD;KAAK,WAAU;KACb,UAAA,oBAAC,OAAD;MACE,WAAW,GACT,yEACA,gBAAgB,UAClB;MAEC,UAAA,gBAAgB;KACd,CAAA;IACF,CAAA;KAEL,QAAQ,YAAY,aACpB,oBAAC,OAAD;KAAK,WAAU;KACZ,UAAA,QAAQ,oBAAC,WAAD;MAAqB;MAAoB;KAAW,CAAA;IAC1D,CAAA;IAKP,qBAAC,UAAD,EAAA,UAAA;KACG,WACC,oBAAC,YAAD;MACE,SAAQ;MACR,OAAM;MACN,WAAU;MAET,UAAA;KACS,CAAA;KAEd,oBAAC,OAAD;MAAK,WAAW,GAAG,6BAA6B,aAAa,OAAO;MAClE,UAAA,oBAAC,YAAD;OACE,IAAG;OACH,IAAI;OACJ,SAAQ;OACR,WAAU;OACV,OAAO,EAAE,qBAAqB,SAAS;OAEtC,UAAA;MACS,CAAA;KACT,CAAA;KACJ,eACC,oBAAC,YAAD;MAAY,SAAQ;MAAK,OAAM;MAAQ,WAAU;MAC9C,UAAA;KACS,CAAA;IAER,EAAA,CAAA;IAEP,WAAW,QAAQ,SAAS,KAC3B,oBAAC,OAAD;KAAK,WAAU;KACZ,UAAA,QAAQ,KAAK,KAAK,MACjB,qBAAC,OAAD,EAAA,UAAA,CACE,oBAAC,YAAD;MAAY,SAAQ;MAAK,OAAM;MAAQ,WAAU;MAC9C,UAAA,IAAI;KACK,CAAA,GACZ,oBAAC,YAAD;MACE,SAAQ;MACR,WAAU;MACV,OAAO,EAAE,qBAAqB,SAAS;MAEtC,UAAA,IAAI;KACK,CAAA,CACT,EAAA,GAXK,CAWL,CACN;IACE,CAAA;IAGN,QAAQ,KAAK,SAAS,KACrB,oBAAC,YAAD;KACE,SAAQ;KACR,OAAM;KACN,WAAU;KAET,UAAA,KAAK,KAAK,MAAM,MACf,qBAAC,MAAM,UAAP,EAAA,UAAA,CACG,IAAI,KAAK,OACT,IACa,EAAA,GAHK,CAGL,CACjB;IACS,CAAA;IAGb;GACG;;CACL,CAAA;AAEP,CACF;AACA,UAAU,cAAc"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_utils = require("../../lib/utils.cjs");
|
|
4
|
+
const require_BergetLogo = require("../berget-logo/BergetLogo.cjs");
|
|
5
|
+
let react = require("react");
|
|
6
|
+
react = require_runtime.__toESM(react, 1);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let lucide_react = require("lucide-react");
|
|
9
|
+
//#region src/components/model-logo/ModelLogo.tsx
|
|
10
|
+
/** Accepted aliases, e.g. the raw `owned_by` strings from the models API. */
|
|
11
|
+
const providerAliases = {
|
|
12
|
+
qwen: "qwen",
|
|
13
|
+
mistralai: "mistral",
|
|
14
|
+
mistral: "mistral",
|
|
15
|
+
moonshotai: "kimi",
|
|
16
|
+
kimi: "kimi",
|
|
17
|
+
google: "google",
|
|
18
|
+
"zai-org": "zai",
|
|
19
|
+
zai: "zai",
|
|
20
|
+
berget: "berget",
|
|
21
|
+
bergetai: "berget"
|
|
22
|
+
};
|
|
23
|
+
/** Monochrome, `currentColor`, 24×24 brand marks (via @lobehub/icons, MIT). */
|
|
24
|
+
const providerPaths = {
|
|
25
|
+
qwen: ["M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z"],
|
|
26
|
+
mistral: ["M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z"],
|
|
27
|
+
kimi: ["M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z", "M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"],
|
|
28
|
+
google: [
|
|
29
|
+
"M23 12.245c0-.905-.075-1.565-.236-2.25h-10.54v4.083h6.186c-.124 1.014-.797 2.542-2.294 3.569l-.021.136 3.332 2.53.23.022C21.779 18.417 23 15.593 23 12.245z",
|
|
30
|
+
"M12.225 23c3.03 0 5.574-.978 7.433-2.665l-3.542-2.688c-.948.648-2.22 1.1-3.891 1.1a6.745 6.745 0 01-6.386-4.572l-.132.011-3.465 2.628-.045.124C4.043 20.531 7.835 23 12.225 23z",
|
|
31
|
+
"M5.84 14.175A6.65 6.65 0 015.463 12c0-.758.138-1.491.361-2.175l-.006-.147-3.508-2.67-.115.054A10.831 10.831 0 001 12c0 1.772.436 3.447 1.197 4.938l3.642-2.763z",
|
|
32
|
+
"M12.225 5.253c2.108 0 3.529.892 4.34 1.638l3.167-3.031C17.787 2.088 15.255 1 12.225 1 7.834 1 4.043 3.469 2.197 7.062l3.63 2.763a6.77 6.77 0 016.398-4.572z"
|
|
33
|
+
],
|
|
34
|
+
zai: ["M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"]
|
|
35
|
+
};
|
|
36
|
+
const providerLabels = {
|
|
37
|
+
qwen: "Qwen",
|
|
38
|
+
mistral: "Mistral",
|
|
39
|
+
kimi: "Kimi",
|
|
40
|
+
google: "Google",
|
|
41
|
+
zai: "Z.ai",
|
|
42
|
+
berget: "Berget AI"
|
|
43
|
+
};
|
|
44
|
+
const categoryIcons = {
|
|
45
|
+
text: lucide_react.Bot,
|
|
46
|
+
"speech-to-text": lucide_react.AudioLines,
|
|
47
|
+
embedding: lucide_react.Braces,
|
|
48
|
+
rerank: lucide_react.ArrowDownWideNarrow,
|
|
49
|
+
"system-one": lucide_react.ScanEye,
|
|
50
|
+
vision: lucide_react.Eye
|
|
51
|
+
};
|
|
52
|
+
const categoryLabels = {
|
|
53
|
+
text: "Model",
|
|
54
|
+
"speech-to-text": "Speech-to-text",
|
|
55
|
+
embedding: "Embedding",
|
|
56
|
+
rerank: "Reranker",
|
|
57
|
+
"system-one": "System One",
|
|
58
|
+
vision: "Vision"
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* ModelLogo — brand mark for a supported model family, falling back to a
|
|
62
|
+
* category icon for everything else. Renders nothing if no `provider` and
|
|
63
|
+
* no `category` match.
|
|
64
|
+
*/
|
|
65
|
+
const ModelLogo = react.forwardRef(({ provider, category, size = 24, className, ...props }, ref) => {
|
|
66
|
+
const resolved = provider ? providerAliases[provider.trim().toLowerCase()] : void 0;
|
|
67
|
+
if (resolved === "berget") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_BergetLogo.BergetLogo, {
|
|
68
|
+
variant: "symbol",
|
|
69
|
+
size,
|
|
70
|
+
className: require_utils.cn("shrink-0", className)
|
|
71
|
+
});
|
|
72
|
+
if (resolved) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
73
|
+
ref,
|
|
74
|
+
viewBox: "0 0 24 24",
|
|
75
|
+
fill: "currentColor",
|
|
76
|
+
width: size,
|
|
77
|
+
height: size,
|
|
78
|
+
role: "img",
|
|
79
|
+
"aria-label": providerLabels[resolved],
|
|
80
|
+
className: require_utils.cn("shrink-0", className),
|
|
81
|
+
...props,
|
|
82
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("title", { children: providerLabels[resolved] }), providerPaths[resolved].map((d, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d }, i))]
|
|
83
|
+
});
|
|
84
|
+
if (category) {
|
|
85
|
+
const Icon = categoryIcons[category];
|
|
86
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
87
|
+
className: require_utils.cn("shrink-0", className),
|
|
88
|
+
...props
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
});
|
|
93
|
+
ModelLogo.displayName = "ModelLogo";
|
|
94
|
+
//#endregion
|
|
95
|
+
exports.ModelLogo = ModelLogo;
|
|
96
|
+
exports.categoryLabels = categoryLabels;
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=ModelLogo.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelLogo.cjs","names":["Bot","AudioLines","Braces","ArrowDownWideNarrow","ScanEye","Eye","React","BergetLogo","cn"],"sources":["../../../src/components/model-logo/ModelLogo.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ArrowDownWideNarrow, AudioLines, Bot, Braces, Eye, ScanEye } from 'lucide-react';\nimport { cn } from '../../lib/utils';\nimport { BergetLogo } from '../berget-logo';\n\n/**\n * Model families with a bundled brand mark, keyed by the `owned_by` values\n * returned by `GET /v1/models` (normalized: lowercase, aliases below).\n */\nexport type ModelLogoProvider = 'qwen' | 'mistral' | 'kimi' | 'google' | 'zai' | 'berget';\n\n/** Fallback model categories for models without a brand mark, matching\n * the `model_type` values in `GET /v1/models` (plus `vision`, which lives\n * in per-model capabilities). */\nexport type ModelCategory =\n | 'text'\n | 'speech-to-text'\n | 'embedding'\n | 'rerank'\n | 'system-one'\n | 'vision';\n\n/** Accepted aliases, e.g. the raw `owned_by` strings from the models API. */\nconst providerAliases: Record<string, ModelLogoProvider> = {\n qwen: 'qwen',\n mistralai: 'mistral',\n mistral: 'mistral',\n moonshotai: 'kimi',\n kimi: 'kimi',\n google: 'google',\n 'zai-org': 'zai',\n zai: 'zai',\n berget: 'berget',\n bergetai: 'berget',\n};\n\n/** Monochrome, `currentColor`, 24×24 brand marks (via @lobehub/icons, MIT). */\nconst providerPaths: Record<Exclude<ModelLogoProvider, 'berget'>, string[]> = {\n qwen: [\n 'M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z',\n ],\n mistral: [\n 'M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z',\n ],\n kimi: [\n 'M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z',\n 'M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z',\n ],\n google: [\n 'M23 12.245c0-.905-.075-1.565-.236-2.25h-10.54v4.083h6.186c-.124 1.014-.797 2.542-2.294 3.569l-.021.136 3.332 2.53.23.022C21.779 18.417 23 15.593 23 12.245z',\n 'M12.225 23c3.03 0 5.574-.978 7.433-2.665l-3.542-2.688c-.948.648-2.22 1.1-3.891 1.1a6.745 6.745 0 01-6.386-4.572l-.132.011-3.465 2.628-.045.124C4.043 20.531 7.835 23 12.225 23z',\n 'M5.84 14.175A6.65 6.65 0 015.463 12c0-.758.138-1.491.361-2.175l-.006-.147-3.508-2.67-.115.054A10.831 10.831 0 001 12c0 1.772.436 3.447 1.197 4.938l3.642-2.763z',\n 'M12.225 5.253c2.108 0 3.529.892 4.34 1.638l3.167-3.031C17.787 2.088 15.255 1 12.225 1 7.834 1 4.043 3.469 2.197 7.062l3.63 2.763a6.77 6.77 0 016.398-4.572z',\n ],\n zai: [\n 'M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z',\n ],\n};\n\nconst providerLabels: Record<ModelLogoProvider, string> = {\n qwen: 'Qwen',\n mistral: 'Mistral',\n kimi: 'Kimi',\n google: 'Google',\n zai: 'Z.ai',\n berget: 'Berget AI',\n};\n\nconst categoryIcons: Record<ModelCategory, React.ComponentType<{ className?: string }>> = {\n text: Bot,\n 'speech-to-text': AudioLines,\n embedding: Braces,\n rerank: ArrowDownWideNarrow,\n 'system-one': ScanEye,\n vision: Eye,\n};\n\nconst categoryLabels: Record<ModelCategory, string> = {\n text: 'Model',\n 'speech-to-text': 'Speech-to-text',\n embedding: 'Embedding',\n rerank: 'Reranker',\n 'system-one': 'System One',\n vision: 'Vision',\n};\n\nexport interface ModelLogoProps extends React.SVGAttributes<SVGSVGElement> {\n /**\n * Model family to render a brand mark for. Accepts the `owned_by` values\n * from `GET /v1/models` (e.g. `'moonshotai'`) case-insensitively.\n */\n provider?: string;\n /** Fallback category when `provider` is missing or unknown. */\n category?: ModelCategory;\n /** Size (width and height) in pixels. */\n size?: number;\n}\n\n/**\n * ModelLogo — brand mark for a supported model family, falling back to a\n * category icon for everything else. Renders nothing if no `provider` and\n * no `category` match.\n */\nexport const ModelLogo = React.forwardRef<SVGSVGElement, ModelLogoProps>(\n ({ provider, category, size = 24, className, ...props }, ref) => {\n const resolved = provider ? providerAliases[provider.trim().toLowerCase()] : undefined;\n\n if (resolved === 'berget') {\n return <BergetLogo variant=\"symbol\" size={size} className={cn('shrink-0', className)} />;\n }\n\n if (resolved) {\n return (\n <svg\n ref={ref}\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n width={size}\n height={size}\n role=\"img\"\n aria-label={providerLabels[resolved]}\n className={cn('shrink-0', className)}\n {...props}\n >\n <title>{providerLabels[resolved]}</title>\n {providerPaths[resolved].map((d, i) => (\n <path key={i} d={d} />\n ))}\n </svg>\n );\n }\n\n if (category) {\n const Icon = categoryIcons[category];\n return <Icon className={cn('shrink-0', className)} {...props} />;\n }\n\n return null;\n },\n);\nModelLogo.displayName = 'ModelLogo';\n\nexport { categoryLabels };\n"],"mappings":";;;;;;;;;;AAyBA,MAAM,kBAAqD;CACzD,MAAM;CACN,WAAW;CACX,SAAS;CACT,YAAY;CACZ,MAAM;CACN,QAAQ;CACR,WAAW;CACX,KAAK;CACL,QAAQ;CACR,UAAU;AACZ;;AAGA,MAAM,gBAAwE;CAC5E,MAAM,CACJ,wjDACF;CACA,SAAS,CACP,qMACF;CACA,MAAM,CACJ,uGACA,udACF;CACA,QAAQ;EACN;EACA;EACA;EACA;CACF;CACA,KAAK,CACH,yHACF;AACF;AAEA,MAAM,iBAAoD;CACxD,MAAM;CACN,SAAS;CACT,MAAM;CACN,QAAQ;CACR,KAAK;CACL,QAAQ;AACV;AAEA,MAAM,gBAAoF;CACxF,MAAMA,aAAAA;CACN,kBAAkBC,aAAAA;CAClB,WAAWC,aAAAA;CACX,QAAQC,aAAAA;CACR,cAAcC,aAAAA;CACd,QAAQC,aAAAA;AACV;AAEA,MAAM,iBAAgD;CACpD,MAAM;CACN,kBAAkB;CAClB,WAAW;CACX,QAAQ;CACR,cAAc;CACd,QAAQ;AACV;;;;;;AAmBA,MAAa,YAAYC,MAAM,YAC5B,EAAE,UAAU,UAAU,OAAO,IAAI,WAAW,GAAG,SAAS,QAAQ;CAC/D,MAAM,WAAW,WAAW,gBAAgB,SAAS,KAAK,CAAC,CAAC,YAAY,KAAK,KAAA;CAE7E,IAAI,aAAa,UACf,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,YAAD;EAAY,SAAQ;EAAe;EAAM,WAAWC,cAAAA,GAAG,YAAY,SAAS;CAAI,CAAA;CAGzF,IAAI,UACF,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EACO;EACL,SAAQ;EACR,MAAK;EACL,OAAO;EACP,QAAQ;EACR,MAAK;EACL,cAAY,eAAe;EAC3B,WAAWA,cAAAA,GAAG,YAAY,SAAS;EACnC,GAAI;EATN,UAAA,CAWE,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD,EAAA,UAAQ,eAAe,UAAiB,CAAA,GACvC,cAAc,SAAS,CAAC,KAAK,GAAG,MAC/B,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,EAAiB,EAAI,GAAV,CAAU,CACtB,CACE;;CAIT,IAAI,UAAU;EACZ,MAAM,OAAO,cAAc;EAC3B,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;GAAM,WAAWA,cAAAA,GAAG,YAAY,SAAS;GAAG,GAAI;EAAQ,CAAA;CACjE;CAEA,OAAO;AACT,CACF;AACA,UAAU,cAAc"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/components/model-logo/ModelLogo.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Model families with a bundled brand mark, keyed by the `owned_by` values
|
|
5
|
+
* returned by `GET /v1/models` (normalized: lowercase, aliases below).
|
|
6
|
+
*/
|
|
7
|
+
export type ModelLogoProvider = 'qwen' | 'mistral' | 'kimi' | 'google' | 'zai' | 'berget';
|
|
8
|
+
/** Fallback model categories for models without a brand mark, matching
|
|
9
|
+
* the `model_type` values in `GET /v1/models` (plus `vision`, which lives
|
|
10
|
+
* in per-model capabilities). */
|
|
11
|
+
export type ModelCategory = 'text' | 'speech-to-text' | 'embedding' | 'rerank' | 'system-one' | 'vision';
|
|
12
|
+
declare const categoryLabels: Record<ModelCategory, string>;
|
|
13
|
+
export interface ModelLogoProps extends React.SVGAttributes<SVGSVGElement> {
|
|
14
|
+
/**
|
|
15
|
+
* Model family to render a brand mark for. Accepts the `owned_by` values
|
|
16
|
+
* from `GET /v1/models` (e.g. `'moonshotai'`) case-insensitively.
|
|
17
|
+
*/
|
|
18
|
+
provider?: string;
|
|
19
|
+
/** Fallback category when `provider` is missing or unknown. */
|
|
20
|
+
category?: ModelCategory;
|
|
21
|
+
/** Size (width and height) in pixels. */
|
|
22
|
+
size?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* ModelLogo — brand mark for a supported model family, falling back to a
|
|
26
|
+
* category icon for everything else. Renders nothing if no `provider` and
|
|
27
|
+
* no `category` match.
|
|
28
|
+
*/
|
|
29
|
+
export declare const ModelLogo: React.ForwardRefExoticComponent<ModelLogoProps & React.RefAttributes<SVGSVGElement>>;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { categoryLabels };
|
|
32
|
+
//# sourceMappingURL=ModelLogo.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelLogo.d.cts","names":[],"sources":["../../../src/components/model-logo/ModelLogo.tsx"],"mappings":";;;;;;YAWY;;;;YAKA;cA+DN,gBAAgB,OAAO;iBASZ,uBAAuB,MAAM,cAAc;;;;;EAK1D;;EAEA,WAAW;;EAEX;;;;;;;qBAQW,WAAS,MAAA,0BAAA,iBAAA,MAAA,cAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/components/model-logo/ModelLogo.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Model families with a bundled brand mark, keyed by the `owned_by` values
|
|
5
|
+
* returned by `GET /v1/models` (normalized: lowercase, aliases below).
|
|
6
|
+
*/
|
|
7
|
+
export type ModelLogoProvider = 'qwen' | 'mistral' | 'kimi' | 'google' | 'zai' | 'berget';
|
|
8
|
+
/** Fallback model categories for models without a brand mark, matching
|
|
9
|
+
* the `model_type` values in `GET /v1/models` (plus `vision`, which lives
|
|
10
|
+
* in per-model capabilities). */
|
|
11
|
+
export type ModelCategory = 'text' | 'speech-to-text' | 'embedding' | 'rerank' | 'system-one' | 'vision';
|
|
12
|
+
declare const categoryLabels: Record<ModelCategory, string>;
|
|
13
|
+
export interface ModelLogoProps extends React.SVGAttributes<SVGSVGElement> {
|
|
14
|
+
/**
|
|
15
|
+
* Model family to render a brand mark for. Accepts the `owned_by` values
|
|
16
|
+
* from `GET /v1/models` (e.g. `'moonshotai'`) case-insensitively.
|
|
17
|
+
*/
|
|
18
|
+
provider?: string;
|
|
19
|
+
/** Fallback category when `provider` is missing or unknown. */
|
|
20
|
+
category?: ModelCategory;
|
|
21
|
+
/** Size (width and height) in pixels. */
|
|
22
|
+
size?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* ModelLogo — brand mark for a supported model family, falling back to a
|
|
26
|
+
* category icon for everything else. Renders nothing if no `provider` and
|
|
27
|
+
* no `category` match.
|
|
28
|
+
*/
|
|
29
|
+
export declare const ModelLogo: React.ForwardRefExoticComponent<ModelLogoProps & React.RefAttributes<SVGSVGElement>>;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { categoryLabels };
|
|
32
|
+
//# sourceMappingURL=ModelLogo.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelLogo.d.mts","names":[],"sources":["../../../src/components/model-logo/ModelLogo.tsx"],"mappings":";;;;;;YAWY;;;;YAKA;cA+DN,gBAAgB,OAAO;iBASZ,uBAAuB,MAAM,cAAc;;;;;EAK1D;;EAEA,WAAW;;EAEX;;;;;;;qBAQW,WAAS,MAAA,0BAAA,iBAAA,MAAA,cAAA"}
|