@burdenoff/fe-libs 2026.1117.2 → 2026.1117.4
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/dist/shared/assistant/history/historyControls.d.ts +5 -0
- package/dist/shared/assistant/history/historyControls.js +9 -5
- package/dist/shared/assistant/home/AssistantHomeActions.d.ts +37 -0
- package/dist/shared/assistant/home/AssistantHomeActions.js +68 -0
- package/dist/shared/assistant/home/AssistantHomeComposer.d.ts +36 -0
- package/dist/shared/assistant/home/AssistantHomeComposer.js +85 -0
- package/dist/shared/assistant/home/AssistantHomeHistory.d.ts +106 -0
- package/dist/shared/assistant/home/AssistantHomeHistory.js +499 -0
- package/dist/shared/assistant/home/AssistantHomePage.d.ts +67 -0
- package/dist/shared/assistant/home/AssistantHomePage.js +78 -0
- package/dist/shared/assistant/home/AssistantHomeStart.d.ts +171 -0
- package/dist/shared/assistant/home/AssistantHomeStart.js +224 -0
- package/dist/shared/assistant/home/assistantHomeChat.d.ts +47 -0
- package/dist/shared/assistant/home/assistantHomeChat.js +49 -0
- package/dist/shared/assistant/home/assistantHomeHistoryRows.d.ts +93 -0
- package/dist/shared/assistant/home/assistantHomeHistoryRows.js +113 -0
- package/dist/shared/assistant/home/assistantHomeRoutes.d.ts +49 -0
- package/dist/shared/assistant/home/assistantHomeRoutes.js +48 -0
- package/dist/shared/assistant/home/assistantHomeTopBar.d.ts +4 -0
- package/dist/shared/assistant/home/assistantHomeTopBar.js +10 -0
- package/dist/shared/assistant/home/useAssistantHomeHistoryRows.d.ts +46 -0
- package/dist/shared/assistant/home/useAssistantHomeHistoryRows.js +120 -0
- package/dist/shared/assistant/home.d.ts +19 -0
- package/dist/shared/assistant/home.js +11 -0
- package/dist/shared/assistant/i18nManifest.d.ts +21 -1
- package/dist/shared/assistant/i18nManifest.js +22 -2
- package/dist/shared/assistant/index.d.ts +18 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.js +195 -194
- package/dist/shared/assistant/ui/AssistantChatArea.js +1339 -1332
- package/dist/shared/assistant/ui/AssistantConversationList.js +44 -48
- package/dist/shared/assistant/ui/compact/AssistantLanguagePill.d.ts +12 -0
- package/dist/shared/assistant/ui/compact/AssistantLanguagePill.js +13 -14
- package/dist/shared/assistant/ui/compact/AssistantWindowHeader.d.ts +8 -2
- package/dist/shared/assistant/ui/compact/AssistantWindowHeader.js +45 -39
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcome.d.ts +44 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcome.js +110 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeCard.d.ts +29 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeCard.js +84 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeHero.d.ts +15 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeHero.js +64 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeSuggestions.d.ts +12 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeSuggestions.js +31 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeTips.d.ts +9 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeTips.js +37 -0
- package/dist/shared/assistant/ui/compact/windowTitle.d.ts +15 -0
- package/dist/shared/assistant/ui/compact/windowTitle.js +13 -0
- package/dist/shared/assistant/ui/compact/windowWelcome.d.ts +136 -0
- package/dist/shared/assistant/ui/compact/windowWelcome.js +119 -0
- package/dist/shared/assistant/ui/compact/windowWelcomeHooks.d.ts +49 -0
- package/dist/shared/assistant/ui/compact/windowWelcomeHooks.js +70 -0
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.d.ts +3 -1
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.js +27 -26
- package/dist/shared-assistant.js +230 -212
- package/package.json +2 -1
- package/src/shared/tokens/tokens.css +523 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { modeRequiresConfirmWrites as e } from "../../api.js";
|
|
2
|
+
import { AUTO_READ_MODE as t, AUTO_WRITE_MODE as n } from "../../autoRouting.js";
|
|
3
|
+
import { resolveModeConfig as r } from "../../product.js";
|
|
4
|
+
// src/shared/assistant/ui/compact/windowWelcome.ts
|
|
5
|
+
var i = 4, a = (e) => e.length > 0 ? e : null;
|
|
6
|
+
function o(o) {
|
|
7
|
+
let { modes: s, mode: c, auto: l } = o;
|
|
8
|
+
if (l) {
|
|
9
|
+
let r = (s.find((e) => e.id === "assistant")?.suggestions ?? []).slice(0, i), o = new Set(r), c = (s.find((e) => e.id === "api-calls")?.suggestions ?? []).filter((e) => !o.has(e)).slice(0, i);
|
|
10
|
+
return {
|
|
11
|
+
ask: a(r.map((e) => ({
|
|
12
|
+
text: e,
|
|
13
|
+
sourceMode: t,
|
|
14
|
+
intent: "read"
|
|
15
|
+
}))),
|
|
16
|
+
change: a(c.map((e) => ({
|
|
17
|
+
text: e,
|
|
18
|
+
sourceMode: n,
|
|
19
|
+
intent: "act"
|
|
20
|
+
}))),
|
|
21
|
+
waitsForApproval: e(n)
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
let u = r(s, c), d = u?.id ?? c, f = a((u?.suggestions ?? []).slice(0, i).map((e) => ({
|
|
25
|
+
text: e,
|
|
26
|
+
sourceMode: d
|
|
27
|
+
})));
|
|
28
|
+
return u?.writeCapable ? {
|
|
29
|
+
ask: null,
|
|
30
|
+
change: f,
|
|
31
|
+
waitsForApproval: e(d)
|
|
32
|
+
} : {
|
|
33
|
+
ask: f,
|
|
34
|
+
change: null,
|
|
35
|
+
waitsForApproval: !1
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function s(e) {
|
|
39
|
+
return [
|
|
40
|
+
"ask",
|
|
41
|
+
...e.changeWaits ? ["change"] : [],
|
|
42
|
+
...e.voiceOffered ? ["voice"] : [],
|
|
43
|
+
...e.avatarOffered ? ["avatar"] : []
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
function c(e) {
|
|
47
|
+
return e >= 5 && e < 12 ? "morning" : e >= 12 && e < 18 ? "afternoon" : "evening";
|
|
48
|
+
}
|
|
49
|
+
function l(e) {
|
|
50
|
+
let t = [e?.firstName?.trim(), e?.name?.trim().split(/\s+/)[0]];
|
|
51
|
+
for (let e of t) if (e && !e.includes("@")) return e;
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
function u(e, t, n, r) {
|
|
55
|
+
return e === "ArrowDown" || e === (r ? "ArrowLeft" : "ArrowRight") ? (t + 1) % n : e === "ArrowUp" || e === (r ? "ArrowRight" : "ArrowLeft") ? (t - 1 + n) % n : e === "Home" ? 0 : e === "End" ? n - 1 : null;
|
|
56
|
+
}
|
|
57
|
+
var d = 600;
|
|
58
|
+
function f(e) {
|
|
59
|
+
let t = null;
|
|
60
|
+
return {
|
|
61
|
+
pointerDown(n) {
|
|
62
|
+
t = n === null ? null : {
|
|
63
|
+
key: n,
|
|
64
|
+
at: e()
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
pointerUp() {
|
|
68
|
+
t &&= {
|
|
69
|
+
key: t.key,
|
|
70
|
+
at: e()
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
clear() {
|
|
74
|
+
t = null;
|
|
75
|
+
},
|
|
76
|
+
accepts(n, r) {
|
|
77
|
+
let i = t;
|
|
78
|
+
t = null;
|
|
79
|
+
let a = i !== null && e() - i.at < 600;
|
|
80
|
+
return !(r && a && i.key !== n);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function p(e, t = m) {
|
|
85
|
+
let n = Array.from(e.querySelectorAll("[data-welcome-fit]"));
|
|
86
|
+
for (let e of n) e.hidden = !1;
|
|
87
|
+
if (e.clientHeight !== 0) for (let r = n.length - 1; r >= 0; --r) {
|
|
88
|
+
if (t(e) <= e.clientHeight + .5) return;
|
|
89
|
+
let i = n[r];
|
|
90
|
+
i && (i.hidden = !0);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function m(e) {
|
|
94
|
+
if (e.clientHeight === 0) return 0;
|
|
95
|
+
let t = e.getBoundingClientRect().top, n = t;
|
|
96
|
+
for (let t of Array.from(e.children)) {
|
|
97
|
+
if (getComputedStyle(t).position === "absolute") continue;
|
|
98
|
+
let e = t.getBoundingClientRect();
|
|
99
|
+
e.height > 0 && (n = Math.max(n, e.bottom));
|
|
100
|
+
}
|
|
101
|
+
let r = parseFloat(getComputedStyle(e).paddingBlockEnd);
|
|
102
|
+
return n - t + (Number.isFinite(r) ? r : 0);
|
|
103
|
+
}
|
|
104
|
+
function h(e, t) {
|
|
105
|
+
let n = Math.max(0, ...e);
|
|
106
|
+
if (t <= 0 || n <= 0) return {
|
|
107
|
+
min: null,
|
|
108
|
+
max: null
|
|
109
|
+
};
|
|
110
|
+
let r = Math.ceil(n);
|
|
111
|
+
return n > t + .5 ? {
|
|
112
|
+
min: r,
|
|
113
|
+
max: null
|
|
114
|
+
} : {
|
|
115
|
+
min: null,
|
|
116
|
+
max: r
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export { d as WELCOME_GESTURE_MS, f as createWelcomeGestureGuard, p as fitWelcomeList, o as welcomeCards, m as welcomeContentHeight, c as welcomeDayPart, l as welcomeFirstName, u as welcomeHeaderTarget, h as welcomeRowBounds, s as welcomeTips };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { KeyboardEvent, MouseEvent, RefObject } from 'react';
|
|
2
|
+
import { AssistantTr } from '../../i18n';
|
|
3
|
+
import { WelcomeCardKey, WelcomeCards, WelcomeGestureGuard, WelcomeTip } from './windowWelcome';
|
|
4
|
+
/**
|
|
5
|
+
* ★ One gesture's pointer record (`createWelcomeGestureGuard`). Listened for on the window, as the
|
|
6
|
+
* mock measured it: capture for the down/up/cancel (before any card handles them), bubble for the
|
|
7
|
+
* click that ends the gesture (after the header's own handler has read the record).
|
|
8
|
+
*/
|
|
9
|
+
export declare function useWelcomeGestureGuard(rowRef: RefObject<HTMLDivElement | null>): WelcomeGestureGuard;
|
|
10
|
+
/** The accordion's state and wiring, for the cards in `keys` (in their order on screen). */
|
|
11
|
+
export interface WelcomeAccordion {
|
|
12
|
+
/** The open card: the one picked while it is drawn, else the first. */
|
|
13
|
+
readonly open: WelcomeCardKey;
|
|
14
|
+
/** Only one card is drawn: no accordion, just its list. */
|
|
15
|
+
readonly single: boolean;
|
|
16
|
+
readonly headId: (key: WelcomeCardKey) => string;
|
|
17
|
+
readonly panelId: (key: WelcomeCardKey) => string;
|
|
18
|
+
/** A header button's ref, so the arrow keys can move focus to it. */
|
|
19
|
+
readonly setHead: (key: WelcomeCardKey, node: HTMLButtonElement | null) => void;
|
|
20
|
+
readonly onHeadClick: (key: WelcomeCardKey) => (event: MouseEvent<HTMLButtonElement>) => void;
|
|
21
|
+
readonly onHeadKeyDown: (index: number) => (event: KeyboardEvent<HTMLButtonElement>) => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* ★ APG ACCORDION, horizontal: one card is always open; a header click opens its card unless the
|
|
25
|
+
* gesture guard turns it down; Arrows, Home and End move between headers (Enter and Space are the
|
|
26
|
+
* button's own).
|
|
27
|
+
*/
|
|
28
|
+
export declare function useWelcomeAccordion(keys: readonly WelcomeCardKey[], guard: WelcomeGestureGuard): WelcomeAccordion;
|
|
29
|
+
/** What the fit reads: everything that changes what the cards DRAW. */
|
|
30
|
+
export interface WelcomeFitInput {
|
|
31
|
+
readonly rowRef: RefObject<HTMLDivElement | null>;
|
|
32
|
+
readonly welcomeRef: RefObject<HTMLDivElement | null>;
|
|
33
|
+
readonly keys: readonly WelcomeCardKey[];
|
|
34
|
+
readonly cards: WelcomeCards;
|
|
35
|
+
readonly tips: readonly WelcomeTip[];
|
|
36
|
+
readonly canConnectSource: boolean;
|
|
37
|
+
readonly page: string | null;
|
|
38
|
+
readonly tr: AssistantTr;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* ★ Each card keeps only the chips that fit (no card scrolls inside itself), and the row is as tall as its tallest
|
|
42
|
+
* content (`welcomeRowBounds`). Re-run whenever what is DRAWN changes: the card set, every chip's words (a mode switch
|
|
43
|
+
* between two Ask-card modes changes only those: BOFF-15066 review R1), the tips and "Connect a source"; and again
|
|
44
|
+
* whenever the welcome (the panel) or a card's box resizes. Each pass first lifts the row's bounds, so a taller panel
|
|
45
|
+
* gets its chips back.
|
|
46
|
+
*
|
|
47
|
+
* Returns the ref each card's content box registers with.
|
|
48
|
+
*/
|
|
49
|
+
export declare function useWelcomeFit({ rowRef, welcomeRef, keys, cards, tips, canConnectSource, page, tr, }: WelcomeFitInput): (key: WelcomeCardKey, node: HTMLDivElement | null) => void;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { createWelcomeGestureGuard as e, fitWelcomeList as t, welcomeContentHeight as n, welcomeHeaderTarget as r, welcomeRowBounds as i } from "./windowWelcome.js";
|
|
2
|
+
import { useEffect as a, useId as o, useLayoutEffect as s, useRef as c, useState as l } from "react";
|
|
3
|
+
// src/shared/assistant/ui/compact/windowWelcomeHooks.ts
|
|
4
|
+
function u(t) {
|
|
5
|
+
let [n] = l(() => e(() => performance.now()));
|
|
6
|
+
return a(() => {
|
|
7
|
+
let e = (e) => {
|
|
8
|
+
let n = t.current;
|
|
9
|
+
return !n || typeof Element > "u" || !(e instanceof Element) || !n.contains(e) ? null : e.closest("[data-welcome-card]")?.getAttribute("data-welcome-card") ?? null;
|
|
10
|
+
}, r = (t) => n.pointerDown(e(t.target)), i = () => n.pointerUp(), a = () => n.clear();
|
|
11
|
+
return window.addEventListener("pointerdown", r, !0), window.addEventListener("pointerup", i, !0), window.addEventListener("pointercancel", a, !0), window.addEventListener("click", a), () => {
|
|
12
|
+
window.removeEventListener("pointerdown", r, !0), window.removeEventListener("pointerup", i, !0), window.removeEventListener("pointercancel", a, !0), window.removeEventListener("click", a);
|
|
13
|
+
};
|
|
14
|
+
}, [n, t]), n;
|
|
15
|
+
}
|
|
16
|
+
function d(e, t) {
|
|
17
|
+
let n = e[0] ?? "tips", [i, a] = l(n), s = o(), u = c({});
|
|
18
|
+
return {
|
|
19
|
+
open: e.includes(i) ? i : n,
|
|
20
|
+
single: e.length === 1,
|
|
21
|
+
headId: (e) => `${s}-head-${e}`,
|
|
22
|
+
panelId: (e) => `${s}-panel-${e}`,
|
|
23
|
+
setHead: (e, t) => {
|
|
24
|
+
u.current[e] = t;
|
|
25
|
+
},
|
|
26
|
+
onHeadClick: (e) => (n) => {
|
|
27
|
+
t.accepts(e, n.detail > 0) && a(e);
|
|
28
|
+
},
|
|
29
|
+
onHeadKeyDown: (t) => (n) => {
|
|
30
|
+
let i = getComputedStyle(n.currentTarget).direction === "rtl", a = r(n.key, t, e.length, i);
|
|
31
|
+
if (a === null) return;
|
|
32
|
+
n.preventDefault();
|
|
33
|
+
let o = e[a];
|
|
34
|
+
o && u.current[o]?.focus();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function f({ rowRef: e, welcomeRef: r, keys: a, cards: o, tips: l, canConnectSource: u, page: d, tr: f }) {
|
|
39
|
+
let p = c({}), m = [
|
|
40
|
+
a.join(),
|
|
41
|
+
...(o.ask ?? []).map((e) => e.text),
|
|
42
|
+
...(o.change ?? []).map((e) => e.text),
|
|
43
|
+
l.join(),
|
|
44
|
+
String(u)
|
|
45
|
+
].join("");
|
|
46
|
+
return s(() => {
|
|
47
|
+
let a = e.current, o = r.current;
|
|
48
|
+
if (!a || !o) return;
|
|
49
|
+
let s = Object.values(p.current).filter((e) => e != null), c = () => {
|
|
50
|
+
a.style.removeProperty("--bw-row-min"), a.style.removeProperty("--bw-row-max");
|
|
51
|
+
for (let e of s) t(e);
|
|
52
|
+
let e = i(s.map(n), a.clientHeight);
|
|
53
|
+
e.min !== null && a.style.setProperty("--bw-row-min", `${e.min}px`), e.max !== null && a.style.setProperty("--bw-row-max", `${e.max}px`);
|
|
54
|
+
};
|
|
55
|
+
if (c(), typeof ResizeObserver > "u") return;
|
|
56
|
+
let l = new ResizeObserver(c);
|
|
57
|
+
l.observe(o);
|
|
58
|
+
for (let e of s) l.observe(e);
|
|
59
|
+
return () => l.disconnect();
|
|
60
|
+
}, [
|
|
61
|
+
m,
|
|
62
|
+
d,
|
|
63
|
+
f,
|
|
64
|
+
e,
|
|
65
|
+
r
|
|
66
|
+
]), (e, t) => {
|
|
67
|
+
p.current[e] = t;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export { d as useWelcomeAccordion, f as useWelcomeFit, u as useWelcomeGestureGuard };
|
|
@@ -22,13 +22,15 @@ export declare function connectSourceActivation(open: () => void, onActivate?: (
|
|
|
22
22
|
* - `action`: a standalone, visibly labelled button, for the empty
|
|
23
23
|
* conversation (BOFF-8158). Not a `menuitem`, because there is no menu
|
|
24
24
|
* around it, and a role that promises one misleads a screen reader.
|
|
25
|
+
* - `card`: the same labelled entry as a row of the compact welcome's open card
|
|
26
|
+
* (BOFF-15066), drawn like the card's chips so it belongs to the card.
|
|
25
27
|
*
|
|
26
28
|
* ★★ ONE COMPONENT FOR BOTH, not a second copy. Everything that decides
|
|
27
29
|
* whether the entry exists and what a click does (the shared availability
|
|
28
30
|
* predicate, a product's own `open` winning over its href, the router getting
|
|
29
31
|
* the resolved path, the browser winning a modified click) lives here once.
|
|
30
32
|
*/
|
|
31
|
-
export type AssistantConnectSourcePresentation = 'menuitem' | 'action';
|
|
33
|
+
export type AssistantConnectSourcePresentation = 'menuitem' | 'action' | 'card';
|
|
32
34
|
export interface AssistantConnectSourceItemProps {
|
|
33
35
|
/** Close the surrounding menu. Fired only when this item actually acts. */
|
|
34
36
|
onActivate?: () => void;
|
|
@@ -11,41 +11,42 @@ function u(e, t) {
|
|
|
11
11
|
t?.(), e();
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
var d = "flex w-full items-center gap-2.5 border-t border-border-subtle px-3 py-2 text-start text-sm text-text-primary transition-colors hover:bg-bg-sunken focus:outline-none focus-visible:bg-bg-sunken", f = "inline-flex items-center gap-2 rounded-lg border border-border-default bg-bg-surface px-3.5 py-2 text-[13px] font-medium leading-tight text-text-primary shadow-sm transition-[color,background-color,border-color] hover:border-action-primary-bg/40 hover:bg-bg-elevated focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong", p = {
|
|
14
|
+
var d = "flex w-full items-center gap-2.5 border-t border-border-subtle px-3 py-2 text-start text-sm text-text-primary transition-colors hover:bg-bg-sunken focus:outline-none focus-visible:bg-bg-sunken", f = "inline-flex items-center gap-2 rounded-lg border border-border-default bg-bg-surface px-3.5 py-2 text-[13px] font-medium leading-tight text-text-primary shadow-sm transition-[color,background-color,border-color] hover:border-action-primary-bg/40 hover:bg-bg-elevated focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong", p = "boff-welcome-chip boff-welcome-source boff-gloss-card", m = {
|
|
15
15
|
menuitem: "assistant-connect-source",
|
|
16
|
-
action: "assistant-connect-source-action"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
action: "assistant-connect-source-action",
|
|
17
|
+
card: "assistant-connect-source-action"
|
|
18
|
+
}, h = ({ onActivate: h, presentation: g = "menuitem" }) => {
|
|
19
|
+
let _ = n(), { href: v, open: y } = a(), b = r(), x = t(v), S = x === "internal" ? e(v) : null, C = o((e) => {
|
|
20
|
+
e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (h?.(), b && S && (e.preventDefault(), Promise.resolve(b(S, "person", { surface: "connect-source" })).catch(() => void 0)));
|
|
20
21
|
}, [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
]),
|
|
25
|
-
return
|
|
22
|
+
b,
|
|
23
|
+
S,
|
|
24
|
+
h
|
|
25
|
+
]), w = _("composer.connectSource", "Connect a source"), T = g === "menuitem", E = T ? "menuitem" : void 0, D = g === "card" ? p : T ? d : f, O = g === "card" ? "boff-welcome-source-icon" : T ? "size-4 flex-shrink-0 text-text-secondary" : "size-4 flex-shrink-0 text-action-primary-bg", k = m[g];
|
|
26
|
+
return y ? /* @__PURE__ */ l("button", {
|
|
26
27
|
type: "button",
|
|
27
|
-
role:
|
|
28
|
-
onClick: u(
|
|
29
|
-
className:
|
|
30
|
-
"data-testid":
|
|
28
|
+
role: E,
|
|
29
|
+
onClick: u(y, h),
|
|
30
|
+
className: D,
|
|
31
|
+
"data-testid": k,
|
|
31
32
|
children: [/* @__PURE__ */ c(s, {
|
|
32
|
-
className:
|
|
33
|
+
className: O,
|
|
33
34
|
"aria-hidden": "true"
|
|
34
|
-
}),
|
|
35
|
-
}) : i(
|
|
36
|
-
href:
|
|
37
|
-
role:
|
|
38
|
-
onClick:
|
|
39
|
-
...
|
|
35
|
+
}), w]
|
|
36
|
+
}) : i(v) ? /* @__PURE__ */ l("a", {
|
|
37
|
+
href: v,
|
|
38
|
+
role: E,
|
|
39
|
+
onClick: C,
|
|
40
|
+
...x === "external" ? {
|
|
40
41
|
target: "_blank",
|
|
41
42
|
rel: "noopener noreferrer"
|
|
42
43
|
} : {},
|
|
43
|
-
className:
|
|
44
|
-
"data-testid":
|
|
44
|
+
className: D,
|
|
45
|
+
"data-testid": k,
|
|
45
46
|
children: [/* @__PURE__ */ c(s, {
|
|
46
|
-
className:
|
|
47
|
+
className: O,
|
|
47
48
|
"aria-hidden": "true"
|
|
48
|
-
}),
|
|
49
|
+
}), w]
|
|
49
50
|
}) : null;
|
|
50
51
|
};
|
|
51
|
-
export {
|
|
52
|
+
export { h as AssistantConnectSourceItem, u as connectSourceActivation };
|