@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.
- package/composite-core/index.d.ts +3 -1
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +3 -1
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +23 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/composite-core/consent.ts +4 -2
- package/src/generation-core/compose-layout.ts +25 -1
package/package.json
CHANGED
|
@@ -73,6 +73,7 @@ const CONSENT_WORDS = {
|
|
|
73
73
|
title: 'Cookies on this site',
|
|
74
74
|
body: 'Analytics and marketing cookies run only if you allow them. Necessary ones always run.',
|
|
75
75
|
accept: 'Accept all', reject: 'Reject all', preferences: 'Preferences', settings: 'Cookie settings', done: 'Done',
|
|
76
|
+
privacy: 'Privacy policy',
|
|
76
77
|
prefsTitle: 'Your privacy choices',
|
|
77
78
|
prefsSub: 'Change these any time from “Cookie settings” at the foot of the site.',
|
|
78
79
|
alwaysOn: 'Always on',
|
|
@@ -86,6 +87,7 @@ const CONSENT_WORDS = {
|
|
|
86
87
|
title: 'עוגיות באתר הזה',
|
|
87
88
|
body: 'עוגיות לסטטיסטיקה ולשיווק פועלות רק באישורך. עוגיות הכרחיות פועלות תמיד.',
|
|
88
89
|
accept: 'לאשר הכול', reject: 'לדחות הכול', preferences: 'העדפות', settings: 'הגדרות עוגיות', done: 'סיום',
|
|
90
|
+
privacy: 'מדיניות פרטיות',
|
|
89
91
|
prefsTitle: 'הבחירות שלך לפרטיות',
|
|
90
92
|
prefsSub: 'אפשר לשנות בכל עת ב„הגדרות עוגיות” שבתחתית האתר.',
|
|
91
93
|
alwaysOn: 'תמיד פועלות',
|
|
@@ -113,7 +115,7 @@ export interface ConsentRecipeOptions {
|
|
|
113
115
|
categories?: ReadonlyArray<ConsentCategory>;
|
|
114
116
|
/** The privacy page's route — linked from the banner when the site has one. */
|
|
115
117
|
privacyRoute?: string | null;
|
|
116
|
-
/** The privacy link's words (the page's title). */
|
|
118
|
+
/** The privacy link's words (the page's title; the site's language's "Privacy policy" when it has none). */
|
|
117
119
|
privacyLabel?: string;
|
|
118
120
|
}
|
|
119
121
|
|
|
@@ -207,7 +209,7 @@ export function buildConsentRecipe(create: CompositeNodeFactory, options: Consen
|
|
|
207
209
|
? [recipePart(create, 'consent-privacy', 'Link', ConsentRole.Privacy, Style.Link,
|
|
208
210
|
// Hugs its words: the words column stretches its children, and a stretched link draws its underline the
|
|
209
211
|
// column's whole width (AW1 Rule 0, 2026-11-21). `flex-start` is logical — the start side in Hebrew too.
|
|
210
|
-
{ label: options.privacyLabel ||
|
|
212
|
+
{ label: options.privacyLabel || t.privacy, linkType: 'page', pageRoute: options.privacyRoute }, 'Privacy policy',
|
|
211
213
|
{ ...WORDS, alignSelf: 'flex-start' })]
|
|
212
214
|
: []),
|
|
213
215
|
];
|
|
@@ -1376,6 +1376,8 @@ const PATTERN_SECTION_PAD = 'var(--iox-section-pad)';
|
|
|
1376
1376
|
const PATTERN_SECTION_SPACE = 'var(--iox-space-section)';
|
|
1377
1377
|
/** The furthest in a ready-made section's words start: the column grid keeps at least eight columns for them. */
|
|
1378
1378
|
const READY_MADE_MAX_COLUMN = 3;
|
|
1379
|
+
/** A carried whole's cell per screen its section place asks for: a screen less the section's padding above and below. */
|
|
1380
|
+
const CARRIED_CELL_SCREEN = 80;
|
|
1379
1381
|
|
|
1380
1382
|
/** The ground a section paints, by name (a photo ground reads as the ink: its words are light). */
|
|
1381
1383
|
function groundOf(s: LayoutSection): string {
|
|
@@ -1446,10 +1448,32 @@ function carriedSection(s: LayoutSection, si: number, ctx: Ctx): SerializedNode
|
|
|
1446
1448
|
const root = create(`${ctx.p}-s${si}`, T.Section, {}, NO_ELEMENT_STYLE);
|
|
1447
1449
|
root.label = s.id;
|
|
1448
1450
|
setStyleProps(root, { padding: PATTERN_SECTION_PAD, margin: ZERO, ...(ctx.rtl ? { textDirection: 'rtl' } : {}) });
|
|
1449
|
-
root.children = [node];
|
|
1451
|
+
root.children = [fillsItsCell(node) ? carriedCell(`${root.id}-cell`, node, s) : node];
|
|
1450
1452
|
return root;
|
|
1451
1453
|
}
|
|
1452
1454
|
|
|
1455
|
+
/** Does this node fill the cell it was placed in (absolutely, at the full size of its old layer's frame)? A gallery's
|
|
1456
|
+
* slider and a list's row are (`composeGallery` / `composeList`). */
|
|
1457
|
+
function fillsItsCell(node: SerializedNode): boolean {
|
|
1458
|
+
const position = String(node.styleProps?.['position'] ?? '');
|
|
1459
|
+
return position === 'absolute' || position === 'fixed';
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
/**
|
|
1463
|
+
* vectoriox/iox-ui#105: a whole carried out of a layer that FILLED its cell. Its old frame (positioned, sized by the
|
|
1464
|
+
* grid) was what it was placed against; a bare Section is neither, so the slider measured itself against the page and
|
|
1465
|
+
* 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
|
|
1466
|
+
* shape on a phone (where the node is in flow already).
|
|
1467
|
+
*/
|
|
1468
|
+
function carriedCell(id: string, node: SerializedNode, s: LayoutSection): SerializedNode {
|
|
1469
|
+
const cell = create(id, T.Container, {}, NO_ELEMENT_STYLE);
|
|
1470
|
+
cell.label = 'Cell';
|
|
1471
|
+
setStyleProps(cell, { position: 'relative', width: FULL, minHeight: ZERO, height: `${Math.min(1, Math.max(0.5, s.screens || 1)) * CARRIED_CELL_SCREEN}svh` });
|
|
1472
|
+
phone(cell, { height: 'auto' });
|
|
1473
|
+
cell.children = [node];
|
|
1474
|
+
return cell;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1453
1477
|
/**
|
|
1454
1478
|
* A layout-language page → its layout and header. Deterministic: the same layout composes to byte-identical nodes.
|
|
1455
1479
|
* Refuses (ComposeError) a link to a section the layout does not have; everything the product cannot say comes back in
|