@b3dotfun/sdk 0.0.71-alpha.1 → 0.0.71-alpha.3
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/cjs/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/drawer.js +1 -1
- package/dist/cjs/shared/react/stores/currencyStore.js +2 -1
- package/dist/esm/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/drawer.js +1 -1
- package/dist/esm/shared/react/stores/currencyStore.js +2 -1
- package/dist/types/global-account/react/components/ui/drawer.d.ts +1 -1
- package/package.json +1 -1
- package/src/global-account/react/components/ui/drawer.tsx +6 -2
- package/src/shared/react/stores/currencyStore.ts +3 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
3
3
|
declare const Drawer: {
|
|
4
|
-
({ shouldScaleBackground, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
({ shouldScaleBackground, repositionInputs, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
7
7
|
declare const DrawerTrigger: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -39,7 +39,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
39
39
|
const React = __importStar(require("react"));
|
|
40
40
|
const vaul_1 = require("vaul");
|
|
41
41
|
const utils_1 = require("../../../../shared/utils");
|
|
42
|
-
const Drawer = ({ shouldScaleBackground = true, ...props }) => ((0, jsx_runtime_1.jsx)(vaul_1.Drawer.Root, { shouldScaleBackground: shouldScaleBackground, ...props }));
|
|
42
|
+
const Drawer = ({ shouldScaleBackground = true, repositionInputs = false, ...props }) => ((0, jsx_runtime_1.jsx)(vaul_1.Drawer.Root, { repositionInputs: repositionInputs, shouldScaleBackground: shouldScaleBackground, ...props }));
|
|
43
43
|
exports.Drawer = Drawer;
|
|
44
44
|
Drawer.displayName = "Drawer";
|
|
45
45
|
const DrawerTrigger = vaul_1.Drawer.Trigger;
|
|
@@ -81,7 +81,8 @@ exports.useCurrencyStore = (0, zustand_1.create)()((0, middleware_1.persist)((se
|
|
|
81
81
|
removeCurrency: code => {
|
|
82
82
|
set(state => {
|
|
83
83
|
// Remove the currency
|
|
84
|
-
const
|
|
84
|
+
const customCurrencies = state.customCurrencies;
|
|
85
|
+
const remaining = Object.fromEntries(Object.entries(customCurrencies).filter(([key]) => key !== code));
|
|
85
86
|
// Remove all exchange rates involving this currency
|
|
86
87
|
const filteredRates = {};
|
|
87
88
|
for (const [key, rate] of Object.entries(state.customExchangeRates)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
3
3
|
declare const Drawer: {
|
|
4
|
-
({ shouldScaleBackground, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
({ shouldScaleBackground, repositionInputs, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
7
7
|
declare const DrawerTrigger: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
5
5
|
import { cn } from "../../../../shared/utils/index.js";
|
|
6
|
-
const Drawer = ({ shouldScaleBackground = true, ...props }) => (_jsx(DrawerPrimitive.Root, { shouldScaleBackground: shouldScaleBackground, ...props }));
|
|
6
|
+
const Drawer = ({ shouldScaleBackground = true, repositionInputs = false, ...props }) => (_jsx(DrawerPrimitive.Root, { repositionInputs: repositionInputs, shouldScaleBackground: shouldScaleBackground, ...props }));
|
|
7
7
|
Drawer.displayName = "Drawer";
|
|
8
8
|
const DrawerTrigger = DrawerPrimitive.Trigger;
|
|
9
9
|
const DrawerPortal = DrawerPrimitive.Portal;
|
|
@@ -74,7 +74,8 @@ export const useCurrencyStore = create()(persist((set, get) => ({
|
|
|
74
74
|
removeCurrency: code => {
|
|
75
75
|
set(state => {
|
|
76
76
|
// Remove the currency
|
|
77
|
-
const
|
|
77
|
+
const customCurrencies = state.customCurrencies;
|
|
78
|
+
const remaining = Object.fromEntries(Object.entries(customCurrencies).filter(([key]) => key !== code));
|
|
78
79
|
// Remove all exchange rates involving this currency
|
|
79
80
|
const filteredRates = {};
|
|
80
81
|
for (const [key, rate] of Object.entries(state.customExchangeRates)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
3
3
|
declare const Drawer: {
|
|
4
|
-
({ shouldScaleBackground, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
({ shouldScaleBackground, repositionInputs, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
7
7
|
declare const DrawerTrigger: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
package/package.json
CHANGED
|
@@ -5,8 +5,12 @@ import { Drawer as DrawerPrimitive } from "vaul";
|
|
|
5
5
|
|
|
6
6
|
import { cn } from "@b3dotfun/sdk/shared/utils";
|
|
7
7
|
|
|
8
|
-
const Drawer = ({
|
|
9
|
-
|
|
8
|
+
const Drawer = ({
|
|
9
|
+
shouldScaleBackground = true,
|
|
10
|
+
repositionInputs = false,
|
|
11
|
+
...props
|
|
12
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (
|
|
13
|
+
<DrawerPrimitive.Root repositionInputs={repositionInputs} shouldScaleBackground={shouldScaleBackground} {...props} />
|
|
10
14
|
);
|
|
11
15
|
Drawer.displayName = "Drawer";
|
|
12
16
|
|
|
@@ -147,7 +147,9 @@ export const useCurrencyStore = create<CurrencyState>()(
|
|
|
147
147
|
removeCurrency: code => {
|
|
148
148
|
set(state => {
|
|
149
149
|
// Remove the currency
|
|
150
|
-
const
|
|
150
|
+
const customCurrencies = state.customCurrencies;
|
|
151
|
+
|
|
152
|
+
const remaining = Object.fromEntries(Object.entries(customCurrencies).filter(([key]) => key !== code));
|
|
151
153
|
|
|
152
154
|
// Remove all exchange rates involving this currency
|
|
153
155
|
const filteredRates: Record<string, number> = {};
|