@jant/core 0.3.47 → 0.3.48

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
@@ -1,5 +1,5 @@
1
1
  import { _ as url_exports } from "./url-umUptr5z.js";
2
- import { A as NAV_ITEM_TYPES, C as toPostView, D as MAX_MEDIA_ATTACHMENTS, E as FORMATS, M as STATUSES, N as TEXT_ATTACHMENT_CONTENT_FORMATS, O as MAX_PINNED_POSTS, S as toNavItemViews, T as toSearchResultView, _ as createMediaContext, b as toMediaView, f as defaultFeedRenderer, j as SORT_ORDERS, k as MEDIA_KINDS, t as createApp, v as toArchiveGroups, w as toPostViews, x as toNavItemView, y as toArchiveGroupsWithMedia } from "./app-3REcR-3U.js";
2
+ import { A as NAV_ITEM_TYPES, C as toPostView, D as MAX_MEDIA_ATTACHMENTS, E as FORMATS, M as STATUSES, N as TEXT_ATTACHMENT_CONTENT_FORMATS, O as MAX_PINNED_POSTS, S as toNavItemViews, T as toSearchResultView, _ as createMediaContext, b as toMediaView, f as defaultFeedRenderer, j as SORT_ORDERS, k as MEDIA_KINDS, t as createApp, v as toArchiveGroups, w as toPostViews, x as toNavItemView, y as toArchiveGroupsWithMedia } from "./app-DdnIoX7y.js";
3
3
  import { T as time_exports, a as markdown_exports } from "./export-ZBlfKSKm.js";
4
4
  import "./env-CgaH9Mut.js";
5
5
  import "./github-sync-bL1hnx3Q.js";
package/dist/node.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./url-umUptr5z.js";
2
- import { F as BUILTIN_COLOR_THEMES, I as getPublicAssetBasePath, L as isAssetPath, P as buildThemeStyle, a as resolveDatabaseDialect, c as resolveConfig, d as getFontThemeCssVariables, g as schema_exports, h as createNodeDatabase, i as createSiteService, l as BUILTIN_FONT_THEMES, m as sqliteSchemaBundle, n as createNodeCliRuntime, o as getHostBasedStartupConfigurationIssues, p as pgSchemaBundle, r as createNodeRequestRuntime, s as createStorageDriver, t as createApp, u as getCjkSerifCssVariables } from "./app-3REcR-3U.js";
2
+ import { F as BUILTIN_COLOR_THEMES, I as getPublicAssetBasePath, L as isAssetPath, P as buildThemeStyle, a as resolveDatabaseDialect, c as resolveConfig, d as getFontThemeCssVariables, g as schema_exports, h as createNodeDatabase, i as createSiteService, l as BUILTIN_FONT_THEMES, m as sqliteSchemaBundle, n as createNodeCliRuntime, o as getHostBasedStartupConfigurationIssues, p as pgSchemaBundle, r as createNodeRequestRuntime, s as createStorageDriver, t as createApp, u as getCjkSerifCssVariables } from "./app-DdnIoX7y.js";
3
3
  import { t as createExportService } from "./export-ZBlfKSKm.js";
4
4
  import { b as getSiteResolutionMode, i as getConfiguredSingleSitePathPrefix, l as getEnvString, r as getConfiguredSingleSiteOrigin, x as shouldTrustProxy, y as getPort } from "./env-CgaH9Mut.js";
5
5
  import "./github-sync-bL1hnx3Q.js";
@@ -474,7 +474,7 @@ async function createNodeRequestHandler(options) {
474
474
  async function start(env = process.env, app) {
475
475
  const handler = await createNodeRequestHandler({
476
476
  env,
477
- app: async () => app ?? (await import("./app-B67XOEyo.js")).createApp()
477
+ app: async () => app ?? (await import("./app-DU7dpJID.js")).createApp()
478
478
  });
479
479
  const hostname = resolveHost(env);
480
480
  const port = resolvePort(env);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jant/core",
3
- "version": "0.3.47",
3
+ "version": "0.3.48",
4
4
  "description": "A modern, open-source microblogging platform built on Cloudflare Workers",
5
5
  "type": "module",
6
6
  "exports": {
@@ -42,13 +42,15 @@ export function toApiAttachment(
42
42
  };
43
43
  }
44
44
 
45
- const previewUrl = getImageUrl(url, imageTransformUrl, {
46
- width: 1200,
47
- height: 768,
48
- quality: 80,
49
- format: "auto",
50
- fit: "scale-down",
51
- });
45
+ const previewUrl = media.mimeType.startsWith("image/")
46
+ ? getImageUrl(url, imageTransformUrl, {
47
+ width: 1200,
48
+ height: 768,
49
+ quality: 80,
50
+ format: "auto",
51
+ fit: "scale-down",
52
+ })
53
+ : url;
52
54
  const posterUrl = media.posterKey
53
55
  ? getMediaUrl(media.posterKey, publicUrl, sitePathPrefix)
54
56
  : null;
package/src/styles/ui.css CHANGED
@@ -6832,7 +6832,7 @@
6832
6832
  .compose-attachment-img {
6833
6833
  display: block;
6834
6834
  border-radius: var(--media-radius, 0.5rem);
6835
- max-height: 320px;
6835
+ max-height: min(320px, 28dvh);
6836
6836
  object-fit: contain;
6837
6837
  }
6838
6838
 
@@ -6869,7 +6869,7 @@
6869
6869
  /* Single image: constrain to container width */
6870
6870
  .compose-attachment:only-child .compose-attachment-img {
6871
6871
  max-width: 100%;
6872
- max-height: 384px;
6872
+ max-height: min(384px, 32dvh);
6873
6873
  }
6874
6874
 
6875
6875
  .compose-attachment:only-child .compose-attachment-preview-fallback {