@vectoriox/iox-ui 5.151.0 → 5.152.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 +4 -2
- package/design-core/index.d.ts +9 -2
- package/fesm2022/vectoriox-iox-ui-assist-core.mjs +16 -4
- package/fesm2022/vectoriox-iox-ui-assist-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +10 -3
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +26 -4
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/generation-core/index.d.ts +17 -5
- package/package.json +1 -1
- package/src/assist-core/site-look.ts +12 -4
- package/src/design-core/node-classes.ts +10 -3
- package/src/generation-core/adjustments.ts +25 -2
package/assist-core/index.d.ts
CHANGED
|
@@ -1048,8 +1048,8 @@ declare function applySectionEdits(layout: ReadonlyArray<SerializedNode>, edits:
|
|
|
1048
1048
|
/**
|
|
1049
1049
|
* Surface S1 (the builder), family `look` (ai-assist-plan §4 AI2e; ai-session-panel-plan `setLook` / `setMotion`): the
|
|
1050
1050
|
* SITE's look and motion — every page follows — changed only along the contract's own axes: a style preset, the brand
|
|
1051
|
-
* colour, the background tint, corners, pill buttons, spacing, the
|
|
1052
|
-
* animated and the change between pages. Never a token value, never CSS. A preset brings its whole look and keeps the
|
|
1051
|
+
* colour, the background tint, corners, pill buttons, spacing, the content width (award §0c CW4), the type pairing, the
|
|
1052
|
+
* colour mode, speed, scrolling, how animated and the change between pages. Never a token value, never CSS. A preset brings its whole look and keeps the
|
|
1053
1053
|
* site's own Scrolling · How animated · Between pages (MO-D3, as Design ▸ Look does); a type pairing is one of the worn
|
|
1054
1054
|
* style's own. The colour is checked by the SAME audit the contract gates every preset with (`auditDesignContrast`, in
|
|
1055
1055
|
* every mode the look is worn) — a colour that fails is refused, never worn (R4: the AA gate decides the colour).
|
|
@@ -1064,6 +1064,8 @@ declare enum LookAxis {
|
|
|
1064
1064
|
Corners = "corners",
|
|
1065
1065
|
Buttons = "buttons",
|
|
1066
1066
|
Spacing = "spacing",
|
|
1067
|
+
/** The site's content column (award §0c, AW-D33): wide · contained · narrow — every page without its own word follows. */
|
|
1068
|
+
Column = "column",
|
|
1067
1069
|
Type = "type",
|
|
1068
1070
|
Mode = "mode",
|
|
1069
1071
|
Speed = "speed",
|
package/design-core/index.d.ts
CHANGED
|
@@ -18839,8 +18839,15 @@ declare function contentWidthOf(column: unknown, rowValue: (name: string) => str
|
|
|
18839
18839
|
/** The literal `content-cap` holds for a column word: the column's px (the same row `content-width` reads), `100vw` in
|
|
18840
18840
|
* wide. Null for an unknown word or a column row the set lacks. */
|
|
18841
18841
|
declare function contentCapOf(column: unknown, rowValue: (name: string) => string | undefined): string | null;
|
|
18842
|
-
/**
|
|
18843
|
-
*
|
|
18842
|
+
/**
|
|
18843
|
+
* The selector a column word's block is declared on, inside `scope` (the builder's token scope — the attribute sits on
|
|
18844
|
+
* the scope element itself) or anywhere (the engine's `<body>`).
|
|
18845
|
+
*
|
|
18846
|
+
* ⚠️ A token scope NESTED under the element carrying the word follows it too (`[word] scope`): the canvas's
|
|
18847
|
+
* `<iox-page-component class="iox-token-scope" data-iox-column>` hands its `class` to its own `.iox-page-wrapper`, so the
|
|
18848
|
+
* page sits in a second scope that re-declares the site's `content-width` — without this form a page's own word
|
|
18849
|
+
* (Page ▸ Design ▸ Content width) moved the attribute and nothing on the canvas (award §0c CW3).
|
|
18850
|
+
*/
|
|
18844
18851
|
declare function columnSelector(word: string, scope?: string): string;
|
|
18845
18852
|
/**
|
|
18846
18853
|
* The SITE's column word, read from the token rows the renderer already holds: the word whose literal `content-width`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AiStep, STRICT_SCHEMA_BUDGET, strictSchemaComplexity, jsonText, jsonListOf, jsonOneOf, jsonClosedObject, jsonAnyOf, PlanWordIssueCode, factIssues, walkSerialized, AdjustKind, AdjustAxis, adjustStepOf, ADJUST_STEPS, NODE_BASELINES, adjustStyleProps, ADJUST_AXIS_LABELS, adjustStepLabel, patternById, carryInto, composeSection } from '@vectoriox/iox-ui/generation-core';
|
|
2
|
-
import { elementStylesFor, colorSchemeOf, ColorScheme, COLOR_SCHEME_TYPES, elementStyleById, COLOR_SCHEMES, NEW_NODE_STYLE_DEFAULTS, setColorScheme, switchElementStyle, flavorPackById, parseHexColor, resolveDesignChoices, SPEC_AXES, stylePresetOfChoices, BETWEEN_IDS, ANIMATE_IDS, SCROLL_IDS, TINT_IDS, STYLE_PRESETS, stylePresetById, presetChoices, designTokenRows, auditDesignContrast } from '@vectoriox/iox-ui/design-core';
|
|
2
|
+
import { elementStylesFor, colorSchemeOf, ColorScheme, COLOR_SCHEME_TYPES, elementStyleById, COLOR_SCHEMES, NEW_NODE_STYLE_DEFAULTS, setColorScheme, switchElementStyle, flavorPackById, parseHexColor, resolveDesignChoices, SPEC_AXES, stylePresetOfChoices, BETWEEN_IDS, ANIMATE_IDS, SCROLL_IDS, COLUMN_IDS, TINT_IDS, STYLE_PRESETS, stylePresetById, presetChoices, designTokenRows, auditDesignContrast } from '@vectoriox/iox-ui/design-core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The surfaces AI Assist runs on (ai-assist-plan §2, §4): each screen that offers a prompt registers ONE spec — what it
|
|
@@ -2007,8 +2007,8 @@ function applySectionEdits(layout, edits, ctx) {
|
|
|
2007
2007
|
/**
|
|
2008
2008
|
* Surface S1 (the builder), family `look` (ai-assist-plan §4 AI2e; ai-session-panel-plan `setLook` / `setMotion`): the
|
|
2009
2009
|
* SITE's look and motion — every page follows — changed only along the contract's own axes: a style preset, the brand
|
|
2010
|
-
* colour, the background tint, corners, pill buttons, spacing, the
|
|
2011
|
-
* animated and the change between pages. Never a token value, never CSS. A preset brings its whole look and keeps the
|
|
2010
|
+
* colour, the background tint, corners, pill buttons, spacing, the content width (award §0c CW4), the type pairing, the
|
|
2011
|
+
* colour mode, speed, scrolling, how animated and the change between pages. Never a token value, never CSS. A preset brings its whole look and keeps the
|
|
2012
2012
|
* site's own Scrolling · How animated · Between pages (MO-D3, as Design ▸ Look does); a type pairing is one of the worn
|
|
2013
2013
|
* style's own. The colour is checked by the SAME audit the contract gates every preset with (`auditDesignContrast`, in
|
|
2014
2014
|
* every mode the look is worn) — a colour that fails is refused, never worn (R4: the AA gate decides the colour).
|
|
@@ -2024,6 +2024,8 @@ var LookAxis;
|
|
|
2024
2024
|
LookAxis["Corners"] = "corners";
|
|
2025
2025
|
LookAxis["Buttons"] = "buttons";
|
|
2026
2026
|
LookAxis["Spacing"] = "spacing";
|
|
2027
|
+
/** The site's content column (award §0c, AW-D33): wide · contained · narrow — every page without its own word follows. */
|
|
2028
|
+
LookAxis["Column"] = "column";
|
|
2027
2029
|
LookAxis["Type"] = "type";
|
|
2028
2030
|
LookAxis["Mode"] = "mode";
|
|
2029
2031
|
LookAxis["Speed"] = "speed";
|
|
@@ -2034,7 +2036,7 @@ var LookAxis;
|
|
|
2034
2036
|
/** How the card names each axis (the builder translates it by the axis). */
|
|
2035
2037
|
const LOOK_AXIS_LABELS = {
|
|
2036
2038
|
[LookAxis.Style]: 'Style', [LookAxis.Colour]: 'Brand colour', [LookAxis.Tint]: 'Background tint', [LookAxis.Corners]: 'Corners',
|
|
2037
|
-
[LookAxis.Buttons]: 'Buttons', [LookAxis.Spacing]: 'Spacing', [LookAxis.Type]: 'Fonts', [LookAxis.Mode]: 'Mode', [LookAxis.Speed]: 'Speed',
|
|
2039
|
+
[LookAxis.Buttons]: 'Buttons', [LookAxis.Spacing]: 'Spacing', [LookAxis.Column]: 'Content width', [LookAxis.Type]: 'Fonts', [LookAxis.Mode]: 'Mode', [LookAxis.Speed]: 'Speed',
|
|
2038
2040
|
[LookAxis.Scrolling]: 'Scrolling', [LookAxis.Entrances]: 'How animated', [LookAxis.Between]: 'Between pages',
|
|
2039
2041
|
};
|
|
2040
2042
|
/** The axes in the order a card lists them (and the answer asks them). */
|
|
@@ -2087,6 +2089,7 @@ function lookAxisValue(choices, axis) {
|
|
|
2087
2089
|
return { id, label: BUTTON_LABELS[id] };
|
|
2088
2090
|
}
|
|
2089
2091
|
case LookAxis.Spacing: return { id: c.density, label: labelOf(SPEC_AXES.densities, c.density) };
|
|
2092
|
+
case LookAxis.Column: return { id: c.column ?? '', label: labelOf(SPEC_AXES.columns, c.column ?? '') };
|
|
2090
2093
|
case LookAxis.Type: return { id: c.pairId, label: pairsOf(c.flavorId).find(p => p.id === c.pairId)?.label ?? c.pairId };
|
|
2091
2094
|
case LookAxis.Mode: return { id: c.mode, label: MODE_LABELS[c.mode] ?? c.mode };
|
|
2092
2095
|
case LookAxis.Speed: return { id: c.motion, label: labelOf(SPEC_AXES.motions, c.motion) };
|
|
@@ -2107,6 +2110,7 @@ function axisOptions(axis, current) {
|
|
|
2107
2110
|
case LookAxis.Corners: return Object.keys(SPEC_AXES.shapes);
|
|
2108
2111
|
case LookAxis.Buttons: return Object.values(LookButtons);
|
|
2109
2112
|
case LookAxis.Spacing: return Object.keys(SPEC_AXES.densities);
|
|
2113
|
+
case LookAxis.Column: return COLUMN_IDS;
|
|
2110
2114
|
case LookAxis.Type: return pairsOf(resolveDesignChoices(current).flavorId).map(p => p.id);
|
|
2111
2115
|
case LookAxis.Mode: return SPEC_AXES.modes;
|
|
2112
2116
|
case LookAxis.Speed: return Object.keys(SPEC_AXES.motions);
|
|
@@ -2133,6 +2137,8 @@ function axisDescription(axis, current) {
|
|
|
2133
2137
|
case LookAxis.Corners: return `Corner roundness everywhere. ${keep} ${options(Object.keys(SPEC_AXES.shapes), id => labelOf(SPEC_AXES.shapes, id))}`;
|
|
2134
2138
|
case LookAxis.Buttons: return `Button shape. ${keep} ${options(Object.values(LookButtons), id => BUTTON_LABELS[id])}`;
|
|
2135
2139
|
case LookAxis.Spacing: return `Space around and between every section of the site. ${keep} ${options(Object.keys(SPEC_AXES.densities), id => labelOf(SPEC_AXES.densities, id))}`;
|
|
2140
|
+
case LookAxis.Column: return `How wide the column the site's words, cards and lists sit in is — backgrounds, pictures and `
|
|
2141
|
+
+ `Scenes still reach the edges; a page that set its own keeps it. ${keep} ${options(COLUMN_IDS, id => `${labelOf(SPEC_AXES.columns, id)}: ${SPEC_AXES.columns[id].desc}`)}`;
|
|
2136
2142
|
case LookAxis.Type: return `The site's fonts, as one of the pairings the current style offers. ${keep} ${options(axisOptions(axis, current), id => pairsOf(resolveDesignChoices(current).flavorId).find(p => p.id === id)?.label ?? id)}`;
|
|
2137
2143
|
case LookAxis.Mode: return `Light or dark site. ${keep} ${options(SPEC_AXES.modes, id => MODE_LABELS[id])}`;
|
|
2138
2144
|
case LookAxis.Speed: return `How fast buttons and cards respond and things move. ${keep} ${options(Object.keys(SPEC_AXES.motions), id => labelOf(SPEC_AXES.motions, id))}`;
|
|
@@ -2235,6 +2241,12 @@ function applyLookEdits(current, edits) {
|
|
|
2235
2241
|
if (v)
|
|
2236
2242
|
next = { ...next, density: v };
|
|
2237
2243
|
}
|
|
2244
|
+
// A width is layout, never paint: it moves no colour, so it never meets the contrast audit below.
|
|
2245
|
+
if (has(LookAxis.Column)) {
|
|
2246
|
+
const v = valid(LookAxis.Column, COLUMN_IDS);
|
|
2247
|
+
if (v)
|
|
2248
|
+
next = { ...next, column: v };
|
|
2249
|
+
}
|
|
2238
2250
|
if (has(LookAxis.Type)) {
|
|
2239
2251
|
const pairs = pairsOf(next.flavorId);
|
|
2240
2252
|
const v = asked[LookAxis.Type];
|