@rpg-engine/long-bow 0.3.51 → 0.3.52

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.
Files changed (39) hide show
  1. package/dist/components/CircularController/CircularController.d.ts +7 -3
  2. package/dist/components/Item/Inventory/ItemContainer.d.ts +4 -0
  3. package/dist/components/Item/Inventory/ItemSlot.d.ts +1 -0
  4. package/dist/components/Shortcuts/Shortcuts.d.ts +21 -0
  5. package/dist/components/Shortcuts/ShortcutsSetter.d.ts +12 -0
  6. package/dist/components/Shortcuts/SingleShortcut.d.ts +1 -0
  7. package/dist/components/Spellbook/Spellbook.d.ts +5 -2
  8. package/dist/components/Spellbook/constants.d.ts +3 -3
  9. package/dist/index.d.ts +1 -1
  10. package/dist/long-bow.cjs.development.js +271 -120
  11. package/dist/long-bow.cjs.development.js.map +1 -1
  12. package/dist/long-bow.cjs.production.min.js +1 -1
  13. package/dist/long-bow.cjs.production.min.js.map +1 -1
  14. package/dist/long-bow.esm.js +273 -120
  15. package/dist/long-bow.esm.js.map +1 -1
  16. package/dist/stories/{QuickSpells.stories.d.ts → Shortcuts.stories.d.ts} +2 -2
  17. package/package.json +1 -1
  18. package/src/components/Abstractions/SlotsContainer.tsx +2 -2
  19. package/src/components/CircularController/CircularController.tsx +118 -36
  20. package/src/components/Item/Inventory/ItemContainer.tsx +39 -4
  21. package/src/components/Item/Inventory/ItemSlot.tsx +38 -3
  22. package/src/components/Shortcuts/Shortcuts.tsx +138 -0
  23. package/src/components/Shortcuts/ShortcutsSetter.tsx +127 -0
  24. package/src/components/Shortcuts/SingleShortcut.ts +61 -0
  25. package/src/components/Spellbook/Spellbook.tsx +15 -8
  26. package/src/components/Spellbook/constants.ts +5 -9
  27. package/src/components/TradingMenu/TradingMenu.tsx +2 -2
  28. package/src/components/TradingMenu/items.mock.ts +59 -0
  29. package/src/index.tsx +1 -1
  30. package/src/mocks/itemContainer.mocks.ts +22 -20
  31. package/src/stories/CircullarController.stories.tsx +9 -5
  32. package/src/stories/ItemContainer.stories.tsx +70 -1
  33. package/src/stories/Shortcuts.stories.tsx +39 -0
  34. package/src/stories/Spellbook.stories.tsx +35 -38
  35. package/dist/components/Spellbook/QuickSpells.d.ts +0 -10
  36. package/dist/components/Spellbook/SpellbookShortcuts.d.ts +0 -10
  37. package/src/components/Spellbook/QuickSpells.tsx +0 -120
  38. package/src/components/Spellbook/SpellbookShortcuts.tsx +0 -77
  39. package/src/stories/QuickSpells.stories.tsx +0 -38
@@ -33058,62 +33058,108 @@ var CheckButton = function CheckButton(_ref) {
33058
33058
  }));
33059
33059
  };
33060
33060
 
33061
- var QuickSpells = function QuickSpells(_ref) {
33062
- var quickSpells = _ref.quickSpells,
33063
- onSpellCast = _ref.onSpellCast,
33061
+ var SingleShortcut = /*#__PURE__*/styled.button.withConfig({
33062
+ displayName: "SingleShortcut",
33063
+ componentId: "sc-vz5ev8-0"
33064
+ })(["width:3rem;height:3rem;background-color:", ";border:2px solid ", ";border-radius:50%;text-transform:uppercase;font-size:0.7rem;font-weight:bold;display:flex;align-items:center;justify-content:center;position:relative;span{pointer-events:none;}.mana{position:absolute;top:-5px;right:0;font-size:0.65rem;color:", ";}.qty{position:absolute;top:-5px;right:0;font-size:0.65rem;}.magicWords{margin-top:4px;}.keyboard{position:absolute;bottom:-5px;left:0;font-size:0.65rem;color:", ";}&:hover,&:focus{background-color:", ";}&:active{background-color:", ";}&:disabled{opacity:0.5;}"], uiColors.lightGray, uiColors.darkGray, uiColors.blue, uiColors.yellow, uiColors.darkGray, uiColors.gray);
33065
+
33066
+ (function (ShortcutType) {
33067
+ ShortcutType[ShortcutType["Spell"] = 0] = "Spell";
33068
+ ShortcutType[ShortcutType["Item"] = 1] = "Item";
33069
+ ShortcutType[ShortcutType["None"] = 2] = "None";
33070
+ })(exports.ShortcutType || (exports.ShortcutType = {}));
33071
+ var Shortcuts = function Shortcuts(_ref) {
33072
+ var shortcuts = _ref.shortcuts,
33073
+ onShortcutCast = _ref.onShortcutCast,
33064
33074
  mana = _ref.mana,
33065
33075
  _ref$isBlockedCasting = _ref.isBlockedCastingByKeyboard,
33066
- isBlockedCastingByKeyboard = _ref$isBlockedCasting === void 0 ? false : _ref$isBlockedCasting;
33076
+ isBlockedCastingByKeyboard = _ref$isBlockedCasting === void 0 ? false : _ref$isBlockedCasting,
33077
+ atlasJSON = _ref.atlasJSON,
33078
+ atlasIMG = _ref.atlasIMG,
33079
+ inventory = _ref.inventory;
33067
33080
  React.useEffect(function () {
33068
33081
  var handleKeyDown = function handleKeyDown(e) {
33069
33082
  if (isBlockedCastingByKeyboard) return;
33070
33083
  var shortcutIndex = Number(e.key) - 1;
33071
- if (shortcutIndex >= 0 && shortcutIndex <= 3) {
33072
- var shortcut = quickSpells[shortcutIndex];
33073
- if (shortcut != null && shortcut.key && mana >= (shortcut == null ? void 0 : shortcut.manaCost)) {
33074
- onSpellCast(shortcut.key);
33075
- }
33084
+ if (shortcutIndex >= 0 && shortcutIndex <= 5) {
33085
+ onShortcutCast(shortcutIndex);
33076
33086
  }
33077
33087
  };
33078
33088
  window.addEventListener('keydown', handleKeyDown);
33079
33089
  return function () {
33080
33090
  window.removeEventListener('keydown', handleKeyDown);
33081
33091
  };
33082
- }, [quickSpells, isBlockedCastingByKeyboard]);
33092
+ }, [shortcuts, isBlockedCastingByKeyboard]);
33083
33093
  return React__default.createElement(List, null, Array.from({
33084
- length: 4
33094
+ length: 6
33085
33095
  }).map(function (_, i) {
33086
- var _quickSpells$i, _quickSpells$i2, _quickSpells$i3, _quickSpells$i4, _quickSpells$i5;
33087
- return React__default.createElement(SpellShortcut, {
33096
+ var _shortcuts$i, _shortcuts$i3, _payload$manaCost;
33097
+ if (((_shortcuts$i = shortcuts[i]) == null ? void 0 : _shortcuts$i.type) === exports.ShortcutType.Item) {
33098
+ var _shortcuts$i2;
33099
+ var _payload = (_shortcuts$i2 = shortcuts[i]) == null ? void 0 : _shortcuts$i2.payload;
33100
+ var itemsFromEquipment = [];
33101
+ if (inventory) {
33102
+ Object.keys(inventory.slots).forEach(function (i) {
33103
+ var _inventory$slots$inde;
33104
+ var index = parseInt(i);
33105
+ if (((_inventory$slots$inde = inventory.slots[index]) == null ? void 0 : _inventory$slots$inde.key) === (_payload == null ? void 0 : _payload.key)) {
33106
+ itemsFromEquipment.push(inventory.slots[index]);
33107
+ }
33108
+ });
33109
+ }
33110
+ var totalQty = itemsFromEquipment.reduce(function (acc, item) {
33111
+ return acc + ((item == null ? void 0 : item.stackQty) || 1);
33112
+ }, 0);
33113
+ return React__default.createElement(SingleShortcut, {
33114
+ key: i,
33115
+ onClick: onShortcutCast.bind(null, i),
33116
+ disabled: false
33117
+ }, _payload && React__default.createElement(SpriteFromAtlas, {
33118
+ atlasIMG: atlasIMG,
33119
+ atlasJSON: atlasJSON,
33120
+ spriteKey: shared.getItemTextureKeyPath({
33121
+ key: _payload.texturePath,
33122
+ texturePath: _payload.texturePath,
33123
+ stackQty: _payload.stackQty || 1
33124
+ }, atlasJSON),
33125
+ width: 32,
33126
+ height: 32
33127
+ }), React__default.createElement("span", {
33128
+ className: "qty"
33129
+ }, totalQty), React__default.createElement("span", {
33130
+ className: "keyboard"
33131
+ }, i + 1));
33132
+ }
33133
+ var payload = (_shortcuts$i3 = shortcuts[i]) == null ? void 0 : _shortcuts$i3.payload;
33134
+ return React__default.createElement(SingleShortcut, {
33088
33135
  key: i,
33089
- onClick: onSpellCast.bind(null, (_quickSpells$i = quickSpells[i]) == null ? void 0 : _quickSpells$i.key),
33090
- disabled: mana < ((_quickSpells$i2 = quickSpells[i]) == null ? void 0 : _quickSpells$i2.manaCost)
33136
+ onClick: onShortcutCast.bind(null, i),
33137
+ disabled: mana < ((_payload$manaCost = payload == null ? void 0 : payload.manaCost) != null ? _payload$manaCost : 0)
33091
33138
  }, React__default.createElement("span", {
33092
33139
  className: "mana"
33093
- }, ((_quickSpells$i3 = quickSpells[i]) == null ? void 0 : _quickSpells$i3.key) && ((_quickSpells$i4 = quickSpells[i]) == null ? void 0 : _quickSpells$i4.manaCost)), React__default.createElement("span", {
33140
+ }, payload && payload.manaCost), React__default.createElement("span", {
33094
33141
  className: "magicWords"
33095
- }, (_quickSpells$i5 = quickSpells[i]) == null ? void 0 : _quickSpells$i5.magicWords.split(' ').map(function (word) {
33142
+ }, payload == null ? void 0 : payload.magicWords.split(' ').map(function (word) {
33096
33143
  return word[0];
33097
33144
  })), React__default.createElement("span", {
33098
33145
  className: "keyboard"
33099
33146
  }, i + 1));
33100
33147
  }));
33101
33148
  };
33102
- var SpellShortcut = /*#__PURE__*/styled.button.withConfig({
33103
- displayName: "QuickSpells__SpellShortcut",
33104
- componentId: "sc-41yq7s-0"
33105
- })(["width:3rem;height:3rem;background-color:", ";border:2px solid ", ";border-radius:50%;text-transform:uppercase;font-size:0.7rem;font-weight:bold;display:flex;align-items:center;justify-content:center;position:relative;span{pointer-events:none;}.mana{position:absolute;top:-5px;right:0;font-size:0.65rem;color:", ";}.magicWords{margin-top:4px;}.keyboard{position:absolute;bottom:-5px;left:0;font-size:0.65rem;color:", ";}&:hover,&:focus{background-color:", ";}&:active{background-color:", ";}&:disabled{opacity:0.5;}"], uiColors.lightGray, uiColors.darkGray, uiColors.blue, uiColors.yellow, uiColors.darkGray, uiColors.gray);
33106
33149
  var List = /*#__PURE__*/styled.p.withConfig({
33107
- displayName: "QuickSpells__List",
33108
- componentId: "sc-41yq7s-1"
33150
+ displayName: "Shortcuts__List",
33151
+ componentId: "sc-kgtsi7-0"
33109
33152
  })(["width:100%;display:flex;align-items:center;justify-content:center;gap:0.5rem;box-sizing:border-box;margin:0 !important;"]);
33110
33153
 
33111
33154
  var CircularController = function CircularController(_ref) {
33112
33155
  var onActionClick = _ref.onActionClick,
33113
33156
  onCancelClick = _ref.onCancelClick,
33114
- onSpellClick = _ref.onSpellClick,
33157
+ onShortcutClick = _ref.onShortcutClick,
33115
33158
  mana = _ref.mana,
33116
- spells = _ref.spells;
33159
+ shortcuts = _ref.shortcuts,
33160
+ inventory = _ref.inventory,
33161
+ atlasIMG = _ref.atlasIMG,
33162
+ atlasJSON = _ref.atlasJSON;
33117
33163
  var onTouchStart = function onTouchStart(e) {
33118
33164
  var target = e.target;
33119
33165
  target == null ? void 0 : target.classList.add('active');
@@ -33125,25 +33171,70 @@ var CircularController = function CircularController(_ref) {
33125
33171
  }, 100);
33126
33172
  action();
33127
33173
  };
33128
- return React__default.createElement(ButtonsContainer, null, React__default.createElement(SpellsContainer, null, Array.from({
33129
- length: 4
33130
- }).map(function (_, i) {
33131
- var variant = i === 0 ? 'top' : i === 3 ? 'bottom' : '';
33132
- var spell = spells[i];
33133
- var onSpellClickBinded = spell ? onSpellClick.bind(null, spell.key) : function () {};
33174
+ var renderShortcut = function renderShortcut(i) {
33175
+ var _shortcuts$i, _shortcuts$i2, _shortcuts$i4, _payload$manaCost;
33176
+ var variant = '';
33177
+ if (i === 0) variant = 'top';else if (i >= 3) variant = "bottom-" + (i - 3);
33178
+ var onShortcutClickBinded = ((_shortcuts$i = shortcuts[i]) == null ? void 0 : _shortcuts$i.type) !== exports.ShortcutType.None ? onShortcutClick.bind(null, i) : function () {};
33179
+ if (((_shortcuts$i2 = shortcuts[i]) == null ? void 0 : _shortcuts$i2.type) === exports.ShortcutType.Item) {
33180
+ var _shortcuts$i3;
33181
+ var _payload = (_shortcuts$i3 = shortcuts[i]) == null ? void 0 : _shortcuts$i3.payload;
33182
+ var itemsFromEquipment = [];
33183
+ if (inventory) {
33184
+ Object.keys(inventory.slots).forEach(function (i) {
33185
+ var _inventory$slots$inde;
33186
+ var index = parseInt(i);
33187
+ if (((_inventory$slots$inde = inventory.slots[index]) == null ? void 0 : _inventory$slots$inde.key) === (_payload == null ? void 0 : _payload.key)) {
33188
+ itemsFromEquipment.push(inventory.slots[index]);
33189
+ }
33190
+ });
33191
+ }
33192
+ var totalQty = itemsFromEquipment.reduce(function (acc, item) {
33193
+ return acc + ((item == null ? void 0 : item.stackQty) || 1);
33194
+ }, 0);
33195
+ return React__default.createElement(StyledShortcut, {
33196
+ key: i,
33197
+ onTouchStart: onTouchStart,
33198
+ onTouchEnd: onTouchEnd.bind(null, onShortcutClickBinded),
33199
+ disabled: false,
33200
+ className: variant
33201
+ }, _payload && React__default.createElement(SpriteFromAtlas, {
33202
+ atlasIMG: atlasIMG,
33203
+ atlasJSON: atlasJSON,
33204
+ spriteKey: shared.getItemTextureKeyPath({
33205
+ key: _payload.texturePath,
33206
+ texturePath: _payload.texturePath,
33207
+ stackQty: _payload.stackQty || 1
33208
+ }, atlasJSON),
33209
+ width: 32,
33210
+ height: 32,
33211
+ imgScale: 1.4,
33212
+ imgStyle: {
33213
+ left: '4px'
33214
+ }
33215
+ }), React__default.createElement("span", {
33216
+ className: "qty"
33217
+ }, totalQty));
33218
+ }
33219
+ var payload = (_shortcuts$i4 = shortcuts[i]) == null ? void 0 : _shortcuts$i4.payload;
33134
33220
  return React__default.createElement(StyledShortcut, {
33135
33221
  key: i,
33136
- disabled: mana < (spell == null ? void 0 : spell.manaCost),
33137
33222
  onTouchStart: onTouchStart,
33138
- onTouchEnd: onTouchEnd.bind(null, onSpellClickBinded),
33223
+ onTouchEnd: onTouchEnd.bind(null, onShortcutClickBinded),
33224
+ disabled: mana < ((_payload$manaCost = payload == null ? void 0 : payload.manaCost) != null ? _payload$manaCost : 0),
33139
33225
  className: variant
33140
33226
  }, React__default.createElement("span", {
33141
33227
  className: "mana"
33142
- }, (spell == null ? void 0 : spell.key) && (spell == null ? void 0 : spell.manaCost)), React__default.createElement("span", {
33228
+ }, payload && payload.manaCost), React__default.createElement("span", {
33143
33229
  className: "magicWords"
33144
- }, spell == null ? void 0 : spell.magicWords.split(' ').map(function (word) {
33230
+ }, payload == null ? void 0 : payload.magicWords.split(' ').map(function (word) {
33145
33231
  return word[0];
33146
33232
  })));
33233
+ };
33234
+ return React__default.createElement(ButtonsContainer, null, React__default.createElement(ShortcutsContainer, null, Array.from({
33235
+ length: 6
33236
+ }).map(function (_, i) {
33237
+ return renderShortcut(i);
33147
33238
  })), React__default.createElement(Button$2, {
33148
33239
  onTouchStart: onTouchStart,
33149
33240
  onTouchEnd: onTouchEnd.bind(null, onActionClick)
@@ -33157,7 +33248,7 @@ var CircularController = function CircularController(_ref) {
33157
33248
  var Button$2 = /*#__PURE__*/styled.button.withConfig({
33158
33249
  displayName: "CircularController__Button",
33159
33250
  componentId: "sc-1fewf3h-0"
33160
- })(["width:4.3rem;height:4.3rem;background-color:", ";border:2px solid ", ";border-radius:50%;text-transform:uppercase;font-size:0.7rem;font-weight:bold;display:flex;align-items:center;justify-content:center;position:relative;transition:background-color 0.1s;&.active{background-color:", ";}.sword{transform:rotate(-45deg);height:2.5rem;width:1.9rem;pointer-events:none;}"], uiColors.lightGray, uiColors.darkGray, uiColors.gray);
33251
+ })(["width:4.3rem;height:4.3rem;background-color:", ";border:2px solid ", ";border-radius:50%;text-transform:uppercase;font-size:0.7rem;font-weight:bold;display:flex;align-items:center;justify-content:center;position:relative;transition:background-color 0.1s;margin-top:-3rem;&.active{background-color:", ";}.sword{transform:rotate(-45deg);height:2.5rem;width:1.9rem;pointer-events:none;}"], uiColors.lightGray, uiColors.darkGray, uiColors.gray);
33161
33252
  var CancelButton = /*#__PURE__*/styled(Button$2).withConfig({
33162
33253
  displayName: "CircularController__CancelButton",
33163
33254
  componentId: "sc-1fewf3h-1"
@@ -33166,14 +33257,14 @@ var ButtonsContainer = /*#__PURE__*/styled.div.withConfig({
33166
33257
  displayName: "CircularController__ButtonsContainer",
33167
33258
  componentId: "sc-1fewf3h-2"
33168
33259
  })(["display:flex;align-items:center;justify-content:center;gap:0.5rem;"]);
33169
- var SpellsContainer = /*#__PURE__*/styled.div.withConfig({
33170
- displayName: "CircularController__SpellsContainer",
33260
+ var ShortcutsContainer = /*#__PURE__*/styled.div.withConfig({
33261
+ displayName: "CircularController__ShortcutsContainer",
33171
33262
  componentId: "sc-1fewf3h-3"
33172
- })(["display:flex;align-items:center;justify-content:center;gap:0.4rem;flex-direction:column;.top{transform:translate(93%,25%);}.bottom{transform:translate(93%,-25%);}"]);
33173
- var StyledShortcut = /*#__PURE__*/styled(SpellShortcut).withConfig({
33263
+ })(["display:flex;align-items:center;justify-content:center;gap:0.5rem;flex-direction:column;margin-top:3rem;.top{transform:translate(93%,25%);}.bottom-0{transform:translate(93%,-25%);}.bottom-1{transform:translate(-120%,calc(-5.5rem));}.bottom-2{transform:translate(-30%,calc(-5.5rem - 25%));}"]);
33264
+ var StyledShortcut = /*#__PURE__*/styled(SingleShortcut).withConfig({
33174
33265
  displayName: "CircularController__StyledShortcut",
33175
33266
  componentId: "sc-1fewf3h-4"
33176
- })(["width:2.5rem;height:2.5rem;transition:background-color 0.1s;.mana{font-size:0.5rem;}&:hover,&:focus,&:active{background-color:", ";}&.active{background-color:", ";}"], uiColors.lightGray, uiColors.gray);
33267
+ })(["width:2.5rem;height:2.5rem;transition:background-color 0.1s;.mana,.qty{font-size:0.5rem;}&:hover,&:focus,&:active{background-color:", ";}&.active{background-color:", ";}"], uiColors.lightGray, uiColors.gray);
33177
33268
 
33178
33269
  function useOutsideClick(ref, id) {
33179
33270
  React.useEffect(function () {
@@ -33762,7 +33853,8 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
33762
33853
  checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
33763
33854
  openQuantitySelector = _ref.openQuantitySelector,
33764
33855
  checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
33765
- dragScale = _ref.dragScale;
33856
+ dragScale = _ref.dragScale,
33857
+ isSelectingShortcut = _ref.isSelectingShortcut;
33766
33858
  var _useState = React.useState(false),
33767
33859
  isTooltipVisible = _useState[0],
33768
33860
  setTooltipVisible = _useState[1];
@@ -33795,6 +33887,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
33795
33887
  });
33796
33888
  setIsFocused(false);
33797
33889
  if (item) {
33890
+ console.log(item);
33798
33891
  setContextActions(generateContextMenu(item, containerType));
33799
33892
  }
33800
33893
  }, [item]);
@@ -33926,12 +34019,14 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
33926
34019
  bubbles: true
33927
34020
  });
33928
34021
  (_document$elementFrom = document.elementFromPoint(clientX, clientY)) == null ? void 0 : _document$elementFrom.dispatchEvent(simulatedEvent);
33929
- }
34022
+ },
34023
+ isSelectingShortcut: isSelectingShortcut && ((item == null ? void 0 : item.type) === shared.ItemType.Consumable || (item == null ? void 0 : item.type) === shared.ItemType.Tool)
33930
34024
  }, React__default.createElement(Draggable, {
34025
+ axis: isSelectingShortcut ? 'none' : 'both',
33931
34026
  defaultClassName: item ? 'draggable' : 'empty-slot',
33932
34027
  scale: dragScale,
33933
34028
  onStop: function onStop(e, data) {
33934
- if (wasDragged && item) {
34029
+ if (wasDragged && item && !isSelectingShortcut) {
33935
34030
  var _e$target;
33936
34031
  //@ts-ignore
33937
34032
  var classes = Array.from((_e$target = e.target) == null ? void 0 : _e$target.classList);
@@ -33969,12 +34064,12 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
33969
34064
  }
33970
34065
  }, 100);
33971
34066
  } else if (item) {
33972
- if (!isContextMenuDisabled) setIsContextMenuVisible(!isContextMenuVisible);
34067
+ if (!isContextMenuDisabled && !isSelectingShortcut) setIsContextMenuVisible(!isContextMenuVisible);
33973
34068
  onClick(item.type, containerType, item);
33974
34069
  }
33975
34070
  },
33976
34071
  onStart: function onStart() {
33977
- if (!item) {
34072
+ if (!item || isSelectingShortcut) {
33978
34073
  return;
33979
34074
  }
33980
34075
  if (onDragStart) {
@@ -34036,7 +34131,7 @@ var rarityColor = function rarityColor(item) {
34036
34131
  var Container$a = /*#__PURE__*/styled.div.withConfig({
34037
34132
  displayName: "ItemSlot__Container",
34038
34133
  componentId: "sc-l2j5ef-0"
34039
- })(["margin:0.1rem;.sprite-from-atlas-img{position:relative;top:1.5rem;left:1.5rem;border-color:", ";box-shadow:", " inset,", ";}position:relative;"], function (_ref2) {
34134
+ })(["margin:0.1rem;.sprite-from-atlas-img{position:relative;top:1.5rem;left:1.5rem;border-color:", ";box-shadow:", " inset,", ";}position:relative;&::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;border-radius:12px;pointer-events:none;animation:", ";@keyframes bg-color-change{0%{background-color:rgba(255 255 255 / 0.5);}50%{background-color:transparent;}100%{background-color:rgba(255 255 255 / 0.5);}}}"], function (_ref2) {
34040
34135
  var item = _ref2.item;
34041
34136
  return rarityColor(item);
34042
34137
  }, function (_ref3) {
@@ -34045,6 +34140,9 @@ var Container$a = /*#__PURE__*/styled.div.withConfig({
34045
34140
  }, function (_ref4) {
34046
34141
  var item = _ref4.item;
34047
34142
  return "0 0 4px 3px " + rarityColor(item);
34143
+ }, function (_ref5) {
34144
+ var isSelectingShortcut = _ref5.isSelectingShortcut;
34145
+ return isSelectingShortcut ? 'bg-color-change 1s infinite' : 'none';
34048
34146
  });
34049
34147
  var ItemContainer = /*#__PURE__*/styled.div.withConfig({
34050
34148
  displayName: "ItemSlot__ItemContainer",
@@ -34170,8 +34268,8 @@ var SlotsContainer = function SlotsContainer(_ref) {
34170
34268
  onClose();
34171
34269
  }
34172
34270
  },
34173
- width: "330px",
34174
- cancelDrag: ".item-container-body",
34271
+ width: "400px",
34272
+ cancelDrag: ".item-container-body, #shortcuts_list",
34175
34273
  onPositionChange: function onPositionChange(_ref2) {
34176
34274
  var x = _ref2.x,
34177
34275
  y = _ref2.y;
@@ -34342,6 +34440,72 @@ var CloseButton$2 = /*#__PURE__*/styled.div.withConfig({
34342
34440
  componentId: "sc-yfdtpn-3"
34343
34441
  })(["position:absolute;top:3px;right:0px;color:white;z-index:22;font-size:0.8rem;"]);
34344
34442
 
34443
+ var ShortcutsSetter = function ShortcutsSetter(_ref) {
34444
+ var setSettingShortcutIndex = _ref.setSettingShortcutIndex,
34445
+ settingShortcutIndex = _ref.settingShortcutIndex,
34446
+ shortcuts = _ref.shortcuts,
34447
+ removeShortcut = _ref.removeShortcut,
34448
+ atlasJSON = _ref.atlasJSON,
34449
+ atlasIMG = _ref.atlasIMG;
34450
+ var getContent = function getContent(index) {
34451
+ var _shortcuts$index, _shortcuts$index3;
34452
+ if (((_shortcuts$index = shortcuts[index]) == null ? void 0 : _shortcuts$index.type) === exports.ShortcutType.Item) {
34453
+ var _shortcuts$index2;
34454
+ var _payload = (_shortcuts$index2 = shortcuts[index]) == null ? void 0 : _shortcuts$index2.payload;
34455
+ if (!_payload) return null;
34456
+ return React__default.createElement(SpriteFromAtlas, {
34457
+ atlasIMG: atlasIMG,
34458
+ atlasJSON: atlasJSON,
34459
+ spriteKey: shared.getItemTextureKeyPath({
34460
+ key: _payload.texturePath,
34461
+ texturePath: _payload.texturePath,
34462
+ stackQty: _payload.stackQty || 1
34463
+ }, atlasJSON),
34464
+ width: 32,
34465
+ height: 32,
34466
+ imgScale: 1.6,
34467
+ imgStyle: {
34468
+ left: '5px'
34469
+ }
34470
+ });
34471
+ }
34472
+ var payload = (_shortcuts$index3 = shortcuts[index]) == null ? void 0 : _shortcuts$index3.payload;
34473
+ return React__default.createElement("span", null, payload == null ? void 0 : payload.magicWords.split(' ').map(function (word) {
34474
+ return word[0];
34475
+ }));
34476
+ };
34477
+ return React__default.createElement(Container$b, null, React__default.createElement("p", null, "Shortcuts:"), React__default.createElement(List$1, {
34478
+ id: "shortcuts_list"
34479
+ }, Array.from({
34480
+ length: 6
34481
+ }).map(function (_, i) {
34482
+ return React__default.createElement(Shortcut, {
34483
+ key: i,
34484
+ onClick: function onClick() {
34485
+ removeShortcut(i);
34486
+ if (!shortcuts[i] || shortcuts[i].type === exports.ShortcutType.None) setSettingShortcutIndex(i);
34487
+ },
34488
+ disabled: settingShortcutIndex !== -1 && settingShortcutIndex !== i,
34489
+ isBeingSet: settingShortcutIndex === i
34490
+ }, getContent(i));
34491
+ })));
34492
+ };
34493
+ var Container$b = /*#__PURE__*/styled.div.withConfig({
34494
+ displayName: "ShortcutsSetter__Container",
34495
+ componentId: "sc-xuouuf-0"
34496
+ })(["p{margin:0;margin-left:0.5rem;}"]);
34497
+ var Shortcut = /*#__PURE__*/styled.button.withConfig({
34498
+ displayName: "ShortcutsSetter__Shortcut",
34499
+ componentId: "sc-xuouuf-1"
34500
+ })(["width:2.6rem;height:2.6rem;background-color:", ";border:2px solid ", ";border-radius:50%;text-transform:uppercase;font-size:0.7rem;font-weight:bold;display:flex;align-items:center;justify-content:center;span{margin-top:4px;}&:hover,&:focus{background-color:", ";}&:active{background-color:", ";}&:disabled{opacity:0.5;}"], uiColors.lightGray, function (_ref2) {
34501
+ var isBeingSet = _ref2.isBeingSet;
34502
+ return isBeingSet ? uiColors.yellow : uiColors.darkGray;
34503
+ }, uiColors.darkGray, uiColors.gray);
34504
+ var List$1 = /*#__PURE__*/styled.div.withConfig({
34505
+ displayName: "ShortcutsSetter__List",
34506
+ componentId: "sc-xuouuf-2"
34507
+ })(["width:100%;display:flex;align-items:center;gap:0.5rem;padding-bottom:0.5rem;padding-left:0.5rem;box-sizing:border-box;margin:0 !important;"]);
34508
+
34345
34509
  var ItemContainer$1 = function ItemContainer(_ref) {
34346
34510
  var itemContainer = _ref.itemContainer,
34347
34511
  onClose = _ref.onClose,
@@ -34360,7 +34524,10 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34360
34524
  checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
34361
34525
  initialPosition = _ref.initialPosition,
34362
34526
  checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
34363
- dragScale = _ref.dragScale;
34527
+ dragScale = _ref.dragScale,
34528
+ shortcuts = _ref.shortcuts,
34529
+ setItemShortcut = _ref.setItemShortcut,
34530
+ removeShortcut = _ref.removeShortcut;
34364
34531
  var _useState = React.useState({
34365
34532
  isOpen: false,
34366
34533
  maxQuantity: 1,
@@ -34368,6 +34535,9 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34368
34535
  }),
34369
34536
  quantitySelect = _useState[0],
34370
34537
  setQuantitySelect = _useState[1];
34538
+ var _useState2 = React.useState(-1),
34539
+ settingShortcutIndex = _useState2[0],
34540
+ setSettingShortcutIndex = _useState2[1];
34371
34541
  var onRenderSlots = function onRenderSlots() {
34372
34542
  var slots = [];
34373
34543
  for (var i = 0; i < itemContainer.slotQty; i++) {
@@ -34381,8 +34551,13 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34381
34551
  onMouseOver: function onMouseOver(event, slotIndex, item) {
34382
34552
  if (_onMouseOver) _onMouseOver(event, slotIndex, item);
34383
34553
  },
34384
- onClick: function onClick(ItemType, ContainerType, item) {
34385
- if (onItemClick) onItemClick(item, ItemType, ContainerType);
34554
+ onClick: function onClick(itemType, containerType, item) {
34555
+ if (settingShortcutIndex !== -1) {
34556
+ setSettingShortcutIndex(-1);
34557
+ if (itemType === shared.ItemType.Consumable || itemType === shared.ItemType.Tool) {
34558
+ setItemShortcut == null ? void 0 : setItemShortcut(item.key, settingShortcutIndex);
34559
+ }
34560
+ } else if (onItemClick) onItemClick(item, itemType, containerType);
34386
34561
  },
34387
34562
  onSelected: function onSelected(optionId, item) {
34388
34563
  if (_onSelected) _onSelected(optionId, item);
@@ -34410,7 +34585,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34410
34585
  if (_onOutsideDrop) _onOutsideDrop(item, position);
34411
34586
  },
34412
34587
  atlasIMG: atlasIMG,
34413
- atlasJSON: atlasJSON
34588
+ atlasJSON: atlasJSON,
34589
+ isSelectingShortcut: settingShortcutIndex !== -1
34414
34590
  }));
34415
34591
  }
34416
34592
  return slots;
@@ -34419,7 +34595,14 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34419
34595
  title: itemContainer.name || 'Container',
34420
34596
  onClose: onClose,
34421
34597
  initialPosition: initialPosition
34422
- }, React__default.createElement(ItemsContainer, {
34598
+ }, type === shared.ItemContainerType.Inventory && shortcuts && removeShortcut && React__default.createElement(ShortcutsSetter, {
34599
+ setSettingShortcutIndex: setSettingShortcutIndex,
34600
+ settingShortcutIndex: settingShortcutIndex,
34601
+ shortcuts: shortcuts,
34602
+ removeShortcut: removeShortcut,
34603
+ atlasIMG: atlasIMG,
34604
+ atlasJSON: atlasJSON
34605
+ }), React__default.createElement(ItemsContainer, {
34423
34606
  className: "item-container-body"
34424
34607
  }, onRenderSlots())), quantitySelect.isOpen && React__default.createElement(QuantitySelectorContainer, null, React__default.createElement(ItemQuantitySelector, {
34425
34608
  quantity: quantitySelect.maxQuantity,
@@ -34444,7 +34627,7 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34444
34627
  var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
34445
34628
  displayName: "ItemContainer__ItemsContainer",
34446
34629
  componentId: "sc-15y5p9l-0"
34447
- })(["max-width:280px;display:flex;justify-content:center;flex-wrap:wrap;"]);
34630
+ })(["display:flex;justify-content:center;flex-wrap:wrap;"]);
34448
34631
  var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
34449
34632
  displayName: "ItemContainer__QuantitySelectorContainer",
34450
34633
  componentId: "sc-15y5p9l-1"
@@ -34541,7 +34724,7 @@ var ListMenu = function ListMenu(_ref) {
34541
34724
  onSelected = _ref.onSelected,
34542
34725
  x = _ref.x,
34543
34726
  y = _ref.y;
34544
- return React__default.createElement(Container$b, {
34727
+ return React__default.createElement(Container$c, {
34545
34728
  x: x,
34546
34729
  y: y
34547
34730
  }, React__default.createElement("ul", {
@@ -34558,7 +34741,7 @@ var ListMenu = function ListMenu(_ref) {
34558
34741
  }, (params == null ? void 0 : params.text) || 'No text');
34559
34742
  })));
34560
34743
  };
34561
- var Container$b = /*#__PURE__*/styled.div.withConfig({
34744
+ var Container$c = /*#__PURE__*/styled.div.withConfig({
34562
34745
  displayName: "ListMenu__Container",
34563
34746
  componentId: "sc-i9097t-0"
34564
34747
  })(["display:flex;flex-direction:column;width:100%;justify-content:start;align-items:flex-start;position:absolute;top:", "px;left:", "px;li{font-size:", ";}"], function (props) {
@@ -34611,7 +34794,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
34611
34794
  type: exports.RPGUIContainerTypes.FramedGold,
34612
34795
  width: '50%',
34613
34796
  height: '180px'
34614
- }, React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$c, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React__default.createElement(React__default.Fragment, null, React__default.createElement(TextContainer, {
34797
+ }, React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$d, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React__default.createElement(React__default.Fragment, null, React__default.createElement(TextContainer, {
34615
34798
  flex: '70%'
34616
34799
  }, React__default.createElement(NPCDialogText, {
34617
34800
  onStartStep: function onStartStep() {
@@ -34653,7 +34836,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
34653
34836
  src: img$7
34654
34837
  }))), ")"));
34655
34838
  };
34656
- var Container$c = /*#__PURE__*/styled.div.withConfig({
34839
+ var Container$d = /*#__PURE__*/styled.div.withConfig({
34657
34840
  displayName: "NPCMultiDialog__Container",
34658
34841
  componentId: "sc-rvu5wg-0"
34659
34842
  })(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
@@ -34857,7 +35040,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
34857
35040
  return null;
34858
35041
  });
34859
35042
  };
34860
- return React__default.createElement(Container$d, null, React__default.createElement(QuestionContainer, null, React__default.createElement(DynamicText, {
35043
+ return React__default.createElement(Container$e, null, React__default.createElement(QuestionContainer, null, React__default.createElement(DynamicText, {
34861
35044
  text: currentQuestion.text,
34862
35045
  onStart: function onStart() {
34863
35046
  return setCanShowAnswers(false);
@@ -34867,7 +35050,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
34867
35050
  }
34868
35051
  })), canShowAnswers && React__default.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
34869
35052
  };
34870
- var Container$d = /*#__PURE__*/styled.div.withConfig({
35053
+ var Container$e = /*#__PURE__*/styled.div.withConfig({
34871
35054
  displayName: "QuestionDialog__Container",
34872
35055
  componentId: "sc-bxc5u0-0"
34873
35056
  })(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
@@ -34913,7 +35096,7 @@ var ProgressBar = function ProgressBar(_ref) {
34913
35096
  }
34914
35097
  return value * 100 / max;
34915
35098
  };
34916
- return React__default.createElement(Container$e, {
35099
+ return React__default.createElement(Container$f, {
34917
35100
  className: "rpgui-progress",
34918
35101
  "data-value": calculatePercentageValue(max, value) / 100,
34919
35102
  "data-rpguitype": "progress",
@@ -34942,7 +35125,7 @@ var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
34942
35125
  displayName: "ProgressBar__TextOverlay",
34943
35126
  componentId: "sc-qa6fzh-1"
34944
35127
  })(["width:100%;position:relative;"]);
34945
- var Container$e = /*#__PURE__*/styled.div.withConfig({
35128
+ var Container$f = /*#__PURE__*/styled.div.withConfig({
34946
35129
  displayName: "ProgressBar__Container",
34947
35130
  componentId: "sc-qa6fzh-2"
34948
35131
  })(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", ""], function (props) {
@@ -35165,7 +35348,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
35165
35348
  bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
35166
35349
  _ref$margin = _ref.margin,
35167
35350
  margin = _ref$margin === void 0 ? 20 : _ref$margin;
35168
- return React__default.createElement(Container$f, {
35351
+ return React__default.createElement(Container$g, {
35169
35352
  className: "simple-progress-bar"
35170
35353
  }, React__default.createElement(ProgressBarContainer, {
35171
35354
  margin: margin
@@ -35174,7 +35357,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
35174
35357
  bgColor: bgColor
35175
35358
  }))));
35176
35359
  };
35177
- var Container$f = /*#__PURE__*/styled.div.withConfig({
35360
+ var Container$g = /*#__PURE__*/styled.div.withConfig({
35178
35361
  displayName: "SimpleProgressBar__Container",
35179
35362
  componentId: "sc-mbeil3-0"
35180
35363
  })(["display:flex;justify-content:center;align-items:center;width:100%;"]);
@@ -35402,7 +35585,7 @@ var Spell = function Spell(_ref) {
35402
35585
  isSettingShortcut = _ref.isSettingShortcut,
35403
35586
  minMagicLevelRequired = _ref.minMagicLevelRequired;
35404
35587
  var disabled = isSettingShortcut ? charMagicLevel < minMagicLevelRequired : manaCost > charMana || charMagicLevel < minMagicLevelRequired;
35405
- return React__default.createElement(Container$g, {
35588
+ return React__default.createElement(Container$h, {
35406
35589
  disabled: disabled,
35407
35590
  onClick: onClick == null ? void 0 : onClick.bind(null, spellKey),
35408
35591
  isSettingShortcut: isSettingShortcut && !disabled,
@@ -35415,7 +35598,7 @@ var Spell = function Spell(_ref) {
35415
35598
  className: "mana"
35416
35599
  }, manaCost)));
35417
35600
  };
35418
- var Container$g = /*#__PURE__*/styled.button.withConfig({
35601
+ var Container$h = /*#__PURE__*/styled.button.withConfig({
35419
35602
  displayName: "Spell__Container",
35420
35603
  componentId: "sc-j96fa2-0"
35421
35604
  })(["display:block;background:none;border:2px solid transparent;border-radius:1rem;width:100%;display:flex;height:5rem;gap:1rem;align-items:center;padding:0 1rem;text-align:left;position:relative;animation:", ";@keyframes border-color-change{0%{border-color:", ";}50%{border-color:transparent;}100%{border-color:", ";}}&:hover,&:focus{background-color:", ";}&:active{background:none;}"], function (_ref2) {
@@ -35451,43 +35634,6 @@ var Overlay = /*#__PURE__*/styled.p.withConfig({
35451
35634
  componentId: "sc-j96fa2-7"
35452
35635
  })(["margin:0 !important;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:1rem;display:flex;justify-content:center;align-items:center;color:", ";font-size:", " !important;font-weight:bold;z-index:10;background-color:rgba(0 0 0 / 0.2);"], uiColors.yellow, uiFonts.size.large);
35453
35636
 
35454
- var SpellbookShortcuts = function SpellbookShortcuts(_ref) {
35455
- var setSettingShortcutIndex = _ref.setSettingShortcutIndex,
35456
- settingShortcutIndex = _ref.settingShortcutIndex,
35457
- shortcuts = _ref.shortcuts,
35458
- removeShortcut = _ref.removeShortcut;
35459
- return React__default.createElement(List$1, {
35460
- id: "shortcuts_list"
35461
- }, "Spells shortcuts:", Array.from({
35462
- length: 4
35463
- }).map(function (_, i) {
35464
- var _shortcuts$i2;
35465
- return React__default.createElement(SpellShortcut$1, {
35466
- key: i,
35467
- onClick: function onClick() {
35468
- var _shortcuts$i;
35469
- removeShortcut(i);
35470
- if (!((_shortcuts$i = shortcuts[i]) != null && _shortcuts$i.key)) setSettingShortcutIndex(i);
35471
- },
35472
- disabled: settingShortcutIndex !== -1 && settingShortcutIndex !== i,
35473
- isBeingSet: settingShortcutIndex === i
35474
- }, React__default.createElement("span", null, (_shortcuts$i2 = shortcuts[i]) == null ? void 0 : _shortcuts$i2.magicWords.split(' ').map(function (word) {
35475
- return word[0];
35476
- })));
35477
- }));
35478
- };
35479
- var SpellShortcut$1 = /*#__PURE__*/styled.button.withConfig({
35480
- displayName: "SpellbookShortcuts__SpellShortcut",
35481
- componentId: "sc-fr4a0d-0"
35482
- })(["width:2.6rem;height:2.6rem;background-color:", ";border:2px solid ", ";border-radius:50%;text-transform:uppercase;font-size:0.7rem;font-weight:bold;display:flex;align-items:center;justify-content:center;span{margin-top:4px;}&:hover,&:focus{background-color:", ";}&:active{background-color:", ";}&:disabled{opacity:0.5;}"], uiColors.lightGray, function (_ref2) {
35483
- var isBeingSet = _ref2.isBeingSet;
35484
- return isBeingSet ? uiColors.yellow : uiColors.darkGray;
35485
- }, uiColors.darkGray, uiColors.gray);
35486
- var List$1 = /*#__PURE__*/styled.p.withConfig({
35487
- displayName: "SpellbookShortcuts__List",
35488
- componentId: "sc-fr4a0d-1"
35489
- })(["width:100%;display:flex;align-items:center;justify-content:flex-end;gap:0.5rem;padding:0.5rem;box-sizing:border-box;margin:0 !important;"]);
35490
-
35491
35637
  var Spellbook = function Spellbook(_ref) {
35492
35638
  var onClose = _ref.onClose,
35493
35639
  onInputFocus = _ref.onInputFocus,
@@ -35497,8 +35643,10 @@ var Spellbook = function Spellbook(_ref) {
35497
35643
  mana = _ref.mana,
35498
35644
  onSpellClick = _ref.onSpellClick,
35499
35645
  setSpellShortcut = _ref.setSpellShortcut,
35500
- spellShortcuts = _ref.spellShortcuts,
35501
- removeSpellShortcut = _ref.removeSpellShortcut;
35646
+ shortcuts = _ref.shortcuts,
35647
+ removeShortcut = _ref.removeShortcut,
35648
+ atlasIMG = _ref.atlasIMG,
35649
+ atlasJSON = _ref.atlasJSON;
35502
35650
  var _useState = React.useState(''),
35503
35651
  search = _useState[0],
35504
35652
  setSearch = _useState[1];
@@ -35535,11 +35683,13 @@ var Spellbook = function Spellbook(_ref) {
35535
35683
  width: "inherit",
35536
35684
  height: "inherit",
35537
35685
  cancelDrag: "#spellbook-search, #shortcuts_list, .spell"
35538
- }, React__default.createElement(Container$h, null, React__default.createElement(Title$6, null, "Learned Spells"), React__default.createElement(SpellbookShortcuts, {
35686
+ }, React__default.createElement(Container$i, null, React__default.createElement(Title$6, null, "Learned Spells"), React__default.createElement(ShortcutsSetter, {
35539
35687
  setSettingShortcutIndex: setSettingShortcutIndex,
35540
35688
  settingShortcutIndex: settingShortcutIndex,
35541
- shortcuts: spellShortcuts,
35542
- removeShortcut: removeSpellShortcut
35689
+ shortcuts: shortcuts,
35690
+ removeShortcut: removeShortcut,
35691
+ atlasIMG: atlasIMG,
35692
+ atlasJSON: atlasJSON
35543
35693
  }), React__default.createElement(Input, {
35544
35694
  placeholder: "Search for spell",
35545
35695
  value: search,
@@ -35565,7 +35715,7 @@ var Title$6 = /*#__PURE__*/styled.h1.withConfig({
35565
35715
  displayName: "Spellbook__Title",
35566
35716
  componentId: "sc-r02nfq-0"
35567
35717
  })(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
35568
- var Container$h = /*#__PURE__*/styled.div.withConfig({
35718
+ var Container$i = /*#__PURE__*/styled.div.withConfig({
35569
35719
  displayName: "Spellbook__Container",
35570
35720
  componentId: "sc-r02nfq-1"
35571
35721
  })(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
@@ -35798,14 +35948,16 @@ var TradingMenu = function TradingMenu(_ref) {
35798
35948
  if (onClose) onClose();
35799
35949
  },
35800
35950
  width: "600px",
35801
- cancelDrag: ".equipment-container-body .arrow-selector"
35951
+ cancelDrag: "#TraderContainer"
35802
35952
  }, React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
35803
35953
  style: {
35804
35954
  width: '100%'
35805
35955
  }
35806
35956
  }, React__default.createElement(Title$7, null, Capitalize(type), " Menu"), React__default.createElement("hr", {
35807
35957
  className: "golden"
35808
- })), React__default.createElement(TradingComponentScrollWrapper, null, traderItems.map(function (tradeItem, index) {
35958
+ })), React__default.createElement(TradingComponentScrollWrapper, {
35959
+ id: "TraderContainer"
35960
+ }, traderItems.map(function (tradeItem, index) {
35809
35961
  var _qtyMap$get;
35810
35962
  return React__default.createElement(ItemWrapper$1, {
35811
35963
  key: tradeItem.key + "_" + index
@@ -35863,11 +36015,11 @@ var Truncate = function Truncate(_ref) {
35863
36015
  var _ref$maxLines = _ref.maxLines,
35864
36016
  maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
35865
36017
  children = _ref.children;
35866
- return React__default.createElement(Container$i, {
36018
+ return React__default.createElement(Container$j, {
35867
36019
  maxLines: maxLines
35868
36020
  }, children);
35869
36021
  };
35870
- var Container$i = /*#__PURE__*/styled.div.withConfig({
36022
+ var Container$j = /*#__PURE__*/styled.div.withConfig({
35871
36023
  displayName: "Truncate__Container",
35872
36024
  componentId: "sc-6x00qb-0"
35873
36025
  })(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
@@ -35930,7 +36082,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
35930
36082
  var _useState2 = React.useState(false),
35931
36083
  showGoNextIndicator = _useState2[0],
35932
36084
  setShowGoNextIndicator = _useState2[1];
35933
- return React__default.createElement(Container$j, null, React__default.createElement(DynamicText, {
36085
+ return React__default.createElement(Container$k, null, React__default.createElement(DynamicText, {
35934
36086
  text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
35935
36087
  onFinish: function onFinish() {
35936
36088
  setShowGoNextIndicator(true);
@@ -35948,7 +36100,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
35948
36100
  }
35949
36101
  }));
35950
36102
  };
35951
- var Container$j = /*#__PURE__*/styled.div.withConfig({
36103
+ var Container$k = /*#__PURE__*/styled.div.withConfig({
35952
36104
  displayName: "NPCDialogText__Container",
35953
36105
  componentId: "sc-1cxkdh9-0"
35954
36106
  })([""]);
@@ -35989,7 +36141,7 @@ var NPCDialog = function NPCDialog(_ref) {
35989
36141
  }
35990
36142
  })), type === exports.NPCDialogType.TextAndThumbnail && React__default.createElement(ThumbnailContainer$1, null, React__default.createElement(NPCThumbnail$1, {
35991
36143
  src: imagePath || img$6
35992
- }))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$k, null, React__default.createElement(TextContainer$2, {
36144
+ }))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$l, null, React__default.createElement(TextContainer$2, {
35993
36145
  flex: type === exports.NPCDialogType.TextAndThumbnail ? '70%' : '100%'
35994
36146
  }, React__default.createElement(NPCDialogText, {
35995
36147
  type: type,
@@ -36003,7 +36155,7 @@ var NPCDialog = function NPCDialog(_ref) {
36003
36155
  src: imagePath || img$6
36004
36156
  })))));
36005
36157
  };
36006
- var Container$k = /*#__PURE__*/styled.div.withConfig({
36158
+ var Container$l = /*#__PURE__*/styled.div.withConfig({
36007
36159
  displayName: "NPCDialog__Container",
36008
36160
  componentId: "sc-1b4aw74-0"
36009
36161
  })(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
@@ -36114,13 +36266,12 @@ exports.PropertySelect = PropertySelect;
36114
36266
  exports.QuestInfo = QuestInfo;
36115
36267
  exports.QuestList = QuestList;
36116
36268
  exports.QuestionDialog = QuestionDialog;
36117
- exports.QuickSpells = QuickSpells;
36118
36269
  exports.RPGUIContainer = RPGUIContainer;
36119
36270
  exports.RPGUIRoot = RPGUIRoot;
36120
36271
  exports.RangeSlider = RangeSlider;
36272
+ exports.Shortcuts = Shortcuts;
36121
36273
  exports.SkillProgressBar = SkillProgressBar;
36122
36274
  exports.SkillsContainer = SkillsContainer;
36123
- exports.SpellShortcut = SpellShortcut;
36124
36275
  exports.Spellbook = Spellbook;
36125
36276
  exports.SpriteFromAtlas = SpriteFromAtlas;
36126
36277
  exports.TextArea = TextArea;