@orchyn/mcp 1.17.5 → 1.17.7

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.
@@ -11,7 +11,7 @@ import { OrchynError } from "./orchyn.js";
11
11
  import { formatPaywallError, runVideoAnalysis, validatePostUrl } from "./video.js";
12
12
  import { ORCHYN_UI_TEMPLATE } from "./ui-template.js";
13
13
  /** Current MCP server version — bumped on every deploy for traceability. */
14
- export const MCP_SERVER_VERSION = "1.17.4";
14
+ export const MCP_SERVER_VERSION = "1.17.7";
15
15
  /** MCP Apps extension identifier */
16
16
  const UI_EXTENSION = "io.modelcontextprotocol/ui";
17
17
  /** MIME type for MCP Apps HTML resources */
@@ -50,12 +50,18 @@ body{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;background:var(--
50
50
 
51
51
  /* ─── Cards ─── */
52
52
  .gallery{display:flex;flex-wrap:wrap;gap:10px;}
53
- .card{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;width:300px;background:var(--card);display:inline-block;vertical-align:top;box-shadow:var(--shadow-sm);transition:var(--transition);cursor:default;}
53
+ .card{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;width:380px;background:var(--card);display:inline-block;vertical-align:top;box-shadow:var(--shadow-sm);transition:var(--transition);cursor:default;}
54
54
  .card:hover{box-shadow:var(--shadow-md);transform:translateY(-2px);border-color:var(--muted);}
55
55
  .card-wide{width:100%;}
56
- .card img{width:100%;height:200px;object-fit:cover;display:block;transition:transform .3s ease;}
56
+ .card img{width:100%;height:260px;object-fit:cover;display:block;transition:transform .3s ease;}
57
57
  .card:hover img{transform:scale(1.02);}
58
58
  .card-wide img{max-height:340px;}
59
+ .card video{width:100%;min-height:220px;max-height:520px;display:block;background:#000;border:none;outline:none;object-fit:contain;}
60
+ .card-wide video{max-height:520px;}
61
+ .video-wrap{width:100%;background:#000;position:relative;overflow:hidden;}
62
+ .video-wrap.v{aspect-ratio:9/16;max-height:520px;}
63
+ .video-wrap.h{aspect-ratio:16/9;max-height:360px;}
64
+ .video-wrap.sq{aspect-ratio:1/1;max-height:440px;}
59
65
  .card-body{padding:14px 16px;}
60
66
 
61
67
  /* ─── Badges & Tags ─── */
@@ -334,8 +340,24 @@ body{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;background:var(--
334
340
  var vh=wide?"340px":"200px";
335
341
  var bodyText=p.caption||p.text||"";
336
342
  if(video){
337
- mediaHtml='<video src="'+esc(video)+'" controls preload="metadata" playsinline poster="'+esc(thumb)+'" style="width:100%;height:'+vh+';object-fit:cover;display:block;background:#000">'
338
- +'Your browser does not support video playback.</video>';
343
+ // Detect aspect ratio from format/platform data.
344
+ // Short-form vertical: TikTok, Reels, Shorts (9:16) -> taller card
345
+ // Long-form horizontal: YouTube, LinkedIn, X (16:9) -> standard card
346
+ var fmt=p.detectedFormat||"";
347
+ var dur=p.duration||0;
348
+ var isVertical=false;
349
+ if(fmt==="Short-form")isVertical=true;
350
+ else if(fmt==="Long-form")isVertical=false;
351
+ else if(platform==="tiktok"||platform==="douyin")isVertical=true;
352
+ else if(platform==="youtube"&&dur>0&&dur<=60)isVertical=true;
353
+ else if(platform==="instagram")isVertical=true;
354
+ var arCls=isVertical?"v":"h";
355
+ var _vc="video-wrap "+arCls;
356
+ mediaHtml='<div class=""+_vc+"">'
357
+ +'<video src="'+esc(video)+'" controls preload="metadata" playsinline '
358
+ +'poster="'+esc(thumb)+'" '
359
+ +'style="width:100%;height:100%;object-fit:contain;display:block;background:#000">'
360
+ +'Your browser does not support video playback.</video></div>';
339
361
  }else if(images.length>1){
340
362
  // Carousel / multi-image gallery — horizontally scrollable strip.
341
363
  var strip=images.map(function(u,i){
@@ -415,7 +437,7 @@ body{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;background:var(--
415
437
  var vt=a.viralTriggers.slice(0,8).map(function(t){return'<span class="tag clickable" onclick="copyText(this.dataset.v)" data-v="'+esc(t)+'">🔥 '+esc(t)+"</span>";}).join("");
416
438
  sections+=section("Viral Triggers",vt);
417
439
  }
418
- if(a.suggestedHook)sections+=section("Suggested Hook",'<div class="quote-box">'+esc(a.suggestedHook)+'<button class="copy-btn" onclick="copyText(\\''+esc(a.suggestedHook).replace(/'/g,"\\\\'")+'\\')">Copy</button></div>',true);
440
+ if(a.suggestedHook)sections+=section("Suggested Hook",'<div class="quote-box">'+esc(a.suggestedHook)+'<button class="copy-btn" data-copy="'+esc(a.suggestedHook).replace(/"/g,'&quot;')+'">Copy</button></div>',true);
419
441
  if(a.suggestedHashtags&&a.suggestedHashtags.length){
420
442
  var sh=a.suggestedHashtags.slice(0,10).map(function(t){var clean=t.replace(/^#/,"");return'<span class="tag clickable" onclick="copyText(this.dataset.v)" data-v="#'+esc(clean)+'" style="background:#ede9fe;color:#6d28d9">#'+esc(clean)+"</span>";}).join("");
421
443
  sections+=section("Hashtags",sh);
@@ -543,6 +565,10 @@ body{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;background:var(--
543
565
 
544
566
  // Global helpers
545
567
  window.copyText=copyText;
568
+ document.addEventListener('click',function(e){
569
+ var btn=e.target.closest('.copy-btn[data-copy]');
570
+ if(btn)copyText(btn.getAttribute('data-copy'));
571
+ });
546
572
  window.toggleSection=function(header){
547
573
  header.classList.toggle("open");
548
574
  var content=header.nextElementSibling;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchyn/mcp",
3
- "version": "1.17.5",
3
+ "version": "1.17.7",
4
4
  "description": "MCP server for orchyn - fetch, discover and understand TikTok/Instagram/YouTube/X/LinkedIn posts with AI (media metadata, niche discovery, hook & viral analysis)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",