@voyantjs/markets-ui 0.13.0

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/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # @voyantjs/markets-ui
2
+
3
+ Importable React UI components for Voyant markets. Bundler-consumed (Vite, Next.js, webpack, etc.).
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @voyantjs/markets-ui @voyantjs/markets-react @voyantjs/voyant-ui @tanstack/react-query react react-dom
9
+ ```
10
+
11
+ `@voyantjs/voyant-ui` provides the design-system primitives. `@voyantjs/markets-react` provides the data-layer hooks. Both are required peers.
12
+
13
+ All components accept a `className` prop and merge it with `cn()`. Wrap or compose to extend; use the registry copy-paste path (`npx shadcn add @voyant/...`) for components you want to fork outright.
@@ -0,0 +1,10 @@
1
+ import { type MarketCurrencyRecord } from "@voyantjs/markets-react";
2
+ export interface MarketCurrencyDialogProps {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ marketId: string;
6
+ currency?: MarketCurrencyRecord;
7
+ onSuccess?: (currency: MarketCurrencyRecord) => void;
8
+ }
9
+ export declare function MarketCurrencyDialog({ open, onOpenChange, marketId, currency, onSuccess, }: MarketCurrencyDialogProps): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=market-currency-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"market-currency-dialog.d.ts","sourceRoot":"","sources":["../../src/components/market-currency-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,oBAAoB,EAG1B,MAAM,yBAAyB,CAAA;AAgChC,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,oBAAoB,CAAA;IAC/B,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,IAAI,CAAA;CACrD;AAED,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,SAAS,GACV,EAAE,yBAAyB,2CAmI3B"}
@@ -0,0 +1,76 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useMarketCurrencyMutation, } from "@voyantjs/markets-react";
4
+ import { Button, Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle, Input, Label, Switch, } from "@voyantjs/voyant-ui/components";
5
+ import { CurrencyCombobox } from "@voyantjs/voyant-ui/components/currency-combobox";
6
+ import { zodResolver } from "@voyantjs/voyant-ui/lib/zod-resolver";
7
+ import { Loader2 } from "lucide-react";
8
+ import { useEffect } from "react";
9
+ import { useForm } from "react-hook-form";
10
+ import { z } from "zod/v4";
11
+ const formSchema = z.object({
12
+ currencyCode: z.string().length(3, "Currency must be 3 chars"),
13
+ isDefault: z.boolean(),
14
+ isSettlement: z.boolean(),
15
+ isReporting: z.boolean(),
16
+ sortOrder: z.coerce.number().int().min(0),
17
+ active: z.boolean(),
18
+ });
19
+ export function MarketCurrencyDialog({ open, onOpenChange, marketId, currency, onSuccess, }) {
20
+ const isEditing = Boolean(currency);
21
+ const { create, update } = useMarketCurrencyMutation();
22
+ const form = useForm({
23
+ resolver: zodResolver(formSchema),
24
+ defaultValues: {
25
+ currencyCode: "EUR",
26
+ isDefault: false,
27
+ isSettlement: false,
28
+ isReporting: false,
29
+ sortOrder: 0,
30
+ active: true,
31
+ },
32
+ });
33
+ useEffect(() => {
34
+ if (open && currency) {
35
+ form.reset({
36
+ currencyCode: currency.currencyCode,
37
+ isDefault: currency.isDefault,
38
+ isSettlement: currency.isSettlement,
39
+ isReporting: currency.isReporting,
40
+ sortOrder: currency.sortOrder,
41
+ active: currency.active,
42
+ });
43
+ return;
44
+ }
45
+ if (open) {
46
+ form.reset({
47
+ currencyCode: "EUR",
48
+ isDefault: false,
49
+ isSettlement: false,
50
+ isReporting: false,
51
+ sortOrder: 0,
52
+ active: true,
53
+ });
54
+ }
55
+ }, [currency, form, open]);
56
+ const onSubmit = async (values) => {
57
+ const payload = {
58
+ currencyCode: values.currencyCode.toUpperCase(),
59
+ isDefault: values.isDefault,
60
+ isSettlement: values.isSettlement,
61
+ isReporting: values.isReporting,
62
+ sortOrder: values.sortOrder,
63
+ active: values.active,
64
+ };
65
+ const saved = isEditing
66
+ ? await update.mutateAsync({ id: currency.id, input: payload })
67
+ : await create.mutateAsync({ marketId, input: payload });
68
+ onOpenChange(false);
69
+ onSuccess?.(saved);
70
+ };
71
+ const isSubmitting = form.formState.isSubmitting || create.isPending || update.isPending;
72
+ return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: isEditing ? "Edit Currency" : "Add Currency" }) }), _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), children: [_jsxs(DialogBody, { className: "grid gap-4", children: [_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Currency code" }), _jsx(CurrencyCombobox, { value: form.watch("currencyCode") || null, onChange: (next) => form.setValue("currencyCode", next ?? "EUR", {
73
+ shouldValidate: true,
74
+ shouldDirty: true,
75
+ }) })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Sort order" }), _jsx(Input, { ...form.register("sortOrder"), type: "number", min: "0" })] })] }), _jsxs("div", { className: "flex flex-wrap gap-6", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Switch, { checked: form.watch("isDefault"), onCheckedChange: (value) => form.setValue("isDefault", value) }), _jsx(Label, { children: "Default" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Switch, { checked: form.watch("isSettlement"), onCheckedChange: (value) => form.setValue("isSettlement", value) }), _jsx(Label, { children: "Settlement" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Switch, { checked: form.watch("isReporting"), onCheckedChange: (value) => form.setValue("isReporting", value) }), _jsx(Label, { children: "Reporting" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Switch, { checked: form.watch("active"), onCheckedChange: (value) => form.setValue("active", value) }), _jsx(Label, { children: "Active" })] })] })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { type: "button", variant: "ghost", onClick: () => onOpenChange(false), children: "Cancel" }), _jsxs(Button, { type: "submit", disabled: isSubmitting, children: [isSubmitting && _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), isEditing ? "Save Changes" : "Add Currency"] })] })] })] }) }));
76
+ }
@@ -0,0 +1,9 @@
1
+ import { type MarketRecord } from "@voyantjs/markets-react";
2
+ export interface MarketDialogProps {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ market?: MarketRecord;
6
+ onSuccess?: (market: MarketRecord) => void;
7
+ }
8
+ export declare function MarketDialog({ open, onOpenChange, market, onSuccess }: MarketDialogProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=market-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"market-dialog.d.ts","sourceRoot":"","sources":["../../src/components/market-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,YAAY,EAGlB,MAAM,yBAAyB,CAAA;AA4ChC,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAA;CAC3C;AAED,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,iBAAiB,2CAqKxF"}
@@ -0,0 +1,93 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useMarketMutation, } from "@voyantjs/markets-react";
4
+ import { Button, Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@voyantjs/voyant-ui/components";
5
+ import { CountryCombobox } from "@voyantjs/voyant-ui/components/country-combobox";
6
+ import { CurrencyCombobox } from "@voyantjs/voyant-ui/components/currency-combobox";
7
+ import { zodResolver } from "@voyantjs/voyant-ui/lib/zod-resolver";
8
+ import { Loader2 } from "lucide-react";
9
+ import { useEffect } from "react";
10
+ import { useForm } from "react-hook-form";
11
+ import { z } from "zod/v4";
12
+ const MARKET_STATUSES = ["active", "inactive", "archived"];
13
+ const formSchema = z.object({
14
+ code: z.string().min(1, "Code is required").max(50),
15
+ name: z.string().min(1, "Name is required").max(255),
16
+ status: z.enum(MARKET_STATUSES),
17
+ regionCode: z.string().optional().nullable(),
18
+ countryCode: z.string().optional().nullable(),
19
+ defaultLanguageTag: z.string().min(2).max(35),
20
+ defaultCurrency: z.string().length(3, "Currency must be 3 chars"),
21
+ timezone: z.string().optional().nullable(),
22
+ taxContext: z.string().optional().nullable(),
23
+ });
24
+ export function MarketDialog({ open, onOpenChange, market, onSuccess }) {
25
+ const isEditing = Boolean(market);
26
+ const { create, update } = useMarketMutation();
27
+ const form = useForm({
28
+ resolver: zodResolver(formSchema),
29
+ defaultValues: {
30
+ code: "",
31
+ name: "",
32
+ status: "active",
33
+ regionCode: "",
34
+ countryCode: "",
35
+ defaultLanguageTag: "en",
36
+ defaultCurrency: "EUR",
37
+ timezone: "",
38
+ taxContext: "",
39
+ },
40
+ });
41
+ useEffect(() => {
42
+ if (open && market) {
43
+ form.reset({
44
+ code: market.code,
45
+ name: market.name,
46
+ status: market.status,
47
+ regionCode: market.regionCode ?? "",
48
+ countryCode: market.countryCode ?? "",
49
+ defaultLanguageTag: market.defaultLanguageTag,
50
+ defaultCurrency: market.defaultCurrency,
51
+ timezone: market.timezone ?? "",
52
+ taxContext: market.taxContext ?? "",
53
+ });
54
+ return;
55
+ }
56
+ if (open) {
57
+ form.reset({
58
+ code: "",
59
+ name: "",
60
+ status: "active",
61
+ regionCode: "",
62
+ countryCode: "",
63
+ defaultLanguageTag: "en",
64
+ defaultCurrency: "EUR",
65
+ timezone: "",
66
+ taxContext: "",
67
+ });
68
+ }
69
+ }, [form, market, open]);
70
+ const onSubmit = async (values) => {
71
+ const payload = {
72
+ code: values.code,
73
+ name: values.name,
74
+ status: values.status,
75
+ regionCode: values.regionCode || null,
76
+ countryCode: values.countryCode ? values.countryCode.toUpperCase() : null,
77
+ defaultLanguageTag: values.defaultLanguageTag,
78
+ defaultCurrency: values.defaultCurrency.toUpperCase(),
79
+ timezone: values.timezone || null,
80
+ taxContext: values.taxContext || null,
81
+ };
82
+ const saved = isEditing
83
+ ? await update.mutateAsync({ id: market.id, input: payload })
84
+ : await create.mutateAsync(payload);
85
+ onOpenChange(false);
86
+ onSuccess?.(saved);
87
+ };
88
+ const isSubmitting = form.formState.isSubmitting || create.isPending || update.isPending;
89
+ return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { size: "lg", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: isEditing ? "Edit Market" : "Add Market" }) }), _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), children: [_jsxs(DialogBody, { className: "grid gap-4", children: [_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Code" }), _jsx(Input, { ...form.register("code"), placeholder: "EU-DE" })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Name" }), _jsx(Input, { ...form.register("name"), placeholder: "Germany" })] })] }), _jsxs("div", { className: "grid grid-cols-3 gap-3", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Status" }), _jsxs(Select, { items: MARKET_STATUSES.map((x) => ({ label: x.replace(/_/g, " "), value: x })), value: form.watch("status"), onValueChange: (value) => form.setValue("status", value), children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: MARKET_STATUSES.map((status) => (_jsx(SelectItem, { value: status, className: "capitalize", children: status }, status))) })] })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Region code" }), _jsx(Input, { ...form.register("regionCode"), placeholder: "EU, APAC..." })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Country" }), _jsx(CountryCombobox, { value: form.watch("countryCode") ?? null, onChange: (code) => form.setValue("countryCode", code) })] })] }), _jsxs("div", { className: "grid grid-cols-3 gap-3", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Language tag" }), _jsx(Input, { ...form.register("defaultLanguageTag"), placeholder: "en, de-DE..." })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Default currency" }), _jsx(CurrencyCombobox, { value: form.watch("defaultCurrency") || null, onChange: (next) => form.setValue("defaultCurrency", next ?? "EUR", {
90
+ shouldValidate: true,
91
+ shouldDirty: true,
92
+ }) })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Timezone" }), _jsx(Input, { ...form.register("timezone"), placeholder: "Europe/Berlin" })] })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Tax context" }), _jsx(Input, { ...form.register("taxContext"), placeholder: "EU-VAT, US-Sales-Tax..." })] })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { type: "button", variant: "ghost", onClick: () => onOpenChange(false), children: "Cancel" }), _jsxs(Button, { type: "submit", disabled: isSubmitting, children: [isSubmitting && _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), isEditing ? "Save Changes" : "Add Market"] })] })] })] }) }));
93
+ }
@@ -0,0 +1,10 @@
1
+ import { type MarketLocaleRecord } from "@voyantjs/markets-react";
2
+ export interface MarketLocaleDialogProps {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ marketId: string;
6
+ locale?: MarketLocaleRecord;
7
+ onSuccess?: (locale: MarketLocaleRecord) => void;
8
+ }
9
+ export declare function MarketLocaleDialog({ open, onOpenChange, marketId, locale, onSuccess, }: MarketLocaleDialogProps): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=market-locale-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"market-locale-dialog.d.ts","sourceRoot":"","sources":["../../src/components/market-locale-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,kBAAkB,EAGxB,MAAM,yBAAyB,CAAA;AA6BhC,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;CACjD;AAED,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,SAAS,GACV,EAAE,uBAAuB,2CAqGzB"}
@@ -0,0 +1,62 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useMarketLocaleMutation, } from "@voyantjs/markets-react";
4
+ import { Button, Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle, Input, Label, Switch, } from "@voyantjs/voyant-ui/components";
5
+ import { zodResolver } from "@voyantjs/voyant-ui/lib/zod-resolver";
6
+ import { Loader2 } from "lucide-react";
7
+ import { useEffect } from "react";
8
+ import { useForm } from "react-hook-form";
9
+ import { z } from "zod/v4";
10
+ const formSchema = z.object({
11
+ languageTag: z.string().min(2, "Language tag is required").max(35),
12
+ isDefault: z.boolean(),
13
+ sortOrder: z.coerce.number().int().min(0),
14
+ active: z.boolean(),
15
+ });
16
+ export function MarketLocaleDialog({ open, onOpenChange, marketId, locale, onSuccess, }) {
17
+ const isEditing = Boolean(locale);
18
+ const { create, update } = useMarketLocaleMutation();
19
+ const form = useForm({
20
+ resolver: zodResolver(formSchema),
21
+ defaultValues: {
22
+ languageTag: "en",
23
+ isDefault: false,
24
+ sortOrder: 0,
25
+ active: true,
26
+ },
27
+ });
28
+ useEffect(() => {
29
+ if (open && locale) {
30
+ form.reset({
31
+ languageTag: locale.languageTag,
32
+ isDefault: locale.isDefault,
33
+ sortOrder: locale.sortOrder,
34
+ active: locale.active,
35
+ });
36
+ return;
37
+ }
38
+ if (open) {
39
+ form.reset({
40
+ languageTag: "en",
41
+ isDefault: false,
42
+ sortOrder: 0,
43
+ active: true,
44
+ });
45
+ }
46
+ }, [form, locale, open]);
47
+ const onSubmit = async (values) => {
48
+ const payload = {
49
+ languageTag: values.languageTag,
50
+ isDefault: values.isDefault,
51
+ sortOrder: values.sortOrder,
52
+ active: values.active,
53
+ };
54
+ const saved = isEditing
55
+ ? await update.mutateAsync({ id: locale.id, input: payload })
56
+ : await create.mutateAsync({ marketId, input: payload });
57
+ onOpenChange(false);
58
+ onSuccess?.(saved);
59
+ };
60
+ const isSubmitting = form.formState.isSubmitting || create.isPending || update.isPending;
61
+ return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: isEditing ? "Edit Locale" : "Add Locale" }) }), _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), children: [_jsxs(DialogBody, { className: "grid gap-4", children: [_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Language tag" }), _jsx(Input, { ...form.register("languageTag"), placeholder: "en-GB, de-DE..." })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: "Sort order" }), _jsx(Input, { ...form.register("sortOrder"), type: "number", min: "0" })] })] }), _jsxs("div", { className: "flex gap-6", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Switch, { checked: form.watch("isDefault"), onCheckedChange: (value) => form.setValue("isDefault", value) }), _jsx(Label, { children: "Default" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Switch, { checked: form.watch("active"), onCheckedChange: (value) => form.setValue("active", value) }), _jsx(Label, { children: "Active" })] })] })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { type: "button", variant: "ghost", onClick: () => onOpenChange(false), children: "Cancel" }), _jsxs(Button, { type: "submit", disabled: isSubmitting, children: [isSubmitting && _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), isEditing ? "Save Changes" : "Add Locale"] })] })] })] }) }));
62
+ }
@@ -0,0 +1,4 @@
1
+ export { MarketCurrencyDialog, type MarketCurrencyDialogProps, } from "./components/market-currency-dialog";
2
+ export { MarketDialog, type MarketDialogProps } from "./components/market-dialog";
3
+ export { MarketLocaleDialog, type MarketLocaleDialogProps } from "./components/market-locale-dialog";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,GAC/B,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACjF,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,mCAAmC,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { MarketCurrencyDialog, } from "./components/market-currency-dialog";
2
+ export { MarketDialog } from "./components/market-dialog";
3
+ export { MarketLocaleDialog } from "./components/market-locale-dialog";
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@voyantjs/markets-ui",
3
+ "version": "0.13.0",
4
+ "license": "FSL-1.1-Apache-2.0",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/voyantjs/voyant.git",
8
+ "directory": "packages/markets-ui"
9
+ },
10
+ "type": "module",
11
+ "sideEffects": false,
12
+ "exports": {
13
+ ".": "./src/index.ts",
14
+ "./components/*": "./src/components/*.tsx"
15
+ },
16
+ "scripts": {
17
+ "build": "tsc -p tsconfig.build.json",
18
+ "clean": "rm -rf dist",
19
+ "prepack": "pnpm run build",
20
+ "typecheck": "tsc --noEmit",
21
+ "lint": "biome check src/",
22
+ "test": "vitest run --passWithNoTests"
23
+ },
24
+ "peerDependencies": {
25
+ "@tanstack/react-query": "^5.0.0",
26
+ "@tanstack/react-table": "^8.0.0",
27
+ "@voyantjs/markets-react": "workspace:*",
28
+ "@voyantjs/voyant-ui": "workspace:*",
29
+ "react": "^19.0.0",
30
+ "react-dom": "^19.0.0",
31
+ "react-hook-form": "^7.60.0",
32
+ "zod": "^3.25.76"
33
+ },
34
+ "devDependencies": {
35
+ "@tanstack/react-query": "^5.96.2",
36
+ "@tanstack/react-table": "^8.21.3",
37
+ "@types/react": "^19.2.14",
38
+ "@types/react-dom": "^19.2.3",
39
+ "@voyantjs/markets-react": "workspace:*",
40
+ "@voyantjs/voyant-typescript-config": "workspace:*",
41
+ "@voyantjs/voyant-ui": "workspace:*",
42
+ "lucide-react": "^0.475.0",
43
+ "react": "^19.2.4",
44
+ "react-dom": "^19.2.4",
45
+ "react-hook-form": "^7.60.0",
46
+ "typescript": "^6.0.2",
47
+ "vitest": "^4.1.2",
48
+ "zod": "^3.25.76"
49
+ },
50
+ "files": [
51
+ "dist"
52
+ ],
53
+ "publishConfig": {
54
+ "access": "public",
55
+ "exports": {
56
+ ".": {
57
+ "types": "./dist/index.d.ts",
58
+ "import": "./dist/index.js"
59
+ },
60
+ "./components/*": {
61
+ "types": "./dist/components/*.d.ts",
62
+ "import": "./dist/components/*.js"
63
+ }
64
+ },
65
+ "main": "./dist/index.js",
66
+ "types": "./dist/index.d.ts"
67
+ }
68
+ }