@rpg-engine/long-bow 0.8.36 → 0.8.37

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.
@@ -31135,11 +31135,7 @@ var Container$n = /*#__PURE__*/styled__default.div.withConfig({
31135
31135
  var Content = /*#__PURE__*/styled__default.div.withConfig({
31136
31136
  displayName: "PaginatedContent__Content",
31137
31137
  componentId: "sc-lzp9hn-1"
31138
- })(["display:flex;flex-direction:column;gap:0.5rem;flex:1;padding:0.25rem;min-height:200px;max-height:", ";overflow-y:", ";box-sizing:border-box;@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%;overflow-x:hidden;@media (min-width:320px){grid-template-columns:repeat(auto-fit,minmax(120px,1fr));}@media (min-width:400px){grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:0.75rem;}@media (min-width:480px){grid-template-columns:repeat(2,minmax(135px,1fr));gap:1rem;}@media (min-width:768px){grid-template-columns:repeat(3,minmax(135px,1fr));}@media (min-width:", "){grid-template-columns:repeat( ", ",minmax(135px,1fr) );}@media (min-width:", "){grid-template-columns:repeat( ", ",minmax(135px,1fr) );}.PaginatedContent-item{display:flex;align-items:flex-start;justify-content:center;height:", ";width:100%;box-sizing:border-box;min-height:135px;}}&.list{display:flex;flex-direction:column;gap:0.5rem;}"], function (props) {
31139
- return props.$maxHeight;
31140
- }, function (props) {
31141
- return props.$maxHeight ? 'auto' : 'visible';
31142
- }, UI_BREAKPOINT_MOBILE, function (props) {
31138
+ })(["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) {
31143
31139
  return Math.min(props.$gridColumns, 4);
31144
31140
  }, UI_BREAKPOINT_SMALL_LAPTOP, function (props) {
31145
31141
  return props.$gridColumns;
@@ -31181,12 +31177,46 @@ var InformationCenterCell = function InformationCenterCell(_ref) {
31181
31177
  onMouseLeave = _ref.onMouseLeave,
31182
31178
  onMouseMove = _ref.onMouseMove,
31183
31179
  onTouchStart = _ref.onTouchStart;
31180
+ var _useState = React.useState(null),
31181
+ touchStartY = _useState[0],
31182
+ setTouchStartY = _useState[1];
31183
+ var _useState2 = React.useState(null),
31184
+ touchStartX = _useState2[0],
31185
+ setTouchStartX = _useState2[1];
31186
+ var _useState3 = React.useState(false),
31187
+ isTouchScrolling = _useState3[0],
31188
+ setIsTouchScrolling = _useState3[1];
31189
+ var handleTouchStart = function handleTouchStart(e) {
31190
+ setTouchStartY(e.touches[0].clientY);
31191
+ setTouchStartX(e.touches[0].clientX);
31192
+ setIsTouchScrolling(false);
31193
+ };
31194
+ var handleTouchMove = function handleTouchMove(e) {
31195
+ if (touchStartY !== null && touchStartX !== null) {
31196
+ var touchDiffY = Math.abs(e.touches[0].clientY - touchStartY);
31197
+ var touchDiffX = Math.abs(e.touches[0].clientX - touchStartX);
31198
+ // If user moved finger more than 15px in any direction, consider it scrolling
31199
+ if (touchDiffY > 15 || touchDiffX > 15) {
31200
+ setIsTouchScrolling(true);
31201
+ e.stopPropagation(); // Prevent parent elements from handling this touch
31202
+ }
31203
+ }
31204
+ };
31205
+ var handleTouchEnd = function handleTouchEnd(e) {
31206
+ if (!isTouchScrolling && onTouchStart) {
31207
+ onTouchStart(e);
31208
+ }
31209
+ setTouchStartY(null);
31210
+ setTouchStartX(null);
31211
+ };
31184
31212
  return React__default.createElement(CellContainer, {
31185
31213
  onClick: onClick,
31186
31214
  onMouseEnter: onMouseEnter,
31187
31215
  onMouseLeave: onMouseLeave,
31188
31216
  onMouseMove: onMouseMove,
31189
- onTouchStart: onTouchStart
31217
+ onTouchStart: handleTouchStart,
31218
+ onTouchMove: handleTouchMove,
31219
+ onTouchEnd: handleTouchEnd
31190
31220
  }, React__default.createElement(SpriteContainer$1, null, React__default.createElement(SpriteFromAtlas, {
31191
31221
  atlasJSON: atlasJSON,
31192
31222
  atlasIMG: atlasIMG,
@@ -31199,19 +31229,19 @@ var InformationCenterCell = function InformationCenterCell(_ref) {
31199
31229
  var CellContainer = /*#__PURE__*/styled__default.div.withConfig({
31200
31230
  displayName: "InformationCenterCell__CellContainer",
31201
31231
  componentId: "sc-w48fdf-0"
31202
- })(["position:relative;background:rgba(0,0,0,0.2);padding:0.25rem;border-radius:4px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;cursor:pointer;transition:background-color 0.2s ease;width:100%;height:100%;min-height:135px;box-sizing:border-box;gap:0.25rem;margin:0;@media (min-width:360px){padding:0.75rem;gap:0.75rem;margin:2px;width:calc(100% - 4px);}@media (min-width:", "){min-height:150px;}&:hover{background:rgba(0,0,0,0.3);}"], UI_BREAKPOINT_MOBILE);
31232
+ })(["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);
31203
31233
  var SpriteContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
31204
31234
  displayName: "InformationCenterCell__SpriteContainer",
31205
31235
  componentId: "sc-w48fdf-1"
31206
- })(["margin-bottom:0;display:flex;justify-content:center;align-items:center;width:40px;height:40px;position:relative;background:rgba(0,0,0,0.3);border-radius:4px;flex-shrink:0;@media (min-width:360px){width:48px;height:48px;}@media (min-width:480px){width:64px;height:64px;}@media (min-width:", "){width:72px;height:72px;}.sprite-from-atlas-img{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(2);image-rendering:pixelated;}"], UI_BREAKPOINT_MOBILE);
31236
+ })(["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);
31207
31237
  var CellNameContainer = /*#__PURE__*/styled__default.div.withConfig({
31208
31238
  displayName: "InformationCenterCell__CellNameContainer",
31209
31239
  componentId: "sc-w48fdf-2"
31210
- })(["display:flex;flex-direction:column;align-items:center;justify-content:flex-start;flex:1;width:100%;padding-top:0.25rem;"]);
31240
+ })(["display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;width:100%;padding-top:0.1rem;"]);
31211
31241
  var CellName = /*#__PURE__*/styled__default.h3.withConfig({
31212
31242
  displayName: "InformationCenterCell__CellName",
31213
31243
  componentId: "sc-w48fdf-3"
31214
- })(["font-size:0.55rem;color:#fef08a;margin:0;text-align:center;font-family:'Press Start 2P',cursive;line-height:1.2;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.6rem;}@media (min-width:480px){font-size:0.7rem;}@media (min-width:", "){font-size:0.8rem;}"], UI_BREAKPOINT_MOBILE);
31244
+ })(["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);
31215
31245
 
31216
31246
  var BaseInformationDetails = function BaseInformationDetails(_ref) {
31217
31247
  var name = _ref.name,
@@ -31576,9 +31606,9 @@ var AdvancedFilters = function AdvancedFilters(_ref) {
31576
31606
  var rect = buttonRef.current.getBoundingClientRect();
31577
31607
  var isMobileView = window.innerWidth < 480;
31578
31608
  if (isMobileView) {
31579
- // Center in the screen for mobile
31609
+ // For mobile, position in center of screen
31580
31610
  setButtonPosition({
31581
- top: Math.max(50, window.innerHeight / 2 - 150),
31611
+ top: window.innerHeight / 2,
31582
31612
  left: window.innerWidth / 2,
31583
31613
  isMobile: true
31584
31614
  });
@@ -31626,13 +31656,13 @@ var AdvancedFilters = function AdvancedFilters(_ref) {
31626
31656
  ref: panelRef,
31627
31657
  style: {
31628
31658
  position: 'fixed',
31629
- top: buttonPosition.top + "px",
31630
- left: buttonPosition.left + "px",
31631
- transform: 'translateX(-50%)',
31659
+ top: buttonPosition.isMobile ? '50vh' : buttonPosition.top + "px",
31660
+ left: buttonPosition.isMobile ? '50vw' : buttonPosition.left + "px",
31661
+ transform: buttonPosition.isMobile ? 'translate(-50%, -50%)' : 'translateX(-50%)',
31632
31662
  zIndex: 9999
31633
31663
  },
31634
31664
  "$isMobile": buttonPosition.isMobile
31635
- }, React__default.createElement(FilterHeader, null, React__default.createElement(FilterTitle, null, "Advanced Filters"), buttonPosition.isMobile && React__default.createElement(CloseButton$6, {
31665
+ }, React__default.createElement(FilterHeader, null, React__default.createElement(FilterTitle, null, "Advanced Filters"), React__default.createElement(CloseButton$6, {
31636
31666
  onClick: onToggle
31637
31667
  }, "\xD7")), sections.map(renderFilterSection), hasActiveFilters && React__default.createElement(ClearFiltersButton, {
31638
31668
  onClick: onClearAll
@@ -32731,7 +32761,7 @@ var InformationCenter = function InformationCenter(_ref) {
32731
32761
  var Container$r = /*#__PURE__*/styled__default.div.withConfig({
32732
32762
  displayName: "InformationCenter__Container",
32733
32763
  componentId: "sc-1ttl62e-0"
32734
- })(["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;}@media (min-width:", "){max-width:900px;padding:1rem;}@media (min-width:", "){max-width:1200px;}"], UI_BREAKPOINT_MOBILE, UI_BREAKPOINT_SMALL_LAPTOP);
32764
+ })(["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;}"]);
32735
32765
  var LoadingMessage = /*#__PURE__*/styled__default.div.withConfig({
32736
32766
  displayName: "InformationCenter__LoadingMessage",
32737
32767
  componentId: "sc-1ttl62e-1"