@vectoriox/iox-ui 5.139.0 → 5.140.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.
@@ -26402,6 +26402,8 @@ const PATTERN_SECTION_PAD = 'var(--iox-section-pad)';
26402
26402
  const PATTERN_SECTION_SPACE = 'var(--iox-space-section)';
26403
26403
  /** The furthest in a ready-made section's words start: the column grid keeps at least eight columns for them. */
26404
26404
  const READY_MADE_MAX_COLUMN = 3;
26405
+ /** A carried whole's cell per screen its section place asks for: a screen less the section's padding above and below. */
26406
+ const CARRIED_CELL_SCREEN = 80;
26405
26407
  /** The ground a section paints, by name (a photo ground reads as the ink: its words are light). */
26406
26408
  function groundOf(s) {
26407
26409
  const ground = String(s.ground ?? LayoutColour.Ground);
@@ -26473,9 +26475,29 @@ function carriedSection(s, si, ctx) {
26473
26475
  const root = create$1(`${ctx.p}-s${si}`, T.Section, {}, NO_ELEMENT_STYLE);
26474
26476
  root.label = s.id;
26475
26477
  setStyleProps(root, { padding: PATTERN_SECTION_PAD, margin: ZERO$1, ...(ctx.rtl ? { textDirection: 'rtl' } : {}) });
26476
- root.children = [node];
26478
+ root.children = [fillsItsCell(node) ? carriedCell(`${root.id}-cell`, node, s) : node];
26477
26479
  return root;
26478
26480
  }
26481
+ /** Does this node fill the cell it was placed in (absolutely, at the full size of its old layer's frame)? A gallery's
26482
+ * slider and a list's row are (`composeGallery` / `composeList`). */
26483
+ function fillsItsCell(node) {
26484
+ const position = String(node.styleProps?.['position'] ?? '');
26485
+ return position === 'absolute' || position === 'fixed';
26486
+ }
26487
+ /**
26488
+ * vectoriox/iox-ui#105: a whole carried out of a layer that FILLED its cell. Its old frame (positioned, sized by the
26489
+ * grid) was what it was placed against; a bare Section is neither, so the slider measured itself against the page and
26490
+ * drew at its top. The cell comes with it: the old frame's shape, the section place's height on a laptop (at most a screen), its own
26491
+ * shape on a phone (where the node is in flow already).
26492
+ */
26493
+ function carriedCell(id, node, s) {
26494
+ const cell = create$1(id, T.Container, {}, NO_ELEMENT_STYLE);
26495
+ cell.label = 'Cell';
26496
+ setStyleProps(cell, { position: 'relative', width: FULL, minHeight: ZERO$1, height: `${Math.min(1, Math.max(0.5, s.screens || 1)) * CARRIED_CELL_SCREEN}svh` });
26497
+ phone(cell, { height: 'auto' });
26498
+ cell.children = [node];
26499
+ return cell;
26500
+ }
26479
26501
  /**
26480
26502
  * A layout-language page → its layout and header. Deterministic: the same layout composes to byte-identical nodes.
26481
26503
  * Refuses (ComposeError) a link to a section the layout does not have; everything the product cannot say comes back in