@ggml-org/llama-ui 0.0.0-stage → 0.4.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 +90 -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/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 +19 -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/ModelDraftSidecars.svelte +39 -0
- package/dist/components/models/ModelDraftSidecars.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 +245 -0
- package/dist/components/models/ModelId.svelte.d.ts +50 -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 +16 -0
- package/dist/components/models/index.js +17 -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 +39 -0
- package/dist/index.js +41 -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 +28 -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 +124 -0
- package/dist/styles/tokens/components.css +213 -0
- package/dist/styles/tokens/primitives.css +108 -0
- package/dist/styles/tokens/semantic.css +329 -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 +121 -5
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
code: string;
|
|
3
|
+
language?: string;
|
|
4
|
+
class?: string;
|
|
5
|
+
maxHeight?: string;
|
|
6
|
+
maxWidth?: string;
|
|
7
|
+
/** Auto-scrolls to the bottom of new chunks; pauses on user scroll-up
|
|
8
|
+
* until the user returns to the bottom. */
|
|
9
|
+
streaming?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const SyntaxHighlightedCode: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type SyntaxHighlightedCode = ReturnType<typeof SyntaxHighlightedCode>;
|
|
13
|
+
export default SyntaxHighlightedCode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SyntaxHighlightedCode } from './SyntaxHighlightedCode.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SyntaxHighlightedCode } from './SyntaxHighlightedCode.svelte';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Search, X } from '@lucide/svelte';
|
|
3
|
+
import { Input } from '../../ui/input';
|
|
4
|
+
import { ICON_CLASS_DEFAULT } from '../../../constants';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
autofocus?: boolean;
|
|
8
|
+
value?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
onInput?: (value: string) => void;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
onKeyDown?: (event: KeyboardEvent) => void;
|
|
13
|
+
class?: string;
|
|
14
|
+
/** Input height, matching the small size of the other controls. */
|
|
15
|
+
size?: 'sm' | 'default';
|
|
16
|
+
id?: string;
|
|
17
|
+
ref?: HTMLInputElement | null;
|
|
18
|
+
isCancelAlwaysVisible?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
let {
|
|
22
|
+
autofocus,
|
|
23
|
+
class: className,
|
|
24
|
+
id,
|
|
25
|
+
isCancelAlwaysVisible = false,
|
|
26
|
+
onClose,
|
|
27
|
+
onInput,
|
|
28
|
+
onKeyDown,
|
|
29
|
+
placeholder = 'Search...',
|
|
30
|
+
ref = $bindable(null),
|
|
31
|
+
size = 'default',
|
|
32
|
+
value = $bindable('')
|
|
33
|
+
}: Props = $props();
|
|
34
|
+
|
|
35
|
+
let showClearButton = $derived(isCancelAlwaysVisible || !!value || !!onClose);
|
|
36
|
+
|
|
37
|
+
function handleInput(event: Event) {
|
|
38
|
+
const target = event.target as HTMLInputElement;
|
|
39
|
+
|
|
40
|
+
value = target.value;
|
|
41
|
+
onInput?.(target.value);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function handleClear() {
|
|
45
|
+
if (value) {
|
|
46
|
+
value = '';
|
|
47
|
+
onInput?.('');
|
|
48
|
+
ref?.focus({ preventScroll: true });
|
|
49
|
+
} else {
|
|
50
|
+
onClose?.();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<div class="relative {className}">
|
|
56
|
+
<Search
|
|
57
|
+
class="absolute top-1/2 left-3 z-10 {ICON_CLASS_DEFAULT} -translate-y-1/2 transform text-muted-foreground"
|
|
58
|
+
/>
|
|
59
|
+
|
|
60
|
+
<Input
|
|
61
|
+
bind:ref
|
|
62
|
+
bind:value
|
|
63
|
+
{autofocus}
|
|
64
|
+
class="max-md:h-10 pl-9 {showClearButton ? 'pr-9' : ''} {size === 'sm'
|
|
65
|
+
? 'h-8'
|
|
66
|
+
: ''} [&::-webkit-search-cancel-button]:hidden"
|
|
67
|
+
{id}
|
|
68
|
+
oninput={handleInput}
|
|
69
|
+
onkeydown={onKeyDown}
|
|
70
|
+
{placeholder}
|
|
71
|
+
type="search"
|
|
72
|
+
/>
|
|
73
|
+
|
|
74
|
+
{#if showClearButton}
|
|
75
|
+
<button
|
|
76
|
+
aria-label={value ? 'Clear search' : 'Close'}
|
|
77
|
+
class="absolute top-1/2 right-3 -translate-y-1/2 transform cursor-pointer text-muted-foreground transition-colors hover:text-foreground"
|
|
78
|
+
onclick={handleClear}
|
|
79
|
+
type="button"
|
|
80
|
+
>
|
|
81
|
+
<X class={ICON_CLASS_DEFAULT} />
|
|
82
|
+
</button>
|
|
83
|
+
{/if}
|
|
84
|
+
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
autofocus?: boolean;
|
|
3
|
+
value?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
onInput?: (value: string) => void;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
onKeyDown?: (event: KeyboardEvent) => void;
|
|
8
|
+
class?: string;
|
|
9
|
+
/** Input height, matching the small size of the other controls. */
|
|
10
|
+
size?: 'sm' | 'default';
|
|
11
|
+
id?: string;
|
|
12
|
+
ref?: HTMLInputElement | null;
|
|
13
|
+
isCancelAlwaysVisible?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const SearchInput: import("svelte").Component<Props, {}, "ref" | "value">;
|
|
16
|
+
type SearchInput = ReturnType<typeof SearchInput>;
|
|
17
|
+
export default SearchInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SearchInput } from './SearchInput.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SearchInput } from './SearchInput.svelte';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import icon from '@ggml-org/llama-brand/logo/svg/icon/icon-light.svg?raw';
|
|
3
|
+
|
|
4
|
+
// llama-brand draws the icon in its ink; currentColor lets it follow the text colour.
|
|
5
|
+
const logoMark = icon.replace(/fill="#[0-9a-f]{3,8}"/gi, 'fill="currentColor"');
|
|
6
|
+
|
|
7
|
+
let { class: className = '', style = '' } = $props();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div class={className} {style}>
|
|
11
|
+
{@html logoMark}
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<style>
|
|
15
|
+
div :global(svg) {
|
|
16
|
+
width: var(--size, 1rem);
|
|
17
|
+
height: var(--size, 1rem);
|
|
18
|
+
}
|
|
19
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default Logo;
|
|
2
|
+
type Logo = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
declare const Logo: import("svelte").Component<{
|
|
7
|
+
class?: string;
|
|
8
|
+
style?: string;
|
|
9
|
+
}, {}, "">;
|
|
10
|
+
type $$ComponentProps = {
|
|
11
|
+
class?: string;
|
|
12
|
+
style?: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Llama for Mac's menu (0.47), rebuilt from its source (ggml-org/Llama-macOS, Llama/Menu: Layout, Theme, HeaderView,
|
|
3
|
+
ModelItemView, CatalogItemView, BrowseModelsRow, FooterView) in light mode, every size in points as the app sets it:
|
|
4
|
+
300 wide, rows inset 5 then 8, 40-point model rows with a 28-point round icon, 13 and 11-point system type at 85,
|
|
5
|
+
45 and 32% black. The header with the server's dot and address (and, with `network`, the QR code for phones), the
|
|
6
|
+
installed models with their chips, Recommended for your Mac, Browse models, and the version with Settings and
|
|
7
|
+
Quit. The models are small and medium ones from llama.app's catalog; their logos are the app's own ModelLogos.
|
|
8
|
+
`installed` and `recommended` replace the rows (none installed is the first launch, with a grey dot), and
|
|
9
|
+
`downloading` shows the first recommended row's download in progress. Under a `.dark` ancestor it takes macOS's
|
|
10
|
+
dark menu material. `annotate` pins a page's own marks (numbered callouts) to the menu's edge, level with the part
|
|
11
|
+
they point at: the address, Open chat and Recommended for your Mac.
|
|
12
|
+
|
|
13
|
+
From the Communications' Mac App Store screenshots in ui/apps/chat (tests/stories/brand/communications/store).
|
|
14
|
+
-->
|
|
15
|
+
<script lang="ts" module>
|
|
16
|
+
export type MacMenuPart = 'address' | 'chat' | 'recommended';
|
|
17
|
+
|
|
18
|
+
export interface MacMenuRow {
|
|
19
|
+
active?: boolean;
|
|
20
|
+
logo: string;
|
|
21
|
+
name: string;
|
|
22
|
+
params?: string;
|
|
23
|
+
quant?: string;
|
|
24
|
+
subtitle: string;
|
|
25
|
+
vision?: boolean;
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<script lang="ts">
|
|
30
|
+
import gemma from '../../assets/model-logos/gemma.svg?raw';
|
|
31
|
+
import gpt from '../../assets/model-logos/gpt.svg?raw';
|
|
32
|
+
import liquid from '../../assets/model-logos/liquid.svg?raw';
|
|
33
|
+
import qwen from '../../assets/model-logos/qwen.svg?raw';
|
|
34
|
+
import qr from '../../assets/qr-network.svg?raw';
|
|
35
|
+
import {
|
|
36
|
+
ArrowDown,
|
|
37
|
+
ArrowUpRight,
|
|
38
|
+
ChevronRight,
|
|
39
|
+
Copy,
|
|
40
|
+
Glasses,
|
|
41
|
+
LayoutGrid,
|
|
42
|
+
QrCode
|
|
43
|
+
} from '@lucide/svelte';
|
|
44
|
+
|
|
45
|
+
import type { Snippet } from 'svelte';
|
|
46
|
+
|
|
47
|
+
type Row = MacMenuRow;
|
|
48
|
+
|
|
49
|
+
interface Props {
|
|
50
|
+
/** a page's mark (a numbered callout) for a part of the menu, centred on the menu's edge level with it */
|
|
51
|
+
annotate?: Snippet<[MacMenuPart]>;
|
|
52
|
+
/** the first recommended row's download, from 0 to 1 */
|
|
53
|
+
downloading?: number;
|
|
54
|
+
/** the installed models, in place of the default ones; none is the first launch */
|
|
55
|
+
installed?: Row[];
|
|
56
|
+
/** the server reachable from other devices: its network address, and the QR code open */
|
|
57
|
+
network?: boolean;
|
|
58
|
+
/** the models recommended for this Mac, in place of the default ones */
|
|
59
|
+
recommended?: Row[];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const INSTALLED: Row[] = [
|
|
63
|
+
{
|
|
64
|
+
active: true,
|
|
65
|
+
logo: gemma,
|
|
66
|
+
name: 'gemma-4',
|
|
67
|
+
params: 'E4B',
|
|
68
|
+
quant: 'Q4_K_M',
|
|
69
|
+
subtitle: '4.59 GB ∣ 128k ctx',
|
|
70
|
+
vision: true
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
logo: gpt,
|
|
74
|
+
name: 'gpt-oss',
|
|
75
|
+
params: '20B',
|
|
76
|
+
quant: 'MXFP4',
|
|
77
|
+
subtitle: '12.1 GB ∣ 128k ctx'
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
logo: liquid,
|
|
81
|
+
name: 'LFM3-Omni',
|
|
82
|
+
params: '2B',
|
|
83
|
+
quant: 'Q8_0',
|
|
84
|
+
subtitle: '1.8 GB ∣ 32k ctx',
|
|
85
|
+
vision: true
|
|
86
|
+
}
|
|
87
|
+
];
|
|
88
|
+
const RECOMMENDED: Row[] = [
|
|
89
|
+
{
|
|
90
|
+
logo: liquid,
|
|
91
|
+
name: 'LFM2.5',
|
|
92
|
+
params: '24B-A2B',
|
|
93
|
+
quant: 'Q4_K_M',
|
|
94
|
+
subtitle: 'Good first model ∣ 14.5 GB'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
logo: qwen,
|
|
98
|
+
name: 'Qwen3.8',
|
|
99
|
+
params: '27B',
|
|
100
|
+
quant: 'Q4_K_M',
|
|
101
|
+
subtitle: '16.8 GB',
|
|
102
|
+
vision: true
|
|
103
|
+
}
|
|
104
|
+
];
|
|
105
|
+
let {
|
|
106
|
+
annotate,
|
|
107
|
+
downloading,
|
|
108
|
+
installed = INSTALLED,
|
|
109
|
+
network = false,
|
|
110
|
+
recommended = RECOMMENDED
|
|
111
|
+
}: Props = $props();
|
|
112
|
+
|
|
113
|
+
const host = $derived(network ? '100.101.42.7:9931' : 'localhost:9931');
|
|
114
|
+
</script>
|
|
115
|
+
|
|
116
|
+
{#snippet title(row: Row)}
|
|
117
|
+
<span class="title">
|
|
118
|
+
{row.name}{#if row.params}<i class="chip squared">{row.params}</i>{/if}{#if row.quant}<i
|
|
119
|
+
class="chip rounded">{row.quant}</i
|
|
120
|
+
>{/if}{#if row.vision}<Glasses class="vision" size={13} strokeWidth={1.75} />{/if}
|
|
121
|
+
</span>
|
|
122
|
+
{/snippet}
|
|
123
|
+
|
|
124
|
+
<!-- a page's mark, on the menu's edge on the side given -->
|
|
125
|
+
{#snippet mark(part: MacMenuPart, side: 'left' | 'right')}
|
|
126
|
+
{#if annotate}<span class={['mark', side]}>{@render annotate(part)}</span>{/if}
|
|
127
|
+
{/snippet}
|
|
128
|
+
|
|
129
|
+
{#snippet modelRow(row: Row, trailing: 'chevron' | 'install', progress?: number)}
|
|
130
|
+
<div class="row model">
|
|
131
|
+
<span class={['icon', { active: row.active }]}>{@html row.logo}</span>
|
|
132
|
+
|
|
133
|
+
<span class="text">
|
|
134
|
+
{@render title(row)}
|
|
135
|
+
|
|
136
|
+
<span class="subtitle">{row.subtitle}</span>
|
|
137
|
+
</span>
|
|
138
|
+
|
|
139
|
+
{#if trailing === 'chevron'}
|
|
140
|
+
<ChevronRight class="trailing" size={14} strokeWidth={2} />
|
|
141
|
+
{:else if progress !== undefined}
|
|
142
|
+
<span class="percent">{Math.round(progress * 100)}%</span>
|
|
143
|
+
|
|
144
|
+
<i class="progress"><i style:width="{progress * 100}%"></i></i>
|
|
145
|
+
{:else}
|
|
146
|
+
<ArrowDown class="trailing" size={14} strokeWidth={2} />
|
|
147
|
+
{/if}
|
|
148
|
+
</div>
|
|
149
|
+
{/snippet}
|
|
150
|
+
|
|
151
|
+
<div class="menu">
|
|
152
|
+
<div class="row header">
|
|
153
|
+
<p class="name">Llama <i class={['dot', { idle: installed.length === 0 }]}></i></p>
|
|
154
|
+
|
|
155
|
+
<p class="actions">
|
|
156
|
+
<span class="anchor">{@render mark('address', 'left')}{host}</span>
|
|
157
|
+
|
|
158
|
+
<Copy class="glyph" size={11} strokeWidth={2} />
|
|
159
|
+
|
|
160
|
+
{#if network}<QrCode class="glyph qr" size={11} strokeWidth={2} />{/if}
|
|
161
|
+
|
|
162
|
+
{#if installed.length}<span class="open anchor">Open chat{@render mark('chat', 'right')}</span>{/if}
|
|
163
|
+
</p>
|
|
164
|
+
|
|
165
|
+
{#if network}<span class="qrcode">{@html qr}</span>{/if}
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
<i class="separator"></i>
|
|
169
|
+
|
|
170
|
+
<p class="row section">Installed <span class="link">models</span></p>
|
|
171
|
+
|
|
172
|
+
{#each installed as row (row.name)}{@render modelRow(row, 'chevron')}{:else}<p class="row none">
|
|
173
|
+
None yet
|
|
174
|
+
</p>{/each}
|
|
175
|
+
|
|
176
|
+
<i class="separator"></i>
|
|
177
|
+
|
|
178
|
+
<p class="row section anchor">{@render mark('recommended', 'left')}Recommended for your Mac</p>
|
|
179
|
+
|
|
180
|
+
{#each recommended as row, i (row.name)}{@render modelRow(
|
|
181
|
+
row,
|
|
182
|
+
'install',
|
|
183
|
+
i === 0 ? downloading : undefined
|
|
184
|
+
)}{/each}
|
|
185
|
+
|
|
186
|
+
<i class="separator"></i>
|
|
187
|
+
|
|
188
|
+
<div class="row model">
|
|
189
|
+
<span class="icon"><LayoutGrid size={16} strokeWidth={1.75} /></span>
|
|
190
|
+
|
|
191
|
+
<span class="text">
|
|
192
|
+
<span class="title">Browse models</span>
|
|
193
|
+
|
|
194
|
+
<span class="subtitle">Full catalog on the web</span>
|
|
195
|
+
</span>
|
|
196
|
+
|
|
197
|
+
<ArrowUpRight class="trailing" size={14} strokeWidth={2} />
|
|
198
|
+
</div>
|
|
199
|
+
|
|
200
|
+
<i class="separator"></i>
|
|
201
|
+
|
|
202
|
+
<div class="row footer">
|
|
203
|
+
<span>0.47.0<span class="tertiary"> · llama.cpp b12110</span></span>
|
|
204
|
+
|
|
205
|
+
<span class="buttons"><span>Settings</span><span>Quit</span></span>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
|
|
209
|
+
<style>
|
|
210
|
+
/* the menu: macOS's light menu material, 300 points wide */
|
|
211
|
+
.menu {
|
|
212
|
+
--primary: rgb(0 0 0 / 0.85);
|
|
213
|
+
--secondary: rgb(0 0 0 / 0.45);
|
|
214
|
+
--tertiary: rgb(0 0 0 / 0.32);
|
|
215
|
+
--subtle: rgb(0 0 0 / 0.06);
|
|
216
|
+
--border: rgb(0 0 0 / 0.15);
|
|
217
|
+
--separator: rgb(0 0 0 / 0.1);
|
|
218
|
+
--link: #0068da;
|
|
219
|
+
|
|
220
|
+
display: flex;
|
|
221
|
+
flex-direction: column;
|
|
222
|
+
width: 300px;
|
|
223
|
+
box-sizing: border-box;
|
|
224
|
+
padding: 5px 0;
|
|
225
|
+
border: 0.5px solid rgb(0 0 0 / 0.12);
|
|
226
|
+
border-radius: 10px;
|
|
227
|
+
background: rgb(246 246 246 / 0.9);
|
|
228
|
+
color: var(--primary);
|
|
229
|
+
font:
|
|
230
|
+
400 13px / 1.25 -apple-system,
|
|
231
|
+
BlinkMacSystemFont,
|
|
232
|
+
'SF Pro Text',
|
|
233
|
+
system-ui,
|
|
234
|
+
sans-serif;
|
|
235
|
+
box-shadow:
|
|
236
|
+
0 10px 30px rgb(0 0 0 / 0.18),
|
|
237
|
+
0 0 0 0.5px rgb(0 0 0 / 0.06);
|
|
238
|
+
backdrop-filter: blur(30px) saturate(1.6);
|
|
239
|
+
}
|
|
240
|
+
/* macOS's dark menu material, under a page's dark theme */
|
|
241
|
+
:global(.dark) .menu {
|
|
242
|
+
--primary: rgb(255 255 255 / 0.88);
|
|
243
|
+
--secondary: rgb(255 255 255 / 0.55);
|
|
244
|
+
--tertiary: rgb(255 255 255 / 0.4);
|
|
245
|
+
--subtle: rgb(255 255 255 / 0.1);
|
|
246
|
+
--border: rgb(255 255 255 / 0.2);
|
|
247
|
+
--separator: rgb(255 255 255 / 0.12);
|
|
248
|
+
--link: #3d9bff;
|
|
249
|
+
--icon: rgb(255 255 255 / 0.75);
|
|
250
|
+
--trailing: rgb(255 255 255 / 0.3);
|
|
251
|
+
|
|
252
|
+
border-color: rgb(255 255 255 / 0.14);
|
|
253
|
+
background: rgb(40 40 42 / 0.82);
|
|
254
|
+
box-shadow:
|
|
255
|
+
0 10px 30px rgb(0 0 0 / 0.45),
|
|
256
|
+
0 0 0 0.5px rgb(0 0 0 / 0.6);
|
|
257
|
+
}
|
|
258
|
+
.menu p {
|
|
259
|
+
margin: 0;
|
|
260
|
+
}
|
|
261
|
+
/* a page's mark: a box of no size on the menu's edge, its content centred on it. Every anchor's text starts 13.5
|
|
262
|
+
points in (the row's 5 and 8, and the border's half) */
|
|
263
|
+
.anchor {
|
|
264
|
+
position: relative;
|
|
265
|
+
}
|
|
266
|
+
.mark {
|
|
267
|
+
position: absolute;
|
|
268
|
+
top: 50%;
|
|
269
|
+
display: flex;
|
|
270
|
+
align-items: center;
|
|
271
|
+
justify-content: center;
|
|
272
|
+
width: 0;
|
|
273
|
+
height: 0;
|
|
274
|
+
}
|
|
275
|
+
.mark.left {
|
|
276
|
+
left: -13.5px;
|
|
277
|
+
}
|
|
278
|
+
.mark.right {
|
|
279
|
+
right: -13.5px;
|
|
280
|
+
}
|
|
281
|
+
.section.anchor .mark.left {
|
|
282
|
+
left: -5.5px;
|
|
283
|
+
}
|
|
284
|
+
/* every row: inset 5 from the menu, then 8 more to its content, 4 above and below */
|
|
285
|
+
.row {
|
|
286
|
+
margin: 0 5px;
|
|
287
|
+
padding: 4px 8px;
|
|
288
|
+
}
|
|
289
|
+
.header {
|
|
290
|
+
display: grid;
|
|
291
|
+
gap: 4px;
|
|
292
|
+
}
|
|
293
|
+
.name {
|
|
294
|
+
display: flex;
|
|
295
|
+
align-items: baseline;
|
|
296
|
+
gap: 6px;
|
|
297
|
+
font-weight: 600;
|
|
298
|
+
}
|
|
299
|
+
.dot {
|
|
300
|
+
width: 6px;
|
|
301
|
+
height: 6px;
|
|
302
|
+
border-radius: 50%;
|
|
303
|
+
background: #34c759;
|
|
304
|
+
transform: translateY(-1px);
|
|
305
|
+
}
|
|
306
|
+
.actions {
|
|
307
|
+
display: flex;
|
|
308
|
+
align-items: center;
|
|
309
|
+
gap: 6px;
|
|
310
|
+
font-size: 11px;
|
|
311
|
+
}
|
|
312
|
+
.actions :global(.glyph) {
|
|
313
|
+
color: var(--secondary);
|
|
314
|
+
}
|
|
315
|
+
.actions :global(.qr) {
|
|
316
|
+
margin-left: 4px;
|
|
317
|
+
}
|
|
318
|
+
.open {
|
|
319
|
+
margin-left: auto;
|
|
320
|
+
color: var(--link);
|
|
321
|
+
}
|
|
322
|
+
.qrcode {
|
|
323
|
+
display: block;
|
|
324
|
+
width: 90px;
|
|
325
|
+
height: 90px;
|
|
326
|
+
margin-top: 6px;
|
|
327
|
+
color: rgb(0 0 0 / 0.88);
|
|
328
|
+
}
|
|
329
|
+
.qrcode :global(svg) {
|
|
330
|
+
display: block;
|
|
331
|
+
width: 100%;
|
|
332
|
+
height: 100%;
|
|
333
|
+
}
|
|
334
|
+
:global(.dark) .qrcode {
|
|
335
|
+
color: rgb(255 255 255 / 0.88);
|
|
336
|
+
}
|
|
337
|
+
.dot.idle {
|
|
338
|
+
background: rgb(0 0 0 / 0.25);
|
|
339
|
+
}
|
|
340
|
+
.none {
|
|
341
|
+
color: var(--secondary);
|
|
342
|
+
font-size: 11px;
|
|
343
|
+
}
|
|
344
|
+
.percent {
|
|
345
|
+
color: var(--secondary);
|
|
346
|
+
font-size: 11px;
|
|
347
|
+
font-variant-numeric: tabular-nums;
|
|
348
|
+
}
|
|
349
|
+
.progress {
|
|
350
|
+
position: absolute;
|
|
351
|
+
right: 8px;
|
|
352
|
+
bottom: 0;
|
|
353
|
+
left: 44px;
|
|
354
|
+
height: 3px;
|
|
355
|
+
overflow: hidden;
|
|
356
|
+
border-radius: 2px;
|
|
357
|
+
background: var(--subtle);
|
|
358
|
+
}
|
|
359
|
+
.progress i {
|
|
360
|
+
display: block;
|
|
361
|
+
height: 100%;
|
|
362
|
+
background: var(--link);
|
|
363
|
+
}
|
|
364
|
+
.separator {
|
|
365
|
+
display: block;
|
|
366
|
+
height: 1px;
|
|
367
|
+
margin: 5.5px 13px;
|
|
368
|
+
background: var(--separator);
|
|
369
|
+
}
|
|
370
|
+
.section {
|
|
371
|
+
font-size: 11px;
|
|
372
|
+
}
|
|
373
|
+
.link {
|
|
374
|
+
margin-left: 2px;
|
|
375
|
+
color: var(--link);
|
|
376
|
+
}
|
|
377
|
+
.model {
|
|
378
|
+
position: relative;
|
|
379
|
+
display: flex;
|
|
380
|
+
align-items: center;
|
|
381
|
+
gap: 6px;
|
|
382
|
+
height: 40px;
|
|
383
|
+
box-sizing: border-box;
|
|
384
|
+
}
|
|
385
|
+
/* a model's icon: its maker's logo in a 28-point circle, in the accent when it is loaded */
|
|
386
|
+
.icon {
|
|
387
|
+
display: grid;
|
|
388
|
+
flex: none;
|
|
389
|
+
place-items: center;
|
|
390
|
+
width: 28px;
|
|
391
|
+
height: 28px;
|
|
392
|
+
border-radius: 50%;
|
|
393
|
+
background: var(--subtle);
|
|
394
|
+
color: var(--icon, rgb(0 0 0 / 0.65));
|
|
395
|
+
}
|
|
396
|
+
.icon :global(svg) {
|
|
397
|
+
width: 16px;
|
|
398
|
+
height: 16px;
|
|
399
|
+
}
|
|
400
|
+
.icon.active {
|
|
401
|
+
background: #007aff;
|
|
402
|
+
color: #fff;
|
|
403
|
+
}
|
|
404
|
+
.text {
|
|
405
|
+
display: grid;
|
|
406
|
+
flex: 1;
|
|
407
|
+
gap: 2px;
|
|
408
|
+
min-width: 0;
|
|
409
|
+
}
|
|
410
|
+
.title {
|
|
411
|
+
display: flex;
|
|
412
|
+
align-items: center;
|
|
413
|
+
gap: 4px;
|
|
414
|
+
white-space: nowrap;
|
|
415
|
+
}
|
|
416
|
+
/* the chips, 14 points high in 9-point medium text: the size outlined, the quant filled */
|
|
417
|
+
.chip {
|
|
418
|
+
display: inline-grid;
|
|
419
|
+
place-items: center;
|
|
420
|
+
height: 14px;
|
|
421
|
+
padding: 0 5px;
|
|
422
|
+
box-sizing: border-box;
|
|
423
|
+
color: var(--secondary);
|
|
424
|
+
font:
|
|
425
|
+
500 9px / 1 -apple-system,
|
|
426
|
+
BlinkMacSystemFont,
|
|
427
|
+
'SF Pro Text',
|
|
428
|
+
system-ui,
|
|
429
|
+
sans-serif;
|
|
430
|
+
font-style: normal;
|
|
431
|
+
letter-spacing: 0.01em;
|
|
432
|
+
}
|
|
433
|
+
.squared {
|
|
434
|
+
border: 1px solid var(--border);
|
|
435
|
+
border-radius: 4px;
|
|
436
|
+
}
|
|
437
|
+
.rounded {
|
|
438
|
+
border-radius: 7px;
|
|
439
|
+
background: var(--subtle);
|
|
440
|
+
}
|
|
441
|
+
.title :global(.vision) {
|
|
442
|
+
color: var(--tertiary);
|
|
443
|
+
}
|
|
444
|
+
.subtitle {
|
|
445
|
+
overflow: hidden;
|
|
446
|
+
color: var(--secondary);
|
|
447
|
+
font-size: 11px;
|
|
448
|
+
white-space: pre;
|
|
449
|
+
text-overflow: ellipsis;
|
|
450
|
+
}
|
|
451
|
+
.row :global(.trailing) {
|
|
452
|
+
flex: none;
|
|
453
|
+
color: var(--trailing, rgb(0 0 0 / 0.26));
|
|
454
|
+
}
|
|
455
|
+
.footer {
|
|
456
|
+
display: flex;
|
|
457
|
+
align-items: center;
|
|
458
|
+
justify-content: space-between;
|
|
459
|
+
height: 28px;
|
|
460
|
+
padding-block: 0;
|
|
461
|
+
box-sizing: border-box;
|
|
462
|
+
font-size: 11px;
|
|
463
|
+
}
|
|
464
|
+
.tertiary {
|
|
465
|
+
color: var(--secondary);
|
|
466
|
+
}
|
|
467
|
+
.buttons {
|
|
468
|
+
display: flex;
|
|
469
|
+
gap: 5px;
|
|
470
|
+
}
|
|
471
|
+
.buttons span {
|
|
472
|
+
padding: 2px 4px;
|
|
473
|
+
border: 1px solid var(--border);
|
|
474
|
+
border-radius: 5px;
|
|
475
|
+
color: var(--secondary);
|
|
476
|
+
}
|
|
477
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type MacMenuPart = 'address' | 'chat' | 'recommended';
|
|
2
|
+
export interface MacMenuRow {
|
|
3
|
+
active?: boolean;
|
|
4
|
+
logo: string;
|
|
5
|
+
name: string;
|
|
6
|
+
params?: string;
|
|
7
|
+
quant?: string;
|
|
8
|
+
subtitle: string;
|
|
9
|
+
vision?: boolean;
|
|
10
|
+
}
|
|
11
|
+
import type { Snippet } from 'svelte';
|
|
12
|
+
type Row = MacMenuRow;
|
|
13
|
+
interface Props {
|
|
14
|
+
/** a page's mark (a numbered callout) for a part of the menu, centred on the menu's edge level with it */
|
|
15
|
+
annotate?: Snippet<[MacMenuPart]>;
|
|
16
|
+
/** the first recommended row's download, from 0 to 1 */
|
|
17
|
+
downloading?: number;
|
|
18
|
+
/** the installed models, in place of the default ones; none is the first launch */
|
|
19
|
+
installed?: Row[];
|
|
20
|
+
/** the server reachable from other devices: its network address, and the QR code open */
|
|
21
|
+
network?: boolean;
|
|
22
|
+
/** the models recommended for this Mac, in place of the default ones */
|
|
23
|
+
recommended?: Row[];
|
|
24
|
+
}
|
|
25
|
+
declare const MacMenu: import("svelte").Component<Props, {}, "">;
|
|
26
|
+
type MacMenu = ReturnType<typeof MacMenu>;
|
|
27
|
+
export default MacMenu;
|