@rpg-engine/long-bow 0.8.38 → 0.8.40
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/InformationCenter/InformationCenter.d.ts +1 -0
- package/dist/components/shared/AdvancedFilters/AdvancedFilters.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +43 -23
- 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 +43 -23
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/InformationCenter/InformationCenter.tsx +3 -0
- package/src/components/shared/AdvancedFilters/AdvancedFilters.tsx +46 -18
- package/src/components/shared/PaginatedContent/PaginatedContent.tsx +1 -1
package/dist/long-bow.esm.js
CHANGED
|
@@ -31130,7 +31130,7 @@ var Container$n = /*#__PURE__*/styled.div.withConfig({
|
|
|
31130
31130
|
var Content = /*#__PURE__*/styled.div.withConfig({
|
|
31131
31131
|
displayName: "PaginatedContent__Content",
|
|
31132
31132
|
componentId: "sc-lzp9hn-1"
|
|
31133
|
-
})(["display:flex;flex-direction:column;gap:0.5rem;flex:1;padding:0.25rem;min-height:200px;max-height:60vh;height:100%;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,0.3) rgba(0,0,0,0.2);@media (min-width:360px){padding:0.5rem;}@media (min-width:480px){padding:
|
|
31133
|
+
})(["display:flex;flex-direction:column;gap:0.5rem;flex:1;padding:0.25rem;min-height:200px;max-height:60vh;height:100%;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,0.3) rgba(0,0,0,0.2);@media (min-width:360px){padding:0.5rem;}@media (min-width:480px){padding:0.5rem;}&.grid{display:grid;grid-template-columns:1fr;gap:0.5rem;align-items:start;justify-content:center;width:100%;@media (min-width:320px){grid-template-columns:repeat(2,minmax(100px,1fr));}@media (min-width:400px){grid-template-columns:repeat(2,minmax(120px,1fr));gap:0.75rem;}@media (min-width:480px){grid-template-columns:repeat(3,minmax(120px,1fr));gap:1rem;}@media (min-width:768px){grid-template-columns:repeat(4,minmax(120px,1fr));}@media (min-width:", "){grid-template-columns:repeat( ", ",minmax(120px,1fr) );}@media (min-width:", "){grid-template-columns:repeat( ", ",minmax(120px,1fr) );}.PaginatedContent-item{display:flex;align-items:flex-start;justify-content:center;height:", ";width:100%;box-sizing:border-box;min-height:120px;}}&.list{display:flex;flex-direction:column;gap:0.5rem;}"], UI_BREAKPOINT_MOBILE, function (props) {
|
|
31134
31134
|
return Math.min(props.$gridColumns, 4);
|
|
31135
31135
|
}, UI_BREAKPOINT_SMALL_LAPTOP, function (props) {
|
|
31136
31136
|
return props.$gridColumns;
|
|
@@ -31550,7 +31550,8 @@ var AdvancedFilters = function AdvancedFilters(_ref) {
|
|
|
31550
31550
|
onToggle = _ref.onToggle,
|
|
31551
31551
|
sections = _ref.sections,
|
|
31552
31552
|
onClearAll = _ref.onClearAll,
|
|
31553
|
-
hasActiveFilters = _ref.hasActiveFilters
|
|
31553
|
+
hasActiveFilters = _ref.hasActiveFilters,
|
|
31554
|
+
onClose = _ref.onClose;
|
|
31554
31555
|
var renderFilterSection = function renderFilterSection(section) {
|
|
31555
31556
|
switch (section.type) {
|
|
31556
31557
|
case 'range':
|
|
@@ -31596,11 +31597,11 @@ var AdvancedFilters = function AdvancedFilters(_ref) {
|
|
|
31596
31597
|
setButtonPosition = _React$useState[1];
|
|
31597
31598
|
var buttonRef = useRef(null);
|
|
31598
31599
|
var panelRef = useRef(null);
|
|
31600
|
+
var isMobile = isMobileOrTablet();
|
|
31599
31601
|
useEffect(function () {
|
|
31600
31602
|
if (isOpen && buttonRef.current) {
|
|
31601
31603
|
var rect = buttonRef.current.getBoundingClientRect();
|
|
31602
|
-
|
|
31603
|
-
if (isMobileView) {
|
|
31604
|
+
if (isMobile) {
|
|
31604
31605
|
// For mobile, position in center of screen
|
|
31605
31606
|
setButtonPosition({
|
|
31606
31607
|
top: window.innerHeight / 2,
|
|
@@ -31616,7 +31617,7 @@ var AdvancedFilters = function AdvancedFilters(_ref) {
|
|
|
31616
31617
|
});
|
|
31617
31618
|
}
|
|
31618
31619
|
}
|
|
31619
|
-
}, [isOpen]);
|
|
31620
|
+
}, [isOpen, isMobile]);
|
|
31620
31621
|
// Handle click outside to close the panel
|
|
31621
31622
|
useEffect(function () {
|
|
31622
31623
|
var handleClickOutside = function handleClickOutside(event) {
|
|
@@ -31631,6 +31632,12 @@ var AdvancedFilters = function AdvancedFilters(_ref) {
|
|
|
31631
31632
|
document.removeEventListener('mousedown', handleClickOutside);
|
|
31632
31633
|
};
|
|
31633
31634
|
}, [isOpen, onToggle]);
|
|
31635
|
+
var handleClose = function handleClose() {
|
|
31636
|
+
onToggle();
|
|
31637
|
+
if (onClose) {
|
|
31638
|
+
onClose();
|
|
31639
|
+
}
|
|
31640
|
+
};
|
|
31634
31641
|
return React.createElement(Container$q, null, React.createElement(FilterButton, {
|
|
31635
31642
|
onClick: onToggle,
|
|
31636
31643
|
"$hasActiveFilters": hasActiveFilters,
|
|
@@ -31647,18 +31654,17 @@ var AdvancedFilters = function AdvancedFilters(_ref) {
|
|
|
31647
31654
|
return rangeValue[0] !== undefined || rangeValue[1] !== undefined;
|
|
31648
31655
|
}
|
|
31649
31656
|
return section.value !== 'all';
|
|
31650
|
-
}).length)), isOpen && React.createElement(Portal, null, React.createElement(FiltersPanel, {
|
|
31657
|
+
}).length)), isOpen && React.createElement(Portal, null, isMobile && React.createElement(Overlay$1, null), React.createElement(FiltersPanel, {
|
|
31651
31658
|
ref: panelRef,
|
|
31652
31659
|
style: {
|
|
31653
31660
|
position: 'fixed',
|
|
31654
|
-
top:
|
|
31655
|
-
left:
|
|
31656
|
-
transform: buttonPosition.isMobile ? 'translate(-50%, -50%)' : 'translateX(-50%)',
|
|
31661
|
+
top: isMobile ? '50vh' : buttonPosition.top + "px",
|
|
31662
|
+
left: isMobile ? '50vw' : buttonPosition.left + "px",
|
|
31657
31663
|
zIndex: 9999
|
|
31658
31664
|
},
|
|
31659
|
-
"$isMobile":
|
|
31665
|
+
"$isMobile": isMobile
|
|
31660
31666
|
}, React.createElement(FilterHeader, null, React.createElement(FilterTitle, null, "Advanced Filters"), React.createElement(CloseButton$6, {
|
|
31661
|
-
onClick:
|
|
31667
|
+
onClick: handleClose
|
|
31662
31668
|
}, "\xD7")), sections.map(renderFilterSection), hasActiveFilters && React.createElement(ClearFiltersButton, {
|
|
31663
31669
|
onClick: onClearAll
|
|
31664
31670
|
}, "Clear All Filters"))));
|
|
@@ -31690,40 +31696,52 @@ var FilterCount = /*#__PURE__*/styled.div.withConfig({
|
|
|
31690
31696
|
var FiltersPanel = /*#__PURE__*/styled.div.withConfig({
|
|
31691
31697
|
displayName: "AdvancedFilters__FiltersPanel",
|
|
31692
31698
|
componentId: "sc-1xj6ldr-3"
|
|
31693
|
-
})(["background:#1a1a1a;border:1px solid #333;border-radius:6px;padding:
|
|
31699
|
+
})(["background:#1a1a1a;border:1px solid #333;border-radius:6px;padding:", ";width:", ";max-width:calc(100vw - 20px);display:flex;flex-direction:column;gap:", ";box-shadow:0 4px 12px rgba(0,0,0,0.3);font-family:'Press Start 2P',cursive;transform:", ";@media (max-width:320px){width:220px;padding:0.65rem;gap:0.65rem;}&:before{content:'';position:absolute;top:-6px;left:50%;transform:translateX(-50%) rotate(45deg);width:12px;height:12px;background:#1a1a1a;border-left:1px solid #333;border-top:1px solid #333;display:", ";}"], function (props) {
|
|
31700
|
+
return props.$isMobile ? '0.75rem' : '1rem';
|
|
31701
|
+
}, function (props) {
|
|
31702
|
+
return props.$isMobile ? '240px' : '280px';
|
|
31703
|
+
}, function (props) {
|
|
31704
|
+
return props.$isMobile ? '0.75rem' : '1rem';
|
|
31705
|
+
}, function (props) {
|
|
31706
|
+
return props.$isMobile ? 'translate(-50%, -50%) scale(0.9)' : 'translateX(-50%)';
|
|
31707
|
+
}, function (props) {
|
|
31694
31708
|
return props.$isMobile ? 'none' : 'block';
|
|
31695
31709
|
});
|
|
31696
31710
|
var FilterHeader = /*#__PURE__*/styled.div.withConfig({
|
|
31697
31711
|
displayName: "AdvancedFilters__FilterHeader",
|
|
31698
31712
|
componentId: "sc-1xj6ldr-4"
|
|
31699
31713
|
})(["display:flex;align-items:center;justify-content:space-between;padding-bottom:0.75rem;margin-bottom:0.5rem;border-bottom:1px solid #333;"]);
|
|
31714
|
+
var Overlay$1 = /*#__PURE__*/styled.div.withConfig({
|
|
31715
|
+
displayName: "AdvancedFilters__Overlay",
|
|
31716
|
+
componentId: "sc-1xj6ldr-5"
|
|
31717
|
+
})(["position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.6);z-index:9998;animation:fadeIn 0.2s ease-out;@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}"]);
|
|
31700
31718
|
var FilterTitle = /*#__PURE__*/styled.div.withConfig({
|
|
31701
31719
|
displayName: "AdvancedFilters__FilterTitle",
|
|
31702
|
-
componentId: "sc-1xj6ldr-
|
|
31720
|
+
componentId: "sc-1xj6ldr-6"
|
|
31703
31721
|
})(["font-weight:600;color:#ffd700;font-size:0.75rem;"]);
|
|
31704
31722
|
var FilterSection = /*#__PURE__*/styled.div.withConfig({
|
|
31705
31723
|
displayName: "AdvancedFilters__FilterSection",
|
|
31706
|
-
componentId: "sc-1xj6ldr-
|
|
31724
|
+
componentId: "sc-1xj6ldr-7"
|
|
31707
31725
|
})(["display:flex;flex-direction:column;gap:0.5rem;"]);
|
|
31708
31726
|
var Label$1 = /*#__PURE__*/styled.div.withConfig({
|
|
31709
31727
|
displayName: "AdvancedFilters__Label",
|
|
31710
|
-
componentId: "sc-1xj6ldr-
|
|
31728
|
+
componentId: "sc-1xj6ldr-8"
|
|
31711
31729
|
})(["color:#999;font-size:0.65rem;text-transform:uppercase;letter-spacing:0.05em;"]);
|
|
31712
31730
|
var RangeInputs = /*#__PURE__*/styled.div.withConfig({
|
|
31713
31731
|
displayName: "AdvancedFilters__RangeInputs",
|
|
31714
|
-
componentId: "sc-1xj6ldr-
|
|
31732
|
+
componentId: "sc-1xj6ldr-9"
|
|
31715
31733
|
})(["display:flex;align-items:center;gap:0.5rem;input{width:80px;background:#262626 !important;border:1px solid #444 !important;border-radius:4px !important;color:#ddd !important;font-size:0.65rem !important;padding:0.5rem !important;height:auto !important;box-shadow:inset 0 1px 3px rgba(0,0,0,0.2) !important;&::placeholder{color:#666 !important;}&:focus{border-color:#f59e0b !important;outline:none !important;}}svg{color:#666;font-size:0.875rem;}"]);
|
|
31716
31734
|
var ClearFiltersButton = /*#__PURE__*/styled.button.withConfig({
|
|
31717
31735
|
displayName: "AdvancedFilters__ClearFiltersButton",
|
|
31718
|
-
componentId: "sc-1xj6ldr-
|
|
31736
|
+
componentId: "sc-1xj6ldr-10"
|
|
31719
31737
|
})(["width:100%;background:transparent;color:#666;border:none;padding:0.75rem 0;margin-top:0.5rem;cursor:pointer;font-size:0.65rem;transition:all 0.2s;border-top:1px solid #333;text-transform:uppercase;letter-spacing:0.05em;font-family:'Press Start 2P',cursive;&:hover{color:#ffd700;}"]);
|
|
31720
31738
|
var CloseButton$6 = /*#__PURE__*/styled.button.withConfig({
|
|
31721
31739
|
displayName: "AdvancedFilters__CloseButton",
|
|
31722
|
-
componentId: "sc-1xj6ldr-
|
|
31740
|
+
componentId: "sc-1xj6ldr-11"
|
|
31723
31741
|
})(["background:transparent;border:none;color:#999;font-size:1.5rem;line-height:1;cursor:pointer;padding:0;margin:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;&:hover{color:#ffd700;}"]);
|
|
31724
31742
|
var StyledDropdownWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
31725
31743
|
displayName: "AdvancedFilters__StyledDropdownWrapper",
|
|
31726
|
-
componentId: "sc-1xj6ldr-
|
|
31744
|
+
componentId: "sc-1xj6ldr-12"
|
|
31727
31745
|
})([".rpgui-dropdown-imp{font-size:0.8rem;min-height:unset;padding-top:0.3rem;}"]);
|
|
31728
31746
|
|
|
31729
31747
|
var ItemsAdvancedFilters = function ItemsAdvancedFilters(_ref) {
|
|
@@ -32692,7 +32710,8 @@ var InformationCenter = function InformationCenter(_ref) {
|
|
|
32692
32710
|
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
32693
32711
|
error = _ref.error,
|
|
32694
32712
|
_ref$initialSearchQue = _ref.initialSearchQuery,
|
|
32695
|
-
initialSearchQuery = _ref$initialSearchQue === void 0 ? '' : _ref$initialSearchQue
|
|
32713
|
+
initialSearchQuery = _ref$initialSearchQue === void 0 ? '' : _ref$initialSearchQue,
|
|
32714
|
+
onClose = _ref.onClose;
|
|
32696
32715
|
var _useState = useState('bestiary'),
|
|
32697
32716
|
activeTab = _useState[0],
|
|
32698
32717
|
setActiveTab = _useState[1];
|
|
@@ -32742,7 +32761,8 @@ var InformationCenter = function InformationCenter(_ref) {
|
|
|
32742
32761
|
type: RPGUIContainerTypes.Framed,
|
|
32743
32762
|
width: isMobile ? '95%' : '80%',
|
|
32744
32763
|
minWidth: "300px",
|
|
32745
|
-
cancelDrag: ".PaginatedContent-content"
|
|
32764
|
+
cancelDrag: ".PaginatedContent-content",
|
|
32765
|
+
onCloseButton: onClose
|
|
32746
32766
|
}, React.createElement(Container$r, null, React.createElement(InternalTabs, {
|
|
32747
32767
|
tabs: tabs,
|
|
32748
32768
|
activeTextColor: "#000000",
|
|
@@ -36132,7 +36152,7 @@ var Spell = function Spell(_ref) {
|
|
|
36132
36152
|
onPointerUp: onPointerUp == null ? void 0 : onPointerUp.bind(null, spellKey),
|
|
36133
36153
|
isSettingShortcut: isSettingShortcut && !disabled,
|
|
36134
36154
|
className: "spell"
|
|
36135
|
-
}, disabled && React.createElement(Overlay$
|
|
36155
|
+
}, disabled && React.createElement(Overlay$2, null, charMagicLevel < minMagicLevelRequired ? 'Low magic level' : manaCost > charMana && 'No mana'), React.createElement(SpellImage, null, activeCooldown && activeCooldown > 0 ? React.createElement("span", {
|
|
36136
36156
|
className: "cooldown"
|
|
36137
36157
|
}, activeCooldown.toFixed(activeCooldown > 10 ? 0 : 1)) : null, React.createElement(SpriteFromAtlas, {
|
|
36138
36158
|
atlasIMG: atlasIMG,
|
|
@@ -36178,7 +36198,7 @@ var Cost = /*#__PURE__*/styled.p.withConfig({
|
|
|
36178
36198
|
displayName: "Spell__Cost",
|
|
36179
36199
|
componentId: "sc-j96fa2-6"
|
|
36180
36200
|
})(["display:flex;align-items:center;flex-direction:column;gap:0.5rem;div{z-index:1;}.mana{position:relative;font-size:", ";font-weight:bold;z-index:1;&::after{position:absolute;content:'';top:0;left:0;background-color:", ";width:100%;height:100%;border-radius:50%;transform:scale(1.8);filter:blur(10px);z-index:-1;}}"], uiFonts.size.medium, uiColors.blue);
|
|
36181
|
-
var Overlay$
|
|
36201
|
+
var Overlay$2 = /*#__PURE__*/styled.p.withConfig({
|
|
36182
36202
|
displayName: "Spell__Overlay",
|
|
36183
36203
|
componentId: "sc-j96fa2-7"
|
|
36184
36204
|
})(["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);
|