rimelight-components 1.5.2 → 1.7.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 CHANGED
@@ -3,7 +3,7 @@ import * as _nuxt_schema from '@nuxt/schema';
3
3
  interface CalloutOptions {
4
4
  icon: string;
5
5
  title: string;
6
- tooltip: string;
6
+ description: string;
7
7
  }
8
8
  interface ModuleOptions {
9
9
  callouts: {
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: "Note",
8
- tooltip: "This callout is used for general notes."
7
+ title: "",
8
+ description: ""
9
9
  },
10
10
  success: {
11
11
  icon: "lucide:circle-alert",
12
- title: "Tip",
13
- tooltip: "This callout is used for tips and useful information."
12
+ title: "",
13
+ description: ""
14
14
  },
15
15
  warning: {
16
16
  icon: "lucide:triangle-alert",
17
- title: "Warning",
18
- tooltip: "This callout is used for important information."
17
+ title: "",
18
+ description: ""
19
19
  },
20
20
  error: {
21
21
  icon: "lucide:octagon-alert",
22
- title: "Danger",
23
- tooltip: "This callout is used for critical information and prohibitions."
22
+ title: "",
23
+ description: ""
24
24
  },
25
25
  commentary: {
26
26
  icon: "lucide:message-circle-warning",
27
- title: "Commentary",
28
- tooltip: "This callout is used for developer commentary."
27
+ title: "",
28
+ description: ""
29
29
  },
30
30
  ideation: {
31
31
  icon: "lucide:badge-alert",
32
- title: "Ideation",
33
- tooltip: "This alert is used for ideas and brainstorming."
32
+ title: "",
33
+ description: ""
34
34
  },
35
35
  source: {
36
36
  icon: "lucide:book-alert",
37
- title: "Creator's Remarks",
38
- tooltip: "This alert is used for direct commentary of the author."
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 "nuxt/app";
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: "Unknown",
12
- tooltip: "Callout"
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 tooltip = computed(() => config.value.tooltip);
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="tooltip">
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>
@@ -0,0 +1,12 @@
1
+ type __VLS_Props = {
2
+ pageType: string;
3
+ previousTitle?: string;
4
+ previousDescription?: string;
5
+ previousTo?: string;
6
+ nextTitle?: string;
7
+ nextDescription?: string;
8
+ nextTo?: string;
9
+ };
10
+ 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>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,80 @@
1
+ <script setup>
2
+ const {
3
+ pageType,
4
+ previousTitle,
5
+ previousDescription,
6
+ previousTo,
7
+ nextTitle,
8
+ nextDescription,
9
+ nextTo
10
+ } = defineProps({
11
+ pageType: { type: String, required: true },
12
+ previousTitle: { type: String, required: false },
13
+ previousDescription: { type: String, required: false },
14
+ previousTo: { type: String, required: false },
15
+ nextTitle: { type: String, required: false },
16
+ nextDescription: { type: String, required: false },
17
+ nextTo: { type: String, required: false }
18
+ });
19
+ </script>
20
+
21
+ <template>
22
+ <div class="grid grid-cols-1 gap-8 sm:grid-cols-2">
23
+ <ULink v-if="previousTitle" :to="previousTo">
24
+ <UCard
25
+ variant="outline"
26
+ class="hover:bg-elevated/50 focus-visible:outline-primary group block bg-transparent"
27
+ >
28
+ <div class="gap-md flex flex-col">
29
+ <div class="gap-xs flex flex-col">
30
+ <UButton
31
+ variant="outline"
32
+ icon="lucide:arrow-left"
33
+ class="group-hover text-primary group-hover:text-highlighted w-fit rounded-full"
34
+ />
35
+ <span class="text-muted">
36
+ {{ $t("navigation_previous") }}
37
+ {{ $t(pageType) }}
38
+ </span>
39
+ </div>
40
+ <div class="gap-xs flex flex-col">
41
+ <p class="text-primary group-hover:text-highlighted">
42
+ {{ previousTitle }}
43
+ </p>
44
+ <p class="text-toned">
45
+ {{ previousDescription }}
46
+ </p>
47
+ </div>
48
+ </div>
49
+ </UCard>
50
+ </ULink>
51
+ <ULink v-if="nextTitle" :to="nextTo">
52
+ <UCard
53
+ variant="outline"
54
+ class="hover:bg-elevated/50 focus-visible:outline-primary group block bg-transparent"
55
+ >
56
+ <div class="gap-md flex flex-col items-end">
57
+ <div class="gap-xs flex flex-col items-end">
58
+ <UButton
59
+ variant="outline"
60
+ icon="lucide:arrow-right"
61
+ class="text-primary group-hover:text-highlighted w-fit rounded-full"
62
+ />
63
+ <span class="text-muted">
64
+ {{ $t("navigation_next") }}
65
+ {{ $t(pageType) }}</span
66
+ >
67
+ </div>
68
+ <div class="gap-xs flex flex-col items-end">
69
+ <p class="text-primary group-hover:text-highlighted">
70
+ {{ nextTitle }}
71
+ </p>
72
+ <p class="text-toned">
73
+ {{ nextDescription }}
74
+ </p>
75
+ </div>
76
+ </div>
77
+ </UCard>
78
+ </ULink>
79
+ </div>
80
+ </template>
@@ -0,0 +1,12 @@
1
+ type __VLS_Props = {
2
+ pageType: string;
3
+ previousTitle?: string;
4
+ previousDescription?: string;
5
+ previousTo?: string;
6
+ nextTitle?: string;
7
+ nextDescription?: string;
8
+ nextTo?: string;
9
+ };
10
+ 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>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -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 class="aspect-square size-48" :style="{ backgroundColor: color }" />
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
- "repository": "Rimelight Entertainment/rimelight-components",
6
- "license": "MIT",
4
+ "version": "1.7.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/types.d.mts",
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.ts",
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",