goji-search 1.0.1 → 1.1.2

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.
@@ -4,7 +4,7 @@ export function SuggestedQuestions({ questions, onQuestionClick }) {
4
4
  display: "flex",
5
5
  flexDirection: "column",
6
6
  gap: "0.5rem",
7
- padding: "0.625rem",
7
+ padding: "0 0.625rem",
8
8
  borderRadius: "0.75rem",
9
9
  backgroundColor: "rgba(255, 255, 255, 0.08)",
10
10
  border: "1px solid rgba(255, 255, 255, 0.15)",
@@ -20,35 +20,38 @@ export function SuggestedQuestions({ questions, onQuestionClick }) {
20
20
  display: "flex",
21
21
  flexWrap: "wrap",
22
22
  gap: "0.375rem",
23
- }, children: questions.map((question, index) => (_jsx("button", { type: "button", onClick: () => onQuestionClick(question), style: {
24
- padding: "0.5rem 0.75rem",
25
- borderRadius: "1.3rem",
26
- border: "1px solid rgba(255, 255, 255, 0.25)",
27
- backgroundColor: "rgba(255, 255, 255, 0.2)",
28
- color: "rgba(0, 0, 0, 0.75)",
29
- fontSize: "0.75rem",
30
- textAlign: "left",
31
- cursor: "pointer",
32
- transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
33
- backdropFilter: "blur(20px) saturate(180%)",
34
- WebkitBackdropFilter: "blur(20px) saturate(180%)",
35
- boxShadow: "0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.3)",
36
- outline: "none",
37
- lineHeight: "1.3",
38
- }, onMouseEnter: (e) => {
39
- e.currentTarget.style.backgroundColor = "rgba(0, 122, 255, 0.15)";
40
- e.currentTarget.style.borderColor = "rgba(0, 122, 255, 0.3)";
41
- e.currentTarget.style.transform = "translateY(-1px)";
42
- e.currentTarget.style.boxShadow =
43
- "0 3px 8px rgba(0, 122, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.4)";
44
- }, onMouseLeave: (e) => {
45
- e.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.2)";
46
- e.currentTarget.style.borderColor = "rgba(255, 255, 255, 0.25)";
47
- e.currentTarget.style.transform = "translateY(0)";
48
- e.currentTarget.style.boxShadow = "0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.3)";
49
- }, onFocus: (e) => {
50
- e.currentTarget.style.boxShadow = "0 0 0 2px rgba(0, 122, 255, 0.3)";
51
- }, onBlur: (e) => {
52
- e.currentTarget.style.boxShadow = "0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.3)";
53
- }, children: question }, index))) })] }));
23
+ }, children: questions.map((question, index) => {
24
+ const truncatedQuestion = question.length > 80 ? question.slice(0, 80) + '...' : question;
25
+ return (_jsx("button", { type: "button", onClick: () => onQuestionClick(question), title: question.length > 80 ? question : undefined, style: {
26
+ padding: "0.5rem 0.75rem",
27
+ borderRadius: "1.3rem",
28
+ border: "1px solid rgba(255, 255, 255, 0.25)",
29
+ backgroundColor: "rgba(255, 255, 255, 0.2)",
30
+ color: "rgba(0, 0, 0, 0.75)",
31
+ fontSize: "0.75rem",
32
+ textAlign: "left",
33
+ cursor: "pointer",
34
+ transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
35
+ backdropFilter: "blur(20px) saturate(180%)",
36
+ WebkitBackdropFilter: "blur(20px) saturate(180%)",
37
+ boxShadow: "0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.3)",
38
+ outline: "none",
39
+ lineHeight: "1.3",
40
+ }, onMouseEnter: (e) => {
41
+ e.currentTarget.style.backgroundColor = "rgba(140, 110, 230, 0.15)";
42
+ e.currentTarget.style.borderColor = "rgba(140, 110, 230, 0.3)";
43
+ e.currentTarget.style.transform = "translateY(-1px)";
44
+ e.currentTarget.style.boxShadow =
45
+ "0 3px 8px rgba(140, 110, 230, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.4)";
46
+ }, onMouseLeave: (e) => {
47
+ e.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.2)";
48
+ e.currentTarget.style.borderColor = "rgba(255, 255, 255, 0.25)";
49
+ e.currentTarget.style.transform = "translateY(0)";
50
+ e.currentTarget.style.boxShadow = "0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.3)";
51
+ }, onFocus: (e) => {
52
+ e.currentTarget.style.boxShadow = "0 0 0 2px rgba(140, 110, 230, 0.3)";
53
+ }, onBlur: (e) => {
54
+ e.currentTarget.style.boxShadow = "0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.3)";
55
+ }, children: truncatedQuestion }, index));
56
+ }) })] }));
54
57
  }
@@ -1,2 +1,10 @@
1
1
  import "./goji-search.css";
2
- export declare function GojiSearchComponent(): import("react/jsx-runtime").JSX.Element;
2
+ export interface GojiSearchComponentProps {
3
+ /**
4
+ * Backend API URL for GojiSearch
5
+ * @default "http://localhost:8000"
6
+ * @example "https://api.example.com"
7
+ */
8
+ apiUrl?: string;
9
+ }
10
+ export declare function GojiSearchComponent({ apiUrl }?: GojiSearchComponentProps): import("react/jsx-runtime").JSX.Element;