chatgsd 0.3.0 → 0.7.0
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 +0 -126
- package/dist/index.cjs +78 -118
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -27
- package/dist/index.d.ts +6 -27
- package/dist/index.js +80 -120
- package/dist/index.js.map +1 -1
- package/dist/styles.css +30 -44
- package/package.json +4 -2
package/dist/styles.css
CHANGED
|
@@ -23,11 +23,9 @@
|
|
|
23
23
|
"Liberation Mono", monospace;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
/* Dark mode
|
|
27
|
-
/* To disable: add .chatgsd-light-only class to any parent element */
|
|
28
|
-
/* To force dark: set variables on .chatgsd or a parent element */
|
|
26
|
+
/* Dark mode */
|
|
29
27
|
@media (prefers-color-scheme: dark) {
|
|
30
|
-
:root
|
|
28
|
+
:root {
|
|
31
29
|
--chatgsd-bg: #0a0a0a;
|
|
32
30
|
--chatgsd-border: #333333;
|
|
33
31
|
--chatgsd-green: #27ca40;
|
|
@@ -40,19 +38,6 @@
|
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
/* Explicit dark theme class - use when you control theme manually */
|
|
44
|
-
.chatgsd-dark {
|
|
45
|
-
--chatgsd-bg: #0a0a0a;
|
|
46
|
-
--chatgsd-border: #333333;
|
|
47
|
-
--chatgsd-green: #27ca40;
|
|
48
|
-
--chatgsd-green-muted: rgba(39, 202, 64, 0.1);
|
|
49
|
-
--chatgsd-green-border: rgba(39, 202, 64, 0.3);
|
|
50
|
-
--chatgsd-yellow: #ffbd2e;
|
|
51
|
-
--chatgsd-red: #ff5f56;
|
|
52
|
-
--chatgsd-text: #e0e0e0;
|
|
53
|
-
--chatgsd-muted: #666666;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
41
|
/* Main container */
|
|
57
42
|
.chatgsd {
|
|
58
43
|
font-family: var(--chatgsd-font);
|
|
@@ -66,6 +51,7 @@
|
|
|
66
51
|
.chatgsd-messages {
|
|
67
52
|
height: 16rem;
|
|
68
53
|
overflow-y: auto;
|
|
54
|
+
overscroll-behavior: contain;
|
|
69
55
|
padding: var(--chatgsd-spacing-md);
|
|
70
56
|
display: flex;
|
|
71
57
|
flex-direction: column;
|
|
@@ -200,35 +186,48 @@
|
|
|
200
186
|
opacity: 0.8;
|
|
201
187
|
}
|
|
202
188
|
|
|
189
|
+
.chatgsd-input-wrapper {
|
|
190
|
+
cursor: text;
|
|
191
|
+
}
|
|
192
|
+
|
|
203
193
|
.chatgsd-input-line {
|
|
204
194
|
display: flex;
|
|
205
195
|
align-items: flex-start;
|
|
206
196
|
gap: var(--chatgsd-spacing-sm);
|
|
197
|
+
min-height: 1.5em;
|
|
207
198
|
}
|
|
208
199
|
|
|
209
|
-
.chatgsd-input
|
|
200
|
+
.chatgsd-input {
|
|
210
201
|
flex: 1;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
202
|
+
background: transparent;
|
|
203
|
+
border: none;
|
|
204
|
+
outline: none;
|
|
205
|
+
box-shadow: none;
|
|
214
206
|
color: var(--chatgsd-text);
|
|
207
|
+
font-family: var(--chatgsd-font);
|
|
215
208
|
font-size: 0.875rem;
|
|
209
|
+
line-height: 1.6;
|
|
210
|
+
min-height: 1.5em;
|
|
211
|
+
max-height: 10em;
|
|
212
|
+
overflow-y: auto;
|
|
213
|
+
padding: 0;
|
|
214
|
+
margin: 0;
|
|
215
|
+
cursor: text;
|
|
216
216
|
white-space: pre-wrap;
|
|
217
217
|
word-break: break-word;
|
|
218
|
+
-webkit-appearance: none;
|
|
219
|
+
-webkit-user-modify: read-write-plaintext-only;
|
|
218
220
|
}
|
|
219
221
|
|
|
220
|
-
.chatgsd-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
transition: opacity 0.1s;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.chatgsd-cursor-visible {
|
|
227
|
-
opacity: 1;
|
|
222
|
+
.chatgsd-input:focus {
|
|
223
|
+
outline: none;
|
|
224
|
+
box-shadow: none;
|
|
228
225
|
}
|
|
229
226
|
|
|
230
|
-
.chatgsd-
|
|
231
|
-
|
|
227
|
+
.chatgsd-input-empty:empty::before {
|
|
228
|
+
content: attr(data-placeholder);
|
|
229
|
+
color: var(--chatgsd-muted);
|
|
230
|
+
pointer-events: none;
|
|
232
231
|
}
|
|
233
232
|
|
|
234
233
|
.chatgsd-input-hint {
|
|
@@ -236,16 +235,3 @@
|
|
|
236
235
|
color: var(--chatgsd-muted);
|
|
237
236
|
margin-top: var(--chatgsd-spacing-sm);
|
|
238
237
|
}
|
|
239
|
-
|
|
240
|
-
/* Screen reader only */
|
|
241
|
-
.chatgsd-sr-only {
|
|
242
|
-
position: absolute;
|
|
243
|
-
width: 1px;
|
|
244
|
-
height: 1px;
|
|
245
|
-
padding: 0;
|
|
246
|
-
margin: -1px;
|
|
247
|
-
overflow: hidden;
|
|
248
|
-
clip: rect(0, 0, 0, 0);
|
|
249
|
-
white-space: nowrap;
|
|
250
|
-
border: 0;
|
|
251
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chatgsd",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Portable terminal-style chat intake form component",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "tsup && cp src/styles.css dist/styles.css",
|
|
22
|
-
"dev": "cp src/styles.css dist/styles.css
|
|
22
|
+
"dev": "concurrently \"tsup --watch\" \"chokidar 'src/styles.css' -c 'cp src/styles.css dist/styles.css'\"",
|
|
23
23
|
"typecheck": "tsc --noEmit",
|
|
24
24
|
"prepublishOnly": "npm run build",
|
|
25
25
|
"release": "npm run typecheck && npm version minor && npm publish && git push && git push --tags",
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/react": "^18.2.0",
|
|
35
35
|
"@types/react-dom": "^18.2.0",
|
|
36
|
+
"chokidar-cli": "^3.0.0",
|
|
37
|
+
"concurrently": "^9.2.1",
|
|
36
38
|
"react": "^18.2.0",
|
|
37
39
|
"react-dom": "^18.2.0",
|
|
38
40
|
"tsup": "^8.0.0",
|