@rpg-engine/long-bow 0.8.36 → 0.8.38
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/long-bow.cjs.development.js +49 -18
- 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 -18
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/InformationCenter/InformationCenter.tsx +1 -13
- package/src/components/InformationCenter/InformationCenterCell.tsx +64 -27
- package/src/components/shared/AdvancedFilters/AdvancedFilters.tsx +10 -8
- package/src/components/shared/PaginatedContent/PaginatedContent.tsx +14 -10
package/dist/long-bow.esm.js
CHANGED
|
@@ -31130,11 +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:
|
|
31134
|
-
return props.$maxHeight;
|
|
31135
|
-
}, function (props) {
|
|
31136
|
-
return props.$maxHeight ? 'auto' : 'visible';
|
|
31137
|
-
}, UI_BREAKPOINT_MOBILE, function (props) {
|
|
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:1rem;}&.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) {
|
|
31138
31134
|
return Math.min(props.$gridColumns, 4);
|
|
31139
31135
|
}, UI_BREAKPOINT_SMALL_LAPTOP, function (props) {
|
|
31140
31136
|
return props.$gridColumns;
|
|
@@ -31176,12 +31172,46 @@ var InformationCenterCell = function InformationCenterCell(_ref) {
|
|
|
31176
31172
|
onMouseLeave = _ref.onMouseLeave,
|
|
31177
31173
|
onMouseMove = _ref.onMouseMove,
|
|
31178
31174
|
onTouchStart = _ref.onTouchStart;
|
|
31175
|
+
var _useState = useState(null),
|
|
31176
|
+
touchStartY = _useState[0],
|
|
31177
|
+
setTouchStartY = _useState[1];
|
|
31178
|
+
var _useState2 = useState(null),
|
|
31179
|
+
touchStartX = _useState2[0],
|
|
31180
|
+
setTouchStartX = _useState2[1];
|
|
31181
|
+
var _useState3 = useState(false),
|
|
31182
|
+
isTouchScrolling = _useState3[0],
|
|
31183
|
+
setIsTouchScrolling = _useState3[1];
|
|
31184
|
+
var handleTouchStart = function handleTouchStart(e) {
|
|
31185
|
+
setTouchStartY(e.touches[0].clientY);
|
|
31186
|
+
setTouchStartX(e.touches[0].clientX);
|
|
31187
|
+
setIsTouchScrolling(false);
|
|
31188
|
+
};
|
|
31189
|
+
var handleTouchMove = function handleTouchMove(e) {
|
|
31190
|
+
if (touchStartY !== null && touchStartX !== null) {
|
|
31191
|
+
var touchDiffY = Math.abs(e.touches[0].clientY - touchStartY);
|
|
31192
|
+
var touchDiffX = Math.abs(e.touches[0].clientX - touchStartX);
|
|
31193
|
+
// If user moved finger more than 15px in any direction, consider it scrolling
|
|
31194
|
+
if (touchDiffY > 15 || touchDiffX > 15) {
|
|
31195
|
+
setIsTouchScrolling(true);
|
|
31196
|
+
e.stopPropagation(); // Prevent parent elements from handling this touch
|
|
31197
|
+
}
|
|
31198
|
+
}
|
|
31199
|
+
};
|
|
31200
|
+
var handleTouchEnd = function handleTouchEnd(e) {
|
|
31201
|
+
if (!isTouchScrolling && onTouchStart) {
|
|
31202
|
+
onTouchStart(e);
|
|
31203
|
+
}
|
|
31204
|
+
setTouchStartY(null);
|
|
31205
|
+
setTouchStartX(null);
|
|
31206
|
+
};
|
|
31179
31207
|
return React.createElement(CellContainer, {
|
|
31180
31208
|
onClick: onClick,
|
|
31181
31209
|
onMouseEnter: onMouseEnter,
|
|
31182
31210
|
onMouseLeave: onMouseLeave,
|
|
31183
31211
|
onMouseMove: onMouseMove,
|
|
31184
|
-
onTouchStart:
|
|
31212
|
+
onTouchStart: handleTouchStart,
|
|
31213
|
+
onTouchMove: handleTouchMove,
|
|
31214
|
+
onTouchEnd: handleTouchEnd
|
|
31185
31215
|
}, React.createElement(SpriteContainer$1, null, React.createElement(SpriteFromAtlas, {
|
|
31186
31216
|
atlasJSON: atlasJSON,
|
|
31187
31217
|
atlasIMG: atlasIMG,
|
|
@@ -31194,19 +31224,19 @@ var InformationCenterCell = function InformationCenterCell(_ref) {
|
|
|
31194
31224
|
var CellContainer = /*#__PURE__*/styled.div.withConfig({
|
|
31195
31225
|
displayName: "InformationCenterCell__CellContainer",
|
|
31196
31226
|
componentId: "sc-w48fdf-0"
|
|
31197
|
-
})(["position:relative;background:rgba(0,0,0,0.2);padding:0.
|
|
31227
|
+
})(["position:relative;background:rgba(0,0,0,0.2);padding:0.2rem;border-radius:4px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;transition:background-color 0.2s ease;width:100%;height:100%;min-height:90px;box-sizing:border-box;gap:0.2rem;margin:0;@media (min-width:360px){padding:0.3rem;gap:0.3rem;margin:1px;width:calc(100% - 2px);min-height:100px;}@media (min-width:", "){min-height:110px;}&:hover{background:rgba(0,0,0,0.3);}"], UI_BREAKPOINT_MOBILE);
|
|
31198
31228
|
var SpriteContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
31199
31229
|
displayName: "InformationCenterCell__SpriteContainer",
|
|
31200
31230
|
componentId: "sc-w48fdf-1"
|
|
31201
|
-
})(["
|
|
31231
|
+
})(["display:flex;justify-content:center;align-items:center;width:32px;height:32px;position:relative;background:rgba(0,0,0,0.3);border-radius:4px;flex-shrink:0;overflow:hidden;padding:1rem;margin-top:1rem;@media (min-width:360px){width:36px;height:36px;}@media (min-width:480px){width:42px;height:42px;}@media (min-width:", "){width:48px;height:48px;}.sprite-from-atlas-img{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(2);image-rendering:pixelated;}"], UI_BREAKPOINT_MOBILE);
|
|
31202
31232
|
var CellNameContainer = /*#__PURE__*/styled.div.withConfig({
|
|
31203
31233
|
displayName: "InformationCenterCell__CellNameContainer",
|
|
31204
31234
|
componentId: "sc-w48fdf-2"
|
|
31205
|
-
})(["display:flex;flex-direction:column;align-items:center;justify-content:
|
|
31235
|
+
})(["display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;width:100%;padding-top:0.1rem;"]);
|
|
31206
31236
|
var CellName = /*#__PURE__*/styled.h3.withConfig({
|
|
31207
31237
|
displayName: "InformationCenterCell__CellName",
|
|
31208
31238
|
componentId: "sc-w48fdf-3"
|
|
31209
|
-
})(["font-size:0.
|
|
31239
|
+
})(["font-size:0.5rem;color:#fef08a;margin:0;text-align:center;font-family:'Press Start 2P',cursive;line-height:1.1;word-break:break-word;max-width:100%;overflow-wrap:break-word;hyphens:auto;width:100%;padding:0 0.125rem;box-sizing:border-box;@media (min-width:320px){padding:0 0.25rem;}@media (min-width:360px){font-size:0.55rem;}@media (min-width:480px){font-size:0.6rem;}@media (min-width:", "){font-size:0.65rem;}"], UI_BREAKPOINT_MOBILE);
|
|
31210
31240
|
|
|
31211
31241
|
var BaseInformationDetails = function BaseInformationDetails(_ref) {
|
|
31212
31242
|
var name = _ref.name,
|
|
@@ -31571,9 +31601,9 @@ var AdvancedFilters = function AdvancedFilters(_ref) {
|
|
|
31571
31601
|
var rect = buttonRef.current.getBoundingClientRect();
|
|
31572
31602
|
var isMobileView = window.innerWidth < 480;
|
|
31573
31603
|
if (isMobileView) {
|
|
31574
|
-
//
|
|
31604
|
+
// For mobile, position in center of screen
|
|
31575
31605
|
setButtonPosition({
|
|
31576
|
-
top:
|
|
31606
|
+
top: window.innerHeight / 2,
|
|
31577
31607
|
left: window.innerWidth / 2,
|
|
31578
31608
|
isMobile: true
|
|
31579
31609
|
});
|
|
@@ -31621,13 +31651,13 @@ var AdvancedFilters = function AdvancedFilters(_ref) {
|
|
|
31621
31651
|
ref: panelRef,
|
|
31622
31652
|
style: {
|
|
31623
31653
|
position: 'fixed',
|
|
31624
|
-
top: buttonPosition.top + "px",
|
|
31625
|
-
left: buttonPosition.left + "px",
|
|
31626
|
-
transform: 'translateX(-50%)',
|
|
31654
|
+
top: buttonPosition.isMobile ? '50vh' : buttonPosition.top + "px",
|
|
31655
|
+
left: buttonPosition.isMobile ? '50vw' : buttonPosition.left + "px",
|
|
31656
|
+
transform: buttonPosition.isMobile ? 'translate(-50%, -50%)' : 'translateX(-50%)',
|
|
31627
31657
|
zIndex: 9999
|
|
31628
31658
|
},
|
|
31629
31659
|
"$isMobile": buttonPosition.isMobile
|
|
31630
|
-
}, React.createElement(FilterHeader, null, React.createElement(FilterTitle, null, "Advanced Filters"),
|
|
31660
|
+
}, React.createElement(FilterHeader, null, React.createElement(FilterTitle, null, "Advanced Filters"), React.createElement(CloseButton$6, {
|
|
31631
31661
|
onClick: onToggle
|
|
31632
31662
|
}, "\xD7")), sections.map(renderFilterSection), hasActiveFilters && React.createElement(ClearFiltersButton, {
|
|
31633
31663
|
onClick: onClearAll
|
|
@@ -32711,7 +32741,8 @@ var InformationCenter = function InformationCenter(_ref) {
|
|
|
32711
32741
|
title: "Information Center",
|
|
32712
32742
|
type: RPGUIContainerTypes.Framed,
|
|
32713
32743
|
width: isMobile ? '95%' : '80%',
|
|
32714
|
-
minWidth: "300px"
|
|
32744
|
+
minWidth: "300px",
|
|
32745
|
+
cancelDrag: ".PaginatedContent-content"
|
|
32715
32746
|
}, React.createElement(Container$r, null, React.createElement(InternalTabs, {
|
|
32716
32747
|
tabs: tabs,
|
|
32717
32748
|
activeTextColor: "#000000",
|
|
@@ -32726,7 +32757,7 @@ var InformationCenter = function InformationCenter(_ref) {
|
|
|
32726
32757
|
var Container$r = /*#__PURE__*/styled.div.withConfig({
|
|
32727
32758
|
displayName: "InformationCenter__Container",
|
|
32728
32759
|
componentId: "sc-1ttl62e-0"
|
|
32729
|
-
})(["width:100%;max-width:100%;margin:0 auto;padding:0.125rem;overflow:hidden;box-sizing:border-box;@media (min-width:320px){padding:0.25rem;}@media (min-width:360px){padding:0.5rem;}@media (min-width:480px){padding:0.75rem;}
|
|
32760
|
+
})(["width:100%;max-width:100%;margin:0 auto;padding:0.125rem;overflow:hidden;box-sizing:border-box;@media (min-width:320px){padding:0.25rem;}@media (min-width:360px){padding:0.5rem;}@media (min-width:480px){padding:0.75rem;}"]);
|
|
32730
32761
|
var LoadingMessage = /*#__PURE__*/styled.div.withConfig({
|
|
32731
32762
|
displayName: "InformationCenter__LoadingMessage",
|
|
32732
32763
|
componentId: "sc-1ttl62e-1"
|