@vectoriox/iox-builder 11.10.3 → 11.11.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.
@@ -32,7 +32,7 @@ import Lenis from 'lenis';
32
32
  import Moveable from 'moveable';
33
33
  import Selecto from 'selecto';
34
34
  import * as i18 from 'primeng/api';
35
- import { planVideo, VideoSource, VIDEO_PROVIDER_LABEL, VideoTrait, VideoMode } from '@vectoriox/iox-ui/media-core';
35
+ import { planVideo, VideoKind, VideoSource, VIDEO_PROVIDER_LABEL, VideoTrait, VideoMode } from '@vectoriox/iox-ui/media-core';
36
36
  import { ConsentCategory } from '@vectoriox/iox-ui/consent-core';
37
37
 
38
38
  /**
@@ -105,6 +105,7 @@ const BUILDER_CHROME_EN = Object.freeze({
105
105
  'builder.chrome.kindSlider': 'Slider',
106
106
  'builder.chrome.kindVideo': 'Video',
107
107
  'builder.chrome.videoPosterOnly': 'poster only',
108
+ 'builder.chrome.videoFrames': 'played by the scroll',
108
109
  'builder.chrome.videoFile': 'Uploaded file',
109
110
  'builder.chrome.refuseLockedSliderPartMove': 'This control belongs to its slider — it can’t be moved out.',
110
111
  'builder.chrome.refuseLockedSliderPause': 'The pause button stays while Autoplay is on — moving content must be pausable. Turn Autoplay off in the slider’s Bindings to remove it.',
@@ -5360,6 +5361,18 @@ class SceneCanvasService {
5360
5361
  if (el)
5361
5362
  this.driver?.reread(el);
5362
5363
  }
5364
+ /**
5365
+ * A value a layer's own component draws changed (a Video's pictures): its instance takes it now. Its Scene reads the new
5366
+ * attribute when it lands, with no re-render of the page.
5367
+ */
5368
+ setLayerInput(node, name, value) {
5369
+ const ref = this.overlay?.getNodeRef(node) ?? (node.id ? this.overlay?.findRefByNodeId(node.id)?.ref : undefined);
5370
+ const component = ref?.componentRef;
5371
+ if (!component?.instance)
5372
+ return;
5373
+ component.instance[name] = value;
5374
+ component.changeDetectorRef.detectChanges();
5375
+ }
5363
5376
  ngOnDestroy() {
5364
5377
  this.driver?.destroy();
5365
5378
  this.driver = null;
@@ -7854,6 +7867,7 @@ const VIDEO_TYPE = 'Video';
7854
7867
  const VIDEO_KIND_KEY = 'builder.chrome.kindVideo';
7855
7868
  const VIDEO_POSTER_ONLY_KEY = 'builder.chrome.videoPosterOnly';
7856
7869
  const VIDEO_FILE_KEY = 'builder.chrome.videoFile';
7870
+ const VIDEO_FRAMES_KEY = 'builder.chrome.videoFrames';
7857
7871
  /** The parts that offer "Add item" on the selection toolbar (board 3: the "Add slide" pattern). */
7858
7872
  const ADD_ITEM_ROLES = new Set([
7859
7873
  AccordionRole.Accordion, AccordionRole.Item, AccordionRole.Trigger, AccordionRole.Panel,
@@ -8113,6 +8127,9 @@ class OverlayComponent {
8113
8127
  }
8114
8128
  videoBadge(node) {
8115
8129
  const plan = planVideo(node, null);
8130
+ // Unlike every other Video, the canvas really plays this one.
8131
+ if (plan.kind === VideoKind.Frames)
8132
+ return `${this.builderLabels(VIDEO_KIND_KEY, BUILDER_CHROME_EN[VIDEO_KIND_KEY])} · ${this.builderLabels(VIDEO_FRAMES_KEY, BUILDER_CHROME_EN[VIDEO_FRAMES_KEY])}`;
8116
8133
  const where = plan.source === VideoSource.File
8117
8134
  ? this.builderLabels(VIDEO_FILE_KEY, BUILDER_CHROME_EN[VIDEO_FILE_KEY])
8118
8135
  : VIDEO_PROVIDER_LABEL[plan.source];
@@ -14074,6 +14091,8 @@ class VideoConfig extends ComponentConfig {
14074
14091
  ], VideoSource.YouTube),
14075
14092
  new TraitConfig(VideoTrait.Src, 'Video address', TraitInputType.Media, { mode: 'compact' }, ''),
14076
14093
  new TraitConfig(VideoTrait.Poster, 'Poster', TraitInputType.Media, { mode: 'compact' }, ''),
14094
+ // Pictures the scroll plays (SC4): the Scene group writes it, so the Bindings panel lists no control for it.
14095
+ new TraitConfig(VideoTrait.Frames, 'Frames', TraitInputType.Text, undefined, null),
14077
14096
  // ── Behaviour ─────────────────────────────────────────────────
14078
14097
  new TraitConfig('__behaviourLabel', 'Behaviour', TraitInputType.SectionLabel),
14079
14098
  new TraitConfig(VideoTrait.Mode, 'Mode', TraitInputType.Select, [