@rpg-engine/long-bow 0.8.208 → 0.8.209
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/Marketplace/BuyOrderDetailsModal.d.ts +1 -0
- package/dist/components/Marketplace/BuyOrderPanel.d.ts +1 -0
- package/dist/components/Marketplace/Marketplace.d.ts +1 -0
- package/dist/components/Store/Store.d.ts +4 -1
- package/dist/long-bow.cjs.development.js +33 -9
- 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 +34 -10
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Marketplace/BuyOrderDetailsModal.tsx +5 -2
- package/src/components/Marketplace/BuyOrderPanel.tsx +3 -0
- package/src/components/Marketplace/Marketplace.tsx +4 -0
- package/src/components/Store/Store.tsx +15 -2
package/package.json
CHANGED
|
@@ -27,6 +27,7 @@ export interface IBuyOrderDetailsModalProps {
|
|
|
27
27
|
atlasIMG: any;
|
|
28
28
|
enableHotkeys?: () => void;
|
|
29
29
|
disableHotkeys?: () => void;
|
|
30
|
+
scale?: number;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
const scaleIn = keyframes`
|
|
@@ -57,6 +58,7 @@ export const BuyOrderDetailsModal: React.FC<IBuyOrderDetailsModalProps> = ({
|
|
|
57
58
|
atlasIMG,
|
|
58
59
|
enableHotkeys,
|
|
59
60
|
disableHotkeys,
|
|
61
|
+
scale,
|
|
60
62
|
}) => {
|
|
61
63
|
if (!isOpen || !blueprint) return null;
|
|
62
64
|
|
|
@@ -73,7 +75,7 @@ export const BuyOrderDetailsModal: React.FC<IBuyOrderDetailsModalProps> = ({
|
|
|
73
75
|
return (
|
|
74
76
|
<ModalPortal>
|
|
75
77
|
<Overlay onPointerDown={handleClose} />
|
|
76
|
-
<ModalContainer>
|
|
78
|
+
<ModalContainer $scale={scale}>
|
|
77
79
|
<ModalContent
|
|
78
80
|
onClick={stopPropagation as React.MouseEventHandler}
|
|
79
81
|
onPointerDown={stopPropagation as React.PointerEventHandler}
|
|
@@ -162,7 +164,7 @@ const Overlay = styled.div`
|
|
|
162
164
|
z-index: 1000;
|
|
163
165
|
`;
|
|
164
166
|
|
|
165
|
-
const ModalContainer = styled.div
|
|
167
|
+
const ModalContainer = styled.div<{ $scale?: number }>`
|
|
166
168
|
position: fixed;
|
|
167
169
|
inset: 0;
|
|
168
170
|
display: flex;
|
|
@@ -170,6 +172,7 @@ const ModalContainer = styled.div`
|
|
|
170
172
|
justify-content: center;
|
|
171
173
|
z-index: 1001;
|
|
172
174
|
pointer-events: none;
|
|
175
|
+
${({ $scale }) => $scale !== undefined && $scale !== 1 ? `transform: scale(${$scale});` : ''}
|
|
173
176
|
`;
|
|
174
177
|
|
|
175
178
|
const ModalContent = styled.div`
|
|
@@ -35,6 +35,7 @@ export interface IBuyOrderPanelProps {
|
|
|
35
35
|
onCancelBuyOrder: (buyOrderId: string) => void;
|
|
36
36
|
enableHotkeys?: () => void;
|
|
37
37
|
disableHotkeys?: () => void;
|
|
38
|
+
scale?: number;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
const BUY_ORDERS_PER_PAGE = 5;
|
|
@@ -60,6 +61,7 @@ export const BuyOrderPanel: React.FC<IBuyOrderPanelProps> = (props) => {
|
|
|
60
61
|
onCancelBuyOrder,
|
|
61
62
|
enableHotkeys,
|
|
62
63
|
disableHotkeys,
|
|
64
|
+
scale,
|
|
63
65
|
} = props;
|
|
64
66
|
|
|
65
67
|
// Local blueprint display: cleared immediately on Place Request so the
|
|
@@ -111,6 +113,7 @@ export const BuyOrderPanel: React.FC<IBuyOrderPanelProps> = (props) => {
|
|
|
111
113
|
atlasIMG={atlasIMG}
|
|
112
114
|
enableHotkeys={enableHotkeys}
|
|
113
115
|
disableHotkeys={disableHotkeys}
|
|
116
|
+
scale={scale}
|
|
114
117
|
/>
|
|
115
118
|
)}
|
|
116
119
|
|
|
@@ -136,6 +136,7 @@ export interface IMarketPlaceProps {
|
|
|
136
136
|
characterListingsLoading?: boolean;
|
|
137
137
|
characterNameFilter?: string;
|
|
138
138
|
onCharacterNameFilterChange?: (name: string) => void;
|
|
139
|
+
fullScreen?: boolean;
|
|
139
140
|
}
|
|
140
141
|
|
|
141
142
|
type ActiveTab = 'marketplace' | 'characters' | 'sell' | 'buy-orders' | 'history' | 'wallet' | 'settings';
|
|
@@ -200,6 +201,7 @@ export const Marketplace: React.FC<IMarketPlaceProps> = props => {
|
|
|
200
201
|
onCharacterNameFilterChange,
|
|
201
202
|
characterAtlasIMG,
|
|
202
203
|
characterAtlasJSON,
|
|
204
|
+
fullScreen = false,
|
|
203
205
|
} = props;
|
|
204
206
|
|
|
205
207
|
const [activeTab, setActiveTab] = useState<ActiveTab>('marketplace');
|
|
@@ -233,6 +235,7 @@ export const Marketplace: React.FC<IMarketPlaceProps> = props => {
|
|
|
233
235
|
onCloseButton={() => {
|
|
234
236
|
if (onClose) onClose();
|
|
235
237
|
}}
|
|
238
|
+
isFullScreen={fullScreen}
|
|
236
239
|
width="920px"
|
|
237
240
|
cancelDrag="#MarketContainer, .rpgui-dropdown-imp, input, .empty-slot, button"
|
|
238
241
|
scale={scale}
|
|
@@ -375,6 +378,7 @@ export const Marketplace: React.FC<IMarketPlaceProps> = props => {
|
|
|
375
378
|
onCancelBuyOrder={onCancelBuyOrder ?? (() => {})}
|
|
376
379
|
enableHotkeys={props.enableHotkeys}
|
|
377
380
|
disableHotkeys={props.disableHotkeys}
|
|
381
|
+
scale={scale}
|
|
378
382
|
/>
|
|
379
383
|
<BlueprintSearchModal
|
|
380
384
|
isOpen={isBlueprintSearchOpen}
|
|
@@ -4,7 +4,7 @@ import { Gift } from 'pixelarticons/react/Gift';
|
|
|
4
4
|
import { Package } from 'pixelarticons/react/Package';
|
|
5
5
|
import { Wallet } from 'pixelarticons/react/Wallet';
|
|
6
6
|
import React, { ReactNode, useMemo, useState } from 'react';
|
|
7
|
-
import { FaHistory, FaShoppingCart, FaTicketAlt, FaWallet } from 'react-icons/fa';
|
|
7
|
+
import { FaHistory, FaShoppingCart, FaTicketAlt, FaUsers, FaWallet } from 'react-icons/fa';
|
|
8
8
|
import styled from 'styled-components';
|
|
9
9
|
import { uiColors } from '../../constants/uiColors';
|
|
10
10
|
import { DraggableContainer } from '../DraggableContainer';
|
|
@@ -22,7 +22,7 @@ import { StoreRedeemSection } from './sections/StoreRedeemSection';
|
|
|
22
22
|
import { StoreItemDetails } from './StoreItemDetails';
|
|
23
23
|
|
|
24
24
|
// Define TabId union type for tab identifiers
|
|
25
|
-
type TabId = 'premium' | 'packs' | 'items' | 'wallet' | 'history' | 'redeem';
|
|
25
|
+
type TabId = 'premium' | 'packs' | 'items' | 'characters' | 'wallet' | 'history' | 'redeem';
|
|
26
26
|
|
|
27
27
|
// Define IStoreProps locally as a workaround
|
|
28
28
|
export interface IStoreProps {
|
|
@@ -44,8 +44,11 @@ export interface IStoreProps {
|
|
|
44
44
|
defaultActiveTab?: TabId;
|
|
45
45
|
textInputItemKeys?: string[];
|
|
46
46
|
customPacksContent?: React.ReactNode;
|
|
47
|
+
customCharactersContent?: React.ReactNode;
|
|
47
48
|
customWalletContent?: React.ReactNode;
|
|
48
49
|
customHistoryContent?: React.ReactNode;
|
|
50
|
+
/** When true the store renders full-screen (useful on mobile). */
|
|
51
|
+
fullScreen?: boolean;
|
|
49
52
|
packsBadge?: string;
|
|
50
53
|
featuredItems?: IFeaturedItem[];
|
|
51
54
|
onQuickBuy?: (item: IProductBlueprint, quantity?: number) => void;
|
|
@@ -103,8 +106,10 @@ export const Store: React.FC<IStoreProps> = ({
|
|
|
103
106
|
defaultActiveTab,
|
|
104
107
|
textInputItemKeys = [],
|
|
105
108
|
customPacksContent,
|
|
109
|
+
customCharactersContent,
|
|
106
110
|
customWalletContent,
|
|
107
111
|
customHistoryContent,
|
|
112
|
+
fullScreen = false,
|
|
108
113
|
packsTabLabel = 'Packs',
|
|
109
114
|
packsBadge,
|
|
110
115
|
featuredItems,
|
|
@@ -241,6 +246,7 @@ export const Store: React.FC<IStoreProps> = ({
|
|
|
241
246
|
// Build tabs dynamically based on props
|
|
242
247
|
const tabIds: TabId[] = [
|
|
243
248
|
...(tabOrder ?? defaultTabOrder),
|
|
249
|
+
...(customCharactersContent ? ['characters' as TabId] : []),
|
|
244
250
|
...(onRedeem ? ['redeem' as TabId] : []),
|
|
245
251
|
...((onShowWallet || customWalletContent) ? ['wallet' as TabId] : []),
|
|
246
252
|
...((onShowHistory || customHistoryContent) ? ['history' as TabId] : [])
|
|
@@ -347,6 +353,12 @@ export const Store: React.FC<IStoreProps> = ({
|
|
|
347
353
|
/>
|
|
348
354
|
),
|
|
349
355
|
},
|
|
356
|
+
characters: {
|
|
357
|
+
id: 'characters',
|
|
358
|
+
title: 'Characters',
|
|
359
|
+
icon: <FaUsers size={16} />,
|
|
360
|
+
content: customCharactersContent ?? null,
|
|
361
|
+
},
|
|
350
362
|
redeem: {
|
|
351
363
|
id: 'redeem',
|
|
352
364
|
title: 'Redeem',
|
|
@@ -390,6 +402,7 @@ export const Store: React.FC<IStoreProps> = ({
|
|
|
390
402
|
height="auto"
|
|
391
403
|
type={RPGUIContainerTypes.Framed}
|
|
392
404
|
cancelDrag="[class*='Store__Container'], [class*='CartView'], [class*='StoreItemDetails'], .close-button"
|
|
405
|
+
isFullScreen={fullScreen}
|
|
393
406
|
>
|
|
394
407
|
{isCollectingMetadata && currentMetadataItem && currentMetadataItem.metadataType ? (
|
|
395
408
|
<MetadataCollector
|