@vectoriox/iox-ui 5.116.0 → 5.118.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/assist-core/index.d.ts +169 -5
- package/fesm2022/vectoriox-iox-ui-assist-core.mjs +309 -14
- package/fesm2022/vectoriox-iox-ui-assist-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +19 -7
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/generation-core/index.d.ts +3 -0
- package/package.json +1 -1
- package/src/assist-core/assist-turn.ts +7 -4
- package/src/assist-core/page-edits.ts +39 -0
- package/src/assist-core/page-style.ts +346 -0
- package/src/assist-core/page-words.ts +37 -9
- package/src/assist-core/public-api.ts +5 -2
- package/src/assist-core/surfaces.ts +1 -1
- package/src/generation-core/compose-site.ts +1 -1
- package/src/generation-core/footer-mix.ts +21 -6
|
@@ -14879,6 +14879,18 @@ const part$1 = (id) => clone$3(PARTS$1[id]);
|
|
|
14879
14879
|
const laid = (node, lay) => ({ ...node, lay: { ...(node.lay ?? {}), ...lay } });
|
|
14880
14880
|
const GAP = 'var(--iox-space-gap)';
|
|
14881
14881
|
const CENTRED = { alignItems: 'center', textAlign: 'center' };
|
|
14882
|
+
const WORDS = new Set(['Text', 'Heading', 'Link']);
|
|
14883
|
+
/** Centred through and through: every node of a composed site stamps its own `textAlign`, so centring a block's
|
|
14884
|
+
* container never reaches its words — each word node is centred, each container centres its children. */
|
|
14885
|
+
const centred = (node) => ({
|
|
14886
|
+
...laid(node, WORDS.has(node.t) ? { textAlign: 'center' } : CENTRED),
|
|
14887
|
+
...(node.c ? { c: node.c.map(centred) } : {}),
|
|
14888
|
+
});
|
|
14889
|
+
/** The brand block: the name, and the tagline only when the business has one. */
|
|
14890
|
+
const brandPart = (ctx) => {
|
|
14891
|
+
const node = part$1('brand');
|
|
14892
|
+
return ctx.tagline?.trim() ? node : { ...node, c: (node.c ?? []).filter(n => n.fromBusiness !== 'tagline') };
|
|
14893
|
+
};
|
|
14882
14894
|
/** The columns of a footer's grid: the name's block wider, one column per block it holds. */
|
|
14883
14895
|
function columnsOf(count) {
|
|
14884
14896
|
const lay = { display: 'grid', gridTemplateColumns: ['2fr', ...Array.from({ length: count }, () => '1fr')].join(' '), gap: GAP };
|
|
@@ -14900,7 +14912,7 @@ function holdPart(hold, mix) {
|
|
|
14900
14912
|
return { ...node, c: (node.c ?? []).filter(n => n.ph !== 'city') };
|
|
14901
14913
|
}
|
|
14902
14914
|
/** The body: the blocks it holds, arranged. */
|
|
14903
|
-
function bodyOf(mix) {
|
|
14915
|
+
function bodyOf(mix, ctx) {
|
|
14904
14916
|
const holds = mix.holds.map(h => holdPart(h, mix));
|
|
14905
14917
|
switch (mix.arrange) {
|
|
14906
14918
|
case FooterArrange.Line: {
|
|
@@ -14911,23 +14923,23 @@ function bodyOf(mix) {
|
|
|
14911
14923
|
return [row];
|
|
14912
14924
|
}
|
|
14913
14925
|
case FooterArrange.Centred: {
|
|
14914
|
-
const blocks = mix.holds.map(h => (h === FooterHold.Pages ? laid(part$1('pageRow'), { justifyContent: 'center' }) :
|
|
14926
|
+
const blocks = mix.holds.map(h => (h === FooterHold.Pages ? laid(part$1('pageRow'), { justifyContent: 'center' }) : centred(holdPart(h, mix))));
|
|
14915
14927
|
return [
|
|
14916
|
-
{ t: 'Container', es: 'box', lay: { display: 'flex', flexDirection: 'column', gap: '28px', ...CENTRED }, c: [
|
|
14928
|
+
{ t: 'Container', es: 'box', lay: { display: 'flex', flexDirection: 'column', gap: '28px', ...CENTRED }, c: [centred(brandPart(ctx)), ...blocks] },
|
|
14917
14929
|
part$1('rule'),
|
|
14918
14930
|
laid(part$1('copyright'), { textAlign: 'center' }),
|
|
14919
14931
|
];
|
|
14920
14932
|
}
|
|
14921
14933
|
default:
|
|
14922
|
-
return [{ t: 'Container', es: 'box', ...columnsOf(holds.length), c: [
|
|
14934
|
+
return [{ t: 'Container', es: 'box', ...columnsOf(holds.length), c: [brandPart(ctx), ...holds] }, part$1('rule'), part$1('copyright')];
|
|
14923
14935
|
}
|
|
14924
14936
|
}
|
|
14925
14937
|
/** A footer mix as a pattern: what the composer stamps as the site's footer (global, after the page). Check it first. */
|
|
14926
14938
|
function footerPattern(mix, ctx) {
|
|
14927
14939
|
const plain = mix.ground === FooterGround.Plain;
|
|
14928
|
-
const call = mix.closing === FooterClosing.Call ? [mix.arrange === FooterArrange.Columns ? part$1('call') :
|
|
14940
|
+
const call = mix.closing === FooterClosing.Call ? [mix.arrange === FooterArrange.Columns ? part$1('call') : centred(part$1('call'))] : [];
|
|
14929
14941
|
const name = mix.closing === FooterClosing.Name ? [closingName(ctx)] : [];
|
|
14930
|
-
const c = [...(plain ? [part$1('rule')] : []), ...call, ...bodyOf(mix), ...name];
|
|
14942
|
+
const c = [...(plain ? [part$1('rule')] : []), ...call, ...bodyOf(mix, ctx), ...name];
|
|
14931
14943
|
// The contract's shell; a Section with one child does not stack it (the patterns' rule, build-spec "more than one child").
|
|
14932
14944
|
const { lay, ...shell } = part$1('section');
|
|
14933
14945
|
const node = { ...shell, ...(c.length > 1 && lay ? { lay } : {}), ...(plain ? {} : { scheme: mix.ground }), c };
|
|
@@ -19883,7 +19895,7 @@ function composeSite(plan, context) {
|
|
|
19883
19895
|
issues.push({ code: ComposeIssueCode.FooterMended, nodeId: GlobalSlot.Footer, owner: GlobalSlot.Footer, detail: r.said });
|
|
19884
19896
|
let globals = Object.values(GlobalSlot).map(slot => {
|
|
19885
19897
|
const pattern = slot === GlobalSlot.Footer
|
|
19886
|
-
? footerPattern(footer.mix, { name: plan.business.name, design })
|
|
19898
|
+
? footerPattern(footer.mix, { name: plan.business.name, design, tagline: plan.business.tagline })
|
|
19887
19899
|
: patternById(plan.globals[slot]);
|
|
19888
19900
|
const node = composePattern(pattern, slot, { ...base, owner: slot, page: null, section: null, nextAlias: null });
|
|
19889
19901
|
node.isGlobal = true;
|