@rpg-engine/long-bow 0.8.60 → 0.8.63
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/Store/CartView.d.ts +1 -1
- package/dist/components/Store/Store.d.ts +1 -1
- package/dist/components/Store/StoreItemDetails.d.ts +1 -1
- package/dist/components/Store/StoreItemRow.d.ts +1 -2
- package/dist/components/Store/hooks/useStoreCart.d.ts +1 -1
- package/dist/components/Store/sections/StoreItemsSection.d.ts +1 -2
- package/dist/components/Store/sections/StorePacksSection.d.ts +1 -1
- package/package.json +2 -2
- package/src/components/Store/CartView.tsx +2 -1
- package/src/components/Store/Store.tsx +1 -2
- package/src/components/Store/StoreItemDetails.tsx +1 -1
- package/src/components/Store/StoreItemRow.tsx +1 -2
- package/src/components/Store/hooks/useStoreCart.ts +2 -2
- package/src/components/Store/sections/StoreItemsSection.tsx +2 -2
- package/src/components/Store/sections/StorePacksSection.tsx +1 -1
- package/src/stories/Features/store/Store.stories.tsx +1 -2
- package/dist/components/Store/StoreTypes.d.ts +0 -48
- package/src/components/Store/StoreTypes.ts +0 -55
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { UserAccountTypes } from '@rpg-engine/shared';
|
|
1
|
+
import { IStoreItem, UserAccountTypes } from '@rpg-engine/shared';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { IStoreItem } from './StoreTypes';
|
|
4
3
|
interface IStoreItemRowProps {
|
|
5
4
|
item: IStoreItem;
|
|
6
5
|
atlasJSON: Record<string, any>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { UserAccountTypes } from '@rpg-engine/shared';
|
|
1
|
+
import { IStoreItem, UserAccountTypes } from '@rpg-engine/shared';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { IStoreItem } from '../StoreTypes';
|
|
4
3
|
interface IStoreItemsSectionProps {
|
|
5
4
|
items: IStoreItem[];
|
|
6
5
|
onAddToCart: (item: IStoreItem, quantity: number) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpg-engine/long-bow",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.63",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@capacitor/core": "^6.1.0",
|
|
86
86
|
"@rollup/plugin-image": "^2.1.1",
|
|
87
|
-
"@rpg-engine/shared": "^0.9.
|
|
87
|
+
"@rpg-engine/shared": "^0.9.119",
|
|
88
88
|
"dayjs": "^1.11.2",
|
|
89
89
|
"font-awesome": "^4.7.0",
|
|
90
90
|
"fs-extra": "^10.1.0",
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { IStoreItem } from '@rpg-engine/shared';
|
|
1
2
|
import React, { useState } from 'react';
|
|
2
3
|
import { FaShoppingBag, FaTimes, FaTrash } from 'react-icons/fa';
|
|
3
4
|
import styled from 'styled-components';
|
|
4
5
|
import { CTAButton } from '../shared/CTAButton/CTAButton';
|
|
5
6
|
import { SpriteFromAtlas } from '../shared/SpriteFromAtlas';
|
|
6
|
-
|
|
7
|
+
|
|
7
8
|
|
|
8
9
|
interface ICartViewProps {
|
|
9
10
|
cartItems: { item: IStoreItem; quantity: number }[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ItemRarities, ItemSubType, ItemType } from '@rpg-engine/shared';
|
|
1
|
+
import { IItemPack, IStoreItem, IStoreProps, ItemRarities, ItemSubType, ItemType } from '@rpg-engine/shared';
|
|
2
2
|
import React, { useMemo, useState } from 'react';
|
|
3
3
|
import { FaShoppingCart } from 'react-icons/fa';
|
|
4
4
|
import styled from 'styled-components';
|
|
@@ -12,7 +12,6 @@ import { useStoreCart } from './hooks/useStoreCart';
|
|
|
12
12
|
import { StoreItemsSection } from './sections/StoreItemsSection';
|
|
13
13
|
import { StorePacksSection } from './sections/StorePacksSection';
|
|
14
14
|
import { StoreItemDetails } from './StoreItemDetails';
|
|
15
|
-
import { IItemPack, IStoreItem, IStoreProps } from './StoreTypes';
|
|
16
15
|
|
|
17
16
|
export const Store: React.FC<IStoreProps> = ({
|
|
18
17
|
items,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { IItemPack, IStoreItem } from '@rpg-engine/shared';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { FaArrowLeft, FaCartPlus } from 'react-icons/fa';
|
|
3
4
|
import styled from 'styled-components';
|
|
4
5
|
import { CTAButton } from '../shared/CTAButton/CTAButton';
|
|
5
|
-
import { IItemPack, IStoreItem } from './StoreTypes';
|
|
6
6
|
|
|
7
7
|
interface IStoreItemDetailsProps {
|
|
8
8
|
item: IStoreItem | (IItemPack & { name: string; texturePath: string });
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { UserAccountTypes } from '@rpg-engine/shared';
|
|
1
|
+
import { IStoreItem, UserAccountTypes } from '@rpg-engine/shared';
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import { FaCartPlus } from 'react-icons/fa';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { SelectArrow } from '../Arrow/SelectArrow';
|
|
6
6
|
import { CTAButton } from '../shared/CTAButton/CTAButton';
|
|
7
7
|
import { SpriteFromAtlas } from '../shared/SpriteFromAtlas';
|
|
8
|
-
import { IStoreItem } from './StoreTypes';
|
|
9
8
|
|
|
10
9
|
interface IStoreItemRowProps {
|
|
11
10
|
item: IStoreItem;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { useEffect, useRef, useState } from 'react';
|
|
2
1
|
import {
|
|
3
2
|
ICartItem,
|
|
4
3
|
IItemPack,
|
|
@@ -6,7 +5,8 @@ import {
|
|
|
6
5
|
IPurchaseUnit,
|
|
7
6
|
IStoreItem,
|
|
8
7
|
PurchaseType,
|
|
9
|
-
} from '
|
|
8
|
+
} from '@rpg-engine/shared';
|
|
9
|
+
import { useEffect, useRef, useState } from 'react';
|
|
10
10
|
|
|
11
11
|
interface IUseStoreCart {
|
|
12
12
|
cartItems: ICartItem[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { UserAccountTypes } from '@rpg-engine/shared';
|
|
1
|
+
import { IStoreItem, UserAccountTypes } from '@rpg-engine/shared';
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import { ScrollableContent } from '../../shared/ScrollableContent/ScrollableContent';
|
|
4
4
|
import { StoreItemRow } from '../StoreItemRow';
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
|
|
7
7
|
interface IStoreItemsSectionProps {
|
|
8
8
|
items: IStoreItem[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { IItemPack } from '@rpg-engine/shared';
|
|
1
2
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
2
3
|
import { FaCartPlus } from 'react-icons/fa';
|
|
3
4
|
import styled from 'styled-components';
|
|
4
5
|
import { CTAButton } from '../../shared/CTAButton/CTAButton';
|
|
5
6
|
import { ScrollableContent } from '../../shared/ScrollableContent/ScrollableContent';
|
|
6
7
|
import { ShoppingCardHorizontal } from '../../shared/ShoppingCart/CartCardHorizontal';
|
|
7
|
-
import { IItemPack } from '../StoreTypes';
|
|
8
8
|
|
|
9
9
|
interface IStorePacksSectionProps {
|
|
10
10
|
packs: IItemPack[];
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { UserAccountTypes } from '@rpg-engine/shared';
|
|
1
|
+
import { IItemPack, IPurchase, IStoreItem, UserAccountTypes } from '@rpg-engine/shared';
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { RPGUIRoot } from '../../../components/RPGUI/RPGUIRoot';
|
|
5
5
|
import customSkinImage from '../../../components/Store/sections/images/custom-skin.png';
|
|
6
6
|
import { Store } from '../../../components/Store/Store';
|
|
7
|
-
import { IItemPack, IPurchase, IStoreItem } from '../../../components/Store/StoreTypes';
|
|
8
7
|
import itemsAtlasJSON from '../../../mocks/atlas/items/items.json';
|
|
9
8
|
import itemsAtlasIMG from '../../../mocks/atlas/items/items.png';
|
|
10
9
|
import { mockItems } from '../../../mocks/informationCenter.mocks';
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { IItem, UserAccountTypes } from '@rpg-engine/shared';
|
|
2
|
-
export interface IStoreItem extends Omit<IItem, 'canSell'> {
|
|
3
|
-
price: number;
|
|
4
|
-
requiredAccountType?: UserAccountTypes[];
|
|
5
|
-
key: string;
|
|
6
|
-
name: string;
|
|
7
|
-
texturePath: string;
|
|
8
|
-
}
|
|
9
|
-
export interface ICartItem {
|
|
10
|
-
item: IStoreItem;
|
|
11
|
-
quantity: number;
|
|
12
|
-
}
|
|
13
|
-
export interface IItemPack {
|
|
14
|
-
key: string;
|
|
15
|
-
title: string;
|
|
16
|
-
description: string;
|
|
17
|
-
priceUSD: number;
|
|
18
|
-
image: {
|
|
19
|
-
src: string;
|
|
20
|
-
default?: string;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export interface IStoreProps {
|
|
24
|
-
items: IStoreItem[];
|
|
25
|
-
packs?: IItemPack[];
|
|
26
|
-
atlasJSON: Record<string, any>;
|
|
27
|
-
atlasIMG: string;
|
|
28
|
-
onPurchase: (purchase: IPurchase) => void;
|
|
29
|
-
userAccountType: UserAccountTypes;
|
|
30
|
-
loading?: boolean;
|
|
31
|
-
error?: string;
|
|
32
|
-
initialSearchQuery?: string;
|
|
33
|
-
onClose?: () => void;
|
|
34
|
-
}
|
|
35
|
-
export declare enum PurchaseType {
|
|
36
|
-
PremiumAccount = "PremiumAccount",
|
|
37
|
-
Item = "Item",
|
|
38
|
-
Pack = "Pack"
|
|
39
|
-
}
|
|
40
|
-
export interface IPurchaseUnit {
|
|
41
|
-
purchaseKey: string;
|
|
42
|
-
qty: number;
|
|
43
|
-
type: PurchaseType;
|
|
44
|
-
name: string;
|
|
45
|
-
}
|
|
46
|
-
export interface IPurchase {
|
|
47
|
-
purchases: IPurchaseUnit[];
|
|
48
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { IItem, UserAccountTypes } from '@rpg-engine/shared';
|
|
2
|
-
|
|
3
|
-
export interface IStoreItem extends Omit<IItem, 'canSell'> {
|
|
4
|
-
price: number;
|
|
5
|
-
requiredAccountType?: UserAccountTypes[];
|
|
6
|
-
key: string;
|
|
7
|
-
name: string;
|
|
8
|
-
texturePath: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface ICartItem {
|
|
12
|
-
item: IStoreItem;
|
|
13
|
-
quantity: number;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface IItemPack {
|
|
17
|
-
key: string;
|
|
18
|
-
title: string;
|
|
19
|
-
description: string;
|
|
20
|
-
priceUSD: number;
|
|
21
|
-
image: {
|
|
22
|
-
src: string;
|
|
23
|
-
default?: string;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface IStoreProps {
|
|
28
|
-
items: IStoreItem[];
|
|
29
|
-
packs?: IItemPack[];
|
|
30
|
-
atlasJSON: Record<string, any>;
|
|
31
|
-
atlasIMG: string;
|
|
32
|
-
onPurchase: (purchase: IPurchase) => void;
|
|
33
|
-
userAccountType: UserAccountTypes;
|
|
34
|
-
loading?: boolean;
|
|
35
|
-
error?: string;
|
|
36
|
-
initialSearchQuery?: string;
|
|
37
|
-
onClose?: () => void;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export enum PurchaseType {
|
|
41
|
-
PremiumAccount = 'PremiumAccount',
|
|
42
|
-
Item = 'Item',
|
|
43
|
-
Pack = 'Pack',
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface IPurchaseUnit {
|
|
47
|
-
purchaseKey: string;
|
|
48
|
-
qty: number;
|
|
49
|
-
type: PurchaseType;
|
|
50
|
-
name: string; // Adding name for better identification
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface IPurchase {
|
|
54
|
-
purchases: IPurchaseUnit[];
|
|
55
|
-
}
|