@pradip1995/segment-primitives 0.2.0 → 0.3.2

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": "@pradip1995/segment-primitives",
3
- "version": "0.2.0",
3
+ "version": "0.3.2",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -15,7 +15,8 @@
15
15
  "./coupon-apply": "./src/coupon-apply.tsx",
16
16
  "./button": "./src/Button.tsx",
17
17
  "./card": "./src/Card.tsx",
18
- "./format-price": "./src/format-price.ts"
18
+ "./format-price": "./src/format-price.ts",
19
+ "./section-variants": "./src/section-variants.ts"
19
20
  },
20
21
  "peerDependencies": {
21
22
  "@pradip1995/commerce-core": "^4.0.0",
@@ -9,7 +9,7 @@ type Props = ComponentProps<typeof Link> & {
9
9
  countryCode?: string
10
10
  }
11
11
 
12
- const DEFAULT_REGION = process.env.NEXT_PUBLIC_DEFAULT_REGION || "in"
12
+ const DEFAULT_REGION = "in"
13
13
 
14
14
  export default function LocalizedLink({
15
15
  href,
@@ -0,0 +1,13 @@
1
+ /** Shared section layout variants — configure per segment in pages.config / segment props */
2
+
3
+ export type HeroVariant = "overlay" | "split" | "centered"
4
+ export type TrustStripVariant = "grid" | "bar" | "cards"
5
+ export type CategoryGridVariant = "staggered" | "bento" | "tiles"
6
+ export type TestimonialsVariant = "grid" | "marquee" | "featured"
7
+ export type BenefitsVariant = "grid" | "numbered" | "split"
8
+ export type ProductRailVariant = "grid" | "carousel" | "featured"
9
+ export type ShopByAgeVariant = "circles" | "cards" | "pills"
10
+
11
+ export function resolveVariant<T extends string>(value: T | undefined, fallback: T): T {
12
+ return value ?? fallback
13
+ }