@oxvo/ai-live-assist 7.5.29 → 7.5.32

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.
@@ -34,7 +34,7 @@ export declare const normalizeAiGuideOpenInput: (input?: AiGuideOpenInput) => Re
34
34
  export declare const resolveAiGuideProtocolVersion: (bootstrap: Pick<BootstrapConfig, "experienceMode" | "minimumProtocolVersion" | "protocol">) => 1 | 2;
35
35
  export default class AiLiveAssist {
36
36
  private readonly options;
37
- readonly version = "7.5.29";
37
+ readonly version = "7.5.32";
38
38
  private readonly host;
39
39
  private readonly guideAdmission;
40
40
  private readonly standaloneAdmissionPending;
package/cjs/context.d.ts CHANGED
@@ -43,6 +43,7 @@ export declare class PageContextCollector {
43
43
  private releasedNavigationSettlement;
44
44
  private navigationSettlementGeneration;
45
45
  private navigationSettlement;
46
+ private cancelNavigationRenderWait;
46
47
  private recentSelection;
47
48
  private latestSemanticSignature;
48
49
  constructor(callbacks: ContextCallbacks, selectorRegionRules?: SelectorRegionRule[], policyVersion?: number, trustedGuideRoot?: Element | null, statefulButtonActionProof?: boolean);
@@ -95,6 +96,7 @@ export declare class PageContextCollector {
95
96
  private readSafeSelection;
96
97
  private handleNavigation;
97
98
  private beginNavigationSettlement;
99
+ private waitForNavigationRender;
98
100
  private observeCausalNavigationAfterMutation;
99
101
  private reportCausalNavigationObservation;
100
102
  private resetBoundTargetIds;
package/cjs/context.js CHANGED
@@ -19,6 +19,7 @@ const SCROLL_SETTLEMENT_POSITION_TOLERANCE_PX = 1;
19
19
  const SCROLL_SETTLEMENT_STABLE_MS = 250;
20
20
  const MAX_SCROLL_LAYOUT_CORRECTIONS = 3;
21
21
  const RELEASED_NAVIGATION_SETTLEMENT_TIMEOUT_MS = 5000;
22
+ const NAVIGATION_RENDER_SETTLEMENT_TIMEOUT_MS = 2000;
22
23
  const FRAMER_GENERATED_PAGE_SELECTOR = '[data-framer-generated-page]';
23
24
  const FRAMER_TOGGLE_ROOT_SELECTOR = '[data-framer-name="Toggle"]';
24
25
  const FRAMER_TOGGLE_CONTROL_SELECTOR = 'div[name="Toggle Switch"][data-highlight="true"][tabindex]';
@@ -826,6 +827,7 @@ class PageContextCollector {
826
827
  this.releasedNavigationSettlement = null;
827
828
  this.navigationSettlementGeneration = 0;
828
829
  this.navigationSettlement = null;
830
+ this.cancelNavigationRenderWait = null;
829
831
  this.recentSelection = null;
830
832
  this.latestSemanticSignature = null;
831
833
  this.scheduleCapture = () => {
@@ -951,6 +953,10 @@ class PageContextCollector {
951
953
  this.reportCausalNavigationObservation();
952
954
  return;
953
955
  }
956
+ // A queued history notification for this same route must not supersede
957
+ // its causal action while we await the page's transition.
958
+ if (this.navigationSettlement?.url === currentUrl)
959
+ return;
954
960
  this.pageId = id('page');
955
961
  this.revision += 1;
956
962
  this.targets.clear();
@@ -970,7 +976,13 @@ class PageContextCollector {
970
976
  }
971
977
  const settlement = this.beginNavigationSettlement(this.pageId, this.revision, currentUrl);
972
978
  void Promise.resolve()
973
- .then(() => this.callbacks.onNavigation(settlement.pageId, settlement.revision, settlement.url))
979
+ .then(async () => {
980
+ if (typeof document.getAnimations === 'function')
981
+ await this.waitForNavigationRender(settlement);
982
+ if (!this.running || this.navigationSettlement !== settlement)
983
+ return false;
984
+ return this.callbacks.onNavigation(settlement.pageId, settlement.revision, settlement.url);
985
+ })
974
986
  .then((navigationAcknowledged) => {
975
987
  if (navigationAcknowledged === false ||
976
988
  !this.running ||
@@ -1090,6 +1102,7 @@ class PageContextCollector {
1090
1102
  this.deferredNavigation = null;
1091
1103
  this.releasedNavigation = null;
1092
1104
  this.finishReleasedNavigationSettlement('rejected');
1105
+ this.cancelNavigationRenderWait?.();
1093
1106
  this.navigationSettlementGeneration += 1;
1094
1107
  this.navigationSettlement = null;
1095
1108
  this.recentSelection = null;
@@ -1890,6 +1903,12 @@ class PageContextCollector {
1890
1903
  const settlement = navigation && this.running
1891
1904
  ? this.beginNavigationSettlement(navigation.pageId, Math.max(navigation.revision, this.revision), navigation.url)
1892
1905
  : null;
1906
+ if (settlement) {
1907
+ if (typeof document.getAnimations === 'function')
1908
+ await this.waitForNavigationRender(settlement);
1909
+ if (!this.running || this.navigationSettlement !== settlement)
1910
+ return null;
1911
+ }
1893
1912
  if (navigation && this.running) {
1894
1913
  try {
1895
1914
  navigationAcknowledged =
@@ -2511,6 +2530,7 @@ class PageContextCollector {
2511
2530
  };
2512
2531
  }
2513
2532
  beginNavigationSettlement(pageId, revision, url) {
2533
+ this.cancelNavigationRenderWait?.();
2514
2534
  const settlement = {
2515
2535
  generation: ++this.navigationSettlementGeneration,
2516
2536
  pageId,
@@ -2524,6 +2544,77 @@ class PageContextCollector {
2524
2544
  this.clearMutationCapture();
2525
2545
  return settlement;
2526
2546
  }
2547
+ waitForNavigationRender(settlement) {
2548
+ if (!this.running || this.navigationSettlement !== settlement ||
2549
+ typeof document.getAnimations !== 'function')
2550
+ return Promise.resolve();
2551
+ return new Promise(resolve => {
2552
+ let frame = null;
2553
+ let finished = false;
2554
+ const watched = new Map();
2555
+ const clearAnimations = () => {
2556
+ for (const [animation, listener] of watched) {
2557
+ animation.removeEventListener('finish', listener);
2558
+ animation.removeEventListener('cancel', listener);
2559
+ }
2560
+ watched.clear();
2561
+ };
2562
+ const finish = () => {
2563
+ if (finished)
2564
+ return;
2565
+ finished = true;
2566
+ clearTimeout(deadline);
2567
+ if (frame !== null)
2568
+ window.cancelAnimationFrame(frame);
2569
+ clearAnimations();
2570
+ if (this.cancelNavigationRenderWait === finish)
2571
+ this.cancelNavigationRenderWait = null;
2572
+ resolve();
2573
+ };
2574
+ const check = () => {
2575
+ frame = null;
2576
+ if (finished)
2577
+ return;
2578
+ if (!this.running || this.navigationSettlement !== settlement) {
2579
+ finish();
2580
+ return;
2581
+ }
2582
+ clearAnimations();
2583
+ const animations = document.getAnimations().filter(animation => {
2584
+ const effect = animation.effect;
2585
+ const target = effect && 'target' in effect && effect.target instanceof Element ? effect.target : null;
2586
+ const root = target?.getRootNode();
2587
+ const guideAnimation = target && (this.mutationNodeIsInsideTrustedGuide(target) ||
2588
+ root instanceof ShadowRoot && root.host === this.trustedGuideRoot);
2589
+ return (animation.playState === 'running' || animation.pending) &&
2590
+ effect && Number.isFinite(Number(effect.getComputedTiming().endTime)) &&
2591
+ !guideAnimation;
2592
+ });
2593
+ if (animations.length === 0) {
2594
+ finish();
2595
+ return;
2596
+ }
2597
+ for (const animation of animations) {
2598
+ const listener = () => { clearAnimations(); schedule(); };
2599
+ watched.set(animation, listener);
2600
+ animation.addEventListener('finish', listener);
2601
+ animation.addEventListener('cancel', listener);
2602
+ }
2603
+ };
2604
+ const schedule = () => {
2605
+ if (finished || frame !== null)
2606
+ return;
2607
+ // Let the router commit and paint before reading active transitions.
2608
+ // Await actual completion events, never poll or sleep a fixed duration.
2609
+ frame = window.requestAnimationFrame(() => {
2610
+ frame = window.requestAnimationFrame(check);
2611
+ });
2612
+ };
2613
+ const deadline = setTimeout(finish, NAVIGATION_RENDER_SETTLEMENT_TIMEOUT_MS);
2614
+ this.cancelNavigationRenderWait = finish;
2615
+ schedule();
2616
+ });
2617
+ }
2527
2618
  observeCausalNavigationAfterMutation(actionId, destinationPath, beforeActionUrl) {
2528
2619
  const currentUrl = safePageUrl();
2529
2620
  if (currentUrl === beforeActionUrl ||
@@ -0,0 +1,20 @@
1
+ /** Keep Guide launchers clear of Framer's visible attribution link. */
2
+ export declare class FramerBadgePlacement {
3
+ private readonly host;
4
+ private readonly intro;
5
+ private readonly panel;
6
+ private frame;
7
+ private offset;
8
+ private panelOffset;
9
+ private destroyed;
10
+ private badge;
11
+ private badgeLink;
12
+ private documentObserver;
13
+ private badgeObserver;
14
+ private introObserver;
15
+ private resizeObserver;
16
+ constructor(host: HTMLElement, intro: HTMLElement, panel: HTMLElement);
17
+ schedule: () => void;
18
+ private sync;
19
+ destroy(): void;
20
+ }
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FramerBadgePlacement = void 0;
4
+ const BADGE_ID = "__framer-badge-container";
5
+ const BADGE_GAP = 8;
6
+ const OFFSET_PROPERTY = "--intro-badge-bottom-offset";
7
+ const PANEL_OFFSET_PROPERTY = "--panel-badge-bottom-offset";
8
+ const SURFACES = ".intro-composer-frame, .status-card, .legal-trigger, .recording-consent";
9
+ /** Keep Guide launchers clear of Framer's visible attribution link. */
10
+ class FramerBadgePlacement {
11
+ constructor(host, intro, panel) {
12
+ this.host = host;
13
+ this.intro = intro;
14
+ this.panel = panel;
15
+ this.frame = null;
16
+ this.offset = 0;
17
+ this.panelOffset = 0;
18
+ this.destroyed = false;
19
+ this.badge = null;
20
+ this.badgeLink = null;
21
+ this.documentObserver = null;
22
+ this.badgeObserver = null;
23
+ this.introObserver = null;
24
+ this.resizeObserver = null;
25
+ this.schedule = () => {
26
+ if (this.destroyed || !this.documentObserver || this.frame !== null)
27
+ return;
28
+ this.frame = requestAnimationFrame(() => {
29
+ this.frame = null;
30
+ this.sync();
31
+ });
32
+ };
33
+ // Other platforms need neither a page observer nor a different placement.
34
+ if (!document.getElementById(BADGE_ID) &&
35
+ !document.querySelector('meta[name="generator"][content^="Framer"]')) {
36
+ return;
37
+ }
38
+ this.documentObserver = new MutationObserver(this.schedule);
39
+ this.documentObserver.observe(document.documentElement, {
40
+ childList: true,
41
+ subtree: true,
42
+ });
43
+ this.introObserver = new MutationObserver(this.schedule);
44
+ this.introObserver.observe(intro, {
45
+ attributes: true,
46
+ subtree: true,
47
+ attributeFilter: ["hidden", "data-anchor", "data-minimized"],
48
+ });
49
+ this.introObserver.observe(panel, {
50
+ attributes: true,
51
+ attributeFilter: ["class", "style", "hidden", "data-anchor"],
52
+ });
53
+ if (typeof ResizeObserver === "function") {
54
+ this.resizeObserver = new ResizeObserver(this.schedule);
55
+ this.resizeObserver.observe(intro);
56
+ this.resizeObserver.observe(panel);
57
+ intro.querySelectorAll(SURFACES).forEach((surface) => {
58
+ this.resizeObserver.observe(surface);
59
+ });
60
+ }
61
+ window.addEventListener("resize", this.schedule, { passive: true });
62
+ window.addEventListener("scroll", this.schedule, { passive: true });
63
+ window.visualViewport?.addEventListener("resize", this.schedule);
64
+ window.visualViewport?.addEventListener("scroll", this.schedule);
65
+ this.sync();
66
+ }
67
+ sync() {
68
+ const badge = document.getElementById(BADGE_ID);
69
+ if (badge !== this.badge) {
70
+ if (this.badge) {
71
+ this.resizeObserver?.unobserve(this.badge);
72
+ this.badge.removeEventListener("transitionend", this.schedule);
73
+ this.badge.removeEventListener("animationend", this.schedule);
74
+ }
75
+ this.badgeObserver?.disconnect();
76
+ this.badge = badge;
77
+ if (badge) {
78
+ badge.addEventListener("transitionend", this.schedule);
79
+ badge.addEventListener("animationend", this.schedule);
80
+ this.resizeObserver?.observe(badge);
81
+ this.badgeObserver = new MutationObserver(this.schedule);
82
+ this.badgeObserver.observe(badge, {
83
+ attributes: true,
84
+ subtree: true,
85
+ attributeFilter: ["class", "style", "hidden"],
86
+ });
87
+ }
88
+ }
89
+ // The container spans the whole viewport; only its link is an obstacle.
90
+ const link = badge?.querySelector("a[href]") ?? null;
91
+ if (link !== this.badgeLink) {
92
+ if (this.badgeLink)
93
+ this.resizeObserver?.unobserve(this.badgeLink);
94
+ this.badgeLink = link ?? null;
95
+ if (link)
96
+ this.resizeObserver?.observe(link);
97
+ }
98
+ let nextOffset = 0;
99
+ let nextPanelOffset = 0;
100
+ if (link) {
101
+ const style = getComputedStyle(link);
102
+ let transparent = false;
103
+ for (let element = link; element; element = element.parentElement) {
104
+ if (getComputedStyle(element).opacity === "0") {
105
+ transparent = true;
106
+ break;
107
+ }
108
+ if (element === badge)
109
+ break;
110
+ }
111
+ const obstacle = link.getBoundingClientRect();
112
+ if (!transparent &&
113
+ style.visibility !== "hidden" &&
114
+ style.display !== "none" &&
115
+ obstacle.width > 0 &&
116
+ obstacle.height > 0 &&
117
+ obstacle.bottom > 0 &&
118
+ obstacle.top < window.innerHeight &&
119
+ obstacle.right > 0 &&
120
+ obstacle.left < window.innerWidth) {
121
+ const requiredOffset = (surfaces, offset) => {
122
+ let result = 0;
123
+ for (const surface of surfaces) {
124
+ const rect = surface.getBoundingClientRect();
125
+ // Undo our previous shift when measuring, so repeated updates do not
126
+ // accumulate offsets or bounce between the shifted and base positions.
127
+ const top = rect.top + offset;
128
+ const bottom = rect.bottom + offset;
129
+ if (rect.width > 0 &&
130
+ rect.height > 0 &&
131
+ rect.left < obstacle.right + BADGE_GAP &&
132
+ rect.right > obstacle.left - BADGE_GAP &&
133
+ top < obstacle.bottom + BADGE_GAP &&
134
+ bottom > obstacle.top - BADGE_GAP) {
135
+ result = Math.max(result, Math.ceil(bottom - obstacle.top + BADGE_GAP));
136
+ }
137
+ }
138
+ return result;
139
+ };
140
+ if (!this.intro.hidden) {
141
+ nextOffset = requiredOffset(this.intro.querySelectorAll(SURFACES), this.offset);
142
+ }
143
+ // Keep explicitly dragged panels where the visitor put them. Expanded
144
+ // panels, including the mobile full-screen dialog, retain their layout.
145
+ if (this.panel.classList.contains("compact") && !this.panel.style.top) {
146
+ nextPanelOffset = requiredOffset([this.panel], this.panelOffset);
147
+ }
148
+ }
149
+ }
150
+ if (nextOffset !== this.offset) {
151
+ this.offset = nextOffset;
152
+ this.host.style.setProperty(OFFSET_PROPERTY, `${nextOffset}px`);
153
+ }
154
+ if (nextPanelOffset !== this.panelOffset) {
155
+ this.panelOffset = nextPanelOffset;
156
+ this.host.style.setProperty(PANEL_OFFSET_PROPERTY, `${nextPanelOffset}px`);
157
+ }
158
+ }
159
+ destroy() {
160
+ this.destroyed = true;
161
+ if (this.frame !== null)
162
+ cancelAnimationFrame(this.frame);
163
+ this.documentObserver?.disconnect();
164
+ this.badgeObserver?.disconnect();
165
+ this.badge?.removeEventListener("transitionend", this.schedule);
166
+ this.badge?.removeEventListener("animationend", this.schedule);
167
+ this.introObserver?.disconnect();
168
+ this.resizeObserver?.disconnect();
169
+ window.removeEventListener("resize", this.schedule);
170
+ window.removeEventListener("scroll", this.schedule);
171
+ window.visualViewport?.removeEventListener("resize", this.schedule);
172
+ window.visualViewport?.removeEventListener("scroll", this.schedule);
173
+ this.host.style.removeProperty(OFFSET_PROPERTY);
174
+ this.host.style.removeProperty(PANEL_OFFSET_PROPERTY);
175
+ }
176
+ }
177
+ exports.FramerBadgePlacement = FramerBadgePlacement;
@@ -1,5 +1,5 @@
1
1
  import type { GuideMeasurementBridge, GuideMeasurementIntent } from './guideTypes.js';
2
- export declare const GUIDE_MEASUREMENT_CLIENT_VERSION = "7.5.29";
2
+ export declare const GUIDE_MEASUREMENT_CLIENT_VERSION = "7.5.32";
3
3
  export declare function isGuideMeasurementIntent(value: unknown): value is GuideMeasurementIntent;
4
4
  /** The managed analytics owner supplies possession; this check grants no authority. */
5
5
  export declare function currentGuideMeasurementBridge(value: unknown): value is GuideMeasurementBridge;
@@ -4,7 +4,7 @@ exports.GUIDE_MEASUREMENT_CLIENT_VERSION = void 0;
4
4
  exports.isGuideMeasurementIntent = isGuideMeasurementIntent;
5
5
  exports.currentGuideMeasurementBridge = currentGuideMeasurementBridge;
6
6
  exports.prepareGuideMeasurementBridge = prepareGuideMeasurementBridge;
7
- exports.GUIDE_MEASUREMENT_CLIENT_VERSION = '7.5.29';
7
+ exports.GUIDE_MEASUREMENT_CLIENT_VERSION = '7.5.32';
8
8
  function isGuideMeasurementIntent(value) {
9
9
  if (!value || typeof value !== 'object' || Array.isArray(value))
10
10
  return false;
@@ -1,7 +1,7 @@
1
1
  import { type MerchantPreviewRuntimePolicy } from './merchantPreviewOrigins.js';
2
2
  import { type LiveDuplexMediaOptions, type LiveDuplexMediaDependencies } from './liveDuplexMedia.js';
3
3
  import { type CommerceBootstrap, type CommerceContext, type CommerceCartSelection, type CommerceProduct, type CommerceContextClear, type LiveCommerceCatalog, type LiveCommerceDisplayed } from './commerce/contracts.js';
4
- export declare const LIVE_CONTROL_CLIENT_VERSION = "7.5.29";
4
+ export declare const LIVE_CONTROL_CLIENT_VERSION = "7.5.32";
5
5
  export declare const LIVE_CONTROL_CLIENT_CAPABILITIES: readonly ["live_duplex_v1", "live_local_wake_v1", "live_fragment_captions_v1"];
6
6
  declare const phases: readonly ["voice_off", "local_listening", "wake_buffering", "starting", "active", "tentative_idle", "closing", "uncertain", "muted", "suspended", "budget_blocked", "ended"];
7
7
  export type LiveControlState = {
@@ -71,6 +71,7 @@ export interface LiveControlChannelOptions {
71
71
  currentContext(): CommerceContext | null;
72
72
  cartVersion?: 1;
73
73
  };
74
+ onCommerceContextRequired?(): void;
74
75
  onCommerceCatalog?(value: LiveCommerceCatalog): void;
75
76
  onCommerceCartEvent?(type: string, payload: unknown): void;
76
77
  }
@@ -367,6 +367,10 @@ class LiveControlChannel {
367
367
  }
368
368
  }
369
369
  this.commandEpoch++;
370
+ // Every nonterminal cut clears the server's context, including automatic
371
+ // media failures. Fresh browser hints must wait behind this same barrier.
372
+ if (type !== 'end' && this.commerceNegotiated)
373
+ this.options.onCommerceContextRequired?.();
370
374
  }
371
375
  }
372
376
  write(type, payload, hello = false, barrier = null, requestedId) {
@@ -257,6 +257,7 @@ class LiveGuideWidget {
257
257
  },
258
258
  ...(this.commerce ? { commerce: { bootstrap: this.commerce, currentContext: () => this.commerceContext?.current ?? null,
259
259
  ...(this.commerceCart ? { cartVersion: 1 } : {}) },
260
+ onCommerceContextRequired: () => this.commerceContext?.refresh({ force: true }),
260
261
  onCommerceCatalog: (value) => this.showCommerceCatalog(value),
261
262
  onCommerceCartEvent: (type, payload) => this.commerceCart?.onEvent(type, payload) } : {}),
262
263
  onTranscript: value => this.onTranscript(value),
@@ -487,21 +488,13 @@ class LiveGuideWidget {
487
488
  return false;
488
489
  }
489
490
  }
490
- stop() {
491
- this.commerceCart?.cut();
492
- this.inputEpoch++;
493
- this.channel?.stop();
494
- this.wakeRequested = false;
495
- this.view.interruptPlayback();
496
- this.commerceContext?.refresh({ force: true });
497
- }
491
+ stop() { this.commerceCart?.cut(); this.inputEpoch++; this.channel?.stop(); this.wakeRequested = false; this.view.interruptPlayback(); }
498
492
  privacy(reason) {
499
493
  this.commerceCart?.cut();
500
494
  this.inputEpoch++;
501
495
  this.capturePrepared = false;
502
496
  this.wakeRequested = false;
503
497
  this.channel?.fence(reason);
504
- this.commerceContext?.refresh({ force: true });
505
498
  }
506
499
  toText() {
507
500
  this.privacy('mode_change');
package/cjs/ui.d.ts CHANGED
@@ -192,6 +192,7 @@ export declare class WidgetView {
192
192
  private introFocusScrollGuard;
193
193
  private introFocusScrollGuardTimer;
194
194
  private introViewportFrame;
195
+ private framerBadgePlacement;
195
196
  private panelTransitionTimers;
196
197
  private panelTransitionSettlers;
197
198
  private companionTransferRestoreExpanded;
package/cjs/ui.js CHANGED
@@ -4,6 +4,7 @@ exports.WidgetView = void 0;
4
4
  const lucide_1 = require("lucide");
5
5
  const avatarUrl_js_1 = require("./avatarUrl.js");
6
6
  const dialogFocusScope_js_1 = require("./dialogFocusScope.js");
7
+ const framerBadgePlacement_js_1 = require("./framerBadgePlacement.js");
7
8
  const shoppingNotes_js_1 = require("./commerce/shoppingNotes.js");
8
9
  const shoppingNotesView_js_1 = require("./commerce/shoppingNotesView.js");
9
10
  const ctaOffer_js_1 = require("./ctaOffer.js");
@@ -1033,6 +1034,7 @@ const style = `
1033
1034
  :host([data-theme="dark"]) .panel.open:not(.compact) .close:hover {
1034
1035
  background: var(--mode-active-background);
1035
1036
  }
1037
+ .panel.compact { margin-bottom: var(--panel-badge-bottom-offset, 0px); }
1036
1038
  .panel.active-session.compact .brand-mark {
1037
1039
  width: 42px;
1038
1040
  height: 42px;
@@ -1501,7 +1503,7 @@ const style = `
1501
1503
  }
1502
1504
  .intro,
1503
1505
  .intro[data-minimized="true"] {
1504
- bottom: calc(max(20px, env(safe-area-inset-bottom)) + var(--intro-visual-bottom-offset, 0px));
1506
+ bottom: calc(max(20px, env(safe-area-inset-bottom)) + var(--intro-visual-bottom-offset, 0px) + var(--intro-badge-bottom-offset, 0px));
1505
1507
  }
1506
1508
  .intro[data-anchor="left"] {
1507
1509
  inset-inline-start: 20px;
@@ -4167,7 +4169,7 @@ const style = `
4167
4169
  .intro-voice { padding-inline: 8px; }
4168
4170
  .intro,
4169
4171
  .intro[data-minimized="true"] {
4170
- bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--intro-visual-bottom-offset, 0px)) !important;
4172
+ bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--intro-visual-bottom-offset, 0px) + var(--intro-badge-bottom-offset, 0px)) !important;
4171
4173
  }
4172
4174
  .panel.open:not(.compact) {
4173
4175
  inset: 0 !important;
@@ -4433,6 +4435,7 @@ class WidgetView {
4433
4435
  this.introFocusScrollGuard = null;
4434
4436
  this.introFocusScrollGuardTimer = null;
4435
4437
  this.introViewportFrame = null;
4438
+ this.framerBadgePlacement = null;
4436
4439
  this.panelTransitionTimers = new Set();
4437
4440
  this.panelTransitionSettlers = new Set();
4438
4441
  this.companionTransferRestoreExpanded = false;
@@ -4863,6 +4866,7 @@ class WidgetView {
4863
4866
  sheet.textContent = style + ctaOffer_js_1.CTA_OFFER_STYLES + productPanel_js_1.COMMERCE_PRODUCT_PANEL_STYLES + shoppingNotesView_js_1.SHOPPING_NOTES_STYLES + `
4864
4867
  .panel:not(.compact) .conversation.commerce-active { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
4865
4868
  .commerce-slot { flex: 0 1 auto; min-height: 0; max-height: min(55dvh, 420px); overflow: auto; overscroll-behavior: contain; }
4869
+ .commerce-panel.commerce-slot > .commerce-panel-content { max-height: none; overflow: visible; }
4866
4870
  .panel:not(.compact) .conversation.commerce-active .captions { flex: 1 1 80px; height: auto; min-height: 64px; }
4867
4871
  `;
4868
4872
  this.shadow.append(sheet);
@@ -4913,6 +4917,7 @@ class WidgetView {
4913
4917
  this.disablePreviewNavigation();
4914
4918
  this.syncEffectMotion();
4915
4919
  this.syncSurfaceEffectOwner();
4920
+ this.framerBadgePlacement = new framerBadgePlacement_js_1.FramerBadgePlacement(this.host, this.intro, this.panel);
4916
4921
  }
4917
4922
  setRemoteStream(stream) {
4918
4923
  if (this.destroyed || this.audio.srcObject === stream)
@@ -8444,6 +8449,8 @@ class WidgetView {
8444
8449
  if (this.destroyed)
8445
8450
  return;
8446
8451
  this.destroyed = true;
8452
+ this.framerBadgePlacement?.destroy();
8453
+ this.framerBadgePlacement = null;
8447
8454
  window.removeEventListener("resize", this.onResize);
8448
8455
  window.removeEventListener("scroll", this.onHighlightViewportGeometryChange);
8449
8456
  window.removeEventListener("scroll", this.onIntroFocusHostScroll);
@@ -9731,6 +9738,7 @@ class WidgetView {
9731
9738
  ? Math.min(Math.max(0, layoutHeight - visualBottom), layoutHeight * 0.75)
9732
9739
  : 0;
9733
9740
  this.host.style.setProperty("--intro-visual-bottom-offset", `${Math.round(occludedBottom)}px`);
9741
+ this.framerBadgePlacement?.schedule();
9734
9742
  }
9735
9743
  focusIntroControl(mode) {
9736
9744
  const input = this.require('[data-role="intro-text-input"]');
package/cjs/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "7.5.29";
1
+ export declare const VERSION = "7.5.32";
package/cjs/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '7.5.29';
4
+ exports.VERSION = '7.5.32';
@@ -34,7 +34,7 @@ export declare const normalizeAiGuideOpenInput: (input?: AiGuideOpenInput) => Re
34
34
  export declare const resolveAiGuideProtocolVersion: (bootstrap: Pick<BootstrapConfig, "experienceMode" | "minimumProtocolVersion" | "protocol">) => 1 | 2;
35
35
  export default class AiLiveAssist {
36
36
  private readonly options;
37
- readonly version = "7.5.29";
37
+ readonly version = "7.5.32";
38
38
  private readonly host;
39
39
  private readonly guideAdmission;
40
40
  private readonly standaloneAdmissionPending;
package/lib/context.d.ts CHANGED
@@ -43,6 +43,7 @@ export declare class PageContextCollector {
43
43
  private releasedNavigationSettlement;
44
44
  private navigationSettlementGeneration;
45
45
  private navigationSettlement;
46
+ private cancelNavigationRenderWait;
46
47
  private recentSelection;
47
48
  private latestSemanticSignature;
48
49
  constructor(callbacks: ContextCallbacks, selectorRegionRules?: SelectorRegionRule[], policyVersion?: number, trustedGuideRoot?: Element | null, statefulButtonActionProof?: boolean);
@@ -95,6 +96,7 @@ export declare class PageContextCollector {
95
96
  private readSafeSelection;
96
97
  private handleNavigation;
97
98
  private beginNavigationSettlement;
99
+ private waitForNavigationRender;
98
100
  private observeCausalNavigationAfterMutation;
99
101
  private reportCausalNavigationObservation;
100
102
  private resetBoundTargetIds;
package/lib/context.js CHANGED
@@ -16,6 +16,7 @@ const SCROLL_SETTLEMENT_POSITION_TOLERANCE_PX = 1;
16
16
  const SCROLL_SETTLEMENT_STABLE_MS = 250;
17
17
  const MAX_SCROLL_LAYOUT_CORRECTIONS = 3;
18
18
  const RELEASED_NAVIGATION_SETTLEMENT_TIMEOUT_MS = 5000;
19
+ const NAVIGATION_RENDER_SETTLEMENT_TIMEOUT_MS = 2000;
19
20
  const FRAMER_GENERATED_PAGE_SELECTOR = '[data-framer-generated-page]';
20
21
  const FRAMER_TOGGLE_ROOT_SELECTOR = '[data-framer-name="Toggle"]';
21
22
  const FRAMER_TOGGLE_CONTROL_SELECTOR = 'div[name="Toggle Switch"][data-highlight="true"][tabindex]';
@@ -822,6 +823,7 @@ export class PageContextCollector {
822
823
  this.releasedNavigationSettlement = null;
823
824
  this.navigationSettlementGeneration = 0;
824
825
  this.navigationSettlement = null;
826
+ this.cancelNavigationRenderWait = null;
825
827
  this.recentSelection = null;
826
828
  this.latestSemanticSignature = null;
827
829
  this.scheduleCapture = () => {
@@ -947,6 +949,10 @@ export class PageContextCollector {
947
949
  this.reportCausalNavigationObservation();
948
950
  return;
949
951
  }
952
+ // A queued history notification for this same route must not supersede
953
+ // its causal action while we await the page's transition.
954
+ if (this.navigationSettlement?.url === currentUrl)
955
+ return;
950
956
  this.pageId = id('page');
951
957
  this.revision += 1;
952
958
  this.targets.clear();
@@ -966,7 +972,13 @@ export class PageContextCollector {
966
972
  }
967
973
  const settlement = this.beginNavigationSettlement(this.pageId, this.revision, currentUrl);
968
974
  void Promise.resolve()
969
- .then(() => this.callbacks.onNavigation(settlement.pageId, settlement.revision, settlement.url))
975
+ .then(async () => {
976
+ if (typeof document.getAnimations === 'function')
977
+ await this.waitForNavigationRender(settlement);
978
+ if (!this.running || this.navigationSettlement !== settlement)
979
+ return false;
980
+ return this.callbacks.onNavigation(settlement.pageId, settlement.revision, settlement.url);
981
+ })
970
982
  .then((navigationAcknowledged) => {
971
983
  if (navigationAcknowledged === false ||
972
984
  !this.running ||
@@ -1086,6 +1098,7 @@ export class PageContextCollector {
1086
1098
  this.deferredNavigation = null;
1087
1099
  this.releasedNavigation = null;
1088
1100
  this.finishReleasedNavigationSettlement('rejected');
1101
+ this.cancelNavigationRenderWait?.();
1089
1102
  this.navigationSettlementGeneration += 1;
1090
1103
  this.navigationSettlement = null;
1091
1104
  this.recentSelection = null;
@@ -1886,6 +1899,12 @@ export class PageContextCollector {
1886
1899
  const settlement = navigation && this.running
1887
1900
  ? this.beginNavigationSettlement(navigation.pageId, Math.max(navigation.revision, this.revision), navigation.url)
1888
1901
  : null;
1902
+ if (settlement) {
1903
+ if (typeof document.getAnimations === 'function')
1904
+ await this.waitForNavigationRender(settlement);
1905
+ if (!this.running || this.navigationSettlement !== settlement)
1906
+ return null;
1907
+ }
1889
1908
  if (navigation && this.running) {
1890
1909
  try {
1891
1910
  navigationAcknowledged =
@@ -2507,6 +2526,7 @@ export class PageContextCollector {
2507
2526
  };
2508
2527
  }
2509
2528
  beginNavigationSettlement(pageId, revision, url) {
2529
+ this.cancelNavigationRenderWait?.();
2510
2530
  const settlement = {
2511
2531
  generation: ++this.navigationSettlementGeneration,
2512
2532
  pageId,
@@ -2520,6 +2540,77 @@ export class PageContextCollector {
2520
2540
  this.clearMutationCapture();
2521
2541
  return settlement;
2522
2542
  }
2543
+ waitForNavigationRender(settlement) {
2544
+ if (!this.running || this.navigationSettlement !== settlement ||
2545
+ typeof document.getAnimations !== 'function')
2546
+ return Promise.resolve();
2547
+ return new Promise(resolve => {
2548
+ let frame = null;
2549
+ let finished = false;
2550
+ const watched = new Map();
2551
+ const clearAnimations = () => {
2552
+ for (const [animation, listener] of watched) {
2553
+ animation.removeEventListener('finish', listener);
2554
+ animation.removeEventListener('cancel', listener);
2555
+ }
2556
+ watched.clear();
2557
+ };
2558
+ const finish = () => {
2559
+ if (finished)
2560
+ return;
2561
+ finished = true;
2562
+ clearTimeout(deadline);
2563
+ if (frame !== null)
2564
+ window.cancelAnimationFrame(frame);
2565
+ clearAnimations();
2566
+ if (this.cancelNavigationRenderWait === finish)
2567
+ this.cancelNavigationRenderWait = null;
2568
+ resolve();
2569
+ };
2570
+ const check = () => {
2571
+ frame = null;
2572
+ if (finished)
2573
+ return;
2574
+ if (!this.running || this.navigationSettlement !== settlement) {
2575
+ finish();
2576
+ return;
2577
+ }
2578
+ clearAnimations();
2579
+ const animations = document.getAnimations().filter(animation => {
2580
+ const effect = animation.effect;
2581
+ const target = effect && 'target' in effect && effect.target instanceof Element ? effect.target : null;
2582
+ const root = target?.getRootNode();
2583
+ const guideAnimation = target && (this.mutationNodeIsInsideTrustedGuide(target) ||
2584
+ root instanceof ShadowRoot && root.host === this.trustedGuideRoot);
2585
+ return (animation.playState === 'running' || animation.pending) &&
2586
+ effect && Number.isFinite(Number(effect.getComputedTiming().endTime)) &&
2587
+ !guideAnimation;
2588
+ });
2589
+ if (animations.length === 0) {
2590
+ finish();
2591
+ return;
2592
+ }
2593
+ for (const animation of animations) {
2594
+ const listener = () => { clearAnimations(); schedule(); };
2595
+ watched.set(animation, listener);
2596
+ animation.addEventListener('finish', listener);
2597
+ animation.addEventListener('cancel', listener);
2598
+ }
2599
+ };
2600
+ const schedule = () => {
2601
+ if (finished || frame !== null)
2602
+ return;
2603
+ // Let the router commit and paint before reading active transitions.
2604
+ // Await actual completion events, never poll or sleep a fixed duration.
2605
+ frame = window.requestAnimationFrame(() => {
2606
+ frame = window.requestAnimationFrame(check);
2607
+ });
2608
+ };
2609
+ const deadline = setTimeout(finish, NAVIGATION_RENDER_SETTLEMENT_TIMEOUT_MS);
2610
+ this.cancelNavigationRenderWait = finish;
2611
+ schedule();
2612
+ });
2613
+ }
2523
2614
  observeCausalNavigationAfterMutation(actionId, destinationPath, beforeActionUrl) {
2524
2615
  const currentUrl = safePageUrl();
2525
2616
  if (currentUrl === beforeActionUrl ||
@@ -0,0 +1,20 @@
1
+ /** Keep Guide launchers clear of Framer's visible attribution link. */
2
+ export declare class FramerBadgePlacement {
3
+ private readonly host;
4
+ private readonly intro;
5
+ private readonly panel;
6
+ private frame;
7
+ private offset;
8
+ private panelOffset;
9
+ private destroyed;
10
+ private badge;
11
+ private badgeLink;
12
+ private documentObserver;
13
+ private badgeObserver;
14
+ private introObserver;
15
+ private resizeObserver;
16
+ constructor(host: HTMLElement, intro: HTMLElement, panel: HTMLElement);
17
+ schedule: () => void;
18
+ private sync;
19
+ destroy(): void;
20
+ }
@@ -0,0 +1,173 @@
1
+ const BADGE_ID = "__framer-badge-container";
2
+ const BADGE_GAP = 8;
3
+ const OFFSET_PROPERTY = "--intro-badge-bottom-offset";
4
+ const PANEL_OFFSET_PROPERTY = "--panel-badge-bottom-offset";
5
+ const SURFACES = ".intro-composer-frame, .status-card, .legal-trigger, .recording-consent";
6
+ /** Keep Guide launchers clear of Framer's visible attribution link. */
7
+ export class FramerBadgePlacement {
8
+ constructor(host, intro, panel) {
9
+ this.host = host;
10
+ this.intro = intro;
11
+ this.panel = panel;
12
+ this.frame = null;
13
+ this.offset = 0;
14
+ this.panelOffset = 0;
15
+ this.destroyed = false;
16
+ this.badge = null;
17
+ this.badgeLink = null;
18
+ this.documentObserver = null;
19
+ this.badgeObserver = null;
20
+ this.introObserver = null;
21
+ this.resizeObserver = null;
22
+ this.schedule = () => {
23
+ if (this.destroyed || !this.documentObserver || this.frame !== null)
24
+ return;
25
+ this.frame = requestAnimationFrame(() => {
26
+ this.frame = null;
27
+ this.sync();
28
+ });
29
+ };
30
+ // Other platforms need neither a page observer nor a different placement.
31
+ if (!document.getElementById(BADGE_ID) &&
32
+ !document.querySelector('meta[name="generator"][content^="Framer"]')) {
33
+ return;
34
+ }
35
+ this.documentObserver = new MutationObserver(this.schedule);
36
+ this.documentObserver.observe(document.documentElement, {
37
+ childList: true,
38
+ subtree: true,
39
+ });
40
+ this.introObserver = new MutationObserver(this.schedule);
41
+ this.introObserver.observe(intro, {
42
+ attributes: true,
43
+ subtree: true,
44
+ attributeFilter: ["hidden", "data-anchor", "data-minimized"],
45
+ });
46
+ this.introObserver.observe(panel, {
47
+ attributes: true,
48
+ attributeFilter: ["class", "style", "hidden", "data-anchor"],
49
+ });
50
+ if (typeof ResizeObserver === "function") {
51
+ this.resizeObserver = new ResizeObserver(this.schedule);
52
+ this.resizeObserver.observe(intro);
53
+ this.resizeObserver.observe(panel);
54
+ intro.querySelectorAll(SURFACES).forEach((surface) => {
55
+ this.resizeObserver.observe(surface);
56
+ });
57
+ }
58
+ window.addEventListener("resize", this.schedule, { passive: true });
59
+ window.addEventListener("scroll", this.schedule, { passive: true });
60
+ window.visualViewport?.addEventListener("resize", this.schedule);
61
+ window.visualViewport?.addEventListener("scroll", this.schedule);
62
+ this.sync();
63
+ }
64
+ sync() {
65
+ const badge = document.getElementById(BADGE_ID);
66
+ if (badge !== this.badge) {
67
+ if (this.badge) {
68
+ this.resizeObserver?.unobserve(this.badge);
69
+ this.badge.removeEventListener("transitionend", this.schedule);
70
+ this.badge.removeEventListener("animationend", this.schedule);
71
+ }
72
+ this.badgeObserver?.disconnect();
73
+ this.badge = badge;
74
+ if (badge) {
75
+ badge.addEventListener("transitionend", this.schedule);
76
+ badge.addEventListener("animationend", this.schedule);
77
+ this.resizeObserver?.observe(badge);
78
+ this.badgeObserver = new MutationObserver(this.schedule);
79
+ this.badgeObserver.observe(badge, {
80
+ attributes: true,
81
+ subtree: true,
82
+ attributeFilter: ["class", "style", "hidden"],
83
+ });
84
+ }
85
+ }
86
+ // The container spans the whole viewport; only its link is an obstacle.
87
+ const link = badge?.querySelector("a[href]") ?? null;
88
+ if (link !== this.badgeLink) {
89
+ if (this.badgeLink)
90
+ this.resizeObserver?.unobserve(this.badgeLink);
91
+ this.badgeLink = link ?? null;
92
+ if (link)
93
+ this.resizeObserver?.observe(link);
94
+ }
95
+ let nextOffset = 0;
96
+ let nextPanelOffset = 0;
97
+ if (link) {
98
+ const style = getComputedStyle(link);
99
+ let transparent = false;
100
+ for (let element = link; element; element = element.parentElement) {
101
+ if (getComputedStyle(element).opacity === "0") {
102
+ transparent = true;
103
+ break;
104
+ }
105
+ if (element === badge)
106
+ break;
107
+ }
108
+ const obstacle = link.getBoundingClientRect();
109
+ if (!transparent &&
110
+ style.visibility !== "hidden" &&
111
+ style.display !== "none" &&
112
+ obstacle.width > 0 &&
113
+ obstacle.height > 0 &&
114
+ obstacle.bottom > 0 &&
115
+ obstacle.top < window.innerHeight &&
116
+ obstacle.right > 0 &&
117
+ obstacle.left < window.innerWidth) {
118
+ const requiredOffset = (surfaces, offset) => {
119
+ let result = 0;
120
+ for (const surface of surfaces) {
121
+ const rect = surface.getBoundingClientRect();
122
+ // Undo our previous shift when measuring, so repeated updates do not
123
+ // accumulate offsets or bounce between the shifted and base positions.
124
+ const top = rect.top + offset;
125
+ const bottom = rect.bottom + offset;
126
+ if (rect.width > 0 &&
127
+ rect.height > 0 &&
128
+ rect.left < obstacle.right + BADGE_GAP &&
129
+ rect.right > obstacle.left - BADGE_GAP &&
130
+ top < obstacle.bottom + BADGE_GAP &&
131
+ bottom > obstacle.top - BADGE_GAP) {
132
+ result = Math.max(result, Math.ceil(bottom - obstacle.top + BADGE_GAP));
133
+ }
134
+ }
135
+ return result;
136
+ };
137
+ if (!this.intro.hidden) {
138
+ nextOffset = requiredOffset(this.intro.querySelectorAll(SURFACES), this.offset);
139
+ }
140
+ // Keep explicitly dragged panels where the visitor put them. Expanded
141
+ // panels, including the mobile full-screen dialog, retain their layout.
142
+ if (this.panel.classList.contains("compact") && !this.panel.style.top) {
143
+ nextPanelOffset = requiredOffset([this.panel], this.panelOffset);
144
+ }
145
+ }
146
+ }
147
+ if (nextOffset !== this.offset) {
148
+ this.offset = nextOffset;
149
+ this.host.style.setProperty(OFFSET_PROPERTY, `${nextOffset}px`);
150
+ }
151
+ if (nextPanelOffset !== this.panelOffset) {
152
+ this.panelOffset = nextPanelOffset;
153
+ this.host.style.setProperty(PANEL_OFFSET_PROPERTY, `${nextPanelOffset}px`);
154
+ }
155
+ }
156
+ destroy() {
157
+ this.destroyed = true;
158
+ if (this.frame !== null)
159
+ cancelAnimationFrame(this.frame);
160
+ this.documentObserver?.disconnect();
161
+ this.badgeObserver?.disconnect();
162
+ this.badge?.removeEventListener("transitionend", this.schedule);
163
+ this.badge?.removeEventListener("animationend", this.schedule);
164
+ this.introObserver?.disconnect();
165
+ this.resizeObserver?.disconnect();
166
+ window.removeEventListener("resize", this.schedule);
167
+ window.removeEventListener("scroll", this.schedule);
168
+ window.visualViewport?.removeEventListener("resize", this.schedule);
169
+ window.visualViewport?.removeEventListener("scroll", this.schedule);
170
+ this.host.style.removeProperty(OFFSET_PROPERTY);
171
+ this.host.style.removeProperty(PANEL_OFFSET_PROPERTY);
172
+ }
173
+ }
@@ -1,5 +1,5 @@
1
1
  import type { GuideMeasurementBridge, GuideMeasurementIntent } from './guideTypes.js';
2
- export declare const GUIDE_MEASUREMENT_CLIENT_VERSION = "7.5.29";
2
+ export declare const GUIDE_MEASUREMENT_CLIENT_VERSION = "7.5.32";
3
3
  export declare function isGuideMeasurementIntent(value: unknown): value is GuideMeasurementIntent;
4
4
  /** The managed analytics owner supplies possession; this check grants no authority. */
5
5
  export declare function currentGuideMeasurementBridge(value: unknown): value is GuideMeasurementBridge;
@@ -1,4 +1,4 @@
1
- export const GUIDE_MEASUREMENT_CLIENT_VERSION = '7.5.29';
1
+ export const GUIDE_MEASUREMENT_CLIENT_VERSION = '7.5.32';
2
2
  export function isGuideMeasurementIntent(value) {
3
3
  if (!value || typeof value !== 'object' || Array.isArray(value))
4
4
  return false;
@@ -1,7 +1,7 @@
1
1
  import { type MerchantPreviewRuntimePolicy } from './merchantPreviewOrigins.js';
2
2
  import { type LiveDuplexMediaOptions, type LiveDuplexMediaDependencies } from './liveDuplexMedia.js';
3
3
  import { type CommerceBootstrap, type CommerceContext, type CommerceCartSelection, type CommerceProduct, type CommerceContextClear, type LiveCommerceCatalog, type LiveCommerceDisplayed } from './commerce/contracts.js';
4
- export declare const LIVE_CONTROL_CLIENT_VERSION = "7.5.29";
4
+ export declare const LIVE_CONTROL_CLIENT_VERSION = "7.5.32";
5
5
  export declare const LIVE_CONTROL_CLIENT_CAPABILITIES: readonly ["live_duplex_v1", "live_local_wake_v1", "live_fragment_captions_v1"];
6
6
  declare const phases: readonly ["voice_off", "local_listening", "wake_buffering", "starting", "active", "tentative_idle", "closing", "uncertain", "muted", "suspended", "budget_blocked", "ended"];
7
7
  export type LiveControlState = {
@@ -71,6 +71,7 @@ export interface LiveControlChannelOptions {
71
71
  currentContext(): CommerceContext | null;
72
72
  cartVersion?: 1;
73
73
  };
74
+ onCommerceContextRequired?(): void;
74
75
  onCommerceCatalog?(value: LiveCommerceCatalog): void;
75
76
  onCommerceCartEvent?(type: string, payload: unknown): void;
76
77
  }
@@ -364,6 +364,10 @@ export class LiveControlChannel {
364
364
  }
365
365
  }
366
366
  this.commandEpoch++;
367
+ // Every nonterminal cut clears the server's context, including automatic
368
+ // media failures. Fresh browser hints must wait behind this same barrier.
369
+ if (type !== 'end' && this.commerceNegotiated)
370
+ this.options.onCommerceContextRequired?.();
367
371
  }
368
372
  }
369
373
  write(type, payload, hello = false, barrier = null, requestedId) {
@@ -254,6 +254,7 @@ export class LiveGuideWidget {
254
254
  },
255
255
  ...(this.commerce ? { commerce: { bootstrap: this.commerce, currentContext: () => this.commerceContext?.current ?? null,
256
256
  ...(this.commerceCart ? { cartVersion: 1 } : {}) },
257
+ onCommerceContextRequired: () => this.commerceContext?.refresh({ force: true }),
257
258
  onCommerceCatalog: (value) => this.showCommerceCatalog(value),
258
259
  onCommerceCartEvent: (type, payload) => this.commerceCart?.onEvent(type, payload) } : {}),
259
260
  onTranscript: value => this.onTranscript(value),
@@ -484,21 +485,13 @@ export class LiveGuideWidget {
484
485
  return false;
485
486
  }
486
487
  }
487
- stop() {
488
- this.commerceCart?.cut();
489
- this.inputEpoch++;
490
- this.channel?.stop();
491
- this.wakeRequested = false;
492
- this.view.interruptPlayback();
493
- this.commerceContext?.refresh({ force: true });
494
- }
488
+ stop() { this.commerceCart?.cut(); this.inputEpoch++; this.channel?.stop(); this.wakeRequested = false; this.view.interruptPlayback(); }
495
489
  privacy(reason) {
496
490
  this.commerceCart?.cut();
497
491
  this.inputEpoch++;
498
492
  this.capturePrepared = false;
499
493
  this.wakeRequested = false;
500
494
  this.channel?.fence(reason);
501
- this.commerceContext?.refresh({ force: true });
502
495
  }
503
496
  toText() {
504
497
  this.privacy('mode_change');
package/lib/ui.d.ts CHANGED
@@ -192,6 +192,7 @@ export declare class WidgetView {
192
192
  private introFocusScrollGuard;
193
193
  private introFocusScrollGuardTimer;
194
194
  private introViewportFrame;
195
+ private framerBadgePlacement;
195
196
  private panelTransitionTimers;
196
197
  private panelTransitionSettlers;
197
198
  private companionTransferRestoreExpanded;
package/lib/ui.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { AudioLines, Captions, CaptionsOff, CircleStop, Eye, EyeOff, Grid2X2Plus, Hand, Maximize2, MessageSquareText, Mic, MicOff, Minus, Minimize2, Pause, Play, RotateCcw, Send, ShieldCheck, ShieldOff, UserRound, X, createElement as createLucideElement, } from "lucide";
2
2
  import { normalizeAvatarUrl } from "./avatarUrl.js";
3
3
  import { DialogFocusScope } from "./dialogFocusScope.js";
4
+ import { FramerBadgePlacement } from "./framerBadgePlacement.js";
4
5
  import { createShoppingNotesScope } from "./commerce/shoppingNotes.js";
5
6
  import { ShoppingNotesView, SHOPPING_NOTES_STYLES } from "./commerce/shoppingNotesView.js";
6
7
  import { CtaOfferCard, CTA_OFFER_STYLES, parseCtaOffer } from "./ctaOffer.js";
@@ -1030,6 +1031,7 @@ const style = `
1030
1031
  :host([data-theme="dark"]) .panel.open:not(.compact) .close:hover {
1031
1032
  background: var(--mode-active-background);
1032
1033
  }
1034
+ .panel.compact { margin-bottom: var(--panel-badge-bottom-offset, 0px); }
1033
1035
  .panel.active-session.compact .brand-mark {
1034
1036
  width: 42px;
1035
1037
  height: 42px;
@@ -1498,7 +1500,7 @@ const style = `
1498
1500
  }
1499
1501
  .intro,
1500
1502
  .intro[data-minimized="true"] {
1501
- bottom: calc(max(20px, env(safe-area-inset-bottom)) + var(--intro-visual-bottom-offset, 0px));
1503
+ bottom: calc(max(20px, env(safe-area-inset-bottom)) + var(--intro-visual-bottom-offset, 0px) + var(--intro-badge-bottom-offset, 0px));
1502
1504
  }
1503
1505
  .intro[data-anchor="left"] {
1504
1506
  inset-inline-start: 20px;
@@ -4164,7 +4166,7 @@ const style = `
4164
4166
  .intro-voice { padding-inline: 8px; }
4165
4167
  .intro,
4166
4168
  .intro[data-minimized="true"] {
4167
- bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--intro-visual-bottom-offset, 0px)) !important;
4169
+ bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--intro-visual-bottom-offset, 0px) + var(--intro-badge-bottom-offset, 0px)) !important;
4168
4170
  }
4169
4171
  .panel.open:not(.compact) {
4170
4172
  inset: 0 !important;
@@ -4430,6 +4432,7 @@ export class WidgetView {
4430
4432
  this.introFocusScrollGuard = null;
4431
4433
  this.introFocusScrollGuardTimer = null;
4432
4434
  this.introViewportFrame = null;
4435
+ this.framerBadgePlacement = null;
4433
4436
  this.panelTransitionTimers = new Set();
4434
4437
  this.panelTransitionSettlers = new Set();
4435
4438
  this.companionTransferRestoreExpanded = false;
@@ -4860,6 +4863,7 @@ export class WidgetView {
4860
4863
  sheet.textContent = style + CTA_OFFER_STYLES + COMMERCE_PRODUCT_PANEL_STYLES + SHOPPING_NOTES_STYLES + `
4861
4864
  .panel:not(.compact) .conversation.commerce-active { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
4862
4865
  .commerce-slot { flex: 0 1 auto; min-height: 0; max-height: min(55dvh, 420px); overflow: auto; overscroll-behavior: contain; }
4866
+ .commerce-panel.commerce-slot > .commerce-panel-content { max-height: none; overflow: visible; }
4863
4867
  .panel:not(.compact) .conversation.commerce-active .captions { flex: 1 1 80px; height: auto; min-height: 64px; }
4864
4868
  `;
4865
4869
  this.shadow.append(sheet);
@@ -4910,6 +4914,7 @@ export class WidgetView {
4910
4914
  this.disablePreviewNavigation();
4911
4915
  this.syncEffectMotion();
4912
4916
  this.syncSurfaceEffectOwner();
4917
+ this.framerBadgePlacement = new FramerBadgePlacement(this.host, this.intro, this.panel);
4913
4918
  }
4914
4919
  setRemoteStream(stream) {
4915
4920
  if (this.destroyed || this.audio.srcObject === stream)
@@ -8441,6 +8446,8 @@ export class WidgetView {
8441
8446
  if (this.destroyed)
8442
8447
  return;
8443
8448
  this.destroyed = true;
8449
+ this.framerBadgePlacement?.destroy();
8450
+ this.framerBadgePlacement = null;
8444
8451
  window.removeEventListener("resize", this.onResize);
8445
8452
  window.removeEventListener("scroll", this.onHighlightViewportGeometryChange);
8446
8453
  window.removeEventListener("scroll", this.onIntroFocusHostScroll);
@@ -9728,6 +9735,7 @@ export class WidgetView {
9728
9735
  ? Math.min(Math.max(0, layoutHeight - visualBottom), layoutHeight * 0.75)
9729
9736
  : 0;
9730
9737
  this.host.style.setProperty("--intro-visual-bottom-offset", `${Math.round(occludedBottom)}px`);
9738
+ this.framerBadgePlacement?.schedule();
9731
9739
  }
9732
9740
  focusIntroControl(mode) {
9733
9741
  const input = this.require('[data-role="intro-text-input"]');
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "7.5.29";
1
+ export declare const VERSION = "7.5.32";
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = '7.5.29';
1
+ export const VERSION = '7.5.32';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oxvo/ai-live-assist",
3
3
  "description": "Secure AI Guide browser plugin for OXVO Sessions.",
4
- "version": "7.5.29",
4
+ "version": "7.5.32",
5
5
  "keywords": [
6
6
  "ai-live-assist",
7
7
  "webrtc",