@rpg-engine/long-bow 0.8.199 → 0.8.202

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.
@@ -40966,7 +40966,9 @@ var NPCDialogText = function NPCDialogText(_ref) {
40966
40966
  onClose = _ref.onClose,
40967
40967
  onEndStep = _ref.onEndStep,
40968
40968
  onStartStep = _ref.onStartStep,
40969
- type = _ref.type;
40969
+ type = _ref.type,
40970
+ _ref$isTranslated = _ref.isTranslated,
40971
+ isTranslated = _ref$isTranslated === void 0 ? false : _ref$isTranslated;
40970
40972
  var windowSize = useRef([window.innerWidth, window.innerHeight]);
40971
40973
  function maxCharacters(width) {
40972
40974
  // Set the font size to 16 pixels
@@ -40984,6 +40986,9 @@ var NPCDialogText = function NPCDialogText(_ref) {
40984
40986
  var _useState = useState(0),
40985
40987
  chunkIndex = _useState[0],
40986
40988
  setChunkIndex = _useState[1];
40989
+ useEffect(function () {
40990
+ setChunkIndex(0);
40991
+ }, [text]);
40987
40992
  var onHandleSpacePress = function onHandleSpacePress(event) {
40988
40993
  if (event.code === 'Space') {
40989
40994
  goToNextStep();
@@ -41009,7 +41014,14 @@ var NPCDialogText = function NPCDialogText(_ref) {
41009
41014
  var _useState2 = useState(false),
41010
41015
  showGoNextIndicator = _useState2[0],
41011
41016
  setShowGoNextIndicator = _useState2[1];
41012
- return React.createElement(Container$o, null, React.createElement(DynamicText, {
41017
+ useEffect(function () {
41018
+ setShowGoNextIndicator(isTranslated);
41019
+ if (isTranslated) {
41020
+ onStartStep && onStartStep();
41021
+ onEndStep && onEndStep();
41022
+ }
41023
+ }, [chunkIndex, isTranslated, onEndStep, onStartStep, text]);
41024
+ return React.createElement(Container$o, null, isTranslated ? React.createElement(TextContainer$1, null, (textChunks == null ? void 0 : textChunks[chunkIndex]) || '') : React.createElement(DynamicText, {
41013
41025
  text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
41014
41026
  onFinish: function onFinish() {
41015
41027
  setShowGoNextIndicator(true);
@@ -41020,7 +41032,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
41020
41032
  onStartStep && onStartStep();
41021
41033
  }
41022
41034
  }), showGoNextIndicator && React.createElement(PressSpaceIndicator, {
41023
- right: type === NPCDialogType.TextOnly ? '1rem' : '10.5rem',
41035
+ right: type === 'TextOnly' ? '1rem' : '10.5rem',
41024
41036
  src: IS_MOBILE_OR_TABLET ? img$5 : img$6,
41025
41037
  onPointerDown: function onPointerDown() {
41026
41038
  goToNextStep();
@@ -41031,9 +41043,13 @@ var Container$o = /*#__PURE__*/styled.div.withConfig({
41031
41043
  displayName: "NPCDialogText__Container",
41032
41044
  componentId: "sc-1cxkdh9-0"
41033
41045
  })([""]);
41046
+ var TextContainer$1 = /*#__PURE__*/styled.p.withConfig({
41047
+ displayName: "NPCDialogText__TextContainer",
41048
+ componentId: "sc-1cxkdh9-1"
41049
+ })(["font-size:0.7rem !important;color:white;text-shadow:1px 1px 0px #000000;letter-spacing:1.2px;word-break:normal;"]);
41034
41050
  var PressSpaceIndicator = /*#__PURE__*/styled.img.withConfig({
41035
41051
  displayName: "NPCDialogText__PressSpaceIndicator",
41036
- componentId: "sc-1cxkdh9-1"
41052
+ componentId: "sc-1cxkdh9-2"
41037
41053
  })(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref2) {
41038
41054
  var right = _ref2.right;
41039
41055
  return right;
@@ -41230,6 +41246,8 @@ var NPCDialog = function NPCDialog(_ref) {
41230
41246
  type = _ref.type,
41231
41247
  _onClose = _ref.onClose,
41232
41248
  imagePath = _ref.imagePath,
41249
+ _ref$isTranslated = _ref.isTranslated,
41250
+ isTranslated = _ref$isTranslated === void 0 ? false : _ref$isTranslated,
41233
41251
  _ref$isQuestionDialog = _ref.isQuestionDialog,
41234
41252
  isQuestionDialog = _ref$isQuestionDialog === void 0 ? false : _ref$isQuestionDialog,
41235
41253
  questions = _ref.questions,
@@ -41238,7 +41256,7 @@ var NPCDialog = function NPCDialog(_ref) {
41238
41256
  type: RPGUIContainerTypes.FramedGold,
41239
41257
  width: isQuestionDialog ? '600px' : '80%',
41240
41258
  height: '180px'
41241
- }, isQuestionDialog && questions && answers ? React.createElement(React.Fragment, null, React.createElement(TextContainer$1, {
41259
+ }, isQuestionDialog && questions && answers ? React.createElement(React.Fragment, null, React.createElement(TextContainer$2, {
41242
41260
  flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
41243
41261
  }, React.createElement(QuestionDialog, {
41244
41262
  questions: questions,
@@ -41252,11 +41270,12 @@ var NPCDialog = function NPCDialog(_ref) {
41252
41270
  src: imagePath || img$7
41253
41271
  }))) : React.createElement(React.Fragment, null, React.createElement(Container$q, null, React.createElement(CloseIcon, {
41254
41272
  onPointerDown: _onClose
41255
- }, "X"), React.createElement(TextContainer$1, {
41273
+ }, "X"), React.createElement(TextContainer$2, {
41256
41274
  flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
41257
41275
  }, React.createElement(NPCDialogText, {
41258
41276
  type: type,
41259
41277
  text: text || 'No text provided.',
41278
+ isTranslated: isTranslated,
41260
41279
  onClose: function onClose() {
41261
41280
  if (_onClose) {
41262
41281
  _onClose();
@@ -41274,7 +41293,7 @@ var CloseIcon = /*#__PURE__*/styled.p.withConfig({
41274
41293
  displayName: "NPCDialog__CloseIcon",
41275
41294
  componentId: "sc-1b4aw74-1"
41276
41295
  })(["position:absolute;top:-1.5rem;right:-0.4rem;cursor:pointer;color:white;font-size:1.1rem !important;"]);
41277
- var TextContainer$1 = /*#__PURE__*/styled.div.withConfig({
41296
+ var TextContainer$2 = /*#__PURE__*/styled.div.withConfig({
41278
41297
  displayName: "NPCDialog__TextContainer",
41279
41298
  componentId: "sc-1b4aw74-2"
41280
41299
  })(["flex:", " 0 0;width:355px;"], function (_ref2) {
@@ -41327,7 +41346,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
41327
41346
  type: RPGUIContainerTypes.FramedGold,
41328
41347
  width: '50%',
41329
41348
  height: '180px'
41330
- }, React.createElement(React.Fragment, null, React.createElement(Container$r, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React.createElement(React.Fragment, null, React.createElement(TextContainer$2, {
41349
+ }, React.createElement(React.Fragment, null, React.createElement(Container$r, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React.createElement(React.Fragment, null, React.createElement(TextContainer$3, {
41331
41350
  flex: '70%'
41332
41351
  }, React.createElement(NPCDialogText, {
41333
41352
  onStartStep: function onStartStep() {
@@ -41349,7 +41368,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
41349
41368
  src: img$6
41350
41369
  })), textAndTypeArray[slide].imageSide === 'left' && React.createElement(React.Fragment, null, React.createElement(ThumbnailContainer$1, null, React.createElement(NPCThumbnail$1, {
41351
41370
  src: textAndTypeArray[slide].imagePath || img$7
41352
- })), React.createElement(TextContainer$2, {
41371
+ })), React.createElement(TextContainer$3, {
41353
41372
  flex: '70%'
41354
41373
  }, React.createElement(NPCDialogText, {
41355
41374
  onStartStep: function onStartStep() {
@@ -41373,7 +41392,7 @@ var Container$r = /*#__PURE__*/styled.div.withConfig({
41373
41392
  displayName: "NPCMultiDialog__Container",
41374
41393
  componentId: "sc-rvu5wg-0"
41375
41394
  })(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
41376
- var TextContainer$2 = /*#__PURE__*/styled.div.withConfig({
41395
+ var TextContainer$3 = /*#__PURE__*/styled.div.withConfig({
41377
41396
  displayName: "NPCMultiDialog__TextContainer",
41378
41397
  componentId: "sc-rvu5wg-1"
41379
41398
  })(["flex:", " 0 0;width:355px;"], function (_ref2) {
@@ -46181,6 +46200,8 @@ var orderByOptions = /*#__PURE__*/Object.values(OrderByType).flatMap(function (o
46181
46200
  });
46182
46201
 
46183
46202
  var BUY_REQUESTS_PER_PAGE = 5;
46203
+ var MARKETPLACE_PANEL_HEIGHT = '390px';
46204
+ var MARKETPLACE_PANEL_MOBILE_HEIGHT = '250px';
46184
46205
  var formatBlueprintKey$1 = function formatBlueprintKey(key) {
46185
46206
  var name = key.includes('/') ? key.split('/').pop() : key;
46186
46207
  return name.replace(/[-_]/g, ' ').replace(/\b\w/g, function (c) {
@@ -46599,7 +46620,7 @@ var WrapperContainer$1 = /*#__PURE__*/styled.div.withConfig({
46599
46620
  var ItemComponentScrollWrapper$1 = /*#__PURE__*/styled.div.withConfig({
46600
46621
  displayName: "BuyPanel__ItemComponentScrollWrapper",
46601
46622
  componentId: "sc-1si8t7i-7"
46602
- })(["display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;max-height:390px;min-height:120px;width:95%;margin:1rem auto 0 auto;background:rgba(0,0,0,0.2);border:1px solid rgba(255,255,255,0.05);border-radius:4px;@media (max-width:950px){max-height:250px;}"]);
46623
+ })(["display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;height:", ";width:95%;margin:1rem auto 0 auto;background:rgba(0,0,0,0.2);border:1px solid rgba(255,255,255,0.05);border-radius:4px;@media (max-width:950px){height:", ";}"], MARKETPLACE_PANEL_HEIGHT, MARKETPLACE_PANEL_MOBILE_HEIGHT);
46603
46624
  var MarketSection = /*#__PURE__*/styled.div.withConfig({
46604
46625
  displayName: "BuyPanel__MarketSection",
46605
46626
  componentId: "sc-1si8t7i-8"
@@ -48782,7 +48803,7 @@ var PartyRow = function PartyRow(_ref) {
48782
48803
  playerQty = _ref.playerQty,
48783
48804
  isInvited = _ref.isInvited,
48784
48805
  partyName = _ref.partyName;
48785
- return React.createElement(PartyWrapper, null, React.createElement(TextContainer$3, null, partyName), React.createElement(TextContainer$3, null, charName), React.createElement(TextContainer$3, null, charClass), React.createElement(TextContainer$3, null, charLevel), React.createElement(TextContainer$3, null, playerQty, "/5"), isInvited ? React.createElement(React.Fragment, null, React.createElement(Button, {
48806
+ return React.createElement(PartyWrapper, null, React.createElement(TextContainer$4, null, partyName), React.createElement(TextContainer$4, null, charName), React.createElement(TextContainer$4, null, charClass), React.createElement(TextContainer$4, null, charLevel), React.createElement(TextContainer$4, null, playerQty, "/5"), isInvited ? React.createElement(React.Fragment, null, React.createElement(Button, {
48786
48807
  buttonType: ButtonTypes.RPGUIButton
48787
48808
  }, "Accept"), React.createElement("div", {
48788
48809
  className: "cancel-button"
@@ -48796,7 +48817,7 @@ var PartyWrapper = /*#__PURE__*/styled.div.withConfig({
48796
48817
  displayName: "PartyRows__PartyWrapper",
48797
48818
  componentId: "sc-xzuhrw-0"
48798
48819
  })(["width:100%;display:flex;align-items:center;justify-content:space-around;.cancel-button{filter:grayscale(0.7);}"]);
48799
- var TextContainer$3 = /*#__PURE__*/styled.div.withConfig({
48820
+ var TextContainer$4 = /*#__PURE__*/styled.div.withConfig({
48800
48821
  displayName: "PartyRows__TextContainer",
48801
48822
  componentId: "sc-xzuhrw-1"
48802
48823
  })(["color:", ";"], uiColors.white);
@@ -48852,15 +48873,15 @@ var PlayersRow = function PlayersRow(_ref) {
48852
48873
  charClass = _ref.charClass,
48853
48874
  charLevel = _ref.charLevel,
48854
48875
  isNotInvited = _ref.isNotInvited;
48855
- return React.createElement(PartyWrapper$1, null, React.createElement(TextContainer$4, null, charName), React.createElement(TextContainer$4, null, charClass), React.createElement(TextContainer$4, null, charLevel), isNotInvited ? React.createElement(React.Fragment, null, React.createElement(Button, {
48876
+ return React.createElement(PartyWrapper$1, null, React.createElement(TextContainer$5, null, charName), React.createElement(TextContainer$5, null, charClass), React.createElement(TextContainer$5, null, charLevel), isNotInvited ? React.createElement(React.Fragment, null, React.createElement(Button, {
48856
48877
  buttonType: ButtonTypes.RPGUIButton
48857
- }, "Invite")) : React.createElement(TextContainer$4, null, "Invited"));
48878
+ }, "Invite")) : React.createElement(TextContainer$5, null, "Invited"));
48858
48879
  };
48859
48880
  var PartyWrapper$1 = /*#__PURE__*/styled.div.withConfig({
48860
48881
  displayName: "PlayersRows__PartyWrapper",
48861
48882
  componentId: "sc-1ji7yc1-0"
48862
48883
  })(["width:100%;display:flex;align-items:center;justify-content:space-around;flex-direction:row;flex:auto;"]);
48863
- var TextContainer$4 = /*#__PURE__*/styled.div.withConfig({
48884
+ var TextContainer$5 = /*#__PURE__*/styled.div.withConfig({
48864
48885
  displayName: "PlayersRows__TextContainer",
48865
48886
  componentId: "sc-1ji7yc1-1"
48866
48887
  })(["color:", ";flex:auto;margin:auto;"], uiColors.white);
@@ -48929,10 +48950,10 @@ var PartyManagerRow = function PartyManagerRow(_ref) {
48929
48950
  onChangeLeader = _ref.onChangeLeader;
48930
48951
  var isCurrentUser = id === userId;
48931
48952
  var canRemove = leaderId === userId || isCurrentUser;
48932
- return React.createElement(PartyWrapper$2, null, React.createElement(TextContainer$5, null, React.createElement(Ellipsis, {
48953
+ return React.createElement(PartyWrapper$2, null, React.createElement(TextContainer$6, null, React.createElement(Ellipsis, {
48933
48954
  maxLines: 1,
48934
48955
  maxWidth: "300px"
48935
- }, charName, " ", isCurrentUser ? '(You)' : '', " ", isLeader ? '(Leader)' : '')), React.createElement(TextContainer$5, null, React.createElement(Ellipsis, {
48956
+ }, charName, " ", isCurrentUser ? '(You)' : '', " ", isLeader ? '(Leader)' : '')), React.createElement(TextContainer$6, null, React.createElement(Ellipsis, {
48936
48957
  maxLines: 1,
48937
48958
  maxWidth: "300px"
48938
48959
  }, charClass)), React.createElement(ButtonContainer$3, null, canRemove && React.createElement(HighlightedText, {
@@ -48949,7 +48970,7 @@ var PartyWrapper$2 = /*#__PURE__*/styled.div.withConfig({
48949
48970
  displayName: "PartyManagerRows__PartyWrapper",
48950
48971
  componentId: "sc-uqajew-0"
48951
48972
  })(["display:grid;grid-template-columns:2fr 1fr 1fr;align-items:center;padding:0.5rem;min-height:50px;box-sizing:border-box;width:100%;border-bottom:1px solid ", ";&:hover{background-color:", ";cursor:pointer;}"], uiColors.darkGray, uiColors.darkGray);
48952
- var TextContainer$5 = /*#__PURE__*/styled.div.withConfig({
48973
+ var TextContainer$6 = /*#__PURE__*/styled.div.withConfig({
48953
48974
  displayName: "PartyManagerRows__TextContainer",
48954
48975
  componentId: "sc-uqajew-1"
48955
48976
  })(["color:", ";overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"], uiColors.white);
@@ -73465,17 +73486,19 @@ var Store = function Store(_ref) {
73465
73486
  onRedeem = _ref.onRedeem,
73466
73487
  onRedeemInputFocus = _ref.onRedeemInputFocus,
73467
73488
  onRedeemInputBlur = _ref.onRedeemInputBlur;
73489
+ var defaultTabOrder = ['premium', 'packs', 'items'];
73468
73490
  var _useState = useState(null),
73469
73491
  selectedPack = _useState[0],
73470
73492
  setSelectedPack = _useState[1];
73471
73493
  var _useState2 = useState(function () {
73472
- var initialTabs = (tabOrder != null ? tabOrder : ['premium', 'packs', 'items']).filter(function (id) {
73494
+ var _initialTabs$;
73495
+ var initialTabs = (tabOrder != null ? tabOrder : defaultTabOrder).filter(function (id) {
73473
73496
  return !(hidePremiumTab && id === 'premium');
73474
73497
  });
73475
73498
  if (defaultActiveTab && initialTabs.includes(defaultActiveTab)) {
73476
73499
  return defaultActiveTab;
73477
73500
  }
73478
- return hidePremiumTab ? 'items' : 'premium';
73501
+ return (_initialTabs$ = initialTabs[0]) != null ? _initialTabs$ : hidePremiumTab ? 'items' : 'premium';
73479
73502
  }),
73480
73503
  activeTab = _useState2[0],
73481
73504
  setActiveTab = _useState2[1];
@@ -73586,7 +73609,7 @@ var Store = function Store(_ref) {
73586
73609
  return React.createElement(ErrorMessage$3, null, error);
73587
73610
  }
73588
73611
  // Build tabs dynamically based on props
73589
- var tabIds = [].concat(tabOrder != null ? tabOrder : ['premium', 'packs', 'items'], onRedeem ? ['redeem'] : [], onShowWallet || customWalletContent ? ['wallet'] : [], onShowHistory || customHistoryContent ? ['history'] : []);
73612
+ var tabIds = [].concat(tabOrder != null ? tabOrder : defaultTabOrder, onRedeem ? ['redeem'] : [], onShowWallet || customWalletContent ? ['wallet'] : [], onShowHistory || customHistoryContent ? ['history'] : []);
73590
73613
  var availableTabIds = Array.from(new Set(tabIds.filter(function (id) {
73591
73614
  return !(hidePremiumTab && id === 'premium');
73592
73615
  })));