mta-mcp 3.15.3 → 3.15.4

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
@@ -6647,12 +6647,16 @@ function hasWideStretchRisk(codeContent) {
6647
6647
  return edgePinnedPositioned || /SizedBox\.expand\s*\(/.test(codeContent) || /double\.infinity/.test(codeContent);
6648
6648
  }
6649
6649
  function collectVisualFrameContracts(node, bucket = []) {
6650
+ var _a;
6650
6651
  if (!node) {
6651
6652
  return bucket;
6652
6653
  }
6653
6654
  if (node.f && node.vf) {
6654
6655
  const hasVisualDelta = node.f.some((value, index) => value !== node.vf[index]);
6655
- if (hasVisualDelta) {
6656
+ const hasVisualDecoration = Boolean(
6657
+ node.bg || node.gd || node.bd || node.token || ((_a = node.sh) == null ? void 0 : _a.length) || node.r !== void 0
6658
+ );
6659
+ if (hasVisualDelta && hasVisualDecoration) {
6656
6660
  bucket.push({
6657
6661
  nodeName: node.n || node.t || "unknown",
6658
6662
  frame: node.f,
@@ -6665,6 +6669,15 @@ function collectVisualFrameContracts(node, bucket = []) {
6665
6669
  }
6666
6670
  return bucket;
6667
6671
  }
6672
+ function extractRouteChunk(routeContent, routeIndex) {
6673
+ const blockStart = routeContent.lastIndexOf("GetPage(", routeIndex);
6674
+ const start = blockStart === -1 ? routeIndex : blockStart;
6675
+ const nextBlockStart = routeContent.indexOf("GetPage(", routeIndex + 1);
6676
+ if (nextBlockStart === -1) {
6677
+ return routeContent.slice(start);
6678
+ }
6679
+ return routeContent.slice(start, nextBlockStart);
6680
+ }
6668
6681
  function resolveProjectAssetPath(projectPath, assetPath) {
6669
6682
  return path20.join(projectPath, assetPath);
6670
6683
  }
@@ -6912,7 +6925,7 @@ function buildRouteReviewValidator(args, codeContent) {
6912
6925
  suggestion: "\u751F\u6210\u9875\u9762\u540E\u5FC5\u987B\u786E\u8BA4\u771F\u5B9E\u8DEF\u7531\u5DF2\u7ECF\u63A5\u901A\uFF0C\u4E0D\u80FD\u505C\u7559\u5728\u5B64\u7ACB\u9875\u9762\u6587\u4EF6\u3002"
6913
6926
  });
6914
6927
  } else {
6915
- const routeChunk = routeContent.slice(routeIndex, routeIndex + 240);
6928
+ const routeChunk = extractRouteChunk(routeContent, routeIndex);
6916
6929
  routeConnected = true;
6917
6930
  if (/_ComingSoonPage/.test(routeChunk)) {
6918
6931
  routeConnected = false;