@rpg-engine/long-bow 0.2.63 → 0.2.64

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.
@@ -27318,6 +27318,27 @@ var DropdownOptions = /*#__PURE__*/styled.ul.withConfig({
27318
27318
  return props.opened ? 'block' : 'none';
27319
27319
  });
27320
27320
 
27321
+ var DropdownSelectorContainer = function DropdownSelectorContainer(_ref) {
27322
+ var title = _ref.title,
27323
+ onChange = _ref.onChange,
27324
+ options = _ref.options,
27325
+ details = _ref.details;
27326
+ return React.createElement("div", null, React.createElement("p", null, title), React.createElement(Dropdown, {
27327
+ options: options.map(function (option, index) {
27328
+ return {
27329
+ option: option.name,
27330
+ value: option.id,
27331
+ id: index
27332
+ };
27333
+ }),
27334
+ onChange: onChange
27335
+ }), React.createElement(Details, null, details));
27336
+ };
27337
+ var Details = /*#__PURE__*/styled.p.withConfig({
27338
+ displayName: "DropdownSelectorContainer__Details",
27339
+ componentId: "sc-kaa0h9-0"
27340
+ })(["font-size:", " !important;"], uiFonts.size.xsmall);
27341
+
27321
27342
  var RelativeListMenu = function RelativeListMenu(_ref) {
27322
27343
  var options = _ref.options,
27323
27344
  onSelected = _ref.onSelected,
@@ -28321,92 +28342,6 @@ var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
28321
28342
  componentId: "sc-15y5p9l-0"
28322
28343
  })(["max-width:280px;display:flex;justify-content:center;flex-wrap:wrap;"]);
28323
28344
 
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
28345
  var ListMenu = function ListMenu(_ref) {
28411
28346
  var options = _ref.options,
28412
28347
  onSelected = _ref.onSelected,
@@ -28542,7 +28477,7 @@ var QuestInfo = function QuestInfo(_ref) {
28542
28477
  onTouchStart: onRightClick
28543
28478
  }), React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
28544
28479
  className: "drag-handler"
28545
- }, React.createElement(Title$2, null, React.createElement(Thumbnail, {
28480
+ }, React.createElement(Title$1, null, React.createElement(Thumbnail, {
28546
28481
  src: quests[currentIndex].thumbnail || img$8
28547
28482
  }), quests[currentIndex].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
28548
28483
  className: "golden"
@@ -28561,7 +28496,7 @@ var QuestInfo = function QuestInfo(_ref) {
28561
28496
  }, button.title);
28562
28497
  })))) : React.createElement(QuestsContainer, null, React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
28563
28498
  className: "drag-handler"
28564
- }, React.createElement(Title$2, null, React.createElement(Thumbnail, {
28499
+ }, React.createElement(Title$1, null, React.createElement(Thumbnail, {
28565
28500
  src: quests[0].thumbnail || img$8
28566
28501
  }), quests[0].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
28567
28502
  className: "golden"
@@ -28608,7 +28543,7 @@ var TitleContainer$1 = /*#__PURE__*/styled.div.withConfig({
28608
28543
  displayName: "QuestInfo__TitleContainer",
28609
28544
  componentId: "sc-15s2boc-6"
28610
28545
  })(["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({
28546
+ var Title$1 = /*#__PURE__*/styled.h1.withConfig({
28612
28547
  displayName: "QuestInfo__Title",
28613
28548
  componentId: "sc-15s2boc-7"
28614
28549
  })(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
@@ -28630,7 +28565,7 @@ var QuestList = function QuestList(_ref) {
28630
28565
  style: {
28631
28566
  width: '100%'
28632
28567
  }
28633
- }, React.createElement(Title$3, null, "Quests"), React.createElement("hr", {
28568
+ }, React.createElement(Title$2, null, "Quests"), React.createElement("hr", {
28634
28569
  className: "golden"
28635
28570
  }), React.createElement(QuestListContainer, null, quests ? quests.map(function (quest, i) {
28636
28571
  return React.createElement("div", {
@@ -28651,7 +28586,7 @@ var QuestDraggableContainer$1 = /*#__PURE__*/styled(DraggableContainer).withConf
28651
28586
  displayName: "QuestList__QuestDraggableContainer",
28652
28587
  componentId: "sc-1a2vx6q-0"
28653
28588
  })([".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({
28589
+ var Title$2 = /*#__PURE__*/styled.h1.withConfig({
28655
28590
  displayName: "QuestList__Title",
28656
28591
  componentId: "sc-1a2vx6q-1"
28657
28592
  })(["z-index:22;font-size:", " !important;color:yellow !important;"], uiFonts.size.medium);
@@ -28664,6 +28599,15 @@ var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
28664
28599
  componentId: "sc-1a2vx6q-3"
28665
28600
  })(["text-align:center;p{margin-top:5px;}"]);
28666
28601
 
28602
+ //@ts-ignore
28603
+ var _RPGUI = RPGUI;
28604
+ var RPGUIRoot = function RPGUIRoot(_ref) {
28605
+ var children = _ref.children;
28606
+ return React.createElement("div", {
28607
+ className: "rpgui-content"
28608
+ }, children);
28609
+ };
28610
+
28667
28611
  var InputRadio = function InputRadio(_ref) {
28668
28612
  var name = _ref.name,
28669
28613
  items = _ref.items,
@@ -28696,15 +28640,6 @@ var InputRadio = function InputRadio(_ref) {
28696
28640
  }));
28697
28641
  };
28698
28642
 
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
28643
  var RangeSliderType;
28709
28644
  (function (RangeSliderType) {
28710
28645
  RangeSliderType["Slider"] = "rpgui-slider";
@@ -28740,26 +28675,6 @@ var Input$1 = /*#__PURE__*/styled.input.withConfig({
28740
28675
  componentId: "sc-v8mte9-0"
28741
28676
  })(["opacity:0;"]);
28742
28677
 
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
28678
  var SimpleProgressBar = function SimpleProgressBar(_ref) {
28764
28679
  var value = _ref.value,
28765
28680
  _ref$bgColor = _ref.bgColor,
@@ -29160,7 +29075,7 @@ var TradingMenu = function TradingMenu(_ref) {
29160
29075
  style: {
29161
29076
  width: '100%'
29162
29077
  }
29163
- }, React.createElement(Title$4, null, Capitalize(type), " Menu"), React.createElement("hr", {
29078
+ }, React.createElement(Title$3, null, Capitalize(type), " Menu"), React.createElement("hr", {
29164
29079
  className: "golden"
29165
29080
  })), React.createElement(TradingComponentScrollWrapper, null, traderItems.map(function (tradeItem, index) {
29166
29081
  var _qtyMap$get;
@@ -29173,7 +29088,7 @@ var TradingMenu = function TradingMenu(_ref) {
29173
29088
  traderItem: tradeItem,
29174
29089
  selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0
29175
29090
  }));
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, {
29091
+ })), 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
29092
  buttonType: ButtonTypes.RPGUIButton,
29178
29093
  disabled: !hasGoldForSale(),
29179
29094
  onClick: function onClick() {
@@ -29186,7 +29101,7 @@ var TradingMenu = function TradingMenu(_ref) {
29186
29101
  }
29187
29102
  }, "Cancel"))));
29188
29103
  };
29189
- var Title$4 = /*#__PURE__*/styled.h1.withConfig({
29104
+ var Title$3 = /*#__PURE__*/styled.h1.withConfig({
29190
29105
  displayName: "TradingMenu__Title",
29191
29106
  componentId: "sc-1wjsz1l-0"
29192
29107
  })(["z-index:22;font-size:0.6rem;color:yellow !important;"]);
@@ -29210,7 +29125,7 @@ var AlertWrapper = /*#__PURE__*/styled.div.withConfig({
29210
29125
  displayName: "TradingMenu__AlertWrapper",
29211
29126
  componentId: "sc-1wjsz1l-5"
29212
29127
  })(["margin-top:1rem;display:flex;width:100%;justify-content:center;height:20px;p{color:red !important;}"]);
29213
- var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
29128
+ var ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
29214
29129
  displayName: "TradingMenu__ButtonWrapper",
29215
29130
  componentId: "sc-1wjsz1l-6"
29216
29131
  })(["display:flex;justify-content:space-around;padding-top:20px;width:100%;margin-top:1rem;"]);
@@ -29231,5 +29146,91 @@ var Container$i = /*#__PURE__*/styled.div.withConfig({
29231
29146
  return props.maxLines;
29232
29147
  });
29233
29148
 
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 };
29149
+ var ItemSelector = function ItemSelector(_ref) {
29150
+ var atlasIMG = _ref.atlasIMG,
29151
+ atlasJSON = _ref.atlasJSON,
29152
+ options = _ref.options,
29153
+ onClose = _ref.onClose,
29154
+ onSelect = _ref.onSelect;
29155
+ var _useState = useState(),
29156
+ selectedValue = _useState[0],
29157
+ setSelectedValue = _useState[1];
29158
+ var handleClick = function handleClick() {
29159
+ var element = document.querySelector("input[name='test']:checked");
29160
+ var elementValue = element.value;
29161
+ setSelectedValue(elementValue);
29162
+ };
29163
+ useEffect(function () {
29164
+ if (selectedValue) {
29165
+ onSelect(selectedValue);
29166
+ }
29167
+ }, [selectedValue]);
29168
+ return React.createElement(DraggableContainer, {
29169
+ type: RPGUIContainerTypes.Framed,
29170
+ width: "500px",
29171
+ cancelDrag: ".equipment-container-body .arrow-selector",
29172
+ onCloseButton: function onCloseButton() {
29173
+ if (onClose) {
29174
+ onClose();
29175
+ }
29176
+ }
29177
+ }, React.createElement("div", {
29178
+ style: {
29179
+ width: '100%'
29180
+ }
29181
+ }, React.createElement(Title$4, null, 'Harvesting instruments'), React.createElement(Subtitle, null, 'Use the tool, you need it'), React.createElement("hr", {
29182
+ className: "golden"
29183
+ })), React.createElement(RadioInputScroller, null, options == null ? void 0 : options.map(function (option, index) {
29184
+ return React.createElement(RadioOptionsWrapper, {
29185
+ key: index
29186
+ }, React.createElement(SpriteAtlasWrapper, null, React.createElement(SpriteFromAtlas, {
29187
+ atlasIMG: atlasIMG,
29188
+ atlasJSON: atlasJSON,
29189
+ spriteKey: option.imageKey,
29190
+ imgScale: 3
29191
+ })), React.createElement("div", null, React.createElement("input", {
29192
+ className: "rpgui-radio",
29193
+ type: "radio",
29194
+ value: option.name,
29195
+ name: "test"
29196
+ }), React.createElement("label", {
29197
+ onClick: handleClick,
29198
+ style: {
29199
+ display: 'flex',
29200
+ alignItems: 'center'
29201
+ }
29202
+ }, option.name, " ", React.createElement("br", null), option.description)));
29203
+ })), React.createElement(ButtonWrapper$1, null, React.createElement(Button, {
29204
+ buttonType: ButtonTypes.RPGUIButton,
29205
+ onClick: onClose
29206
+ }, "Cancel"), React.createElement(Button, {
29207
+ buttonType: ButtonTypes.RPGUIButton
29208
+ }, "Select")));
29209
+ };
29210
+ var Title$4 = /*#__PURE__*/styled.h1.withConfig({
29211
+ displayName: "ItemSelector__Title",
29212
+ componentId: "sc-gptoxp-0"
29213
+ })(["font-size:0.6rem;color:yellow !important;"]);
29214
+ var Subtitle = /*#__PURE__*/styled.h1.withConfig({
29215
+ displayName: "ItemSelector__Subtitle",
29216
+ componentId: "sc-gptoxp-1"
29217
+ })(["font-size:0.4rem;color:yellow !important;"]);
29218
+ var RadioInputScroller = /*#__PURE__*/styled.div.withConfig({
29219
+ displayName: "ItemSelector__RadioInputScroller",
29220
+ componentId: "sc-gptoxp-2"
29221
+ })(["width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
29222
+ var SpriteAtlasWrapper = /*#__PURE__*/styled.div.withConfig({
29223
+ displayName: "ItemSelector__SpriteAtlasWrapper",
29224
+ componentId: "sc-gptoxp-3"
29225
+ })(["margin-right:40px;"]);
29226
+ var RadioOptionsWrapper = /*#__PURE__*/styled.div.withConfig({
29227
+ displayName: "ItemSelector__RadioOptionsWrapper",
29228
+ componentId: "sc-gptoxp-4"
29229
+ })(["display:flex;align-items:stretch;margin-bottom:40px;"]);
29230
+ var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
29231
+ displayName: "ItemSelector__ButtonWrapper",
29232
+ componentId: "sc-gptoxp-5"
29233
+ })(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
29234
+
29235
+ 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
29236
  //# sourceMappingURL=long-bow.esm.js.map