@talk2view/sdk 0.15.0 → 0.16.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.
- package/README.md +47 -2
- package/dist/assistant-ui/index.d.ts +7 -1
- package/dist/assistant-ui/index.d.ts.map +1 -1
- package/dist/assistant-ui/index.js +6 -3
- package/dist/assistant-ui/index.js.map +1 -1
- package/dist/auth.d.ts +19 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +36 -13
- package/dist/auth.js.map +1 -1
- package/dist/chat/auth-gate.d.ts +42 -0
- package/dist/chat/auth-gate.d.ts.map +1 -0
- package/dist/chat/auth-gate.js +93 -0
- package/dist/chat/auth-gate.js.map +1 -0
- package/dist/chat/chat.d.ts +36 -0
- package/dist/chat/chat.d.ts.map +1 -0
- package/dist/chat/chat.js +124 -0
- package/dist/chat/chat.js.map +1 -0
- package/dist/chat/composer-extras.d.ts +23 -0
- package/dist/chat/composer-extras.d.ts.map +1 -0
- package/dist/chat/composer-extras.js +48 -0
- package/dist/chat/composer-extras.js.map +1 -0
- package/dist/chat/hooks/use-attachment-src.d.ts +2 -0
- package/dist/chat/hooks/use-attachment-src.d.ts.map +1 -0
- package/dist/chat/hooks/use-attachment-src.js +38 -0
- package/dist/chat/hooks/use-attachment-src.js.map +1 -0
- package/dist/chat/hooks/use-copy-to-clipboard.d.ts +8 -0
- package/dist/chat/hooks/use-copy-to-clipboard.d.ts.map +1 -0
- package/dist/chat/hooks/use-copy-to-clipboard.js +16 -0
- package/dist/chat/hooks/use-copy-to-clipboard.js.map +1 -0
- package/dist/chat/index.d.ts +32 -0
- package/dist/chat/index.d.ts.map +1 -0
- package/dist/chat/index.js +35 -0
- package/dist/chat/index.js.map +1 -0
- package/dist/chat/inject-styles.d.ts +2 -0
- package/dist/chat/inject-styles.d.ts.map +1 -0
- package/dist/chat/inject-styles.js +23 -0
- package/dist/chat/inject-styles.js.map +1 -0
- package/dist/chat/launcher.d.ts +37 -0
- package/dist/chat/launcher.d.ts.map +1 -0
- package/dist/chat/launcher.js +343 -0
- package/dist/chat/launcher.js.map +1 -0
- package/dist/chat/lib/cn.d.ts +19 -0
- package/dist/chat/lib/cn.d.ts.map +1 -0
- package/dist/chat/lib/cn.js +20 -0
- package/dist/chat/lib/cn.js.map +1 -0
- package/dist/chat/lib/dictation-phase.d.ts +9 -0
- package/dist/chat/lib/dictation-phase.d.ts.map +1 -0
- package/dist/chat/lib/dictation-phase.js +33 -0
- package/dist/chat/lib/dictation-phase.js.map +1 -0
- package/dist/chat/lib/guard.d.ts +4 -0
- package/dist/chat/lib/guard.d.ts.map +1 -0
- package/dist/chat/lib/guard.js +41 -0
- package/dist/chat/lib/guard.js.map +1 -0
- package/dist/chat/lib/launcher-variant.d.ts +33 -0
- package/dist/chat/lib/launcher-variant.d.ts.map +1 -0
- package/dist/chat/lib/launcher-variant.js +109 -0
- package/dist/chat/lib/launcher-variant.js.map +1 -0
- package/dist/chat/lib/portal-host.d.ts +13 -0
- package/dist/chat/lib/portal-host.d.ts.map +1 -0
- package/dist/chat/lib/portal-host.js +58 -0
- package/dist/chat/lib/portal-host.js.map +1 -0
- package/dist/chat/markdown.d.ts +32 -0
- package/dist/chat/markdown.d.ts.map +1 -0
- package/dist/chat/markdown.js +18 -0
- package/dist/chat/markdown.js.map +1 -0
- package/dist/chat/provider.d.ts +113 -0
- package/dist/chat/provider.d.ts.map +1 -0
- package/dist/chat/provider.js +176 -0
- package/dist/chat/provider.js.map +1 -0
- package/dist/chat/tool-fallback.d.ts +39 -0
- package/dist/chat/tool-fallback.d.ts.map +1 -0
- package/dist/chat/tool-fallback.js +167 -0
- package/dist/chat/tool-fallback.js.map +1 -0
- package/dist/chat/ui/avatar.d.ts +12 -0
- package/dist/chat/ui/avatar.d.ts.map +1 -0
- package/dist/chat/ui/avatar.js +24 -0
- package/dist/chat/ui/avatar.js.map +1 -0
- package/dist/chat/ui/button.d.ts +9 -0
- package/dist/chat/ui/button.d.ts.map +1 -0
- package/dist/chat/ui/button.js +35 -0
- package/dist/chat/ui/button.js.map +1 -0
- package/dist/chat/ui/collapsible.d.ts +6 -0
- package/dist/chat/ui/collapsible.d.ts.map +1 -0
- package/dist/chat/ui/collapsible.js +13 -0
- package/dist/chat/ui/collapsible.js.map +1 -0
- package/dist/chat/ui/dialog.d.ts +18 -0
- package/dist/chat/ui/dialog.d.ts.map +1 -0
- package/dist/chat/ui/dialog.js +42 -0
- package/dist/chat/ui/dialog.js.map +1 -0
- package/dist/chat/ui/input.d.ts +4 -0
- package/dist/chat/ui/input.d.ts.map +1 -0
- package/dist/chat/ui/input.js +8 -0
- package/dist/chat/ui/input.js.map +1 -0
- package/dist/chat/ui/skeleton.d.ts +3 -0
- package/dist/chat/ui/skeleton.d.ts.map +1 -0
- package/dist/chat/ui/skeleton.js +7 -0
- package/dist/chat/ui/skeleton.js.map +1 -0
- package/dist/chat/ui/textarea.d.ts +4 -0
- package/dist/chat/ui/textarea.d.ts.map +1 -0
- package/dist/chat/ui/textarea.js +7 -0
- package/dist/chat/ui/textarea.js.map +1 -0
- package/dist/chat/ui/tooltip.d.ts +7 -0
- package/dist/chat/ui/tooltip.d.ts.map +1 -0
- package/dist/chat/ui/tooltip.js +22 -0
- package/dist/chat/ui/tooltip.js.map +1 -0
- package/dist/chat/vendor/attachment.aui.d.ts +5 -0
- package/dist/chat/vendor/attachment.aui.d.ts.map +1 -0
- package/dist/chat/vendor/attachment.aui.js +79 -0
- package/dist/chat/vendor/attachment.aui.js.map +1 -0
- package/dist/chat/vendor/file.d.ts +41 -0
- package/dist/chat/vendor/file.d.ts.map +1 -0
- package/dist/chat/vendor/file.js +137 -0
- package/dist/chat/vendor/file.js.map +1 -0
- package/dist/chat/vendor/follow-up-suggestions.aui.d.ts +3 -0
- package/dist/chat/vendor/follow-up-suggestions.aui.d.ts.map +1 -0
- package/dist/chat/vendor/follow-up-suggestions.aui.js +45 -0
- package/dist/chat/vendor/follow-up-suggestions.aui.js.map +1 -0
- package/dist/chat/vendor/image.d.ts +47 -0
- package/dist/chat/vendor/image.d.ts.map +1 -0
- package/dist/chat/vendor/image.js +258 -0
- package/dist/chat/vendor/image.js.map +1 -0
- package/dist/chat/vendor/markdown-text.d.ts +8 -0
- package/dist/chat/vendor/markdown-text.d.ts.map +1 -0
- package/dist/chat/vendor/markdown-text.js +73 -0
- package/dist/chat/vendor/markdown-text.js.map +1 -0
- package/dist/chat/vendor/reasoning.aui.d.ts +22 -0
- package/dist/chat/vendor/reasoning.aui.d.ts.map +1 -0
- package/dist/chat/vendor/reasoning.aui.js +56 -0
- package/dist/chat/vendor/reasoning.aui.js.map +1 -0
- package/dist/chat/vendor/reasoning.d.ts +35 -0
- package/dist/chat/vendor/reasoning.d.ts.map +1 -0
- package/dist/chat/vendor/reasoning.js +112 -0
- package/dist/chat/vendor/reasoning.js.map +1 -0
- package/dist/chat/vendor/thread-list.aui.d.ts +37 -0
- package/dist/chat/vendor/thread-list.aui.d.ts.map +1 -0
- package/dist/chat/vendor/thread-list.aui.js +154 -0
- package/dist/chat/vendor/thread-list.aui.js.map +1 -0
- package/dist/chat/vendor/thread.aui.d.ts +47 -0
- package/dist/chat/vendor/thread.aui.d.ts.map +1 -0
- package/dist/chat/vendor/thread.aui.js +176 -0
- package/dist/chat/vendor/thread.aui.js.map +1 -0
- package/dist/chat/vendor/tool-fallback.aui.d.ts +39 -0
- package/dist/chat/vendor/tool-fallback.aui.d.ts.map +1 -0
- package/dist/chat/vendor/tool-fallback.aui.js +251 -0
- package/dist/chat/vendor/tool-fallback.aui.js.map +1 -0
- package/dist/chat/vendor/tool-group.aui.d.ts +34 -0
- package/dist/chat/vendor/tool-group.aui.d.ts.map +1 -0
- package/dist/chat/vendor/tool-group.aui.js +60 -0
- package/dist/chat/vendor/tool-group.aui.js.map +1 -0
- package/dist/chat/vendor/tooltip-icon-button.d.ts +8 -0
- package/dist/chat/vendor/tooltip-icon-button.d.ts.map +1 -0
- package/dist/chat/vendor/tooltip-icon-button.js +11 -0
- package/dist/chat/vendor/tooltip-icon-button.js.map +1 -0
- package/dist/chat/views/account.d.ts +6 -0
- package/dist/chat/views/account.d.ts.map +1 -0
- package/dist/chat/views/account.js +128 -0
- package/dist/chat/views/account.js.map +1 -0
- package/dist/chat/views/settings.d.ts +2 -0
- package/dist/chat/views/settings.d.ts.map +1 -0
- package/dist/chat/views/settings.js +104 -0
- package/dist/chat/views/settings.js.map +1 -0
- package/dist/chat/views/thread-list.d.ts +10 -0
- package/dist/chat/views/thread-list.d.ts.map +1 -0
- package/dist/chat/views/thread-list.js +21 -0
- package/dist/chat/views/thread-list.js.map +1 -0
- package/dist/chat/welcome.d.ts +10 -0
- package/dist/chat/welcome.d.ts.map +1 -0
- package/dist/chat/welcome.js +9 -0
- package/dist/chat/welcome.js.map +1 -0
- package/dist/chat-css.d.ts +1 -0
- package/dist/chat-css.js +1 -0
- package/dist/chat.css +2 -0
- package/dist/chat.isolated.css +3819 -0
- package/dist/chat.raw.css +3829 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/sessions.d.ts.map +1 -1
- package/dist/sessions.js +6 -2
- package/dist/sessions.js.map +1 -1
- package/package.json +46 -11
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* `<Talk2ViewChat>` — the packaged chat, filling whatever box you put it in: a
|
|
5
|
+
* Word task pane, a partner's side panel, a page section.
|
|
6
|
+
*
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { Talk2ViewChat } from '@talk2view/sdk/chat';
|
|
9
|
+
* import '@talk2view/sdk/chat.css';
|
|
10
|
+
*
|
|
11
|
+
* <Talk2ViewChat partnerKey="pk_live_…" welcome={{ suggestions: ['What can you do?'] }} />
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* The frame is ported from the website's assistant modal, minus the popover:
|
|
15
|
+
* a header of one-tap views over a thread that never unmounts, so switching to
|
|
16
|
+
* Settings and back keeps the conversation, the scroll position and any
|
|
17
|
+
* half-typed message.
|
|
18
|
+
*/
|
|
19
|
+
import { useEffect, useMemo, useRef, useState, } from 'react';
|
|
20
|
+
import { HistoryIcon, PlusIcon, SettingsIcon, UserRoundIcon } from 'lucide-react';
|
|
21
|
+
import { ThreadListPrimitive, useAuiState } from '@assistant-ui/react';
|
|
22
|
+
import { Thread, ComposerExtrasContext } from './vendor/thread.aui.js';
|
|
23
|
+
import { TooltipIconButton } from './vendor/tooltip-icon-button.js';
|
|
24
|
+
import { cn } from './lib/cn.js';
|
|
25
|
+
import { ChatProvider, useChatContext } from './provider.js';
|
|
26
|
+
import { Welcome } from './welcome.js';
|
|
27
|
+
import { ComposerDictation } from './composer-extras.js';
|
|
28
|
+
import { ToolFallback, ToolGroup } from './tool-fallback.js';
|
|
29
|
+
import { useAuthGate } from './auth-gate.js';
|
|
30
|
+
import { AccountView } from './views/account.js';
|
|
31
|
+
import { SettingsView } from './views/settings.js';
|
|
32
|
+
import { ThreadListView } from './views/thread-list.js';
|
|
33
|
+
const VIEW_TITLES = {
|
|
34
|
+
thread: 'New Chat',
|
|
35
|
+
list: 'Threads',
|
|
36
|
+
settings: 'Settings',
|
|
37
|
+
account: 'Account',
|
|
38
|
+
};
|
|
39
|
+
export function Talk2ViewChat(props) {
|
|
40
|
+
const { className, fontFamily, footer } = props;
|
|
41
|
+
return (_jsx("div", { className: cn('t2v-chat', className),
|
|
42
|
+
// The host page's font unless the integrator names one; nothing is fetched.
|
|
43
|
+
style: fontFamily ? { ['--t2v-font']: fontFamily } : undefined, children: _jsx(ChatProvider, { ...props, children: _jsx(ChatShell, { footer: footer }) }) }));
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The frame without the outer `.t2v-chat` box, so the launcher (Task 6) can
|
|
47
|
+
* render the same thing inside its popover.
|
|
48
|
+
*/
|
|
49
|
+
export const ChatShell = ({ footer, headerEnd, view: given, onViewChange }) => {
|
|
50
|
+
const { client, features, behaviour, limits } = useChatContext();
|
|
51
|
+
const [own, setOwn] = useState('thread');
|
|
52
|
+
const gate = useAuthGate(client, behaviour.current.allowAnonymous, limits);
|
|
53
|
+
const chosen = given ?? own;
|
|
54
|
+
// Behind the gate the thread is not somewhere to go back to: Settings and the
|
|
55
|
+
// thread list stay reachable, but "back" lands on sign-in until there is an
|
|
56
|
+
// account behind it.
|
|
57
|
+
const view = gate.gated && chosen === 'thread' ? 'account' : chosen;
|
|
58
|
+
const setView = (next) => {
|
|
59
|
+
setOwn(next);
|
|
60
|
+
onViewChange?.(next);
|
|
61
|
+
};
|
|
62
|
+
// An approval stops the agent until somebody answers it, and the thread is
|
|
63
|
+
// `inert` whenever another view is open — so a card arriving while the
|
|
64
|
+
// end-user is in Settings or the thread list is on screen and unclickable,
|
|
65
|
+
// with nothing saying why. Bring the thread back.
|
|
66
|
+
//
|
|
67
|
+
// Account is the exception: it holds a half-typed sign-in, and throwing that
|
|
68
|
+
// away is a worse trade than a decision that waits a moment longer.
|
|
69
|
+
const latest = useRef({ view, setView });
|
|
70
|
+
latest.current = { view, setView };
|
|
71
|
+
useEffect(() => client.on('approvalChange', (approval) => {
|
|
72
|
+
const now = latest.current;
|
|
73
|
+
if (approval && now.view !== 'thread' && now.view !== 'account')
|
|
74
|
+
now.setView('thread');
|
|
75
|
+
}), [client]);
|
|
76
|
+
const components = useMemo(() => ({ Welcome, ToolFallback, ToolGroup }), []);
|
|
77
|
+
// The voice button replaces upstream's mic; the attach button goes when files
|
|
78
|
+
// are off, because upstream renders it whether or not the runtime takes one.
|
|
79
|
+
const extras = useMemo(() => ({ dictate: _jsx(ComposerDictation, {}), attachments: features.attachments }), [features.attachments]);
|
|
80
|
+
// Mounted once: switching views must not throw away the conversation, the
|
|
81
|
+
// scroll position or a half-typed message.
|
|
82
|
+
const thread = useMemo(() => (_jsx(ComposerExtrasContext.Provider, { value: extras, children: _jsx(Thread, { components: components }) })), [components, extras]);
|
|
83
|
+
return (_jsxs("div", { className: "t2v-chat-shell aui-root bg-popover text-popover-foreground flex h-full min-h-0 flex-col overflow-clip text-base antialiased", children: [_jsx(ChatHeader, { view: view, onViewChange: setView, end: headerEnd, signedIn: gate.account.status === 'signed-in' }), _jsxs("div", { className: "t2v-chat-body aui-modal-body relative min-h-0 flex-1", children: [_jsx("div", {
|
|
84
|
+
// An inline ref runs again on every render, which is what keeps this in
|
|
85
|
+
// step with the view. Inert, not unmounted: see `thread` above.
|
|
86
|
+
ref: (node) => {
|
|
87
|
+
if (node)
|
|
88
|
+
node.inert = view !== 'thread';
|
|
89
|
+
}, className: "aui-modal-thread h-full", children: thread }), view === 'list' && features.threadList && (_jsx(ThreadListView, { onSelect: () => setView('thread') })), view === 'settings' && features.settings && _jsx(SettingsView, {}), view === 'account' && (_jsx(AccountView, { reason: gate.reason, onSignedIn: () => setView('thread') }))] }), footer ? (_jsx("div", { className: "t2v-chat-footer text-muted-foreground border-foreground/10 shrink-0 border-t px-3.5 py-2 text-xs", children: footer })) : null] }));
|
|
90
|
+
};
|
|
91
|
+
const ChatHeader = ({ view, onViewChange, end, signedIn }) => {
|
|
92
|
+
const { features } = useChatContext();
|
|
93
|
+
const title = useAuiState((s) => s.threadListItem.title);
|
|
94
|
+
const hasThreads = useAuiState((s) => s.threads.threadIds.length > 0);
|
|
95
|
+
const titleRef = useRef(null);
|
|
96
|
+
const shownViewRef = useRef(view);
|
|
97
|
+
// Switching view moves the content under an unmoved focus ring; send focus to
|
|
98
|
+
// the heading so a screen reader announces what is now on screen — but only
|
|
99
|
+
// when focus was nowhere in particular, never stealing it from a control.
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
if (shownViewRef.current === view)
|
|
102
|
+
return;
|
|
103
|
+
shownViewRef.current = view;
|
|
104
|
+
const heading = titleRef.current;
|
|
105
|
+
const active = document.activeElement;
|
|
106
|
+
if (active === document.body || active === heading?.closest("[role='dialog']")) {
|
|
107
|
+
heading?.focus();
|
|
108
|
+
}
|
|
109
|
+
}, [view]);
|
|
110
|
+
// A one-tap toggle: the button that opened a view closes it again.
|
|
111
|
+
const toggle = (target) => () => onViewChange(view === target ? 'thread' : target);
|
|
112
|
+
return (_jsxs("div", { className: "t2v-chat-header aui-modal-header border-foreground/10 flex h-11 shrink-0 items-center gap-2 border-b ps-3.5 pe-2", children: [_jsx("h2", { ref: titleRef, tabIndex: -1, className: "aui-modal-title min-w-0 flex-1 truncate text-[13px] font-medium outline-none", children: view === 'thread' ? title || VIEW_TITLES.thread : VIEW_TITLES[view] }), _jsxs("div", { className: "flex shrink-0 items-center gap-0.5", children: [features.account && (_jsxs(TooltipIconButton
|
|
113
|
+
// "Account" in both states. An icon-only button's name should say
|
|
114
|
+
// where it goes, and "Sign in" here collided with the account form's
|
|
115
|
+
// own submit button — two controls, one name, two different actions.
|
|
116
|
+
, {
|
|
117
|
+
// "Account" in both states. An icon-only button's name should say
|
|
118
|
+
// where it goes, and "Sign in" here collided with the account form's
|
|
119
|
+
// own submit button — two controls, one name, two different actions.
|
|
120
|
+
tooltip: "Account", side: "bottom", "aria-pressed": view === 'account', className: cn(HEADER_BUTTON, 'relative'), onClick: toggle('account'), children: [_jsx(UserRoundIcon, { className: "size-3.5" }), signedIn ? (_jsx("span", { "aria-hidden": "true", className: "bg-primary absolute end-1 top-1 size-1.5 rounded-full max-sm:end-2 max-sm:top-2" })) : null] })), features.settings && (_jsx(TooltipIconButton, { tooltip: "Settings", side: "bottom", "aria-pressed": view === 'settings', className: HEADER_BUTTON, onClick: toggle('settings'), children: _jsx(SettingsIcon, { className: "size-3.5" }) })), features.threadList && (_jsx(TooltipIconButton, { tooltip: "Threads", side: "bottom", "aria-pressed": view === 'list', disabled: !hasThreads && view === 'thread', className: HEADER_BUTTON, onClick: toggle('list'), children: _jsx(HistoryIcon, { className: "size-3.5" }) })), _jsx(ThreadListPrimitive.New, { render: _jsx(TooltipIconButton, { tooltip: "New Thread", side: "bottom", className: HEADER_BUTTON, onClick: () => onViewChange('thread') }), children: _jsx(PlusIcon, { className: "size-3.5" }) }), end] })] }));
|
|
121
|
+
};
|
|
122
|
+
/* 28px on a mouse, 36px under a finger — the touch target, not the icon. */
|
|
123
|
+
const HEADER_BUTTON = 'text-muted-foreground hover:text-foreground aria-pressed:bg-muted aria-pressed:text-foreground size-7 max-sm:size-9 rounded-md p-0';
|
|
124
|
+
//# sourceMappingURL=chat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/chat/chat.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,SAAS,EACT,OAAO,EACP,MAAM,EACN,QAAQ,GAIT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAyB,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,cAAc,EAA2B,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,c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,aAAa,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,GACrC,YAGJ,KAAC,QAAQ,IAAC,SAAS,EAAC,UAAU,GAAG,GACT,EACzB,GAAG,IACA,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,4EAA4E;AAC5E,MAAM,aAAa,GACjB,oIAAoI,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The voice button, mounted into the composer through the one slot the vendored
|
|
3
|
+
* thread carries (`scripts/chat/patches/thread.aui.patch`). Supplying the slot
|
|
4
|
+
* replaces upstream's mic and stop buttons, so this renders both states.
|
|
5
|
+
*
|
|
6
|
+
* One button for the whole dictation: the inverted wave face. While listening
|
|
7
|
+
* the bars move like a level meter and a tap stops. After the tap the clip is on
|
|
8
|
+
* its way to the engine: the same bars settle into short dashes that pulse left
|
|
9
|
+
* to right, a beam circles the face, and taps are ignored. The glyph never swaps
|
|
10
|
+
* for a different icon and the button never remounts, so nothing flickers.
|
|
11
|
+
*/
|
|
12
|
+
import type { FC } from 'react';
|
|
13
|
+
export declare const BrandWaveform: FC<{
|
|
14
|
+
mode?: 'rest' | 'live' | 'busy';
|
|
15
|
+
className?: string;
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Both halves of the voice control. The slot sits inside the thread's own
|
|
19
|
+
* `capabilities.dictation` gate, so a runtime without a dictation adapter shows
|
|
20
|
+
* nothing at all.
|
|
21
|
+
*/
|
|
22
|
+
export declare const ComposerDictation: FC;
|
|
23
|
+
//# sourceMappingURL=composer-extras.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composer-extras.d.ts","sourceRoot":"","sources":["../../src/chat/composer-extras.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAiBhC,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CA8BrF,CAAC;AAqDF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAS/B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { AuiIf, ComposerPrimitive } from '@assistant-ui/react';
|
|
4
|
+
import { TooltipIconButton } from './vendor/tooltip-icon-button.js';
|
|
5
|
+
import { cn } from './lib/cn.js';
|
|
6
|
+
import { useDictationPhase } from './lib/dictation-phase.js';
|
|
7
|
+
import { useChatContext } from './provider.js';
|
|
8
|
+
/* The Talk2View voice mark — T2Board's BrandWaveform, geometry copied from
|
|
9
|
+
T2BoardKeyboard/Keyboard/BrandWaveform.swift: four SHARP bars (the brand's
|
|
10
|
+
dash, never rounded caps) at 0.42 / 1.0 / 0.66 / 0.30 of the height, each 44%
|
|
11
|
+
of its slot wide, in a 1.1 : 1 box, growing from the middle out. The face
|
|
12
|
+
follows T2Board too: Smoke on Teal at rest, inverting to Teal on Smoke while
|
|
13
|
+
listening. `live` moves the bars like a level meter and `busy` pulses them in
|
|
14
|
+
order; both say what the mic is doing, so they run under reduced motion too. */
|
|
15
|
+
const WAVE_LEVELS = [0.42, 1.0, 0.66, 0.3];
|
|
16
|
+
const BUSY_LEVELS = [0.5, 0.5, 0.5, 0.5];
|
|
17
|
+
export const BrandWaveform = ({ mode = 'rest', className, }) => (_jsx("svg", { viewBox: "0 0 110 100", fill: "currentColor", "aria-hidden": "true",
|
|
18
|
+
// 40% of the 28px face, as in BrandWaveformFace. size-auto: ui/button.tsx
|
|
19
|
+
// shrinks any svg without a `size-` class to 16px.
|
|
20
|
+
className: cn('size-auto h-[11px] w-[12px] overflow-visible', className), children: (mode === 'busy' ? BUSY_LEVELS : WAVE_LEVELS).map((level, i) => (_jsx("rect", { x: 27.5 * (i + 0.5) - 6.05, y: 50 - level * 50, width: 12.1, height: level * 100, className: mode === 'rest' ? undefined : `t2v-wave-bar t2v-wave-${mode}`,
|
|
21
|
+
// Listening: out of phase, like speech. Busy: in order, left to right.
|
|
22
|
+
style: mode === 'rest'
|
|
23
|
+
? undefined
|
|
24
|
+
: { animationDelay: mode === 'live' ? `${i * -0.23}s` : `${i * 0.14}s` } }, i))) }));
|
|
25
|
+
const ComposerStartDictation = () => (_jsx(ComposerPrimitive.Dictate, { render: _jsx(TooltipIconButton, { tooltip: "Voice input", side: "bottom", type: "button", variant: "ghost", size: "icon",
|
|
26
|
+
// Tokens, not hexes: Teal on Smoke by default, because that is what
|
|
27
|
+
// `--primary` / `--primary-foreground` are, and a partner who rethemes
|
|
28
|
+
// the chat gets a voice button that follows. `hover:` repeats them so
|
|
29
|
+
// the ghost variant cannot repaint the face on hover; brightness is
|
|
30
|
+
// what gives the press its feedback.
|
|
31
|
+
className: "aui-composer-dictate bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground size-7 rounded-full hover:brightness-95", "aria-label": "Start voice input" }), children: _jsx(BrandWaveform, { className: "aui-composer-dictate-icon" }) }));
|
|
32
|
+
const ComposerStopDictation = () => {
|
|
33
|
+
const { dictation } = useChatContext();
|
|
34
|
+
const busy = useDictationPhase(dictation) === 'transcribing';
|
|
35
|
+
return (_jsx(ComposerPrimitive.StopDictation, { render: _jsx(TooltipIconButton, { tooltip: busy ? 'Transcribing…' : 'Stop dictation', side: "bottom", type: "button", variant: "ghost", size: "icon", "aria-label": busy ? 'Transcribing' : 'Stop voice input', "aria-busy": busy || undefined, "data-busy": busy ? '' : undefined,
|
|
36
|
+
// The inverted face, in the same two tokens the other way round. The
|
|
37
|
+
// dark override stays: `--primary-foreground` is Smoke in both
|
|
38
|
+
// palettes, and a Smoke face on the dark chat's Smoke ground would
|
|
39
|
+
// vanish — `--secondary` is the dark palette's raised surface.
|
|
40
|
+
className: "aui-composer-stop-dictation t2v-voice-face bg-primary-foreground text-primary hover:bg-primary-foreground hover:text-primary dark:bg-secondary dark:hover:bg-secondary relative size-7 rounded-full data-busy:pointer-events-none data-busy:cursor-progress" }), children: _jsx(BrandWaveform, { mode: busy ? 'busy' : 'live', className: "aui-composer-stop-dictation-icon" }) }));
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Both halves of the voice control. The slot sits inside the thread's own
|
|
44
|
+
* `capabilities.dictation` gate, so a runtime without a dictation adapter shows
|
|
45
|
+
* nothing at all.
|
|
46
|
+
*/
|
|
47
|
+
export const ComposerDictation = () => (_jsxs(_Fragment, { children: [_jsx(AuiIf, { condition: (s) => s.composer.dictation == null, children: _jsx(ComposerStartDictation, {}) }), _jsx(AuiIf, { condition: (s) => s.composer.dictation != null, children: _jsx(ComposerStopDictation, {}) })] }));
|
|
48
|
+
//# sourceMappingURL=composer-extras.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composer-extras.js","sourceRoot":"","sources":["../../src/chat/composer-extras.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAcb,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;kFAMkF;AAClF,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;AAC3C,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAEzC,MAAM,CAAC,MAAM,aAAa,GAAgE,CAAC,EACzF,IAAI,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,IAAI,YACnD,KAAC,qBAAqB,KAAG,GACnB,IACP,CACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-attachment-src.d.ts","sourceRoot":"","sources":["../../../src/chat/hooks/use-attachment-src.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,gBAAgB,0BAa5B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { useAuiState } from "@assistant-ui/react";
|
|
4
|
+
import { useShallow } from "zustand/react/shallow";
|
|
5
|
+
const useFileSrc = (file) => {
|
|
6
|
+
const [entry, setEntry] = useState(undefined);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
// The object URL is a browser resource whose lifetime has to straddle
|
|
9
|
+
// commit, so allocation, revocation, and clearing the entry that names a
|
|
10
|
+
// revoked URL all belong to the effect.
|
|
11
|
+
if (!file) {
|
|
12
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
13
|
+
setEntry(undefined);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const objectUrl = URL.createObjectURL(file);
|
|
17
|
+
setEntry({ file, url: objectUrl });
|
|
18
|
+
return () => {
|
|
19
|
+
URL.revokeObjectURL(objectUrl);
|
|
20
|
+
};
|
|
21
|
+
}, [file]);
|
|
22
|
+
return entry !== undefined && entry.file === file ? entry.url : undefined;
|
|
23
|
+
};
|
|
24
|
+
export const useAttachmentSrc = () => {
|
|
25
|
+
const { file, src } = useAuiState(useShallow((s) => {
|
|
26
|
+
if (s.attachment.type !== "image")
|
|
27
|
+
return {};
|
|
28
|
+
if (s.attachment.file)
|
|
29
|
+
return { file: s.attachment.file };
|
|
30
|
+
const src = s.attachment.content?.filter((c) => c.type === "image")[0]
|
|
31
|
+
?.image;
|
|
32
|
+
if (!src)
|
|
33
|
+
return {};
|
|
34
|
+
return { src };
|
|
35
|
+
}));
|
|
36
|
+
return useFileSrc(file) ?? src;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=use-attachment-src.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-attachment-src.js","sourceRoot":"","sources":["../../../src/chat/hooks/use-attachment-src.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,UAAU,GAAG,CAAC,IAAsB,EAAE,EAAE;IAC5C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAChC,SAAS,CACV,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,sEAAsE;QACtE,yEAAyE;QACzE,wCAAwC;QACxC,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,2DAA2D;YAC3D,QAAQ,CAAC,SAAS,CAAC,CAAC;YACpB,OAAO;QACT,CAAC;QAED,MAAM,SAAS,GAAG,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC5C,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC;QAEnC,OAAO,GAAG,EAAE;YACV,GAAG,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QACjC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;AAC5E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,WAAW,CAC/B,UAAU,CAAC,CAAC,CAAC,EAAiC,EAAE;QAC9C,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,KAAK,OAAO;YAAE,OAAO,EAAE,CAAC;QAC7C,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI;YAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QAC1D,MAAM,GAAG,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;YACpE,EAAE,KAAK,CAAC;QACV,IAAI,CAAC,GAAG;YAAE,OAAO,EAAE,CAAC;QACpB,OAAO,EAAE,GAAG,EAAE,CAAC;IACjB,CAAC,CAAC,CACH,CAAC;IAEF,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;AACjC,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type UseCopyToClipboardOptions = {
|
|
2
|
+
copiedDuration?: number;
|
|
3
|
+
};
|
|
4
|
+
export declare const useCopyToClipboard: ({ copiedDuration, }?: UseCopyToClipboardOptions) => {
|
|
5
|
+
isCopied: boolean;
|
|
6
|
+
copyToClipboard: (value: string) => void;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=use-copy-to-clipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-copy-to-clipboard.d.ts","sourceRoot":"","sources":["../../../src/chat/hooks/use-copy-to-clipboard.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,yBAAyB,GAAG;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,sBAEhC,yBAA8B;;6BAGC,MAAM;CAevC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
export const useCopyToClipboard = ({ copiedDuration = 3000, } = {}) => {
|
|
4
|
+
const [isCopied, setIsCopied] = useState(false);
|
|
5
|
+
const copyToClipboard = (value) => {
|
|
6
|
+
if (!value || typeof navigator === "undefined" || !navigator.clipboard) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
navigator.clipboard.writeText(value).then(() => {
|
|
10
|
+
setIsCopied(true);
|
|
11
|
+
setTimeout(() => setIsCopied(false), copiedDuration);
|
|
12
|
+
}, () => { });
|
|
13
|
+
};
|
|
14
|
+
return { isCopied, copyToClipboard };
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=use-copy-to-clipboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-copy-to-clipboard.js","sourceRoot":"","sources":["../../../src/chat/hooks/use-copy-to-clipboard.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMjC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,cAAc,GAAG,IAAI,MACQ,EAAE,EAAE,EAAE;IACnC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAEzD,MAAM,eAAe,GAAG,CAAC,KAAa,EAAE,EAAE;QACxC,IAAI,CAAC,KAAK,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;YACvE,OAAO;QACT,CAAC;QAED,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CACvC,GAAG,EAAE;YACH,WAAW,CAAC,IAAI,CAAC,CAAC;YAClB,UAAU,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,CAAC;QACvD,CAAC,EACD,GAAG,EAAE,GAAE,CAAC,CACT,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;AACvC,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@talk2view/sdk/chat` — the branded Talk2View chat, ready to render.
|
|
3
|
+
*
|
|
4
|
+
* ```tsx
|
|
5
|
+
* import { Talk2ViewChat } from '@talk2view/sdk/chat';
|
|
6
|
+
* import '@talk2view/sdk/chat.css';
|
|
7
|
+
*
|
|
8
|
+
* export function Panel() {
|
|
9
|
+
* return <Talk2ViewChat partnerKey="pk_live_…" />;
|
|
10
|
+
* }
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* `<Talk2ViewChatLauncher>` is the same chat in a floating panel instead: a mark
|
|
14
|
+
* in the corner of the page, a popover on a desktop and a full-screen sheet on a
|
|
15
|
+
* phone.
|
|
16
|
+
*
|
|
17
|
+
* No Tailwind, no PostCSS, no copied files: one component and one stylesheet.
|
|
18
|
+
* Everything renders inside `<div class="t2v-chat">`, which is also the element
|
|
19
|
+
* to re-theme — the custom properties declared on it (`--radius`, the shadcn
|
|
20
|
+
* colour tokens, `--t2v-font`) are the whole surface.
|
|
21
|
+
*
|
|
22
|
+
* A host that cannot import CSS calls {@link injectTalk2ViewChatStyles} instead.
|
|
23
|
+
*
|
|
24
|
+
* @packageDocumentation
|
|
25
|
+
*/
|
|
26
|
+
export { Talk2ViewChat } from './chat.js';
|
|
27
|
+
export { Talk2ViewChatLauncher, type Talk2ViewChatLauncherProps, } from './launcher.js';
|
|
28
|
+
export type { LauncherColourway } from './lib/launcher-variant.js';
|
|
29
|
+
export { useTalk2ViewChatClient } from './provider.js';
|
|
30
|
+
export type { Talk2ViewChatProps, Talk2ViewChatFeatures, Talk2ViewChatWelcome, } from './provider.js';
|
|
31
|
+
export { injectTalk2ViewChatStyles } from './inject-styles.js';
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/chat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAMH,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACL,qBAAqB,EACrB,KAAK,0BAA0B,GAChC,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EACV,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@talk2view/sdk/chat` — the branded Talk2View chat, ready to render.
|
|
3
|
+
*
|
|
4
|
+
* ```tsx
|
|
5
|
+
* import { Talk2ViewChat } from '@talk2view/sdk/chat';
|
|
6
|
+
* import '@talk2view/sdk/chat.css';
|
|
7
|
+
*
|
|
8
|
+
* export function Panel() {
|
|
9
|
+
* return <Talk2ViewChat partnerKey="pk_live_…" />;
|
|
10
|
+
* }
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* `<Talk2ViewChatLauncher>` is the same chat in a floating panel instead: a mark
|
|
14
|
+
* in the corner of the page, a popover on a desktop and a full-screen sheet on a
|
|
15
|
+
* phone.
|
|
16
|
+
*
|
|
17
|
+
* No Tailwind, no PostCSS, no copied files: one component and one stylesheet.
|
|
18
|
+
* Everything renders inside `<div class="t2v-chat">`, which is also the element
|
|
19
|
+
* to re-theme — the custom properties declared on it (`--radius`, the shadcn
|
|
20
|
+
* colour tokens, `--t2v-font`) are the whole surface.
|
|
21
|
+
*
|
|
22
|
+
* A host that cannot import CSS calls {@link injectTalk2ViewChatStyles} instead.
|
|
23
|
+
*
|
|
24
|
+
* @packageDocumentation
|
|
25
|
+
*/
|
|
26
|
+
// `ChatShell` (the header-plus-views box without the outer `.t2v-chat` element),
|
|
27
|
+
// `ChatShellProps` and `ChatView` are deliberately NOT exported. The launcher
|
|
28
|
+
// imports them from this package; nothing outside it needs them, and a
|
|
29
|
+
// published export is forever. `<Talk2ViewChat>` fills whatever container it is
|
|
30
|
+
// given, which is what a host putting the chat in its own panel actually wants.
|
|
31
|
+
export { Talk2ViewChat } from './chat.js';
|
|
32
|
+
export { Talk2ViewChatLauncher, } from './launcher.js';
|
|
33
|
+
export { useTalk2ViewChatClient } from './provider.js';
|
|
34
|
+
export { injectTalk2ViewChatStyles } from './inject-styles.js';
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/chat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,iFAAiF;AACjF,8EAA8E;AAC9E,uEAAuE;AACvE,gFAAgF;AAChF,gFAAgF;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACL,qBAAqB,GAEtB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAMvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inject-styles.d.ts","sourceRoot":"","sources":["../../src/chat/inject-styles.ts"],"names":[],"mappings":"AASA,wBAAgB,yBAAyB,IAAI,IAAI,CAahD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* For hosts that cannot `import '@talk2view/sdk/chat.css'` — no CSS loader, or a
|
|
3
|
+
* CSP without a style source for a <style> tag. Installs the same stylesheet
|
|
4
|
+
* through adoptedStyleSheets, which CSP does not govern. Idempotent.
|
|
5
|
+
*/
|
|
6
|
+
import { css } from '@talk2view/sdk/chat-css';
|
|
7
|
+
let installed = false;
|
|
8
|
+
export function injectTalk2ViewChatStyles() {
|
|
9
|
+
if (installed || typeof document === 'undefined')
|
|
10
|
+
return;
|
|
11
|
+
installed = true;
|
|
12
|
+
if ('adoptedStyleSheets' in document && typeof CSSStyleSheet !== 'undefined') {
|
|
13
|
+
const sheet = new CSSStyleSheet();
|
|
14
|
+
sheet.replaceSync(css);
|
|
15
|
+
document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const el = document.createElement('style');
|
|
19
|
+
el.setAttribute('data-talk2view-chat', '');
|
|
20
|
+
el.textContent = css;
|
|
21
|
+
document.head.append(el);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=inject-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inject-styles.js","sourceRoot":"","sources":["../../src/chat/inject-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAE9C,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,MAAM,UAAU,yBAAyB;IACvC,IAAI,SAAS,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAO;IACzD,SAAS,GAAG,IAAI,CAAC;IACjB,IAAI,oBAAoB,IAAI,QAAQ,IAAI,OAAO,aAAa,KAAK,WAAW,EAAE,CAAC;QAC7E,MAAM,KAAK,GAAG,IAAI,aAAa,EAAE,CAAC;QAClC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACvB,QAAQ,CAAC,kBAAkB,GAAG,CAAC,GAAG,QAAQ,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;QACtE,OAAO;IACT,CAAC;IACD,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3C,EAAE,CAAC,YAAY,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC;IAC3C,EAAE,CAAC,WAAW,GAAG,GAAG,CAAC;IACrB,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `<Talk2ViewChatLauncher>` — the floating mark in the corner of a page, and the
|
|
3
|
+
* panel it opens.
|
|
4
|
+
*
|
|
5
|
+
* ```tsx
|
|
6
|
+
* import { Talk2ViewChatLauncher } from '@talk2view/sdk/chat';
|
|
7
|
+
* import '@talk2view/sdk/chat.css';
|
|
8
|
+
*
|
|
9
|
+
* <Talk2ViewChatLauncher partnerKey="pk_live_…" keepClearOf="#cookie-banner" />
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* Inside the panel is exactly what `<Talk2ViewChat>` renders — the same header,
|
|
13
|
+
* views and thread — so everything that works in a side panel works here. What
|
|
14
|
+
* this file adds is the frame: a fixed anchor that rides above whatever the
|
|
15
|
+
* integrator names, a popover that stays open when the page behind it is
|
|
16
|
+
* clicked, a full-screen sheet on a phone, and a panel the visitor can resize.
|
|
17
|
+
*/
|
|
18
|
+
import { type ReactNode } from 'react';
|
|
19
|
+
import { type Talk2ViewChatProps } from './provider.js';
|
|
20
|
+
import { type LauncherColourway } from './lib/launcher-variant.js';
|
|
21
|
+
export interface Talk2ViewChatLauncherProps extends Talk2ViewChatProps {
|
|
22
|
+
/** Words beside the mark until the visitor's first open. `''` hides them. */
|
|
23
|
+
label?: string;
|
|
24
|
+
/** Mark and tile colours. Default `'smoke-teal'`. */
|
|
25
|
+
colourway?: LauncherColourway;
|
|
26
|
+
/** Let the visitor change the colourway in Settings (remembered per device). */
|
|
27
|
+
visitorColourway?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* A CSS selector for something pinned to the bottom of the page — a cookie
|
|
30
|
+
* banner, a "your trial ends" bar. The launcher rides above it while it is up.
|
|
31
|
+
*/
|
|
32
|
+
keepClearOf?: string;
|
|
33
|
+
/** Screen width (px) at and below which the panel is a full-screen sheet. */
|
|
34
|
+
sheetBelow?: number;
|
|
35
|
+
}
|
|
36
|
+
export declare function Talk2ViewChatLauncher(props: Talk2ViewChatLauncherProps): ReactNode;
|
|
37
|
+
//# sourceMappingURL=launcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../../src/chat/launcher.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAaL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAOf,OAAO,EAAgC,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEtF,OAAO,EAOL,KAAK,iBAAiB,EAEvB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,WAAW,0BAA2B,SAAQ,kBAAkB;IACpE,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,SAAS,CA+BlF"}
|