@vectoriox/iox-ui 5.73.0 → 5.73.3

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/index.d.ts CHANGED
@@ -957,6 +957,12 @@ declare class IoxVideoComponent implements AfterViewInit, OnDestroy {
957
957
  set frames(v: unknown);
958
958
  get frames(): unknown;
959
959
  private root?;
960
+ /**
961
+ * A Video the scroll plays usually fills its stage with height: 100%, which is a percent of this host. The host stays a
962
+ * box, because a node's width and margin live on it, so it passes the height down. Where a Scene flows, 100% of an
963
+ * auto stage is auto. An ordinary Video keeps its own height, so what stands beside it stays put.
964
+ */
965
+ get hostHeight(): string | null;
960
966
  plan: VideoPlan;
961
967
  attrs: Record<string, string>;
962
968
  html: SafeHtml;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "5.73.0",
3
+ "version": "5.73.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -130,7 +130,7 @@ declare function applySceneFirstFrame(el: HTMLElement | null | undefined, node:
130
130
  */
131
131
  declare const SCENE_FLOW_RULES: string;
132
132
  /** Under reduced motion the driver never starts, so the same rules hold for the whole visit. */
133
- declare const SCENE_REDUCED_MOTION_CSS = "@media (prefers-reduced-motion: reduce){.iox-role-scene{height:auto!important}.iox-role-scene-stage{position:relative!important;top:auto!important;height:auto!important;overflow:visible!important;container-type:normal!important}[data-iox-tracks]{transform:none!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important}}";
133
+ declare const SCENE_REDUCED_MOTION_CSS = "@media (prefers-reduced-motion: reduce){.iox-role-scene{height:auto!important}.iox-role-scene-stage{position:relative!important;top:auto!important;height:auto!important;overflow:visible!important;container-type:normal!important}[data-iox-tracks]{transform:none!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important}[data-iox-video-frames]{height:auto!important}[data-iox-video-frames]>.iox-video__poster{position:static!important;height:auto!important}}";
134
134
 
135
135
  declare function sceneKeyPosition(p: number): number;
136
136
  interface SceneTrackDef {
@@ -437,8 +437,11 @@ export function videoInnerHtml(plan: VideoPlan, options: VideoMarkupOptions): st
437
437
  // The same on the canvas and on the site: the first picture is real content, so it is fetched at once, named, and the
438
438
  // size a phone needs. A driver's canvas covers it when pictures arrive; with no script it is what there is.
439
439
  if (plan.kind === VideoKind.Frames) {
440
- const srcset = plan.frames && !isAuthoredPoster(plan) ? phoneFrameSrcset(plan.frames) : '';
441
- return `<img class="${VideoClass.Poster}" src="${esc(plan.poster)}"${srcset ? ` srcset="${esc(srcset)}" sizes="100vw"` : ''} alt="${esc(plan.title)}" decoding="async">`;
440
+ const own = !!plan.frames && !isAuthoredPoster(plan);
441
+ const srcset = own ? phoneFrameSrcset(plan.frames!) : '';
442
+ // Its real size, so where a Scene flows (reduced motion, no script) the picture holds its height before it loads.
443
+ const size = own ? ` width="${plan.frames!.wide.width}" height="${plan.frames!.wide.height}"` : '';
444
+ return `<img class="${VideoClass.Poster}" src="${esc(plan.poster)}"${srcset ? ` srcset="${esc(srcset)}" sizes="100vw"` : ''}${size} alt="${esc(plan.title)}" decoding="async">`;
442
445
  }
443
446
  const poster = plan.poster ? `<img class="${VideoClass.Poster}" src="${esc(plan.poster)}" alt="" loading="lazy" decoding="async">` : '';
444
447
  const label = esc(videoPlayLabel(plan, words));
@@ -1,4 +1,5 @@
1
1
  import { SceneRole } from '@vectoriox/iox-ui/composite-core';
2
+ import { VideoAttribute, VideoClass } from '@vectoriox/iox-ui/media-core';
2
3
 
3
4
  /**
4
5
  * A Scene's data and maths (premium-sites plan §5b). A Scene is a recipe of ordinary nodes — a tall Section, a pinned
@@ -303,7 +304,10 @@ export function applySceneFirstFrame(el: HTMLElement | null | undefined, node: S
303
304
  */
304
305
  export const SCENE_FLOW_RULES = `.iox-role-scene{height:auto!important}`
305
306
  + `.iox-role-scene-stage{position:relative!important;top:auto!important;height:auto!important;overflow:visible!important;container-type:normal!important}`
306
- + `[${SceneAttribute.Tracks}]{transform:none!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important}`;
307
+ + `[${SceneAttribute.Tracks}]{transform:none!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important}`
308
+ // A Video the scroll plays stands as its poster, at the poster's own height: a percent of a stage that now flows is nothing.
309
+ + `[${VideoAttribute.Frames}]{height:auto!important}`
310
+ + `[${VideoAttribute.Frames}]>.${VideoClass.Poster}{position:static!important;height:auto!important}`;
307
311
 
308
312
  /** Under reduced motion the driver never starts, so the same rules hold for the whole visit. */
309
313
  export const SCENE_REDUCED_MOTION_CSS = `@media (prefers-reduced-motion: reduce){${SCENE_FLOW_RULES}}`;