@zeyos/zx 5.6.0 → 5.7.1
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 +188 -0
- package/README.md +73 -7
- package/bin/zx-css.js +328 -0
- package/dist/types/components/account-menu/account-menu.d.ts +4 -2
- package/dist/types/components/activity-list/activity-list.d.ts +14 -8
- package/dist/types/components/agent-thread/ag-ui.d.ts +340 -0
- package/dist/types/components/agent-thread/agent-thread.d.ts +142 -14
- package/dist/types/components/agent-thread/ui-message-stream.d.ts +401 -0
- package/dist/types/components/app-sidebar/app-sidebar.d.ts +14 -8
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +3 -3
- package/dist/types/components/calendar/calendar-model.d.ts +9 -2
- package/dist/types/components/calendar/calendar.d.ts +12 -4
- package/dist/types/components/chart/chart.d.ts +25 -13
- package/dist/types/components/checklist/checklist.d.ts +29 -0
- package/dist/types/components/code-editor/code-editor.d.ts +7 -2
- package/dist/types/components/composer/composer.d.ts +206 -4
- package/dist/types/components/composer/queue.d.ts +76 -0
- package/dist/types/components/copy/copy-button.d.ts +6 -4
- package/dist/types/components/copy/copy-input.d.ts +10 -6
- package/dist/types/components/datebox/date-range-box.d.ts +33 -0
- package/dist/types/components/datebox/placeholder.d.ts +7 -0
- package/dist/types/components/dialog/dialog.d.ts +2 -2
- package/dist/types/components/dock/dock.d.ts +12 -3
- package/dist/types/components/entity-ref/entity-ref.d.ts +5 -3
- package/dist/types/components/field-upload/field-upload.d.ts +3 -2
- package/dist/types/components/file-item/file-item.d.ts +3 -2
- package/dist/types/components/file-list/file-list.d.ts +14 -8
- package/dist/types/components/filter/filter-model.d.ts +31 -1
- package/dist/types/components/filter/filter.d.ts +20 -2
- package/dist/types/components/finder/finder.d.ts +14 -6
- package/dist/types/components/flag/flag.d.ts +99 -0
- package/dist/types/components/grid/grid.d.ts +1 -1
- package/dist/types/components/kanban-view/kanban-view.d.ts +8 -66
- package/dist/types/components/launcher/launcher.d.ts +2 -0
- package/dist/types/components/modal/modal.d.ts +34 -8
- package/dist/types/components/multi-value-editor/multi-value-editor.d.ts +3 -2
- package/dist/types/components/number-field/number-field.d.ts +41 -7
- package/dist/types/components/prompt-starters/prompt-starters.d.ts +107 -0
- package/dist/types/components/prose/prose.d.ts +9 -6
- package/dist/types/components/questionnaire/conditions.d.ts +270 -0
- package/dist/types/components/questionnaire/items.d.ts +52 -30
- package/dist/types/components/questionnaire/questionnaire.d.ts +44 -4
- package/dist/types/components/rating/rating.d.ts +5 -3
- package/dist/types/components/select/country.d.ts +106 -0
- package/dist/types/components/select/field-adapter.d.ts +2 -1
- package/dist/types/components/select/locale.d.ts +102 -0
- package/dist/types/components/select/select.d.ts +41 -2
- package/dist/types/components/sheet/sheet.d.ts +2 -2
- package/dist/types/components/slider/slider.d.ts +1 -0
- package/dist/types/components/sort-control/sort-control.d.ts +7 -3
- package/dist/types/components/source-list/source-list.d.ts +7 -5
- package/dist/types/components/split-view/split-view.d.ts +5 -3
- package/dist/types/components/surface/catalog.d.ts +260 -0
- package/dist/types/components/surface/elicit.d.ts +81 -0
- package/dist/types/components/surface/mcp.d.ts +165 -0
- package/dist/types/components/surface/schema.d.ts +314 -0
- package/dist/types/components/surface/stream.d.ts +118 -0
- package/dist/types/components/surface/surface.d.ts +718 -0
- package/dist/types/components/surface/text.d.ts +277 -0
- package/dist/types/components/surface/validate.d.ts +339 -0
- package/dist/types/components/table/table.d.ts +55 -3
- package/dist/types/components/table/window.d.ts +203 -0
- package/dist/types/components/toolbar/toolbar.d.ts +10 -6
- package/dist/types/components/tooltip/tooltip.d.ts +2 -2
- package/dist/types/components/tree/tree.d.ts +20 -13
- package/dist/types/core/component.d.ts +10 -0
- package/dist/types/core/date.d.ts +8 -1
- package/dist/types/core/dom.d.ts +15 -0
- package/dist/types/core/http.d.ts +10 -0
- package/dist/types/core/i18n.d.ts +38 -0
- package/dist/types/core/messages.d.ts +344 -1
- package/dist/types/core/storage.d.ts +7 -2
- package/dist/types/elements/define.d.ts +21 -46
- package/dist/types/elements/definitions.d.ts +147 -0
- package/dist/types/elements/kit.d.ts +7 -0
- package/dist/types/elements/reflect.d.ts +6 -3
- package/dist/types/index.d.ts +10 -1
- package/dist/types/internal/date-locale.d.ts +7 -0
- package/dist/types/internal/json-patch.d.ts +146 -0
- package/dist/types/locales/de.d.ts +13 -0
- package/dist/types/locales/en.d.ts +2 -0
- package/dist/types/locales/index.d.ts +823 -0
- package/dist/types/zeyos/view.d.ts +8 -1
- package/dist/zx-zeyos.esm.js +16852 -15131
- package/dist/zx-zeyos.esm.min.js +5 -5
- package/dist/zx.core.css +1276 -0
- package/dist/zx.core.min.css +1 -0
- package/dist/zx.css +520 -143
- package/dist/zx.esm.js +40940 -29684
- package/dist/zx.esm.min.js +36 -23
- package/dist/zx.global.js +40940 -29684
- package/dist/zx.global.min.js +36 -23
- package/dist/zx.layered.css +17315 -0
- package/dist/zx.layered.min.css +1 -0
- package/dist/zx.min.css +1 -1
- package/docs/agent-catalog.json +12501 -0
- package/docs/agent-surfaces.md +340 -0
- package/docs/api.json +909 -137
- package/docs/llms.md +1046 -80
- package/docs/llms.txt +30 -9
- package/package.json +29 -6
- package/src/components/account-menu/account-menu.js +6 -3
- package/src/components/activity-item/activity-item.js +2 -1
- package/src/components/activity-list/activity-list.js +16 -10
- package/src/components/agent-thread/ag-ui.js +1439 -0
- package/src/components/agent-thread/agent-thread.js +359 -54
- package/src/components/agent-thread/ui-message-stream.js +1281 -0
- package/src/components/app-sidebar/app-sidebar.js +18 -8
- package/src/components/approval-card/approval-card.js +3 -2
- package/src/components/block-view/block-view.js +7 -6
- package/src/components/breadcrumb/breadcrumb.js +8 -5
- package/src/components/button/button.css +24 -11
- package/src/components/calendar/calendar-model.js +8 -2
- package/src/components/calendar/calendar.js +53 -18
- package/src/components/chart/chart.js +54 -23
- package/src/components/checklist/checklist.css +9 -1
- package/src/components/checklist/checklist.js +59 -3
- package/src/components/checklist/field-adapter.js +2 -11
- package/src/components/code-editor/code-editor.js +45 -8
- package/src/components/code-editor/field-adapter.js +1 -1
- package/src/components/composer/composer.css +80 -1
- package/src/components/composer/composer.js +390 -16
- package/src/components/composer/queue.js +78 -0
- package/src/components/context-menu/context-menu.js +12 -1
- package/src/components/copy/copy-button.js +9 -7
- package/src/components/copy/copy-input.js +10 -6
- package/src/components/date-picker/date-picker.js +2 -1
- package/src/components/date-picker/date-range-picker.js +8 -7
- package/src/components/datebox/date-range-box.js +3 -9
- package/src/components/datebox/datebox.js +18 -21
- package/src/components/datebox/placeholder.js +18 -0
- package/src/components/dialog/dialog.js +4 -5
- package/src/components/dock/dock.js +34 -13
- package/src/components/entity-ref/entity-ref.js +16 -5
- package/src/components/field-upload/field-upload.js +81 -38
- package/src/components/file-item/file-item.js +70 -40
- package/src/components/file-list/file-list.js +15 -9
- package/src/components/filter/filter-model.js +46 -8
- package/src/components/filter/filter.css +3 -3
- package/src/components/filter/filter.js +29 -10
- package/src/components/filter-panel/filter-panel.js +13 -5
- package/src/components/finder/finder.js +50 -26
- package/src/components/flag/flag.css +40 -0
- package/src/components/flag/flag.js +177 -0
- package/src/components/form/form.js +1 -1
- package/src/components/grid/grid.js +22 -8
- package/src/components/kanban-view/kanban-view.js +51 -81
- package/src/components/launcher/launcher.js +17 -2
- package/src/components/list-toolbar/list-toolbar.js +2 -1
- package/src/components/master-panel/master-panel.js +1 -1
- package/src/components/menu-button/menu-button.js +4 -0
- package/src/components/message/message.js +3 -0
- package/src/components/modal/modal.js +62 -8
- package/src/components/multi-value-editor/multi-value-editor.js +10 -9
- package/src/components/navigation-bar/navigation-bar.js +3 -3
- package/src/components/number-field/number-field.js +98 -29
- package/src/components/prompt-starters/prompt-starters.css +91 -0
- package/src/components/prompt-starters/prompt-starters.js +206 -0
- package/src/components/prose/prose.js +14 -10
- package/src/components/questionnaire/conditions.js +666 -0
- package/src/components/questionnaire/items.js +150 -41
- package/src/components/questionnaire/questionnaire.js +126 -32
- package/src/components/rating/rating.js +5 -4
- package/src/components/run-status/run-status.js +2 -2
- package/src/components/select/country.js +136 -0
- package/src/components/select/field-adapter.js +7 -2
- package/src/components/select/locale.js +219 -0
- package/src/components/select/select.css +20 -22
- package/src/components/select/select.js +94 -12
- package/src/components/sheet/sheet-stack.js +10 -1
- package/src/components/sheet/sheet.js +12 -5
- package/src/components/slider/slider.js +7 -2
- package/src/components/sort-control/sort-control.js +15 -5
- package/src/components/source-list/source-list.js +7 -4
- package/src/components/split-view/split-view.js +5 -3
- package/src/components/surface/catalog.js +1334 -0
- package/src/components/surface/elicit.js +107 -0
- package/src/components/surface/mcp.js +243 -0
- package/src/components/surface/schema.js +644 -0
- package/src/components/surface/stream.js +245 -0
- package/src/components/surface/surface.css +308 -0
- package/src/components/surface/surface.js +2291 -0
- package/src/components/surface/text.js +513 -0
- package/src/components/surface/validate.js +2218 -0
- package/src/components/tabbox/tabbox.js +9 -0
- package/src/components/table/table.css +63 -3
- package/src/components/table/table.js +167 -28
- package/src/components/table/window.js +317 -0
- package/src/components/toolbar/toolbar.js +12 -7
- package/src/components/tooltip/tooltip.css +2 -3
- package/src/components/tooltip/tooltip.js +32 -5
- package/src/components/tree/tree.js +53 -23
- package/src/core/component.js +25 -1
- package/src/core/date.js +62 -16
- package/src/core/dom.js +67 -4
- package/src/core/format.js +15 -13
- package/src/core/http.js +29 -20
- package/src/core/i18n.js +83 -10
- package/src/core/icons.js +13 -2
- package/src/core/keyboard.js +79 -8
- package/src/core/messages.js +376 -2
- package/src/core/overlay-host.js +1 -0
- package/src/core/position.js +3 -2
- package/src/core/storage.js +59 -6
- package/src/elements/define.js +178 -130
- package/src/elements/definitions.js +229 -0
- package/src/elements/kit.js +444 -0
- package/src/elements/reflect.js +8 -3
- package/src/index.js +10 -1
- package/src/internal/date-locale.js +11 -0
- package/src/internal/json-patch.js +405 -0
- package/src/locales/de.js +911 -0
- package/src/locales/en.js +2 -0
- package/src/locales/index.js +7 -0
- package/src/zeyos/calendar.js +2 -1
- package/src/zeyos/form.js +2 -1
- package/src/zeyos/launcher.js +7 -6
- package/src/zeyos/module-bar.js +2 -1
- package/src/zeyos/schema.js +37 -23
- package/src/zeyos/select.js +4 -3
- package/src/zeyos/table.js +2 -13
- package/src/zeyos/view.js +57 -17
- package/styles/core.css +11 -0
- package/styles/tokens/semantic.css +1 -0
- package/styles/zeyos.css +2 -0
- package/styles/zx.css +4 -8
- package/styles/zx.layered.css +1 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from '../../core/component.js';
|
|
2
|
+
import { RowWindow } from './window.js';
|
|
2
3
|
export type TableRow = Record<string, any>;
|
|
3
4
|
export type TableSortDirection = 'asc' | 'desc';
|
|
4
5
|
export type TableSelectionMode = false | 'single' | 'multi';
|
|
@@ -217,6 +218,18 @@ export type TableOptions = {
|
|
|
217
218
|
* of rows — costs more to lay out than anyone will ever scroll through.
|
|
218
219
|
*/
|
|
219
220
|
growing?: false | number;
|
|
221
|
+
/**
|
|
222
|
+
* Windowed rendering: only the rows in view and one viewport of
|
|
223
|
+
* overscan above and below are in the DOM, with spacer rows keeping the scroll height. The table
|
|
224
|
+
* stays one grid over all of its rows, so this implies `interactive`, the header checkbox and
|
|
225
|
+
* Ctrl/Cmd+A take every row, drawn or not, and the row that has focus or is being edited stays drawn
|
|
226
|
+
* wherever it is. It needs a bounded scroll region: give it `height`,
|
|
227
|
+
* or the region stops at the height of the window. Every row takes the height of one measured row,
|
|
228
|
+
* rows of differing height are not supported, and column widths cannot follow content that is not
|
|
229
|
+
* drawn, so `auto` columns share the width evenly. Find-in-page does not see rows that are not
|
|
230
|
+
* drawn. Wins over `growing`.
|
|
231
|
+
*/
|
|
232
|
+
virtual?: boolean;
|
|
220
233
|
/**
|
|
221
234
|
* Width below which each row stacks into a
|
|
222
235
|
* card of label/value pairs instead of scrolling sideways. Measured on the table's own container,
|
|
@@ -548,7 +561,9 @@ export type TableEditorEntry = {
|
|
|
548
561
|
* does not scroll). Enter activates the row exactly as a click does (`rowclick`), Space toggles the
|
|
549
562
|
* row's selection when `selectable` (and activates otherwise), Shift+Arrow extends a `multi`
|
|
550
563
|
* selection, and Ctrl/Cmd+A selects every rendered row. The focused row survives `setData`, sorting,
|
|
551
|
-
* expansion, and `updateRow`. Column headers keep their sort buttons in the Tab order.
|
|
564
|
+
* expansion, and `updateRow`. Column headers keep their sort buttons in the Tab order. With `virtual`
|
|
565
|
+
* all of this runs over every row, drawn or not: the keys draw the row they move to, and a selection
|
|
566
|
+
* reaches rows that are not in the DOM.
|
|
552
567
|
* @fires Table#rowclick
|
|
553
568
|
* @fires Table#rowdblclick
|
|
554
569
|
* @fires Table#sort
|
|
@@ -589,12 +604,14 @@ export declare class Table extends Component<TableOptions> {
|
|
|
589
604
|
columnId: any;
|
|
590
605
|
row: any;
|
|
591
606
|
cells: Map<string, TableEditorEntry>;
|
|
592
|
-
tr:
|
|
607
|
+
tr: HTMLTableRowElement;
|
|
593
608
|
};
|
|
594
609
|
_editMessage: HTMLElement;
|
|
595
610
|
_stacked: any;
|
|
596
611
|
_width: import("../../core/breakpoint.js").BreakpointController;
|
|
612
|
+
_virtual: boolean;
|
|
597
613
|
_growStep: number;
|
|
614
|
+
_indexed: boolean;
|
|
598
615
|
_rendered: number;
|
|
599
616
|
_more: HTMLElement;
|
|
600
617
|
_focusMode: string;
|
|
@@ -616,6 +633,7 @@ export declare class Table extends Component<TableOptions> {
|
|
|
616
633
|
_thead: HTMLElement;
|
|
617
634
|
_tbody: HTMLElement;
|
|
618
635
|
_scroll: HTMLElement;
|
|
636
|
+
_window: RowWindow;
|
|
619
637
|
_rowMoveMessage: HTMLElement;
|
|
620
638
|
_columnControls: HTMLElement;
|
|
621
639
|
_clickListened: boolean;
|
|
@@ -937,6 +955,39 @@ export declare class Table extends Component<TableOptions> {
|
|
|
937
955
|
* @returns {number}
|
|
938
956
|
*/
|
|
939
957
|
getRenderedCount(): number;
|
|
958
|
+
/**
|
|
959
|
+
* Scrolls a row into view. A windowed table draws it first, so a row that is not in the DOM can
|
|
960
|
+
* be reached by id; rows outside the data, in a collapsed branch, or held back by `growing` cannot.
|
|
961
|
+
* @param {unknown} id Row id.
|
|
962
|
+
* @returns {boolean} Whether the row is in view now.
|
|
963
|
+
*/
|
|
964
|
+
reveal(id: unknown): boolean;
|
|
965
|
+
/**
|
|
966
|
+
* The element of a row, drawing it first when a windowed table has not.
|
|
967
|
+
* @param {unknown} id Row id.
|
|
968
|
+
* @param {boolean} [scroll=false] Whether a row that is already drawn is scrolled into view too.
|
|
969
|
+
* @returns {HTMLTableRowElement|undefined}
|
|
970
|
+
*/
|
|
971
|
+
_rowById(id: unknown, scroll?: boolean): HTMLTableRowElement | undefined;
|
|
972
|
+
/**
|
|
973
|
+
* Rows a windowed table keeps drawn wherever the scroll position is: the one holding the Tab stop,
|
|
974
|
+
* which is the first row until something takes it, the one being edited, and the one being
|
|
975
|
+
* dragged, whose removal would end the drag.
|
|
976
|
+
* @returns {Array<number|undefined>} Row positions.
|
|
977
|
+
*/
|
|
978
|
+
_windowPins(): Array<number | undefined>;
|
|
979
|
+
/**
|
|
980
|
+
* Where the row holding the Tab stop is in a windowed table. A row a collapsed branch hides hands
|
|
981
|
+
* over to its nearest visible ancestor, and a row that is gone to whichever row took its place.
|
|
982
|
+
* @returns {number} Row position.
|
|
983
|
+
*/
|
|
984
|
+
_currentPosition(): number;
|
|
985
|
+
/**
|
|
986
|
+
* Forgets a row the window removed from the DOM.
|
|
987
|
+
* @param {HTMLElement} tr Removed row.
|
|
988
|
+
* @returns {void}
|
|
989
|
+
*/
|
|
990
|
+
_releaseRow(tr: HTMLElement): void;
|
|
940
991
|
/**
|
|
941
992
|
* Keeps the "show more" control in step with what is rendered.
|
|
942
993
|
*
|
|
@@ -1271,7 +1322,7 @@ export declare class Table extends Component<TableOptions> {
|
|
|
1271
1322
|
* Carries out one treegrid arrow-key action on a row.
|
|
1272
1323
|
* @param {{action: string, column?: number}} action What `treegridArrowAction()` decided.
|
|
1273
1324
|
* @param {HTMLTableRowElement} tr Focused row.
|
|
1274
|
-
* @param {{id: unknown}} meta Row metadata.
|
|
1325
|
+
* @param {{id: unknown, visibleIndex?: number}} meta Row metadata.
|
|
1275
1326
|
* @param {unknown} parentId Parent row id, or null at the root.
|
|
1276
1327
|
* @returns {void}
|
|
1277
1328
|
* @fires Table#rowtoggle
|
|
@@ -1281,6 +1332,7 @@ export declare class Table extends Component<TableOptions> {
|
|
|
1281
1332
|
column?: number;
|
|
1282
1333
|
}, tr: HTMLTableRowElement, meta: {
|
|
1283
1334
|
id: unknown;
|
|
1335
|
+
visibleIndex?: number;
|
|
1284
1336
|
}, parentId: unknown): void;
|
|
1285
1337
|
/**
|
|
1286
1338
|
* How many rows PageUp and PageDown move: what fits in the scroll region when the table scrolls
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which rows to draw for a scroll position: those in view, plus `overscan` viewports' worth above
|
|
3
|
+
* and below. Positions are zero-based and `end` is exclusive. The scroll position is clamped to
|
|
4
|
+
* what the rows can reach, so a list that just got shorter still draws its last rows while the
|
|
5
|
+
* browser catches up. Rows with no usable height yield one row, which is what gets measured.
|
|
6
|
+
* @param {{total: number, rowHeight: number, scrollTop: number, viewport: number, overscan?: number}} state
|
|
7
|
+
* Row count, height of one row, distance scrolled past the first row, height of the region the rows
|
|
8
|
+
* show through, and overscan in viewports.
|
|
9
|
+
* @returns {{start: number, end: number}} Half-open range of rows; empty for an empty table.
|
|
10
|
+
*/
|
|
11
|
+
export declare function tableWindow({ total, rowHeight, scrollTop, viewport, overscan }: {
|
|
12
|
+
total: number;
|
|
13
|
+
rowHeight: number;
|
|
14
|
+
scrollTop: number;
|
|
15
|
+
viewport: number;
|
|
16
|
+
overscan?: number;
|
|
17
|
+
}): {
|
|
18
|
+
start: number;
|
|
19
|
+
end: number;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Splits a table into what is drawn and what stands in for it: runs of rows and the gaps between
|
|
23
|
+
* them, in display order. A pinned row outside the window is drawn where it belongs, on its own,
|
|
24
|
+
* with a gap either side, so the rows stay in order and the scroll height stays right. Positions
|
|
25
|
+
* out of range are ignored.
|
|
26
|
+
* @param {number} total Row count.
|
|
27
|
+
* @param {number} start First row of the window.
|
|
28
|
+
* @param {number} end End of the window, exclusive.
|
|
29
|
+
* @param {Array<number|null|undefined>} [pinned=[]] Rows that stay drawn wherever they are.
|
|
30
|
+
* @returns {Array<{from: number, to: number}|{gap: number}>} Segments; a gap counts rows.
|
|
31
|
+
*/
|
|
32
|
+
export declare function tableWindowSegments(total: number, start: number, end: number, pinned?: Array<number | null | undefined>): Array<{
|
|
33
|
+
from: number;
|
|
34
|
+
to: number;
|
|
35
|
+
} | {
|
|
36
|
+
gap: number;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* Where to scroll so a row is in view, moving as little as possible: a row already in view keeps
|
|
40
|
+
* the scroll position, and one outside it lands on the nearer edge.
|
|
41
|
+
* @param {{index: number, rowHeight: number, scrollTop: number, viewport: number}} state Row, height
|
|
42
|
+
* of one row, distance scrolled past the first row, and height of the region the rows show through.
|
|
43
|
+
* @returns {number} New distance past the first row.
|
|
44
|
+
*/
|
|
45
|
+
export declare function tableWindowScroll({ index, rowHeight, scrollTop, viewport }: {
|
|
46
|
+
index: number;
|
|
47
|
+
rowHeight: number;
|
|
48
|
+
scrollTop: number;
|
|
49
|
+
viewport: number;
|
|
50
|
+
}): number;
|
|
51
|
+
export type RowWindowHost = {
|
|
52
|
+
/**
|
|
53
|
+
* The element that scrolls.
|
|
54
|
+
*/
|
|
55
|
+
scroller: HTMLElement;
|
|
56
|
+
/**
|
|
57
|
+
* Element the rows are children of.
|
|
58
|
+
*/
|
|
59
|
+
body: HTMLElement;
|
|
60
|
+
/**
|
|
61
|
+
* Element above the rows.
|
|
62
|
+
*/
|
|
63
|
+
head: HTMLElement;
|
|
64
|
+
/**
|
|
65
|
+
* Whether `head` stays in place while the rows scroll under it.
|
|
66
|
+
*/
|
|
67
|
+
sticky: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Builds the row for an entry.
|
|
70
|
+
*/
|
|
71
|
+
draw: (entry: any) => HTMLElement;
|
|
72
|
+
/**
|
|
73
|
+
* Forgets a row that left the DOM.
|
|
74
|
+
*/
|
|
75
|
+
release: (row: HTMLElement) => void;
|
|
76
|
+
/**
|
|
77
|
+
* Positions that stay drawn wherever they are.
|
|
78
|
+
*/
|
|
79
|
+
pins: () => Array<number | undefined>;
|
|
80
|
+
/**
|
|
81
|
+
* Cells one row occupies.
|
|
82
|
+
*/
|
|
83
|
+
colspan: () => number;
|
|
84
|
+
/**
|
|
85
|
+
* Called after the drawn rows change.
|
|
86
|
+
*/
|
|
87
|
+
changed: () => void;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* @typedef {Object} RowWindowHost
|
|
91
|
+
* @property {HTMLElement} scroller The element that scrolls.
|
|
92
|
+
* @property {HTMLElement} body Element the rows are children of.
|
|
93
|
+
* @property {HTMLElement} head Element above the rows.
|
|
94
|
+
* @property {boolean} sticky Whether `head` stays in place while the rows scroll under it.
|
|
95
|
+
* @property {(entry: any) => HTMLElement} draw Builds the row for an entry.
|
|
96
|
+
* @property {(row: HTMLElement) => void} release Forgets a row that left the DOM.
|
|
97
|
+
* @property {() => Array<number|undefined>} pins Positions that stay drawn wherever they are.
|
|
98
|
+
* @property {() => number} colspan Cells one row occupies.
|
|
99
|
+
* @property {() => void} changed Called after the drawn rows change.
|
|
100
|
+
*/
|
|
101
|
+
/**
|
|
102
|
+
* Keeps a table body down to the rows around the scroll position. Spacer rows stand in for the rest,
|
|
103
|
+
* sized from one measured row, so the scroll height is the height of every row. Rows that stay in
|
|
104
|
+
* the window are never touched: moving one would blur it. Holds no listeners of its own except the
|
|
105
|
+
* `ResizeObserver` released by `stop()`.
|
|
106
|
+
*/
|
|
107
|
+
export declare class RowWindow {
|
|
108
|
+
host: RowWindowHost;
|
|
109
|
+
/** @type {any[]} */
|
|
110
|
+
entries: any[];
|
|
111
|
+
/** @type {Map<number, HTMLElement>} Drawn rows by position. */
|
|
112
|
+
drawn: Map<number, HTMLElement>;
|
|
113
|
+
/** @type {HTMLElement[]} Spacer rows, reused by position. */
|
|
114
|
+
spacers: HTMLElement[];
|
|
115
|
+
rowHeight: number;
|
|
116
|
+
viewport: number;
|
|
117
|
+
offset: number;
|
|
118
|
+
measured: boolean;
|
|
119
|
+
live: boolean;
|
|
120
|
+
frame: number;
|
|
121
|
+
/** @type {ResizeObserver|null} */
|
|
122
|
+
observer: ResizeObserver | null;
|
|
123
|
+
probe: HTMLElement;
|
|
124
|
+
/** @param {RowWindowHost} host Table side of the arrangement. */
|
|
125
|
+
constructor(host: RowWindowHost);
|
|
126
|
+
/** @returns {number} Rows in the table, drawn or not. */
|
|
127
|
+
get total(): number;
|
|
128
|
+
/**
|
|
129
|
+
* Starts following the size of the scroll region and of a row. The first measurement arrives
|
|
130
|
+
* through the observer too, so it happens once the table is laid out and styled, however late it
|
|
131
|
+
* is attached. It waits for the next frame because a measurement may resize the scroll region
|
|
132
|
+
* itself, which an observer callback must not do.
|
|
133
|
+
* @returns {void}
|
|
134
|
+
*/
|
|
135
|
+
start(): void;
|
|
136
|
+
/** Measures on the next frame, however many times this is asked before it. @returns {void} */
|
|
137
|
+
schedule(): void;
|
|
138
|
+
/** Stops measuring. @returns {void} */
|
|
139
|
+
stop(): void;
|
|
140
|
+
/** Forgets every drawn row: the table is about to show none. @returns {void} */
|
|
141
|
+
clear(): void;
|
|
142
|
+
/**
|
|
143
|
+
* Draws the window for a new set of entries into a fragment. The caller replaces the old rows
|
|
144
|
+
* with it and has forgotten them already, so nothing is released here.
|
|
145
|
+
* @param {any[]} entries Every row, in display order.
|
|
146
|
+
* @param {DocumentFragment} fragment Receives the rows.
|
|
147
|
+
* @returns {void}
|
|
148
|
+
*/
|
|
149
|
+
fill(entries: any[], fragment: DocumentFragment): void;
|
|
150
|
+
/** Measures a table that has not been measured yet, once it can be. @returns {void} */
|
|
151
|
+
settle(): void;
|
|
152
|
+
/**
|
|
153
|
+
* Reads the height of a row and of the scroll region, and redraws if either changed. A table that
|
|
154
|
+
* is not laid out, detached or `display: none`, keeps what it knew.
|
|
155
|
+
* @returns {void}
|
|
156
|
+
*/
|
|
157
|
+
measure(): void;
|
|
158
|
+
/**
|
|
159
|
+
* Brings the drawn rows in line with the scroll position and the pins: rows that left are removed,
|
|
160
|
+
* rows that arrived are built, and rows that stayed are left exactly where they are.
|
|
161
|
+
* @returns {void}
|
|
162
|
+
*/
|
|
163
|
+
update(): void;
|
|
164
|
+
/**
|
|
165
|
+
* Draws a row if it is not, with the scroll region moved so it is in view.
|
|
166
|
+
* @param {number} index Row position.
|
|
167
|
+
* @returns {HTMLElement|null} The row, or null when there is none at that position.
|
|
168
|
+
*/
|
|
169
|
+
reveal(index: number): HTMLElement | null;
|
|
170
|
+
/** @returns {number} Distance the rows have scrolled past the first one. */
|
|
171
|
+
_position(): number;
|
|
172
|
+
/** @returns {{start: number, end: number}} The rows the scroll position calls for. */
|
|
173
|
+
_range(): {
|
|
174
|
+
start: number;
|
|
175
|
+
end: number;
|
|
176
|
+
};
|
|
177
|
+
/** @returns {Array<{from: number, to: number}|{gap: number}>} What the body should hold now. */
|
|
178
|
+
_segments(): Array<{
|
|
179
|
+
from: number;
|
|
180
|
+
to: number;
|
|
181
|
+
} | {
|
|
182
|
+
gap: number;
|
|
183
|
+
}>;
|
|
184
|
+
/**
|
|
185
|
+
* Walks the segments and hands each node to `place`, building rows that are not drawn.
|
|
186
|
+
* @param {Array<{from: number, to: number}|{gap: number}>} segments Segments in display order.
|
|
187
|
+
* @param {(node: HTMLElement) => void} place Puts one node after the previous one.
|
|
188
|
+
* @returns {void}
|
|
189
|
+
*/
|
|
190
|
+
_lay(segments: Array<{
|
|
191
|
+
from: number;
|
|
192
|
+
to: number;
|
|
193
|
+
} | {
|
|
194
|
+
gap: number;
|
|
195
|
+
}>, place: (node: HTMLElement) => void): void;
|
|
196
|
+
/**
|
|
197
|
+
* The spacer row standing in for a run of rows that are not drawn.
|
|
198
|
+
* @param {number} position Which gap this is, from the top.
|
|
199
|
+
* @param {number} rows Rows it stands in for.
|
|
200
|
+
* @returns {HTMLElement}
|
|
201
|
+
*/
|
|
202
|
+
_spacer(position: number, rows: number): HTMLElement;
|
|
203
|
+
}
|
|
@@ -57,17 +57,19 @@ export type ToolbarOptions = {
|
|
|
57
57
|
*/
|
|
58
58
|
align?: 'start' | 'end' | 'between';
|
|
59
59
|
/**
|
|
60
|
-
* Accessible name of the toolbar.
|
|
60
|
+
* Accessible name of the toolbar, by default the `toolbar.label`
|
|
61
|
+
* message ("Toolbar"). Null gives none.
|
|
61
62
|
*/
|
|
62
|
-
label?: string;
|
|
63
|
+
label?: string | null;
|
|
63
64
|
/**
|
|
64
65
|
* Collapses items that no longer fit into a trailing menu.
|
|
65
66
|
*/
|
|
66
67
|
overflow?: boolean;
|
|
67
68
|
/**
|
|
68
|
-
* Accessible name of the overflow menu trigger
|
|
69
|
+
* Accessible name of the overflow menu trigger, by default
|
|
70
|
+
* the `toolbar.more` message ("More"). Null gives none.
|
|
69
71
|
*/
|
|
70
|
-
overflowLabel?: string;
|
|
72
|
+
overflowLabel?: string | null;
|
|
71
73
|
/**
|
|
72
74
|
* Tighter spacing and small controls.
|
|
73
75
|
*/
|
|
@@ -102,9 +104,11 @@ export type ToolbarOptions = {
|
|
|
102
104
|
* @typedef {Object} ToolbarOptions
|
|
103
105
|
* @property {ToolbarItem[]} [items=[]] Controls, separators (`'-'`), and ready-made Elements.
|
|
104
106
|
* @property {'start'|'end'|'between'} [align='start'] Horizontal distribution.
|
|
105
|
-
* @property {string} [label
|
|
107
|
+
* @property {string|null} [label] Accessible name of the toolbar, by default the `toolbar.label`
|
|
108
|
+
* message ("Toolbar"). Null gives none.
|
|
106
109
|
* @property {boolean} [overflow=true] Collapses items that no longer fit into a trailing menu.
|
|
107
|
-
* @property {string} [overflowLabel
|
|
110
|
+
* @property {string|null} [overflowLabel] Accessible name of the overflow menu trigger, by default
|
|
111
|
+
* the `toolbar.more` message ("More"). Null gives none.
|
|
108
112
|
* @property {boolean} [dense=false] Tighter spacing and small controls.
|
|
109
113
|
* @property {(event: CustomEvent<{name: string|null, item: Element}>) => void} [onaction] Action listener.
|
|
110
114
|
*/
|
|
@@ -72,8 +72,8 @@ export type TooltipOptions = {
|
|
|
72
72
|
*
|
|
73
73
|
* The bubble is a manual popover in the top layer, positioned by `position()` from the kernel, so
|
|
74
74
|
* it escapes clipping and stacking contexts and flips near a viewport edge. It never takes focus
|
|
75
|
-
*
|
|
76
|
-
*
|
|
75
|
+
* but remains visible while the pointer is over either the anchor or the bubble. While open, the
|
|
76
|
+
* anchor carries `aria-describedby` pointing at the bubble; closing restores
|
|
77
77
|
* whatever the anchor had before — including nothing at all.
|
|
78
78
|
*
|
|
79
79
|
* A hover opens it after `delay`; keyboard focus opens it at once, because a keyboard user has no
|
|
@@ -55,10 +55,10 @@ export type TreeOptions = {
|
|
|
55
55
|
*/
|
|
56
56
|
rowActions?: ((node: TreeNode) => Array<RowAction | Node>) | null;
|
|
57
57
|
/**
|
|
58
|
-
* Name of a row's overflow menu; every action name
|
|
59
|
-
*
|
|
58
|
+
* Name of a row's overflow menu; every action name is
|
|
59
|
+
* followed by the row's name ("More actions: Q3 plan"). Null reads the `tree.more` message.
|
|
60
60
|
*/
|
|
61
|
-
moreLabel?: string;
|
|
61
|
+
moreLabel?: string | null;
|
|
62
62
|
/**
|
|
63
63
|
* Lazy child loader.
|
|
64
64
|
*/
|
|
@@ -68,13 +68,15 @@ export type TreeOptions = {
|
|
|
68
68
|
*/
|
|
69
69
|
filter?: string;
|
|
70
70
|
/**
|
|
71
|
-
* Accessible name of the tree.
|
|
71
|
+
* Accessible name of the tree; null reads the `tree.label`
|
|
72
|
+
* message ("Tree").
|
|
72
73
|
*/
|
|
73
|
-
label?: string;
|
|
74
|
+
label?: string | null;
|
|
74
75
|
/**
|
|
75
|
-
* Text shown when the tree is empty
|
|
76
|
+
* Text shown when the tree is empty, by default the
|
|
77
|
+
* `tree.noItems` message ("Nothing to show"). Null shows none.
|
|
76
78
|
*/
|
|
77
|
-
emptyText?: string;
|
|
79
|
+
emptyText?: string | null;
|
|
78
80
|
/**
|
|
79
81
|
* Scroll height in pixels or any CSS length.
|
|
80
82
|
*/
|
|
@@ -148,12 +150,14 @@ export type TreeOptions = {
|
|
|
148
150
|
* rest out of sight and show while the row is pointed at, focused or selected; one or two show
|
|
149
151
|
* as icon buttons, more fold after the first into a "More actions" menu. Every descriptor is also
|
|
150
152
|
* in the row's context menu, and the focused row's actions follow it in the Tab order.
|
|
151
|
-
* @property {string} [moreLabel=
|
|
152
|
-
*
|
|
153
|
+
* @property {string|null} [moreLabel=null] Name of a row's overflow menu; every action name is
|
|
154
|
+
* followed by the row's name ("More actions: Q3 plan"). Null reads the `tree.more` message.
|
|
153
155
|
* @property {((node: TreeNode) => Promise<TreeNode[]>|TreeNode[])|null} [load=null] Lazy child loader.
|
|
154
156
|
* @property {string} [filter=''] Label substring the tree is filtered by.
|
|
155
|
-
* @property {string} [label=
|
|
156
|
-
*
|
|
157
|
+
* @property {string|null} [label=null] Accessible name of the tree; null reads the `tree.label`
|
|
158
|
+
* message ("Tree").
|
|
159
|
+
* @property {string|null} [emptyText] Text shown when the tree is empty, by default the
|
|
160
|
+
* `tree.noItems` message ("Nothing to show"). Null shows none.
|
|
157
161
|
* @property {number|string|null} [height=null] Scroll height in pixels or any CSS length.
|
|
158
162
|
* @property {Record<string, string>|Record<string, Record<string, string>>} [msg] Localized messages.
|
|
159
163
|
* @property {(event: CustomEvent<{node: TreeNode, id: unknown, ids: unknown[]}>) => void} [onselect] Selection listener.
|
|
@@ -193,6 +197,9 @@ export declare class TreeView extends Component<TreeOptions> {
|
|
|
193
197
|
_checked: Set<any>;
|
|
194
198
|
/** @type {Map<unknown, Promise<boolean>>} In-flight lazy loads, keyed by node ID. */
|
|
195
199
|
_loading: Map<unknown, Promise<boolean>>;
|
|
200
|
+
_loadGeneration: number;
|
|
201
|
+
_destroyed: boolean;
|
|
202
|
+
_expanding: Map<any, any>;
|
|
196
203
|
_focusId: any;
|
|
197
204
|
_filter: string;
|
|
198
205
|
/** @type {Array<import('../../internal/row-actions.js').RowActionStrip|undefined>} Per visible row. */
|
|
@@ -368,9 +375,9 @@ export declare class TreeView extends Component<TreeOptions> {
|
|
|
368
375
|
* Loads a branch's children through the configured loader, once.
|
|
369
376
|
* @param {TreeNode} node Branch node.
|
|
370
377
|
* @param {unknown} id Node ID.
|
|
371
|
-
* @returns {Promise<
|
|
378
|
+
* @returns {Promise<boolean>}
|
|
372
379
|
*/
|
|
373
|
-
_ensureChildren(node: TreeNode, id: unknown): Promise<
|
|
380
|
+
_ensureChildren(node: TreeNode, id: unknown): Promise<boolean>;
|
|
374
381
|
/**
|
|
375
382
|
* @param {unknown} id Node ID.
|
|
376
383
|
* @param {boolean} checked Next state.
|
|
@@ -115,6 +115,16 @@ export declare class Component<TOptions extends ComponentOptions = ComponentOpti
|
|
|
115
115
|
* @returns {string}
|
|
116
116
|
*/
|
|
117
117
|
msg(key: string, ...args: unknown[]): string;
|
|
118
|
+
/**
|
|
119
|
+
* Resolves a cardinal plural message, keeping the numeric count separate from displayed values.
|
|
120
|
+
* Each source tries the selected category, `other`, and the unsuffixed/legacy key before moving
|
|
121
|
+
* from instance messages to the host, class defaults, and finally English plural rules.
|
|
122
|
+
* @param {string} key Unsuffixed message key.
|
|
123
|
+
* @param {number} count Finite numeric count.
|
|
124
|
+
* @param {...unknown} args Positional interpolation values.
|
|
125
|
+
* @returns {string}
|
|
126
|
+
*/
|
|
127
|
+
msgPlural(key: string, count: number, ...args: unknown[]): string;
|
|
118
128
|
/**
|
|
119
129
|
* Aborts listeners, unregisters the component, and removes roots created by the component.
|
|
120
130
|
* Safe to call repeatedly.
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Formats a local Date using strftime-style kernel tokens.
|
|
3
|
+
*
|
|
4
|
+
* Month and weekday names come from the host translator's `date.month.*` and `date.weekday.*` keys
|
|
5
|
+
* when no explicit locale is given, and otherwise from `Intl` in the effective formatting locale.
|
|
6
|
+
* Explicit supported locales take precedence over host translations.
|
|
3
7
|
* @param {Date} date Date to format.
|
|
4
8
|
* @param {string} fmt Format containing `%d %e %m %Y %y %H %M %S %a %A %b %B %s` tokens.
|
|
9
|
+
* @param {{locale?: string|null}|null} [options] `locale` defaults to `getLanguage()`.
|
|
5
10
|
* @returns {string}
|
|
6
11
|
*/
|
|
7
|
-
export declare function formatDate(date: Date, fmt: string
|
|
12
|
+
export declare function formatDate(date: Date, fmt: string, options?: {
|
|
13
|
+
locale?: string | null;
|
|
14
|
+
} | null): string;
|
|
8
15
|
/**
|
|
9
16
|
* Parses numeric date tokens from a string, returning null for mismatches or invalid dates.
|
|
10
17
|
* Unspecified fields default to 1970-01-01 00:00:00 local time.
|
package/dist/types/core/dom.d.ts
CHANGED
|
@@ -120,6 +120,7 @@ export declare function fragment(...children: (DomChild | boolean)[]): DocumentF
|
|
|
120
120
|
* @param {(HProps & Record<string, any>)|DomChild} [props] Properties and attributes, or the first child.
|
|
121
121
|
* @param {...DomChild} children Child values.
|
|
122
122
|
* @returns {HTMLElement}
|
|
123
|
+
* @throws {TypeError} When properties contain an HTML sink; use `h.raw()` for trusted HTML.
|
|
123
124
|
*/
|
|
124
125
|
export declare function h(tag: string, props?: (HProps & Record<string, any>) | DomChild, ...children: DomChild[]): HTMLElement;
|
|
125
126
|
export declare namespace h {
|
|
@@ -145,6 +146,20 @@ export declare function snapshotTarget(element: Element): TargetSnapshot;
|
|
|
145
146
|
* @returns {void}
|
|
146
147
|
*/
|
|
147
148
|
export declare function restoreTarget(element: Element, snapshot: TargetSnapshot | null): void;
|
|
149
|
+
/**
|
|
150
|
+
* Puts an element's inline style back to a captured attribute value.
|
|
151
|
+
*
|
|
152
|
+
* Written through the CSSOM, never the attribute: under a `style-src` policy without
|
|
153
|
+
* `'unsafe-inline'`, setting the `style` attribute is an inline style the browser blocks and
|
|
154
|
+
* reports, while `style.cssText` is not governed by it. A style that was absent (or empty) is
|
|
155
|
+
* cleared and its attribute removed — after a read, because Chrome reflects CSSOM changes into the
|
|
156
|
+
* attribute lazily, and a removal it has not reflected yet comes back as an empty `style=""`,
|
|
157
|
+
* which the next capture would then try to restore.
|
|
158
|
+
* @param {Element & ElementCSSInlineStyle} element Element whose inline style to restore.
|
|
159
|
+
* @param {string|null} value Attribute value captured earlier, or null when it was absent.
|
|
160
|
+
* @returns {void}
|
|
161
|
+
*/
|
|
162
|
+
export declare function restoreInlineStyle(element: Element & ElementCSSInlineStyle, value: string | null): void;
|
|
148
163
|
/**
|
|
149
164
|
* Escapes text for safe insertion into an HTML string.
|
|
150
165
|
* @param {unknown} str Value to escape.
|
|
@@ -44,6 +44,14 @@ export type RequestOptions = {
|
|
|
44
44
|
* Per-request headers.
|
|
45
45
|
*/
|
|
46
46
|
headers?: Record<string, string>;
|
|
47
|
+
/**
|
|
48
|
+
* Caller cancellation signal.
|
|
49
|
+
*/
|
|
50
|
+
signal?: AbortSignal | null;
|
|
51
|
+
/**
|
|
52
|
+
* Multipart field name used for each file.
|
|
53
|
+
*/
|
|
54
|
+
paramName?: string;
|
|
47
55
|
};
|
|
48
56
|
/**
|
|
49
57
|
* @typedef {Object} RequestOptions
|
|
@@ -52,6 +60,8 @@ export type RequestOptions = {
|
|
|
52
60
|
* @property {File|FileList|File[]} [files=null] Files that switch the body to FormData.
|
|
53
61
|
* @property {string|URLSearchParams|Record<string, unknown>} [query=null] Query parameters.
|
|
54
62
|
* @property {Record<string, string>} [headers={}] Per-request headers.
|
|
63
|
+
* @property {AbortSignal|null} [signal=null] Caller cancellation signal.
|
|
64
|
+
* @property {string} [paramName='files'] Multipart field name used for each file.
|
|
55
65
|
*/
|
|
56
66
|
/** Dependency-free JSON fetch wrapper with legacy ZeyOS envelope handling. */
|
|
57
67
|
export declare class Http {
|
|
@@ -48,6 +48,44 @@ export declare function legacyMessageKey(key: string): string | null;
|
|
|
48
48
|
* @returns {string}
|
|
49
49
|
*/
|
|
50
50
|
export declare function translate(key: string, args?: unknown[] | Record<string, unknown> | string | number): string;
|
|
51
|
+
/**
|
|
52
|
+
* Selects a cardinal plural message before interpolation. The host's selected category, `other`,
|
|
53
|
+
* and unsuffixed message are tried before English, which uses its own plural rules.
|
|
54
|
+
* @param {string} key Unsuffixed translation key.
|
|
55
|
+
* @param {number} count Finite numeric count, independent of interpolation arguments.
|
|
56
|
+
* @param {unknown[]|Record<string, unknown>|string|number} [args] Interpolation arguments.
|
|
57
|
+
* @param {{locale?: string}} [options={}] Plural-rule locale; defaults to the active language.
|
|
58
|
+
* @returns {string}
|
|
59
|
+
*/
|
|
60
|
+
export declare function translatePlural(key: string, count: number, args?: unknown[] | Record<string, unknown> | string | number, { locale }?: {
|
|
61
|
+
locale?: string;
|
|
62
|
+
}): string;
|
|
63
|
+
/**
|
|
64
|
+
* Resolves a supported explicit locale, then the active language, then English. Locale lists
|
|
65
|
+
* retain their preference order. Support is checked by the consuming Intl service, whose locale
|
|
66
|
+
* data may differ from NumberFormat's; internal formatting consumers share this precedence.
|
|
67
|
+
* @param {string|string[]|null} [option] Explicit locale or locale list.
|
|
68
|
+
* @param {{supportedLocalesOf: (locales: string|string[]) => string[]}} [service=Intl.NumberFormat] Consuming Intl service.
|
|
69
|
+
* @returns {string|string[]}
|
|
70
|
+
*/
|
|
71
|
+
export declare function formattingLocale(option?: string | string[] | null, service?: {
|
|
72
|
+
supportedLocalesOf: (locales: string | string[]) => string[];
|
|
73
|
+
}): string | string[];
|
|
74
|
+
/**
|
|
75
|
+
* Ordered keys within one message source. Internal helper shared with Component.msgPlural.
|
|
76
|
+
* @param {string} key Unsuffixed key.
|
|
77
|
+
* @param {number} count Finite numeric count.
|
|
78
|
+
* @param {string} [locale] Plural-rule locale.
|
|
79
|
+
* @returns {string[]}
|
|
80
|
+
*/
|
|
81
|
+
export declare function pluralKeys(key: string, count: number, locale?: string): string[];
|
|
82
|
+
/**
|
|
83
|
+
* Returns the first available message without asking a translator for subsequent keys.
|
|
84
|
+
* @param {string[]} keys Candidate keys.
|
|
85
|
+
* @param {(key: string) => string|null} lookup One message source.
|
|
86
|
+
* @returns {string|null}
|
|
87
|
+
*/
|
|
88
|
+
export declare function pluralMessage(keys: string[], lookup: (key: string) => string | null): string | null;
|
|
51
89
|
/**
|
|
52
90
|
* Replaces one-based numeric placeholders and legacy percent-delimited placeholders.
|
|
53
91
|
* Arrays replace `%1`, `%2`, and legacy placeholders in encounter order; objects replace
|