@rpg-engine/long-bow 0.7.5 → 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 +19 -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 +19 -15
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Chat/Chat.tsx +51 -69
- 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%',
|
|
@@ -125,82 +125,88 @@ interface IMessageProps {
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
const ChatContainer = styled.div<IContainerProps>`
|
|
128
|
-
width:
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
width: ${props => props.width};
|
|
129
|
+
height: ${props => props.height};
|
|
130
|
+
background-color: #1e1e1e;
|
|
131
131
|
display: flex;
|
|
132
132
|
flex-direction: column;
|
|
133
|
-
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;
|
|
134
149
|
`;
|
|
135
150
|
|
|
136
151
|
const MessagesContainer = styled.div`
|
|
137
152
|
flex-grow: 1;
|
|
138
153
|
overflow-y: auto;
|
|
139
|
-
padding:
|
|
140
|
-
margin-
|
|
154
|
+
padding: 12px;
|
|
155
|
+
margin-bottom: 8px;
|
|
156
|
+
|
|
157
|
+
scrollbar-width: thin;
|
|
158
|
+
scrollbar-color: #333 #1e1e1e;
|
|
141
159
|
|
|
142
160
|
&::-webkit-scrollbar {
|
|
143
161
|
width: 6px;
|
|
144
162
|
}
|
|
145
163
|
|
|
146
164
|
&::-webkit-scrollbar-track {
|
|
147
|
-
background: #
|
|
165
|
+
background: #1e1e1e;
|
|
148
166
|
}
|
|
149
167
|
|
|
150
168
|
&::-webkit-scrollbar-thumb {
|
|
151
|
-
background:
|
|
169
|
+
background-color: #333;
|
|
152
170
|
border-radius: 3px;
|
|
153
171
|
}
|
|
154
|
-
|
|
155
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
156
|
-
background: #222;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
&::-webkit-scrollbar-corner {
|
|
160
|
-
background: #333;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
&::-webkit-scrollbar-button {
|
|
164
|
-
background: #333;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
&::-webkit-scrollbar-button:hover {
|
|
168
|
-
background: #222;
|
|
169
|
-
}
|
|
170
172
|
`;
|
|
171
173
|
|
|
172
174
|
const Message = styled.div<IMessageProps>`
|
|
173
|
-
margin-bottom:
|
|
175
|
+
margin-bottom: 6px;
|
|
174
176
|
color: ${({ color }) => color};
|
|
175
177
|
font-family: 'Press Start 2P', cursive;
|
|
176
|
-
font-size: 0.7rem;
|
|
177
|
-
|
|
178
|
-
word-break: break-word;
|
|
178
|
+
font-size: 0.7rem;
|
|
179
|
+
line-height: 1.4;
|
|
180
|
+
word-break: break-word;
|
|
179
181
|
`;
|
|
180
182
|
|
|
181
183
|
const Form = styled.form`
|
|
182
184
|
display: flex;
|
|
183
|
-
|
|
184
|
-
|
|
185
|
+
padding: 8px;
|
|
186
|
+
background-color: #2a2a2a;
|
|
185
187
|
`;
|
|
186
188
|
|
|
187
189
|
const TextField = styled.input`
|
|
188
190
|
flex-grow: 1;
|
|
189
|
-
background-color:
|
|
191
|
+
background-color: #1a1a1a;
|
|
190
192
|
color: #ff6600;
|
|
191
|
-
border:
|
|
193
|
+
border: 1px solid #333;
|
|
194
|
+
border-radius: 4px;
|
|
195
|
+
padding: 8px;
|
|
196
|
+
margin-right: 8px;
|
|
192
197
|
font-family: 'Press Start 2P', cursive;
|
|
193
|
-
font-size: 0.7rem;
|
|
194
|
-
|
|
195
|
-
|
|
198
|
+
font-size: 0.7rem;
|
|
199
|
+
height: 32px;
|
|
200
|
+
transition: border-color 0.3s, background-color 0.3s;
|
|
196
201
|
|
|
197
202
|
&::placeholder {
|
|
198
|
-
color:
|
|
199
|
-
font-size: 0.7rem;
|
|
203
|
+
color: #666;
|
|
200
204
|
}
|
|
201
205
|
|
|
202
206
|
&:focus {
|
|
203
207
|
outline: none;
|
|
208
|
+
border-color: #ff6600;
|
|
209
|
+
background-color: #2a2a2a;
|
|
204
210
|
}
|
|
205
211
|
`;
|
|
206
212
|
|
|
@@ -208,37 +214,13 @@ const SendButton = styled.button`
|
|
|
208
214
|
background-color: transparent;
|
|
209
215
|
color: #ff6600;
|
|
210
216
|
border: none;
|
|
211
|
-
padding:
|
|
212
|
-
font-size:
|
|
217
|
+
padding: 8px 12px;
|
|
218
|
+
font-size: 14px;
|
|
213
219
|
cursor: pointer;
|
|
214
|
-
transition:
|
|
215
|
-
|
|
216
|
-
&:hover {
|
|
217
|
-
color: #ff8533;
|
|
218
|
-
}
|
|
220
|
+
transition: opacity 0.3s ease;
|
|
219
221
|
|
|
220
222
|
&:disabled {
|
|
221
|
-
|
|
223
|
+
opacity: 0.5;
|
|
222
224
|
cursor: not-allowed;
|
|
223
225
|
}
|
|
224
226
|
`;
|
|
225
|
-
|
|
226
|
-
const CloseButton = styled.button`
|
|
227
|
-
position: absolute;
|
|
228
|
-
top: 0;
|
|
229
|
-
right: 0;
|
|
230
|
-
background-color: transparent;
|
|
231
|
-
border: none;
|
|
232
|
-
color: white;
|
|
233
|
-
font-size: 16px;
|
|
234
|
-
cursor: pointer;
|
|
235
|
-
padding: 5px;
|
|
236
|
-
display: flex;
|
|
237
|
-
align-items: center;
|
|
238
|
-
justify-content: center;
|
|
239
|
-
transition: color 0.3s ease;
|
|
240
|
-
|
|
241
|
-
&:hover {
|
|
242
|
-
color: ${uiColors.darkYellow};
|
|
243
|
-
}
|
|
244
|
-
`;
|
|
@@ -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 }>`
|