@retrivora-ai/rag-engine 1.8.6 → 1.8.8
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/index.css +135 -82
- package/dist/index.js +65 -2
- package/dist/index.mjs +65 -2
- package/package.json +2 -2
- package/src/app/globals.css +191 -84
- package/src/components/ChatWidget.tsx +51 -15
- package/src/index.ts +2 -0
- package/src/tailwind.css +177 -84
package/src/app/globals.css
CHANGED
|
@@ -5,99 +5,206 @@
|
|
|
5
5
|
@theme {
|
|
6
6
|
--animate-shapeshift: shapeshift 5s ease-in-out infinite forwards;
|
|
7
7
|
--animate-gradientMove: gradientMove 3.5s ease-in-out infinite alternate;
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
@keyframes shapeshift {
|
|
10
|
-
0% {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
0% {
|
|
11
|
+
clip-path: var(--circle);
|
|
12
|
+
rotate: 0turn;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
25% {
|
|
16
|
+
clip-path: var(--flower);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
50% {
|
|
20
|
+
clip-path: var(--cylinder);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
75% {
|
|
24
|
+
clip-path: var(--hexagon);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
100% {
|
|
28
|
+
clip-path: var(--circle);
|
|
29
|
+
rotate: 1turn;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
120% {
|
|
33
|
+
clip-path: var(--flower);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
140% {
|
|
37
|
+
clip-path: var(--cylinder);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
160% {
|
|
41
|
+
clip-path: var(--hexagon);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
180% {
|
|
45
|
+
clip-path: var(--circle);
|
|
46
|
+
rotate: 1turn;
|
|
47
|
+
}
|
|
15
48
|
}
|
|
16
49
|
|
|
17
50
|
@keyframes gradientMove {
|
|
18
|
-
0% {
|
|
19
|
-
|
|
51
|
+
0% {
|
|
52
|
+
translate: 0 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
100% {
|
|
56
|
+
translate: -75% -75%;
|
|
57
|
+
}
|
|
20
58
|
}
|
|
21
59
|
}
|
|
22
60
|
|
|
23
61
|
@layer base {
|
|
24
62
|
:root {
|
|
25
|
-
--star: shape(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
63
|
+
--star: shape(evenodd from 50% 24.787%,
|
|
64
|
+
curve by 7.143% 18.016% with 0% 0% / 2.9725% 13.814%,
|
|
65
|
+
curve by 17.882% 7.197% with 4.171% 4.2025% / 17.882% 7.197%,
|
|
66
|
+
curve by -17.882% 8.6765% with 0% 0% / -13.711% 4.474%,
|
|
67
|
+
curve by -7.143% 16.5365% with -4.1705% 4.202% / -7.143% 16.5365%,
|
|
68
|
+
curve by -8.6115% -16.5365% with 0% 0% / -4.441% -12.3345%,
|
|
69
|
+
curve by -16.4135% -8.6765% with -4.171% -4.2025% / -16.4135% -8.6765%,
|
|
70
|
+
curve by 16.4135% -7.197% with 0% 0% / 12.2425% -2.9945%,
|
|
71
|
+
curve by 8.6115% -18.016% with 4.1705% -4.202% / 8.6115% -18.016%,
|
|
72
|
+
close);
|
|
73
|
+
--flower: shape(evenodd from 17.9665% 82.0335%,
|
|
74
|
+
curve by -12.349% -32.0335% with -13.239% -5.129% / -18.021% -15.402%,
|
|
75
|
+
curve by -0.0275% -22.203% with -3.1825% -9.331% / -3.074% -16.6605%,
|
|
76
|
+
curve by 12.3765% -9.8305% with 2.3835% -4.3365% / 6.565% -7.579%,
|
|
77
|
+
curve by 32.0335% -12.349% with 5.129% -13.239% / 15.402% -18.021%,
|
|
78
|
+
curve by 20.4535% -0.8665% with 8.3805% -2.858% / 15.1465% -3.062%,
|
|
79
|
+
curve by 11.58% 13.2155% with 5.225% 2.161% / 9.0355% 6.6475%,
|
|
80
|
+
curve by 12.349% 32.0335% with 13.239% 5.129% / 18.021% 15.402%,
|
|
81
|
+
curve by 0.5715% 21.1275% with 2.9805% 8.7395% / 3.0745% 15.723%,
|
|
82
|
+
curve by -12.9205% 10.906% with -2.26% 4.88% / -6.638% 8.472%,
|
|
83
|
+
curve by -32.0335% 12.349% with -5.129% 13.239% / -15.402% 18.021%,
|
|
84
|
+
curve by -21.1215% 0.5745% with -8.736% 2.9795% / -15.718% 3.0745%,
|
|
85
|
+
curve by -10.912% -12.9235% with -4.883% -2.2595% / -8.477% -6.6385%,
|
|
86
|
+
close);
|
|
87
|
+
--hexagon: shape(evenodd from 6.47% 67.001%,
|
|
88
|
+
curve by 0% -34.002% with -1.1735% -7.7% / -1.1735% -26.302%,
|
|
89
|
+
curve by 7.0415% -12.1965% with 0.7075% -4.641% / 3.3765% -9.2635%,
|
|
90
|
+
curve by 29.447% -17.001% with 6.0815% -4.8665% / 22.192% -14.1675%,
|
|
91
|
+
curve by 14.083% 0% with 4.3725% -1.708% / 9.7105% -1.708%,
|
|
92
|
+
curve by 29.447% 17.001% with 7.255% 2.8335% / 23.3655% 12.1345%,
|
|
93
|
+
curve by 7.0415% 12.1965% with 3.665% 2.933% / 6.334% 7.5555%,
|
|
94
|
+
curve by 0% 34.002% with 1.1735% 7.7% / 1.1735% 26.302%,
|
|
95
|
+
curve by -7.0415% 12.1965% with -0.7075% 4.641% / -3.3765% 9.2635%,
|
|
96
|
+
curve by -29.447% 17.001% with -6.0815% 4.8665% / -22.192% 14.1675%,
|
|
97
|
+
curve by -14.083% 0% with -4.3725% 1.708% / -9.7105% 1.708%,
|
|
98
|
+
curve by -29.447% -17.001% with -7.255% -2.8335% / -23.3655% -12.1345%,
|
|
99
|
+
curve by -7.0415% -12.1965% with -3.665% -2.933% / -6.334% -7.5555%,
|
|
100
|
+
close);
|
|
101
|
+
--cylinder: shape(evenodd from 10.5845% 59.7305%,
|
|
102
|
+
curve by 0% -19.461% with -0.113% -1.7525% / -0.11% -18.14%,
|
|
103
|
+
curve by 10.098% -26.213% with 0.837% -10.0375% / 3.821% -19.2625%,
|
|
104
|
+
curve by 29.3175% -13.0215% with 7.2175% -7.992% / 17.682% -13.0215%,
|
|
105
|
+
curve by 19.5845% 5.185% with 7.1265% 0% / 13.8135% 1.887%,
|
|
106
|
+
curve by 9.8595% 7.9775% with 3.7065% 2.1185% / 7.035% 4.8195%,
|
|
107
|
+
curve by 9.9715% 26.072% with 6.2015% 6.933% / 9.4345% 16.082%,
|
|
108
|
+
curve by 0% 19.461% with 0.074% 1.384% / 0.0745% 17.7715%,
|
|
109
|
+
curve by -13.0065% 29.1155% with -0.511% 11.5345% / -5.021% 21.933%,
|
|
110
|
+
curve by -26.409% 10.119% with -6.991% 6.288% / -16.254% 10.119%,
|
|
111
|
+
curve by -20.945% -5.9995% with -7.6935% 0% / -14.8755% -2.199%,
|
|
112
|
+
curve by -8.713% -7.404% with -3.255% -2.0385% / -6.1905% -4.537%,
|
|
113
|
+
curve by -9.7575% -25.831% with -6.074% -6.9035% / -9.1205% -15.963%,
|
|
114
|
+
close);
|
|
115
|
+
--circle: shape(evenodd from 13.482% 79.505%,
|
|
116
|
+
curve by -7.1945% -12.47% with -1.4985% -1.8575% / -6.328% -10.225%,
|
|
117
|
+
curve by 0.0985% -33.8965% with -4.1645% -10.7945% / -4.1685% -23.0235%,
|
|
118
|
+
curve by 6.9955% -12.101% with 1.72% -4.3825% / 4.0845% -8.458%,
|
|
119
|
+
curve by 30.125% -17.119% with 7.339% -9.1825% / 18.4775% -15.5135%,
|
|
120
|
+
curve by 13.4165% 0.095% with 4.432% -0.6105% / 8.9505% -0.5855%,
|
|
121
|
+
curve by 29.364% 16.9% with 11.6215% 1.77% / 22.102% 7.9015%,
|
|
122
|
+
curve by 7.176% 12.4145% with 3.002% 3.7195% / 5.453% 7.968%,
|
|
123
|
+
curve by -0.0475% 33.8925% with 4.168% 10.756% / 4.2305% 22.942%,
|
|
124
|
+
curve by -7.1135% 12.2825% with -1.74% 4.4535% / -4.1455% 8.592%,
|
|
125
|
+
curve by -29.404% 16.9075% with -7.202% 8.954% / -18.019% 15.137%,
|
|
126
|
+
curve by -14.19% -0.018% with -4.6635% 0.7255% / -9.4575% 0.7205%,
|
|
127
|
+
curve by -29.226% -16.8875% with -11.573% -1.8065% / -21.9955% -7.9235%,
|
|
128
|
+
close);
|
|
129
|
+
--circle: shape(evenodd from 13.482% 79.505%,
|
|
130
|
+
curve by -7.1945% -12.47% with -1.4985% -1.8575% / -6.328% -10.225%,
|
|
131
|
+
curve by 0.0985% -33.8965% with -4.1645% -10.7945% / -4.1685% -23.0235%,
|
|
132
|
+
curve by 6.9955% -12.101% with 1.72% -4.3825% / 4.0845% -8.458%,
|
|
133
|
+
curve by 30.125% -17.119% with 7.339% -9.1825% / 18.4775% -15.5135%,
|
|
134
|
+
curve by 13.4165% 0.095% with 4.432% -0.6105% / 8.9505% -0.5855%,
|
|
135
|
+
curve by 29.364% 16.9% with 11.6215% 1.77% / 22.102% 7.9015%,
|
|
136
|
+
curve by 7.176% 12.4145% with 3.002% 3.7195% / 5.453% 7.968%,
|
|
137
|
+
curve by -0.0475% 33.8925% with 4.168% 10.756% / 4.2305% 22.942%,
|
|
138
|
+
curve by -7.1135% 12.2825% with -1.74% 4.4535% / -4.1455% 8.592%,
|
|
139
|
+
curve by -29.404% 16.9075% with -7.202% 8.954% / -18.019% 15.137%,
|
|
140
|
+
curve by -14.19% -0.018% with -4.6635% 0.7255% / -9.4575% 0.7205%,
|
|
141
|
+
curve by -29.226% -16.8875% with -11.573% -1.8065% / -21.9955% -7.9235%,
|
|
142
|
+
close);
|
|
143
|
+
--heart: shape(evenodd from 51.311% 83.603%,
|
|
144
|
+
curve by -8.333% -20.508% with -14.104% -4.287% / -16.406% -16.185%,
|
|
145
|
+
curve by -4.271% -37.41% with -5.419% -9.658% / -6.815% -22.733%,
|
|
146
|
+
curve by 13.589% -33.586% with 3.982% -7.448% / 8.411% -15.994%,
|
|
147
|
+
curve by 28.187% -21.985% with 4.029% -4.29% / 4.029% -4.29%,
|
|
148
|
+
curve by 33.835% 0.721% with 9.618% 4.647% / 22.541% 9.618%,
|
|
149
|
+
curve by 37.596% 21.304% with 3.306% 13.266% / 7.589% 24.251%,
|
|
150
|
+
curve by 21.985% 43.613% with -4.208% 3.982% / -15.994% 8.411%,
|
|
151
|
+
curve by 0.721% 37.596% with -7.448% 4.029% / -15.994% 8.411%,
|
|
152
|
+
curve by -16.185% 28.187% with -9.658% 5.419% / -22.733% 6.815%,
|
|
153
|
+
curve by -37.41% 4.271% with -4.29% 4.029% / -4.29% 4.029%,
|
|
154
|
+
curve by -33.586% -13.589% with -7.448% 3.982% / -15.994% 8.411%,
|
|
155
|
+
curve by -28.187% -32.094% with -4.029% 4.029% / -4.029% 4.029%,
|
|
156
|
+
close);
|
|
157
|
+
--spiral: shape(evenodd from 13.347% 30.885%,
|
|
158
|
+
curve by 5.502% 18.447% with 11.052% 5.562% / 19.995% 9.169%,
|
|
159
|
+
curve by -20.309% 16.907% with -7.146% -1.332% / -9.016% -2.812%,
|
|
160
|
+
curve by -25.848% -13.087% with -7.017% -7.46% / -9.941% -15.041%,
|
|
161
|
+
curve by 10.154% -25.731% with 2.473% -6.063% / 7.163% -10.656%,
|
|
162
|
+
curve by 31.473% -7.963% with 8.814% 2.403% / 13.84% 8.748%,
|
|
163
|
+
curve by 16.526% 20.487% with -4.058% 1.502% / -9.51% 3.304%,
|
|
164
|
+
curve by 5.502% 18.447% with 11.052% 5.562% / 19.995% 9.169%,
|
|
165
|
+
close);
|
|
166
|
+
--star2: shape(open from 28.947% 47.744%,
|
|
167
|
+
curve by 24.042% -2.139% with 0% 0% / -24.042% 2.139%,
|
|
168
|
+
curve by 4.208% -25.165% with 4.208% -25.165% / 4.208% -25.165%,
|
|
169
|
+
curve by 2.341% -18.447% with 0% 0% / 1.888% -1.438%,
|
|
170
|
+
curve by 32.355% 1.085% with 0% 0% / 25.984% 1.085%,
|
|
171
|
+
curve by -4.655% 25.165% with 0% 0% / -4.655% 25.165%,
|
|
172
|
+
curve by -4.208% -25.165% with -4.208% -25.165% / -4.208% -25.165%,
|
|
173
|
+
curve by 2.566% -4.208% with 0% 0% / 2.072% -1.639%,
|
|
174
|
+
curve by 30.069% 1.085% with 0% 0% / 24.156% 1.085%,
|
|
175
|
+
curve by -2.791% 25.165% with 0% 0% / -2.791% 25.165%,
|
|
176
|
+
curve by -4.208% -25.165% with -4.208% -25.165% / -4.208% -25.165%,
|
|
177
|
+
curve by 2.116% -4.208% with 0% 0% / 1.659% -1.557%,
|
|
178
|
+
close);
|
|
179
|
+
--sun: shape(evenodd from 12.758% 22.039%,
|
|
180
|
+
curve by 2.2585% 27.561% with 4.517% 18.961% / 2.2585% 27.561%,
|
|
181
|
+
curve by 3.187% -11.541% with 2.2585% -8.483% / 4.7615% -12.541%,
|
|
182
|
+
curve by 31.034% 31.034% with 31.034% 31.034% / 31.034% 31.034%,
|
|
183
|
+
curve by 33.825% -14.163% with 8.961% -7.455% / 13.585% -11.059%,
|
|
184
|
+
curve by 19.814% -34.731% with 4.7615% -12.541% / 2.2585% -27.561%,
|
|
185
|
+
curve by 33.825% -14.163% with 2.2585% -8.483% / 4.517% -18.961%,
|
|
186
|
+
curve by 19.814% -34.731% with 0% 0% / -3.187% 11.541%,
|
|
187
|
+
curve by 33.825% -14.163% with 8.961% -7.455% / 13.585% -11.059%,
|
|
188
|
+
curve by 31.034% 31.034% with 31.034% 31.034% / 31.034% 31.034%,
|
|
189
|
+
curve by 19.814% -34.731% with 4.7615% -12.541% / 2.2585% -27.561%,
|
|
190
|
+
curve by 33.825% -14.163% with 2.2585% -8.483% / 4.517% -18.961%,
|
|
191
|
+
close);
|
|
192
|
+
--star2: shape(open from 28.947% 47.744%,
|
|
193
|
+
curve by 24.042% -2.139% with 0% 0% / -24.042% 2.139%,
|
|
194
|
+
curve by 4.208% -25.165% with 4.208% -25.165% / 4.208% -25.165%,
|
|
195
|
+
curve by 2.341% -18.447% with 0% 0% / 1.888% -1.438%,
|
|
196
|
+
curve by 32.355% 1.085% with 0% 0% / 25.984% 1.085%,
|
|
197
|
+
curve by -4.655% 25.165% with 0% 0% / -4.655% 25.165%,
|
|
198
|
+
curve by -4.208% -25.165% with -4.208% -25.165% / -4.208% -25.165%,
|
|
199
|
+
curve by 2.566% -4.208% with 0% 0% / 2.072% -1.639%,
|
|
200
|
+
curve by 30.069% 1.085% with 0% 0% / 24.156% 1.085%,
|
|
201
|
+
curve by -2.791% 25.165% with 0% 0% / -2.791% 25.165%,
|
|
202
|
+
curve by -4.208% -25.165% with -4.208% -25.165% / -4.208% -25.165%,
|
|
203
|
+
curve by 2.116% -4.208% with 0% 0% / 1.659% -1.557%,
|
|
204
|
+
close);
|
|
205
|
+
--tri-star: shape(open from 25% 25%,
|
|
206
|
+
curve by 25% 25% with 0% 0% / 25% 25%,
|
|
207
|
+
close);
|
|
101
208
|
}
|
|
102
209
|
}
|
|
103
210
|
|
|
@@ -8,6 +8,44 @@ import { ChatWidgetProps } from '../types';
|
|
|
8
8
|
|
|
9
9
|
const DEFAULT_DIMENSIONS = { width: 380, height: 600 };
|
|
10
10
|
|
|
11
|
+
const GEMINI_STYLES = `
|
|
12
|
+
@keyframes shapeshift {
|
|
13
|
+
0% { clip-path: var(--circle); rotate: 0turn; }
|
|
14
|
+
25% { clip-path: var(--flower); }
|
|
15
|
+
50% { clip-path: var(--cylinder); }
|
|
16
|
+
75% { clip-path: var(--hexagon); }
|
|
17
|
+
100% { clip-path: var(--circle); rotate: 1turn; }
|
|
18
|
+
200% { clip-path: var(--flower); rotate: 2turn; }
|
|
19
|
+
|
|
20
|
+
220% {
|
|
21
|
+
clip-path: var(--cylinder);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
240% {
|
|
25
|
+
clip-path: var(--hexagon);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
260% { clip-path: var(--circle); rotate: 1turn; }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes gradientMove {
|
|
32
|
+
0% { translate: 0 0; }
|
|
33
|
+
100% { translate: -75% -75%; }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@keyframes gradientMove {
|
|
37
|
+
0% { translate: 0 0; }
|
|
38
|
+
100% { translate: -75% -75%; }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:root {
|
|
42
|
+
--flower: shape(evenodd from 17.9665% 82.0335%, curve by -12.349% -32.0335% with -13.239% -5.129% / -18.021% -15.402%, curve by -0.0275% -22.203% with -3.1825% -9.331% / -3.074% -16.6605%, curve by 12.3765% -9.8305% with 2.3835% -4.3365% / 6.565% -7.579%, curve by 32.0335% -12.349% with 5.129% -13.239% / 15.402% -18.021%, curve by 20.4535% -0.8665% with 8.3805% -2.858% / 15.1465% -3.062%, curve by 11.58% 13.2155% with 5.225% 2.161% / 9.0355% 6.6475%, curve by 12.349% 32.0335% with 13.239% 5.129% / 18.021% 15.402%, curve by 0.5715% 21.1275% with 2.9805% 8.7395% / 3.0745% 15.723%, curve by -12.9205% 10.906% with -2.26% 4.88% / -6.638% 8.472%, curve by -32.0335% 12.349% with -5.129% 13.239% / -15.402% 18.021%, curve by -21.1215% 0.5745% with -8.736% 2.9795% / -15.718% 3.0745%, curve by -10.912% -12.9235% with -4.883% -2.2595% / -8.477% -6.6385%, close);
|
|
43
|
+
--hexagon: shape(evenodd from 6.47% 67.001%, curve by 0% -34.002% with -1.1735% -7.7% / -1.1735% -26.302%, curve by 7.0415% -12.1965% with 0.7075% -4.641% / 3.3765% -9.2635%, curve by 29.447% -17.001% with 6.0815% -4.8665% / 22.192% -14.1675%, curve by 14.083% 0% with 4.3725% -1.708% / 9.7105% -1.708%, curve by 29.447% 17.001% with 7.255% 2.8335% / 23.3655% 12.1345%, curve by 7.0415% 12.1965% with 3.665% 2.933% / 6.334% 7.5555%, curve by 0% 34.002% with 1.1735% 7.7% / 1.1735% 26.302%, curve by -7.0415% 12.1965% with -0.7075% 4.641% / -3.3765% 9.2635%, curve by -29.447% 17.001% with -6.0815% 4.8665% / -22.192% 14.1675%, curve by -14.083% 0% with -4.3725% 1.708% / -9.7105% 1.708%, curve by -29.447% -17.001% with -7.255% -2.8335% / -23.3655% -12.1345%, curve by -7.0415% -12.1965% with -3.665% -2.933% / -6.334% -7.5555%, close);
|
|
44
|
+
--cylinder: shape(evenodd from 10.5845% 59.7305%, curve by 0% -19.461% with -0.113% -1.7525% / -0.11% -18.14%, curve by 10.098% -26.213% with 0.837% -10.0375% / 3.821% -19.2625%, curve by 29.3175% -13.0215% with 7.2175% -7.992% / 17.682% -13.0215%, curve by 19.5845% 5.185% with 7.1265% 0% / 13.8135% 1.887%, curve by 9.8595% 7.9775% with 3.7065% 2.1185% / 7.035% 4.8195%, curve by 9.9715% 26.072% with 6.2015% 6.933% / 9.4345% 16.082%, curve by 0% 19.461% with 0.074% 1.384% / 0.0745% 17.7715%, curve by -13.0065% 29.1155% with -0.511% 11.5345% / -5.021% 21.933%, curve by -26.409% 10.119% with -6.991% 6.288% / -16.254% 10.119%, curve by -20.945% -5.9995% with -7.6935% 0% / -14.8755% -2.199%, curve by -8.713% -7.404% with -3.255% -2.0385% / -6.1905% -4.537%, curve by -9.7575% -25.831% with -6.074% -6.9035% / -9.1205% -15.963%, close);
|
|
45
|
+
--circle: shape(evenodd from 13.482% 79.505%, curve by -7.1945% -12.47% with -1.4985% -1.8575% / -6.328% -10.225%, curve by 0.0985% -33.8965% with -4.1645% -10.7945% / -4.1685% -23.0235%, curve by 6.9955% -12.101% with 1.72% -4.3825% / 4.0845% -8.458%, curve by 30.125% -17.119% with 7.339% -9.1825% / 18.4775% -15.5135%, curve by 13.4165% 0.095% with 4.432% -0.6105% / 8.9505% -0.5855%, curve by 29.364% 16.9% with 11.6215% 1.77% / 22.102% 7.9015%, curve by 7.176% 12.4145% with 3.002% 3.7195% / 5.453% 7.968%, curve by -0.0475% 33.8925% with 4.168% 10.756% / 4.2305% 22.942%, curve by -7.1135% 12.2825% with -1.74% 4.4535% / -4.1455% 8.592%, curve by -29.404% 16.9075% with -7.202% 8.954% / -18.019% 15.137%, curve by -14.19% -0.018% with -4.6635% 0.7255% / -9.4575% 0.7205%, curve by -29.226% -16.8875% with -11.573% -1.8065% / -21.9955% -7.9235%, close);
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
|
|
11
49
|
export function ChatWidget({ position = 'bottom-right', onAddToCart }: ChatWidgetProps) {
|
|
12
50
|
const { ui } = useConfig();
|
|
13
51
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -85,16 +123,17 @@ export function ChatWidget({ position = 'bottom-right', onAddToCart }: ChatWidge
|
|
|
85
123
|
|
|
86
124
|
return (
|
|
87
125
|
<>
|
|
126
|
+
<style dangerouslySetInnerHTML={{ __html: GEMINI_STYLES }} />
|
|
88
127
|
{/* ── Chat Window (slides up) ── */}
|
|
89
128
|
<div
|
|
90
129
|
className={`fixed z-[9998] max-w-[calc(100vw-3rem)] ease-in-out ${windowPositionClass} ${isOpen
|
|
91
|
-
|
|
92
|
-
|
|
130
|
+
? 'opacity-100 translate-y-0 pointer-events-auto'
|
|
131
|
+
: 'opacity-0 translate-y-4 pointer-events-none'
|
|
93
132
|
} ${isResizing ? '' : 'transition-all duration-300'}`}
|
|
94
|
-
style={{
|
|
95
|
-
width: `${dimensions.width}px`,
|
|
96
|
-
height: `${dimensions.height}px`,
|
|
97
|
-
maxHeight: 'calc(100vh - 6rem)'
|
|
133
|
+
style={{
|
|
134
|
+
width: `${dimensions.width}px`,
|
|
135
|
+
height: `${dimensions.height}px`,
|
|
136
|
+
maxHeight: 'calc(100vh - 6rem)'
|
|
98
137
|
}}
|
|
99
138
|
>
|
|
100
139
|
<ChatWindow
|
|
@@ -110,9 +149,8 @@ export function ChatWidget({ position = 'bottom-right', onAddToCart }: ChatWidge
|
|
|
110
149
|
/>
|
|
111
150
|
{/* Pointer (Tail) */}
|
|
112
151
|
<div
|
|
113
|
-
className={`absolute -bottom-1.5 w-4 h-4 rotate-45 border-r border-b border-slate-200 dark:border-white/10 z-0 ${
|
|
114
|
-
|
|
115
|
-
} ${position === 'bottom-left' ? 'left-5' : 'right-5'}`}
|
|
152
|
+
className={`absolute -bottom-1.5 w-4 h-4 rotate-45 border-r border-b border-slate-200 dark:border-white/10 z-0 ${ui.visualStyle === 'solid' ? 'bg-white dark:bg-[#0f0f1a]' : 'bg-white/90 dark:bg-[#0f0f1a]/90 backdrop-blur-xl'
|
|
153
|
+
} ${position === 'bottom-left' ? 'left-5' : 'right-5'}`}
|
|
116
154
|
/>
|
|
117
155
|
</div>
|
|
118
156
|
|
|
@@ -123,13 +161,11 @@ export function ChatWidget({ position = 'bottom-right', onAddToCart }: ChatWidge
|
|
|
123
161
|
aria-label="Open chat"
|
|
124
162
|
>
|
|
125
163
|
{/* Animated Background */}
|
|
126
|
-
<div
|
|
127
|
-
className=
|
|
128
|
-
ui.borderRadius === 'full' ? 'rounded-full' : 'rounded-2xl'
|
|
129
|
-
} group-hover:rounded-none group-hover:animate-shapeshift`}
|
|
164
|
+
<div
|
|
165
|
+
className="absolute inset-0 transition-all duration-300 overflow-hidden rounded-full group-hover:rounded-none group-hover:animate-[shapeshift_5s_ease-in-out_infinite_forwards]"
|
|
130
166
|
>
|
|
131
|
-
<div
|
|
132
|
-
className="absolute top-0 left-0 w-[400%] h-[400%] transition-transform duration-300 group-hover:animate-
|
|
167
|
+
<div
|
|
168
|
+
className="absolute top-0 left-0 w-[400%] h-[400%] transition-transform duration-300 group-hover:animate-[gradientMove_3.5s_ease-in-out_infinite_alternate]"
|
|
133
169
|
style={{
|
|
134
170
|
background: `linear-gradient(135deg, ${ui.primaryColor}, ${ui.accentColor}, ${ui.primaryColor}, ${ui.accentColor})`
|
|
135
171
|
}}
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* This entry point is CLIENT-SAFE and can be imported in React Client Components.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import './compiled.css';
|
|
7
|
+
|
|
6
8
|
// ── React Components ─────────────────────────────────────────
|
|
7
9
|
export { ChatWidget } from './components/ChatWidget';
|
|
8
10
|
export { ChatWindow } from './components/ChatWindow';
|