@ggml-org/llama-ui 0.0.0-stage → 0.3.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/LICENSE +21 -0
- package/README.md +66 -2
- package/dist/assets/fonts/LlamaMono.woff2 +0 -0
- package/dist/assets/fonts/LlamaSans.woff2 +0 -0
- package/dist/assets/fonts/OFL.txt +93 -0
- package/dist/assets/hf-logo.svg +8 -0
- package/dist/assets/logo.svg +4 -0
- package/dist/assets/model-logos/gemma.svg +8 -0
- package/dist/assets/model-logos/gpt.svg +3 -0
- package/dist/assets/model-logos/liquid.svg +5 -0
- package/dist/assets/model-logos/meta.svg +3 -0
- package/dist/assets/model-logos/qwen.svg +3 -0
- package/dist/assets/qr-network.svg +1 -0
- package/dist/components/app/actions/ActionIcon.svelte +91 -0
- package/dist/components/app/actions/ActionIcon.svelte.d.ts +21 -0
- package/dist/components/app/actions/index.d.ts +2 -0
- package/dist/components/app/actions/index.js +2 -0
- package/dist/components/app/content/SyntaxHighlightedCode.svelte +164 -0
- package/dist/components/app/content/SyntaxHighlightedCode.svelte.d.ts +13 -0
- package/dist/components/app/content/index.d.ts +1 -0
- package/dist/components/app/content/index.js +1 -0
- package/dist/components/app/forms/SearchInput.svelte +84 -0
- package/dist/components/app/forms/SearchInput.svelte.d.ts +17 -0
- package/dist/components/app/forms/index.d.ts +1 -0
- package/dist/components/app/forms/index.js +1 -0
- package/dist/components/app/misc/Logo.svelte +15 -0
- package/dist/components/app/misc/Logo.svelte.d.ts +13 -0
- package/dist/components/app/misc/index.d.ts +2 -0
- package/dist/components/app/misc/index.js +2 -0
- package/dist/components/mockups/MacMenu.svelte +477 -0
- package/dist/components/mockups/MacMenu.svelte.d.ts +27 -0
- package/dist/components/mockups/WindowsTray.svelte +650 -0
- package/dist/components/mockups/WindowsTray.svelte.d.ts +13 -0
- package/dist/components/mockups/index.d.ts +2 -0
- package/dist/components/mockups/index.js +4 -0
- package/dist/components/models/ModelCapabilityIcons.svelte +117 -0
- package/dist/components/models/ModelCapabilityIcons.svelte.d.ts +15 -0
- package/dist/components/models/ModelCard.svelte +104 -0
- package/dist/components/models/ModelCard.svelte.d.ts +31 -0
- package/dist/components/models/ModelDownloadProgressBar.svelte +32 -0
- package/dist/components/models/ModelDownloadProgressBar.svelte.d.ts +8 -0
- package/dist/components/models/ModelFamilyCard.svelte +130 -0
- package/dist/components/models/ModelFamilyCard.svelte.d.ts +35 -0
- package/dist/components/models/ModelId.svelte +167 -0
- package/dist/components/models/ModelId.svelte.d.ts +38 -0
- package/dist/components/models/ModelMetadataItem.svelte +19 -0
- package/dist/components/models/ModelMetadataItem.svelte.d.ts +7 -0
- package/dist/components/models/ModelOrgAvatar.svelte +125 -0
- package/dist/components/models/ModelOrgAvatar.svelte.d.ts +13 -0
- package/dist/components/models/ModelQuantChip.svelte +301 -0
- package/dist/components/models/ModelQuantChip.svelte.d.ts +26 -0
- package/dist/components/models/ModelQuantOptions.svelte +34 -0
- package/dist/components/models/ModelQuantOptions.svelte.d.ts +11 -0
- package/dist/components/models/ModelQuantRow.svelte +89 -0
- package/dist/components/models/ModelQuantRow.svelte.d.ts +14 -0
- package/dist/components/models/index.d.ts +14 -0
- package/dist/components/models/index.js +14 -0
- package/dist/components/ui/alert/alert-description.svelte +23 -0
- package/dist/components/ui/alert/alert-description.svelte.d.ts +5 -0
- package/dist/components/ui/alert/alert-title.svelte +20 -0
- package/dist/components/ui/alert/alert-title.svelte.d.ts +5 -0
- package/dist/components/ui/alert/alert.svelte +51 -0
- package/dist/components/ui/alert/alert.svelte.d.ts +35 -0
- package/dist/components/ui/alert/index.d.ts +5 -0
- package/dist/components/ui/alert/index.js +7 -0
- package/dist/components/ui/alert-dialog/alert-dialog-action.svelte +19 -0
- package/dist/components/ui/alert-dialog/alert-dialog-action.svelte.d.ts +8 -0
- package/dist/components/ui/alert-dialog/alert-dialog-cancel.svelte +18 -0
- package/dist/components/ui/alert-dialog/alert-dialog-cancel.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/alert-dialog-content.svelte +34 -0
- package/dist/components/ui/alert-dialog/alert-dialog-content.svelte.d.ts +8 -0
- package/dist/components/ui/alert-dialog/alert-dialog-description.svelte +17 -0
- package/dist/components/ui/alert-dialog/alert-dialog-description.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/alert-dialog-footer.svelte +20 -0
- package/dist/components/ui/alert-dialog/alert-dialog-footer.svelte.d.ts +5 -0
- package/dist/components/ui/alert-dialog/alert-dialog-header.svelte +20 -0
- package/dist/components/ui/alert-dialog/alert-dialog-header.svelte.d.ts +5 -0
- package/dist/components/ui/alert-dialog/alert-dialog-overlay.svelte +20 -0
- package/dist/components/ui/alert-dialog/alert-dialog-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/alert-dialog-title.svelte +17 -0
- package/dist/components/ui/alert-dialog/alert-dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/alert-dialog-trigger.svelte +7 -0
- package/dist/components/ui/alert-dialog/alert-dialog-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/index.d.ts +12 -0
- package/dist/components/ui/alert-dialog/index.js +15 -0
- package/dist/components/ui/badge/badge.svelte +61 -0
- package/dist/components/ui/badge/badge.svelte.d.ts +44 -0
- package/dist/components/ui/badge/index.d.ts +2 -0
- package/dist/components/ui/badge/index.js +2 -0
- package/dist/components/ui/button/button.svelte +96 -0
- package/dist/components/ui/button/button.svelte.d.ts +64 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/index.js +4 -0
- package/dist/components/ui/button-group/button-group-root.svelte +30 -0
- package/dist/components/ui/button-group/button-group-root.svelte.d.ts +8 -0
- package/dist/components/ui/button-group/button-group-separator.svelte +12 -0
- package/dist/components/ui/button-group/button-group-separator.svelte.d.ts +4 -0
- package/dist/components/ui/button-group/index.d.ts +2 -0
- package/dist/components/ui/button-group/index.js +2 -0
- package/dist/components/ui/card/card-action.svelte +20 -0
- package/dist/components/ui/card/card-action.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-content.svelte +15 -0
- package/dist/components/ui/card/card-content.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-description.svelte +20 -0
- package/dist/components/ui/card/card-description.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-footer.svelte +20 -0
- package/dist/components/ui/card/card-footer.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-header.svelte +23 -0
- package/dist/components/ui/card/card-header.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-title.svelte +20 -0
- package/dist/components/ui/card/card-title.svelte.d.ts +5 -0
- package/dist/components/ui/card/card.svelte +20 -0
- package/dist/components/ui/card/card.svelte.d.ts +5 -0
- package/dist/components/ui/card/index.d.ts +8 -0
- package/dist/components/ui/card/index.js +10 -0
- package/dist/components/ui/checkbox/checkbox.svelte +36 -0
- package/dist/components/ui/checkbox/checkbox.svelte.d.ts +4 -0
- package/dist/components/ui/checkbox/index.d.ts +2 -0
- package/dist/components/ui/checkbox/index.js +4 -0
- package/dist/components/ui/collapsible/collapsible-content.svelte +7 -0
- package/dist/components/ui/collapsible/collapsible-content.svelte.d.ts +4 -0
- package/dist/components/ui/collapsible/collapsible-trigger.svelte +7 -0
- package/dist/components/ui/collapsible/collapsible-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/collapsible/collapsible.svelte +11 -0
- package/dist/components/ui/collapsible/collapsible.svelte.d.ts +4 -0
- package/dist/components/ui/collapsible/index.d.ts +4 -0
- package/dist/components/ui/collapsible/index.js +6 -0
- package/dist/components/ui/context-menu/context-menu-content.svelte +25 -0
- package/dist/components/ui/context-menu/context-menu-content.svelte.d.ts +7 -0
- package/dist/components/ui/context-menu/context-menu-group.svelte +7 -0
- package/dist/components/ui/context-menu/context-menu-group.svelte.d.ts +4 -0
- package/dist/components/ui/context-menu/context-menu-item.svelte +27 -0
- package/dist/components/ui/context-menu/context-menu-item.svelte.d.ts +8 -0
- package/dist/components/ui/context-menu/context-menu-label.svelte +24 -0
- package/dist/components/ui/context-menu/context-menu-label.svelte.d.ts +8 -0
- package/dist/components/ui/context-menu/context-menu-separator.svelte +17 -0
- package/dist/components/ui/context-menu/context-menu-separator.svelte.d.ts +4 -0
- package/dist/components/ui/context-menu/context-menu-shortcut.svelte +20 -0
- package/dist/components/ui/context-menu/context-menu-shortcut.svelte.d.ts +5 -0
- package/dist/components/ui/context-menu/context-menu-sub-content.svelte +39 -0
- package/dist/components/ui/context-menu/context-menu-sub-content.svelte.d.ts +7 -0
- package/dist/components/ui/context-menu/context-menu-sub-trigger.svelte +30 -0
- package/dist/components/ui/context-menu/context-menu-sub-trigger.svelte.d.ts +7 -0
- package/dist/components/ui/context-menu/context-menu-trigger.svelte +7 -0
- package/dist/components/ui/context-menu/context-menu-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/context-menu/index.d.ts +12 -0
- package/dist/components/ui/context-menu/index.js +13 -0
- package/dist/components/ui/dialog/dialog-close.svelte +13 -0
- package/dist/components/ui/dialog/dialog-close.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-content.svelte +53 -0
- package/dist/components/ui/dialog/dialog-content.svelte.d.ts +12 -0
- package/dist/components/ui/dialog/dialog-description.svelte +17 -0
- package/dist/components/ui/dialog/dialog-description.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-footer.svelte +20 -0
- package/dist/components/ui/dialog/dialog-footer.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-header.svelte +44 -0
- package/dist/components/ui/dialog/dialog-header.svelte.d.ts +8 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte +20 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-title.svelte +17 -0
- package/dist/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-trigger.svelte +7 -0
- package/dist/components/ui/dialog/dialog-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/index.d.ts +11 -0
- package/dist/components/ui/dialog/index.js +14 -0
- package/dist/components/ui/drawer/drawer-close.svelte +7 -0
- package/dist/components/ui/drawer/drawer-close.svelte.d.ts +4 -0
- package/dist/components/ui/drawer/drawer-content.svelte +40 -0
- package/dist/components/ui/drawer/drawer-content.svelte.d.ts +11 -0
- package/dist/components/ui/drawer/drawer-description.svelte +17 -0
- package/dist/components/ui/drawer/drawer-description.svelte.d.ts +4 -0
- package/dist/components/ui/drawer/drawer-footer.svelte +20 -0
- package/dist/components/ui/drawer/drawer-footer.svelte.d.ts +5 -0
- package/dist/components/ui/drawer/drawer-header.svelte +23 -0
- package/dist/components/ui/drawer/drawer-header.svelte.d.ts +5 -0
- package/dist/components/ui/drawer/drawer-nested.svelte +12 -0
- package/dist/components/ui/drawer/drawer-nested.svelte.d.ts +3 -0
- package/dist/components/ui/drawer/drawer-overlay.svelte +20 -0
- package/dist/components/ui/drawer/drawer-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/drawer/drawer-portal.svelte +7 -0
- package/dist/components/ui/drawer/drawer-portal.svelte.d.ts +3 -0
- package/dist/components/ui/drawer/drawer-title.svelte +17 -0
- package/dist/components/ui/drawer/drawer-title.svelte.d.ts +4 -0
- package/dist/components/ui/drawer/drawer-trigger.svelte +7 -0
- package/dist/components/ui/drawer/drawer-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/drawer/drawer.svelte +12 -0
- package/dist/components/ui/drawer/drawer.svelte.d.ts +3 -0
- package/dist/components/ui/drawer/index.d.ts +12 -0
- package/dist/components/ui/drawer/index.js +14 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +42 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +9 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +27 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte.d.ts +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +22 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte.d.ts +8 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-group.svelte +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-group.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +27 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte.d.ts +8 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte +24 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte.d.ts +8 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte +16 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +32 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte +17 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +20 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte.d.ts +5 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +39 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +30 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-trigger.svelte +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +17 -0
- package/dist/components/ui/dropdown-menu/index.js +18 -0
- package/dist/components/ui/empty/empty-content.svelte +23 -0
- package/dist/components/ui/empty/empty-content.svelte.d.ts +5 -0
- package/dist/components/ui/empty/empty-description.svelte +23 -0
- package/dist/components/ui/empty/empty-description.svelte.d.ts +5 -0
- package/dist/components/ui/empty/empty-header.svelte +20 -0
- package/dist/components/ui/empty/empty-header.svelte.d.ts +5 -0
- package/dist/components/ui/empty/empty-media.svelte +42 -0
- package/dist/components/ui/empty/empty-media.svelte.d.ts +26 -0
- package/dist/components/ui/empty/empty-title.svelte +20 -0
- package/dist/components/ui/empty/empty-title.svelte.d.ts +5 -0
- package/dist/components/ui/empty/empty.svelte +23 -0
- package/dist/components/ui/empty/empty.svelte.d.ts +5 -0
- package/dist/components/ui/empty/index.d.ts +7 -0
- package/dist/components/ui/empty/index.js +9 -0
- package/dist/components/ui/hover-card/hover-card-content.svelte +31 -0
- package/dist/components/ui/hover-card/hover-card-content.svelte.d.ts +10 -0
- package/dist/components/ui/hover-card/hover-card-portal.svelte +7 -0
- package/dist/components/ui/hover-card/hover-card-portal.svelte.d.ts +3 -0
- package/dist/components/ui/hover-card/hover-card-trigger.svelte +7 -0
- package/dist/components/ui/hover-card/hover-card-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/hover-card/hover-card.svelte +7 -0
- package/dist/components/ui/hover-card/hover-card.svelte.d.ts +3 -0
- package/dist/components/ui/hover-card/index.d.ts +5 -0
- package/dist/components/ui/hover-card/index.js +5 -0
- package/dist/components/ui/input/index.d.ts +2 -0
- package/dist/components/ui/input/index.js +4 -0
- package/dist/components/ui/input/input.svelte +52 -0
- package/dist/components/ui/input/input.svelte.d.ts +13 -0
- package/dist/components/ui/label/index.d.ts +2 -0
- package/dist/components/ui/label/index.js +4 -0
- package/dist/components/ui/label/label.svelte +20 -0
- package/dist/components/ui/label/label.svelte.d.ts +4 -0
- package/dist/components/ui/popover/index.d.ts +6 -0
- package/dist/components/ui/popover/index.js +8 -0
- package/dist/components/ui/popover/popover-close.svelte +7 -0
- package/dist/components/ui/popover/popover-close.svelte.d.ts +4 -0
- package/dist/components/ui/popover/popover-content.svelte +37 -0
- package/dist/components/ui/popover/popover-content.svelte.d.ts +10 -0
- package/dist/components/ui/popover/popover-portal.svelte +7 -0
- package/dist/components/ui/popover/popover-portal.svelte.d.ts +3 -0
- package/dist/components/ui/popover/popover-trigger.svelte +17 -0
- package/dist/components/ui/popover/popover-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/popover/popover.svelte +7 -0
- package/dist/components/ui/popover/popover.svelte.d.ts +3 -0
- package/dist/components/ui/radio-group/index.d.ts +3 -0
- package/dist/components/ui/radio-group/index.js +5 -0
- package/dist/components/ui/radio-group/radio-group-item.svelte +31 -0
- package/dist/components/ui/radio-group/radio-group-item.svelte.d.ts +4 -0
- package/dist/components/ui/radio-group/radio-group.svelte +19 -0
- package/dist/components/ui/radio-group/radio-group.svelte.d.ts +4 -0
- package/dist/components/ui/scroll-area/index.d.ts +3 -0
- package/dist/components/ui/scroll-area/index.js +5 -0
- package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte +32 -0
- package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte.d.ts +4 -0
- package/dist/components/ui/scroll-area/scroll-area.svelte +43 -0
- package/dist/components/ui/scroll-area/scroll-area.svelte.d.ts +10 -0
- package/dist/components/ui/select/index.d.ts +11 -0
- package/dist/components/ui/select/index.js +14 -0
- package/dist/components/ui/select/select-content.svelte +110 -0
- package/dist/components/ui/select/select-content.svelte.d.ts +8 -0
- package/dist/components/ui/select/select-group-heading.svelte +21 -0
- package/dist/components/ui/select/select-group-heading.svelte.d.ts +10 -0
- package/dist/components/ui/select/select-group.svelte +7 -0
- package/dist/components/ui/select/select-group.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-item.svelte +39 -0
- package/dist/components/ui/select/select-item.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-label.svelte +20 -0
- package/dist/components/ui/select/select-label.svelte.d.ts +6 -0
- package/dist/components/ui/select/select-scroll-down-button.svelte +20 -0
- package/dist/components/ui/select/select-scroll-down-button.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-scroll-up-button.svelte +20 -0
- package/dist/components/ui/select/select-scroll-up-button.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-separator.svelte +18 -0
- package/dist/components/ui/select/select-separator.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-trigger.svelte +47 -0
- package/dist/components/ui/select/select-trigger.svelte.d.ts +9 -0
- package/dist/components/ui/separator/index.d.ts +2 -0
- package/dist/components/ui/separator/index.js +4 -0
- package/dist/components/ui/separator/separator.svelte +20 -0
- package/dist/components/ui/separator/separator.svelte.d.ts +4 -0
- package/dist/components/ui/skeleton/index.d.ts +2 -0
- package/dist/components/ui/skeleton/index.js +4 -0
- package/dist/components/ui/skeleton/skeleton.svelte +17 -0
- package/dist/components/ui/skeleton/skeleton.svelte.d.ts +5 -0
- package/dist/components/ui/switch/index.d.ts +2 -0
- package/dist/components/ui/switch/index.js +4 -0
- package/dist/components/ui/switch/switch.svelte +29 -0
- package/dist/components/ui/switch/switch.svelte.d.ts +4 -0
- package/dist/components/ui/table/index.d.ts +9 -0
- package/dist/components/ui/table/index.js +11 -0
- package/dist/components/ui/table/table-body.svelte +20 -0
- package/dist/components/ui/table/table-body.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-caption.svelte +20 -0
- package/dist/components/ui/table/table-caption.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-cell.svelte +23 -0
- package/dist/components/ui/table/table-cell.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-footer.svelte +20 -0
- package/dist/components/ui/table/table-footer.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-head.svelte +23 -0
- package/dist/components/ui/table/table-head.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-header.svelte +20 -0
- package/dist/components/ui/table/table-header.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-row.svelte +23 -0
- package/dist/components/ui/table/table-row.svelte.d.ts +5 -0
- package/dist/components/ui/table/table.svelte +22 -0
- package/dist/components/ui/table/table.svelte.d.ts +5 -0
- package/dist/components/ui/tabs/index.d.ts +5 -0
- package/dist/components/ui/tabs/index.js +7 -0
- package/dist/components/ui/tabs/tabs-content.svelte +17 -0
- package/dist/components/ui/tabs/tabs-content.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs-list.svelte +170 -0
- package/dist/components/ui/tabs/tabs-list.svelte.d.ts +25 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte +22 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs.svelte +19 -0
- package/dist/components/ui/tabs/tabs.svelte.d.ts +4 -0
- package/dist/components/ui/textarea/index.d.ts +2 -0
- package/dist/components/ui/textarea/index.js +4 -0
- package/dist/components/ui/textarea/textarea.svelte +22 -0
- package/dist/components/ui/textarea/textarea.svelte.d.ts +5 -0
- package/dist/components/ui/toggle/index.d.ts +3 -0
- package/dist/components/ui/toggle/index.js +5 -0
- package/dist/components/ui/toggle/toggle.svelte +57 -0
- package/dist/components/ui/toggle/toggle.svelte.d.ts +52 -0
- package/dist/components/ui/toggle-group/index.d.ts +3 -0
- package/dist/components/ui/toggle-group/index.js +5 -0
- package/dist/components/ui/toggle-group/toggle-group-item.svelte +36 -0
- package/dist/components/ui/toggle-group/toggle-group-item.svelte.d.ts +8 -0
- package/dist/components/ui/toggle-group/toggle-group.svelte +72 -0
- package/dist/components/ui/toggle-group/toggle-group.svelte.d.ts +15 -0
- package/dist/components/ui/tooltip/index.d.ts +7 -0
- package/dist/components/ui/tooltip/index.js +10 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte +62 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte.d.ts +8 -0
- package/dist/components/ui/tooltip/tooltip-trigger.svelte +12 -0
- package/dist/components/ui/tooltip/tooltip-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/utils.d.ts +14 -0
- package/dist/components/ui/utils.js +23 -0
- package/dist/constants/code-block.constants.d.ts +37 -0
- package/dist/constants/code-block.constants.js +51 -0
- package/dist/constants/css-classes.constants.d.ts +11 -0
- package/dist/constants/css-classes.constants.js +28 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.js +3 -0
- package/dist/constants/ui.constants.d.ts +6 -0
- package/dist/constants/ui.constants.js +7 -0
- package/dist/enums/boolean-string.enums.d.ts +5 -0
- package/dist/enums/boolean-string.enums.js +6 -0
- package/dist/enums/index.d.ts +2 -0
- package/dist/enums/index.js +3 -0
- package/dist/enums/ui.enums.d.ts +11 -0
- package/dist/enums/ui.enums.js +14 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.js +42 -0
- package/dist/models/constants.d.ts +51 -0
- package/dist/models/constants.js +66 -0
- package/dist/models/enums.d.ts +24 -0
- package/dist/models/enums.js +28 -0
- package/dist/models/format.d.ts +22 -0
- package/dist/models/format.js +82 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +3 -0
- package/dist/models/types.d.ts +23 -0
- package/dist/models/types.js +3 -0
- package/dist/styles/fonts.css +22 -0
- package/dist/styles/surfaces.css +256 -0
- package/dist/styles/theme.css +122 -0
- package/dist/styles/tokens/components.css +211 -0
- package/dist/styles/tokens/primitives.css +141 -0
- package/dist/styles/tokens/semantic.css +325 -0
- package/dist/styles/tokens.css +7 -0
- package/dist/utils/code.d.ts +7 -0
- package/dist/utils/code.js +65 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/package.json +111 -5
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export var ColorMode;
|
|
2
|
+
(function (ColorMode) {
|
|
3
|
+
ColorMode["DARK"] = "dark";
|
|
4
|
+
ColorMode["LIGHT"] = "light";
|
|
5
|
+
ColorMode["SYSTEM"] = "system";
|
|
6
|
+
})(ColorMode || (ColorMode = {}));
|
|
7
|
+
// From ui/apps/chat's src/lib/enums/ui.enums.ts: the enums the package's components use.
|
|
8
|
+
export var TooltipSide;
|
|
9
|
+
(function (TooltipSide) {
|
|
10
|
+
TooltipSide["BOTTOM"] = "bottom";
|
|
11
|
+
TooltipSide["LEFT"] = "left";
|
|
12
|
+
TooltipSide["RIGHT"] = "right";
|
|
13
|
+
TooltipSide["TOP"] = "top";
|
|
14
|
+
})(TooltipSide || (TooltipSide = {}));
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export { cn, tv, type WithElementRef, type WithoutChild, type WithoutChildren, type WithoutChildrenOrChild } from './components/ui/utils.js';
|
|
2
|
+
export { ActionIcon } from './components/app/actions/index.js';
|
|
3
|
+
export { SyntaxHighlightedCode } from './components/app/content/index.js';
|
|
4
|
+
export { SearchInput } from './components/app/forms/index.js';
|
|
5
|
+
export { Logo } from './components/app/misc/index.js';
|
|
6
|
+
export { FILTER_TOGGLE_ITEM_CLASS, FILTER_TRIGGER_CLASS, PANEL_CLOSE_MOBILE_CLASS } from './constants/index.js';
|
|
7
|
+
export { ColorMode, TooltipSide } from './enums/index.js';
|
|
8
|
+
export { highlightCode } from './utils/index.js';
|
|
9
|
+
export * as Alert from './components/ui/alert/index.js';
|
|
10
|
+
export * as AlertDialog from './components/ui/alert-dialog/index.js';
|
|
11
|
+
export { Badge, badgeVariants, type BadgeVariant } from './components/ui/badge/index.js';
|
|
12
|
+
export { Button, buttonVariants, type ButtonProps, type ButtonSize, type ButtonVariant } from './components/ui/button/index.js';
|
|
13
|
+
export * as ButtonGroup from './components/ui/button-group/index.js';
|
|
14
|
+
export * as Card from './components/ui/card/index.js';
|
|
15
|
+
export { Checkbox } from './components/ui/checkbox/index.js';
|
|
16
|
+
export * as Collapsible from './components/ui/collapsible/index.js';
|
|
17
|
+
export * as ContextMenu from './components/ui/context-menu/index.js';
|
|
18
|
+
export * as Dialog from './components/ui/dialog/index.js';
|
|
19
|
+
export * as Drawer from './components/ui/drawer/index.js';
|
|
20
|
+
export * as DropdownMenu from './components/ui/dropdown-menu/index.js';
|
|
21
|
+
export * as Empty from './components/ui/empty/index.js';
|
|
22
|
+
export * as HoverCard from './components/ui/hover-card/index.js';
|
|
23
|
+
export { Input } from './components/ui/input/index.js';
|
|
24
|
+
export { Label } from './components/ui/label/index.js';
|
|
25
|
+
export * as Popover from './components/ui/popover/index.js';
|
|
26
|
+
export * as RadioGroup from './components/ui/radio-group/index.js';
|
|
27
|
+
export * as ScrollArea from './components/ui/scroll-area/index.js';
|
|
28
|
+
export * as Select from './components/ui/select/index.js';
|
|
29
|
+
export { Separator } from './components/ui/separator/index.js';
|
|
30
|
+
export { Skeleton } from './components/ui/skeleton/index.js';
|
|
31
|
+
export { Switch } from './components/ui/switch/index.js';
|
|
32
|
+
export * as Table from './components/ui/table/index.js';
|
|
33
|
+
export * as Tabs from './components/ui/tabs/index.js';
|
|
34
|
+
export { Textarea } from './components/ui/textarea/index.js';
|
|
35
|
+
export { Toggle, toggleVariants } from './components/ui/toggle/index.js';
|
|
36
|
+
export * as ToggleGroup from './components/ui/toggle-group/index.js';
|
|
37
|
+
export * as Tooltip from './components/ui/tooltip/index.js';
|
|
38
|
+
export * from './components/mockups/index.js';
|
|
39
|
+
export * from './components/models/index.js';
|
|
40
|
+
export * from './models/index.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// public API of the library; grows as pieces are extracted from Llama UI (ui/apps/chat in llama.cpp) and llama.pages.
|
|
2
|
+
// Styles are separate entry points: @ggml-org/llama-ui/theme.css (everything), tokens.css, fonts.css, surfaces.css.
|
|
3
|
+
export { cn, tv } from './components/ui/utils.js';
|
|
4
|
+
export { ActionIcon } from './components/app/actions/index.js';
|
|
5
|
+
export { SyntaxHighlightedCode } from './components/app/content/index.js';
|
|
6
|
+
export { SearchInput } from './components/app/forms/index.js';
|
|
7
|
+
export { Logo } from './components/app/misc/index.js';
|
|
8
|
+
export { FILTER_TOGGLE_ITEM_CLASS, FILTER_TRIGGER_CLASS, PANEL_CLOSE_MOBILE_CLASS } from './constants/index.js';
|
|
9
|
+
export { ColorMode, TooltipSide } from './enums/index.js';
|
|
10
|
+
export { highlightCode } from './utils/index.js';
|
|
11
|
+
export * as Alert from './components/ui/alert/index.js';
|
|
12
|
+
export * as AlertDialog from './components/ui/alert-dialog/index.js';
|
|
13
|
+
export { Badge, badgeVariants } from './components/ui/badge/index.js';
|
|
14
|
+
export { Button, buttonVariants } from './components/ui/button/index.js';
|
|
15
|
+
export * as ButtonGroup from './components/ui/button-group/index.js';
|
|
16
|
+
export * as Card from './components/ui/card/index.js';
|
|
17
|
+
export { Checkbox } from './components/ui/checkbox/index.js';
|
|
18
|
+
export * as Collapsible from './components/ui/collapsible/index.js';
|
|
19
|
+
export * as ContextMenu from './components/ui/context-menu/index.js';
|
|
20
|
+
export * as Dialog from './components/ui/dialog/index.js';
|
|
21
|
+
export * as Drawer from './components/ui/drawer/index.js';
|
|
22
|
+
export * as DropdownMenu from './components/ui/dropdown-menu/index.js';
|
|
23
|
+
export * as Empty from './components/ui/empty/index.js';
|
|
24
|
+
export * as HoverCard from './components/ui/hover-card/index.js';
|
|
25
|
+
export { Input } from './components/ui/input/index.js';
|
|
26
|
+
export { Label } from './components/ui/label/index.js';
|
|
27
|
+
export * as Popover from './components/ui/popover/index.js';
|
|
28
|
+
export * as RadioGroup from './components/ui/radio-group/index.js';
|
|
29
|
+
export * as ScrollArea from './components/ui/scroll-area/index.js';
|
|
30
|
+
export * as Select from './components/ui/select/index.js';
|
|
31
|
+
export { Separator } from './components/ui/separator/index.js';
|
|
32
|
+
export { Skeleton } from './components/ui/skeleton/index.js';
|
|
33
|
+
export { Switch } from './components/ui/switch/index.js';
|
|
34
|
+
export * as Table from './components/ui/table/index.js';
|
|
35
|
+
export * as Tabs from './components/ui/tabs/index.js';
|
|
36
|
+
export { Textarea } from './components/ui/textarea/index.js';
|
|
37
|
+
export { Toggle, toggleVariants } from './components/ui/toggle/index.js';
|
|
38
|
+
export * as ToggleGroup from './components/ui/toggle-group/index.js';
|
|
39
|
+
export * as Tooltip from './components/ui/tooltip/index.js';
|
|
40
|
+
export * from './components/mockups/index.js';
|
|
41
|
+
export * from './components/models/index.js';
|
|
42
|
+
export * from './models/index.js';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ModelCapability, ModelModality } from './enums.js';
|
|
2
|
+
import type { ModelModalities } from './types.js';
|
|
3
|
+
import type { Component } from 'svelte';
|
|
4
|
+
/** Neutral model badge: params, quantization, tags. */
|
|
5
|
+
export declare const MODEL_BADGE_CLASS = "inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-border/50 px-1 py-0 text-[10px] font-mono bg-foreground/15 dark:bg-foreground/10 text-foreground [a&]:hover:bg-foreground/25";
|
|
6
|
+
/** Emphasis model badge: draft sidecars and other markers that must stand out. */
|
|
7
|
+
export declare const MODEL_VARIANT_BADGE_CLASS = "inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md bg-primary px-1.5 py-0 text-[10px] font-mono font-semibold uppercase tracking-wide text-primary-foreground";
|
|
8
|
+
/** Tag badge: free-form tags on a model id. */
|
|
9
|
+
export declare const MODEL_TAG_BADGE_CLASS = "inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-border/50 px-1 py-0 text-[10px] font-mono text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground";
|
|
10
|
+
/** A draft that rides with a quant chip, e.g. `MTP:Q8_0`. */
|
|
11
|
+
export declare const SIDECAR_BADGE_CLASS = "rounded-md bg-primary px-1 py-0.5 text-[10px] font-semibold tracking-wide text-primary-foreground uppercase";
|
|
12
|
+
export declare const MODALITY_ICONS: {
|
|
13
|
+
AUDIO: Component<import("@lucide/svelte").LucideProps, {}, "">;
|
|
14
|
+
VIDEO: Component<import("@lucide/svelte").LucideProps, {}, "">;
|
|
15
|
+
VISION: Component<import("@lucide/svelte").LucideProps, {}, "">;
|
|
16
|
+
};
|
|
17
|
+
export declare const MODALITY_LABELS: {
|
|
18
|
+
AUDIO: string;
|
|
19
|
+
VIDEO: string;
|
|
20
|
+
VISION: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const MODALITY_FLAG_KEYS: Record<Exclude<ModelModality, ModelModality.TEXT>, keyof ModelModalities>;
|
|
23
|
+
export declare const MODALITY_ORDER: Exclude<ModelModality, ModelModality.TEXT>[];
|
|
24
|
+
export declare const CAPABILITY_ICONS: Record<ModelCapability, Component>;
|
|
25
|
+
export declare const CAPABILITY_LABELS: Record<ModelCapability, string>;
|
|
26
|
+
/** Orgs whose avatar is a dark mark on transparent, inverted in dark mode. */
|
|
27
|
+
export declare const DARK_INVERT_AVATAR_ORGS: string[];
|
|
28
|
+
export declare const HF_AVATARS_URL = "https://huggingface.co/api/avatars";
|
|
29
|
+
/** Bit depth that collects every quant no other row takes. */
|
|
30
|
+
export declare const OTHER_BIT_DEPTH = 99;
|
|
31
|
+
export declare const OTHER_BIT_DEPTH_LABEL = "Other";
|
|
32
|
+
export declare const BIT_DEPTH_LABEL_SUFFIX = "-bit";
|
|
33
|
+
export declare const KILOBYTE = 1000;
|
|
34
|
+
export declare const MEGABYTE = 1000000;
|
|
35
|
+
export declare const GIGABYTE = 1000000000;
|
|
36
|
+
export declare const BYTE_LABEL = "B";
|
|
37
|
+
export declare const KILOBYTE_LABEL = "KB";
|
|
38
|
+
export declare const MEGABYTE_LABEL = "MB";
|
|
39
|
+
export declare const GIGABYTE_LABEL = "GB";
|
|
40
|
+
/** Bytes in one mebibyte (MiB), used to convert a file size to MB. */
|
|
41
|
+
export declare const MIB_BYTES = 1048576;
|
|
42
|
+
/** MiB in one tier unit; the tiers below are binary sizes, i.e. GiB. */
|
|
43
|
+
export declare const MB_PER_GB = 1024;
|
|
44
|
+
/** Overhead multiplier applied to the file size when estimating weight memory. */
|
|
45
|
+
export declare const QUANT_WEIGHT = 1.05;
|
|
46
|
+
/** Share of RAM the app allows the model to occupy. */
|
|
47
|
+
export declare const RAM_BUDGET_RATIO = 0.75;
|
|
48
|
+
/** Fixed RAM overhead (MB) reserved for the system and KV cache. */
|
|
49
|
+
export declare const RAM_OVERHEAD_MB = 2048;
|
|
50
|
+
/** Memory sizes devices come with, in GB; a model is shown against the smallest it fits. */
|
|
51
|
+
export declare const MEM_TIERS: number[];
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Model UI's constants, from ui/apps/chat's src/lib/constants (css-classes, icons, ui, huggingface,
|
|
2
|
+
// models-discover-download and model-compatibility).
|
|
3
|
+
import { ModelCapability, ModelModality } from './enums.js';
|
|
4
|
+
import { Eye as VisionIcon, Lightbulb as ReasoningIcon, Mic as AudioIcon, Video as VideoIcon, Wrench as ToolUseIcon } from '@lucide/svelte';
|
|
5
|
+
/** Neutral model badge: params, quantization, tags. */
|
|
6
|
+
export const MODEL_BADGE_CLASS = 'inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-border/50 px-1 py-0 text-[10px] font-mono bg-foreground/15 dark:bg-foreground/10 text-foreground [a&]:hover:bg-foreground/25';
|
|
7
|
+
/** Emphasis model badge: draft sidecars and other markers that must stand out. */
|
|
8
|
+
export const MODEL_VARIANT_BADGE_CLASS = 'inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md bg-primary px-1.5 py-0 text-[10px] font-mono font-semibold uppercase tracking-wide text-primary-foreground';
|
|
9
|
+
/** Tag badge: free-form tags on a model id. */
|
|
10
|
+
export const MODEL_TAG_BADGE_CLASS = 'inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-border/50 px-1 py-0 text-[10px] font-mono text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground';
|
|
11
|
+
/** A draft that rides with a quant chip, e.g. `MTP:Q8_0`. */
|
|
12
|
+
export const SIDECAR_BADGE_CLASS = 'rounded-md bg-primary px-1 py-0.5 text-[10px] font-semibold tracking-wide text-primary-foreground uppercase';
|
|
13
|
+
export const MODALITY_ICONS = {
|
|
14
|
+
[ModelModality.AUDIO]: AudioIcon,
|
|
15
|
+
[ModelModality.VIDEO]: VideoIcon,
|
|
16
|
+
[ModelModality.VISION]: VisionIcon
|
|
17
|
+
};
|
|
18
|
+
export const MODALITY_LABELS = {
|
|
19
|
+
[ModelModality.AUDIO]: 'Audio',
|
|
20
|
+
[ModelModality.VIDEO]: 'Video',
|
|
21
|
+
[ModelModality.VISION]: 'Vision'
|
|
22
|
+
};
|
|
23
|
+
export const MODALITY_FLAG_KEYS = {
|
|
24
|
+
[ModelModality.AUDIO]: 'audio',
|
|
25
|
+
[ModelModality.VIDEO]: 'video',
|
|
26
|
+
[ModelModality.VISION]: 'vision'
|
|
27
|
+
};
|
|
28
|
+
export const MODALITY_ORDER = [
|
|
29
|
+
ModelModality.VISION,
|
|
30
|
+
ModelModality.AUDIO,
|
|
31
|
+
ModelModality.VIDEO
|
|
32
|
+
];
|
|
33
|
+
export const CAPABILITY_ICONS = {
|
|
34
|
+
[ModelCapability.REASONING]: ReasoningIcon,
|
|
35
|
+
[ModelCapability.TOOL_USE]: ToolUseIcon
|
|
36
|
+
};
|
|
37
|
+
export const CAPABILITY_LABELS = {
|
|
38
|
+
[ModelCapability.REASONING]: 'Reasoning',
|
|
39
|
+
[ModelCapability.TOOL_USE]: 'Tool use'
|
|
40
|
+
};
|
|
41
|
+
/** Orgs whose avatar is a dark mark on transparent, inverted in dark mode. */
|
|
42
|
+
export const DARK_INVERT_AVATAR_ORGS = ['openai'];
|
|
43
|
+
export const HF_AVATARS_URL = 'https://huggingface.co/api/avatars';
|
|
44
|
+
/** Bit depth that collects every quant no other row takes. */
|
|
45
|
+
export const OTHER_BIT_DEPTH = 99;
|
|
46
|
+
export const OTHER_BIT_DEPTH_LABEL = 'Other';
|
|
47
|
+
export const BIT_DEPTH_LABEL_SUFFIX = '-bit';
|
|
48
|
+
export const KILOBYTE = 1_000;
|
|
49
|
+
export const MEGABYTE = 1_000_000;
|
|
50
|
+
export const GIGABYTE = 1_000_000_000;
|
|
51
|
+
export const BYTE_LABEL = 'B';
|
|
52
|
+
export const KILOBYTE_LABEL = 'KB';
|
|
53
|
+
export const MEGABYTE_LABEL = 'MB';
|
|
54
|
+
export const GIGABYTE_LABEL = 'GB';
|
|
55
|
+
/** Bytes in one mebibyte (MiB), used to convert a file size to MB. */
|
|
56
|
+
export const MIB_BYTES = 1_048_576;
|
|
57
|
+
/** MiB in one tier unit; the tiers below are binary sizes, i.e. GiB. */
|
|
58
|
+
export const MB_PER_GB = 1024;
|
|
59
|
+
/** Overhead multiplier applied to the file size when estimating weight memory. */
|
|
60
|
+
export const QUANT_WEIGHT = 1.05;
|
|
61
|
+
/** Share of RAM the app allows the model to occupy. */
|
|
62
|
+
export const RAM_BUDGET_RATIO = 0.75;
|
|
63
|
+
/** Fixed RAM overhead (MB) reserved for the system and KV cache. */
|
|
64
|
+
export const RAM_OVERHEAD_MB = 2048;
|
|
65
|
+
/** Memory sizes devices come with, in GB; a model is shown against the smallest it fits. */
|
|
66
|
+
export const MEM_TIERS = [4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare enum ModelModality {
|
|
2
|
+
AUDIO = "AUDIO",
|
|
3
|
+
TEXT = "TEXT",
|
|
4
|
+
VIDEO = "VIDEO",
|
|
5
|
+
VISION = "VISION"
|
|
6
|
+
}
|
|
7
|
+
export declare enum ModelCapability {
|
|
8
|
+
REASONING = "reasoning",
|
|
9
|
+
TOOL_USE = "tools"
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Speculative-decoding draft sidecars (server spec-type draft-*).
|
|
13
|
+
* Filenames use the lowercase token, e.g. `mtp-<name>.gguf` or `-mtp` suffix.
|
|
14
|
+
*/
|
|
15
|
+
export declare enum ModelDraftSidecar {
|
|
16
|
+
/** DFlash block-diffusion draft (spec-type draft-dflash). */
|
|
17
|
+
DFLASH = "dflash",
|
|
18
|
+
/** DSpark block-diffusion draft (spec-type draft-dspark). */
|
|
19
|
+
DSPARK = "dspark",
|
|
20
|
+
/** EAGLE-3 speculative draft (spec-type draft-eagle3). */
|
|
21
|
+
EAGLE3 = "eagle3",
|
|
22
|
+
/** Multi-token-prediction draft head (spec-type draft-mtp). */
|
|
23
|
+
MTP = "mtp"
|
|
24
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// From ui/apps/chat's src/lib/enums/model.enums.ts: the parts Model UI reads.
|
|
2
|
+
export var ModelModality;
|
|
3
|
+
(function (ModelModality) {
|
|
4
|
+
ModelModality["AUDIO"] = "AUDIO";
|
|
5
|
+
ModelModality["TEXT"] = "TEXT";
|
|
6
|
+
ModelModality["VIDEO"] = "VIDEO";
|
|
7
|
+
ModelModality["VISION"] = "VISION";
|
|
8
|
+
})(ModelModality || (ModelModality = {}));
|
|
9
|
+
export var ModelCapability;
|
|
10
|
+
(function (ModelCapability) {
|
|
11
|
+
ModelCapability["REASONING"] = "reasoning";
|
|
12
|
+
ModelCapability["TOOL_USE"] = "tools";
|
|
13
|
+
})(ModelCapability || (ModelCapability = {}));
|
|
14
|
+
/**
|
|
15
|
+
* Speculative-decoding draft sidecars (server spec-type draft-*).
|
|
16
|
+
* Filenames use the lowercase token, e.g. `mtp-<name>.gguf` or `-mtp` suffix.
|
|
17
|
+
*/
|
|
18
|
+
export var ModelDraftSidecar;
|
|
19
|
+
(function (ModelDraftSidecar) {
|
|
20
|
+
/** DFlash block-diffusion draft (spec-type draft-dflash). */
|
|
21
|
+
ModelDraftSidecar["DFLASH"] = "dflash";
|
|
22
|
+
/** DSpark block-diffusion draft (spec-type draft-dspark). */
|
|
23
|
+
ModelDraftSidecar["DSPARK"] = "dspark";
|
|
24
|
+
/** EAGLE-3 speculative draft (spec-type draft-eagle3). */
|
|
25
|
+
ModelDraftSidecar["EAGLE3"] = "eagle3";
|
|
26
|
+
/** Multi-token-prediction draft head (spec-type draft-mtp). */
|
|
27
|
+
ModelDraftSidecar["MTP"] = "mtp";
|
|
28
|
+
})(ModelDraftSidecar || (ModelDraftSidecar = {}));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** A file size with one decimal, e.g. `4.6 GB`. */
|
|
2
|
+
export declare function formatFileSize(bytes: number): string;
|
|
3
|
+
/** A min-max size range with one shared unit, e.g. `19.0-28.6 GB`. */
|
|
4
|
+
export declare function formatSizeRange(min: number, max: number): string;
|
|
5
|
+
/** A parameter or token count, e.g. `8B`, `262.14K`. */
|
|
6
|
+
export declare function formatParameters(params: number | unknown): string;
|
|
7
|
+
/**
|
|
8
|
+
* Avatar URL for a Hugging Face author (org or user). 404s when the author does not exist, so callers should provide
|
|
9
|
+
* a fallback, as ModelOrgAvatar does.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getAvatarUrl(author: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Smallest memory tier (GB) that can run a model of the given file size, or null if nothing fits even the largest
|
|
14
|
+
* tier. `tiers` swaps in a platform's own sizes, such as the memory Macs ship with.
|
|
15
|
+
*/
|
|
16
|
+
export declare function minMemoryTierGb(sizeBytes: number, tiers?: readonly number[]): number | null;
|
|
17
|
+
/**
|
|
18
|
+
* A family's sizes in one line: the smallest to the largest and how many there are, e.g. `E2B–31B · 5 sizes`, or the
|
|
19
|
+
* one size, e.g. `740M`. `params` lists one parameter count per size, smallest first; repeats (a size's instruct and
|
|
20
|
+
* reasoning variants) count as sizes but appear once in the span.
|
|
21
|
+
*/
|
|
22
|
+
export declare function summarizeSizes(params: string[]): string;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// Model UI's formatting and sizing helpers, from ui/apps/chat's HuggingFaceService (formatFileSize, formatSizeRange,
|
|
2
|
+
// getAvatarUrl) and utils (formatParameters, minMemoryTierGb). Pure functions: no fetching, no stores.
|
|
3
|
+
import { BYTE_LABEL, GIGABYTE, GIGABYTE_LABEL, HF_AVATARS_URL, KILOBYTE, KILOBYTE_LABEL, MB_PER_GB, MEGABYTE, MEGABYTE_LABEL, MEM_TIERS, MIB_BYTES, QUANT_WEIGHT, RAM_BUDGET_RATIO, RAM_OVERHEAD_MB } from './constants.js';
|
|
4
|
+
/** A file size with one decimal, e.g. `4.6 GB`. */
|
|
5
|
+
export function formatFileSize(bytes) {
|
|
6
|
+
if (bytes >= GIGABYTE)
|
|
7
|
+
return `${(bytes / GIGABYTE).toFixed(1)} ${GIGABYTE_LABEL}`;
|
|
8
|
+
if (bytes >= MEGABYTE)
|
|
9
|
+
return `${(bytes / MEGABYTE).toFixed(1)} ${MEGABYTE_LABEL}`;
|
|
10
|
+
if (bytes >= KILOBYTE)
|
|
11
|
+
return `${(bytes / KILOBYTE).toFixed(1)} ${KILOBYTE_LABEL}`;
|
|
12
|
+
return `${bytes} ${BYTE_LABEL}`;
|
|
13
|
+
}
|
|
14
|
+
/** A min-max size range with one shared unit, e.g. `19.0-28.6 GB`. */
|
|
15
|
+
export function formatSizeRange(min, max) {
|
|
16
|
+
const unit = max >= GIGABYTE
|
|
17
|
+
? GIGABYTE_LABEL
|
|
18
|
+
: max >= MEGABYTE
|
|
19
|
+
? MEGABYTE_LABEL
|
|
20
|
+
: max >= KILOBYTE
|
|
21
|
+
? KILOBYTE_LABEL
|
|
22
|
+
: BYTE_LABEL;
|
|
23
|
+
const div = unit === GIGABYTE_LABEL
|
|
24
|
+
? GIGABYTE
|
|
25
|
+
: unit === MEGABYTE_LABEL
|
|
26
|
+
? MEGABYTE
|
|
27
|
+
: unit === KILOBYTE_LABEL
|
|
28
|
+
? KILOBYTE
|
|
29
|
+
: 1;
|
|
30
|
+
const fmt = (n) => (div === 1 ? `${n}` : `${(n / div).toFixed(1)}`);
|
|
31
|
+
return `${fmt(min)}-${fmt(max)} ${unit}`;
|
|
32
|
+
}
|
|
33
|
+
/** A parameter or token count, e.g. `8B`, `262.14K`. */
|
|
34
|
+
export function formatParameters(params) {
|
|
35
|
+
if (typeof params !== 'number')
|
|
36
|
+
return 'Unknown';
|
|
37
|
+
if (params >= 1e9) {
|
|
38
|
+
const billions = params / 1e9;
|
|
39
|
+
return `${Number.isInteger(billions) ? billions : billions.toFixed(1)}B`;
|
|
40
|
+
}
|
|
41
|
+
if (params >= 1e6)
|
|
42
|
+
return `${(params / 1e6).toFixed(2)}M`;
|
|
43
|
+
if (params >= 1e3)
|
|
44
|
+
return `${(params / 1e3).toFixed(2)}K`;
|
|
45
|
+
return params.toString();
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Avatar URL for a Hugging Face author (org or user). 404s when the author does not exist, so callers should provide
|
|
49
|
+
* a fallback, as ModelOrgAvatar does.
|
|
50
|
+
*/
|
|
51
|
+
export function getAvatarUrl(author) {
|
|
52
|
+
// OpenRouter-style model ids prefix the provider with a tilde (`~openai/gpt-...`); the avatars endpoint only
|
|
53
|
+
// resolves bare names
|
|
54
|
+
return `${HF_AVATARS_URL}/${author.replace(/^~/, '')}`;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Smallest memory tier (GB) that can run a model of the given file size, or null if nothing fits even the largest
|
|
58
|
+
* tier. `tiers` swaps in a platform's own sizes, such as the memory Macs ship with.
|
|
59
|
+
*/
|
|
60
|
+
export function minMemoryTierGb(sizeBytes, tiers = MEM_TIERS) {
|
|
61
|
+
if (!sizeBytes)
|
|
62
|
+
return null;
|
|
63
|
+
const weightMb = (sizeBytes / MIB_BYTES) * QUANT_WEIGHT;
|
|
64
|
+
for (const tier of tiers) {
|
|
65
|
+
const budgetMb = tier * MB_PER_GB * RAM_BUDGET_RATIO - RAM_OVERHEAD_MB;
|
|
66
|
+
if (weightMb <= budgetMb)
|
|
67
|
+
return tier;
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A family's sizes in one line: the smallest to the largest and how many there are, e.g. `E2B–31B · 5 sizes`, or the
|
|
73
|
+
* one size, e.g. `740M`. `params` lists one parameter count per size, smallest first; repeats (a size's instruct and
|
|
74
|
+
* reasoning variants) count as sizes but appear once in the span.
|
|
75
|
+
*/
|
|
76
|
+
export function summarizeSizes(params) {
|
|
77
|
+
const unique = [...new Set(params)];
|
|
78
|
+
if (params.length <= 1)
|
|
79
|
+
return unique[0] ?? '';
|
|
80
|
+
const span = unique.length === 1 ? unique[0] : `${unique[0]}–${unique[unique.length - 1]}`;
|
|
81
|
+
return `${span} · ${params.length} sizes`;
|
|
82
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface ModelModalities {
|
|
2
|
+
vision: boolean;
|
|
3
|
+
audio: boolean;
|
|
4
|
+
video: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** A min-max size in bytes, across a repo's quants. */
|
|
7
|
+
export interface ModelSizeRange {
|
|
8
|
+
min: number;
|
|
9
|
+
max: number;
|
|
10
|
+
}
|
|
11
|
+
/** Where a quant file stands on this device, as the app knows it. */
|
|
12
|
+
export type ModelQuantState = 'idle' | 'downloading' | 'paused' | 'downloaded' | 'failed';
|
|
13
|
+
/** A draft model that rides along with a quant, e.g. an MTP head. */
|
|
14
|
+
export interface ModelQuantCompanion {
|
|
15
|
+
kind: string;
|
|
16
|
+
quant?: string;
|
|
17
|
+
sizeBytes?: number;
|
|
18
|
+
onDisk?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface ModelDownloadProgress {
|
|
21
|
+
downloadedBytes: number;
|
|
22
|
+
totalBytes: number;
|
|
23
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* Llama Sans, the sans of the Llama type family (OFL, see assets/fonts/OFL.txt): one variable font for every
|
|
2
|
+
weight from 400 to 700 and every optical size from 10 to 36. The browser sets the optical size from font-size
|
|
3
|
+
(font-optical-sizing: auto), so 16px text is spaced and kerned for interfaces, 36px and up tight for headlines
|
|
4
|
+
and text under 16px looser, with a blend in between. Its line box is centred on the cap height, so labels sit in
|
|
5
|
+
the middle of buttons and chips. */
|
|
6
|
+
@font-face {
|
|
7
|
+
font-family: 'Llama Sans';
|
|
8
|
+
src: url('../assets/fonts/LlamaSans.woff2') format('woff2');
|
|
9
|
+
font-weight: 400 700;
|
|
10
|
+
font-style: normal;
|
|
11
|
+
font-display: swap;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* Llama Mono, the family's monospace (OFL, same file), for code, commands and numbers in columns: every character in
|
|
15
|
+
one 600-unit cell, its coding ligatures included, from 400 to 700. */
|
|
16
|
+
@font-face {
|
|
17
|
+
font-family: 'Llama Mono';
|
|
18
|
+
src: url('../assets/fonts/LlamaMono.woff2') format('woff2');
|
|
19
|
+
font-weight: 400 700;
|
|
20
|
+
font-style: normal;
|
|
21
|
+
font-display: swap;
|
|
22
|
+
}
|