@develemit/storefront 0.0.0-stage → 0.3.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.
Files changed (40) hide show
  1. package/README.md +265 -2
  2. package/dist/cart/cart-provider.d.ts +24 -0
  3. package/dist/cart/cart-reducer.d.ts +31 -0
  4. package/dist/cart/cart-storage.d.ts +6 -0
  5. package/dist/client/commerce-client.d.ts +13 -0
  6. package/dist/client/errors.d.ts +12 -0
  7. package/dist/client/index.d.ts +2 -0
  8. package/dist/client/index.js +64 -0
  9. package/dist/client/index.js.map +1 -0
  10. package/dist/components/add-to-cart-button/add-to-cart-button.d.ts +14 -0
  11. package/dist/components/availability-badge/availability-badge.d.ts +15 -0
  12. package/dist/components/cart-button/cart-button.d.ts +9 -0
  13. package/dist/components/cart-drawer/cart-drawer.d.ts +18 -0
  14. package/dist/components/cart-drawer/use-drawer-presence.d.ts +5 -0
  15. package/dist/components/cart-line-item/cart-line-item.d.ts +11 -0
  16. package/dist/components/cart-summary/cart-summary.d.ts +10 -0
  17. package/dist/components/category-filter/category-filter.d.ts +11 -0
  18. package/dist/components/fixtures.d.ts +2 -0
  19. package/dist/components/price-tag/price-tag.d.ts +7 -0
  20. package/dist/components/product-card/product-card.d.ts +9 -0
  21. package/dist/components/product-gallery/product-gallery.d.ts +6 -0
  22. package/dist/components/product-grid/product-grid.d.ts +10 -0
  23. package/dist/components/render-with-cart.d.ts +3 -0
  24. package/dist/format/index.d.ts +2 -0
  25. package/dist/format/index.js +1 -0
  26. package/dist/index.d.ts +22 -0
  27. package/dist/index.js +686 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/lib/format-price.d.ts +1 -0
  30. package/dist/lib/parse-duration.d.ts +1 -0
  31. package/dist/lib/provider.d.ts +28 -0
  32. package/dist/lib/theme.d.ts +15 -0
  33. package/dist/sort-for-display-Cj6GMeCY.js +15 -0
  34. package/dist/sort-for-display-Cj6GMeCY.js.map +1 -0
  35. package/dist/styles.css +476 -0
  36. package/dist/views/featured-products.d.ts +8 -0
  37. package/dist/views/product-detail-view.d.ts +13 -0
  38. package/dist/views/shop-view.d.ts +21 -0
  39. package/dist/views/sort-for-display.d.ts +2 -0
  40. package/package.json +46 -3
@@ -0,0 +1,8 @@
1
+ import { ProductCard } from '@develemit/commerce-contracts';
2
+ import { AvailabilityLabels } from '../components/availability-badge/availability-badge';
3
+ export interface FeaturedProductsProps {
4
+ products: ProductCard[];
5
+ heading?: string;
6
+ labels?: Partial<AvailabilityLabels>;
7
+ }
8
+ export declare function FeaturedProducts({ products, heading, labels, }: FeaturedProductsProps): import('react').JSX.Element | null;
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ import { Product } from '@develemit/commerce-contracts';
3
+ import { AvailabilityLabels } from '../components/availability-badge/availability-badge';
4
+ export interface ProductDetailViewSlots {
5
+ actions?: ReactNode;
6
+ afterDetails?: ReactNode;
7
+ }
8
+ export interface ProductDetailViewProps {
9
+ product: Product;
10
+ slots?: ProductDetailViewSlots;
11
+ labels?: Partial<AvailabilityLabels>;
12
+ }
13
+ export declare function ProductDetailView({ product, slots, labels, }: ProductDetailViewProps): import('react').JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { ReactNode } from 'react';
2
+ import { Category, ProductCard } from '@develemit/commerce-contracts';
3
+ import { AvailabilityLabels } from '../components/availability-badge/availability-badge';
4
+ export interface ShopViewSlots {
5
+ header?: ReactNode;
6
+ intro?: ReactNode;
7
+ emptyState?: ReactNode;
8
+ }
9
+ export interface ShopViewProps {
10
+ products: ProductCard[];
11
+ categories: Category[];
12
+ activeCategory?: string;
13
+ slots?: ShopViewSlots;
14
+ labels?: Partial<AvailabilityLabels>;
15
+ allLabel?: string;
16
+ formatCategoryLabel?: (category: Category) => string;
17
+ sortCategories?: (a: Category, b: Category) => number;
18
+ nextHref?: string;
19
+ loadMoreLabel?: string;
20
+ }
21
+ export declare function ShopView({ products, categories, activeCategory, slots, labels, allLabel, formatCategoryLabel, sortCategories, nextHref, loadMoreLabel, }: ShopViewProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ProductCard } from '@develemit/commerce-contracts';
2
+ export declare function sortForDisplay(products: ProductCard[]): ProductCard[];
package/package.json CHANGED
@@ -1,6 +1,49 @@
1
1
  {
2
2
  "name": "@develemit/storefront",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.3.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ "./package.json": "./package.json",
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "./client": {
16
+ "types": "./dist/client/index.d.ts",
17
+ "import": "./dist/client/index.js",
18
+ "default": "./dist/client/index.js"
19
+ },
20
+ "./format": {
21
+ "types": "./dist/format/index.d.ts",
22
+ "import": "./dist/format/index.js",
23
+ "default": "./dist/format/index.js"
24
+ },
25
+ "./styles.css": "./dist/styles.css"
26
+ },
27
+ "files": [
28
+ "dist",
29
+ "!**/*.tsbuildinfo"
30
+ ],
31
+ "nx": {
32
+ "name": "storefront",
33
+ "tags": [
34
+ "scope:storefront",
35
+ "type:lib"
36
+ ]
37
+ },
38
+ "peerDependencies": {
39
+ "react": "^19.0.0",
40
+ "react-dom": "^19.0.0"
41
+ },
42
+ "license": "MIT",
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "dependencies": {
47
+ "@develemit/commerce-contracts": "0.3.0"
48
+ }
6
49
  }