@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.
- package/README.md +265 -2
- package/dist/cart/cart-provider.d.ts +24 -0
- package/dist/cart/cart-reducer.d.ts +31 -0
- package/dist/cart/cart-storage.d.ts +6 -0
- package/dist/client/commerce-client.d.ts +13 -0
- package/dist/client/errors.d.ts +12 -0
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.js +64 -0
- package/dist/client/index.js.map +1 -0
- package/dist/components/add-to-cart-button/add-to-cart-button.d.ts +14 -0
- package/dist/components/availability-badge/availability-badge.d.ts +15 -0
- package/dist/components/cart-button/cart-button.d.ts +9 -0
- package/dist/components/cart-drawer/cart-drawer.d.ts +18 -0
- package/dist/components/cart-drawer/use-drawer-presence.d.ts +5 -0
- package/dist/components/cart-line-item/cart-line-item.d.ts +11 -0
- package/dist/components/cart-summary/cart-summary.d.ts +10 -0
- package/dist/components/category-filter/category-filter.d.ts +11 -0
- package/dist/components/fixtures.d.ts +2 -0
- package/dist/components/price-tag/price-tag.d.ts +7 -0
- package/dist/components/product-card/product-card.d.ts +9 -0
- package/dist/components/product-gallery/product-gallery.d.ts +6 -0
- package/dist/components/product-grid/product-grid.d.ts +10 -0
- package/dist/components/render-with-cart.d.ts +3 -0
- package/dist/format/index.d.ts +2 -0
- package/dist/format/index.js +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +686 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/format-price.d.ts +1 -0
- package/dist/lib/parse-duration.d.ts +1 -0
- package/dist/lib/provider.d.ts +28 -0
- package/dist/lib/theme.d.ts +15 -0
- package/dist/sort-for-display-Cj6GMeCY.js +15 -0
- package/dist/sort-for-display-Cj6GMeCY.js.map +1 -0
- package/dist/styles.css +476 -0
- package/dist/views/featured-products.d.ts +8 -0
- package/dist/views/product-detail-view.d.ts +13 -0
- package/dist/views/shop-view.d.ts +21 -0
- package/dist/views/sort-for-display.d.ts +2 -0
- 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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@develemit/storefront",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
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
|
}
|