@alxxsck/ai-assistant 3.12.0 → 3.13.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.
@@ -1,8 +1,8 @@
1
1
  import { jsxs as N, jsx as i, Fragment as ye } from "react/jsx-runtime";
2
2
  import * as De from "react";
3
3
  import ae, { useContext as Be, createContext as it, useId as Et, useState as R, useMemo as ke, useCallback as Q, useEffect as B, useRef as A, useSyncExternalStore as nr, Fragment as bn, useReducer as ya, createRef as Go, useLayoutEffect as Re, Suspense as Un, lazy as rr, memo as xa } from "react";
4
- import { Y as Fe, K as je, a as ar, y as st, n as Ct, b as _t, o as Ne, c as Xt, s as cn, u as Yt, l as Zt, d as Qt, r as $r, e as qo, t as or, T as Yo, p as Na, f as Ea, g as Ca, h as Xo, O as hn, i as _a, j as pt, k as an, m as Zo, A as Dr, $ as Qo, q as Jo, V as ei, v as fe, w as We, x as de, z as ve, P as Pe, L as me, B as ti, C as ni, S as ka, D as ri, E as ai, F as oi, G as Jt, H as ir, I as Ta, J as sr, M as Ge, N as Se, Q as Lt, R as tt, U as ii, W as si, X as yn, Z as li, _ as lr, a0 as ci, a1 as di, a2 as ui, a3 as Aa, a4 as pi, a5 as hi, a6 as fi, a7 as cr, a8 as mi, a9 as gi, aa as dr, ab as Qe, ac as vi, ad as wi, ae as bi, af as yi, ag as xi, ah as Ni, ai as dn, aj as Ei, ak as nt, al as Ci, am as Sa, an as Ma, ao as _i, ap as ki, aq as Ti, ar as Ai, as as Si, at as Mi, au as La, av as ur, aw as Ra, ax as Li, ay as Ri, az as Ii, aA as Oi, aB as Pi, aC as pr, aD as $i, aE as un, aF as Di, aG as Fi, aH as zi, aI as Ui, aJ as Hi, aK as Vi, aL as Bi, aM as Rt, aN as ji, aO as Mn, aP as Wi, aQ as Pt, aR as Hn } from "./mount-B05IzdlB.js";
5
- import { m as Ki, M as bt, u as Gi, e as qi, o as Yi, g as Xi, L as hr, d as Zi, f as Qi, a as Ji } from "./index-C2f2GZSd.js";
4
+ import { Y as Fe, K as je, a as ar, y as st, n as Ct, b as _t, o as Ne, c as Xt, s as cn, u as Yt, l as Zt, d as Qt, r as $r, e as qo, t as or, T as Yo, p as Na, f as Ea, g as Ca, h as Xo, O as hn, i as _a, j as pt, k as an, m as Zo, A as Dr, $ as Qo, q as Jo, V as ei, v as fe, w as We, x as de, z as ve, P as Pe, L as me, B as ti, C as ni, S as ka, D as ri, E as ai, F as oi, G as Jt, H as ir, I as Ta, J as sr, M as Ge, N as Se, Q as Lt, R as tt, U as ii, W as si, X as yn, Z as li, _ as lr, a0 as ci, a1 as di, a2 as ui, a3 as Aa, a4 as pi, a5 as hi, a6 as fi, a7 as cr, a8 as mi, a9 as gi, aa as dr, ab as Qe, ac as vi, ad as wi, ae as bi, af as yi, ag as xi, ah as Ni, ai as dn, aj as Ei, ak as nt, al as Ci, am as Sa, an as Ma, ao as _i, ap as ki, aq as Ti, ar as Ai, as as Si, at as Mi, au as La, av as ur, aw as Ra, ax as Li, ay as Ri, az as Ii, aA as Oi, aB as Pi, aC as pr, aD as $i, aE as un, aF as Di, aG as Fi, aH as zi, aI as Ui, aJ as Hi, aK as Vi, aL as Bi, aM as Rt, aN as ji, aO as Mn, aP as Wi, aQ as Pt, aR as Hn } from "./mount-DfRJnLCL.js";
5
+ import { m as Ki, M as bt, u as Gi, e as qi, o as Yi, g as Xi, L as hr, d as Zi, f as Qi, a as Ji } from "./index-BnH6SD6u.js";
6
6
  import { createPortal as Ia } from "react-dom";
7
7
  let es = "span";
8
8
  var fn = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(fn || {});
@@ -2619,7 +2619,7 @@ function Xc(e, t) {
2619
2619
  }
2620
2620
  return Yc(y, a, r.length, _, k), y;
2621
2621
  }
2622
- const Zc = rr(() => import("./MediaVideoViewer-DkY6ZD4W.js"));
2622
+ const Zc = rr(() => import("./MediaVideoViewer-DrY4wjfx.js"));
2623
2623
  function Qc({
2624
2624
  entitlementId: e,
2625
2625
  previewUrl: t,
@@ -3164,7 +3164,7 @@ function ed({
3164
3164
  )
3165
3165
  ] });
3166
3166
  }
3167
- const td = rr(() => import("./MediaVideoPlayer-Cq3iCDS0.js")), nd = rr(() => import("./MediaVideoViewer-DkY6ZD4W.js"));
3167
+ const td = rr(() => import("./MediaVideoPlayer-B5Q_NhOD.js")), nd = rr(() => import("./MediaVideoViewer-DrY4wjfx.js"));
3168
3168
  function rd({ messageId: e }) {
3169
3169
  const { config: t, api: n } = We(), { t: r } = de(), a = t.customerInteractionSession.accessToken, [o, s] = R(), [c, d] = R(""), l = A(null), [f, u] = R(!0), p = `${a}:${e}`, [h, m] = R(!1), [v, b] = R(0), [T, g] = R(""), [E, y] = R(""), [k, _] = R(!1), x = o?.token === a && o.messageId === e ? o.photo : void 0, I = x?.state === "UNLOCKED" && E !== p && (!x.deadline || performance.now() < x.deadline) && (!x.localExpiresAt || Date.now() < x.localExpiresAt) ? x.original?.url : void 0;
3170
3170
  B(() => {
@@ -1,7 +1,7 @@
1
1
  import { jsxs as As, jsx as ot } from "react/jsx-runtime";
2
2
  import w, { useRef as Ei, useEffect as vi, useLayoutEffect as Ts } from "react";
3
- import { S as So } from "./index-C2f2GZSd.js";
4
- import { x as ko } from "./mount-B05IzdlB.js";
3
+ import { S as So } from "./index-BnH6SD6u.js";
4
+ import { x as ko } from "./mount-DfRJnLCL.js";
5
5
  const Lo = /* @__PURE__ */ new Set([
6
6
  "style",
7
7
  "children",
@@ -1,9 +1,9 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import { createPortal as h } from "react-dom";
3
3
  import { useRef as b, useState as c, useEffect as w } from "react";
4
- import x from "./MediaVideoPlayer-Cq3iCDS0.js";
5
- import { x as g } from "./mount-B05IzdlB.js";
6
- import { D as p, X as y } from "./ChatWidgetContent-eshwDKeX.js";
4
+ import x from "./MediaVideoPlayer-B5Q_NhOD.js";
5
+ import { x as g } from "./mount-DfRJnLCL.js";
6
+ import { D as p, X as y } from "./ChatWidgetContent-UzqVe7xI.js";
7
7
  const k = ".lola-video-viewer{position:fixed;inset:0;margin:auto;border:0;padding:0;width:min(100vw,1100px);height:100dvh;max-width:100vw;max-height:100dvh;background:#101217;color:#fff;font:14px/1.4 system-ui,sans-serif;display:flex;flex-direction:column;overscroll-behavior:contain;opacity:1;transform:translateY(0);transition:opacity .18s var(--chat-ease-out, cubic-bezier(.23, 1, .32, 1)),transform .18s var(--chat-ease-out, cubic-bezier(.23, 1, .32, 1))}@starting-style{.lola-video-viewer[open]{opacity:0;transform:translateY(6px)}}.lola-video-viewer::backdrop{background:#080a10eb}.lola-video-viewer header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;padding-top:max(12px,env(safe-area-inset-top));gap:12px}.lola-video-viewer header>div{display:flex;gap:8px}.lola-video-viewer button,.lola-video-viewer a{display:inline-flex;align-items:center;justify-content:center;background:#ffffff12;border:0;border-radius:50%;color:#fff;width:44px;height:44px;cursor:pointer}.lola-video-viewer button:focus-visible,.lola-video-viewer a:focus-visible{outline:2px solid white;outline-offset:2px}.lola-video-viewer main{flex:1;min-height:0;padding-bottom:env(safe-area-inset-bottom)}.lola-video-viewer p{padding:8px 16px}@media(prefers-reduced-motion:reduce){.lola-video-viewer{transition:opacity .12s ease;transform:none}@starting-style{.lola-video-viewer[open]{transform:none}}}";
8
8
  function P({
9
9
  src: f,
@@ -34,9 +34,6 @@ export declare class Avatar extends EventTarget {
34
34
  private cameraParams;
35
35
  private framingMode;
36
36
  private model?;
37
- private modelStage?;
38
- private pelvis?;
39
- private placementAnchor;
40
37
  private rotationYaw;
41
38
  private locale?;
42
39
  private animationFrame;
@@ -1,4 +1,4 @@
1
- import { C as A, E as e, S as s, p as E, h as n } from "./index-C2f2GZSd.js";
1
+ import { C as A, E as e, S as s, p as E, h as n } from "./index-BnH6SD6u.js";
2
2
  export {
3
3
  A as ChatWidgetInstance,
4
4
  e as EXTERNALLY_AVAILABLE_ACTIONS,
@@ -1,5 +1,6 @@
1
1
  import type { CustomerInteractionSession } from "@/types";
2
2
  import { type CommandAck, type CommandEnvelope, type CommandEventDetail, type CtaActionExecutionResult, type CtaCommandContext, type HostCommandHandlerName, type HostCommandHandlers, type SpeakTextCommandContext, type StartVoiceConversationCommandContext, type UiActionPresentationSnapshot, type UiActionPolicies, type UiTarget } from "./command.types";
3
+ import type { AssistantOpenSurfaceMode } from "@/domain/ui/assistant-surface";
3
4
  import type { ScenarioInteractionRuntime } from "@/domain/scenario-interaction/ScenarioInteractionRuntime";
4
5
  type AckSender = (ack: CommandAck) => Promise<unknown>;
5
6
  type UiActionInvocation = "COMMAND" | "CTA";
@@ -8,7 +9,7 @@ type UiActionPresentationHandoff = {
8
9
  cancel: () => void;
9
10
  };
10
11
  type InternalHandlers = {
11
- setAssistantVisible?: (visible: boolean, commandId: string) => void;
12
+ setAssistantVisible?: (visible: boolean, commandId: string, mode?: AssistantOpenSurfaceMode) => void | Promise<void>;
12
13
  setChatOpen?: (open: boolean, commandId: string) => void | Promise<void>;
13
14
  playAnimation?: (animation: string, expiresAt?: string | null) => void | Promise<void>;
14
15
  showCta?: (context: CtaCommandContext) => void;
@@ -19,7 +19,7 @@ export type DockedLauncher = {
19
19
  side: LauncherSide;
20
20
  yRatio: number;
21
21
  };
22
- export type CompactPreviewPlacement = "above" | "below";
22
+ export type CompactPreviewPlacement = "left" | "above" | "below";
23
23
  export type CompactPreviewLayout = {
24
24
  x: number;
25
25
  y: number;
@@ -65,5 +65,5 @@ export declare function clampPanelRect(rect: Rect, viewport: Viewport): Rect;
65
65
  export declare function dockPanelRect(rect: Rect, viewport: Viewport): Rect;
66
66
  export declare function dockPanelRectToSide(rect: Rect, viewport: Viewport, side: LauncherSide): Rect;
67
67
  export declare function placePanelFromLauncher(launcher: Point, size: Size, viewport: Viewport): Rect;
68
- export declare function placeCompactPreview(launcher: Point, measuredSize: Size, viewport: Viewport, side: LauncherSide, avoidRect?: Rect | null): CompactPreviewLayout;
68
+ export declare function placeCompactPreview(launcher: Point & Partial<Size>, measuredSize: Size, viewport: Viewport, side: LauncherSide, avoidRect?: Rect | null): CompactPreviewLayout;
69
69
  export declare function resizePanelFromTopCorner(start: Rect, delta: Point, corner: "northWest" | "northEast", viewport: Viewport): Rect;