@blinq_ai/widget 0.1.1 → 0.1.2
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 +12 -4
- package/dist/blinq-widget.iife.global.js +1923 -997
- package/dist/blinq-widget.iife.global.js.map +1 -1
- package/dist/browser.cjs +1580 -796
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +3 -2
- package/dist/browser.d.ts +3 -2
- package/dist/browser.js +168 -1114
- package/dist/browser.js.map +1 -1
- package/dist/{chunk-2BSH3PRA.js → chunk-DQF42RXH.js} +1884 -145
- package/dist/chunk-DQF42RXH.js.map +1 -0
- package/dist/cli.js +122 -14
- package/dist/index.cjs +1886 -142
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +96 -108
- package/dist/index.d.ts +96 -108
- package/dist/index.js +11 -1
- package/dist/widget-core-D0ZdQY2E.d.cts +253 -0
- package/dist/widget-core-D0ZdQY2E.d.ts +253 -0
- package/package.json +2 -1
- package/dist/chunk-2BSH3PRA.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,114 +1,102 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export { A as ActionPolicy, B as BlinqWidget, a as BlinqWidgetConfigFile, b as BlinqWidgetInitOptions, c as BlinqWidgetRuntimeStatus, P as PageHighlightTarget, d as PageToolRegistry, R as RuntimeCapability, e as collectNormalizedPageContext, f as createBlinqWidget, g as detectNativeWebMcpSupport, i as init, h as initFromConfig } from './widget-core-D0ZdQY2E.cjs';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
interface WidgetMessageConversationItem {
|
|
5
|
+
id: string;
|
|
6
|
+
type: "message";
|
|
7
|
+
role: "user" | "assistant";
|
|
8
|
+
text: string;
|
|
9
|
+
status: "thinking" | "streaming" | "done";
|
|
6
10
|
}
|
|
7
|
-
interface
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
interface WidgetActionConversationItem {
|
|
12
|
+
id: string;
|
|
13
|
+
type: "action";
|
|
14
|
+
displayName: string;
|
|
15
|
+
targetSummary: string;
|
|
16
|
+
arguments: Record<string, unknown>;
|
|
17
|
+
state: "pending" | "approved" | "declined";
|
|
13
18
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
interface WidgetPlanStepItem {
|
|
20
|
+
id: string;
|
|
21
|
+
title: string;
|
|
22
|
+
status: string;
|
|
23
|
+
kind: string;
|
|
24
|
+
}
|
|
25
|
+
interface WidgetPlanConversationItem {
|
|
26
|
+
id: string;
|
|
27
|
+
type: "plan";
|
|
28
|
+
goal: string;
|
|
29
|
+
status: string;
|
|
30
|
+
progressLabel: string | null;
|
|
31
|
+
statusReason?: string | null;
|
|
32
|
+
expectedRoute?: string | null;
|
|
33
|
+
loopGuarded?: boolean;
|
|
34
|
+
currentStepIndex: number;
|
|
35
|
+
totalSteps: number;
|
|
36
|
+
approvalState: "pending" | "approved" | "declined";
|
|
37
|
+
steps: WidgetPlanStepItem[];
|
|
20
38
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
39
|
+
interface WidgetGuideStepItem {
|
|
40
|
+
id: string;
|
|
41
|
+
position: number;
|
|
42
|
+
title: string;
|
|
43
|
+
body: string;
|
|
44
|
+
targetSelector?: string | null;
|
|
45
|
+
targetLabel?: string | null;
|
|
46
|
+
actionKind?: string | null;
|
|
47
|
+
actionPayload?: Record<string, unknown> | null;
|
|
48
|
+
expectedRoute?: string | null;
|
|
49
|
+
completionMode: string;
|
|
24
50
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
private reactRoot;
|
|
35
|
-
private voiceController;
|
|
36
|
-
private history;
|
|
37
|
-
private items;
|
|
38
|
-
private minimized;
|
|
39
|
-
private isSending;
|
|
40
|
-
private inputValue;
|
|
41
|
-
private statusText;
|
|
42
|
-
private voiceSupported;
|
|
43
|
-
private voiceListening;
|
|
44
|
-
private voiceWaveform;
|
|
45
|
-
private voiceDurationMs;
|
|
46
|
-
private voiceStartedAt;
|
|
47
|
-
private lastVoiceSampleAt;
|
|
48
|
-
private confirmResolve;
|
|
49
|
-
private confirmItemId;
|
|
50
|
-
private activeRun;
|
|
51
|
-
private pendingAssistantIndicator;
|
|
52
|
-
private executedToolCounts;
|
|
53
|
-
private lastAutoResumeKey;
|
|
54
|
-
private readonly shellHandlers;
|
|
55
|
-
constructor(options: BlinqWidgetInitOptions);
|
|
56
|
-
init(): Promise<this>;
|
|
57
|
-
getRuntimeStatus(): BlinqWidgetRuntimeStatus | null;
|
|
58
|
-
destroy(): void;
|
|
59
|
-
private currentState;
|
|
60
|
-
private renderReactApp;
|
|
61
|
-
private startSession;
|
|
62
|
-
private render;
|
|
63
|
-
private preferredSpeechLanguage;
|
|
64
|
-
private setupVoiceInput;
|
|
65
|
-
private syncVoiceState;
|
|
66
|
-
private startVoiceVisualization;
|
|
67
|
-
private resetVoiceVisualization;
|
|
68
|
-
private updateVoiceVisualization;
|
|
69
|
-
private submitComposerMessage;
|
|
70
|
-
private toggleVoiceInput;
|
|
71
|
-
private minimizedStorageKey;
|
|
72
|
-
private sessionStorageKey;
|
|
73
|
-
private restoreStoredSessionId;
|
|
74
|
-
private persistSessionId;
|
|
75
|
-
private restoreMinimizedState;
|
|
76
|
-
private persistMinimizedState;
|
|
77
|
-
private setMinimized;
|
|
78
|
-
private historyStorageKey;
|
|
79
|
-
private restoreHistory;
|
|
80
|
-
private persistHistory;
|
|
81
|
-
private rememberMessage;
|
|
82
|
-
private recentHistoryForRequest;
|
|
83
|
-
private restoreConversationView;
|
|
84
|
-
private updateActionState;
|
|
85
|
-
private planItemId;
|
|
86
|
-
private upsertPlanItem;
|
|
87
|
-
private removeEmptyMessage;
|
|
88
|
-
private resolveConfirmation;
|
|
89
|
-
private confirmToolExecution;
|
|
90
|
-
private syncRuntimeStatus;
|
|
91
|
-
private setStatus;
|
|
92
|
-
private appendMessage;
|
|
93
|
-
private updateMessage;
|
|
94
|
-
private latestAssistantMessage;
|
|
95
|
-
private finalizeAssistantMessage;
|
|
96
|
-
private showThinkingIndicator;
|
|
97
|
-
private hideThinkingIndicator;
|
|
98
|
-
private currentPageContext;
|
|
99
|
-
private currentRoute;
|
|
100
|
-
private shouldAutoResumeActiveRun;
|
|
101
|
-
private handleToolRequest;
|
|
102
|
-
private streamChatStep;
|
|
103
|
-
sendMessage(message: string): Promise<string>;
|
|
104
|
-
private continueActiveRun;
|
|
105
|
-
respondToPlan(approved: boolean): Promise<void>;
|
|
106
|
-
endSession(): Promise<void>;
|
|
51
|
+
interface WidgetGuideCardState {
|
|
52
|
+
id: string;
|
|
53
|
+
state: "offered" | "started" | "dismissed" | "completed";
|
|
54
|
+
source: "published" | "live";
|
|
55
|
+
route: string;
|
|
56
|
+
summary?: string | null;
|
|
57
|
+
currentStepIndex: number;
|
|
58
|
+
totalSteps: number;
|
|
59
|
+
steps: WidgetGuideStepItem[];
|
|
107
60
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
61
|
+
type WidgetConversationItem = WidgetMessageConversationItem | WidgetActionConversationItem | WidgetPlanConversationItem;
|
|
62
|
+
interface WidgetShellState {
|
|
63
|
+
minimized: boolean;
|
|
64
|
+
assistantName: string;
|
|
65
|
+
avatarUrl: string | null;
|
|
66
|
+
runtimeLabel: string;
|
|
67
|
+
statusText: string;
|
|
68
|
+
showThinkingIndicator: boolean;
|
|
69
|
+
inputValue: string;
|
|
70
|
+
accentColor: string;
|
|
71
|
+
themeVariant: "light" | "dark";
|
|
72
|
+
side: "left" | "right";
|
|
73
|
+
isSending: boolean;
|
|
74
|
+
voiceSupported: boolean;
|
|
75
|
+
voiceListening: boolean;
|
|
76
|
+
voiceWaveform: number[];
|
|
77
|
+
voiceDurationMs: number;
|
|
78
|
+
guide: WidgetGuideCardState | null;
|
|
79
|
+
items: WidgetConversationItem[];
|
|
80
|
+
}
|
|
81
|
+
interface WidgetEmbedShellProps {
|
|
82
|
+
state: WidgetShellState;
|
|
83
|
+
onOpen(): void;
|
|
84
|
+
onCollapse(): void;
|
|
85
|
+
onInputChange(value: string): void;
|
|
86
|
+
onSubmit(): void;
|
|
87
|
+
onToggleVoice(): void;
|
|
88
|
+
onApproveAction(id: string): void;
|
|
89
|
+
onDeclineAction(id: string): void;
|
|
90
|
+
onApprovePlan(): void;
|
|
91
|
+
onDeclinePlan(): void;
|
|
92
|
+
onStartGuide(): void;
|
|
93
|
+
onAdvanceGuide(): void;
|
|
94
|
+
onDismissGuide(): void;
|
|
95
|
+
onCompleteGuide(): void;
|
|
96
|
+
onRunGuideStep(): void;
|
|
97
|
+
}
|
|
98
|
+
declare function WidgetEmbedShell({ state, onOpen, onCollapse, onInputChange, onSubmit, onToggleVoice, onApproveAction, onDeclineAction, onApprovePlan, onDeclinePlan, onStartGuide, onAdvanceGuide, onDismissGuide, onCompleteGuide, onRunGuideStep, }: WidgetEmbedShellProps): react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
declare const EMBED_WIDGET_STYLES = "\n :host {\n all: initial;\n display: block;\n position: static;\n color-scheme: light;\n }\n\n *, *::before, *::after {\n box-sizing: border-box;\n }\n\n button,\n input {\n font: inherit;\n }\n\n .blinq-shell {\n position: fixed;\n bottom: 24px;\n z-index: 2147483647;\n display: flex;\n flex-direction: column;\n gap: 12px;\n width: 432px;\n max-width: calc(100vw - 24px);\n pointer-events: none;\n font-family:\n \"SF Pro Display\",\n \"SF Pro Text\",\n \"Inter\",\n ui-sans-serif,\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n \"Segoe UI\",\n sans-serif;\n --blinq-accent: #111111;\n --blinq-text: rgba(18, 18, 20, 0.96);\n --blinq-text-soft: rgba(32, 34, 38, 0.82);\n --blinq-text-muted: rgba(56, 60, 66, 0.58);\n --blinq-glass-fill: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(240, 243, 248, 0.52));\n --blinq-glass-fill-strong: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(245, 247, 250, 0.62));\n --blinq-glass-fill-dense: linear-gradient(180deg, rgba(249, 250, 252, 0.92), rgba(231, 235, 241, 0.66));\n --blinq-glass-stroke: rgba(255, 255, 255, 0.68);\n --blinq-glass-stroke-soft: rgba(255, 255, 255, 0.5);\n --blinq-glass-edge: rgba(100, 109, 123, 0.14);\n --blinq-shadow:\n 0 28px 80px rgba(155, 164, 180, 0.22),\n 0 10px 30px rgba(174, 182, 193, 0.18);\n --blinq-shadow-soft:\n 0 14px 40px rgba(170, 177, 189, 0.18),\n 0 4px 14px rgba(202, 208, 216, 0.18);\n --blinq-inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.92);\n --blinq-blur: blur(28px) saturate(170%);\n --blinq-radius-panel: 32px;\n --blinq-radius-pill: 999px;\n --blinq-radius-bubble: 28px;\n --blinq-radius-card: 30px;\n }\n\n .blinq-shell[data-side=\"left\"] {\n left: 24px;\n align-items: flex-start;\n }\n\n .blinq-shell[data-side=\"right\"] {\n right: 24px;\n align-items: flex-end;\n }\n\n .blinq-panel,\n .blinq-launcher {\n pointer-events: auto;\n }\n\n .blinq-shell {\n width: 520px;\n }\n\n .blinq-panel {\n position: relative;\n width: 100%;\n max-width: 432px;\n overflow: hidden;\n border-radius: var(--blinq-radius-panel);\n border: 1px solid var(--blinq-glass-stroke);\n background: var(--blinq-glass-fill);\n box-shadow: var(--blinq-shadow);\n backdrop-filter: var(--blinq-blur);\n -webkit-backdrop-filter: var(--blinq-blur);\n }\n\n .blinq-panel::before,\n .blinq-launcher::before {\n content: \"\";\n position: absolute;\n inset: 0;\n pointer-events: none;\n border-radius: inherit;\n box-shadow: var(--blinq-inner-highlight);\n }\n\n .blinq-launcher::after {\n content: \"\";\n position: absolute;\n inset: 1px;\n pointer-events: none;\n border-radius: inherit;\n background:\n radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.82), transparent 32%),\n linear-gradient(135deg, rgba(255, 255, 255, 0.46), transparent 55%);\n opacity: 0.88;\n transition:\n opacity 180ms ease;\n }\n\n .blinq-panel::after {\n content: \"\";\n position: absolute;\n inset: 0;\n pointer-events: none;\n border-radius: inherit;\n background:\n radial-gradient(circle at top left, rgba(255, 255, 255, 0.72), transparent 34%),\n radial-gradient(circle at bottom center, rgba(255, 255, 255, 0.26), transparent 38%);\n opacity: 0.95;\n }\n\n .blinq-header,\n .blinq-thread,\n .blinq-composer {\n position: relative;\n z-index: 1;\n }\n\n .blinq-header {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 18px 18px 10px;\n }\n\n .blinq-header-row {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px;\n }\n\n .blinq-header-copy {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 0;\n flex: 1;\n }\n\n .blinq-heading {\n font-size: 17px;\n line-height: 1.15;\n font-weight: 600;\n letter-spacing: -0.03em;\n color: var(--blinq-text);\n }\n\n .blinq-status-line {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n max-width: fit-content;\n min-height: 32px;\n padding: 0 12px;\n border-radius: var(--blinq-radius-pill);\n border: 1px solid var(--blinq-glass-stroke-soft);\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(242, 244, 248, 0.46));\n color: var(--blinq-text-soft);\n font-size: 12px;\n line-height: 1.35;\n box-shadow: var(--blinq-shadow-soft);\n backdrop-filter: blur(22px) saturate(170%);\n -webkit-backdrop-filter: blur(22px) saturate(170%);\n }\n\n .blinq-status-line::before {\n content: \"\";\n width: 7px;\n height: 7px;\n border-radius: 999px;\n background: rgba(17, 17, 17, 0.74);\n box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.34);\n flex: none;\n }\n\n .blinq-launcher {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 76px;\n min-width: 76px;\n height: 76px;\n padding: 0;\n border-radius: 999px;\n border: 1px solid var(--blinq-glass-stroke);\n background: var(--blinq-glass-fill-strong);\n box-shadow: var(--blinq-shadow-soft);\n backdrop-filter: blur(26px) saturate(175%);\n -webkit-backdrop-filter: blur(26px) saturate(175%);\n color: var(--blinq-text);\n isolation: isolate;\n }\n\n .blinq-launcher:hover {\n border-color: var(--blinq-glass-stroke);\n box-shadow: var(--blinq-shadow-soft);\n }\n\n .blinq-launcher-icon-only {\n border-radius: 999px;\n }\n\n .blinq-launcher-icon {\n position: relative;\n z-index: 1;\n width: 30px;\n height: 30px;\n color: rgba(17, 17, 17, 0.96);\n opacity: 1;\n filter:\n drop-shadow(0 1px 0 rgba(255, 255, 255, 0.66))\n drop-shadow(0 2px 6px rgba(17, 17, 17, 0.08));\n }\n\n .blinq-thread {\n min-height: 0;\n }\n\n .blinq-thread-viewport {\n width: 100%;\n }\n\n .blinq-scroll {\n display: flex;\n flex-direction: column;\n gap: 12px;\n min-height: 0;\n max-height: 432px;\n padding: 6px 18px 14px;\n overflow-y: auto;\n }\n\n .blinq-scroll::-webkit-scrollbar {\n width: 8px;\n }\n\n .blinq-scroll::-webkit-scrollbar-thumb {\n background: rgba(144, 151, 162, 0.22);\n border-radius: 999px;\n }\n\n .blinq-message {\n position: relative;\n max-width: 88%;\n padding: 14px 16px;\n border-radius: var(--blinq-radius-bubble);\n border: 1px solid var(--blinq-glass-stroke-soft);\n background: var(--blinq-glass-fill-strong);\n color: var(--blinq-text);\n font-size: 14px;\n line-height: 1.55;\n white-space: pre-wrap;\n box-shadow: var(--blinq-shadow-soft);\n backdrop-filter: blur(24px) saturate(170%);\n -webkit-backdrop-filter: blur(24px) saturate(170%);\n }\n\n .blinq-message::before {\n content: \"\";\n position: absolute;\n inset: 0;\n border-radius: inherit;\n pointer-events: none;\n box-shadow: var(--blinq-inner-highlight);\n }\n\n .blinq-message[data-role=\"assistant\"] {\n align-self: flex-start;\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(241, 244, 249, 0.58));\n }\n\n .blinq-message[data-role=\"user\"] {\n align-self: flex-end;\n background: linear-gradient(180deg, rgba(249, 250, 252, 0.94), rgba(227, 232, 238, 0.66));\n border-color: rgba(255, 255, 255, 0.74);\n }\n\n .blinq-message[data-kind=\"artifact\"] {\n width: 100%;\n max-width: 100%;\n padding: 0;\n border: 0;\n background: transparent;\n box-shadow: none;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n }\n\n .blinq-message[data-kind=\"artifact\"]::before {\n display: none;\n }\n\n .blinq-message-copy {\n display: block;\n }\n\n .blinq-message-copy-reveal {\n animation: blinq-copy-reveal 240ms cubic-bezier(0.16, 1, 0.3, 1);\n will-change: opacity, transform;\n }\n\n .blinq-thinking-card {\n max-width: fit-content;\n padding-right: 18px;\n }\n\n .blinq-thinking {\n display: inline-flex;\n align-items: center;\n gap: 10px;\n color: var(--blinq-text-soft);\n font-size: 13px;\n }\n\n .blinq-thinking-dots {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n }\n\n .blinq-thinking-dots > span {\n width: 6px;\n height: 6px;\n border-radius: 999px;\n background: rgba(17, 17, 17, 0.74);\n animation: blinq-thinking-pulse 1.2s ease-in-out infinite;\n }\n\n .blinq-thinking-dots > span:nth-child(2) {\n animation-delay: 100ms;\n }\n\n .blinq-thinking-dots > span:nth-child(3) {\n animation-delay: 200ms;\n }\n\n .blinq-card {\n display: flex;\n flex-direction: column;\n gap: 12px;\n border-radius: var(--blinq-radius-card);\n border: 1px solid var(--blinq-glass-stroke-soft);\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(240, 243, 248, 0.52));\n color: var(--blinq-text);\n box-shadow: var(--blinq-shadow-soft);\n backdrop-filter: blur(26px) saturate(170%);\n -webkit-backdrop-filter: blur(26px) saturate(170%);\n }\n\n .blinq-card-header {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 16px 16px 0;\n }\n\n .blinq-card-title {\n font-size: 15px;\n line-height: 1.2;\n font-weight: 600;\n letter-spacing: -0.02em;\n color: var(--blinq-text);\n }\n\n .blinq-card-description {\n font-size: 13px;\n line-height: 1.45;\n color: var(--blinq-text-muted);\n }\n\n .blinq-card-content {\n padding: 0 16px 16px;\n }\n\n .blinq-action-card,\n .blinq-plan-card,\n .blinq-guide-card {\n align-self: stretch;\n }\n\n .blinq-guide-content {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n .blinq-guide-step-shell {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 14px;\n border-radius: 22px;\n border: 1px solid rgba(255, 255, 255, 0.64);\n background:\n radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 42%),\n linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(242, 245, 249, 0.56));\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, 0.94),\n 0 10px 22px rgba(183, 191, 201, 0.13);\n }\n\n .blinq-guide-step-meta {\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--blinq-text-soft);\n }\n\n .blinq-guide-step-title {\n font-size: 14px;\n line-height: 1.35;\n font-weight: 600;\n color: var(--blinq-text);\n }\n\n .blinq-guide-step-copy {\n font-size: 13px;\n line-height: 1.5;\n color: var(--blinq-text-muted);\n }\n\n .blinq-plan-step {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 12px 13px;\n margin-top: 10px;\n border-radius: 24px;\n border: 1px solid rgba(255, 255, 255, 0.62);\n background:\n radial-gradient(circle at top left, rgba(255, 255, 255, 0.72), transparent 38%),\n linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(238, 242, 247, 0.54));\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, 0.94),\n 0 8px 20px rgba(189, 196, 206, 0.12);\n }\n\n .blinq-plan-step:first-child {\n margin-top: 0;\n }\n\n .blinq-plan-step-index {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n border-radius: 999px;\n border: 1px solid rgba(255, 255, 255, 0.7);\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(240, 243, 247, 0.62));\n color: rgba(17, 17, 17, 0.82);\n font-size: 11px;\n font-weight: 700;\n flex: none;\n }\n\n .blinq-plan-step-copy {\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n color: var(--blinq-text);\n font-size: 13px;\n flex: 1;\n }\n\n .blinq-plan-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px;\n }\n\n .blinq-plan-content {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n .blinq-plan-steps {\n display: flex;\n flex-direction: column;\n gap: 0;\n }\n\n .blinq-plan-step-title-row {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 10px;\n }\n\n .blinq-plan-step-title {\n min-width: 0;\n font-size: 13px;\n line-height: 1.4;\n font-weight: 600;\n letter-spacing: -0.01em;\n }\n\n .blinq-plan-step-status-pill {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 24px;\n padding: 0 10px;\n border-radius: 999px;\n border: 1px solid rgba(255, 255, 255, 0.58);\n background: rgba(255, 255, 255, 0.58);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);\n color: var(--blinq-text-soft);\n font-size: 11px;\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.01em;\n white-space: nowrap;\n }\n\n .blinq-plan-step-meta {\n font-size: 12px;\n color: var(--blinq-text-muted);\n }\n\n .blinq-plan-step[data-current=\"true\"] {\n background:\n radial-gradient(circle at top left, rgba(255, 255, 255, 0.82), transparent 40%),\n linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(243, 246, 250, 0.64));\n border-color: rgba(255, 255, 255, 0.74);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, 0.96),\n 0 12px 26px rgba(183, 191, 201, 0.15);\n }\n\n .blinq-plan-step[data-current=\"true\"] .blinq-plan-step-index {\n box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.48);\n }\n\n .blinq-plan-step[data-current=\"true\"] .blinq-plan-step-status-pill {\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(240, 243, 247, 0.66));\n color: var(--blinq-text);\n }\n\n .blinq-plan-step[data-status=\"completed\"] .blinq-plan-step-index {\n background: rgba(227, 232, 237, 0.88);\n }\n\n .blinq-plan-step[data-status=\"completed\"] .blinq-plan-step-status-pill {\n background: rgba(244, 246, 249, 0.78);\n }\n\n .blinq-plan-step[data-status=\"failed\"],\n .blinq-plan-step[data-status=\"cancelled\"] {\n opacity: 0.72;\n }\n\n .blinq-action-meta-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n flex-wrap: wrap;\n }\n\n .blinq-action-details {\n margin-top: 8px;\n }\n\n .blinq-action-details > summary {\n display: inline-flex;\n align-items: center;\n min-height: 34px;\n padding: 0 12px;\n border-radius: 999px;\n border: 1px solid rgba(255, 255, 255, 0.56);\n background: rgba(255, 255, 255, 0.46);\n color: var(--blinq-text-soft);\n font-size: 12px;\n font-weight: 600;\n list-style: none;\n cursor: pointer;\n }\n\n .blinq-action-details > summary::-webkit-details-marker {\n display: none;\n }\n\n .blinq-code {\n margin-top: 10px;\n padding: 12px 14px;\n border-radius: 20px;\n border: 1px solid rgba(255, 255, 255, 0.56);\n background: rgba(255, 255, 255, 0.52);\n color: var(--blinq-text-soft);\n font-size: 12px;\n line-height: 1.5;\n white-space: pre-wrap;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n }\n\n .blinq-action-state {\n margin-top: 12px;\n font-size: 12px;\n line-height: 1.4;\n color: var(--blinq-text-muted);\n }\n\n .blinq-action-state[data-state=\"approved\"] {\n color: var(--blinq-text-soft);\n }\n\n .blinq-action-state[data-state=\"declined\"] {\n color: var(--blinq-text-muted);\n }\n\n .blinq-actions {\n display: flex;\n gap: 10px;\n margin-top: 14px;\n }\n\n .blinq-actions > * {\n flex: 1;\n }\n\n .blinq-badge-pill {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 30px;\n padding: 0 12px;\n border-radius: 999px;\n border: 1px solid rgba(255, 255, 255, 0.54);\n background: rgba(255, 255, 255, 0.46);\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.02em;\n color: var(--blinq-text-soft);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);\n }\n\n .blinq-badge-pill-default {\n background: rgba(255, 255, 255, 0.5);\n }\n\n .blinq-badge-pill-outline {\n background: rgba(247, 248, 250, 0.34);\n color: var(--blinq-text-muted);\n }\n\n .blinq-badge-pill-soft {\n background: rgba(255, 255, 255, 0.68);\n color: var(--blinq-text-soft);\n }\n\n .blinq-badge-pill-accent {\n background: rgba(243, 245, 249, 0.84);\n color: var(--blinq-text);\n }\n\n .blinq-composer {\n padding: 8px 18px 18px;\n }\n\n .blinq-composer-controls {\n display: flex;\n }\n\n .blinq-input-shell {\n position: relative;\n width: 100%;\n }\n\n .blinq-input,\n .blinq-recording-input {\n width: 100%;\n min-width: 0;\n height: 58px;\n padding: 0 54px 0 54px;\n border-radius: 999px;\n border: 1px solid var(--blinq-glass-stroke);\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(239, 242, 247, 0.54));\n color: var(--blinq-text);\n box-shadow:\n var(--blinq-inner-highlight),\n 0 10px 26px rgba(183, 189, 198, 0.16);\n font-size: 13px;\n outline: none;\n backdrop-filter: blur(22px) saturate(170%);\n -webkit-backdrop-filter: blur(22px) saturate(170%);\n }\n\n .blinq-input::placeholder {\n color: var(--blinq-text-muted);\n }\n\n .blinq-recording-input {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n\n .blinq-recording-time {\n flex: none;\n min-width: 42px;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.04em;\n color: var(--blinq-text-soft);\n font-variant-numeric: tabular-nums;\n }\n\n .blinq-recording-wave-shell {\n position: relative;\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n min-width: 0;\n height: 30px;\n padding: 0 10px;\n border-radius: 999px;\n border: 1px solid rgba(255, 255, 255, 0.54);\n background:\n linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(242, 245, 248, 0.34));\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);\n overflow: hidden;\n }\n\n .blinq-recording-wave-shell::before {\n content: \"\";\n position: absolute;\n left: 10px;\n right: 10px;\n top: 50%;\n height: 1px;\n border-radius: 999px;\n background: linear-gradient(90deg, transparent, rgba(17, 17, 17, 0.12), transparent);\n transform: translateY(-50%);\n pointer-events: none;\n }\n\n .blinq-recording-waveform {\n position: relative;\n display: flex;\n align-items: center;\n gap: 4px;\n flex: 1;\n min-width: 0;\n height: 100%;\n overflow: hidden;\n }\n\n .blinq-recording-waveform-bar {\n width: 4px;\n min-width: 4px;\n height: 62%;\n border-radius: 999px;\n background: linear-gradient(180deg, rgba(17, 17, 17, 0.14), rgba(17, 17, 17, 0.36));\n transform-origin: center;\n transition:\n transform 120ms ease,\n opacity 160ms ease;\n opacity: 0.92;\n box-shadow:\n 0 0 0 1px rgba(255, 255, 255, 0.26),\n 0 2px 8px rgba(17, 17, 17, 0.08);\n }\n\n .blinq-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n border: 1px solid transparent;\n border-radius: 999px;\n color: var(--blinq-text);\n font-size: 14px;\n font-weight: 600;\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(236, 239, 244, 0.5));\n box-shadow: var(--blinq-shadow-soft);\n backdrop-filter: blur(20px) saturate(170%);\n -webkit-backdrop-filter: blur(20px) saturate(170%);\n transition:\n transform 160ms ease,\n box-shadow 180ms ease,\n border-color 180ms ease,\n background 180ms ease,\n opacity 120ms ease;\n cursor: pointer;\n outline: none;\n }\n\n .blinq-button:hover:not(:disabled) {\n transform: translateY(-1px);\n border-color: rgba(255, 255, 255, 0.82);\n box-shadow:\n 0 14px 28px rgba(175, 181, 191, 0.22),\n 0 4px 10px rgba(189, 195, 204, 0.16);\n }\n\n .blinq-input-mic:hover:not(:disabled),\n .blinq-input-send:hover:not(:disabled) {\n transform: translateY(-50%);\n border-color: rgba(255, 255, 255, 0.82);\n box-shadow:\n 0 14px 28px rgba(175, 181, 191, 0.16),\n 0 4px 10px rgba(189, 195, 204, 0.12);\n }\n\n .blinq-button:disabled {\n opacity: 0.52;\n cursor: not-allowed;\n }\n\n .blinq-button:focus-visible,\n .blinq-input:focus-visible {\n box-shadow:\n 0 0 0 3px rgba(255, 255, 255, 0.68),\n 0 0 0 6px rgba(17, 17, 17, 0.08);\n }\n\n .blinq-button-default {\n border-color: rgba(255, 255, 255, 0.74);\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(237, 241, 247, 0.66));\n color: var(--blinq-text);\n }\n\n .blinq-button-outline,\n .blinq-button-ghost {\n border-color: rgba(255, 255, 255, 0.58);\n background: rgba(255, 255, 255, 0.42);\n color: var(--blinq-text-soft);\n }\n\n .blinq-button-destructive {\n border-color: rgba(255, 255, 255, 0.58);\n background: linear-gradient(180deg, rgba(248, 249, 251, 0.7), rgba(230, 233, 239, 0.54));\n color: var(--blinq-text);\n }\n\n .blinq-button-md {\n height: 44px;\n padding: 0 16px;\n }\n\n .blinq-button-sm {\n height: 38px;\n padding: 0 13px;\n font-size: 13px;\n }\n\n .blinq-button-icon {\n width: 48px;\n height: 48px;\n padding: 0;\n }\n\n .blinq-button-icon-sm {\n width: 38px;\n height: 38px;\n padding: 0;\n }\n\n .blinq-input-mic,\n .blinq-input-send {\n position: absolute;\n top: 50%;\n z-index: 2;\n width: 42px;\n height: 42px;\n min-width: 42px;\n transform: translateY(-50%);\n }\n\n .blinq-input-mic {\n left: 8px;\n }\n\n .blinq-input-send {\n right: 8px;\n }\n\n .blinq-panel {\n display: flex;\n flex-direction: column;\n height: min(720px, calc(100vh - 64px));\n max-width: 520px;\n border: 1px solid rgba(226, 232, 240, 0.96);\n border-radius: 30px;\n background: #ffffff;\n box-shadow:\n 0 28px 80px rgba(15, 23, 42, 0.14),\n 0 10px 28px rgba(15, 23, 42, 0.08);\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n }\n\n .blinq-panel::before,\n .blinq-panel::after,\n .blinq-message::before,\n .blinq-status-line::before {\n display: none;\n }\n\n .blinq-header {\n flex: none;\n gap: 0;\n padding: 22px 24px 18px;\n border-bottom: 1px solid rgba(226, 232, 240, 0.86);\n background: #ffffff;\n }\n\n .blinq-header-row {\n align-items: center;\n gap: 14px;\n }\n\n .blinq-header-copy {\n gap: 5px;\n }\n\n .blinq-heading {\n font-size: 22px;\n line-height: 1.05;\n font-weight: 700;\n letter-spacing: -0.04em;\n color: #111827;\n }\n\n .blinq-status-line {\n display: block;\n max-width: 100%;\n min-height: 0;\n padding: 0;\n border: 0;\n background: transparent;\n box-shadow: none;\n color: #6b7280;\n font-size: 13px;\n line-height: 1.35;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n }\n\n .blinq-avatar {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 64px;\n min-width: 64px;\n height: 64px;\n overflow: visible;\n border: 1px solid rgba(226, 232, 240, 0.95);\n border-radius: 999px;\n background:\n radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.86)),\n #ffffff;\n box-shadow:\n 0 14px 26px rgba(15, 23, 42, 0.08),\n inset 0 1px 0 rgba(255, 255, 255, 0.9);\n color: #111827;\n flex: none;\n }\n\n .blinq-avatar-image {\n width: 100%;\n height: 100%;\n border-radius: inherit;\n object-fit: cover;\n }\n\n .blinq-avatar-icon {\n color: #111827;\n }\n\n .blinq-avatar-status {\n position: absolute;\n right: 5px;\n bottom: 6px;\n width: 11px;\n height: 11px;\n border: 2px solid #ffffff;\n border-radius: 999px;\n background: #21d262;\n box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);\n }\n\n .blinq-avatar-label {\n display: none;\n }\n\n .blinq-thread {\n display: flex;\n flex: 1 1 auto;\n min-height: 0;\n background: #ffffff;\n }\n\n .blinq-thread-viewport {\n flex: 1 1 auto;\n height: 100%;\n }\n\n .blinq-scroll {\n flex: 1 1 auto;\n gap: 12px;\n max-height: none;\n min-height: 0;\n padding: 30px 24px 20px;\n background: #ffffff;\n }\n\n .blinq-message {\n max-width: 82%;\n padding: 10px 15px;\n border: 1px solid rgba(226, 232, 240, 0.96);\n border-radius: 18px;\n background: #ffffff;\n box-shadow: none;\n color: #111827;\n font-size: 15px;\n line-height: 1.48;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n }\n\n .blinq-message[data-role=\"assistant\"] {\n background: #ffffff;\n }\n\n .blinq-message[data-role=\"user\"] {\n border-color: rgba(209, 213, 219, 0.96);\n background: #f8fafc;\n }\n\n .blinq-card,\n .blinq-guide-step-shell,\n .blinq-plan-step {\n border-color: rgba(226, 232, 240, 0.92);\n background: #ffffff;\n box-shadow: none;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n }\n\n .blinq-composer {\n flex: none;\n padding: 18px 24px 8px;\n border-top: 1px solid rgba(226, 232, 240, 0.86);\n background: #ffffff;\n }\n\n .blinq-input,\n .blinq-recording-input {\n height: 56px;\n padding: 0 60px 0 54px;\n border: 1px solid rgba(209, 213, 219, 0.92);\n border-radius: 999px;\n background: #ffffff;\n box-shadow: none;\n color: #111827;\n font-size: 15px;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n }\n\n .blinq-input::placeholder {\n color: #9ca3af;\n }\n\n .blinq-input-mic {\n left: 7px;\n width: 42px;\n min-width: 42px;\n height: 42px;\n border: 0;\n background: transparent;\n box-shadow: none;\n color: #6b7280;\n }\n\n .blinq-input-send {\n right: 7px;\n width: 42px;\n min-width: 42px;\n height: 42px;\n border: 0;\n background: #6b6f76;\n box-shadow: none;\n color: #ffffff;\n }\n\n .blinq-input-send:hover:not(:disabled) {\n transform: translateY(-50%);\n background: #4b5563;\n box-shadow: none;\n }\n\n .blinq-button-ghost {\n border-color: transparent;\n background: transparent;\n box-shadow: none;\n }\n\n .blinq-powered {\n flex: none;\n padding: 0 24px 18px;\n color: #c0c4ca;\n font-size: 10px;\n font-weight: 800;\n letter-spacing: 0.16em;\n line-height: 1;\n text-align: center;\n }\n\n @keyframes blinq-thinking-pulse {\n 0%, 100% {\n opacity: 0.28;\n transform: translateY(0);\n }\n\n 50% {\n opacity: 1;\n transform: translateY(-1.5px);\n }\n }\n\n @keyframes blinq-copy-reveal {\n 0% {\n opacity: 0;\n transform: translateY(3px);\n }\n\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n @keyframes blinq-orbit-drift {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n }\n\n @keyframes blinq-orbit-pulse {\n 0%, 100% {\n transform: scale(1);\n opacity: 0.9;\n }\n\n 50% {\n transform: scale(1.16);\n opacity: 1;\n }\n }\n\n @keyframes blinq-core-breathe {\n 0%, 100% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(1.04);\n }\n }\n\n @media (max-width: 720px) {\n .blinq-shell {\n right: 12px;\n left: 12px;\n bottom: 12px;\n width: auto;\n max-width: none;\n align-items: stretch;\n }\n\n .blinq-shell[data-side=\"left\"],\n .blinq-shell[data-side=\"right\"] {\n right: 12px;\n left: 12px;\n align-items: stretch;\n }\n\n .blinq-panel,\n .blinq-launcher {\n width: 100%;\n max-width: none;\n }\n\n .blinq-launcher {\n width: 76px;\n min-width: 76px;\n height: 76px;\n align-self: flex-end;\n }\n\n .blinq-message {\n max-width: 92%;\n }\n\n .blinq-actions {\n flex-direction: column;\n }\n\n .blinq-input,\n .blinq-recording-input {\n height: 56px;\n }\n\n .blinq-panel {\n height: min(700px, calc(100vh - 24px));\n }\n }\n";
|
|
113
101
|
|
|
114
|
-
export {
|
|
102
|
+
export { EMBED_WIDGET_STYLES, type WidgetConversationItem, WidgetEmbedShell, type WidgetShellState };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,114 +1,102 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export { A as ActionPolicy, B as BlinqWidget, a as BlinqWidgetConfigFile, b as BlinqWidgetInitOptions, c as BlinqWidgetRuntimeStatus, P as PageHighlightTarget, d as PageToolRegistry, R as RuntimeCapability, e as collectNormalizedPageContext, f as createBlinqWidget, g as detectNativeWebMcpSupport, i as init, h as initFromConfig } from './widget-core-D0ZdQY2E.js';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
interface WidgetMessageConversationItem {
|
|
5
|
+
id: string;
|
|
6
|
+
type: "message";
|
|
7
|
+
role: "user" | "assistant";
|
|
8
|
+
text: string;
|
|
9
|
+
status: "thinking" | "streaming" | "done";
|
|
6
10
|
}
|
|
7
|
-
interface
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
interface WidgetActionConversationItem {
|
|
12
|
+
id: string;
|
|
13
|
+
type: "action";
|
|
14
|
+
displayName: string;
|
|
15
|
+
targetSummary: string;
|
|
16
|
+
arguments: Record<string, unknown>;
|
|
17
|
+
state: "pending" | "approved" | "declined";
|
|
13
18
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
interface WidgetPlanStepItem {
|
|
20
|
+
id: string;
|
|
21
|
+
title: string;
|
|
22
|
+
status: string;
|
|
23
|
+
kind: string;
|
|
24
|
+
}
|
|
25
|
+
interface WidgetPlanConversationItem {
|
|
26
|
+
id: string;
|
|
27
|
+
type: "plan";
|
|
28
|
+
goal: string;
|
|
29
|
+
status: string;
|
|
30
|
+
progressLabel: string | null;
|
|
31
|
+
statusReason?: string | null;
|
|
32
|
+
expectedRoute?: string | null;
|
|
33
|
+
loopGuarded?: boolean;
|
|
34
|
+
currentStepIndex: number;
|
|
35
|
+
totalSteps: number;
|
|
36
|
+
approvalState: "pending" | "approved" | "declined";
|
|
37
|
+
steps: WidgetPlanStepItem[];
|
|
20
38
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
39
|
+
interface WidgetGuideStepItem {
|
|
40
|
+
id: string;
|
|
41
|
+
position: number;
|
|
42
|
+
title: string;
|
|
43
|
+
body: string;
|
|
44
|
+
targetSelector?: string | null;
|
|
45
|
+
targetLabel?: string | null;
|
|
46
|
+
actionKind?: string | null;
|
|
47
|
+
actionPayload?: Record<string, unknown> | null;
|
|
48
|
+
expectedRoute?: string | null;
|
|
49
|
+
completionMode: string;
|
|
24
50
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
private reactRoot;
|
|
35
|
-
private voiceController;
|
|
36
|
-
private history;
|
|
37
|
-
private items;
|
|
38
|
-
private minimized;
|
|
39
|
-
private isSending;
|
|
40
|
-
private inputValue;
|
|
41
|
-
private statusText;
|
|
42
|
-
private voiceSupported;
|
|
43
|
-
private voiceListening;
|
|
44
|
-
private voiceWaveform;
|
|
45
|
-
private voiceDurationMs;
|
|
46
|
-
private voiceStartedAt;
|
|
47
|
-
private lastVoiceSampleAt;
|
|
48
|
-
private confirmResolve;
|
|
49
|
-
private confirmItemId;
|
|
50
|
-
private activeRun;
|
|
51
|
-
private pendingAssistantIndicator;
|
|
52
|
-
private executedToolCounts;
|
|
53
|
-
private lastAutoResumeKey;
|
|
54
|
-
private readonly shellHandlers;
|
|
55
|
-
constructor(options: BlinqWidgetInitOptions);
|
|
56
|
-
init(): Promise<this>;
|
|
57
|
-
getRuntimeStatus(): BlinqWidgetRuntimeStatus | null;
|
|
58
|
-
destroy(): void;
|
|
59
|
-
private currentState;
|
|
60
|
-
private renderReactApp;
|
|
61
|
-
private startSession;
|
|
62
|
-
private render;
|
|
63
|
-
private preferredSpeechLanguage;
|
|
64
|
-
private setupVoiceInput;
|
|
65
|
-
private syncVoiceState;
|
|
66
|
-
private startVoiceVisualization;
|
|
67
|
-
private resetVoiceVisualization;
|
|
68
|
-
private updateVoiceVisualization;
|
|
69
|
-
private submitComposerMessage;
|
|
70
|
-
private toggleVoiceInput;
|
|
71
|
-
private minimizedStorageKey;
|
|
72
|
-
private sessionStorageKey;
|
|
73
|
-
private restoreStoredSessionId;
|
|
74
|
-
private persistSessionId;
|
|
75
|
-
private restoreMinimizedState;
|
|
76
|
-
private persistMinimizedState;
|
|
77
|
-
private setMinimized;
|
|
78
|
-
private historyStorageKey;
|
|
79
|
-
private restoreHistory;
|
|
80
|
-
private persistHistory;
|
|
81
|
-
private rememberMessage;
|
|
82
|
-
private recentHistoryForRequest;
|
|
83
|
-
private restoreConversationView;
|
|
84
|
-
private updateActionState;
|
|
85
|
-
private planItemId;
|
|
86
|
-
private upsertPlanItem;
|
|
87
|
-
private removeEmptyMessage;
|
|
88
|
-
private resolveConfirmation;
|
|
89
|
-
private confirmToolExecution;
|
|
90
|
-
private syncRuntimeStatus;
|
|
91
|
-
private setStatus;
|
|
92
|
-
private appendMessage;
|
|
93
|
-
private updateMessage;
|
|
94
|
-
private latestAssistantMessage;
|
|
95
|
-
private finalizeAssistantMessage;
|
|
96
|
-
private showThinkingIndicator;
|
|
97
|
-
private hideThinkingIndicator;
|
|
98
|
-
private currentPageContext;
|
|
99
|
-
private currentRoute;
|
|
100
|
-
private shouldAutoResumeActiveRun;
|
|
101
|
-
private handleToolRequest;
|
|
102
|
-
private streamChatStep;
|
|
103
|
-
sendMessage(message: string): Promise<string>;
|
|
104
|
-
private continueActiveRun;
|
|
105
|
-
respondToPlan(approved: boolean): Promise<void>;
|
|
106
|
-
endSession(): Promise<void>;
|
|
51
|
+
interface WidgetGuideCardState {
|
|
52
|
+
id: string;
|
|
53
|
+
state: "offered" | "started" | "dismissed" | "completed";
|
|
54
|
+
source: "published" | "live";
|
|
55
|
+
route: string;
|
|
56
|
+
summary?: string | null;
|
|
57
|
+
currentStepIndex: number;
|
|
58
|
+
totalSteps: number;
|
|
59
|
+
steps: WidgetGuideStepItem[];
|
|
107
60
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
61
|
+
type WidgetConversationItem = WidgetMessageConversationItem | WidgetActionConversationItem | WidgetPlanConversationItem;
|
|
62
|
+
interface WidgetShellState {
|
|
63
|
+
minimized: boolean;
|
|
64
|
+
assistantName: string;
|
|
65
|
+
avatarUrl: string | null;
|
|
66
|
+
runtimeLabel: string;
|
|
67
|
+
statusText: string;
|
|
68
|
+
showThinkingIndicator: boolean;
|
|
69
|
+
inputValue: string;
|
|
70
|
+
accentColor: string;
|
|
71
|
+
themeVariant: "light" | "dark";
|
|
72
|
+
side: "left" | "right";
|
|
73
|
+
isSending: boolean;
|
|
74
|
+
voiceSupported: boolean;
|
|
75
|
+
voiceListening: boolean;
|
|
76
|
+
voiceWaveform: number[];
|
|
77
|
+
voiceDurationMs: number;
|
|
78
|
+
guide: WidgetGuideCardState | null;
|
|
79
|
+
items: WidgetConversationItem[];
|
|
80
|
+
}
|
|
81
|
+
interface WidgetEmbedShellProps {
|
|
82
|
+
state: WidgetShellState;
|
|
83
|
+
onOpen(): void;
|
|
84
|
+
onCollapse(): void;
|
|
85
|
+
onInputChange(value: string): void;
|
|
86
|
+
onSubmit(): void;
|
|
87
|
+
onToggleVoice(): void;
|
|
88
|
+
onApproveAction(id: string): void;
|
|
89
|
+
onDeclineAction(id: string): void;
|
|
90
|
+
onApprovePlan(): void;
|
|
91
|
+
onDeclinePlan(): void;
|
|
92
|
+
onStartGuide(): void;
|
|
93
|
+
onAdvanceGuide(): void;
|
|
94
|
+
onDismissGuide(): void;
|
|
95
|
+
onCompleteGuide(): void;
|
|
96
|
+
onRunGuideStep(): void;
|
|
97
|
+
}
|
|
98
|
+
declare function WidgetEmbedShell({ state, onOpen, onCollapse, onInputChange, onSubmit, onToggleVoice, onApproveAction, onDeclineAction, onApprovePlan, onDeclinePlan, onStartGuide, onAdvanceGuide, onDismissGuide, onCompleteGuide, onRunGuideStep, }: WidgetEmbedShellProps): react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
declare const EMBED_WIDGET_STYLES = "\n :host {\n all: initial;\n display: block;\n position: static;\n color-scheme: light;\n }\n\n *, *::before, *::after {\n box-sizing: border-box;\n }\n\n button,\n input {\n font: inherit;\n }\n\n .blinq-shell {\n position: fixed;\n bottom: 24px;\n z-index: 2147483647;\n display: flex;\n flex-direction: column;\n gap: 12px;\n width: 432px;\n max-width: calc(100vw - 24px);\n pointer-events: none;\n font-family:\n \"SF Pro Display\",\n \"SF Pro Text\",\n \"Inter\",\n ui-sans-serif,\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n \"Segoe UI\",\n sans-serif;\n --blinq-accent: #111111;\n --blinq-text: rgba(18, 18, 20, 0.96);\n --blinq-text-soft: rgba(32, 34, 38, 0.82);\n --blinq-text-muted: rgba(56, 60, 66, 0.58);\n --blinq-glass-fill: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(240, 243, 248, 0.52));\n --blinq-glass-fill-strong: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(245, 247, 250, 0.62));\n --blinq-glass-fill-dense: linear-gradient(180deg, rgba(249, 250, 252, 0.92), rgba(231, 235, 241, 0.66));\n --blinq-glass-stroke: rgba(255, 255, 255, 0.68);\n --blinq-glass-stroke-soft: rgba(255, 255, 255, 0.5);\n --blinq-glass-edge: rgba(100, 109, 123, 0.14);\n --blinq-shadow:\n 0 28px 80px rgba(155, 164, 180, 0.22),\n 0 10px 30px rgba(174, 182, 193, 0.18);\n --blinq-shadow-soft:\n 0 14px 40px rgba(170, 177, 189, 0.18),\n 0 4px 14px rgba(202, 208, 216, 0.18);\n --blinq-inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.92);\n --blinq-blur: blur(28px) saturate(170%);\n --blinq-radius-panel: 32px;\n --blinq-radius-pill: 999px;\n --blinq-radius-bubble: 28px;\n --blinq-radius-card: 30px;\n }\n\n .blinq-shell[data-side=\"left\"] {\n left: 24px;\n align-items: flex-start;\n }\n\n .blinq-shell[data-side=\"right\"] {\n right: 24px;\n align-items: flex-end;\n }\n\n .blinq-panel,\n .blinq-launcher {\n pointer-events: auto;\n }\n\n .blinq-shell {\n width: 520px;\n }\n\n .blinq-panel {\n position: relative;\n width: 100%;\n max-width: 432px;\n overflow: hidden;\n border-radius: var(--blinq-radius-panel);\n border: 1px solid var(--blinq-glass-stroke);\n background: var(--blinq-glass-fill);\n box-shadow: var(--blinq-shadow);\n backdrop-filter: var(--blinq-blur);\n -webkit-backdrop-filter: var(--blinq-blur);\n }\n\n .blinq-panel::before,\n .blinq-launcher::before {\n content: \"\";\n position: absolute;\n inset: 0;\n pointer-events: none;\n border-radius: inherit;\n box-shadow: var(--blinq-inner-highlight);\n }\n\n .blinq-launcher::after {\n content: \"\";\n position: absolute;\n inset: 1px;\n pointer-events: none;\n border-radius: inherit;\n background:\n radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.82), transparent 32%),\n linear-gradient(135deg, rgba(255, 255, 255, 0.46), transparent 55%);\n opacity: 0.88;\n transition:\n opacity 180ms ease;\n }\n\n .blinq-panel::after {\n content: \"\";\n position: absolute;\n inset: 0;\n pointer-events: none;\n border-radius: inherit;\n background:\n radial-gradient(circle at top left, rgba(255, 255, 255, 0.72), transparent 34%),\n radial-gradient(circle at bottom center, rgba(255, 255, 255, 0.26), transparent 38%);\n opacity: 0.95;\n }\n\n .blinq-header,\n .blinq-thread,\n .blinq-composer {\n position: relative;\n z-index: 1;\n }\n\n .blinq-header {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 18px 18px 10px;\n }\n\n .blinq-header-row {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px;\n }\n\n .blinq-header-copy {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 0;\n flex: 1;\n }\n\n .blinq-heading {\n font-size: 17px;\n line-height: 1.15;\n font-weight: 600;\n letter-spacing: -0.03em;\n color: var(--blinq-text);\n }\n\n .blinq-status-line {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n max-width: fit-content;\n min-height: 32px;\n padding: 0 12px;\n border-radius: var(--blinq-radius-pill);\n border: 1px solid var(--blinq-glass-stroke-soft);\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(242, 244, 248, 0.46));\n color: var(--blinq-text-soft);\n font-size: 12px;\n line-height: 1.35;\n box-shadow: var(--blinq-shadow-soft);\n backdrop-filter: blur(22px) saturate(170%);\n -webkit-backdrop-filter: blur(22px) saturate(170%);\n }\n\n .blinq-status-line::before {\n content: \"\";\n width: 7px;\n height: 7px;\n border-radius: 999px;\n background: rgba(17, 17, 17, 0.74);\n box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.34);\n flex: none;\n }\n\n .blinq-launcher {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 76px;\n min-width: 76px;\n height: 76px;\n padding: 0;\n border-radius: 999px;\n border: 1px solid var(--blinq-glass-stroke);\n background: var(--blinq-glass-fill-strong);\n box-shadow: var(--blinq-shadow-soft);\n backdrop-filter: blur(26px) saturate(175%);\n -webkit-backdrop-filter: blur(26px) saturate(175%);\n color: var(--blinq-text);\n isolation: isolate;\n }\n\n .blinq-launcher:hover {\n border-color: var(--blinq-glass-stroke);\n box-shadow: var(--blinq-shadow-soft);\n }\n\n .blinq-launcher-icon-only {\n border-radius: 999px;\n }\n\n .blinq-launcher-icon {\n position: relative;\n z-index: 1;\n width: 30px;\n height: 30px;\n color: rgba(17, 17, 17, 0.96);\n opacity: 1;\n filter:\n drop-shadow(0 1px 0 rgba(255, 255, 255, 0.66))\n drop-shadow(0 2px 6px rgba(17, 17, 17, 0.08));\n }\n\n .blinq-thread {\n min-height: 0;\n }\n\n .blinq-thread-viewport {\n width: 100%;\n }\n\n .blinq-scroll {\n display: flex;\n flex-direction: column;\n gap: 12px;\n min-height: 0;\n max-height: 432px;\n padding: 6px 18px 14px;\n overflow-y: auto;\n }\n\n .blinq-scroll::-webkit-scrollbar {\n width: 8px;\n }\n\n .blinq-scroll::-webkit-scrollbar-thumb {\n background: rgba(144, 151, 162, 0.22);\n border-radius: 999px;\n }\n\n .blinq-message {\n position: relative;\n max-width: 88%;\n padding: 14px 16px;\n border-radius: var(--blinq-radius-bubble);\n border: 1px solid var(--blinq-glass-stroke-soft);\n background: var(--blinq-glass-fill-strong);\n color: var(--blinq-text);\n font-size: 14px;\n line-height: 1.55;\n white-space: pre-wrap;\n box-shadow: var(--blinq-shadow-soft);\n backdrop-filter: blur(24px) saturate(170%);\n -webkit-backdrop-filter: blur(24px) saturate(170%);\n }\n\n .blinq-message::before {\n content: \"\";\n position: absolute;\n inset: 0;\n border-radius: inherit;\n pointer-events: none;\n box-shadow: var(--blinq-inner-highlight);\n }\n\n .blinq-message[data-role=\"assistant\"] {\n align-self: flex-start;\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(241, 244, 249, 0.58));\n }\n\n .blinq-message[data-role=\"user\"] {\n align-self: flex-end;\n background: linear-gradient(180deg, rgba(249, 250, 252, 0.94), rgba(227, 232, 238, 0.66));\n border-color: rgba(255, 255, 255, 0.74);\n }\n\n .blinq-message[data-kind=\"artifact\"] {\n width: 100%;\n max-width: 100%;\n padding: 0;\n border: 0;\n background: transparent;\n box-shadow: none;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n }\n\n .blinq-message[data-kind=\"artifact\"]::before {\n display: none;\n }\n\n .blinq-message-copy {\n display: block;\n }\n\n .blinq-message-copy-reveal {\n animation: blinq-copy-reveal 240ms cubic-bezier(0.16, 1, 0.3, 1);\n will-change: opacity, transform;\n }\n\n .blinq-thinking-card {\n max-width: fit-content;\n padding-right: 18px;\n }\n\n .blinq-thinking {\n display: inline-flex;\n align-items: center;\n gap: 10px;\n color: var(--blinq-text-soft);\n font-size: 13px;\n }\n\n .blinq-thinking-dots {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n }\n\n .blinq-thinking-dots > span {\n width: 6px;\n height: 6px;\n border-radius: 999px;\n background: rgba(17, 17, 17, 0.74);\n animation: blinq-thinking-pulse 1.2s ease-in-out infinite;\n }\n\n .blinq-thinking-dots > span:nth-child(2) {\n animation-delay: 100ms;\n }\n\n .blinq-thinking-dots > span:nth-child(3) {\n animation-delay: 200ms;\n }\n\n .blinq-card {\n display: flex;\n flex-direction: column;\n gap: 12px;\n border-radius: var(--blinq-radius-card);\n border: 1px solid var(--blinq-glass-stroke-soft);\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(240, 243, 248, 0.52));\n color: var(--blinq-text);\n box-shadow: var(--blinq-shadow-soft);\n backdrop-filter: blur(26px) saturate(170%);\n -webkit-backdrop-filter: blur(26px) saturate(170%);\n }\n\n .blinq-card-header {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 16px 16px 0;\n }\n\n .blinq-card-title {\n font-size: 15px;\n line-height: 1.2;\n font-weight: 600;\n letter-spacing: -0.02em;\n color: var(--blinq-text);\n }\n\n .blinq-card-description {\n font-size: 13px;\n line-height: 1.45;\n color: var(--blinq-text-muted);\n }\n\n .blinq-card-content {\n padding: 0 16px 16px;\n }\n\n .blinq-action-card,\n .blinq-plan-card,\n .blinq-guide-card {\n align-self: stretch;\n }\n\n .blinq-guide-content {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n .blinq-guide-step-shell {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 14px;\n border-radius: 22px;\n border: 1px solid rgba(255, 255, 255, 0.64);\n background:\n radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 42%),\n linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(242, 245, 249, 0.56));\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, 0.94),\n 0 10px 22px rgba(183, 191, 201, 0.13);\n }\n\n .blinq-guide-step-meta {\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--blinq-text-soft);\n }\n\n .blinq-guide-step-title {\n font-size: 14px;\n line-height: 1.35;\n font-weight: 600;\n color: var(--blinq-text);\n }\n\n .blinq-guide-step-copy {\n font-size: 13px;\n line-height: 1.5;\n color: var(--blinq-text-muted);\n }\n\n .blinq-plan-step {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 12px 13px;\n margin-top: 10px;\n border-radius: 24px;\n border: 1px solid rgba(255, 255, 255, 0.62);\n background:\n radial-gradient(circle at top left, rgba(255, 255, 255, 0.72), transparent 38%),\n linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(238, 242, 247, 0.54));\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, 0.94),\n 0 8px 20px rgba(189, 196, 206, 0.12);\n }\n\n .blinq-plan-step:first-child {\n margin-top: 0;\n }\n\n .blinq-plan-step-index {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n border-radius: 999px;\n border: 1px solid rgba(255, 255, 255, 0.7);\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(240, 243, 247, 0.62));\n color: rgba(17, 17, 17, 0.82);\n font-size: 11px;\n font-weight: 700;\n flex: none;\n }\n\n .blinq-plan-step-copy {\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n color: var(--blinq-text);\n font-size: 13px;\n flex: 1;\n }\n\n .blinq-plan-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px;\n }\n\n .blinq-plan-content {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n .blinq-plan-steps {\n display: flex;\n flex-direction: column;\n gap: 0;\n }\n\n .blinq-plan-step-title-row {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 10px;\n }\n\n .blinq-plan-step-title {\n min-width: 0;\n font-size: 13px;\n line-height: 1.4;\n font-weight: 600;\n letter-spacing: -0.01em;\n }\n\n .blinq-plan-step-status-pill {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 24px;\n padding: 0 10px;\n border-radius: 999px;\n border: 1px solid rgba(255, 255, 255, 0.58);\n background: rgba(255, 255, 255, 0.58);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);\n color: var(--blinq-text-soft);\n font-size: 11px;\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.01em;\n white-space: nowrap;\n }\n\n .blinq-plan-step-meta {\n font-size: 12px;\n color: var(--blinq-text-muted);\n }\n\n .blinq-plan-step[data-current=\"true\"] {\n background:\n radial-gradient(circle at top left, rgba(255, 255, 255, 0.82), transparent 40%),\n linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(243, 246, 250, 0.64));\n border-color: rgba(255, 255, 255, 0.74);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, 0.96),\n 0 12px 26px rgba(183, 191, 201, 0.15);\n }\n\n .blinq-plan-step[data-current=\"true\"] .blinq-plan-step-index {\n box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.48);\n }\n\n .blinq-plan-step[data-current=\"true\"] .blinq-plan-step-status-pill {\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(240, 243, 247, 0.66));\n color: var(--blinq-text);\n }\n\n .blinq-plan-step[data-status=\"completed\"] .blinq-plan-step-index {\n background: rgba(227, 232, 237, 0.88);\n }\n\n .blinq-plan-step[data-status=\"completed\"] .blinq-plan-step-status-pill {\n background: rgba(244, 246, 249, 0.78);\n }\n\n .blinq-plan-step[data-status=\"failed\"],\n .blinq-plan-step[data-status=\"cancelled\"] {\n opacity: 0.72;\n }\n\n .blinq-action-meta-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n flex-wrap: wrap;\n }\n\n .blinq-action-details {\n margin-top: 8px;\n }\n\n .blinq-action-details > summary {\n display: inline-flex;\n align-items: center;\n min-height: 34px;\n padding: 0 12px;\n border-radius: 999px;\n border: 1px solid rgba(255, 255, 255, 0.56);\n background: rgba(255, 255, 255, 0.46);\n color: var(--blinq-text-soft);\n font-size: 12px;\n font-weight: 600;\n list-style: none;\n cursor: pointer;\n }\n\n .blinq-action-details > summary::-webkit-details-marker {\n display: none;\n }\n\n .blinq-code {\n margin-top: 10px;\n padding: 12px 14px;\n border-radius: 20px;\n border: 1px solid rgba(255, 255, 255, 0.56);\n background: rgba(255, 255, 255, 0.52);\n color: var(--blinq-text-soft);\n font-size: 12px;\n line-height: 1.5;\n white-space: pre-wrap;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n }\n\n .blinq-action-state {\n margin-top: 12px;\n font-size: 12px;\n line-height: 1.4;\n color: var(--blinq-text-muted);\n }\n\n .blinq-action-state[data-state=\"approved\"] {\n color: var(--blinq-text-soft);\n }\n\n .blinq-action-state[data-state=\"declined\"] {\n color: var(--blinq-text-muted);\n }\n\n .blinq-actions {\n display: flex;\n gap: 10px;\n margin-top: 14px;\n }\n\n .blinq-actions > * {\n flex: 1;\n }\n\n .blinq-badge-pill {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 30px;\n padding: 0 12px;\n border-radius: 999px;\n border: 1px solid rgba(255, 255, 255, 0.54);\n background: rgba(255, 255, 255, 0.46);\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.02em;\n color: var(--blinq-text-soft);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);\n }\n\n .blinq-badge-pill-default {\n background: rgba(255, 255, 255, 0.5);\n }\n\n .blinq-badge-pill-outline {\n background: rgba(247, 248, 250, 0.34);\n color: var(--blinq-text-muted);\n }\n\n .blinq-badge-pill-soft {\n background: rgba(255, 255, 255, 0.68);\n color: var(--blinq-text-soft);\n }\n\n .blinq-badge-pill-accent {\n background: rgba(243, 245, 249, 0.84);\n color: var(--blinq-text);\n }\n\n .blinq-composer {\n padding: 8px 18px 18px;\n }\n\n .blinq-composer-controls {\n display: flex;\n }\n\n .blinq-input-shell {\n position: relative;\n width: 100%;\n }\n\n .blinq-input,\n .blinq-recording-input {\n width: 100%;\n min-width: 0;\n height: 58px;\n padding: 0 54px 0 54px;\n border-radius: 999px;\n border: 1px solid var(--blinq-glass-stroke);\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(239, 242, 247, 0.54));\n color: var(--blinq-text);\n box-shadow:\n var(--blinq-inner-highlight),\n 0 10px 26px rgba(183, 189, 198, 0.16);\n font-size: 13px;\n outline: none;\n backdrop-filter: blur(22px) saturate(170%);\n -webkit-backdrop-filter: blur(22px) saturate(170%);\n }\n\n .blinq-input::placeholder {\n color: var(--blinq-text-muted);\n }\n\n .blinq-recording-input {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n\n .blinq-recording-time {\n flex: none;\n min-width: 42px;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.04em;\n color: var(--blinq-text-soft);\n font-variant-numeric: tabular-nums;\n }\n\n .blinq-recording-wave-shell {\n position: relative;\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n min-width: 0;\n height: 30px;\n padding: 0 10px;\n border-radius: 999px;\n border: 1px solid rgba(255, 255, 255, 0.54);\n background:\n linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(242, 245, 248, 0.34));\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);\n overflow: hidden;\n }\n\n .blinq-recording-wave-shell::before {\n content: \"\";\n position: absolute;\n left: 10px;\n right: 10px;\n top: 50%;\n height: 1px;\n border-radius: 999px;\n background: linear-gradient(90deg, transparent, rgba(17, 17, 17, 0.12), transparent);\n transform: translateY(-50%);\n pointer-events: none;\n }\n\n .blinq-recording-waveform {\n position: relative;\n display: flex;\n align-items: center;\n gap: 4px;\n flex: 1;\n min-width: 0;\n height: 100%;\n overflow: hidden;\n }\n\n .blinq-recording-waveform-bar {\n width: 4px;\n min-width: 4px;\n height: 62%;\n border-radius: 999px;\n background: linear-gradient(180deg, rgba(17, 17, 17, 0.14), rgba(17, 17, 17, 0.36));\n transform-origin: center;\n transition:\n transform 120ms ease,\n opacity 160ms ease;\n opacity: 0.92;\n box-shadow:\n 0 0 0 1px rgba(255, 255, 255, 0.26),\n 0 2px 8px rgba(17, 17, 17, 0.08);\n }\n\n .blinq-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n border: 1px solid transparent;\n border-radius: 999px;\n color: var(--blinq-text);\n font-size: 14px;\n font-weight: 600;\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(236, 239, 244, 0.5));\n box-shadow: var(--blinq-shadow-soft);\n backdrop-filter: blur(20px) saturate(170%);\n -webkit-backdrop-filter: blur(20px) saturate(170%);\n transition:\n transform 160ms ease,\n box-shadow 180ms ease,\n border-color 180ms ease,\n background 180ms ease,\n opacity 120ms ease;\n cursor: pointer;\n outline: none;\n }\n\n .blinq-button:hover:not(:disabled) {\n transform: translateY(-1px);\n border-color: rgba(255, 255, 255, 0.82);\n box-shadow:\n 0 14px 28px rgba(175, 181, 191, 0.22),\n 0 4px 10px rgba(189, 195, 204, 0.16);\n }\n\n .blinq-input-mic:hover:not(:disabled),\n .blinq-input-send:hover:not(:disabled) {\n transform: translateY(-50%);\n border-color: rgba(255, 255, 255, 0.82);\n box-shadow:\n 0 14px 28px rgba(175, 181, 191, 0.16),\n 0 4px 10px rgba(189, 195, 204, 0.12);\n }\n\n .blinq-button:disabled {\n opacity: 0.52;\n cursor: not-allowed;\n }\n\n .blinq-button:focus-visible,\n .blinq-input:focus-visible {\n box-shadow:\n 0 0 0 3px rgba(255, 255, 255, 0.68),\n 0 0 0 6px rgba(17, 17, 17, 0.08);\n }\n\n .blinq-button-default {\n border-color: rgba(255, 255, 255, 0.74);\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(237, 241, 247, 0.66));\n color: var(--blinq-text);\n }\n\n .blinq-button-outline,\n .blinq-button-ghost {\n border-color: rgba(255, 255, 255, 0.58);\n background: rgba(255, 255, 255, 0.42);\n color: var(--blinq-text-soft);\n }\n\n .blinq-button-destructive {\n border-color: rgba(255, 255, 255, 0.58);\n background: linear-gradient(180deg, rgba(248, 249, 251, 0.7), rgba(230, 233, 239, 0.54));\n color: var(--blinq-text);\n }\n\n .blinq-button-md {\n height: 44px;\n padding: 0 16px;\n }\n\n .blinq-button-sm {\n height: 38px;\n padding: 0 13px;\n font-size: 13px;\n }\n\n .blinq-button-icon {\n width: 48px;\n height: 48px;\n padding: 0;\n }\n\n .blinq-button-icon-sm {\n width: 38px;\n height: 38px;\n padding: 0;\n }\n\n .blinq-input-mic,\n .blinq-input-send {\n position: absolute;\n top: 50%;\n z-index: 2;\n width: 42px;\n height: 42px;\n min-width: 42px;\n transform: translateY(-50%);\n }\n\n .blinq-input-mic {\n left: 8px;\n }\n\n .blinq-input-send {\n right: 8px;\n }\n\n .blinq-panel {\n display: flex;\n flex-direction: column;\n height: min(720px, calc(100vh - 64px));\n max-width: 520px;\n border: 1px solid rgba(226, 232, 240, 0.96);\n border-radius: 30px;\n background: #ffffff;\n box-shadow:\n 0 28px 80px rgba(15, 23, 42, 0.14),\n 0 10px 28px rgba(15, 23, 42, 0.08);\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n }\n\n .blinq-panel::before,\n .blinq-panel::after,\n .blinq-message::before,\n .blinq-status-line::before {\n display: none;\n }\n\n .blinq-header {\n flex: none;\n gap: 0;\n padding: 22px 24px 18px;\n border-bottom: 1px solid rgba(226, 232, 240, 0.86);\n background: #ffffff;\n }\n\n .blinq-header-row {\n align-items: center;\n gap: 14px;\n }\n\n .blinq-header-copy {\n gap: 5px;\n }\n\n .blinq-heading {\n font-size: 22px;\n line-height: 1.05;\n font-weight: 700;\n letter-spacing: -0.04em;\n color: #111827;\n }\n\n .blinq-status-line {\n display: block;\n max-width: 100%;\n min-height: 0;\n padding: 0;\n border: 0;\n background: transparent;\n box-shadow: none;\n color: #6b7280;\n font-size: 13px;\n line-height: 1.35;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n }\n\n .blinq-avatar {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 64px;\n min-width: 64px;\n height: 64px;\n overflow: visible;\n border: 1px solid rgba(226, 232, 240, 0.95);\n border-radius: 999px;\n background:\n radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.86)),\n #ffffff;\n box-shadow:\n 0 14px 26px rgba(15, 23, 42, 0.08),\n inset 0 1px 0 rgba(255, 255, 255, 0.9);\n color: #111827;\n flex: none;\n }\n\n .blinq-avatar-image {\n width: 100%;\n height: 100%;\n border-radius: inherit;\n object-fit: cover;\n }\n\n .blinq-avatar-icon {\n color: #111827;\n }\n\n .blinq-avatar-status {\n position: absolute;\n right: 5px;\n bottom: 6px;\n width: 11px;\n height: 11px;\n border: 2px solid #ffffff;\n border-radius: 999px;\n background: #21d262;\n box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);\n }\n\n .blinq-avatar-label {\n display: none;\n }\n\n .blinq-thread {\n display: flex;\n flex: 1 1 auto;\n min-height: 0;\n background: #ffffff;\n }\n\n .blinq-thread-viewport {\n flex: 1 1 auto;\n height: 100%;\n }\n\n .blinq-scroll {\n flex: 1 1 auto;\n gap: 12px;\n max-height: none;\n min-height: 0;\n padding: 30px 24px 20px;\n background: #ffffff;\n }\n\n .blinq-message {\n max-width: 82%;\n padding: 10px 15px;\n border: 1px solid rgba(226, 232, 240, 0.96);\n border-radius: 18px;\n background: #ffffff;\n box-shadow: none;\n color: #111827;\n font-size: 15px;\n line-height: 1.48;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n }\n\n .blinq-message[data-role=\"assistant\"] {\n background: #ffffff;\n }\n\n .blinq-message[data-role=\"user\"] {\n border-color: rgba(209, 213, 219, 0.96);\n background: #f8fafc;\n }\n\n .blinq-card,\n .blinq-guide-step-shell,\n .blinq-plan-step {\n border-color: rgba(226, 232, 240, 0.92);\n background: #ffffff;\n box-shadow: none;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n }\n\n .blinq-composer {\n flex: none;\n padding: 18px 24px 8px;\n border-top: 1px solid rgba(226, 232, 240, 0.86);\n background: #ffffff;\n }\n\n .blinq-input,\n .blinq-recording-input {\n height: 56px;\n padding: 0 60px 0 54px;\n border: 1px solid rgba(209, 213, 219, 0.92);\n border-radius: 999px;\n background: #ffffff;\n box-shadow: none;\n color: #111827;\n font-size: 15px;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n }\n\n .blinq-input::placeholder {\n color: #9ca3af;\n }\n\n .blinq-input-mic {\n left: 7px;\n width: 42px;\n min-width: 42px;\n height: 42px;\n border: 0;\n background: transparent;\n box-shadow: none;\n color: #6b7280;\n }\n\n .blinq-input-send {\n right: 7px;\n width: 42px;\n min-width: 42px;\n height: 42px;\n border: 0;\n background: #6b6f76;\n box-shadow: none;\n color: #ffffff;\n }\n\n .blinq-input-send:hover:not(:disabled) {\n transform: translateY(-50%);\n background: #4b5563;\n box-shadow: none;\n }\n\n .blinq-button-ghost {\n border-color: transparent;\n background: transparent;\n box-shadow: none;\n }\n\n .blinq-powered {\n flex: none;\n padding: 0 24px 18px;\n color: #c0c4ca;\n font-size: 10px;\n font-weight: 800;\n letter-spacing: 0.16em;\n line-height: 1;\n text-align: center;\n }\n\n @keyframes blinq-thinking-pulse {\n 0%, 100% {\n opacity: 0.28;\n transform: translateY(0);\n }\n\n 50% {\n opacity: 1;\n transform: translateY(-1.5px);\n }\n }\n\n @keyframes blinq-copy-reveal {\n 0% {\n opacity: 0;\n transform: translateY(3px);\n }\n\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n @keyframes blinq-orbit-drift {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n }\n\n @keyframes blinq-orbit-pulse {\n 0%, 100% {\n transform: scale(1);\n opacity: 0.9;\n }\n\n 50% {\n transform: scale(1.16);\n opacity: 1;\n }\n }\n\n @keyframes blinq-core-breathe {\n 0%, 100% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(1.04);\n }\n }\n\n @media (max-width: 720px) {\n .blinq-shell {\n right: 12px;\n left: 12px;\n bottom: 12px;\n width: auto;\n max-width: none;\n align-items: stretch;\n }\n\n .blinq-shell[data-side=\"left\"],\n .blinq-shell[data-side=\"right\"] {\n right: 12px;\n left: 12px;\n align-items: stretch;\n }\n\n .blinq-panel,\n .blinq-launcher {\n width: 100%;\n max-width: none;\n }\n\n .blinq-launcher {\n width: 76px;\n min-width: 76px;\n height: 76px;\n align-self: flex-end;\n }\n\n .blinq-message {\n max-width: 92%;\n }\n\n .blinq-actions {\n flex-direction: column;\n }\n\n .blinq-input,\n .blinq-recording-input {\n height: 56px;\n }\n\n .blinq-panel {\n height: min(700px, calc(100vh - 24px));\n }\n }\n";
|
|
113
101
|
|
|
114
|
-
export {
|
|
102
|
+
export { EMBED_WIDGET_STYLES, type WidgetConversationItem, WidgetEmbedShell, type WidgetShellState };
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BlinqWidget,
|
|
3
|
+
EMBED_WIDGET_STYLES,
|
|
4
|
+
PageToolRegistry,
|
|
5
|
+
WidgetEmbedShell,
|
|
6
|
+
collectNormalizedPageContext,
|
|
3
7
|
createBlinqWidget,
|
|
8
|
+
detectNativeWebMcpSupport,
|
|
4
9
|
init,
|
|
5
10
|
initFromConfig
|
|
6
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DQF42RXH.js";
|
|
7
12
|
export {
|
|
8
13
|
BlinqWidget,
|
|
14
|
+
EMBED_WIDGET_STYLES,
|
|
15
|
+
PageToolRegistry,
|
|
16
|
+
WidgetEmbedShell,
|
|
17
|
+
collectNormalizedPageContext,
|
|
9
18
|
createBlinqWidget,
|
|
19
|
+
detectNativeWebMcpSupport,
|
|
10
20
|
init,
|
|
11
21
|
initFromConfig
|
|
12
22
|
};
|