@vectoriox/iox-ui 5.88.0 → 5.89.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.
@@ -708,6 +708,17 @@ const PARALLAX_DEPTH_DEFAULT = ParallaxDepth.Back;
708
708
  const PARALLAX_SPEED = 0.3;
709
709
  /** A phone's layers move half as far: on a narrow stack a glide reaches the next block sooner (round three's phone rule). */
710
710
  const PARALLAX_PHONE_FACTOR = 0.5;
711
+ /** What a depth does on a phone (its action's `params.phone`). */
712
+ var ParallaxPhone;
713
+ (function (ParallaxPhone) {
714
+ /** Half as far (round three's phone rule; a depth with no `phone` param). */
715
+ ParallaxPhone["Half"] = "half";
716
+ /** Still: a layer that stacks with its neighbours on a phone never glides into them (round four, CL2 layers). */
717
+ ParallaxPhone["Rest"] = "rest";
718
+ })(ParallaxPhone || (ParallaxPhone = {}));
719
+ function normalizeParallaxPhone(value) {
720
+ return value === ParallaxPhone.Rest ? ParallaxPhone.Rest : ParallaxPhone.Half;
721
+ }
711
722
  function normalizeParallaxDepth(value) {
712
723
  return value === ParallaxDepth.Front ? ParallaxDepth.Front : PARALLAX_DEPTH_DEFAULT;
713
724
  }
@@ -717,6 +728,8 @@ function normalizeParallaxDepth(value) {
717
728
  * a tall layer never slides a screen away from what it belongs to.
718
729
  */
719
730
  function parallaxShift(distance, viewHeight, options = {}) {
731
+ if (options.phone && options.onPhone === ParallaxPhone.Rest)
732
+ return 0;
720
733
  const speed = PARALLAX_SPEED * (options.phone ? PARALLAX_PHONE_FACTOR : 1);
721
734
  const shift = speed * Math.min(Math.max(0, distance) / 2, Math.max(0, viewHeight));
722
735
  return Math.round(shift * 10) / 10;
@@ -1393,5 +1406,5 @@ function attachSceneRoots(roots, options = {}) {
1393
1406
  * Generated bundle index. Do not edit.
1394
1407
  */
1395
1408
 
1396
- export { LIGHT_UP_PIECE_CAP, PARALLAX_DEPTH_DEFAULT, PARALLAX_PHONE_FACTOR, PARALLAX_SPEED, PROGRESS_BAR_FRAMES, ParallaxDepth, REVEAL_PIECE_CAP, SCENE_BUDGET, SCENE_DAMPING, SCENE_FILM_SMOOTH, SCENE_FLOW_RULES, SCENE_LENGTH, SCENE_MAX_SCREENS, SCENE_MIN_SCREENS, SCENE_PHONE_LENGTH, SCENE_PHONE_MAX_WIDTH, SCENE_REDUCED_MOTION_CSS, SCENE_REVEAL_DEFAULT, SCENE_STAGE_HEIGHT, SCENE_TRACK_DEFS, SCENE_WAKE_EVENT, SCENE_WORDS, SCENE_WORD_DIM, SCROLL_RANGE_DEFAULT, SLIDER_HOLD_SHARE, SLIDER_SCROLL_STEP_SCREENS, SceneAttribute, SceneProp, SceneRevealFrom, ScrollActionKind, ScrollDriver, ScrollPlay, ScrollRange, TextRevealBy, applySceneFirstFrame, attachSceneRoots, attachScenes, buildSceneRecipe, colourAt, dampToward, gentleFrames, heldProgress, layoutBoxOnScreen, lightMotionWanted, lineIndexes, movedSceneKey, normalizeParallaxDepth, normalizeScrollRange, normalizeTracks, outermostNodeOf, parallaxFrames, parallaxShift, playTextReveal, rangeDistance, rangeEnds, rangeProgress, revealClipPath, revealStagger, sceneBudget, sceneColourKeyAt, sceneDisplayValue, sceneFilmDensity, sceneFirstFrame, sceneFrame, sceneFrameDeclarations, sceneHasKeyAt, sceneHeightForScreens, sceneKeyPosition, sceneLayersOf, sceneNodeAttributes, scenePlayed, sceneRevealFromOf, sceneRootOnPath, sceneRootsIn, sceneScreensOf, sceneScrollState, sceneTrackDef, sceneTrackSpan, sceneWordOpacity, sceneWordsLit, scenesIn, scrollPlayFor, splitText, syncSceneAttributes, textPieces, valueAt, withSceneKey, withScenePlayback, withSceneRevealFrom, withoutSceneKey, withoutScenePlayback };
1409
+ export { LIGHT_UP_PIECE_CAP, PARALLAX_DEPTH_DEFAULT, PARALLAX_PHONE_FACTOR, PARALLAX_SPEED, PROGRESS_BAR_FRAMES, ParallaxDepth, ParallaxPhone, REVEAL_PIECE_CAP, SCENE_BUDGET, SCENE_DAMPING, SCENE_FILM_SMOOTH, SCENE_FLOW_RULES, SCENE_LENGTH, SCENE_MAX_SCREENS, SCENE_MIN_SCREENS, SCENE_PHONE_LENGTH, SCENE_PHONE_MAX_WIDTH, SCENE_REDUCED_MOTION_CSS, SCENE_REVEAL_DEFAULT, SCENE_STAGE_HEIGHT, SCENE_TRACK_DEFS, SCENE_WAKE_EVENT, SCENE_WORDS, SCENE_WORD_DIM, SCROLL_RANGE_DEFAULT, SLIDER_HOLD_SHARE, SLIDER_SCROLL_STEP_SCREENS, SceneAttribute, SceneProp, SceneRevealFrom, ScrollActionKind, ScrollDriver, ScrollPlay, ScrollRange, TextRevealBy, applySceneFirstFrame, attachSceneRoots, attachScenes, buildSceneRecipe, colourAt, dampToward, gentleFrames, heldProgress, layoutBoxOnScreen, lightMotionWanted, lineIndexes, movedSceneKey, normalizeParallaxDepth, normalizeParallaxPhone, normalizeScrollRange, normalizeTracks, outermostNodeOf, parallaxFrames, parallaxShift, playTextReveal, rangeDistance, rangeEnds, rangeProgress, revealClipPath, revealStagger, sceneBudget, sceneColourKeyAt, sceneDisplayValue, sceneFilmDensity, sceneFirstFrame, sceneFrame, sceneFrameDeclarations, sceneHasKeyAt, sceneHeightForScreens, sceneKeyPosition, sceneLayersOf, sceneNodeAttributes, scenePlayed, sceneRevealFromOf, sceneRootOnPath, sceneRootsIn, sceneScreensOf, sceneScrollState, sceneTrackDef, sceneTrackSpan, sceneWordOpacity, sceneWordsLit, scenesIn, scrollPlayFor, splitText, syncSceneAttributes, textPieces, valueAt, withSceneKey, withScenePlayback, withSceneRevealFrom, withoutSceneKey, withoutScenePlayback };
1397
1410
  //# sourceMappingURL=vectoriox-iox-ui-scene-core.mjs.map