@rpg-engine/long-bow 0.3.59 → 0.3.60

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.
@@ -33052,7 +33052,7 @@ var CheckButton = function CheckButton(_ref) {
33052
33052
  var SingleShortcut = /*#__PURE__*/styled.button.withConfig({
33053
33053
  displayName: "SingleShortcut",
33054
33054
  componentId: "sc-vz5ev8-0"
33055
- })(["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);
33055
+ })(["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:", ";border-color:", ";}&:disabled{opacity:0.5;}"], uiColors.lightGray, uiColors.darkGray, uiColors.blue, uiColors.yellow, uiColors.darkGray, uiColors.gray, uiColors.yellow);
33056
33056
 
33057
33057
  var CircularController = function CircularController(_ref) {
33058
33058
  var onActionClick = _ref.onActionClick,
@@ -33114,6 +33114,9 @@ var CircularController = function CircularController(_ref) {
33114
33114
  imgScale: 1.4,
33115
33115
  imgStyle: {
33116
33116
  left: '4px'
33117
+ },
33118
+ containerStyle: {
33119
+ pointerEvents: 'none'
33117
33120
  }
33118
33121
  }), React.createElement("span", {
33119
33122
  className: "qty"
@@ -33151,7 +33154,7 @@ var CircularController = function CircularController(_ref) {
33151
33154
  var Button$2 = /*#__PURE__*/styled.button.withConfig({
33152
33155
  displayName: "CircularController__Button",
33153
33156
  componentId: "sc-1fewf3h-0"
33154
- })(["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);
33157
+ })(["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:all 0.1s;margin-top:-3rem;&.active{background-color:", ";border-color:", ";}.sword{transform:rotate(-45deg);height:2.5rem;width:1.9rem;pointer-events:none;}"], uiColors.lightGray, uiColors.darkGray, uiColors.gray, uiColors.yellow);
33155
33158
  var CancelButton = /*#__PURE__*/styled(Button$2).withConfig({
33156
33159
  displayName: "CircularController__CancelButton",
33157
33160
  componentId: "sc-1fewf3h-1"
@@ -33167,7 +33170,7 @@ var ShortcutsContainer = /*#__PURE__*/styled.div.withConfig({
33167
33170
  var StyledShortcut = /*#__PURE__*/styled(SingleShortcut).withConfig({
33168
33171
  displayName: "CircularController__StyledShortcut",
33169
33172
  componentId: "sc-1fewf3h-4"
33170
- })(["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);
33173
+ })(["width:2.5rem;height:2.5rem;transition:all 0.1s;.mana,.qty{font-size:0.5rem;}&:hover,&:focus,&:active{background-color:", ";}&.active{background-color:", ";border-color:", ";}"], uiColors.lightGray, uiColors.gray, uiColors.yellow);
33171
33174
 
33172
33175
  function useOutsideClick(ref, id) {
33173
33176
  useEffect(function () {
@@ -35228,12 +35231,19 @@ var Shortcuts = function Shortcuts(_ref) {
35228
35231
  atlasJSON = _ref.atlasJSON,
35229
35232
  atlasIMG = _ref.atlasIMG,
35230
35233
  inventory = _ref.inventory;
35234
+ var shortcutsRefs = useRef([]);
35231
35235
  useEffect(function () {
35232
35236
  var handleKeyDown = function handleKeyDown(e) {
35233
35237
  if (isBlockedCastingByKeyboard) return;
35234
35238
  var shortcutIndex = Number(e.key) - 1;
35235
35239
  if (shortcutIndex >= 0 && shortcutIndex <= 5) {
35240
+ var _shortcutsRefs$curren;
35236
35241
  onShortcutCast(shortcutIndex);
35242
+ (_shortcutsRefs$curren = shortcutsRefs.current[shortcutIndex]) == null ? void 0 : _shortcutsRefs$curren.classList.add('active');
35243
+ setTimeout(function () {
35244
+ var _shortcutsRefs$curren2;
35245
+ (_shortcutsRefs$curren2 = shortcutsRefs.current[shortcutIndex]) == null ? void 0 : _shortcutsRefs$curren2.classList.remove('active');
35246
+ }, 150);
35237
35247
  }
35238
35248
  };
35239
35249
  window.addEventListener('keydown', handleKeyDown);
@@ -35261,10 +35271,13 @@ var Shortcuts = function Shortcuts(_ref) {
35261
35271
  var totalQty = itemsFromEquipment.reduce(function (acc, item) {
35262
35272
  return acc + ((item == null ? void 0 : item.stackQty) || 1);
35263
35273
  }, 0);
35264
- return React.createElement(SingleShortcut, {
35274
+ return React.createElement(StyledShortcut$1, {
35265
35275
  key: i,
35266
35276
  onPointerDown: onShortcutCast.bind(null, i),
35267
- disabled: false
35277
+ disabled: false,
35278
+ ref: function ref(el) {
35279
+ if (el) shortcutsRefs.current[i] = el;
35280
+ }
35268
35281
  }, _payload && React.createElement(SpriteFromAtlas, {
35269
35282
  atlasIMG: atlasIMG,
35270
35283
  atlasJSON: atlasJSON,
@@ -35282,10 +35295,13 @@ var Shortcuts = function Shortcuts(_ref) {
35282
35295
  }, i + 1));
35283
35296
  }
35284
35297
  var payload = (_shortcuts$i3 = shortcuts[i]) == null ? void 0 : _shortcuts$i3.payload;
35285
- return React.createElement(SingleShortcut, {
35298
+ return React.createElement(StyledShortcut$1, {
35286
35299
  key: i,
35287
35300
  onPointerDown: onShortcutCast.bind(null, i),
35288
- disabled: mana < ((_payload$manaCost = payload == null ? void 0 : payload.manaCost) != null ? _payload$manaCost : 0)
35301
+ disabled: mana < ((_payload$manaCost = payload == null ? void 0 : payload.manaCost) != null ? _payload$manaCost : 0),
35302
+ ref: function ref(el) {
35303
+ if (el) shortcutsRefs.current[i] = el;
35304
+ }
35289
35305
  }, React.createElement("span", {
35290
35306
  className: "mana"
35291
35307
  }, payload && payload.manaCost), React.createElement("span", {
@@ -35297,9 +35313,13 @@ var Shortcuts = function Shortcuts(_ref) {
35297
35313
  }, i + 1));
35298
35314
  }));
35299
35315
  };
35316
+ var StyledShortcut$1 = /*#__PURE__*/styled(SingleShortcut).withConfig({
35317
+ displayName: "Shortcuts__StyledShortcut",
35318
+ componentId: "sc-kgtsi7-0"
35319
+ })(["transition:all 0.15s;&.active{background-color:", ";border-color:", ";}"], uiColors.gray, uiColors.yellow);
35300
35320
  var List$1 = /*#__PURE__*/styled.p.withConfig({
35301
35321
  displayName: "Shortcuts__List",
35302
- componentId: "sc-kgtsi7-0"
35322
+ componentId: "sc-kgtsi7-1"
35303
35323
  })(["width:100%;display:flex;align-items:center;justify-content:center;gap:0.5rem;box-sizing:border-box;margin:0 !important;"]);
35304
35324
 
35305
35325
  var SimpleProgressBar = function SimpleProgressBar(_ref) {