@akinon/pz-theme 2.0.124-rc.0 → 2.0.125-beta.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/CHANGELOG.md +15 -35
- package/package.json +4 -4
- package/src/blocks/slider-block.tsx +19 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,40 +1,20 @@
|
|
|
1
1
|
# @akinon/pz-theme
|
|
2
2
|
|
|
3
|
-
## 2.0.
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Updated dependencies [
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
- Updated dependencies [bfafa3f49]
|
|
19
|
-
- Updated dependencies [57d7eb305]
|
|
20
|
-
- Updated dependencies [d99a6a7d5]
|
|
21
|
-
- Updated dependencies [9db81a714]
|
|
22
|
-
- Updated dependencies [591e345e1]
|
|
23
|
-
- Updated dependencies [4de5303c5]
|
|
24
|
-
- Updated dependencies [95b139dc1]
|
|
25
|
-
- Updated dependencies [1d00f2d06]
|
|
26
|
-
- Updated dependencies [4ac7b2a1e]
|
|
27
|
-
- Updated dependencies [e9598c71d]
|
|
28
|
-
- Updated dependencies [4998a9631]
|
|
29
|
-
- Updated dependencies [804d2bd6c]
|
|
30
|
-
- Updated dependencies [3909d3224]
|
|
31
|
-
- Updated dependencies [6a3d8a631]
|
|
32
|
-
- Updated dependencies [e18836b20]
|
|
33
|
-
- Updated dependencies [b1111d7b1]
|
|
34
|
-
- Updated dependencies [1595d458]
|
|
35
|
-
- Updated dependencies [dca12811]
|
|
36
|
-
- @akinon/next@2.0.124-rc.0
|
|
37
|
-
- @akinon/theme-contract@2.0.124-rc.0
|
|
3
|
+
## 2.0.125-beta.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [cbbbfd757]
|
|
8
|
+
- @akinon/next@2.0.125-beta.0
|
|
9
|
+
- @akinon/theme-contract@2.0.125-beta.0
|
|
10
|
+
|
|
11
|
+
## 2.0.124
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 676b365: ZERO-5038: Wire up the Slider block's Center Mode and fix its slide-gap responsive parsing
|
|
16
|
+
- @akinon/next@2.0.124
|
|
17
|
+
- @akinon/theme-contract@2.0.124
|
|
38
18
|
|
|
39
19
|
## 2.0.123
|
|
40
20
|
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/pz-theme",
|
|
3
3
|
"description": "Theme package for Project Zero Next — ThemePlaceholder system and theme editor infrastructure",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.125-beta.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "jest"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@akinon/next": "2.0.
|
|
11
|
+
"@akinon/next": "2.0.125-beta.0",
|
|
12
12
|
"react": "^18.0.0 || ^19.0.0",
|
|
13
13
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@akinon/theme-contract": "2.0.
|
|
16
|
+
"@akinon/theme-contract": "2.0.125-beta.0",
|
|
17
17
|
"clsx": "2.1.1",
|
|
18
18
|
"lottie-web": "^5.13.0",
|
|
19
19
|
"react-multi-carousel": "2.8.4",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"zod": "4.4.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@akinon/next": "2.0.
|
|
24
|
+
"@akinon/next": "2.0.125-beta.0",
|
|
25
25
|
"@testing-library/jest-dom": "5.16.4",
|
|
26
26
|
"@testing-library/react": "16.3.2",
|
|
27
27
|
"@testing-library/user-event": "14.1.1",
|
|
@@ -232,7 +232,15 @@ const SliderBlock: React.FC<BlockRendererProps> = ({
|
|
|
232
232
|
0
|
|
233
233
|
);
|
|
234
234
|
const mobilePeek = parseNumber(getResponsiveValue(slidePeek, 'mobile', 0), 0);
|
|
235
|
-
|
|
235
|
+
// react-multi-carousel treats `partialVisible` and `centerMode` as mutually
|
|
236
|
+
// exclusive in its own transform math (`getTransform` picks one branch or
|
|
237
|
+
// the other) — centerMode wins here so a stale slide-peek value left over
|
|
238
|
+
// from the old asymmetric setup cannot silently cancel it.
|
|
239
|
+
const centerModeConfig = getConfigEntry('center-mode');
|
|
240
|
+
const centerMode = Boolean(
|
|
241
|
+
getResponsiveValue(centerModeConfig, currentBreakpoint, false)
|
|
242
|
+
);
|
|
243
|
+
const partialVisible = !centerMode && (desktopPeek > 0 || mobilePeek > 0);
|
|
236
244
|
|
|
237
245
|
/**
|
|
238
246
|
* Where this slider's two bands meet, and why the number moved.
|
|
@@ -312,7 +320,15 @@ const SliderBlock: React.FC<BlockRendererProps> = ({
|
|
|
312
320
|
);
|
|
313
321
|
const autoPlaySpeed = parseNumber(autoPlaySpeedRaw, 3000);
|
|
314
322
|
|
|
315
|
-
|
|
323
|
+
// `getConfigEntry` hands back the raw responsive object `{desktop, mobile}`
|
|
324
|
+
// when a designer sets this per breakpoint — the ordinary, panel-driven way
|
|
325
|
+
// to set it — and `Number({...})` is `NaN`, so `parseNumber` silently fell
|
|
326
|
+
// through to the 16 default no matter what was authored. A flat number
|
|
327
|
+
// still works exactly as before.
|
|
328
|
+
const slideGap = parseNumber(
|
|
329
|
+
getResponsiveValue(getConfigEntry('slide-gap'), currentBreakpoint, 16),
|
|
330
|
+
16
|
|
331
|
+
);
|
|
316
332
|
const slidePadding = slideGap / 2;
|
|
317
333
|
|
|
318
334
|
/*
|
|
@@ -1086,6 +1102,7 @@ const SliderBlock: React.FC<BlockRendererProps> = ({
|
|
|
1086
1102
|
*/
|
|
1087
1103
|
{...carouselSsr.carouselProps}
|
|
1088
1104
|
partialVisible={partialVisible}
|
|
1105
|
+
centerMode={centerMode}
|
|
1089
1106
|
slidesToSlide={currentSlidesToSlide}
|
|
1090
1107
|
swipeable={true}
|
|
1091
1108
|
draggable={true}
|