@nuxt/devtools-ui-kit 0.3.0 → 0.3.2
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/dist/components/NSectionBlock.vue +10 -3
- package/dist/module.json +1 -1
- package/dist/module.mjs +4 -1
- package/dist/runtime/client.d.ts +1 -1
- package/dist/unocss.d.ts +1 -1
- package/dist/unocss.mjs +101 -99
- package/package.json +7 -6
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
2
|
+
import { useVModel } from '@vueuse/core'
|
|
3
|
+
|
|
4
|
+
const props = withDefaults(
|
|
3
5
|
defineProps<{
|
|
4
6
|
icon?: string
|
|
5
7
|
text: string
|
|
@@ -15,10 +17,15 @@ withDefaults(
|
|
|
15
17
|
collapse: true,
|
|
16
18
|
},
|
|
17
19
|
)
|
|
20
|
+
|
|
21
|
+
const open = useVModel(props, 'open', undefined, { passive: true })
|
|
22
|
+
function onToggle(e: any) {
|
|
23
|
+
open.value = e.target.open
|
|
24
|
+
}
|
|
18
25
|
</script>
|
|
19
26
|
|
|
20
27
|
<template>
|
|
21
|
-
<details :open="open">
|
|
28
|
+
<details :open="open" @toggle="onToggle">
|
|
22
29
|
<summary class="select-none cursor-pointer p4 hover:bg-active" :class="collapse ? '' : 'pointer-events-none'">
|
|
23
30
|
<NIconTitle :icon="icon" :text="text" class="text-xl op75">
|
|
24
31
|
<div>
|
|
@@ -40,7 +47,7 @@ withDefaults(
|
|
|
40
47
|
/>
|
|
41
48
|
</NIconTitle>
|
|
42
49
|
</summary>
|
|
43
|
-
<div class="flex flex-col flex-gap2 pt2 pb6" :class="typeof padding === 'string' ? padding : padding ? 'px8' : ''">
|
|
50
|
+
<div v-lazy-if="open" class="flex flex-col flex-gap2 pt2 pb6" :class="typeof padding === 'string' ? padding : padding ? 'px8' : ''">
|
|
44
51
|
<slot name="details" />
|
|
45
52
|
<div :class="containerClass" class="mt1">
|
|
46
53
|
<slot />
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -8,7 +8,9 @@ import '@unocss/preset-mini';
|
|
|
8
8
|
import '@unocss/preset-mini/rules';
|
|
9
9
|
import 'unocss';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
function rPath(p) {
|
|
12
|
+
return fileURLToPath(new URL(p, import.meta.url).toString());
|
|
13
|
+
}
|
|
12
14
|
const module = defineNuxtModule({
|
|
13
15
|
meta: {
|
|
14
16
|
name: "devtools-ui-kit",
|
|
@@ -29,6 +31,7 @@ const module = defineNuxtModule({
|
|
|
29
31
|
await installModule(await resolver.resolvePath("@unocss/nuxt"));
|
|
30
32
|
await installModule(await resolver.resolvePath("@vueuse/nuxt"));
|
|
31
33
|
await installModule(await resolver.resolvePath("@nuxtjs/color-mode"));
|
|
34
|
+
await installModule(await resolver.resolvePath("v-lazy-show/nuxt"));
|
|
32
35
|
}
|
|
33
36
|
});
|
|
34
37
|
|
package/dist/runtime/client.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const devToolsClient: import("vue").Ref<import("@nuxt/devtools-kit/dist/client-api-
|
|
1
|
+
export declare const devToolsClient: import("vue").Ref<import("@nuxt/devtools-kit/dist/client-api-30cc2320").c | undefined>;
|
package/dist/unocss.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Preset } from '@unocss/core';
|
|
2
2
|
import { UnocssNuxtOptions } from '@unocss/nuxt';
|
|
3
3
|
|
|
4
|
-
declare
|
|
4
|
+
declare function unocssPreset(): Preset;
|
|
5
5
|
declare function extendUnocssOptions(user?: UnocssNuxtOptions): UnocssNuxtOptions;
|
|
6
6
|
|
|
7
7
|
export { extendUnocssOptions, unocssPreset };
|
package/dist/unocss.mjs
CHANGED
|
@@ -3,108 +3,110 @@ import { theme } from '@unocss/preset-mini';
|
|
|
3
3
|
import { fonts } from '@unocss/preset-mini/rules';
|
|
4
4
|
import { mergeDeep, presetUno, presetAttributify, presetTypography, presetIcons, transformerDirectives, transformerVariantGroup } from 'unocss';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}),
|
|
16
|
-
rules: [
|
|
17
|
-
[/^n-(.*)$/, ([, body], { theme }) => {
|
|
18
|
-
const color = parseColor(body, theme);
|
|
19
|
-
if (color?.cssColor?.type === "rgb" && color.cssColor.components) {
|
|
20
|
-
return {
|
|
21
|
-
"--nui-c-context": `${color.cssColor.components.join(",")}`
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
}],
|
|
25
|
-
[/^n-(.*)$/, fonts[1][1]],
|
|
26
|
-
["n-dashed", { "border-style": "dashed" }],
|
|
27
|
-
["n-solid", {
|
|
28
|
-
"background-color": "rgba(var(--nui-c-context), 1) !important",
|
|
29
|
-
"border-color": "rgba(var(--nui-c-context), 1)",
|
|
30
|
-
"color": "white !important"
|
|
31
|
-
}],
|
|
32
|
-
["n-disabled", {
|
|
33
|
-
"opacity": 0.4,
|
|
34
|
-
"pointer-events": "none",
|
|
35
|
-
"filter": "saturate(0)"
|
|
36
|
-
}]
|
|
37
|
-
],
|
|
38
|
-
variants: [
|
|
39
|
-
(input) => {
|
|
40
|
-
const prefix = "n-disabled:";
|
|
41
|
-
if (input.startsWith(prefix)) {
|
|
42
|
-
return {
|
|
43
|
-
matcher: input.slice(prefix.length),
|
|
44
|
-
selector: (input2) => `[disabled] ${input2}, ${input2}[disabled]`
|
|
45
|
-
};
|
|
6
|
+
function unocssPreset() {
|
|
7
|
+
return {
|
|
8
|
+
name: "@nuxt/devtools-ui-kit",
|
|
9
|
+
theme: mergeDeep(theme, {
|
|
10
|
+
colors: {
|
|
11
|
+
context: "rgba(var(--nui-c-context),%alpha)"
|
|
12
|
+
},
|
|
13
|
+
fontFamily: {
|
|
14
|
+
sans: "Avenir, Helvetica, Arial, sans-serif"
|
|
46
15
|
}
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
16
|
+
}),
|
|
17
|
+
rules: [
|
|
18
|
+
[/^n-(.*)$/, ([, body], { theme }) => {
|
|
19
|
+
const color = parseColor(body, theme);
|
|
20
|
+
if (color?.cssColor?.type === "rgb" && color.cssColor.components) {
|
|
21
|
+
return {
|
|
22
|
+
"--nui-c-context": `${color.cssColor.components.join(",")}`
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}],
|
|
26
|
+
[/^n-(.*)$/, fonts[1][1]],
|
|
27
|
+
["n-dashed", { "border-style": "dashed" }],
|
|
28
|
+
["n-solid", {
|
|
29
|
+
"background-color": "rgba(var(--nui-c-context), 1) !important",
|
|
30
|
+
"border-color": "rgba(var(--nui-c-context), 1)",
|
|
31
|
+
"color": "white !important"
|
|
32
|
+
}],
|
|
33
|
+
["n-disabled", {
|
|
34
|
+
"opacity": 0.4,
|
|
35
|
+
"pointer-events": "none",
|
|
36
|
+
"filter": "saturate(0)"
|
|
37
|
+
}]
|
|
38
|
+
],
|
|
39
|
+
variants: [
|
|
40
|
+
(input) => {
|
|
41
|
+
const prefix = "n-disabled:";
|
|
42
|
+
if (input.startsWith(prefix)) {
|
|
43
|
+
return {
|
|
44
|
+
matcher: input.slice(prefix.length),
|
|
45
|
+
selector: (input2) => `[disabled] ${input2}, ${input2}[disabled]`
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
(input) => {
|
|
50
|
+
const prefix = "n-checked:";
|
|
51
|
+
if (input.startsWith(prefix)) {
|
|
52
|
+
return {
|
|
53
|
+
matcher: input.slice(prefix.length),
|
|
54
|
+
selector: (input2) => `[checked] ${input2}, ${input2}[checked]`
|
|
55
|
+
};
|
|
56
|
+
}
|
|
55
57
|
}
|
|
58
|
+
],
|
|
59
|
+
shortcuts: {
|
|
60
|
+
// general
|
|
61
|
+
"n-bg-base": "bg-white dark:bg-[#151515]",
|
|
62
|
+
"n-bg-active": "bg-gray:5",
|
|
63
|
+
"n-bg-hover": "bg-gray:3",
|
|
64
|
+
"n-border-base": "border-gray/20",
|
|
65
|
+
"n-transition": "transition-all duration-200",
|
|
66
|
+
"n-focus-base": "ring-2 ring-context/50",
|
|
67
|
+
"n-active-base": "ring-3 ring-context/10",
|
|
68
|
+
"n-borderless": "!border-none !shadow-none",
|
|
69
|
+
// link
|
|
70
|
+
"n-link-base": "underline underline-offset-2 underline-black/20 dark:underline-white/40",
|
|
71
|
+
"n-link-hover": "decoration-dotted text-context underline-context",
|
|
72
|
+
// card
|
|
73
|
+
"n-card-base": "border n-border-base rounded n-bg-base shadow-sm",
|
|
74
|
+
// header
|
|
75
|
+
"n-header-upper": "text-sm uppercase mb-2 leading-1.2em tracking-wide op50",
|
|
76
|
+
// button
|
|
77
|
+
"n-button-base": "border n-border-base rounded shadow-sm px-1em py-0.25em inline-flex items-center gap-1 op80 !outline-none touch-manipulation",
|
|
78
|
+
"n-button-hover": "op100 !border-context text-context",
|
|
79
|
+
"n-button-active": "n-active-base bg-context/5",
|
|
80
|
+
"n-button-icon": "-ml-0.2em mr-0.2em text-1.1em",
|
|
81
|
+
// checkbox
|
|
82
|
+
"n-checkbox": "inline-flex gap-1 items-center",
|
|
83
|
+
"n-checkbox-box": "border n-border-base w-1.1em h-1.1em mr-1 text-white flex flex-none items-center rounded-sm overflow-visible",
|
|
84
|
+
"n-checkbox-box-checked": "bg-context border-context",
|
|
85
|
+
"n-checkbox-icon": "carbon-checkmark w-1em h-1em m-auto",
|
|
86
|
+
// radio
|
|
87
|
+
"n-radio-box": "border n-border-base w-1.2em h-1.2em mr-1 text-white flex flex-none rounded-full overflow-visible",
|
|
88
|
+
"n-radio-box-checked": "border-context",
|
|
89
|
+
"n-radio-inner": "bg-context rounded-1/2 w-0 h-0 m-auto",
|
|
90
|
+
"n-radio-inner-checked": "w-0.8em h-0.8em",
|
|
91
|
+
// switch
|
|
92
|
+
"n-switch-base": "inline-flex items-center select-none",
|
|
93
|
+
"n-switch-slider": "mr-1 rounded-full border n-border-base relative p-2px",
|
|
94
|
+
"n-switch-slider-checked": "border-context/20 bg-context/10",
|
|
95
|
+
"n-switch-thumb": "h-1em w-1em rounded-1/2 border n-border-base ml-0 mr-0.8em",
|
|
96
|
+
"n-switch-thumb-checked": "bg-context border-context ml-0.8em mr-0",
|
|
97
|
+
// tip
|
|
98
|
+
"n-tip-base": "bg-context/4 text-context px-1em py-0.4em rounded flex gap-2 items-center dark:bg-context/12",
|
|
99
|
+
// icon
|
|
100
|
+
"n-icon": "flex-none",
|
|
101
|
+
// code
|
|
102
|
+
"n-code-block": "dark:bg-[#121212] bg-white",
|
|
103
|
+
// icon-button
|
|
104
|
+
"n-icon-button": "aspect-1/1 w-1.6em h-1.6em flex items-center justify-center rounded op50 hover:op100 hover:n-bg-active",
|
|
105
|
+
// loading
|
|
106
|
+
"n-loading": "flex h-full w-full justify-center items-center"
|
|
56
107
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
// general
|
|
60
|
-
"n-bg-base": "bg-white dark:bg-[#151515]",
|
|
61
|
-
"n-bg-active": "bg-gray:5",
|
|
62
|
-
"n-bg-hover": "bg-gray:3",
|
|
63
|
-
"n-border-base": "border-gray/20",
|
|
64
|
-
"n-transition": "transition-all duration-200",
|
|
65
|
-
"n-focus-base": "ring-2 ring-context/50",
|
|
66
|
-
"n-active-base": "ring-3 ring-context/10",
|
|
67
|
-
"n-borderless": "!border-none !shadow-none",
|
|
68
|
-
// link
|
|
69
|
-
"n-link-base": "underline underline-offset-2 underline-black/20 dark:underline-white/40",
|
|
70
|
-
"n-link-hover": "decoration-dotted text-context underline-context",
|
|
71
|
-
// card
|
|
72
|
-
"n-card-base": "border n-border-base rounded n-bg-base shadow-sm",
|
|
73
|
-
// header
|
|
74
|
-
"n-header-upper": "text-sm uppercase mb-2 leading-1.2em tracking-wide op50",
|
|
75
|
-
// button
|
|
76
|
-
"n-button-base": "border n-border-base rounded shadow-sm px-1em py-0.25em inline-flex items-center gap-1 op80 !outline-none touch-manipulation",
|
|
77
|
-
"n-button-hover": "op100 !border-context text-context",
|
|
78
|
-
"n-button-active": "n-active-base bg-context/5",
|
|
79
|
-
"n-button-icon": "-ml-0.2em mr-0.2em text-1.1em",
|
|
80
|
-
// checkbox
|
|
81
|
-
"n-checkbox": "inline-flex gap-1 items-center",
|
|
82
|
-
"n-checkbox-box": "border n-border-base w-1.1em h-1.1em mr-1 text-white flex flex-none items-center rounded-sm overflow-visible",
|
|
83
|
-
"n-checkbox-box-checked": "bg-context border-context",
|
|
84
|
-
"n-checkbox-icon": "carbon-checkmark w-1em h-1em m-auto",
|
|
85
|
-
// radio
|
|
86
|
-
"n-radio-box": "border n-border-base w-1.2em h-1.2em mr-1 text-white flex flex-none rounded-full overflow-visible",
|
|
87
|
-
"n-radio-box-checked": "border-context",
|
|
88
|
-
"n-radio-inner": "bg-context rounded-1/2 w-0 h-0 m-auto",
|
|
89
|
-
"n-radio-inner-checked": "w-0.8em h-0.8em",
|
|
90
|
-
// switch
|
|
91
|
-
"n-switch-base": "inline-flex items-center select-none",
|
|
92
|
-
"n-switch-slider": "mr-1 rounded-full border n-border-base relative p-2px",
|
|
93
|
-
"n-switch-slider-checked": "border-context/20 bg-context/10",
|
|
94
|
-
"n-switch-thumb": "h-1em w-1em rounded-1/2 border n-border-base ml-0 mr-0.8em",
|
|
95
|
-
"n-switch-thumb-checked": "bg-context border-context ml-0.8em mr-0",
|
|
96
|
-
// tip
|
|
97
|
-
"n-tip-base": "bg-context/4 text-context px-1em py-0.4em rounded flex gap-2 items-center dark:bg-context/12",
|
|
98
|
-
// icon
|
|
99
|
-
"n-icon": "flex-none",
|
|
100
|
-
// code
|
|
101
|
-
"n-code-block": "dark:bg-[#121212] bg-white",
|
|
102
|
-
// icon-button
|
|
103
|
-
"n-icon-button": "aspect-1/1 w-1.6em h-1.6em flex items-center justify-center rounded op50 hover:op100 hover:bg-active",
|
|
104
|
-
// loading
|
|
105
|
-
"n-loading": "flex h-full w-full justify-center items-center"
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
+
};
|
|
109
|
+
}
|
|
108
110
|
function extendUnocssOptions(user = {}) {
|
|
109
111
|
return {
|
|
110
112
|
...user,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools-ui-kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "nuxt/devtools",
|
|
7
7
|
"exports": {
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"*.cjs"
|
|
24
24
|
],
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@nuxt/devtools": "0.3.
|
|
26
|
+
"@nuxt/devtools": "0.3.2"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@iconify-json/carbon": "^1.1.16",
|
|
30
|
-
"@nuxt/kit": "^3.3.
|
|
30
|
+
"@nuxt/kit": "^3.3.2",
|
|
31
31
|
"@nuxtjs/color-mode": "^3.2.0",
|
|
32
32
|
"@unocss/core": "^0.50.6",
|
|
33
33
|
"@unocss/nuxt": "^0.50.6",
|
|
@@ -41,11 +41,12 @@
|
|
|
41
41
|
"defu": "^6.1.2",
|
|
42
42
|
"focus-trap": "^7.4.0",
|
|
43
43
|
"unocss": "^0.50.6",
|
|
44
|
-
"
|
|
45
|
-
"@nuxt/devtools
|
|
44
|
+
"v-lazy-show": "^0.2.1",
|
|
45
|
+
"@nuxt/devtools": "0.3.2",
|
|
46
|
+
"@nuxt/devtools-kit": "0.3.2"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
|
-
"nuxt": "^3.3.
|
|
49
|
+
"nuxt": "^3.3.2"
|
|
49
50
|
},
|
|
50
51
|
"publishConfig": {
|
|
51
52
|
"access": "public"
|