@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,5 +1,7 @@
|
|
|
1
1
|
import { Component } from '../../core/component.js';
|
|
2
2
|
export type MessageKind = 'info' | 'success' | 'warning' | 'error';
|
|
3
|
+
export type MessagePlacement = 'top-start' | 'top' | 'top-end' | 'bottom-start' | 'bottom' | 'bottom-end';
|
|
4
|
+
export type MessageHighlight = boolean | 'border' | 'animated';
|
|
3
5
|
export type MessageAction = {
|
|
4
6
|
/**
|
|
5
7
|
* Button text: a verb naming what happens ("Undo", "Approve", "Retry").
|
|
@@ -43,10 +45,19 @@ export type MessageShowOptions = {
|
|
|
43
45
|
leading?: Node | {
|
|
44
46
|
toElement: () => Node | null;
|
|
45
47
|
} | null;
|
|
48
|
+
/**
|
|
49
|
+
* Draws the border in the kind colour (`'border'` or
|
|
50
|
+
* `true`), or sends a light around it (`'animated'`); the default is the area's `highlight`.
|
|
51
|
+
*/
|
|
52
|
+
highlight?: MessageHighlight;
|
|
46
53
|
/**
|
|
47
54
|
* Element whose nearest Zx theme scope owns a floating toast.
|
|
48
55
|
*/
|
|
49
56
|
scope?: Element | string | null;
|
|
57
|
+
/**
|
|
58
|
+
* Where a floating toast sits in the viewport; the default is the one set with `Message.setPlacement()`. Messages of one placement share a region. Ignored by an inline area.
|
|
59
|
+
*/
|
|
60
|
+
placement?: MessagePlacement;
|
|
50
61
|
};
|
|
51
62
|
export type MessageOptions = {
|
|
52
63
|
/**
|
|
@@ -65,6 +76,65 @@ export type MessageOptions = {
|
|
|
65
76
|
* Maximum number of visible messages.
|
|
66
77
|
*/
|
|
67
78
|
maxVisible?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Default highlight of the messages shown here.
|
|
81
|
+
*/
|
|
82
|
+
highlight?: MessageHighlight;
|
|
83
|
+
/**
|
|
84
|
+
* Piles the visible messages into one stack, the newest in front
|
|
85
|
+
* and two more peeking out behind it. The stack opens while the pointer is over it or focus is
|
|
86
|
+
* inside it, and a press on it keeps it open until a press outside it or Escape; while it is open
|
|
87
|
+
* by any of these, no message in it times out.
|
|
88
|
+
*/
|
|
89
|
+
stack?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Keeps a stack open. Its messages still time out.
|
|
92
|
+
*/
|
|
93
|
+
expanded?: boolean;
|
|
94
|
+
};
|
|
95
|
+
export type MessageStackLength = {
|
|
96
|
+
/**
|
|
97
|
+
* Measured part, in pixels.
|
|
98
|
+
*/
|
|
99
|
+
px: number;
|
|
100
|
+
/**
|
|
101
|
+
* Spacing steps added to it (negative or fractional where it is cut back).
|
|
102
|
+
*/
|
|
103
|
+
steps: number;
|
|
104
|
+
};
|
|
105
|
+
export type MessageStackItem = {
|
|
106
|
+
/**
|
|
107
|
+
* Place in the pile, 0 for the front (newest) message, counting back.
|
|
108
|
+
*/
|
|
109
|
+
depth: number;
|
|
110
|
+
/**
|
|
111
|
+
* How far the message moves from the stack's edge.
|
|
112
|
+
*/
|
|
113
|
+
y: MessageStackLength;
|
|
114
|
+
/**
|
|
115
|
+
* Drawn size, 1 at the front.
|
|
116
|
+
*/
|
|
117
|
+
scale: number;
|
|
118
|
+
/**
|
|
119
|
+
* How much is cut from the message's inner edge, in its
|
|
120
|
+
* own unscaled size, so that only the strip peeking out past the message in front of it shows —
|
|
121
|
+
* nothing behind a translucent card shows through it. Null where nothing is cut.
|
|
122
|
+
*/
|
|
123
|
+
clip: MessageStackLength | null;
|
|
124
|
+
/**
|
|
125
|
+
* Whether the message is out of sight behind the visible pile.
|
|
126
|
+
*/
|
|
127
|
+
hidden: boolean;
|
|
128
|
+
};
|
|
129
|
+
export type MessageStackLayout = {
|
|
130
|
+
/**
|
|
131
|
+
* One per message, the front first.
|
|
132
|
+
*/
|
|
133
|
+
items: MessageStackItem[];
|
|
134
|
+
/**
|
|
135
|
+
* The stack's own height.
|
|
136
|
+
*/
|
|
137
|
+
size: MessageStackLength;
|
|
68
138
|
};
|
|
69
139
|
export type MessageHandle = {
|
|
70
140
|
/**
|
|
@@ -72,7 +142,12 @@ export type MessageHandle = {
|
|
|
72
142
|
*/
|
|
73
143
|
close: () => void;
|
|
74
144
|
};
|
|
75
|
-
/**
|
|
145
|
+
/**
|
|
146
|
+
* How a message stands out beyond its kind icon. `false` draws the plain card; `'border'` (or
|
|
147
|
+
* `true`) draws its border in the kind colour; `'animated'` adds a light that travels around that
|
|
148
|
+
* border — a kind-coloured border where motion is reduced.
|
|
149
|
+
* @typedef {boolean|'border'|'animated'} MessageHighlight
|
|
150
|
+
*/
|
|
76
151
|
/**
|
|
77
152
|
* The one command a message may carry, drawn as a small button beside its text.
|
|
78
153
|
* @typedef {Object} MessageAction
|
|
@@ -93,7 +168,10 @@ export type MessageHandle = {
|
|
|
93
168
|
* @property {Node|{toElement: () => Node|null}|null} [leading=null] Visual shown in place of the
|
|
94
169
|
* kind icon, such as an Avatar's element. It is decorative — the message text must say what it
|
|
95
170
|
* shows.
|
|
171
|
+
* @property {MessageHighlight} [highlight=false] Draws the border in the kind colour (`'border'` or
|
|
172
|
+
* `true`), or sends a light around it (`'animated'`); the default is the area's `highlight`.
|
|
96
173
|
* @property {Element|string|null} [scope=null] Element whose nearest Zx theme scope owns a floating toast.
|
|
174
|
+
* @property {MessagePlacement} [placement='top-end'] Where a floating toast sits in the viewport; the default is the one set with `Message.setPlacement()`. Messages of one placement share a region. Ignored by an inline area.
|
|
97
175
|
*/
|
|
98
176
|
/**
|
|
99
177
|
* @typedef {Object} MessageOptions
|
|
@@ -101,6 +179,36 @@ export type MessageHandle = {
|
|
|
101
179
|
* @property {number} [timeout=4000] Default auto-dismiss delay.
|
|
102
180
|
* @property {boolean} [closable=true] Default close-button visibility.
|
|
103
181
|
* @property {number} [maxVisible=5] Maximum number of visible messages.
|
|
182
|
+
* @property {MessageHighlight} [highlight=false] Default highlight of the messages shown here.
|
|
183
|
+
* @property {boolean} [stack=false] Piles the visible messages into one stack, the newest in front
|
|
184
|
+
* and two more peeking out behind it. The stack opens while the pointer is over it or focus is
|
|
185
|
+
* inside it, and a press on it keeps it open until a press outside it or Escape; while it is open
|
|
186
|
+
* by any of these, no message in it times out.
|
|
187
|
+
* @property {boolean} [expanded=false] Keeps a stack open. Its messages still time out.
|
|
188
|
+
*/
|
|
189
|
+
/**
|
|
190
|
+
* A length in a stack: measured pixels plus a number of spacing steps, so the spacing stays a
|
|
191
|
+
* theme setting. A step is `--zx-message-gap` in an open stack, the space between two messages,
|
|
192
|
+
* and `--zx-message-peek` in a collapsed one, how far each message behind the front shows.
|
|
193
|
+
* @typedef {Object} MessageStackLength
|
|
194
|
+
* @property {number} px Measured part, in pixels.
|
|
195
|
+
* @property {number} steps Spacing steps added to it (negative or fractional where it is cut back).
|
|
196
|
+
*/
|
|
197
|
+
/**
|
|
198
|
+
* Where one message sits in a stack.
|
|
199
|
+
* @typedef {Object} MessageStackItem
|
|
200
|
+
* @property {number} depth Place in the pile, 0 for the front (newest) message, counting back.
|
|
201
|
+
* @property {MessageStackLength} y How far the message moves from the stack's edge.
|
|
202
|
+
* @property {number} scale Drawn size, 1 at the front.
|
|
203
|
+
* @property {MessageStackLength|null} clip How much is cut from the message's inner edge, in its
|
|
204
|
+
* own unscaled size, so that only the strip peeking out past the message in front of it shows —
|
|
205
|
+
* nothing behind a translucent card shows through it. Null where nothing is cut.
|
|
206
|
+
* @property {boolean} hidden Whether the message is out of sight behind the visible pile.
|
|
207
|
+
*/
|
|
208
|
+
/**
|
|
209
|
+
* @typedef {Object} MessageStackLayout
|
|
210
|
+
* @property {MessageStackItem[]} items One per message, the front first.
|
|
211
|
+
* @property {MessageStackLength} size The stack's own height.
|
|
104
212
|
*/
|
|
105
213
|
/**
|
|
106
214
|
* Returned by every `show()`: closes that message early. Closing one that already closed, or one
|
|
@@ -174,7 +282,15 @@ export declare class MessageQueue<T> {
|
|
|
174
282
|
}
|
|
175
283
|
/**
|
|
176
284
|
* Inline message area and static toast service.
|
|
285
|
+
*
|
|
286
|
+
* With `stack` the visible messages pile up into one card, the newest in front, and the pile
|
|
287
|
+
* opens to show them all — the same for an inline area and a floating region. Floating regions
|
|
288
|
+
* stack by default (`Message.setStack(false)` lists their messages instead); an inline area stacks
|
|
289
|
+
* with `stack: true`. The root then carries `data-stack` and `data-state="collapsed"` or
|
|
290
|
+
* `"expanded"`.
|
|
177
291
|
* @extends {Component<MessageOptions>}
|
|
292
|
+
* @fires Message#expand
|
|
293
|
+
* @fires Message#collapse
|
|
178
294
|
*/
|
|
179
295
|
export declare class Message extends Component<MessageOptions> {
|
|
180
296
|
#private;
|
|
@@ -188,11 +304,35 @@ export declare class Message extends Component<MessageOptions> {
|
|
|
188
304
|
_floatingHost: Element | null;
|
|
189
305
|
/** @type {Element|null} Where the floating region was last put: its scope, or the topmost modal. */
|
|
190
306
|
_placedIn: Element | null;
|
|
307
|
+
/** @type {MessagePlacement|null} The placement this instance is the floating region of. */
|
|
308
|
+
_placement: MessagePlacement | null;
|
|
191
309
|
/** @type {import('../../core/overlay-stack.js').OverlayHandle|null} The region's toast entry. */
|
|
192
310
|
_overlay: import('../../core/overlay-stack.js').OverlayHandle | null;
|
|
193
311
|
/** @type {(() => void)|null} Stops following the overlay stack. */
|
|
194
312
|
_unfollow: (() => void) | null;
|
|
195
313
|
_queue: MessageQueue<any>;
|
|
314
|
+
/** @type {any[]} The active messages, oldest first, closing ones until they are gone. */
|
|
315
|
+
_shown: any[];
|
|
316
|
+
/** Activation counter: a newer message paints over an older one in a stack. */
|
|
317
|
+
_seq: number;
|
|
318
|
+
_stack: any;
|
|
319
|
+
/** Stack holds: the pointer is over it, focus is inside it, a press or `expand()` pinned it. */
|
|
320
|
+
_hovered: boolean;
|
|
321
|
+
_focusWithin: boolean;
|
|
322
|
+
_pinned: boolean;
|
|
323
|
+
/** @type {boolean} Whether the timers were last held by the stack. */
|
|
324
|
+
_wasHeld: boolean;
|
|
325
|
+
/** @type {Element|null} Where focus came from when it entered the stack, for Escape. */
|
|
326
|
+
_stackReturn: Element | null;
|
|
327
|
+
/** @type {number} When the stack was last pinned, so the press that pinned it does not unpin it. */
|
|
328
|
+
_pinnedAt: number;
|
|
329
|
+
/** @type {boolean|null} Whether the stack last piled from the foot; null before the first layout. */
|
|
330
|
+
_pileFromEnd: boolean | null;
|
|
331
|
+
/** Set while messages are moved, so the focus they lose and regain is not read as leaving. */
|
|
332
|
+
_reordering: boolean;
|
|
333
|
+
_resizeObserver: ResizeObserver;
|
|
334
|
+
/** @type {boolean} What the last `expand`/`collapse` event said. */
|
|
335
|
+
_wasExpanded: boolean;
|
|
196
336
|
_cleaned: boolean;
|
|
197
337
|
static cssName: string;
|
|
198
338
|
/** @type {Readonly<MessageOptions>} */
|
|
@@ -244,30 +384,97 @@ export declare class Message extends Component<MessageOptions> {
|
|
|
244
384
|
/**
|
|
245
385
|
* Shows a floating progress status.
|
|
246
386
|
* @param {string} text Initial status text.
|
|
247
|
-
* @param {{scope?: Element|string|null}} [options={}]
|
|
387
|
+
* @param {{scope?: Element|string|null, placement?: MessagePlacement, highlight?: MessageHighlight}} [options={}]
|
|
388
|
+
* Floating-region scope and placement, and the message's highlight.
|
|
248
389
|
* @returns {ProgressHandle}
|
|
249
390
|
*/
|
|
250
391
|
static progress(text: string, options?: {
|
|
251
392
|
scope?: Element | string | null;
|
|
393
|
+
placement?: MessagePlacement;
|
|
394
|
+
highlight?: MessageHighlight;
|
|
252
395
|
}): ProgressHandle;
|
|
396
|
+
/**
|
|
397
|
+
* Sets whether floating regions stack their messages (see the `stack` option); they do by
|
|
398
|
+
* default, and `false` lists them one below another instead. Unlike a placement it applies at
|
|
399
|
+
* once, to the regions on screen as well as those to come.
|
|
400
|
+
* @param {boolean} enabled Whether to stack.
|
|
401
|
+
* @returns {boolean} Whether floating regions stack now.
|
|
402
|
+
*/
|
|
403
|
+
static setStack(enabled: boolean): boolean;
|
|
404
|
+
/**
|
|
405
|
+
* Returns whether floating regions stack their messages, true unless `setStack(false)` was called.
|
|
406
|
+
* @returns {boolean}
|
|
407
|
+
*/
|
|
408
|
+
static getStack(): boolean;
|
|
409
|
+
/**
|
|
410
|
+
* Sets where floating messages appear when a call names no `placement`. It applies to messages
|
|
411
|
+
* shown from then on; a region already on screen stays where it is until its last toast closes.
|
|
412
|
+
*
|
|
413
|
+
* The region carries the placement as `data-placement`, and its distance from the viewport edge
|
|
414
|
+
* is the `--zx-message-offset` custom property (default `var(--zx-space-4)`), read from the
|
|
415
|
+
* region's theme scope. At 640px and narrower every placement spans the foot of the viewport.
|
|
416
|
+
* @param {MessagePlacement} placement One of `'top-start'`, `'top'`, `'top-end'`, `'bottom-start'`,
|
|
417
|
+
* `'bottom'`, `'bottom-end'`; anything else restores `'top-end'`.
|
|
418
|
+
* @returns {MessagePlacement} The placement now in effect.
|
|
419
|
+
*/
|
|
420
|
+
static setPlacement(placement: MessagePlacement): MessagePlacement;
|
|
421
|
+
/**
|
|
422
|
+
* Returns where floating messages appear when a call names no `placement`.
|
|
423
|
+
* @returns {MessagePlacement}
|
|
424
|
+
*/
|
|
425
|
+
static getPlacement(): MessagePlacement;
|
|
253
426
|
/**
|
|
254
427
|
* Removes a floating region at once, toasts and all, without waiting for them to time out.
|
|
255
428
|
*
|
|
256
429
|
* A region already removes itself when its last toast closes, and one whose host has left the
|
|
257
430
|
* document is replaced on the next toast, so this is only for a host being torn down while
|
|
258
431
|
* toasts are still showing — an application view unmounting its themed shell, say.
|
|
432
|
+
*
|
|
433
|
+
* A scope has one region per placement in use; all of them are removed.
|
|
259
434
|
* @param {Element|string} scope Element or selector whose nearest Zx theme scope owns the region,
|
|
260
435
|
* as passed to `show()`.
|
|
261
436
|
* @returns {boolean} Whether there was a region to remove.
|
|
262
437
|
*/
|
|
263
438
|
static disposeRegion(scope: Element | string): boolean;
|
|
439
|
+
/**
|
|
440
|
+
* Turns stacking on or off for this area or region (see the `stack` option). The messages on
|
|
441
|
+
* screen move into the pile, or back into a list, where they are.
|
|
442
|
+
* @param {boolean} enabled Whether to stack.
|
|
443
|
+
* @returns {this}
|
|
444
|
+
*/
|
|
445
|
+
setStack(enabled: boolean): this;
|
|
446
|
+
/**
|
|
447
|
+
* Opens a stack and keeps it open until `collapse()`, Escape, or a press outside it. Does
|
|
448
|
+
* nothing without `stack`.
|
|
449
|
+
* @returns {this}
|
|
450
|
+
* @fires Message#expand
|
|
451
|
+
*/
|
|
452
|
+
expand(): this;
|
|
453
|
+
/**
|
|
454
|
+
* Closes a stack opened by a press, `expand()`, or the pointer. A stack holding focus stays open
|
|
455
|
+
* until focus leaves it, and one with `expanded: true` never closes.
|
|
456
|
+
* @returns {this}
|
|
457
|
+
* @fires Message#collapse
|
|
458
|
+
*/
|
|
459
|
+
collapse(): this;
|
|
460
|
+
/**
|
|
461
|
+
* Reports whether the stack is open. Always false without `stack`.
|
|
462
|
+
* @returns {boolean}
|
|
463
|
+
*/
|
|
464
|
+
isExpanded(): boolean;
|
|
264
465
|
/** @returns {void} */
|
|
265
466
|
destroy(): void;
|
|
266
|
-
/**
|
|
267
|
-
|
|
467
|
+
/**
|
|
468
|
+
* @param {string} text
|
|
469
|
+
* @param {{highlight?: MessageHighlight}} [options={}]
|
|
470
|
+
* @returns {ProgressHandle}
|
|
471
|
+
*/
|
|
472
|
+
_progress(text: string, options?: {
|
|
473
|
+
highlight?: MessageHighlight;
|
|
474
|
+
}): ProgressHandle;
|
|
268
475
|
/**
|
|
269
476
|
* @param {string|Node} msg
|
|
270
|
-
* @param {{kind: MessageKind, timeout: number, closable: boolean, action?: MessageAction|null, leading?: Node|null}} settings
|
|
477
|
+
* @param {{kind: MessageKind, timeout: number, closable: boolean, action?: MessageAction|null, leading?: Node|null, highlight?: 'border'|'animated'|null}} settings
|
|
271
478
|
* @param {{pct: number, text: string}|null} [progress=null]
|
|
272
479
|
* @returns {any}
|
|
273
480
|
*/
|
|
@@ -277,6 +484,7 @@ export declare class Message extends Component<MessageOptions> {
|
|
|
277
484
|
closable: boolean;
|
|
278
485
|
action?: MessageAction | null;
|
|
279
486
|
leading?: Node | null;
|
|
487
|
+
highlight?: 'border' | 'animated' | null;
|
|
280
488
|
}, progress?: {
|
|
281
489
|
pct: number;
|
|
282
490
|
text: string;
|
|
@@ -293,6 +501,64 @@ export declare class Message extends Component<MessageOptions> {
|
|
|
293
501
|
_close(entry: any): void;
|
|
294
502
|
/** @param {any} entry @returns {void} */
|
|
295
503
|
_finish(entry: any): void;
|
|
504
|
+
/**
|
|
505
|
+
* Whether a stack holds every timer: it is open because someone is looking at it.
|
|
506
|
+
* @returns {boolean}
|
|
507
|
+
*/
|
|
508
|
+
_held(): boolean;
|
|
509
|
+
/**
|
|
510
|
+
* Whether the stack piles from the foot: a bottom placement, or any placement on a phone. Read
|
|
511
|
+
* from the region's `--zx-message-dir`, which the stylesheet sets for both.
|
|
512
|
+
* @returns {boolean}
|
|
513
|
+
*/
|
|
514
|
+
_fromEnd(): boolean;
|
|
515
|
+
/**
|
|
516
|
+
* Puts the messages in document order: oldest first, or newest first in a stack that piles from
|
|
517
|
+
* the top. Moves only when the order is wrong. A moved message keeps focus, and does not play
|
|
518
|
+
* its entrance again (`data-entered`).
|
|
519
|
+
* @param {boolean} [fromEnd] Whether the stack piles from the foot, when already known.
|
|
520
|
+
* @returns {void}
|
|
521
|
+
*/
|
|
522
|
+
_order(fromEnd?: boolean): void;
|
|
523
|
+
/**
|
|
524
|
+
* Moves focus off a message that is closing with focus inside it. In a stack it goes to the
|
|
525
|
+
* same control of the next message (the one before, for the last), so a keyboard reader closes
|
|
526
|
+
* one message after another without leaving the stack; from the stack's last message it goes
|
|
527
|
+
* back to where it was before it came into the stack. A list hands it back to where it was
|
|
528
|
+
* before it came into the message.
|
|
529
|
+
* @param {any} entry Closing message.
|
|
530
|
+
* @returns {void}
|
|
531
|
+
*/
|
|
532
|
+
_handOffFocus(entry: any): void;
|
|
533
|
+
/**
|
|
534
|
+
* Settles a stack after anything that may open or close it: holds or releases the timers,
|
|
535
|
+
* lays the messages out, and reports a change of state.
|
|
536
|
+
* @returns {void}
|
|
537
|
+
*/
|
|
538
|
+
_refreshStack(): void;
|
|
539
|
+
/**
|
|
540
|
+
* Lays a stack out from its messages' measured heights: each one's place, size, and clip, and
|
|
541
|
+
* the stack's own height. Runs again whenever a message changes size.
|
|
542
|
+
* @returns {void}
|
|
543
|
+
*/
|
|
544
|
+
_syncStack(): void;
|
|
545
|
+
/**
|
|
546
|
+
* An open floating stack taller than the viewport becomes a list that scrolls
|
|
547
|
+
* (`data-overflow`), the newest message in view, so every message stays reachable. An inline
|
|
548
|
+
* stack grows with the page and never needs it.
|
|
549
|
+
* @param {boolean} expanded Whether the stack is open.
|
|
550
|
+
* @param {MessageStackLength} size The open stack's height.
|
|
551
|
+
* @param {boolean} fromEnd Whether it piles from the foot.
|
|
552
|
+
* @returns {void}
|
|
553
|
+
*/
|
|
554
|
+
_syncOverflow(expanded: boolean, size: MessageStackLength, fromEnd: boolean): void;
|
|
555
|
+
/**
|
|
556
|
+
* Wires the ways a stack opens and closes: pointer over it, focus inside it, a press on it (a
|
|
557
|
+
* tap included) that keeps it open until a press outside it, and Escape.
|
|
558
|
+
* @param {HTMLElement} root
|
|
559
|
+
* @returns {void}
|
|
560
|
+
*/
|
|
561
|
+
_listenStack(root: HTMLElement): void;
|
|
296
562
|
/**
|
|
297
563
|
* Takes a floating region out of the document once its last toast has gone, so an emptied host
|
|
298
564
|
* is not left holding a region nobody uses. Inline areas stay: their element is the caller's.
|
|
@@ -319,6 +585,32 @@ export declare class Message extends Component<MessageOptions> {
|
|
|
319
585
|
*/
|
|
320
586
|
_message(key: string, fallback: string): string;
|
|
321
587
|
}
|
|
588
|
+
/**
|
|
589
|
+
* Settles a floating-message placement: the value when it is one of the six, the fallback otherwise.
|
|
590
|
+
* @param {unknown} value Requested placement.
|
|
591
|
+
* @param {MessagePlacement} [fallback='top-end'] Placement used when the value is absent or unknown.
|
|
592
|
+
* @returns {MessagePlacement}
|
|
593
|
+
*/
|
|
594
|
+
export declare function normalizeMessagePlacement(value: unknown, fallback?: MessagePlacement): MessagePlacement;
|
|
595
|
+
/**
|
|
596
|
+
* Settles a message highlight: `'border'` for `true` or `'border'`, `'animated'` for `'animated'`,
|
|
597
|
+
* and null — the plain card — for anything else.
|
|
598
|
+
* @param {unknown} value Requested highlight.
|
|
599
|
+
* @returns {'border'|'animated'|null}
|
|
600
|
+
*/
|
|
601
|
+
export declare function normalizeMessageHighlight(value: unknown): 'border' | 'animated' | null;
|
|
602
|
+
/**
|
|
603
|
+
* Lays out a stack of messages from their heights, the front (newest) first.
|
|
604
|
+
*
|
|
605
|
+
* Open, the messages follow one another from the stack's edge. Collapsed, the front one sits at
|
|
606
|
+
* the edge and the next two peek out behind it: each lined up with the front one's far edge, one
|
|
607
|
+
* peek further out, a step smaller, and cut down to the strip that shows below the one in front of
|
|
608
|
+
* it. The rest wait out of sight behind them.
|
|
609
|
+
* @param {number[]} heights Height of each message in pixels, the front first.
|
|
610
|
+
* @param {boolean} expanded Whether the stack is open.
|
|
611
|
+
* @returns {MessageStackLayout}
|
|
612
|
+
*/
|
|
613
|
+
export declare function messageStackLayout(heights: number[], expanded: boolean): MessageStackLayout;
|
|
322
614
|
/**
|
|
323
615
|
* Settles how long a message stays. A message that carries an action stays at least
|
|
324
616
|
* `MESSAGE_ACTION_MIN_TIMEOUT`, so there is time to reach it; zero still means it stays until
|
|
@@ -340,3 +632,14 @@ export declare function normalizeMessageAction(value: unknown): {
|
|
|
340
632
|
kind: 'default' | 'primary' | 'danger' | 'ghost';
|
|
341
633
|
onclick: ((event: MouseEvent) => void) | null;
|
|
342
634
|
} | null;
|
|
635
|
+
/**
|
|
636
|
+
* Fired when a stack opens: the pointer came over it, focus came into it, it was pressed, or
|
|
637
|
+
* `expand()` was called.
|
|
638
|
+
* @event Message#expand
|
|
639
|
+
* @type {CustomEvent<Record<string, never>>}
|
|
640
|
+
*/
|
|
641
|
+
/**
|
|
642
|
+
* Fired when a stack closes again.
|
|
643
|
+
* @event Message#collapse
|
|
644
|
+
* @type {CustomEvent<Record<string, never>>}
|
|
645
|
+
*/
|
|
@@ -105,9 +105,20 @@ export declare class Modal extends Component<ModalOptions> {
|
|
|
105
105
|
mountTarget(): Element;
|
|
106
106
|
/**
|
|
107
107
|
* Puts the dialog on screen. Overridden by subclasses that open non-modally.
|
|
108
|
+
*
|
|
109
|
+
* Where the platform has no `showModal()` — a DOM implementation used for unit tests — the dialog
|
|
110
|
+
* is presented through its `open` attribute instead: no top layer and no inertness, but `open()`,
|
|
111
|
+
* `close()`, Escape and the lifecycle events behave the same.
|
|
108
112
|
* @returns {void}
|
|
109
113
|
*/
|
|
110
114
|
_show(): void;
|
|
115
|
+
/**
|
|
116
|
+
* Whether the current presentation is the modal one: the platform's `:modal`, or the `open`
|
|
117
|
+
* attribute standing in for `showModal()` where that is missing.
|
|
118
|
+
* @returns {boolean}
|
|
119
|
+
* @protected
|
|
120
|
+
*/
|
|
121
|
+
protected _isModal(): boolean;
|
|
111
122
|
/**
|
|
112
123
|
* Removes the dialog from its current presentation layer.
|
|
113
124
|
* Subclasses may replace native dialog presentation while preserving Modal lifecycle events.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asks a state pseudo-class of an element. A selector engine that does not know `:modal` or
|
|
3
|
+
* `:popover-open` throws on it; there the element is in neither state.
|
|
4
|
+
* @param {Element|null|undefined} element Element to ask.
|
|
5
|
+
* @param {string} selector A selector such as `':modal'` or `':popover-open'`.
|
|
6
|
+
* @returns {boolean}
|
|
7
|
+
*/
|
|
8
|
+
export declare function matchesState(element: Element | null | undefined, selector: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* The open modal dialogs of a document, in document order; empty where `:modal` is unknown.
|
|
11
|
+
* @param {Document} doc Document to search.
|
|
12
|
+
* @returns {Element[]}
|
|
13
|
+
*/
|
|
14
|
+
export declare function modalDialogs(doc: Document): Element[];
|
|
15
|
+
/**
|
|
16
|
+
* Whether a dialog is presented, by the reflected `open` property or the attribute itself.
|
|
17
|
+
* @param {Element} dialog Dialog element.
|
|
18
|
+
* @returns {boolean}
|
|
19
|
+
*/
|
|
20
|
+
export declare function isDialogOpen(dialog: Element): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Presents a dialog modally with `showModal()`, or with the `open` attribute where it is missing.
|
|
23
|
+
* @param {Element} dialog Dialog element.
|
|
24
|
+
* @returns {boolean} Whether the platform presented it; false for the attribute fallback.
|
|
25
|
+
*/
|
|
26
|
+
export declare function showDialogModal(dialog: Element): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Presents a dialog non-modally with `show()`, or with the `open` attribute where it is missing.
|
|
29
|
+
* @param {Element} dialog Dialog element.
|
|
30
|
+
* @returns {void}
|
|
31
|
+
*/
|
|
32
|
+
export declare function showDialog(dialog: Element): void;
|
|
33
|
+
/**
|
|
34
|
+
* Closes a dialog with `close()`. Where it is missing the `open` attribute is removed and the
|
|
35
|
+
* `close` event the platform would queue is queued here, so one listener settles both.
|
|
36
|
+
* @param {Element} dialog Dialog element.
|
|
37
|
+
* @param {string} [result] Native string return value.
|
|
38
|
+
* @returns {void}
|
|
39
|
+
*/
|
|
40
|
+
export declare function closeDialog(dialog: Element, result?: string): void;
|
|
@@ -19,6 +19,13 @@ export type ModuleItem = {
|
|
|
19
19
|
icon?: string | Node | {
|
|
20
20
|
toElement: () => Node | null;
|
|
21
21
|
} | ((context: Record<string, any>, item: AppNavItem) => Node | null);
|
|
22
|
+
/**
|
|
23
|
+
* Draws the module as an
|
|
24
|
+
* agent: an AgentAvatar in place of the tile, whatever the `appearance`, at rest, with its
|
|
25
|
+
* activity's word in the tile's accessible name. `tone` and `color` then do not apply; the
|
|
26
|
+
* avatar's own `tone` does.
|
|
27
|
+
*/
|
|
28
|
+
agent?: import('../../internal/app-rail.js').AppNavAgent | true;
|
|
22
29
|
/**
|
|
23
30
|
* Identity colour from the theme's categorical tones.
|
|
24
31
|
*/
|
|
@@ -277,8 +284,8 @@ export declare class ModuleBar extends AppRailPresenter {
|
|
|
277
284
|
focus(): this;
|
|
278
285
|
/** Destroys flyouts, tooltips, and the catalogue, and restores or removes the root. @returns {void} */
|
|
279
286
|
destroy(): void;
|
|
280
|
-
/** @param {Node|null} node @returns {boolean} @
|
|
281
|
-
|
|
287
|
+
/** @param {Node|null} node @returns {boolean} @protected */
|
|
288
|
+
protected _containsNode(node: Node | null): boolean;
|
|
282
289
|
/** @returns {void} */
|
|
283
290
|
_clearArtifacts(): void;
|
|
284
291
|
/** @param {AppNavItem} item @returns {boolean} */
|
|
@@ -25,6 +25,7 @@ export type MultiValueEditorOptions = {
|
|
|
25
25
|
values: string[];
|
|
26
26
|
}>) => void;
|
|
27
27
|
};
|
|
28
|
+
export type MultiValueEditorPart = 'value' | 'handle' | 'up' | 'down';
|
|
28
29
|
/**
|
|
29
30
|
* Ordered value editor with explicit editable rows and controls.
|
|
30
31
|
*
|
|
@@ -69,10 +70,10 @@ export declare class MultiValueEditor extends Component<MultiValueEditorOptions>
|
|
|
69
70
|
};
|
|
70
71
|
/**
|
|
71
72
|
* @param {number} [focusIndex=-1] Row to focus after the render, or -1 for none.
|
|
72
|
-
* @param {
|
|
73
|
+
* @param {MultiValueEditorPart} [focusPart='value'] Which control of that row takes focus.
|
|
73
74
|
* @returns {void}
|
|
74
75
|
*/
|
|
75
|
-
_renderRows(focusIndex?: number, focusPart?:
|
|
76
|
+
_renderRows(focusIndex?: number, focusPart?: MultiValueEditorPart): void;
|
|
76
77
|
/** @param {MouseEvent} event @returns {void} */
|
|
77
78
|
_handleClick(event: MouseEvent): void;
|
|
78
79
|
/** @param {Event} event @returns {void} */
|
|
@@ -116,10 +117,10 @@ export declare class MultiValueEditor extends Component<MultiValueEditorOptions>
|
|
|
116
117
|
/**
|
|
117
118
|
* @param {number} from Index to move.
|
|
118
119
|
* @param {number} to Destination index.
|
|
119
|
-
* @param {
|
|
120
|
+
* @param {MultiValueEditorPart} part Control of the moved row that takes focus.
|
|
120
121
|
* @returns {boolean} Whether anything moved.
|
|
121
122
|
*/
|
|
122
|
-
_move(from: number, to: number, part:
|
|
123
|
+
_move(from: number, to: number, part: MultiValueEditorPart): boolean;
|
|
123
124
|
/** @returns {void} */
|
|
124
125
|
_emitChange(): void;
|
|
125
126
|
/** @returns {void} */
|
|
@@ -324,3 +324,10 @@ export declare function snapNumber(value: number, { min, max, step, precision }:
|
|
|
324
324
|
step: number;
|
|
325
325
|
precision: number;
|
|
326
326
|
}): number;
|
|
327
|
+
/**
|
|
328
|
+
* Decimal places in a number's shortest exact notation, exponent form included (`2.5e-7` has 8).
|
|
329
|
+
* Shared with Slider, whose `stepPrecision()` is this.
|
|
330
|
+
* @param {number} value Number to measure.
|
|
331
|
+
* @returns {number}
|
|
332
|
+
*/
|
|
333
|
+
export declare function decimalsOf(value: number): number;
|