@vectoriox/iox-ui 5.105.0 → 5.105.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "5.105.0",
3
+ "version": "5.105.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -101,7 +101,37 @@ function inkScoped(values: Values, styleId: string): Values {
101
101
  }
102
102
 
103
103
  /** Every pair a reader meets, for one set of token rows in one mode. */
104
+ /** How many looks the contrast audit remembers (a studio has one; a picker comparing looks a handful). */
105
+ export const CONTRAST_AUDIT_MEMORY = 8;
106
+ const remembered = new Map<string, ContrastFinding[]>();
107
+
108
+ /** What the audit reads of a look: each row's name and values, in order (a row's type or source changes nothing). */
109
+ function lookKey(rows: ReadonlyArray<DesignTokenLike>, mode: ResolvedMode): string {
110
+ let key = mode;
111
+ for (const row of rows) key += `\u0002${row.name}\u0001${row.value}\u0001${row.values?.dark ?? ''}`;
112
+ return key;
113
+ }
114
+
115
+ /**
116
+ * Every element style × scheme × container judged for contrast in one mode. The sweep costs about a second of CPU on a
117
+ * small server (≈ 1.1–1.4 s on a studio's 500m pod) and depends only on the look, so an unchanged look is answered from
118
+ * memory: the Publishable gate asked it on every Publish click and a studio's whole server waited (u2rockband,
119
+ * 2026-11-18). Each caller gets its own array.
120
+ */
104
121
  export function auditDesignContrast(rows: ReadonlyArray<DesignTokenLike>, mode: ResolvedMode): ContrastFinding[] {
122
+ const key = lookKey(rows, mode);
123
+ let findings = remembered.get(key);
124
+ if (findings) {
125
+ remembered.delete(key);
126
+ } else {
127
+ findings = sweepDesignContrast(rows, mode);
128
+ if (remembered.size >= CONTRAST_AUDIT_MEMORY) remembered.delete(remembered.keys().next().value as string);
129
+ }
130
+ remembered.set(key, findings);
131
+ return findings.map(f => ({ ...f }));
132
+ }
133
+
134
+ function sweepDesignContrast(rows: ReadonlyArray<DesignTokenLike>, mode: ResolvedMode): ContrastFinding[] {
105
135
  const findings: ContrastFinding[] = [];
106
136
  const styles = ELEMENT_STYLES;
107
137
  const byId = new Map(styles.map(e => [e.id, e]));
@@ -678,6 +678,15 @@ span.iox-video__play { pointer-events: none; }
678
678
  .swiper:has(> .iox-role-slider-bar) > .iox-role-slider-bar {
679
679
  flex-shrink: 0;
680
680
  }
681
+ /* A horizontal slider clips SIDEWAYS only: Swiper's `overflow: hidden` on the root also cut, at the root's bottom edge,
682
+ what the bar's arrows paint outside their box — a look's offset shadow (Pop: 4px 4px) and the focus ring. The
683
+ picture track keeps the vertical clip, so a slide taller than its track still never spills over the bar. */
684
+ .swiper-horizontal:has(> .iox-role-slider-bar) {
685
+ overflow: clip visible;
686
+ }
687
+ .swiper-horizontal:has(> .iox-role-slider-bar) > .swiper-wrapper {
688
+ overflow: visible clip;
689
+ }
681
690
  /* Their words are the slide in view's, written by the runtime as an attribute (composite-core attachSliderBar). */
682
691
  :is(.iox-role-slider-caption, .iox-role-slider-count)::before {
683
692
  content: attr(data-iox-text);