@vectoriox/iox-ui 5.143.0 → 5.145.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/design-core/index.d.ts +52 -23
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +1 -1
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +65 -43
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +251 -63
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +33 -11
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +156 -7
- package/index.d.ts +11 -4
- package/package.json +1 -1
- package/src/composite-core/shop.ts +1 -1
- package/src/design-core/flavor-spec.generated.ts +5 -1
- package/src/design-core/list-classes.ts +14 -3
- package/src/design-core/locale-direction.ts +28 -0
- package/src/design-core/section-edge.ts +3 -15
- package/src/generation-core/compose-layout.ts +116 -3
- package/src/generation-core/compose-site.ts +50 -20
- package/src/generation-core/public-api.ts +1 -0
- package/src/generation-core/start-quote.ts +158 -0
- package/styles/iox-design.css +54 -10
|
@@ -920,6 +920,9 @@ function composeList(id: string, l: LayoutLayer, mix: LayoutListMix, source: str
|
|
|
920
920
|
// AW11: the mix rides on the frame (design-core LIST_MIX_PROP) — the shared CSS draws its item and hover words from
|
|
921
921
|
// the classes it becomes, and Bindings ▸ List reads it back.
|
|
922
922
|
frame.props[LIST_MIX_PROP] = listMixWords(mix).join(' ');
|
|
923
|
+
// A Hebrew list reads its own direction (design-core `nodeIsRtl` → `iox-list-mirrored`, AW6's answer): what leans
|
|
924
|
+
// and fans turns the other way (R-H-AW11-8, #116) — `:dir(rtl)` never sees a section's CSS `direction`.
|
|
925
|
+
if (ctx.rtl) setStyleProps(frame, { textDirection: 'rtl' });
|
|
923
926
|
// AW11 rule 2 (never cut): what leans, hangs or turns keeps its room inside the frame — its section clips.
|
|
924
927
|
const room = listOverhang(mix);
|
|
925
928
|
if (room.blockStart || room.blockEnd || room.inline) {
|
|
@@ -946,8 +949,14 @@ function composeList(id: string, l: LayoutLayer, mix: LayoutListMix, source: str
|
|
|
946
949
|
if (strips) return composeStrips(id, frame, item, mix, source, ctx, listItemRadius(mix));
|
|
947
950
|
// AW11-D16: drifting picture rows — the Marquee holding the list's pictures, twice.
|
|
948
951
|
if (mix.move.includes(LayoutListMove.Rows) && arrange === LayoutListArrange.Row && !lc.held) return composeDriftRows(id, frame, item, source, l);
|
|
949
|
-
|
|
950
|
-
|
|
952
|
+
if (arrange === LayoutListArrange.Stage) {
|
|
953
|
+
// A stage's rows and cards draw no box (`display: contents`, iox-design.css): an arrival on them plays nothing,
|
|
954
|
+
// so the stage arrives as one (#116).
|
|
955
|
+
frame.interactions = [...frame.interactions, listArriveInteraction(frame.id, mix.arrive, ctx)];
|
|
956
|
+
} else {
|
|
957
|
+
item.interactions = [...item.interactions, listArriveInteraction(item.id, mix.arrive, ctx)];
|
|
958
|
+
if (mix.arrive === LayoutListArrive.ClipUp) riseInside(item, ctx);
|
|
959
|
+
}
|
|
951
960
|
// LI4: the one that stands out — a deck's top card IS its standing out; strips draw their own (wider).
|
|
952
961
|
const shown = standout && !standWait && !deck ? standWrap(`${id}-stand`, item, standout) : item;
|
|
953
962
|
|
|
@@ -1027,6 +1036,107 @@ function composeList(id: string, l: LayoutLayer, mix: LayoutListMix, source: str
|
|
|
1027
1036
|
return frame;
|
|
1028
1037
|
}
|
|
1029
1038
|
|
|
1039
|
+
// ── Bindings ▸ List (AW11 P5): ONE list frame recomposed by the SAME composer ───────────────────────────────────────
|
|
1040
|
+
|
|
1041
|
+
/** What a list frame is recomposed from: its mix, the list it shows, and the place it stands in. */
|
|
1042
|
+
export interface ListFrameInput {
|
|
1043
|
+
/** The mix to compose (Bindings ▸ List's pick, `withListWord`). */
|
|
1044
|
+
readonly mix: LayoutListMix;
|
|
1045
|
+
/** The data source the list repeats. */
|
|
1046
|
+
readonly source: string;
|
|
1047
|
+
/** How its items are read (`listBindingOfType`, the item's own page from `listDetailOf`). */
|
|
1048
|
+
readonly list: LayoutListBinding;
|
|
1049
|
+
/** The page's language — a right-to-left one mirrors what leans and fans. */
|
|
1050
|
+
readonly locale?: string;
|
|
1051
|
+
/** The page's motion (pace, easing) — the arrival's timing. Default: normal, ease-out. */
|
|
1052
|
+
readonly motion?: LayoutSite['motion'];
|
|
1053
|
+
/** The section's ground (a band's colour scheme follows it). */
|
|
1054
|
+
readonly ground?: string;
|
|
1055
|
+
/** The section is held (a Scene, a pinned section): the scroll plays it, nothing drags or turns by itself. */
|
|
1056
|
+
readonly held?: boolean;
|
|
1057
|
+
/** The list's name (a slider's carousel name). */
|
|
1058
|
+
readonly label?: string;
|
|
1059
|
+
/** The cell it stands in, in the section's 12 columns (`[from, to)`); default the whole width. */
|
|
1060
|
+
readonly col?: readonly [number, number];
|
|
1061
|
+
/** Where the gaps are said (`sections[i].layers[j]`). */
|
|
1062
|
+
readonly path?: string;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
/** A recomposed list frame, and what the composer said while composing it (a word drawn as its stand-in…). */
|
|
1066
|
+
export interface ListFrame {
|
|
1067
|
+
readonly frame: SerializedNode;
|
|
1068
|
+
readonly gaps: ReadonlyArray<LayoutGap>;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
/** The frame styles the list composer owns (laptop and phone) beyond a new Container's own: a recompose replaces them
|
|
1072
|
+
* and keeps the rest — the frame's place in its section (`place`), its entrance, the author's own. Held to
|
|
1073
|
+
* `composeList` by compose-list-frame.spec. */
|
|
1074
|
+
export const LIST_FRAME_STYLE_KEYS: ReadonlyArray<string> = ['position', 'padding', 'textDirection', 'display', 'flexDirection', 'gap', 'height'];
|
|
1075
|
+
/** The frame props the list composer owns. */
|
|
1076
|
+
const LIST_FRAME_PROPS: ReadonlyArray<string> = [LIST_MIX_PROP, 'colorScheme'];
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* Recompose ONE list frame (Bindings ▸ List, AW11 board P5): `composeList` — the very function `composeLayout` stamps a
|
|
1080
|
+
* list with, never a copy — run for one frame. Given the frame on the page (`previous`), the result keeps its id, its
|
|
1081
|
+
* place in the section, its entrance and every style the composer does not own, and takes the new mix's items,
|
|
1082
|
+
* arrangement, role, room and classes. Pure.
|
|
1083
|
+
*/
|
|
1084
|
+
export function composeListFrame(input: ListFrameInput, previous?: SerializedNode | null): ListFrame {
|
|
1085
|
+
const id = previous?.id ?? 'list';
|
|
1086
|
+
const pace = LAYOUT_PACE[(input.motion?.pace ?? LayoutPace.Normal) as LayoutPace] ?? LAYOUT_PACE[LayoutPace.Normal];
|
|
1087
|
+
const site = { locale: input.locale, sections: [], motion: input.motion } as unknown as LayoutSite;
|
|
1088
|
+
const ctx = {
|
|
1089
|
+
p: id, site, rtl: layoutRtl(input.locale), mode: LayoutColourMode.Light, pace,
|
|
1090
|
+
ease: LAYOUT_EASING[(input.motion?.ease ?? LayoutEase.Out) as LayoutEase] ?? LAYOUT_EASING[LayoutEase.Out],
|
|
1091
|
+
sections: {}, gaps: [], links: [], headingSeen: false, carry: new Map(), keptArrangement: [],
|
|
1092
|
+
listOf: () => input.list, sourceFields: () => null, photoSrc: () => '', photoAlt: () => '', photoAspect: () => LAYOUT_PHOTO_ASPECT[LayoutPhotoShape.Landscape],
|
|
1093
|
+
} as unknown as Ctx;
|
|
1094
|
+
const col = input.col ?? [1, 13];
|
|
1095
|
+
const layer = { kind: LayoutLayerKind.Gallery, col: [col[0], col[1]], row: [1, 2], text: input.label, gallery: { slides: [], source: input.source, list: input.mix } } as unknown as LayoutLayer;
|
|
1096
|
+
const path = input.path ?? 'list';
|
|
1097
|
+
const lc = { section: { ground: input.ground } as LayoutSection, si: 0, li: 0, path, held: !!input.held, track: 1, order: 0, phoneGap: 0, phoneAlign: 'start' } as LayerCtx;
|
|
1098
|
+
const composed = composeList(id, layer, input.mix, input.source, input.list, lc, ctx);
|
|
1099
|
+
return { frame: previous ? keepPlace(previous, composed) : composed, gaps: ctx.gaps };
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
/** The recomposed frame on the previous one's place: what the composer owns is the new composition's (a key it no longer
|
|
1103
|
+
* writes is dropped), everything else — its place, its entrance, the author's own — the previous frame's. */
|
|
1104
|
+
function keepPlace(previous: SerializedNode, composed: SerializedNode): SerializedNode {
|
|
1105
|
+
const frame = structuredClone(previous);
|
|
1106
|
+
const owned = (prev: Readonly<Record<string, unknown>> | undefined, next: Readonly<Record<string, unknown>> | undefined, keys: ReadonlyArray<string>) => ({
|
|
1107
|
+
...Object.fromEntries(Object.entries(prev ?? {}).filter(([k]) => !keys.includes(k))),
|
|
1108
|
+
...Object.fromEntries(keys.filter(k => next && k in next).map(k => [k, next![k]])),
|
|
1109
|
+
});
|
|
1110
|
+
frame.role = composed.role;
|
|
1111
|
+
frame.props = owned(frame.props, composed.props, LIST_FRAME_PROPS);
|
|
1112
|
+
frame.styleProps = owned(frame.styleProps, composed.styleProps, LIST_FRAME_STYLE_KEYS);
|
|
1113
|
+
const was = frame.responsive?.[LAYOUT_PHONE_BREAKPOINT];
|
|
1114
|
+
const now = composed.responsive?.[LAYOUT_PHONE_BREAKPOINT];
|
|
1115
|
+
if (was || now) {
|
|
1116
|
+
frame.responsive ??= {};
|
|
1117
|
+
frame.responsive[LAYOUT_PHONE_BREAKPOINT] = { ...(was ?? {}), styleProps: owned(was?.styleProps, now?.styleProps, LIST_FRAME_STYLE_KEYS) };
|
|
1118
|
+
}
|
|
1119
|
+
// The frame's own arrival (a stage's) is the composer's; any other interaction the author's.
|
|
1120
|
+
const arrival = `${previous.id}-enter`;
|
|
1121
|
+
frame.interactions = [...(frame.interactions ?? []).filter(ix => (ix as { id?: unknown })?.id !== arrival), ...(composed.interactions ?? [])];
|
|
1122
|
+
frame.children = composed.children;
|
|
1123
|
+
return frame;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
/** The page that shows one item, as a composed list frame links to it (`linkToDetail`) — so a recompose keeps the link.
|
|
1127
|
+
* Undefined when its items link nowhere (or to an address of their own). */
|
|
1128
|
+
export function listDetailOf(frame: SerializedNode | null | undefined): LayoutListBinding['detail'] {
|
|
1129
|
+
let found: LayoutListBinding['detail'];
|
|
1130
|
+
if (!frame) return undefined;
|
|
1131
|
+
walkSerialized([frame], node => {
|
|
1132
|
+
if (found) return;
|
|
1133
|
+
const route = node.props?.['pageRoute'];
|
|
1134
|
+
const param = (node.bindings ?? []).find(b => typeof b.prop === 'string' && b.prop.startsWith(ROUTE_PARAM_PROP));
|
|
1135
|
+
if (typeof route === 'string' && route && param) found = { route, param: param.prop.slice(ROUTE_PARAM_PROP.length), field: param.path };
|
|
1136
|
+
});
|
|
1137
|
+
return found;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1030
1140
|
/** The corner a list's items wear (LI7). */
|
|
1031
1141
|
function listItemRadius(mix: LayoutListMix): string {
|
|
1032
1142
|
return mix.item === LayoutListItem.Card ? LIST_CARD_RADIUS : LIST_PHOTO_RADIUS;
|
|
@@ -1644,13 +1754,16 @@ function carriedCell(id: string, node: SerializedNode, s: LayoutSection): Serial
|
|
|
1644
1754
|
* Refuses (ComposeError) a link to a section the layout does not have; everything the product cannot say comes back in
|
|
1645
1755
|
* `gaps`.
|
|
1646
1756
|
*/
|
|
1757
|
+
/** A layout reads right to left in Hebrew — the ONE rule `composeLayout` and `composeListFrame` read. */
|
|
1758
|
+
const layoutRtl = (locale: string | undefined): boolean => locale === 'he';
|
|
1759
|
+
|
|
1647
1760
|
export function composeLayout(site: LayoutSite, options: ComposeLayoutOptions): ComposedLayout {
|
|
1648
1761
|
if (!site?.sections?.length) throw new ComposeError('a layout needs at least one section');
|
|
1649
1762
|
const pace = LAYOUT_PACE[(site.motion?.pace ?? LayoutPace.Normal) as LayoutPace] ?? LAYOUT_PACE[LayoutPace.Normal];
|
|
1650
1763
|
const ctx: Ctx = {
|
|
1651
1764
|
p: options.id ?? 'cl',
|
|
1652
1765
|
site,
|
|
1653
|
-
rtl: site.locale
|
|
1766
|
+
rtl: layoutRtl(site.locale),
|
|
1654
1767
|
mode: (options.mode ?? LayoutColourMode.Light) as LayoutColourMode,
|
|
1655
1768
|
pace,
|
|
1656
1769
|
ease: LAYOUT_EASING[(site.motion?.ease ?? LayoutEase.Out) as LayoutEase] ?? LAYOUT_EASING[LayoutEase.Out],
|
|
@@ -556,25 +556,49 @@ export function layoutListShapes(plan: SitePlan): LayoutListShape[] {
|
|
|
556
556
|
.filter(isLayoutListSource)
|
|
557
557
|
.map(d => {
|
|
558
558
|
const type = contentTypeOfSource(d.alias, plan);
|
|
559
|
-
const played = (Object.values(ContentRole) as `${ContentRole}`[]).filter(role => !!roleField(type, role));
|
|
560
|
-
const perItem = type?.seed?.perItem ?? {};
|
|
561
|
-
const long = LIST_TEXT_ROLES.filter(role => {
|
|
562
|
-
const field = roleField(type, role);
|
|
563
|
-
const samples = field ? (perItem[field] ?? []).filter(s => typeof s === 'string') : [];
|
|
564
|
-
return samples.length > 0 && median(samples.map(wordCount)) > LIST_LONG_WORDS;
|
|
565
|
-
});
|
|
566
559
|
// A shop list holds the plan's sample products (the build writes them unless the shop has its own).
|
|
567
|
-
|
|
568
|
-
// AW11: how long the planned names run (a long one is not set on its picture).
|
|
569
|
-
const titleField = roleField(type, ContentRole.Title);
|
|
570
|
-
const titles = titleField ? (perItem[titleField] ?? []).filter(s => typeof s === 'string') : [];
|
|
571
|
-
return {
|
|
572
|
-
alias: d.alias, label: type?.label ?? d.alias, items: typeof count === 'number' && count > 0 ? count : null, roles: played, long,
|
|
573
|
-
...(titles.length ? { titleWords: median(titles.map(wordCount)) } : {}),
|
|
574
|
-
};
|
|
560
|
+
return listShapeOfType(d.alias, type, d.type === PlanDataSourceType.Shop ? { items: plan.shop?.products?.length ?? null } : {});
|
|
575
561
|
});
|
|
576
562
|
}
|
|
577
563
|
|
|
564
|
+
/** What is known of a list's items beyond its type: their count, or the items themselves (a studio's real rows). */
|
|
565
|
+
export interface ListShapeReading {
|
|
566
|
+
/** How many items it holds (absent: the type's planned sample count). */
|
|
567
|
+
readonly items?: number | null;
|
|
568
|
+
/** The items themselves, by field — their words are measured instead of the planned samples'. */
|
|
569
|
+
readonly rows?: ReadonlyArray<Readonly<Record<string, unknown>>>;
|
|
570
|
+
/** AW11-D9: every picture stands on a plain ground (measured at upload). */
|
|
571
|
+
readonly plainPictures?: boolean | null;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* The shape of ONE list from its content type — what the layout check, the wire and Bindings ▸ List judge a list by:
|
|
576
|
+
* the roles its items play, which text roles run long, the names' length, how many items. From the plan's planned
|
|
577
|
+
* samples (`type.seed`) or, given `rows`, from the studio's real items. `layoutListShapes` is this, per plan source.
|
|
578
|
+
*/
|
|
579
|
+
export function listShapeOfType(alias: string, type: Pick<ContentTypePlan, 'label' | 'roles' | 'seed'> | null | undefined,
|
|
580
|
+
reading: ListShapeReading = {}): LayoutListShape {
|
|
581
|
+
const played = (Object.values(ContentRole) as `${ContentRole}`[]).filter(role => !!roleField(type, role));
|
|
582
|
+
const perItem = type?.seed?.perItem ?? {};
|
|
583
|
+
const samples = (field: string | undefined): string[] => {
|
|
584
|
+
if (!field) return [];
|
|
585
|
+
const raw = reading.rows ? reading.rows.map(r => r[field]) : (perItem[field] ?? []);
|
|
586
|
+
return raw.filter((s): s is string => typeof s === 'string');
|
|
587
|
+
};
|
|
588
|
+
const long = LIST_TEXT_ROLES.filter(role => {
|
|
589
|
+
const words = samples(roleField(type, role));
|
|
590
|
+
return words.length > 0 && median(words.map(wordCount)) > LIST_LONG_WORDS;
|
|
591
|
+
});
|
|
592
|
+
const count = reading.items !== undefined ? reading.items : reading.rows ? reading.rows.length : type?.seed?.count;
|
|
593
|
+
// AW11: how long the names run (a long one is not set on its picture).
|
|
594
|
+
const titles = samples(roleField(type, ContentRole.Title));
|
|
595
|
+
return {
|
|
596
|
+
alias, label: type?.label ?? alias, items: typeof count === 'number' && count > 0 ? count : null, roles: played, long,
|
|
597
|
+
...(titles.length ? { titleWords: median(titles.map(wordCount)) } : {}),
|
|
598
|
+
...(reading.plainPictures !== undefined ? { plainPictures: reading.plainPictures } : {}),
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
|
|
578
602
|
/**
|
|
579
603
|
* How the list composer reads one list (LI1, `ComposeLayoutOptions.listOf`): the field that plays each role, and the
|
|
580
604
|
* plan's page that shows one item — its route, its param and the item's field that fills it. Null for an alias that is
|
|
@@ -584,16 +608,22 @@ export function layoutListBinding(alias: string, plan: SitePlan): LayoutListBind
|
|
|
584
608
|
const ds = plan.dataSources.find(d => d.alias === alias);
|
|
585
609
|
if (!ds || !isLayoutListSource(ds)) return null;
|
|
586
610
|
const type = contentTypeOfSource(alias, plan);
|
|
611
|
+
const page = type ? plan.pages.find(p => p.template === type.name && !!p.routeSource) : undefined;
|
|
612
|
+
const byRoute = page ? plan.dataSources.find(d => d.alias === page.routeSource) : undefined;
|
|
613
|
+
const filter = byRoute && byRoute.type !== PlanDataSourceType.Relative ? byRoute.filterByRouteParam : undefined;
|
|
614
|
+
const [param] = page ? routeParams(page.route) : [];
|
|
615
|
+
return listBindingOfType(type, page && filter && param ? { route: page.route, param, field: filter.field } : undefined);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/** How the list composer reads a list of `type` — the field playing each role — and, when there is one, the page that
|
|
619
|
+
* shows one item. The ONE reading `layoutListBinding` and Bindings ▸ List (`composeListFrame`) hand the composer. */
|
|
620
|
+
export function listBindingOfType(type: Pick<ContentTypePlan, 'roles'> | null | undefined, detail?: LayoutListBinding['detail']): LayoutListBinding {
|
|
587
621
|
const roles: Record<string, string> = {};
|
|
588
622
|
for (const role of Object.values(ContentRole) as `${ContentRole}`[]) {
|
|
589
623
|
const field = roleField(type, role);
|
|
590
624
|
if (field) roles[role] = field;
|
|
591
625
|
}
|
|
592
|
-
|
|
593
|
-
const byRoute = page ? plan.dataSources.find(d => d.alias === page.routeSource) : undefined;
|
|
594
|
-
const filter = byRoute && byRoute.type !== PlanDataSourceType.Relative ? byRoute.filterByRouteParam : undefined;
|
|
595
|
-
const [param] = page ? routeParams(page.route) : [];
|
|
596
|
-
return { roles, ...(page && filter && param ? { detail: { route: page.route, param, field: filter.field } } : {}) };
|
|
626
|
+
return { roles, ...(detail ? { detail } : {}) };
|
|
597
627
|
}
|
|
598
628
|
|
|
599
629
|
/** One line of the brief: `works (Works): 6 items · name, picture, detail, quote (long)`. */
|
|
@@ -36,6 +36,7 @@ export * from './redesign-run';
|
|
|
36
36
|
export * from './redesign-additions';
|
|
37
37
|
export * from './ai-run';
|
|
38
38
|
export * from './generation-tier';
|
|
39
|
+
export * from './start-quote';
|
|
39
40
|
export * from './recipe-fields';
|
|
40
41
|
export * from './plan-derived';
|
|
41
42
|
export * from './shop-plan';
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AI_COMPOSED_PAGES_ESTIMATED, AI_STEP_PART_TOKENS, AI_STEP_TYPICAL_TOKENS, AiKeyMode, AiStep, AiTokenCounts, AiTokenPrice,
|
|
3
|
+
estimateStepCredits,
|
|
4
|
+
} from './ai-run';
|
|
5
|
+
import { AI_COMPOSED_PAGES_BY_TIER, tierOf } from './generation-tier';
|
|
6
|
+
import { PLAN_PARTS } from './plan-wire';
|
|
7
|
+
import { GenerationTier } from './site-plan.model';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* What a generation will cost, said BEFORE Send (AI plan "Credit estimate before Send", CE-D1…CE-D3, CE-D6, CE-D9) —
|
|
11
|
+
* pure. ONE function prices a start: iox-cms holds its `high` when a generation starts and answers it, with the gate's
|
|
12
|
+
* refusal, on the dry quote route, so the number the owner sees is the number held (R-H1). The screens never sum
|
|
13
|
+
* prices themselves.
|
|
14
|
+
*
|
|
15
|
+
* - `high` = what the start holds: counted high like every estimate (the plan's pages part asked twice, each composed page
|
|
16
|
+
* with its repair). `low` = the same run with no re-ask and no repair. Both rounded OUTWARD to whole credits.
|
|
17
|
+
* - Home is composed at its model; every following page at the model that runs it (`followingFor`, CE-D3) — Award
|
|
18
|
+
* 196 → 123, Basic 79 → 65 at the default models.
|
|
19
|
+
* - An own-key route is priced and marked `keyMode: own` (not charged by IOX, CE-D6); a model the vetted list does not
|
|
20
|
+
* price carries `estimated` (iox-cms `priceFor`: the dearest known price of its provider).
|
|
21
|
+
* - Pictures and a film are never in the number (CE-D9): the screen names them as rows with no price.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/** The steps a generation's start is priced on, in order (the reading, the plan, the composed pages). */
|
|
25
|
+
export const START_QUOTE_STEPS: ReadonlyArray<AiStep> = [AiStep.ReadMessage, AiStep.PlanSite, AiStep.ComposePages];
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* One composed page with no repair — the low end of a start (measured on the live u2band run, 2026-11-16: Home 8.8k in /
|
|
29
|
+
* 8.7k out, the next page 8.7k / 5.6k; ≈ 9k / 7k a page). The high end is `AI_STEP_TYPICAL_TOKENS[ComposePages]` over
|
|
30
|
+
* `AI_COMPOSED_PAGES_ESTIMATED` (each page with its repair).
|
|
31
|
+
*/
|
|
32
|
+
export const AI_COMPOSED_PAGE_LEAN_TOKENS: Readonly<AiTokenCounts> = Object.freeze({ input: 9_000, output: 7_000, cacheWrite: 0, cacheRead: 0 });
|
|
33
|
+
|
|
34
|
+
/** A step's route as the start would run it: the model and its price (null = no price known, priced 0). */
|
|
35
|
+
export interface QuoteRoute {
|
|
36
|
+
model: string;
|
|
37
|
+
price: AiTokenPrice | null;
|
|
38
|
+
/** The vetted list does not price this model; it is priced at its provider's dearest (iox-cms `priceFor`). */
|
|
39
|
+
estimated?: boolean;
|
|
40
|
+
/** Who pays — an own key is priced for the owner to see, never charged by IOX (absent = platform). */
|
|
41
|
+
keyMode?: `${AiKeyMode}`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** The routes a start runs: each of `START_QUOTE_STEPS` (null = no route, priced 0), and the model that composes the pages
|
|
45
|
+
* after Home (`following`; absent = Home's model composes them too). */
|
|
46
|
+
export interface StartQuoteRoutes {
|
|
47
|
+
[AiStep.ReadMessage]: QuoteRoute | null;
|
|
48
|
+
[AiStep.PlanSite]: QuoteRoute | null;
|
|
49
|
+
[AiStep.ComposePages]: QuoteRoute | null;
|
|
50
|
+
following?: QuoteRoute | null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Tokens a start is priced on — the low end and the high end of each step; for composing, of ONE page. */
|
|
54
|
+
export interface StartQuoteTokens {
|
|
55
|
+
[AiStep.ReadMessage]: { low: AiTokenCounts; high: AiTokenCounts };
|
|
56
|
+
[AiStep.PlanSite]: { low: AiTokenCounts; high: AiTokenCounts };
|
|
57
|
+
[AiStep.ComposePages]: { low: AiTokenCounts; high: AiTokenCounts };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const scale = (t: AiTokenCounts, by: number): AiTokenCounts => ({
|
|
61
|
+
input: t.input * by, output: t.output * by, cacheWrite: t.cacheWrite * by, cacheRead: t.cacheRead * by,
|
|
62
|
+
...(t.imageOutput !== undefined ? { imageOutput: t.imageOutput * by } : {}),
|
|
63
|
+
});
|
|
64
|
+
const sum = (a: AiTokenCounts, b: AiTokenCounts): AiTokenCounts => ({
|
|
65
|
+
input: a.input + b.input, output: a.output + b.output, cacheWrite: a.cacheWrite + b.cacheWrite, cacheRead: a.cacheRead + b.cacheRead,
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
/** The tokens a start is priced on: high = the held estimate's (`AI_STEP_TYPICAL_TOKENS`); low = no re-asked plan part,
|
|
69
|
+
* no layout repair. */
|
|
70
|
+
export const START_QUOTE_TOKENS: Readonly<StartQuoteTokens> = {
|
|
71
|
+
[AiStep.ReadMessage]: { low: AI_STEP_TYPICAL_TOKENS[AiStep.ReadMessage], high: AI_STEP_TYPICAL_TOKENS[AiStep.ReadMessage] },
|
|
72
|
+
[AiStep.PlanSite]: {
|
|
73
|
+
low: PLAN_PARTS.map(part => AI_STEP_PART_TOKENS[AiStep.PlanSite]![part]).reduce(sum),
|
|
74
|
+
high: AI_STEP_TYPICAL_TOKENS[AiStep.PlanSite],
|
|
75
|
+
},
|
|
76
|
+
[AiStep.ComposePages]: {
|
|
77
|
+
low: AI_COMPOSED_PAGE_LEAN_TOKENS,
|
|
78
|
+
high: scale(AI_STEP_TYPICAL_TOKENS[AiStep.ComposePages], 1 / AI_COMPOSED_PAGES_ESTIMATED),
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** One row of a quote: a step at one model (composing is two rows — Home, and the pages after it). */
|
|
83
|
+
export interface StartQuotePart {
|
|
84
|
+
step: AiStep;
|
|
85
|
+
/** Null when the step has no route (priced 0). */
|
|
86
|
+
model: string | null;
|
|
87
|
+
/** Composing only: the pages this row covers (Home = 1). */
|
|
88
|
+
pages?: number;
|
|
89
|
+
/** Composing only: the pages after Home. */
|
|
90
|
+
following?: boolean;
|
|
91
|
+
/** Exact credits (to a millionth) — round for the screen with `outwardCredits`. */
|
|
92
|
+
low: number;
|
|
93
|
+
high: number;
|
|
94
|
+
estimated: boolean;
|
|
95
|
+
keyMode: `${AiKeyMode}`;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface StartQuote {
|
|
99
|
+
/** Whole credits, rounded outward: `low` down, `high` up. `high` is what the start holds. */
|
|
100
|
+
low: number;
|
|
101
|
+
high: number;
|
|
102
|
+
tier: GenerationTier;
|
|
103
|
+
/** Own when every priced row runs on the studio's own key (nothing charged by IOX, never refused for credits). */
|
|
104
|
+
keyMode: `${AiKeyMode}`;
|
|
105
|
+
/** Any row priced at a model the vetted list does not price. */
|
|
106
|
+
estimated: boolean;
|
|
107
|
+
parts: StartQuotePart[];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const CREDIT_PRECISION = 1e6;
|
|
111
|
+
const exact = (credits: number): number => Math.round(credits * CREDIT_PRECISION) / CREDIT_PRECISION;
|
|
112
|
+
|
|
113
|
+
/** A credit range rounded OUTWARD to whole credits (low down, high up) — the ONE rounding every quoted range uses. */
|
|
114
|
+
export function outwardCredits(low: number, high: number): { low: number; high: number } {
|
|
115
|
+
return { low: Math.floor(exact(low)), high: Math.ceil(exact(high)) };
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function part(step: AiStep, route: QuoteRoute | null, tokens: { low: AiTokenCounts; high: AiTokenCounts }, pages?: number, following?: boolean): StartQuotePart {
|
|
119
|
+
const times = pages ?? 1;
|
|
120
|
+
const price = route?.price ?? null;
|
|
121
|
+
const credits = (t: AiTokenCounts) => (price ? exact(estimateStepCredits(step, price, t) * times) : 0);
|
|
122
|
+
return {
|
|
123
|
+
step,
|
|
124
|
+
model: route?.model ?? null,
|
|
125
|
+
...(pages !== undefined ? { pages } : {}),
|
|
126
|
+
...(following ? { following: true } : {}),
|
|
127
|
+
low: credits(tokens.low),
|
|
128
|
+
high: credits(tokens.high),
|
|
129
|
+
estimated: !route || !price || route.estimated === true,
|
|
130
|
+
keyMode: route?.keyMode ?? AiKeyMode.Platform,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The price of a generation's start at `tier`, on `routes`. The composed pages are the tier's start count
|
|
136
|
+
* (`AI_COMPOSED_PAGES_BY_TIER`: Basic 2, Award 6) — Home at the composing route, the rest at `following`.
|
|
137
|
+
*/
|
|
138
|
+
export function startQuote(routes: StartQuoteRoutes, tier: `${GenerationTier}`, tokens: StartQuoteTokens = START_QUOTE_TOKENS): StartQuote {
|
|
139
|
+
const at = tierOf(tier);
|
|
140
|
+
const pages = AI_COMPOSED_PAGES_BY_TIER[at];
|
|
141
|
+
const compose = routes[AiStep.ComposePages];
|
|
142
|
+
const following = routes.following === undefined ? compose : routes.following;
|
|
143
|
+
const parts: StartQuotePart[] = [
|
|
144
|
+
part(AiStep.ReadMessage, routes[AiStep.ReadMessage], tokens[AiStep.ReadMessage]),
|
|
145
|
+
part(AiStep.PlanSite, routes[AiStep.PlanSite], tokens[AiStep.PlanSite]),
|
|
146
|
+
part(AiStep.ComposePages, compose, tokens[AiStep.ComposePages], 1),
|
|
147
|
+
...(pages > 1 ? [part(AiStep.ComposePages, following, tokens[AiStep.ComposePages], pages - 1, true)] : []),
|
|
148
|
+
];
|
|
149
|
+
const total = outwardCredits(parts.reduce((s, p) => s + p.low, 0), parts.reduce((s, p) => s + p.high, 0));
|
|
150
|
+
const priced = parts.filter(p => p.model !== null);
|
|
151
|
+
return {
|
|
152
|
+
...total,
|
|
153
|
+
tier: at,
|
|
154
|
+
keyMode: priced.length > 0 && priced.every(p => p.keyMode === AiKeyMode.Own) ? AiKeyMode.Own : AiKeyMode.Platform,
|
|
155
|
+
estimated: parts.some(p => p.estimated),
|
|
156
|
+
parts,
|
|
157
|
+
};
|
|
158
|
+
}
|
package/styles/iox-design.css
CHANGED
|
@@ -1179,6 +1179,15 @@ span.iox-video__play { pointer-events: none; }
|
|
|
1179
1179
|
[data-iox-scrolled] [data-iox-header][data-iox-header-edge]:not([data-iox-header-edge='none'])::after {
|
|
1180
1180
|
opacity: 1;
|
|
1181
1181
|
}
|
|
1182
|
+
/* The edge is its OWN composited layer, always (vectoriox/iox-ui#114). It hangs under the bar, so it paints after
|
|
1183
|
+
everything in the header: the moment a part of the header runs a transform (a button's hover lift or press, the
|
|
1184
|
+
menu button's dots), Chrome lifted the edge out of the header's layer into a new one (overlap) and dropped it again
|
|
1185
|
+
when the part settled — each new layer is rasterised a frame late, so on every hover the strip under the bar showed
|
|
1186
|
+
the page through, cut straight at the bar, and the bar's bottom edge flickered (Emil: will-change on what animates —
|
|
1187
|
+
the edge fades in and out on opacity). A header drawing no edge (`none`) asks for no layer. */
|
|
1188
|
+
[data-iox-header][data-iox-header-edge]:not([data-iox-header-edge='none'])::after {
|
|
1189
|
+
will-change: opacity;
|
|
1190
|
+
}
|
|
1182
1191
|
/* A header that has stepped aside takes its edge WITH it, at once (u2rockband, 2026-11-18): the edge hangs 16px under
|
|
1183
1192
|
the header, so a header translated -100% left it painted across the top of the screen over the content — a cream
|
|
1184
1193
|
band over the cards, flickering as the header came and went. It fades back in after the header has returned. */
|
|
@@ -1429,9 +1438,12 @@ span.iox-video__play { pointer-events: none; }
|
|
|
1429
1438
|
--list-number-ink: 0.1;
|
|
1430
1439
|
--list-dir: 1;
|
|
1431
1440
|
}
|
|
1432
|
-
|
|
1441
|
+
/* A right-to-left frame (design-core writes `iox-list-mirrored` from its own Text Direction — AW6's answer, never
|
|
1442
|
+
`:dir(rtl)`, which a composed Hebrew page never matches): what leans and fans turns the other way (R-H-AW11-8). */
|
|
1443
|
+
.iox-list-mirrored { --list-dir: -1; }
|
|
1433
1444
|
/* The room a round-two list is laid out in is its frame's (a container query: the canvas's phone frame agrees). */
|
|
1434
|
-
:where(.iox-role-list, .iox-role-list-dim):has(.iox-role-list-hang, .iox-role-list-hang-two, .iox-role-list-bento, .iox-role-list-rows, .iox-role-list-stage, .iox-role-list-fan, .iox-role-list-fan-stack, .iox-role-list-tilted, .iox-role-list-tilted-two)
|
|
1445
|
+
:where(.iox-role-list, .iox-role-list-dim):has(.iox-role-list-hang, .iox-role-list-hang-two, .iox-role-list-bento, .iox-role-list-rows, .iox-role-list-stage, .iox-role-list-fan, .iox-role-list-fan-stack, .iox-role-list-tilted, .iox-role-list-tilted-two),
|
|
1446
|
+
:where(.iox-role-list, .iox-role-list-dim).iox-list-arrange-fan {
|
|
1435
1447
|
container: iox-list / inline-size;
|
|
1436
1448
|
}
|
|
1437
1449
|
|
|
@@ -1462,7 +1474,9 @@ span.iox-video__play { pointer-events: none; }
|
|
|
1462
1474
|
}
|
|
1463
1475
|
@container iox-list (max-width: 640px) {
|
|
1464
1476
|
:is(.iox-role-list-hang, .iox-role-list-hang-two, .iox-role-list-hang > .repeater-wrapper, .iox-role-list-hang-two > .repeater-wrapper) > .repeater-root { grid-template-columns: minmax(0, 1fr); }
|
|
1465
|
-
|
|
1477
|
+
/* `:nth-child(n)` weighs as the laptop's `:nth-child(6n+4)` placement, so a phone's one column wins (#116 — that
|
|
1478
|
+
placement made implicit columns and the other items collapsed to nothing). */
|
|
1479
|
+
:is(.iox-role-list-hang, .iox-role-list-hang-two, .iox-role-list-hang > .repeater-wrapper, .iox-role-list-hang-two > .repeater-wrapper) > .repeater-root > :nth-child(n) { grid-column: 1 / -1; margin: 0; width: auto; }
|
|
1466
1480
|
:is(.iox-role-list-hang, .iox-role-list-hang-two, .iox-role-list-hang > .repeater-wrapper, .iox-role-list-hang-two > .repeater-wrapper) > .repeater-root > :nth-child(3n+2) { margin-inline-start: 16%; }
|
|
1467
1481
|
:is(.iox-role-list-hang, .iox-role-list-hang-two, .iox-role-list-hang > .repeater-wrapper, .iox-role-list-hang-two > .repeater-wrapper) > .repeater-root > :nth-child(3n) { margin-inline-end: 16%; }
|
|
1468
1482
|
:is(.iox-role-list-hang-two, .iox-role-list-hang-two > .repeater-wrapper) > .repeater-root { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
@@ -1481,21 +1495,28 @@ span.iox-video__play { pointer-events: none; }
|
|
|
1481
1495
|
--bento-cols: 5;
|
|
1482
1496
|
display: grid;
|
|
1483
1497
|
grid-template-columns: repeat(var(--bento-cols), minmax(0, 1fr));
|
|
1498
|
+
/* every row is the bento's own (a Repeater's node style names `grid-template-rows: auto`, which grew the first row
|
|
1499
|
+
to its words and broke the tall tile's two-high — #116) */
|
|
1500
|
+
grid-template-rows: none;
|
|
1484
1501
|
grid-auto-rows: clamp(140px, 15cqi, 240px);
|
|
1485
1502
|
gap: var(--iox-space-gap);
|
|
1486
1503
|
}
|
|
1487
1504
|
:is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root:has(> :nth-child(-n+2):last-child) { --bento-cols: 2; }
|
|
1488
1505
|
:is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root:has(> :nth-child(3):last-child, > :nth-child(4):last-child) { --bento-cols: 3; }
|
|
1489
1506
|
:is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root:has(> :nth-child(5):last-child, > :nth-child(6):last-child) { --bento-cols: 4; }
|
|
1490
|
-
|
|
1507
|
+
/* The trim out-ranks every arrangement rule below (a row that IS the card takes `display: flex`): `:is(*, .iox-role-card)`
|
|
1508
|
+
adds one class to its weight and matches every row (#116). */
|
|
1509
|
+
:is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root > :nth-child(n+8):is(*, .iox-role-card), :is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root:has(> :nth-child(2n):last-child) > :last-child:is(*, .iox-role-card) { display: none; }
|
|
1491
1510
|
:is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root > :first-child { grid-column: span 2; grid-row: span 2; }
|
|
1492
1511
|
:is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root > * { min-width: 0; min-height: 0; height: 100%; }
|
|
1493
1512
|
:is(:is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root > :is(.iox-role-card, .iox-role-list-item), :is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root > * :is(.iox-role-card, .iox-role-list-item)) { height: 100%; min-height: 0; display: flex; flex-direction: column; }
|
|
1494
1513
|
:is(:is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root > .iox-role-list-item, :is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root > * :is(.iox-role-card-media, .iox-role-list-item)) { flex: 1 1 0; min-height: 0; aspect-ratio: auto; overflow: hidden; }
|
|
1495
1514
|
:is(:is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root > .iox-role-list-item, :is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root > * :is(.iox-role-card-media, .iox-role-list-item)) img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
|
|
1496
1515
|
@container iox-list (max-width: 640px) {
|
|
1497
|
-
:is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root { --bento-cols: 2; grid-auto-rows: clamp(
|
|
1516
|
+
:is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root { --bento-cols: 2; grid-auto-rows: clamp(150px, 44cqi, 200px); }
|
|
1498
1517
|
:is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root > :first-child { grid-row: span 1; grid-column: 1 / -1; }
|
|
1518
|
+
/* a half-width tile holds its words at the lead size — set at the heading's size they ran out of it (#116) */
|
|
1519
|
+
:is(.iox-role-list-bento, .iox-role-list-bento > .repeater-wrapper) > .repeater-root > :not(:first-child) .iox-role-card-title { font-size: var(--iox-size-lead); }
|
|
1499
1520
|
}
|
|
1500
1521
|
|
|
1501
1522
|
/* ROWS — an index: one line per item between hairlines, the title in the display face, an arrow at the end that comes
|
|
@@ -1514,7 +1535,7 @@ span.iox-video__play { pointer-events: none; }
|
|
|
1514
1535
|
color: var(--iox-accent-text, var(--iox-accent)); font-family: var(--iox-font-body);
|
|
1515
1536
|
transition: opacity var(--iox-dur-ui) var(--iox-ease-hover), translate var(--iox-dur-ui) var(--iox-ease-hover);
|
|
1516
1537
|
}
|
|
1517
|
-
:is(:is(.iox-role-list-rows, .iox-role-list-rows > .repeater-wrapper) > .repeater-root > :is(.iox-role-card, .iox-role-list-item), :is(.iox-role-list-rows, .iox-role-list-rows > .repeater-wrapper) > .repeater-root > * :is(.iox-role-card, .iox-role-list-item))
|
|
1538
|
+
.iox-list-mirrored :is(:is(.iox-role-list-rows, .iox-role-list-rows > .repeater-wrapper) > .repeater-root > :is(.iox-role-card, .iox-role-list-item), :is(.iox-role-list-rows, .iox-role-list-rows > .repeater-wrapper) > .repeater-root > * :is(.iox-role-card, .iox-role-list-item))::after { content: "\2190"; content: "\2190" / ""; }
|
|
1518
1539
|
:is(.iox-role-list-rows, .iox-role-list-rows > .repeater-wrapper) > .repeater-root .iox-role-card-title { font-family: var(--iox-font-display); }
|
|
1519
1540
|
@media (hover: hover) and (pointer: fine) {
|
|
1520
1541
|
:is(:is(.iox-role-list-rows, .iox-role-list-rows > .repeater-wrapper) > .repeater-root > :is(.iox-role-card, .iox-role-list-item), :is(.iox-role-list-rows, .iox-role-list-rows > .repeater-wrapper) > .repeater-root > * :is(.iox-role-card, .iox-role-list-item))::after { opacity: 0; translate: calc(var(--list-dir, 1) * -6px) 0; }
|
|
@@ -1552,7 +1573,7 @@ span.iox-video__play { pointer-events: none; }
|
|
|
1552
1573
|
:is(.iox-role-list-stage, .iox-role-list-stage > .repeater-wrapper) > .repeater-root:has(> :nth-child(7):last-child) { --stage-n: 7; }
|
|
1553
1574
|
:is(.iox-role-list-stage, .iox-role-list-stage > .repeater-wrapper) > .repeater-root:has(> :nth-child(8):last-child) { --stage-n: 8; }
|
|
1554
1575
|
:is(.iox-role-list-stage, .iox-role-list-stage > .repeater-wrapper) > .repeater-root:has(> :nth-child(9):last-child) { --stage-n: 9; }
|
|
1555
|
-
:is(.iox-role-list-stage, .iox-role-list-stage > .repeater-wrapper) > .repeater-root > :nth-child(n+11) { display: none; }
|
|
1576
|
+
:is(.iox-role-list-stage, .iox-role-list-stage > .repeater-wrapper) > .repeater-root > :nth-child(n+11):is(*, .iox-role-card) { display: none; }
|
|
1556
1577
|
:is(.iox-role-list-stage, .iox-role-list-stage > .repeater-wrapper) > .repeater-root > *, :is(:is(.iox-role-list-stage, .iox-role-list-stage > .repeater-wrapper) > .repeater-root > :is(.iox-role-card, .iox-role-list-item), :is(.iox-role-list-stage, .iox-role-list-stage > .repeater-wrapper) > .repeater-root > * :is(.iox-role-card, .iox-role-list-item)) { display: contents; }
|
|
1557
1578
|
:is(.iox-role-list-stage, .iox-role-list-stage > .repeater-wrapper) > .repeater-root .iox-role-card-content {
|
|
1558
1579
|
grid-column: 1; align-self: center; padding: 10px 2px; border-block-end: var(--iox-border-width, 1px) solid var(--iox-line);
|
|
@@ -1698,6 +1719,13 @@ span.iox-video__play { pointer-events: none; }
|
|
|
1698
1719
|
--iox-text: var(--list-item-ink, var(--list-ramp-ink));
|
|
1699
1720
|
--iox-text-muted: var(--list-item-ink, var(--list-ramp-ink));
|
|
1700
1721
|
--iox-accent-text: var(--list-item-ink, var(--list-ramp-ink));
|
|
1722
|
+
/* Every part's own ink token too — the title (`heading-color`), the eyebrow, an icon, the title's link — or it
|
|
1723
|
+
resolves at the root and paints the page's ink on the item's ground (#116). */
|
|
1724
|
+
--iox-heading-color: var(--list-item-ink, var(--list-ramp-ink));
|
|
1725
|
+
--iox-eyebrow-color: var(--list-item-ink, var(--list-ramp-ink));
|
|
1726
|
+
--iox-icon-color: var(--list-item-ink, var(--list-ramp-ink));
|
|
1727
|
+
--iox-link-color: var(--list-item-ink, var(--list-ramp-ink));
|
|
1728
|
+
--iox-link-hover-color: var(--list-item-ink, var(--list-ramp-ink));
|
|
1701
1729
|
--iox-card-border: transparent;
|
|
1702
1730
|
background: var(--iox-card-bg); color: var(--iox-text);
|
|
1703
1731
|
}
|
|
@@ -1768,20 +1796,36 @@ span.iox-video__play { pointer-events: none; }
|
|
|
1768
1796
|
:is(.iox-role-list-drift-row, .iox-role-list-drift-row > .repeater-wrapper, .iox-role-list-drift-row .repeater-root) { display: flex; flex: none; gap: var(--iox-space-gap); }
|
|
1769
1797
|
.iox-role-list-drift-row .repeater-root > * { flex: none; width: clamp(160px, 18cqi, 260px); }
|
|
1770
1798
|
.iox-role-list-drift-row :is(.iox-role-card-media, .iox-role-list-item) img { aspect-ratio: 4 / 3; object-fit: cover; }
|
|
1771
|
-
/* A fan you drag (Swiper's creative effect): drawn whole, like the deck — the cards waiting
|
|
1799
|
+
/* A fan you drag (Swiper's creative effect, planSwiperOptions `fan`): drawn whole, like the deck — the cards waiting
|
|
1800
|
+
either side are never cut. Its card is the still fan's size, set in the middle of the list, so the hand (two turned a
|
|
1801
|
+
side round a point below) fits its list (#116: a card the list's full height ran the hand off its section); the front
|
|
1802
|
+
card is raised, as the still fan's middle. */
|
|
1772
1803
|
:is(.iox-role-list, .iox-role-list-dim) .swiper.swiper-creative,
|
|
1773
1804
|
:is(.iox-role-list, .iox-role-list-dim) .swiper.swiper-creative > .swiper-wrapper { overflow: visible; }
|
|
1774
1805
|
:is(.iox-role-list, .iox-role-list-dim) .swiper.swiper-creative > .swiper-wrapper { padding-block-end: 12%; }
|
|
1806
|
+
:is(.iox-role-list, .iox-role-list-dim).iox-list-arrange-fan.iox-list-move-drag .swiper {
|
|
1807
|
+
width: min(280px, 30cqi); height: auto; aspect-ratio: 3 / 4; margin: auto; flex: none;
|
|
1808
|
+
}
|
|
1809
|
+
:is(.iox-role-list, .iox-role-list-dim) .swiper.swiper-creative > .swiper-wrapper > .swiper-slide { transition-property: transform, translate; }
|
|
1810
|
+
:is(.iox-role-list, .iox-role-list-dim) .swiper.swiper-creative > .swiper-wrapper > .swiper-slide-active { translate: 0 -14px; }
|
|
1811
|
+
@container iox-list (max-width: 640px) {
|
|
1812
|
+
:is(.iox-role-list, .iox-role-list-dim).iox-list-arrange-fan.iox-list-move-drag .swiper { width: min(200px, 34cqi); }
|
|
1813
|
+
}
|
|
1775
1814
|
/* Reduced motion (the board's floor): nothing travels or turns on a hover or a focus — fades stay. The rest pose (a
|
|
1776
1815
|
fan's arc, a tilted card's lean, a wall's drops) is a place, not a motion, and stays. */
|
|
1777
1816
|
@media (prefers-reduced-motion: reduce) {
|
|
1778
1817
|
:is(:is(.iox-role-list-fan, .iox-role-list-fan-stack, .iox-role-list-fan > .repeater-wrapper, .iox-role-list-fan-stack > .repeater-wrapper) > .repeater-root > :is(.iox-role-card, .iox-role-list-item), :is(.iox-role-list-fan, .iox-role-list-fan-stack, .iox-role-list-fan > .repeater-wrapper, .iox-role-list-fan-stack > .repeater-wrapper) > .repeater-root > * :is(.iox-role-card, .iox-role-list-item)), :is(:is(.iox-role-list-tilted, .iox-role-list-tilted-two, .iox-role-list-tilted > .repeater-wrapper, .iox-role-list-tilted-two > .repeater-wrapper) > .repeater-root > :is(.iox-role-card, .iox-role-list-item), :is(.iox-role-list-tilted, .iox-role-list-tilted-two, .iox-role-list-tilted > .repeater-wrapper, .iox-role-list-tilted-two > .repeater-wrapper) > .repeater-root > * :is(.iox-role-card, .iox-role-list-item)), :is(:is(.iox-role-list-hang, .iox-role-list-hang-two, .iox-role-list-hang > .repeater-wrapper, .iox-role-list-hang-two > .repeater-wrapper) > .repeater-root > .iox-role-list-item, :is(.iox-role-list-hang, .iox-role-list-hang-two, .iox-role-list-hang > .repeater-wrapper, .iox-role-list-hang-two > .repeater-wrapper) > .repeater-root > * :is(.iox-role-card-media, .iox-role-list-item)) img, .iox-list-item-packshot img, .iox-list-hover-tilt .iox-role-card::after, .iox-list-hover-tilt .iox-role-card > * { transition-property: opacity; }
|
|
1779
|
-
:is(.iox-role-list-fan, .iox-role-list-fan-stack, .iox-role-list-fan > .repeater-wrapper, .iox-role-list-fan-stack > .repeater-wrapper) > .repeater-root > :
|
|
1818
|
+
:is(.iox-role-list-fan, .iox-role-list-fan-stack, .iox-role-list-fan > .repeater-wrapper, .iox-role-list-fan-stack > .repeater-wrapper) > .repeater-root > :focus-within :is(.iox-role-card, .iox-role-list-item), :is(.iox-role-list-fan, .iox-role-list-fan-stack, .iox-role-list-fan > .repeater-wrapper, .iox-role-list-fan-stack > .repeater-wrapper) > .repeater-root > :is(.iox-role-card, .iox-role-list-item):focus-within, :is(.iox-role-list-tilted, .iox-role-list-tilted-two, .iox-role-list-tilted > .repeater-wrapper, .iox-role-list-tilted-two > .repeater-wrapper) > .repeater-root > :focus-within :is(.iox-role-card, .iox-role-list-item), :is(.iox-role-list-tilted, .iox-role-list-tilted-two, .iox-role-list-tilted > .repeater-wrapper, .iox-role-list-tilted-two > .repeater-wrapper) > .repeater-root > :is(.iox-role-card, .iox-role-list-item):focus-within { transform: none !important; }
|
|
1780
1819
|
:is(.iox-role-list-hang, .iox-role-list-hang-two, .iox-role-list-hang > .repeater-wrapper, .iox-role-list-hang-two > .repeater-wrapper) > .repeater-root > * img, .iox-list-item-packshot img, .iox-list-hover-tilt .iox-role-card > * { scale: none !important; }
|
|
1781
1820
|
.iox-list-hover-tilt .iox-role-card::after { rotate: none !important; }
|
|
1782
1821
|
.iox-list-hover-unveil .iox-role-list-second { clip-path: none; opacity: 0; transition: opacity 200ms linear; }
|
|
1783
|
-
.iox-list-hover-unveil :is(.iox-role-card, .iox-role-list-item):hover .iox-role-list-second { opacity: 1; }
|
|
1784
1822
|
.iox-list-hover-fill :is(.iox-role-card-media, .iox-role-list-item) img { scale: none !important; }
|
|
1823
|
+
/* A hover is a mouse's (vectoriox/iox-ui#115): a tap fires a false :hover that sticks, so the hover half waits for a
|
|
1824
|
+
pointer that hovers; a keyboard focus (:focus-within, above) stills a card on every device. */
|
|
1825
|
+
@media (hover: hover) and (pointer: fine) {
|
|
1826
|
+
:is(.iox-role-list-fan, .iox-role-list-fan-stack, .iox-role-list-fan > .repeater-wrapper, .iox-role-list-fan-stack > .repeater-wrapper) > .repeater-root > :hover :is(.iox-role-card, .iox-role-list-item), :is(.iox-role-list-fan, .iox-role-list-fan-stack, .iox-role-list-fan > .repeater-wrapper, .iox-role-list-fan-stack > .repeater-wrapper) > .repeater-root > :is(.iox-role-card, .iox-role-list-item):hover, :is(.iox-role-list-tilted, .iox-role-list-tilted-two, .iox-role-list-tilted > .repeater-wrapper, .iox-role-list-tilted-two > .repeater-wrapper) > .repeater-root > :hover :is(.iox-role-card, .iox-role-list-item), :is(.iox-role-list-tilted, .iox-role-list-tilted-two, .iox-role-list-tilted > .repeater-wrapper, .iox-role-list-tilted-two > .repeater-wrapper) > .repeater-root > :is(.iox-role-card, .iox-role-list-item):hover { transform: none !important; }
|
|
1827
|
+
.iox-list-hover-unveil :is(.iox-role-card, .iox-role-list-item):hover .iox-role-list-second { opacity: 1; }
|
|
1828
|
+
}
|
|
1785
1829
|
}
|
|
1786
1830
|
|
|
1787
1831
|
/* ── The floating family (premium components M5 — N3 toast · N4 tooltip and popover) ──────────────────────────────
|