uilint-react 0.1.43 → 0.1.45

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.
@@ -0,0 +1,81 @@
1
+ "use client";
2
+
3
+ // src/components/ui-lint/Badge.tsx
4
+ import { jsx } from "react/jsx-runtime";
5
+ var BADGE_COLORS = {
6
+ success: "#68d391",
7
+ // Soft green
8
+ warning: "#f6ad55",
9
+ // Warm orange
10
+ error: "#ef4444"
11
+ // Red (for future use)
12
+ };
13
+ var FONT_MONO = `"SF Mono", Monaco, "Cascadia Code", monospace`;
14
+ function getBadgeTextColor(issueCount) {
15
+ if (issueCount === 0) return BADGE_COLORS.success;
16
+ return BADGE_COLORS.warning;
17
+ }
18
+ function getBadgeBackgroundColor(issueCount) {
19
+ const color = getBadgeTextColor(issueCount);
20
+ return `${color}20`;
21
+ }
22
+ var BADGE_STYLES = {
23
+ default: {
24
+ minWidth: "20px",
25
+ height: "20px",
26
+ padding: "0 6px",
27
+ borderRadius: "10px",
28
+ fontSize: "11px",
29
+ fontWeight: 600,
30
+ letterSpacing: "-0.02em"
31
+ },
32
+ small: {
33
+ minWidth: "18px",
34
+ height: "18px",
35
+ padding: "0 5px",
36
+ borderRadius: "9px",
37
+ fontSize: "10px",
38
+ fontWeight: 700,
39
+ letterSpacing: "0"
40
+ },
41
+ // For file row badges (slightly larger than small)
42
+ medium: {
43
+ minWidth: "22px",
44
+ height: "18px",
45
+ padding: "0 6px",
46
+ borderRadius: "9px",
47
+ fontSize: "10px",
48
+ fontWeight: 700,
49
+ letterSpacing: "0"
50
+ }
51
+ };
52
+ function Badge({
53
+ count,
54
+ size = "default",
55
+ backgroundColor,
56
+ color
57
+ }) {
58
+ const sizeStyles = BADGE_STYLES[size];
59
+ const bgColor = backgroundColor ?? getBadgeBackgroundColor(count);
60
+ const textColor = color ?? getBadgeTextColor(count);
61
+ return /* @__PURE__ */ jsx(
62
+ "span",
63
+ {
64
+ style: {
65
+ display: "inline-flex",
66
+ alignItems: "center",
67
+ justifyContent: "center",
68
+ ...sizeStyles,
69
+ backgroundColor: bgColor,
70
+ color: textColor,
71
+ fontFamily: FONT_MONO
72
+ },
73
+ children: count
74
+ }
75
+ );
76
+ }
77
+
78
+ export {
79
+ BADGE_COLORS,
80
+ Badge
81
+ };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  useUILintContext
4
- } from "./chunk-LAL3JTAA.js";
4
+ } from "./chunk-BJD2V2LF.js";
5
5
 
6
6
  // src/components/ui-lint/LocatorOverlay.tsx
7
7
  import { useState, useEffect, useMemo } from "react";