medusa-ui-common 2.0.0 → 2.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "medusa-ui-common",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Shared storefront UI primitives.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -47,6 +47,21 @@
47
47
  "import": "./src/common/*",
48
48
  "default": "./src/common/*"
49
49
  },
50
+ "./providers": {
51
+ "types": "./src/storefront-providers.tsx",
52
+ "import": "./src/storefront-providers.tsx",
53
+ "default": "./src/storefront-providers.tsx"
54
+ },
55
+ "./context/wishlist-context": {
56
+ "types": "./src/context/wishlist-context.tsx",
57
+ "import": "./src/context/wishlist-context.tsx",
58
+ "default": "./src/context/wishlist-context.tsx"
59
+ },
60
+ "./context/modal-context": {
61
+ "types": "./src/context/modal-context.tsx",
62
+ "import": "./src/context/modal-context.tsx",
63
+ "default": "./src/context/modal-context.tsx"
64
+ },
50
65
  "./context/*": {
51
66
  "types": "./src/context/*",
52
67
  "import": "./src/context/*",
@@ -0,0 +1,11 @@
1
+ "use client";
2
+
3
+ import type { ReactNode } from "react";
4
+ import { WishlistProvider } from "./context/wishlist-context";
5
+
6
+ export { WishlistProvider, useWishlist } from "./context/wishlist-context";
7
+
8
+ /** Wrap the storefront app so product cards and nav can use `useWishlist`. */
9
+ export function StorefrontUiProviders({ children }: { children: ReactNode }) {
10
+ return <WishlistProvider>{children}</WishlistProvider>;
11
+ }