@bsuite/page-builder 2.3.1 → 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.
@@ -1 +1 @@
1
- {"version":3,"file":"PageGridLayout.d.ts","sourceRoot":"","sources":["../src/PageGridLayout.tsx"],"names":[],"mappings":"AACA,OAAO,KAQN,MAAM,OAAO,CAAC;AAGf,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AAMxC,OAAO,KAAK,EAAe,mBAAmB,EAA4B,MAAM,YAAY,CAAC;AAyd7F,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,OAAO,EACP,UAAU,EACV,SAAS,EAMT,WAAkB,EAClB,aAAsC,EACtC,QAAQ,EACR,iBAAiB,EAKjB,UAAkB,EAClB,yBAAiE,EACjE,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,+BAA6E,EAC7E,wBAAwB,EACxB,4BAA4B,EAC5B,4BAA4B,GAC7B,EAAE,mBAAmB,qBAyzBrB"}
1
+ {"version":3,"file":"PageGridLayout.d.ts","sourceRoot":"","sources":["../src/PageGridLayout.tsx"],"names":[],"mappings":"AACA,OAAO,KAQN,MAAM,OAAO,CAAC;AAGf,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AAMxC,OAAO,KAAK,EAAe,mBAAmB,EAA4B,MAAM,YAAY,CAAC;AAghB7F,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,OAAO,EACP,UAAU,EACV,SAAS,EAMT,WAAkB,EAClB,aAAsC,EACtC,QAAQ,EACR,iBAAiB,EAKjB,UAAkB,EAClB,yBAAiE,EACjE,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,+BAA6E,EAC7E,wBAAwB,EACxB,4BAA4B,EAC5B,4BAA4B,GAC7B,EAAE,mBAAmB,qBAyzBrB"}
@@ -280,9 +280,32 @@ const GridItem = React.memo(React.forwardRef(function GridItem({ id, content, is
280
280
  // `--radius-card` defaults to today's value (1.5rem =
281
281
  // rounded-3xl), so this is byte-identical until a tenant sets
282
282
  // one.
283
- 'h-full w-full rounded-[var(--radius-card,1.5rem)] transition-all flex flex-col bg-card border border-border shadow-sm dark:shadow-[var(--glow-card,none)]'
283
+ cn('w-full rounded-[var(--radius-card,1.5rem)] transition-all flex flex-col bg-card border border-border shadow-sm dark:shadow-[var(--glow-card,none)]',
284
+ // THE DOUBLED BOTTOM BORDER, AND WHY THE ARITHMETIC COULD NEVER FIX IT.
285
+ //
286
+ // computeAutoHeightRows uses Math.ceil to round content height up to
287
+ // whole rows, because react-grid-layout only accepts integer row units.
288
+ // So an autoHeight slot is up to (rowHeight + marginY - 1)px TALLER than
289
+ // its content — measured on /placements: 6.6px at 1440 and 768, 28.6px
290
+ // at 1024. That remainder is unavoidable; it is what "whole rows" means.
291
+ //
292
+ // With `h-full` the painted surface FILLS the remainder, so its bottom
293
+ // border is drawn below the content's own bottom edge. When the content
294
+ // also paints a Card — which ~90% of slots do — the user sees TWO
295
+ // bottom borders with a few px of card background between them.
296
+ //
297
+ // Raised as D-46, D-98 and D-136 ("Bottom border still double for cards
298
+ // which we have raised 100s of times now"), and 2.3.1 did not fix it
299
+ // because 2.3.1 changed the row ARITHMETIC. No arithmetic removes a ceil
300
+ // remainder. The fix has to be in the PAINT.
301
+ //
302
+ // So for autoHeight the surface HUGS its content and the remainder
303
+ // becomes transparent space below the card, which nobody can see. For a
304
+ // manually-resized slot h-full is still right: the user chose that
305
+ // height and the chrome should fill it.
306
+ autoHeight ? 'h-fit' : 'h-full')
284
307
  : // Chrome OFF: layout only. Identical box, no paint.
285
- 'h-full w-full transition-all flex flex-col', style: { contain: 'layout style' }, children: _jsx("div", { className: cn('flex-1 min-h-0', autoHeight ? 'overflow-hidden' : 'overflow-auto'), children: autoHeight ? _jsx("div", { ref: measureRef, children: content }) : content }) })] }), injectedChildren] }));
308
+ cn('w-full transition-all flex flex-col', autoHeight ? 'h-fit' : 'h-full'), style: { contain: 'layout style' }, children: _jsx("div", { className: cn('min-h-0', autoHeight ? 'flex-none overflow-visible' : 'flex-1 overflow-auto'), children: autoHeight ? _jsx("div", { ref: measureRef, children: content }) : content }) })] }), injectedChildren] }));
286
309
  }));
287
310
  export function PageGridLayout({ pageKey, defaultLayouts, defaultCols, layoutVersion, canEditPage, editorEventNames, preferenceAdapter, widgets, widgetMeta, className,
288
311
  // Resize default flipped 2026-05-12: rgl v2 dropped auto-handle rendering
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsuite/page-builder",
3
- "version": "2.3.1",
3
+ "version": "2.4.1",
4
4
  "description": "Shared BSuite responsive page-builder grid and layout persistence primitives",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",