@optionfactory/fml 8.0.3 → 9.0.0-rc1

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 (50) hide show
  1. package/LICENSE.md +7 -0
  2. package/README.md +88 -0
  3. package/dist/client-errors.iife.js +30 -9
  4. package/dist/client-errors.iife.js.map +1 -1
  5. package/dist/client-errors.iife.min.js +1 -1
  6. package/dist/client-errors.iife.min.js.map +1 -1
  7. package/dist/custom-elements.json +1529 -435
  8. package/dist/fml.css +21 -10
  9. package/dist/fml.css.map +1 -1
  10. package/dist/fml.d.mts +3 -1322
  11. package/dist/fml.iife.js +5267 -2276
  12. package/dist/fml.iife.js.map +1 -1
  13. package/dist/fml.iife.min.js +1 -1
  14. package/dist/fml.iife.min.js.map +1 -1
  15. package/dist/fml.min.mjs +1 -1
  16. package/dist/fml.min.mjs.map +1 -1
  17. package/dist/fml.mjs +6 -8737
  18. package/dist/fml.mjs.map +1 -1
  19. package/dist/ftl.d.mts +430 -92
  20. package/dist/ftl.iife.js +1314 -809
  21. package/dist/ftl.iife.js.map +1 -1
  22. package/dist/ftl.iife.min.js +1 -1
  23. package/dist/ftl.iife.min.js.map +1 -1
  24. package/dist/ftl.min.mjs +1 -1
  25. package/dist/ftl.min.mjs.map +1 -1
  26. package/dist/ftl.mjs +1313 -810
  27. package/dist/ftl.mjs.map +1 -1
  28. package/dist/ful.css +21 -10
  29. package/dist/ful.css.map +1 -1
  30. package/dist/ful.d.mts +801 -252
  31. package/dist/ful.iife.js +3677 -1378
  32. package/dist/ful.iife.js.map +1 -1
  33. package/dist/ful.iife.min.js +1 -1
  34. package/dist/ful.iife.min.js.map +1 -1
  35. package/dist/ful.min.mjs +1 -1
  36. package/dist/ful.min.mjs.map +1 -1
  37. package/dist/ful.mjs +3666 -1378
  38. package/dist/ful.mjs.map +1 -1
  39. package/dist/httpc.d.mts +114 -19
  40. package/dist/httpc.iife.js +253 -83
  41. package/dist/httpc.iife.js.map +1 -1
  42. package/dist/httpc.iife.min.js +1 -1
  43. package/dist/httpc.iife.min.js.map +1 -1
  44. package/dist/httpc.min.mjs +1 -1
  45. package/dist/httpc.min.mjs.map +1 -1
  46. package/dist/httpc.mjs +250 -84
  47. package/dist/httpc.mjs.map +1 -1
  48. package/dist/vscode.html-custom-data.json +600 -58
  49. package/dist/web-types.json +1475 -380
  50. package/package.json +16 -8
package/dist/ful.d.mts CHANGED
@@ -1,24 +1,24 @@
1
1
  import { ParsedElement } from './ftl.mjs';
2
- declare class LocalStorage extends Storage {
3
- static save(k: any, v: any): void;
4
- static load(k: any): any;
5
- static remove(k: any): void;
6
- static pop(k: any): any;
7
- }
8
- declare class SessionStorage extends Storage {
9
- static save(k: any, v: any): void;
10
- static load(k: any): any;
11
- static remove(k: any): void;
12
- static pop(k: any): any;
13
- }
14
- declare class VersionedLocalStorage {
15
- static save(key: any, revision: any, data: any): void;
16
- static load(key: any, revision: any): any;
17
- }
18
- declare class VersionedSessionStorage {
19
- static save(key: any, revision: any, data: any): void;
20
- static load(key: any, revision: any): any;
21
- }
2
+ declare const LocalStorage: {
3
+ save: (k: any, v: any) => void;
4
+ load: (k: any) => any;
5
+ remove: (k: any) => void;
6
+ pop: (k: any) => any;
7
+ };
8
+ declare const SessionStorage: {
9
+ save: (k: any, v: any) => void;
10
+ load: (k: any) => any;
11
+ remove: (k: any) => void;
12
+ pop: (k: any) => any;
13
+ };
14
+ declare const VersionedLocalStorage: {
15
+ save(key: any, revision: any, data: any): void;
16
+ load(key: any, revision: any): any;
17
+ };
18
+ declare const VersionedSessionStorage: {
19
+ save(key: any, revision: any, data: any): void;
20
+ load(key: any, revision: any): any;
21
+ };
22
22
  export type AsyncExtension = {
23
23
  promises: Promise<any>[];
24
24
  };
@@ -30,6 +30,12 @@ export type AsyncEvent = Event & {
30
30
  * @property {Promise<any>[]} promises
31
31
  * @typedef {Event & { async?: AsyncExtension }} AsyncEvent
32
32
  */
33
+ /**
34
+ * Dispatching an event and waiting for what its listeners answer. A listener
35
+ * registered through `asyncOn` attaches its promise to the event, and
36
+ * `fireAsync` resolves once they have all settled: `broadcast` collects every
37
+ * answer, `pipeline` allows at most one, `delegate` requires exactly one.
38
+ */
33
39
  declare class AsyncEvents {
34
40
  /**
35
41
  * Dispatches an event and handles asynchronous resolution based on the execution mode.
@@ -64,36 +70,78 @@ declare class AsyncEvents {
64
70
  */
65
71
  static mixInto(...classes: Function[]): void;
66
72
  }
73
+ export type Claim = {
74
+ readonly stale: boolean;
75
+ };
76
+ /**
77
+ * @typedef {{ readonly stale: boolean }} Claim
78
+ */
79
+ /**
80
+ * The generations of claims over one contended resource. Every take() starts a
81
+ * new generation, superseding every claim before it, and a holder asks its
82
+ * claim `stale` before painting chrome, storing state or throwing towards a
83
+ * caller: a superseded outcome owns nothing. hold() joins the current
84
+ * generation without superseding it (a fetch that any later reconfiguration
85
+ * must detach), and invalidate() supersedes without claiming (a hide ending
86
+ * every pending show). One Claims per contended resource: a component whose
87
+ * dropdown, value labels and loader configuration contend separately holds one
88
+ * each.
89
+ */
90
+ declare class Claims {
91
+ #private;
92
+ /**
93
+ * Starts a new generation, superseding every earlier claim, and holds it.
94
+ * @returns {Claim}
95
+ */
96
+ take(): Claim;
97
+ /**
98
+ * Holds the current generation without superseding anything.
99
+ * @returns {Claim}
100
+ */
101
+ hold(): Claim;
102
+ /** Supersedes every claim without holding a new one. */
103
+ invalidate(): void;
104
+ }
105
+ /**
106
+ * Sleeping, debouncing and throttling. Debounce and throttle both return the
107
+ * wrapped function together with a cancel function.
108
+ */
67
109
  declare class Timing {
68
- static sleep(ms: any): Promise<any>;
69
- static DEBOUNCE_DEFAULT: number;
70
- static DEBOUNCE_IMMEDIATE: number;
110
+ /** Resolves after the given milliseconds. @param {number} ms */
111
+ static sleep(ms: number): Promise<any>;
71
112
  /**
72
113
  * Executes only after a period of inactivity (pause in events).
73
114
  * Respond to the "end" of a series of events.
74
- * @param {*} timeoutMs
75
- * @param {*} func
76
- * @param {*} [options]
115
+ * @param {number} timeoutMs
116
+ * @param {function} func
117
+ * @param {{ immediate?: boolean }} [options] - immediate fires on the leading edge instead of the trailing one
77
118
  * @returns {[function, function]}
78
119
  */
79
- static debounce(timeoutMs: any, func: any, options?: any): [Function, Function];
80
- static THROTTLE_DEFAULT: number;
81
- static THROTTLE_NO_LEADING: number;
82
- static THROTTLE_NO_TRAILING: number;
120
+ static debounce(timeoutMs: number, func: Function, options?: {
121
+ immediate?: boolean;
122
+ }): [Function, Function];
83
123
  /**
84
124
  * Executes at most once per specified time interval, regardless of ongoing events.
85
- * @param {*} timeoutMs
86
- * @param {*} func
87
- * @param {*} [options]
125
+ * @param {number} timeoutMs
126
+ * @param {function} func
127
+ * @param {{ leading?: boolean, trailing?: boolean }} [options] - which edges of the interval call, both by default
88
128
  * @returns {[function, function]}
89
129
  */
90
- static throttle(timeoutMs: any, func: any, options?: any): [Function, Function];
130
+ static throttle(timeoutMs: number, func: Function, options?: {
131
+ leading?: boolean;
132
+ trailing?: boolean;
133
+ }): [Function, Function];
91
134
  }
135
+ /** Field wiring: extracting and filling values, pinning problems to the fields they name. */
92
136
  declare class Bindings {
137
+ #private;
93
138
  /**
139
+ * Flattens a nested object into dotted keys, stopping wherever `stops` names
140
+ * a key: a field named `address` takes the whole object, while one named
141
+ * `address.city` takes the leaf.
94
142
  * @param {{ [x: string]: any; }} obj
95
143
  * @param {string} prefix
96
- * @param {Set<String>} stops
144
+ * @param {Set<String>} stops - the names the form actually has fields for
97
145
  * @return {{ [x: string]: any; }}
98
146
  */
99
147
  static flatten(obj: {
@@ -102,15 +150,20 @@ declare class Bindings {
102
150
  [x: string]: any;
103
151
  };
104
152
  /**
153
+ * Writes a value into an object at a dotted path, creating the intermediate
154
+ * objects and arrays the path implies. A numeric segment makes an array.
105
155
  * @param {any} result
106
- * @param {string} path
156
+ * @param {string} path - a field name, `a.b` or `a[0].b`
107
157
  * @param {any} value
108
158
  */
109
159
  static providePath(result: any, path: string, value: any): any;
110
160
  /**
111
- *
161
+ * Reads one control's value the way its kind demands: an unchecked radio
162
+ * answers undefined so it contributes nothing, a checkbox answers its
163
+ * checked state, a multiple select answers its selected values, and a blank
164
+ * native control answers null rather than an empty string.
112
165
  * @param {Element & {dataset?: any} & {checked?: boolean} & {value?: any}} el
113
- * @returns
166
+ * @returns {any} the value, or undefined where the control contributes none
114
167
  */
115
168
  static extract(el: Element & {
116
169
  dataset?: any;
@@ -119,17 +172,13 @@ declare class Bindings {
119
172
  } & {
120
173
  value?: any;
121
174
  }): any;
175
+ static extractFrom(form: any, submitter: any): {};
122
176
  /**
123
- *
124
- * @param {HTMLFormElement} form
125
- * @param {HTMLElement} [submitter]
126
- * @returns
127
- */
128
- static extractFrom(form: HTMLFormElement, submitter?: HTMLElement): {};
129
- /**
130
- *
177
+ * Writes a value into one control, the inverse of `extract`: a radio is
178
+ * checked when its own value matches, a checkbox takes the value as its
179
+ * checked state, and a multiple select selects the options the list names.
131
180
  * @param {Element & {dataset?: any} & {checked?: boolean} & {value?: any}} el
132
- * @returns
181
+ * @param {any} raw the value as it arrived, coerced per control kind
133
182
  */
134
183
  static mutate(el: Element & {
135
184
  dataset?: any;
@@ -141,82 +190,276 @@ declare class Bindings {
141
190
  static mutateIn(form: any, values: any): void;
142
191
  static errors(form: any, es: any, scrollOnError: any): void;
143
192
  }
193
+ /**
194
+ * The base of every form-associated ful field: a form-associated custom element
195
+ * carrying the validity protocol, the field error live region, focus
196
+ * delegation, the label chrome and the disabled, readonly and required claims.
197
+ *
198
+ * A subclass owns its template, its value semantics and its change events. It
199
+ * implements `_build(conf)`, which builds its dom and returns the pieces the
200
+ * base drives: the control, the error region, the label, and the optional
201
+ * `claims`, `announces`, `freeze` and `also`. The base does the wiring,
202
+ * the mounting and the application of the declared state. Nothing in the base
203
+ * is there to be called from a subclass's build.
204
+ *
205
+ * The pieces are the contract: the claim setters, the validity protocol and
206
+ * the aria wiring all act on them, so a field with no native control returns a
207
+ * focusable piece of its own chrome as the control. The getters and `focus()`
208
+ * are the only members that tolerate a not-yet-rendered element, where page
209
+ * code may read a claim or ask for the focus before the upgrade; the
210
+ * properties go live only after the render, as ParsedElement documents. The
211
+ * base references no ful vocabulary, only what its subclasses return to it.
212
+ */
213
+ declare class Field extends ParsedElement {
214
+ #private;
215
+ static formAssociated: boolean;
216
+ /**
217
+ * The claim attributes and the value are observed here so every field,
218
+ * including the custom ones, keeps them live after the upgrade: the
219
+ * attribute is a third way to author a claim, beside the markup and the
220
+ * property,
221
+ * exactly as a native input's. The value defaults to the string mapper and
222
+ * every field with its own vocabulary overrides it (`value:bool`,
223
+ * `value:csv`, `value:json`).
224
+ */
225
+ static observed: string[];
226
+ /** the role the element internals carry, 'presentation' unless the control is its own */
227
+ static ROLE: string;
228
+ constructor();
229
+ focus(options: any): void;
230
+ /**
231
+ * Clears or reports one validation problem: the text lands on the field's
232
+ * live region and the state on the element internals, driving `:invalid`
233
+ * styling. Validation is the server's: the submit travels regardless, and
234
+ * the problems come back pinned here. The error mapping pins on the most
235
+ * specific field name a problem's context reaches, handing over the
236
+ * remaining path ('' on an exact match): the base ignores it, a composite
237
+ * field owning a whole subtree overrides to route the problem to the inner
238
+ * control it names.
239
+ * @param {string} [error]
240
+ * @param {string} [context] the path below this field's name, '' when exact
241
+ */
242
+ setCustomValidity(error?: string, context?: string): void;
243
+ /** Submits the associated form through its first submitter, as Enter on a native control would. */
244
+ _requestSubmit(): void;
245
+ /**
246
+ * Dispatches the field's change event: bubbling, not cancelable, the value
247
+ * in the detail. Every field announces through this one method, and the detail
248
+ * always carries the field's own `value`, so a listener can rely on
249
+ * `el.value === evt.detail.value` whatever the field is. A field with more to
250
+ * say adds keys beside it; none can replace it.
251
+ * @param {Record<string, any>} [extras]
252
+ */
253
+ _notifyChange(extras?: Record<string, any>): void;
254
+ /**
255
+ * Whether the field's chrome should answer a gesture. Badges, dropzones,
256
+ * menus and labels are not form controls, so their handlers must ask the
257
+ * effective state: matches(':disabled') covers the fieldset ancestry the
258
+ * disabled property deliberately does not reflect, readonly the field's
259
+ * own claim.
260
+ */
261
+ _interactive(): boolean;
262
+ /**
263
+ * The field's value: every concrete field owns its semantics and overrides
264
+ * this pair. The base pair exists so the form integration (the reset
265
+ * protocol among others) has a member to write through; a custom field
266
+ * forgetting its own keeps the base's inert one.
267
+ * @type {any}
268
+ */
269
+ get value(): any;
270
+ set value(v: any);
271
+ /**
272
+ * A reset restores the field's declared value, as a native control's reset
273
+ * restores its markup default: the `value` attribute goes back through the
274
+ * element's own mapper and value setter, so every field resets through its
275
+ * own semantics. A field whose value is not attribute backed overrides this.
276
+ */
277
+ formResetCallback(): void;
278
+ /**
279
+ * The disabled protocol follows the semantics of a native form control:
280
+ *
281
+ * - the `disabled` attribute on the host is the field's own claim, and nothing
282
+ * but its author ever writes or removes it, in markup or through the
283
+ * property. The framework never claims on the form's behalf, so there is
284
+ * nothing to unclaim and nothing to lose: a field declared disabled inside
285
+ * a disabled `<fieldset>` stays disabled when the fieldset comes back,
286
+ * exactly like a native input keeps its attribute.
287
+ * - the effective state is the claim OR a disabled fieldset ancestry, which
288
+ * the platform maintains on its own: `:disabled` matches both, a disabled
289
+ * field is left out of the submitted values, and the inner native controls
290
+ * are reached by the ancestry as descendants of the fieldset.
291
+ * - the property reflects the claim only, like a native input's: a field
292
+ * disabled by its ancestry reads `false` while `matches(':disabled')`
293
+ * tells the effective state. Un-claiming inside a disabled fieldset
294
+ * cannot enable the field.
295
+ * - the inner controls mirror the claim and nothing else: the ancestry state
296
+ * is never written anywhere, so it can never go stale, and the browser
297
+ * composes the two on its own when it disables and re-enables a fieldset's
298
+ * descendants. Subclass setters call super for the claim, then reach their
299
+ * own controls, which mirror the claim like a native input's would.
300
+ *
301
+ * Because of this, formDisabledCallback carries nothing the framework needs
302
+ * to apply, and the protocol does not define it.
303
+ */
304
+ get disabled(): boolean;
305
+ set disabled(d: boolean);
306
+ /**
307
+ * A field is readonly through its control's native readOnly when it has one:
308
+ * the control stays focusable and its text selectable, only editing is off.
309
+ * Fields whose chrome must freeze too (popovers, buttons, label clicks) name
310
+ * a `freeze` piece instead, whose gestures the base refuses while the claim
311
+ * holds; the claim reflects on the host either way.
312
+ */
313
+ get readonly(): boolean;
314
+ set readonly(v: boolean);
315
+ /**
316
+ * A field is required through aria: the claim reflects on the host, the
317
+ * announcement lives on the adopted control.
318
+ */
319
+ get required(): boolean;
320
+ set required(d: boolean);
321
+ /**
322
+ * The field's render is the base's: the subclass builds its dom in `_build`
323
+ * and hands back what it built, the base wiring the pieces, mounting the
324
+ * fragment and applying the declared state. Nothing in the base is there to
325
+ * be called from a subclass's build. `_build` may be async (a select
326
+ * awaiting its prefetch); a field that builds synchronously stays so.
327
+ */
328
+ render(conf: any): Promise<void> | undefined;
329
+ /**
330
+ * Builds the field's dom and answers the pieces the base drives. The one
331
+ * method a concrete field implements beside its value pair, and the only
332
+ * place its dom is created; the base does the wiring and the mounting.
333
+ *
334
+ * - `fragment` is mounted on the host
335
+ * - `control` is the focusable target: focus, the aria and, by default, all
336
+ * three claims reach it
337
+ * - `error` is the field's live region
338
+ * - `label`, when given, names the control and focuses it on click
339
+ * - `described` moves the error's description off the control and onto
340
+ * another element, the host where no single control can carry it
341
+ * - `claims` moves the three claims onto a wrapper the field disables as a
342
+ * whole, leaving focus and aria on the control
343
+ * - `announces` is the element whose role carries `aria-readonly` and
344
+ * `aria-required`, the host where the widget role lives there; `null` for a
345
+ * field whose control has no role that accepts them
346
+ * - `freeze` is for a field with no usable native readOnly: the readonly
347
+ * claim refuses the gestures inside it, leaving it focusable and readable
348
+ * - `also` are further controls mirroring disabled and readOnly beside the
349
+ * first
350
+ *
351
+ * A subclass extending another field's build spreads the pieces it answered
352
+ * and overrides the keys it owns.
353
+ * @param {{slots: any}} conf
354
+ * @returns {any}
355
+ */
356
+ _build(conf: {
357
+ slots: any;
358
+ }): any;
359
+ }
360
+ /** Submits a form's values as json to a url, mapping the request and the response through the configured mappers. */
144
361
  declare class RemoteJsonFormLoader {
145
362
  #private;
146
363
  constructor(http: any, url: any, method: any, requestMapper: any, responseMapper: any);
147
364
  prepare(values: any, form: any): any;
148
- submit(values: any, form: any): Promise<any>;
365
+ submit(request: any, form: any): Promise<any>;
149
366
  transform(response: any, form: any): any;
150
367
  }
368
+ /** Submits a form without a request: the request mapper produces the result the response mapper then reads, for a form handled entirely on the page. */
151
369
  declare class LocalFormLoader {
152
370
  #private;
153
371
  constructor(requestMapper: any, responseMapper: any);
154
372
  prepare(values: any, form: any): Promise<any>;
155
- submit(values: any, form: any, response: any): Promise<any>;
373
+ submit(request: any, form: any, response: any): Promise<any>;
156
374
  transform(response: any, form: any): Promise<any>;
157
375
  }
376
+ /**
377
+ * Builds the form's loader from its attributes: a local one when no action is
378
+ * declared, a json post to it otherwise.
379
+ *
380
+ * A component registered under the `loader` attribute replaces this one and
381
+ * must implement three methods, called in this order:
382
+ *
383
+ * - `prepare(values, form)` turns the extracted values into the request to send
384
+ * - `submit(request, form, response)` performs it and returns the response. The
385
+ * third argument is whatever a `submit:requested` listener already answered,
386
+ * which is how a loader with nothing to send returns it unchanged
387
+ * - `transform(response, form)` turns that response into the detail of the
388
+ * `submit:success` event
389
+ *
390
+ * A rejection from any of the three is reported as a `submit:failure`.
391
+ */
158
392
  declare class FormLoader {
159
393
  static create(el: any, conf: any): LocalFormLoader | RemoteJsonFormLoader;
160
394
  }
395
+ /**
396
+ * Wraps its fields in a native form, extracts their values on submit and hands
397
+ * them to a loader (loaders:form, or the action url as a json post),
398
+ * announcing failures through the errors setter.
399
+ */
161
400
  declare class Form extends ParsedElement {
162
401
  #private;
402
+ static attributes: string[];
163
403
  form: any;
164
404
  render(): void;
165
405
  /**
166
- *
406
+ * Submits once: a submit while one is in flight is dropped before the
407
+ * values are even extracted, so nothing fires and nothing travels; the
408
+ * settled exchange re-arms the form. A write must not double behind a
409
+ * second Enter or a programmatic call racing the first.
167
410
  * @param {HTMLElement} [submitter]
168
411
  * @returns
169
412
  */
170
413
  submit(submitter?: HTMLElement): Promise<void>;
414
+ /** The native reset, routing every field through its own value semantics. */
171
415
  reset(): void;
416
+ /** Shows the spinners and holds the submit buttons off, overlapping spins sharing one claim. */
172
417
  spinner(spin: any): void;
418
+ /** The values of the fields the form contains, extracted and filled back through Bindings. */
173
419
  set values(vs: {});
174
420
  get values(): {};
421
+ /** Pins problems to the fields they name, the banner taking the nameless ones. */
175
422
  set errors(es: any);
176
423
  }
177
- declare class Input extends ParsedElement {
178
- internals: ElementInternals;
424
+ /** A labelled text input over any native type or textarea; the temporal inputs are its subclasses. */
425
+ declare class Input extends Field {
179
426
  static observed: string[];
427
+ static attributes: string[];
180
428
  static slots: boolean;
181
429
  static template: string;
182
- static formAssociated: boolean;
183
430
  _input: any;
184
- _fieldError: any;
185
- constructor();
186
- _type(): string;
187
- _fragment(type: any, slots: any): any;
188
- render({ slots, observed, disabled, skipObservedSetup }: {
189
- disabled: any;
190
- observed: any;
191
- skipObservedSetup: any;
431
+ _type(): any;
432
+ _build({ slots }: {
192
433
  slots: any;
193
- }): void;
434
+ }): {
435
+ fragment: any;
436
+ control: any;
437
+ error: any;
438
+ label: any;
439
+ };
194
440
  get value(): any;
195
441
  set value(value: any);
196
- get readonly(): any;
197
- set readonly(v: any);
198
- get disabled(): boolean;
199
- set disabled(d: boolean);
200
- get required(): boolean;
201
- set required(d: boolean);
202
442
  get placeholder(): any;
203
443
  set placeholder(d: any);
204
- focus(options: any): void;
205
- setCustomValidity(error: any): void;
206
- formResetCallback(): void;
207
444
  }
445
+ /** Formats the yyyy-mm-dd date in its content in the page's locale, or the one its locale attribute names. */
208
446
  declare class LocalDate extends ParsedElement {
447
+ static attributes: string[];
209
448
  render(): void;
210
449
  }
450
+ /** Formats the ISO instant in its content in the page's locale and timezone. */
211
451
  declare class Instant extends ParsedElement {
452
+ #private;
453
+ static attributes: string[];
212
454
  render(): void;
213
455
  static isoToLocal(iso: any): string;
456
+ static localToIso(local: any): string | null;
214
457
  }
458
+ /** A date input whose bounds accept a date, now, or an offset such as +1d. */
215
459
  declare class InputLocalDate extends Input {
216
460
  #private;
217
461
  static observed: string[];
218
462
  _type(): string;
219
- render(conf: any): void;
220
463
  get min(): any;
221
464
  set min(v: any);
222
465
  get max(): any;
@@ -224,6 +467,7 @@ declare class InputLocalDate extends Input {
224
467
  get step(): any;
225
468
  set step(v: any);
226
469
  }
470
+ /** A time input whose bounds accept a time, now, or an hour or minute offset, snapped to the step grid. */
227
471
  declare class InputLocalTime extends InputLocalDate {
228
472
  #private;
229
473
  _type(): string;
@@ -232,10 +476,10 @@ declare class InputLocalTime extends InputLocalDate {
232
476
  get max(): any;
233
477
  set max(v: any);
234
478
  }
479
+ /** A datetime input whose value is read and written as an ISO instant. */
235
480
  declare class InputInstant extends Input {
236
481
  static observed: string[];
237
482
  _type(): string;
238
- render(conf: any): void;
239
483
  get value(): string | null;
240
484
  set value(v: string | null);
241
485
  get min(): string | null;
@@ -245,38 +489,18 @@ declare class InputInstant extends Input {
245
489
  get step(): any;
246
490
  set step(v: any);
247
491
  }
492
+ /** A file input with an optional dropzone and item list, enforcing the size and count limits it declares. */
248
493
  declare class InputFile extends Input {
249
494
  #private;
250
- static l10n: {
251
- en: {
252
- dropzonelabel: string;
253
- unacceptablefiletype: string;
254
- maxfilesizeexceeded: string;
255
- maxtotalsizeexceeded: string;
256
- maxfilesexceeded: string;
257
- };
258
- it: {
259
- dropzonelabel: string;
260
- unacceptablefiletype: string;
261
- maxfilesizeexceeded: string;
262
- maxtotalsizeexceeded: string;
263
- maxfilesexceeded: string;
264
- };
265
- es: {
266
- dropzonelabel: string;
267
- unacceptablefiletype: string;
268
- maxfilesizeexceeded: string;
269
- maxtotalsizeexceeded: string;
270
- maxfilesexceeded: string;
271
- };
272
- fr: {
273
- dropzonelabel: string;
274
- unacceptablefiletype: string;
275
- maxfilesizeexceeded: string;
276
- maxtotalsizeexceeded: string;
277
- maxfilesexceeded: string;
278
- };
279
- };
495
+ /** how long a warning stands before the field retires it, matching the css fade */
496
+ static WARNING_TIMEOUT: number;
497
+ /**
498
+ * A FileList holding exactly these files. The platform gives no way to
499
+ * build one but through a DataTransfer, and every place that narrows a
500
+ * selection rebuilt it by hand: five loops and three empty ones.
501
+ * @param {Iterable<File>} [files]
502
+ */
503
+ static list(files?: Iterable<File>): FileList;
280
504
  static observed: string[];
281
505
  _type(): string;
282
506
  static template: string;
@@ -284,7 +508,13 @@ declare class InputFile extends Input {
284
508
  items: string;
285
509
  warning: string;
286
510
  };
287
- render(conf: any): void;
511
+ _build(conf: any): {
512
+ fragment: any;
513
+ control: any;
514
+ error: any;
515
+ label: any;
516
+ freeze: any;
517
+ };
288
518
  warning(key: any, args: any): void;
289
519
  get accept(): any;
290
520
  set accept(vs: any);
@@ -296,18 +526,24 @@ declare class InputFile extends Input {
296
526
  set file(v: any);
297
527
  get value(): any;
298
528
  set value(v: any);
529
+ formResetCallback(): void;
299
530
  get totalsize(): any;
300
- get maxfiles(): any;
301
- set maxfiles(v: any);
302
- get maxfilesize(): any;
303
- set maxfilesize(v: any);
304
- get maxtotalsize(): any;
305
- set maxtotalsize(v: any);
306
- get itemlist(): any;
307
- set itemlist(v: any);
531
+ get maxFiles(): any;
532
+ set maxFiles(v: any);
533
+ get maxFileSize(): any;
534
+ set maxFileSize(v: any);
535
+ get maxTotalSize(): any;
536
+ set maxTotalSize(v: any);
537
+ get itemList(): any;
538
+ set itemList(v: any);
308
539
  get dropzone(): any;
309
540
  set dropzone(v: any);
310
541
  }
542
+ /**
543
+ * Fetches a select's whole vocabulary from a url and serves every later read
544
+ * from it. Concurrent callers share one request, the options may be cached in
545
+ * local storage under a revision, and reconfiguring the url discards both.
546
+ */
311
547
  declare class RemoteLoader {
312
548
  #private;
313
549
  constructor({ http, url, method, responseMapper, prefetch, revision }: {
@@ -321,8 +557,15 @@ declare class RemoteLoader {
321
557
  prefetch(): Promise<void>;
322
558
  exact(...keys: any[]): Promise<any>;
323
559
  load(needle: any): Promise<any>;
560
+ /**
561
+ * Drops the cached vocabulary so the next question refetches it. Any fetch
562
+ * still in flight is detached: its outcome belongs to the configuration that
563
+ * started it and must neither be served nor stored for the new one.
564
+ */
565
+ invalidate(): Promise<void>;
324
566
  reconfigureUrl(url: any): Promise<void>;
325
567
  }
568
+ /** Asks the endpoint per query instead of fetching the vocabulary once, for a list too large to hold in memory. */
326
569
  declare class PartialRemoteLoader {
327
570
  #private;
328
571
  constructor({ http, url, method, responseMapper }: {
@@ -331,22 +574,65 @@ declare class PartialRemoteLoader {
331
574
  responseMapper: any;
332
575
  url: any;
333
576
  });
577
+ /**
578
+ * Nothing is held between queries, so there is no cache to drop: the method
579
+ * exists so a caller can invalidate any loader without knowing which it has.
580
+ */
581
+ invalidate(): Promise<void>;
582
+ reconfigureUrl(url: any): Promise<void>;
334
583
  exact(...keys: any[]): Promise<any>;
335
584
  load(needle: any): Promise<any>;
336
585
  }
586
+ /** Serves a select's options from an array held in memory, which is what the slotted `<option>` elements become. */
337
587
  declare class InMemoryLoader {
338
588
  #private;
339
589
  constructor(data: any);
340
590
  update(data: any): void;
591
+ /** The vocabulary is the data itself: update replaces it, so there is nothing to drop. */
592
+ invalidate(): Promise<void>;
341
593
  exact(...keys: any[]): any;
342
594
  load(needle: any): any;
343
595
  }
596
+ /**
597
+ * Builds the select's loader from its attributes: the slotted options in
598
+ * memory, or a remote or chunked loader over src.
599
+ *
600
+ * A component registered under the `loader` attribute replaces this one and
601
+ * must implement the same three methods, each answering `{ key, label,
602
+ * metadata }` entries:
603
+ *
604
+ * - `prefetch()` warms the vocabulary if it can, and resolves either way
605
+ * - `load(needle)` answers the entries matching the typed text, all of them
606
+ * when the needle is nullish, which is the empty search the list opens with
607
+ * - `exact(...keys)` answers the entries for those keys, used to label a value
608
+ * assigned without going through the list
609
+ */
344
610
  declare class SelectLoader {
345
611
  #private;
612
+ /**
613
+ * Builds a loader from a plain configuration, reading no dom: `data` alone
614
+ * is the in-memory vocabulary, a `url` is fetched whole or, under
615
+ * `mode: 'chunked'`, per query. A test, or a caller holding its own
616
+ * configuration, builds a loader this way; `create` is the same thing with
617
+ * an element's attributes parsed first.
618
+ * @param {{ data?: any[], http?: any, url?: string, method?: string, mode?: string, prefetch?: boolean, revision?: string|null, responseMapper?: any }} conf
619
+ */
620
+ static from({ data, http, url, method, mode, prefetch, revision, responseMapper }: {
621
+ data?: any[];
622
+ http?: any;
623
+ url?: string;
624
+ method?: string;
625
+ mode?: string;
626
+ prefetch?: boolean;
627
+ revision?: string | null;
628
+ responseMapper?: any;
629
+ }): InMemoryLoader | PartialRemoteLoader | RemoteLoader;
346
630
  static create(el: any, conf: any): InMemoryLoader | PartialRemoteLoader | RemoteLoader;
347
631
  }
632
+ /** The options popup of a select: listbox semantics, one loading claim per show, a localized empty state. */
348
633
  declare class Dropdown extends ParsedElement {
349
634
  #private;
635
+ static attributes: string[];
350
636
  static slots: boolean;
351
637
  static template: string;
352
638
  static templates: {
@@ -356,151 +642,131 @@ declare class Dropdown extends ParsedElement {
356
642
  slots: any;
357
643
  }): void;
358
644
  acceptSelection(): void;
359
- update(values: any): void;
645
+ update(values: any, keys?: any[]): void;
360
646
  hide(): void;
361
647
  get shown(): boolean;
362
- show(loader: any): Promise<void>;
363
- moveOrShow(forward: any, loader: any): Promise<void>;
648
+ show(loader: any, keys?: any[]): Promise<void>;
649
+ moveOrShow(forward: any, loader: any, keys?: any[]): Promise<void>;
650
+ jump(first: any): void;
651
+ page(forward: any): void;
364
652
  }
365
- declare class Select extends ParsedElement {
653
+ /** A combobox acting like a select over a loader's vocabulary, single or multiple. */
654
+ declare class Select extends Field {
366
655
  #private;
656
+ static attributes: string[];
367
657
  static observed: string[];
368
658
  static slots: boolean;
369
659
  static template: string;
370
660
  static templates: {
371
661
  items: string;
372
662
  };
373
- static formAssociated: boolean;
374
- internals: ElementInternals;
375
- constructor();
376
- render({ slots, observed, disabled }: {
377
- disabled: any;
378
- observed: any;
663
+ _build({ slots }: {
379
664
  slots: any;
380
- }): Promise<void>;
665
+ }): {
666
+ fragment: any;
667
+ control: any;
668
+ error: any;
669
+ label: any;
670
+ };
671
+ /** Hands the loader to the callback, for runtime reconfigurations. */
381
672
  withLoader(fn: any): Promise<any>;
673
+ /**
674
+ * Drops whatever the loader is holding and asks it about the current selection
675
+ * again, which is what a select whose vocabulary depends on another control
676
+ * needs when that control changes. A key the loader no longer knows is dropped
677
+ * from the selection, so a value invalidated by the change does not survive it,
678
+ * and one it still knows keeps its place with a fresh label.
679
+ *
680
+ * Pass a url first where the vocabulary lives at a different address:
681
+ *
682
+ * citta.addEventListener('change', async () => {
683
+ * await cap.withLoader((l) => l.reconfigureUrl(`/api/cap?citta=${citta.value}`));
684
+ * await cap.reload();
685
+ * });
686
+ */
687
+ reload(): Promise<void>;
382
688
  set value(vs: any);
383
689
  get value(): any;
384
- get entry(): [any, any][] | [any, any];
385
- get disabled(): boolean;
386
- set disabled(d: boolean);
387
- get readonly(): any;
388
- set readonly(v: any);
389
- get required(): boolean;
390
- set required(d: boolean);
391
- get itemlist(): any;
392
- set itemlist(v: any);
393
- focus(options: any): void;
394
- setCustomValidity(error: any): void;
690
+ /** The selection as {key, label, metadata} entries, the change detail's vocabulary: the only one for a single select, every one when multiple. */
691
+ get entry(): any;
692
+ get multiple(): any;
693
+ set multiple(v: any);
694
+ get itemList(): any;
695
+ set itemList(v: any);
395
696
  }
396
- declare class RadioGroup extends ParsedElement {
697
+ /** A group of radios declared as ful-radio children, a fieldset carrying the group semantics. */
698
+ declare class RadioGroup extends Field {
397
699
  #private;
398
- internals: ElementInternals;
399
- static observed: string[];
700
+ static attributes: string[];
400
701
  static slots: boolean;
702
+ static ROLE: string;
401
703
  static template: string;
402
- static formAssociated: boolean;
403
- constructor();
404
- render({ slots, observed, disabled }: {
405
- disabled: any;
406
- observed: any;
704
+ /**
705
+ * @param {{slots: any}} conf
706
+ * @returns {any}
707
+ */
708
+ _build({ slots }: {
407
709
  slots: any;
408
- }): void;
710
+ }): any;
409
711
  get value(): string | boolean | null;
410
712
  set value(value: string | boolean | null);
411
- get readonly(): any;
412
- set readonly(v: any);
413
- get disabled(): boolean;
414
- set disabled(d: boolean);
415
- get required(): boolean;
416
- set required(d: boolean);
417
- focus(options: any): void;
418
- setCustomValidity(error: any): void;
419
713
  }
420
- declare class Checkbox extends ParsedElement {
714
+ /** A checkbox, or a switch under the type=switch claim. */
715
+ declare class Checkbox extends Field {
421
716
  #private;
422
- internals: ElementInternals;
717
+ static attributes: string[];
423
718
  static observed: string[];
424
719
  static slots: boolean;
425
720
  static template: string;
426
- static formAssociated: boolean;
427
- constructor();
428
- render({ slots, observed, disabled }: {
429
- disabled: any;
430
- observed: any;
721
+ _build({ slots }: {
431
722
  slots: any;
432
- }): void;
723
+ }): {
724
+ fragment: any;
725
+ control: any;
726
+ error: any;
727
+ label: any;
728
+ freeze: any;
729
+ };
433
730
  get value(): any;
434
731
  set value(value: any);
435
- get readonly(): any;
436
- set readonly(v: any);
437
- get disabled(): boolean;
438
- set disabled(d: boolean);
439
- get required(): boolean;
440
- set required(d: boolean);
441
- focus(options: any): void;
442
- setCustomValidity(error: any): void;
443
- }
444
- declare class Spinner extends ParsedElement {
445
- static slots: boolean;
446
- static template: string;
447
- render({ slots }: {
448
- slots: any;
449
- }): void;
450
732
  }
733
+ /** The sort control of a table header: focusable, keyboard-activated, walking asc, desc, unsorted. */
451
734
  declare class SortButton extends ParsedElement {
452
735
  #private;
736
+ static attributes: string[];
453
737
  static observed: string[];
454
- render({ observed }: {
455
- observed: any;
456
- }): void;
738
+ render(): void;
457
739
  get order(): any;
458
740
  set order(value: any);
459
741
  }
742
+ /** The pager: a window of page links around the current one, and the reload control. */
460
743
  declare class Pagination extends ParsedElement {
461
744
  #private;
462
745
  static observed: string[];
463
- static l10n: {
464
- en: {
465
- showing: string;
466
- navigation: string;
467
- previous: string;
468
- next: string;
469
- };
470
- it: {
471
- showing: string;
472
- navigation: string;
473
- previous: string;
474
- next: string;
475
- };
476
- es: {
477
- showing: string;
478
- navigation: string;
479
- previous: string;
480
- next: string;
481
- };
482
- fr: {
483
- showing: string;
484
- navigation: string;
485
- previous: string;
486
- next: string;
487
- };
488
- };
746
+ static attributes: string[];
489
747
  static config: {
490
748
  prevIcon: string;
491
749
  nextIcon: string;
492
750
  reloadIcon: string;
493
751
  };
494
752
  static template: string;
495
- render({ observed }: {
496
- observed: any;
753
+ render(): void;
754
+ /**
755
+ * Moves the pager to a page, a page count, or both, and repaints once. The
756
+ * two are one state: writing them one at a time repainted the bar twice per
757
+ * load, the first pass drawing the new page against the old count.
758
+ * @param {{ current?: number|null, total?: number|null }} [state]
759
+ */
760
+ update({ current: toCurrent, total: toTotal }?: {
761
+ current?: number | null;
762
+ total?: number | null;
497
763
  }): void;
498
- update(current: any, total: any): void;
499
764
  get total(): number;
500
765
  set total(value: number);
501
766
  get current(): number;
502
767
  set current(value: number);
503
768
  }
769
+ /** Reads the schema declaration into the header and row templates a table renders from. */
504
770
  declare class TableSchemaParser {
505
771
  static parse(nodeOrFragment: any, template: any): {
506
772
  headersTemplate: any;
@@ -512,31 +778,47 @@ declare class TableSchemaParser {
512
778
  length: number;
513
779
  };
514
780
  }
781
+ /** Serves a table's rows from an array held in memory, applying the sort and the paging itself. */
782
+ declare class InMemoryTableLoader {
783
+ #private;
784
+ constructor(data: any);
785
+ load(pageRequest: any, sortRequest: any, filterRequest: any): Promise<{
786
+ data: any;
787
+ size: any;
788
+ }>;
789
+ update(data: any): void;
790
+ }
791
+ /** Requests one page of rows from a url, passing the page, the sort and the filters to the endpoint. */
792
+ declare class RemoteTableLoader {
793
+ #private;
794
+ constructor(http: any, url: any, method: any, responseMapper?: (response: any) => any);
795
+ load(pageRequest: any, sortRequest: any, filterRequest: any): Promise<any>;
796
+ }
797
+ /**
798
+ * Builds the table's loader from its attributes: an in-memory one, or the
799
+ * remote loader over src.
800
+ *
801
+ * A component registered under the `loader` attribute replaces this one and
802
+ * must implement `load(pageRequest, sortRequest, filterRequest)`, answering
803
+ * `{ data, page, size }` for the requested page. `pageRequest` carries the page
804
+ * index and its size, `sortRequest` the column and direction, and
805
+ * `filterRequest` the values of the filters in the slot.
806
+ */
807
+ declare class TableLoader {
808
+ static create(el: any, conf: any): InMemoryTableLoader | RemoteTableLoader;
809
+ }
810
+ /** A table loading its rows from a loader, with sorting, pagination and an optional filter form. */
515
811
  declare class Table extends ParsedElement {
516
812
  #private;
813
+ static attributes: string[];
814
+ /**
815
+ * The page size stays live: a rows-per-page control is a normal thing to
816
+ * put next to a table, and the size is the one piece of the request an
817
+ * author changes after the table is up. The rest of the request is the
818
+ * table's own state, moved by the pager, the sorters and the filter form.
819
+ */
820
+ static observed: string[];
517
821
  static slots: boolean;
518
- static l10n: {
519
- en: {
520
- initial: string;
521
- error: string;
522
- nodata: string;
523
- };
524
- it: {
525
- initial: string;
526
- error: string;
527
- nodata: string;
528
- };
529
- es: {
530
- initial: string;
531
- error: string;
532
- nodata: string;
533
- };
534
- fr: {
535
- initial: string;
536
- error: string;
537
- nodata: string;
538
- };
539
- };
540
822
  static config: {
541
823
  searchIcon: string;
542
824
  };
@@ -544,54 +826,321 @@ declare class Table extends ParsedElement {
544
826
  static templates: {
545
827
  row: string;
546
828
  };
547
- render({ slots, observed }: {
548
- observed: any;
829
+ /** How many rows a page asks the loader for: the size the next load will carry. */
830
+ get pageSize(): number;
831
+ /**
832
+ * Changes the page size and reloads from the first page, the current index
833
+ * meaning nothing under a new size. A table that has not loaded yet only
834
+ * records it: writing the size is not a request to start loading, which is
835
+ * what `autoload` and `reload()` are for.
836
+ *
837
+ * Absent or null is the default of ten, so removing the attribute restores
838
+ * it rather than asking the loader for NaN rows.
839
+ */
840
+ set pageSize(value: number);
841
+ render({ slots }: {
549
842
  slots: any;
550
843
  }): Promise<void>;
551
844
  reload(): Promise<void>;
552
845
  load(pageRequest: any, sortRequest: any, filterRequest: any): Promise<void>;
846
+ /** Hands the loader to the callback, for runtime reconfigurations. */
553
847
  withLoader(fn: any): Promise<any>;
554
848
  resetWithFilter(filterRequest: any): Promise<void>;
555
849
  }
556
- declare class InstantFilter extends Input {
557
- #private;
850
+ /**
851
+ * The shared shape of every operator-and-operands filter: an operator menu, one
852
+ * or two operands of the type the subclass declares, and a tuple that mirrors
853
+ * the data-jpa compare annotations.
854
+ */
855
+ declare class CompareFilter extends Input {
558
856
  static observed: string[];
857
+ static OPERATORS: string[];
858
+ static DEFAULT_OPERATOR: string;
559
859
  static template: string;
560
- render(conf: any): void;
561
- get value(): any[] | undefined;
562
- set value(v: any[] | undefined);
563
- get readonly(): any;
564
- set readonly(v: any);
860
+ _operator: any;
861
+ _container: any;
862
+ _value1: any;
863
+ _value2: any;
864
+ _build(conf: any): {
865
+ fragment: any;
866
+ control: any;
867
+ error: any;
868
+ label: any;
869
+ freeze: any;
870
+ also: any[];
871
+ };
872
+ _showDefaultOperator(): void;
873
+ formResetCallback(): void;
874
+ _type(): string;
875
+ _serialize(v: any): any;
876
+ _deserialize(v: any): any;
877
+ _defaultOperator(): string;
878
+ _vocabulary(): string[];
879
+ _declaredOperators: any;
880
+ get operators(): any;
881
+ set operators(declared: any);
882
+ get value(): any[] | null;
883
+ set value(v: any[] | null);
884
+ _tuple(): any[] | null;
885
+ _applyTuple(v: any): void;
886
+ _showOperator(operator: any): void;
887
+ /** only a BETWEEN carries a second operand */
888
+ _syncBetween(): void;
565
889
  get disabled(): boolean;
566
890
  set disabled(d: boolean);
891
+ /** every menu button the filter composes, so one claim reaches them all */
892
+ _choices(): any[];
567
893
  }
568
- declare class LocalDateFilter extends Input {
569
- #private;
894
+ /** The compare filter over ISO instants, defaulting to LTE. */
895
+ declare class InstantFilter extends CompareFilter {
896
+ _defaultOperator(): string;
897
+ _type(): string;
898
+ _serialize(v: any): string | null;
899
+ _deserialize(v: any): string;
900
+ }
901
+ /** The compare filter over dates. */
902
+ declare class LocalDateFilter extends CompareFilter {
903
+ _type(): string;
904
+ }
905
+ /** The compare filter over numbers. */
906
+ declare class NumberFilter extends CompareFilter {
907
+ _type(): string;
908
+ }
909
+ /** The compare filter over text, carrying a case sensitivity beside the operator. */
910
+ declare class TextFilter extends CompareFilter {
570
911
  static observed: string[];
571
912
  static template: string;
572
- render(conf: any): void;
573
- get value(): any[] | undefined;
574
- set value(v: any[] | undefined);
575
- get readonly(): any;
576
- set readonly(v: any);
913
+ _defaultOperator(): string;
914
+ _vocabulary(): string[];
915
+ _sensitivityButton: any;
916
+ _build(conf: any): {
917
+ fragment: any;
918
+ control: any;
919
+ error: any;
920
+ label: any;
921
+ freeze: any;
922
+ also: any[];
923
+ };
924
+ _choices(): any[];
925
+ get _sensitivity(): any;
926
+ _declaredSensitivities: any;
927
+ get sensitivities(): any;
928
+ set sensitivities(declared: any);
929
+ get value(): any[] | null;
930
+ set value(v: any[] | null);
931
+ formResetCallback(): void;
932
+ }
933
+ /** The boolean filter: an EQ or NEQ operator and an any/yes/no menu. */
934
+ declare class BooleanFilter extends Field {
935
+ static observed: string[];
936
+ static slots: boolean;
937
+ static OPERATORS: string[];
938
+ static DEFAULT_OPERATOR: string;
939
+ static template: string;
940
+ _operator: any;
941
+ _value: any;
942
+ _container: any;
943
+ _build({ slots }: {
944
+ slots: any;
945
+ }): {
946
+ fragment: any;
947
+ control: any;
948
+ error: any;
949
+ label: any;
950
+ announces: null;
951
+ freeze: any;
952
+ };
953
+ _declaredOperators: any;
954
+ get operators(): any;
955
+ set operators(declared: any);
956
+ _vocabulary(): string[];
957
+ get value(): any[] | null;
958
+ set value(v: any[] | null);
577
959
  get disabled(): boolean;
578
960
  set disabled(d: boolean);
579
961
  }
580
- declare class TextFilter extends Input {
962
+ /** An info icon button toggling a popover with a short explanation. */
963
+ declare class Tooltip extends ParsedElement {
964
+ static slots: boolean;
965
+ static attributes: string[];
966
+ static config: {
967
+ icon: string;
968
+ };
969
+ static template: string;
970
+ render({ slots }: {
971
+ slots: any;
972
+ }): void;
973
+ }
974
+ /** A modal dialog on the native platform, open()/ask() resolving with the closer's data-result. */
975
+ declare class Dialog extends ParsedElement {
976
+ #private;
977
+ static attributes: string[];
978
+ static slots: boolean;
979
+ static template: string;
980
+ render({ slots }: {
981
+ slots: any;
982
+ }): void;
983
+ disconnectedCallback(): void;
984
+ open(): Promise<any>;
985
+ ask(): Promise<any>;
986
+ /**
987
+ * Re-fires section:requested on the body, open or closed: the explicit
988
+ * request for a body that wants refreshing. A failed refresh paints its
989
+ * problems, nothing rejects: there is no caller to reject towards.
990
+ */
991
+ refresh(): Promise<any[] | undefined>;
992
+ close(result: any): void;
993
+ }
994
+ /** A side panel drawer on the native dialog platform, update() owning its open-deliver cycle. */
995
+ declare class Drawer extends ParsedElement {
996
+ #private;
997
+ static attributes: string[];
998
+ static slots: boolean;
999
+ static template: string;
1000
+ render({ slots }: {
1001
+ slots: any;
1002
+ }): void;
1003
+ get title(): any;
1004
+ set title(v: any);
1005
+ /**
1006
+ * Opens the drawer under the given title and waits for the callback: a
1007
+ * resolved value paints the content section (which is returned), a
1008
+ * rejection paints the problems and travels to the caller, and an update
1009
+ * superseded by a newer one paints nothing.
1010
+ */
1011
+ update(title: any, cb: any): Promise<any>;
1012
+ /**
1013
+ * Re-fires section:requested on the content, open or closed: the explicit
1014
+ * request for a body that wants refreshing. A failed refresh paints its
1015
+ * problems, nothing rejects: update() stays the rejecting call.
1016
+ */
1017
+ refresh(): Promise<any[] | undefined>;
1018
+ open(): void;
1019
+ close(): void;
1020
+ }
1021
+ /** A transient feedback region: each show() stacks a toast that retires on its own timer. */
1022
+ declare class Toasts extends ParsedElement {
1023
+ #private;
1024
+ static attributes: string[];
1025
+ connectedCallback(): void;
1026
+ disconnectedCallback(): void;
1027
+ render(): void;
1028
+ /**
1029
+ * Appends a toast carrying the message (a Failure shows its problems'
1030
+ * reasons, one per line), severity picking the theme and the announcement,
1031
+ * the toast retiring through its own timer or its dismiss button.
1032
+ * @param {any} message
1033
+ * @param {any} [options] severity and timeout
1034
+ * @returns {HTMLElement}
1035
+ */
1036
+ show(message: any, options?: any): HTMLElement;
1037
+ }
1038
+ /**
1039
+ * A tab panel: one visible panel at a time, announced through the tab pattern
1040
+ * (a tablist of tab buttons, each panel a tabpanel named by its tab). The tabs
1041
+ * are declared as <tab> elements in the tabs slot, the panels as the slotless
1042
+ * children, paired in order. Entering a panel fires the section:requested
1043
+ * family on it (generic and #index, panels being nameless) and awaits the
1044
+ * answers, so a panel can deliver itself asynchronously.
1045
+ */
1046
+ declare class Tabs extends ParsedElement {
581
1047
  #private;
1048
+ static slots: boolean;
582
1049
  static observed: string[];
583
1050
  static template: string;
584
- render(conf: any): void;
585
- get value(): any[] | undefined;
586
- set value(v: any[] | undefined);
1051
+ render({ slots }: {
1052
+ slots: any;
1053
+ }): void;
1054
+ get active(): number;
1055
+ /**
1056
+ * Re-fires the section:requested family on the panel (by index or the
1057
+ * panel element itself), whether active or not: the explicit request for a
1058
+ * content that wants refreshing. A failed refresh paints its problems,
1059
+ * nothing rejects: there is no caller to reject towards.
1060
+ */
1061
+ refresh(ref: any): Promise<any[] | undefined> | undefined;
1062
+ set active(v: number);
587
1063
  }
588
- declare class LocalizationModule {
589
- static t(k: any, ...args: any[]): any;
590
- static tl(k: any, args?: any[]): any;
1064
+ /**
1065
+ * An accordion over native details/summary disclosures: the platform carries
1066
+ * the semantics, the keyboard and the toggling, the chrome paints the group.
1067
+ * With the exclusive claim the render assigns one shared name to every panel,
1068
+ * which is the platform's own exclusive grouping: opening one closes the others.
1069
+ */
1070
+ declare class Accordion extends ParsedElement {
1071
+ #private;
1072
+ static slots: boolean;
1073
+ static observed: string[];
1074
+ static template: string;
1075
+ render({ slots }: {
1076
+ slots: any;
1077
+ }): void;
1078
+ get exclusive(): boolean;
1079
+ set exclusive(v: boolean);
1080
+ }
1081
+ /**
1082
+ * A wizard: a progress of steps over one-of-N sections, the homeinsurance
1083
+ * layout distilled. The steps are declared as <step> elements in the steps
1084
+ * slot, the sections as the slotless children, paired in order; each section
1085
+ * may carry a data-step name, which is what move() answers to. The current
1086
+ * step is the aria-current=step claim, carried in lockstep by the step and
1087
+ * its section: the chrome (including which section is shown) follows the
1088
+ * claim alone, so the markup state and the style can never disagree. The
1089
+ * progress chrome shows the current step alone by default; the progress
1090
+ * attribute picks another shape over the same claims (timeline, dots, none).
1091
+ * Entering a section
1092
+ * fires the section:requested family on it and awaits the answers, so a
1093
+ * section can deliver itself asynchronously; move() resolves when the entered
1094
+ * section is painted, and rejects when its delivery fails.
1095
+ */
1096
+ declare class Wizard extends ParsedElement {
1097
+ #private;
1098
+ static slots: boolean;
1099
+ static observed: string[];
1100
+ static template: string;
1101
+ render({ slots }: {
1102
+ slots: any;
1103
+ }): void;
1104
+ get index(): number;
1105
+ get step(): any;
1106
+ get progress(): any;
1107
+ set progress(v: any);
1108
+ next(): Promise<any[] | undefined> | undefined;
1109
+ prev(): Promise<any[] | undefined> | undefined;
1110
+ move(ref: any): Promise<any[] | undefined> | undefined;
1111
+ /**
1112
+ * Re-fires the section:requested family on the named section (or the
1113
+ * section element itself), whether active or not: the explicit request for a
1114
+ * content that wants refreshing. A failed refresh paints its problems,
1115
+ * nothing rejects: move() stays the rejecting call.
1116
+ */
1117
+ refresh(ref: any): Promise<any[] | undefined> | undefined;
591
1118
  }
1119
+ /**
1120
+ * Registers everything ful provides on a registry: the elements, the loader
1121
+ * components, an http client, and the translations for the configured
1122
+ * language. A page calls `registry.plugin(new Plugin({…})).configure()` once.
1123
+ */
592
1124
  declare class Plugin {
1125
+ #private;
1126
+ /**
1127
+ * @param {{ language?: string, translations?: Record<string, any>, httpClient?: any }} [options]
1128
+ * `language` is fixed for the page: a full BCP-47 tag or a primary subtag,
1129
+ * defaulting to the browser's language. `translations` is a flat
1130
+ * active-language map applied over the built-in translations: reword built-in
1131
+ * keys ('pagination.showing', …) or add your own ('checkout.total', …).
1132
+ * `httpClient` is the client every ful component fetches through, registered
1133
+ * as the `http-client` component: where an unauthorized session goes is an
1134
+ * application decision, so a page that does not want the default's redirect
1135
+ * to '/' builds its own.
1136
+ */
1137
+ constructor(options?: {
1138
+ language?: string;
1139
+ translations?: Record<string, any>;
1140
+ httpClient?: any;
1141
+ });
593
1142
  configure(registry: any): void;
594
1143
  }
595
- export { AsyncEvents, Bindings, Checkbox, Dropdown, Form, FormLoader, Input, InputFile, InputInstant, InputLocalDate, InputLocalTime, Instant, InstantFilter, LocalDate, LocalDateFilter, LocalStorage, LocalizationModule, Pagination, Plugin, RadioGroup, Select, SelectLoader, SessionStorage, SortButton, Spinner, Table, TableSchemaParser, TextFilter, Timing, VersionedLocalStorage, VersionedSessionStorage };
1144
+ export { Accordion, AsyncEvents, Bindings, BooleanFilter, Checkbox, Claims, CompareFilter, Dialog, Drawer, Dropdown, Field, Form, FormLoader, Input, InputFile, InputInstant, InputLocalDate, InputLocalTime, Instant, InstantFilter, LocalDate, LocalDateFilter, LocalStorage, NumberFilter, Pagination, Plugin, RadioGroup, Select, SelectLoader, SessionStorage, SortButton, Table, TableLoader, TableSchemaParser, Tabs, TextFilter, Timing, Toasts, Tooltip, VersionedLocalStorage, VersionedSessionStorage, Wizard };
596
1145
 
597
1146
  export as namespace ful;