-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
2,239 additions
and
54 deletions.
There are no files selected for viewing
This file contains 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,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + Vue + TS</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
This file contains 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,26 @@ | ||
{ | ||
"name": "playground", | ||
"type": "module", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vue-tsc && vite build", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@vueuse/core": "^10.9.0", | ||
"vue": "^3.4.19" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-vue": "^5.0.4", | ||
"magic-color": "workspace:*", | ||
"typescript": "^5.2.2", | ||
"unocss": "^0.58.5", | ||
"unocss-preset-useful": "^0.4.1", | ||
"unplugin-auto-import": "^0.17.5", | ||
"unplugin-vue-components": "^0.26.0", | ||
"vite": "^5.1.4", | ||
"vue-tsc": "^2.0.4" | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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,11 @@ | ||
<script setup lang="ts"> | ||
</script> | ||
|
||
<template> | ||
<Toggle /> | ||
</template> | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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,14 @@ | ||
/* eslint-disable */ | ||
/* prettier-ignore */ | ||
// @ts-nocheck | ||
// Generated by unplugin-vue-components | ||
// Read more: https://github.com/vuejs/core/pull/3399 | ||
export {} | ||
|
||
declare module 'vue' { | ||
export interface GlobalComponents { | ||
Item: typeof import('./components/ListColor.vue')['default'] | ||
ListColor: typeof import('./components/ListColor.vue')['default'] | ||
Toggle: typeof import('./components/Toggle.vue')['default'] | ||
} | ||
} |
This file contains 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,16 @@ | ||
<script setup lang="ts"> | ||
import { theme as themes } from 'magic-color' | ||
defineProps<{ | ||
theme: ReturnType<typeof themes> | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<ul fcc text-white gap-8 mt-10> | ||
<li fccc v-for="(v, k) in theme" :key="k"> | ||
<div w-10 h-10 :style="{ backgroundColor: v }"></div> | ||
<span>{{ k }}</span> | ||
</li> | ||
</ul> | ||
</template> |
This file contains 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 @@ | ||
<script setup lang="ts"> | ||
import { theme } from 'magic-color' | ||
const color = ref('#d6bbff') | ||
const results = computed(() => { | ||
try { | ||
return theme(color.value) | ||
} catch (e) { | ||
return {} as any | ||
} | ||
}) | ||
</script> | ||
|
||
<template> | ||
<h1>Magic Color</h1> | ||
<input type="text" v-model="color"> | ||
|
||
<ListColor :theme="results" /> | ||
</template> |
This file contains 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,6 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
import 'uno.css' | ||
import './style.css' | ||
|
||
createApp(App).mount('#app') |
This file contains 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,3 @@ | ||
html,body{ | ||
background: #222; | ||
} |
This file contains 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,9 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"lib": ["esnext", "dom"], | ||
"types": [ | ||
"vite/client" | ||
] | ||
} | ||
} |
This file contains 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,8 @@ | ||
import { defineConfig } from 'unocss' | ||
import { presetUseful } from 'unocss-preset-useful' | ||
|
||
export default defineConfig({ | ||
presets: [ | ||
presetUseful(), | ||
], | ||
}) |
This file contains 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,27 @@ | ||
import { defineConfig } from 'vite' | ||
import vue from '@vitejs/plugin-vue' | ||
import UnoCSS from 'unocss/vite' | ||
import Components from 'unplugin-vue-components/vite' | ||
import AutoImport from 'unplugin-auto-import/vite' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [ | ||
vue(), | ||
UnoCSS(), | ||
AutoImport({ | ||
imports: [ | ||
'vue', | ||
'@vueuse/core', | ||
], | ||
dirs: [ | ||
'src/composables', | ||
], | ||
vueTemplate: true, | ||
dts: 'src/auto-imports.d.ts', | ||
}), | ||
Components({ | ||
dts: 'src/components.d.ts', | ||
}), | ||
], | ||
}) |
Oops, something went wrong.