uilint-react 0.1.37 → 0.1.38

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.
@@ -2,7 +2,7 @@
2
2
  "use client";
3
3
  import {
4
4
  useUILintContext
5
- } from "./chunk-DEHJKJNT.js";
5
+ } from "./chunk-PU6XPNPN.js";
6
6
 
7
7
  // src/components/ui-lint/ElementBadges.tsx
8
8
  import React, { useState, useEffect, useCallback, useMemo } from "react";
@@ -163,8 +163,7 @@ function formatElementLabel(element) {
163
163
  const fileName = source.fileName.split("/").pop() || "Unknown";
164
164
  return `${tag} > ${fileName}`;
165
165
  }
166
- const componentName = element.componentStack[0]?.name;
167
- return componentName ? `${tag} > ${componentName}` : tag;
166
+ return tag;
168
167
  }
169
168
  var NEARBY_THRESHOLD = 30;
170
169
  var WINDOW_EDGE_THRESHOLD = 20;
@@ -271,7 +270,6 @@ function ElementBadges() {
271
270
  const inspected = {
272
271
  element: element.element,
273
272
  source: element.source,
274
- componentStack: element.componentStack,
275
273
  rect: element.element.getBoundingClientRect(),
276
274
  scannedElementId: element.id
277
275
  };
@@ -2,8 +2,8 @@
2
2
  "use client";
3
3
  import {
4
4
  InspectionPanel
5
- } from "./chunk-ITKEGCAZ.js";
6
- import "./chunk-DEHJKJNT.js";
5
+ } from "./chunk-GZOQ6QWC.js";
6
+ import "./chunk-PU6XPNPN.js";
7
7
  export {
8
8
  InspectionPanel
9
9
  };
@@ -3,8 +3,8 @@
3
3
  import {
4
4
  InspectedElementHighlight,
5
5
  LocatorOverlay
6
- } from "./chunk-LZX53CPI.js";
7
- import "./chunk-DEHJKJNT.js";
6
+ } from "./chunk-V4273T5B.js";
7
+ import "./chunk-PU6XPNPN.js";
8
8
  export {
9
9
  InspectedElementHighlight,
10
10
  LocatorOverlay
@@ -2,8 +2,8 @@
2
2
  "use client";
3
3
  import {
4
4
  UILintToolbar
5
- } from "./chunk-EYWLUDXI.js";
6
- import "./chunk-DEHJKJNT.js";
5
+ } from "./chunk-WEBVLQL5.js";
6
+ import "./chunk-PU6XPNPN.js";
7
7
  export {
8
8
  UILintToolbar
9
9
  };
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  buildEditorUrl,
4
4
  useUILintContext
5
- } from "./chunk-DEHJKJNT.js";
5
+ } from "./chunk-PU6XPNPN.js";
6
6
 
7
7
  // src/components/ui-lint/InspectionPanel.tsx
8
8
  import { useState, useEffect, useCallback, useMemo } from "react";
@@ -199,7 +199,7 @@ function PanelHeader({
199
199
  element,
200
200
  onClose
201
201
  }) {
202
- const componentName = element.componentStack[0]?.name || element.element.tagName.toLowerCase();
202
+ const tagName = element.element.tagName.toLowerCase();
203
203
  const handleOpenInCursor = useCallback(() => {
204
204
  if (element.source) {
205
205
  const url = buildEditorUrl(element.source, "cursor");
@@ -219,11 +219,15 @@ function PanelHeader({
219
219
  },
220
220
  children: [
221
221
  /* @__PURE__ */ jsxs("div", { children: [
222
- /* @__PURE__ */ jsx("div", { style: { fontSize: "14px", fontWeight: 600 }, children: componentName }),
223
- /* @__PURE__ */ jsxs("div", { style: { fontSize: "11px", color: STYLES.textMuted }, children: [
222
+ /* @__PURE__ */ jsxs("div", { style: { fontSize: "14px", fontWeight: 600 }, children: [
224
223
  "<",
225
- element.element.tagName.toLowerCase(),
224
+ tagName,
226
225
  ">"
226
+ ] }),
227
+ element.source && /* @__PURE__ */ jsxs("div", { style: { fontSize: "11px", color: STYLES.textMuted }, children: [
228
+ element.source.fileName.split("/").pop(),
229
+ ":",
230
+ element.source.lineNumber
227
231
  ] })
228
232
  ] }),
229
233
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
@@ -357,38 +361,6 @@ function InfoTab({ element }) {
357
361
  children: element.source.fileName
358
362
  }
359
363
  ) }),
360
- element.componentStack.length > 0 && /* @__PURE__ */ jsx(Section, { title: "Component Stack", children: /* @__PURE__ */ jsxs(
361
- "div",
362
- {
363
- style: { display: "flex", flexDirection: "column", gap: "4px" },
364
- children: [
365
- element.componentStack.slice(0, 10).map((comp, index) => /* @__PURE__ */ jsx(
366
- ComponentStackItem,
367
- {
368
- component: comp,
369
- index,
370
- isFirst: index === 0
371
- },
372
- index
373
- )),
374
- element.componentStack.length > 10 && /* @__PURE__ */ jsxs(
375
- "div",
376
- {
377
- style: {
378
- fontSize: "11px",
379
- color: STYLES.textDim,
380
- marginTop: "4px"
381
- },
382
- children: [
383
- "...and ",
384
- element.componentStack.length - 10,
385
- " more"
386
- ]
387
- }
388
- )
389
- ]
390
- }
391
- ) }),
392
364
  /* @__PURE__ */ jsxs(Section, { title: "Dimensions", children: [
393
365
  /* @__PURE__ */ jsx(
394
366
  InfoRow,
@@ -867,70 +839,6 @@ function InfoRow({
867
839
  }
868
840
  );
869
841
  }
870
- function ComponentStackItem({
871
- component,
872
- index,
873
- isFirst
874
- }) {
875
- const handleClick = useCallback(() => {
876
- if (component.source) {
877
- const url = buildEditorUrl(component.source, "cursor");
878
- window.open(url, "_blank");
879
- }
880
- }, [component.source]);
881
- return /* @__PURE__ */ jsxs(
882
- "div",
883
- {
884
- style: {
885
- display: "flex",
886
- alignItems: "center",
887
- gap: "8px",
888
- padding: "6px 8px",
889
- marginLeft: index * 8,
890
- backgroundColor: isFirst ? "rgba(59, 130, 246, 0.1)" : "transparent",
891
- borderRadius: "4px",
892
- cursor: component.source ? "pointer" : "default",
893
- transition: "background-color 0.15s"
894
- },
895
- onClick: handleClick,
896
- onMouseEnter: (e) => {
897
- if (component.source) {
898
- e.currentTarget.style.backgroundColor = "rgba(59, 130, 246, 0.15)";
899
- }
900
- },
901
- onMouseLeave: (e) => {
902
- e.currentTarget.style.backgroundColor = isFirst ? "rgba(59, 130, 246, 0.1)" : "transparent";
903
- },
904
- children: [
905
- /* @__PURE__ */ jsx(
906
- "span",
907
- {
908
- style: {
909
- fontSize: "12px",
910
- fontWeight: isFirst ? 600 : 400,
911
- color: isFirst ? STYLES.accent : STYLES.textMuted
912
- },
913
- children: component.name
914
- }
915
- ),
916
- component.source && /* @__PURE__ */ jsxs(
917
- "span",
918
- {
919
- style: {
920
- fontSize: "10px",
921
- color: STYLES.textDim,
922
- fontFamily: STYLES.fontMono
923
- },
924
- children: [
925
- ":",
926
- component.source.lineNumber
927
- ]
928
- }
929
- )
930
- ]
931
- }
932
- );
933
- }
934
842
  function CursorIcon() {
935
843
  return /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
936
844
  "path",