ghonchu_rag 1.0.1 → 1.0.3

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/README.md CHANGED
@@ -8,6 +8,15 @@ A themeable chatbot widget for frontend integration.
8
8
  npm install ghonchu_rag
9
9
  ```
10
10
 
11
+
12
+ ## Styling
13
+
14
+ **Important:** You must import the CSS file for the widget to appear correctly.
15
+
16
+ ```javascript
17
+ import 'ghonchu_rag/dist/styles.css';
18
+ ```
19
+
11
20
  ## Usage
12
21
 
13
22
  ### React
@@ -0,0 +1,201 @@
1
+ /* =====================================================
2
+ HARD ISOLATION — VERY IMPORTANT
3
+ ===================================================== */
4
+
5
+ #ghonchu-widget-root {
6
+ all: initial;
7
+ position: fixed;
8
+ bottom: 20px;
9
+ right: 20px;
10
+ z-index: 2147483647;
11
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
12
+ }
13
+
14
+ #ghonchu-widget-root * {
15
+ box-sizing: border-box;
16
+ }
17
+
18
+ /* =====================================================
19
+ VARIABLES (scoped)
20
+ ===================================================== */
21
+
22
+ #ghonchu-widget-root {
23
+ --ghonchu-bg-start: rgb(20, 15, 10);
24
+ --ghonchu-bg-end: rgb(40, 25, 15);
25
+ --ghonchu-amber-950: #451a03;
26
+ --ghonchu-orange-900: #7c2d12;
27
+ --ghonchu-yellow-900: #713f12;
28
+ --ghonchu-amber-400: #fbbf24;
29
+ --ghonchu-amber-300: #fcd34d;
30
+ --ghonchu-amber-200: #fde68a;
31
+ --ghonchu-amber-600: #d97706;
32
+ --ghonchu-orange-600: #ea580c;
33
+ --ghonchu-glass: rgba(254, 243, 199, 0.1);
34
+ --ghonchu-glass-border: rgba(254, 243, 199, 0.2);
35
+ --ghonchu-glow: var(--ghonchu-amber-400);
36
+ }
37
+
38
+ /* =====================================================
39
+ LAUNCHER
40
+ ===================================================== */
41
+
42
+ .ghonchu-launcher {
43
+ width: 60px;
44
+ height: 60px;
45
+ border-radius: 50%;
46
+ background: linear-gradient(to right, var(--ghonchu-amber-600), var(--ghonchu-orange-600));
47
+ display: flex;
48
+ align-items: center;
49
+ justify-content: center;
50
+ cursor: pointer;
51
+ animation: pulseGlow 2s infinite alternate;
52
+ }
53
+
54
+ @keyframes pulseGlow {
55
+ from {
56
+ box-shadow: 0 0 10px var(--ghonchu-glow);
57
+ }
58
+
59
+ to {
60
+ box-shadow: 0 0 30px var(--ghonchu-glow);
61
+ }
62
+ }
63
+
64
+ /* =====================================================
65
+ CHAT WINDOW
66
+ ===================================================== */
67
+
68
+ .ghonchu-chat-window {
69
+ position: absolute;
70
+ bottom: 80px;
71
+ right: 0;
72
+ width: 380px;
73
+ height: 550px;
74
+ max-height: 85vh;
75
+ background: linear-gradient(135deg, var(--ghonchu-amber-950), var(--ghonchu-orange-900), var(--ghonchu-yellow-900));
76
+ border-radius: 20px;
77
+ display: flex;
78
+ flex-direction: column;
79
+ overflow: hidden;
80
+ border: 1px solid var(--ghonchu-glass-border);
81
+ transform-origin: bottom right;
82
+ animation: openChat .25s ease;
83
+ }
84
+
85
+ .ghonchu-chat-window.closing {
86
+ animation: closeChat .2s ease forwards;
87
+ }
88
+
89
+ @keyframes openChat {
90
+ from {
91
+ opacity: 0;
92
+ transform: scale(.8) translateY(20px);
93
+ }
94
+ }
95
+
96
+ @keyframes closeChat {
97
+ to {
98
+ opacity: 0;
99
+ transform: scale(.8) translateY(20px);
100
+ }
101
+ }
102
+
103
+ /* =====================================================
104
+ HEADER
105
+ ===================================================== */
106
+
107
+ .ghonchu-header {
108
+ padding: 16px;
109
+ background: var(--ghonchu-glass);
110
+ backdrop-filter: blur(12px);
111
+ }
112
+
113
+ .ghonchu-title {
114
+ font-weight: 700;
115
+ background: linear-gradient(to right, var(--ghonchu-amber-400), var(--ghonchu-orange-600));
116
+ -webkit-background-clip: text;
117
+ -webkit-text-fill-color: transparent;
118
+ }
119
+
120
+ .ghonchu-status {
121
+ font-size: .9em;
122
+ color: var(--ghonchu-amber-200);
123
+ }
124
+
125
+ /* =====================================================
126
+ MESSAGES
127
+ ===================================================== */
128
+
129
+ .ghonchu-messages {
130
+ flex: 1;
131
+ padding: 16px;
132
+ overflow-y: auto;
133
+ display: flex;
134
+ flex-direction: column;
135
+ gap: 12px;
136
+ }
137
+
138
+ .msg-user,
139
+ .msg-bot {
140
+ max-width: 75%;
141
+ border-radius: 16px;
142
+ padding: 12px 16px;
143
+ color: white;
144
+ }
145
+
146
+ .msg-bot {
147
+ background: var(--ghonchu-glass);
148
+ border: 1px solid var(--ghonchu-glass-border);
149
+ }
150
+
151
+ .msg-user {
152
+ align-self: flex-end;
153
+ background: linear-gradient(to right, rgba(217, 119, 6, .2), rgba(234, 88, 12, .2));
154
+ border: 1px solid rgba(251, 191, 36, .3);
155
+ }
156
+
157
+ /* =====================================================
158
+ INPUT
159
+ ===================================================== */
160
+
161
+ .ghonchu-input-area {
162
+ padding: 12px;
163
+ display: flex;
164
+ gap: 10px;
165
+ background: var(--ghonchu-glass);
166
+ }
167
+
168
+ .ghonchu-input-area input {
169
+ flex: 1;
170
+ background: rgba(255, 255, 255, .08);
171
+ border-radius: 12px;
172
+ border: 1px solid var(--ghonchu-glass-border);
173
+ color: white;
174
+ padding: 10px;
175
+ outline: none;
176
+ }
177
+
178
+ .ghonchu-send {
179
+ width: 52px;
180
+ border-radius: 12px;
181
+ background: linear-gradient(to right, var(--ghonchu-amber-600), var(--ghonchu-orange-600));
182
+ border: none;
183
+ cursor: pointer;
184
+ color: white;
185
+ }
186
+
187
+ /* =====================================================
188
+ MOBILE
189
+ ===================================================== */
190
+
191
+ @media (max-width:600px) {
192
+ .ghonchu-chat-window {
193
+ width: 100vw;
194
+ height: 100vh;
195
+ border-radius: 0;
196
+ }
197
+
198
+ #ghonchu-widget-root {
199
+ inset: 0;
200
+ }
201
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ghonchu_rag",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "description": "A themeable chatbot widget for frontend integration.",
6
6
  "main": "dist/index.js",
@@ -9,7 +9,7 @@
9
9
  "dist"
10
10
  ],
11
11
  "scripts": {
12
- "build": "tsc",
12
+ "build": "tsc && copy src\\styles.css dist\\styles.css",
13
13
  "test": "echo \"Error: no test specified\" && exit 1"
14
14
  },
15
15
  "keywords": [