@loafmarkets/ui 0.1.0 → 0.1.1
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/index.d.mts +60 -3
- package/dist/index.d.ts +60 -3
- package/dist/index.js +2012 -428
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2010 -429
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
-
import
|
|
5
|
+
import * as LightweightCharts from 'lightweight-charts';
|
|
6
6
|
|
|
7
7
|
declare const buttonVariants: (props?: ({
|
|
8
8
|
variant?: "primary" | "accent" | "accentOutline" | "media" | "outline" | "ghost" | "danger" | null | undefined;
|
|
@@ -82,6 +82,7 @@ interface OrderbookProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
82
82
|
defaultTab?: "orderbook" | "trades";
|
|
83
83
|
onTabChange?: (tab: "orderbook" | "trades") => void;
|
|
84
84
|
rightHeader?: React.ReactNode;
|
|
85
|
+
variant?: "auto" | "default" | "compact";
|
|
85
86
|
}
|
|
86
87
|
declare const Orderbook: React.ForwardRefExoticComponent<OrderbookProps & React.RefAttributes<HTMLDivElement>>;
|
|
87
88
|
|
|
@@ -122,6 +123,36 @@ interface HousePositionSliderProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
122
123
|
}
|
|
123
124
|
declare function HousePositionSlider({ tokenId, tokenSymbol, totalTokens, currentPrice, availableCash, tokensHeld, pendingOrders, defaultOrderType, orderbook, ownershipPercentOverride, onConfirmOrder, className, ...props }: HousePositionSliderProps): react_jsx_runtime.JSX.Element;
|
|
124
125
|
|
|
126
|
+
type HousePositionSliderMobileOrderPayload = {
|
|
127
|
+
side: "buy" | "sell";
|
|
128
|
+
orderType: "market" | "limit";
|
|
129
|
+
tokenId: string;
|
|
130
|
+
tokenSymbol: string;
|
|
131
|
+
price: number;
|
|
132
|
+
deltaTokens: number;
|
|
133
|
+
deltaValue: number;
|
|
134
|
+
targetOwnership: number;
|
|
135
|
+
targetTokens: number;
|
|
136
|
+
targetValue: number;
|
|
137
|
+
};
|
|
138
|
+
type HousePositionSliderMobileOrderbook = {
|
|
139
|
+
bids?: OrderbookLevel[];
|
|
140
|
+
asks?: OrderbookLevel[];
|
|
141
|
+
};
|
|
142
|
+
interface HousePositionSliderMobileProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
143
|
+
tokenId: string;
|
|
144
|
+
tokenSymbol: string;
|
|
145
|
+
totalTokens: number;
|
|
146
|
+
currentPrice: number;
|
|
147
|
+
availableCash: number;
|
|
148
|
+
tokensHeld: number;
|
|
149
|
+
defaultOrderType?: "market" | "limit";
|
|
150
|
+
orderbook?: HousePositionSliderMobileOrderbook;
|
|
151
|
+
ownershipPercentOverride?: number;
|
|
152
|
+
onConfirmOrder?: (payload: HousePositionSliderMobileOrderPayload) => void;
|
|
153
|
+
}
|
|
154
|
+
declare function HousePositionSliderMobile({ tokenId, tokenSymbol, totalTokens, currentPrice, availableCash, tokensHeld, defaultOrderType, orderbook, ownershipPercentOverride, onConfirmOrder, className, ...props }: HousePositionSliderMobileProps): react_jsx_runtime.JSX.Element;
|
|
155
|
+
|
|
125
156
|
type PropertyTourProps = Omit<React.ComponentPropsWithoutRef<typeof Card>, "title"> & {
|
|
126
157
|
title: string;
|
|
127
158
|
src: string;
|
|
@@ -172,12 +203,21 @@ type PropertyValueSummary = {
|
|
|
172
203
|
currencySymbol?: string;
|
|
173
204
|
formatOptions?: Intl.NumberFormatOptions;
|
|
174
205
|
};
|
|
206
|
+
type PropertyPriceSummary = {
|
|
207
|
+
value: number;
|
|
208
|
+
change?: number;
|
|
209
|
+
changePercent?: number;
|
|
210
|
+
currencySymbol?: string;
|
|
211
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
212
|
+
percentFormatOptions?: Intl.NumberFormatOptions;
|
|
213
|
+
};
|
|
175
214
|
type PropertyCompareBarProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
176
215
|
addresses: (PropertyAddressOption | string)[];
|
|
177
216
|
selectedAddressId?: string;
|
|
178
217
|
onSelectAddress?: (addressId: string) => void;
|
|
179
218
|
propertyValue?: PropertyValueSummary;
|
|
180
219
|
propertyValueVariant?: "classic" | "card" | "pill";
|
|
220
|
+
price?: PropertyPriceSummary;
|
|
181
221
|
};
|
|
182
222
|
declare const PropertyCompareBar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
183
223
|
addresses: (PropertyAddressOption | string)[];
|
|
@@ -185,6 +225,7 @@ declare const PropertyCompareBar: React.ForwardRefExoticComponent<React.HTMLAttr
|
|
|
185
225
|
onSelectAddress?: (addressId: string) => void;
|
|
186
226
|
propertyValue?: PropertyValueSummary;
|
|
187
227
|
propertyValueVariant?: "classic" | "card" | "pill";
|
|
228
|
+
price?: PropertyPriceSummary;
|
|
188
229
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
189
230
|
|
|
190
231
|
interface LoafLiquidityBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
@@ -227,7 +268,7 @@ declare const YourOrders: React.ForwardRefExoticComponent<React.HTMLAttributes<H
|
|
|
227
268
|
|
|
228
269
|
type PriceChartRange = "1D" | "1W" | "1M" | "3M" | "1Y";
|
|
229
270
|
type PriceChartCandle = {
|
|
230
|
-
time: Time;
|
|
271
|
+
time: LightweightCharts.Time;
|
|
231
272
|
open: number;
|
|
232
273
|
high: number;
|
|
233
274
|
low: number;
|
|
@@ -312,4 +353,20 @@ declare const PropertySubheader: React.ForwardRefExoticComponent<React.HTMLAttri
|
|
|
312
353
|
actions?: PropertySubheaderAction[];
|
|
313
354
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
314
355
|
|
|
315
|
-
|
|
356
|
+
type MobileTradeNavItem = {
|
|
357
|
+
id: string;
|
|
358
|
+
label: string;
|
|
359
|
+
icon?: React.ReactNode;
|
|
360
|
+
};
|
|
361
|
+
type MobileTradeNavProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
362
|
+
items: MobileTradeNavItem[];
|
|
363
|
+
activeId: string;
|
|
364
|
+
onChange?: (itemId: string) => void;
|
|
365
|
+
};
|
|
366
|
+
declare const MobileTradeNav: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
367
|
+
items: MobileTradeNavItem[];
|
|
368
|
+
activeId: string;
|
|
369
|
+
onChange?: (itemId: string) => void;
|
|
370
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
371
|
+
|
|
372
|
+
export { Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type HousePositionOrderbook, type HousePositionPendingOrder, HousePositionSlider, HousePositionSliderMobile, type HousePositionSliderMobileOrderPayload, type HousePositionSliderMobileOrderbook, type HousePositionSliderMobileProps, type HousePositionSliderOrderPayload, type HousePositionSliderProps, LoafLiquidityBadge, MobileTradeNav, type MobileTradeNavItem, type MobileTradeNavProps, Orderbook, type OrderbookLevel, type OrderbookProps, type OrderbookSide, type OrderbookTrade, PortfolioSummary, type PortfolioSummaryProps, PriceChart, type PriceChartCandle, type PriceChartProps, type PriceChartRange, type PropertyAddressOption, PropertyCompareBar, type PropertyCompareBarProps, PropertyHeroHeader, type PropertyHeroHeaderProps, type PropertyNewsItem, type PropertyNewsType, PropertyNewsUpdates, type PropertyNewsUpdatesProps, PropertySubheader, type PropertySubheaderAction, type PropertySubheaderProps, type PropertySubheaderTab, PropertyTour, type PropertyTourProps, type YourOrder, type YourOrderSide, YourOrders, type YourOrdersProps, badgeVariants, buttonVariants };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
-
import
|
|
5
|
+
import * as LightweightCharts from 'lightweight-charts';
|
|
6
6
|
|
|
7
7
|
declare const buttonVariants: (props?: ({
|
|
8
8
|
variant?: "primary" | "accent" | "accentOutline" | "media" | "outline" | "ghost" | "danger" | null | undefined;
|
|
@@ -82,6 +82,7 @@ interface OrderbookProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
82
82
|
defaultTab?: "orderbook" | "trades";
|
|
83
83
|
onTabChange?: (tab: "orderbook" | "trades") => void;
|
|
84
84
|
rightHeader?: React.ReactNode;
|
|
85
|
+
variant?: "auto" | "default" | "compact";
|
|
85
86
|
}
|
|
86
87
|
declare const Orderbook: React.ForwardRefExoticComponent<OrderbookProps & React.RefAttributes<HTMLDivElement>>;
|
|
87
88
|
|
|
@@ -122,6 +123,36 @@ interface HousePositionSliderProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
122
123
|
}
|
|
123
124
|
declare function HousePositionSlider({ tokenId, tokenSymbol, totalTokens, currentPrice, availableCash, tokensHeld, pendingOrders, defaultOrderType, orderbook, ownershipPercentOverride, onConfirmOrder, className, ...props }: HousePositionSliderProps): react_jsx_runtime.JSX.Element;
|
|
124
125
|
|
|
126
|
+
type HousePositionSliderMobileOrderPayload = {
|
|
127
|
+
side: "buy" | "sell";
|
|
128
|
+
orderType: "market" | "limit";
|
|
129
|
+
tokenId: string;
|
|
130
|
+
tokenSymbol: string;
|
|
131
|
+
price: number;
|
|
132
|
+
deltaTokens: number;
|
|
133
|
+
deltaValue: number;
|
|
134
|
+
targetOwnership: number;
|
|
135
|
+
targetTokens: number;
|
|
136
|
+
targetValue: number;
|
|
137
|
+
};
|
|
138
|
+
type HousePositionSliderMobileOrderbook = {
|
|
139
|
+
bids?: OrderbookLevel[];
|
|
140
|
+
asks?: OrderbookLevel[];
|
|
141
|
+
};
|
|
142
|
+
interface HousePositionSliderMobileProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
143
|
+
tokenId: string;
|
|
144
|
+
tokenSymbol: string;
|
|
145
|
+
totalTokens: number;
|
|
146
|
+
currentPrice: number;
|
|
147
|
+
availableCash: number;
|
|
148
|
+
tokensHeld: number;
|
|
149
|
+
defaultOrderType?: "market" | "limit";
|
|
150
|
+
orderbook?: HousePositionSliderMobileOrderbook;
|
|
151
|
+
ownershipPercentOverride?: number;
|
|
152
|
+
onConfirmOrder?: (payload: HousePositionSliderMobileOrderPayload) => void;
|
|
153
|
+
}
|
|
154
|
+
declare function HousePositionSliderMobile({ tokenId, tokenSymbol, totalTokens, currentPrice, availableCash, tokensHeld, defaultOrderType, orderbook, ownershipPercentOverride, onConfirmOrder, className, ...props }: HousePositionSliderMobileProps): react_jsx_runtime.JSX.Element;
|
|
155
|
+
|
|
125
156
|
type PropertyTourProps = Omit<React.ComponentPropsWithoutRef<typeof Card>, "title"> & {
|
|
126
157
|
title: string;
|
|
127
158
|
src: string;
|
|
@@ -172,12 +203,21 @@ type PropertyValueSummary = {
|
|
|
172
203
|
currencySymbol?: string;
|
|
173
204
|
formatOptions?: Intl.NumberFormatOptions;
|
|
174
205
|
};
|
|
206
|
+
type PropertyPriceSummary = {
|
|
207
|
+
value: number;
|
|
208
|
+
change?: number;
|
|
209
|
+
changePercent?: number;
|
|
210
|
+
currencySymbol?: string;
|
|
211
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
212
|
+
percentFormatOptions?: Intl.NumberFormatOptions;
|
|
213
|
+
};
|
|
175
214
|
type PropertyCompareBarProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
176
215
|
addresses: (PropertyAddressOption | string)[];
|
|
177
216
|
selectedAddressId?: string;
|
|
178
217
|
onSelectAddress?: (addressId: string) => void;
|
|
179
218
|
propertyValue?: PropertyValueSummary;
|
|
180
219
|
propertyValueVariant?: "classic" | "card" | "pill";
|
|
220
|
+
price?: PropertyPriceSummary;
|
|
181
221
|
};
|
|
182
222
|
declare const PropertyCompareBar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
183
223
|
addresses: (PropertyAddressOption | string)[];
|
|
@@ -185,6 +225,7 @@ declare const PropertyCompareBar: React.ForwardRefExoticComponent<React.HTMLAttr
|
|
|
185
225
|
onSelectAddress?: (addressId: string) => void;
|
|
186
226
|
propertyValue?: PropertyValueSummary;
|
|
187
227
|
propertyValueVariant?: "classic" | "card" | "pill";
|
|
228
|
+
price?: PropertyPriceSummary;
|
|
188
229
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
189
230
|
|
|
190
231
|
interface LoafLiquidityBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
@@ -227,7 +268,7 @@ declare const YourOrders: React.ForwardRefExoticComponent<React.HTMLAttributes<H
|
|
|
227
268
|
|
|
228
269
|
type PriceChartRange = "1D" | "1W" | "1M" | "3M" | "1Y";
|
|
229
270
|
type PriceChartCandle = {
|
|
230
|
-
time: Time;
|
|
271
|
+
time: LightweightCharts.Time;
|
|
231
272
|
open: number;
|
|
232
273
|
high: number;
|
|
233
274
|
low: number;
|
|
@@ -312,4 +353,20 @@ declare const PropertySubheader: React.ForwardRefExoticComponent<React.HTMLAttri
|
|
|
312
353
|
actions?: PropertySubheaderAction[];
|
|
313
354
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
314
355
|
|
|
315
|
-
|
|
356
|
+
type MobileTradeNavItem = {
|
|
357
|
+
id: string;
|
|
358
|
+
label: string;
|
|
359
|
+
icon?: React.ReactNode;
|
|
360
|
+
};
|
|
361
|
+
type MobileTradeNavProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
362
|
+
items: MobileTradeNavItem[];
|
|
363
|
+
activeId: string;
|
|
364
|
+
onChange?: (itemId: string) => void;
|
|
365
|
+
};
|
|
366
|
+
declare const MobileTradeNav: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
367
|
+
items: MobileTradeNavItem[];
|
|
368
|
+
activeId: string;
|
|
369
|
+
onChange?: (itemId: string) => void;
|
|
370
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
371
|
+
|
|
372
|
+
export { Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type HousePositionOrderbook, type HousePositionPendingOrder, HousePositionSlider, HousePositionSliderMobile, type HousePositionSliderMobileOrderPayload, type HousePositionSliderMobileOrderbook, type HousePositionSliderMobileProps, type HousePositionSliderOrderPayload, type HousePositionSliderProps, LoafLiquidityBadge, MobileTradeNav, type MobileTradeNavItem, type MobileTradeNavProps, Orderbook, type OrderbookLevel, type OrderbookProps, type OrderbookSide, type OrderbookTrade, PortfolioSummary, type PortfolioSummaryProps, PriceChart, type PriceChartCandle, type PriceChartProps, type PriceChartRange, type PropertyAddressOption, PropertyCompareBar, type PropertyCompareBarProps, PropertyHeroHeader, type PropertyHeroHeaderProps, type PropertyNewsItem, type PropertyNewsType, PropertyNewsUpdates, type PropertyNewsUpdatesProps, PropertySubheader, type PropertySubheaderAction, type PropertySubheaderProps, type PropertySubheaderTab, PropertyTour, type PropertyTourProps, type YourOrder, type YourOrderSide, YourOrders, type YourOrdersProps, badgeVariants, buttonVariants };
|