@1337exp/taoui 5.30.2 → 5.31.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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.31.0
4
+
5
+ Nothing to migrate: `overflow` is off by default, and a toolbar without it works as before.
6
+
7
+ - **`TaoToolbar` `overflow`: one row, the rest under «⋮».** The bar no longer wraps onto a second line (the height jumped, a phone lost half the screen). The `TaoToolbarGroup`s that do not fit go, the last one first, each with the separator before it, under a «⋮» button that shows only when something is hidden and opens them in a panel. They are the same elements as in the bar, teleported, not copies: a toggle keeps its state, `pressed`, `disabled`, `title`, `shortcut` and events work as they did. A group with `pinned` never goes; loose items (a `TaoSegmented`, a lone button) stay too. Only whole groups go, and only in a horizontal bar. The bar is measured before the first paint and follows the width (`ResizeObserver`), the set of groups and the size; the width of a group that went is remembered from when it was in the row. Without `window` (SSR) every group is drawn as it is.
8
+ - **Keys and focus.** `role="toolbar"` stays; the arrows, Home and End walk the visible buttons and «⋮» (a folded group is not a stop). «⋮» is a button with `aria-label` (`overflowLabel`, the locale says «More» / «Ещё»), `aria-haspopup="dialog"` and `aria-expanded`; Enter / Space opens the panel, the first button gets the focus, Escape closes it and gives the focus back to «⋮». A press outside closes it, except on a panel above it (a list opened by a button inside it) and on what carries `data-tao-keep-open`. If the button that had the focus goes under «⋮» as the bar narrows, the focus moves to «⋮» instead of vanishing.
9
+ - **A list that hangs from a button of a folded group.** The button is the same element in the bar and in the panel, so what hangs from it (`TaoPopover`, your own list) is anchored to what the person sees. For opening a list from the keyboard shortcut of a button that is folded, `toolbar.reveal(el)` (through a ref) opens the panel if needed and returns the same element.
10
+ - **`TaoToolbar` with `overflow` fills the width it is given** (`width: 100%`), not `fit-content`: that width is what it measures, and a bar that shrank with the folded groups would never unfold them.
11
+
3
12
  ## 5.30.2
4
13
 
5
14
  Nothing to migrate; the text of the skill only.
package/README.md CHANGED
@@ -136,7 +136,7 @@
136
136
  - **TaoBreadcrumb** — crumbs: the last item is the current page
137
137
  - **TaoDropdownMenu** / **TaoMenu** — a menu from a plain data tree `items`: submenus, checkboxes, radios, separators, group labels, shortcuts to show, disabled items. Arrows, Home / End, type-ahead, `→` / `←` for submenus, Esc closes the top level first. `TaoMenu` is the panel itself, for your own shells (a menu bar, a context menu); flips at the viewport edge; `size` makes the button a compact square, `:tabbable="false"` takes it out of the Tab order
138
138
  - **TaoMenubar** / **TaoContextMenu** — the menu bar of an editor and the menu on the right click, on `TaoMenu`. The bar is one tab stop (`role="menubar"`): `←` / `→` walk it, `↓` / Enter open, with a menu open `←` / `→` and the pointer move to the neighbour menu; an entry without `items` is a plain action. The context menu opens at the pointer (or at the element for the Menu key / Shift+F10) and wraps its content without a box of its own
139
- - **TaoToolbar** / **TaoToolbarGroup** / **TaoToolbarSeparator** — a bar of tools (`role="toolbar"`): one tab stop, `←` / `→` (or `↑` / `↓` when `orientation="vertical"`) walk the items, Home / End; inside a `TaoSegmented` the arrows pick the option and go on from its edge. Groups are split by a thin line across the bar; `inset` puts a sunken pill behind a group. Toggles are `TaoButton` with `v-model:pressed`
139
+ - **TaoToolbar** / **TaoToolbarGroup** / **TaoToolbarSeparator** — a bar of tools (`role="toolbar"`): one tab stop, `←` / `→` (or `↑` / `↓` when `orientation="vertical"`) walk the items, Home / End; inside a `TaoSegmented` the arrows pick the option and go on from its edge. Groups are split by a thin line across the bar; `inset` puts a sunken pill behind a group. Toggles are `TaoButton` with `v-model:pressed`. `overflow` keeps the bar in one row: the groups that do not fit go, the last one first, under a «⋮» button that opens them in a panel (the same buttons, not copies); a `TaoToolbarGroup` with `pinned` stays
140
140
  - **TaoScrollTop** — floating “back to top”: `solid` / `ghost` / `text` looks, `side`, a mouse-hover `label`. Appears on reverse scroll after `boundary`
141
141
 
142
142
  ### Feedback
package/README.ru.md CHANGED
@@ -136,7 +136,7 @@
136
136
  - **TaoBreadcrumb** — крошки: последний пункт — текущая страница
137
137
  - **TaoDropdownMenu** / **TaoMenu** — меню из простого дерева данных `items`: подменю, чекбоксы, радио, разделители, подписи групп, сочетания для показа, недоступные пункты. Стрелки, Home / End, быстрый поиск по букве, `→` / `←` для подменю, Esc закрывает верхний уровень первым. `TaoMenu` — сама панель для своих оболочек (полоса меню, контекстное меню); у края экрана переворачивается; `size` делает кнопку компактным квадратом, `:tabbable="false"` убирает её из порядка Tab
138
138
  - **TaoMenubar** / **TaoContextMenu** — полоса меню редактора и меню по правой кнопке, на `TaoMenu`. Полоса — одна остановка Tab (`role="menubar"`): `←` / `→` ходят по ней, `↓` / Enter открывают, при открытом меню `←` / `→` и указатель переходят к соседнему; пункт без `items` — обычное действие. Контекстное меню открывается у указателя (или у элемента для клавиши Menu / Shift+F10) и оборачивает содержимое без своей коробки
139
- - **TaoToolbar** / **TaoToolbarGroup** / **TaoToolbarSeparator** — панель инструментов (`role="toolbar"`): одна остановка Tab, `←` / `→` (или `↑` / `↓` при `orientation="vertical"`) ходят по элементам, Home / End; внутри `TaoSegmented` стрелки выбирают вариант и идут дальше с его края. Группы делит тонкая черта поперёк панели; `inset` кладёт под группу утопленную подложку. Переключатели — `TaoButton` с `v-model:pressed`
139
+ - **TaoToolbar** / **TaoToolbarGroup** / **TaoToolbarSeparator** — панель инструментов (`role="toolbar"`): одна остановка Tab, `←` / `→` (или `↑` / `↓` при `orientation="vertical"`) ходят по элементам, Home / End; внутри `TaoSegmented` стрелки выбирают вариант и идут дальше с его края. Группы делит тонкая черта поперёк панели; `inset` кладёт под группу утопленную подложку. Переключатели — `TaoButton` с `v-model:pressed`. `overflow` держит панель в одной строке: группы, которые не влезли, уходят (последняя первой) под кнопку «⋮», она открывает их в панели (те же кнопки, а не копии); `TaoToolbarGroup` с `pinned` остаётся
140
140
  - **TaoScrollTop** — плавающая кнопка «наверх»: виды `solid` / `ghost` / `text`, `side`, подпись `label` при наведении мыши. Появляется при обратном скролле после `boundary`
141
141
 
142
142
  ### Обратная связь
package/dist/index.d.ts CHANGED
@@ -1118,13 +1118,26 @@ orientation?: TaoToolbarOrientation;
1118
1118
  variant?: "panel" | "plain";
1119
1119
  /** The frame of a `panel`; not set, it follows the frames context (`.tao-frames-soft`). / Рамка `panel`; не задан — идёт за контекстом рамок. */
1120
1120
  bordered?: boolean;
1121
+ /**
1122
+ * One row, never wrapped: the groups (`TaoToolbarGroup`) that do not fit go, the last one first, under a «more» button that
1123
+ * opens them in a panel. A group with `pinned` stays. Horizontal bars only.
1124
+ * Одна строка без переноса: группы, которые не влезли, уходят (последняя первой) под кнопку «more», которая открывает их
1125
+ * в панели. Группа с `pinned` остаётся. Только горизонтальные панели.
1126
+ */
1127
+ overflow?: boolean;
1128
+ /** Name of the «more» button; not set, the text of the locale. / Имя кнопки «more»; не задано — текст локали. */
1129
+ overflowLabel?: string;
1121
1130
  }>, {
1122
1131
  label: undefined;
1123
1132
  size: undefined;
1124
1133
  orientation: string;
1125
1134
  variant: string;
1126
1135
  bordered: undefined;
1127
- }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_37<__VLS_TypePropsToRuntimeProps_41<{
1136
+ overflow: boolean;
1137
+ overflowLabel: undefined;
1138
+ }>>, {
1139
+ reveal: typeof reveal;
1140
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_37<__VLS_TypePropsToRuntimeProps_41<{
1128
1141
  /** Accessible name: «Formatting», «Tools». / Доступное имя: «Форматирование», «Инструменты». */
1129
1142
  label?: string;
1130
1143
  /** The controls inside, as for any control. / Размер контролов внутри, как у любого контрола. */
@@ -1135,18 +1148,31 @@ orientation?: TaoToolbarOrientation;
1135
1148
  variant?: "panel" | "plain";
1136
1149
  /** The frame of a `panel`; not set, it follows the frames context (`.tao-frames-soft`). / Рамка `panel`; не задан — идёт за контекстом рамок. */
1137
1150
  bordered?: boolean;
1151
+ /**
1152
+ * One row, never wrapped: the groups (`TaoToolbarGroup`) that do not fit go, the last one first, under a «more» button that
1153
+ * opens them in a panel. A group with `pinned` stays. Horizontal bars only.
1154
+ * Одна строка без переноса: группы, которые не влезли, уходят (последняя первой) под кнопку «more», которая открывает их
1155
+ * в панели. Группа с `pinned` остаётся. Только горизонтальные панели.
1156
+ */
1157
+ overflow?: boolean;
1158
+ /** Name of the «more» button; not set, the text of the locale. / Имя кнопки «more»; не задано — текст локали. */
1159
+ overflowLabel?: string;
1138
1160
  }>, {
1139
1161
  label: undefined;
1140
1162
  size: undefined;
1141
1163
  orientation: string;
1142
1164
  variant: string;
1143
1165
  bordered: undefined;
1166
+ overflow: boolean;
1167
+ overflowLabel: undefined;
1144
1168
  }>>> & Readonly<{}>, {
1145
1169
  size: TaoSize;
1146
1170
  label: string;
1147
1171
  bordered: boolean;
1148
1172
  variant: "panel" | "plain";
1173
+ overflow: boolean;
1149
1174
  orientation: TaoToolbarOrientation;
1175
+ overflowLabel: string;
1150
1176
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1151
1177
 
1152
1178
  declare const __VLS_component_4: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_4<{
@@ -1162,20 +1188,27 @@ declare const __VLS_component_40: DefineComponent<ExtractPropTypes<__VLS_WithDef
1162
1188
  label?: string;
1163
1189
  /** A sunken pill behind the group: its buttons read as one set. / Утопленная подложка: кнопки читаются как набор. */
1164
1190
  inset?: boolean;
1191
+ /** In a toolbar with `overflow`: this group never goes to the «⋮» menu. / В панели с `overflow`: эта группа не уходит в меню «⋮». */
1192
+ pinned?: boolean;
1165
1193
  }>, {
1166
1194
  label: undefined;
1167
1195
  inset: boolean;
1196
+ pinned: boolean;
1168
1197
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_38<__VLS_TypePropsToRuntimeProps_42<{
1169
1198
  /** Accessible name of the group: «Text style», «Alignment». / Доступное имя группы. */
1170
1199
  label?: string;
1171
1200
  /** A sunken pill behind the group: its buttons read as one set. / Утопленная подложка: кнопки читаются как набор. */
1172
1201
  inset?: boolean;
1202
+ /** In a toolbar with `overflow`: this group never goes to the «⋮» menu. / В панели с `overflow`: эта группа не уходит в меню «⋮». */
1203
+ pinned?: boolean;
1173
1204
  }>, {
1174
1205
  label: undefined;
1175
1206
  inset: boolean;
1207
+ pinned: boolean;
1176
1208
  }>>> & Readonly<{}>, {
1177
1209
  label: string;
1178
1210
  inset: boolean;
1211
+ pinned: boolean;
1179
1212
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1180
1213
 
1181
1214
  declare const __VLS_component_41: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_41<__VLS_TypePropsToRuntimeProps_45<{
@@ -6611,6 +6644,14 @@ export declare function registerTaoIcons(icons: Record<string, TaoIconDef>): voi
6611
6644
  */
6612
6645
  export declare function resolveTourTarget(target: TaoTourStep['target'], root?: ParentNode): HTMLElement | null;
6613
6646
 
6647
+ /**
6648
+ * Makes a control of the bar visible and returns it: a control of a group that went under «more» opens the menu first. The element
6649
+ * is the same one in both places, so an app that anchors a list to a button anchors it to what the person sees.
6650
+ * Делает элемент панели видимым и возвращает его: элемент группы, ушедшей под «more», сначала открывает меню. Элемент один и
6651
+ * тот же в обоих местах, поэтому список, привязанный к кнопке, привязан к тому, что видит человек.
6652
+ */
6653
+ declare function reveal<T extends HTMLElement>(el: T): Promise<T>;
6654
+
6614
6655
  /** Цвет: r, g, b от 0 до 255, a (прозрачность) от 0 до 1. Это обычный sRGB, как в CSS. */
6615
6656
  export declare interface Rgba {
6616
6657
  r: number;
@@ -7314,6 +7355,9 @@ export declare interface TaoLocale {
7314
7355
  modal: {
7315
7356
  closeLabel: string;
7316
7357
  };
7358
+ toolbar: {
7359
+ overflowLabel: string;
7360
+ };
7317
7361
  pagination: {
7318
7362
  ariaLabel: string;
7319
7363
  prevLabel: string;