rimelight-components 1.5.2 → 1.6.0
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/module.d.mts +1 -1
- package/dist/module.mjs +20 -14
- package/dist/runtime/components/content/Callout.vue +6 -6
- package/dist/runtime/components/swatches/ColorSwatch.vue +16 -1
- package/dist/runtime/components/swatches/FontSwatch.d.vue.ts +10 -0
- package/dist/runtime/components/swatches/FontSwatch.vue +79 -0
- package/dist/runtime/components/swatches/FontSwatch.vue.d.ts +10 -0
- package/dist/runtime/index.css +0 -0
- package/package.json +21 -5
package/dist/module.d.mts
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -4,38 +4,38 @@ const defaultOptions = {
|
|
|
4
4
|
callouts: {
|
|
5
5
|
info: {
|
|
6
6
|
icon: "lucide:shield-alert",
|
|
7
|
-
title: "
|
|
8
|
-
|
|
7
|
+
title: "",
|
|
8
|
+
description: ""
|
|
9
9
|
},
|
|
10
10
|
success: {
|
|
11
11
|
icon: "lucide:circle-alert",
|
|
12
|
-
title: "
|
|
13
|
-
|
|
12
|
+
title: "",
|
|
13
|
+
description: ""
|
|
14
14
|
},
|
|
15
15
|
warning: {
|
|
16
16
|
icon: "lucide:triangle-alert",
|
|
17
|
-
title: "
|
|
18
|
-
|
|
17
|
+
title: "",
|
|
18
|
+
description: ""
|
|
19
19
|
},
|
|
20
20
|
error: {
|
|
21
21
|
icon: "lucide:octagon-alert",
|
|
22
|
-
title: "
|
|
23
|
-
|
|
22
|
+
title: "",
|
|
23
|
+
description: ""
|
|
24
24
|
},
|
|
25
25
|
commentary: {
|
|
26
26
|
icon: "lucide:message-circle-warning",
|
|
27
|
-
title: "
|
|
28
|
-
|
|
27
|
+
title: "",
|
|
28
|
+
description: ""
|
|
29
29
|
},
|
|
30
30
|
ideation: {
|
|
31
31
|
icon: "lucide:badge-alert",
|
|
32
|
-
title: "
|
|
33
|
-
|
|
32
|
+
title: "",
|
|
33
|
+
description: ""
|
|
34
34
|
},
|
|
35
35
|
source: {
|
|
36
36
|
icon: "lucide:book-alert",
|
|
37
|
-
title: "
|
|
38
|
-
|
|
37
|
+
title: "",
|
|
38
|
+
description: ""
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
};
|
|
@@ -57,6 +57,12 @@ const module = defineNuxtModule({
|
|
|
57
57
|
overrides: {},
|
|
58
58
|
defaults: {}
|
|
59
59
|
},
|
|
60
|
+
"@nuxtjs/i18n": {
|
|
61
|
+
version: ">=10.1.1",
|
|
62
|
+
optional: false,
|
|
63
|
+
overrides: {},
|
|
64
|
+
defaults: {}
|
|
65
|
+
},
|
|
60
66
|
"@nuxt/ui": {
|
|
61
67
|
version: ">=4.0.0",
|
|
62
68
|
optional: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useAppConfig } from "
|
|
2
|
+
import { useAppConfig } from "#imports";
|
|
3
3
|
import { computed } from "#imports";
|
|
4
4
|
const appConfig = useAppConfig();
|
|
5
5
|
const { variant } = defineProps({
|
|
@@ -8,18 +8,18 @@ const { variant } = defineProps({
|
|
|
8
8
|
const config = computed(() => {
|
|
9
9
|
return appConfig.rimelightComponents?.callouts?.[variant] ?? {
|
|
10
10
|
icon: "lucide:alert-circle",
|
|
11
|
-
title: "
|
|
12
|
-
|
|
11
|
+
title: "Callout",
|
|
12
|
+
description: "Callout"
|
|
13
13
|
};
|
|
14
14
|
});
|
|
15
15
|
const icon = computed(() => config.value.icon);
|
|
16
16
|
const title = computed(() => config.value.title);
|
|
17
|
-
const
|
|
17
|
+
const description = computed(() => config.value.description);
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<template>
|
|
21
21
|
<UAlert
|
|
22
|
-
:title="title"
|
|
22
|
+
:title="$t(title)"
|
|
23
23
|
:color="variant"
|
|
24
24
|
variant="subtle"
|
|
25
25
|
:close="{
|
|
@@ -33,7 +33,7 @@ const tooltip = computed(() => config.value.tooltip);
|
|
|
33
33
|
<slot />
|
|
34
34
|
</template>
|
|
35
35
|
<template #close>
|
|
36
|
-
<UTooltip :text="
|
|
36
|
+
<UTooltip v-if="description" :text="$t(description)">
|
|
37
37
|
<UIcon name="lucide:circle-question-mark" class="size-5" />
|
|
38
38
|
</UTooltip>
|
|
39
39
|
</template>
|
|
@@ -26,6 +26,9 @@ const copyToClipboard = async (text) => {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
+
function formatColor(color2) {
|
|
30
|
+
return color2.toUpperCase().replace(/[)]/g, "").replace(/[(]/g, " ").replace(/%/g, "");
|
|
31
|
+
}
|
|
29
32
|
const color = computed(() => {
|
|
30
33
|
if (hex) return hex;
|
|
31
34
|
if (rgb) return rgb;
|
|
@@ -42,7 +45,19 @@ const color = computed(() => {
|
|
|
42
45
|
<h3 class="text-lg font-bold">{{ name }}</h3>
|
|
43
46
|
</template>
|
|
44
47
|
<div class="gap-sm flex flex-col items-center xl:flex-row xl:items-start">
|
|
45
|
-
<div
|
|
48
|
+
<div
|
|
49
|
+
class="p-sm flex aspect-square size-48"
|
|
50
|
+
:style="{ backgroundColor: color }"
|
|
51
|
+
>
|
|
52
|
+
<div class="gap-xs flex flex-col justify-end text-xs">
|
|
53
|
+
<span v-if="name" class="text-sm">{{ formatColor(name) }}</span>
|
|
54
|
+
<span v-if="hex">HEX {{ formatColor(hex) }}</span>
|
|
55
|
+
<span v-if="rgb">{{ formatColor(rgb) }}</span>
|
|
56
|
+
<span v-if="hsl">{{ formatColor(hsl) }}</span>
|
|
57
|
+
<span v-if="oklch">{{ formatColor(oklch) }}</span>
|
|
58
|
+
<span v-if="cmyk">{{ formatColor(cmyk) }}</span>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
46
61
|
<div class="gap-sm flex w-full flex-col justify-center">
|
|
47
62
|
<UButton
|
|
48
63
|
v-if="hex"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
name?: string;
|
|
3
|
+
jpg?: string;
|
|
4
|
+
png?: string;
|
|
5
|
+
webp?: string;
|
|
6
|
+
svg?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "#imports";
|
|
3
|
+
const { name, jpg, png, webp, svg } = defineProps({
|
|
4
|
+
name: { type: String, required: false },
|
|
5
|
+
jpg: { type: String, required: false },
|
|
6
|
+
png: { type: String, required: false },
|
|
7
|
+
webp: { type: String, required: false },
|
|
8
|
+
svg: { type: String, required: false }
|
|
9
|
+
});
|
|
10
|
+
const image = computed(() => {
|
|
11
|
+
if (webp) return webp;
|
|
12
|
+
if (png) return png;
|
|
13
|
+
if (jpg) return jpg;
|
|
14
|
+
if (svg) return svg;
|
|
15
|
+
return void 0;
|
|
16
|
+
});
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<UCard variant="subtle" class="w-full rounded-none xl:w-fit">
|
|
21
|
+
<template #header v-if="name">
|
|
22
|
+
<h3 class="text-lg font-bold">{{ name }}</h3>
|
|
23
|
+
<span></span>
|
|
24
|
+
</template>
|
|
25
|
+
<div class="gap-sm flex flex-col">
|
|
26
|
+
<h1>H1</h1>
|
|
27
|
+
<p>{{}}</p>
|
|
28
|
+
</div>
|
|
29
|
+
<h2>H2</h2>
|
|
30
|
+
<h3>H3</h3>
|
|
31
|
+
<p>a b c d e f g h i j k l m n o p q r s t u v w x y z</p>
|
|
32
|
+
<p>A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</p>
|
|
33
|
+
<p></p>
|
|
34
|
+
<div class="gap-sm flex flex-col items-center xl:flex-row xl:items-start">
|
|
35
|
+
<div class="gap-sm flex w-full flex-col justify-center">
|
|
36
|
+
<UButton
|
|
37
|
+
v-if="jpg"
|
|
38
|
+
variant="outline"
|
|
39
|
+
size="sm"
|
|
40
|
+
icon="lucide:download"
|
|
41
|
+
label="Download JPG"
|
|
42
|
+
class="w-full xl:w-36"
|
|
43
|
+
:to="jpg"
|
|
44
|
+
target="_blank"
|
|
45
|
+
/>
|
|
46
|
+
<UButton
|
|
47
|
+
v-if="png"
|
|
48
|
+
variant="outline"
|
|
49
|
+
size="sm"
|
|
50
|
+
icon="lucide:download"
|
|
51
|
+
label="Download PNG"
|
|
52
|
+
class="w-full xl:w-36"
|
|
53
|
+
:to="png"
|
|
54
|
+
target="_blank"
|
|
55
|
+
/>
|
|
56
|
+
<UButton
|
|
57
|
+
v-if="webp"
|
|
58
|
+
variant="outline"
|
|
59
|
+
size="sm"
|
|
60
|
+
icon="lucide:download"
|
|
61
|
+
label="Download WEBP"
|
|
62
|
+
class="w-full xl:w-36"
|
|
63
|
+
:to="webp"
|
|
64
|
+
target="_blank"
|
|
65
|
+
/>
|
|
66
|
+
<UButton
|
|
67
|
+
v-if="svg"
|
|
68
|
+
variant="outline"
|
|
69
|
+
size="sm"
|
|
70
|
+
icon="lucide:download"
|
|
71
|
+
label="Download SVG"
|
|
72
|
+
class="w-full xl:w-36"
|
|
73
|
+
:to="svg"
|
|
74
|
+
target="_blank"
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</UCard>
|
|
79
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
name?: string;
|
|
3
|
+
jpg?: string;
|
|
4
|
+
png?: string;
|
|
5
|
+
webp?: string;
|
|
6
|
+
svg?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,20 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rimelight-components",
|
|
3
|
-
"version": "1.5.2",
|
|
4
3
|
"description": "My new Nuxt module",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
4
|
+
"version": "1.6.0",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/Rimelight-Entertainment/rimelight-components.git"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://rimelight.com/tools/rimelight-components",
|
|
7
10
|
"type": "module",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"rimelight",
|
|
14
|
+
"typescript",
|
|
15
|
+
"vue",
|
|
16
|
+
"nuxt"
|
|
17
|
+
],
|
|
18
|
+
"imports": {
|
|
19
|
+
"#build/rimelight-components/*": "./.nuxt/rimelight-components/*.ts",
|
|
20
|
+
"#build/rimelight-components.css": "./.nuxt/rimelight-components.css"
|
|
21
|
+
},
|
|
8
22
|
"exports": {
|
|
9
23
|
".": {
|
|
10
|
-
"types": "./dist/
|
|
24
|
+
"types": "./dist/module.d.mts",
|
|
25
|
+
"style": "./dist/runtime/index.css",
|
|
11
26
|
"import": "./dist/module.mjs"
|
|
12
27
|
},
|
|
13
28
|
"./runtime/*": "./dist/runtime/*",
|
|
14
29
|
"./components/*": "./dist/runtime/components/*",
|
|
15
30
|
"./composables/*": "./dist/runtime/composables/*",
|
|
16
31
|
"./utils/*": {
|
|
17
|
-
"types": "./dist/runtime/utils/*.d.
|
|
32
|
+
"types": "./dist/runtime/utils/*.d.mts",
|
|
18
33
|
"import": "./dist/runtime/utils/*.js"
|
|
19
34
|
}
|
|
20
35
|
},
|
|
@@ -48,6 +63,7 @@
|
|
|
48
63
|
"@nuxt/image": "^1.11.0",
|
|
49
64
|
"@nuxt/kit": "^4.1.3",
|
|
50
65
|
"@nuxt/ui": "^4.0.1",
|
|
66
|
+
"@nuxtjs/i18n": "^10.1.1",
|
|
51
67
|
"@vueuse/core": "^13.9.0",
|
|
52
68
|
"@vueuse/nuxt": "^13.9.0",
|
|
53
69
|
"date-fns": "^4.1.0",
|