@mihe-dev/js 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +114 -2
- package/dist/audio.d.ts +121 -0
- package/dist/audio.d.ts.map +1 -0
- package/dist/audio.js +377 -0
- package/dist/audio.js.map +1 -0
- package/dist/chart.d.ts +15 -0
- package/dist/chart.d.ts.map +1 -0
- package/dist/chart.js +58 -0
- package/dist/chart.js.map +1 -0
- package/dist/client.d.ts +226 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +358 -0
- package/dist/client.js.map +1 -0
- package/dist/commands.d.ts +70 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +295 -0
- package/dist/commands.js.map +1 -0
- package/dist/debug.d.ts +17 -0
- package/dist/debug.d.ts.map +1 -0
- package/dist/debug.js +29 -0
- package/dist/debug.js.map +1 -0
- package/dist/declarations.d.ts +160 -0
- package/dist/declarations.d.ts.map +1 -0
- package/dist/declarations.js +171 -0
- package/dist/declarations.js.map +1 -0
- package/dist/highlight.d.ts +77 -0
- package/dist/highlight.d.ts.map +1 -0
- package/dist/highlight.js +233 -0
- package/dist/highlight.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/mihe.d.ts +343 -0
- package/dist/mihe.d.ts.map +1 -0
- package/dist/mihe.iife.min.js +206 -0
- package/dist/mihe.iife.min.js.map +7 -0
- package/dist/mihe.js +720 -0
- package/dist/mihe.js.map +1 -0
- package/dist/mihe.min.js +206 -0
- package/dist/mihe.min.js.map +7 -0
- package/dist/store.d.ts +175 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +208 -0
- package/dist/store.js.map +1 -0
- package/dist/voice.d.ts +192 -0
- package/dist/voice.d.ts.map +1 -0
- package/dist/voice.js +443 -0
- package/dist/voice.js.map +1 -0
- package/dist/widget/card.d.ts +15 -0
- package/dist/widget/card.d.ts.map +1 -0
- package/dist/widget/card.js +28 -0
- package/dist/widget/card.js.map +1 -0
- package/dist/widget/dom.d.ts +24 -0
- package/dist/widget/dom.d.ts.map +1 -0
- package/dist/widget/dom.js +49 -0
- package/dist/widget/dom.js.map +1 -0
- package/dist/widget/element.d.ts +88 -0
- package/dist/widget/element.d.ts.map +1 -0
- package/dist/widget/element.js +285 -0
- package/dist/widget/element.js.map +1 -0
- package/dist/widget/format.d.ts +24 -0
- package/dist/widget/format.d.ts.map +1 -0
- package/dist/widget/format.js +64 -0
- package/dist/widget/format.js.map +1 -0
- package/dist/widget/icons.d.ts +5 -0
- package/dist/widget/icons.d.ts.map +1 -0
- package/dist/widget/icons.js +19 -0
- package/dist/widget/icons.js.map +1 -0
- package/dist/widget/launcher.d.ts +13 -0
- package/dist/widget/launcher.d.ts.map +1 -0
- package/dist/widget/launcher.js +27 -0
- package/dist/widget/launcher.js.map +1 -0
- package/dist/widget/mark.d.ts +10 -0
- package/dist/widget/mark.d.ts.map +1 -0
- package/dist/widget/mark.js +20 -0
- package/dist/widget/mark.js.map +1 -0
- package/dist/widget/orb.d.ts +91 -0
- package/dist/widget/orb.d.ts.map +1 -0
- package/dist/widget/orb.js +497 -0
- package/dist/widget/orb.js.map +1 -0
- package/dist/widget/panel.d.ts +40 -0
- package/dist/widget/panel.d.ts.map +1 -0
- package/dist/widget/panel.js +239 -0
- package/dist/widget/panel.js.map +1 -0
- package/dist/widget/styles.d.ts +22 -0
- package/dist/widget/styles.d.ts.map +1 -0
- package/dist/widget/styles.js +181 -0
- package/dist/widget/styles.js.map +1 -0
- package/package.json +43 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../../js/src/widget/panel.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAsB,KAAK,IAAI,EAAE,KAAK,SAAS,EAAsB,MAAM,SAAS,CAAC;AAI5F,eAAO,MAAM,mBAAmB,EAAE,SAAS,EAA2B,CAAC;AAEvE,MAAM,WAAW,YAAY;IAC3B,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,oEAAoE;IACpE,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,qBAAa,KAAK;IAad,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,OAAO;IAbjB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAO;IAC/B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAc;IAClC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAoB;IAChD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAc;IACzC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAmB;IACzC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoB;IAC/C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAC5C,gFAAgF;IAChF,OAAO,CAAC,KAAK,CAAiB;gBAGX,IAAI,EAAE,IAAI,EACnB,OAAO,EAAE,YAAY;IAiD/B,UAAU,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAIvC,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAgC9B,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,cAAc;CA6CvB"}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The conversation: transcript, confirmation cards, composer, and in the
|
|
3
|
+
* classic form the microphone.
|
|
4
|
+
*
|
|
5
|
+
* Built once and updated. The composer and the microphone buttons in
|
|
6
|
+
* particular are never rebuilt: a rebuilt input loses what the user was
|
|
7
|
+
* typing, and a push-to-talk button replaced mid-press loses its pointer
|
|
8
|
+
* capture, so the release lands elsewhere and the microphone stays open.
|
|
9
|
+
*/
|
|
10
|
+
import { ASSISTANT_PANEL_ID } from "../mihe.js";
|
|
11
|
+
import { confirmationCard } from "./card.js";
|
|
12
|
+
import { h, replace, setAttrs } from "./dom.js";
|
|
13
|
+
export const DEFAULT_VOICE_MODES = ["hands-free", "hold"];
|
|
14
|
+
export class Panel {
|
|
15
|
+
mihe;
|
|
16
|
+
options;
|
|
17
|
+
root;
|
|
18
|
+
heading;
|
|
19
|
+
dot;
|
|
20
|
+
closeButton;
|
|
21
|
+
transcript;
|
|
22
|
+
input;
|
|
23
|
+
sendButton;
|
|
24
|
+
voiceControl;
|
|
25
|
+
/** What the transcript was last drawn from, so it is redrawn only on change. */
|
|
26
|
+
drawn = [];
|
|
27
|
+
constructor(mihe, options) {
|
|
28
|
+
this.mihe = mihe;
|
|
29
|
+
this.options = options;
|
|
30
|
+
this.heading = document.createTextNode("");
|
|
31
|
+
this.dot = h("span", { class: "status-dot", attrs: { "aria-hidden": "true" } });
|
|
32
|
+
this.closeButton = h("button", {
|
|
33
|
+
class: "icon-button",
|
|
34
|
+
attrs: { type: "button", "aria-label": "Close assistant" },
|
|
35
|
+
on: { click: () => this.mihe.close() },
|
|
36
|
+
}, "✕");
|
|
37
|
+
this.transcript = h("div", { class: "transcript" });
|
|
38
|
+
this.input = h("input", {
|
|
39
|
+
class: "input",
|
|
40
|
+
attrs: { "aria-label": "Message" },
|
|
41
|
+
on: { input: () => this.syncSend(this.mihe.getState()) },
|
|
42
|
+
});
|
|
43
|
+
this.sendButton = h("button", { class: "send", attrs: { type: "submit" } }, "Send");
|
|
44
|
+
this.voiceControl = new VoiceControl(mihe);
|
|
45
|
+
const composer = h("form", {
|
|
46
|
+
class: "composer",
|
|
47
|
+
on: {
|
|
48
|
+
submit: (event) => {
|
|
49
|
+
event.preventDefault();
|
|
50
|
+
this.mihe.send(this.input.value);
|
|
51
|
+
this.input.value = "";
|
|
52
|
+
this.syncSend(this.mihe.getState());
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
}, this.voiceControl.root, this.input, this.sendButton);
|
|
56
|
+
this.root = h("section", { class: "panel", attrs: { id: ASSISTANT_PANEL_ID } }, h("header", { class: "header" }, h("div", { class: "header-title" }, this.dot, this.heading), this.closeButton), this.transcript, composer);
|
|
57
|
+
}
|
|
58
|
+
setOptions(options) {
|
|
59
|
+
this.options = options;
|
|
60
|
+
}
|
|
61
|
+
update(state) {
|
|
62
|
+
const heading = this.options.title ?? state.assistantName ?? "Assistant";
|
|
63
|
+
this.heading.data = heading;
|
|
64
|
+
this.root.setAttribute("aria-label", heading);
|
|
65
|
+
this.dot.classList.toggle("open", state.connection === "open");
|
|
66
|
+
this.closeButton.hidden = !this.options.showClose;
|
|
67
|
+
this.input.placeholder = this.options.placeholder ?? "Ask me anything about this app…";
|
|
68
|
+
this.input.disabled = state.connection !== "open";
|
|
69
|
+
this.syncSend(state);
|
|
70
|
+
// The modes the app allows. Offering one it does not would be a button
|
|
71
|
+
// the runtime refuses.
|
|
72
|
+
const modes = state.widgetSettings?.voiceModes ?? DEFAULT_VOICE_MODES;
|
|
73
|
+
const showVoice = this.options.showVoice && state.voice.available && modes.length > 0;
|
|
74
|
+
this.voiceControl.root.hidden = !showVoice;
|
|
75
|
+
if (showVoice) {
|
|
76
|
+
this.voiceControl.update(state.voice, state.connection !== "open", modes);
|
|
77
|
+
}
|
|
78
|
+
const inputs = [
|
|
79
|
+
state.messages,
|
|
80
|
+
state.proposals,
|
|
81
|
+
state.voice.state === "connecting",
|
|
82
|
+
state.voice.notice,
|
|
83
|
+
state.lastError,
|
|
84
|
+
state.connection,
|
|
85
|
+
];
|
|
86
|
+
if (inputs.every((value, index) => value === this.drawn[index]))
|
|
87
|
+
return;
|
|
88
|
+
this.drawn = inputs;
|
|
89
|
+
this.drawTranscript(state);
|
|
90
|
+
}
|
|
91
|
+
syncSend(state) {
|
|
92
|
+
this.sendButton.disabled = state.busy || !this.input.value.trim() || state.connection !== "open";
|
|
93
|
+
}
|
|
94
|
+
drawTranscript(state) {
|
|
95
|
+
replace(this.transcript, state.messages.length === 0 &&
|
|
96
|
+
h("p", { class: "empty" }, "Ask where something is, what a screen does, or for help getting something done."), ...state.messages.map((message) => h("div", { class: message.role === "user" ? "bubble-user" : "bubble-assistant" }, message.text, message.streaming && message.text === "" && h("span", { class: "thinking" }, "thinking…"), message.sources && message.sources.length > 0 &&
|
|
97
|
+
// Titles only. The snippet is what the model read, not something
|
|
98
|
+
// a reader needs.
|
|
99
|
+
h("div", { class: "sources" }, ...message.sources.map((source) => h("span", { class: "source" }, source.url && /^https?:\/\//i.test(source.url)
|
|
100
|
+
? h("a", { attrs: { href: source.url, target: "_blank", rel: "noreferrer noopener" } }, source.title)
|
|
101
|
+
: source.title))))), ...state.proposals.map((proposal) => confirmationCard(proposal, this.mihe.respondToProposal)),
|
|
102
|
+
// Setting up a voice session takes a moment, and the microphone stays
|
|
103
|
+
// shut until it finishes (amendment 32). Without a word here the user
|
|
104
|
+
// talks into a session that is not listening yet.
|
|
105
|
+
state.voice.state === "connecting" && h("div", { class: "voice-notice" }, "Setting up the microphone…"), state.voice.notice && h("div", { class: "voice-notice" }, state.voice.notice), state.lastError && h("div", { class: "error" }, state.lastError), state.connection !== "open" &&
|
|
106
|
+
h("div", { class: "notice" }, state.connection === "closed" ? "Disconnected." : "Connecting…"));
|
|
107
|
+
this.transcript.scrollTo?.({ top: this.transcript.scrollHeight, behavior: "smooth" });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The microphone, in whichever of its two modes is running.
|
|
112
|
+
*
|
|
113
|
+
* Idle, it offers both: hold to talk, or hands-free. Once a session is live
|
|
114
|
+
* only the running one is shown, with a way out.
|
|
115
|
+
*/
|
|
116
|
+
class VoiceControl {
|
|
117
|
+
mihe;
|
|
118
|
+
root;
|
|
119
|
+
hold;
|
|
120
|
+
handsFree;
|
|
121
|
+
stopHandsFree;
|
|
122
|
+
pulse;
|
|
123
|
+
constructor(mihe) {
|
|
124
|
+
this.mihe = mihe;
|
|
125
|
+
this.hold = pushToTalk(mihe);
|
|
126
|
+
this.handsFree = h("button", {
|
|
127
|
+
class: "hands-free",
|
|
128
|
+
attrs: {
|
|
129
|
+
type: "button",
|
|
130
|
+
"aria-label": "Start hands-free voice",
|
|
131
|
+
title: "Hands-free — talk without holding anything",
|
|
132
|
+
},
|
|
133
|
+
on: { click: () => this.mihe.voice.start({ handsFree: true }) },
|
|
134
|
+
}, "∞");
|
|
135
|
+
this.pulse = h("span", { class: "pulse" });
|
|
136
|
+
this.stopHandsFree = h("button", {
|
|
137
|
+
class: "mic live",
|
|
138
|
+
attrs: { type: "button", "aria-label": "Stop hands-free voice", "aria-pressed": "true" },
|
|
139
|
+
on: { click: () => this.mihe.voice.stop() },
|
|
140
|
+
}, this.pulse);
|
|
141
|
+
this.root = h("span", { attrs: { style: "display: contents" } }, this.hold, this.handsFree, this.stopHandsFree);
|
|
142
|
+
}
|
|
143
|
+
update(voice, disabled, modes) {
|
|
144
|
+
// Connecting is not live: the microphone is shut until the provider
|
|
145
|
+
// accepts its configuration, and a live-looking button invites talking
|
|
146
|
+
// into a session that cannot hear yet.
|
|
147
|
+
const live = voice.state !== "idle" && voice.state !== "error" && voice.state !== "connecting";
|
|
148
|
+
const liveHandsFree = live && voice.handsFree;
|
|
149
|
+
this.stopHandsFree.hidden = !liveHandsFree;
|
|
150
|
+
this.hold.hidden = liveHandsFree || (!live && !modes.includes("hold"));
|
|
151
|
+
this.handsFree.hidden = live || !modes.includes("hands-free");
|
|
152
|
+
this.stopHandsFree.disabled = disabled;
|
|
153
|
+
this.handsFree.disabled = disabled;
|
|
154
|
+
this.stopHandsFree.title =
|
|
155
|
+
voice.state === "speaking" ? "Speaking — just talk to interrupt" : "Listening — say anything";
|
|
156
|
+
// Speaking and listening pulse at different rates: a hands-free user
|
|
157
|
+
// cannot tell from a still icon whether the microphone is open.
|
|
158
|
+
this.pulse.classList.toggle("fast", voice.state === "speaking");
|
|
159
|
+
const connecting = voice.state === "connecting";
|
|
160
|
+
const recording = voice.state === "recording";
|
|
161
|
+
setAttrs(this.hold, {
|
|
162
|
+
"aria-label": connecting
|
|
163
|
+
? "Setting up the microphone"
|
|
164
|
+
: !live
|
|
165
|
+
? "Start voice"
|
|
166
|
+
: recording
|
|
167
|
+
? "Release to send"
|
|
168
|
+
: "Hold to speak",
|
|
169
|
+
"aria-busy": connecting ? "true" : undefined,
|
|
170
|
+
"aria-pressed": recording ? "true" : "false",
|
|
171
|
+
title: voice.state === "thinking" ? "Thinking…" : voice.state === "speaking" ? "Speaking — press to interrupt" : undefined,
|
|
172
|
+
});
|
|
173
|
+
this.hold.disabled = disabled || connecting;
|
|
174
|
+
this.hold.classList.toggle("recording", recording);
|
|
175
|
+
this.hold.classList.toggle("live", live && !recording);
|
|
176
|
+
this.hold.textContent = voice.state === "thinking" ? "…" : "\u{1F399}";
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* The push-to-talk button: hold to speak, release to send, the same gesture
|
|
181
|
+
* on a mouse, a touchscreen and a keyboard.
|
|
182
|
+
*
|
|
183
|
+
* - **Pointer down, not click,** because the press begins the utterance and
|
|
184
|
+
* the release ends it. It is also the gesture iOS Safari needs before any
|
|
185
|
+
* audio, which is why the first press opens the session.
|
|
186
|
+
* - **Pointer capture,** so a finger that slides off still ends the
|
|
187
|
+
* utterance on release.
|
|
188
|
+
* - **Space and Enter, held,** with key repeat ignored.
|
|
189
|
+
*
|
|
190
|
+
* State is read at the moment of each event, never captured.
|
|
191
|
+
*/
|
|
192
|
+
function pushToTalk(mihe) {
|
|
193
|
+
const phase = () => {
|
|
194
|
+
const state = mihe.getState().voice.state;
|
|
195
|
+
const connecting = state === "connecting";
|
|
196
|
+
return { connecting, live: state !== "idle" && state !== "error" && !connecting };
|
|
197
|
+
};
|
|
198
|
+
const begin = (button, pointerId) => {
|
|
199
|
+
const { connecting, live } = phase();
|
|
200
|
+
if (connecting)
|
|
201
|
+
return;
|
|
202
|
+
if (!live) {
|
|
203
|
+
mihe.voice.start();
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
if (pointerId !== undefined)
|
|
207
|
+
button.setPointerCapture?.(pointerId);
|
|
208
|
+
mihe.voice.press();
|
|
209
|
+
};
|
|
210
|
+
const end = () => {
|
|
211
|
+
if (phase().live)
|
|
212
|
+
mihe.voice.release();
|
|
213
|
+
};
|
|
214
|
+
const button = h("button", {
|
|
215
|
+
class: "mic",
|
|
216
|
+
attrs: { type: "button" },
|
|
217
|
+
on: {
|
|
218
|
+
pointerdown: (event) => begin(button, event.pointerId),
|
|
219
|
+
pointerup: end,
|
|
220
|
+
pointercancel: end,
|
|
221
|
+
keydown: (event) => {
|
|
222
|
+
if (event.repeat)
|
|
223
|
+
return;
|
|
224
|
+
if (event.key === " " || event.key === "Enter") {
|
|
225
|
+
event.preventDefault();
|
|
226
|
+
begin(button);
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
keyup: (event) => {
|
|
230
|
+
if (event.key === " " || event.key === "Enter") {
|
|
231
|
+
event.preventDefault();
|
|
232
|
+
end();
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
}, "\u{1F399}");
|
|
237
|
+
return button;
|
|
238
|
+
}
|
|
239
|
+
//# sourceMappingURL=panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.js","sourceRoot":"","sources":["../../../../js/src/widget/panel.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,kBAAkB,EAAiD,MAAM,SAAS,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7C,MAAM,CAAC,MAAM,mBAAmB,GAAgB,CAA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C;YACD,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;gBACf,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,EAAE,CAAC;oBAC/C,KAAK,CAAC,cAAc,EAAE,CAAC;oBACvB,GAAG,EAAE,CAAC;gBACR,CAAC;YACH,CAAC;SACF;KACF,EACD,WAAW,CACZ,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The widget's stylesheet, inside its shadow root.
|
|
3
|
+
*
|
|
4
|
+
* The shadow root is what keeps the host page out: a Tailwind reset or a
|
|
5
|
+
* site's `button { … }` cannot select anything in here, and nothing here can
|
|
6
|
+
* select the page. Inherited properties still cross the boundary, which is
|
|
7
|
+
* why `:host` resets them all.
|
|
8
|
+
*
|
|
9
|
+
* Theming is through custom properties set on the element, the one styling
|
|
10
|
+
* hook a shadow root lets through by design:
|
|
11
|
+
*
|
|
12
|
+
* ```css
|
|
13
|
+
* mihe-assistant { --mihe-accent: #0a7d5a; --mihe-radius: 10px; }
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* The values match the React widget's.
|
|
17
|
+
*/
|
|
18
|
+
export declare const LAUNCHER_BG = "#221f1b";
|
|
19
|
+
export declare const LAUNCHER_INK = "#eae7e4";
|
|
20
|
+
export declare const LAUNCHER_VOICE = "#5ac8cd";
|
|
21
|
+
export declare const STYLES = "\n:host {\n all: initial;\n --mihe-accent: #4f7cff;\n --mihe-radius: 14px;\n --mihe-font: system-ui, -apple-system, 'Segoe UI', sans-serif;\n --mihe-z: 2147482000;\n}\n:host([layout=\"inline\"]) { display: block; width: 100%; height: 100%; }\n*, *::before, *::after { box-sizing: border-box; }\n[hidden] { display: none !important; }\nbutton { font: inherit; color: inherit; margin: 0; }\n\n.panel {\n display: flex; flex-direction: column; width: 100%; height: 100%;\n background: #fff; color: #0f172a;\n border-radius: var(--mihe-radius); border: 1px solid #e2e8f0;\n box-shadow: 0 20px 50px rgba(15,23,42,0.22);\n font: 14px/1.5 var(--mihe-font); overflow: hidden;\n}\n.floating {\n position: fixed; bottom: 20px;\n width: min(380px, calc(100vw - 40px)); height: min(560px, calc(100vh - 40px));\n z-index: var(--mihe-z);\n}\n.floating.right { right: 20px; }\n.floating.left { left: 20px; }\n.header {\n display: flex; align-items: center; justify-content: space-between;\n padding: 12px 14px; border-bottom: 1px solid #e2e8f0; font-weight: 600;\n}\n.header-title { display: flex; align-items: center; gap: 8px; }\n.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #f59e0b; }\n.status-dot.open { background: #22c55e; }\n.icon-button { border: none; background: transparent; cursor: pointer; font-size: 14px; color: #64748b; }\n.transcript { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }\n.empty { color: #64748b; margin: 0; }\n.bubble-user, .bubble-assistant { max-width: 85%; padding: 8px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }\n.bubble-user { align-self: flex-end; background: var(--mihe-accent); color: #fff; border-radius: 12px 12px 2px 12px; }\n.bubble-assistant { align-self: flex-start; background: #f1f5f9; border-radius: 12px 12px 12px 2px; }\n.thinking { color: #64748b; font-style: italic; }\n.sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #e2e8f0; }\n.source { font-size: 11px; color: #475569; background: #f1f5f9; padding: 2px 8px; border-radius: 999px; }\n.source a { color: inherit; text-decoration: none; }\n.error { background: #fef2f2; color: #991b1b; padding: 8px 10px; border-radius: 8px; font-size: 13px; }\n.notice { color: #64748b; font-size: 13px; text-align: center; }\n.voice-notice { background: #f1f5f9; color: #475569; padding: 8px 10px; border-radius: 8px; font-size: 13px; }\n.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e2e8f0; }\n.input {\n flex: 1; min-width: 0; padding: 9px 12px; border-radius: 8px; border: 1px solid #cbd5e1;\n font: 14px var(--mihe-font); color: #0f172a; background: #fff; outline: none;\n}\n.send {\n padding: 9px 16px; border-radius: 8px; border: none; background: var(--mihe-accent);\n color: #fff; cursor: pointer; font: 600 13px var(--mihe-font);\n}\n.send:disabled { opacity: 0.6; cursor: default; }\n.mic {\n width: 38px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; cursor: pointer;\n font-size: 16px; user-select: none; -webkit-user-select: none; touch-action: none;\n}\n.mic.live { border-color: var(--mihe-accent); }\n.mic.recording { border-color: #dc2626; background: #fef2f2; }\n.hands-free {\n width: 30px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; color: #475569;\n cursor: pointer; font-size: 15px; user-select: none; -webkit-user-select: none;\n}\n.pulse {\n display: block; width: 12px; height: 12px; margin: 0 auto; border-radius: 50%;\n background: var(--mihe-accent); animation: mihe-pulse 2s ease-in-out infinite;\n}\n.pulse.fast { animation-duration: 0.8s; }\n@keyframes mihe-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.6); opacity: 0.45; } }\n\n.card {\n border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; background: #fff; color: #0f172a;\n box-shadow: 0 2px 8px rgba(15,23,42,0.06); font: 14px/1.5 var(--mihe-font);\n}\n.card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }\n.risk { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: #fef3c7; color: #92400e; }\n.risk-high { background: #fee2e2; color: #991b1b; }\n.card-description { margin: 0 0 10px; color: #475569; font-size: 13px; }\n.card-input { margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; max-height: 40vh; overflow-y: auto; }\n.card-row { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }\n.card-key { color: #64748b; min-width: 90px; margin: 0; }\n.card-value { margin: 0; font-weight: 500; overflow-wrap: anywhere; min-width: 0; flex: 1 1 160px; }\n.input-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }\n.input-text { white-space: pre-wrap; }\n.card-actions { display: flex; gap: 8px; justify-content: flex-end; }\n.button-secondary {\n padding: 7px 14px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff;\n cursor: pointer; font: 500 13px var(--mihe-font);\n}\n.button-primary {\n padding: 7px 14px; border-radius: 8px; border: none; background: var(--mihe-accent); color: #fff;\n cursor: pointer; font: 600 13px var(--mihe-font);\n}\n\n.launcher {\n position: fixed; right: 20px; bottom: 20px; width: 52px; height: 52px; border-radius: 50%;\n border: none; padding: 0; display: grid; place-items: center; overflow: hidden;\n background: #221f1b; color: #eae7e4; cursor: pointer;\n box-shadow: 0 8px 24px rgba(15,23,42,0.25); z-index: var(--mihe-z);\n}\n.launcher-image { width: 100%; height: 100%; object-fit: cover; display: block; }\n\n.orb {\n position: fixed; width: 56px; height: 56px; padding: 0; border: none; border-radius: 50%;\n background: #221f1b; color: #eae7e4; box-shadow: 0 8px 24px rgba(15,23,42,0.25);\n z-index: var(--mihe-z); cursor: pointer; transition: left 180ms ease, top 180ms ease;\n touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;\n -webkit-tap-highlight-color: transparent;\n}\n.orb.dragging { cursor: grabbing; transition: none; }\n.orb:disabled { cursor: default; }\n.face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; overflow: hidden; pointer-events: none; }\n.ring {\n position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #5ac8cd;\n pointer-events: none; transform-origin: center; will-change: transform;\n}\n.ring.idle { border-color: transparent; }\n.ring.recording { border-color: #e5484d; border-width: 3px; }\n.ring.thinking, .ring.connecting { border-style: dashed; }\n.ring.listening { animation: mihe-orb-breathe 2.4s ease-in-out infinite; }\n.ring.thinking { animation: mihe-orb-spin 1.2s linear infinite; }\n.ring.connecting { animation: mihe-orb-spin 2.4s linear infinite; }\n@keyframes mihe-orb-breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }\n@keyframes mihe-orb-spin { to { rotate: 360deg; } }\n.stop {\n position: fixed; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(15,23,42,0.12);\n background: #fff; box-shadow: 0 4px 14px rgba(15,23,42,0.18); display: grid; place-items: center;\n cursor: pointer; z-index: var(--mihe-z);\n}\n.stop-square { width: 12px; height: 12px; border-radius: 2px; background: #0f172a; }\n.popover {\n position: fixed; max-width: min(340px, calc(100vw - 40px)); z-index: calc(var(--mihe-z) + 1);\n display: flex; flex-direction: column; gap: 8px; font: 14px/1.45 var(--mihe-font);\n}\n.popover.cards { width: 320px; }\n.menu-item {\n display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 6px;\n border-radius: 999px; border: 1px solid rgba(15,23,42,0.1); background: #fff; color: #0f172a;\n box-shadow: 0 6px 18px rgba(15,23,42,0.16); cursor: pointer; font: 500 14px var(--mihe-font);\n}\n.menu-icon {\n display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;\n background: #221f1b; color: #5ac8cd;\n}\n.orb-bubble {\n padding: 8px 12px; border-radius: 12px; background: #fff; color: #0f172a;\n border: 1px solid rgba(15,23,42,0.1); box-shadow: 0 6px 18px rgba(15,23,42,0.16);\n}\n.orb-bubble.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }\n\n@media (prefers-reduced-motion: reduce) {\n .pulse, .ring { animation: none !important; }\n .ring { transform: none !important; }\n .orb { transition: none; }\n}\n";
|
|
22
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../js/src/widget/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,eAAO,MAAM,WAAW,YAAY,CAAC;AACrC,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,cAAc,YAAY,CAAC;AAExC,eAAO,MAAM,MAAM,gzQA+JlB,CAAC"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The widget's stylesheet, inside its shadow root.
|
|
3
|
+
*
|
|
4
|
+
* The shadow root is what keeps the host page out: a Tailwind reset or a
|
|
5
|
+
* site's `button { … }` cannot select anything in here, and nothing here can
|
|
6
|
+
* select the page. Inherited properties still cross the boundary, which is
|
|
7
|
+
* why `:host` resets them all.
|
|
8
|
+
*
|
|
9
|
+
* Theming is through custom properties set on the element, the one styling
|
|
10
|
+
* hook a shadow root lets through by design:
|
|
11
|
+
*
|
|
12
|
+
* ```css
|
|
13
|
+
* mihe-assistant { --mihe-accent: #0a7d5a; --mihe-radius: 10px; }
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* The values match the React widget's.
|
|
17
|
+
*/
|
|
18
|
+
export const LAUNCHER_BG = "#221f1b";
|
|
19
|
+
export const LAUNCHER_INK = "#eae7e4";
|
|
20
|
+
export const LAUNCHER_VOICE = "#5ac8cd";
|
|
21
|
+
export const STYLES = `
|
|
22
|
+
:host {
|
|
23
|
+
all: initial;
|
|
24
|
+
--mihe-accent: #4f7cff;
|
|
25
|
+
--mihe-radius: 14px;
|
|
26
|
+
--mihe-font: system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
27
|
+
--mihe-z: 2147482000;
|
|
28
|
+
}
|
|
29
|
+
:host([layout="inline"]) { display: block; width: 100%; height: 100%; }
|
|
30
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
31
|
+
[hidden] { display: none !important; }
|
|
32
|
+
button { font: inherit; color: inherit; margin: 0; }
|
|
33
|
+
|
|
34
|
+
.panel {
|
|
35
|
+
display: flex; flex-direction: column; width: 100%; height: 100%;
|
|
36
|
+
background: #fff; color: #0f172a;
|
|
37
|
+
border-radius: var(--mihe-radius); border: 1px solid #e2e8f0;
|
|
38
|
+
box-shadow: 0 20px 50px rgba(15,23,42,0.22);
|
|
39
|
+
font: 14px/1.5 var(--mihe-font); overflow: hidden;
|
|
40
|
+
}
|
|
41
|
+
.floating {
|
|
42
|
+
position: fixed; bottom: 20px;
|
|
43
|
+
width: min(380px, calc(100vw - 40px)); height: min(560px, calc(100vh - 40px));
|
|
44
|
+
z-index: var(--mihe-z);
|
|
45
|
+
}
|
|
46
|
+
.floating.right { right: 20px; }
|
|
47
|
+
.floating.left { left: 20px; }
|
|
48
|
+
.header {
|
|
49
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
50
|
+
padding: 12px 14px; border-bottom: 1px solid #e2e8f0; font-weight: 600;
|
|
51
|
+
}
|
|
52
|
+
.header-title { display: flex; align-items: center; gap: 8px; }
|
|
53
|
+
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #f59e0b; }
|
|
54
|
+
.status-dot.open { background: #22c55e; }
|
|
55
|
+
.icon-button { border: none; background: transparent; cursor: pointer; font-size: 14px; color: #64748b; }
|
|
56
|
+
.transcript { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
|
|
57
|
+
.empty { color: #64748b; margin: 0; }
|
|
58
|
+
.bubble-user, .bubble-assistant { max-width: 85%; padding: 8px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
59
|
+
.bubble-user { align-self: flex-end; background: var(--mihe-accent); color: #fff; border-radius: 12px 12px 2px 12px; }
|
|
60
|
+
.bubble-assistant { align-self: flex-start; background: #f1f5f9; border-radius: 12px 12px 12px 2px; }
|
|
61
|
+
.thinking { color: #64748b; font-style: italic; }
|
|
62
|
+
.sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #e2e8f0; }
|
|
63
|
+
.source { font-size: 11px; color: #475569; background: #f1f5f9; padding: 2px 8px; border-radius: 999px; }
|
|
64
|
+
.source a { color: inherit; text-decoration: none; }
|
|
65
|
+
.error { background: #fef2f2; color: #991b1b; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
|
|
66
|
+
.notice { color: #64748b; font-size: 13px; text-align: center; }
|
|
67
|
+
.voice-notice { background: #f1f5f9; color: #475569; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
|
|
68
|
+
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e2e8f0; }
|
|
69
|
+
.input {
|
|
70
|
+
flex: 1; min-width: 0; padding: 9px 12px; border-radius: 8px; border: 1px solid #cbd5e1;
|
|
71
|
+
font: 14px var(--mihe-font); color: #0f172a; background: #fff; outline: none;
|
|
72
|
+
}
|
|
73
|
+
.send {
|
|
74
|
+
padding: 9px 16px; border-radius: 8px; border: none; background: var(--mihe-accent);
|
|
75
|
+
color: #fff; cursor: pointer; font: 600 13px var(--mihe-font);
|
|
76
|
+
}
|
|
77
|
+
.send:disabled { opacity: 0.6; cursor: default; }
|
|
78
|
+
.mic {
|
|
79
|
+
width: 38px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; cursor: pointer;
|
|
80
|
+
font-size: 16px; user-select: none; -webkit-user-select: none; touch-action: none;
|
|
81
|
+
}
|
|
82
|
+
.mic.live { border-color: var(--mihe-accent); }
|
|
83
|
+
.mic.recording { border-color: #dc2626; background: #fef2f2; }
|
|
84
|
+
.hands-free {
|
|
85
|
+
width: 30px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; color: #475569;
|
|
86
|
+
cursor: pointer; font-size: 15px; user-select: none; -webkit-user-select: none;
|
|
87
|
+
}
|
|
88
|
+
.pulse {
|
|
89
|
+
display: block; width: 12px; height: 12px; margin: 0 auto; border-radius: 50%;
|
|
90
|
+
background: var(--mihe-accent); animation: mihe-pulse 2s ease-in-out infinite;
|
|
91
|
+
}
|
|
92
|
+
.pulse.fast { animation-duration: 0.8s; }
|
|
93
|
+
@keyframes mihe-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.6); opacity: 0.45; } }
|
|
94
|
+
|
|
95
|
+
.card {
|
|
96
|
+
border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; background: #fff; color: #0f172a;
|
|
97
|
+
box-shadow: 0 2px 8px rgba(15,23,42,0.06); font: 14px/1.5 var(--mihe-font);
|
|
98
|
+
}
|
|
99
|
+
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
|
|
100
|
+
.risk { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: #fef3c7; color: #92400e; }
|
|
101
|
+
.risk-high { background: #fee2e2; color: #991b1b; }
|
|
102
|
+
.card-description { margin: 0 0 10px; color: #475569; font-size: 13px; }
|
|
103
|
+
.card-input { margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; max-height: 40vh; overflow-y: auto; }
|
|
104
|
+
.card-row { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
|
|
105
|
+
.card-key { color: #64748b; min-width: 90px; margin: 0; }
|
|
106
|
+
.card-value { margin: 0; font-weight: 500; overflow-wrap: anywhere; min-width: 0; flex: 1 1 160px; }
|
|
107
|
+
.input-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
|
|
108
|
+
.input-text { white-space: pre-wrap; }
|
|
109
|
+
.card-actions { display: flex; gap: 8px; justify-content: flex-end; }
|
|
110
|
+
.button-secondary {
|
|
111
|
+
padding: 7px 14px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff;
|
|
112
|
+
cursor: pointer; font: 500 13px var(--mihe-font);
|
|
113
|
+
}
|
|
114
|
+
.button-primary {
|
|
115
|
+
padding: 7px 14px; border-radius: 8px; border: none; background: var(--mihe-accent); color: #fff;
|
|
116
|
+
cursor: pointer; font: 600 13px var(--mihe-font);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.launcher {
|
|
120
|
+
position: fixed; right: 20px; bottom: 20px; width: 52px; height: 52px; border-radius: 50%;
|
|
121
|
+
border: none; padding: 0; display: grid; place-items: center; overflow: hidden;
|
|
122
|
+
background: ${LAUNCHER_BG}; color: ${LAUNCHER_INK}; cursor: pointer;
|
|
123
|
+
box-shadow: 0 8px 24px rgba(15,23,42,0.25); z-index: var(--mihe-z);
|
|
124
|
+
}
|
|
125
|
+
.launcher-image { width: 100%; height: 100%; object-fit: cover; display: block; }
|
|
126
|
+
|
|
127
|
+
.orb {
|
|
128
|
+
position: fixed; width: 56px; height: 56px; padding: 0; border: none; border-radius: 50%;
|
|
129
|
+
background: ${LAUNCHER_BG}; color: ${LAUNCHER_INK}; box-shadow: 0 8px 24px rgba(15,23,42,0.25);
|
|
130
|
+
z-index: var(--mihe-z); cursor: pointer; transition: left 180ms ease, top 180ms ease;
|
|
131
|
+
touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
|
|
132
|
+
-webkit-tap-highlight-color: transparent;
|
|
133
|
+
}
|
|
134
|
+
.orb.dragging { cursor: grabbing; transition: none; }
|
|
135
|
+
.orb:disabled { cursor: default; }
|
|
136
|
+
.face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; overflow: hidden; pointer-events: none; }
|
|
137
|
+
.ring {
|
|
138
|
+
position: absolute; inset: -6px; border-radius: 50%; border: 2px solid ${LAUNCHER_VOICE};
|
|
139
|
+
pointer-events: none; transform-origin: center; will-change: transform;
|
|
140
|
+
}
|
|
141
|
+
.ring.idle { border-color: transparent; }
|
|
142
|
+
.ring.recording { border-color: #e5484d; border-width: 3px; }
|
|
143
|
+
.ring.thinking, .ring.connecting { border-style: dashed; }
|
|
144
|
+
.ring.listening { animation: mihe-orb-breathe 2.4s ease-in-out infinite; }
|
|
145
|
+
.ring.thinking { animation: mihe-orb-spin 1.2s linear infinite; }
|
|
146
|
+
.ring.connecting { animation: mihe-orb-spin 2.4s linear infinite; }
|
|
147
|
+
@keyframes mihe-orb-breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
|
|
148
|
+
@keyframes mihe-orb-spin { to { rotate: 360deg; } }
|
|
149
|
+
.stop {
|
|
150
|
+
position: fixed; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(15,23,42,0.12);
|
|
151
|
+
background: #fff; box-shadow: 0 4px 14px rgba(15,23,42,0.18); display: grid; place-items: center;
|
|
152
|
+
cursor: pointer; z-index: var(--mihe-z);
|
|
153
|
+
}
|
|
154
|
+
.stop-square { width: 12px; height: 12px; border-radius: 2px; background: #0f172a; }
|
|
155
|
+
.popover {
|
|
156
|
+
position: fixed; max-width: min(340px, calc(100vw - 40px)); z-index: calc(var(--mihe-z) + 1);
|
|
157
|
+
display: flex; flex-direction: column; gap: 8px; font: 14px/1.45 var(--mihe-font);
|
|
158
|
+
}
|
|
159
|
+
.popover.cards { width: 320px; }
|
|
160
|
+
.menu-item {
|
|
161
|
+
display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 6px;
|
|
162
|
+
border-radius: 999px; border: 1px solid rgba(15,23,42,0.1); background: #fff; color: #0f172a;
|
|
163
|
+
box-shadow: 0 6px 18px rgba(15,23,42,0.16); cursor: pointer; font: 500 14px var(--mihe-font);
|
|
164
|
+
}
|
|
165
|
+
.menu-icon {
|
|
166
|
+
display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
|
|
167
|
+
background: ${LAUNCHER_BG}; color: ${LAUNCHER_VOICE};
|
|
168
|
+
}
|
|
169
|
+
.orb-bubble {
|
|
170
|
+
padding: 8px 12px; border-radius: 12px; background: #fff; color: #0f172a;
|
|
171
|
+
border: 1px solid rgba(15,23,42,0.1); box-shadow: 0 6px 18px rgba(15,23,42,0.16);
|
|
172
|
+
}
|
|
173
|
+
.orb-bubble.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
|
|
174
|
+
|
|
175
|
+
@media (prefers-reduced-motion: reduce) {
|
|
176
|
+
.pulse, .ring { animation: none !important; }
|
|
177
|
+
.ring { transform: none !important; }
|
|
178
|
+
.orb { transition: none; }
|
|
179
|
+
}
|
|
180
|
+
`;
|
|
181
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../js/src/widget/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC;AACrC,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAC;AACtC,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC;AAExC,MAAM,CAAC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAqGN,WAAW,YAAY,YAAY;;;;;;;gBAOnC,WAAW,YAAY,YAAY;;;;;;;;;2EASwB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA6BzE,WAAW,YAAY,cAAc;;;;;;;;;;;;;CAapD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mihe-dev/js",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Embed an app-aware AI assistant in any web app, with or without a framework.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./mihe.min.js": "./dist/mihe.min.js",
|
|
17
|
+
"./mihe.iife.min.js": "./dist/mihe.iife.min.js",
|
|
18
|
+
"./package.json": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
"jsdelivr": "./dist/mihe.iife.min.js",
|
|
21
|
+
"unpkg": "./dist/mihe.iife.min.js",
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"README.md",
|
|
25
|
+
"LICENSE"
|
|
26
|
+
],
|
|
27
|
+
"sideEffects": false,
|
|
28
|
+
"homepage": "https://mihe.dev/docs",
|
|
29
|
+
"keywords": [
|
|
30
|
+
"ai",
|
|
31
|
+
"assistant",
|
|
32
|
+
"copilot",
|
|
33
|
+
"agent",
|
|
34
|
+
"vanilla",
|
|
35
|
+
"javascript",
|
|
36
|
+
"voice",
|
|
37
|
+
"mihe"
|
|
38
|
+
],
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@mihe-dev/protocol": "0.1.0"
|
|
41
|
+
},
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
}
|
|
45
|
+
}
|