@akinon/pz-theme 2.0.124-beta.0 → 2.0.124

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 CHANGED
@@ -1,12 +1,12 @@
1
1
  # @akinon/pz-theme
2
2
 
3
- ## 2.0.124-beta.0
3
+ ## 2.0.124
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [cbbbfd757]
8
- - @akinon/next@2.0.124-beta.0
9
- - @akinon/theme-contract@2.0.124-beta.0
7
+ - 676b365: ZERO-5038: Wire up the Slider block's Center Mode and fix its slide-gap responsive parsing
8
+ - @akinon/next@2.0.124
9
+ - @akinon/theme-contract@2.0.124
10
10
 
11
11
  ## 2.0.123
12
12
 
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.124-beta.0",
4
+ "version": "2.0.124",
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.124-beta.0",
11
+ "@akinon/next": "2.0.124",
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.124-beta.0",
16
+ "@akinon/theme-contract": "2.0.124",
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.124-beta.0",
24
+ "@akinon/next": "2.0.124",
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
- const partialVisible = desktopPeek > 0 || mobilePeek > 0;
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
- const slideGap = parseNumber(getConfigEntry('slide-gap'), 16);
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}