@1337exp/taoui 5.6.2 → 5.8.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.8.1
4
+
5
+ Fixes after 5.8.0; nothing to migrate.
6
+
7
+ - **TaoTag is centred as in 5.6.2 again.** The optical centring of 5.7.0 (`text-box`, the letters themselves in the middle) brought the tall letters too close to the top border; the line of 5.6.2 centres the text on a whole pixel, and that is what a tag does now. The horizontal centring of a wide tag stays.
8
+ - **A snackbar has no cross unless you ask.** A toast with no title and an action has no close button by default: next to the action it is a mistap waiting to happen, and the toast goes by itself. `.closable(true)` brings it back; toasts with a title keep the default.
9
+ - **The snackbar action no longer jumps on the first hover.** A toast at the bottom or in the centre stood on a fractional pixel (lines of 1.45 × 14px are 20.3px), and when the first hover repainted the action its text snapped a pixel down. The toast's lines are whole pixels now (`round()`, with the plain value for older browsers), and in a snackbar the text and the action share a baseline instead of being centred half a pixel apart. Across, a centred toast stood on half a pixel in a window of odd width (Chrome shifted the text sideways): the centred areas and the toast are an even number of pixels wide now, so the middle is a whole pixel.
10
+ - **The toast's bounce is no longer clipped.** Since the fade moved onto the toast (5.8.0) its slot clipped it, and the slight growth of the bounce and the shadow were cut at the edges. The slot clips only while its row folds away.
11
+ - Showcase: a **Backgrounds** section: plain, grain, the glow of the palette, the gradient, glow and grain, each one line of CSS from the roles and classes the kit has.
12
+
13
+ ## 5.8.0
14
+
15
+ A toast for work in progress; nothing to migrate.
16
+
17
+ - **`toast().loading()`**: a spinner instead of the icon, no timeout, `aria-busy`. Finish it with a toast of the same `id` and `replace()`.
18
+ - **`toast.promise(promise, { loading, success, error })`**: loading while the promise runs, then success or error in the same place (`success` / `error` may be functions of the result / the error); it returns the same promise.
19
+ - **A glass toast keeps its blur while it fades.** The fade ran on the toast's wrapper, and an ancestor below opacity 1 cuts a `backdrop-filter` off from what is behind it (Chrome): the blur waited for the fade in and then popped in, and went out at once on the fade out. The fade now runs on the toast itself.
20
+ - **A snackbar is one line.** A toast with no title and an action puts the text and the action on one line, the action at the end as a text button, as phones do (Material, iOS); a long text wraps and the action goes under it, still at the end. With a title the actions stay below as buttons. A neutral toast (`show()`) has no icon of its own now; an icon you give, a status and the spinner still show.
21
+ - Showcase: a snackbar example, «Note deleted · Undo» at the bottom.
22
+ - **`replace()` changes a toast where it stands.** It used to drop the old one and add the new one at the end of the stack (a leave and an enter, a jump); now it takes the place and the id of the one it replaces, and the item restarts its timer for the new content.
23
+
24
+ ## 5.7.0
25
+
26
+ Two options and the visual fixes made after 5.6.0; nothing to migrate.
27
+
28
+ - **`TaoPagination pageSizes`** (`[10, 20, 50, 100]`): a «Per page» choice next to the total, `v-model:page-size`. A new size moves the page so the first row on screen stays on screen (rows 41–60 at 20 a page are page 1 at 50). The caption is the locale key `perPageText` (optional, so a locale written before still type-checks) and labels the list for a screen reader.
29
+ - **`TaoNav indicator="line"`**: the current section in the accent colour with a short line instead of a tint, under the item in the bar look and along its start edge in the rail and the side panel; `auto` moves it with the look. `pill` stays the default.
30
+ - **No flash on a field that opens a list.** TaoSelect, TaoDate and TaoDateRange lit their frame on the press (focus) and dropped it at once when the list opened (the focus moves into the list): now the field stays lit while its list is open.
31
+ - **The hover shows on any fill.** Rows and controls under the pointer (menus, the menu bar, Select / Combobox options, the tree, the nav, lists, the table, pagination, the calendar, secondary buttons) take the new role `--tao-color-hover`, a see-through wash of the strong text, instead of the solid `--tao-color-surface-hover`. It shows on a grain or glass panel too, and the default dark theme gets a hover you can see (1.27:1 against the raised surface, gray-700 on gray-800 was 1.09:1; palettes 1.16 → 1.25). `surface-hover` stays the solid colour (the colour inputs' checkerboard uses it).
32
+ - **The neutral fill under the pointer is a step, not a jump.** It went to the text colour: near-white in the dark themes, so the white label was lost on it, and near-black in the light one. The new role `--tao-color-neutral-hover` steps it a little darker in the dark themes and a little towards the strong text in the light one; the label stays about 7.6:1.
33
+ - **TaoTag** centres its text when it is wider than the text (a grid, a fixed width), and centres the letters themselves: a font keeps more room above its letters than below (Segoe UI, Roboto), so with the line box centred the lowercase sat about half a pixel low. Where `text-box` is supported (Chrome 133+, Safari 18.2+) the text is trimmed to the x-height and the baseline, with padding that gives the ascenders and descenders their room back, and the offset is rounded to a whole pixel, so the fix of 5.6.2 (no jumping text) holds; a tag with an avatar keeps the plain centring; elsewhere it is as it was.
34
+ - Showcase: the sparkline cards show a trend tag in the `#corner` of TaoCard.
35
+
3
36
  ## 5.6.2
4
37
 
5
38
  Two pixel-level fixes; nothing to migrate.
package/README.md CHANGED
@@ -63,7 +63,7 @@
63
63
  - **TaoSpoiler** — disclosure. `v-model` and `aria-expanded`. Neighbours do not close each other
64
64
  - **TaoSpoilerGroup** — accordion: `v-model` is the open panel key (`null` = all closed); spoilers take `name`. Without `v-model` the group keeps that key itself
65
65
  - **TaoTabs** — tabbed sections
66
- - **TaoNav** — navigation between the sections of an app: one list of items (`icon`, `href`, `badge`), three looks. `layout="auto"` picks by the width of TaoNav itself (container queries, no JS): a bottom bar below 600px (more than five items: «More» with a menu), a rail with icons below 840px, a side panel with labels from 840px. With the page in its slot it lays the page out: the bar sticks to the bottom (safe area kept), the side list to the top. `floating` lifts the bar into a detached pill with a shadow (the rail and the side panel stay). The `#action` slot is the screen's main action and moves with the navigation: round above the bar at the end side, at the top of the rail, extended with its text at the top of the side panel. `select(id, event)` lets a router take over a link
66
+ - **TaoNav** — navigation between the sections of an app: one list of items (`icon`, `href`, `badge`), three looks. `layout="auto"` picks by the width of TaoNav itself (container queries, no JS): a bottom bar below 600px (more than five items: «More» with a menu), a rail with icons below 840px, a side panel with labels from 840px. With the page in its slot it lays the page out: the bar sticks to the bottom (safe area kept), the side list to the top. `floating` lifts the bar into a detached pill with a shadow (the rail and the side panel stay). `indicator="line"` marks the current section with a short accent line instead of a tint. The `#action` slot is the screen's main action and moves with the navigation: round above the bar at the end side, at the top of the rail, extended with its text at the top of the side panel. `select(id, event)` lets a router take over a link
67
67
  - **TaoTooltip** — hover hint. `placement`: `top` / `bottom` / `left` / `right`, each with `-start` / `-end`; flips at the viewport edge
68
68
  - **TaoPopover** — click panel with any slot content, Esc and outside click; `placement` as Tooltip. Not a tooltip, not an action menu
69
69
 
@@ -104,7 +104,7 @@
104
104
 
105
105
  - **TaoTable** — simple table: columns, empty, loading, sort via `v-model:sort`. `head` tints the header, `lines` draws row rules (both on by default). `striped` starts on the first row; `striped="even"` starts on the second. Not a datagrid.
106
106
  - **TaoSparkline** / **TaoMeter** / **TaoDonut** — small charts for a card or a line of text: a trend (`values` with `null` gaps, `area`, `dot`), a measured value in a range (`role="meter"`, coloured by `low` / `high` / `optimum` as the HTML `<meter>`), a share of a whole (`segments`, or one `value` of `max`, `legend`, a centre slot). The series colours are the roles `--tao-color-chart-1…6` (the first is the accent, so palettes recolour them). For axes and tooltips use a chart library: `taoChartTheme()` gives it the theme colours as `rgb()`, `watchTaoChartTheme(apply)` re-applies them on a theme or palette change
107
- - **TaoPagination** — pages with ellipsis. Clicking “…” jumps `jump` pages (5 by default)
107
+ - **TaoPagination** — pages with ellipsis. Clicking “…” jumps `jump` pages (5 by default). `pageSizes` adds a «Per page» choice (`v-model:page-size`); the first row on screen stays on screen
108
108
  - **TaoEmpty** — empty list, no results, no access
109
109
  - **TaoList** / **TaoListItem** — list row: icon, title, caption, hover action. Not Select, not a table
110
110
  - **TaoTree** — files or objects as a tree: `v-model:expanded`, selection `none | single | multiple` (`v-model:selected`), checkboxes with mixed parents (`checkable`, `v-model:checked`), lazy children (`hasChildren` + `load`). ARIA tree: one tab stop, arrows, `→` / `←` in and out, Home / End, `*`, type-ahead. Slots `#icon`, `#label`, `#actions`; rows on the control tokens (size and density)
@@ -398,6 +398,16 @@ There is no overlay `question` in this kit — that is confirm, not toast. Butto
398
398
  toast().info().message('Delete the file?').action('Delete', onRemove)
399
399
  ```
400
400
 
401
+ Work in progress: a spinner while it runs, then the result in the same place.
402
+
403
+ ```javascript
404
+ toast.promise(save(), { loading: 'Saving…', success: 'Saved', error: (e) => `Not saved: ${e.message}` })
405
+
406
+ // by hand: the same id and replace() take its place
407
+ toast().loading().id('sync').message('Syncing…')
408
+ toast().success().id('sync').replace().message('Synced')
409
+ ```
410
+
401
411
  You can skip the viewport: the first call creates it. For explicit control (tests, a custom layout):
402
412
 
403
413
  ```vue
package/README.ru.md CHANGED
@@ -63,7 +63,7 @@
63
63
  - **TaoSpoiler** — раскрывающийся блок. `v-model` и `aria-expanded`. Несколько подряд сами друг друга не закрывают
64
64
  - **TaoSpoilerGroup** — аккордеон: `v-model` — ключ открытой панели (`null` — все закрыты), у спойлера `name`. Без `v-model` группа помнит ключ сама
65
65
  - **TaoTabs** — вкладки для переключения между секциями контента
66
- - **TaoNav** — навигация между разделами приложения: один список пунктов (`icon`, `href`, `badge`), три вида. `layout="auto"` выбирает по ширине самого TaoNav (container queries, без JS): нижняя панель до 600px (больше пяти пунктов: «Ещё» с меню), рейка с иконками до 840px, боковая панель с подписями от 840px. Со страницей в слоте раскладывает её сам: панель прилипает к низу (с учётом безопасной зоны), боковой список к верху. `floating` отрывает нижнюю панель в отдельную «пилюлю» с тенью (рейка и боковая панель не меняются). Слот `#action` — главное действие экрана, оно идёт за навигацией: круглое над панелью у конечного края, наверху рейки, широкое с текстом наверху боковой панели. `select(id, event)` даёт роутеру перехватить ссылку
66
+ - **TaoNav** — навигация между разделами приложения: один список пунктов (`icon`, `href`, `badge`), три вида. `layout="auto"` выбирает по ширине самого TaoNav (container queries, без JS): нижняя панель до 600px (больше пяти пунктов: «Ещё» с меню), рейка с иконками до 840px, боковая панель с подписями от 840px. Со страницей в слоте раскладывает её сам: панель прилипает к низу (с учётом безопасной зоны), боковой список к верху. `floating` отрывает нижнюю панель в отдельную «пилюлю» с тенью (рейка и боковая панель не меняются). `indicator="line"` отмечает текущий раздел короткой чертой акцента вместо подложки. Слот `#action` — главное действие экрана, оно идёт за навигацией: круглое над панелью у конечного края, наверху рейки, широкое с текстом наверху боковой панели. `select(id, event)` даёт роутеру перехватить ссылку
67
67
  - **TaoTooltip** — всплывающая подсказка при наведении. `placement`: `top` / `bottom` / `left` / `right`, у каждого `-start` / `-end`; у края экрана переворачивается
68
68
  - **TaoPopover** — панель по клику: слот с любым контентом, Esc и клик снаружи; `placement` как у Tooltip. Не тултип и не меню действий
69
69
 
@@ -104,7 +104,7 @@
104
104
 
105
105
  - **TaoTable** — простая таблица: колонки, empty, loading, сортировка через `v-model:sort`. `head` — подсветка шапки, `lines` — линии между рядами (оба по умолчанию включены). `striped` — зебра с первой строки, `striped="even"` — со второй. Не datagrid.
106
106
  - **TaoSparkline** / **TaoMeter** / **TaoDonut** — маленькие графики для карточки или строки текста: тренд (`values` с разрывами `null`, `area`, `dot`), измеренное значение в диапазоне (`role="meter"`, цвет по `low` / `high` / `optimum`, как у HTML `<meter>`), доля целого (`segments` или одно `value` из `max`, `legend`, слот в центре). Цвета серий — роли `--tao-color-chart-1…6` (первый — акцент, поэтому палитры их перекрашивают). Для осей и подсказок берите библиотеку графиков: `taoChartTheme()` отдаёт ей цвета темы в `rgb()`, `watchTaoChartTheme(apply)` применяет их заново при смене темы или палитры
107
- - **TaoPagination** — страницы с многоточием. Клик по «…» прыгает на `jump` страниц (5 по умолчанию)
107
+ - **TaoPagination** — страницы с многоточием. Клик по «…» прыгает на `jump` страниц (5 по умолчанию). `pageSizes` добавляет выбор «На странице» (`v-model:page-size`); первая видимая строка остаётся на экране
108
108
  - **TaoEmpty** — пустой список, нет результатов, нет прав
109
109
  - **TaoList** / **TaoListItem** — строка списка: иконка, заголовок, подпись, действие по ховеру. Не Select и не таблица
110
110
  - **TaoTree** — файлы или объекты деревом: `v-model:expanded`, выбор `none | single | multiple` (`v-model:selected`), чекбоксы с промежуточным состоянием родителя (`checkable`, `v-model:checked`), ленивая подгрузка (`hasChildren` + `load`). ARIA tree: одна остановка Tab, стрелки, `→` / `←` внутрь и наружу, Home / End, `*`, поиск по буквам. Слоты `#icon`, `#label`, `#actions`; строки на токенах контролов (размер и плотность)
@@ -398,6 +398,16 @@ toast.byBottomRight()
398
398
  toast().info().message('Удалить файл?').action('Удалить', onRemove)
399
399
  ```
400
400
 
401
+ Идёт работа: кольцо, пока она идёт, потом результат на том же месте.
402
+
403
+ ```javascript
404
+ toast.promise(save(), { loading: 'Сохраняю…', success: 'Сохранено', error: (e) => `Не сохранено: ${e.message}` })
405
+
406
+ // вручную: тот же id и replace() встают на его место
407
+ toast().loading().id('sync').message('Синхронизирую…')
408
+ toast().success().id('sync').replace().message('Синхронизировано')
409
+ ```
410
+
401
411
  Viewport можно не вставлять: первый вызов сам создаст его. Если нужен явный контроль (тесты, свой layout):
402
412
 
403
413
  ```vue
package/dist/index.d.ts CHANGED
@@ -40,10 +40,10 @@ onClick?: ((event: MouseEvent) => any) | undefined;
40
40
  }>, {
41
41
  type: "button" | "submit" | "reset";
42
42
  icon: string;
43
+ loading: boolean;
43
44
  tone: TaoToneName;
44
45
  disabled: boolean;
45
46
  variant: "primary" | "secondary" | "ghost" | "text";
46
- loading: boolean;
47
47
  block: boolean;
48
48
  iconEnd: string;
49
49
  minWidth: number | string;
@@ -1089,6 +1089,13 @@ moreLabel?: string;
1089
1089
  * Рейка и боковая панель не меняются.
1090
1090
  */
1091
1091
  floating?: boolean;
1092
+ /**
1093
+ * How the current section is marked: `pill` — a tint behind the item; `line` — the accent colour and a short line
1094
+ * (under the item in the bar look, along its start edge in the rail and the side panel).
1095
+ * Как отмечен текущий раздел: `pill` — подложка под пунктом; `line` — цвет акцента и короткая черта (под пунктом
1096
+ * в виде панели, вдоль его начального края в рейке и боковой панели).
1097
+ */
1098
+ indicator?: "pill" | "line";
1092
1099
  }>, {
1093
1100
  modelValue: undefined;
1094
1101
  layout: string;
@@ -1096,6 +1103,7 @@ maxBarItems: number;
1096
1103
  ariaLabel: undefined;
1097
1104
  moreLabel: undefined;
1098
1105
  floating: boolean;
1106
+ indicator: string;
1099
1107
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1100
1108
  select: (id: string, event: Event) => void;
1101
1109
  "update:modelValue": (id: string) => void;
@@ -1117,6 +1125,13 @@ moreLabel?: string;
1117
1125
  * Рейка и боковая панель не меняются.
1118
1126
  */
1119
1127
  floating?: boolean;
1128
+ /**
1129
+ * How the current section is marked: `pill` — a tint behind the item; `line` — the accent colour and a short line
1130
+ * (under the item in the bar look, along its start edge in the rail and the side panel).
1131
+ * Как отмечен текущий раздел: `pill` — подложка под пунктом; `line` — цвет акцента и короткая черта (под пунктом
1132
+ * в виде панели, вдоль его начального края в рейке и боковой панели).
1133
+ */
1134
+ indicator?: "pill" | "line";
1120
1135
  }>, {
1121
1136
  modelValue: undefined;
1122
1137
  layout: string;
@@ -1124,12 +1139,14 @@ maxBarItems: number;
1124
1139
  ariaLabel: undefined;
1125
1140
  moreLabel: undefined;
1126
1141
  floating: boolean;
1142
+ indicator: string;
1127
1143
  }>>> & Readonly<{
1128
1144
  onSelect?: ((id: string, event: Event) => any) | undefined;
1129
1145
  "onUpdate:modelValue"?: ((id: string) => any) | undefined;
1130
1146
  }>, {
1131
1147
  ariaLabel: string;
1132
1148
  modelValue: string;
1149
+ indicator: "pill" | "line";
1133
1150
  layout: TaoNavLayout;
1134
1151
  maxBarItems: number;
1135
1152
  moreLabel: string;
@@ -1905,9 +1922,9 @@ onChange?: ((value: boolean) => any) | undefined;
1905
1922
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
1906
1923
  }>, {
1907
1924
  label: string;
1925
+ loading: boolean;
1908
1926
  disabled: boolean;
1909
1927
  error: boolean;
1910
- loading: boolean;
1911
1928
  modelValue: boolean;
1912
1929
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1913
1930
 
@@ -2212,8 +2229,8 @@ onChange?: ((value: TaoTableSort | null) => any) | undefined;
2212
2229
  sort: TaoTableSort | null;
2213
2230
  caption: string;
2214
2231
  head: boolean;
2215
- hover: boolean;
2216
2232
  loading: boolean;
2233
+ hover: boolean;
2217
2234
  sticky: boolean;
2218
2235
  rows: Record<string, unknown>[];
2219
2236
  maxHeight: TaoLength;
@@ -2320,6 +2337,14 @@ jumpPrevLabel?: string;
2320
2337
  jumpNextLabel?: string;
2321
2338
  goToText?: string;
2322
2339
  goToLabel?: string;
2340
+ /**
2341
+ * The page sizes to choose from (`[10, 20, 50]`): a «Per page» choice next to the total, `v-model:page-size`.
2342
+ * On a change the page moves so the first row on screen stays on screen.
2343
+ * Размеры страницы на выбор: выбор «На странице» рядом с итогом, `v-model:page-size`. При смене страница
2344
+ * сдвигается так, чтобы первая видимая строка осталась на экране.
2345
+ */
2346
+ pageSizes?: number[];
2347
+ perPageText?: string;
2323
2348
  }>, {
2324
2349
  page: number;
2325
2350
  total: number;
@@ -2332,6 +2357,7 @@ pageInput: boolean;
2332
2357
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2333
2358
  change: (value: number) => void;
2334
2359
  "update:page": (value: number) => void;
2360
+ "update:pageSize": (value: number) => void;
2335
2361
  }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_62<__VLS_TypePropsToRuntimeProps_67<{
2336
2362
  page?: number;
2337
2363
  total?: number;
@@ -2360,6 +2386,14 @@ jumpPrevLabel?: string;
2360
2386
  jumpNextLabel?: string;
2361
2387
  goToText?: string;
2362
2388
  goToLabel?: string;
2389
+ /**
2390
+ * The page sizes to choose from (`[10, 20, 50]`): a «Per page» choice next to the total, `v-model:page-size`.
2391
+ * On a change the page moves so the first row on screen stays on screen.
2392
+ * Размеры страницы на выбор: выбор «На странице» рядом с итогом, `v-model:page-size`. При смене страница
2393
+ * сдвигается так, чтобы первая видимая строка осталась на экране.
2394
+ */
2395
+ pageSizes?: number[];
2396
+ perPageText?: string;
2363
2397
  }>, {
2364
2398
  page: number;
2365
2399
  total: number;
@@ -2372,6 +2406,7 @@ pageInput: boolean;
2372
2406
  }>>> & Readonly<{
2373
2407
  onChange?: ((value: number) => any) | undefined;
2374
2408
  "onUpdate:page"?: ((value: number) => any) | undefined;
2409
+ "onUpdate:pageSize"?: ((value: number) => any) | undefined;
2375
2410
  }>, {
2376
2411
  disabled: boolean;
2377
2412
  page: number;
@@ -6402,6 +6437,8 @@ export declare interface TaoLocale {
6402
6437
  goToText: string;
6403
6438
  /** `{count}` — the number of pages. / число страниц. */
6404
6439
  goToLabel: string;
6440
+ /** The caption of the page size choice (5.7); optional for locales written before. / Подпись выбора размера страницы. */
6441
+ perPageText?: string;
6405
6442
  /** `{from}`, `{to}`, `{total}`. */
6406
6443
  totalText: string;
6407
6444
  /** When there are no rows. / Когда строк нет. */
@@ -7206,6 +7243,13 @@ export declare interface TaoToastApi {
7206
7243
  byBottomLeft(): TaoToastApi;
7207
7244
  byBottomRight(): TaoToastApi;
7208
7245
  dismiss(id?: string): void;
7246
+ /**
7247
+ * A toast that follows a promise: `loading` while it runs, then `success` or `error` in its place. Returns the same
7248
+ * promise. `toast.promise(save(), { loading: 'Saving…', success: 'Saved', error: (e) => `Not saved: ${e}` })`.
7249
+ * Тост, который следует за промисом: `loading`, пока он идёт, потом `success` или `error` на его месте. Возвращает
7250
+ * тот же промис.
7251
+ */
7252
+ promise<T>(promise: Promise<T>, texts: TaoToastPromiseTexts<T>, options?: Pick<TaoToastShortcutOptions, 'title' | 'position' | 'id'>): Promise<T>;
7209
7253
  }
7210
7254
 
7211
7255
  export declare interface TaoToastBuilder {
@@ -7236,6 +7280,13 @@ export declare interface TaoToastBuilder {
7236
7280
  replace(): TaoToastBuilder;
7237
7281
  action(label: string, onClick: () => void): TaoToastBuilder;
7238
7282
  onClosed(fn: () => void): TaoToastBuilder;
7283
+ /**
7284
+ * Work in progress: a spinner, no timeout. Finish it with a toast of the same `id` and `replace()`, which takes its
7285
+ * place, or use `toast.promise`.
7286
+ * Идёт работа: кольцо, без таймаута. Завершите тостом с тем же `id` и `replace()`, он встанет на его место, или
7287
+ * используйте `toast.promise`.
7288
+ */
7289
+ loading(): TaoToastBuilder;
7239
7290
  }
7240
7291
 
7241
7292
  export declare interface TaoToastDefaults {
@@ -7252,6 +7303,13 @@ export declare type TaoToastDisplayMode = 'once' | 'replace';
7252
7303
 
7253
7304
  export declare type TaoToastPosition = 'topRight' | 'topLeft' | 'topCenter' | 'bottomRight' | 'bottomLeft' | 'bottomCenter' | 'center';
7254
7305
 
7306
+ /** The texts of `toast.promise`: a function gets the result or the error. / Тексты `toast.promise`. */
7307
+ export declare interface TaoToastPromiseTexts<T> {
7308
+ loading: string;
7309
+ success: string | ((value: T) => string);
7310
+ error: string | ((error: unknown) => string);
7311
+ }
7312
+
7255
7313
  export declare interface TaoToastRecord {
7256
7314
  id: string;
7257
7315
  type: TaoToastType;
@@ -7267,6 +7325,8 @@ export declare interface TaoToastRecord {
7267
7325
  dedupeId?: string;
7268
7326
  actions: TaoToastAction[];
7269
7327
  onClosed?: () => void;
7328
+ /** Work in progress: a spinner instead of the icon, no timeout. / Идёт работа: кольцо вместо иконки, без таймаута. */
7329
+ loading?: boolean;
7270
7330
  }
7271
7331
 
7272
7332
  export declare interface TaoToastShortcutOptions {