@jant/core 0.3.29 → 0.3.30

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/index.js CHANGED
@@ -4692,7 +4692,7 @@ const I18nProvider = ({ c, children })=>{
4692
4692
  }
4693
4693
 
4694
4694
  const IS_VITE_DEV = typeof __JANT_DEV__ !== "undefined" && __JANT_DEV__ === true;
4695
- const CORE_VERSION = "0.3.29";
4695
+ const CORE_VERSION = "0.3.30";
4696
4696
 
4697
4697
  const BaseLayout = ({ title, description, lang, c, toast, faviconUrl, faviconVersion, noindex, isAuthenticated = false, children })=>{
4698
4698
  // Read lang from Hono context if available, otherwise use prop or default
@@ -6435,10 +6435,11 @@ const sqid = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
6435
6435
  const publicUrl = getPublicUrlForProvider(media.provider, ctx.r2PublicUrl, ctx.s3PublicUrl);
6436
6436
  const url = getMediaUrl(media.storageKey, publicUrl);
6437
6437
  const thumbnailUrl = getImageUrl(url, ctx.imageTransformUrl, {
6438
- width: 400,
6438
+ width: 1200,
6439
+ height: 768,
6439
6440
  quality: 80,
6440
6441
  format: "auto",
6441
- fit: "cover"
6442
+ fit: "scale-down"
6442
6443
  });
6443
6444
  return {
6444
6445
  id: media.id,
@@ -7231,10 +7232,11 @@ const SiteLayout = ({ siteName, siteDescription, links, currentPath, isAuthentic
7231
7232
  id: m.id,
7232
7233
  url: getMediaUrl(m.storageKey, publicUrl),
7233
7234
  previewUrl: getImageUrl(getMediaUrl(m.storageKey, publicUrl), imageTransformUrl, {
7234
- width: 400,
7235
+ width: 1200,
7236
+ height: 768,
7235
7237
  quality: 80,
7236
7238
  format: "auto",
7237
- fit: "cover"
7239
+ fit: "scale-down"
7238
7240
  }),
7239
7241
  alt: m.alt,
7240
7242
  blurhash: m.blurhash,
@@ -13780,10 +13782,11 @@ const postsApiRoutes = new Hono();
13780
13782
  const publicUrl = getPublicUrlForProvider(m.provider, r2PublicUrl, s3PublicUrl);
13781
13783
  const url = getMediaUrl(m.storageKey, publicUrl);
13782
13784
  const previewUrl = getImageUrl(url, imageTransformUrl, {
13783
- width: 400,
13785
+ width: 1200,
13786
+ height: 768,
13784
13787
  quality: 80,
13785
13788
  format: "auto",
13786
- fit: "cover"
13789
+ fit: "scale-down"
13787
13790
  });
13788
13791
  return {
13789
13792
  id: m.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jant/core",
3
- "version": "0.3.29",
3
+ "version": "0.3.30",
4
4
  "description": "A modern, open-source microblogging platform built on Cloudflare Workers",
5
5
  "type": "module",
6
6
  "exports": {
@@ -49,7 +49,13 @@ export function buildMediaMap(
49
49
  previewUrl: getImageUrl(
50
50
  getMediaUrl(m.storageKey, publicUrl),
51
51
  imageTransformUrl,
52
- { width: 400, quality: 80, format: "auto", fit: "cover" },
52
+ {
53
+ width: 1200,
54
+ height: 768,
55
+ quality: 80,
56
+ format: "auto",
57
+ fit: "scale-down",
58
+ },
53
59
  ),
54
60
  alt: m.alt,
55
61
  blurhash: m.blurhash,
package/src/lib/view.ts CHANGED
@@ -79,10 +79,11 @@ export function toMediaView(media: Media, ctx: MediaContext): MediaView {
79
79
  );
80
80
  const url = getMediaUrl(media.storageKey, publicUrl);
81
81
  const thumbnailUrl = getImageUrl(url, ctx.imageTransformUrl, {
82
- width: 400,
82
+ width: 1200,
83
+ height: 768,
83
84
  quality: 80,
84
85
  format: "auto",
85
- fit: "cover",
86
+ fit: "scale-down",
86
87
  });
87
88
 
88
89
  return {
@@ -44,10 +44,11 @@ function toMediaAttachment(
44
44
  );
45
45
  const url = getMediaUrl(m.storageKey, publicUrl);
46
46
  const previewUrl = getImageUrl(url, imageTransformUrl, {
47
- width: 400,
47
+ width: 1200,
48
+ height: 768,
48
49
  quality: 80,
49
50
  format: "auto",
50
- fit: "cover",
51
+ fit: "scale-down",
51
52
  });
52
53
 
53
54
  return {