Skip to content

Commit f96858e

Browse files
committed
feat: use preset wind 4
1 parent 6542ea8 commit f96858e

File tree

6 files changed

+44
-50
lines changed

6 files changed

+44
-50
lines changed

packages/devtools/src/app/components/display/ModuleId.vue

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { vTooltip } from 'floating-vue'
2+
import { Tooltip } from 'floating-vue'
33
import { relative } from 'pathe'
44
import { computed } from 'vue'
55
@@ -37,24 +37,32 @@ const containerClass = computed(() => {
3737
</script>
3838

3939
<template>
40-
<div
41-
v-if="id"
42-
v-tooltip.bottom-start="{
43-
content: props.id,
44-
triggers: ['hover', 'focus'],
45-
}"
46-
my-auto text-sm font-mono
47-
:class="containerClass"
40+
<Tooltip
41+
my-auto text-sm font-mono block w-full
42+
:triggers="['hover']"
43+
:delay="1200"
44+
:disabled="(props.id?.length || 0) < 30"
45+
placement="bottom-start"
4846
>
49-
<DisplayFileIcon v-if="icon" :filename="id" mr1.5 />
50-
<span>
51-
<DisplayHighlightedPath :path="relativePath" />
52-
</span>
53-
<slot />
47+
<div
48+
v-if="id"
49+
:class="containerClass"
50+
>
51+
<DisplayFileIcon v-if="icon" :filename="id" mr1.5 />
52+
<span>
53+
<DisplayHighlightedPath :path="relativePath" />
54+
</span>
55+
<slot />
5456
<!-- <DisplayBadge
5557
v-if="isVirtual"
5658
class="ml1"
5759
text="virtual"
5860
/> -->
59-
</div>
61+
</div>
62+
<template #popper>
63+
<span font-mono text-sm>
64+
{{ props.id }}
65+
</span>
66+
</template>
67+
</Tooltip>
6068
</template>

packages/devtools/src/app/styles/cm.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,3 @@ html.dark {
6666
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
6767
background-color: var(--cm-background) !important;
6868
}
69-
70-
.CodeMirror-dialog {
71-
@apply !border-main !py-1;
72-
}
73-
74-
#CodeMirror-search-field {
75-
@apply !border-main !border !rounded !outline-none !border-solid !px-1.5 !py-0.25;
76-
}

packages/devtools/src/app/styles/global.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@ summary::-webkit-details-marker {
6363
--at-apply: text-sm;
6464
}
6565

66-
.v-popper--theme-tooltip {
67-
max-width: 20rem;
68-
}
69-
7066
.v-popper--theme-dropdown {
7167
max-width: 50vw;
7268
max-height: 50vh;

packages/devtools/src/nuxt.config.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ export default defineNuxtConfig({
4141
inlineStyles: false,
4242
},
4343

44-
css: [
45-
'@unocss/reset/tailwind.css',
46-
],
47-
4844
nitro: {
4945
minify: NUXT_DEBUG_BUILD ? false : undefined,
5046
preset: 'static',

packages/devtools/src/uno.config.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
presetIcons,
77
presetTypography,
88
presetWebFonts,
9-
presetWind3,
9+
presetWind4,
1010
transformerDirectives,
1111
transformerVariantGroup,
1212
} from 'unocss'
@@ -20,11 +20,11 @@ export default defineConfig({
2020
'border-base': 'border-#8884',
2121

2222
'border-flow': 'border-#8885',
23-
'border-flow-line': 'border-#222',
23+
'border-flow-line': 'border-#ccc dark:border-#222',
2424
'border-flow-active': 'border-primary-700/50 dark:border-primary-300/50',
2525
'border-flow-line-active': 'border-primary-700/30 dark:border-primary-300/30',
2626

27-
'fg-flow-line': 'color-#222',
27+
'fg-flow-line': 'color-#ccc dark:color-#222',
2828
'fg-flow-line-active': 'color-primary-700/30 dark:color-primary-300/30',
2929

3030
'bg-tooltip': 'bg-white:75 dark:bg-#111:75 backdrop-blur-8',
@@ -59,11 +59,11 @@ export default defineConfig({
5959
'op-mute': 'op30 dark:op25',
6060
'color-deprecated': 'text-op85 text-[#b71c1c] dark:text-[#f87171]',
6161

62-
'color-scale-neutral': 'text-gray7:75 dark:text-gray:75!',
63-
'color-scale-low': 'text-lime7:75 dark:text-lime:75! dark:saturate-50',
64-
'color-scale-medium': 'text-amber7:85 dark:text-amber:85! dark:saturate-80',
65-
'color-scale-high': 'text-orange7:95 dark:text-orange:95!',
66-
'color-scale-critical': 'text-red7:95 dark:text-red:95!',
62+
'color-scale-neutral': 'text-gray-700:75 dark:text-gray-700:75!',
63+
'color-scale-low': 'text-lime-700:75 dark:text-lime-700:75! dark:saturate-50',
64+
'color-scale-medium': 'text-amber-700:85 dark:text-amber-700:85! dark:saturate-80',
65+
'color-scale-high': 'text-orange-700:95 dark:text-orange-700:95!',
66+
'color-scale-critical': 'text-red-700:95 dark:text-red-700:95!',
6767

6868
'page-padding': 'pt-24 pl-112 pr-8 pb-8',
6969
'page-padding-collapsed': 'pt-24 pl-14 pr-8 pb-8',
@@ -90,7 +90,9 @@ export default defineConfig({
9090
},
9191
},
9292
presets: [
93-
presetWind3(),
93+
presetWind4({
94+
95+
}),
9496
presetAttributify(),
9597
presetIcons({
9698
scale: 1.2,

pnpm-lock.yaml

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)