@genesislcap/ai-assistant 15.86.0 → 15.86.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/dist/ai-assistant.api.json +63 -2
- package/dist/ai-assistant.d.ts +10 -0
- package/dist/custom-elements.json +795 -724
- package/dist/dts/components/chat-bubble/chat-bubble.d.ts +9 -2
- package/dist/dts/components/chat-bubble/chat-bubble.d.ts.map +1 -1
- package/dist/dts/components/chat-markdown/chat-markdown.d.ts.map +1 -1
- package/dist/dts/genesis/write-review/write-review.d.ts +23 -0
- package/dist/dts/genesis/write-review/write-review.d.ts.map +1 -1
- package/dist/dts/genesis/write-review/write-review.styles.d.ts.map +1 -1
- package/dist/dts/genesis/write-review/write-review.template.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +8 -0
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/main/main.styles.d.ts.map +1 -1
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/main/main.types.d.ts +2 -0
- package/dist/dts/main/main.types.d.ts.map +1 -1
- package/dist/dts/react.d.ts +1 -0
- package/dist/esm/components/chat-bubble/chat-bubble.js +18 -21
- package/dist/esm/components/chat-markdown/chat-markdown.js +18 -2
- package/dist/esm/genesis/write-review/write-review.js +48 -0
- package/dist/esm/genesis/write-review/write-review.styles.js +67 -1
- package/dist/esm/genesis/write-review/write-review.template.js +44 -27
- package/dist/esm/main/main.js +13 -0
- package/dist/esm/main/main.styles.js +42 -0
- package/dist/esm/main/main.template.js +11 -1
- package/dist/esm/main/main.types.js +2 -0
- package/dist/react.cjs +6 -1
- package/dist/react.mjs +6 -1
- package/docs/styling.md +10 -4
- package/package.json +17 -17
|
@@ -79,34 +79,46 @@ const valueOrBlank = (pick) => html `
|
|
|
79
79
|
</span>
|
|
80
80
|
`)}
|
|
81
81
|
`;
|
|
82
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* A cell shows what the field becomes, and — when it is changing — what it is now.
|
|
84
|
+
*
|
|
85
|
+
* @remarks
|
|
86
|
+
* The cell carries its column's label, and its content sits in one wrapper, for the stacked
|
|
87
|
+
* layout: there the headings are gone and each cell is a label beside its value (see
|
|
88
|
+
* `GenesisWriteReview.stacked`), and the wrapper keeps the − and + lines together in the value's
|
|
89
|
+
* column rather than letting each take a grid cell of its own.
|
|
90
|
+
*/
|
|
83
91
|
const cell = html `
|
|
84
92
|
<td
|
|
93
|
+
role="cell"
|
|
94
|
+
data-label="${(x) => x.label}"
|
|
85
95
|
class="${(x) => [x.changed ? 'changed' : '', x.identifying ? 'identifying' : '', x.long ? 'long' : '']
|
|
86
96
|
.join(' ')
|
|
87
97
|
.trim()}"
|
|
88
98
|
title="${(x) => { var _a; return x.identifying ? `This field identifies ${(_a = x.identifies) !== null && _a !== void 0 ? _a : 'the row being removed'}` : ''; }}"
|
|
89
99
|
>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
<div class="value">
|
|
101
|
+
${when((x) => x.identifying, html `
|
|
102
|
+
<span class="sr-only">identifies this row:</span>
|
|
103
|
+
`)}
|
|
104
|
+
${when((x) => x.changed && x.previousDisplay !== undefined, html `
|
|
105
|
+
<span class="sr-only">was</span>
|
|
106
|
+
<span class="was">${mark('−')}${valueOrBlank((x) => x.previousDisplay)}</span>
|
|
107
|
+
<span class="sr-only">now</span>
|
|
108
|
+
<span class="now">${mark('+')}${valueOrBlank((x) => x.display)}</span>
|
|
109
|
+
`)}
|
|
110
|
+
${when((x) => !!x.input, html `
|
|
111
|
+
<span class="input-mark">input:</span>
|
|
112
|
+
`)}
|
|
113
|
+
${when((x) => !(x.changed && x.previousDisplay !== undefined), html `
|
|
114
|
+
${(x) => x.display}
|
|
115
|
+
`)}
|
|
116
|
+
</div>
|
|
105
117
|
</td>
|
|
106
118
|
`;
|
|
107
119
|
const row = html `
|
|
108
|
-
<tr class="${(x, c) => rowClass(x, c.parent)}">
|
|
109
|
-
<td class="select">
|
|
120
|
+
<tr role="row" class="${(x, c) => rowClass(x, c.parent)}">
|
|
121
|
+
<td role="cell" class="select">
|
|
110
122
|
<rapid-checkbox
|
|
111
123
|
aria-label="Select ${(x) => x.label}"
|
|
112
124
|
aria-describedby="${(x) => { var _a; return (((_a = x.problems) === null || _a === void 0 ? void 0 : _a.length) ? `problems-${x.index}` : ''); }}"
|
|
@@ -130,9 +142,9 @@ const row = html `
|
|
|
130
142
|
${repeat((x) => x.cells, cell)}
|
|
131
143
|
</tr>
|
|
132
144
|
${when((x) => { var _a; return !!((_a = x.problems) === null || _a === void 0 ? void 0 : _a.length); }, html `
|
|
133
|
-
<tr class="refused">
|
|
134
|
-
<td></td>
|
|
135
|
-
<td class="problems" colspan="99" id="problems-${(x) => String(x.index)}">
|
|
145
|
+
<tr role="row" class="refused">
|
|
146
|
+
<td role="cell"></td>
|
|
147
|
+
<td role="cell" class="problems" colspan="99" id="problems-${(x) => String(x.index)}">
|
|
136
148
|
${(x) => { var _a; return (_a = x.problems) === null || _a === void 0 ? void 0 : _a.join('; '); }}
|
|
137
149
|
</td>
|
|
138
150
|
</tr>
|
|
@@ -157,8 +169,13 @@ export const WriteReviewTemplate = html `
|
|
|
157
169
|
${when((x) => !!x.customCodeLine, html `
|
|
158
170
|
<p class="custom-code" id="${CUSTOM_CODE_LINE_ID}">${(x) => x.customCodeLine}</p>
|
|
159
171
|
`)}
|
|
160
|
-
|
|
172
|
+
${
|
|
173
|
+
/* The table's roles are stated, not left to the tags: the stacked layout sets display: block
|
|
174
|
+
on its parts, and a browser then drops their table semantics, so a screen reader would
|
|
175
|
+
hear a run of values with no row or column to put them in. */ ''}
|
|
176
|
+
<div class="scroller ${(x) => (x.stacked ? 'stacked' : '')}">
|
|
161
177
|
<table
|
|
178
|
+
role="table"
|
|
162
179
|
aria-label="${(x) => x.tableLabel}"
|
|
163
180
|
aria-describedby="${(x) => x.customCodeLine
|
|
164
181
|
? CUSTOM_CODE_LINE_ID
|
|
@@ -166,9 +183,9 @@ export const WriteReviewTemplate = html `
|
|
|
166
183
|
? ROW_ACTION_LINES_ID
|
|
167
184
|
: undefined}"
|
|
168
185
|
>
|
|
169
|
-
<thead>
|
|
170
|
-
<tr>
|
|
171
|
-
<th>
|
|
186
|
+
<thead role="rowgroup">
|
|
187
|
+
<tr role="row">
|
|
188
|
+
<th role="columnheader" class="select">
|
|
172
189
|
<rapid-checkbox
|
|
173
190
|
aria-label="Select all rows"
|
|
174
191
|
:checked="${(x) => x.allSelected}"
|
|
@@ -177,11 +194,11 @@ export const WriteReviewTemplate = html `
|
|
|
177
194
|
></rapid-checkbox>
|
|
178
195
|
</th>
|
|
179
196
|
${repeat((x) => { var _a, _b; return (_b = (_a = x.model) === null || _a === void 0 ? void 0 : _a.columns) !== null && _b !== void 0 ? _b : []; }, html `
|
|
180
|
-
<th>${(c) => c.label}</th>
|
|
197
|
+
<th role="columnheader">${(c) => c.label}</th>
|
|
181
198
|
`)}
|
|
182
199
|
</tr>
|
|
183
200
|
</thead>
|
|
184
|
-
<tbody>${repeat((x) => { var _a, _b; return (_b = (_a = x.model) === null || _a === void 0 ? void 0 : _a.rows) !== null && _b !== void 0 ? _b : []; }, row)}</tbody>
|
|
201
|
+
<tbody role="rowgroup">${repeat((x) => { var _a, _b; return (_b = (_a = x.model) === null || _a === void 0 ? void 0 : _a.rows) !== null && _b !== void 0 ? _b : []; }, row)}</tbody>
|
|
185
202
|
</table>
|
|
186
203
|
</div>
|
|
187
204
|
<div class="actions">
|
package/dist/esm/main/main.js
CHANGED
|
@@ -203,6 +203,7 @@ avoidTreeShaking(AiChatMarkdown, AiChatInteractionWrapper, AiHaloOverlay, AiWave
|
|
|
203
203
|
* {@link FoundationAiAssistant.finalizeCostSession} to flush early; it is idempotent.
|
|
204
204
|
*
|
|
205
205
|
* @fires chat-header-mousedown - Fired when the user presses the chat header in `popout-mode="expand"` (for drag-to-popout hosts). Bubbles and composed. detail: `ChatHeaderMouseDownDetail`
|
|
206
|
+
* @fires close-requested - Fired when the user presses the header's Close button, which shows while `closable` is set (the chat bubble sets it while the assistant is in its dialog). Bubbles and composed.
|
|
206
207
|
* @fires session-cleared - Fired after the session is wiped (the lifecycle menu's Clear). The payload is captured before teardown so the host can clean up any external state the active agent was working on. Bubbles and composed. detail: `SessionClearedDetail`
|
|
207
208
|
* @fires handoff-started - Fired when an agent's `handOff` takes effect and its target becomes active. Bubbles and composed. detail: `HandOffFrame`
|
|
208
209
|
* @fires handoff-returned - Fired when a hand-off ends and its caller is active again; `detail.outcome` says how it ended. Bubbles and composed. detail: `HandOffFrame`
|
|
@@ -324,6 +325,11 @@ let FoundationAiAssistant = FoundationAiAssistant_1 = class FoundationAiAssistan
|
|
|
324
325
|
/** Sanitized `userIcon`, or the default person mark; bound into the template. @internal */
|
|
325
326
|
this.userIconSafe = userIconSvg;
|
|
326
327
|
this.placeholder = 'Message assistant...';
|
|
328
|
+
/**
|
|
329
|
+
* Shows a Close button in the header, which fires `close-requested` and leaves the closing to
|
|
330
|
+
* whatever holds the assistant. The chat bubble sets it while the assistant is in its dialog.
|
|
331
|
+
*/
|
|
332
|
+
this.closable = false;
|
|
327
333
|
this.chatConfig = {};
|
|
328
334
|
/**
|
|
329
335
|
* Optional session persistence (GENC-1351). Off by default — set `enabled`
|
|
@@ -4918,6 +4924,10 @@ let FoundationAiAssistant = FoundationAiAssistant_1 = class FoundationAiAssistan
|
|
|
4918
4924
|
return;
|
|
4919
4925
|
agenticActivityBus.publish('agent-attention', { sessionKey, kind: 'turn-ended' });
|
|
4920
4926
|
}
|
|
4927
|
+
/** Called when the user clicks the header's Close button. */
|
|
4928
|
+
handleClose() {
|
|
4929
|
+
this.dispatchEvent(new CustomEvent(AiAssistantEvent.CloseRequested, { bubbles: true, composed: true }));
|
|
4930
|
+
}
|
|
4921
4931
|
onChatHeaderMouseDown(e) {
|
|
4922
4932
|
if (this.popoutMode === 'collapse')
|
|
4923
4933
|
return;
|
|
@@ -5060,6 +5070,9 @@ __decorate([
|
|
|
5060
5070
|
__decorate([
|
|
5061
5071
|
attr({ attribute: 'popout-mode' })
|
|
5062
5072
|
], FoundationAiAssistant.prototype, "popoutMode", void 0);
|
|
5073
|
+
__decorate([
|
|
5074
|
+
attr({ mode: 'boolean' })
|
|
5075
|
+
], FoundationAiAssistant.prototype, "closable", void 0);
|
|
5063
5076
|
__decorate([
|
|
5064
5077
|
observable
|
|
5065
5078
|
], FoundationAiAssistant.prototype, "agents", void 0);
|
|
@@ -70,9 +70,45 @@ const baseStyles = css `
|
|
|
70
70
|
margin-left: auto;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
/* Square, as wide as the control is tall, with the glyph on both centre lines. The
|
|
74
|
+
design-system control pads its sides and aligns its content to the baseline, and the icon
|
|
75
|
+
sits inline on a text line, so each button came out as wide as its glyph plus that padding
|
|
76
|
+
(the X narrower than the cog) and a little above centre, more so with a tall-ascender font.
|
|
77
|
+
An app's ::part() rules still win. */
|
|
78
|
+
.close-button,
|
|
73
79
|
.settings-button,
|
|
74
80
|
.popout-button {
|
|
75
81
|
font-size: 1.2em;
|
|
82
|
+
min-width: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.close-button::part(control),
|
|
86
|
+
.settings-button::part(control),
|
|
87
|
+
.popout-button::part(control) {
|
|
88
|
+
flex-grow: 0;
|
|
89
|
+
width: auto;
|
|
90
|
+
aspect-ratio: 1;
|
|
91
|
+
min-width: 0;
|
|
92
|
+
padding: 0;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.close-button::part(content),
|
|
98
|
+
.settings-button::part(content),
|
|
99
|
+
.popout-button::part(content) {
|
|
100
|
+
display: flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
line-height: 1;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* The glyph's own wrapper, so the icon font's baseline nudge (vertical-align: -0.125em) has no
|
|
107
|
+
line to act on. */
|
|
108
|
+
.close-button > ::part(i-icon),
|
|
109
|
+
.settings-button > ::part(i-icon),
|
|
110
|
+
.popout-button > ::part(i-icon) {
|
|
111
|
+
display: flex;
|
|
76
112
|
}
|
|
77
113
|
|
|
78
114
|
::slotted([slot='header-actions-extra']) {
|
|
@@ -327,6 +363,12 @@ const baseStyles = css `
|
|
|
327
363
|
box-shadow: 0 2px 8px color-mix(in srgb, var(--accent-fill-rest) 35%, transparent);
|
|
328
364
|
}
|
|
329
365
|
|
|
366
|
+
/* On the accent fill an accent-coloured link disappears; it takes the bubble's own colour and
|
|
367
|
+
keeps its underline. */
|
|
368
|
+
.message.user ai-chat-markdown::part(md-link) {
|
|
369
|
+
color: inherit;
|
|
370
|
+
}
|
|
371
|
+
|
|
330
372
|
.message.ai {
|
|
331
373
|
background: linear-gradient(135deg, var(--neutral-layer-3) 0%, var(--neutral-layer-4) 100%);
|
|
332
374
|
color: var(--neutral-foreground-rest);
|
|
@@ -1038,7 +1038,7 @@ ${(tc) => { var _a; return (((_a = tc.foldPath) === null || _a === void 0 ? void
|
|
|
1038
1038
|
<span class="chat-title" part="chat-title">${(x) => x.headerTitle}</span>
|
|
1039
1039
|
`)}
|
|
1040
1040
|
${
|
|
1041
|
-
/* The
|
|
1041
|
+
/* The buttons below re-publish the design-system button's inner parts (control,
|
|
1042
1042
|
content) into THIS component's part namespace via exportparts.
|
|
1043
1043
|
|
|
1044
1044
|
Without it they are unreachable by an embedding app: ::part() crosses exactly one
|
|
@@ -1056,6 +1056,16 @@ ${(tc) => { var _a; return (((_a = tc.foldPath) === null || _a === void 0 ? void
|
|
|
1056
1056
|
parts are exported, and so control does not collide across buttons. */ ''}
|
|
1057
1057
|
<div class="header-actions" part="header-actions">
|
|
1058
1058
|
<slot name="header-actions-extra"></slot>
|
|
1059
|
+
${when((x) => x.closable, html `
|
|
1060
|
+
<${buttonTag}
|
|
1061
|
+
class="close-button"
|
|
1062
|
+
part="close-button"
|
|
1063
|
+
exportparts="control: close-button-control, content: close-button-content"
|
|
1064
|
+
appearance="stealth"
|
|
1065
|
+
title="Close"
|
|
1066
|
+
@click=${(x) => x.handleClose()}
|
|
1067
|
+
><${iconTag} name="times"></${iconTag}></${buttonTag}>
|
|
1068
|
+
`)}
|
|
1059
1069
|
${when((x) => !!x.popoutMode, html `
|
|
1060
1070
|
<${buttonTag}
|
|
1061
1071
|
class="popout-button"
|
|
@@ -30,6 +30,8 @@ export const AiAssistantEvent = {
|
|
|
30
30
|
HandOffReturned: 'handoff-returned',
|
|
31
31
|
/** A hand-off ended with no hand-back. `detail`: `HandOffFrame`, with `outcome`. */
|
|
32
32
|
HandOffUnwound: 'handoff-unwound',
|
|
33
|
+
/** The header's Close button pressed, shown while `closable` is set. No `detail`. */
|
|
34
|
+
CloseRequested: 'close-requested',
|
|
33
35
|
};
|
|
34
36
|
/**
|
|
35
37
|
* Registry of all available animations with their display metadata.
|
package/dist/react.cjs
CHANGED
|
@@ -53,12 +53,14 @@ const AiWavesIndicator = React.forwardRef(function AiWavesIndicator(props, ref)
|
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
const FoundationAiAssistant = React.forwardRef(function FoundationAiAssistant(props, ref) {
|
|
56
|
-
const { onBudgetRefreshRequested, onChatHeaderMousedown, onSessionCleared, onHandoffStarted, onHandoffReturned, onHandoffUnwound, children, ...rest } = props;
|
|
56
|
+
const { onBudgetRefreshRequested, onChatHeaderMousedown, onCloseRequested, onSessionCleared, onHandoffStarted, onHandoffReturned, onHandoffUnwound, children, ...rest } = props;
|
|
57
57
|
const _innerRef = React.useRef(null);
|
|
58
58
|
const _onBudgetRefreshRequestedRef = React.useRef(onBudgetRefreshRequested);
|
|
59
59
|
_onBudgetRefreshRequestedRef.current = onBudgetRefreshRequested;
|
|
60
60
|
const _onChatHeaderMousedownRef = React.useRef(onChatHeaderMousedown);
|
|
61
61
|
_onChatHeaderMousedownRef.current = onChatHeaderMousedown;
|
|
62
|
+
const _onCloseRequestedRef = React.useRef(onCloseRequested);
|
|
63
|
+
_onCloseRequestedRef.current = onCloseRequested;
|
|
62
64
|
const _onSessionClearedRef = React.useRef(onSessionCleared);
|
|
63
65
|
_onSessionClearedRef.current = onSessionCleared;
|
|
64
66
|
const _onHandoffStartedRef = React.useRef(onHandoffStarted);
|
|
@@ -74,6 +76,8 @@ const FoundationAiAssistant = React.forwardRef(function FoundationAiAssistant(pr
|
|
|
74
76
|
el.addEventListener('budget-refresh-requested', _onBudgetRefreshRequestedFn);
|
|
75
77
|
const _onChatHeaderMousedownFn = (e) => _onChatHeaderMousedownRef.current?.(e);
|
|
76
78
|
el.addEventListener('chat-header-mousedown', _onChatHeaderMousedownFn);
|
|
79
|
+
const _onCloseRequestedFn = (e) => _onCloseRequestedRef.current?.(e);
|
|
80
|
+
el.addEventListener('close-requested', _onCloseRequestedFn);
|
|
77
81
|
const _onSessionClearedFn = (e) => _onSessionClearedRef.current?.(e);
|
|
78
82
|
el.addEventListener('session-cleared', _onSessionClearedFn);
|
|
79
83
|
const _onHandoffStartedFn = (e) => _onHandoffStartedRef.current?.(e);
|
|
@@ -85,6 +89,7 @@ const FoundationAiAssistant = React.forwardRef(function FoundationAiAssistant(pr
|
|
|
85
89
|
return () => {
|
|
86
90
|
el.removeEventListener('budget-refresh-requested', _onBudgetRefreshRequestedFn);
|
|
87
91
|
el.removeEventListener('chat-header-mousedown', _onChatHeaderMousedownFn);
|
|
92
|
+
el.removeEventListener('close-requested', _onCloseRequestedFn);
|
|
88
93
|
el.removeEventListener('session-cleared', _onSessionClearedFn);
|
|
89
94
|
el.removeEventListener('handoff-started', _onHandoffStartedFn);
|
|
90
95
|
el.removeEventListener('handoff-returned', _onHandoffReturnedFn);
|
package/dist/react.mjs
CHANGED
|
@@ -51,12 +51,14 @@ export const AiWavesIndicator = React.forwardRef(function AiWavesIndicator(props
|
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
export const FoundationAiAssistant = React.forwardRef(function FoundationAiAssistant(props, ref) {
|
|
54
|
-
const { onBudgetRefreshRequested, onChatHeaderMousedown, onSessionCleared, onHandoffStarted, onHandoffReturned, onHandoffUnwound, children, ...rest } = props;
|
|
54
|
+
const { onBudgetRefreshRequested, onChatHeaderMousedown, onCloseRequested, onSessionCleared, onHandoffStarted, onHandoffReturned, onHandoffUnwound, children, ...rest } = props;
|
|
55
55
|
const _innerRef = React.useRef(null);
|
|
56
56
|
const _onBudgetRefreshRequestedRef = React.useRef(onBudgetRefreshRequested);
|
|
57
57
|
_onBudgetRefreshRequestedRef.current = onBudgetRefreshRequested;
|
|
58
58
|
const _onChatHeaderMousedownRef = React.useRef(onChatHeaderMousedown);
|
|
59
59
|
_onChatHeaderMousedownRef.current = onChatHeaderMousedown;
|
|
60
|
+
const _onCloseRequestedRef = React.useRef(onCloseRequested);
|
|
61
|
+
_onCloseRequestedRef.current = onCloseRequested;
|
|
60
62
|
const _onSessionClearedRef = React.useRef(onSessionCleared);
|
|
61
63
|
_onSessionClearedRef.current = onSessionCleared;
|
|
62
64
|
const _onHandoffStartedRef = React.useRef(onHandoffStarted);
|
|
@@ -72,6 +74,8 @@ export const FoundationAiAssistant = React.forwardRef(function FoundationAiAssis
|
|
|
72
74
|
el.addEventListener('budget-refresh-requested', _onBudgetRefreshRequestedFn);
|
|
73
75
|
const _onChatHeaderMousedownFn = (e) => _onChatHeaderMousedownRef.current?.(e);
|
|
74
76
|
el.addEventListener('chat-header-mousedown', _onChatHeaderMousedownFn);
|
|
77
|
+
const _onCloseRequestedFn = (e) => _onCloseRequestedRef.current?.(e);
|
|
78
|
+
el.addEventListener('close-requested', _onCloseRequestedFn);
|
|
75
79
|
const _onSessionClearedFn = (e) => _onSessionClearedRef.current?.(e);
|
|
76
80
|
el.addEventListener('session-cleared', _onSessionClearedFn);
|
|
77
81
|
const _onHandoffStartedFn = (e) => _onHandoffStartedRef.current?.(e);
|
|
@@ -83,6 +87,7 @@ export const FoundationAiAssistant = React.forwardRef(function FoundationAiAssis
|
|
|
83
87
|
return () => {
|
|
84
88
|
el.removeEventListener('budget-refresh-requested', _onBudgetRefreshRequestedFn);
|
|
85
89
|
el.removeEventListener('chat-header-mousedown', _onChatHeaderMousedownFn);
|
|
90
|
+
el.removeEventListener('close-requested', _onCloseRequestedFn);
|
|
86
91
|
el.removeEventListener('session-cleared', _onSessionClearedFn);
|
|
87
92
|
el.removeEventListener('handoff-started', _onHandoffStartedFn);
|
|
88
93
|
el.removeEventListener('handoff-returned', _onHandoffReturnedFn);
|
package/docs/styling.md
CHANGED
|
@@ -391,15 +391,21 @@ foundation-ai-assistant::part(messages-content) { display: contents; }
|
|
|
391
391
|
|
|
392
392
|
### The header buttons
|
|
393
393
|
|
|
394
|
-
The header's popout and settings buttons are design-system buttons, so their
|
|
394
|
+
The header's close, popout and settings buttons are design-system buttons, so their
|
|
395
395
|
padded inner `control` sits two shadow boundaries from the app. `::part()` crosses
|
|
396
396
|
exactly one, so the assistant re-publishes them under its own namespace:
|
|
397
397
|
|
|
398
398
|
| Part | Element |
|
|
399
399
|
| --- | --- |
|
|
400
|
-
| `popout-button` / `settings-button` | The button hosts |
|
|
401
|
-
| `popout-button-control` / `settings-button-control` | The button's inner control — where padding and sizing actually live |
|
|
402
|
-
| `popout-button-content` / `settings-button-content` | The content slot wrapper inside the control |
|
|
400
|
+
| `close-button` / `popout-button` / `settings-button` | The button hosts |
|
|
401
|
+
| `close-button-control` / `popout-button-control` / `settings-button-control` | The button's inner control — where padding and sizing actually live |
|
|
402
|
+
| `close-button-content` / `popout-button-content` / `settings-button-content` | The content slot wrapper inside the control |
|
|
403
|
+
|
|
404
|
+
By default each is a square as wide as the control is tall, with its icon centred. The close
|
|
405
|
+
button shows while the `closable` attribute is set — the chat bubble sets it while the assistant
|
|
406
|
+
is in its dialog — and fires `close-requested`; it replaces the button the bubble used to inject
|
|
407
|
+
into the `header-actions-extra` slot, so a host rule aimed at that slotted button no longer
|
|
408
|
+
matches anything.
|
|
403
409
|
|
|
404
410
|
Size the control, not the host: shrinking the host and clipping the overflow
|
|
405
411
|
flattens the glyph, which is the workaround these parts exist to remove.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/ai-assistant",
|
|
3
3
|
"description": "Genesis AI Assistant micro-frontend",
|
|
4
|
-
"version": "15.86.
|
|
4
|
+
"version": "15.86.1",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/dts/index.d.ts",
|
|
@@ -92,31 +92,31 @@
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@genesislcap/foundation-comms": "15.86.
|
|
96
|
-
"@genesislcap/foundation-testing": "15.86.
|
|
97
|
-
"@genesislcap/genx": "15.86.
|
|
98
|
-
"@genesislcap/ts-builder": "15.86.
|
|
99
|
-
"@genesislcap/uvu-playwright-builder": "15.86.
|
|
100
|
-
"@genesislcap/vite-builder": "15.86.
|
|
101
|
-
"@genesislcap/webpack-builder": "15.86.
|
|
95
|
+
"@genesislcap/foundation-comms": "15.86.1",
|
|
96
|
+
"@genesislcap/foundation-testing": "15.86.1",
|
|
97
|
+
"@genesislcap/genx": "15.86.1",
|
|
98
|
+
"@genesislcap/ts-builder": "15.86.1",
|
|
99
|
+
"@genesislcap/uvu-playwright-builder": "15.86.1",
|
|
100
|
+
"@genesislcap/vite-builder": "15.86.1",
|
|
101
|
+
"@genesislcap/webpack-builder": "15.86.1",
|
|
102
102
|
"@types/dompurify": "^3.0.5",
|
|
103
103
|
"@types/marked": "^5.0.2",
|
|
104
104
|
"esbuild": "0.25.12"
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|
|
107
|
-
"@genesislcap/foundation-ai": "15.86.
|
|
108
|
-
"@genesislcap/foundation-logger": "15.86.
|
|
109
|
-
"@genesislcap/foundation-notifications": "15.86.
|
|
110
|
-
"@genesislcap/foundation-redux": "15.86.
|
|
111
|
-
"@genesislcap/foundation-ui": "15.86.
|
|
112
|
-
"@genesislcap/foundation-utils": "15.86.
|
|
113
|
-
"@genesislcap/rapid-design-system": "15.86.
|
|
114
|
-
"@genesislcap/web-core": "15.86.
|
|
107
|
+
"@genesislcap/foundation-ai": "15.86.1",
|
|
108
|
+
"@genesislcap/foundation-logger": "15.86.1",
|
|
109
|
+
"@genesislcap/foundation-notifications": "15.86.1",
|
|
110
|
+
"@genesislcap/foundation-redux": "15.86.1",
|
|
111
|
+
"@genesislcap/foundation-ui": "15.86.1",
|
|
112
|
+
"@genesislcap/foundation-utils": "15.86.1",
|
|
113
|
+
"@genesislcap/rapid-design-system": "15.86.1",
|
|
114
|
+
"@genesislcap/web-core": "15.86.1",
|
|
115
115
|
"dompurify": "^3.3.1",
|
|
116
116
|
"marked": "^17.0.3"
|
|
117
117
|
},
|
|
118
118
|
"peerDependencies": {
|
|
119
|
-
"@genesislcap/foundation-comms": "^15.86.
|
|
119
|
+
"@genesislcap/foundation-comms": "^15.86.1"
|
|
120
120
|
},
|
|
121
121
|
"peerDependenciesMeta": {
|
|
122
122
|
"@genesislcap/foundation-comms": {
|