@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.
Files changed (261) hide show
  1. package/LICENSE.md +182 -0
  2. package/README.md +65 -2
  3. package/dist/package-receipt.json +1551 -0
  4. package/dist/set.json +105 -0
  5. package/dist/smart/chat-composer/aliases.json +56 -0
  6. package/dist/smart/chat-composer/aliases.json.gz +0 -0
  7. package/dist/smart/chat-composer/component.json +658 -0
  8. package/dist/smart/chat-composer/component.json.gz +0 -0
  9. package/dist/smart/chat-composer/css/chat-composer.css +318 -0
  10. package/dist/smart/chat-composer/css/chat-composer.css.gz +0 -0
  11. package/dist/smart/chat-composer/css/chat-composer.min.css +2 -0
  12. package/dist/smart/chat-composer/css/chat-composer.min.css.gz +0 -0
  13. package/dist/smart/chat-composer/examples.json +531 -0
  14. package/dist/smart/chat-composer/examples.json.gz +0 -0
  15. package/dist/smart/chat-composer/js/chat-composer.js +1023 -0
  16. package/dist/smart/chat-composer/js/chat-composer.js.gz +0 -0
  17. package/dist/smart/chat-composer/js/chat-composer.min.js +75 -0
  18. package/dist/smart/chat-composer/js/chat-composer.min.js.gz +0 -0
  19. package/dist/smart/chat-composer/lang/en.json +31 -0
  20. package/dist/smart/chat-composer/lang/en.json.gz +0 -0
  21. package/dist/smart/chat-composer/lang/ru.json +31 -0
  22. package/dist/smart/chat-composer/lang/ru.json.gz +0 -0
  23. package/dist/smart/chat-composer/probe.json +400 -0
  24. package/dist/smart/chat-composer/probe.json.gz +0 -0
  25. package/dist/smart/chat-composer/smart.manifest.json +625 -0
  26. package/dist/smart/chat-composer/smart.manifest.json.gz +0 -0
  27. package/dist/smart/chat-composer/static/default/busy.html +20 -0
  28. package/dist/smart/chat-composer/static/default/busy.html.gz +0 -0
  29. package/dist/smart/chat-composer/static/default/disabled.html +20 -0
  30. package/dist/smart/chat-composer/static/default/disabled.html.gz +0 -0
  31. package/dist/smart/chat-composer/static/default/files.html +44 -0
  32. package/dist/smart/chat-composer/static/default/files.html.gz +0 -0
  33. package/dist/smart/chat-composer/static/default/near-limit.html +20 -0
  34. package/dist/smart/chat-composer/static/default/near-limit.html.gz +0 -0
  35. package/dist/smart/chat-composer/static/default/reference.html +20 -0
  36. package/dist/smart/chat-composer/static/default/reference.html.gz +0 -0
  37. package/dist/smart/chat-composer/static/sheets.json +88 -0
  38. package/dist/smart/chat-composer/static/sheets.json.gz +0 -0
  39. package/dist/smart/chat-composer/studio.fixture.json +18 -0
  40. package/dist/smart/chat-composer/studio.fixture.json.gz +0 -0
  41. package/dist/smart/chat-composer/studio.scenario.json +37 -0
  42. package/dist/smart/chat-composer/studio.scenario.json.gz +0 -0
  43. package/dist/smart/chat-composer/template/default.css +273 -0
  44. package/dist/smart/chat-composer/template/default.css.gz +0 -0
  45. package/dist/smart/chat-composer/template/default.js +109 -0
  46. package/dist/smart/chat-composer/template/default.js.gz +0 -0
  47. package/dist/smart/chat-composer/template/parts.js +82 -0
  48. package/dist/smart/chat-composer/template/parts.js.gz +0 -0
  49. package/dist/smart/chat-interlocutor/aliases.json +20 -0
  50. package/dist/smart/chat-interlocutor/aliases.json.gz +0 -0
  51. package/dist/smart/chat-interlocutor/component.json +435 -0
  52. package/dist/smart/chat-interlocutor/component.json.gz +0 -0
  53. package/dist/smart/chat-interlocutor/css/chat-interlocutor.css +107 -0
  54. package/dist/smart/chat-interlocutor/css/chat-interlocutor.css.gz +0 -0
  55. package/dist/smart/chat-interlocutor/css/chat-interlocutor.min.css +2 -0
  56. package/dist/smart/chat-interlocutor/css/chat-interlocutor.min.css.gz +0 -0
  57. package/dist/smart/chat-interlocutor/examples.json +379 -0
  58. package/dist/smart/chat-interlocutor/examples.json.gz +0 -0
  59. package/dist/smart/chat-interlocutor/js/chat-interlocutor.js +531 -0
  60. package/dist/smart/chat-interlocutor/js/chat-interlocutor.js.gz +0 -0
  61. package/dist/smart/chat-interlocutor/js/chat-interlocutor.min.js +22 -0
  62. package/dist/smart/chat-interlocutor/js/chat-interlocutor.min.js.gz +0 -0
  63. package/dist/smart/chat-interlocutor/lang/en.json +13 -0
  64. package/dist/smart/chat-interlocutor/lang/en.json.gz +0 -0
  65. package/dist/smart/chat-interlocutor/lang/ru.json +13 -0
  66. package/dist/smart/chat-interlocutor/lang/ru.json.gz +0 -0
  67. package/dist/smart/chat-interlocutor/probe.json +204 -0
  68. package/dist/smart/chat-interlocutor/probe.json.gz +0 -0
  69. package/dist/smart/chat-interlocutor/smart.manifest.json +406 -0
  70. package/dist/smart/chat-interlocutor/smart.manifest.json.gz +0 -0
  71. package/dist/smart/chat-interlocutor/static/default/former.html +10 -0
  72. package/dist/smart/chat-interlocutor/static/default/former.html.gz +0 -0
  73. package/dist/smart/chat-interlocutor/static/default/grouped.html +10 -0
  74. package/dist/smart/chat-interlocutor/static/default/grouped.html.gz +0 -0
  75. package/dist/smart/chat-interlocutor/static/default/reference.html +10 -0
  76. package/dist/smart/chat-interlocutor/static/default/reference.html.gz +0 -0
  77. package/dist/smart/chat-interlocutor/static/default/single.html +10 -0
  78. package/dist/smart/chat-interlocutor/static/default/single.html.gz +0 -0
  79. package/dist/smart/chat-interlocutor/static/sheets.json +105 -0
  80. package/dist/smart/chat-interlocutor/static/sheets.json.gz +0 -0
  81. package/dist/smart/chat-interlocutor/studio.fixture.json +25 -0
  82. package/dist/smart/chat-interlocutor/studio.fixture.json.gz +0 -0
  83. package/dist/smart/chat-interlocutor/studio.scenario.json +41 -0
  84. package/dist/smart/chat-interlocutor/studio.scenario.json.gz +0 -0
  85. package/dist/smart/chat-interlocutor/template/default.css +58 -0
  86. package/dist/smart/chat-interlocutor/template/default.css.gz +0 -0
  87. package/dist/smart/chat-interlocutor/template/default.js +43 -0
  88. package/dist/smart/chat-interlocutor/template/default.js.gz +0 -0
  89. package/dist/smart/chat-message/aliases.json +114 -0
  90. package/dist/smart/chat-message/aliases.json.gz +0 -0
  91. package/dist/smart/chat-message/component.json +822 -0
  92. package/dist/smart/chat-message/component.json.gz +0 -0
  93. package/dist/smart/chat-message/css/chat-message.css +3291 -0
  94. package/dist/smart/chat-message/css/chat-message.css.gz +0 -0
  95. package/dist/smart/chat-message/css/chat-message.min.css +2 -0
  96. package/dist/smart/chat-message/css/chat-message.min.css.gz +0 -0
  97. package/dist/smart/chat-message/examples.json +1604 -0
  98. package/dist/smart/chat-message/examples.json.gz +0 -0
  99. package/dist/smart/chat-message/js/chat-message.js +5498 -0
  100. package/dist/smart/chat-message/js/chat-message.js.gz +0 -0
  101. package/dist/smart/chat-message/js/chat-message.min.js +25 -0
  102. package/dist/smart/chat-message/js/chat-message.min.js.gz +0 -0
  103. package/dist/smart/chat-message/lang/en.json +181 -0
  104. package/dist/smart/chat-message/lang/en.json.gz +0 -0
  105. package/dist/smart/chat-message/lang/ru.json +185 -0
  106. package/dist/smart/chat-message/lang/ru.json.gz +0 -0
  107. package/dist/smart/chat-message/probe.json +1029 -0
  108. package/dist/smart/chat-message/probe.json.gz +0 -0
  109. package/dist/smart/chat-message/smart.manifest.json +814 -0
  110. package/dist/smart/chat-message/smart.manifest.json.gz +0 -0
  111. package/dist/smart/chat-message/static/default/brief-card.html +2 -0
  112. package/dist/smart/chat-message/static/default/brief-card.html.gz +0 -0
  113. package/dist/smart/chat-message/static/default/brief-questions.html +2 -0
  114. package/dist/smart/chat-message/static/default/brief-questions.html.gz +0 -0
  115. package/dist/smart/chat-message/static/default/deliverables.html +2 -0
  116. package/dist/smart/chat-message/static/default/deliverables.html.gz +0 -0
  117. package/dist/smart/chat-message/static/default/document.html +13 -0
  118. package/dist/smart/chat-message/static/default/document.html.gz +0 -0
  119. package/dist/smart/chat-message/static/default/failed.html +2 -0
  120. package/dist/smart/chat-message/static/default/failed.html.gz +0 -0
  121. package/dist/smart/chat-message/static/default/feedback-reason.html +2 -0
  122. package/dist/smart/chat-message/static/default/feedback-reason.html.gz +0 -0
  123. package/dist/smart/chat-message/static/default/limit.html +2 -0
  124. package/dist/smart/chat-message/static/default/limit.html.gz +0 -0
  125. package/dist/smart/chat-message/static/default/proposal.html +42 -0
  126. package/dist/smart/chat-message/static/default/proposal.html.gz +0 -0
  127. package/dist/smart/chat-message/static/default/question.html +18 -0
  128. package/dist/smart/chat-message/static/default/question.html.gz +0 -0
  129. package/dist/smart/chat-message/static/default/reference.html +2 -0
  130. package/dist/smart/chat-message/static/default/reference.html.gz +0 -0
  131. package/dist/smart/chat-message/static/default/steps.html +2 -0
  132. package/dist/smart/chat-message/static/default/steps.html.gz +0 -0
  133. package/dist/smart/chat-message/static/default/stopped.html +2 -0
  134. package/dist/smart/chat-message/static/default/stopped.html.gz +0 -0
  135. package/dist/smart/chat-message/static/default/waiting.html +2 -0
  136. package/dist/smart/chat-message/static/default/waiting.html.gz +0 -0
  137. package/dist/smart/chat-message/static/person/person-own.html +2 -0
  138. package/dist/smart/chat-message/static/person/person-own.html.gz +0 -0
  139. package/dist/smart/chat-message/static/person/person-reply.html +6 -0
  140. package/dist/smart/chat-message/static/person/person-reply.html.gz +0 -0
  141. package/dist/smart/chat-message/static/person/person.html +14 -0
  142. package/dist/smart/chat-message/static/person/person.html.gz +0 -0
  143. package/dist/smart/chat-message/static/sheets.json +398 -0
  144. package/dist/smart/chat-message/static/sheets.json.gz +0 -0
  145. package/dist/smart/chat-message/studio.fixture.json +27 -0
  146. package/dist/smart/chat-message/studio.fixture.json.gz +0 -0
  147. package/dist/smart/chat-message/studio.scenario.json +22 -0
  148. package/dist/smart/chat-message/studio.scenario.json.gz +0 -0
  149. package/dist/smart/chat-message/template/default.css +1895 -0
  150. package/dist/smart/chat-message/template/default.css.gz +0 -0
  151. package/dist/smart/chat-message/template/default.js +27 -0
  152. package/dist/smart/chat-message/template/default.js.gz +0 -0
  153. package/dist/smart/chat-message/template/person.js +11 -0
  154. package/dist/smart/chat-message/template/person.js.gz +0 -0
  155. package/dist/smart/chat-threads/aliases.json +174 -0
  156. package/dist/smart/chat-threads/aliases.json.gz +0 -0
  157. package/dist/smart/chat-threads/component.json +1232 -0
  158. package/dist/smart/chat-threads/component.json.gz +0 -0
  159. package/dist/smart/chat-threads/css/chat-threads.css +150 -0
  160. package/dist/smart/chat-threads/css/chat-threads.css.gz +0 -0
  161. package/dist/smart/chat-threads/css/chat-threads.min.css +2 -0
  162. package/dist/smart/chat-threads/css/chat-threads.min.css.gz +0 -0
  163. package/dist/smart/chat-threads/examples.json +689 -0
  164. package/dist/smart/chat-threads/examples.json.gz +0 -0
  165. package/dist/smart/chat-threads/js/chat-threads.js +859 -0
  166. package/dist/smart/chat-threads/js/chat-threads.js.gz +0 -0
  167. package/dist/smart/chat-threads/js/chat-threads.min.js +39 -0
  168. package/dist/smart/chat-threads/js/chat-threads.min.js.gz +0 -0
  169. package/dist/smart/chat-threads/lang/en.json +18 -0
  170. package/dist/smart/chat-threads/lang/en.json.gz +0 -0
  171. package/dist/smart/chat-threads/lang/ru.json +18 -0
  172. package/dist/smart/chat-threads/lang/ru.json.gz +0 -0
  173. package/dist/smart/chat-threads/probe.json +406 -0
  174. package/dist/smart/chat-threads/probe.json.gz +0 -0
  175. package/dist/smart/chat-threads/smart.manifest.json +1152 -0
  176. package/dist/smart/chat-threads/smart.manifest.json.gz +0 -0
  177. package/dist/smart/chat-threads/static/default/activity.html +139 -0
  178. package/dist/smart/chat-threads/static/default/activity.html.gz +0 -0
  179. package/dist/smart/chat-threads/static/default/activity.skeleton.html +139 -0
  180. package/dist/smart/chat-threads/static/default/activity.skeleton.html.gz +0 -0
  181. package/dist/smart/chat-threads/static/default/archive.html +55 -0
  182. package/dist/smart/chat-threads/static/default/archive.html.gz +0 -0
  183. package/dist/smart/chat-threads/static/default/archive.skeleton.html +55 -0
  184. package/dist/smart/chat-threads/static/default/archive.skeleton.html.gz +0 -0
  185. package/dist/smart/chat-threads/static/default/avatars.html +104 -0
  186. package/dist/smart/chat-threads/static/default/avatars.html.gz +0 -0
  187. package/dist/smart/chat-threads/static/default/avatars.skeleton.html +104 -0
  188. package/dist/smart/chat-threads/static/default/avatars.skeleton.html.gz +0 -0
  189. package/dist/smart/chat-threads/static/default/empty.html +48 -0
  190. package/dist/smart/chat-threads/static/default/empty.html.gz +0 -0
  191. package/dist/smart/chat-threads/static/default/loading.html +48 -0
  192. package/dist/smart/chat-threads/static/default/loading.html.gz +0 -0
  193. package/dist/smart/chat-threads/static/default/people.html +95 -0
  194. package/dist/smart/chat-threads/static/default/people.html.gz +0 -0
  195. package/dist/smart/chat-threads/static/default/people.skeleton.html +95 -0
  196. package/dist/smart/chat-threads/static/default/people.skeleton.html.gz +0 -0
  197. package/dist/smart/chat-threads/static/default/reference.html +114 -0
  198. package/dist/smart/chat-threads/static/default/reference.html.gz +0 -0
  199. package/dist/smart/chat-threads/static/default/reference.skeleton.html +114 -0
  200. package/dist/smart/chat-threads/static/default/reference.skeleton.html.gz +0 -0
  201. package/dist/smart/chat-threads/static/default/ungrouped.html +94 -0
  202. package/dist/smart/chat-threads/static/default/ungrouped.html.gz +0 -0
  203. package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html +94 -0
  204. package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html.gz +0 -0
  205. package/dist/smart/chat-threads/static/sheets.json +422 -0
  206. package/dist/smart/chat-threads/static/sheets.json.gz +0 -0
  207. package/dist/smart/chat-threads/studio.fixture.json +23 -0
  208. package/dist/smart/chat-threads/studio.fixture.json.gz +0 -0
  209. package/dist/smart/chat-threads/template/default.css +113 -0
  210. package/dist/smart/chat-threads/template/default.css.gz +0 -0
  211. package/dist/smart/chat-threads/template/default.js +62 -0
  212. package/dist/smart/chat-threads/template/default.js.gz +0 -0
  213. package/dist/smart/chat-window/aliases.json +395 -0
  214. package/dist/smart/chat-window/aliases.json.gz +0 -0
  215. package/dist/smart/chat-window/component.json +2809 -0
  216. package/dist/smart/chat-window/component.json.gz +0 -0
  217. package/dist/smart/chat-window/css/chat-window.css +1717 -0
  218. package/dist/smart/chat-window/css/chat-window.css.gz +0 -0
  219. package/dist/smart/chat-window/css/chat-window.min.css +2 -0
  220. package/dist/smart/chat-window/css/chat-window.min.css.gz +0 -0
  221. package/dist/smart/chat-window/examples.json +2798 -0
  222. package/dist/smart/chat-window/examples.json.gz +0 -0
  223. package/dist/smart/chat-window/js/chat-window.js +12382 -0
  224. package/dist/smart/chat-window/js/chat-window.js.gz +0 -0
  225. package/dist/smart/chat-window/js/chat-window.min.js +1 -0
  226. package/dist/smart/chat-window/js/chat-window.min.js.gz +0 -0
  227. package/dist/smart/chat-window/lang/en.json +212 -0
  228. package/dist/smart/chat-window/lang/en.json.gz +0 -0
  229. package/dist/smart/chat-window/lang/ru.json +218 -0
  230. package/dist/smart/chat-window/lang/ru.json.gz +0 -0
  231. package/dist/smart/chat-window/probe.json +2023 -0
  232. package/dist/smart/chat-window/probe.json.gz +0 -0
  233. package/dist/smart/chat-window/smart.manifest.json +2835 -0
  234. package/dist/smart/chat-window/smart.manifest.json.gz +0 -0
  235. package/dist/smart/chat-window/static/default/archived.html +97 -0
  236. package/dist/smart/chat-window/static/default/archived.html.gz +0 -0
  237. package/dist/smart/chat-window/static/default/embedded.html +119 -0
  238. package/dist/smart/chat-window/static/default/embedded.html.gz +0 -0
  239. package/dist/smart/chat-window/static/default/greeting.html +119 -0
  240. package/dist/smart/chat-window/static/default/greeting.html.gz +0 -0
  241. package/dist/smart/chat-window/static/default/people.html +110 -0
  242. package/dist/smart/chat-window/static/default/people.html.gz +0 -0
  243. package/dist/smart/chat-window/static/default/proposal.html +157 -0
  244. package/dist/smart/chat-window/static/default/proposal.html.gz +0 -0
  245. package/dist/smart/chat-window/static/default/reference.html +117 -0
  246. package/dist/smart/chat-window/static/default/reference.html.gz +0 -0
  247. package/dist/smart/chat-window/static/default/waiting.html +117 -0
  248. package/dist/smart/chat-window/static/default/waiting.html.gz +0 -0
  249. package/dist/smart/chat-window/static/sheets.json +476 -0
  250. package/dist/smart/chat-window/static/sheets.json.gz +0 -0
  251. package/dist/smart/chat-window/studio.fixture.json +13 -0
  252. package/dist/smart/chat-window/studio.fixture.json.gz +0 -0
  253. package/dist/smart/chat-window/studio.scenario.json +95 -0
  254. package/dist/smart/chat-window/studio.scenario.json.gz +0 -0
  255. package/dist/smart/chat-window/template/default.css +1168 -0
  256. package/dist/smart/chat-window/template/default.css.gz +0 -0
  257. package/dist/smart/chat-window/template/default.js +12 -0
  258. package/dist/smart/chat-window/template/default.js.gz +0 -0
  259. package/dist/smart/rule.js +185 -0
  260. package/dist/smart/rule.js.gz +0 -0
  261. package/package.json +29 -4
@@ -0,0 +1,531 @@
1
+ {
2
+ "examples": [
3
+ {
4
+ "name": "reference",
5
+ "title": "Поле с файлами: пусто",
6
+ "settings": {
7
+ "placeholder": "Спросите о регламентах",
8
+ "maxlength": 4000,
9
+ "attachments": true,
10
+ "accept": ".pdf,.docx",
11
+ "max-files": 5,
12
+ "max-bytes": 10485760
13
+ },
14
+ "expect": {
15
+ "name": "Сообщение",
16
+ "values": {
17
+ "value": ""
18
+ },
19
+ "texts": {
20
+ ".sf-chat-composer__hint": "Enter — отправить, Shift+Enter — новая строка"
21
+ }
22
+ },
23
+ "studio": {
24
+ "id": "composer-reference",
25
+ "title": "Composer reference",
26
+ "summary": "Deterministic reference fixture for sf-chat-composer: files allowed (.pdf, .docx, up to five, 10 MB each), the field empty.",
27
+ "scenario": {
28
+ "steps": [
29
+ {
30
+ "invoke": "setFiles",
31
+ "with": [
32
+ [
33
+ {
34
+ "id": "att_1",
35
+ "localId": "f1",
36
+ "name": "Договор.pdf",
37
+ "bytes": 48213
38
+ }
39
+ ]
40
+ ]
41
+ }
42
+ ]
43
+ }
44
+ }
45
+ },
46
+ {
47
+ "name": "files",
48
+ "title": "Файлы: готов, загружается, отказ",
49
+ "settings": {
50
+ "attachments": true,
51
+ "accept": ".pdf,.docx",
52
+ "files": [
53
+ {
54
+ "id": "att_1",
55
+ "localId": "f1",
56
+ "name": "Договор.pdf",
57
+ "bytes": 48213,
58
+ "progress": null,
59
+ "error": ""
60
+ },
61
+ {
62
+ "localId": "f2",
63
+ "name": "Регламент.docx",
64
+ "bytes": 1572864,
65
+ "progress": 0.4,
66
+ "error": ""
67
+ },
68
+ {
69
+ "localId": "f3",
70
+ "name": "Скан.pdf",
71
+ "bytes": 2048,
72
+ "progress": null,
73
+ "error": "не похоже на документ"
74
+ }
75
+ ]
76
+ },
77
+ "expect": {
78
+ "name": "Сообщение",
79
+ "texts": {
80
+ ".sf-chat-attachment--ready .sf-chat-attachment__meta": "47 КБ",
81
+ ".sf-chat-attachment--uploading .sf-chat-attachment__meta": "Загружается, 40%",
82
+ ".sf-chat-attachment--error .sf-chat-attachment__meta": "не похоже на документ"
83
+ }
84
+ }
85
+ },
86
+ {
87
+ "name": "busy",
88
+ "title": "Ждём ответа: кнопка «Остановить ожидание»",
89
+ "settings": {
90
+ "attachments": true,
91
+ "busy": true
92
+ },
93
+ "expect": {
94
+ "name": "Сообщение",
95
+ "texts": {
96
+ ".sf-chat-composer__hint": "Enter — отправить, Shift+Enter — новая строка"
97
+ }
98
+ }
99
+ },
100
+ {
101
+ "name": "disabled",
102
+ "title": "Писать нельзя",
103
+ "settings": {
104
+ "disabled": true,
105
+ "placeholder": "Примите условия, чтобы задать вопрос"
106
+ },
107
+ "expect": {
108
+ "name": "Сообщение"
109
+ }
110
+ },
111
+ {
112
+ "name": "near-limit",
113
+ "title": "Почти предел: счётчик знаков",
114
+ "settings": {
115
+ "maxlength": 12,
116
+ "value": "Мой отпуск?"
117
+ },
118
+ "expect": {
119
+ "name": "Сообщение",
120
+ "values": {
121
+ "value": "Мой отпуск?"
122
+ },
123
+ "texts": {
124
+ ".sf-chat-composer__count": "11 из 12"
125
+ }
126
+ }
127
+ }
128
+ ],
129
+ "pages": [
130
+ {
131
+ "name": "conformance",
132
+ "title": "sf-chat-composer against component.json (standard simai.smart-component 1.3.9 §12, gate 20); the behaviour simai/ui-chat's tests/browser/staff.test.mjs holds for it: Enter sends, Shift+Enter breaks the line, the stop button while an answer is awaited, the count past 80 %, the files checked and their chips",
133
+ "format": "stands/15-scenarios (A4 modal: a page, probes in steps); the runner is ui-source tests/browser/manifest-probes.browser.mjs, run for the package by scripts/run-manifest-probes.mjs",
134
+ "page": {
135
+ "lang": "ru",
136
+ "body": [
137
+ "<main>",
138
+ " <sf-chat-composer id=\"plain\"></sf-chat-composer>",
139
+ " <sf-chat-composer id=\"limit\" maxlength=\"10\"></sf-chat-composer>",
140
+ " <sf-chat-composer id=\"files\" attachments accept=\".pdf,.docx\" max-files=\"2\" max-bytes=\"1024\"></sf-chat-composer>",
141
+ "</main>"
142
+ ]
143
+ },
144
+ "checks": [
145
+ {
146
+ "id": "p1-enter-submits",
147
+ "title": "Enter sends the trimmed text as sf-chat-composer-submit {text, attachment-ids} once, and the 0.3 sf-chat-send {text, attachmentIds} once, noted with its dates; the composer does not clear itself",
148
+ "covers": "events.submit, aliases sf-chat-send, keyboard Enter commit, values.value",
149
+ "steps": [
150
+ {
151
+ "script": "(await customElements.whenDefined('sf-chat-composer'), document.querySelector('#plain').value = ' Сколько дней отпуска? ', document.querySelector('#plain .sf-chat-composer__input').focus(), true)",
152
+ "wait": 200,
153
+ "check": "document.querySelector('#plain .sf-chat-composer__send').disabled === false && document.querySelector('#plain .sf-chat-composer__send').classList.contains('sf-icon-button--primary')"
154
+ },
155
+ {
156
+ "user": "keyboard:Enter",
157
+ "expect": {
158
+ "events": [
159
+ {
160
+ "name": "sf-chat-composer-submit",
161
+ "count": 1,
162
+ "detail": {
163
+ "text": "Сколько дней отпуска?",
164
+ "attachment-ids": []
165
+ }
166
+ },
167
+ {
168
+ "name": "sf-chat-send",
169
+ "count": 1,
170
+ "detail": {
171
+ "text": "Сколько дней отпуска?",
172
+ "attachmentIds": []
173
+ }
174
+ }
175
+ ],
176
+ "journal": [
177
+ {
178
+ "from": "sf-chat-send",
179
+ "to": "sf-chat-composer-submit",
180
+ "since": "2026-10-28",
181
+ "remove_after": "2026-12-01"
182
+ }
183
+ ]
184
+ },
185
+ "check": "document.querySelector('#plain').value === ' Сколько дней отпуска? '"
186
+ }
187
+ ]
188
+ },
189
+ {
190
+ "id": "p2-shift-enter-breaks-line",
191
+ "title": "Shift+Enter breaks the line and sends nothing; an empty field sends nothing on Enter and its send button is quiet (tonal on-surface), not a disabled primary",
192
+ "covers": "keyboard Shift+Enter, accessibility.x-keys",
193
+ "steps": [
194
+ {
195
+ "script": "(await customElements.whenDefined('sf-chat-composer'), document.querySelector('#plain').value = 'Первая строка', document.querySelector('#plain .sf-chat-composer__input').focus(), true)",
196
+ "wait": 200
197
+ },
198
+ {
199
+ "user": "keyboard:Shift+Enter",
200
+ "expect": {
201
+ "events": [
202
+ {
203
+ "name": "sf-chat-composer-submit",
204
+ "count": 0
205
+ }
206
+ ]
207
+ },
208
+ "check": "document.querySelector('#plain').value.includes('\\n')"
209
+ },
210
+ {
211
+ "script": "(document.querySelector('#plain').value = '', document.querySelector('#plain .sf-chat-composer__input').focus(), true)",
212
+ "wait": 200
213
+ },
214
+ {
215
+ "user": "keyboard:Enter",
216
+ "expect": {
217
+ "events": [
218
+ {
219
+ "name": "sf-chat-composer-submit",
220
+ "count": 0
221
+ }
222
+ ]
223
+ },
224
+ "check": "(() => { const b = document.querySelector('#plain .sf-chat-composer__send'); return b.disabled && b.classList.contains('sf-icon-button--tonal') && b.classList.contains('sf-icon-button--on-surface') && b.getAttribute('aria-label') === 'Отправить'; })()"
225
+ }
226
+ ]
227
+ },
228
+ {
229
+ "id": "p3-busy-stop",
230
+ "title": "busy: send becomes «Остановить ожидание»; Enter with text sends nothing and the hint says why; the stop button sends sf-chat-composer-stop and the 0.3 sf-chat-stop once and gives the focus back to the field; not busy, the hint is the Enter hint again",
231
+ "covers": "settings.busy, events.stop, aliases sf-chat-stop, runtime.busy-text, runtime.hint-text",
232
+ "steps": [
233
+ {
234
+ "script": "(await customElements.whenDefined('sf-chat-composer'), document.querySelector('#plain').busy = true, document.querySelector('#plain').value = 'Ещё вопрос', document.querySelector('#plain .sf-chat-composer__input').focus(), true)",
235
+ "wait": 250,
236
+ "check": "(() => { const c = document.querySelector('#plain'); return c.querySelector('.sf-chat-composer__send').hidden && !c.querySelector('.sf-chat-composer__stop').hidden && c.querySelector('.sf-chat-composer__stop').getAttribute('aria-label') === 'Остановить ожидание' && c.querySelector('.sf-chat-composer__hint').textContent.trim() === 'Enter — отправить, Shift+Enter — новая строка'; })()"
237
+ },
238
+ {
239
+ "user": "keyboard:Enter",
240
+ "expect": {
241
+ "events": [
242
+ {
243
+ "name": "sf-chat-composer-submit",
244
+ "count": 0
245
+ }
246
+ ]
247
+ },
248
+ "check": "(() => { const h = document.querySelector('#plain .sf-chat-composer__hint'); return h.textContent.trim() === 'Дождитесь ответа или остановите ожидание' && h.classList.contains('sf-chat-composer__hint--busy') && h.getAttribute('aria-live') === 'polite'; })()"
249
+ },
250
+ {
251
+ "user": "click:#plain .sf-chat-composer__stop",
252
+ "expect": {
253
+ "events": [
254
+ {
255
+ "name": "sf-chat-composer-stop",
256
+ "count": 1
257
+ },
258
+ {
259
+ "name": "sf-chat-stop",
260
+ "count": 1
261
+ }
262
+ ],
263
+ "journal": [
264
+ {
265
+ "from": "sf-chat-stop",
266
+ "to": "sf-chat-composer-stop",
267
+ "since": "2026-10-28",
268
+ "remove_after": "2026-12-01"
269
+ }
270
+ ]
271
+ },
272
+ "check": "document.activeElement === document.querySelector('#plain .sf-chat-composer__input')"
273
+ },
274
+ {
275
+ "script": "(document.querySelector('#plain').busy = false, true)",
276
+ "wait": 250,
277
+ "check": "(() => { const c = document.querySelector('#plain'); return !c.querySelector('.sf-chat-composer__send').hidden && c.querySelector('.sf-chat-composer__stop').hidden && c.querySelector('.sf-chat-composer__hint').textContent.trim() === 'Enter — отправить, Shift+Enter — новая строка' && !c.querySelector('.sf-chat-composer__hint--busy'); })()"
278
+ }
279
+ ]
280
+ },
281
+ {
282
+ "id": "p4-max-chars",
283
+ "title": "past 80 % of maxlength the count shows and describes the field; past the limit it says so, the box is in error and send is off",
284
+ "covers": "settings.maxlength, runtime.count-text, runtime.too-long-text",
285
+ "steps": [
286
+ {
287
+ "script": "(await customElements.whenDefined('sf-chat-composer'), document.querySelector('#limit').value = 'Отпуск', true)",
288
+ "wait": 250,
289
+ "check": "(() => { const c = document.querySelector('#limit'); const count = c.querySelector('.sf-chat-composer__count'); return count.hidden && c.querySelector('.sf-chat-composer__input').getAttribute('aria-describedby') === count.id; })()"
290
+ },
291
+ {
292
+ "script": "(document.querySelector('#limit').value = 'Мой отпуск', true)",
293
+ "wait": 250,
294
+ "check": "(() => { const c = document.querySelector('#limit'); const count = c.querySelector('.sf-chat-composer__count'); return !count.hidden && count.textContent.trim() === '10 из 10' && !c.querySelector('.sf-chat-composer--over') && !c.querySelector('.sf-chat-composer__send').disabled; })()"
295
+ },
296
+ {
297
+ "script": "(document.querySelector('#limit').value = 'Мой отпуск?', true)",
298
+ "wait": 250,
299
+ "check": "(() => { const c = document.querySelector('#limit'); return c.querySelector('.sf-chat-composer__count').textContent.trim() === 'Сообщение длиннее 10 знаков' && c.querySelector('.sf-chat-composer--over') !== null && c.querySelector('.sf-chat-composer__send').disabled && c.querySelector('.sf-chat-composer__said').textContent.trim() === 'Сообщение длиннее 10 знаков'; })()"
300
+ }
301
+ ]
302
+ },
303
+ {
304
+ "id": "p5-files-checked",
305
+ "title": "files from the picker are checked by type, size and count: the refused are named in the alert notice, the accepted go in sf-chat-composer-attach and the 0.3 sf-chat-files once",
306
+ "covers": "settings.accept, settings.max-bytes, settings.max-files, events.attach, aliases sf-chat-files, runtime.bad-type-text, runtime.too-big-text, runtime.too-many-text",
307
+ "steps": [
308
+ {
309
+ "script": "(await customElements.whenDefined('sf-chat-composer'), window.__attached = null, document.querySelector('#files').addEventListener('sf-chat-composer-attach', (event) => { window.__attached = event.detail.files.map((file) => file.name); }, {once: true}), true)",
310
+ "wait": 200
311
+ },
312
+ {
313
+ "script": "(() => { const dt = new DataTransfer(); for (const [name, size] of [['a.pdf', 10], ['setup.exe', 10], ['big.pdf', 2048], ['b.docx', 10], ['c.pdf', 10]]) dt.items.add(new File(['x'.repeat(size)], name)); const picker = document.querySelector('#files').querySelector('.sf-chat-composer__picker'); picker.files = dt.files; picker.dispatchEvent(new Event('change', {bubbles: true})); return true; })()",
314
+ "wait": 300,
315
+ "expect": {
316
+ "events": [
317
+ {
318
+ "name": "sf-chat-composer-attach",
319
+ "count": 1
320
+ },
321
+ {
322
+ "name": "sf-chat-files",
323
+ "count": 1
324
+ }
325
+ ],
326
+ "journal": [
327
+ {
328
+ "from": "sf-chat-files",
329
+ "to": "sf-chat-composer-attach",
330
+ "since": "2026-10-28",
331
+ "remove_after": "2026-12-01"
332
+ }
333
+ ]
334
+ },
335
+ "check": "(() => { const notice = document.querySelector('#files').querySelector('.sf-chat-composer__notice'); return JSON.stringify(window.__attached) === JSON.stringify(['a.pdf', 'b.docx']) && !notice.hidden && notice.getAttribute('role') === 'alert' && notice.textContent === 'setup.exe: этот тип файла не поддерживается; big.pdf: файл больше 1 КБ; c.pdf: можно прикрепить не больше 2 файлов'; })()"
336
+ }
337
+ ]
338
+ },
339
+ {
340
+ "id": "p6-chips",
341
+ "title": "set-files, the 0.3 setFiles: chips with size, upload progress and the server's refusal; while one uploads send is off and the files button is off at max-files; a chip's remove sends sf-chat-composer-detach {id, name} and the 0.3 sf-chat-action {action: remove-attachment, id, name}",
342
+ "covers": "settings.files, actions.set-files, events.detach, aliases sf-chat-action, runtime.file-label, runtime.uploading-text, runtime.remove-label",
343
+ "steps": [
344
+ {
345
+ "script": "(await customElements.whenDefined('sf-chat-composer'), true)",
346
+ "wait": 200
347
+ },
348
+ {
349
+ "action": {
350
+ "name": "set-files",
351
+ "with": [
352
+ {
353
+ "id": "att_1",
354
+ "localId": "f1",
355
+ "name": "Договор.pdf",
356
+ "bytes": 48213
357
+ },
358
+ {
359
+ "localId": "f2",
360
+ "name": "Регламент.docx",
361
+ "bytes": 1572864,
362
+ "progress": 0.4
363
+ },
364
+ {
365
+ "localId": "f3",
366
+ "name": "Скан.pdf",
367
+ "bytes": 2048,
368
+ "error": "не похоже на документ"
369
+ }
370
+ ]
371
+ },
372
+ "target": "#files",
373
+ "wait": 300,
374
+ "expect": {
375
+ "returns": {
376
+ "outcome": "applied"
377
+ }
378
+ },
379
+ "check": "(() => { const c = document.querySelector('#files'); const chips = c.querySelectorAll('.sf-chat-composer__files .sf-chat-attachment'); const bar = c.querySelector('.sf-chat-attachment--uploading [role=progressbar]'); return chips.length === 3 && c.querySelector('.sf-chat-attachment--ready').getAttribute('aria-label') === 'Файл Договор.pdf, 47 КБ' && c.querySelector('.sf-chat-attachment--ready .sf-chat-attachment__meta').textContent.trim() === '47 КБ' && c.querySelector('.sf-chat-attachment--uploading .sf-chat-attachment__meta').textContent.trim() === 'Загружается, 40%' && bar?.getAttribute('aria-valuenow') === '40' && c.querySelector('.sf-chat-attachment--error .sf-chat-attachment__meta').getAttribute('role') === 'alert' && c.querySelector('.sf-chat-composer__send').disabled && c.querySelector('.sf-chat-composer__attach').disabled && c.querySelector('.sf-chat-composer__box--tall') !== null; })()"
380
+ },
381
+ {
382
+ "user": "click:#files .sf-chat-attachment--ready .sf-chat-attachment__remove",
383
+ "expect": {
384
+ "events": [
385
+ {
386
+ "name": "sf-chat-composer-detach",
387
+ "count": 1,
388
+ "detail": {
389
+ "id": "att_1",
390
+ "name": "Договор.pdf"
391
+ }
392
+ },
393
+ {
394
+ "name": "sf-chat-action",
395
+ "count": 1,
396
+ "detail": {
397
+ "action": "remove-attachment",
398
+ "id": "att_1",
399
+ "name": "Договор.pdf"
400
+ }
401
+ }
402
+ ],
403
+ "journal": [
404
+ {
405
+ "from": "sf-chat-action",
406
+ "to": "sf-chat-composer-detach",
407
+ "since": "2026-10-28",
408
+ "remove_after": "2026-12-01"
409
+ }
410
+ ]
411
+ }
412
+ }
413
+ ]
414
+ },
415
+ {
416
+ "id": "p7-ready-file-sends",
417
+ "title": "a ready file with no text can be sent: submit carries its id",
418
+ "covers": "events.submit attachment-ids",
419
+ "steps": [
420
+ {
421
+ "script": "(await customElements.whenDefined('sf-chat-composer'), document.querySelector('#files').files = [{id: 'att_9', localId: 'f9', name: 'Отчёт.pdf', bytes: 1200}], true)",
422
+ "wait": 300,
423
+ "check": "document.querySelector('#files').querySelector('.sf-chat-composer__send').disabled === false"
424
+ },
425
+ {
426
+ "user": "click:#files .sf-chat-composer__send",
427
+ "expect": {
428
+ "events": [
429
+ {
430
+ "name": "sf-chat-composer-submit",
431
+ "count": 1,
432
+ "detail": {
433
+ "text": "",
434
+ "attachment-ids": [
435
+ "att_9"
436
+ ]
437
+ }
438
+ }
439
+ ]
440
+ }
441
+ }
442
+ ]
443
+ },
444
+ {
445
+ "id": "p8-clear-focus-disabled",
446
+ "title": "clear empties the field; focus() lands in the field; disabled turns the field and send off",
447
+ "covers": "actions.clear, settings.disabled, focus delegation",
448
+ "steps": [
449
+ {
450
+ "script": "(await customElements.whenDefined('sf-chat-composer'), document.querySelector('#plain').value = 'Черновик', true)",
451
+ "wait": 200
452
+ },
453
+ {
454
+ "action": {
455
+ "name": "clear"
456
+ },
457
+ "target": "#plain",
458
+ "wait": 200,
459
+ "expect": {
460
+ "returns": {
461
+ "outcome": "applied"
462
+ }
463
+ },
464
+ "check": "document.querySelector('#plain').value === '' && document.querySelector('#plain .sf-chat-composer__input').value === ''"
465
+ },
466
+ {
467
+ "script": "(document.querySelector('#plain').focus(), true)",
468
+ "wait": 100,
469
+ "check": "document.activeElement === document.querySelector('#plain .sf-chat-composer__input')"
470
+ },
471
+ {
472
+ "script": "(document.querySelector('#plain').value = 'Текст', document.querySelector('#plain').disabled = true, true)",
473
+ "wait": 250,
474
+ "check": "(() => { const c = document.querySelector('#plain'); return c.querySelector('.sf-chat-composer__input').disabled && c.querySelector('.sf-chat-composer__send').disabled && c.querySelector('.sf-chat-composer--disabled') !== null; })()"
475
+ }
476
+ ]
477
+ },
478
+ {
479
+ "id": "p9-queue",
480
+ "title": "queue: while busy a message of text still goes out as sf-chat-composer-submit, by Enter or by «Отправить после ответа» beside «Остановить ожидание», and the hint says it goes after the answer; a message with files waits and the hint says why",
481
+ "covers": "settings.queue, settings.busy, events.submit, runtime.queue-label, runtime.queue-hint-text, runtime.busy-files-text",
482
+ "steps": [
483
+ {
484
+ "script": "(await customElements.whenDefined('sf-chat-composer'), document.querySelector('#plain').busy = true, document.querySelector('#plain').queue = true, document.querySelector('#plain').value = 'Ещё вопрос', document.querySelector('#plain .sf-chat-composer__input').focus(), true)",
485
+ "wait": 250,
486
+ "check": "(() => { const c = document.querySelector('#plain'); const send = c.querySelector('.sf-chat-composer__send'); return !send.hidden && !send.disabled && send.getAttribute('aria-label') === 'Отправить после ответа' && !c.querySelector('.sf-chat-composer__stop').hidden && c.querySelector('.sf-chat-composer__hint').textContent.trim() === 'Enter — отправить после ответа, Shift+Enter — новая строка'; })()"
487
+ },
488
+ {
489
+ "user": "keyboard:Enter",
490
+ "expect": {
491
+ "events": [
492
+ {
493
+ "name": "sf-chat-composer-submit",
494
+ "count": 1,
495
+ "detail": {
496
+ "text": "Ещё вопрос",
497
+ "attachment-ids": []
498
+ }
499
+ }
500
+ ]
501
+ },
502
+ "check": "document.querySelector('#plain').value === 'Ещё вопрос'"
503
+ },
504
+ {
505
+ "script": "(document.querySelector('#plain').value = '', true)",
506
+ "wait": 200,
507
+ "check": "(() => { const c = document.querySelector('#plain'); return c.querySelector('.sf-chat-composer__send').hidden && !c.querySelector('.sf-chat-composer__stop').hidden; })()"
508
+ },
509
+ {
510
+ "script": "(document.querySelector('#files').busy = true, document.querySelector('#files').queue = true, document.querySelector('#files').files = [{id: 'att_1', name: 'Договор.pdf', bytes: 512}], document.querySelector('#files').value = 'С файлом', document.querySelector('#files .sf-chat-composer__input').focus(), true)",
511
+ "wait": 250,
512
+ "check": "document.querySelector('#files .sf-chat-composer__send').hidden"
513
+ },
514
+ {
515
+ "user": "keyboard:Enter",
516
+ "expect": {
517
+ "events": [
518
+ {
519
+ "name": "sf-chat-composer-submit",
520
+ "count": 0
521
+ }
522
+ ]
523
+ },
524
+ "check": "document.querySelector('#files .sf-chat-composer__hint').textContent.trim() === 'Сообщение с файлами можно отправить, когда придёт ответ'"
525
+ }
526
+ ]
527
+ }
528
+ ]
529
+ }
530
+ ]
531
+ }