@rpg-engine/long-bow 0.2.63 → 0.2.65

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.
@@ -26997,7 +26997,9 @@ var Chat = function Chat(_ref) {
26997
26997
  width = _ref$width === void 0 ? '100%' : _ref$width,
26998
26998
  _ref$height = _ref.height,
26999
26999
  height = _ref$height === void 0 ? '250px' : _ref$height,
27000
- onCloseButton = _ref.onCloseButton;
27000
+ onCloseButton = _ref.onCloseButton,
27001
+ onFocus = _ref.onFocus,
27002
+ onBlur = _ref.onBlur;
27001
27003
  var _useState = useState(''),
27002
27004
  message = _useState[0],
27003
27005
  setMessage = _useState[1];
@@ -27064,7 +27066,9 @@ var Chat = function Chat(_ref) {
27064
27066
  height: 20,
27065
27067
  className: "chat-input dark-background",
27066
27068
  type: "text",
27067
- autoComplete: "off"
27069
+ autoComplete: "off",
27070
+ onFocus: onFocus,
27071
+ onBlur: onBlur
27068
27072
  })), React.createElement(Column, {
27069
27073
  justifyContent: "flex-end"
27070
27074
  }, React.createElement(Button, {
@@ -27318,6 +27322,27 @@ var DropdownOptions = /*#__PURE__*/styled.ul.withConfig({
27318
27322
  return props.opened ? 'block' : 'none';
27319
27323
  });
27320
27324
 
27325
+ var DropdownSelectorContainer = function DropdownSelectorContainer(_ref) {
27326
+ var title = _ref.title,
27327
+ onChange = _ref.onChange,
27328
+ options = _ref.options,
27329
+ details = _ref.details;
27330
+ return React.createElement("div", null, React.createElement("p", null, title), React.createElement(Dropdown, {
27331
+ options: options.map(function (option, index) {
27332
+ return {
27333
+ option: option.name,
27334
+ value: option.id,
27335
+ id: index
27336
+ };
27337
+ }),
27338
+ onChange: onChange
27339
+ }), React.createElement(Details, null, details));
27340
+ };
27341
+ var Details = /*#__PURE__*/styled.p.withConfig({
27342
+ displayName: "DropdownSelectorContainer__Details",
27343
+ componentId: "sc-kaa0h9-0"
27344
+ })(["font-size:", " !important;"], uiFonts.size.xsmall);
27345
+
27321
27346
  var RelativeListMenu = function RelativeListMenu(_ref) {
27322
27347
  var options = _ref.options,
27323
27348
  onSelected = _ref.onSelected,
@@ -28321,92 +28346,6 @@ var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
28321
28346
  componentId: "sc-15y5p9l-0"
28322
28347
  })(["max-width:280px;display:flex;justify-content:center;flex-wrap:wrap;"]);
28323
28348
 
28324
- var ItemSelector = function ItemSelector(_ref) {
28325
- var atlasIMG = _ref.atlasIMG,
28326
- atlasJSON = _ref.atlasJSON,
28327
- options = _ref.options,
28328
- onClose = _ref.onClose,
28329
- onSelect = _ref.onSelect;
28330
- var _useState = useState(),
28331
- selectedValue = _useState[0],
28332
- setSelectedValue = _useState[1];
28333
- var handleClick = function handleClick() {
28334
- var element = document.querySelector("input[name='test']:checked");
28335
- var elementValue = element.value;
28336
- setSelectedValue(elementValue);
28337
- };
28338
- useEffect(function () {
28339
- if (selectedValue) {
28340
- onSelect(selectedValue);
28341
- }
28342
- }, [selectedValue]);
28343
- return React.createElement(DraggableContainer, {
28344
- type: RPGUIContainerTypes.Framed,
28345
- width: "500px",
28346
- cancelDrag: ".equipment-container-body .arrow-selector",
28347
- onCloseButton: function onCloseButton() {
28348
- if (onClose) {
28349
- onClose();
28350
- }
28351
- }
28352
- }, React.createElement("div", {
28353
- style: {
28354
- width: '100%'
28355
- }
28356
- }, React.createElement(Title$1, null, 'Harvesting instruments'), React.createElement(Subtitle, null, 'Use the tool, you need it'), React.createElement("hr", {
28357
- className: "golden"
28358
- })), React.createElement(RadioInputScroller, null, options == null ? void 0 : options.map(function (option, index) {
28359
- return React.createElement(RadioOptionsWrapper, {
28360
- key: index
28361
- }, React.createElement(SpriteAtlasWrapper, null, React.createElement(SpriteFromAtlas, {
28362
- atlasIMG: atlasIMG,
28363
- atlasJSON: atlasJSON,
28364
- spriteKey: option.imageKey,
28365
- imgScale: 3
28366
- })), React.createElement("div", null, React.createElement("input", {
28367
- className: "rpgui-radio",
28368
- type: "radio",
28369
- value: option.name,
28370
- name: "test"
28371
- }), React.createElement("label", {
28372
- onClick: handleClick,
28373
- style: {
28374
- display: 'flex',
28375
- alignItems: 'center'
28376
- }
28377
- }, option.name, " ", React.createElement("br", null), option.description)));
28378
- })), React.createElement(ButtonWrapper, null, React.createElement(Button, {
28379
- buttonType: ButtonTypes.RPGUIButton,
28380
- onClick: onClose
28381
- }, "Cancel"), React.createElement(Button, {
28382
- buttonType: ButtonTypes.RPGUIButton
28383
- }, "Select")));
28384
- };
28385
- var Title$1 = /*#__PURE__*/styled.h1.withConfig({
28386
- displayName: "ItemSelector__Title",
28387
- componentId: "sc-gptoxp-0"
28388
- })(["font-size:0.6rem;color:yellow !important;"]);
28389
- var Subtitle = /*#__PURE__*/styled.h1.withConfig({
28390
- displayName: "ItemSelector__Subtitle",
28391
- componentId: "sc-gptoxp-1"
28392
- })(["font-size:0.4rem;color:yellow !important;"]);
28393
- var RadioInputScroller = /*#__PURE__*/styled.div.withConfig({
28394
- displayName: "ItemSelector__RadioInputScroller",
28395
- componentId: "sc-gptoxp-2"
28396
- })(["width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
28397
- var SpriteAtlasWrapper = /*#__PURE__*/styled.div.withConfig({
28398
- displayName: "ItemSelector__SpriteAtlasWrapper",
28399
- componentId: "sc-gptoxp-3"
28400
- })(["margin-right:40px;"]);
28401
- var RadioOptionsWrapper = /*#__PURE__*/styled.div.withConfig({
28402
- displayName: "ItemSelector__RadioOptionsWrapper",
28403
- componentId: "sc-gptoxp-4"
28404
- })(["display:flex;align-items:stretch;margin-bottom:40px;"]);
28405
- var ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
28406
- displayName: "ItemSelector__ButtonWrapper",
28407
- componentId: "sc-gptoxp-5"
28408
- })(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
28409
-
28410
28349
  var ListMenu = function ListMenu(_ref) {
28411
28350
  var options = _ref.options,
28412
28351
  onSelected = _ref.onSelected,
@@ -28542,7 +28481,7 @@ var QuestInfo = function QuestInfo(_ref) {
28542
28481
  onTouchStart: onRightClick
28543
28482
  }), React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
28544
28483
  className: "drag-handler"
28545
- }, React.createElement(Title$2, null, React.createElement(Thumbnail, {
28484
+ }, React.createElement(Title$1, null, React.createElement(Thumbnail, {
28546
28485
  src: quests[currentIndex].thumbnail || img$8
28547
28486
  }), quests[currentIndex].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
28548
28487
  className: "golden"
@@ -28561,7 +28500,7 @@ var QuestInfo = function QuestInfo(_ref) {
28561
28500
  }, button.title);
28562
28501
  })))) : React.createElement(QuestsContainer, null, React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
28563
28502
  className: "drag-handler"
28564
- }, React.createElement(Title$2, null, React.createElement(Thumbnail, {
28503
+ }, React.createElement(Title$1, null, React.createElement(Thumbnail, {
28565
28504
  src: quests[0].thumbnail || img$8
28566
28505
  }), quests[0].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
28567
28506
  className: "golden"
@@ -28608,7 +28547,7 @@ var TitleContainer$1 = /*#__PURE__*/styled.div.withConfig({
28608
28547
  displayName: "QuestInfo__TitleContainer",
28609
28548
  componentId: "sc-15s2boc-6"
28610
28549
  })(["width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;margin-top:1rem;"]);
28611
- var Title$2 = /*#__PURE__*/styled.h1.withConfig({
28550
+ var Title$1 = /*#__PURE__*/styled.h1.withConfig({
28612
28551
  displayName: "QuestInfo__Title",
28613
28552
  componentId: "sc-15s2boc-7"
28614
28553
  })(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
@@ -28630,7 +28569,7 @@ var QuestList = function QuestList(_ref) {
28630
28569
  style: {
28631
28570
  width: '100%'
28632
28571
  }
28633
- }, React.createElement(Title$3, null, "Quests"), React.createElement("hr", {
28572
+ }, React.createElement(Title$2, null, "Quests"), React.createElement("hr", {
28634
28573
  className: "golden"
28635
28574
  }), React.createElement(QuestListContainer, null, quests ? quests.map(function (quest, i) {
28636
28575
  return React.createElement("div", {
@@ -28651,7 +28590,7 @@ var QuestDraggableContainer$1 = /*#__PURE__*/styled(DraggableContainer).withConf
28651
28590
  displayName: "QuestList__QuestDraggableContainer",
28652
28591
  componentId: "sc-1a2vx6q-0"
28653
28592
  })([".container-close{top:10px;right:10px;}.quest-title{text-align:left;margin-left:44px;margin-top:20px;color:yellow;}.quest-desc{margin-top:12px;margin-left:44px;}.rpgui-progress{min-width:80%;margin:0 auto;}"]);
28654
- var Title$3 = /*#__PURE__*/styled.h1.withConfig({
28593
+ var Title$2 = /*#__PURE__*/styled.h1.withConfig({
28655
28594
  displayName: "QuestList__Title",
28656
28595
  componentId: "sc-1a2vx6q-1"
28657
28596
  })(["z-index:22;font-size:", " !important;color:yellow !important;"], uiFonts.size.medium);
@@ -28664,6 +28603,15 @@ var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
28664
28603
  componentId: "sc-1a2vx6q-3"
28665
28604
  })(["text-align:center;p{margin-top:5px;}"]);
28666
28605
 
28606
+ //@ts-ignore
28607
+ var _RPGUI = RPGUI;
28608
+ var RPGUIRoot = function RPGUIRoot(_ref) {
28609
+ var children = _ref.children;
28610
+ return React.createElement("div", {
28611
+ className: "rpgui-content"
28612
+ }, children);
28613
+ };
28614
+
28667
28615
  var InputRadio = function InputRadio(_ref) {
28668
28616
  var name = _ref.name,
28669
28617
  items = _ref.items,
@@ -28696,15 +28644,6 @@ var InputRadio = function InputRadio(_ref) {
28696
28644
  }));
28697
28645
  };
28698
28646
 
28699
- //@ts-ignore
28700
- var _RPGUI = RPGUI;
28701
- var RPGUIRoot = function RPGUIRoot(_ref) {
28702
- var children = _ref.children;
28703
- return React.createElement("div", {
28704
- className: "rpgui-content"
28705
- }, children);
28706
- };
28707
-
28708
28647
  var RangeSliderType;
28709
28648
  (function (RangeSliderType) {
28710
28649
  RangeSliderType["Slider"] = "rpgui-slider";
@@ -28740,26 +28679,6 @@ var Input$1 = /*#__PURE__*/styled.input.withConfig({
28740
28679
  componentId: "sc-v8mte9-0"
28741
28680
  })(["opacity:0;"]);
28742
28681
 
28743
- var ServerSelection = function ServerSelection(_ref) {
28744
- var onChange = _ref.onChange,
28745
- servers = _ref.servers,
28746
- details = _ref.details;
28747
- return React.createElement("div", null, React.createElement("p", null, "Select server"), React.createElement(Dropdown, {
28748
- options: servers.map(function (server, index) {
28749
- return {
28750
- option: server.name,
28751
- value: server.id,
28752
- id: index
28753
- };
28754
- }),
28755
- onChange: onChange
28756
- }), React.createElement(Details, null, details));
28757
- };
28758
- var Details = /*#__PURE__*/styled.p.withConfig({
28759
- displayName: "ServerSelection__Details",
28760
- componentId: "sc-ee18vv-0"
28761
- })(["font-size:", " !important;"], uiFonts.size.xsmall);
28762
-
28763
28682
  var SimpleProgressBar = function SimpleProgressBar(_ref) {
28764
28683
  var value = _ref.value,
28765
28684
  _ref$bgColor = _ref.bgColor,
@@ -29160,7 +29079,7 @@ var TradingMenu = function TradingMenu(_ref) {
29160
29079
  style: {
29161
29080
  width: '100%'
29162
29081
  }
29163
- }, React.createElement(Title$4, null, Capitalize(type), " Menu"), React.createElement("hr", {
29082
+ }, React.createElement(Title$3, null, Capitalize(type), " Menu"), React.createElement("hr", {
29164
29083
  className: "golden"
29165
29084
  })), React.createElement(TradingComponentScrollWrapper, null, traderItems.map(function (tradeItem, index) {
29166
29085
  var _qtyMap$get;
@@ -29173,7 +29092,7 @@ var TradingMenu = function TradingMenu(_ref) {
29173
29092
  traderItem: tradeItem,
29174
29093
  selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0
29175
29094
  }));
29176
- })), React.createElement(GoldWrapper, null, React.createElement("p", null, "Available Gold:"), React.createElement("p", null, "$", characterAvailableGold)), React.createElement(TotalWrapper, null, React.createElement("p", null, "Total:"), React.createElement("p", null, "$", sum)), !hasGoldForSale() ? React.createElement(AlertWrapper, null, React.createElement("p", null, " Sorry, not enough money.")) : React.createElement(GoldWrapper, null, React.createElement("p", null, "Final Gold:"), React.createElement("p", null, "$", getFinalGold())), React.createElement(ButtonWrapper$1, null, React.createElement(Button, {
29095
+ })), React.createElement(GoldWrapper, null, React.createElement("p", null, "Available Gold:"), React.createElement("p", null, "$", characterAvailableGold)), React.createElement(TotalWrapper, null, React.createElement("p", null, "Total:"), React.createElement("p", null, "$", sum)), !hasGoldForSale() ? React.createElement(AlertWrapper, null, React.createElement("p", null, " Sorry, not enough money.")) : React.createElement(GoldWrapper, null, React.createElement("p", null, "Final Gold:"), React.createElement("p", null, "$", getFinalGold())), React.createElement(ButtonWrapper, null, React.createElement(Button, {
29177
29096
  buttonType: ButtonTypes.RPGUIButton,
29178
29097
  disabled: !hasGoldForSale(),
29179
29098
  onClick: function onClick() {
@@ -29186,7 +29105,7 @@ var TradingMenu = function TradingMenu(_ref) {
29186
29105
  }
29187
29106
  }, "Cancel"))));
29188
29107
  };
29189
- var Title$4 = /*#__PURE__*/styled.h1.withConfig({
29108
+ var Title$3 = /*#__PURE__*/styled.h1.withConfig({
29190
29109
  displayName: "TradingMenu__Title",
29191
29110
  componentId: "sc-1wjsz1l-0"
29192
29111
  })(["z-index:22;font-size:0.6rem;color:yellow !important;"]);
@@ -29210,7 +29129,7 @@ var AlertWrapper = /*#__PURE__*/styled.div.withConfig({
29210
29129
  displayName: "TradingMenu__AlertWrapper",
29211
29130
  componentId: "sc-1wjsz1l-5"
29212
29131
  })(["margin-top:1rem;display:flex;width:100%;justify-content:center;height:20px;p{color:red !important;}"]);
29213
- var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
29132
+ var ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
29214
29133
  displayName: "TradingMenu__ButtonWrapper",
29215
29134
  componentId: "sc-1wjsz1l-6"
29216
29135
  })(["display:flex;justify-content:space-around;padding-top:20px;width:100%;margin-top:1rem;"]);
@@ -29231,5 +29150,91 @@ var Container$i = /*#__PURE__*/styled.div.withConfig({
29231
29150
  return props.maxLines;
29232
29151
  });
29233
29152
 
29234
- export { Button, ButtonTypes, CharacterSelection, Chat, CheckButton, DraggableContainer, Dropdown, DynamicText, EquipmentSet, HistoryDialog, ImgSide, Input, InputRadio, ItemContainer, ItemSelector, ItemSlot, ListMenu, NPCDialog, NPCDialogType, NPCMultiDialog, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, ServerSelection, SkillProgressBar, SkillsContainer, SpriteFromAtlas, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, useEventListener };
29153
+ var ItemSelector = function ItemSelector(_ref) {
29154
+ var atlasIMG = _ref.atlasIMG,
29155
+ atlasJSON = _ref.atlasJSON,
29156
+ options = _ref.options,
29157
+ onClose = _ref.onClose,
29158
+ onSelect = _ref.onSelect;
29159
+ var _useState = useState(),
29160
+ selectedValue = _useState[0],
29161
+ setSelectedValue = _useState[1];
29162
+ var handleClick = function handleClick() {
29163
+ var element = document.querySelector("input[name='test']:checked");
29164
+ var elementValue = element.value;
29165
+ setSelectedValue(elementValue);
29166
+ };
29167
+ useEffect(function () {
29168
+ if (selectedValue) {
29169
+ onSelect(selectedValue);
29170
+ }
29171
+ }, [selectedValue]);
29172
+ return React.createElement(DraggableContainer, {
29173
+ type: RPGUIContainerTypes.Framed,
29174
+ width: "500px",
29175
+ cancelDrag: ".equipment-container-body .arrow-selector",
29176
+ onCloseButton: function onCloseButton() {
29177
+ if (onClose) {
29178
+ onClose();
29179
+ }
29180
+ }
29181
+ }, React.createElement("div", {
29182
+ style: {
29183
+ width: '100%'
29184
+ }
29185
+ }, React.createElement(Title$4, null, 'Harvesting instruments'), React.createElement(Subtitle, null, 'Use the tool, you need it'), React.createElement("hr", {
29186
+ className: "golden"
29187
+ })), React.createElement(RadioInputScroller, null, options == null ? void 0 : options.map(function (option, index) {
29188
+ return React.createElement(RadioOptionsWrapper, {
29189
+ key: index
29190
+ }, React.createElement(SpriteAtlasWrapper, null, React.createElement(SpriteFromAtlas, {
29191
+ atlasIMG: atlasIMG,
29192
+ atlasJSON: atlasJSON,
29193
+ spriteKey: option.imageKey,
29194
+ imgScale: 3
29195
+ })), React.createElement("div", null, React.createElement("input", {
29196
+ className: "rpgui-radio",
29197
+ type: "radio",
29198
+ value: option.name,
29199
+ name: "test"
29200
+ }), React.createElement("label", {
29201
+ onClick: handleClick,
29202
+ style: {
29203
+ display: 'flex',
29204
+ alignItems: 'center'
29205
+ }
29206
+ }, option.name, " ", React.createElement("br", null), option.description)));
29207
+ })), React.createElement(ButtonWrapper$1, null, React.createElement(Button, {
29208
+ buttonType: ButtonTypes.RPGUIButton,
29209
+ onClick: onClose
29210
+ }, "Cancel"), React.createElement(Button, {
29211
+ buttonType: ButtonTypes.RPGUIButton
29212
+ }, "Select")));
29213
+ };
29214
+ var Title$4 = /*#__PURE__*/styled.h1.withConfig({
29215
+ displayName: "ItemSelector__Title",
29216
+ componentId: "sc-gptoxp-0"
29217
+ })(["font-size:0.6rem;color:yellow !important;"]);
29218
+ var Subtitle = /*#__PURE__*/styled.h1.withConfig({
29219
+ displayName: "ItemSelector__Subtitle",
29220
+ componentId: "sc-gptoxp-1"
29221
+ })(["font-size:0.4rem;color:yellow !important;"]);
29222
+ var RadioInputScroller = /*#__PURE__*/styled.div.withConfig({
29223
+ displayName: "ItemSelector__RadioInputScroller",
29224
+ componentId: "sc-gptoxp-2"
29225
+ })(["width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
29226
+ var SpriteAtlasWrapper = /*#__PURE__*/styled.div.withConfig({
29227
+ displayName: "ItemSelector__SpriteAtlasWrapper",
29228
+ componentId: "sc-gptoxp-3"
29229
+ })(["margin-right:40px;"]);
29230
+ var RadioOptionsWrapper = /*#__PURE__*/styled.div.withConfig({
29231
+ displayName: "ItemSelector__RadioOptionsWrapper",
29232
+ componentId: "sc-gptoxp-4"
29233
+ })(["display:flex;align-items:stretch;margin-bottom:40px;"]);
29234
+ var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
29235
+ displayName: "ItemSelector__ButtonWrapper",
29236
+ componentId: "sc-gptoxp-5"
29237
+ })(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
29238
+
29239
+ export { Button, ButtonTypes, CharacterSelection, Chat, CheckButton, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, HistoryDialog, ImgSide, Input, InputRadio, ItemContainer, ItemSelector, ItemSlot, ListMenu, NPCDialog, NPCDialogType, NPCMultiDialog, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, SkillProgressBar, SkillsContainer, SpriteFromAtlas, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, useEventListener };
29235
29240
  //# sourceMappingURL=long-bow.esm.js.map