uilint-react 0.1.49 → 0.1.50
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/{ElementBadges-TPLIZJA5.js → ElementBadges-ISBIBC3T.js} +8 -1
- package/dist/{InspectionPanel-FKDEPTX7.js → InspectionPanel-OCCB5KUE.js} +2 -2
- package/dist/{LocatorOverlay-W33BHLRE.js → LocatorOverlay-VACYO52F.js} +2 -2
- package/dist/{UILintToolbar-OQ44CM63.js → UILintToolbar-TXSF3YZF.js} +2 -2
- package/dist/{chunk-2BV2MBAM.js → chunk-NOYDJR7R.js} +4 -1
- package/dist/{chunk-N6U5BUAN.js → chunk-TLHXCIXS.js} +4 -4
- package/dist/{chunk-IRG3I75F.js → chunk-TQTSKK5G.js} +5 -1
- package/dist/{chunk-URAH2PAM.js → chunk-ZNBNHYJX.js} +20 -8
- package/dist/index.js +4 -4
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import {
|
|
4
4
|
useUILintContext,
|
|
5
5
|
useUILintStore
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TLHXCIXS.js";
|
|
7
7
|
|
|
8
8
|
// src/components/ui-lint/ElementBadges.tsx
|
|
9
9
|
import React, { useState, useEffect, useCallback, useMemo } from "react";
|
|
@@ -403,6 +403,9 @@ function ElementBadges() {
|
|
|
403
403
|
{
|
|
404
404
|
"data-ui-lint": true,
|
|
405
405
|
onMouseDown: handleUILintInteraction,
|
|
406
|
+
onPointerDown: handleUILintInteraction,
|
|
407
|
+
onPointerUp: handleUILintInteraction,
|
|
408
|
+
onTouchStart: handleUILintInteraction,
|
|
406
409
|
onClick: handleUILintInteraction,
|
|
407
410
|
onKeyDown: handleUILintInteraction,
|
|
408
411
|
style: { pointerEvents: "none" },
|
|
@@ -485,6 +488,9 @@ function NudgedBadge({
|
|
|
485
488
|
},
|
|
486
489
|
[element, issue, onSelect]
|
|
487
490
|
);
|
|
491
|
+
const handlePointerDown = useCallback((e) => {
|
|
492
|
+
e.stopPropagation();
|
|
493
|
+
}, []);
|
|
488
494
|
const hoveredBadge = useMemo(() => {
|
|
489
495
|
if (hoveredIndex === null) return null;
|
|
490
496
|
return nearbyBadges[hoveredIndex] ?? null;
|
|
@@ -567,6 +573,7 @@ function NudgedBadge({
|
|
|
567
573
|
"data-ui-lint": true,
|
|
568
574
|
onMouseEnter: handleMouseEnter,
|
|
569
575
|
onMouseLeave: handleMouseLeave,
|
|
576
|
+
onPointerDown: handlePointerDown,
|
|
570
577
|
onClick: handleClick,
|
|
571
578
|
children: /* @__PURE__ */ jsx(
|
|
572
579
|
"div",
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
buildEditorUrl,
|
|
8
8
|
useUILintContext,
|
|
9
9
|
useUILintStore
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TLHXCIXS.js";
|
|
11
11
|
|
|
12
12
|
// src/components/ui-lint/InspectionPanel.tsx
|
|
13
13
|
import React, {
|
|
@@ -362,6 +362,9 @@ function InspectionPanel() {
|
|
|
362
362
|
ref: popoverRef,
|
|
363
363
|
"data-ui-lint": true,
|
|
364
364
|
onMouseDown: handleUILintInteraction,
|
|
365
|
+
onPointerDown: handleUILintInteraction,
|
|
366
|
+
onPointerUp: handleUILintInteraction,
|
|
367
|
+
onTouchStart: handleUILintInteraction,
|
|
365
368
|
onClick: handleUILintInteraction,
|
|
366
369
|
onKeyDown: handleUILintInteraction,
|
|
367
370
|
style: {
|
|
@@ -1063,10 +1063,10 @@ function UILintUI() {
|
|
|
1063
1063
|
const [components, setComponents] = useState(null);
|
|
1064
1064
|
useEffect2(() => {
|
|
1065
1065
|
Promise.all([
|
|
1066
|
-
import("./UILintToolbar-
|
|
1067
|
-
import("./InspectionPanel-
|
|
1068
|
-
import("./LocatorOverlay-
|
|
1069
|
-
import("./ElementBadges-
|
|
1066
|
+
import("./UILintToolbar-TXSF3YZF.js"),
|
|
1067
|
+
import("./InspectionPanel-OCCB5KUE.js"),
|
|
1068
|
+
import("./LocatorOverlay-VACYO52F.js"),
|
|
1069
|
+
import("./ElementBadges-ISBIBC3T.js")
|
|
1070
1070
|
]).then(([toolbar, panel, locator, badges]) => {
|
|
1071
1071
|
setComponents({
|
|
1072
1072
|
Toolbar: toolbar.UILintToolbar,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
useUILintContext
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TLHXCIXS.js";
|
|
5
5
|
|
|
6
6
|
// src/components/ui-lint/LocatorOverlay.tsx
|
|
7
7
|
import { useState, useEffect, useMemo } from "react";
|
|
@@ -97,6 +97,10 @@ function InfoTooltip({ rect, source, componentName }) {
|
|
|
97
97
|
return /* @__PURE__ */ jsxs(
|
|
98
98
|
"div",
|
|
99
99
|
{
|
|
100
|
+
"data-ui-lint": true,
|
|
101
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
102
|
+
onPointerUp: (e) => e.stopPropagation(),
|
|
103
|
+
onTouchStart: (e) => e.stopPropagation(),
|
|
100
104
|
style: {
|
|
101
105
|
...tooltipStyle,
|
|
102
106
|
display: "flex",
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
groupBySourceFile,
|
|
10
10
|
useUILintContext,
|
|
11
11
|
useUILintStore
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TLHXCIXS.js";
|
|
13
13
|
|
|
14
14
|
// src/components/ui-lint/UILintToolbar.tsx
|
|
15
15
|
import React3, { useState as useState2, useRef as useRef2, useEffect as useEffect3, useCallback as useCallback2 } from "react";
|
|
@@ -1101,6 +1101,9 @@ function ScanPanelStack({ show, onClose }) {
|
|
|
1101
1101
|
ref: containerRef,
|
|
1102
1102
|
"data-ui-lint": true,
|
|
1103
1103
|
onMouseDown: handleUILintInteraction,
|
|
1104
|
+
onPointerDown: handleUILintInteraction,
|
|
1105
|
+
onPointerUp: handleUILintInteraction,
|
|
1106
|
+
onTouchStart: handleUILintInteraction,
|
|
1104
1107
|
onClick: handleUILintInteraction,
|
|
1105
1108
|
onKeyDown: handleUILintInteraction,
|
|
1106
1109
|
style: {
|
|
@@ -1672,13 +1675,7 @@ function UILintToolbar() {
|
|
|
1672
1675
|
const totalIssues = elementIssues + fileLevelIssues;
|
|
1673
1676
|
useEffect3(() => {
|
|
1674
1677
|
const checkForNextOverlay = () => {
|
|
1675
|
-
const overlaySelectors = [
|
|
1676
|
-
"nextjs-portal",
|
|
1677
|
-
"[data-nextjs-dialog]",
|
|
1678
|
-
"[data-nextjs-dialog-overlay]",
|
|
1679
|
-
"#__next-build-watcher",
|
|
1680
|
-
"[data-nextjs-toast]"
|
|
1681
|
-
];
|
|
1678
|
+
const overlaySelectors = ["data-next-badge-root"];
|
|
1682
1679
|
const hasOverlay = overlaySelectors.some((selector) => {
|
|
1683
1680
|
const el = document.querySelector(selector);
|
|
1684
1681
|
if (!el) return false;
|
|
@@ -1795,6 +1792,9 @@ function UILintToolbar() {
|
|
|
1795
1792
|
{
|
|
1796
1793
|
"data-ui-lint": true,
|
|
1797
1794
|
onMouseDown: handleUILintInteraction,
|
|
1795
|
+
onPointerDown: handleUILintInteraction,
|
|
1796
|
+
onPointerUp: handleUILintInteraction,
|
|
1797
|
+
onTouchStart: handleUILintInteraction,
|
|
1798
1798
|
onClick: handleUILintInteraction,
|
|
1799
1799
|
onKeyDown: handleUILintInteraction,
|
|
1800
1800
|
style: {
|
|
@@ -1814,6 +1814,12 @@ function UILintToolbar() {
|
|
|
1814
1814
|
ref: toolbarRef,
|
|
1815
1815
|
role: "toolbar",
|
|
1816
1816
|
"aria-label": "UI Lint toolbar",
|
|
1817
|
+
onMouseDown: handleUILintInteraction,
|
|
1818
|
+
onPointerDown: handleUILintInteraction,
|
|
1819
|
+
onPointerUp: handleUILintInteraction,
|
|
1820
|
+
onTouchStart: handleUILintInteraction,
|
|
1821
|
+
onClick: handleUILintInteraction,
|
|
1822
|
+
onKeyDown: handleUILintInteraction,
|
|
1817
1823
|
style: { pointerEvents: "auto" },
|
|
1818
1824
|
children: renderToolbar()
|
|
1819
1825
|
}
|
|
@@ -1823,6 +1829,12 @@ function UILintToolbar() {
|
|
|
1823
1829
|
{
|
|
1824
1830
|
ref: settingsRef,
|
|
1825
1831
|
className: `uilint-popover ${settingsClosing ? "uilint-popover--closing" : ""}`,
|
|
1832
|
+
onMouseDown: handleUILintInteraction,
|
|
1833
|
+
onPointerDown: handleUILintInteraction,
|
|
1834
|
+
onPointerUp: handleUILintInteraction,
|
|
1835
|
+
onTouchStart: handleUILintInteraction,
|
|
1836
|
+
onClick: handleUILintInteraction,
|
|
1837
|
+
onKeyDown: handleUILintInteraction,
|
|
1826
1838
|
style: {
|
|
1827
1839
|
position: "absolute",
|
|
1828
1840
|
bottom: "100%",
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
UILintToolbar
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZNBNHYJX.js";
|
|
5
5
|
import {
|
|
6
6
|
InspectionPanel
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NOYDJR7R.js";
|
|
8
8
|
import {
|
|
9
9
|
clearSourceCache,
|
|
10
10
|
fetchSource,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-S4IWHBOQ.js";
|
|
15
15
|
import {
|
|
16
16
|
LocatorOverlay
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TQTSKK5G.js";
|
|
18
18
|
import {
|
|
19
19
|
DATA_UILINT_ID,
|
|
20
20
|
DEFAULT_SETTINGS,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
scanDOMForSources,
|
|
31
31
|
updateElementRects,
|
|
32
32
|
useUILintContext
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-TLHXCIXS.js";
|
|
34
34
|
|
|
35
35
|
// src/consistency/snapshot.ts
|
|
36
36
|
var DATA_ELEMENTS_ATTR = "data-elements";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uilint-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.50",
|
|
4
4
|
"description": "React component for AI-powered UI consistency checking",
|
|
5
5
|
"author": "Peter Suggate",
|
|
6
6
|
"repository": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"node": ">=20.0.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"uilint-core": "^0.1.
|
|
37
|
+
"uilint-core": "^0.1.50",
|
|
38
38
|
"zustand": "^5.0.5"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|