Skip to content
This repository was archived by the owner on Jan 1, 2025. It is now read-only.

Commit b5e3c54

Browse files
committed
chore: wip
1 parent 4036a01 commit b5e3c54

File tree

9 files changed

+37
-35
lines changed

9 files changed

+37
-35
lines changed

.stacks/.eslintrc-auto-import.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
"refThrottled": true,
100100
"refWithControl": true,
101101
"repository": true,
102+
"resetPreset": true,
102103
"resolveComponent": true,
103104
"resolveRef": true,
104105
"resolveUnref": true,

.stacks/auto-imports.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ declare global {
100100
const refThrottled: typeof import('@vueuse/core')['refThrottled']
101101
const refWithControl: typeof import('@vueuse/core')['refWithControl']
102102
const repository: typeof import('../config/library')['repository']
103+
const resetPreset: typeof import('../config/ui')['resetPreset']
103104
const resolveComponent: typeof import('vue')['resolveComponent']
104105
const resolveRef: typeof import('@vueuse/core')['resolveRef']
105106
const resolveUnref: typeof import('@vueuse/core')['resolveUnref']
@@ -400,6 +401,7 @@ declare module '@vue/runtime-core' {
400401
readonly refThrottled: UnwrapRef<typeof import('@vueuse/core')['refThrottled']>
401402
readonly refWithControl: UnwrapRef<typeof import('@vueuse/core')['refWithControl']>
402403
readonly repository: UnwrapRef<typeof import('../config/library')['repository']>
404+
readonly resetPreset: UnwrapRef<typeof import('../config/ui')['resetPreset']>
403405
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
404406
readonly resolveRef: UnwrapRef<typeof import('@vueuse/core')['resolveRef']>
405407
readonly resolveUnref: UnwrapRef<typeof import('@vueuse/core')['resolveUnref']>

.stacks/src/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createApp } from 'vue'
22
import Demo from '../../../components/Demo.vue'
3+
import '@unocss/reset/tailwind.css'
34

45
// prepare the messages object from the yaml language files
56
// const messages = Object.fromEntries(

.stacks/src/core/unocss.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ const config: UserConfig = defineConfig({
2121
'vertical-align': 'middle',
2222
},
2323
}),
24-
// presetWebFonts({
25-
// provider: 'bunny', // privacy-friendly Google Web Fonts proxy
26-
// fonts: {
27-
// // these will extend the default theme
28-
// sans: 'Inter',
29-
// mono: 'Inter',
30-
// },
31-
// }),
3224
],
3325

3426
transformers: [

.stacks/src/scripts/copy-files.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env node
21
import { copyFileSync, existsSync, mkdirSync, readdirSync, rmSync, statSync } from 'fs'
32
import { join, resolve } from 'pathe'
43

components/CommandPalette.vue

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ const projects = [
55
]
66
const recent = [projects[0]]
77
const quickActions = [
8-
{ name: 'Add new file...', icon: 'i-heroicons-document-plus', shortcut: 'N', url: '#' },
9-
{ name: 'Add new folder...', icon: 'i-heroicons-folder-plus', shortcut: 'F', url: '#' },
10-
{ name: 'Add hashtag...', icon: 'i-heroicons-hashtag', shortcut: 'H', url: '#' },
11-
{ name: 'Add label...', icon: 'i-heroicons-tag', shortcut: 'L', url: '#' },
8+
{ name: 'Add new file...', icon: 'i-heroicons-outline-document-plus', shortcut: 'N', url: '#' },
9+
{ name: 'Add new folder...', icon: 'i-heroicons-outline-folder-plus', shortcut: 'F', url: '#' },
10+
{ name: 'Add hashtag...', icon: 'i-heroicons-outline-hashtag', shortcut: 'H', url: '#' },
11+
{ name: 'Add label...', icon: 'i-heroicons-outline-tag', shortcut: 'L', url: '#' },
1212
]
1313
1414
const open = ref(true)
@@ -91,36 +91,29 @@ function onSelect(item: any) {
9191
</h2>
9292
<ul class="text-sm text-gray-700">
9393
<!-- Active: "bg-indigo-600 text-white" -->
94-
<li class="group flex cursor-default select-none items-center rounded-md px-3 py-2">
94+
<li
95+
v-for="(action, key) in quickActions"
96+
:key="key"
97+
class="group flex cursor-default select-none items-center rounded-md px-3 py-2"
98+
>
9599
<!-- Active: "text-white", Not Active: "text-gray-400" -->
96-
<i class="i-heroicons-outline-document-plus h-6 w-6 flex-none text-gray-400" />
100+
<i
101+
class="h-6 w-6 flex-none text-gray-400"
102+
:class="action.icon"
103+
/>
97104
<span class="ml-3 flex-auto truncate">Add new file...</span>
98105
<!-- Active: "text-indigo-100", Not Active: "text-gray-400" -->
99-
<span class="ml-3 flex-none text-xs font-semibold text-gray-400"><kbd class="font-sans">⌘</kbd><kbd class="font-sans">N</kbd></span>
100-
</li>
101-
<li class="group flex cursor-default select-none items-center rounded-md px-3 py-2">
102-
<i class="i-heroicons-outline-folder-plus h-6 w-6 flex-none text-gray-400" />
103-
<span class="ml-3 flex-auto truncate">Add new folder...</span>
104-
<span class="ml-3 flex-none text-xs font-semibold text-gray-400"><kbd class="font-sans">⌘</kbd><kbd class="font-sans">F</kbd></span>
105-
</li>
106-
<li class="group flex cursor-default select-none items-center rounded-md px-3 py-2">
107-
<!-- Heroicon name: outline/hashtag -->
108-
<i class="i-heroicons-outline-hashtag h-6 w-6 flex-none text-gray-400" />
109-
<span class="ml-3 flex-auto truncate">Add hashtag...</span>
110-
<span class="ml-3 flex-none text-xs font-semibold text-gray-400"><kbd class="font-sans">⌘</kbd><kbd class="font-sans">H</kbd></span>
111-
</li>
112-
<li class="group flex cursor-default select-none items-center rounded-md px-3 py-2">
113-
<!-- Heroicon name: outline/tag -->
114-
<i class="i-heroicons-outline-tag h-6 w-6 flex-none text-gray-400" />
115-
<span class="ml-3 flex-auto truncate">Add label...</span>
116-
<span class="ml-3 flex-none text-xs font-semibold text-gray-400"><kbd class="font-sans">⌘</kbd><kbd class="font-sans">L</kbd></span>
106+
<span class="ml-3 flex-none text-xs font-semibold text-gray-400"><kbd class="font-sans">⌘</kbd><kbd class="font-sans">{{ action.shortcut }}</kbd></span>
117107
</li>
118108
</ul>
119109
</li>
120110
</ul>
121111

122112
<!-- Results, show/hide based on command palette state. -->
123-
<ul class="max-h-96 overflow-y-auto p-2 text-sm text-gray-700">
113+
<ul
114+
v-if="false"
115+
class="max-h-96 overflow-y-auto p-2 text-sm text-gray-700"
116+
>
124117
<!-- Active: "bg-indigo-600 text-white" -->
125118
<li class="group flex cursor-default select-none items-center rounded-md px-3 py-2">
126119
<!-- Active: "text-white", Not Active: "text-gray-400" -->
@@ -132,7 +125,10 @@ function onSelect(item: any) {
132125
</ul>
133126

134127
<!-- Empty state, show/hide based on command palette state. -->
135-
<div class="py-14 px-6 text-center sm:px-14">
128+
<div
129+
v-if="false"
130+
class="py-14 px-6 text-center sm:px-14"
131+
>
136132
<i class="i-heroicons-outline-folder mx-auto h-6 w-6 text-gray-400" />
137133
<p class="mt-4 text-sm text-gray-900">
138134
We couldn't find any projects with that term. Please try again.

config/components.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* be included in your library. Ensure that those
44
* components exist in ../components/**
55
*/
6+
// TODO: this reset needs to be auto-imported when pre-building based on config file
7+
import '@unocss/reset/tailwind.css'
68

79
const components = ['CommandPalette']
810

config/ui.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ export const trigger = ':stx:'
3333
*/
3434
export const classPrefix = 'stx-'
3535

36+
/**
37+
* Define a standard of reset CSS stylesheets.
38+
* https://www.npmjs.com/package/@unocss/reset
39+
*/
40+
export const resetPreset = 'tailwind'
41+
3642
/**
3743
* Define any of the icon collections you like to use via "icons in pure css."
3844
* See https://stacks.ow3.org/config/icons for a list of available icon sets.

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
"stacks": [
2424
".stacks/src/index.ts"
2525
],
26+
"stacks/*": [
27+
".stacks/*"
28+
],
2629
"components/*": [
2730
"./components/*"
2831
],

0 commit comments

Comments
 (0)