@innovastudio/contentbox 1.6.197 → 1.6.198

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,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@innovastudio/contentbox",
4
- "version": "1.6.197",
4
+ "version": "1.6.198",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "types": "index.d.ts",
@@ -67,7 +67,7 @@
67
67
  "ws": "^8.13.0"
68
68
  },
69
69
  "dependencies": {
70
- "@innovastudio/contentbuilder": "^1.5.215",
70
+ "@innovastudio/contentbuilder": "^1.5.216",
71
71
  "js-beautify": "^1.14.0",
72
72
  "marked": "^17.0.0",
73
73
  "sortablejs": "^1.15.2"
@@ -25956,9 +25956,11 @@ function convertSection(section, win) {
25956
25956
  if (isLegacyAttr(a.name)) el.removeAttribute(a.name);
25957
25957
  });
25958
25958
  LEGACY_CLASSES.forEach(c => el.classList && el.classList.remove(c));
25959
- byPct.forEach(f => el.setAttribute(`data-fx-${f.pct}`, toFxValue(f.props)));
25960
- el.setAttribute('data-fx-ease', 'linear'); // skrollrr interpolates linearly
25959
+ byPct.forEach(f => el.setAttribute(`data-fx-${f.pct}`, toFxValue(f.props))); // Linear is correct: lax interpolated linearly (it only eases when
25960
+ // options.easing is passed, and skrollrr never passed it). Legacy's
25961
+ // visible softness was NOT keyframe easing — see the scrub note below.
25961
25962
 
25963
+ el.setAttribute('data-fx-ease', 'linear');
25962
25964
  el.style.transform = '';
25963
25965
  el.style.opacity = '';
25964
25966
  });
@@ -25985,10 +25987,24 @@ function convertSection(section, win) {
25985
25987
  } else {
25986
25988
  // legacy anchors span in -> out, i.e. the whole crossing
25987
25989
  section.setAttribute('data-fx-end', 'bottom top');
25988
- } // ~0.1s matches the old CSS 'transition: all .3s ease-out' softness
25990
+ }
25991
+ /* Legacy's smoothness came from `transition: all .3s ease-out` on each
25992
+ * element — a TIME lag on top of linear keyframes, not a keyframe shape.
25993
+ * The scrub is the Motion equivalent, so it carries that lag across.
25994
+ *
25995
+ * 0.1 was the original guess and it is about HALF the real softness:
25996
+ * kinetra's scrub advances by dt/scrub per frame (kinetra.js ~965), so at
25997
+ * 60fps scrub=0.1 gives a per-frame gain of ~0.167, while a 0.3s ease-out
25998
+ * restarted each frame gives ~0.086 — which corresponds to scrub ~0.19.
25999
+ * Converted sections rendered with 0.1 start and stop noticeably abruptly.
26000
+ *
26001
+ * The same wrong constant was in the runtime's legacy path; it was fixed
26002
+ * there by restoring the CSS transition outright (skrollrr-kinetra.js,
26003
+ * `animationTransition`). Converted content has no legacy attributes left,
26004
+ * so the scrub is the only lever here — 0.2 is the matching value. */
25989
26005
 
25990
26006
 
25991
- section.setAttribute('data-fx-scrub', hardScrub ? '0' : '0.1');
26007
+ section.setAttribute('data-fx-scrub', hardScrub ? '0' : '0.4');
25992
26008
  return {
25993
26009
  converted: plans.length,
25994
26010
  droppedVariants,
@@ -44954,6 +44970,17 @@ class Util$1 {
44954
44970
  hidePops() {
44955
44971
  const dom = this.dom;
44956
44972
  const builderStuff = this.builder.builderStuff;
44973
+
44974
+ /* Fast path. This runs on every scroll event (see the window 'scroll'
44975
+ * handler in contentbuilder.js — its 10ms debounce is shorter than the
44976
+ * ~16ms gap between scroll events, so it does not coalesce them), which
44977
+ * meant two full querySelectorAll sweeps plus their loops ~60x/second
44978
+ * even with nothing open. When nothing is showing, the loops below are
44979
+ * no-ops, so skip straight to the image handles. */
44980
+ if (!builderStuff.querySelector('.is-tool.active, .is-tool[style*="display"], .is-pop.active')) {
44981
+ if (this.builder.editingEngine) this.builder.editingEngine.hideImageHandles();
44982
+ return;
44983
+ }
44957
44984
  let tools = builderStuff.querySelectorAll('.is-tool');
44958
44985
  Array.prototype.forEach.call(tools, tool => {
44959
44986
  // if(tool.classList.contains('is-row-tool')||