@zeyos/zx 5.6.0 → 5.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/CHANGELOG.md +188 -0
  2. package/README.md +73 -7
  3. package/bin/zx-css.js +328 -0
  4. package/dist/types/components/account-menu/account-menu.d.ts +4 -2
  5. package/dist/types/components/activity-list/activity-list.d.ts +14 -8
  6. package/dist/types/components/agent-thread/ag-ui.d.ts +340 -0
  7. package/dist/types/components/agent-thread/agent-thread.d.ts +142 -14
  8. package/dist/types/components/agent-thread/ui-message-stream.d.ts +401 -0
  9. package/dist/types/components/app-sidebar/app-sidebar.d.ts +14 -8
  10. package/dist/types/components/breadcrumb/breadcrumb.d.ts +3 -3
  11. package/dist/types/components/calendar/calendar-model.d.ts +9 -2
  12. package/dist/types/components/calendar/calendar.d.ts +12 -4
  13. package/dist/types/components/chart/chart.d.ts +25 -13
  14. package/dist/types/components/checklist/checklist.d.ts +29 -0
  15. package/dist/types/components/code-editor/code-editor.d.ts +7 -2
  16. package/dist/types/components/composer/composer.d.ts +206 -4
  17. package/dist/types/components/composer/queue.d.ts +76 -0
  18. package/dist/types/components/copy/copy-button.d.ts +6 -4
  19. package/dist/types/components/copy/copy-input.d.ts +10 -6
  20. package/dist/types/components/datebox/date-range-box.d.ts +33 -0
  21. package/dist/types/components/datebox/placeholder.d.ts +7 -0
  22. package/dist/types/components/dialog/dialog.d.ts +2 -2
  23. package/dist/types/components/dock/dock.d.ts +12 -3
  24. package/dist/types/components/entity-ref/entity-ref.d.ts +5 -3
  25. package/dist/types/components/field-upload/field-upload.d.ts +3 -2
  26. package/dist/types/components/file-item/file-item.d.ts +3 -2
  27. package/dist/types/components/file-list/file-list.d.ts +14 -8
  28. package/dist/types/components/filter/filter-model.d.ts +31 -1
  29. package/dist/types/components/filter/filter.d.ts +20 -2
  30. package/dist/types/components/finder/finder.d.ts +14 -6
  31. package/dist/types/components/flag/flag.d.ts +99 -0
  32. package/dist/types/components/grid/grid.d.ts +1 -1
  33. package/dist/types/components/kanban-view/kanban-view.d.ts +8 -66
  34. package/dist/types/components/launcher/launcher.d.ts +2 -0
  35. package/dist/types/components/modal/modal.d.ts +34 -8
  36. package/dist/types/components/multi-value-editor/multi-value-editor.d.ts +3 -2
  37. package/dist/types/components/number-field/number-field.d.ts +41 -7
  38. package/dist/types/components/prompt-starters/prompt-starters.d.ts +107 -0
  39. package/dist/types/components/prose/prose.d.ts +9 -6
  40. package/dist/types/components/questionnaire/conditions.d.ts +270 -0
  41. package/dist/types/components/questionnaire/items.d.ts +52 -30
  42. package/dist/types/components/questionnaire/questionnaire.d.ts +44 -4
  43. package/dist/types/components/rating/rating.d.ts +5 -3
  44. package/dist/types/components/select/country.d.ts +106 -0
  45. package/dist/types/components/select/field-adapter.d.ts +2 -1
  46. package/dist/types/components/select/locale.d.ts +102 -0
  47. package/dist/types/components/select/select.d.ts +41 -2
  48. package/dist/types/components/sheet/sheet.d.ts +2 -2
  49. package/dist/types/components/slider/slider.d.ts +1 -0
  50. package/dist/types/components/sort-control/sort-control.d.ts +7 -3
  51. package/dist/types/components/source-list/source-list.d.ts +7 -5
  52. package/dist/types/components/split-view/split-view.d.ts +5 -3
  53. package/dist/types/components/surface/catalog.d.ts +260 -0
  54. package/dist/types/components/surface/elicit.d.ts +81 -0
  55. package/dist/types/components/surface/mcp.d.ts +165 -0
  56. package/dist/types/components/surface/schema.d.ts +314 -0
  57. package/dist/types/components/surface/stream.d.ts +118 -0
  58. package/dist/types/components/surface/surface.d.ts +718 -0
  59. package/dist/types/components/surface/text.d.ts +277 -0
  60. package/dist/types/components/surface/validate.d.ts +339 -0
  61. package/dist/types/components/table/table.d.ts +55 -3
  62. package/dist/types/components/table/window.d.ts +203 -0
  63. package/dist/types/components/toolbar/toolbar.d.ts +10 -6
  64. package/dist/types/components/tooltip/tooltip.d.ts +2 -2
  65. package/dist/types/components/tree/tree.d.ts +20 -13
  66. package/dist/types/core/component.d.ts +10 -0
  67. package/dist/types/core/date.d.ts +8 -1
  68. package/dist/types/core/dom.d.ts +15 -0
  69. package/dist/types/core/http.d.ts +10 -0
  70. package/dist/types/core/i18n.d.ts +38 -0
  71. package/dist/types/core/messages.d.ts +344 -1
  72. package/dist/types/core/storage.d.ts +7 -2
  73. package/dist/types/elements/define.d.ts +21 -46
  74. package/dist/types/elements/definitions.d.ts +147 -0
  75. package/dist/types/elements/kit.d.ts +7 -0
  76. package/dist/types/elements/reflect.d.ts +6 -3
  77. package/dist/types/index.d.ts +10 -1
  78. package/dist/types/internal/date-locale.d.ts +7 -0
  79. package/dist/types/internal/json-patch.d.ts +146 -0
  80. package/dist/types/locales/de.d.ts +13 -0
  81. package/dist/types/locales/en.d.ts +2 -0
  82. package/dist/types/locales/index.d.ts +823 -0
  83. package/dist/types/zeyos/view.d.ts +8 -1
  84. package/dist/zx-zeyos.esm.js +16852 -15131
  85. package/dist/zx-zeyos.esm.min.js +5 -5
  86. package/dist/zx.core.css +1276 -0
  87. package/dist/zx.core.min.css +1 -0
  88. package/dist/zx.css +520 -143
  89. package/dist/zx.esm.js +40940 -29684
  90. package/dist/zx.esm.min.js +36 -23
  91. package/dist/zx.global.js +40940 -29684
  92. package/dist/zx.global.min.js +36 -23
  93. package/dist/zx.layered.css +17315 -0
  94. package/dist/zx.layered.min.css +1 -0
  95. package/dist/zx.min.css +1 -1
  96. package/docs/agent-catalog.json +12501 -0
  97. package/docs/agent-surfaces.md +340 -0
  98. package/docs/api.json +909 -137
  99. package/docs/llms.md +1046 -80
  100. package/docs/llms.txt +30 -9
  101. package/package.json +29 -6
  102. package/src/components/account-menu/account-menu.js +6 -3
  103. package/src/components/activity-item/activity-item.js +2 -1
  104. package/src/components/activity-list/activity-list.js +16 -10
  105. package/src/components/agent-thread/ag-ui.js +1439 -0
  106. package/src/components/agent-thread/agent-thread.js +359 -54
  107. package/src/components/agent-thread/ui-message-stream.js +1281 -0
  108. package/src/components/app-sidebar/app-sidebar.js +18 -8
  109. package/src/components/approval-card/approval-card.js +3 -2
  110. package/src/components/block-view/block-view.js +7 -6
  111. package/src/components/breadcrumb/breadcrumb.js +8 -5
  112. package/src/components/button/button.css +24 -11
  113. package/src/components/calendar/calendar-model.js +8 -2
  114. package/src/components/calendar/calendar.js +53 -18
  115. package/src/components/chart/chart.js +54 -23
  116. package/src/components/checklist/checklist.css +9 -1
  117. package/src/components/checklist/checklist.js +59 -3
  118. package/src/components/checklist/field-adapter.js +2 -11
  119. package/src/components/code-editor/code-editor.js +45 -8
  120. package/src/components/code-editor/field-adapter.js +1 -1
  121. package/src/components/composer/composer.css +80 -1
  122. package/src/components/composer/composer.js +390 -16
  123. package/src/components/composer/queue.js +78 -0
  124. package/src/components/context-menu/context-menu.js +12 -1
  125. package/src/components/copy/copy-button.js +9 -7
  126. package/src/components/copy/copy-input.js +10 -6
  127. package/src/components/date-picker/date-picker.js +2 -1
  128. package/src/components/date-picker/date-range-picker.js +8 -7
  129. package/src/components/datebox/date-range-box.js +3 -9
  130. package/src/components/datebox/datebox.js +18 -21
  131. package/src/components/datebox/placeholder.js +18 -0
  132. package/src/components/dialog/dialog.js +4 -5
  133. package/src/components/dock/dock.js +34 -13
  134. package/src/components/entity-ref/entity-ref.js +16 -5
  135. package/src/components/field-upload/field-upload.js +81 -38
  136. package/src/components/file-item/file-item.js +70 -40
  137. package/src/components/file-list/file-list.js +15 -9
  138. package/src/components/filter/filter-model.js +46 -8
  139. package/src/components/filter/filter.css +3 -3
  140. package/src/components/filter/filter.js +29 -10
  141. package/src/components/filter-panel/filter-panel.js +13 -5
  142. package/src/components/finder/finder.js +50 -26
  143. package/src/components/flag/flag.css +40 -0
  144. package/src/components/flag/flag.js +177 -0
  145. package/src/components/form/form.js +1 -1
  146. package/src/components/grid/grid.js +22 -8
  147. package/src/components/kanban-view/kanban-view.js +51 -81
  148. package/src/components/launcher/launcher.js +17 -2
  149. package/src/components/list-toolbar/list-toolbar.js +2 -1
  150. package/src/components/master-panel/master-panel.js +1 -1
  151. package/src/components/menu-button/menu-button.js +4 -0
  152. package/src/components/message/message.js +3 -0
  153. package/src/components/modal/modal.js +62 -8
  154. package/src/components/multi-value-editor/multi-value-editor.js +10 -9
  155. package/src/components/navigation-bar/navigation-bar.js +3 -3
  156. package/src/components/number-field/number-field.js +98 -29
  157. package/src/components/prompt-starters/prompt-starters.css +91 -0
  158. package/src/components/prompt-starters/prompt-starters.js +206 -0
  159. package/src/components/prose/prose.js +14 -10
  160. package/src/components/questionnaire/conditions.js +666 -0
  161. package/src/components/questionnaire/items.js +150 -41
  162. package/src/components/questionnaire/questionnaire.js +126 -32
  163. package/src/components/rating/rating.js +5 -4
  164. package/src/components/run-status/run-status.js +2 -2
  165. package/src/components/select/country.js +136 -0
  166. package/src/components/select/field-adapter.js +7 -2
  167. package/src/components/select/locale.js +219 -0
  168. package/src/components/select/select.css +20 -22
  169. package/src/components/select/select.js +94 -12
  170. package/src/components/sheet/sheet-stack.js +10 -1
  171. package/src/components/sheet/sheet.js +12 -5
  172. package/src/components/slider/slider.js +7 -2
  173. package/src/components/sort-control/sort-control.js +15 -5
  174. package/src/components/source-list/source-list.js +7 -4
  175. package/src/components/split-view/split-view.js +5 -3
  176. package/src/components/surface/catalog.js +1334 -0
  177. package/src/components/surface/elicit.js +107 -0
  178. package/src/components/surface/mcp.js +243 -0
  179. package/src/components/surface/schema.js +644 -0
  180. package/src/components/surface/stream.js +245 -0
  181. package/src/components/surface/surface.css +308 -0
  182. package/src/components/surface/surface.js +2291 -0
  183. package/src/components/surface/text.js +513 -0
  184. package/src/components/surface/validate.js +2218 -0
  185. package/src/components/tabbox/tabbox.js +9 -0
  186. package/src/components/table/table.css +63 -3
  187. package/src/components/table/table.js +167 -28
  188. package/src/components/table/window.js +317 -0
  189. package/src/components/toolbar/toolbar.js +12 -7
  190. package/src/components/tooltip/tooltip.css +2 -3
  191. package/src/components/tooltip/tooltip.js +32 -5
  192. package/src/components/tree/tree.js +53 -23
  193. package/src/core/component.js +25 -1
  194. package/src/core/date.js +62 -16
  195. package/src/core/dom.js +67 -4
  196. package/src/core/format.js +15 -13
  197. package/src/core/http.js +29 -20
  198. package/src/core/i18n.js +83 -10
  199. package/src/core/icons.js +13 -2
  200. package/src/core/keyboard.js +79 -8
  201. package/src/core/messages.js +376 -2
  202. package/src/core/overlay-host.js +1 -0
  203. package/src/core/position.js +3 -2
  204. package/src/core/storage.js +59 -6
  205. package/src/elements/define.js +178 -130
  206. package/src/elements/definitions.js +229 -0
  207. package/src/elements/kit.js +444 -0
  208. package/src/elements/reflect.js +8 -3
  209. package/src/index.js +10 -1
  210. package/src/internal/date-locale.js +11 -0
  211. package/src/internal/json-patch.js +405 -0
  212. package/src/locales/de.js +911 -0
  213. package/src/locales/en.js +2 -0
  214. package/src/locales/index.js +7 -0
  215. package/src/zeyos/calendar.js +2 -1
  216. package/src/zeyos/form.js +2 -1
  217. package/src/zeyos/launcher.js +7 -6
  218. package/src/zeyos/module-bar.js +2 -1
  219. package/src/zeyos/schema.js +37 -23
  220. package/src/zeyos/select.js +4 -3
  221. package/src/zeyos/table.js +2 -13
  222. package/src/zeyos/view.js +57 -17
  223. package/styles/core.css +11 -0
  224. package/styles/tokens/semantic.css +1 -0
  225. package/styles/zeyos.css +2 -0
  226. package/styles/zx.css +4 -8
  227. package/styles/zx.layered.css +1 -0
@@ -29,6 +29,15 @@ export type ChecklistOptions = {
29
29
  * Fallback initial checked state.
30
30
  */
31
31
  defaultChecked?: boolean;
32
+ /**
33
+ * Heading text, which is also the group's accessible name;
34
+ * null uses the `checklist.label` message.
35
+ */
36
+ label?: string | null;
37
+ /**
38
+ * Whether the search field and every checkbox are disabled.
39
+ */
40
+ disabled?: boolean;
32
41
  /**
33
42
  * Whether the heading is left out. The group keeps the
34
43
  * heading text as its accessible name (`aria-label`); a Field labelling the checklist names it
@@ -68,6 +77,9 @@ export type ChecklistLoadedDetail = {
68
77
  * @property {boolean} [search=true] Whether the search field is shown.
69
78
  * @property {number} [height=280] Maximum list height in pixels.
70
79
  * @property {boolean} [defaultChecked=false] Fallback initial checked state.
80
+ * @property {string|null} [label=null] Heading text, which is also the group's accessible name;
81
+ * null uses the `checklist.label` message.
82
+ * @property {boolean} [disabled=false] Whether the search field and every checkbox are disabled.
71
83
  * @property {boolean} [hideLabel=false] Whether the heading is left out. The group keeps the
72
84
  * heading text as its accessible name (`aria-label`); a Field labelling the checklist names it
73
85
  * instead, which is why the `checklist` field type sets this.
@@ -95,6 +107,7 @@ export declare class Checklist extends Component<ChecklistOptions> {
95
107
  _active: boolean;
96
108
  _originalChildren: any[] | ChildNode[];
97
109
  _originalAttributes: Map<any, any>;
110
+ _disabled: boolean;
98
111
  static cssName: string;
99
112
  /** @type {ChecklistOptions} */
100
113
  static defaults: ChecklistOptions;
@@ -106,6 +119,18 @@ export declare class Checklist extends Component<ChecklistOptions> {
106
119
  * @returns {this}
107
120
  */
108
121
  setItems(items: ChecklistItem[]): this;
122
+ /**
123
+ * Replaces the heading text, which is also the group's accessible name.
124
+ * @param {string|null} label New label; null restores the `checklist.label` message.
125
+ * @returns {this}
126
+ */
127
+ setLabel(label: string | null): this;
128
+ /** Enables the search field and the checkboxes. @returns {this} */
129
+ enable(): this;
130
+ /** Disables the search field and the checkboxes; values can still be set programmatically. @returns {this} */
131
+ disable(): this;
132
+ /** Whether the checklist is disabled. @returns {boolean} */
133
+ isDisabled(): boolean;
109
134
  /** Returns checked IDs in item order. @returns {unknown[]} */
110
135
  getValues(): unknown[];
111
136
  /**
@@ -137,6 +162,10 @@ export declare class Checklist extends Component<ChecklistOptions> {
137
162
  _replaceItems(items: ChecklistItem[]): void;
138
163
  /** @returns {void} */
139
164
  _renderItems(): void;
165
+ /** @returns {void} */
166
+ _syncDisabled(): void;
167
+ /** @param {string|null|undefined} label @returns {string} */
168
+ _labelText(label: string | null | undefined): string;
140
169
  /** @param {Set<unknown>} next @returns {void} */
141
170
  _replaceChecked(next: Set<unknown>): void;
142
171
  /** @param {ChecklistItem} item @returns {unknown} */
@@ -13,9 +13,10 @@ export type CodeEditorOptions = {
13
13
  */
14
14
  language?: string;
15
15
  /**
16
- * Accessible editor label.
16
+ * Accessible editor label; null reads the `codeEditor.label`
17
+ * message ("Code editor").
17
18
  */
18
- label?: string;
19
+ label?: string | null;
19
20
  /**
20
21
  * Placeholder text.
21
22
  */
@@ -82,6 +83,8 @@ export declare class CodeEditor extends Component<CodeEditorOptions> {
82
83
  _position: HTMLElement;
83
84
  _header: HTMLElement;
84
85
  _input: HTMLTextAreaElement;
86
+ _committedValue: any;
87
+ _indentEditing: boolean;
85
88
  /** Set by Escape: the next Tab moves focus instead of indenting. */
86
89
  _tabReleased: boolean;
87
90
  static cssName: string;
@@ -112,6 +115,8 @@ export declare class CodeEditor extends Component<CodeEditorOptions> {
112
115
  setReadOnly(value: boolean): this;
113
116
  /** @param {KeyboardEvent} event @returns {void} */
114
117
  _handleKeydown(event: KeyboardEvent): void;
118
+ /** Commits once, whether the browser emits change before blur or the fallback edited text. @returns {void} */
119
+ _commitValue(): void;
115
120
  /** @returns {void} */
116
121
  _updatePosition(): void;
117
122
  /** @returns {void} */
@@ -141,6 +141,56 @@ export type ComposerSendDetail = {
141
141
  * The context chips.
142
142
  */
143
143
  context: ContextChip[];
144
+ /**
145
+ * `true` on a message that waited in the queue. Absent otherwise.
146
+ */
147
+ queued?: boolean;
148
+ };
149
+ export type QueuedMessage = {
150
+ /**
151
+ * Stable identifier, for `removeQueued()`.
152
+ */
153
+ id: string;
154
+ /**
155
+ * The message, trimmed.
156
+ */
157
+ text: string;
158
+ /**
159
+ * Attached files, in the order they were added.
160
+ */
161
+ files: File[];
162
+ /**
163
+ * The picked mentions whose `@<label>` is in the text.
164
+ */
165
+ mentions: MentionItem[];
166
+ /**
167
+ * The context chips when it was queued.
168
+ */
169
+ context: ContextChip[];
170
+ };
171
+ export type ComposerQueueDetail = {
172
+ /**
173
+ * The message added.
174
+ */
175
+ item: QueuedMessage;
176
+ /**
177
+ * The whole queue, in order, the message added included.
178
+ */
179
+ items: QueuedMessage[];
180
+ };
181
+ export type ComposerDequeueDetail = {
182
+ /**
183
+ * The message that left the queue.
184
+ */
185
+ item: QueuedMessage;
186
+ /**
187
+ * What is left of the queue, in order.
188
+ */
189
+ items: QueuedMessage[];
190
+ /**
191
+ * Why it left.
192
+ */
193
+ reason: 'sent' | 'removed' | 'edited' | 'cleared';
144
194
  };
145
195
  export type ComposerRemoveDetail = {
146
196
  /**
@@ -183,6 +233,17 @@ export type ComposerOptions = {
183
233
  * Whether an agent is working: Send becomes Stop.
184
234
  */
185
235
  busy?: boolean;
236
+ /**
237
+ * Whether the send key holds a message back while the agent works.
238
+ * It is sent when the agent is no longer busy, one message each time busy ends, in order. The queue
239
+ * lives as long as the composer: it is not kept with the draft.
240
+ */
241
+ queue?: boolean;
242
+ /**
243
+ * Most messages that wait at once. At the limit the send key is
244
+ * refused, and the hint says why.
245
+ */
246
+ queueLimit?: number;
186
247
  /**
187
248
  * Whether the composer takes no input.
188
249
  */
@@ -299,6 +360,16 @@ export type ComposerOptions = {
299
360
  * Tool listener.
300
361
  */
301
362
  ontool?: (event: CustomEvent<ComposerToolDetail>) => void;
363
+ /**
364
+ * Listener for a message being
365
+ * queued.
366
+ */
367
+ onqueue?: (event: CustomEvent<ComposerQueueDetail>) => void;
368
+ /**
369
+ * Listener for a message
370
+ * leaving the queue.
371
+ */
372
+ ondequeue?: (event: CustomEvent<ComposerDequeueDetail>) => void;
302
373
  /**
303
374
  * Listener for
304
375
  * ArrowUp on an empty text.
@@ -408,7 +479,8 @@ export declare function normalizeTools(tools: unknown): ComposerTool[];
408
479
  * A message box for talking to an agent: a text that grows with what is written, Send (Stop while
409
480
  * the agent works), attachments, `@` mentions, `/` commands, and context chips. It keeps nothing
410
481
  * but the unsent message: sending hands the text, files, mentions and context to the application,
411
- * which owns the conversation.
482
+ * which owns the conversation. With `queue`, a message written while the agent works waits here
483
+ * until it is no longer busy.
412
484
  *
413
485
  * @fires Composer#send
414
486
  * @fires Composer#stop
@@ -418,6 +490,8 @@ export declare function normalizeTools(tools: unknown): ComposerTool[];
418
490
  * @fires Composer#mention
419
491
  * @fires Composer#command
420
492
  * @fires Composer#tool
493
+ * @fires Composer#queue
494
+ * @fires Composer#dequeue
421
495
  * @fires Composer#historyprevious
422
496
  * @extends {Component<ComposerOptions>}
423
497
  */
@@ -451,6 +525,20 @@ export declare class Composer extends Component<ComposerOptions> {
451
525
  _width: any;
452
526
  /** What the Send button last drew: mode, send key and label, so it redraws only on a change. */
453
527
  _sendDrawn: any;
528
+ /** @type {QueuedMessage[]} Session state: never saved with the draft. */
529
+ _queue: QueuedMessage[];
530
+ _queueLimit: number;
531
+ /** Whether the send key was refused at the limit, which the hint then says. */
532
+ _queueRefused: boolean;
533
+ /** @type {{destroy: () => void}[]} The keyboard of each queued row. */
534
+ _queueRoving: {
535
+ destroy: () => void;
536
+ }[];
537
+ /** Whether a queued message is being sent, and whether busy ended again meanwhile. */
538
+ _sendingQueued: boolean;
539
+ _busyEndedAgain: boolean;
540
+ /** The application's hint, which `_syncHint()` shows unless the queue has something to say. */
541
+ _hint: string;
454
542
  _mentionSource: {
455
543
  trigger: string;
456
544
  items: MentionSource['items'];
@@ -496,9 +584,12 @@ export declare class Composer extends Component<ComposerOptions> {
496
584
  */
497
585
  clear(): this;
498
586
  /**
499
- * Shows Stop in place of Send while an agent works; Escape in the text then emits `stop`.
587
+ * Shows Stop in place of Send while an agent works; Escape in the text then emits `stop`. When
588
+ * busy ends, the first queued message is sent; the next waits for the next time it ends.
500
589
  * @param {boolean} busy
501
590
  * @returns {this}
591
+ * @fires Composer#send
592
+ * @fires Composer#dequeue
502
593
  */
503
594
  setBusy(busy: boolean): this;
504
595
  /** @returns {boolean} Whether Stop is showing. */
@@ -568,7 +659,27 @@ export declare class Composer extends Component<ComposerOptions> {
568
659
  removeContext(id: string): this;
569
660
  /** @returns {ContextChip[]} The context chips. */
570
661
  getContext(): ContextChip[];
571
- /** Removes what the composer drew and the launcher it opened, and stops listening. @returns {void} */
662
+ /** @returns {QueuedMessage[]} Copies of the queued messages, the next to be sent first. */
663
+ getQueue(): QueuedMessage[];
664
+ /**
665
+ * Removes every queued message. Emits `dequeue` for each, with `reason: 'cleared'`. Stop does not
666
+ * do this: call it from a `stop` listener to drop what was waiting along with the run.
667
+ * @returns {this}
668
+ * @fires Composer#dequeue
669
+ */
670
+ clearQueue(): this;
671
+ /**
672
+ * Removes one queued message. Emits `dequeue` with `reason: 'removed'`. An id that is not queued,
673
+ * because the message has been sent, say, changes nothing.
674
+ * @param {string} id
675
+ * @returns {this}
676
+ * @fires Composer#dequeue
677
+ */
678
+ removeQueued(id: string): this;
679
+ /**
680
+ * Removes what the composer drew and the launcher it opened, drops the queue, and stops listening.
681
+ * @returns {void}
682
+ */
572
683
  destroy(): void;
573
684
  /** @private @returns {void} */
574
685
  private _onInput;
@@ -584,7 +695,13 @@ export declare class Composer extends Component<ComposerOptions> {
584
695
  * @returns {void}
585
696
  */
586
697
  private _onKeydown;
587
- /** @private @returns {void} @fires Composer#send */
698
+ /**
699
+ * The message as it stands in the composer, or null when there is nothing to send.
700
+ * @private
701
+ * @returns {ComposerSendDetail|null}
702
+ */
703
+ private _message;
704
+ /** @private @returns {void} @fires Composer#send @fires Composer#queue */
588
705
  private _send;
589
706
  /** @private @returns {void} @fires Composer#stop */
590
707
  private _stop;
@@ -595,6 +712,8 @@ export declare class Composer extends Component<ComposerOptions> {
595
712
  * @returns {void}
596
713
  */
597
714
  private _syncSend;
715
+ /** The quiet text beside Send: why the queue refused, else the application's. @private @returns {void} */
716
+ private _syncHint;
598
717
  /** Disabled state on the text and the buttons. @private @returns {void} */
599
718
  private _syncState;
600
719
  /**
@@ -657,9 +776,90 @@ export declare class Composer extends Component<ComposerOptions> {
657
776
  * Sets the polite status, once per change.
658
777
  * @private
659
778
  * @param {string} text
779
+ * @param {boolean} [again=false] Whether the same text is news again: a no-break space then tells
780
+ * it apart from the last time, because a live region says nothing about a text that did not change.
660
781
  * @returns {void}
661
782
  */
662
783
  private _announce;
784
+ /**
785
+ * Holds the message back until the agent is no longer busy, or refuses it at the limit: the
786
+ * message then stays where it was written.
787
+ * @private
788
+ * @returns {void}
789
+ * @fires Composer#queue
790
+ */
791
+ private _enqueue;
792
+ /**
793
+ * Sends the first queued message for an end of busy. A `send` listener that ends busy again,
794
+ * before it returns, does not send from inside this one: the next message goes when it is done.
795
+ * @private
796
+ * @returns {void}
797
+ */
798
+ private _sendNextQueued;
799
+ /**
800
+ * Sends the first queued message, unless it must wait. What is being written stays: it is not the
801
+ * message that goes. A prevented `send` was not sent, so the message stays first in line.
802
+ * @private
803
+ * @returns {void}
804
+ * @fires Composer#send
805
+ * @fires Composer#dequeue
806
+ */
807
+ private _sendQueued;
808
+ /**
809
+ * @private
810
+ * @param {QueuedMessage} item
811
+ * @param {ComposerDequeueDetail['reason']} reason
812
+ * @returns {void}
813
+ * @fires Composer#dequeue
814
+ */
815
+ private _emitDequeue;
816
+ /**
817
+ * Takes a queued message back into the composer, asking first when that would replace what is
818
+ * being written. The message may have been sent while the question was open; nothing happens then.
819
+ * @private
820
+ * @param {string} id
821
+ * @returns {Promise<void>}
822
+ * @fires Composer#dequeue
823
+ * @fires Composer#input
824
+ */
825
+ private _editQueued;
826
+ /**
827
+ * @private
828
+ * @param {MouseEvent} event
829
+ * @returns {void}
830
+ */
831
+ private _onQueueClick;
832
+ /**
833
+ * Delete on a focused row removes it. The arrow keys inside a row belong to its toolbar.
834
+ * @private
835
+ * @param {KeyboardEvent} event
836
+ * @returns {void}
837
+ */
838
+ private _onQueueKeydown;
839
+ /**
840
+ * Draws the queue, and keeps the focus in it: on the same button of the same row, on the row now
841
+ * in that place when the row has gone, and in the text when no row is left.
842
+ * @private
843
+ * @returns {void}
844
+ */
845
+ private _renderQueue;
846
+ /**
847
+ * One queued message on one line: its text, or the names of its files when it has none, and a
848
+ * toolbar named by that line.
849
+ * @private
850
+ * @param {QueuedMessage} item
851
+ * @returns {HTMLElement}
852
+ */
853
+ private _queueRow;
854
+ /**
855
+ * @private
856
+ * @param {'edit'|'remove'} action
857
+ * @param {string} label
858
+ * @returns {HTMLElement}
859
+ */
860
+ private _queueButton;
861
+ /** @private @returns {void} */
862
+ private _releaseQueueRoving;
663
863
  /**
664
864
  * Opens the commands in a launcher, created on first use.
665
865
  * @private
@@ -733,4 +933,6 @@ export declare class Composer extends Component<ComposerOptions> {
733
933
  /** Fired when a suggestion is picked. @event Composer#mention @type {CustomEvent<{item: MentionItem}>} */
734
934
  /** Fired when a command is chosen. @event Composer#command @type {CustomEvent<{item: LauncherItem}>} */
735
935
  /** Fired when one of the extra tools is pressed; the composer changes nothing itself. @event Composer#tool @type {CustomEvent<ComposerToolDetail>} */
936
+ /** Fired when a message is added to the queue. @event Composer#queue @type {CustomEvent<ComposerQueueDetail>} */
937
+ /** Fired when a message leaves the queue: sent, removed, taken back to edit, or cleared. @event Composer#dequeue @type {CustomEvent<ComposerDequeueDetail>} */
736
938
  /** Fired for ArrowUp on an empty text. @event Composer#historyprevious @type {CustomEvent<Record<string, never>>} */
@@ -0,0 +1,76 @@
1
+ /**
2
+ * The queue behind the Composer's queued messages, as pure functions: each takes the queue as it
3
+ * stands and answers with a new one, in the order the messages were added, and never changes what
4
+ * it was given. It knows nothing of messages but their `id`.
5
+ */
6
+ /** Most messages that wait at once when `queueLimit` names no usable number. */
7
+ export declare const QUEUE_LIMIT = 10;
8
+ /**
9
+ * The limit an option names: a whole number of one or more, anything else `QUEUE_LIMIT`.
10
+ * @param {unknown} value
11
+ * @returns {number}
12
+ */
13
+ export declare function queueLimit(value: unknown): number;
14
+ /**
15
+ * Whether the queue has no room for another message.
16
+ * @param {readonly {id: string}[]} queue
17
+ * @param {unknown} [limit]
18
+ * @returns {boolean}
19
+ */
20
+ export declare function isQueueFull(queue: readonly {
21
+ id: string;
22
+ }[], limit?: unknown): boolean;
23
+ /**
24
+ * Adds a message at the end, as far as the limit allows.
25
+ * @template {{id: string}} T
26
+ * @param {readonly T[]} queue
27
+ * @param {T} entry
28
+ * @param {unknown} [limit]
29
+ * @returns {{queue: T[], item: T|null}} The new queue, and the message added: null when the queue
30
+ * was full and stays as it was.
31
+ */
32
+ export declare function addToQueue<T extends {
33
+ id: string;
34
+ }>(queue: readonly T[], entry: T, limit?: unknown): {
35
+ queue: T[];
36
+ item: T | null;
37
+ };
38
+ /**
39
+ * Takes one message out, wherever it stands.
40
+ * @template {{id: string}} T
41
+ * @param {readonly T[]} queue
42
+ * @param {string} id
43
+ * @returns {{queue: T[], item: T|null}} The new queue, and the message taken: null when no message
44
+ * has that id.
45
+ */
46
+ export declare function removeFromQueue<T extends {
47
+ id: string;
48
+ }>(queue: readonly T[], id: string): {
49
+ queue: T[];
50
+ item: T | null;
51
+ };
52
+ /**
53
+ * Takes the message whose turn it is.
54
+ * @template {{id: string}} T
55
+ * @param {readonly T[]} queue
56
+ * @returns {{queue: T[], item: T|null}} The new queue, and the first message: null when there is
57
+ * none.
58
+ */
59
+ export declare function takeNext<T extends {
60
+ id: string;
61
+ }>(queue: readonly T[]): {
62
+ queue: T[];
63
+ item: T | null;
64
+ };
65
+ /**
66
+ * Takes every message out.
67
+ * @template {{id: string}} T
68
+ * @param {readonly T[]} queue
69
+ * @returns {{queue: T[], items: T[]}} The empty queue, and the messages taken, in order.
70
+ */
71
+ export declare function emptyQueue<T extends {
72
+ id: string;
73
+ }>(queue: readonly T[]): {
74
+ queue: T[];
75
+ items: T[];
76
+ };
@@ -9,13 +9,15 @@ export type CopyButtonOptions = {
9
9
  */
10
10
  label?: string;
11
11
  /**
12
- * Accessible name, and the native tooltip on the icon-only form.
12
+ * Accessible name, and the native tooltip on the icon-only form; by
13
+ * default the `copy.copy` message ("Copy"). Null gives none.
13
14
  */
14
- title?: string;
15
+ title?: string | null;
15
16
  /**
16
- * Confirmation announced and shown after a copy.
17
+ * Confirmation announced and shown after a copy; by default the
18
+ * `copy.copied` message ("Copied"). Null says nothing.
17
19
  */
18
- feedback?: string;
20
+ feedback?: string | null;
19
21
  /**
20
22
  * Milliseconds the confirmation stays.
21
23
  */
@@ -13,13 +13,15 @@ export type CopyInputOptions = {
13
13
  */
14
14
  hideLabel?: boolean;
15
15
  /**
16
- * Confirmation shown after a copy.
16
+ * Confirmation shown after a copy, by default the `copy.copied`
17
+ * message ("Copied"). Null says nothing.
17
18
  */
18
- feedback?: string;
19
+ feedback?: string | null;
19
20
  /**
20
- * Accessible name of the copy button.
21
+ * Accessible name of the copy button, by default the
22
+ * `copy.copy` message ("Copy"). Null gives none.
21
23
  */
22
- buttonTitle?: string;
24
+ buttonTitle?: string | null;
23
25
  /**
24
26
  * Control size.
25
27
  */
@@ -37,8 +39,10 @@ export type CopyInputOptions = {
37
39
  * @property {string} [value=''] Text shown and copied.
38
40
  * @property {string} [label=''] Visible label above the box.
39
41
  * @property {boolean} [hideLabel=false] Whether the label is kept for assistive technology only.
40
- * @property {string} [feedback='Copied'] Confirmation shown after a copy.
41
- * @property {string} [buttonTitle='Copy'] Accessible name of the copy button.
42
+ * @property {string|null} [feedback] Confirmation shown after a copy, by default the `copy.copied`
43
+ * message ("Copied"). Null says nothing.
44
+ * @property {string|null} [buttonTitle] Accessible name of the copy button, by default the
45
+ * `copy.copy` message ("Copy"). Null gives none.
42
46
  * @property {'md'|'sm'} [size='md'] Control size.
43
47
  * @property {(event: CustomEvent<{value: string, copied: boolean}>) => void} [oncopy] Copy listener.
44
48
  */
@@ -99,6 +99,39 @@ export type DateRangeBoxSetOptions = {
99
99
  silent?: boolean;
100
100
  };
101
101
  export type DateRangeBoxUnit = 'date' | 'seconds';
102
+ /** @typedef {import('../date-picker/date-range-picker.js').DateRange} DateRange */
103
+ /** @typedef {import('../date-picker/date-range-picker.js').DateRangePreset} DateRangePreset */
104
+ /** @typedef {{start: number|null, end: number|null}} DateRangeSeconds */
105
+ /** @typedef {Date|number|string|null} DateRangeInput */
106
+ /**
107
+ * @typedef {Object} DateRangeBoxOptions
108
+ * @property {Date|number|string|null} [start=null] Initial start: Date, Unix seconds, or formatted text.
109
+ * @property {Date|number|string|null} [end=null] Initial end: Date, Unix seconds, or formatted text.
110
+ * @property {string} [format='%d.%m.%Y'] Kernel date format the reader types for both endpoints,
111
+ * shown while the field has focus. Numeric tokens only, since it is parsed.
112
+ * @property {string|null} [displayFormat=null] Format both endpoints are shown in while the field
113
+ * does not have focus. It is never parsed, so it may use any `formatDate()` token, month and
114
+ * weekday names included. Null shows `format`.
115
+ * @property {string} [separator=' – '] Text placed between the two formatted dates.
116
+ * @property {string|null} [placeholder=null] Input placeholder; null derives one from the format.
117
+ * @property {boolean} [clearable=true] Show a clear button while a range is present and the box is
118
+ * enabled; without it the input keeps no room for one.
119
+ * @property {Date|null} [min=null] Earliest selectable local calendar day.
120
+ * @property {Date|null} [max=null] Latest selectable local calendar day.
121
+ * @property {number} [months=2] Month panels in the popover; narrow ones show only the first.
122
+ * @property {number} [weekStart=1] First weekday, from 0 (Sunday) through 6 (Saturday).
123
+ * @property {boolean} [showWeekNumbers=false] Show ISO week numbers.
124
+ * @property {number} [minNights=0] Smallest number of nights a complete range may span.
125
+ * @property {number|null} [maxNights=null] Largest number of nights a complete range may span.
126
+ * @property {DateRangePreset[]|boolean} [presets=[]] Preset buttons, or `true` for the built-in set.
127
+ * @property {boolean} [disabled=false] Disable all controls.
128
+ * @property {(event: CustomEvent<DateRange>) => void} [onchange] Change listener.
129
+ * @property {(event: CustomEvent<{text: string}>) => void} [oninvalid] Invalid-input listener.
130
+ * @property {(event: CustomEvent<Record<string, never>>) => void} [onopen] Open listener.
131
+ * @property {(event: CustomEvent<Record<string, never>>) => void} [onclose] Close listener.
132
+ */
133
+ /** @typedef {{silent?: boolean}} DateRangeBoxSetOptions */
134
+ /** @typedef {'date'|'seconds'} DateRangeBoxUnit */
102
135
  /**
103
136
  * Parses `"<start><separator><end>"` into a range. A lone date is read as a one-day range, and a
104
137
  * trailing separator as a start-only range, so a half-typed value is not thrown away.
@@ -0,0 +1,7 @@
1
+ /**
2
+ * What each numeric format token reads as in a date field's placeholder: `%Y` is `YYYY` in English
3
+ * and `JJJJ` in German. Datebox and DateRangeBox each replace the tokens their format allows.
4
+ * @param {(key: string) => string} message Resolves a message key for the field.
5
+ * @returns {Record<string, string>} Placeholder text by format token.
6
+ */
7
+ export declare function placeholderTokens(message: (key: string) => string): Record<string, string>;
@@ -66,7 +66,7 @@ export type DialogOptions = {
66
66
  /**
67
67
  * Cancel event listener.
68
68
  */
69
- oncancel?: (event: CustomEvent<Record<string, never>>) => void;
69
+ oncancel?: (event: CustomEvent<import('../modal/modal.js').ModalCancelDetail>) => void;
70
70
  };
71
71
  export type DialogViewOptions = {
72
72
  /**
@@ -192,7 +192,7 @@ export type PromptOptions = {
192
192
  * @property {Element|string|null} [scope=null] Element whose nearest Zx theme scope owns the overlay; defaults to the opener. Resolved on every open, so a scope connected after construction still owns it.
193
193
  * @property {(event: CustomEvent<Record<string, never>>) => void} [onopen] Open event listener.
194
194
  * @property {(event: CustomEvent<{result: unknown}>) => void} [onclose] Close event listener.
195
- * @property {(event: CustomEvent<Record<string, never>>) => void} [oncancel] Cancel event listener.
195
+ * @property {(event: CustomEvent<import('../modal/modal.js').ModalCancelDetail>) => void} [oncancel] Cancel event listener.
196
196
  */
197
197
  /**
198
198
  * @typedef {Object} DialogViewOptions
@@ -115,9 +115,10 @@ export type DockOptions = {
115
115
  */
116
116
  storageKey?: string | null;
117
117
  /**
118
- * Accessible name given to every divider.
118
+ * Accessible name given to every divider; null reads the
119
+ * `dock.resize` message ("Resize panes").
119
120
  */
120
- label?: string;
121
+ label?: string | null;
121
122
  /**
122
123
  * Collapse listener.
123
124
  */
@@ -197,7 +198,8 @@ export type DockOptions = {
197
198
  * front.
198
199
  * @property {string|null} [storageKey=null] Key under which sizes, collapsed panes, and active
199
200
  * tabs are remembered. Storage failures degrade to memory rather than throwing.
200
- * @property {string} [label='Resize panes'] Accessible name given to every divider.
201
+ * @property {string|null} [label=null] Accessible name given to every divider; null reads the
202
+ * `dock.resize` message ("Resize panes").
201
203
  * @property {(event: CustomEvent<{name: string}>) => void} [oncollapse] Collapse listener.
202
204
  * @property {(event: CustomEvent<{name: string}>) => void} [onexpand] Expand listener.
203
205
  * @property {(event: CustomEvent<{name: string, size: number}>) => void} [onresize] Resize listener.
@@ -419,6 +421,13 @@ export declare class Dock extends Component<DockOptions> {
419
421
  * @returns {this}
420
422
  */
421
423
  release(sheet: any): this;
424
+ /**
425
+ * Removes adoption-only subscriptions and styling before returning a surviving sheet.
426
+ * @param {Record<string, any>} record Adopted sheet record.
427
+ * @param {boolean} [rehost=true] Whether the sheet is still alive and can be floated.
428
+ * @returns {void}
429
+ */
430
+ _releaseSheet(record: Record<string, any>, rehost?: boolean): void;
422
431
  /**
423
432
  * Drops a sheet that destroyed itself while adopted, without re-hosting a dead element.
424
433
  * @param {Object} sheet Sheet being destroyed.
@@ -123,9 +123,10 @@ export type EntityRefOptions = {
123
123
  */
124
124
  wrap?: boolean;
125
125
  /**
126
- * Accessible name for secondary actions.
126
+ * Accessible name for secondary actions; null reads the
127
+ * `entityRef.actions` message ("Entity actions").
127
128
  */
128
- actionsLabel?: string;
129
+ actionsLabel?: string | null;
129
130
  /**
130
131
  * Preventable primary-link listener.
131
132
  */
@@ -232,7 +233,8 @@ export type EntityRefState = {
232
233
  * @property {EntityRefActionEntry[]} [actions=[]] Secondary controls; element actions keep their own behavior.
233
234
  * @property {'sm'|'md'|'lg'} [size='md'] Size of the icon and the identity text.
234
235
  * @property {boolean} [wrap=false] Whether long identity text may wrap instead of truncating.
235
- * @property {string} [actionsLabel='Entity actions'] Accessible name for secondary actions.
236
+ * @property {string|null} [actionsLabel=null] Accessible name for secondary actions; null reads the
237
+ * `entityRef.actions` message ("Entity actions").
236
238
  * @property {(event: CustomEvent<{id: unknown, entity: Readonly<EntityRefState>, href: string, event: MouseEvent}>) => void} [onactivate]
237
239
  * Preventable primary-link listener.
238
240
  * @property {(event: CustomEvent<{id: string, action: Readonly<EntityRefAction>, entity: Readonly<EntityRefState>, event: MouseEvent}>) => void} [onaction]
@@ -1,4 +1,5 @@
1
1
  import { Component } from '../../core/component.js';
2
+ import { Http } from '../../core/http.js';
2
3
  export type UploadTransport = {
3
4
  /**
4
5
  * Upload method used by stubs.
@@ -202,8 +203,8 @@ export declare class FieldUpload extends Component<FieldUploadOptions> {
202
203
  _handleDragOver(event: DragEvent): void;
203
204
  /** @returns {Promise<unknown>} */
204
205
  _uploadInjected(): Promise<unknown>;
205
- /** @returns {Promise<unknown>} */
206
- _uploadXhr(): Promise<unknown>;
206
+ /** @param {Http|null} [http=null] Optional client defaults. @returns {Promise<unknown>} */
207
+ _uploadXhr(http?: Http | null): Promise<unknown>;
207
208
  /** @param {number} percent @returns {void} */
208
209
  _setProgress(percent: number): void;
209
210
  /** @returns {void} */