@tylertech/forge-ai 0.14.0 → 0.15.1
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/custom-elements.json +417 -153
- package/dist/ai-agent-selector/ai-agent-selector.mjs +1 -1
- package/dist/ai-chat-header/ai-chat-header.d.ts +5 -0
- package/dist/ai-chat-header/ai-chat-header.mjs +9 -3
- package/dist/ai-chat-header/ai-chat-header.scss.mjs +1 -1
- package/dist/ai-chatbot/agent-adapter.d.ts +1 -0
- package/dist/ai-chatbot/ai-chatbot-base.mjs +0 -1
- package/dist/ai-chatbot/ai-chatbot.d.ts +5 -1
- package/dist/ai-chatbot/ai-chatbot.mjs +18 -5
- package/dist/ai-chatbot/index.d.ts +1 -0
- package/dist/ai-chatbot/index.mjs +4 -1
- package/dist/ai-chatbot/message-state-controller.d.ts +8 -11
- package/dist/ai-chatbot/message-state-controller.mjs +7 -129
- package/dist/ai-chatbot/request-serialization.d.ts +33 -0
- package/dist/ai-chatbot/request-serialization.mjs +31 -0
- package/dist/ai-chatbot/types.d.ts +0 -73
- package/dist/ai-chatbot-launcher/ai-chatbot-launcher.d.ts +14 -2
- package/dist/ai-chatbot-launcher/ai-chatbot-launcher.mjs +86 -12
- package/dist/ai-chatbot-launcher/ai-chatbot-launcher.scss.mjs +1 -1
- package/dist/ai-conversations-panel/ai-conversations-panel.d.ts +10 -0
- package/dist/ai-conversations-panel/ai-conversations-panel.mjs +68 -7
- package/dist/ai-conversations-panel/ai-conversations-panel.scss.mjs +1 -1
- package/dist/ai-dialog/ai-dialog.mjs +1 -1
- package/dist/ai-dropdown-menu/ai-dropdown-menu.mjs +1 -1
- package/dist/ai-dropdown-menu/index.d.ts +1 -1
- package/dist/ai-edit-thread/ai-edit-thread.d.ts +5 -0
- package/dist/ai-edit-thread/ai-edit-thread.mjs +16 -9
- package/dist/ai-error-message/ai-error-message.d.ts +7 -1
- package/dist/ai-error-message/ai-error-message.mjs +40 -5
- package/dist/ai-error-message/ai-error-message.scss.mjs +1 -1
- package/dist/ai-error-message/index.d.ts +1 -0
- package/dist/ai-fab/ai-fab.d.ts +2 -0
- package/dist/ai-fab/ai-fab.mjs +5 -1
- package/dist/ai-icon-button/ai-icon-button.mjs +4 -1
- package/dist/ai-message-thread/ai-message-thread.mjs +1 -1
- package/dist/ai-sidebar/ai-sidebar.mjs +2 -2
- package/dist/ai-thread-actions-menu/ai-thread-actions-menu.d.ts +5 -0
- package/dist/ai-thread-actions-menu/ai-thread-actions-menu.mjs +6 -2
- package/dist/ai-threads-search/ai-threads-search.d.ts +26 -2
- package/dist/ai-threads-search/ai-threads-search.mjs +155 -35
- package/dist/ai-threads-search/ai-threads-search.scss.mjs +1 -1
- package/dist/ai-tool-call-indicator/ai-tool-call-indicator.scss.mjs +1 -1
- package/dist/ai-voice-input/ai-voice-input.mjs +2 -2
- package/dist/core/chatbot-core-controller.mjs +6 -8
- package/dist/core/popover/popover.mjs +3 -0
- package/dist/index.mjs +4 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { unsafeCSS, LitElement, html } from "lit";
|
|
2
2
|
import { property, query, customElement } from "lit/decorators.js";
|
|
3
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
3
4
|
import styles from "./ai-edit-thread.scss.mjs";
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -15,15 +16,17 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
15
16
|
return result;
|
|
16
17
|
};
|
|
17
18
|
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
19
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
18
20
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
19
21
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
20
|
-
var _AiEditThreadComponent_instances, handleKeyDown_fn, handleFocusOut_fn, handleSave_fn, handleCancel_fn;
|
|
22
|
+
var _AiEditThreadComponent_instances, handleKeyDown_fn, handleFocusOut_fn, handleSave_fn, handleCancel_fn, buttonClasses_get;
|
|
21
23
|
const AiEditThreadComponentTagName = "forge-ai-edit-thread";
|
|
22
24
|
let AiEditThreadComponent = class extends LitElement {
|
|
23
25
|
constructor() {
|
|
24
26
|
super(...arguments);
|
|
25
27
|
__privateAdd(this, _AiEditThreadComponent_instances);
|
|
26
28
|
this.value = "";
|
|
29
|
+
this.density = "small";
|
|
27
30
|
}
|
|
28
31
|
firstUpdated() {
|
|
29
32
|
if (this._inputElement) {
|
|
@@ -44,19 +47,13 @@ let AiEditThreadComponent = class extends LitElement {
|
|
|
44
47
|
@keydown=${__privateMethod(this, _AiEditThreadComponent_instances, handleKeyDown_fn)} />
|
|
45
48
|
</div>
|
|
46
49
|
<div class="edit-thread-actions">
|
|
47
|
-
<button
|
|
48
|
-
class="forge-icon-button forge-icon-button--squared forge-icon-button--small"
|
|
49
|
-
@click=${__privateMethod(this, _AiEditThreadComponent_instances, handleCancel_fn)}
|
|
50
|
-
aria-label="Cancel">
|
|
50
|
+
<button class=${classMap(__privateGet(this, _AiEditThreadComponent_instances, buttonClasses_get))} @click=${__privateMethod(this, _AiEditThreadComponent_instances, handleCancel_fn)} aria-label="Cancel">
|
|
51
51
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="forge-icon" aria-hidden="true">
|
|
52
52
|
<path
|
|
53
53
|
d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" />
|
|
54
54
|
</svg>
|
|
55
55
|
</button>
|
|
56
|
-
<button
|
|
57
|
-
class="forge-icon-button forge-icon-button--squared forge-icon-button--small"
|
|
58
|
-
@click=${__privateMethod(this, _AiEditThreadComponent_instances, handleSave_fn)}
|
|
59
|
-
aria-label="Save">
|
|
56
|
+
<button class=${classMap(__privateGet(this, _AiEditThreadComponent_instances, buttonClasses_get))} @click=${__privateMethod(this, _AiEditThreadComponent_instances, handleSave_fn)} aria-label="Save">
|
|
60
57
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="forge-icon" aria-hidden="true">
|
|
61
58
|
<path d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" />
|
|
62
59
|
</svg>
|
|
@@ -111,6 +108,13 @@ handleCancel_fn = function() {
|
|
|
111
108
|
});
|
|
112
109
|
this.dispatchEvent(event);
|
|
113
110
|
};
|
|
111
|
+
buttonClasses_get = function() {
|
|
112
|
+
return {
|
|
113
|
+
"forge-icon-button": true,
|
|
114
|
+
"forge-icon-button--squared": true,
|
|
115
|
+
"forge-icon-button--small": this.density === "small"
|
|
116
|
+
};
|
|
117
|
+
};
|
|
114
118
|
AiEditThreadComponent.styles = unsafeCSS(styles);
|
|
115
119
|
__decorateClass([
|
|
116
120
|
property({ type: Object })
|
|
@@ -118,6 +122,9 @@ __decorateClass([
|
|
|
118
122
|
__decorateClass([
|
|
119
123
|
property({ type: String })
|
|
120
124
|
], AiEditThreadComponent.prototype, "value", 2);
|
|
125
|
+
__decorateClass([
|
|
126
|
+
property()
|
|
127
|
+
], AiEditThreadComponent.prototype, "density", 2);
|
|
121
128
|
__decorateClass([
|
|
122
129
|
query(".edit-input")
|
|
123
130
|
], AiEditThreadComponent.prototype, "_inputElement", 2);
|
|
@@ -4,16 +4,22 @@ declare global {
|
|
|
4
4
|
'forge-ai-error-message': AiErrorMessageComponent;
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
+
export type ErrorMessageDensity = 'medium' | 'small';
|
|
7
8
|
export declare const AiErrorMessageComponentTagName: keyof HTMLElementTagNameMap;
|
|
8
9
|
/**
|
|
9
10
|
* @tag forge-ai-error-message
|
|
10
11
|
*
|
|
11
12
|
* @summary Displays error messages using Forge inline message banner style.
|
|
12
13
|
*
|
|
13
|
-
* @
|
|
14
|
+
* @property {ErrorMessageDensity} density - The density of the banner. `'small'` tightens the padding, gap, and icon for use in compact surfaces like lists and panels (default: 'medium')
|
|
15
|
+
*
|
|
16
|
+
* @slot title - The error title text. When empty the banner collapses to a single row alongside the icon.
|
|
14
17
|
* @slot - The error message content
|
|
15
18
|
*/
|
|
16
19
|
export declare class AiErrorMessageComponent extends LitElement {
|
|
20
|
+
#private;
|
|
17
21
|
static styles: CSSResult;
|
|
22
|
+
density: ErrorMessageDensity;
|
|
23
|
+
private _titleNodes;
|
|
18
24
|
render(): TemplateResult;
|
|
19
25
|
}
|
|
@@ -1,16 +1,32 @@
|
|
|
1
1
|
import { unsafeCSS, LitElement, html } from "lit";
|
|
2
|
-
import { customElement } from "lit/decorators.js";
|
|
2
|
+
import { property, queryAssignedNodes, customElement } from "lit/decorators.js";
|
|
3
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
3
4
|
import styles from "./ai-error-message.scss.mjs";
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
4
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __typeError = (msg) => {
|
|
8
|
+
throw TypeError(msg);
|
|
9
|
+
};
|
|
5
10
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
11
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
7
12
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8
13
|
if (decorator = decorators[i])
|
|
9
|
-
result = decorator(result) || result;
|
|
14
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
15
|
+
if (kind && result) __defProp(target, key, result);
|
|
10
16
|
return result;
|
|
11
17
|
};
|
|
18
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
19
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
20
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
21
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
22
|
+
var _AiErrorMessageComponent_instances, handleTitleSlotChange_fn, title_get;
|
|
12
23
|
const AiErrorMessageComponentTagName = "forge-ai-error-message";
|
|
13
24
|
let AiErrorMessageComponent = class extends LitElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
__privateAdd(this, _AiErrorMessageComponent_instances);
|
|
28
|
+
this.density = "medium";
|
|
29
|
+
}
|
|
14
30
|
render() {
|
|
15
31
|
return html`
|
|
16
32
|
<div class="forge-inline-message">
|
|
@@ -25,9 +41,7 @@ let AiErrorMessageComponent = class extends LitElement {
|
|
|
25
41
|
<path fill="none" d="M0 0h24v24H0z" />
|
|
26
42
|
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z" />
|
|
27
43
|
</svg>
|
|
28
|
-
|
|
29
|
-
<slot name="title"></slot>
|
|
30
|
-
</div>
|
|
44
|
+
${__privateGet(this, _AiErrorMessageComponent_instances, title_get)}
|
|
31
45
|
<div class="forge-inline-message__content">
|
|
32
46
|
<slot></slot>
|
|
33
47
|
</div>
|
|
@@ -35,7 +49,28 @@ let AiErrorMessageComponent = class extends LitElement {
|
|
|
35
49
|
`;
|
|
36
50
|
}
|
|
37
51
|
};
|
|
52
|
+
_AiErrorMessageComponent_instances = /* @__PURE__ */ new WeakSet();
|
|
53
|
+
handleTitleSlotChange_fn = function() {
|
|
54
|
+
this.requestUpdate();
|
|
55
|
+
};
|
|
56
|
+
title_get = function() {
|
|
57
|
+
const classes = classMap({
|
|
58
|
+
"forge-inline-message__title": true,
|
|
59
|
+
"forge-inline-message__title--empty": this._titleNodes.length === 0
|
|
60
|
+
});
|
|
61
|
+
return html`
|
|
62
|
+
<div class=${classes}>
|
|
63
|
+
<slot name="title" @slotchange=${__privateMethod(this, _AiErrorMessageComponent_instances, handleTitleSlotChange_fn)}></slot>
|
|
64
|
+
</div>
|
|
65
|
+
`;
|
|
66
|
+
};
|
|
38
67
|
AiErrorMessageComponent.styles = unsafeCSS(styles);
|
|
68
|
+
__decorateClass([
|
|
69
|
+
property({ type: String, reflect: true })
|
|
70
|
+
], AiErrorMessageComponent.prototype, "density", 2);
|
|
71
|
+
__decorateClass([
|
|
72
|
+
queryAssignedNodes({ slot: "title", flatten: true })
|
|
73
|
+
], AiErrorMessageComponent.prototype, "_titleNodes", 2);
|
|
39
74
|
AiErrorMessageComponent = __decorateClass([
|
|
40
75
|
customElement(AiErrorMessageComponentTagName)
|
|
41
76
|
], AiErrorMessageComponent);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const styles = '/* prettier-ignore */\n/**\n * @license\n * Copyright Tyler Technologies, Inc.\n * License: Apache-2.0\n */\n.forge-inline-message {\n --_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-info-container-low, #e3edf7));\n --_inline-message-color:var(--forge-inline-message-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));\n --_inline-message-shape:var(--forge-inline-message-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));\n --_inline-message-padding:var(--forge-inline-message-padding, var(--forge-spacing-small, 12px));\n --_inline-message-padding-inline:var(--forge-inline-message-padding-inline, var(--_inline-message-padding));\n --_inline-message-padding-block:var(--forge-inline-message-padding-block, var(--_inline-message-padding));\n --_inline-message-border-width:var(--forge-inline-message-border-width, var(--forge-border-thin, 1px));\n --_inline-message-border-style:var(--forge-inline-message-border-style, none);\n --_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-info-container, #c7daf0));\n --_inline-message-gap:var(--forge-inline-message-gap, var(--forge-spacing-small, 12px));\n --_inline-message-icon-gap:var(--forge-inline-message-icon-gap, var(--_inline-message-gap));\n --_inline-message-content-gap:var(--forge-inline-message-content-gap, var(--_inline-message-gap));\n --_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-info-container-low, #0b3768));\n}\n\n.forge-inline-message {\n display: block;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-family: var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));\n font-size: var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 0.875)));\n font-weight: var(--forge-typography-body1-font-weight, 400);\n line-height: var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));\n letter-spacing: var(--forge-typography-body1-letter-spacing, 0.0357142857em);\n text-transform: var(--forge-typography-body1-text-transform, inherit);\n text-decoration: var(--forge-typography-body1-text-decoration, inherit);\n background: var(--_inline-message-background);\n color: var(--_inline-message-color);\n border-radius: var(--_inline-message-shape);\n border-width: var(--_inline-message-border-width);\n border-style: var(--_inline-message-border-style);\n border-color: var(--_inline-message-border-color);\n display: flex;\n align-items: center;\n gap: var(--_inline-message-icon-gap);\n box-sizing: border-box;\n padding-inline: var(--_inline-message-padding-inline);\n padding-block: var(--_inline-message-padding-block);\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-rows: auto 1fr;\n}\n\n.forge-inline-message:not(:has(.forge-inline-message__icon)) {\n grid-template-columns: 1fr;\n}\n\n.forge-inline-message__title {\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-family: var(--forge-typography-heading1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));\n font-size: var(--forge-typography-heading1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading1-font-size-scale, 0.875)));\n font-weight: var(--forge-typography-heading1-font-weight, 500);\n line-height: var(--forge-typography-heading1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading1-line-height-scale, 1.125)));\n letter-spacing: var(--forge-typography-heading1-letter-spacing, 0.0178571429em);\n text-transform: var(--forge-typography-heading1-text-transform, inherit);\n text-decoration: var(--forge-typography-heading1-text-decoration, inherit);\n}\n\n.forge-inline-message__icon {\n color: var(--_inline-message-icon-color);\n align-self: start;\n grid-row: 1/span 2;\n}\n\n:host {\n display: block;\n}\n\n.forge-inline-message {\n --forge-inline-message-background: var(--forge-theme-error-container-low, #f6e0e4);\n --forge-inline-message-color: var(--forge-theme-on-error-container-low, #5f0011);\n --forge-inline-message-icon-color: var(--forge-theme-on-error-container-low, #5f0011);\n --forge-inline-message-border-color: var(--forge-theme-error-container, #ecc2c9);\n --forge-inline-message-border-style: solid;\n}\n.forge-inline-message__title {\n font-weight: bold;\n}\n.forge-inline-message__content {\n overflow-wrap: anywhere;\n}\n\n::slotted(*) {\n margin-block: 0;\n overflow-wrap: anywhere;\n}';
|
|
1
|
+
const styles = '/* prettier-ignore */\n/**\n * @license\n * Copyright Tyler Technologies, Inc.\n * License: Apache-2.0\n */\n.forge-inline-message {\n --_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-info-container-low, #e3edf7));\n --_inline-message-color:var(--forge-inline-message-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));\n --_inline-message-shape:var(--forge-inline-message-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));\n --_inline-message-padding:var(--forge-inline-message-padding, var(--forge-spacing-small, 12px));\n --_inline-message-padding-inline:var(--forge-inline-message-padding-inline, var(--_inline-message-padding));\n --_inline-message-padding-block:var(--forge-inline-message-padding-block, var(--_inline-message-padding));\n --_inline-message-border-width:var(--forge-inline-message-border-width, var(--forge-border-thin, 1px));\n --_inline-message-border-style:var(--forge-inline-message-border-style, none);\n --_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-info-container, #c7daf0));\n --_inline-message-gap:var(--forge-inline-message-gap, var(--forge-spacing-small, 12px));\n --_inline-message-icon-gap:var(--forge-inline-message-icon-gap, var(--_inline-message-gap));\n --_inline-message-content-gap:var(--forge-inline-message-content-gap, var(--_inline-message-gap));\n --_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-info-container-low, #0b3768));\n}\n\n.forge-inline-message {\n display: block;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-family: var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));\n font-size: var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 0.875)));\n font-weight: var(--forge-typography-body1-font-weight, 400);\n line-height: var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));\n letter-spacing: var(--forge-typography-body1-letter-spacing, 0.0357142857em);\n text-transform: var(--forge-typography-body1-text-transform, inherit);\n text-decoration: var(--forge-typography-body1-text-decoration, inherit);\n background: var(--_inline-message-background);\n color: var(--_inline-message-color);\n border-radius: var(--_inline-message-shape);\n border-width: var(--_inline-message-border-width);\n border-style: var(--_inline-message-border-style);\n border-color: var(--_inline-message-border-color);\n display: flex;\n align-items: center;\n gap: var(--_inline-message-icon-gap);\n box-sizing: border-box;\n padding-inline: var(--_inline-message-padding-inline);\n padding-block: var(--_inline-message-padding-block);\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-rows: auto 1fr;\n}\n\n.forge-inline-message:not(:has(.forge-inline-message__icon)) {\n grid-template-columns: 1fr;\n}\n\n.forge-inline-message__title {\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-family: var(--forge-typography-heading1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));\n font-size: var(--forge-typography-heading1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading1-font-size-scale, 0.875)));\n font-weight: var(--forge-typography-heading1-font-weight, 500);\n line-height: var(--forge-typography-heading1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading1-line-height-scale, 1.125)));\n letter-spacing: var(--forge-typography-heading1-letter-spacing, 0.0178571429em);\n text-transform: var(--forge-typography-heading1-text-transform, inherit);\n text-decoration: var(--forge-typography-heading1-text-decoration, inherit);\n}\n\n.forge-inline-message__icon {\n color: var(--_inline-message-icon-color);\n align-self: start;\n grid-row: 1/span 2;\n}\n\n:host {\n display: block;\n}\n\n.forge-inline-message {\n --forge-inline-message-background: var(--forge-theme-error-container-low, #f6e0e4);\n --forge-inline-message-color: var(--forge-theme-on-error-container-low, #5f0011);\n --forge-inline-message-icon-color: var(--forge-theme-on-error-container-low, #5f0011);\n --forge-inline-message-border-color: var(--forge-theme-error-container, #ecc2c9);\n --forge-inline-message-border-style: solid;\n}\n.forge-inline-message__title {\n font-weight: bold;\n}\n.forge-inline-message__title--empty {\n display: none;\n}\n.forge-inline-message__content {\n overflow-wrap: anywhere;\n}\n.forge-inline-message:has(.forge-inline-message__title--empty) {\n grid-template-rows: auto;\n}\n.forge-inline-message:has(.forge-inline-message__title--empty) .forge-inline-message__icon {\n grid-row: auto;\n align-self: center;\n}\n\n:host([density=small]) .forge-inline-message {\n --forge-inline-message-padding: var(--forge-spacing-xsmall, 8px);\n --forge-inline-message-gap: var(--forge-spacing-xsmall, 8px);\n --forge-inline-message-content-gap: var(--forge-spacing-xxsmall, 4px);\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-family: var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));\n font-size: var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));\n font-weight: var(--forge-typography-body2-font-weight, 400);\n line-height: var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));\n letter-spacing: var(--forge-typography-body2-letter-spacing, 0.015625em);\n text-transform: var(--forge-typography-body2-text-transform, inherit);\n text-decoration: var(--forge-typography-body2-text-decoration, inherit);\n}\n:host([density=small]) .forge-inline-message__icon {\n height: 20px;\n width: 20px;\n}\n\n::slotted(*) {\n margin-block: 0;\n overflow-wrap: anywhere;\n}';
|
|
2
2
|
export {
|
|
3
3
|
styles as default
|
|
4
4
|
};
|
package/dist/ai-fab/ai-fab.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export declare class AiFabComponent extends LitElement {
|
|
|
22
22
|
disabled: boolean;
|
|
23
23
|
/** Whether the button is extended */
|
|
24
24
|
extended: boolean;
|
|
25
|
+
/** Accessible label for the button, announced by screen readers. */
|
|
26
|
+
label: string;
|
|
25
27
|
constructor();
|
|
26
28
|
willUpdate(changedProperties: PropertyValues<this>): void;
|
|
27
29
|
render(): TemplateResult;
|
package/dist/ai-fab/ai-fab.mjs
CHANGED
|
@@ -30,6 +30,7 @@ let AiFabComponent = class extends LitElement {
|
|
|
30
30
|
__privateAdd(this, _AiFabComponent_instances);
|
|
31
31
|
this.disabled = false;
|
|
32
32
|
this.extended = false;
|
|
33
|
+
this.label = "Launch chatbot";
|
|
33
34
|
__privateAdd(this, _internals);
|
|
34
35
|
__privateSet(this, _internals, this.attachInternals());
|
|
35
36
|
__privateMethod(this, _AiFabComponent_instances, setCssState_fn).call(this);
|
|
@@ -43,7 +44,7 @@ let AiFabComponent = class extends LitElement {
|
|
|
43
44
|
return html`
|
|
44
45
|
<forge-ai-gradient-container variant=${this.disabled ? "disabled" : "high"}>
|
|
45
46
|
<button
|
|
46
|
-
aria-label
|
|
47
|
+
aria-label=${this.label}
|
|
47
48
|
class="forge-fab ai-fab ${this.extended ? "forge-fab--small forge-fab--extended" : ""}"
|
|
48
49
|
.disabled=${this.disabled}>
|
|
49
50
|
<slot name="icon">
|
|
@@ -68,6 +69,9 @@ __decorateClass([
|
|
|
68
69
|
__decorateClass([
|
|
69
70
|
property({ type: Boolean, reflect: true })
|
|
70
71
|
], AiFabComponent.prototype, "extended", 2);
|
|
72
|
+
__decorateClass([
|
|
73
|
+
property({ type: String })
|
|
74
|
+
], AiFabComponent.prototype, "label", 2);
|
|
71
75
|
AiFabComponent = __decorateClass([
|
|
72
76
|
customElement(AiFabComponentTagName)
|
|
73
77
|
], AiFabComponent);
|
|
@@ -39,7 +39,10 @@ let AiIconButtonComponent = class extends LitElement {
|
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
41
|
return html`
|
|
42
|
-
<button
|
|
42
|
+
<button
|
|
43
|
+
aria-label="AI Icon Button"
|
|
44
|
+
class="forge-icon-button forge-icon-button--medium ai-icon-button"
|
|
45
|
+
.disabled=${this.disabled}>
|
|
43
46
|
<forge-ai-icon></forge-ai-icon>
|
|
44
47
|
</button>
|
|
45
48
|
`;
|
|
@@ -87,9 +87,9 @@ let AiMessageThreadComponent = class extends LitElement {
|
|
|
87
87
|
render() {
|
|
88
88
|
return html`
|
|
89
89
|
<div class="message-thread" @scroll=${this.autoScroll ? __privateGet(this, _handleScroll) : void 0}>
|
|
90
|
+
${__privateGet(this, _AiMessageThreadComponent_instances, scrollToBottomButton_get)}
|
|
90
91
|
<div class="message-thread-content">${__privateGet(this, _AiMessageThreadComponent_instances, emptyState_get)} ${__privateGet(this, _AiMessageThreadComponent_instances, messages_get)} ${__privateGet(this, _AiMessageThreadComponent_instances, thinkingIndicator_get)}</div>
|
|
91
92
|
</div>
|
|
92
|
-
${__privateGet(this, _AiMessageThreadComponent_instances, scrollToBottomButton_get)}
|
|
93
93
|
`;
|
|
94
94
|
}
|
|
95
95
|
};
|
|
@@ -85,9 +85,9 @@ let AiSidebarComponent = class extends LitElement {
|
|
|
85
85
|
<div
|
|
86
86
|
${ref(__privateGet(this, _resizeHandleRef))}
|
|
87
87
|
class=${classMap(handleClasses)}
|
|
88
|
-
role="
|
|
88
|
+
role="slider"
|
|
89
89
|
aria-orientation="vertical"
|
|
90
|
-
aria-label="Resize
|
|
90
|
+
aria-label="Resize chatbot panel, use left and right arrow keys"
|
|
91
91
|
aria-valuemin="${MIN_WIDTH}"
|
|
92
92
|
aria-valuemax="${MAX_WIDTH}"
|
|
93
93
|
aria-valuenow=${this._width}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LitElement, TemplateResult, CSSResult } from 'lit';
|
|
2
2
|
import { Thread } from '../ai-threads';
|
|
3
|
+
import { DropdownMenuDensity } from '../ai-dropdown-menu';
|
|
3
4
|
declare global {
|
|
4
5
|
interface HTMLElementTagNameMap {
|
|
5
6
|
'forge-ai-thread-actions-menu': AiThreadActionsMenuComponent;
|
|
@@ -40,5 +41,9 @@ export declare class AiThreadActionsMenuComponent extends LitElement {
|
|
|
40
41
|
thread: Thread;
|
|
41
42
|
showRename: boolean;
|
|
42
43
|
showDelete: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The density of the trigger button
|
|
46
|
+
*/
|
|
47
|
+
density: DropdownMenuDensity;
|
|
43
48
|
render(): TemplateResult;
|
|
44
49
|
}
|
|
@@ -28,15 +28,16 @@ let AiThreadActionsMenuComponent = class extends LitElement {
|
|
|
28
28
|
__privateAdd(this, _AiThreadActionsMenuComponent_instances);
|
|
29
29
|
this.showRename = false;
|
|
30
30
|
this.showDelete = false;
|
|
31
|
+
this.density = "small";
|
|
31
32
|
}
|
|
32
33
|
render() {
|
|
33
34
|
return html`
|
|
34
35
|
<forge-ai-dropdown-menu
|
|
35
36
|
variant="icon-button-squared"
|
|
36
|
-
density
|
|
37
|
+
density=${this.density}
|
|
37
38
|
selection-mode="none"
|
|
38
39
|
popover-placement="bottom-start"
|
|
39
|
-
trigger-label="
|
|
40
|
+
trigger-label="More actions for ${this.thread.title}"
|
|
40
41
|
@keydown=${__privateMethod(this, _AiThreadActionsMenuComponent_instances, handleMenuKeyDown_fn)}
|
|
41
42
|
@forge-ai-dropdown-menu-open=${__privateMethod(this, _AiThreadActionsMenuComponent_instances, handleMenuOpen_fn)}
|
|
42
43
|
@forge-ai-dropdown-menu-close=${__privateMethod(this, _AiThreadActionsMenuComponent_instances, handleMenuClose_fn)}
|
|
@@ -139,6 +140,9 @@ __decorateClass([
|
|
|
139
140
|
__decorateClass([
|
|
140
141
|
property({ type: Boolean, attribute: "show-delete" })
|
|
141
142
|
], AiThreadActionsMenuComponent.prototype, "showDelete", 2);
|
|
143
|
+
__decorateClass([
|
|
144
|
+
property()
|
|
145
|
+
], AiThreadActionsMenuComponent.prototype, "density", 2);
|
|
142
146
|
AiThreadActionsMenuComponent = __decorateClass([
|
|
143
147
|
customElement(AiThreadActionsMenuComponentTagName)
|
|
144
148
|
], AiThreadActionsMenuComponent);
|
|
@@ -13,6 +13,7 @@ declare global {
|
|
|
13
13
|
'forge-ai-threads-search-delete': CustomEvent<ForgeAiThreadsSearchDeleteEventData>;
|
|
14
14
|
'forge-ai-threads-search-delete-confirm': CustomEvent<ForgeAiThreadsSearchDeleteConfirmEventData>;
|
|
15
15
|
'forge-ai-threads-search-back': CustomEvent<void>;
|
|
16
|
+
'forge-ai-threads-search-retry': CustomEvent<void>;
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
export interface ForgeAiThreadsSearchQueryEventData {
|
|
@@ -50,13 +51,14 @@ export declare const AiThreadsSearchComponentTagName: keyof HTMLElementTagNameMa
|
|
|
50
51
|
* @slot header-actions - Slot for a persistent action pinned to the top-right of the header, alongside the "New chat" button (e.g. a "View all" button).
|
|
51
52
|
*
|
|
52
53
|
* @event {CustomEvent<ForgeAiThreadsSearchQueryEventData>} forge-ai-threads-search-query - Fired when search query changes (debounced).
|
|
53
|
-
* @event {CustomEvent<ForgeAiThreadsSearchLoadMoreEventData>} forge-ai-threads-search-load-more - Fired when user scrolls near bottom for pagination.
|
|
54
|
+
* @event {CustomEvent<ForgeAiThreadsSearchLoadMoreEventData>} forge-ai-threads-search-load-more - Fired when the user scrolls near the bottom or clicks "Load more" for pagination.
|
|
54
55
|
* @event {CustomEvent<ForgeAiThreadsSearchSelectEventData>} forge-ai-threads-search-select - Fired when a thread is selected.
|
|
55
56
|
* @event {CustomEvent} forge-ai-threads-search-new-chat - Fired when new chat button clicked.
|
|
56
57
|
* @event {CustomEvent<ForgeAiThreadsSearchRenameEventData>} forge-ai-threads-search-rename - Fired when thread renamed. Cancelable - if prevented, call onSuccess() to commit or onError() to revert.
|
|
57
58
|
* @event {CustomEvent<ForgeAiThreadsSearchDeleteEventData>} forge-ai-threads-search-delete - Fired when thread delete confirmed. Cancelable - if prevented, call onSuccess() to commit deletion or onError() to revert.
|
|
58
59
|
* @event {CustomEvent<ForgeAiThreadsSearchDeleteConfirmEventData>} forge-ai-threads-search-delete-confirm - Fired before showing the built-in delete confirmation. Cancelable - if prevented, this component shows no confirmation UI; the host must show its own and call confirmThreadDelete() once accepted.
|
|
59
60
|
* @event {CustomEvent<void>} forge-ai-threads-search-back - Fired when the back button (shown via showBackButton) is clicked.
|
|
61
|
+
* @event {CustomEvent<void>} forge-ai-threads-search-retry - Fired when the retry button in the error state is clicked. The host should re-request the threads and clear errorMessage once the load succeeds.
|
|
60
62
|
*
|
|
61
63
|
* @description A standalone search component for conversations/threads. Can be slotted into forge-ai-threads
|
|
62
64
|
* or used independently. Supports both local and external/async search patterns via event callbacks.
|
|
@@ -88,8 +90,18 @@ export declare class AiThreadsSearchComponent extends LitElement {
|
|
|
88
90
|
* infinite scroll entirely. Useful when all data is loaded upfront.
|
|
89
91
|
*/
|
|
90
92
|
totalChats: number;
|
|
93
|
+
/**
|
|
94
|
+
* Placeholder text for the search input. The input's aria-label is "Search" - avoid reusing
|
|
95
|
+
* that word here so screen readers don't announce the same word twice.
|
|
96
|
+
*/
|
|
91
97
|
placeholder: string;
|
|
92
|
-
|
|
98
|
+
/**
|
|
99
|
+
* Message describing a failed thread load. When no threads are loaded, an error banner with a
|
|
100
|
+
* retry button replaces the empty state. When threads are already on screen the list stays visible
|
|
101
|
+
* and the message shows as a compact single line with a retry - at the bottom of the list if a page
|
|
102
|
+
* was in flight, otherwise above it. The host owns this value and should clear it once a load succeeds.
|
|
103
|
+
*/
|
|
104
|
+
errorMessage?: string;
|
|
93
105
|
showThreadRename: boolean;
|
|
94
106
|
showThreadDelete: boolean;
|
|
95
107
|
/**
|
|
@@ -97,6 +109,7 @@ export declare class AiThreadsSearchComponent extends LitElement {
|
|
|
97
109
|
*/
|
|
98
110
|
selectedThreadId: string | null;
|
|
99
111
|
private _resultsContainer;
|
|
112
|
+
private _searchInput?;
|
|
100
113
|
private _searchQuery;
|
|
101
114
|
private _isSearching;
|
|
102
115
|
private _searchResults;
|
|
@@ -113,5 +126,16 @@ export declare class AiThreadsSearchComponent extends LitElement {
|
|
|
113
126
|
* built-in one). Call once the host's own confirmation has been accepted.
|
|
114
127
|
*/
|
|
115
128
|
confirmThreadDelete(thread: Thread): void;
|
|
129
|
+
/**
|
|
130
|
+
* Discards the current query and its results so the list shows every loaded chat again.
|
|
131
|
+
* Dispatches no search event and moves no focus, so a host may call it on a surface that is
|
|
132
|
+
* currently hidden (e.g. a popover that stays mounted between opens).
|
|
133
|
+
*/
|
|
134
|
+
resetSearch(): void;
|
|
135
|
+
/**
|
|
136
|
+
* Moves focus into the component: the search input when shown, otherwise the first chat in
|
|
137
|
+
* the list, otherwise the first header button.
|
|
138
|
+
*/
|
|
139
|
+
focus(): void;
|
|
116
140
|
render(): TemplateResult;
|
|
117
141
|
}
|