@rpg-engine/long-bow 0.2.71 → 0.2.73

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/index.d.ts CHANGED
@@ -9,9 +9,9 @@ export * from './components/DropdownSelectorContainer';
9
9
  export * from './components/Equipment/EquipmentSet';
10
10
  export * from './components/HistoryDialog';
11
11
  export * from './components/Input';
12
+ export { ErrorBoundary } from './components/Item/Inventory/ErrorBoundary';
12
13
  export * from './components/Item/Inventory/ItemContainer';
13
14
  export * from './components/Item/Inventory/ItemSlot';
14
- export * from './components/itemSelector/ItemSelector';
15
15
  export * from './components/ListMenu';
16
16
  export * from './components/NPCDialog/NPCDialog';
17
17
  export * from './components/NPCDialog/NPCMultiDialog';
@@ -20,16 +20,17 @@ export * from './components/ProgressBar';
20
20
  export * from './components/PropertySelect/PropertySelect';
21
21
  export * from './components/QuestInfo/QuestInfo';
22
22
  export * from './components/QuestList';
23
- export * from './components/RadioButton';
24
- export * from './components/RangeSlider';
25
23
  export * from './components/RPGUIContainer';
26
24
  export * from './components/RPGUIRoot';
27
- export * from './components/shared/SpriteFromAtlas';
25
+ export * from './components/RadioButton';
26
+ export * from './components/RangeSlider';
28
27
  export * from './components/SkillProgressBar';
29
28
  export * from './components/SkillsContainer';
30
29
  export * from './components/TextArea';
31
30
  export * from './components/TimeWidget/TimeWidget';
32
31
  export * from './components/TradingMenu/TradingMenu';
33
32
  export * from './components/Truncate';
33
+ export * from './components/itemSelector/ItemSelector';
34
+ export * from './components/shared/SpriteFromAtlas';
34
35
  export * from './components/typography/DynamicText';
35
36
  export { useEventListener } from './hooks/useEventListener';
@@ -28228,7 +28228,7 @@ var NPCDialog = function NPCDialog(_ref) {
28228
28228
  answers = _ref.answers;
28229
28229
  return React__default.createElement(RPGUIContainer, {
28230
28230
  type: exports.RPGUIContainerTypes.FramedGold,
28231
- width: isQuestionDialog ? '600px' : '50%',
28231
+ width: isQuestionDialog ? '600px' : '80%',
28232
28232
  height: '180px'
28233
28233
  }, isQuestionDialog && questions && answers ? React__default.createElement(React__default.Fragment, null, React__default.createElement(TextContainer$1, {
28234
28234
  flex: type === exports.NPCDialogType.TextAndThumbnail ? '70%' : '100%'
@@ -28523,92 +28523,6 @@ var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
28523
28523
  componentId: "sc-15y5p9l-0"
28524
28524
  })(["max-width:280px;display:flex;justify-content:center;flex-wrap:wrap;"]);
28525
28525
 
28526
- var ItemSelector = function ItemSelector(_ref) {
28527
- var atlasIMG = _ref.atlasIMG,
28528
- atlasJSON = _ref.atlasJSON,
28529
- options = _ref.options,
28530
- onClose = _ref.onClose,
28531
- onSelect = _ref.onSelect;
28532
- var _useState = React.useState(),
28533
- selectedValue = _useState[0],
28534
- setSelectedValue = _useState[1];
28535
- var handleClick = function handleClick() {
28536
- var element = document.querySelector("input[name='test']:checked");
28537
- var elementValue = element.value;
28538
- setSelectedValue(elementValue);
28539
- };
28540
- React.useEffect(function () {
28541
- if (selectedValue) {
28542
- onSelect(selectedValue);
28543
- }
28544
- }, [selectedValue]);
28545
- return React__default.createElement(DraggableContainer, {
28546
- type: exports.RPGUIContainerTypes.Framed,
28547
- width: "500px",
28548
- cancelDrag: ".equipment-container-body .arrow-selector",
28549
- onCloseButton: function onCloseButton() {
28550
- if (onClose) {
28551
- onClose();
28552
- }
28553
- }
28554
- }, React__default.createElement("div", {
28555
- style: {
28556
- width: '100%'
28557
- }
28558
- }, React__default.createElement(Title$2, null, 'Harvesting instruments'), React__default.createElement(Subtitle$1, null, 'Use the tool, you need it'), React__default.createElement("hr", {
28559
- className: "golden"
28560
- })), React__default.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
28561
- return React__default.createElement(RadioOptionsWrapper$1, {
28562
- key: index
28563
- }, React__default.createElement(SpriteAtlasWrapper$1, null, React__default.createElement(SpriteFromAtlas, {
28564
- atlasIMG: atlasIMG,
28565
- atlasJSON: atlasJSON,
28566
- spriteKey: option.imageKey,
28567
- imgScale: 3
28568
- })), React__default.createElement("div", null, React__default.createElement("input", {
28569
- className: "rpgui-radio",
28570
- type: "radio",
28571
- value: option.name,
28572
- name: "test"
28573
- }), React__default.createElement("label", {
28574
- onClick: handleClick,
28575
- style: {
28576
- display: 'flex',
28577
- alignItems: 'center'
28578
- }
28579
- }, option.name, " ", React__default.createElement("br", null), option.description)));
28580
- })), React__default.createElement(ButtonWrapper$1, null, React__default.createElement(Button, {
28581
- buttonType: exports.ButtonTypes.RPGUIButton,
28582
- onClick: onClose
28583
- }, "Cancel"), React__default.createElement(Button, {
28584
- buttonType: exports.ButtonTypes.RPGUIButton
28585
- }, "Select")));
28586
- };
28587
- var Title$2 = /*#__PURE__*/styled.h1.withConfig({
28588
- displayName: "ItemSelector__Title",
28589
- componentId: "sc-gptoxp-0"
28590
- })(["font-size:0.6rem;color:yellow !important;"]);
28591
- var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
28592
- displayName: "ItemSelector__Subtitle",
28593
- componentId: "sc-gptoxp-1"
28594
- })(["font-size:0.4rem;color:yellow !important;"]);
28595
- var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
28596
- displayName: "ItemSelector__RadioInputScroller",
28597
- componentId: "sc-gptoxp-2"
28598
- })(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
28599
- var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
28600
- displayName: "ItemSelector__SpriteAtlasWrapper",
28601
- componentId: "sc-gptoxp-3"
28602
- })(["margin-right:40px;"]);
28603
- var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
28604
- displayName: "ItemSelector__RadioOptionsWrapper",
28605
- componentId: "sc-gptoxp-4"
28606
- })(["display:flex;align-items:stretch;margin-bottom:40px;"]);
28607
- var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
28608
- displayName: "ItemSelector__ButtonWrapper",
28609
- componentId: "sc-gptoxp-5"
28610
- })(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
28611
-
28612
28526
  var ListMenu = function ListMenu(_ref) {
28613
28527
  var options = _ref.options,
28614
28528
  onSelected = _ref.onSelected,
@@ -28744,7 +28658,7 @@ var QuestInfo = function QuestInfo(_ref) {
28744
28658
  onTouchStart: onRightClick
28745
28659
  }), React__default.createElement(QuestContainer, null, React__default.createElement(TitleContainer$1, {
28746
28660
  className: "drag-handler"
28747
- }, React__default.createElement(Title$3, null, React__default.createElement(Thumbnail, {
28661
+ }, React__default.createElement(Title$2, null, React__default.createElement(Thumbnail, {
28748
28662
  src: quests[currentIndex].thumbnail || img$9
28749
28663
  }), quests[currentIndex].title), React__default.createElement(QuestSplitDiv, null, React__default.createElement("hr", {
28750
28664
  className: "golden"
@@ -28763,7 +28677,7 @@ var QuestInfo = function QuestInfo(_ref) {
28763
28677
  }, button.title);
28764
28678
  })))) : React__default.createElement(QuestsContainer, null, React__default.createElement(QuestContainer, null, React__default.createElement(TitleContainer$1, {
28765
28679
  className: "drag-handler"
28766
- }, React__default.createElement(Title$3, null, React__default.createElement(Thumbnail, {
28680
+ }, React__default.createElement(Title$2, null, React__default.createElement(Thumbnail, {
28767
28681
  src: quests[0].thumbnail || img$9
28768
28682
  }), quests[0].title), React__default.createElement(QuestSplitDiv, null, React__default.createElement("hr", {
28769
28683
  className: "golden"
@@ -28810,7 +28724,7 @@ var TitleContainer$1 = /*#__PURE__*/styled.div.withConfig({
28810
28724
  displayName: "QuestInfo__TitleContainer",
28811
28725
  componentId: "sc-15s2boc-6"
28812
28726
  })(["width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;margin-top:1rem;"]);
28813
- var Title$3 = /*#__PURE__*/styled.h1.withConfig({
28727
+ var Title$2 = /*#__PURE__*/styled.h1.withConfig({
28814
28728
  displayName: "QuestInfo__Title",
28815
28729
  componentId: "sc-15s2boc-7"
28816
28730
  })(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
@@ -28832,7 +28746,7 @@ var QuestList = function QuestList(_ref) {
28832
28746
  style: {
28833
28747
  width: '100%'
28834
28748
  }
28835
- }, React__default.createElement(Title$4, null, "Quests"), React__default.createElement("hr", {
28749
+ }, React__default.createElement(Title$3, null, "Quests"), React__default.createElement("hr", {
28836
28750
  className: "golden"
28837
28751
  }), React__default.createElement(QuestListContainer, null, quests ? quests.map(function (quest, i) {
28838
28752
  return React__default.createElement("div", {
@@ -28853,7 +28767,7 @@ var QuestDraggableContainer$1 = /*#__PURE__*/styled(DraggableContainer).withConf
28853
28767
  displayName: "QuestList__QuestDraggableContainer",
28854
28768
  componentId: "sc-1a2vx6q-0"
28855
28769
  })([".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;}"]);
28856
- var Title$4 = /*#__PURE__*/styled.h1.withConfig({
28770
+ var Title$3 = /*#__PURE__*/styled.h1.withConfig({
28857
28771
  displayName: "QuestList__Title",
28858
28772
  componentId: "sc-1a2vx6q-1"
28859
28773
  })(["z-index:22;font-size:", " !important;color:yellow !important;"], uiFonts.size.medium);
@@ -28866,6 +28780,15 @@ var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
28866
28780
  componentId: "sc-1a2vx6q-3"
28867
28781
  })(["text-align:center;p{margin-top:5px;}"]);
28868
28782
 
28783
+ //@ts-ignore
28784
+ var _RPGUI = RPGUI;
28785
+ var RPGUIRoot = function RPGUIRoot(_ref) {
28786
+ var children = _ref.children;
28787
+ return React__default.createElement("div", {
28788
+ className: "rpgui-content"
28789
+ }, children);
28790
+ };
28791
+
28869
28792
  var InputRadio = function InputRadio(_ref) {
28870
28793
  var name = _ref.name,
28871
28794
  items = _ref.items,
@@ -28898,15 +28821,6 @@ var InputRadio = function InputRadio(_ref) {
28898
28821
  }));
28899
28822
  };
28900
28823
 
28901
- //@ts-ignore
28902
- var _RPGUI = RPGUI;
28903
- var RPGUIRoot = function RPGUIRoot(_ref) {
28904
- var children = _ref.children;
28905
- return React__default.createElement("div", {
28906
- className: "rpgui-content"
28907
- }, children);
28908
- };
28909
-
28910
28824
  (function (RangeSliderType) {
28911
28825
  RangeSliderType["Slider"] = "rpgui-slider";
28912
28826
  RangeSliderType["GoldSlider"] = "rpgui-slider golden";
@@ -29341,7 +29255,7 @@ var TradingMenu = function TradingMenu(_ref) {
29341
29255
  style: {
29342
29256
  width: '100%'
29343
29257
  }
29344
- }, React__default.createElement(Title$5, null, Capitalize(type), " Menu"), React__default.createElement("hr", {
29258
+ }, React__default.createElement(Title$4, null, Capitalize(type), " Menu"), React__default.createElement("hr", {
29345
29259
  className: "golden"
29346
29260
  })), React__default.createElement(TradingComponentScrollWrapper, null, traderItems.map(function (tradeItem, index) {
29347
29261
  var _qtyMap$get;
@@ -29354,7 +29268,7 @@ var TradingMenu = function TradingMenu(_ref) {
29354
29268
  traderItem: tradeItem,
29355
29269
  selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0
29356
29270
  }));
29357
- })), React__default.createElement(GoldWrapper, null, React__default.createElement("p", null, "Available Gold:"), React__default.createElement("p", null, "$", characterAvailableGold)), React__default.createElement(TotalWrapper, null, React__default.createElement("p", null, "Total:"), React__default.createElement("p", null, "$", sum)), !hasGoldForSale() ? React__default.createElement(AlertWrapper, null, React__default.createElement("p", null, " Sorry, not enough money.")) : React__default.createElement(GoldWrapper, null, React__default.createElement("p", null, "Final Gold:"), React__default.createElement("p", null, "$", getFinalGold())), React__default.createElement(ButtonWrapper$2, null, React__default.createElement(Button, {
29271
+ })), React__default.createElement(GoldWrapper, null, React__default.createElement("p", null, "Available Gold:"), React__default.createElement("p", null, "$", characterAvailableGold)), React__default.createElement(TotalWrapper, null, React__default.createElement("p", null, "Total:"), React__default.createElement("p", null, "$", sum)), !hasGoldForSale() ? React__default.createElement(AlertWrapper, null, React__default.createElement("p", null, " Sorry, not enough money.")) : React__default.createElement(GoldWrapper, null, React__default.createElement("p", null, "Final Gold:"), React__default.createElement("p", null, "$", getFinalGold())), React__default.createElement(ButtonWrapper$1, null, React__default.createElement(Button, {
29358
29272
  buttonType: exports.ButtonTypes.RPGUIButton,
29359
29273
  disabled: !hasGoldForSale(),
29360
29274
  onClick: function onClick() {
@@ -29367,7 +29281,7 @@ var TradingMenu = function TradingMenu(_ref) {
29367
29281
  }
29368
29282
  }, "Cancel"))));
29369
29283
  };
29370
- var Title$5 = /*#__PURE__*/styled.h1.withConfig({
29284
+ var Title$4 = /*#__PURE__*/styled.h1.withConfig({
29371
29285
  displayName: "TradingMenu__Title",
29372
29286
  componentId: "sc-1wjsz1l-0"
29373
29287
  })(["z-index:22;font-size:0.6rem;color:yellow !important;"]);
@@ -29391,7 +29305,7 @@ var AlertWrapper = /*#__PURE__*/styled.div.withConfig({
29391
29305
  displayName: "TradingMenu__AlertWrapper",
29392
29306
  componentId: "sc-1wjsz1l-5"
29393
29307
  })(["margin-top:1rem;display:flex;width:100%;justify-content:center;height:20px;p{color:red !important;}"]);
29394
- var ButtonWrapper$2 = /*#__PURE__*/styled.div.withConfig({
29308
+ var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
29395
29309
  displayName: "TradingMenu__ButtonWrapper",
29396
29310
  componentId: "sc-1wjsz1l-6"
29397
29311
  })(["display:flex;justify-content:space-around;padding-top:20px;width:100%;margin-top:1rem;"]);
@@ -29412,6 +29326,92 @@ var Container$i = /*#__PURE__*/styled.div.withConfig({
29412
29326
  return props.maxLines;
29413
29327
  });
29414
29328
 
29329
+ var ItemSelector = function ItemSelector(_ref) {
29330
+ var atlasIMG = _ref.atlasIMG,
29331
+ atlasJSON = _ref.atlasJSON,
29332
+ options = _ref.options,
29333
+ onClose = _ref.onClose,
29334
+ onSelect = _ref.onSelect;
29335
+ var _useState = React.useState(),
29336
+ selectedValue = _useState[0],
29337
+ setSelectedValue = _useState[1];
29338
+ var handleClick = function handleClick() {
29339
+ var element = document.querySelector("input[name='test']:checked");
29340
+ var elementValue = element.value;
29341
+ setSelectedValue(elementValue);
29342
+ };
29343
+ React.useEffect(function () {
29344
+ if (selectedValue) {
29345
+ onSelect(selectedValue);
29346
+ }
29347
+ }, [selectedValue]);
29348
+ return React__default.createElement(DraggableContainer, {
29349
+ type: exports.RPGUIContainerTypes.Framed,
29350
+ width: "500px",
29351
+ cancelDrag: ".equipment-container-body .arrow-selector",
29352
+ onCloseButton: function onCloseButton() {
29353
+ if (onClose) {
29354
+ onClose();
29355
+ }
29356
+ }
29357
+ }, React__default.createElement("div", {
29358
+ style: {
29359
+ width: '100%'
29360
+ }
29361
+ }, React__default.createElement(Title$5, null, 'Harvesting instruments'), React__default.createElement(Subtitle$1, null, 'Use the tool, you need it'), React__default.createElement("hr", {
29362
+ className: "golden"
29363
+ })), React__default.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
29364
+ return React__default.createElement(RadioOptionsWrapper$1, {
29365
+ key: index
29366
+ }, React__default.createElement(SpriteAtlasWrapper$1, null, React__default.createElement(SpriteFromAtlas, {
29367
+ atlasIMG: atlasIMG,
29368
+ atlasJSON: atlasJSON,
29369
+ spriteKey: option.imageKey,
29370
+ imgScale: 3
29371
+ })), React__default.createElement("div", null, React__default.createElement("input", {
29372
+ className: "rpgui-radio",
29373
+ type: "radio",
29374
+ value: option.name,
29375
+ name: "test"
29376
+ }), React__default.createElement("label", {
29377
+ onClick: handleClick,
29378
+ style: {
29379
+ display: 'flex',
29380
+ alignItems: 'center'
29381
+ }
29382
+ }, option.name, " ", React__default.createElement("br", null), option.description)));
29383
+ })), React__default.createElement(ButtonWrapper$2, null, React__default.createElement(Button, {
29384
+ buttonType: exports.ButtonTypes.RPGUIButton,
29385
+ onClick: onClose
29386
+ }, "Cancel"), React__default.createElement(Button, {
29387
+ buttonType: exports.ButtonTypes.RPGUIButton
29388
+ }, "Select")));
29389
+ };
29390
+ var Title$5 = /*#__PURE__*/styled.h1.withConfig({
29391
+ displayName: "ItemSelector__Title",
29392
+ componentId: "sc-gptoxp-0"
29393
+ })(["font-size:0.6rem;color:yellow !important;"]);
29394
+ var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
29395
+ displayName: "ItemSelector__Subtitle",
29396
+ componentId: "sc-gptoxp-1"
29397
+ })(["font-size:0.4rem;color:yellow !important;"]);
29398
+ var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
29399
+ displayName: "ItemSelector__RadioInputScroller",
29400
+ componentId: "sc-gptoxp-2"
29401
+ })(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
29402
+ var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
29403
+ displayName: "ItemSelector__SpriteAtlasWrapper",
29404
+ componentId: "sc-gptoxp-3"
29405
+ })(["margin-right:40px;"]);
29406
+ var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
29407
+ displayName: "ItemSelector__RadioOptionsWrapper",
29408
+ componentId: "sc-gptoxp-4"
29409
+ })(["display:flex;align-items:stretch;margin-bottom:40px;"]);
29410
+ var ButtonWrapper$2 = /*#__PURE__*/styled.div.withConfig({
29411
+ displayName: "ItemSelector__ButtonWrapper",
29412
+ componentId: "sc-gptoxp-5"
29413
+ })(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
29414
+
29415
29415
  exports.Button = Button;
29416
29416
  exports.CharacterSelection = CharacterSelection;
29417
29417
  exports.Chat = Chat;
@@ -29422,6 +29422,7 @@ exports.Dropdown = Dropdown;
29422
29422
  exports.DropdownSelectorContainer = DropdownSelectorContainer;
29423
29423
  exports.DynamicText = DynamicText;
29424
29424
  exports.EquipmentSet = EquipmentSet;
29425
+ exports.ErrorBoundary = ErrorBoundary;
29425
29426
  exports.HistoryDialog = HistoryDialog;
29426
29427
  exports.Input = Input;
29427
29428
  exports.InputRadio = InputRadio;