@kolkrabbi/kol-component 0.317.5 → 0.317.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-component",
3
- "version": "0.317.5",
3
+ "version": "0.317.6",
4
4
  "description": "The core component library",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -619,10 +619,13 @@ function GetInfoModal({ path, objects, where, onClose, formatDate, tags, mediaUr
619
619
  ...(timed ? [['Length', dims?.len ? formatLength(dims.len) : url ? '…' : '—']] : []),
620
620
  ...(url ? [['URL', <span key="u" className="inline-flex items-center gap-1">{url}<CopyAction label="Copy URL" text={url} /></span>]] : []),
621
621
  ]}
622
+ /* SMALL (MediaGetInfoFileBody, 2026-10-30): the modal's width at its own ratio, but never taller
623
+ * than 32vh — a 9:16 reel at full width ran the body past its cap. `#t=0.1` makes the browser
624
+ * paint a frame under preload="metadata"; without it a posterless video was a blank band. */
622
625
  preview={url && (isImage(o.contentType) ? (
623
- <img src={url} alt="" className="w-full h-auto rounded" onLoad={(e) => setDims({ w: e.currentTarget.naturalWidth, h: e.currentTarget.naturalHeight })} />
626
+ <img src={url} alt="" className="block max-w-full max-h-[32vh] w-auto h-auto mx-auto rounded" onLoad={(e) => setDims({ w: e.currentTarget.naturalWidth, h: e.currentTarget.naturalHeight })} />
624
627
  ) : kind === 'video' ? (
625
- <video src={url} poster={poster ? mediaUrl(poster) : undefined} preload="metadata" controls className="w-full h-auto rounded" onLoadedMetadata={onMeta} />
628
+ <video src={`${url}#t=0.1`} poster={poster ? mediaUrl(poster) : undefined} preload="metadata" controls className="block max-w-full max-h-[32vh] w-auto h-auto mx-auto rounded" onLoadedMetadata={onMeta} />
626
629
  ) : kind === 'audio' ? (
627
630
  /* no picture to show; loaded only for its length */
628
631
  <audio src={url} preload="metadata" className="hidden" onLoadedMetadata={onMeta} />