@simai-studio/chat 0.0.0-stage → 1.0.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.md +182 -0
- package/README.md +65 -2
- package/dist/package-receipt.json +1551 -0
- package/dist/set.json +105 -0
- package/dist/smart/chat-composer/aliases.json +56 -0
- package/dist/smart/chat-composer/aliases.json.gz +0 -0
- package/dist/smart/chat-composer/component.json +658 -0
- package/dist/smart/chat-composer/component.json.gz +0 -0
- package/dist/smart/chat-composer/css/chat-composer.css +318 -0
- package/dist/smart/chat-composer/css/chat-composer.css.gz +0 -0
- package/dist/smart/chat-composer/css/chat-composer.min.css +2 -0
- package/dist/smart/chat-composer/css/chat-composer.min.css.gz +0 -0
- package/dist/smart/chat-composer/examples.json +531 -0
- package/dist/smart/chat-composer/examples.json.gz +0 -0
- package/dist/smart/chat-composer/js/chat-composer.js +1023 -0
- package/dist/smart/chat-composer/js/chat-composer.js.gz +0 -0
- package/dist/smart/chat-composer/js/chat-composer.min.js +75 -0
- package/dist/smart/chat-composer/js/chat-composer.min.js.gz +0 -0
- package/dist/smart/chat-composer/lang/en.json +31 -0
- package/dist/smart/chat-composer/lang/en.json.gz +0 -0
- package/dist/smart/chat-composer/lang/ru.json +31 -0
- package/dist/smart/chat-composer/lang/ru.json.gz +0 -0
- package/dist/smart/chat-composer/probe.json +400 -0
- package/dist/smart/chat-composer/probe.json.gz +0 -0
- package/dist/smart/chat-composer/smart.manifest.json +625 -0
- package/dist/smart/chat-composer/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-composer/static/default/busy.html +20 -0
- package/dist/smart/chat-composer/static/default/busy.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/disabled.html +20 -0
- package/dist/smart/chat-composer/static/default/disabled.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/files.html +44 -0
- package/dist/smart/chat-composer/static/default/files.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/near-limit.html +20 -0
- package/dist/smart/chat-composer/static/default/near-limit.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/reference.html +20 -0
- package/dist/smart/chat-composer/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-composer/static/sheets.json +88 -0
- package/dist/smart/chat-composer/static/sheets.json.gz +0 -0
- package/dist/smart/chat-composer/studio.fixture.json +18 -0
- package/dist/smart/chat-composer/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-composer/studio.scenario.json +37 -0
- package/dist/smart/chat-composer/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-composer/template/default.css +273 -0
- package/dist/smart/chat-composer/template/default.css.gz +0 -0
- package/dist/smart/chat-composer/template/default.js +109 -0
- package/dist/smart/chat-composer/template/default.js.gz +0 -0
- package/dist/smart/chat-composer/template/parts.js +82 -0
- package/dist/smart/chat-composer/template/parts.js.gz +0 -0
- package/dist/smart/chat-interlocutor/aliases.json +20 -0
- package/dist/smart/chat-interlocutor/aliases.json.gz +0 -0
- package/dist/smart/chat-interlocutor/component.json +435 -0
- package/dist/smart/chat-interlocutor/component.json.gz +0 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.css +107 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.css.gz +0 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.min.css +2 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.min.css.gz +0 -0
- package/dist/smart/chat-interlocutor/examples.json +379 -0
- package/dist/smart/chat-interlocutor/examples.json.gz +0 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.js +531 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.js.gz +0 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.min.js +22 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.min.js.gz +0 -0
- package/dist/smart/chat-interlocutor/lang/en.json +13 -0
- package/dist/smart/chat-interlocutor/lang/en.json.gz +0 -0
- package/dist/smart/chat-interlocutor/lang/ru.json +13 -0
- package/dist/smart/chat-interlocutor/lang/ru.json.gz +0 -0
- package/dist/smart/chat-interlocutor/probe.json +204 -0
- package/dist/smart/chat-interlocutor/probe.json.gz +0 -0
- package/dist/smart/chat-interlocutor/smart.manifest.json +406 -0
- package/dist/smart/chat-interlocutor/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/former.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/former.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/grouped.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/grouped.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/reference.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/single.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/single.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/sheets.json +105 -0
- package/dist/smart/chat-interlocutor/static/sheets.json.gz +0 -0
- package/dist/smart/chat-interlocutor/studio.fixture.json +25 -0
- package/dist/smart/chat-interlocutor/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-interlocutor/studio.scenario.json +41 -0
- package/dist/smart/chat-interlocutor/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-interlocutor/template/default.css +58 -0
- package/dist/smart/chat-interlocutor/template/default.css.gz +0 -0
- package/dist/smart/chat-interlocutor/template/default.js +43 -0
- package/dist/smart/chat-interlocutor/template/default.js.gz +0 -0
- package/dist/smart/chat-message/aliases.json +114 -0
- package/dist/smart/chat-message/aliases.json.gz +0 -0
- package/dist/smart/chat-message/component.json +822 -0
- package/dist/smart/chat-message/component.json.gz +0 -0
- package/dist/smart/chat-message/css/chat-message.css +3291 -0
- package/dist/smart/chat-message/css/chat-message.css.gz +0 -0
- package/dist/smart/chat-message/css/chat-message.min.css +2 -0
- package/dist/smart/chat-message/css/chat-message.min.css.gz +0 -0
- package/dist/smart/chat-message/examples.json +1604 -0
- package/dist/smart/chat-message/examples.json.gz +0 -0
- package/dist/smart/chat-message/js/chat-message.js +5498 -0
- package/dist/smart/chat-message/js/chat-message.js.gz +0 -0
- package/dist/smart/chat-message/js/chat-message.min.js +25 -0
- package/dist/smart/chat-message/js/chat-message.min.js.gz +0 -0
- package/dist/smart/chat-message/lang/en.json +181 -0
- package/dist/smart/chat-message/lang/en.json.gz +0 -0
- package/dist/smart/chat-message/lang/ru.json +185 -0
- package/dist/smart/chat-message/lang/ru.json.gz +0 -0
- package/dist/smart/chat-message/probe.json +1029 -0
- package/dist/smart/chat-message/probe.json.gz +0 -0
- package/dist/smart/chat-message/smart.manifest.json +814 -0
- package/dist/smart/chat-message/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-message/static/default/brief-card.html +2 -0
- package/dist/smart/chat-message/static/default/brief-card.html.gz +0 -0
- package/dist/smart/chat-message/static/default/brief-questions.html +2 -0
- package/dist/smart/chat-message/static/default/brief-questions.html.gz +0 -0
- package/dist/smart/chat-message/static/default/deliverables.html +2 -0
- package/dist/smart/chat-message/static/default/deliverables.html.gz +0 -0
- package/dist/smart/chat-message/static/default/document.html +13 -0
- package/dist/smart/chat-message/static/default/document.html.gz +0 -0
- package/dist/smart/chat-message/static/default/failed.html +2 -0
- package/dist/smart/chat-message/static/default/failed.html.gz +0 -0
- package/dist/smart/chat-message/static/default/feedback-reason.html +2 -0
- package/dist/smart/chat-message/static/default/feedback-reason.html.gz +0 -0
- package/dist/smart/chat-message/static/default/limit.html +2 -0
- package/dist/smart/chat-message/static/default/limit.html.gz +0 -0
- package/dist/smart/chat-message/static/default/proposal.html +42 -0
- package/dist/smart/chat-message/static/default/proposal.html.gz +0 -0
- package/dist/smart/chat-message/static/default/question.html +18 -0
- package/dist/smart/chat-message/static/default/question.html.gz +0 -0
- package/dist/smart/chat-message/static/default/reference.html +2 -0
- package/dist/smart/chat-message/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-message/static/default/steps.html +2 -0
- package/dist/smart/chat-message/static/default/steps.html.gz +0 -0
- package/dist/smart/chat-message/static/default/stopped.html +2 -0
- package/dist/smart/chat-message/static/default/stopped.html.gz +0 -0
- package/dist/smart/chat-message/static/default/waiting.html +2 -0
- package/dist/smart/chat-message/static/default/waiting.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person-own.html +2 -0
- package/dist/smart/chat-message/static/person/person-own.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person-reply.html +6 -0
- package/dist/smart/chat-message/static/person/person-reply.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person.html +14 -0
- package/dist/smart/chat-message/static/person/person.html.gz +0 -0
- package/dist/smart/chat-message/static/sheets.json +398 -0
- package/dist/smart/chat-message/static/sheets.json.gz +0 -0
- package/dist/smart/chat-message/studio.fixture.json +27 -0
- package/dist/smart/chat-message/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-message/studio.scenario.json +22 -0
- package/dist/smart/chat-message/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-message/template/default.css +1895 -0
- package/dist/smart/chat-message/template/default.css.gz +0 -0
- package/dist/smart/chat-message/template/default.js +27 -0
- package/dist/smart/chat-message/template/default.js.gz +0 -0
- package/dist/smart/chat-message/template/person.js +11 -0
- package/dist/smart/chat-message/template/person.js.gz +0 -0
- package/dist/smart/chat-threads/aliases.json +174 -0
- package/dist/smart/chat-threads/aliases.json.gz +0 -0
- package/dist/smart/chat-threads/component.json +1232 -0
- package/dist/smart/chat-threads/component.json.gz +0 -0
- package/dist/smart/chat-threads/css/chat-threads.css +150 -0
- package/dist/smart/chat-threads/css/chat-threads.css.gz +0 -0
- package/dist/smart/chat-threads/css/chat-threads.min.css +2 -0
- package/dist/smart/chat-threads/css/chat-threads.min.css.gz +0 -0
- package/dist/smart/chat-threads/examples.json +689 -0
- package/dist/smart/chat-threads/examples.json.gz +0 -0
- package/dist/smart/chat-threads/js/chat-threads.js +859 -0
- package/dist/smart/chat-threads/js/chat-threads.js.gz +0 -0
- package/dist/smart/chat-threads/js/chat-threads.min.js +39 -0
- package/dist/smart/chat-threads/js/chat-threads.min.js.gz +0 -0
- package/dist/smart/chat-threads/lang/en.json +18 -0
- package/dist/smart/chat-threads/lang/en.json.gz +0 -0
- package/dist/smart/chat-threads/lang/ru.json +18 -0
- package/dist/smart/chat-threads/lang/ru.json.gz +0 -0
- package/dist/smart/chat-threads/probe.json +406 -0
- package/dist/smart/chat-threads/probe.json.gz +0 -0
- package/dist/smart/chat-threads/smart.manifest.json +1152 -0
- package/dist/smart/chat-threads/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-threads/static/default/activity.html +139 -0
- package/dist/smart/chat-threads/static/default/activity.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/activity.skeleton.html +139 -0
- package/dist/smart/chat-threads/static/default/activity.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/archive.html +55 -0
- package/dist/smart/chat-threads/static/default/archive.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/archive.skeleton.html +55 -0
- package/dist/smart/chat-threads/static/default/archive.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/avatars.html +104 -0
- package/dist/smart/chat-threads/static/default/avatars.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/avatars.skeleton.html +104 -0
- package/dist/smart/chat-threads/static/default/avatars.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/empty.html +48 -0
- package/dist/smart/chat-threads/static/default/empty.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/loading.html +48 -0
- package/dist/smart/chat-threads/static/default/loading.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/people.html +95 -0
- package/dist/smart/chat-threads/static/default/people.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/people.skeleton.html +95 -0
- package/dist/smart/chat-threads/static/default/people.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/reference.html +114 -0
- package/dist/smart/chat-threads/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/reference.skeleton.html +114 -0
- package/dist/smart/chat-threads/static/default/reference.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/ungrouped.html +94 -0
- package/dist/smart/chat-threads/static/default/ungrouped.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html +94 -0
- package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/sheets.json +422 -0
- package/dist/smart/chat-threads/static/sheets.json.gz +0 -0
- package/dist/smart/chat-threads/studio.fixture.json +23 -0
- package/dist/smart/chat-threads/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-threads/template/default.css +113 -0
- package/dist/smart/chat-threads/template/default.css.gz +0 -0
- package/dist/smart/chat-threads/template/default.js +62 -0
- package/dist/smart/chat-threads/template/default.js.gz +0 -0
- package/dist/smart/chat-window/aliases.json +395 -0
- package/dist/smart/chat-window/aliases.json.gz +0 -0
- package/dist/smart/chat-window/component.json +2809 -0
- package/dist/smart/chat-window/component.json.gz +0 -0
- package/dist/smart/chat-window/css/chat-window.css +1717 -0
- package/dist/smart/chat-window/css/chat-window.css.gz +0 -0
- package/dist/smart/chat-window/css/chat-window.min.css +2 -0
- package/dist/smart/chat-window/css/chat-window.min.css.gz +0 -0
- package/dist/smart/chat-window/examples.json +2798 -0
- package/dist/smart/chat-window/examples.json.gz +0 -0
- package/dist/smart/chat-window/js/chat-window.js +12382 -0
- package/dist/smart/chat-window/js/chat-window.js.gz +0 -0
- package/dist/smart/chat-window/js/chat-window.min.js +1 -0
- package/dist/smart/chat-window/js/chat-window.min.js.gz +0 -0
- package/dist/smart/chat-window/lang/en.json +212 -0
- package/dist/smart/chat-window/lang/en.json.gz +0 -0
- package/dist/smart/chat-window/lang/ru.json +218 -0
- package/dist/smart/chat-window/lang/ru.json.gz +0 -0
- package/dist/smart/chat-window/probe.json +2023 -0
- package/dist/smart/chat-window/probe.json.gz +0 -0
- package/dist/smart/chat-window/smart.manifest.json +2835 -0
- package/dist/smart/chat-window/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-window/static/default/archived.html +97 -0
- package/dist/smart/chat-window/static/default/archived.html.gz +0 -0
- package/dist/smart/chat-window/static/default/embedded.html +119 -0
- package/dist/smart/chat-window/static/default/embedded.html.gz +0 -0
- package/dist/smart/chat-window/static/default/greeting.html +119 -0
- package/dist/smart/chat-window/static/default/greeting.html.gz +0 -0
- package/dist/smart/chat-window/static/default/people.html +110 -0
- package/dist/smart/chat-window/static/default/people.html.gz +0 -0
- package/dist/smart/chat-window/static/default/proposal.html +157 -0
- package/dist/smart/chat-window/static/default/proposal.html.gz +0 -0
- package/dist/smart/chat-window/static/default/reference.html +117 -0
- package/dist/smart/chat-window/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-window/static/default/waiting.html +117 -0
- package/dist/smart/chat-window/static/default/waiting.html.gz +0 -0
- package/dist/smart/chat-window/static/sheets.json +476 -0
- package/dist/smart/chat-window/static/sheets.json.gz +0 -0
- package/dist/smart/chat-window/studio.fixture.json +13 -0
- package/dist/smart/chat-window/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-window/studio.scenario.json +95 -0
- package/dist/smart/chat-window/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-window/template/default.css +1168 -0
- package/dist/smart/chat-window/template/default.css.gz +0 -0
- package/dist/smart/chat-window/template/default.js +12 -0
- package/dist/smart/chat-window/template/default.js.gz +0 -0
- package/dist/smart/rule.js +185 -0
- package/dist/smart/rule.js.gz +0 -0
- package/package.json +29 -4
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {html, nothing} from "lit";
|
|
2
|
+
|
|
3
|
+
// The two small pieces the composer draws more than once, as Lit templates:
|
|
4
|
+
// the Framework's icon button and a file chip. In simai/ui-chat they were the
|
|
5
|
+
// base Component's iconButton and renderAttachment (component/chat/js/render.js),
|
|
6
|
+
// plain DOM shared with the site widget; here they are the chat family's
|
|
7
|
+
// markup with the same classes, so a page styled for one reads the same.
|
|
8
|
+
|
|
9
|
+
// The icon step that sits in a button of each step: 16 in 32, 20 in 40.
|
|
10
|
+
const ICON_IN_BUTTON = {"1/3": "1", "1/2": "1", "1": "2", "2": "2", "3": "3"};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* A Framework icon button: one native button, a decorative Smart sf-icon, a
|
|
14
|
+
* required name. The variant classes are the Framework's (appearance, scheme).
|
|
15
|
+
*/
|
|
16
|
+
export function iconButton({
|
|
17
|
+
icon,
|
|
18
|
+
label,
|
|
19
|
+
appearance = "link",
|
|
20
|
+
scheme = "on-surface",
|
|
21
|
+
size = "1/2",
|
|
22
|
+
className = "",
|
|
23
|
+
type = "button",
|
|
24
|
+
disabled = false,
|
|
25
|
+
hidden = false,
|
|
26
|
+
onClick = null,
|
|
27
|
+
}) {
|
|
28
|
+
return html`<button
|
|
29
|
+
type=${type}
|
|
30
|
+
class="sf-icon-button sf-icon-button--size-${size} sf-icon-button--icon sf-icon-button--${appearance} sf-icon-button--${scheme} flex items-cross-center content-main-center ${className}"
|
|
31
|
+
aria-label=${label}
|
|
32
|
+
title=${label}
|
|
33
|
+
?disabled=${disabled}
|
|
34
|
+
?hidden=${hidden}
|
|
35
|
+
@click=${onClick ?? nothing}
|
|
36
|
+
><sf-icon icon=${icon} size=${ICON_IN_BUTTON[size] || "1"} aria-hidden="true"></sf-icon></button>`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Where a chip stands: refused, still uploading, or ready. */
|
|
40
|
+
export function attachmentState(file) {
|
|
41
|
+
if (file.error) return "error";
|
|
42
|
+
const progress = file.progress;
|
|
43
|
+
return progress !== undefined && progress !== null && progress < 1 ? "uploading" : "ready";
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* A file chip: name, size, upload progress, the server's refusal, remove.
|
|
48
|
+
* The refusal's text is the chip's second line; the chip keeps one height.
|
|
49
|
+
*
|
|
50
|
+
* words: {file(name, size), uploading(percent), remove(name), size(bytes)}
|
|
51
|
+
* @param {{id?: string, name: string, bytes: number, progress?: number|null, error?: string|null}} file
|
|
52
|
+
*/
|
|
53
|
+
export function renderAttachment(file, {words, removable = false, onRemove = null} = {}) {
|
|
54
|
+
const state = attachmentState(file);
|
|
55
|
+
const name = String(file.name ?? "");
|
|
56
|
+
const size = words.size(file.bytes);
|
|
57
|
+
const percent = Math.round((file.progress || 0) * 100);
|
|
58
|
+
const meta = state === "uploading" ? words.uploading(percent) : (file.error || size);
|
|
59
|
+
return html`<div class="sf-chat-attachment sf-chat-attachment--${state}" role="group" aria-label=${words.file(name, size)}>
|
|
60
|
+
<span class="sf-chat-attachment__icon" aria-hidden="true"><sf-icon icon=${state === "error" ? "error" : "description"} size="2" aria-hidden="true"></sf-icon></span>
|
|
61
|
+
<span class="sf-chat-attachment__body">
|
|
62
|
+
<span class="sf-chat-attachment__name" title=${name}>${name}</span>
|
|
63
|
+
<span class="sf-chat-attachment__meta" title=${file.error || nothing} role=${file.error ? "alert" : nothing}>${meta}</span>
|
|
64
|
+
</span>
|
|
65
|
+
${state === "uploading" ? html`<span
|
|
66
|
+
class="sf-chat-attachment__progress"
|
|
67
|
+
role="progressbar"
|
|
68
|
+
aria-valuemin="0"
|
|
69
|
+
aria-valuemax="100"
|
|
70
|
+
aria-valuenow=${String(percent)}
|
|
71
|
+
aria-label=${name}
|
|
72
|
+
style="--sf-chat-attachment--progress: ${file.progress || 0}"
|
|
73
|
+
></span>` : nothing}
|
|
74
|
+
${removable ? iconButton({
|
|
75
|
+
icon: "close",
|
|
76
|
+
label: words.remove(name),
|
|
77
|
+
size: "1/2",
|
|
78
|
+
className: "sf-chat-attachment__remove",
|
|
79
|
+
onClick: () => onRemove?.(file),
|
|
80
|
+
}) : nothing}
|
|
81
|
+
</div>`;
|
|
82
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Dated aliases of sf-chat-interlocutor for the shim (core/js/aliases.js, standard §16 item 20). The 0.3 event of simai/ui-chat follows the vocabulary's select with the same detail.",
|
|
3
|
+
"component": "sf-chat-interlocutor",
|
|
4
|
+
"since": "2026-10-28",
|
|
5
|
+
"remove_after": "2026-12-01",
|
|
6
|
+
"aliases": [
|
|
7
|
+
{
|
|
8
|
+
"from": "sf-chat-interlocutor",
|
|
9
|
+
"to": "sf-chat-interlocutor-select",
|
|
10
|
+
"kind": "event",
|
|
11
|
+
"component": "sf-chat-interlocutor",
|
|
12
|
+
"since": "2026-10-28",
|
|
13
|
+
"remove_after": "2026-12-01",
|
|
14
|
+
"mode": "same-detail",
|
|
15
|
+
"cancelable": true,
|
|
16
|
+
"section": "§8, vocabulary §5 select, §7",
|
|
17
|
+
"note": "an event takes its tag and a verb; {id} is unchanged"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "The source of sf-chat-interlocutor's element plumbing (core/js/element-manifest.js); standard simai.smart-component 1.3.9, vocabulary 1.1.5. Moved from simai/ui-chat components/src/smart/chat-interlocutor (smart.manifest.json 0.3.1, ui-chat 10d376b) by the D31 move, step 3 (owner yes 2026-10-27); written by hand on the shape of sf-change-confirm and sf-thread-list, since migration/convert-1.3.8.mjs takes only the pinned 66 and needs stand 17's output. x-decisions says how each point was decided.",
|
|
3
|
+
"id": "smart.chat-interlocutor",
|
|
4
|
+
"tag": "sf-chat-interlocutor",
|
|
5
|
+
"version": "1.0.8",
|
|
6
|
+
"kind": "leaf",
|
|
7
|
+
"family": "chat",
|
|
8
|
+
"settings": {
|
|
9
|
+
"options": {
|
|
10
|
+
"type": "list",
|
|
11
|
+
"default": [],
|
|
12
|
+
"of": {
|
|
13
|
+
"id": "id",
|
|
14
|
+
"title": "string",
|
|
15
|
+
"kind": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"optional": true
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"entries": {
|
|
21
|
+
"key": "id",
|
|
22
|
+
"changes": "content"
|
|
23
|
+
},
|
|
24
|
+
"x-markup": "a property (a host has objects), or the JSON island a server prints; kind knowledge goes under its own heading after the person's own; title is text, never markup. setOptions(list), the 0.3 call, is the action set-options",
|
|
25
|
+
"summary": "The interlocutors (bootstrap.interlocutors), a property or the JSON island; from eight the menu gets a search."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"values": {
|
|
29
|
+
"value": {
|
|
30
|
+
"type": "id",
|
|
31
|
+
"default": "",
|
|
32
|
+
"controlled": true,
|
|
33
|
+
"summary": "the current interlocutor; a choice asks for another with select {id} and the host writes it back when its new conversation is there"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"events": {
|
|
37
|
+
"select": {
|
|
38
|
+
"carries": {
|
|
39
|
+
"id": "id"
|
|
40
|
+
},
|
|
41
|
+
"cancelable": true,
|
|
42
|
+
"x-summary": "Another interlocutor was chosen (vocabulary §5 select, one id as sf-menu-context's select carries). A conversation belongs to one interlocutor, so the host starts a new one and writes value back; the element never changes value itself.",
|
|
43
|
+
"summary": "Another interlocutor was chosen (vocabulary select). The 0.3 name sf-chat-interlocutor follows it until 2026-12-01."
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"actions": {
|
|
47
|
+
"set-options": {
|
|
48
|
+
"with": {
|
|
49
|
+
"options": {
|
|
50
|
+
"type": "list",
|
|
51
|
+
"schema": {
|
|
52
|
+
"items": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"properties": {
|
|
55
|
+
"id": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"description": "The interlocutor's id."
|
|
58
|
+
},
|
|
59
|
+
"title": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"description": "Its name, drawn as text."
|
|
62
|
+
},
|
|
63
|
+
"kind": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "knowledge: a knowledge base's assistant, under its own heading."
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"required": [
|
|
69
|
+
"id",
|
|
70
|
+
"title"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"x-outcomes": [
|
|
77
|
+
"applied"
|
|
78
|
+
],
|
|
79
|
+
"x-summary": "the interlocutors the server lists (bootstrap.interlocutors), as the setting options; the 0.3 setOptions(list)",
|
|
80
|
+
"summary": "The interlocutors, as the options property (the action set-options); kind knowledge goes under its own heading, from eight the menu gets a search.",
|
|
81
|
+
"x-returns": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"description": "{outcome: applied}"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"open": {
|
|
87
|
+
"x-outcomes": [
|
|
88
|
+
"applied",
|
|
89
|
+
"refused"
|
|
90
|
+
],
|
|
91
|
+
"x-summary": "opens the choice (the button's press); refused single with fewer than two interlocutors, where there is nothing to choose",
|
|
92
|
+
"summary": "Open the menu, as a press does; refused single with fewer than two interlocutors.",
|
|
93
|
+
"x-returns": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"description": "{outcome: applied} or {outcome: refused, reason}"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"slots": {},
|
|
100
|
+
"keyboard": {
|
|
101
|
+
"host": {
|
|
102
|
+
"Tab": "reach",
|
|
103
|
+
"Enter": "open",
|
|
104
|
+
"Space": "open"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"relations": [
|
|
108
|
+
{
|
|
109
|
+
"name": "cl-icon"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "cl-menu-context",
|
|
113
|
+
"lazy": true
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "sr-only/default"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"templates": {
|
|
120
|
+
"default": {
|
|
121
|
+
"file": "js/templates/default.js",
|
|
122
|
+
"$comment": "The Lit template in JavaScript, the migration form of §5.2 (§16)."
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"styles": "js/templates/default.css",
|
|
126
|
+
"examples": "examples.json",
|
|
127
|
+
"docs": "docs.md",
|
|
128
|
+
"lang": "lang/",
|
|
129
|
+
"accessibility": {
|
|
130
|
+
"role": "button",
|
|
131
|
+
"name": {
|
|
132
|
+
"from": [
|
|
133
|
+
"runtime.button-label",
|
|
134
|
+
"runtime.assistant-text"
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
"keys": {
|
|
138
|
+
"Tab": "reach",
|
|
139
|
+
"Enter": "open",
|
|
140
|
+
"Space": "open"
|
|
141
|
+
},
|
|
142
|
+
"x-keys": "Enter and Space press the native button, which opens sf-menu-context; inside it the menu's own keys (arrows, Home, End, letters, Escape); with one interlocutor the button is disabled and no key does anything"
|
|
143
|
+
},
|
|
144
|
+
"host-states": {},
|
|
145
|
+
"css-variables": {
|
|
146
|
+
"--sf-chat-interlocutor-color": {
|
|
147
|
+
"type": "color",
|
|
148
|
+
"state": "default"
|
|
149
|
+
},
|
|
150
|
+
"--sf-chat-interlocutor-icon-color": {
|
|
151
|
+
"type": "color",
|
|
152
|
+
"state": "default"
|
|
153
|
+
},
|
|
154
|
+
"--sf-chat-interlocutor-hover-background-color": {
|
|
155
|
+
"type": "color",
|
|
156
|
+
"state": "hover"
|
|
157
|
+
},
|
|
158
|
+
"--sf-chat-interlocutor-radius": {
|
|
159
|
+
"type": "length",
|
|
160
|
+
"state": "default"
|
|
161
|
+
},
|
|
162
|
+
"--sf-chat-interlocutor-height": {
|
|
163
|
+
"type": "length",
|
|
164
|
+
"state": "default"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"aliases": {
|
|
168
|
+
"$comment": "Dated aliases of sf-chat-interlocutor for the shim (core/js/aliases.js, standard §16 item 20). The 0.3 event of simai/ui-chat follows the vocabulary's select with the same detail.",
|
|
169
|
+
"since": "2026-10-28",
|
|
170
|
+
"remove-after": "2026-12-01",
|
|
171
|
+
"rows": [
|
|
172
|
+
{
|
|
173
|
+
"from": "sf-chat-interlocutor",
|
|
174
|
+
"to": "sf-chat-interlocutor-select",
|
|
175
|
+
"kind": "event",
|
|
176
|
+
"mode": "same-detail",
|
|
177
|
+
"cancelable": true,
|
|
178
|
+
"section": "§8, vocabulary §5 select, §7",
|
|
179
|
+
"note": "an event takes its tag and a verb; {id} is unchanged"
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
"x-summary": "Who the conversation is with: the server's interlocutors in the Framework's context menu, the current one checked, and a choice of another reported for the host to start a new conversation with. One interlocutor is a name, not a choice.",
|
|
184
|
+
"x-source": {
|
|
185
|
+
"package": "ui-pro",
|
|
186
|
+
"folder": "chat-interlocutor",
|
|
187
|
+
"manifest": "simai/ui-chat@10d376b components/src/smart/chat-interlocutor/smart.manifest.json (0.3.1)",
|
|
188
|
+
"converted": "by hand (D31 step 3): convert-1.3.8.mjs reads stand 17's output, which has no chat component"
|
|
189
|
+
},
|
|
190
|
+
"x-words": [],
|
|
191
|
+
"x-renamed": [
|
|
192
|
+
"events.sf-chat-interlocutor → select {id} (vocabulary §5 select; an event takes its tag and a verb, §7); the old name a dated same-detail alias until 2026-12-01",
|
|
193
|
+
"methods.setOptions(list) → the setting options and the action set-options {options} (§4.4); setOptions(list) is the same call, so nothing is noted",
|
|
194
|
+
"words: interlocutor.* and assistant of ui-chat's strings.js → lang/<locale>.json runtime words (§11): assistant-text, button-label, menu-label, change-text, search-placeholder, search-empty-text, group-own-text, group-knowledge-text",
|
|
195
|
+
"css: --sf-chat--ink, --sf-chat--ink-muted and --sf-chat--touch of ui-chat's chat.css → the Framework tokens they were, under five public variables --sf-chat-interlocutor-<name>; .sf-chat-offscreen → the Framework's sr-only"
|
|
196
|
+
],
|
|
197
|
+
"x-decisions": [
|
|
198
|
+
"version: 0.3.1 in simai/ui-chat → 1.0.0 here: the first release in ui-pro, a new tag in the open sf- set (§21.4), with the event renamed under a dated alias (simai.linkage 1.0.0: the files changed).",
|
|
199
|
+
"shape: a leaf, a thin element over the Framework's sf-context-menu (D31 inventory §3: interlocutor and sf-thread-list rows do not overlap). It places one native button, an sf-icon and the menu as its own markup; no part is in a role a rule could bind.",
|
|
200
|
+
"events: the 0.3 sf-chat-interlocutor {id} is the vocabulary's select (§5): the person chose; the host decides what it means (a new conversation). It carries {id}, one id as sf-context-menu's own select does, not {ids}: a conversation has one interlocutor. Cancelable as it was. The old name follows as a same-detail alias until 2026-12-01; a page that cancels either keeps nothing to undo, the element changed nothing.",
|
|
201
|
+
"value: a controlled value (as sf-thread-list's selected): the element shows it and never writes it; the host writes it back once its conversation is with the new interlocutor.",
|
|
202
|
+
"options and set-options: the list is the setting options (a property, or the JSON island of §5.4); the 0.3 method setOptions(list) is the action set-options {options}, which the generated method takes in declared order, so the 0.3 call is the same call.",
|
|
203
|
+
"single: fewer than two interlocutors is a name, not a choice: the button is disabled, without aria-haspopup, aria-expanded and the description, the chevron hidden (class sf-chat-interlocutor--single), and open answers refused single.",
|
|
204
|
+
"former interlocutor: a value the options no longer list (Mirai24 v1.1: the administrator's assistant gone into the personal one, its old threads kept) is named by the word assistant-text («Помощник»), never by an empty line; an empty value with no options is an empty name.",
|
|
205
|
+
"menu: radio rows, the current one checked; the person's own interlocutors first, then kind knowledge under group headings when both are there; from eight the menu has its search (SEARCH_FROM, as in 0.3); a closing heading says a change starts a new conversation.",
|
|
206
|
+
"a11y-name: the button reads «Помощник: <title>» (button-label) when the current interlocutor is listed, else its title alone; its description (sr-only, id from the instance path §7.1.1, no longer a module counter) says a change starts a new conversation, before the menu opens (ui-chat Q-08); aria-expanded is false from the start (Q-09) and the menu keeps it after.",
|
|
207
|
+
"first paint (§5.4): no late data. The options come with the host's bootstrap, together with value; the printed markup is the closed button (a closed menu is printed closed: the trigger). A host that loads its interlocutors later holds its own skeleton (sf-chat-window). The element reads no clock, so its snapshots do not depend on the fixed clock of the first-paint tools (ui-source 4d711d2), which the pinned 170d551 does not have yet.",
|
|
208
|
+
"words: lang/ru.json and lang/en.json, runtime only; ru is the source language (the 0.3 words were written in Russian first).",
|
|
209
|
+
"css-variables: five public variables in the Framework's form (single dash, read with the token as fallback, never set): the text, the chevron, the hover ground, the corner and the height (a finger's on a coarse pointer). Their fallbacks are the tokens ui-chat's chat.css gave the same places, so the look in ui-chat does not change.",
|
|
210
|
+
"self-contained: nothing from simai/ui-chat is imported; the chat-core base (ChatElement, staffContext) is replaced by the Framework's Smart base through elementFromManifest and the element's own words.",
|
|
211
|
+
"standard 1.4 (2026-10-29): component.json and examples.json in the 1.4 form, the other files generated by ui-source scripts/generate-component-files.mjs.",
|
|
212
|
+
"version 1.0.4: the Framework elements it draws, finds and listens to are named by their new tags (Smart component naming of 2026-11-02, sf-[set]-<block>): the choice opens in sf-menu-context. The rule relations and the registry ids follow (cl-<new>, smart.<new>; the package reference pro.package.json of the pair). The former tags stay dated aliases of the Framework until 2027-01-01; public CSS variables and classes keep their names. No visible change. Needs the SIMAI Framework pair with the tag renames (core.runtime 1.21.0).",
|
|
213
|
+
"version 1.0.5: its guidance names the conversation list sf-chat-threads (rename plan R2).",
|
|
214
|
+
"version 1.0.6 (2026-11-09): a patch (first paint only). The snapshots are retaken over SIMAI Framework ui-d6f01121baca: static/sheets.json lists the sheets the pair now asks for (component/kbd, a relation of the buttons since sf-kbd 1.1.0). Code, settings, values and events are unchanged.",
|
|
215
|
+
"version 1.0.7 (2026-11-09): a patch (no visible change). SIMAI Framework ui-cb287da78ab1 (core.runtime 1.45.0, standard §4.4) writes an action's method in the reference as one args object whose schema is the action's `with` fields, not the fields one by one (ui-source 9d2eeb8e, generate-component-files.mjs argumentsOf); smart.manifest.json is regenerated and changes only in methods.*.arguments. setOptions is the runtime's generated method and takes both forms. Settings, values and events are unchanged. The same version first-paint snapshots are retaken over that pair; static/sheets.json is unchanged.",
|
|
216
|
+
"version 1.0.8 (2026-11-10): a patch (first paint only). The first-paint snapshots are retaken over SIMAI Framework ui-2bd5a3ab478a: the pair's sf-menu-context prints its panel without the flex utility class (class=\"sf-context-menu\"); static/sheets.json is unchanged (no sheet drift). Code, settings, values and events are unchanged."
|
|
217
|
+
],
|
|
218
|
+
"x-rule": {
|
|
219
|
+
"$comment": [
|
|
220
|
+
"The chevron is a Smart sf-icon; a tag it renders is a tag it fetches. The",
|
|
221
|
+
"choice opens in sf-menu-context on a press, so the menu is fetched after the",
|
|
222
|
+
"page is ready, and the element waits for it before opening it. The sentence",
|
|
223
|
+
"that describes the button is visually hidden with the sr-only utility, which",
|
|
224
|
+
"a class scan can miss on a node drawn later, so it comes with the component."
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
"x-registry": {
|
|
228
|
+
"capabilities": [
|
|
229
|
+
"interaction",
|
|
230
|
+
"keyboard",
|
|
231
|
+
"search",
|
|
232
|
+
"responsive"
|
|
233
|
+
],
|
|
234
|
+
"persistence": {
|
|
235
|
+
"mode": "none",
|
|
236
|
+
"source_of_truth": "host",
|
|
237
|
+
"network_owner": "host",
|
|
238
|
+
"revision_field": null
|
|
239
|
+
},
|
|
240
|
+
"readiness": {
|
|
241
|
+
"level": "host-required",
|
|
242
|
+
"required_checks": [
|
|
243
|
+
"manifest",
|
|
244
|
+
"loader-rule",
|
|
245
|
+
"chat-interlocutor-probe"
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
"tags": [
|
|
249
|
+
"chat",
|
|
250
|
+
"interlocutor",
|
|
251
|
+
"picker",
|
|
252
|
+
"menu"
|
|
253
|
+
],
|
|
254
|
+
"contracts": {
|
|
255
|
+
"option": {
|
|
256
|
+
"type": "object",
|
|
257
|
+
"properties": {
|
|
258
|
+
"id": {
|
|
259
|
+
"type": "string",
|
|
260
|
+
"description": "The interlocutor's id."
|
|
261
|
+
},
|
|
262
|
+
"title": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"description": "Its name, drawn as text."
|
|
265
|
+
},
|
|
266
|
+
"kind": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"description": "knowledge: a knowledge base's assistant, under its own heading."
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"required": [
|
|
272
|
+
"id",
|
|
273
|
+
"title"
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
"choice": {
|
|
277
|
+
"const": "A choice of another interlocutor dispatches sf-chat-interlocutor-select {id} (cancelable). The element never changes value: the host starts the new conversation and writes value back. Fewer than two interlocutors are a name: the button is disabled and open answers refused single."
|
|
278
|
+
},
|
|
279
|
+
"css_variables": {
|
|
280
|
+
"type": "object",
|
|
281
|
+
"properties": {
|
|
282
|
+
"--sf-chat-interlocutor-color": {
|
|
283
|
+
"type": "string"
|
|
284
|
+
},
|
|
285
|
+
"--sf-chat-interlocutor-icon-color": {
|
|
286
|
+
"type": "string"
|
|
287
|
+
},
|
|
288
|
+
"--sf-chat-interlocutor-hover-background-color": {
|
|
289
|
+
"type": "string"
|
|
290
|
+
},
|
|
291
|
+
"--sf-chat-interlocutor-radius": {
|
|
292
|
+
"type": "string"
|
|
293
|
+
},
|
|
294
|
+
"--sf-chat-interlocutor-height": {
|
|
295
|
+
"type": "string"
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"state": {
|
|
301
|
+
"machines": {
|
|
302
|
+
"menu": [
|
|
303
|
+
"closed",
|
|
304
|
+
"open"
|
|
305
|
+
],
|
|
306
|
+
"options": [
|
|
307
|
+
"single",
|
|
308
|
+
"several"
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
"visual_states": [
|
|
312
|
+
"default",
|
|
313
|
+
"disabled",
|
|
314
|
+
"open",
|
|
315
|
+
"closed"
|
|
316
|
+
]
|
|
317
|
+
},
|
|
318
|
+
"ownership": {
|
|
319
|
+
"source": "simai/ui-pro",
|
|
320
|
+
"data": "host",
|
|
321
|
+
"effects": "host",
|
|
322
|
+
"forbidden_client_responsibilities": [
|
|
323
|
+
"fetching or polling the chat API",
|
|
324
|
+
"starting a conversation",
|
|
325
|
+
"access decisions"
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
"security": {
|
|
329
|
+
"permissions_owner": "host",
|
|
330
|
+
"untrusted_inputs": [
|
|
331
|
+
"interlocutor titles (drawn as text)"
|
|
332
|
+
],
|
|
333
|
+
"network_policy": "deny"
|
|
334
|
+
},
|
|
335
|
+
"presentation": {
|
|
336
|
+
"themes": [
|
|
337
|
+
"light",
|
|
338
|
+
"dark"
|
|
339
|
+
],
|
|
340
|
+
"locales": [
|
|
341
|
+
"en",
|
|
342
|
+
"ru"
|
|
343
|
+
],
|
|
344
|
+
"responsive": [
|
|
345
|
+
"desktop",
|
|
346
|
+
"mobile"
|
|
347
|
+
]
|
|
348
|
+
},
|
|
349
|
+
"ai_guidance": {
|
|
350
|
+
"use_when": "Use sf-chat-interlocutor in a chat window's header to name whom the conversation is with and, when the server lists several, to let the person choose another one, which the host turns into a new conversation.",
|
|
351
|
+
"do_not": [
|
|
352
|
+
"Do not change the interlocutor of an existing conversation; start a new one and write value back",
|
|
353
|
+
"Do not use it to pick a conversation: that is sf-chat-threads",
|
|
354
|
+
"Do not pass markup in titles; they are text"
|
|
355
|
+
],
|
|
356
|
+
"required_reads": [
|
|
357
|
+
"inputs",
|
|
358
|
+
"contracts",
|
|
359
|
+
"events",
|
|
360
|
+
"accessibility"
|
|
361
|
+
],
|
|
362
|
+
"minimal_example": "<sf-chat-interlocutor value=\"personal\"></sf-chat-interlocutor>",
|
|
363
|
+
"owner_commands": [
|
|
364
|
+
"node scripts/test.mjs",
|
|
365
|
+
"node scripts/run-manifest-probes.mjs <free output> <package output> chat-interlocutor"
|
|
366
|
+
]
|
|
367
|
+
},
|
|
368
|
+
"accessibility": {
|
|
369
|
+
"accessible_name": "internal",
|
|
370
|
+
"focus": "A native button with aria-haspopup=menu and aria-expanded=false from the start, named «Помощник: <title>» and described (sr-only) by what a change does before the menu opens. The menu is the Framework's sf-menu-context with radio rows, the current one checked, and its own keys. Disabled, without aria-haspopup, aria-expanded or a description, with a single interlocutor."
|
|
371
|
+
},
|
|
372
|
+
"compatibility": {
|
|
373
|
+
"migrations": [
|
|
374
|
+
{
|
|
375
|
+
"from": "0.3.1",
|
|
376
|
+
"to": "1.0.0",
|
|
377
|
+
"changes": [
|
|
378
|
+
"moved from simai/ui-chat to ui-pro (D31): standard simai.smart-component 1.3.9, the element is made from component.json; words in lang/; dated aliases in aliases.json",
|
|
379
|
+
"sf-chat-interlocutor -> sf-chat-interlocutor-select until 2026-12-01 (event)",
|
|
380
|
+
"setOptions(list) is the action set-options and the setting options"
|
|
381
|
+
]
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"from": "1.0.0",
|
|
385
|
+
"to": "1.0.1",
|
|
386
|
+
"changes": [
|
|
387
|
+
"The first-paint snapshot's sheets.json lists the utility sheets its markup uses (retaken on ui-source 5ba9399); no behaviour changed. Nothing to change for a host."
|
|
388
|
+
]
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"from": "1.0.3",
|
|
392
|
+
"to": "1.0.4",
|
|
393
|
+
"changes": [
|
|
394
|
+
"Draws and finds the renamed Framework elements by their new tags (the choice opens in sf-menu-context); the rule relations name cl-<new>. Needs the SIMAI Framework pair with the tag renames (core.runtime 1.21.0). No visible change. Nothing to change for a host on that pair; a host that writes the former tags keeps working until 2027-01-01."
|
|
395
|
+
]
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"from": "1.0.4",
|
|
399
|
+
"to": "1.0.5",
|
|
400
|
+
"changes": [
|
|
401
|
+
"Its guidance names the conversation list by its new tag, sf-chat-threads (was sf-thread-list). No change in behaviour."
|
|
402
|
+
]
|
|
403
|
+
}
|
|
404
|
+
]
|
|
405
|
+
},
|
|
406
|
+
"inputs": {
|
|
407
|
+
"template": {
|
|
408
|
+
"const": "default"
|
|
409
|
+
},
|
|
410
|
+
"options": {
|
|
411
|
+
"items": {
|
|
412
|
+
"type": "object",
|
|
413
|
+
"properties": {
|
|
414
|
+
"id": {
|
|
415
|
+
"type": "string",
|
|
416
|
+
"description": "The interlocutor's id."
|
|
417
|
+
},
|
|
418
|
+
"title": {
|
|
419
|
+
"type": "string",
|
|
420
|
+
"description": "Its name, drawn as text."
|
|
421
|
+
},
|
|
422
|
+
"kind": {
|
|
423
|
+
"type": "string",
|
|
424
|
+
"description": "knowledge: a knowledge base's assistant, under its own heading."
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
"required": [
|
|
428
|
+
"id",
|
|
429
|
+
"title"
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
@layer sf.reset, sf.tokens, sf.base, sf.utilities, sf.components, sf.overrides, sf.states;
|
|
2
|
+
@layer sf.components {
|
|
3
|
+
/* sf-chat-interlocutor. The host is display: contents; .sf-chat-interlocutor
|
|
4
|
+
is what a header places. Every value is a Framework token. The public
|
|
5
|
+
variables (component.json css-variables) are read here and never set, on
|
|
6
|
+
the element or any ancestor (public-variables.v1 rule):
|
|
7
|
+
--sf-chat-interlocutor-color the name's text
|
|
8
|
+
--sf-chat-interlocutor-icon-color the chevron
|
|
9
|
+
--sf-chat-interlocutor-hover-background-color the button's ground under a pointer
|
|
10
|
+
--sf-chat-interlocutor-radius the button's corner
|
|
11
|
+
--sf-chat-interlocutor-height the button's least height
|
|
12
|
+
Their fallbacks are the tokens simai/ui-chat's chat.css gave the same
|
|
13
|
+
places (--sf-chat--ink, --sf-chat--ink-muted, --sf-chat--touch), so the
|
|
14
|
+
header reads as it did there. */
|
|
15
|
+
.sf-chat-interlocutor {
|
|
16
|
+
--sf-chat-interlocutor--color: var(--sf-chat-interlocutor-color, var(--sf-on-surface));
|
|
17
|
+
--sf-chat-interlocutor--icon-color: var(--sf-chat-interlocutor-icon-color, var(--sf-on-surface-variant));
|
|
18
|
+
--sf-chat-interlocutor--hover: var(--sf-chat-interlocutor-hover-background-color, var(--sf-surface-transparent-hover));
|
|
19
|
+
--sf-chat-interlocutor--radius: var(--sf-chat-interlocutor-radius, var(--sf-radius-1));
|
|
20
|
+
--sf-chat-interlocutor--height: var(--sf-chat-interlocutor-height, var(--sf-ui-1--control-height));
|
|
21
|
+
}
|
|
22
|
+
_:-ms-input-placeholder, html:not([dir="rtl"]) .sf-chat-interlocutor__button {
|
|
23
|
+
padding-left: var(--sf-space-1\/2);
|
|
24
|
+
}
|
|
25
|
+
@supports not (padding-inline-start: initial) {
|
|
26
|
+
html:not([dir="rtl"]) .sf-chat-interlocutor__button {
|
|
27
|
+
padding-left: var(--sf-space-1\/2);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
_:-ms-input-placeholder, html:not([dir="rtl"]) .sf-chat-interlocutor__button {
|
|
31
|
+
padding-right: var(--sf-space-1\/3);
|
|
32
|
+
}
|
|
33
|
+
@supports not (padding-inline-end: initial) {
|
|
34
|
+
html:not([dir="rtl"]) .sf-chat-interlocutor__button {
|
|
35
|
+
padding-right: var(--sf-space-1\/3);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
.sf-chat-interlocutor__button:where(:dir(ltr)) {
|
|
39
|
+
padding-left: var(--sf-space-1\/2);
|
|
40
|
+
padding-right: var(--sf-space-1\/3);
|
|
41
|
+
}
|
|
42
|
+
_:-ms-input-placeholder, [dir="rtl"] .sf-chat-interlocutor__button {
|
|
43
|
+
padding-right: var(--sf-space-1\/2);
|
|
44
|
+
}
|
|
45
|
+
@supports not (padding-inline-start: initial) {
|
|
46
|
+
[dir="rtl"] .sf-chat-interlocutor__button {
|
|
47
|
+
padding-right: var(--sf-space-1\/2);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
_:-ms-input-placeholder, [dir="rtl"] .sf-chat-interlocutor__button {
|
|
51
|
+
padding-left: var(--sf-space-1\/3);
|
|
52
|
+
}
|
|
53
|
+
@supports not (padding-inline-end: initial) {
|
|
54
|
+
[dir="rtl"] .sf-chat-interlocutor__button {
|
|
55
|
+
padding-left: var(--sf-space-1\/3);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
.sf-chat-interlocutor__button:where(:dir(rtl)) {
|
|
59
|
+
padding-right: var(--sf-space-1\/2);
|
|
60
|
+
padding-left: var(--sf-space-1\/3);
|
|
61
|
+
}
|
|
62
|
+
.sf-chat-interlocutor__button {
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
gap: var(--sf-space-1\/4);
|
|
66
|
+
max-width: 100%;
|
|
67
|
+
max-inline-size: 100%;
|
|
68
|
+
min-height: var(--sf-chat-interlocutor--height);
|
|
69
|
+
min-block-size: var(--sf-chat-interlocutor--height);
|
|
70
|
+
padding-inline: var(--sf-space-1\/2) var(--sf-space-1\/3);
|
|
71
|
+
border: 0;
|
|
72
|
+
border-radius: var(--sf-chat-interlocutor--radius);
|
|
73
|
+
background: transparent;
|
|
74
|
+
color: var(--sf-chat-interlocutor--color);
|
|
75
|
+
font: inherit;
|
|
76
|
+
font-size: var(--sf-text--size);
|
|
77
|
+
line-height: var(--sf-text--height);
|
|
78
|
+
font-weight: var(--sf-font-weight-bold);
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
}
|
|
81
|
+
.sf-chat-interlocutor__button:hover:not(:disabled) {
|
|
82
|
+
background: var(--sf-chat-interlocutor--hover);
|
|
83
|
+
}
|
|
84
|
+
.sf-chat-interlocutor__button:disabled {
|
|
85
|
+
cursor: default;
|
|
86
|
+
}
|
|
87
|
+
.sf-chat-interlocutor__button sf-icon {
|
|
88
|
+
color: var(--sf-chat-interlocutor--icon-color);
|
|
89
|
+
}
|
|
90
|
+
.sf-chat-interlocutor--single sf-icon {
|
|
91
|
+
display: none;
|
|
92
|
+
}
|
|
93
|
+
.sf-chat-interlocutor__title {
|
|
94
|
+
overflow: hidden;
|
|
95
|
+
text-overflow: ellipsis;
|
|
96
|
+
white-space: nowrap;
|
|
97
|
+
}
|
|
98
|
+
@media (pointer: coarse) {
|
|
99
|
+
.sf-chat-interlocutor__button {
|
|
100
|
+
min-height: var(--sf-ui-2--control-height);
|
|
101
|
+
min-block-size: var(--sf-ui-2--control-height);
|
|
102
|
+
min-height: var(--sf-ui-2--control-height);
|
|
103
|
+
min-height: var(--sf-chat-interlocutor-height, var(--sf-ui-2--control-height));
|
|
104
|
+
min-block-size: var(--sf-chat-interlocutor-height, var(--sf-ui-2--control-height));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer sf.reset, sf.tokens, sf.base, sf.utilities, sf.components, sf.overrides, sf.states;
|
|
2
|
+
@layer sf.components{.sf-chat-interlocutor{--sf-chat-interlocutor--color: var(--sf-chat-interlocutor-color, var(--sf-on-surface));--sf-chat-interlocutor--icon-color: var(--sf-chat-interlocutor-icon-color, var(--sf-on-surface-variant));--sf-chat-interlocutor--hover: var(--sf-chat-interlocutor-hover-background-color, var(--sf-surface-transparent-hover));--sf-chat-interlocutor--radius: var(--sf-chat-interlocutor-radius, var(--sf-radius-1));--sf-chat-interlocutor--height: var(--sf-chat-interlocutor-height, var(--sf-ui-1--control-height))}_:-ms-input-placeholder, html:not([dir="rtl"]) .sf-chat-interlocutor__button{padding-left:var(--sf-space-1\/2)}@supports not (padding-inline-start: initial){html:not([dir="rtl"]) .sf-chat-interlocutor__button{padding-left:var(--sf-space-1\/2)}}_:-ms-input-placeholder, html:not([dir="rtl"]) .sf-chat-interlocutor__button{padding-right:var(--sf-space-1\/3)}@supports not (padding-inline-end: initial){html:not([dir="rtl"]) .sf-chat-interlocutor__button{padding-right:var(--sf-space-1\/3)}}.sf-chat-interlocutor__button:where(:dir(ltr)){padding-left:var(--sf-space-1\/2);padding-right:var(--sf-space-1\/3)}_:-ms-input-placeholder, [dir="rtl"] .sf-chat-interlocutor__button{padding-right:var(--sf-space-1\/2)}@supports not (padding-inline-start: initial){[dir="rtl"] .sf-chat-interlocutor__button{padding-right:var(--sf-space-1\/2)}}_:-ms-input-placeholder, [dir="rtl"] .sf-chat-interlocutor__button{padding-left:var(--sf-space-1\/3)}@supports not (padding-inline-end: initial){[dir="rtl"] .sf-chat-interlocutor__button{padding-left:var(--sf-space-1\/3)}}.sf-chat-interlocutor__button:where(:dir(rtl)){padding-right:var(--sf-space-1\/2);padding-left:var(--sf-space-1\/3)}.sf-chat-interlocutor__button{display:inline-flex;align-items:center;gap:var(--sf-space-1\/4);max-width:100%;max-inline-size:100%;min-height:var(--sf-chat-interlocutor--height);min-block-size:var(--sf-chat-interlocutor--height);padding-inline:var(--sf-space-1\/2) var(--sf-space-1\/3);border:0;border-radius:var(--sf-chat-interlocutor--radius);background:rgba(0,0,0,0);color:var(--sf-chat-interlocutor--color);font:inherit;font-size:var(--sf-text--size);line-height:var(--sf-text--height);font-weight:var(--sf-font-weight-bold);cursor:pointer}.sf-chat-interlocutor__button:hover:not(:disabled){background:var(--sf-chat-interlocutor--hover)}.sf-chat-interlocutor__button:disabled{cursor:default}.sf-chat-interlocutor__button sf-icon{color:var(--sf-chat-interlocutor--icon-color)}.sf-chat-interlocutor--single sf-icon{display:none}.sf-chat-interlocutor__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(pointer: coarse){.sf-chat-interlocutor__button{min-height:var(--sf-ui-2--control-height);min-block-size:var(--sf-ui-2--control-height);min-height:var(--sf-ui-2--control-height);min-height:var(--sf-chat-interlocutor-height, var(--sf-ui-2--control-height));min-block-size:var(--sf-chat-interlocutor-height, var(--sf-ui-2--control-height))}}}
|
|
Binary file
|