nuxt-og-image 5.1.1 → 5.1.3

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.
Files changed (71) hide show
  1. package/dist/client/200.html +10 -10
  2. package/dist/client/404.html +10 -10
  3. package/dist/client/_nuxt/BzYjvS05.js +1 -0
  4. package/dist/client/_nuxt/Cp-IABpG.js +1 -0
  5. package/dist/client/_nuxt/DEwdc3DC.js +1 -0
  6. package/dist/client/_nuxt/XiufaElF.js +4017 -0
  7. package/dist/client/_nuxt/YTyxsmJ7.js +1 -0
  8. package/dist/client/_nuxt/builds/latest.json +1 -1
  9. package/dist/client/_nuxt/builds/meta/e1b920f9-f3a6-4673-86fc-3ee0ae9e8032.json +1 -0
  10. package/dist/client/_nuxt/{entry.Dw_RMJvc.css → entry.CPPV_4vb.css} +1 -1
  11. package/dist/client/_nuxt/error-404.BpdoF9Tf.css +1 -0
  12. package/dist/client/_nuxt/error-500.3kzuLulX.css +1 -0
  13. package/dist/client/index.html +10 -10
  14. package/dist/content.d.cts +2 -1
  15. package/dist/content.d.mts +2 -1
  16. package/dist/content.d.ts +2 -1
  17. package/dist/module.cjs +6 -4
  18. package/dist/module.d.cts +2 -1
  19. package/dist/module.d.mts +2 -1
  20. package/dist/module.d.ts +2 -1
  21. package/dist/module.json +3 -3
  22. package/dist/module.mjs +7 -5
  23. package/dist/runtime/app/components/Templates/Community/BrandedLogo.vue +6 -13
  24. package/dist/runtime/app/components/Templates/Community/BrandedLogo.vue.d.ts +12 -0
  25. package/dist/runtime/app/components/Templates/Community/Frame.vue +14 -20
  26. package/dist/runtime/app/components/Templates/Community/Frame.vue.d.ts +20 -0
  27. package/dist/runtime/app/components/Templates/Community/Nuxt.vue +12 -18
  28. package/dist/runtime/app/components/Templates/Community/Nuxt.vue.d.ts +11 -0
  29. package/dist/runtime/app/components/Templates/Community/NuxtSeo.vue +56 -90
  30. package/dist/runtime/app/components/Templates/Community/NuxtSeo.vue.d.ts +14 -0
  31. package/dist/runtime/app/components/Templates/Community/Pergel.vue +12 -17
  32. package/dist/runtime/app/components/Templates/Community/Pergel.vue.d.ts +11 -0
  33. package/dist/runtime/app/components/Templates/Community/SimpleBlog.vue +11 -20
  34. package/dist/runtime/app/components/Templates/Community/SimpleBlog.vue.d.ts +8 -0
  35. package/dist/runtime/app/components/Templates/Community/UnJs.vue +28 -37
  36. package/dist/runtime/app/components/Templates/Community/UnJs.vue.d.ts +20 -0
  37. package/dist/runtime/app/components/Templates/Community/Wave.vue +5 -11
  38. package/dist/runtime/app/components/Templates/Community/Wave.vue.d.ts +10 -0
  39. package/dist/runtime/app/components/Templates/Community/WithEmoji.vue +6 -13
  40. package/dist/runtime/app/components/Templates/Community/WithEmoji.vue.d.ts +12 -0
  41. package/dist/runtime/app/composables/defineOgImage.js +20 -18
  42. package/dist/runtime/app/utils/plugins.js +5 -9
  43. package/dist/runtime/app/utils.d.ts +4 -3
  44. package/dist/runtime/app/utils.js +31 -22
  45. package/dist/runtime/pure.js +4 -1
  46. package/dist/runtime/server/og-image/instances.d.ts +2 -2
  47. package/dist/runtime/server/og-image/satori/plugins/classes.d.ts +1 -1
  48. package/dist/runtime/server/og-image/satori/plugins/emojis.d.ts +1 -1
  49. package/dist/runtime/server/og-image/satori/plugins/encoding.d.ts +1 -1
  50. package/dist/runtime/server/og-image/satori/plugins/flex.d.ts +1 -1
  51. package/dist/runtime/server/og-image/satori/plugins/imageSrc.d.ts +1 -1
  52. package/dist/runtime/server/og-image/satori/plugins/nuxt-icon.d.ts +1 -1
  53. package/dist/runtime/server/og-image/satori/plugins/unocss.d.ts +1 -1
  54. package/dist/runtime/server/routes/debug.json.d.ts +1 -1
  55. package/dist/runtime/server/util/plugins.js +2 -14
  56. package/dist/runtime/server/util/wasm.d.ts +1 -1
  57. package/dist/runtime/shared.d.ts +3 -3
  58. package/dist/runtime/shared.js +6 -9
  59. package/dist/runtime/types.d.ts +7 -7
  60. package/dist/types.d.mts +4 -2
  61. package/package.json +40 -46
  62. package/content.d.ts +0 -1
  63. package/dist/client/_nuxt/BKhpHsoX.js +0 -1
  64. package/dist/client/_nuxt/BLmTiKMJ.js +0 -1
  65. package/dist/client/_nuxt/DVcaHLff.js +0 -1
  66. package/dist/client/_nuxt/DpHmQ6sx.js +0 -3991
  67. package/dist/client/_nuxt/Dy0dDCjl.js +0 -1
  68. package/dist/client/_nuxt/builds/meta/c5f3b216-b4a4-46fd-8c8f-d7974f7d29a9.json +0 -1
  69. package/dist/client/_nuxt/error-404.Db0f7OxX.css +0 -1
  70. package/dist/client/_nuxt/error-500.CgBP5IsV.css +0 -1
  71. package/dist/types.d.ts +0 -7
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @credits Full Stack Heroes <https://fullstackheroes.com/>
3
+ */
4
+ type __VLS_Props = {
5
+ title?: string;
6
+ logo?: string;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
9
+ title: string;
10
+ logo: string;
11
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
@@ -1,20 +1,14 @@
1
- <script setup lang="ts">
2
- /**
3
- * @credits @arashsheyda <https://github.com/arashsheyda>
4
- */
5
-
6
- withDefaults(defineProps<{
7
- title?: string
8
- description?: string
9
- bg?: string
10
- icon?: string
11
- logo?: string
12
- image?: string
13
- username?: string
14
- socials?: { name: string, icon: string }[]
15
- }>(), {
16
- bg: 'linear-gradient(to bottom right, #171717, #131313)',
17
- })
1
+ <script setup>
2
+ defineProps({
3
+ title: { type: String, required: false },
4
+ description: { type: String, required: false },
5
+ bg: { type: String, required: false, default: "linear-gradient(to bottom right, #171717, #131313)" },
6
+ icon: { type: String, required: false },
7
+ logo: { type: String, required: false },
8
+ image: { type: String, required: false },
9
+ username: { type: String, required: false },
10
+ socials: { type: Array, required: false }
11
+ });
18
12
  </script>
19
13
 
20
14
  <template>
@@ -28,14 +22,14 @@ withDefaults(defineProps<{
28
22
  :style="{ backgroundImage: `url(${image})` }"
29
23
  />
30
24
  <div class="flex flex-col items-center text-center">
31
- <h1 class="flex gap-4 text-7xl font-bold">
25
+ <h1 class="flex gap-4 text-7xl font-bold" style="display: block; line-clamp: 2; text-overflow: ellipsis;">
32
26
  <Icon
33
27
  v-if="icon"
34
28
  :name="icon"
35
29
  />
36
30
  {{ title }}
37
31
  </h1>
38
- <p class="text-2xl max-w-3xl">
32
+ <p class="text-2xl max-w-3xl" style="display: block; line-clamp: 3; text-overflow: ellipsis;">
39
33
  {{ description }}
40
34
  </p>
41
35
  </div>
@@ -56,7 +50,7 @@ withDefaults(defineProps<{
56
50
  <Icon
57
51
  v-for="social of socials"
58
52
  :key="social.name"
59
- :name="social.icon!"
53
+ :name="social.icon"
60
54
  class="w-7 h-7"
61
55
  />
62
56
  </div>
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @credits @arashsheyda <https://github.com/arashsheyda>
3
+ */
4
+ type __VLS_Props = {
5
+ title?: string;
6
+ description?: string;
7
+ bg?: string;
8
+ icon?: string;
9
+ logo?: string;
10
+ image?: string;
11
+ username?: string;
12
+ socials?: {
13
+ name: string;
14
+ icon: string;
15
+ }[];
16
+ };
17
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
+ bg: string;
19
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ export default _default;
@@ -1,18 +1,12 @@
1
- <script lang="ts" setup>
2
- /**
3
- * @credits NuxtLabs <https://nuxtlabs.com/>
4
- * @see https://github.com/nuxt/nuxt.com/blob/main/components/OgImage/Docs.vue
5
- */
6
- import { computed } from 'vue'
7
-
8
- const props = withDefaults(defineProps<{ title?: string, description?: string, headline?: string }>(), {
9
- title: 'title',
10
- description: 'description',
11
- headline: 'headline',
12
- })
13
-
14
- const title = computed(() => (props.title || '').slice(0, 60))
15
- const description = computed(() => (props.description || '').slice(0, 200))
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ const props = defineProps({
4
+ title: { type: String, required: false, default: "title" },
5
+ description: { type: String, required: false, default: "description" },
6
+ headline: { type: String, required: false, default: "headline" }
7
+ });
8
+ const title = computed(() => (props.title || "").slice(0, 60));
9
+ const description = computed(() => (props.description || "").slice(0, 200));
16
10
  </script>
17
11
 
18
12
  <template>
@@ -49,10 +43,10 @@ const description = computed(() => (props.description || '').slice(0, 200))
49
43
  <p v-if="headline" class="uppercase text-[24px] text-[#00DC82] mb-4 font-semibold">
50
44
  {{ headline }}
51
45
  </p>
52
- <h1 v-if="title" class="w-[600px] m-0 text-[75px] font-semibold mb-4 text-white flex items-center">
53
- <span>{{ title }}</span>
46
+ <h1 v-if="title" class="w-[600px] m-0 text-[75px] font-semibold mb-4 text-white" style="display: block; line-clamp: 2; text-overflow: ellipsis;">
47
+ {{ title }}
54
48
  </h1>
55
- <p v-if="description" class="text-[32px] text-[#E4E4E7] leading-tight">
49
+ <p v-if="description" class="text-[32px] text-[#E4E4E7] leading-tight" style="display: block; line-clamp: 3; text-overflow: ellipsis;">
56
50
  {{ description }}
57
51
  </p>
58
52
  </div>
@@ -0,0 +1,11 @@
1
+ type __VLS_Props = {
2
+ title?: string;
3
+ description?: string;
4
+ headline?: string;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
7
+ title: string;
8
+ description: string;
9
+ headline: string;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ export default _default;
@@ -1,91 +1,54 @@
1
- <script setup lang="ts">
2
- /**
3
- * @credits Nuxt SEO <https://nuxtseo.com/>
4
- */
5
-
6
- import { useSiteConfig } from '#imports'
7
- import { useOgImageRuntimeConfig } from '#og-image/shared'
8
- import { computed, defineComponent, h, resolveComponent } from 'vue'
9
-
10
- // convert to typescript props
11
- const props = withDefaults(defineProps<{
12
- colorMode?: 'dark' | 'light'
13
- title?: string
14
- description?: string
15
- icon?: string | boolean
16
- siteName?: string
17
- siteLogo?: string
18
- theme?: string
19
- }>(), {
20
- theme: '#00dc82',
21
- title: 'title',
22
- })
23
-
24
- const HexRegex = /^#(?:[0-9a-f]{3}){1,2}$/i
25
-
26
- const runtimeConfig = useOgImageRuntimeConfig()
27
-
1
+ <script setup>
2
+ import { useSiteConfig } from "#imports";
3
+ import { useOgImageRuntimeConfig } from "#og-image/shared";
4
+ import { computed, defineComponent, h, resolveComponent } from "vue";
5
+ const props = defineProps({
6
+ colorMode: { type: String, required: false },
7
+ title: { type: String, required: false, default: "title" },
8
+ description: { type: String, required: false },
9
+ icon: { type: [String, Boolean], required: false },
10
+ siteName: { type: String, required: false },
11
+ siteLogo: { type: String, required: false },
12
+ theme: { type: String, required: false, default: "#00dc82" }
13
+ });
14
+ const HexRegex = /^#(?:[0-9a-f]{3}){1,2}$/i;
15
+ const runtimeConfig = useOgImageRuntimeConfig();
28
16
  const colorMode = computed(() => {
29
- return props.colorMode || runtimeConfig.colorPreference || 'light'
30
- })
31
-
17
+ return props.colorMode || runtimeConfig.colorPreference || "light";
18
+ });
32
19
  const themeHex = computed(() => {
33
- // regex test if valid hex
34
20
  if (HexRegex.test(props.theme))
35
- return props.theme
36
-
37
- // if it's hex without the hash, just add the hash
21
+ return props.theme;
38
22
  if (HexRegex.test(`#${props.theme}`))
39
- return `#${props.theme}`
40
-
41
- // if it's rgb or rgba, we convert it to hex
42
- if (props.theme.startsWith('rgb')) {
43
- const rgb = props.theme
44
- .replace('rgb(', '')
45
- .replace('rgba(', '')
46
- .replace(')', '')
47
- .split(',')
48
- .map(v => Number.parseInt(v.trim(), 10))
49
- const hex = rgb
50
- .map((v) => {
51
- const hex = v.toString(16)
52
- return hex.length === 1 ? `0${hex}` : hex
53
- })
54
- .join('')
55
- return `#${hex}`
23
+ return `#${props.theme}`;
24
+ if (props.theme.startsWith("rgb")) {
25
+ const rgb = props.theme.replace("rgb(", "").replace("rgba(", "").replace(")", "").split(",").map((v) => Number.parseInt(v.trim(), 10));
26
+ const hex = rgb.map((v) => {
27
+ const hex2 = v.toString(16);
28
+ return hex2.length === 1 ? `0${hex2}` : hex2;
29
+ }).join("");
30
+ return `#${hex}`;
56
31
  }
57
- return '#FFFFFF'
58
- })
59
-
32
+ return "#FFFFFF";
33
+ });
60
34
  const themeRgb = computed(() => {
61
- // we want to convert it so it's just `<red>, <green>, <blue>` (255, 255, 255)
62
- return themeHex.value
63
- .replace('#', '')
64
- .match(/.{1,2}/g)
65
- ?.map(v => Number.parseInt(v, 16))
66
- .join(', ')
67
- })
68
-
69
- const siteConfig = useSiteConfig()
35
+ return themeHex.value.replace("#", "").match(/.{1,2}/g)?.map((v) => Number.parseInt(v, 16)).join(", ");
36
+ });
37
+ const siteConfig = useSiteConfig();
70
38
  const siteName = computed(() => {
71
- return props.siteName || siteConfig.name
72
- })
39
+ return props.siteName || siteConfig.name;
40
+ });
73
41
  const siteLogo = computed(() => {
74
- return props.siteLogo || siteConfig.logo
75
- })
76
-
77
- const IconComponent = runtimeConfig.hasNuxtIcon
78
- ? resolveComponent('Icon')
79
- : defineComponent({
80
- render() {
81
- return h('div', 'missing @nuxt/icon')
82
- },
83
- })
84
- if (typeof props.icon === 'string' && !runtimeConfig.hasNuxtIcon && process.dev) {
85
- console.warn('Please install `@nuxt/icon` to use icons with the fallback OG Image component.')
86
- // eslint-disable-next-line no-console
87
- console.log('\nnpx nuxi module add icon\n')
88
- // create simple div renderer component
42
+ return props.siteLogo || siteConfig.logo;
43
+ });
44
+ const IconComponent = runtimeConfig.hasNuxtIcon ? resolveComponent("Icon") : defineComponent({
45
+ render() {
46
+ return h("div", "missing @nuxt/icon");
47
+ }
48
+ });
49
+ if (typeof props.icon === "string" && !runtimeConfig.hasNuxtIcon && process.dev) {
50
+ console.warn("Please install `@nuxt/icon` to use icons with the fallback OG Image component.");
51
+ console.log("\nnpx nuxi module add icon\n");
89
52
  }
90
53
  </script>
91
54
 
@@ -93,26 +56,29 @@ if (typeof props.icon === 'string' && !runtimeConfig.hasNuxtIcon && process.dev)
93
56
  <div
94
57
  class="w-full h-full flex justify-between relative p-[60px]"
95
58
  :class="[
96
- colorMode === 'light' ? ['bg-white', 'text-gray-900'] : ['bg-gray-900', 'text-white'],
97
- ]"
59
+ colorMode === 'light' ? ['bg-white', 'text-gray-900'] : ['bg-gray-900', 'text-white']
60
+ ]"
98
61
  >
99
62
  <div
100
63
  class="flex absolute top-0 right-[-100%]" :style="{
101
- width: '200%',
102
- height: '200%',
103
- backgroundImage: `radial-gradient(circle, rgba(${themeRgb}, 0.5) 0%, ${colorMode === 'dark' ? 'rgba(5, 5, 5,0.3)' : 'rgba(255, 255, 255, 0.7)'} 50%, ${props.colorMode === 'dark' ? 'rgba(5, 5, 5,0)' : 'rgba(255, 255, 255, 0)'} 70%)`,
104
- }"
64
+ width: '200%',
65
+ height: '200%',
66
+ backgroundImage: `radial-gradient(circle, rgba(${themeRgb}, 0.5) 0%, ${colorMode === 'dark' ? 'rgba(5, 5, 5,0.3)' : 'rgba(255, 255, 255, 0.7)'} 50%, ${props.colorMode === 'dark' ? 'rgba(5, 5, 5,0)' : 'rgba(255, 255, 255, 0)'} 70%)`
67
+ }"
105
68
  />
106
69
  <div class="h-full w-full justify-between relative">
107
70
  <div class="flex flex-row justify-between items-start">
108
71
  <div class="flex flex-col w-full max-w-[65%]">
109
- <h1 class="m-0 font-bold mb-[30px] text-[75px]">
72
+ <h1 class="m-0 font-bold mb-[30px] text-[75px]" style="display: block; text-overflow: ellipsis;" :style="{ lineClamp: description ? 2 : 3 }">
110
73
  {{ title }}
111
74
  </h1>
112
75
  <p
113
- v-if="description" class="text-[35px]" :class="[
114
- colorMode === 'light' ? ['text-gray-700'] : ['text-gray-300'],
115
- ]"
76
+ v-if="description"
77
+ class="text-[35px] leading-12"
78
+ :class="[
79
+ colorMode === 'light' ? ['text-gray-700'] : ['text-gray-300']
80
+ ]"
81
+ style="display: block; line-clamp: 3; text-overflow: ellipsis;"
116
82
  >
117
83
  {{ description }}
118
84
  </p>
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ colorMode?: 'dark' | 'light';
3
+ title?: string;
4
+ description?: string;
5
+ icon?: string | boolean;
6
+ siteName?: string;
7
+ siteLogo?: string;
8
+ theme?: string;
9
+ };
10
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
11
+ title: string;
12
+ theme: string;
13
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
@@ -1,16 +1,11 @@
1
- <script lang="ts" setup>
2
- /**
3
- * @credits Pergel <https://nuxtlabs.com/>
4
- */
5
- import { computed } from 'vue'
6
-
7
- const props = withDefaults(defineProps<{ title?: string, description?: string, headline?: string }>(), {
8
- title: 'title',
9
- description: 'description',
10
- headline: 'headline',
11
- })
12
-
13
- const title = computed(() => props.title.slice(0, 60))
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ const props = defineProps({
4
+ title: { type: String, required: false, default: "title" },
5
+ description: { type: String, required: false, default: "description" },
6
+ headline: { type: String, required: false, default: "headline" }
7
+ });
8
+ const title = computed(() => props.title.slice(0, 60));
14
9
  </script>
15
10
 
16
11
  <template>
@@ -34,11 +29,11 @@ const title = computed(() => props.title.slice(0, 60))
34
29
  <p v-if="headline" class="uppercase text-[24px] text-[#FEC476] mb-4 font-semibold">
35
30
  {{ headline }}
36
31
  </p>
37
- <h1 class="w-[600px] m-0 text-[75px] font-semibold mb-4 text-white flex items-center">
38
- <span>{{ title }}</span>
32
+ <h1 class="w-[600px] m-0 text-[75px] font-semibold mb-4 text-white" style="display: block; line-clamp: 2; text-overflow: ellipsis;">
33
+ {{ title }}
39
34
  </h1>
40
- <p class="text-[32px] text-[#E4E4E7] leading-tight">
41
- {{ description.slice(0, 200) }}
35
+ <p class="text-[32px] text-[#E4E4E7] leading-tight" style="display: block; line-clamp: 3; text-overflow: ellipsis;">
36
+ {{ description }}
42
37
  </p>
43
38
  </div>
44
39
 
@@ -0,0 +1,11 @@
1
+ type __VLS_Props = {
2
+ title?: string;
3
+ description?: string;
4
+ headline?: string;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
7
+ title: string;
8
+ description: string;
9
+ headline: string;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ export default _default;
@@ -1,32 +1,23 @@
1
- <script setup lang="ts">
2
- /**
3
- * @credits Full Stack Heroes <https://fullstackheroes.com/>
4
- */
5
-
6
- import { computed, useSiteConfig } from '#imports'
7
- import { parseURL } from 'ufo'
8
-
9
- const props = withDefaults(defineProps<{
10
- title?: string
11
- website?: string
12
- }>(), {
13
- title: 'title',
14
- })
15
-
16
- // fallback to site name
1
+ <script setup>
2
+ import { computed, useSiteConfig } from "#imports";
3
+ import { parseURL } from "ufo";
4
+ const props = defineProps({
5
+ title: { type: String, required: false, default: "title" },
6
+ website: { type: String, required: false }
7
+ });
17
8
  const website = computed(() => {
18
- return props.website || parseURL(useSiteConfig().url).host
19
- })
9
+ return props.website || parseURL(useSiteConfig().url).host;
10
+ });
20
11
  </script>
21
12
 
22
13
  <template>
23
14
  <div class="h-full w-full flex items-start justify-start border-solid border-blue-500 border-[12px] bg-gray-50">
24
15
  <div class="flex items-start justify-start h-full">
25
16
  <div class="flex flex-col justify-between w-full h-full">
26
- <h1 class="text-[80px] p-20 font-black text-left">
17
+ <h1 class="text-[80px] p-20 font-black text-left" style="display: block; line-clamp: 2; text-overflow: ellipsis;">
27
18
  {{ title }}
28
19
  </h1>
29
- <p class="text-2xl pb-10 px-20 font-bold mb-0">
20
+ <p class="text-2xl pb-10 px-20 font-bold mb-0" style="display: block; line-clamp: 3; text-overflow: ellipsis;">
30
21
  {{ website }}
31
22
  </p>
32
23
  </div>
@@ -0,0 +1,8 @@
1
+ type __VLS_Props = {
2
+ title?: string;
3
+ website?: string;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
+ title: string;
7
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ export default _default;
@@ -1,37 +1,22 @@
1
- <script setup lang="ts">
2
- import { computed } from '#imports'
3
-
4
- /**
5
- * @credits UnJS <https://unjs.io/>
6
- */
7
-
8
- const props = withDefaults(defineProps<{
9
- title?: string
10
- description?: string
11
- emoji?: string
12
- downloads?: string | number
13
- stars?: string | number
14
- contributors?: string | number
15
- }>(), {
16
- title: 'unjs/h3',
17
- description: 'Minimal H(TTP) framework built for high performance and portability',
18
- emoji: '⚡',
19
- downloads: '2500000',
20
- stars: '2400',
21
- contributors: '30',
22
- })
23
-
24
- const org = computed(() => props.title.split('/')[0])
25
- const repo = computed(() => props.title.split('/')[1])
26
-
1
+ <script setup>
2
+ import { computed } from "#imports";
3
+ const props = defineProps({
4
+ title: { type: String, required: false, default: "unjs/h3" },
5
+ description: { type: String, required: false, default: "Minimal H(TTP) framework built for high performance and portability" },
6
+ emoji: { type: String, required: false, default: "\u26A1" },
7
+ downloads: { type: [String, Number], required: false, default: "2500000" },
8
+ stars: { type: [String, Number], required: false, default: "2400" },
9
+ contributors: { type: [String, Number], required: false, default: "30" }
10
+ });
11
+ const org = computed(() => props.title.split("/")[0]);
12
+ const repo = computed(() => props.title.split("/")[1]);
27
13
  const stars = computed(() => {
28
- return new Intl.NumberFormat('en-US', { notation: 'compact', compactDisplay: 'short' }).format(Number(props.stars || 0))
29
- })
30
- const downloads = computed(() => new Intl.NumberFormat('en-US', { notation: 'compact', compactDisplay: 'short' })
31
- .format(Number(props.downloads || 0)),
32
- )
33
-
34
- const description = computed(() => (props.description || '').slice(0, 200))
14
+ return new Intl.NumberFormat("en-US", { notation: "compact", compactDisplay: "short" }).format(Number(props.stars || 0));
15
+ });
16
+ const downloads = computed(
17
+ () => new Intl.NumberFormat("en-US", { notation: "compact", compactDisplay: "short" }).format(Number(props.downloads || 0))
18
+ );
19
+ const description = computed(() => (props.description || "").slice(0, 200));
35
20
  </script>
36
21
 
37
22
  <template>
@@ -40,11 +25,17 @@ const description = computed(() => (props.description || '').slice(0, 200))
40
25
  <div class="flex flex-row justify-between">
41
26
  <div class="max-w-[700px]">
42
27
  <h1 class="mb-[30px] max-w-[700px] text-[60px] text-gray-900 font-normal flex flex-row">
43
- <span>{{ org }}</span>
44
- <span v-if="repo" class="ml-2">/</span>
45
- <span v-if="repo" class="ml-2 font-bold">{{ repo }}</span>
28
+ <p style="display: block; overflow: hidden; line-clamp: 1; text-overflow: clip;">
29
+ {{ org }}
30
+ </p>
31
+ <p v-if="repo" style="display: block; overflow: hidden; line-clamp: 1; text-overflow: clip;" class="ml-2">
32
+ /
33
+ </p>
34
+ <p v-if="repo" style="display: block; overflow: hidden; line-clamp: 1; text-overflow: clip;" class="ml-2 font-bold">
35
+ {{ repo }}
36
+ </p>
46
37
  </h1>
47
- <p class="text-gray-500 max-w-[700px] text-[35px] leading-[60px]">
38
+ <p class="text-gray-500 max-w-[700px] text-[35px] leading-[60px]" style="display: block; line-clamp: 3; text-overflow: ellipsis;">
48
39
  {{ description }}
49
40
  </p>
50
41
  </div>
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @credits UnJS <https://unjs.io/>
3
+ */
4
+ type __VLS_Props = {
5
+ title?: string;
6
+ description?: string;
7
+ emoji?: string;
8
+ downloads?: string | number;
9
+ stars?: string | number;
10
+ contributors?: string | number;
11
+ };
12
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
13
+ title: string;
14
+ description: string;
15
+ emoji: string;
16
+ downloads: string | number;
17
+ stars: string | number;
18
+ contributors: string | number;
19
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ export default _default;
@@ -1,18 +1,12 @@
1
- <script setup lang="ts">
2
- /**
3
- * @credits Full Stack Heroes <https://fullstackheroes.com/>
4
- */
5
-
6
- withDefaults(defineProps<{
7
- title?: string
8
- }>(), {
9
- title: 'title',
10
- })
1
+ <script setup>
2
+ defineProps({
3
+ title: { type: String, required: false, default: "title" }
4
+ });
11
5
  </script>
12
6
 
13
7
  <template>
14
8
  <div class="h-full w-full flex items-start justify-start bg-yellow-50 relative">
15
- <h1 class="text-7xl p-20 font-bold text-left text-gray-900">
9
+ <h1 class="text-7xl p-20 font-bold text-left text-gray-900" style="display: block; line-clamp: 2; text-overflow: ellipsis;">
16
10
  {{ title }}
17
11
  </h1>
18
12
 
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @credits Full Stack Heroes <https://fullstackheroes.com/>
3
+ */
4
+ type __VLS_Props = {
5
+ title?: string;
6
+ };
7
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
+ title: string;
9
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ export default _default;
@@ -1,15 +1,8 @@
1
- <script setup lang="ts">
2
- /**
3
- * @credits Full Stack Heroes <https://fullstackheroes.com/>
4
- */
5
-
6
- withDefaults(defineProps<{
7
- emoji?: string
8
- title?: string
9
- }>(), {
10
- title: 'title',
11
- emoji: '👋',
12
- })
1
+ <script setup>
2
+ defineProps({
3
+ emoji: { type: String, required: false, default: "\u{1F44B}" },
4
+ title: { type: String, required: false, default: "title" }
5
+ });
13
6
  </script>
14
7
 
15
8
  <template>
@@ -19,7 +12,7 @@ withDefaults(defineProps<{
19
12
  <p class="text-[120px] mx-auto text-center font-bold mb-0">
20
13
  {{ emoji }}
21
14
  </p>
22
- <h1 class="text-[60px] font-bold">
15
+ <h1 class="text-[60px] font-bold" style="display: block; line-clamp: 2; text-overflow: ellipsis;">
23
16
  {{ title }}
24
17
  </h1>
25
18
  </div>
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @credits Full Stack Heroes <https://fullstackheroes.com/>
3
+ */
4
+ type __VLS_Props = {
5
+ emoji?: string;
6
+ title?: string;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
9
+ title: string;
10
+ emoji: string;
11
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;