@zeyos/zx 5.7.1 → 5.8.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 +296 -0
- package/README.md +47 -9
- package/dist/types/components/activity-item/activity-item.d.ts +14 -3
- package/dist/types/components/agent-avatar/agent-avatar.d.ts +165 -0
- package/dist/types/components/agent-avatar/agent-face.d.ts +93 -0
- package/dist/types/components/agent-thread/ag-ui.d.ts +21 -9
- package/dist/types/components/agent-thread/agent-thread.d.ts +26 -0
- package/dist/types/components/agent-thread/ui-message-stream.d.ts +3 -1
- package/dist/types/components/approval-card/approval-card.d.ts +31 -2
- package/dist/types/components/aurora/aurora.d.ts +31 -5
- package/dist/types/components/calendar/calendar.d.ts +39 -26
- package/dist/types/components/chart/chart.d.ts +250 -20
- package/dist/types/components/chart/color.d.ts +66 -0
- package/dist/types/components/chart/svg-adapter.d.ts +103 -0
- package/dist/types/components/chart/svg-geometry.d.ts +203 -0
- package/dist/types/components/check-button/check-button.d.ts +1 -4
- package/dist/types/components/checklist/checklist.d.ts +19 -5
- package/dist/types/components/code-editor/code-editor.d.ts +55 -1
- package/dist/types/components/composer/composer.d.ts +41 -6
- package/dist/types/components/context-menu/context-menu.d.ts +36 -8
- package/dist/types/components/copy/copy-button.d.ts +6 -0
- package/dist/types/components/copy/copy-input.d.ts +1 -0
- package/dist/types/components/date-picker/date-picker.d.ts +14 -0
- package/dist/types/components/date-picker/time-picker.d.ts +26 -17
- package/dist/types/components/datebox/datebox.d.ts +8 -4
- package/dist/types/components/dialog/dialog.d.ts +13 -2
- package/dist/types/components/empty-state/empty-state.d.ts +10 -1
- package/dist/types/components/field/field.d.ts +4 -2
- package/dist/types/components/form/form.d.ts +2 -1
- package/dist/types/components/kanban-view/kanban-card.d.ts +7 -0
- package/dist/types/components/kanban-view/kanban-view.d.ts +15 -3
- package/dist/types/components/launcher/launcher.d.ts +26 -0
- package/dist/types/components/master-panel/master-panel.d.ts +9 -4
- package/dist/types/components/menu-button/menu-button.d.ts +29 -5
- package/dist/types/components/message/message.d.ts +308 -5
- package/dist/types/components/modal/modal.d.ts +11 -0
- package/dist/types/components/modal/native-dialog.d.ts +40 -0
- package/dist/types/components/module-bar/module-bar.d.ts +9 -2
- package/dist/types/components/multi-value-editor/multi-value-editor.d.ts +5 -4
- package/dist/types/components/number-field/number-field.d.ts +7 -0
- package/dist/types/components/pagination/pagination.d.ts +341 -19
- package/dist/types/components/run-status/run-status.d.ts +26 -0
- package/dist/types/components/run-trace/run-trace.d.ts +10 -6
- package/dist/types/components/search/search.d.ts +16 -4
- package/dist/types/components/select/select.d.ts +19 -1
- package/dist/types/components/sheet/sheet.d.ts +18 -4
- package/dist/types/components/slider/slider.d.ts +2 -1
- package/dist/types/components/stat-tile/stat-tile.d.ts +20 -3
- package/dist/types/components/stepper/stepper.d.ts +17 -4
- package/dist/types/components/surface/catalog.d.ts +61 -17
- package/dist/types/components/surface/surface.d.ts +6 -4
- package/dist/types/components/table/table.d.ts +207 -5
- package/dist/types/components/table/window.d.ts +25 -1
- package/dist/types/components/toggle/toggle.d.ts +38 -6
- package/dist/types/components/tooltip/tooltip.d.ts +5 -4
- package/dist/types/components/tree/tree.d.ts +43 -6
- package/dist/types/components/truncate/truncate.d.ts +4 -2
- package/dist/types/components/value-list/value-list.d.ts +9 -2
- package/dist/types/core/date.d.ts +2 -1
- package/dist/types/core/drag-axis.d.ts +10 -5
- package/dist/types/core/export.d.ts +2 -2
- package/dist/types/core/format.d.ts +3 -1
- package/dist/types/core/icons.d.ts +36 -3
- package/dist/types/core/keyboard.d.ts +7 -3
- package/dist/types/core/messages.d.ts +3 -0
- package/dist/types/core/storage.d.ts +4 -3
- package/dist/types/core/util.d.ts +3 -1
- package/dist/types/elements/define.d.ts +5 -2
- package/dist/types/index.d.ts +6 -4
- package/dist/types/internal/agent-model.d.ts +99 -0
- package/dist/types/internal/app-rail.d.ts +37 -2
- package/dist/types/internal/collections.d.ts +18 -0
- package/dist/types/internal/menu-items.d.ts +27 -0
- package/dist/types/internal/overlay-content.d.ts +23 -0
- package/dist/types/internal/presence-loop.d.ts +5 -2
- package/dist/types/locales/index.d.ts +3 -0
- package/dist/types/zeyos/calendar.d.ts +43 -7
- package/dist/types/zeyos/connect.d.ts +4 -0
- package/dist/types/zeyos/form.d.ts +13 -5
- package/dist/types/zeyos/select.d.ts +5 -2
- package/dist/types/zeyos/table.d.ts +16 -8
- package/dist/types/zeyos/view.d.ts +2 -1
- package/dist/zx-zeyos.esm.js +2998 -451
- package/dist/zx-zeyos.esm.min.js +4 -4
- package/dist/zx.core.css +4 -0
- package/dist/zx.core.min.css +1 -1
- package/dist/zx.css +948 -48
- package/dist/zx.esm.js +7432 -3408
- package/dist/zx.esm.min.js +26 -26
- package/dist/zx.global.js +7432 -3408
- package/dist/zx.global.min.js +26 -26
- package/dist/zx.layered.css +950 -48
- package/dist/zx.layered.min.css +1 -1
- package/dist/zx.min.css +1 -1
- package/docs/agent-catalog.json +159 -1
- package/docs/agent-surfaces.md +21 -21
- package/docs/api.json +3122 -528
- package/docs/components/account-menu.md +24 -0
- package/docs/components/activity-item.md +23 -0
- package/docs/components/activity-list.md +28 -0
- package/docs/components/agent-avatar.md +59 -0
- package/docs/components/agent-thread.md +275 -0
- package/docs/components/app-icon.md +36 -0
- package/docs/components/app-sidebar.md +92 -0
- package/docs/components/approval-card.md +71 -0
- package/docs/components/aurora.md +34 -0
- package/docs/components/avatar.md +37 -0
- package/docs/components/badge.md +36 -0
- package/docs/components/block-view.md +34 -0
- package/docs/components/breadcrumb.md +20 -0
- package/docs/components/button.md +23 -0
- package/docs/components/calendar.md +68 -0
- package/docs/components/card-view.md +73 -0
- package/docs/components/card.md +25 -0
- package/docs/components/chart.md +109 -0
- package/docs/components/check-button.md +16 -0
- package/docs/components/checklist.md +19 -0
- package/docs/components/code-editor.md +38 -0
- package/docs/components/composer.md +107 -0
- package/docs/components/context-menu.md +32 -0
- package/docs/components/copy.md +37 -0
- package/docs/components/data-filter.md +16 -0
- package/docs/components/date-picker.md +31 -0
- package/docs/components/date-range.md +21 -0
- package/docs/components/datebox.md +31 -0
- package/docs/components/dialog.md +25 -0
- package/docs/components/dock.md +57 -0
- package/docs/components/dropdown.md +39 -0
- package/docs/components/elements.md +63 -0
- package/docs/components/empty-state.md +17 -0
- package/docs/components/entity-ref.md +26 -0
- package/docs/components/field-upload.md +18 -0
- package/docs/components/file-item.md +27 -0
- package/docs/components/file-list.md +23 -0
- package/docs/components/filter-panel.md +45 -0
- package/docs/components/filter.md +47 -0
- package/docs/components/finder.md +25 -0
- package/docs/components/form-widgets.md +42 -0
- package/docs/components/form.md +80 -0
- package/docs/components/grid.md +26 -0
- package/docs/components/groupbox.md +11 -0
- package/docs/components/helpers.md +359 -0
- package/docs/components/icons.md +87 -0
- package/docs/components/index.md +99 -0
- package/docs/components/kanban-view.md +42 -0
- package/docs/components/kbd.md +23 -0
- package/docs/components/kernel.md +41 -0
- package/docs/components/launcher.md +66 -0
- package/docs/components/layout.md +33 -0
- package/docs/components/list-toolbar.md +38 -0
- package/docs/components/loading.md +48 -0
- package/docs/components/menu-button.md +47 -0
- package/docs/components/message.md +76 -0
- package/docs/components/modal.md +27 -0
- package/docs/components/module-bar.md +71 -0
- package/docs/components/multi-value-editor.md +16 -0
- package/docs/components/navigation-bar.md +22 -0
- package/docs/components/number-field.md +34 -0
- package/docs/components/pagination.md +73 -0
- package/docs/components/panel.md +28 -0
- package/docs/components/prompt-starters.md +40 -0
- package/docs/components/prose.md +38 -0
- package/docs/components/questionnaire.md +115 -0
- package/docs/components/rating.md +19 -0
- package/docs/components/run-status.md +50 -0
- package/docs/components/run-trace.md +72 -0
- package/docs/components/search.md +11 -0
- package/docs/components/select.md +129 -0
- package/docs/components/sheet-stack.md +39 -0
- package/docs/components/sheet.md +77 -0
- package/docs/components/skeleton.md +27 -0
- package/docs/components/slider.md +29 -0
- package/docs/components/sort-control.md +21 -0
- package/docs/components/source-list.md +30 -0
- package/docs/components/split-view.md +12 -0
- package/docs/components/stat-tile.md +49 -0
- package/docs/components/stepper.md +27 -0
- package/docs/components/surface.md +152 -0
- package/docs/components/tabbox.md +33 -0
- package/docs/components/table-view.md +43 -0
- package/docs/components/table.md +232 -0
- package/docs/components/tag-picker.md +39 -0
- package/docs/components/timebox.md +16 -0
- package/docs/components/toggle.md +21 -0
- package/docs/components/tokens.md +82 -0
- package/docs/components/toolbar.md +26 -0
- package/docs/components/tooltip.md +16 -0
- package/docs/components/tree.md +48 -0
- package/docs/components/truncate.md +21 -0
- package/docs/components/value-list.md +14 -0
- package/docs/components/view-settings.md +56 -0
- package/docs/components/workspace-switcher.md +42 -0
- package/docs/components/zeyos.md +196 -0
- package/docs/llms-small.txt +299 -0
- package/docs/llms.md +697 -100
- package/docs/llms.txt +46 -19
- package/package.json +9 -4
- package/src/components/activity-item/activity-item.js +21 -2
- package/src/components/agent-avatar/agent-avatar.css +195 -0
- package/src/components/agent-avatar/agent-avatar.js +333 -0
- package/src/components/agent-avatar/agent-face.js +292 -0
- package/src/components/agent-thread/ag-ui.js +44 -11
- package/src/components/agent-thread/agent-thread.js +103 -11
- package/src/components/agent-thread/ui-message-stream.js +3 -1
- package/src/components/app-rail/app-rail.css +5 -0
- package/src/components/app-sidebar/app-sidebar.css +3 -0
- package/src/components/app-sidebar/app-sidebar.js +4 -3
- package/src/components/approval-card/approval-card.css +6 -0
- package/src/components/approval-card/approval-card.js +55 -7
- package/src/components/aurora/aurora.css +149 -14
- package/src/components/aurora/aurora.js +49 -6
- package/src/components/calendar/calendar.css +6 -2
- package/src/components/calendar/calendar.js +127 -47
- package/src/components/card-view/card-view.js +5 -6
- package/src/components/chart/chart.css +159 -1
- package/src/components/chart/chart.js +450 -62
- package/src/components/chart/color.js +297 -0
- package/src/components/chart/svg-adapter.js +576 -0
- package/src/components/chart/svg-geometry.js +323 -0
- package/src/components/check-button/check-button.js +3 -18
- package/src/components/checklist/checklist.js +46 -17
- package/src/components/checklist/field-adapter.js +4 -1
- package/src/components/code-editor/code-editor.css +33 -0
- package/src/components/code-editor/code-editor.js +97 -8
- package/src/components/code-editor/field-adapter.js +3 -0
- package/src/components/composer/composer.css +3 -0
- package/src/components/composer/composer.js +100 -22
- package/src/components/context-menu/context-menu.js +41 -5
- package/src/components/copy/copy-button.js +9 -1
- package/src/components/copy/copy-input.js +5 -0
- package/src/components/data-filter/filter-core.js +0 -1
- package/src/components/date-picker/date-picker.css +8 -0
- package/src/components/date-picker/date-picker.js +47 -8
- package/src/components/date-picker/date-range-picker.js +1 -1
- package/src/components/date-picker/month-picker.js +19 -3
- package/src/components/date-picker/time-picker.js +54 -19
- package/src/components/datebox/date-range-box.js +7 -3
- package/src/components/datebox/datebox.js +32 -6
- package/src/components/dialog/dialog.css +6 -0
- package/src/components/dialog/dialog.js +22 -30
- package/src/components/dropdown/dropdown.js +1 -18
- package/src/components/empty-state/empty-state.js +21 -2
- package/src/components/field/field.js +19 -3
- package/src/components/fieldset/fieldset.js +3 -1
- package/src/components/filter/filter.js +9 -0
- package/src/components/form/form.js +19 -2
- package/src/components/kanban-view/kanban-card.js +15 -2
- package/src/components/kanban-view/kanban-view.css +21 -0
- package/src/components/kanban-view/kanban-view.js +29 -16
- package/src/components/launcher/launcher.css +14 -0
- package/src/components/launcher/launcher.js +54 -9
- package/src/components/master-panel/master-panel.js +24 -22
- package/src/components/menu-button/menu-button.js +26 -4
- package/src/components/message/message.css +228 -29
- package/src/components/message/message.js +664 -30
- package/src/components/modal/modal.js +70 -25
- package/src/components/modal/native-dialog.js +91 -0
- package/src/components/module-bar/module-bar.css +3 -0
- package/src/components/module-bar/module-bar.js +17 -4
- package/src/components/multi-value-editor/multi-value-editor.css +7 -2
- package/src/components/multi-value-editor/multi-value-editor.js +3 -2
- package/src/components/navigation-bar/navigation-bar.js +13 -1
- package/src/components/number-field/field-adapter.js +3 -0
- package/src/components/number-field/number-field.js +2 -1
- package/src/components/pagination/pagination.css +26 -2
- package/src/components/pagination/pagination.js +551 -65
- package/src/components/prose/prose.js +7 -1
- package/src/components/rating/field-adapter.js +3 -0
- package/src/components/run-status/run-status.js +43 -3
- package/src/components/run-trace/run-trace.js +15 -7
- package/src/components/search/search.js +3 -18
- package/src/components/select/field-adapter.js +8 -1
- package/src/components/select/select.js +68 -13
- package/src/components/sheet/sheet.js +27 -8
- package/src/components/slider/field-adapter.js +3 -0
- package/src/components/slider/slider.js +4 -6
- package/src/components/stat-tile/stat-tile.js +24 -9
- package/src/components/stepper/stepper.css +15 -0
- package/src/components/stepper/stepper.js +34 -2
- package/src/components/surface/catalog.js +185 -28
- package/src/components/surface/surface.js +10 -5
- package/src/components/tabbox/tabbox.js +13 -1
- package/src/components/table/table.css +160 -2
- package/src/components/table/table.js +479 -52
- package/src/components/table/window.js +46 -4
- package/src/components/table-view/table-view.js +1 -10
- package/src/components/tag-picker/field-adapter.js +3 -0
- package/src/components/tag-picker/tag-picker.js +2 -0
- package/src/components/timebox/field-adapter.js +3 -0
- package/src/components/toggle/toggle.js +51 -27
- package/src/components/tooltip/tooltip.js +21 -14
- package/src/components/tree/tree.js +87 -14
- package/src/components/truncate/truncate.js +21 -5
- package/src/components/value-list/value-list.js +37 -9
- package/src/components/view-settings/view-settings.js +1 -5
- package/src/core/component.js +34 -2
- package/src/core/date.js +5 -4
- package/src/core/drag-axis.js +24 -7
- package/src/core/export.js +4 -4
- package/src/core/fontawesome.js +34 -3
- package/src/core/format.js +3 -1
- package/src/core/http.js +23 -11
- package/src/core/icons.js +51 -10
- package/src/core/keyboard.js +83 -9
- package/src/core/messages.js +3 -0
- package/src/core/position.js +2 -2
- package/src/core/storage.js +80 -31
- package/src/core/util.js +16 -5
- package/src/elements/define.js +82 -47
- package/src/elements/kit.js +46 -35
- package/src/index.js +8 -4
- package/src/internal/agent-model.js +152 -0
- package/src/internal/app-rail.js +53 -2
- package/src/internal/collections.js +25 -0
- package/src/internal/menu-items.js +59 -0
- package/src/internal/overlay-content.js +35 -0
- package/src/internal/presence-loop.js +61 -14
- package/src/locales/de.js +3 -0
- package/src/zeyos/calendar.js +81 -19
- package/src/zeyos/connect.js +5 -1
- package/src/zeyos/form.js +29 -10
- package/src/zeyos/select.js +36 -12
- package/src/zeyos/table.js +43 -11
- package/src/zeyos/view.js +2 -1
- package/styles/tokens/semantic.css +7 -1
- package/styles/zx.css +1 -0
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runs a callback before the next paint, or shortly after where there are no animation frames
|
|
3
|
+
* (jsdom without `pretendToBeVisual`, a server-side DOM).
|
|
4
|
+
* @param {() => void} callback Work to run.
|
|
5
|
+
* @returns {number} Handle for `cancelFrame()`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function nextFrame(callback: () => void): number;
|
|
8
|
+
/** @param {number} handle What `nextFrame()` returned. @returns {void} */
|
|
9
|
+
export declare function cancelFrame(handle: number): void;
|
|
10
|
+
/**
|
|
11
|
+
* How many rows a PageUp or PageDown moves: the rows that fit in the visible height, less one so
|
|
12
|
+
* the row focus leaves stays in view as context. Falls back when either height is unknown. Shared
|
|
13
|
+
* by the components that page through rows with the keyboard.
|
|
14
|
+
* @param {number} viewport Visible height of the scroll region, below any sticky header.
|
|
15
|
+
* @param {number} rowHeight Height of one row.
|
|
16
|
+
* @param {number} [fallback=10] Rows to move when the heights are unusable.
|
|
17
|
+
* @returns {number} At least 1.
|
|
18
|
+
*/
|
|
19
|
+
export declare function pageStepRows(viewport: number, rowHeight: number, fallback?: number): number;
|
|
1
20
|
/**
|
|
2
21
|
* Which rows to draw for a scroll position: those in view, plus `overscan` viewports' worth above
|
|
3
22
|
* and below. Positions are zero-based and `end` is exclusive. The scroll position is clamped to
|
|
@@ -102,7 +121,7 @@ export type RowWindowHost = {
|
|
|
102
121
|
* Keeps a table body down to the rows around the scroll position. Spacer rows stand in for the rest,
|
|
103
122
|
* sized from one measured row, so the scroll height is the height of every row. Rows that stay in
|
|
104
123
|
* the window are never touched: moving one would blur it. Holds no listeners of its own except the
|
|
105
|
-
* `ResizeObserver` released by `stop()
|
|
124
|
+
* `ResizeObserver` released by `stop()`, and does without one where the environment has none.
|
|
106
125
|
*/
|
|
107
126
|
export declare class RowWindow {
|
|
108
127
|
host: RowWindowHost;
|
|
@@ -130,6 +149,11 @@ export declare class RowWindow {
|
|
|
130
149
|
* through the observer too, so it happens once the table is laid out and styled, however late it
|
|
131
150
|
* is attached. It waits for the next frame because a measurement may resize the scroll region
|
|
132
151
|
* itself, which an observer callback must not do.
|
|
152
|
+
*
|
|
153
|
+
* Where there is no `ResizeObserver` (jsdom) the window still works: it measures once on the next
|
|
154
|
+
* frame and again whenever the host calls `schedule()` — `Table` does on a window resize — and
|
|
155
|
+
* until a measurement succeeds it draws for the assumed row height and viewport, which is what a
|
|
156
|
+
* DOM without layout gets for good.
|
|
133
157
|
* @returns {void}
|
|
134
158
|
*/
|
|
135
159
|
start(): void;
|
|
@@ -9,9 +9,17 @@ export type ToggleOptions = {
|
|
|
9
9
|
*/
|
|
10
10
|
value?: any;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* The switch's name, drawn beside the track and read as its
|
|
13
|
+
* accessible name. Null renders no text: the switch then needs a name from somewhere else — a
|
|
14
|
+
* Field or `<label for>` around it, or `aria-labelledby` on the element.
|
|
13
15
|
*/
|
|
14
16
|
label?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the label is kept for assistive technology only:
|
|
19
|
+
* no visible text, and the label becomes the switch's `aria-label`. For a switch whose meaning
|
|
20
|
+
* the surrounding layout already shows — a table cell under a column header, a settings row.
|
|
21
|
+
*/
|
|
22
|
+
hideLabel?: boolean;
|
|
15
23
|
/**
|
|
16
24
|
* Initial disabled state.
|
|
17
25
|
*/
|
|
@@ -28,7 +36,12 @@ export type ToggleOptions = {
|
|
|
28
36
|
* @typedef {Object} ToggleOptions
|
|
29
37
|
* @property {boolean} [checked=false] Initial switch state.
|
|
30
38
|
* @property {*} [value=true] Value returned while on.
|
|
31
|
-
* @property {string|null} [label=null]
|
|
39
|
+
* @property {string|null} [label=null] The switch's name, drawn beside the track and read as its
|
|
40
|
+
* accessible name. Null renders no text: the switch then needs a name from somewhere else — a
|
|
41
|
+
* Field or `<label for>` around it, or `aria-labelledby` on the element.
|
|
42
|
+
* @property {boolean} [hideLabel=false] Whether the label is kept for assistive technology only:
|
|
43
|
+
* no visible text, and the label becomes the switch's `aria-label`. For a switch whose meaning
|
|
44
|
+
* the surrounding layout already shows — a table cell under a column header, a settings row.
|
|
32
45
|
* @property {boolean} [disabled=false] Initial disabled state.
|
|
33
46
|
* @property {(event: CustomEvent<{checked: boolean, value: *}>) => void} [onchange] Change callback.
|
|
34
47
|
*/
|
|
@@ -39,12 +52,13 @@ export type ToggleOptions = {
|
|
|
39
52
|
*/
|
|
40
53
|
export declare class Toggle extends Component<ToggleOptions> {
|
|
41
54
|
_createdRoot: boolean;
|
|
42
|
-
_original:
|
|
43
|
-
attributes: [string, string][];
|
|
44
|
-
children: Node[];
|
|
45
|
-
};
|
|
55
|
+
_original: import("../../core/dom.js").TargetSnapshot;
|
|
46
56
|
_checked: any;
|
|
47
57
|
_disabled: boolean;
|
|
58
|
+
/** The `aria-label` the target arrived with, put back whenever the switch stops writing its own. */
|
|
59
|
+
_ariaLabel: string;
|
|
60
|
+
/** @type {HTMLElement|null} The visible label, when there is one. */
|
|
61
|
+
_labelEl: HTMLElement | null;
|
|
48
62
|
_cleaned: boolean;
|
|
49
63
|
static cssName: string;
|
|
50
64
|
/** @type {Readonly<ToggleOptions>} */
|
|
@@ -77,6 +91,12 @@ export declare class Toggle extends Component<ToggleOptions> {
|
|
|
77
91
|
* @returns {*}
|
|
78
92
|
*/
|
|
79
93
|
getValue(): any;
|
|
94
|
+
/**
|
|
95
|
+
* Replaces the switch's name: the visible label, or the `aria-label` under `hideLabel`.
|
|
96
|
+
* @param {string|null} label New name; null removes it.
|
|
97
|
+
* @returns {this}
|
|
98
|
+
*/
|
|
99
|
+
setLabel(label: string | null): this;
|
|
80
100
|
/**
|
|
81
101
|
* Enables user interaction.
|
|
82
102
|
* @returns {this}
|
|
@@ -89,6 +109,18 @@ export declare class Toggle extends Component<ToggleOptions> {
|
|
|
89
109
|
disable(): this;
|
|
90
110
|
/** @returns {void} */
|
|
91
111
|
destroy(): void;
|
|
112
|
+
/**
|
|
113
|
+
* Writes the name where the options put it: a text node beside the track, or `aria-label` when
|
|
114
|
+
* the label is hidden. With no name of its own the switch leaves `aria-label` as it found it.
|
|
115
|
+
* @param {string|null} label Name, or null for none.
|
|
116
|
+
* @returns {void}
|
|
117
|
+
*/
|
|
118
|
+
_syncLabel(label: string | null): void;
|
|
92
119
|
/** @returns {void} */
|
|
93
120
|
_sync(): void;
|
|
94
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Change emitted after a real state transition.
|
|
124
|
+
* @event Toggle#change
|
|
125
|
+
* @type {CustomEvent<{checked: boolean, value: *}>}
|
|
126
|
+
*/
|
|
@@ -73,8 +73,9 @@ export type TooltipOptions = {
|
|
|
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
75
|
* but remains visible while the pointer is over either the anchor or the bubble. While open, the
|
|
76
|
-
* anchor
|
|
77
|
-
*
|
|
76
|
+
* anchor's `aria-describedby` also names the bubble; closing takes out that one id and leaves the
|
|
77
|
+
* rest of the list as it is then, ids the application added meanwhile included — and removes the
|
|
78
|
+
* attribute only when the bubble's id was all it held.
|
|
78
79
|
*
|
|
79
80
|
* A hover opens it after `delay`; keyboard focus opens it at once, because a keyboard user has no
|
|
80
81
|
* way to "hover a little longer". Touch never opens it: a bubble that cannot be dismissed by
|
|
@@ -108,7 +109,7 @@ export declare class Tooltip extends Component<TooltipOptions> {
|
|
|
108
109
|
*/
|
|
109
110
|
show(): this;
|
|
110
111
|
/**
|
|
111
|
-
* Closes the tooltip and
|
|
112
|
+
* Closes the tooltip and takes its id out of the anchor's `aria-describedby`.
|
|
112
113
|
* @returns {this}
|
|
113
114
|
* @fires Tooltip#close
|
|
114
115
|
*/
|
|
@@ -151,7 +152,7 @@ export declare class Tooltip extends Component<TooltipOptions> {
|
|
|
151
152
|
*/
|
|
152
153
|
getAnchor(): Element;
|
|
153
154
|
/**
|
|
154
|
-
* Closes the tooltip, removes the bubble, and
|
|
155
|
+
* Closes the tooltip, removes the bubble, and takes its id out of the anchor's ARIA.
|
|
155
156
|
* @returns {void}
|
|
156
157
|
*/
|
|
157
158
|
destroy(): void;
|
|
@@ -19,7 +19,9 @@ export type TreeOptions = {
|
|
|
19
19
|
*/
|
|
20
20
|
childrenKey?: string;
|
|
21
21
|
/**
|
|
22
|
-
* Initially expanded node IDs.
|
|
22
|
+
* Initially expanded node IDs. A lazy branch among them
|
|
23
|
+
* (`hasChildren` with no children loaded yet) shows collapsed until it is expanded on its own —
|
|
24
|
+
* clicked, →, or `expand()` — which loads it.
|
|
23
25
|
*/
|
|
24
26
|
expanded?: unknown[];
|
|
25
27
|
/**
|
|
@@ -138,7 +140,9 @@ export type TreeOptions = {
|
|
|
138
140
|
* @property {string|((node: TreeNode) => unknown)} [valueKey='ID'] Node ID property or reader.
|
|
139
141
|
* @property {string|((node: TreeNode) => string)} [labelKey='name'] Node label property or reader.
|
|
140
142
|
* @property {string} [childrenKey='children'] Property holding child nodes.
|
|
141
|
-
* @property {unknown[]} [expanded=[]] Initially expanded node IDs.
|
|
143
|
+
* @property {unknown[]} [expanded=[]] Initially expanded node IDs. A lazy branch among them
|
|
144
|
+
* (`hasChildren` with no children loaded yet) shows collapsed until it is expanded on its own —
|
|
145
|
+
* clicked, →, or `expand()` — which loads it.
|
|
142
146
|
* @property {false|'single'|'multi'} [selection='single'] Selection mode.
|
|
143
147
|
* @property {unknown[]} [selected=[]] Initially selected node IDs.
|
|
144
148
|
* @property {boolean} [checkboxes=false] Whether to render tri-state checkboxes.
|
|
@@ -197,6 +201,8 @@ export declare class TreeView extends Component<TreeOptions> {
|
|
|
197
201
|
_checked: Set<any>;
|
|
198
202
|
/** @type {Map<unknown, Promise<boolean>>} In-flight lazy loads, keyed by node ID. */
|
|
199
203
|
_loading: Map<unknown, Promise<boolean>>;
|
|
204
|
+
/** @type {Set<unknown>} Lazy branches whose children are not loaded yet, as of the last render. */
|
|
205
|
+
_unloaded: Set<unknown>;
|
|
200
206
|
_loadGeneration: number;
|
|
201
207
|
_destroyed: boolean;
|
|
202
208
|
_expanding: Map<any, any>;
|
|
@@ -239,7 +245,8 @@ export declare class TreeView extends Component<TreeOptions> {
|
|
|
239
245
|
*/
|
|
240
246
|
getPath(id: unknown): TreeNode[];
|
|
241
247
|
/**
|
|
242
|
-
* Filters the tree by a label substring, keeping the ancestors of every match.
|
|
248
|
+
* Filters the tree by a label substring, keeping the ancestors of every match. Only loaded
|
|
249
|
+
* children are searched, and every surviving branch opens except a lazy one not loaded yet.
|
|
243
250
|
* @param {string} query Search text; an empty string restores the full tree.
|
|
244
251
|
* @returns {this}
|
|
245
252
|
*/
|
|
@@ -259,13 +266,15 @@ export declare class TreeView extends Component<TreeOptions> {
|
|
|
259
266
|
*/
|
|
260
267
|
collapse(id: unknown): this;
|
|
261
268
|
/**
|
|
262
|
-
* Expands or collapses one branch.
|
|
269
|
+
* Expands or collapses one branch. A lazy branch not loaded yet counts as collapsed, so this
|
|
270
|
+
* loads and expands it.
|
|
263
271
|
* @param {unknown} id Node ID.
|
|
264
272
|
* @returns {Promise<this>}
|
|
265
273
|
*/
|
|
266
274
|
toggle(id: unknown): Promise<this>;
|
|
267
275
|
/**
|
|
268
|
-
* Expands every already-loaded branch.
|
|
276
|
+
* Expands every already-loaded branch. A lazy branch whose children have not been loaded stays
|
|
277
|
+
* collapsed; `expand(id)` loads it.
|
|
269
278
|
* @returns {this}
|
|
270
279
|
*/
|
|
271
280
|
expandAll(): this;
|
|
@@ -364,13 +373,41 @@ export declare class TreeView extends Component<TreeOptions> {
|
|
|
364
373
|
/** @param {KeyboardEvent} event @returns {void} */
|
|
365
374
|
_onKeydown(event: KeyboardEvent): void;
|
|
366
375
|
/**
|
|
367
|
-
* Expands every sibling branch of a row, the APG `*` shortcut.
|
|
376
|
+
* Expands every sibling branch of a row, the APG `*` shortcut. A lazy sibling is loaded first,
|
|
377
|
+
* exactly as → on it would; each one opens as its children arrive, and focus stays put.
|
|
368
378
|
* @param {{parent: TreeNode|null}} row Focused row.
|
|
369
379
|
* @returns {void}
|
|
370
380
|
*/
|
|
371
381
|
_expandSiblings(row: {
|
|
372
382
|
parent: TreeNode | null;
|
|
373
383
|
}): void;
|
|
384
|
+
/**
|
|
385
|
+
* Whether expanding a branch has to call the loader first: a loader is configured and the
|
|
386
|
+
* branch has no children yet. The same test `expand()` applies.
|
|
387
|
+
* @param {TreeNode|null} node Node in the working tree.
|
|
388
|
+
* @returns {boolean}
|
|
389
|
+
*/
|
|
390
|
+
_needsLoad(node: TreeNode | null): boolean;
|
|
391
|
+
/**
|
|
392
|
+
* Whether a branch is open now: expanded, and not a lazy branch still waiting for its children —
|
|
393
|
+
* an ID can sit in the expanded set before its children were ever fetched.
|
|
394
|
+
* @param {unknown} id Node ID.
|
|
395
|
+
* @param {TreeNode|null} node The node in the working tree.
|
|
396
|
+
* @returns {boolean}
|
|
397
|
+
*/
|
|
398
|
+
_isOpen(id: unknown, node: TreeNode | null): boolean;
|
|
399
|
+
/**
|
|
400
|
+
* The lazy branches whose children have not been loaded, read off the working tree — a filtered
|
|
401
|
+
* copy's pruned children say nothing about whether a branch was ever loaded.
|
|
402
|
+
* @returns {Set<unknown>} Their IDs; empty without a loader.
|
|
403
|
+
*/
|
|
404
|
+
_unloadedIds(): Set<unknown>;
|
|
405
|
+
/**
|
|
406
|
+
* {@link _isOpen} for a rendered row, from what the last render found unloaded.
|
|
407
|
+
* @param {unknown} id Node ID.
|
|
408
|
+
* @returns {boolean}
|
|
409
|
+
*/
|
|
410
|
+
_shownOpen(id: unknown): boolean;
|
|
374
411
|
/**
|
|
375
412
|
* Loads a branch's children through the configured loader, once.
|
|
376
413
|
* @param {TreeNode} node Branch node.
|
|
@@ -19,7 +19,8 @@ export type TruncateController = {
|
|
|
19
19
|
*/
|
|
20
20
|
isTruncated: () => boolean;
|
|
21
21
|
/**
|
|
22
|
-
* Removes the classes, the observer, and any title
|
|
22
|
+
* Removes the classes, the observer, and any title or line count
|
|
23
|
+
* this set, putting back the `title`, `data-lines`, and `--zx-truncate-lines` the element had.
|
|
23
24
|
*/
|
|
24
25
|
destroy: () => void;
|
|
25
26
|
};
|
|
@@ -33,7 +34,8 @@ export type TruncateController = {
|
|
|
33
34
|
* @typedef {Object} TruncateController
|
|
34
35
|
* @property {() => boolean} update Re-measures and returns whether the text is currently cut off.
|
|
35
36
|
* @property {() => boolean} isTruncated Whether the text was cut off at the last measurement.
|
|
36
|
-
* @property {() => void} destroy Removes the classes, the observer, and any title
|
|
37
|
+
* @property {() => void} destroy Removes the classes, the observer, and any title or line count
|
|
38
|
+
* this set, putting back the `title`, `data-lines`, and `--zx-truncate-lines` the element had.
|
|
37
39
|
*/
|
|
38
40
|
/**
|
|
39
41
|
* Clamps an element's text to a number of lines, and gives the cut-off text back on hover.
|
|
@@ -56,8 +56,9 @@ export type ValueListOptions = {
|
|
|
56
56
|
* @property {(event: CustomEvent<{value: string}>) => void} [onremove] Value removed listener.
|
|
57
57
|
*/
|
|
58
58
|
/**
|
|
59
|
-
* Tag/chip editor. It uses the APG listbox/option focus model:
|
|
60
|
-
* move focus,
|
|
59
|
+
* Tag/chip editor. It uses the APG listbox/option focus model: the list is one tab stop (a roving
|
|
60
|
+
* tabindex), each chip is an option, arrow keys move focus, Home/End go to the first and last
|
|
61
|
+
* chip, Ctrl+Left/Right reorders, and Delete/Backspace removes the focused option.
|
|
61
62
|
* @fires ValueList#change
|
|
62
63
|
* @fires ValueList#add
|
|
63
64
|
* @fires ValueList#remove
|
|
@@ -66,6 +67,7 @@ export type ValueListOptions = {
|
|
|
66
67
|
export declare class ValueList extends Component<ValueListOptions> {
|
|
67
68
|
_ownedNodes: any[];
|
|
68
69
|
_disabled: boolean;
|
|
70
|
+
_roving: any;
|
|
69
71
|
_dragIndex: number;
|
|
70
72
|
_initialState: string;
|
|
71
73
|
_initialDisabled: string;
|
|
@@ -124,6 +126,11 @@ export declare class ValueList extends Component<ValueListOptions> {
|
|
|
124
126
|
* @returns {this}
|
|
125
127
|
*/
|
|
126
128
|
disable(): this;
|
|
129
|
+
/**
|
|
130
|
+
* Keeps the chips one tab stop while the list is editable; a disabled list keeps none.
|
|
131
|
+
* @returns {void}
|
|
132
|
+
*/
|
|
133
|
+
_syncRoving(): void;
|
|
127
134
|
/** @returns {void} */
|
|
128
135
|
_renderChips(focusIndex?: number): void;
|
|
129
136
|
/** @param {KeyboardEvent} event @returns {void} */
|
|
@@ -14,7 +14,8 @@ export declare function formatDate(date: Date, fmt: string, options?: {
|
|
|
14
14
|
} | null): string;
|
|
15
15
|
/**
|
|
16
16
|
* Parses numeric date tokens from a string, returning null for mismatches or invalid dates.
|
|
17
|
-
* Unspecified fields default to 1970-01-01 00:00:00 local time.
|
|
17
|
+
* Unspecified fields default to 1970-01-01 00:00:00 local time. A time that the local clock skips
|
|
18
|
+
* at a daylight-saving change is accepted and moved forward, as `Date` does.
|
|
18
19
|
* @param {string} str Date text.
|
|
19
20
|
* @param {string} fmt Matching numeric format.
|
|
20
21
|
* @returns {Date|null}
|
|
@@ -16,7 +16,8 @@ export type DragAxisOptions = {
|
|
|
16
16
|
onStart?: (event: PointerEvent) => boolean | void;
|
|
17
17
|
/**
|
|
18
18
|
* Called at most once per frame with the signed pixel
|
|
19
|
-
* distance travelled along the axis since pointer-down.
|
|
19
|
+
* distance travelled along the axis since pointer-down. A horizontal distance is logical: positive
|
|
20
|
+
* towards the inline end, which is leftwards when the handle's computed `direction` is `rtl`.
|
|
20
21
|
*/
|
|
21
22
|
onMove: (delta: number) => void;
|
|
22
23
|
/**
|
|
@@ -26,7 +27,8 @@ export type DragAxisOptions = {
|
|
|
26
27
|
onEnd?: (delta: number, moved: boolean) => void;
|
|
27
28
|
/**
|
|
28
29
|
* Called for an arrow key along the
|
|
29
|
-
* axis. `large` is true while Shift is held.
|
|
30
|
+
* axis. `large` is true while Shift is held. `1` is ArrowDown, or towards the inline end:
|
|
31
|
+
* ArrowRight, and ArrowLeft under `rtl`, so the handle moves the way the arrow points.
|
|
30
32
|
*/
|
|
31
33
|
onStep?: (direction: -1 | 1, large: boolean) => void;
|
|
32
34
|
/**
|
|
@@ -65,11 +67,13 @@ export type DragAxisController = {
|
|
|
65
67
|
* drag begins. Return `false` to refuse it — the usual reason being that there is nothing to
|
|
66
68
|
* resize on either side of the handle.
|
|
67
69
|
* @property {(delta: number) => void} onMove Called at most once per frame with the signed pixel
|
|
68
|
-
* distance travelled along the axis since pointer-down.
|
|
70
|
+
* distance travelled along the axis since pointer-down. A horizontal distance is logical: positive
|
|
71
|
+
* towards the inline end, which is leftwards when the handle's computed `direction` is `rtl`.
|
|
69
72
|
* @property {(delta: number, moved: boolean) => void} [onEnd] Called once the pointer is released.
|
|
70
73
|
* `moved` is false for a press that never travelled, which is a click rather than a drag.
|
|
71
74
|
* @property {(direction: -1|1, large: boolean) => void} [onStep] Called for an arrow key along the
|
|
72
|
-
* axis. `large` is true while Shift is held.
|
|
75
|
+
* axis. `large` is true while Shift is held. `1` is ArrowDown, or towards the inline end:
|
|
76
|
+
* ArrowRight, and ArrowLeft under `rtl`, so the handle moves the way the arrow points.
|
|
73
77
|
* @property {(edge: 'min'|'max') => void} [onJump] Called for Home and End.
|
|
74
78
|
* @property {() => void} [onActivate] Called for Enter and Space, which components use for the
|
|
75
79
|
* collapse affordance a splitter is expected to offer.
|
|
@@ -91,7 +95,8 @@ export type DragAxisController = {
|
|
|
91
95
|
* sheet grows in the opposite direction depending on which edge it is attached to. What they do
|
|
92
96
|
* share is the fiddly part — pointer capture that survives the pointer leaving the handle, one
|
|
93
97
|
* write per frame however fast the pointer reports, telling a click apart from a zero-distance
|
|
94
|
-
* drag, and the WAI-ARIA keyboard map.
|
|
98
|
+
* drag, and the WAI-ARIA keyboard map. Its distances are logical, like the layouts it serves:
|
|
99
|
+
* under `dir="rtl"` a horizontal handle mirrors both the pointer and the arrow keys.
|
|
95
100
|
*
|
|
96
101
|
* @param {Element} handle Element the pointer grabs; also the keyboard target.
|
|
97
102
|
* @param {DragAxisOptions} options Axis and callbacks.
|
|
@@ -43,8 +43,8 @@ export type DownloadOptions = {
|
|
|
43
43
|
*
|
|
44
44
|
* Fields containing the delimiter, a double quote, CR, or LF are quoted with inner quotes doubled.
|
|
45
45
|
* Dates become ISO strings, null and undefined become empty fields, and text that starts with
|
|
46
|
-
* `=`, `+`, `-`, or
|
|
47
|
-
* formula. Numbers are never prefixed, so negative amounts survive intact.
|
|
46
|
+
* `=`, `+`, `-`, `@`, a tab, or a carriage return is prefixed with a tab so spreadsheets treat it
|
|
47
|
+
* as text rather than a formula. Numbers are never prefixed, so negative amounts survive intact.
|
|
48
48
|
*
|
|
49
49
|
* @param {Iterable<any>|null|undefined} rows Row objects.
|
|
50
50
|
* @param {Array<string|CsvColumn>} columns Column ids, or descriptors with a label and accessor.
|
|
@@ -56,7 +56,9 @@ export type FileSizeFormatOptions = {
|
|
|
56
56
|
};
|
|
57
57
|
export type RelativeTimeFormatOptions = {
|
|
58
58
|
/**
|
|
59
|
-
* Reference point the date is measured against
|
|
59
|
+
* Reference point the date is measured against: a
|
|
60
|
+
* Date, a Unix timestamp in seconds (not milliseconds — wrap `Date.now()` in a Date), or a date
|
|
61
|
+
* string, read the same way as the date itself.
|
|
60
62
|
*/
|
|
61
63
|
now?: Date | number | string;
|
|
62
64
|
/**
|
|
@@ -68,10 +68,32 @@ export type IconGlyph = [string, string] | [string, string, IconPaint];
|
|
|
68
68
|
* The bundled glyph set: outline icons from Lucide (ISC; see the notice above), embedded as path
|
|
69
69
|
* data so the library carries no webfont, stylesheet, or package dependency. Every entry is
|
|
70
70
|
* `[viewBox, path, 'stroke']` in a 24-unit view box. Extend the set with `registerIcons()`; read
|
|
71
|
-
* every available name with `iconNames()`.
|
|
71
|
+
* every available name with `iconNames()`, and the other names a glyph answers to in `iconAliases`.
|
|
72
72
|
* @type {Readonly<Record<string, IconGlyph>>}
|
|
73
73
|
*/
|
|
74
74
|
export declare const icons: Readonly<Record<string, IconGlyph>>;
|
|
75
|
+
/**
|
|
76
|
+
* Other names for bundled glyphs, as `alias → bundled name`: legacy gx Factory names, and the
|
|
77
|
+
* older Font Awesome names (`archive`, `edit`) that are still the ones most code reaches for.
|
|
78
|
+
*
|
|
79
|
+
* | Alias | Renders |
|
|
80
|
+
* | --- | --- |
|
|
81
|
+
* | `archive` | `box-archive` |
|
|
82
|
+
* | `edit` | `pen-to-square` |
|
|
83
|
+
* | `settings` | `gear` |
|
|
84
|
+
* | `clear` | `x` |
|
|
85
|
+
* | `checked` | `check` |
|
|
86
|
+
* | `question` | `info` |
|
|
87
|
+
* | `range` | `filter` |
|
|
88
|
+
* | `fields` | `list` |
|
|
89
|
+
* | `grid` | `table-cells-large` |
|
|
90
|
+
*
|
|
91
|
+
* `icon()` accepts an alias wherever it accepts the bundled name, under either renderer, and
|
|
92
|
+
* `iconNames()` lists them. A glyph an application registered under the alias itself takes
|
|
93
|
+
* precedence (see `icon()`); the table is frozen, so that registration is how an alias is changed.
|
|
94
|
+
* @type {Readonly<Record<string, string>>}
|
|
95
|
+
*/
|
|
96
|
+
export declare const iconAliases: Readonly<Record<string, string>>;
|
|
75
97
|
export type IconConfig = {
|
|
76
98
|
/**
|
|
77
99
|
* Renderer used for bare icon names.
|
|
@@ -146,7 +168,16 @@ export declare function loadFontAwesome(options: string | (Partial<Omit<IconConf
|
|
|
146
168
|
*/
|
|
147
169
|
export declare function registerIcons(glyphs: Record<string, IconGlyph>): void;
|
|
148
170
|
/**
|
|
149
|
-
* Lists every inline SVG glyph
|
|
171
|
+
* Lists every name `icon()` renders as an inline SVG glyph: the bundled set, the glyphs added with
|
|
172
|
+
* `registerIcons()`, and the aliases in `iconAliases`. The two agree — a name listed here renders
|
|
173
|
+
* a glyph, and a bare name that is not listed renders the placeholder (or throws with
|
|
174
|
+
* `{ strict: true }`). Font Awesome is not part of the answer: it resolves names in the browser,
|
|
175
|
+
* so under that renderer any name may draw.
|
|
176
|
+
*
|
|
177
|
+
* An alias is listed beside the glyph it draws, so the list holds more names than glyphs. For one
|
|
178
|
+
* entry per glyph — an icon gallery — leave the aliases out:
|
|
179
|
+
*
|
|
180
|
+
* iconNames().filter((name) => !Object.hasOwn(iconAliases, name));
|
|
150
181
|
* @returns {string[]} Sorted icon names.
|
|
151
182
|
*/
|
|
152
183
|
export declare function iconNames(): string[];
|
|
@@ -154,7 +185,9 @@ export declare function iconNames(): string[];
|
|
|
154
185
|
* Creates an icon element.
|
|
155
186
|
*
|
|
156
187
|
* Bare names (`'check'`) render through the active provider: the bundled inline SVG set by
|
|
157
|
-
* default, or Font Awesome after `useFontAwesome()` / `loadFontAwesome()`. A name
|
|
188
|
+
* default, or Font Awesome after `useFontAwesome()` / `loadFontAwesome()`. A bare name may be an
|
|
189
|
+
* alias from `iconAliases` (`'edit'` draws `pen-to-square`, `'settings'` draws `gear`); a glyph
|
|
190
|
+
* registered under the alias name wins over the alias. A name can also select
|
|
158
191
|
* its renderer itself — `'fa:user'`, `'duotone:user'`, `'kit:zeyos-notes'`, `'builtin:check'`, or
|
|
159
192
|
* a literal Font Awesome class list such as `'fa-solid fa-user'`.
|
|
160
193
|
*
|
|
@@ -72,10 +72,14 @@ export declare function focusTrap(container: Element): FocusTrapController;
|
|
|
72
72
|
* the neighbouring item, so a reader is never trapped in it. Under `dir="rtl"` the horizontal
|
|
73
73
|
* arrows follow the visual order.
|
|
74
74
|
*
|
|
75
|
+
* An item is skipped while it is hidden, disabled, or `aria-hidden`, while an element between it
|
|
76
|
+
* and the container is `hidden` or `inert`, and — once the container is rendered — while it is not
|
|
77
|
+
* rendered itself. A group built detached or hidden still initializes from its attributes alone.
|
|
78
|
+
*
|
|
75
79
|
* The group re-reads its items when children are added or removed and when an availability
|
|
76
|
-
* attribute (`hidden`, `disabled`, `aria-disabled`, `aria-hidden`) changes on an item or
|
|
77
|
-
* element inside the container that holds items — a `<fieldset disabled>` toggled around
|
|
78
|
-
* own `tabindex` writes and unrelated attribute churn are not observed.
|
|
80
|
+
* attribute (`hidden`, `inert`, `disabled`, `aria-disabled`, `aria-hidden`) changes on an item or
|
|
81
|
+
* on an element inside the container that holds items — a `<fieldset disabled>` toggled around
|
|
82
|
+
* them; its own `tabindex` writes and unrelated attribute churn are not observed.
|
|
79
83
|
* @param {Element} container Event and query container.
|
|
80
84
|
* @param {string} itemSelector Selector for roving items.
|
|
81
85
|
* @param {RovingOptions} [options={}] Behavior options.
|
|
@@ -533,6 +533,9 @@ export declare const defaultMessages: Readonly<{
|
|
|
533
533
|
'navigationBar.more': "More";
|
|
534
534
|
'navigationBar.primary': "Primary navigation";
|
|
535
535
|
'numberField.empty': "Empty";
|
|
536
|
+
'pagination.auto': "Auto";
|
|
537
|
+
'pagination.autoLoad': "Auto-load";
|
|
538
|
+
'pagination.autoSize': "Auto (%1)";
|
|
536
539
|
'pagination.empty': "0 of 0";
|
|
537
540
|
'pagination.label': "Pagination";
|
|
538
541
|
'pagination.loaded': "%1 of %2";
|
|
@@ -40,9 +40,10 @@ export type NamespacedStorage = {
|
|
|
40
40
|
* Keys use `zx2:<namespace length>:<namespace>:<key>`, so namespaces cannot overlap. Existing
|
|
41
41
|
* `zx:` keys are copied only when explicitly requested through `migrateLegacy(keys)`; they are
|
|
42
42
|
* never deleted. `clear()` only touches the current namespace. When the storage area is
|
|
43
|
-
* unavailable or refuses a write — private browsing, a full quota, cookies disabled — the
|
|
44
|
-
*
|
|
45
|
-
* need a try/catch and never see an exception.
|
|
43
|
+
* unavailable or refuses a write — private browsing, a full quota, cookies disabled — the value
|
|
44
|
+
* goes to an in-memory map that lives as long as the page and is shared by every view of the same
|
|
45
|
+
* area, so callers never need a try/catch and never see an exception. A refused write affects only
|
|
46
|
+
* that value: everything else is still read from, and written to, the real storage area.
|
|
46
47
|
*
|
|
47
48
|
* @param {string} namespace Namespace segment, typically an application or feature name.
|
|
48
49
|
* @param {StorageOptions} [options={}] Area selection.
|
|
@@ -39,7 +39,9 @@ export declare function throttle<T extends (...args: any[]) => any>(fn: T, ms: n
|
|
|
39
39
|
export declare function uid(prefix?: string): string;
|
|
40
40
|
/**
|
|
41
41
|
* Recursively merges plain objects without mutating either input.
|
|
42
|
-
* Arrays and other values are replaced rather than merged.
|
|
42
|
+
* Arrays and other values are replaced rather than merged. Only own enumerable keys are copied,
|
|
43
|
+
* each as an own data property, so a `__proto__` key from parsed JSON stays an ordinary key and
|
|
44
|
+
* never changes the result's prototype.
|
|
43
45
|
* @template T
|
|
44
46
|
* @template U
|
|
45
47
|
* @param {T} a Base value.
|
|
@@ -17,8 +17,7 @@ export type ElementWrapperOptions = {
|
|
|
17
17
|
*/
|
|
18
18
|
events?: string[] | null;
|
|
19
19
|
/**
|
|
20
|
-
* Component methods the element forwards.
|
|
21
|
-
* the element also carries its live values across a rebuild and across removal.
|
|
20
|
+
* Component methods the element forwards.
|
|
22
21
|
*/
|
|
23
22
|
methods?: ElementMethodMap | null;
|
|
24
23
|
};
|
|
@@ -27,6 +26,10 @@ export type ElementWrapperOptions = {
|
|
|
27
26
|
* Groupbox and Dialog wrappers adopt their host's initial children as component content;
|
|
28
27
|
* other wrappers leave unrelated host children untouched and append their component root.
|
|
29
28
|
*
|
|
29
|
+
* Every wrapper carries its component's live values — what the user selected, typed, checked, or
|
|
30
|
+
* opened — across a rebuild (an attribute that needs a new component changed) and across removal
|
|
31
|
+
* and reinsertion, so moving the element keeps its state.
|
|
32
|
+
*
|
|
30
33
|
* A wrapper that declares `methods` forwards them: `element.upsert(item)` calls the component, and
|
|
31
34
|
* a call made while no component exists is queued and runs, in order, once it does. A forwarded
|
|
32
35
|
* call returns the component's answer, with the component itself replaced by the element; a
|
package/dist/types/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export { Http, zeyosService, parseResult } from './core/http.js';
|
|
|
16
16
|
export { setTranslator, setLanguage, getLanguage, translate, translatePlural, printf, defaultMessages } from './core/i18n.js';
|
|
17
17
|
export { focusTrap, rovingTabindex, typeahead } from './core/keyboard.js';
|
|
18
18
|
export { formatDate, parseDate, clampDate, isSameDay, addDays, addMonths, getWeekStart } from './core/date.js';
|
|
19
|
-
export { icon, icons, iconNames, registerIcons, ICON_SIZE, configureIcons, getIconConfig, useFontAwesome, useBuiltinIcons, loadFontAwesome } from './core/icons.js';
|
|
19
|
+
export { icon, icons, iconAliases, iconNames, registerIcons, ICON_SIZE, configureIcons, getIconConfig, useFontAwesome, useBuiltinIcons, loadFontAwesome } from './core/icons.js';
|
|
20
20
|
export { faStyles, faFamilies, faNames, faIconClasses, parseIconSpec, kitUrl, loadFontAwesomeKit } from './core/fontawesome.js';
|
|
21
21
|
export { debounce, throttle, uid, deepMerge, isElement, clamp, toArray, groupBy, sortBy, uniqueBy, escapeRegExp } from './core/util.js';
|
|
22
22
|
export { formatNumber, formatCurrency, formatPercent, formatFileSize, formatRelativeTime } from './core/format.js';
|
|
@@ -52,11 +52,12 @@ export { Tabbox } from './components/tabbox/tabbox.js';
|
|
|
52
52
|
export { NavigationBar } from './components/navigation-bar/navigation-bar.js';
|
|
53
53
|
export { Stepper } from './components/stepper/stepper.js';
|
|
54
54
|
export { Breadcrumb } from './components/breadcrumb/breadcrumb.js';
|
|
55
|
-
export { Pagination, paginationRange } from './components/pagination/pagination.js';
|
|
55
|
+
export { Pagination, fitPageSize, paginationRange } from './components/pagination/pagination.js';
|
|
56
56
|
export { Search } from './components/search/search.js';
|
|
57
57
|
export { AppIcon, appIcon } from './components/app-icon/app-icon.js';
|
|
58
58
|
export { Launcher, rankLauncherItems } from './components/launcher/launcher.js';
|
|
59
59
|
export { AVATAR_TONES, Avatar, avatarInitials, avatarTone } from './components/avatar/avatar.js';
|
|
60
|
+
export { AGENT_BODIES, AGENT_EYES, AgentAvatar, agentFace, agentTraits } from './components/agent-avatar/agent-avatar.js';
|
|
60
61
|
export { EntityRef, normalizeEntityRef, normalizeEntityRefLink, normalizeEntityRefMetadata, normalizeEntityRefActions } from './components/entity-ref/entity-ref.js';
|
|
61
62
|
export { FileItem, normalizeFileItem } from './components/file-item/file-item.js';
|
|
62
63
|
export { FileList, normalizeFileListItems } from './components/file-list/file-list.js';
|
|
@@ -82,7 +83,7 @@ export { WorkspaceSwitcher } from './components/workspace-switcher/workspace-swi
|
|
|
82
83
|
export { normalizeAppItems } from './internal/app-rail.js';
|
|
83
84
|
export { ModuleBar, partitionModules, resolveModuleColor } from './components/module-bar/module-bar.js';
|
|
84
85
|
export { AppSidebar, presentationGlyph } from './components/app-sidebar/app-sidebar.js';
|
|
85
|
-
export { Message } from './components/message/message.js';
|
|
86
|
+
export { Message, messageStackLayout } from './components/message/message.js';
|
|
86
87
|
export { Modal } from './components/modal/modal.js';
|
|
87
88
|
export { Dialog } from './components/dialog/dialog.js';
|
|
88
89
|
export { Sheet } from './components/sheet/sheet.js';
|
|
@@ -117,7 +118,8 @@ export { KanbanView } from './components/kanban-view/kanban-view.js';
|
|
|
117
118
|
export { absoluteKanbanIndex, allowsKanbanTransition, createKanbanHistory, evaluateKanbanMove, kanbanSearchTerms, locateKanbanRecord, matchesKanbanSearch, normalizeKanbanRules, reorderKanbanRecords, resolveKanbanRules } from './components/kanban-view/kanban-policy.js';
|
|
118
119
|
export { createKanbanAvatars, createKanbanCardHead, createKanbanIndicator, createKanbanProgress, kanbanAvatarLimit, resolveKanbanAssignees, resolveKanbanIndicator, resolveKanbanProgress } from './components/kanban-view/kanban-card.js';
|
|
119
120
|
export { Grid, billingColumns, isBillingLine } from './components/grid/grid.js';
|
|
120
|
-
export { Chart, ChartJsAdapter, chartSummaryTable, cloneChartValue, isEmptyChartData } from './components/chart/chart.js';
|
|
121
|
+
export { Chart, ChartJsAdapter, chartSummaryModel, chartSummaryTable, cloneChartValue, isEmptyChartData } from './components/chart/chart.js';
|
|
122
|
+
export { SvgChartAdapter } from './components/chart/svg-adapter.js';
|
|
121
123
|
export { TreeView } from './components/tree/tree.js';
|
|
122
124
|
export { Finder } from './components/finder/finder.js';
|
|
123
125
|
export { DataFilter } from './components/data-filter/data-filter.js';
|