-
-
Notifications
You must be signed in to change notification settings - Fork 69
feat: basic ui package setup #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| { | ||
| "name": "@vitejs/devtools-ui", | ||
| "type": "module", | ||
| "version": "0.0.0-alpha.26", | ||
| "private": true, | ||
| "description": "DevTools UI for Vite (work in progress)", | ||
| "author": "VoidZero Inc.", | ||
| "license": "MIT", | ||
| "homepage": "https://github.com/vitejs/devtools#readme", | ||
| "repository": { | ||
| "directory": "packages/ui", | ||
| "type": "git", | ||
| "url": "git+https://github.com/vitejs/devtools.git" | ||
| }, | ||
| "bugs": "https://github.com/vitejs/devtools/issues", | ||
| "keywords": [ | ||
| "vite", | ||
| "devtools", | ||
| "devtools ui" | ||
| ], | ||
| "sideEffects": false, | ||
webfansplz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "exports": { | ||
| ".": { | ||
| "types": "./src/index.ts", | ||
| "import": "./src/index.ts" | ||
| }, | ||
| "./unocss": { | ||
| "types": "./src/unocss/index.ts", | ||
| "import": "./src/unocss/index.ts" | ||
| }, | ||
| "./components/*": { | ||
| "types": "./src/components/*.vue", | ||
| "import": "./src/components/*.vue" | ||
| } | ||
| }, | ||
| "main": "./src/index.ts", | ||
| "module": "./src/index.ts" | ||
| } | ||
2 changes: 2 additions & 0 deletions
2
...ite/src/app/components/visual/Loading.vue → packages/ui/src/components/VisualLoading.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
.../src/app/components/visual/LogoBanner.vue → ...es/ui/src/components/VisualLogoBanner.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export * from './unocss' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| import type { WebFontsOptions } from '@unocss/preset-web-fonts' | ||
| import type { Theme } from '@unocss/preset-wind4' | ||
| import { | ||
| definePreset, | ||
| mergeDeep, | ||
| presetAttributify, | ||
| presetIcons, | ||
| presetTypography, | ||
| presetWebFonts, | ||
| presetWind4, | ||
| transformerDirectives, | ||
| transformerVariantGroup, | ||
| } from 'unocss' | ||
| import { shortcuts } from './shortcuts' | ||
| import { theme } from './theme' | ||
|
|
||
| export interface PresetDevToolsUIOptions { | ||
| webFonts?: WebFontsOptions | ||
| } | ||
|
|
||
| export const presetDevToolsUI = definePreset<PresetDevToolsUIOptions, Theme>((options) => { | ||
| return { | ||
| name: '@vitejs/devtools-ui/preset', | ||
| shortcuts, | ||
| extendTheme(defaultTheme) { | ||
| return mergeDeep(defaultTheme, theme) | ||
| }, | ||
| presets: [ | ||
| presetWind4(), | ||
| presetAttributify(), | ||
| presetIcons({ | ||
| scale: 1.2, | ||
| }), | ||
| presetTypography(), | ||
| presetWebFonts(mergeDeep( | ||
| { | ||
| fonts: { | ||
| sans: 'DM Sans:200,400,700', | ||
| mono: 'DM Mono', | ||
| }, | ||
| }, | ||
| options?.webFonts ?? {}, | ||
| )), | ||
| ], | ||
| transformers: [ | ||
| transformerDirectives(), | ||
| transformerVariantGroup(), | ||
| ], | ||
| } | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| import type { UserShortcuts } from '@unocss/core' | ||
| import type { Theme } from '@unocss/preset-wind4' | ||
|
|
||
| export const shortcuts: UserShortcuts<Theme> = [ | ||
| { | ||
| 'color-base': 'color-neutral-800 dark:color-neutral-300', | ||
| 'bg-base': 'bg-white dark:bg-#111', | ||
| 'bg-secondary': 'bg-#eee dark:bg-#222', | ||
| 'border-base': 'border-#8884', | ||
|
|
||
| 'border-flow': 'border-#8885', | ||
| 'border-flow-line': 'border-#ccc dark:border-#222', | ||
| 'border-flow-active': 'border-primary-700/50 dark:border-primary-300/50', | ||
| 'border-flow-line-active': 'border-primary-700/30 dark:border-primary-300/30', | ||
|
|
||
| 'fg-flow-line': 'color-#ccc dark:color-#222', | ||
| 'fg-flow-line-active': 'color-primary-700/30 dark:color-primary-300/30', | ||
|
|
||
| 'bg-tooltip': 'bg-white:75 dark:bg-#111:75 backdrop-blur-8', | ||
| 'bg-code': 'bg-gray-500:5', | ||
|
|
||
| 'bg-gradient-more': 'bg-gradient-to-t from-white via-white:80 to-white:0 dark:from-#111 dark:via-#111:80 dark:to-#111:0', | ||
|
|
||
| 'color-active': 'color-primary-600 dark:color-primary-300', | ||
| 'border-active': 'border-primary-600/25 dark:border-primary-400/25', | ||
| 'bg-active': 'bg-#8881', | ||
|
|
||
| 'btn-action': 'border border-base rounded flex gap-2 items-center px2 py1 op75 hover:op100 hover:bg-active disabled:pointer-events-none disabled:op30!', | ||
| 'btn-action-sm': 'btn-action text-sm', | ||
| 'btn-action-active': 'color-active border-active! bg-active op100!', | ||
|
|
||
| 'icon-catppuccin': 'light:filter-invert-100 light:filter-hue-rotate-180 light:filter-brightness-80', | ||
|
|
||
| 'z-flowmap-line': 'z--1', | ||
| 'z-graph-bg': 'z-5', | ||
| 'z-graph-link': 'z-10', | ||
| 'z-graph-node': 'z-11', | ||
| 'z-graph-link-active': 'z-12', | ||
| 'z-graph-node-active': 'z-13', | ||
|
|
||
| 'z-panel-no-mobile': 'z-55', | ||
| 'z-panel-nav': 'z-60', | ||
| 'z-panel-content': 'z-65', | ||
| 'z-panel-goto': 'z-70', | ||
| 'z-panel-terminal': 'z-80', | ||
|
|
||
| 'op-fade': 'op65 dark:op55', | ||
| 'op-mute': 'op30 dark:op25', | ||
| 'color-deprecated': 'text-op85 text-[#b71c1c] dark:text-[#f87171]', | ||
|
|
||
| 'color-scale-neutral': 'text-gray-700:75 dark:text-gray-300:75!', | ||
| 'color-scale-low': 'text-lime-700:75 dark:text-lime-300:75! dark:saturate-50', | ||
| 'color-scale-medium': 'text-amber-700:85 dark:text-amber-300:85! dark:saturate-80', | ||
| 'color-scale-high': 'text-orange-700:95 dark:text-orange-300:95!', | ||
| 'color-scale-critical': 'text-red-700:95 dark:text-red-300:95!', | ||
|
|
||
| 'page-padding': 'pt-24 pl-112 pr-8 pb-8', | ||
| 'page-padding-collapsed': 'pt-24 pl-14 pr-8 pb-8', | ||
| }, | ||
| [/^badge-color-(\w+)$/, ([, color]) => `bg-${color}-400:20 dark:bg-${color}-400:10 text-${color}-700 dark:text-${color}-300 border-${color}-600:10 dark:border-${color}-300:10`], | ||
| [/^bg-glass(:\d+)?$/, ([, opacity = ':75']) => `bg-white${opacity} dark:bg-#111${opacity} backdrop-blur-5`], | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import type { Theme } from '@unocss/preset-wind4' | ||
|
|
||
| export const theme: Theme = { | ||
| colors: { | ||
| primary: { | ||
| 50: '#fcf4ff', | ||
| 100: '#f7e5ff', | ||
| 200: '#f0d0ff', | ||
| 300: '#e5acff', | ||
| 400: '#d577ff', | ||
| DEFAULT: '#d577ff', | ||
| 500: '#c543ff', | ||
| 600: '#bd34fe', | ||
| 700: '#9f0fe1', | ||
| 800: '#8512b7', | ||
| 900: '#6d1093', | ||
| 950: '#4d006e', | ||
| }, | ||
| }, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.