@ludo.ninja/components 2.1.72 → 2.1.73

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.
@@ -5,5 +5,8 @@ declare class AssetImage extends Image {
5
5
  getMediaUrl(): (NEXT_PUBLIC_STATIC_DOMAIN: string) => string;
6
6
  displaySingleMedia(): JSX.Element;
7
7
  displayLinkedMedia(): JSX.Element;
8
+ displayOpenGraphMeta({ title }: {
9
+ title: string;
10
+ }): JSX.Element;
8
11
  }
9
12
  export default AssetImage;
@@ -30,6 +30,11 @@ class AssetImage extends Image_1.default {
30
30
  displayLinkedMedia() {
31
31
  return ((0, jsx_runtime_1.jsx)(DisplayMedia, { alt: this.getAlt(), getMediaUrl: this.getMediaUrl(), originalUrl: this.getOriginalUrl() }));
32
32
  }
33
+ displayOpenGraphMeta({ title }) {
34
+ const NEXT_PUBLIC_STATIC_DOMAIN = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_STATIC_DOMAIN);
35
+ const url = this.getMediaUrl();
36
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("meta", { property: "og:image", content: url(NEXT_PUBLIC_STATIC_DOMAIN) }), (0, jsx_runtime_1.jsx)("meta", { property: "og:image:alt", content: title }), (0, jsx_runtime_1.jsx)("meta", { name: "twitter:image", content: url(NEXT_PUBLIC_STATIC_DOMAIN) }), (0, jsx_runtime_1.jsx)("meta", { property: "twitter:image:alt", content: title })] }));
37
+ }
33
38
  }
34
39
  const DisplayMedia = ({ getMediaUrl, alt, originalUrl, }) => {
35
40
  const NEXT_PUBLIC_STATIC_DOMAIN = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_STATIC_DOMAIN);
@@ -34,7 +34,7 @@ class Audio extends Media_1.default {
34
34
  return this.displaySingleMedia();
35
35
  }
36
36
  displayOpenGraphMeta({ title }) {
37
- return (0, jsx_runtime_1.jsx)("div", { children: title });
37
+ return (0, jsx_runtime_1.jsx)("div", { children: `Audio - ${title}` });
38
38
  }
39
39
  }
40
40
  exports.default = Audio;
@@ -42,7 +42,7 @@ class Image extends Media_1.default {
42
42
  return (0, jsx_runtime_1.jsx)("div", { children: "its miniature image" });
43
43
  }
44
44
  displayOpenGraphMeta({ title }) {
45
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("meta", { property: "og:image", content: "https://510.ludo.ninja/assets/images/db1e0d05de5c9d5cd08ad5f54e6c38e3.webp" }), (0, jsx_runtime_1.jsx)("meta", { property: "og:image:alt", content: title }), (0, jsx_runtime_1.jsx)("meta", { name: "twitter:image", content: 'https://510.ludo.ninja/assets/images/db1e0d05de5c9d5cd08ad5f54e6c38e3.webp' }), (0, jsx_runtime_1.jsx)("meta", { property: "twitter:image:alt", content: title })] }));
45
+ return (0, jsx_runtime_1.jsx)("div", { children: `Image - ${title}` });
46
46
  }
47
47
  }
48
48
  exports.default = Image;
@@ -43,7 +43,7 @@ class ObjectMedia extends Media_1.default {
43
43
  return this.displaySingleMedia();
44
44
  }
45
45
  displayOpenGraphMeta({ title }) {
46
- return (0, jsx_runtime_1.jsx)("div", { children: title });
46
+ return (0, jsx_runtime_1.jsx)("div", { children: `Object - ${title}` });
47
47
  }
48
48
  }
49
49
  exports.default = ObjectMedia;
@@ -62,7 +62,7 @@ class Other extends Media_1.default {
62
62
  return this.displaySingleMedia();
63
63
  }
64
64
  displayOpenGraphMeta({ title }) {
65
- return (0, jsx_runtime_1.jsx)("div", { children: title });
65
+ return (0, jsx_runtime_1.jsx)("div", { children: `Other - ${title}` });
66
66
  }
67
67
  }
68
68
  exports.default = Other;
@@ -42,7 +42,7 @@ class Screenshot extends Media_1.default {
42
42
  return (0, jsx_runtime_1.jsx)("div", { children: "its miniature screenshot" });
43
43
  }
44
44
  displayOpenGraphMeta({ title }) {
45
- return (0, jsx_runtime_1.jsx)("div", { children: title });
45
+ return (0, jsx_runtime_1.jsx)("div", { children: `Screenshot - ${title}` });
46
46
  }
47
47
  }
48
48
  exports.default = Screenshot;
@@ -34,7 +34,7 @@ class Video extends Media_1.default {
34
34
  return this.displaySingleMedia();
35
35
  }
36
36
  displayOpenGraphMeta({ title }) {
37
- return (0, jsx_runtime_1.jsx)("div", { children: title });
37
+ return (0, jsx_runtime_1.jsx)("div", { children: `Video - ${title}` });
38
38
  }
39
39
  }
40
40
  exports.default = Video;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.1.72",
3
+ "version": "2.1.73",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",