uilint-react 0.2.30 → 0.2.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uilint-react",
3
- "version": "0.2.30",
3
+ "version": "0.2.32",
4
4
  "description": "React component for AI-powered UI consistency checking",
5
5
  "author": "Peter Suggate",
6
6
  "repository": {
@@ -47,8 +47,8 @@
47
47
  "react-use-measure": "^2.1.7",
48
48
  "tw-animate-css": "^1.4.0",
49
49
  "zustand": "^5.0.10",
50
- "uilint-core": "0.2.30",
51
- "uilint-eslint": "0.2.30"
50
+ "uilint-core": "0.2.32",
51
+ "uilint-eslint": "0.2.32"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": "^19.0.0",
@@ -1,6 +0,0 @@
1
- import { default as React } from 'react';
2
- /**
3
- * Main ElementBadges component
4
- */
5
- export declare function ElementBadges(): React.ReactPortal | null;
6
- //# sourceMappingURL=ElementBadges.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ElementBadges.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/ElementBadges.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAoD,MAAM,OAAO,CAAC;AA6JzE;;GAEG;AACH,wBAAgB,aAAa,6BAyP5B"}
@@ -1,10 +0,0 @@
1
- import { default as React } from 'react';
2
- /**
3
- * Highlight for a hovered vision issue
4
- */
5
- export declare function VisionIssueHighlight(): React.ReactPortal | null;
6
- /**
7
- * Highlight overlay for the inspected element (when sidebar is open)
8
- */
9
- export declare function InspectedElementHighlight(): React.ReactPortal | null;
10
- //# sourceMappingURL=LocatorOverlay.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LocatorOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/LocatorOverlay.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD;;GAEG;AACH,wBAAgB,oBAAoB,6BAqEnC;AAED;;GAEG;AACH,wBAAgB,yBAAyB,6BA8ExC"}
@@ -1,6 +0,0 @@
1
- import { default as React } from 'react';
2
- /**
3
- * Container component for all vision issue badges
4
- */
5
- export declare function VisionIssueBadges(): React.ReactPortal | null;
6
- //# sourceMappingURL=VisionIssueBadge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VisionIssueBadge.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/VisionIssueBadge.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAA+B,MAAM,OAAO,CAAC;AA0JpD;;GAEG;AACH,wBAAgB,iBAAiB,6BAkFhC"}
@@ -1,91 +0,0 @@
1
- import { ScannedElement, ElementIssue } from './types';
2
- /**
3
- * Input badge position (from DOM element positions)
4
- */
5
- export interface BadgePosition {
6
- element: ScannedElement;
7
- issue: ElementIssue;
8
- x: number;
9
- y: number;
10
- rect: DOMRect;
11
- }
12
- /**
13
- * Output badge position with nudged coordinates
14
- */
15
- export interface NudgedBadgePosition extends BadgePosition {
16
- nudgedX: number;
17
- nudgedY: number;
18
- }
19
- /**
20
- * Configuration for the layout algorithm
21
- */
22
- export interface LayoutConfig {
23
- /** How strongly badges push apart (default: 50) */
24
- repulsionForce: number;
25
- /** How strongly badges stay near origin (default: 0.3) */
26
- anchorStrength: number;
27
- /** Minimum gap between badge centers (default: 24) */
28
- minDistance: number;
29
- /** Number of simulation steps (default: 50) */
30
- iterations: number;
31
- /** Velocity decay per step (default: 0.9) */
32
- damping: number;
33
- }
34
- /**
35
- * Builder class for configuring and running badge layout
36
- *
37
- * Example usage:
38
- * ```ts
39
- * const nudged = BadgeLayoutBuilder
40
- * .create(positions)
41
- * .minDistance(24)
42
- * .repulsion(50)
43
- * .anchorStrength(0.3)
44
- * .iterations(50)
45
- * .compute();
46
- * ```
47
- */
48
- export declare class BadgeLayoutBuilder {
49
- private config;
50
- private positions;
51
- private constructor();
52
- /**
53
- * Create a new layout builder with badge positions
54
- */
55
- static create(positions: BadgePosition[]): BadgeLayoutBuilder;
56
- /**
57
- * Set the repulsion force (how strongly badges push apart)
58
- * Higher values = badges spread more aggressively
59
- */
60
- repulsion(force: number): this;
61
- /**
62
- * Set the anchor strength (how strongly badges stay near origin)
63
- * Higher values = badges stay closer to their original positions
64
- */
65
- anchorStrength(strength: number): this;
66
- /**
67
- * Set the minimum distance between badge centers
68
- * Badges closer than this will be pushed apart
69
- */
70
- minDistance(distance: number): this;
71
- /**
72
- * Set the number of simulation iterations
73
- * More iterations = more stable but slower
74
- */
75
- iterations(count: number): this;
76
- /**
77
- * Set the damping factor (velocity decay per step)
78
- * Lower values = system settles faster but may be less stable
79
- */
80
- damping(factor: number): this;
81
- /**
82
- * Run the simulation and return nudged positions
83
- */
84
- compute(): NudgedBadgePosition[];
85
- }
86
- /**
87
- * Find badges that are close to a given position
88
- * Useful for showing dropdowns when hovering near multiple badges
89
- */
90
- export declare function findNearbyBadges(positions: NudgedBadgePosition[], x: number, y: number, threshold: number): NudgedBadgePosition[];
91
- //# sourceMappingURL=badge-layout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"badge-layout.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/badge-layout.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,YAAY,CAAC;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,mDAAmD;IACnD,cAAc,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;CACjB;AA2FD;;;;;;;;;;;;;GAaG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,SAAS,CAAkB;IAEnC,OAAO;IAKP;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,kBAAkB;IAI7D;;;OAGG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK9B;;;OAGG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKtC;;;OAGG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKnC;;;OAGG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK/B;;;OAGG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK7B;;OAEG;IACH,OAAO,IAAI,mBAAmB,EAAE;CAGjC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,mBAAmB,EAAE,EAChC,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,SAAS,EAAE,MAAM,GAChB,mBAAmB,EAAE,CAKvB"}
@@ -1,41 +0,0 @@
1
- export type RectLike = {
2
- top: number;
3
- left: number;
4
- right: number;
5
- bottom: number;
6
- width: number;
7
- height: number;
8
- };
9
- export type Size = {
10
- width: number;
11
- height: number;
12
- };
13
- export type Viewport = {
14
- width: number;
15
- height: number;
16
- };
17
- export type PopoverPosition = {
18
- top: number;
19
- left: number;
20
- placement: "right" | "left" | "bottom" | "top";
21
- };
22
- /**
23
- * Compute a robust popover position anchored to the element's badge area.
24
- *
25
- * Strategy:
26
- * - Treat the badge anchor as (rect.right, rect.top)
27
- * - Evaluate 4 placements (right/left/bottom/top)
28
- * - Clamp each candidate into the viewport (with padding)
29
- * - Pick the candidate with the lowest overflow; tie-break by closeness to badge
30
- *
31
- * Note: The popover is constrained to the browser viewport, NOT to modal boundaries.
32
- * If an element is inside a modal, the popover can extend beyond the modal's edges
33
- * as long as it stays within the viewport.
34
- */
35
- export declare function computeInspectionPanelPosition(params: {
36
- rect: RectLike;
37
- popover: Size;
38
- viewport: Viewport;
39
- padding?: number;
40
- }): PopoverPosition;
41
- //# sourceMappingURL=inspection-panel-positioning.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inspection-panel-positioning.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/inspection-panel-positioning.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AACrD,MAAM,MAAM,QAAQ,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzD,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;CAChD,CAAC;AAsCF;;;;;;;;;;;;GAYG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,EAAE;IACrD,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,IAAI,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,eAAe,CAuFlB"}