@rpg-engine/long-bow 0.7.4 → 0.7.7
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/long-bow.cjs.development.js +15 -15
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +15 -15
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Chat/Chat.tsx +49 -68
- package/src/components/ChatRevamp/ChatRevamp.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
3
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
4
|
-
import { FaTimes } from 'react-icons/fa';
|
|
4
|
+
import { FaTimes } from 'react-icons/fa';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import { uiColors } from '../../constants/uiColors';
|
|
7
7
|
import { ChatMessage } from '../ChatRevamp/ChatRevamp';
|
|
@@ -33,11 +33,11 @@ export interface IChatProps {
|
|
|
33
33
|
export const Chat: React.FC<IChatProps> = ({
|
|
34
34
|
chatMessages,
|
|
35
35
|
onSendChatMessage,
|
|
36
|
-
onCloseButton,
|
|
36
|
+
onCloseButton,
|
|
37
37
|
onFocus,
|
|
38
38
|
onBlur,
|
|
39
39
|
styles = {
|
|
40
|
-
textColor: '#ff6600',
|
|
40
|
+
textColor: '#ff6600',
|
|
41
41
|
buttonColor: '#ff6600',
|
|
42
42
|
buttonBackgroundColor: '#333',
|
|
43
43
|
width: '100%',
|
|
@@ -127,81 +127,86 @@ interface IMessageProps {
|
|
|
127
127
|
const ChatContainer = styled.div<IContainerProps>`
|
|
128
128
|
width: ${props => props.width};
|
|
129
129
|
height: ${props => props.height};
|
|
130
|
-
background-color: #
|
|
131
|
-
|
|
130
|
+
background-color: #1e1e1e;
|
|
132
131
|
display: flex;
|
|
133
132
|
flex-direction: column;
|
|
134
|
-
position: relative;
|
|
133
|
+
position: relative;
|
|
134
|
+
border-radius: 8px;
|
|
135
|
+
border: 1px solid rgba(0, 0, 0, 0.1); /* Slightly transparent border */
|
|
136
|
+
overflow: hidden; /* Remove border-radius */
|
|
137
|
+
`;
|
|
138
|
+
|
|
139
|
+
const CloseButton = styled.button`
|
|
140
|
+
position: absolute;
|
|
141
|
+
top: 8px;
|
|
142
|
+
right: 8px;
|
|
143
|
+
background-color: transparent;
|
|
144
|
+
border: none;
|
|
145
|
+
color: white;
|
|
146
|
+
font-size: 16px;
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
z-index: 1;
|
|
135
149
|
`;
|
|
136
150
|
|
|
137
151
|
const MessagesContainer = styled.div`
|
|
138
152
|
flex-grow: 1;
|
|
139
153
|
overflow-y: auto;
|
|
140
|
-
padding:
|
|
141
|
-
margin-
|
|
154
|
+
padding: 12px;
|
|
155
|
+
margin-bottom: 8px;
|
|
156
|
+
|
|
157
|
+
scrollbar-width: thin;
|
|
158
|
+
scrollbar-color: #333 #1e1e1e;
|
|
142
159
|
|
|
143
160
|
&::-webkit-scrollbar {
|
|
144
161
|
width: 6px;
|
|
145
162
|
}
|
|
146
163
|
|
|
147
164
|
&::-webkit-scrollbar-track {
|
|
148
|
-
background: #
|
|
165
|
+
background: #1e1e1e;
|
|
149
166
|
}
|
|
150
167
|
|
|
151
168
|
&::-webkit-scrollbar-thumb {
|
|
152
|
-
background:
|
|
169
|
+
background-color: #333;
|
|
153
170
|
border-radius: 3px;
|
|
154
171
|
}
|
|
155
|
-
|
|
156
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
157
|
-
background: #222;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
&::-webkit-scrollbar-corner {
|
|
161
|
-
background: #333;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
&::-webkit-scrollbar-button {
|
|
165
|
-
background: #333;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
&::-webkit-scrollbar-button:hover {
|
|
169
|
-
background: #222;
|
|
170
|
-
}
|
|
171
172
|
`;
|
|
172
173
|
|
|
173
174
|
const Message = styled.div<IMessageProps>`
|
|
174
|
-
margin-bottom:
|
|
175
|
+
margin-bottom: 6px;
|
|
175
176
|
color: ${({ color }) => color};
|
|
176
177
|
font-family: 'Press Start 2P', cursive;
|
|
177
|
-
font-size: 0.7rem;
|
|
178
|
-
|
|
179
|
-
word-break: break-word;
|
|
178
|
+
font-size: 0.7rem;
|
|
179
|
+
line-height: 1.4;
|
|
180
|
+
word-break: break-word;
|
|
180
181
|
`;
|
|
181
182
|
|
|
182
183
|
const Form = styled.form`
|
|
183
184
|
display: flex;
|
|
184
|
-
|
|
185
|
-
|
|
185
|
+
padding: 8px;
|
|
186
|
+
background-color: #2a2a2a;
|
|
186
187
|
`;
|
|
187
188
|
|
|
188
189
|
const TextField = styled.input`
|
|
189
190
|
flex-grow: 1;
|
|
190
|
-
background-color:
|
|
191
|
+
background-color: #1a1a1a;
|
|
191
192
|
color: #ff6600;
|
|
192
|
-
border:
|
|
193
|
+
border: 1px solid #333;
|
|
194
|
+
border-radius: 4px;
|
|
195
|
+
padding: 8px;
|
|
196
|
+
margin-right: 8px;
|
|
193
197
|
font-family: 'Press Start 2P', cursive;
|
|
194
|
-
font-size: 0.7rem;
|
|
195
|
-
|
|
196
|
-
|
|
198
|
+
font-size: 0.7rem;
|
|
199
|
+
height: 32px;
|
|
200
|
+
transition: border-color 0.3s, background-color 0.3s;
|
|
197
201
|
|
|
198
202
|
&::placeholder {
|
|
199
|
-
color:
|
|
200
|
-
font-size: 0.7rem;
|
|
203
|
+
color: #666;
|
|
201
204
|
}
|
|
202
205
|
|
|
203
206
|
&:focus {
|
|
204
207
|
outline: none;
|
|
208
|
+
border-color: #ff6600;
|
|
209
|
+
background-color: #2a2a2a;
|
|
205
210
|
}
|
|
206
211
|
`;
|
|
207
212
|
|
|
@@ -209,37 +214,13 @@ const SendButton = styled.button`
|
|
|
209
214
|
background-color: transparent;
|
|
210
215
|
color: #ff6600;
|
|
211
216
|
border: none;
|
|
212
|
-
padding:
|
|
213
|
-
font-size:
|
|
217
|
+
padding: 8px 12px;
|
|
218
|
+
font-size: 14px;
|
|
214
219
|
cursor: pointer;
|
|
215
|
-
transition:
|
|
216
|
-
|
|
217
|
-
&:hover {
|
|
218
|
-
color: #ff8533;
|
|
219
|
-
}
|
|
220
|
+
transition: opacity 0.3s ease;
|
|
220
221
|
|
|
221
222
|
&:disabled {
|
|
222
|
-
|
|
223
|
+
opacity: 0.5;
|
|
223
224
|
cursor: not-allowed;
|
|
224
225
|
}
|
|
225
226
|
`;
|
|
226
|
-
|
|
227
|
-
const CloseButton = styled.button`
|
|
228
|
-
position: absolute;
|
|
229
|
-
top: 0;
|
|
230
|
-
right: 0;
|
|
231
|
-
background-color: transparent;
|
|
232
|
-
border: none;
|
|
233
|
-
color: white;
|
|
234
|
-
font-size: 16px;
|
|
235
|
-
cursor: pointer;
|
|
236
|
-
padding: 5px;
|
|
237
|
-
display: flex;
|
|
238
|
-
align-items: center;
|
|
239
|
-
justify-content: center;
|
|
240
|
-
transition: color 0.3s ease;
|
|
241
|
-
|
|
242
|
-
&:hover {
|
|
243
|
-
color: ${uiColors.darkYellow};
|
|
244
|
-
}
|
|
245
|
-
`;
|
|
@@ -211,7 +211,7 @@ const Tab = styled.button<{ active: boolean }>`
|
|
|
211
211
|
|
|
212
212
|
background-color: ${props =>
|
|
213
213
|
props.active ? uiColors.orange : 'transparent'};
|
|
214
|
-
color: ${props => (props.active ? 'white' : uiColors.
|
|
214
|
+
color: ${props => (props.active ? 'white' : uiColors.gray)};
|
|
215
215
|
`;
|
|
216
216
|
|
|
217
217
|
const PrivateChatContainer = styled.div<{ width: string; height: string }>`
|