@hanzo/commerce 7.3.6 → 7.3.8

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.
@@ -11,13 +11,16 @@ import { Check } from 'lucide-react'
11
11
 
12
12
  import {
13
13
  Button,
14
- Form,
15
- FormControl,
16
- FormField,
17
- FormItem,
18
14
  Input
19
15
  } from '@hanzo/ui/primitives'
20
16
 
17
+ import {
18
+ Form,
19
+ FormControl,
20
+ FormField,
21
+ FormItem,
22
+ } from '@hanzo/ui/form'
23
+
21
24
  import { useCommerce } from '../../../service/context'
22
25
  import type { Promo } from '../../../types'
23
26
  import getPromoFromApi from '../../../util/promo-codes'
@@ -1,11 +1,12 @@
1
+ import { Input } from '@hanzo/ui/primitives'
2
+
1
3
  import {
2
4
  Form,
3
5
  FormControl,
4
6
  FormField,
5
7
  FormItem,
6
8
  FormMessage,
7
- Input
8
- } from '@hanzo/ui/primitives'
9
+ } from '@hanzo/ui/form'
9
10
 
10
11
  import type { ContactFormType } from '../../../types'
11
12
 
@@ -35,7 +35,7 @@ const PaymentStepForm: React.FC<CheckoutStepComponentProps> = observer(({
35
35
  }
36
36
 
37
37
  const contactForm = useForm<z.infer<typeof contactFormSchema>>({
38
- resolver: zodResolver(contactFormSchema),
38
+ resolver: zodResolver(contactFormSchema),
39
39
  defaultValues: {
40
40
  name: auth?.user?.displayName ?? '',
41
41
  email: auth?.user?.email ?? '',
@@ -70,7 +70,7 @@ const PayWithCard: React.FC<PaymentMethodComponentProps> = observer(({
70
70
  })()
71
71
  }
72
72
 
73
- const createVerificationDetails = () => {
73
+ const createVerificationDetails = (): { amount: string; billingContact: { givenName: string; email: string }; currencyCode: string; intent: 'CHARGE' | 'CHARGE_AND_STORE' } => {
74
74
  const {name, email} = contactForm.getValues()
75
75
  return {
76
76
  amount: cmmc.promoAppliedCartTotal.toFixed(2),
@@ -79,7 +79,7 @@ const PayWithCard: React.FC<PaymentMethodComponentProps> = observer(({
79
79
  email,
80
80
  },
81
81
  currencyCode: 'USD',
82
- intent: 'CHARGE',
82
+ intent: 'CHARGE' as 'CHARGE',
83
83
  }
84
84
  }
85
85
 
@@ -4,20 +4,23 @@ import * as z from 'zod'
4
4
  import { useForm } from 'react-hook-form'
5
5
  import { zodResolver } from '@hookform/resolvers/zod'
6
6
 
7
- import {
8
- Input,
9
- Button,
7
+ import {
8
+ Input,
9
+ Button,
10
+ Select,
11
+ SelectContent,
12
+ SelectItem,
13
+ SelectTrigger,
14
+ SelectValue
15
+ } from '@hanzo/ui/primitives'
16
+
17
+ import {
10
18
  Form,
11
19
  FormControl,
12
20
  FormField,
13
21
  FormItem,
14
22
  FormMessage,
15
- Select,
16
- SelectContent,
17
- SelectItem,
18
- SelectTrigger,
19
- SelectValue
20
- } from '@hanzo/ui/primitives'
23
+ } from '@hanzo/ui/form'
21
24
 
22
25
  import { useCommerce } from '../../service/context'
23
26
 
package/hanzo-ui.d.ts ADDED
@@ -0,0 +1,108 @@
1
+ // Temporary type declarations for @hanzo/ui imports
2
+ // Until proper .d.ts files are generated
3
+
4
+ declare module '@hanzo/ui/types' {
5
+ export type Dimensions = any
6
+ export type MediaStackDef = any
7
+ export type ImageDef = any
8
+ export type VideoDef = any
9
+ export type AnimationDef = any
10
+ export type MediaTransform = any
11
+ export type LinkDef = any
12
+ }
13
+
14
+ declare module '@hanzo/ui/primitives' {
15
+ export type CarouselApi = any
16
+ export type CarouselOptions = any
17
+ export const Carousel: any
18
+ export const CarouselContent: any
19
+ export const CarouselItem: any
20
+ export const CarouselNext: any
21
+ export const CarouselPrevious: any
22
+ export const Button: any
23
+ export const buttonVariants: any
24
+ export const Input: any
25
+ export const Label: any
26
+ export const Separator: any
27
+ export const toast: any
28
+ export const Toaster: any
29
+ export const Image: any
30
+ export const Select: any
31
+ export const SelectContent: any
32
+ export const SelectGroup: any
33
+ export const SelectItem: any
34
+ export const SelectTrigger: any
35
+ export const SelectValue: any
36
+ export const RadioGroup: any
37
+ export const ScrollArea: any
38
+ export const ApplyTypography: any
39
+ export const MediaStack: any
40
+ export const Slider: any
41
+ export const Skeleton: any
42
+ export const Card: any
43
+ export const CardContent: any
44
+ export const CardFooter: any
45
+ export const CardHeader: any
46
+ export const CardTitle: any
47
+ export const ToggleGroup: any
48
+ export const ToggleGroupItem: any
49
+ export const Tabs: any
50
+ export const TabsContent: any
51
+ export const TabsList: any
52
+ export const TabsTrigger: any
53
+ }
54
+
55
+ declare module '@hanzo/ui/form' {
56
+ export const Form: any
57
+ export const FormControl: any
58
+ export const FormField: any
59
+ export const FormItem: any
60
+ export const FormLabel: any
61
+ export const FormMessage: any
62
+ export const FormDescription: any
63
+ export const useFormField: any
64
+ }
65
+
66
+ declare module '@hanzo/ui/util' {
67
+ export function cn(...inputs: any[]): string
68
+ export type VariantProps<T> = any
69
+ }
70
+
71
+ // Workaround for lucide-react with React 19 type mismatches
72
+ declare module 'lucide-react' {
73
+ import type { SVGProps } from 'react'
74
+ export type LucideProps = SVGProps<SVGSVGElement>
75
+ export const ChevronLeft: any
76
+ export const ChevronRight: any
77
+ export const Minus: any
78
+ export const Plus: any
79
+ export const X: any
80
+ export const Check: any
81
+ export const CreditCard: any
82
+ export const ShoppingCart: any
83
+ export const Menu: any
84
+ export const Loader2: any
85
+ export const ChevronDown: any
86
+ export const ChevronsLeft: any
87
+ export const ChevronsRight: any
88
+ export const Image: any
89
+ export const Trash2: any
90
+ export const Search: any
91
+ export const Barcode: any
92
+ export const LockKeyhole: any
93
+ export const Copy: any
94
+ }
95
+
96
+ // Workaround for react-square-web-payments-sdk with React 19
97
+ declare module 'react-square-web-payments-sdk' {
98
+ export const ApplePay: any
99
+ export const GooglePay: any
100
+ export const CreditCard: any
101
+ export const PaymentForm: any
102
+ }
103
+
104
+ // Workaround for next/image with React 19
105
+ declare module 'next/image' {
106
+ const Image: any
107
+ export default Image
108
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/commerce",
3
- "version": "7.3.6",
3
+ "version": "7.3.8",
4
4
  "description": "e-commerce framework.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -22,7 +22,8 @@
22
22
  "scripts": {
23
23
  "lat": "npm show @hanzo/commerce version",
24
24
  "pub": "npm publish",
25
- "tc": "tsc"
25
+ "tc": "tsc",
26
+ "build": "tsc --outDir dist --declaration --emitDeclarationOnly false --module ESNext --esModuleInterop true --skipLibCheck true --sourceMap true"
26
27
  },
27
28
  "exports": {
28
29
  ".": "./index.ts",
@@ -36,25 +37,25 @@
36
37
  "square": "^35.1.0"
37
38
  },
38
39
  "peerDependencies": {
39
- "@hanzo/auth": "catalog:",
40
- "@hanzo/ui": "catalog:",
40
+ "@hanzo/auth": "2.5.4",
41
+ "@hanzo/ui": "workspace:*",
41
42
  "@hookform/resolvers": "^3.3.4",
42
43
  "@radix-ui/react-radio-group": "^1.1.3",
43
44
  "firebase": "^10.8.0",
44
- "lucide-react": "catalog:",
45
+ "lucide-react": "0.456.0",
45
46
  "mobx": "^6.12.3",
46
47
  "mobx-react-lite": "^4.0.7",
47
48
  "mobx-utils": "^6.0.8",
48
- "next": "catalog:",
49
- "react": "catalog:",
50
- "react-dom": "catalog:",
51
- "react-hook-form": "catalog:",
49
+ "next": "14.2.16",
50
+ "react": "^19.0.0",
51
+ "react-dom": "18.3.1",
52
+ "react-hook-form": "7.51.4",
52
53
  "zod": "3.23.8"
53
54
  },
54
55
  "devDependencies": {
55
- "@types/react": "catalog:",
56
- "@types/react-dom": "catalog:",
56
+ "@types/react": "18.3.12",
57
+ "@types/react-dom": "18.3.1",
57
58
  "cross-fetch": "^4.0.0",
58
- "typescript": "catalog:"
59
+ "typescript": "5.6.3"
59
60
  }
60
61
  }
package/tsconfig.json CHANGED
@@ -6,5 +6,12 @@
6
6
  ],
7
7
  "exclude": [
8
8
  "node_modules",
9
- ]
9
+ "dist"
10
+ ],
11
+ "compilerOptions": {
12
+ "noEmit": false,
13
+ "declaration": true,
14
+ "skipLibCheck": true,
15
+ "strict": false
16
+ }
10
17
  }