@epam/ai-dial-chat-overlay 1.1.0-dev.300 → 1.1.0-dev.307
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/index.js +60 -60
- package/package.json +1 -1
- package/protocol/overlay-protocol.d.ts +29 -4
- package/protocol/overlay-protocol.d.ts.map +1 -1
package/index.js
CHANGED
|
@@ -4,27 +4,27 @@ var e = "@DIAL_OVERLAY", t = /* @__PURE__ */ function(e) {
|
|
|
4
4
|
}({}), n = /* @__PURE__ */ function(e) {
|
|
5
5
|
return e.InitReady = "@DIAL_OVERLAY/INIT_READY", e.Ready = "@DIAL_OVERLAY/READY", e.ReadyToInteract = "@DIAL_OVERLAY/READY_TO_INTERACT", e.SelectedConversationLoaded = "@DIAL_OVERLAY/SELECTED_CONVERSATION_LOADED", e.GptStartGenerating = "@DIAL_OVERLAY/GPT_START_GENERATING", e.GptEndGenerating = "@DIAL_OVERLAY/GPT_END_GENERATING", e.StopGenerating = "@DIAL_OVERLAY/STOP_GENERATING", e.ConversationsUpdated = "@DIAL_OVERLAY/CONVERSATIONS_UPDATED", e;
|
|
6
6
|
}({}), r = /* @__PURE__ */ function(e) {
|
|
7
|
-
return e.CodeApps = "code-apps", e.
|
|
8
|
-
}({}), i = /* @__PURE__ */ function(e) {
|
|
7
|
+
return e.CodeApps = "code-apps", e.SchemaApps = "schema-apps", e.HideCustomAppCreation = "hide-custom-app-creation", e.DisabledSend = "disabled-send", e.SkipFocusChatInputOnload = "skip-focus-chat-input-onload", e.ChatSettings = "chat-settings", e.DislikeComment = "dislike-comment", e.InputFiles = "input-files", e.Likes = "likes", e.LiveChatInteraction = "live-chat-interaction", e.DisallowChangeAgent = "disallow-change-agent", e.HideChangeAgent = "hide-change-agent", e.HideNewConversation = "hide-new-conversation", e.EmptyChatSettings = "empty-chat-settings", e.HideEmptyChatChangeAgent = "hide-empty-chat-change-agent", e.AttachmentsManager = "attachments-manager", e.ConversationsPanelToggle = "conversations-panel-toggle", e.ConversationsSection = "conversations-section", e.Header = "header", e.HideNavigationMenu = "hide-navigation-menu", e.ShowConversationsSectionByDefault = "showConversationsSectionByDefault", e.HideConversationsFilter = "hide-conversations-filter", e.Catalog = "catalog", e.CatalogHideMyApps = "catalog-hide-my-apps", e.CatalogTableView = "catalog-table-view", e.FileManager = "file-manager", e.HideDeleteUserMessage = "hide-delete-user-message", e.HideEditUserMessage = "hide-edit-user-message", e.HideRegenerateAssistantMessage = "hide-regenerate-assistant-message", e.ConversationsPublishing = "conversations-publishing", e.ApplicationsSharing = "applications-sharing", e.ConversationsSharing = "conversations-sharing", e.ToolsetsSharing = "toolsets-sharing", e.Toolsets = "toolsets", e.Prompts = "prompts", e.Skills = "skills", e.CustomApps = "custom-apps", e.HideUserMenu = "hide-user-menu", e.HideUserSettings = "hide-user-settings", e.HideKeyboardShortcuts = "hide-keyboard-shortcuts", e.VoiceInput = "voice-input", e;
|
|
8
|
+
}({}), i = { "custom-applications": "schema-apps" }, a = new Set(Object.values(r)), o = (e) => a.has(e) ? e : i[e], s = /* @__PURE__ */ function(e) {
|
|
9
9
|
return e.External = "external", e.SameWindow = "sameWindow", e;
|
|
10
|
-
}({}),
|
|
10
|
+
}({}), c = /* @__PURE__ */ function(e) {
|
|
11
11
|
return e.ActiveConversationUnavailable = "ACTIVE_CONVERSATION_UNAVAILABLE", e.ConversationListUnavailable = "CONVERSATION_LIST_UNAVAILABLE", e.InvalidPayload = "INVALID_PAYLOAD", e.RequestExecutionFailed = "REQUEST_EXECUTION_FAILED", e;
|
|
12
|
-
}({}),
|
|
12
|
+
}({}), l = (e) => {
|
|
13
13
|
if (typeof e != "object" || !e) return !1;
|
|
14
14
|
let n = e;
|
|
15
15
|
return typeof n.type == "string" && Object.values(t).includes(n.type) && typeof n.requestId == "string" && (!("expiresAt" in n) || typeof n.expiresAt == "number" && Number.isFinite(n.expiresAt));
|
|
16
|
-
},
|
|
16
|
+
}, u = (e) => {
|
|
17
17
|
if (typeof e != "object" || !e) return !1;
|
|
18
18
|
let n = e;
|
|
19
19
|
if (typeof n.type != "string" || typeof n.requestId != "string" || !Object.values(t).some((e) => n.type === `${e}/RESPONSE`)) return !1;
|
|
20
20
|
if (!("error" in n)) return !0;
|
|
21
21
|
let r = n.error;
|
|
22
|
-
return typeof r == "object" && !!r && typeof r.code == "string" && Object.values(
|
|
23
|
-
},
|
|
22
|
+
return typeof r == "object" && !!r && typeof r.code == "string" && Object.values(c).includes(r.code) && typeof r.message == "string";
|
|
23
|
+
}, d = (e) => {
|
|
24
24
|
if (typeof e != "object" || !e) return !1;
|
|
25
25
|
let t = e;
|
|
26
26
|
return typeof t.type == "string" && Object.values(n).includes(t.type) && !("requestId" in t);
|
|
27
|
-
},
|
|
27
|
+
}, f = "<svg viewBox=\"0 0 50 50\" width=\"32\" height=\"32\" role=\"presentation\" aria-hidden=\"true\"><circle cx=\"25\" cy=\"25\" r=\"20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"4\" stroke-linecap=\"round\" stroke-dasharray=\"31.4 31.4\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 25 25\" to=\"360 25 25\" dur=\"1s\" repeatCount=\"indefinite\" /></circle></svg>", p = 0, m = () => (p += 1, `dial-overlay-${Date.now()}-${p}`), h = class {
|
|
28
28
|
requestType;
|
|
29
29
|
requestId;
|
|
30
30
|
responseType;
|
|
@@ -34,7 +34,7 @@ var e = "@DIAL_OVERLAY", t = /* @__PURE__ */ function(e) {
|
|
|
34
34
|
settled = !1;
|
|
35
35
|
timeoutHandle;
|
|
36
36
|
constructor(e, t) {
|
|
37
|
-
this.requestType = e, this.requestId =
|
|
37
|
+
this.requestType = e, this.requestId = m(), this.responseType = `${e}/RESPONSE`, this.promise = new Promise((e, t) => {
|
|
38
38
|
this.resolveFn = e, this.rejectFn = t;
|
|
39
39
|
}), this.timeoutHandle = setTimeout(() => {
|
|
40
40
|
this.reject(/* @__PURE__ */ Error(`ChatOverlay: request "${e}" timed out after ${t}ms`));
|
|
@@ -49,9 +49,9 @@ var e = "@DIAL_OVERLAY", t = /* @__PURE__ */ function(e) {
|
|
|
49
49
|
reject(e) {
|
|
50
50
|
this.settled || (this.settled = !0, clearTimeout(this.timeoutHandle), this.rejectFn(e));
|
|
51
51
|
}
|
|
52
|
-
},
|
|
52
|
+
}, g = (e, t) => {
|
|
53
53
|
Object.assign(e.style, t);
|
|
54
|
-
},
|
|
54
|
+
}, _ = class {
|
|
55
55
|
promise;
|
|
56
56
|
resolveFn;
|
|
57
57
|
rejectFn;
|
|
@@ -67,30 +67,30 @@ var e = "@DIAL_OVERLAY", t = /* @__PURE__ */ function(e) {
|
|
|
67
67
|
reject(e) {
|
|
68
68
|
this.settled || (this.settled = !0, this.rejectFn(e));
|
|
69
69
|
}
|
|
70
|
-
},
|
|
70
|
+
}, v = 1e4, y = "data-dial-overlay-loader", b = class extends Error {
|
|
71
71
|
code;
|
|
72
72
|
requestType;
|
|
73
73
|
constructor(e, t) {
|
|
74
74
|
super(`ChatOverlay: request "${e}" failed [${t.code}]: ${t.message}`), this.name = "ChatOverlayRequestError", this.code = t.code, this.requestType = e;
|
|
75
75
|
}
|
|
76
|
-
},
|
|
76
|
+
}, x = (e) => {
|
|
77
77
|
if (typeof e != "string") return e;
|
|
78
78
|
let t = document.querySelector(e);
|
|
79
79
|
if (!t) throw Error(`ChatOverlay: no element matches selector "${e}"`);
|
|
80
80
|
return t;
|
|
81
|
-
},
|
|
81
|
+
}, S = (e) => {
|
|
82
82
|
let t = document.createElement("iframe");
|
|
83
83
|
t.src = e.domain, t.name = "overlay", t.setAttribute("aria-label", "DIAL Chat"), t.setAttribute("sandbox", "allow-same-origin allow-scripts allow-modals allow-forms allow-popups allow-downloads allow-popups-to-escape-sandbox");
|
|
84
84
|
let n = ["clipboard-write"];
|
|
85
|
-
return e.enabledFeatures?.includes(r.VoiceInput) && n.push("microphone"), t.setAttribute("allow", n.join("; ")),
|
|
85
|
+
return e.enabledFeatures?.includes(r.VoiceInput) && n.push("microphone"), t.setAttribute("allow", n.join("; ")), g(t, {
|
|
86
86
|
border: "none",
|
|
87
87
|
display: "block",
|
|
88
88
|
width: "100%",
|
|
89
89
|
height: "100%"
|
|
90
90
|
}), t;
|
|
91
|
-
},
|
|
91
|
+
}, C = (e) => {
|
|
92
92
|
let t = document.createElement("div");
|
|
93
|
-
return t.setAttribute(
|
|
93
|
+
return t.setAttribute(y, ""), t.innerHTML = e.loaderInnerHTML ?? f, g(t, {
|
|
94
94
|
position: "absolute",
|
|
95
95
|
inset: "0",
|
|
96
96
|
zIndex: "2",
|
|
@@ -100,14 +100,14 @@ var e = "@DIAL_OVERLAY", t = /* @__PURE__ */ function(e) {
|
|
|
100
100
|
boxSizing: "border-box",
|
|
101
101
|
background: "#ffffff",
|
|
102
102
|
color: "#2764d9"
|
|
103
|
-
}), e.loaderClass && (t.className = e.loaderClass), e.loaderStyles &&
|
|
104
|
-
},
|
|
103
|
+
}), e.loaderClass && (t.className = e.loaderClass), e.loaderStyles && g(t, e.loaderStyles), t;
|
|
104
|
+
}, w = class {
|
|
105
105
|
root;
|
|
106
106
|
iframe;
|
|
107
107
|
loader;
|
|
108
108
|
options;
|
|
109
109
|
targetOrigin;
|
|
110
|
-
readyGate = new
|
|
110
|
+
readyGate = new _();
|
|
111
111
|
pendingRequests = /* @__PURE__ */ new Map();
|
|
112
112
|
eventSubscribers = /* @__PURE__ */ new Map();
|
|
113
113
|
messageListener = (e) => {
|
|
@@ -115,9 +115,9 @@ var e = "@DIAL_OVERLAY", t = /* @__PURE__ */ function(e) {
|
|
|
115
115
|
};
|
|
116
116
|
isDestroyed = !1;
|
|
117
117
|
constructor(e, t) {
|
|
118
|
-
this.root =
|
|
118
|
+
this.root = x(e), this.options = { ...t }, this.targetOrigin = new URL(t.domain).origin, this.iframe = S(this.options), this.loader = C(this.options);
|
|
119
119
|
let n = window.getComputedStyle(this.root).position;
|
|
120
|
-
(n === "static" || n === "") &&
|
|
120
|
+
(n === "static" || n === "") && g(this.root, { position: "relative" }), this.root.appendChild(this.loader), this.root.appendChild(this.iframe), window.addEventListener("message", this.messageListener), this.readyGate.promise.catch(() => void 0);
|
|
121
121
|
}
|
|
122
122
|
ready() {
|
|
123
123
|
return this.readyGate.promise;
|
|
@@ -202,7 +202,7 @@ var e = "@DIAL_OVERLAY", t = /* @__PURE__ */ function(e) {
|
|
|
202
202
|
}
|
|
203
203
|
dispatchRequest(e, t) {
|
|
204
204
|
if (this.isDestroyed) return Promise.reject(/* @__PURE__ */ Error("ChatOverlay: instance was destroyed"));
|
|
205
|
-
let n = this.options.requestTimeout ??
|
|
205
|
+
let n = this.options.requestTimeout ?? v, r = new h(e, n);
|
|
206
206
|
this.pendingRequests.set(r.requestId, r), r.promise.finally(() => {
|
|
207
207
|
this.pendingRequests.delete(r.requestId);
|
|
208
208
|
}).catch(() => void 0);
|
|
@@ -217,17 +217,17 @@ var e = "@DIAL_OVERLAY", t = /* @__PURE__ */ function(e) {
|
|
|
217
217
|
handleMessage(e) {
|
|
218
218
|
if (e.source !== this.iframe.contentWindow) return;
|
|
219
219
|
let t = e.data;
|
|
220
|
-
if (
|
|
220
|
+
if (u(t)) {
|
|
221
221
|
this.handleResponse(t);
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
224
|
-
|
|
224
|
+
d(t) && this.handleEvent(t);
|
|
225
225
|
}
|
|
226
226
|
handleResponse(e) {
|
|
227
227
|
let t = this.pendingRequests.get(e.requestId);
|
|
228
228
|
if (!(!t || !t.matches(e.type, e.requestId))) {
|
|
229
229
|
if (this.pendingRequests.delete(e.requestId), e.error) {
|
|
230
|
-
t.reject(new
|
|
230
|
+
t.reject(new b(t.requestType, e.error));
|
|
231
231
|
return;
|
|
232
232
|
}
|
|
233
233
|
t.resolve(e.payload);
|
|
@@ -243,41 +243,41 @@ var e = "@DIAL_OVERLAY", t = /* @__PURE__ */ function(e) {
|
|
|
243
243
|
notifySubscribers(e, t) {
|
|
244
244
|
this.eventSubscribers.get(e)?.forEach((e) => e(t));
|
|
245
245
|
}
|
|
246
|
-
},
|
|
247
|
-
if (document.getElementById(
|
|
246
|
+
}, T = 768, E = 380, D = 600, O = 999999, k = "24px", A = "<svg viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M4 4h16v12H7l-3 3V4z\"/></svg>", j = "<svg viewBox=\"0 0 24 24\" width=\"20\" height=\"20\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M18.3 5.71 12 12.01l-6.3-6.3-1.4 1.41 6.29 6.29-6.29 6.29 1.4 1.41 6.3-6.3 6.3 6.3 1.4-1.41-6.29-6.29 6.29-6.29z\"/></svg>", M = "<svg viewBox=\"0 0 24 24\" width=\"20\" height=\"20\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M4 4h6v2H6v4H4V4zm10 0h6v6h-2V6h-4V4zM4 14h2v4h4v2H4v-6zm14 0h2v6h-6v-2h4v-4z\"/></svg>", N = "dial-overlay-manager-styles", P = () => {
|
|
247
|
+
if (document.getElementById(N)) return;
|
|
248
248
|
let e = document.createElement("style");
|
|
249
|
-
e.id =
|
|
250
|
-
},
|
|
249
|
+
e.id = N, e.textContent = "\n.dial-overlay-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 48px;\n height: 48px;\n border: none;\n border-radius: 999px;\n cursor: pointer;\n background: #2764d9;\n color: #ffffff;\n}\n.dial-overlay-btn:hover,\n.dial-overlay-btn:focus-visible {\n background: #1d4fb8;\n outline: 2px solid #1d4fb8;\n outline-offset: 2px;\n}\n", document.head.appendChild(e);
|
|
250
|
+
}, F = (e, t) => {
|
|
251
251
|
let n = document.createElement("button");
|
|
252
252
|
return n.type = "button", n.className = "dial-overlay-btn", n.setAttribute("aria-label", e), n.innerHTML = t, n;
|
|
253
|
-
},
|
|
253
|
+
}, I = (e) => typeof e == "number" ? `${e}px` : e, L = /* @__PURE__ */ function(e) {
|
|
254
254
|
return e.LeftBottom = "left-bottom", e.LeftTop = "left-top", e.RightBottom = "right-bottom", e.RightTop = "right-top", e;
|
|
255
|
-
}({}),
|
|
255
|
+
}({}), R = {
|
|
256
256
|
"right-bottom": {
|
|
257
|
-
insetInlineEnd:
|
|
258
|
-
insetBlockEnd:
|
|
257
|
+
insetInlineEnd: k,
|
|
258
|
+
insetBlockEnd: k,
|
|
259
259
|
insetInlineStart: "auto",
|
|
260
260
|
insetBlockStart: "auto"
|
|
261
261
|
},
|
|
262
262
|
"right-top": {
|
|
263
|
-
insetInlineEnd:
|
|
264
|
-
insetBlockStart:
|
|
263
|
+
insetInlineEnd: k,
|
|
264
|
+
insetBlockStart: k,
|
|
265
265
|
insetInlineStart: "auto",
|
|
266
266
|
insetBlockEnd: "auto"
|
|
267
267
|
},
|
|
268
268
|
"left-bottom": {
|
|
269
|
-
insetInlineStart:
|
|
270
|
-
insetBlockEnd:
|
|
269
|
+
insetInlineStart: k,
|
|
270
|
+
insetBlockEnd: k,
|
|
271
271
|
insetInlineEnd: "auto",
|
|
272
272
|
insetBlockStart: "auto"
|
|
273
273
|
},
|
|
274
274
|
"left-top": {
|
|
275
|
-
insetInlineStart:
|
|
276
|
-
insetBlockStart:
|
|
275
|
+
insetInlineStart: k,
|
|
276
|
+
insetBlockStart: k,
|
|
277
277
|
insetInlineEnd: "auto",
|
|
278
278
|
insetBlockEnd: "auto"
|
|
279
279
|
}
|
|
280
|
-
},
|
|
280
|
+
}, z = class {
|
|
281
281
|
overlays = /* @__PURE__ */ new Map();
|
|
282
282
|
abortController = new AbortController();
|
|
283
283
|
isDestroyed = !1;
|
|
@@ -289,9 +289,9 @@ var e = "@DIAL_OVERLAY", t = /* @__PURE__ */ function(e) {
|
|
|
289
289
|
}
|
|
290
290
|
createOverlay(e) {
|
|
291
291
|
if (this.overlays.has(e.overlayId)) throw Error(`ChatOverlayManager: overlay "${e.overlayId}" already exists`);
|
|
292
|
-
|
|
292
|
+
P();
|
|
293
293
|
let t = document.createElement("div");
|
|
294
|
-
t.setAttribute("data-dial-overlay-container", e.overlayId),
|
|
294
|
+
t.setAttribute("data-dial-overlay-container", e.overlayId), g(t, {
|
|
295
295
|
display: "flex",
|
|
296
296
|
flexDirection: "column",
|
|
297
297
|
overflow: "hidden",
|
|
@@ -300,24 +300,24 @@ var e = "@DIAL_OVERLAY", t = /* @__PURE__ */ function(e) {
|
|
|
300
300
|
background: "#ffffff"
|
|
301
301
|
});
|
|
302
302
|
let n = document.createElement("div");
|
|
303
|
-
|
|
303
|
+
g(n, {
|
|
304
304
|
display: "flex",
|
|
305
305
|
justifyContent: "flex-end",
|
|
306
306
|
gap: "8px",
|
|
307
307
|
padding: "8px"
|
|
308
308
|
});
|
|
309
|
-
let r =
|
|
309
|
+
let r = F(e.closeButtonAriaLabel ?? "Collapse", j);
|
|
310
310
|
n.appendChild(r);
|
|
311
311
|
let i;
|
|
312
|
-
e.allowFullscreen && (i =
|
|
312
|
+
e.allowFullscreen && (i = F(e.fullscreenButtonAriaLabel ?? "Open full screen", M), n.appendChild(i));
|
|
313
313
|
let a = document.createElement("div");
|
|
314
|
-
|
|
314
|
+
g(a, {
|
|
315
315
|
flex: "1",
|
|
316
316
|
minHeight: "0"
|
|
317
317
|
}), t.appendChild(n), t.appendChild(a), document.body.appendChild(t);
|
|
318
|
-
let o = new
|
|
318
|
+
let o = new w(a, e);
|
|
319
319
|
e.allowFullscreen && o.allowFullscreen();
|
|
320
|
-
let s =
|
|
320
|
+
let s = F(e.toggleButtonAriaLabel ?? "Open chat", A);
|
|
321
321
|
document.body.appendChild(s);
|
|
322
322
|
let c = {
|
|
323
323
|
overlay: o,
|
|
@@ -402,16 +402,16 @@ var e = "@DIAL_OVERLAY", t = /* @__PURE__ */ function(e) {
|
|
|
402
402
|
return t;
|
|
403
403
|
}
|
|
404
404
|
applyLayout(e) {
|
|
405
|
-
let { options: t, container: n, toggleButton: r } = e, i = t.position ?? "right-bottom", a = String(t.zIndex ??
|
|
406
|
-
if (
|
|
405
|
+
let { options: t, container: n, toggleButton: r } = e, i = t.position ?? "right-bottom", a = String(t.zIndex ?? O);
|
|
406
|
+
if (g(r, {
|
|
407
407
|
position: "fixed",
|
|
408
408
|
zIndex: a,
|
|
409
|
-
...
|
|
410
|
-
}),
|
|
409
|
+
...R[i]
|
|
410
|
+
}), g(n, {
|
|
411
411
|
position: "fixed",
|
|
412
412
|
zIndex: a
|
|
413
|
-
}), window.innerWidth <=
|
|
414
|
-
|
|
413
|
+
}), window.innerWidth <= T) {
|
|
414
|
+
g(n, {
|
|
415
415
|
insetInlineStart: "0",
|
|
416
416
|
insetInlineEnd: "0",
|
|
417
417
|
insetBlockStart: "0",
|
|
@@ -422,12 +422,12 @@ var e = "@DIAL_OVERLAY", t = /* @__PURE__ */ function(e) {
|
|
|
422
422
|
});
|
|
423
423
|
return;
|
|
424
424
|
}
|
|
425
|
-
|
|
426
|
-
width:
|
|
427
|
-
height:
|
|
428
|
-
...
|
|
425
|
+
g(n, {
|
|
426
|
+
width: I(t.width ?? E),
|
|
427
|
+
height: I(t.height ?? D),
|
|
428
|
+
...R[i]
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
431
|
};
|
|
432
432
|
//#endregion
|
|
433
|
-
export {
|
|
433
|
+
export { w as ChatOverlay, z as ChatOverlayManager, b as ChatOverlayRequestError, i as DEPRECATED_OVERLAY_FEATURE_ALIASES, e as DIAL_OVERLAY_NAMESPACE, s as OverlayAuthUiMode, n as OverlayEventType, r as OverlayFeature, L as OverlayPosition, c as OverlayRequestErrorCode, t as OverlayRequestType, d as isOverlayMessageEvent, l as isOverlayMessageRequest, u as isOverlayMessageResponse, o as resolveOverlayFeature };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-chat-overlay",
|
|
3
3
|
"description": "Embeddable postMessage-based ChatOverlay/ChatOverlayManager widget for hosting a DIAL Chat instance inside a third-party page",
|
|
4
|
-
"version": "1.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.307",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -52,9 +52,16 @@ export declare enum OverlayEventType {
|
|
|
52
52
|
export declare enum OverlayFeature {
|
|
53
53
|
/** Enables the "Add app" menu's Code Apps entry. */
|
|
54
54
|
CodeApps = "code-apps",
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Enables the catalog's Quick App creation entry, i.e. applications built
|
|
57
|
+
* on an `applicationTypeSchemaId`. Schema-less applications are gated by
|
|
58
|
+
* `CustomApps` instead.
|
|
59
|
+
*/
|
|
60
|
+
SchemaApps = "schema-apps",
|
|
61
|
+
/**
|
|
62
|
+
* Hides both of the catalog's app-creation entries, "Create Quick App" and
|
|
63
|
+
* "Create Custom app", regardless of `SchemaApps` / `CustomApps`.
|
|
64
|
+
*/
|
|
58
65
|
HideCustomAppCreation = "hide-custom-app-creation",
|
|
59
66
|
/** Disables the send action on the chat input without removing the button. */
|
|
60
67
|
DisabledSend = "disabled-send",
|
|
@@ -135,7 +142,11 @@ export declare enum OverlayFeature {
|
|
|
135
142
|
Prompts = "prompts",
|
|
136
143
|
/** Enables skills: the catalog's Skills tab and the skill details panel. */
|
|
137
144
|
Skills = "skills",
|
|
138
|
-
/**
|
|
145
|
+
/**
|
|
146
|
+
* Enables the catalog's custom-app creation entry, the editability of
|
|
147
|
+
* schema-less applications, and the custom-app editor route. Applications
|
|
148
|
+
* built on a schema are gated by `SchemaApps` instead.
|
|
149
|
+
*/
|
|
139
150
|
CustomApps = "custom-apps",
|
|
140
151
|
/** Hides the user avatar/menu button in the header. */
|
|
141
152
|
HideUserMenu = "hide-user-menu",
|
|
@@ -146,6 +157,20 @@ export declare enum OverlayFeature {
|
|
|
146
157
|
/** Enables the `microphone` permission on the iframe's `allow` attribute for voice input. */
|
|
147
158
|
VoiceInput = "voice-input"
|
|
148
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Wire values a host may still be sending that were renamed, mapped to the
|
|
162
|
+
* canonical `OverlayFeature` member. Accepted for backward compatibility on a
|
|
163
|
+
* transitional basis: a deprecated value resolves to its replacement instead of
|
|
164
|
+
* being dropped. Remove an entry once hosts have migrated, and record the
|
|
165
|
+
* rename in the migration guide's "Renamed flags" table.
|
|
166
|
+
*/
|
|
167
|
+
export declare const DEPRECATED_OVERLAY_FEATURE_ALIASES: Readonly<Record<string, OverlayFeature>>;
|
|
168
|
+
/**
|
|
169
|
+
* Resolves a raw wire value to an `OverlayFeature`, accepting the deprecated
|
|
170
|
+
* aliases in `DEPRECATED_OVERLAY_FEATURE_ALIASES`. Returns `undefined` for an
|
|
171
|
+
* unrecognized value so the caller can drop it and warn.
|
|
172
|
+
*/
|
|
173
|
+
export declare const resolveOverlayFeature: (value: string) => OverlayFeature | undefined;
|
|
149
174
|
/** Controls how an overlay starts authentication for a configured provider. */
|
|
150
175
|
export declare enum OverlayAuthUiMode {
|
|
151
176
|
/** Opens authentication in a separate browser window or tab. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay-protocol.d.ts","sourceRoot":"","sources":["../../src/protocol/overlay-protocol.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AAEtD,mEAAmE;AACnE,oBAAY,kBAAkB;IAC5B,gDAAgD;IAChD,WAAW,+BAA+B;IAC1C,qDAAqD;IACrD,WAAW,+BAA+B;IAC1C,yDAAyD;IACzD,eAAe,oCAAoC;IACnD,mDAAmD;IACnD,eAAe,oCAAoC;IACnD,iDAAiD;IACjD,cAAc,kCAAkC;IAChD,2EAA2E;IAC3E,iBAAiB,sCAAsC;IACvD,kDAAkD;IAClD,gBAAgB,oCAAoC;IACpD,8DAA8D;IAC9D,wBAAwB,6CAA6C;IACrE,0DAA0D;IAC1D,kBAAkB,sCAAsC;IACxD,qFAAqF;IACrF,kBAAkB,sCAAsC;IACxD,kEAAkE;IAClE,uBAAuB,4CAA4C;IACnE,mCAAmC;IACnC,kBAAkB,sCAAsC;IACxD,mCAAmC;IACnC,kBAAkB,sCAAsC;CACzD;AAED,8DAA8D;AAC9D,oBAAY,gBAAgB;IAC1B,iEAAiE;IACjE,SAAS,6BAA6B;IACtC,uDAAuD;IACvD,KAAK,wBAAwB;IAC7B,4FAA4F;IAC5F,eAAe,oCAAoC;IACnD,0FAA0F;IAC1F,0BAA0B,+CAA+C;IACzE,iEAAiE;IACjE,kBAAkB,uCAAuC;IACzD,oEAAoE;IACpE,gBAAgB,qCAAqC;IACrD,gEAAgE;IAChE,cAAc,kCAAkC;IAChD,yDAAyD;IACzD,oBAAoB,wCAAwC;CAC7D;AAED,iGAAiG;AACjG,oBAAY,cAAc;IACxB,oDAAoD;IACpD,QAAQ,cAAc;IACtB
|
|
1
|
+
{"version":3,"file":"overlay-protocol.d.ts","sourceRoot":"","sources":["../../src/protocol/overlay-protocol.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AAEtD,mEAAmE;AACnE,oBAAY,kBAAkB;IAC5B,gDAAgD;IAChD,WAAW,+BAA+B;IAC1C,qDAAqD;IACrD,WAAW,+BAA+B;IAC1C,yDAAyD;IACzD,eAAe,oCAAoC;IACnD,mDAAmD;IACnD,eAAe,oCAAoC;IACnD,iDAAiD;IACjD,cAAc,kCAAkC;IAChD,2EAA2E;IAC3E,iBAAiB,sCAAsC;IACvD,kDAAkD;IAClD,gBAAgB,oCAAoC;IACpD,8DAA8D;IAC9D,wBAAwB,6CAA6C;IACrE,0DAA0D;IAC1D,kBAAkB,sCAAsC;IACxD,qFAAqF;IACrF,kBAAkB,sCAAsC;IACxD,kEAAkE;IAClE,uBAAuB,4CAA4C;IACnE,mCAAmC;IACnC,kBAAkB,sCAAsC;IACxD,mCAAmC;IACnC,kBAAkB,sCAAsC;CACzD;AAED,8DAA8D;AAC9D,o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