@vectoriox/iox-ui 5.167.0 → 5.168.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.
@@ -8490,12 +8490,7 @@ declare const SPEC_SITE_LAYOUT: {
8490
8490
  readonly "art.none": "בלי תמונה";
8491
8491
  readonly "art.picture": "התמונה של העסק בתחילת הכרטיס";
8492
8492
  };
8493
- readonly waits: {
8494
- readonly "arrive.leaving": {
8495
- readonly phase: "PU2b";
8496
- readonly drawnAs: "time";
8497
- };
8498
- };
8493
+ readonly waits: {};
8499
8494
  readonly defaults: {
8500
8495
  readonly kind: "offer";
8501
8496
  readonly form: "corner";
package/index.d.ts CHANGED
@@ -5047,6 +5047,7 @@ declare class PopupRuntime {
5047
5047
  private scrollY;
5048
5048
  private listen;
5049
5049
  private onScroll;
5050
+ private onMouseOut;
5050
5051
  private onKey;
5051
5052
  private tick;
5052
5053
  private defaultOverlayState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "5.167.0",
3
+ "version": "5.168.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -114,6 +114,8 @@ export enum ArrivalTrigger {
114
114
  Scroll = 'scroll',
115
115
  Time = 'time',
116
116
  ScrollOrTime = 'scrollOrTime',
117
+ /** PU2b: a laptop's mouse leaves through the top of the window, after `seconds` on the page. */
118
+ Leaving = 'leaving',
117
119
  Never = 'never',
118
120
  }
119
121
 
@@ -137,6 +139,9 @@ export interface ArrivalProgress {
137
139
  pageHeight: number;
138
140
  /** Seconds the tab was visible since the turn started. */
139
141
  visibleSeconds: number;
142
+ /** PU2b: the visible seconds at the visitor's LATEST exit through the top of the window (a fine pointer's), or none.
143
+ * An exit before the planned seconds does not count; the next one after them does. */
144
+ leftTopAtSeconds?: number | null;
140
145
  }
141
146
 
142
147
  export interface ArrivalEnv {
@@ -151,9 +156,10 @@ const num = (v: unknown): number | null => {
151
156
 
152
157
  /**
153
158
  * A popup's arrival from its traits (PU-D5): its kind's defaults where a trait is unset; `time` never under 3 s; `leaving`
154
- * — until PU2b draws it — and on a phone always, arrives by time (`phoneLeavingSeconds`); `button` never arrives by itself.
159
+ * reads a laptop's mouse leaving through the top after `leavingAfterSeconds` (PU2b) — anything without a fine pointer has
160
+ * no honest leaving signal and gets the time instead (`phoneLeavingSeconds`); `button` never arrives by itself.
155
161
  */
156
- export function planPopupArrival(get: (name: string) => unknown, _env: ArrivalEnv): ArrivalPlan {
162
+ export function planPopupArrival(get: (name: string) => unknown, env: ArrivalEnv): ArrivalPlan {
157
163
  const kind = (Object.values(PopupKind) as string[]).includes(String(get(PopupTrait.Kind))) ? get(PopupTrait.Kind) as PopupKind : PopupKind.Offer;
158
164
  const defaults = POPUP_KIND_ARRIVAL[kind];
159
165
  const asked = String(get(PopupTrait.Arrive) ?? '');
@@ -165,8 +171,10 @@ export function planPopupArrival(get: (name: string) => unknown, _env: ArrivalEn
165
171
  case PopupArrive.Button: return { trigger: ArrivalTrigger.Never, screens: null, pageShare: null, seconds: null };
166
172
  case PopupArrive.Scroll: return { trigger: ArrivalTrigger.Scroll, screens, pageShare, seconds: null };
167
173
  case PopupArrive.Time: return { trigger: ArrivalTrigger.Time, screens: null, pageShare: null, seconds: seconds(POPUP_RULES.timeSeconds) };
168
- // PU2b draws `leaving` for a fine pointer; until then — and on a phone, always — it arrives by time.
169
- case PopupArrive.Leaving: return { trigger: ArrivalTrigger.Time, screens: null, pageShare: null, seconds: Math.max(POPUP_RULES.minSeconds, POPUP_RULES.phoneLeavingSeconds) };
174
+ // A phone (any coarse pointer) never reads leaving — no Back-button trap, no scroll-up guess: it arrives by time.
175
+ case PopupArrive.Leaving: return env.finePointer
176
+ ? { trigger: ArrivalTrigger.Leaving, screens: null, pageShare: null, seconds: Math.max(POPUP_RULES.minSeconds, POPUP_RULES.leavingAfterSeconds) }
177
+ : { trigger: ArrivalTrigger.Time, screens: null, pageShare: null, seconds: Math.max(POPUP_RULES.minSeconds, POPUP_RULES.phoneLeavingSeconds) };
170
178
  default: return { trigger: ArrivalTrigger.ScrollOrTime, screens, pageShare, seconds: seconds(POPUP_RULES.timeSeconds) };
171
179
  }
172
180
  }
@@ -194,6 +202,7 @@ export function arrivalFired(plan: ArrivalPlan, p: ArrivalProgress): boolean {
194
202
  case ArrivalTrigger.Never: return false;
195
203
  case ArrivalTrigger.Scroll: return scrolledEnough(plan, p);
196
204
  case ArrivalTrigger.Time: return p.visibleSeconds >= (plan.seconds ?? Infinity);
205
+ case ArrivalTrigger.Leaving: return p.leftTopAtSeconds != null && p.leftTopAtSeconds >= (plan.seconds ?? Infinity);
197
206
  default: return scrolledEnough(plan, p) || p.visibleSeconds >= (plan.seconds ?? Infinity);
198
207
  }
199
208
  }
@@ -10814,12 +10814,7 @@ export const SPEC_SITE_LAYOUT = {
10814
10814
  "art.none": "בלי תמונה",
10815
10815
  "art.picture": "התמונה של העסק בתחילת הכרטיס"
10816
10816
  },
10817
- "waits": {
10818
- "arrive.leaving": {
10819
- "phase": "PU2b",
10820
- "drawnAs": "time"
10821
- }
10822
- },
10817
+ "waits": {},
10823
10818
  "defaults": {
10824
10819
  "kind": "offer",
10825
10820
  "form": "corner",