@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.
@@ -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:", ";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) {
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: 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.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);
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
- })(["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);
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:flex-start;flex:1;width:100%;padding-top:0.25rem;"]);
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.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);
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
- // Center in the screen for mobile
31604
+ // For mobile, position in center of screen
31575
31605
  setButtonPosition({
31576
- top: Math.max(50, window.innerHeight / 2 - 150),
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"), buttonPosition.isMobile && React.createElement(CloseButton$6, {
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
@@ -32726,7 +32756,7 @@ var InformationCenter = function InformationCenter(_ref) {
32726
32756
  var Container$r = /*#__PURE__*/styled.div.withConfig({
32727
32757
  displayName: "InformationCenter__Container",
32728
32758
  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;}@media (min-width:", "){max-width:900px;padding:1rem;}@media (min-width:", "){max-width:1200px;}"], UI_BREAKPOINT_MOBILE, UI_BREAKPOINT_SMALL_LAPTOP);
32759
+ })(["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
32760
  var LoadingMessage = /*#__PURE__*/styled.div.withConfig({
32731
32761
  displayName: "InformationCenter__LoadingMessage",
32732
32762
  componentId: "sc-1ttl62e-1"