fragment-headless-sdk 2.4.0 → 2.4.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/dist/types/announcement.d.ts +1 -0
- package/dist/types/hero.d.ts +1 -0
- package/dist/utils/styling.js +9 -1
- package/docs/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/readme.md +1 -1
|
@@ -22,6 +22,7 @@ export interface IAnnouncement {
|
|
|
22
22
|
name: string;
|
|
23
23
|
status: AnnouncementStatus;
|
|
24
24
|
content: IAnnouncementContent | null;
|
|
25
|
+
page_order: number | null;
|
|
25
26
|
active_duration_seconds: number | null;
|
|
26
27
|
active_start_date: string | null;
|
|
27
28
|
active_end_date: string | null;
|
package/dist/types/hero.d.ts
CHANGED
package/dist/utils/styling.js
CHANGED
|
@@ -18,6 +18,10 @@ const KNOWN_ANNOUNCEMENT_SLOTS = [
|
|
|
18
18
|
"countdownItem",
|
|
19
19
|
"countdownLabel",
|
|
20
20
|
"countdownValue",
|
|
21
|
+
"countdownContainer",
|
|
22
|
+
"countdownBlock",
|
|
23
|
+
"countdownDigit",
|
|
24
|
+
"countdownSeparator",
|
|
21
25
|
];
|
|
22
26
|
const KNOWN_HERO_SLOTS = [
|
|
23
27
|
"root",
|
|
@@ -43,7 +47,11 @@ const KNOWN_HERO_SLOTS = [
|
|
|
43
47
|
"mobileDescription",
|
|
44
48
|
"button",
|
|
45
49
|
"desktopButton",
|
|
46
|
-
"mobileButton",
|
|
50
|
+
"mobileButton", "countdownContainer",
|
|
51
|
+
"countdownBlock",
|
|
52
|
+
"countdownDigit",
|
|
53
|
+
"countdownLabel",
|
|
54
|
+
"countdownSeparator",
|
|
47
55
|
];
|
|
48
56
|
const ALL_KNOWN_SLOTS = [...KNOWN_ANNOUNCEMENT_SLOTS, ...KNOWN_HERO_SLOTS];
|
|
49
57
|
function getCacheKey(base, slots, extra) {
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -7,12 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
### [Unreleased]
|
|
9
9
|
|
|
10
|
+
### [2.4.1] - 2026-04-10
|
|
11
|
+
|
|
12
|
+
#### Added
|
|
13
|
+
|
|
14
|
+
- **`IHero.page_order`** – New `page_order: number | null` field on `IHero`. Consumers can use this to sort hero banners by their merchant-defined display order.
|
|
15
|
+
|
|
10
16
|
### [2.4.0] - 2026-03-08
|
|
11
17
|
|
|
12
18
|
#### Added
|
|
13
19
|
|
|
14
20
|
- **Hero countdown option** – Hero content supports optional countdown via `content.showCountdown` and `content.counterEndDate`. New `HeroCountdownTimer` component is used by Desktop/Mobile Hero when countdown is enabled.
|
|
15
21
|
- **Button spacing** – Hero resolvers support `buttonSpacing` for configurable CTA spacing (`hero.ts`, `hero-resolvers.ts`).
|
|
22
|
+
- **Content spacing** – Hero resolvers support `contentSpacing` for configurable gap between title, description, countdown, and button (`hero-resolvers.ts`); UI options in the app mirror this.
|
|
23
|
+
- **Countdown color tokens** – Hero countdown supports `counterDigitColor`, `counterDigitBackgroundColor`, and `counterTextColor` via `content.styling.tokens.colors`; resolved by `resolveHeroCountdownColors()` in `hero-resolvers.ts`.
|
|
16
24
|
|
|
17
25
|
#### Changed
|
|
18
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fragment-headless-sdk",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "Official SDK for Fragment-Shopify CMS: React components, TypeScript types, and utilities for headless Shopify storefronts.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
package/readme.md
CHANGED
|
@@ -4,7 +4,7 @@ The official SDK for integrating with Fragment-Shopify CMS. Provides React compo
|
|
|
4
4
|
|
|
5
5
|
## ✨ What's New
|
|
6
6
|
|
|
7
|
-
**v2.
|
|
7
|
+
**v2.4.1** – `IHero` now includes a `page_order: number | null` field. Use this to sort hero banners by their merchant-defined display order; when all values are `null` the recommended behaviour is to randomize.
|
|
8
8
|
|
|
9
9
|
> See [CHANGELOG.md](./docs/CHANGELOG.md) for full release history
|
|
10
10
|
|