@rpg-engine/long-bow 0.5.77 → 0.5.78
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/components/Abstractions/SlotsContainer.d.ts +2 -0
- package/dist/components/DraggableContainer.d.ts +2 -0
- package/dist/components/Item/Inventory/ItemContainer.d.ts +2 -0
- package/dist/long-bow.cjs.development.js +48 -11
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +49 -12
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Abstractions/SlotsContainer.tsx +6 -0
- package/src/components/AsyncDropdown.tsx +5 -7
- package/src/components/DraggableContainer.tsx +29 -1
- package/src/components/Dropdown.tsx +3 -5
- package/src/components/Item/Inventory/ItemContainer.tsx +18 -3
- package/src/components/Shortcuts/ShortcutsSetter.tsx +6 -0
package/dist/long-bow.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect, Component, useRef, useContext, createContext, useMemo, useCallback, Fragment } from 'react';
|
|
2
2
|
import { BeatLoader } from 'react-spinners';
|
|
3
|
-
import styled, { keyframes } from 'styled-components';
|
|
3
|
+
import styled, { css, keyframes } from 'styled-components';
|
|
4
4
|
import { v4 } from 'uuid';
|
|
5
5
|
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemRarities, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemSubType, ItemSlotType, isMobileOrTablet, CharacterClass, getSPForLevel, getXPForLevel, PeriodOfDay, UserAccountTypes } from '@rpg-engine/shared';
|
|
6
6
|
import dayjs from 'dayjs';
|
|
@@ -13467,8 +13467,14 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
13467
13467
|
} : _ref$initialPosition,
|
|
13468
13468
|
scale = _ref.scale,
|
|
13469
13469
|
_ref$dragDisabled = _ref.dragDisabled,
|
|
13470
|
-
dragDisabled = _ref$dragDisabled === void 0 ? false : _ref$dragDisabled
|
|
13470
|
+
dragDisabled = _ref$dragDisabled === void 0 ? false : _ref$dragDisabled,
|
|
13471
|
+
isFullScreen = _ref.isFullScreen,
|
|
13472
|
+
opacity = _ref.opacity;
|
|
13471
13473
|
var draggableRef = useRef(null);
|
|
13474
|
+
if (isFullScreen) {
|
|
13475
|
+
width = '100%';
|
|
13476
|
+
height = '100%';
|
|
13477
|
+
}
|
|
13472
13478
|
useOutsideClick(draggableRef, 'item-container');
|
|
13473
13479
|
useEffect(function () {
|
|
13474
13480
|
document.addEventListener('clickOutside', function (event) {
|
|
@@ -13516,7 +13522,9 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
13516
13522
|
ref: draggableRef,
|
|
13517
13523
|
width: width,
|
|
13518
13524
|
height: height || 'auto',
|
|
13519
|
-
className: "rpgui-container " + type + " " + className
|
|
13525
|
+
className: "rpgui-container " + type + " " + className,
|
|
13526
|
+
isFullScreen: isFullScreen,
|
|
13527
|
+
opacity: opacity
|
|
13520
13528
|
}, title && React.createElement(TitleContainer, {
|
|
13521
13529
|
className: "drag-handler"
|
|
13522
13530
|
}, React.createElement(Title, null, imgSrc && React.createElement(Icon, {
|
|
@@ -13530,11 +13538,17 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
13530
13538
|
var Container$7 = /*#__PURE__*/styled.div.withConfig({
|
|
13531
13539
|
displayName: "DraggableContainer__Container",
|
|
13532
13540
|
componentId: "sc-184mpyl-0"
|
|
13533
|
-
})(["height:", ";width:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated
|
|
13541
|
+
})(["height:", ";width:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated;", " ", " &.rpgui-container{padding-top:1.5rem;}"], function (props) {
|
|
13534
13542
|
return props.height;
|
|
13535
13543
|
}, function (_ref2) {
|
|
13536
13544
|
var width = _ref2.width;
|
|
13537
13545
|
return width;
|
|
13546
|
+
}, function (_ref3) {
|
|
13547
|
+
var opacity = _ref3.opacity;
|
|
13548
|
+
return opacity && css(["opacity:", ";"], opacity);
|
|
13549
|
+
}, function (_ref4) {
|
|
13550
|
+
var isFullScreen = _ref4.isFullScreen;
|
|
13551
|
+
return isFullScreen && css(["justify-content:center;align-items:flex-start;align-content:flex-start;"]);
|
|
13538
13552
|
});
|
|
13539
13553
|
var CloseButton$2 = /*#__PURE__*/styled.div.withConfig({
|
|
13540
13554
|
displayName: "DraggableContainer__CloseButton",
|
|
@@ -13543,7 +13557,7 @@ var CloseButton$2 = /*#__PURE__*/styled.div.withConfig({
|
|
|
13543
13557
|
var TitleContainer = /*#__PURE__*/styled.div.withConfig({
|
|
13544
13558
|
displayName: "DraggableContainer__TitleContainer",
|
|
13545
13559
|
componentId: "sc-184mpyl-2"
|
|
13546
|
-
})(["width:100%;height:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;"]);
|
|
13560
|
+
})(["width:100%;height:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;max-height:42px;"]);
|
|
13547
13561
|
var Title = /*#__PURE__*/styled.h1.withConfig({
|
|
13548
13562
|
displayName: "DraggableContainer__Title",
|
|
13549
13563
|
componentId: "sc-184mpyl-3"
|
|
@@ -16116,8 +16130,12 @@ var SlotsContainer = function SlotsContainer(_ref) {
|
|
|
16116
16130
|
onOutsideClick = _ref.onOutsideClick,
|
|
16117
16131
|
initialPosition = _ref.initialPosition,
|
|
16118
16132
|
scale = _ref.scale,
|
|
16119
|
-
width = _ref.width
|
|
16133
|
+
width = _ref.width,
|
|
16134
|
+
isFullScreen = _ref.isFullScreen,
|
|
16135
|
+
opacity = _ref.opacity;
|
|
16120
16136
|
return React.createElement(DraggableContainer, {
|
|
16137
|
+
isFullScreen: isFullScreen,
|
|
16138
|
+
opacity: opacity,
|
|
16121
16139
|
title: title,
|
|
16122
16140
|
type: RPGUIContainerTypes.Framed,
|
|
16123
16141
|
onCloseButton: function onCloseButton() {
|
|
@@ -16211,6 +16229,8 @@ var useScrollOnDrag = function useScrollOnDrag(_ref) {
|
|
|
16211
16229
|
};
|
|
16212
16230
|
};
|
|
16213
16231
|
|
|
16232
|
+
var UI_BREAKPOINT_MOBILE = '950px';
|
|
16233
|
+
|
|
16214
16234
|
var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
16215
16235
|
var setSettingShortcutIndex = _ref.setSettingShortcutIndex,
|
|
16216
16236
|
settingShortcutIndex = _ref.settingShortcutIndex,
|
|
@@ -16281,7 +16301,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
16281
16301
|
var Container$k = /*#__PURE__*/styled.div.withConfig({
|
|
16282
16302
|
displayName: "ShortcutsSetter__Container",
|
|
16283
16303
|
componentId: "sc-xuouuf-0"
|
|
16284
|
-
})(["p{margin:0;margin-left:0.5rem;font-size:10px;}width:100
|
|
16304
|
+
})(["p{margin:0;margin-left:0.5rem;font-size:10px;}width:100%;@media screen and (max-width:", "){max-height:80px;}"], UI_BREAKPOINT_MOBILE);
|
|
16285
16305
|
var Shortcut = /*#__PURE__*/styled.button.withConfig({
|
|
16286
16306
|
displayName: "ShortcutsSetter__Shortcut",
|
|
16287
16307
|
componentId: "sc-xuouuf-1"
|
|
@@ -16503,7 +16523,9 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16503
16523
|
equipmentSet = _ref.equipmentSet,
|
|
16504
16524
|
isDepotSystem = _ref.isDepotSystem,
|
|
16505
16525
|
onPositionChangeEnd = _ref.onPositionChangeEnd,
|
|
16506
|
-
onPositionChangeStart = _ref.onPositionChangeStart
|
|
16526
|
+
onPositionChangeStart = _ref.onPositionChangeStart,
|
|
16527
|
+
isFullScreen = _ref.isFullScreen,
|
|
16528
|
+
opacity = _ref.opacity;
|
|
16507
16529
|
var _useState = useState({
|
|
16508
16530
|
isOpen: false,
|
|
16509
16531
|
maxQuantity: 1,
|
|
@@ -16623,7 +16645,9 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16623
16645
|
initialPosition: initialPosition,
|
|
16624
16646
|
scale: scale,
|
|
16625
16647
|
onPositionChangeEnd: onPositionChangeEnd,
|
|
16626
|
-
onPositionChangeStart: onPositionChangeStart
|
|
16648
|
+
onPositionChangeStart: onPositionChangeStart,
|
|
16649
|
+
isFullScreen: isFullScreen,
|
|
16650
|
+
opacity: opacity
|
|
16627
16651
|
}, type === ItemContainerType.Inventory && shortcuts && removeShortcut && React.createElement(ShortcutsSetter, {
|
|
16628
16652
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
16629
16653
|
settingShortcutIndex: settingShortcutIndex,
|
|
@@ -16634,7 +16658,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16634
16658
|
}), React.createElement(ItemsContainer, {
|
|
16635
16659
|
className: "item-container-body",
|
|
16636
16660
|
ref: containerRef,
|
|
16637
|
-
isScrollable: itemContainer.slotQty > MIN_SLOTS_FOR_SCROLL
|
|
16661
|
+
isScrollable: itemContainer.slotQty > MIN_SLOTS_FOR_SCROLL,
|
|
16662
|
+
isFullScreen: isFullScreen
|
|
16638
16663
|
}, onRenderSlots())), quantitySelect.isOpen && React.createElement(ItemQuantitySelectorModal, {
|
|
16639
16664
|
quantitySelect: quantitySelect,
|
|
16640
16665
|
setQuantitySelect: setQuantitySelect
|
|
@@ -16643,9 +16668,21 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16643
16668
|
var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
16644
16669
|
displayName: "ItemContainer__ItemsContainer",
|
|
16645
16670
|
componentId: "sc-15y5p9l-0"
|
|
16646
|
-
})(["display:flex;justify-content:
|
|
16647
|
-
var
|
|
16671
|
+
})(["display:flex;justify-content:", ";flex-wrap:wrap;max-height:", ";overflow-y:", ";overflow-x:hidden;width:", ";margin-top:", ";"], function (_ref2) {
|
|
16672
|
+
var isFullScreen = _ref2.isFullScreen;
|
|
16673
|
+
return isFullScreen ? 'flex-start' : 'center';
|
|
16674
|
+
}, function (_ref3) {
|
|
16675
|
+
var isFullScreen = _ref3.isFullScreen;
|
|
16676
|
+
return isFullScreen ? '100vh' : '270px';
|
|
16677
|
+
}, function (_ref4) {
|
|
16678
|
+
var isScrollable = _ref4.isScrollable;
|
|
16648
16679
|
return isScrollable ? 'scroll' : 'hidden';
|
|
16680
|
+
}, function (_ref5) {
|
|
16681
|
+
var isFullScreen = _ref5.isFullScreen;
|
|
16682
|
+
return isFullScreen ? '100vw' : '415px';
|
|
16683
|
+
}, function (_ref6) {
|
|
16684
|
+
var isFullScreen = _ref6.isFullScreen;
|
|
16685
|
+
return isFullScreen ? '1rem' : '0';
|
|
16649
16686
|
});
|
|
16650
16687
|
|
|
16651
16688
|
var LeaderboardTable = function LeaderboardTable(props) {
|