@dsrcjs/ai-widget 0.0.0-stage → 1.0.5
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 +64 -0
- package/README.md +296 -2
- package/dist/ai-dana-chat.js +76 -0
- package/dist/avatar/model.d.ts +12 -0
- package/dist/drag.d.ts +44 -0
- package/dist/echarts-B6eiFnZN.js +18 -0
- package/dist/i18n.d.ts +287 -0
- package/dist/index-D2Riqtpn.js +19 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.js +1 -0
- package/dist/markdown-impl-Cu_bBFxI.js +34 -0
- package/dist/stream-entry-CNdFWIwY.js +8 -0
- package/dist/theme.d.ts +82 -0
- package/package.json +36 -4
package/dist/i18n.d.ts
ADDED
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
export type Lang = 'kk' | 'ru' | 'en';
|
|
2
|
+
export declare const LANGS: readonly Lang[];
|
|
3
|
+
/** Explicit option → `<html lang>` → browser language → `ru`. Region suffixes (`ru-RU`) are ignored. */
|
|
4
|
+
export declare const resolveLang: (explicit?: string | null) => Lang;
|
|
5
|
+
/** Russian is the reference: every other language must have exactly its keys (i18n.test.ts). */
|
|
6
|
+
declare const ru: {
|
|
7
|
+
title: string;
|
|
8
|
+
open: string;
|
|
9
|
+
unreadAnswers: string;
|
|
10
|
+
ask: string;
|
|
11
|
+
close: string;
|
|
12
|
+
history: string;
|
|
13
|
+
closeHistory: string;
|
|
14
|
+
newChat: string;
|
|
15
|
+
untitled: string;
|
|
16
|
+
historyEmpty: string;
|
|
17
|
+
historyError: string;
|
|
18
|
+
delete: string;
|
|
19
|
+
deleteConfirm: string;
|
|
20
|
+
deleteYes: string;
|
|
21
|
+
deleteNo: string;
|
|
22
|
+
deleteError: string;
|
|
23
|
+
modeLabel: string;
|
|
24
|
+
'health.idle': string;
|
|
25
|
+
'health.busy': string;
|
|
26
|
+
'health.unavailable': string;
|
|
27
|
+
placeholder: string;
|
|
28
|
+
inputLabel: string;
|
|
29
|
+
send: string;
|
|
30
|
+
stop: string;
|
|
31
|
+
attach: string;
|
|
32
|
+
attachOne: string;
|
|
33
|
+
attachHint: string;
|
|
34
|
+
disclaimer: string;
|
|
35
|
+
removeFile: string;
|
|
36
|
+
counter: string;
|
|
37
|
+
counterLimit: string;
|
|
38
|
+
counterOver: string;
|
|
39
|
+
fileTooLarge: string;
|
|
40
|
+
fileType: string;
|
|
41
|
+
modeUnavailable: string;
|
|
42
|
+
greeting: string;
|
|
43
|
+
loading: string;
|
|
44
|
+
configError: string;
|
|
45
|
+
overloaded: string;
|
|
46
|
+
retry: string;
|
|
47
|
+
dismiss: string;
|
|
48
|
+
scrollDown: string;
|
|
49
|
+
settings: string;
|
|
50
|
+
'settings.language': string;
|
|
51
|
+
'settings.theme': string;
|
|
52
|
+
'settings.themeLight': string;
|
|
53
|
+
'settings.themeDark': string;
|
|
54
|
+
'settings.themeAuto': string;
|
|
55
|
+
'settings.model': string;
|
|
56
|
+
'settings.modelHint': string;
|
|
57
|
+
'settings.shortcuts': string;
|
|
58
|
+
'shortcut.search': string;
|
|
59
|
+
'shortcut.newChat': string;
|
|
60
|
+
'shortcut.sidebar': string;
|
|
61
|
+
'shortcut.close': string;
|
|
62
|
+
search: string;
|
|
63
|
+
searchEmpty: string;
|
|
64
|
+
collapseSidebar: string;
|
|
65
|
+
expandSidebar: string;
|
|
66
|
+
expand: string;
|
|
67
|
+
shrink: string;
|
|
68
|
+
examples: string;
|
|
69
|
+
'examples.whatCanDo': string;
|
|
70
|
+
'group.pinned': string;
|
|
71
|
+
'group.today': string;
|
|
72
|
+
'group.yesterday': string;
|
|
73
|
+
'group.week': string;
|
|
74
|
+
'group.earlier': string;
|
|
75
|
+
'errors.thread_busy': string;
|
|
76
|
+
'errors.mode_overloaded': string;
|
|
77
|
+
'errors.daily_limit': string;
|
|
78
|
+
'errors.rate_limit': string;
|
|
79
|
+
'errors.ip_limit': string;
|
|
80
|
+
'errors.concurrency_limit': string;
|
|
81
|
+
'errors.file_too_large': string;
|
|
82
|
+
'errors.file_not_allowed': string;
|
|
83
|
+
'errors.invalid_query': string;
|
|
84
|
+
'errors.invalid_parent': string;
|
|
85
|
+
'errors.mode_not_found': string;
|
|
86
|
+
'errors.thread_not_found': string;
|
|
87
|
+
'errors.interrupted': string;
|
|
88
|
+
'errors.code': string;
|
|
89
|
+
'errors.generic': string;
|
|
90
|
+
'errors.network': string;
|
|
91
|
+
'agent.thinking': string;
|
|
92
|
+
'agent.done': string;
|
|
93
|
+
'agent.stopped': string;
|
|
94
|
+
'agent.stopping': string;
|
|
95
|
+
'agent.failed': string;
|
|
96
|
+
'agent.interrupted': string;
|
|
97
|
+
'agent.answerStopped': string;
|
|
98
|
+
'agent.seconds': string;
|
|
99
|
+
'agent.attempt': string;
|
|
100
|
+
'agent.showSteps': string;
|
|
101
|
+
'agent.hideSteps': string;
|
|
102
|
+
'steps.router': string;
|
|
103
|
+
'steps.context_builder': string;
|
|
104
|
+
'steps.sql_architect': string;
|
|
105
|
+
'steps.executor': string;
|
|
106
|
+
'steps.responder': string;
|
|
107
|
+
'steps.rag': string;
|
|
108
|
+
'steps.sql': string;
|
|
109
|
+
'steps.document': string;
|
|
110
|
+
'steps.understand': string;
|
|
111
|
+
'steps.search_law': string;
|
|
112
|
+
'steps.run_sql': string;
|
|
113
|
+
'steps.run_query': string;
|
|
114
|
+
'steps.data': string;
|
|
115
|
+
'steps.lookup_taxpayer': string;
|
|
116
|
+
'steps.find_taxpayer': string;
|
|
117
|
+
'steps.ask_clarification': string;
|
|
118
|
+
'steps.answer': string;
|
|
119
|
+
'steps.unknown': string;
|
|
120
|
+
copy: string;
|
|
121
|
+
copied: string;
|
|
122
|
+
download: string;
|
|
123
|
+
regenerate: string;
|
|
124
|
+
edit: string;
|
|
125
|
+
editLabel: string;
|
|
126
|
+
cancel: string;
|
|
127
|
+
actionsLabel: string;
|
|
128
|
+
rate: string;
|
|
129
|
+
ratingError: string;
|
|
130
|
+
feedbackOpen: string;
|
|
131
|
+
feedbackEdit: string;
|
|
132
|
+
feedbackLabel: string;
|
|
133
|
+
feedbackPlaceholder: string;
|
|
134
|
+
save: string;
|
|
135
|
+
'branch.label': string;
|
|
136
|
+
'branch.prev': string;
|
|
137
|
+
'branch.next': string;
|
|
138
|
+
'branch.error': string;
|
|
139
|
+
'limit.remaining': string;
|
|
140
|
+
'limit.exhausted': string;
|
|
141
|
+
'limit.until': string;
|
|
142
|
+
'blocks.data': string;
|
|
143
|
+
'blocks.hideData': string;
|
|
144
|
+
'blocks.methodology': string;
|
|
145
|
+
'blocks.passport': string;
|
|
146
|
+
'blocks.indicator': string;
|
|
147
|
+
'blocks.territory': string;
|
|
148
|
+
'blocks.period': string;
|
|
149
|
+
'blocks.breakdown': string;
|
|
150
|
+
'blocks.breakdown.sex': string;
|
|
151
|
+
'blocks.breakdown.age': string;
|
|
152
|
+
'blocks.breakdown.urban_rural': string;
|
|
153
|
+
'blocks.breakdown.activity': string;
|
|
154
|
+
'blocks.breakdown.item': string;
|
|
155
|
+
'blocks.substituted': string;
|
|
156
|
+
'blocks.alternatives': string;
|
|
157
|
+
'blocks.table': string;
|
|
158
|
+
'blocks.tableSearch': string;
|
|
159
|
+
'blocks.tableEmpty': string;
|
|
160
|
+
'blocks.page': string;
|
|
161
|
+
'blocks.prevPage': string;
|
|
162
|
+
'blocks.nextPage': string;
|
|
163
|
+
'blocks.truncated': string;
|
|
164
|
+
'blocks.catalogMore': string;
|
|
165
|
+
'blocks.catalogExamples': string;
|
|
166
|
+
'blocks.options': string;
|
|
167
|
+
'blocks.default': string;
|
|
168
|
+
'blocks.freeTextHint': string;
|
|
169
|
+
'blocks.findOption': string;
|
|
170
|
+
'blocks.chosen': string;
|
|
171
|
+
'blocks.continue': string;
|
|
172
|
+
'blocks.cancelPlan': string;
|
|
173
|
+
'blocks.expired': string;
|
|
174
|
+
'blocks.askAgain': string;
|
|
175
|
+
'blocks.dashboard': string;
|
|
176
|
+
'blocks.hideDashboard': string;
|
|
177
|
+
'chart.kinds': string;
|
|
178
|
+
'chart.kind.bar': string;
|
|
179
|
+
'chart.kind.column': string;
|
|
180
|
+
'chart.kind.pie': string;
|
|
181
|
+
'chart.kind.line': string;
|
|
182
|
+
'chart.kind.area': string;
|
|
183
|
+
'chart.national': string;
|
|
184
|
+
'chart.top': string;
|
|
185
|
+
'chart.label': string;
|
|
186
|
+
'files.list': string;
|
|
187
|
+
'files.report': string;
|
|
188
|
+
'files.document': string;
|
|
189
|
+
'files.presentation': string;
|
|
190
|
+
'files.excel': string;
|
|
191
|
+
'files.csv': string;
|
|
192
|
+
'files.failed': string;
|
|
193
|
+
'report.create': string;
|
|
194
|
+
'report.pending': string;
|
|
195
|
+
'report.failed': string;
|
|
196
|
+
'report.retry': string;
|
|
197
|
+
'report.expired': string;
|
|
198
|
+
'dashboard.eyebrow': string;
|
|
199
|
+
'dashboard.label': string;
|
|
200
|
+
'dashboard.sections': string;
|
|
201
|
+
'dashboard.regions': string;
|
|
202
|
+
'dashboard.items': string;
|
|
203
|
+
'dashboard.openSource': string;
|
|
204
|
+
'dashboard.methodology': string;
|
|
205
|
+
'dashboard.fullscreen': string;
|
|
206
|
+
'dashboard.collapse': string;
|
|
207
|
+
'dashboard.close': string;
|
|
208
|
+
'dashboard.chatTab': string;
|
|
209
|
+
'dashboard.dashboardTab': string;
|
|
210
|
+
'dashboard.view': string;
|
|
211
|
+
'dashboard.region': string;
|
|
212
|
+
'dashboard.allRegions': string;
|
|
213
|
+
'dashboard.period': string;
|
|
214
|
+
'dashboard.mode.label': string;
|
|
215
|
+
'dashboard.mode.value': string;
|
|
216
|
+
'dashboard.mode.deviation': string;
|
|
217
|
+
'dashboard.mode.change': string;
|
|
218
|
+
'dashboard.base.label': string;
|
|
219
|
+
'dashboard.base.median': string;
|
|
220
|
+
'dashboard.base.national': string;
|
|
221
|
+
'dashboard.noPrevious': string;
|
|
222
|
+
'dashboard.noNational': string;
|
|
223
|
+
'dashboard.fewRegions': string;
|
|
224
|
+
'dashboard.ranking': string;
|
|
225
|
+
'dashboard.trend': string;
|
|
226
|
+
'dashboard.findings': string;
|
|
227
|
+
'dashboard.data': string;
|
|
228
|
+
'dashboard.kpis': string;
|
|
229
|
+
'dashboard.table.rank': string;
|
|
230
|
+
'dashboard.table.position': string;
|
|
231
|
+
'dashboard.table.value': string;
|
|
232
|
+
'dashboard.table.share': string;
|
|
233
|
+
'dashboard.table.deviation': string;
|
|
234
|
+
'dashboard.table.change': string;
|
|
235
|
+
'dashboard.source': string;
|
|
236
|
+
'dashboard.points': string;
|
|
237
|
+
'dashboard.kpi.national': string;
|
|
238
|
+
'dashboard.kpi.max': string;
|
|
239
|
+
'dashboard.kpi.min': string;
|
|
240
|
+
'dashboard.kpi.median': string;
|
|
241
|
+
'dashboard.kpi.spread': string;
|
|
242
|
+
'dashboard.kpi.gap': string;
|
|
243
|
+
'dashboard.kpi.last': string;
|
|
244
|
+
'dashboard.kpi.first': string;
|
|
245
|
+
'dashboard.kpi.change': string;
|
|
246
|
+
'dashboard.kpi.place': string;
|
|
247
|
+
'dashboard.kpi.placeOf': string;
|
|
248
|
+
'dashboard.kpi.deviation': string;
|
|
249
|
+
'dashboard.kpi.previous': string;
|
|
250
|
+
'steps.counter': string;
|
|
251
|
+
'feedback.reasonsLabel': string;
|
|
252
|
+
'feedback.reason.wrong_number': string;
|
|
253
|
+
'feedback.reason.wrong_indicator': string;
|
|
254
|
+
'feedback.reason.wrong_territory': string;
|
|
255
|
+
'feedback.reason.wrong_period': string;
|
|
256
|
+
'feedback.reason.not_answered': string;
|
|
257
|
+
'feedback.reason.language': string;
|
|
258
|
+
'feedback.reason.slow': string;
|
|
259
|
+
'feedback.reason.other': string;
|
|
260
|
+
'intro.title': string;
|
|
261
|
+
'intro.continue': string;
|
|
262
|
+
source: string;
|
|
263
|
+
'shell.siteBlocked': string;
|
|
264
|
+
'shell.siteBlockedHint': string;
|
|
265
|
+
'modes.none': string;
|
|
266
|
+
'attachment.sending': string;
|
|
267
|
+
'agent.steps': string;
|
|
268
|
+
'agent.unfinished': string;
|
|
269
|
+
rateGroup: string;
|
|
270
|
+
'blocks.catalogTitle': string;
|
|
271
|
+
'blocks.catalogSections': string;
|
|
272
|
+
'blocks.catalogIndicators': string;
|
|
273
|
+
'blocks.catalogSendHint': string;
|
|
274
|
+
'blocks.clarification': string;
|
|
275
|
+
'files.expired': string;
|
|
276
|
+
'files.notFound': string;
|
|
277
|
+
'files.unavailable': string;
|
|
278
|
+
};
|
|
279
|
+
export type MessageKey = keyof typeof ru;
|
|
280
|
+
export declare const DICT: Record<Lang, Record<MessageKey, string>>;
|
|
281
|
+
export type Vars = Record<string, string | number>;
|
|
282
|
+
/** `{name}` placeholders; a missing variable stays as is, so a typo is visible instead of silently empty. */
|
|
283
|
+
export declare const translate: (lang: Lang, key: MessageKey, vars?: Vars) => string;
|
|
284
|
+
export declare const hasKey: (key: string) => key is MessageKey;
|
|
285
|
+
/** A localized backend value (`{kk, ru, en}`): the language, then Russian, then any non-empty one. */
|
|
286
|
+
export declare const pickLocalized: (value: Partial<Record<Lang, string>> | null | undefined, lang: Lang) => string;
|
|
287
|
+
export {};
|