@vectoriox/iox-builder 10.1.2 → 11.0.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.
@@ -2721,14 +2721,6 @@ function defaultPageSettings() {
2721
2721
  textColor: '#000000',
2722
2722
  maxWidth: '1440px',
2723
2723
  },
2724
- scroll: {
2725
- enabled: true,
2726
- lerp: 0.1,
2727
- wheelMultiplier: 1,
2728
- touchMultiplier: 1,
2729
- direction: 'vertical',
2730
- infinite: false,
2731
- },
2732
2724
  routeAnimation: {
2733
2725
  enter: 'fade',
2734
2726
  leave: 'fade',
@@ -8863,6 +8855,12 @@ function pickInherited(css) {
8863
8855
  out[prop] = css[prop];
8864
8856
  return out;
8865
8857
  }
8858
+ /**
8859
+ * The editor canvas's own scroller — an editing surface, not the site: it never follows the look's
8860
+ * Scrolling choice (that plays on the live site and in Preview, `planScroll`). These were the
8861
+ * Page ▸ Smooth Scroll defaults the canvas read before that panel was deleted (MO-D2).
8862
+ */
8863
+ const EDITOR_CANVAS_SCROLL = { lerp: 0.1, wheelMultiplier: 1, touchMultiplier: 1, orientation: 'vertical', infinite: false };
8866
8864
  class BuilderComponent {
8867
8865
  /** The overlay's BEFORE wrapper comes and goes with its globals; its block size is the page's top reserve. */
8868
8866
  set globalsBeforeRef(ref) {
@@ -9410,9 +9408,6 @@ class BuilderComponent {
9410
9408
  }
9411
9409
  ngOnChanges(changes) {
9412
9410
  if (changes['pageSettings']) {
9413
- // Reinit Lenis with updated scroll options (lerp, wheelMultiplier, etc.)
9414
- // so the builder preview reflects the live-page scroll feel in real time.
9415
- this.initLenis();
9416
9411
  // Background / typography: until this existed the Page panel wrote a background
9417
9412
  // that only appeared once the site was published.
9418
9413
  this.pageStyleCss = compilePageStyle(this.pageSettings?.style, { designSystem: this.pageSettings?.designSystem === true });
@@ -9604,16 +9599,11 @@ class BuilderComponent {
9604
9599
  this.destroyLenis();
9605
9600
  if (!this.previewScrollRef?.nativeElement || !this.lenisContentRef?.nativeElement)
9606
9601
  return;
9607
- const s = this.pageSettings?.scroll;
9608
9602
  this.lenis = new Lenis({
9603
+ ...EDITOR_CANVAS_SCROLL,
9609
9604
  wrapper: this.previewScrollRef.nativeElement,
9610
9605
  content: this.lenisContentRef.nativeElement,
9611
9606
  eventsTarget: this.previewScrollRef.nativeElement,
9612
- lerp: s?.lerp ?? 0.1,
9613
- wheelMultiplier: s?.wheelMultiplier ?? 1,
9614
- touchMultiplier: s?.touchMultiplier ?? 1,
9615
- orientation: s?.direction ?? 'vertical',
9616
- infinite: s?.infinite ?? false,
9617
9607
  autoResize: false, // we drive resize() manually via canvasRo + viewportSub
9618
9608
  });
9619
9609
  this.lenis.on('scroll', (instance) => {