@usercase/mcp 0.2.6 → 0.2.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/run/visit.js +13 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usercase/mcp",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Virtual users that browse your website and tell you what they thought — an MCP server for Claude Code",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://usercase.io",
package/src/run/visit.js CHANGED
@@ -118,9 +118,20 @@ async function clickPrint(page, el) {
118
118
  const r = n.getBoundingClientRect();
119
119
  return r.width > 0 && r.height > 0 && getComputedStyle(n).visibility !== "hidden";
120
120
  };
121
+ // 그림은 화면 안에 보이는 것만, 가로 자리까지 — 슬라이더는 슬라이드를 다 DOM 에 둔 채 transform 으로 밀기만 한다.
122
+ // 글자도 그림 목록도 그대로라 화살표로 로고가 넘어가도 "그대로" 로 찍혔다(10/28 bluetags 첫 화면 ProejctCardSlider)
123
+ const W = innerWidth;
124
+ const H = innerHeight;
125
+ const media = /^(IMG|VIDEO|IFRAME|CANVAS)$/;
121
126
  const extra = [...document.querySelectorAll("input,textarea,select,[contenteditable=true],img,video,iframe,canvas")]
122
127
  .filter(shown)
123
- .map((n) => [n.tagName, n.getAttribute("placeholder"), n.getAttribute("aria-label"), n.getAttribute("src")].join(":"))
128
+ .map((n) => {
129
+ if (!media.test(n.tagName)) return [n.tagName, n.getAttribute("placeholder"), n.getAttribute("aria-label")].join(":");
130
+ const r = n.getBoundingClientRect();
131
+ if (r.right <= 0 || r.left >= W || r.bottom <= 0 || r.top >= H) return "";
132
+ return [n.tagName, n.getAttribute("src"), Math.round(r.left / 8)].join(":");
133
+ })
134
+ .filter(Boolean)
124
135
  .join("|");
125
136
  const t = ((document.body && document.body.innerText) || "") + "|" + extra;
126
137
  let h = 5381;
@@ -1121,4 +1132,4 @@ async function runVisit(page, person, { siteAbout, ask, rhythm = null, shape = n
1121
1132
  return v.result();
1122
1133
  }
1123
1134
 
1124
- module.exports = { STEP_SCHEMA, STEP_PROMPT_FILE, HARD_STEP_CAP, stepPrompt, buildStepMessage, renderScreen, renderPerson, Visit, runVisit, settle, watchNet };
1135
+ module.exports = { STEP_SCHEMA, STEP_PROMPT_FILE, HARD_STEP_CAP, stepPrompt, buildStepMessage, renderScreen, renderPerson, Visit, runVisit, settle, watchNet, clickPrint };