@rpg-engine/long-bow 0.6.88 → 0.6.90

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.
@@ -26386,27 +26386,29 @@ var SearchCharacter = function SearchCharacter(_ref) {
26386
26386
  onCharacterClick = _ref.onCharacterClick,
26387
26387
  _ref$styles = _ref.styles,
26388
26388
  styles = _ref$styles === void 0 ? {
26389
- textColor: uiColors.white,
26390
- buttonColor: uiColors.orange,
26391
- buttonBackgroundColor: uiColors.darkGray,
26392
- width: '100%',
26389
+ textColor: '#c65102',
26390
+ buttonColor: '#005b96',
26391
+ buttonBackgroundColor: 'rgba(0,0,0,.2)',
26392
+ width: '80%',
26393
26393
  height: 'auto'
26394
26394
  } : _ref$styles;
26395
26395
  var _useState = useState(''),
26396
26396
  characterName = _useState[0],
26397
26397
  setCharacterName = _useState[1];
26398
- var _useState2 = useState(false),
26399
- isFocused = _useState2[0],
26400
- setIsFocused = _useState2[1];
26401
26398
  var searchCharacterRef = useRef(null);
26402
26399
  useEffect(function () {
26403
- if (searchCharacterRef.current) {
26404
- searchCharacterRef.current.focus();
26405
- }
26400
+ var timer = setTimeout(function () {
26401
+ if (searchCharacterRef.current) {
26402
+ searchCharacterRef.current.focus();
26403
+ }
26404
+ }, 100);
26405
+ return function () {
26406
+ return clearTimeout(timer);
26407
+ };
26406
26408
  }, []);
26407
26409
  var handleSubmit = function handleSubmit(event) {
26408
26410
  event.preventDefault();
26409
- if (!characterName.trim()) return;
26411
+ if (!characterName || characterName.trim() === '') return;
26410
26412
  onChangeCharacterName(characterName);
26411
26413
  };
26412
26414
  var handleCharacterClick = function handleCharacterClick(character) {
@@ -26415,131 +26417,80 @@ var SearchCharacter = function SearchCharacter(_ref) {
26415
26417
  onCharacterClick(character);
26416
26418
  hideSearchCharacterUI();
26417
26419
  };
26418
- var handleFocus = function handleFocus() {
26419
- setIsFocused(true);
26420
- onFocus == null ? void 0 : onFocus();
26421
- };
26422
- var handleBlur = function handleBlur() {
26423
- setIsFocused(false);
26424
- onBlur == null ? void 0 : onBlur();
26425
- };
26426
- return React.createElement(SearchContainer, {
26427
- width: styles.width || 'auto'
26428
- }, React.createElement(Form$2, {
26420
+ return React.createElement(SearchContainer, null, React.createElement(Form$2, {
26429
26421
  onSubmit: handleSubmit
26430
- }, React.createElement(InputWrapper, {
26431
- isFocused: isFocused
26432
- }, React.createElement(SearchIcon, null, React.createElement(RxMagnifyingGlass, null)), React.createElement(TextField$1, {
26422
+ }, React.createElement(Column, {
26423
+ flex: 70
26424
+ }, React.createElement(TextField$1, {
26433
26425
  value: characterName,
26434
26426
  ref: searchCharacterRef,
26427
+ id: "characterName",
26428
+ name: 'characterName',
26435
26429
  onChange: function onChange(e) {
26436
26430
  setCharacterName(e.target.value);
26437
26431
  onChangeCharacterName(e.target.value);
26438
26432
  },
26439
- placeholder: "Search for a character...",
26433
+ placeholder: 'Search for a character...',
26434
+ height: 20,
26440
26435
  type: "text",
26441
26436
  autoComplete: "off",
26442
- onFocus: handleFocus,
26443
- onBlur: handleBlur
26444
- }), characterName && React.createElement(ClearButton, {
26445
- onClick: function onClick() {
26446
- return setCharacterName('');
26447
- },
26448
- type: "button"
26449
- }, React.createElement(RxCross2, null))), React.createElement(SearchButton, {
26450
- type: "submit",
26451
- buttonColor: styles.buttonColor,
26452
- buttonBackgroundColor: styles.buttonBackgroundColor
26453
- }, "Search")), recentCharacters && recentCharacters.length > 0 && React.createElement(ResultsContainer, null, React.createElement(ResultsTitle, null, "Recent Characters"), React.createElement(ResultsList, null, recentCharacters.map(function (character) {
26454
- return React.createElement(ResultItem, {
26455
- key: character._id,
26456
- onClick: function onClick() {
26437
+ onFocus: onFocus,
26438
+ onBlur: onBlur,
26439
+ onPointerDown: onFocus
26440
+ })), React.createElement(Column, {
26441
+ justifyContent: "flex-end"
26442
+ }, React.createElement(SearchButton, {
26443
+ type: 'submit',
26444
+ buttonColor: (styles == null ? void 0 : styles.buttonColor) || '#005b96',
26445
+ buttonBackgroundColor: (styles == null ? void 0 : styles.buttonBackgroundColor) || 'rgba(0,0,0,.5)',
26446
+ id: "chat-send-button",
26447
+ style: {
26448
+ borderRadius: '20%'
26449
+ }
26450
+ }, React.createElement(RxMagnifyingGlass, {
26451
+ size: 15
26452
+ })))), recentCharacters && recentCharacters.length > 0 && React.createElement(ListContainer, null, recentCharacters.map(function (character) {
26453
+ return React.createElement(ListElement, {
26454
+ onPointerDown: function onPointerDown() {
26457
26455
  return handleCharacterClick(character);
26458
- }
26459
- }, React.createElement(CharacterAvatar, {
26460
- src: character.textureKey || '/default-avatar.png',
26461
- alt: character.name
26462
- }), React.createElement(CharacterInfo, null, React.createElement(CharacterName, null, React.createElement(Ellipsis, {
26463
- maxLines: 1,
26464
- maxWidth: "150px"
26465
- }, character.name)), React.createElement(CharacterDescription, null, React.createElement(Ellipsis, {
26466
- maxLines: 1,
26467
- maxWidth: "150px"
26468
- }, "Class: " + character["class"] + ", Level: " + character.skills.level))));
26469
- }))));
26456
+ },
26457
+ key: character._id
26458
+ }, React.createElement(Ellipsis, {
26459
+ maxWidth: '150px',
26460
+ maxLines: 1
26461
+ }, character.name));
26462
+ })));
26470
26463
  };
26471
26464
  var SearchContainer = /*#__PURE__*/styled.div.withConfig({
26472
26465
  displayName: "SearchCharacter__SearchContainer",
26473
26466
  componentId: "sc-172lyfr-0"
26474
- })(["width:", ";max-width:600px;margin:0 auto;"], function (_ref2) {
26475
- var width = _ref2.width;
26476
- return width;
26477
- });
26467
+ })(["width:100%;"]);
26478
26468
  var Form$2 = /*#__PURE__*/styled.form.withConfig({
26479
26469
  displayName: "SearchCharacter__Form",
26480
26470
  componentId: "sc-172lyfr-1"
26481
- })(["display:flex;gap:10px;margin-bottom:20px;"]);
26482
- var InputWrapper = /*#__PURE__*/styled.div.withConfig({
26483
- displayName: "SearchCharacter__InputWrapper",
26484
- componentId: "sc-172lyfr-2"
26485
- })(["position:relative;flex-grow:1;display:flex;align-items:center;background-color:", ";border-radius:24px;padding:8px 16px;transition:all 0.3s ease;box-shadow:", ";"], uiColors.raisinBlack, function (_ref3) {
26486
- var isFocused = _ref3.isFocused;
26487
- return isFocused ? "0 0 0 2px " + uiColors.orange : 'none';
26488
- });
26489
- var SearchIcon = /*#__PURE__*/styled.span.withConfig({
26490
- displayName: "SearchCharacter__SearchIcon",
26491
- componentId: "sc-172lyfr-3"
26492
- })(["color:", ";margin-right:8px;"], uiColors.gray);
26471
+ })(["display:flex;width:100%;justify-content:center;align-items:center;"]);
26493
26472
  var TextField$1 = /*#__PURE__*/styled.input.withConfig({
26494
26473
  displayName: "SearchCharacter__TextField",
26495
- componentId: "sc-172lyfr-4"
26496
- })(["width:100%;background-color:transparent;border:none;color:", ";font-size:", ";outline:none;&::placeholder{color:", ";}"], uiColors.white, uiFonts.size.medium, uiColors.gray);
26497
- var ClearButton = /*#__PURE__*/styled.button.withConfig({
26498
- displayName: "SearchCharacter__ClearButton",
26499
- componentId: "sc-172lyfr-5"
26500
- })(["background:none;border:none;color:", ";cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center;"], uiColors.gray);
26474
+ componentId: "sc-172lyfr-2"
26475
+ })(["width:100%;background-color:rgba(0,0,0,0.25) !important;border:none !important;max-height:28px !important;"]);
26501
26476
  var SearchButton = /*#__PURE__*/styled.button.withConfig({
26502
26477
  displayName: "SearchCharacter__SearchButton",
26503
- componentId: "sc-172lyfr-6"
26504
- })(["background-color:", ";color:", ";border:none;border-radius:24px;padding:8px 16px;font-size:", ";font-weight:bold;cursor:pointer;transition:all 0.3s ease;&:hover{background-color:", ";color:", ";}"], function (_ref4) {
26505
- var buttonBackgroundColor = _ref4.buttonBackgroundColor;
26506
- return buttonBackgroundColor;
26507
- }, function (_ref5) {
26508
- var buttonColor = _ref5.buttonColor;
26478
+ componentId: "sc-172lyfr-3"
26479
+ })(["color:", ";background-color:", ";width:28px;height:28px;border:none !important;"], function (_ref2) {
26480
+ var buttonColor = _ref2.buttonColor;
26509
26481
  return buttonColor;
26510
- }, uiFonts.size.medium, uiColors.orange, uiColors.white);
26511
- var ResultsContainer = /*#__PURE__*/styled.div.withConfig({
26512
- displayName: "SearchCharacter__ResultsContainer",
26513
- componentId: "sc-172lyfr-7"
26514
- })(["background-color:", ";border-radius:8px;padding:16px;"], uiColors.raisinBlack);
26515
- var ResultsTitle = /*#__PURE__*/styled.h3.withConfig({
26516
- displayName: "SearchCharacter__ResultsTitle",
26517
- componentId: "sc-172lyfr-8"
26518
- })(["color:", ";font-size:", ";margin-bottom:12px;"], uiColors.white, uiFonts.size.medium);
26519
- var ResultsList = /*#__PURE__*/styled.ul.withConfig({
26520
- displayName: "SearchCharacter__ResultsList",
26521
- componentId: "sc-172lyfr-9"
26522
- })(["list-style-type:none;padding:0;margin:0;"]);
26523
- var ResultItem = /*#__PURE__*/styled.li.withConfig({
26524
- displayName: "SearchCharacter__ResultItem",
26525
- componentId: "sc-172lyfr-10"
26526
- })(["display:flex;align-items:center;padding:8px;cursor:pointer;border-radius:4px;transition:all 0.2s ease;&:hover{background-color:", ";}"], uiColors.darkGray);
26527
- var CharacterAvatar = /*#__PURE__*/styled.img.withConfig({
26528
- displayName: "SearchCharacter__CharacterAvatar",
26529
- componentId: "sc-172lyfr-11"
26530
- })(["width:40px;height:40px;border-radius:50%;margin-right:12px;object-fit:cover;"]);
26531
- var CharacterInfo = /*#__PURE__*/styled.div.withConfig({
26532
- displayName: "SearchCharacter__CharacterInfo",
26533
- componentId: "sc-172lyfr-12"
26534
- })(["flex-grow:1;"]);
26535
- var CharacterName = /*#__PURE__*/styled.div.withConfig({
26536
- displayName: "SearchCharacter__CharacterName",
26537
- componentId: "sc-172lyfr-13"
26538
- })(["color:", ";font-size:", ";font-weight:bold;margin-bottom:4px;"], uiColors.white, uiFonts.size.medium);
26539
- var CharacterDescription = /*#__PURE__*/styled.div.withConfig({
26540
- displayName: "SearchCharacter__CharacterDescription",
26541
- componentId: "sc-172lyfr-14"
26542
- })(["color:", ";font-size:", ";"], uiColors.gray, uiFonts.size.small);
26482
+ }, function (_ref3) {
26483
+ var buttonBackgroundColor = _ref3.buttonBackgroundColor;
26484
+ return buttonBackgroundColor;
26485
+ });
26486
+ var ListContainer = /*#__PURE__*/styled.ul.withConfig({
26487
+ displayName: "SearchCharacter__ListContainer",
26488
+ componentId: "sc-172lyfr-4"
26489
+ })(["border:none;overflow-y:scroll;list-style:none;padding:0;"]);
26490
+ var ListElement = /*#__PURE__*/styled.li.withConfig({
26491
+ displayName: "SearchCharacter__ListElement",
26492
+ componentId: "sc-172lyfr-5"
26493
+ })(["margin:0.5rem 0 !important;font-size:", ";padding:0.5rem 2px;&:hover{color:#ff0;background-color:", ";}button{all:unset;}"], uiFonts.size.small, uiColors.darkGray);
26543
26494
 
26544
26495
  var ChatRevamp = function ChatRevamp(_ref) {
26545
26496
  var chatMessages = _ref.chatMessages,
@@ -26611,7 +26562,7 @@ var ChatRevamp = function ChatRevamp(_ref) {
26611
26562
  }, recentChatCharacters == null ? void 0 : recentChatCharacters.map(function (character) {
26612
26563
  return React.createElement(ListElementContainer, {
26613
26564
  key: character._id
26614
- }, React.createElement(ListElement, {
26565
+ }, React.createElement(ListElement$1, {
26615
26566
  active: character._id === recentSelectedChatCharacterId,
26616
26567
  onClick: function onClick() {
26617
26568
  return handlePreviousChatCharacterClick(character);
@@ -26714,7 +26665,7 @@ var ListElementContainer = /*#__PURE__*/styled.div.withConfig({
26714
26665
  displayName: "ChatRevamp__ListElementContainer",
26715
26666
  componentId: "sc-1sdiknw-10"
26716
26667
  })(["display:flex;justify-content:space-between;align-items:center;"]);
26717
- var ListElement = /*#__PURE__*/styled.button.withConfig({
26668
+ var ListElement$1 = /*#__PURE__*/styled.button.withConfig({
26718
26669
  displayName: "ChatRevamp__ListElement",
26719
26670
  componentId: "sc-1sdiknw-11"
26720
26671
  })(["margin:0.5rem 0 !important;font-size:", " !important;padding:8px;border-radius:4px;all:unset;color:", ";width:100%;position:relative;display:flex;align-items:center;gap:4px;transition:all 0.2s ease;&:hover{background-color:rgba(255,255,255,0.1);}"], uiFonts.size.small, function (props) {
@@ -27383,7 +27334,7 @@ var RelativeListMenu = function RelativeListMenu(_ref) {
27383
27334
  overflow: 'hidden'
27384
27335
  }
27385
27336
  }, options.map(function (params, index) {
27386
- return React.createElement(ListElement$1, {
27337
+ return React.createElement(ListElement$2, {
27387
27338
  key: (params == null ? void 0 : params.id) || index,
27388
27339
  onPointerDown: function onPointerDown() {
27389
27340
  onSelected(params == null ? void 0 : params.id);
@@ -27401,7 +27352,7 @@ var Container$9 = /*#__PURE__*/styled.div.withConfig({
27401
27352
  }, function (props) {
27402
27353
  return props.fontSize;
27403
27354
  });
27404
- var ListElement$1 = /*#__PURE__*/styled.li.withConfig({
27355
+ var ListElement$2 = /*#__PURE__*/styled.li.withConfig({
27405
27356
  displayName: "RelativeListMenu__ListElement",
27406
27357
  componentId: "sc-7hohf-1"
27407
27358
  })(["margin-right:0.5rem;"]);
@@ -28908,7 +28859,7 @@ var SearchFriend = function SearchFriend(_ref) {
28908
28859
  onSearch(characterName);
28909
28860
  }
28910
28861
  };
28911
- var searchTabContent = React.createElement(ListContainer, null, React.createElement(SearchForm, {
28862
+ var searchTabContent = React.createElement(ListContainer$1, null, React.createElement(SearchForm, {
28912
28863
  onSubmit: handleSubmit
28913
28864
  }, React.createElement(SearchInput, {
28914
28865
  value: characterName,
@@ -28927,7 +28878,7 @@ var SearchFriend = function SearchFriend(_ref) {
28927
28878
  onAction: onSendFriendRequest,
28928
28879
  actionLabel: "Add Friend"
28929
28880
  }));
28930
- var requestsTabContent = React.createElement(ListContainer, null, React.createElement(FriendRequestSection, {
28881
+ var requestsTabContent = React.createElement(ListContainer$1, null, React.createElement(FriendRequestSection, {
28931
28882
  friendRequests: friendRequests,
28932
28883
  onAccept: onAcceptRequest,
28933
28884
  onReject: onRejectRequest
@@ -28952,10 +28903,10 @@ var CharacterList = function CharacterList(_ref2) {
28952
28903
  var characters = _ref2.characters,
28953
28904
  onAction = _ref2.onAction,
28954
28905
  actionLabel = _ref2.actionLabel;
28955
- return React.createElement(ListContainer, null, characters.map(function (character) {
28906
+ return React.createElement(ListContainer$1, null, characters.map(function (character) {
28956
28907
  return React.createElement(ListItem, {
28957
28908
  key: character._id
28958
- }, React.createElement(CharacterName$1, null, character.name), React.createElement(UserActionLink, {
28909
+ }, React.createElement(CharacterName, null, character.name), React.createElement(UserActionLink, {
28959
28910
  color: uiColors.lightGreen,
28960
28911
  onClick: function onClick() {
28961
28912
  return onAction(character);
@@ -28967,10 +28918,10 @@ var FriendRequestSection = function FriendRequestSection(_ref3) {
28967
28918
  var friendRequests = _ref3.friendRequests,
28968
28919
  onAccept = _ref3.onAccept,
28969
28920
  onReject = _ref3.onReject;
28970
- return React.createElement(React.Fragment, null, friendRequests.length > 0 && React.createElement(ListContainer, null, friendRequests.map(function (character) {
28921
+ return React.createElement(React.Fragment, null, friendRequests.length > 0 && React.createElement(ListContainer$1, null, friendRequests.map(function (character) {
28971
28922
  return React.createElement(ListItem, {
28972
28923
  key: character._id
28973
- }, React.createElement(CharacterName$1, null, character.name), React.createElement(AcceptRejectActions, null, React.createElement(UserActionLink, {
28924
+ }, React.createElement(CharacterName, null, character.name), React.createElement(AcceptRejectActions, null, React.createElement(UserActionLink, {
28974
28925
  color: uiColors.lightGreen,
28975
28926
  onClick: function onClick() {
28976
28927
  return onAccept(character);
@@ -28995,7 +28946,7 @@ var SearchInput = /*#__PURE__*/styled.input.withConfig({
28995
28946
  displayName: "SearchFriend__SearchInput",
28996
28947
  componentId: "sc-1lt1ols-2"
28997
28948
  })(["width:100%;background-color:rgba(0,0,0,0.25);border:none;padding:0.5rem;font-size:", ";"], uiFonts.size.small);
28998
- var ListContainer = /*#__PURE__*/styled.ul.withConfig({
28949
+ var ListContainer$1 = /*#__PURE__*/styled.ul.withConfig({
28999
28950
  displayName: "SearchFriend__ListContainer",
29000
28951
  componentId: "sc-1lt1ols-3"
29001
28952
  })(["list-style:none;padding:0;margin:0;width:100%;max-height:50vh;overflow-y:auto;@media (max-width:768px){max-height:90vh;}"]);
@@ -29003,7 +28954,7 @@ var ListItem = /*#__PURE__*/styled.li.withConfig({
29003
28954
  displayName: "SearchFriend__ListItem",
29004
28955
  componentId: "sc-1lt1ols-4"
29005
28956
  })(["display:flex;align-items:center;justify-content:space-between;padding:0.5rem;border-bottom:1px solid rgba(255,255,255,0.1);"]);
29006
- var CharacterName$1 = /*#__PURE__*/styled.p.withConfig({
28957
+ var CharacterName = /*#__PURE__*/styled.p.withConfig({
29007
28958
  displayName: "SearchFriend__CharacterName",
29008
28959
  componentId: "sc-1lt1ols-5"
29009
28960
  })(["font-size:", ";margin:0;"], uiFonts.size.small);
@@ -30605,7 +30556,7 @@ var ListMenu = function ListMenu(_ref) {
30605
30556
  overflow: 'hidden'
30606
30557
  }
30607
30558
  }, options.map(function (params, index) {
30608
- return React.createElement(ListElement$2, {
30559
+ return React.createElement(ListElement$3, {
30609
30560
  key: (params == null ? void 0 : params.id) || index,
30610
30561
  onPointerDown: function onPointerDown() {
30611
30562
  onSelected(params == null ? void 0 : params.id);
@@ -30621,7 +30572,7 @@ var Container$m = /*#__PURE__*/styled.div.withConfig({
30621
30572
  }, function (props) {
30622
30573
  return props.x || 0;
30623
30574
  }, uiFonts.size.xsmall);
30624
- var ListElement$2 = /*#__PURE__*/styled.li.withConfig({
30575
+ var ListElement$3 = /*#__PURE__*/styled.li.withConfig({
30625
30576
  displayName: "ListMenu__ListElement",
30626
30577
  componentId: "sc-i9097t-1"
30627
30578
  })(["margin-right:0.5rem;"]);
@@ -30880,7 +30831,7 @@ var BuyPanel = function BuyPanel(_ref) {
30880
30831
  enableHotkeys == null ? void 0 : enableHotkeys();
30881
30832
  },
30882
30833
  message: "Are you sure to buy this item?"
30883
- }), React.createElement(InputWrapper$1, null, React.createElement("p", null, "Search By Name"), React.createElement(Input, {
30834
+ }), React.createElement(InputWrapper, null, React.createElement("p", null, "Search By Name"), React.createElement(Input, {
30884
30835
  onChange: function onChange(e) {
30885
30836
  setName(e.target.value);
30886
30837
  onChangeNameInput(e.target.value);
@@ -30983,7 +30934,7 @@ var BuyPanel = function BuyPanel(_ref) {
30983
30934
  });
30984
30935
  })));
30985
30936
  };
30986
- var InputWrapper$1 = /*#__PURE__*/styled.div.withConfig({
30937
+ var InputWrapper = /*#__PURE__*/styled.div.withConfig({
30987
30938
  displayName: "BuyPanel__InputWrapper",
30988
30939
  componentId: "sc-1si8t7i-0"
30989
30940
  })(["width:95%;display:flex !important;justify-content:flex-start;align-items:center;margin:auto;p{width:auto;margin-right:20px;}input{width:68%;height:10px;}"]);
@@ -31060,7 +31011,7 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
31060
31011
  enableHotkeys == null ? void 0 : enableHotkeys();
31061
31012
  },
31062
31013
  message: "Are you sure to remove this item?"
31063
- }), React.createElement(InputWrapper$2, null, React.createElement("p", null, "Search By Name"), React.createElement(Input, {
31014
+ }), React.createElement(InputWrapper$1, null, React.createElement("p", null, "Search By Name"), React.createElement(Input, {
31064
31015
  onChange: function onChange(e) {
31065
31016
  setName(e.target.value);
31066
31017
  onChangeNameInput(e.target.value);
@@ -31127,7 +31078,7 @@ var Flex$2 = /*#__PURE__*/styled.div.withConfig({
31127
31078
  displayName: "ManagmentPanel__Flex",
31128
31079
  componentId: "sc-1yyi6jn-0"
31129
31080
  })(["display:flex;gap:5px;align-items:center;"]);
31130
- var InputWrapper$2 = /*#__PURE__*/styled.div.withConfig({
31081
+ var InputWrapper$1 = /*#__PURE__*/styled.div.withConfig({
31131
31082
  displayName: "ManagmentPanel__InputWrapper",
31132
31083
  componentId: "sc-1yyi6jn-1"
31133
31084
  })(["width:95%;display:flex !important;justify-content:flex-start;align-items:center;margin:auto;p{width:auto;margin-right:20px;}input{width:68%;height:10px;}"]);