@umriss-ui/core 0.42.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/de.d.ts CHANGED
@@ -21,6 +21,13 @@ declare interface Formats {
21
21
  * exactly that many places.
22
22
  */
23
23
  number: (n: number, decimals?: number) => string;
24
+ /**
25
+ * A number written with Intl's own options in the set's locale: a currency,
26
+ * a year without grouping, scientific notation. Pure Intl options - the
27
+ * `decimals` shorthand is expanded by `writeNumber` before it. Like the
28
+ * others it writes no negative zero unless the options set `signDisplay`.
29
+ */
30
+ numberWith: (n: number, options: Intl.NumberFormatOptions) => string;
24
31
  /**
25
32
  * A count. Kept apart from `number` because it makes a different promise: a
26
33
  * count is whole, and Intl's own rounding (at most three decimal places) is
@@ -0,0 +1,80 @@
1
+ function l(n, i, o) {
2
+ if (o === "percent") return n.percent(i);
3
+ if (o === "count") return n.count(i);
4
+ if (o === void 0) return n.number(i);
5
+ const { decimals: a, ...u } = o;
6
+ return Object.keys(u).length === 0 ? n.number(i, a) : n.numberWith(
7
+ i,
8
+ a === void 0 ? u : { minimumFractionDigits: a, maximumFractionDigits: a, ...u }
9
+ );
10
+ }
11
+ const w = 10, b = [
12
+ ["day", 86400],
13
+ ["hour", 3600],
14
+ ["minute", 60]
15
+ ];
16
+ function N(n) {
17
+ const i = new Intl.DateTimeFormat(n, { day: "2-digit", month: "2-digit", year: "numeric" }), o = new Intl.DateTimeFormat(n, { day: "2-digit", month: "2-digit" }), a = new Intl.DateTimeFormat(n, { month: "long", year: "numeric" }), u = new Intl.DateTimeFormat(n, {
18
+ weekday: "long",
19
+ day: "numeric",
20
+ month: "long",
21
+ year: "numeric"
22
+ }), c = { hour: "2-digit", minute: "2-digit", hour12: !1, hourCycle: "h23" }, f = {
23
+ without: new Intl.DateTimeFormat(n, c),
24
+ with: new Intl.DateTimeFormat(n, { ...c, second: "2-digit" })
25
+ }, F = {
26
+ without: new Intl.DateTimeFormat(n, { day: "2-digit", month: "2-digit", year: "numeric", ...c }),
27
+ with: new Intl.DateTimeFormat(n, {
28
+ day: "2-digit",
29
+ month: "2-digit",
30
+ year: "numeric",
31
+ ...c,
32
+ second: "2-digit"
33
+ })
34
+ }, T = new Intl.DateTimeFormat(n, { timeZoneName: "shortOffset" }), d = /* @__PURE__ */ new Map(), s = { signDisplay: "negative" }, g = /* @__PURE__ */ new Map(), D = new Intl.NumberFormat(n, { ...s, notation: "scientific", maximumSignificantDigits: 10 }), y = new Intl.NumberFormat(n, s), I = new Intl.NumberFormat(n, { ...s, style: "percent", maximumFractionDigits: 0 }), p = new Intl.Collator(n), h = new Intl.RelativeTimeFormat(n, { numeric: "auto" });
35
+ return {
36
+ date: (t) => i.format(t),
37
+ dateShort: (t) => o.format(t),
38
+ month: (t) => a.format(t),
39
+ dateLong: (t) => u.format(t),
40
+ time: (t, e) => (e ? f.with : f.without).format(t),
41
+ dateTime: (t, e) => (e ? F.with : F.without).format(t),
42
+ offset: (t) => T.formatToParts(t).find((e) => e.type === "timeZoneName")?.value ?? "",
43
+ number: (t, e) => {
44
+ if (e === void 0 && t !== 0 && Math.abs(t) < 0.5 * 10 ** -w) return D.format(t);
45
+ let r = d.get(e);
46
+ return r || (r = new Intl.NumberFormat(n, {
47
+ ...s,
48
+ minimumFractionDigits: e,
49
+ maximumFractionDigits: e ?? w
50
+ }), d.set(e, r)), r.format(t);
51
+ },
52
+ numberWith: (t, e) => {
53
+ const r = JSON.stringify(e);
54
+ let m = g.get(r);
55
+ return m || (m = new Intl.NumberFormat(n, { ...s, ...e }), g.set(r, m)), m.format(t);
56
+ },
57
+ count: (t) => y.format(t),
58
+ percent: (t) => I.format(t),
59
+ compareText: (t, e) => p.compare(t, e),
60
+ relative: (t) => {
61
+ const e = Math.max(0, Math.round(t / 1e3));
62
+ for (const [r, m] of b)
63
+ if (e >= m) return h.format(-Math.floor(e / m), r);
64
+ return h.format(-e, "second");
65
+ }
66
+ };
67
+ }
68
+ const S = N("en-GB");
69
+ function v(n) {
70
+ const i = [...n.number(1234.5, 1).replace(/[\d-]/g, "")], o = i[i.length - 1] ?? ".";
71
+ return { group: i.length > 1 ? i[0] : "", decimal: o };
72
+ }
73
+ const A = v(S);
74
+ export {
75
+ S as D,
76
+ A as a,
77
+ N as f,
78
+ v as s,
79
+ l as w
80
+ };
package/dist/index.d.ts CHANGED
@@ -7,6 +7,9 @@ import { ElementType } from 'react';
7
7
  import { HTMLAttributes } from 'react';
8
8
  import { InputHTMLAttributes } from 'react';
9
9
  import { JSX } from 'react';
10
+ import { KeyboardEvent as KeyboardEvent_2 } from 'react';
11
+ import { MouseEvent as MouseEvent_2 } from 'react';
12
+ import { PointerEvent as PointerEvent_2 } from 'react';
10
13
  import { ReactElement } from 'react';
11
14
  import { ReactNode } from 'react';
12
15
  import { ReactPortal } from 'react';
@@ -319,7 +322,7 @@ export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInpu
319
322
  export declare function ClockGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
320
323
 
321
324
  /** A searchable select field (the combobox pattern with a listbox panel). */
322
- export declare function Combobox<T extends string = string>({ ref, options, value, onChange, placeholder, size: ownSize, chars, disabled, invalid, emptyText, clearable, className, style, onKeyDown, onKeyDownCapture, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...rest }: ComboboxProps<T>): JSX.Element;
325
+ export declare function Combobox<T extends string = string>({ ref, options, value, onChange, placeholder, size: ownSize, chars, disabled, invalid, emptyText, clearable, className, style, id, onKeyDown, onClick, onBlur, ...rest }: ComboboxProps<T>): JSX.Element;
323
326
 
324
327
  /** One possibility of a `Combobox`: the value it stands for and the label it
325
328
  is found by. */
@@ -334,7 +337,7 @@ export declare interface ComboboxOption<T extends string = string> {
334
337
  }
335
338
 
336
339
  /** The props of `Combobox`. */
337
- export declare interface ComboboxProps<T extends string = string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
340
+ export declare interface ComboboxProps<T extends string = string> extends Omit<HTMLAttributes<HTMLInputElement>, "onChange" | "defaultValue">, RefProp<HTMLInputElement> {
338
341
  /** The possibilities, in their natural order. Filtered while typing; never
339
342
  reordered. */
340
343
  options: readonly ComboboxOption<T>[];
@@ -478,36 +481,60 @@ export declare interface ConfirmDialogProps extends Omit<DialogHTMLAttributes<HT
478
481
 
479
482
  /**
480
483
  * A menu that opens at a point instead of under a trigger – for a right-click
481
- * on something that is not a button: a canvas, a row, a subtask.
484
+ * on something that is not a button: a canvas, a row, a subtask. Open it with
485
+ * `useContextMenuTrigger`, which also covers the context-menu key and a long
486
+ * press, the only way on iOS.
482
487
  *
483
488
  * It hangs from an invisible anchor that stands at the point, so the one
484
489
  * popover does the placing, the dismissal and the portal. The focus goes to
485
490
  * the first entry and, on closing, back to where it was when the menu opened.
486
491
  */
487
- export declare function ContextMenu({ open, onOpenChange, position, ariaLabel, children }: ContextMenuProps): JSX.Element;
492
+ export declare function ContextMenu({ open, onOpenChange, position, ariaLabel, "aria-label": name, children }: ContextMenuProps): JSX.Element;
488
493
 
489
- /** The props of `ContextMenu`. */
490
- export declare interface ContextMenuProps {
494
+ declare interface ContextMenuBase {
495
+ /** Accessible name of the menu: what it acts on. A context menu has no
496
+ trigger whose label could name it. */
497
+ "aria-label"?: string;
491
498
  /** Whether the menu stands. Controlled, like `Popover`: a right-click
492
499
  opens it only because the caller says so. */
493
500
  open: boolean;
494
501
  /** Reports every wish to change the state – an entry chosen, Escape, an
495
502
  outside click. */
496
503
  onOpenChange: (open: boolean) => void;
497
- /** Where the menu opens, in client coordinates – typically `clientX` and
498
- `clientY` of the event that asked for it. At a window edge the panel
504
+ /** Where the menu opens, in client coordinates – the point that
505
+ `useContextMenuTrigger` hands to its callback (right-click, context-menu
506
+ key or long press), or any `clientX` and `clientY` of your own. At a window edge the panel
499
507
  flips and clamps as every popover does. */
500
508
  position: {
501
509
  x: number;
502
510
  y: number;
503
511
  };
504
- /** Accessible name of the menu: what it acts on. A context menu has no
505
- trigger whose label could name it. */
506
- ariaLabel: string;
512
+ /** The old spelling of `aria-label`; both work for one further minor.
513
+ @deprecated since 0.43 - use `aria-label`. */
514
+ ariaLabel?: string;
507
515
  /** The entries – `MenuItem` and `MenuSeparator`, as in `Menu`. */
508
516
  children: ReactNode;
509
517
  }
510
518
 
519
+ /** The props of `ContextMenu`. The menu is named by what it acts on - it has
520
+ no trigger whose label could name it: `aria-label` is required (`ariaLabel`
521
+ stands for one further minor). */
522
+ export declare type ContextMenuProps = ContextMenuBase & ({
523
+ "aria-label": string;
524
+ } | {
525
+ ariaLabel: string;
526
+ });
527
+
528
+ /** What `useContextMenuTrigger` returns: spread it on the target. */
529
+ export declare interface ContextMenuTriggerProps extends LongPressHandlers {
530
+ /** Opens at the pointer on a right-click; a finger's own `contextmenu` is held back. */
531
+ onContextMenu: (event: MouseEvent_2<HTMLElement>) => void;
532
+ /** Opens at the target's box on the context-menu key or Shift+F10. */
533
+ onKeyDown: (event: KeyboardEvent_2<HTMLElement>) => void;
534
+ /** Keeps the system from selecting text or showing its callout under the held finger. */
535
+ style: CSSProperties;
536
+ }
537
+
511
538
  /** The two heights of a control: `sm` for a toolbar and dense forms, `md`
512
539
  otherwise. */
513
540
  export declare type ControlSize = "sm" | "md";
@@ -525,6 +552,15 @@ export declare interface ControlSizeProviderProps {
525
552
  children: ReactNode;
526
553
  }
527
554
 
555
+ /**
556
+ * The one long-press detector, a plain function over pointer events so that
557
+ * code outside React can use it. `onPress` fires once, with the finger's point
558
+ * in client coordinates, when a touch pointer has been held 500 ms within 10 px;
559
+ * `onEnd` fires when a press that has fired is lifted or cancelled. A move
560
+ * beyond 10 px, a lift and `pointercancel` before the hold cancel it silently.
561
+ */
562
+ export declare function createLongPress(onPress: (at: PressPoint) => void, onEnd?: () => void): LongPress;
563
+
528
564
  /** The cross that clears a field, removes a tag or a chip, and closes a
529
565
  dialog, a toast or an alert - one drawing at the size of its place. */
530
566
  export declare function CrossGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
@@ -537,7 +573,7 @@ export declare function DatePicker({ ref, value, onChange, placeholder, disabled
537
573
  * midnight (resolution "day"). There is no path that delivers a time of day
538
574
  * along with it.
539
575
  */
540
- export declare interface DatePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue">, RefProp<HTMLSpanElement> {
576
+ export declare interface DatePickerProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue">, RefProp<HTMLButtonElement> {
541
577
  /** The day, as a `Date` on local midnight; `null` means none. */
542
578
  value: Date | null;
543
579
  /** Runs as soon as a day is settled - on a click in the grid, on "Today" and
@@ -595,7 +631,7 @@ export declare function DateRangePicker({ ref, value, onChange, placeholder, dis
595
631
  * never lies after `to` - a range dragged backwards is silently turned around.
596
632
  * Both ends count inclusively. There is no error state.
597
633
  */
598
- export declare interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue">, RefProp<HTMLSpanElement> {
634
+ export declare interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue">, RefProp<HTMLButtonElement> {
599
635
  /** The time span, both ends on local midnight and both inclusive; `null`
600
636
  means none. */
601
637
  value: DateRange | null;
@@ -644,7 +680,7 @@ export declare function DateTimePicker({ ref, value, onChange, withSeconds, plac
644
680
  * panel applies (the default being the earlier one). A value is reported only
645
681
  * with "Apply", "Now" or "Clear", not already on the click on a day.
646
682
  */
647
- export declare interface DateTimePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue">, RefProp<HTMLSpanElement> {
683
+ export declare interface DateTimePickerProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue">, RefProp<HTMLButtonElement> {
648
684
  /** The instant; `null` means none. */
649
685
  value: Date | null;
650
686
  /** Runs only on completion - "Apply", "Now" or "Clear" - and not already on
@@ -703,7 +739,7 @@ export declare function DateTimeRangePicker({ ref, value, onChange, withSeconds,
703
739
  * the daylight-saving change the same reservation holds as for the
704
740
  * DateTimePicker, separately per end of the range.
705
741
  */
706
- export declare interface DateTimeRangePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue">, RefProp<HTMLSpanElement> {
742
+ export declare interface DateTimeRangePickerProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue">, RefProp<HTMLButtonElement> {
707
743
  /** The time span with times at both ends; `null` means none. */
708
744
  value: DateRange | null;
709
745
  /** Runs only on "Apply" and on clearing (`null`), never between the two
@@ -891,6 +927,13 @@ export declare interface Formats {
891
927
  * exactly that many places.
892
928
  */
893
929
  number: (n: number, decimals?: number) => string;
930
+ /**
931
+ * A number written with Intl's own options in the set's locale: a currency,
932
+ * a year without grouping, scientific notation. Pure Intl options - the
933
+ * `decimals` shorthand is expanded by `writeNumber` before it. Like the
934
+ * others it writes no negative zero unless the options set `signDisplay`.
935
+ */
936
+ numberWith: (n: number, options: Intl.NumberFormatOptions) => string;
894
937
  /**
895
938
  * A count. Kept apart from `number` because it makes a different promise: a
896
939
  * count is whole, and Intl's own rounding (at most three decimal places) is
@@ -1177,6 +1220,36 @@ export declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElemen
1177
1220
  external?: boolean;
1178
1221
  }
1179
1222
 
1223
+ /** A press detector over pointer events; see `createLongPress`. */
1224
+ export declare interface LongPress {
1225
+ /** Arms the press when the pointer is a finger; a mouse and a pen never press. */
1226
+ pointerDown(event: PressPointer): void;
1227
+ /** Cancels a press that is not yet held once the finger has left its 10 px. */
1228
+ pointerMove(event: PressPointer): void;
1229
+ /** Ends a press: a held one calls `onEnd`, and its click is then swallowed. */
1230
+ pointerUp(): void;
1231
+ /** As `pointerUp`, for `pointercancel`. */
1232
+ pointerCancel(): void;
1233
+ /** Whether this click belongs to a press and must not reach the target: true
1234
+ once for the click that ends a held press. Call `preventDefault` and
1235
+ `stopPropagation` on the event when it is. */
1236
+ swallows(): boolean;
1237
+ /** Whether the last pointer was a finger - the `contextmenu` of such a
1238
+ pointer is the press's, not a right-click. */
1239
+ touching(): boolean;
1240
+ /** Drops the timer. Call it when the target goes away. */
1241
+ dispose(): void;
1242
+ }
1243
+
1244
+ /** The handlers of a press, to spread on the pressed element. */
1245
+ declare interface LongPressHandlers {
1246
+ onPointerDown: (event: PointerEvent_2<HTMLElement>) => void;
1247
+ onPointerMove: (event: PointerEvent_2<HTMLElement>) => void;
1248
+ onPointerUp: (event: PointerEvent_2<HTMLElement>) => void;
1249
+ onPointerCancel: (event: PointerEvent_2<HTMLElement>) => void;
1250
+ onClickCapture: (event: MouseEvent_2<HTMLElement>) => void;
1251
+ }
1252
+
1180
1253
  /** Measuring: a line with two end marks. Not a ruler with a scale: the teeth
1181
1254
  would be a grey stripe at ten nominal units. */
1182
1255
  export declare function MeasureGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
@@ -1309,7 +1382,7 @@ export declare type ModalSize = "sm" | "md" | "lg";
1309
1382
  * "selected" scope, rows that have been unticked stay visible until the scope
1310
1383
  * changes, so that nothing jumps away from under the mouse pointer.
1311
1384
  */
1312
- export declare function MultiSelect<T extends string = string>({ ref, options, value, onChange, placeholder, searchPlaceholder, emptyText, size: ownSize, chars, disabled, invalid, clearable, className, style, onClick, onKeyDown, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...rest }: MultiSelectProps<T>): JSX.Element;
1385
+ export declare function MultiSelect<T extends string = string>({ ref, options, value, onChange, placeholder, searchPlaceholder, emptyText, size: ownSize, chars, disabled, invalid, clearable, className, style, id, onClick, ...rest }: MultiSelectProps<T>): JSX.Element;
1313
1386
 
1314
1387
  /** One possibility of a `MultiSelect`: the value it stands for and its label. */
1315
1388
  export declare interface MultiSelectOption<T extends string = string> {
@@ -1323,7 +1396,7 @@ export declare interface MultiSelectOption<T extends string = string> {
1323
1396
  }
1324
1397
 
1325
1398
  /** The props of `MultiSelect`. */
1326
- export declare interface MultiSelectProps<T extends string = string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
1399
+ export declare interface MultiSelectProps<T extends string = string> extends Omit<HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue">, RefProp<HTMLButtonElement> {
1327
1400
  /** The possibilities, in their natural order. The list never re-sorts –
1328
1401
  not even in the "selected" scope. */
1329
1402
  options: readonly MultiSelectOption<T>[];
@@ -1381,6 +1454,9 @@ export declare interface NodeReader<K, S extends Key = string> {
1381
1454
  matches?: (node: K) => boolean;
1382
1455
  }
1383
1456
 
1457
+ /** How a number is written: a share, a count, or Intl's options. */
1458
+ export declare type NumberFormat = "percent" | "count" | NumberOptions;
1459
+
1384
1460
  /**
1385
1461
  * Number input in the notation of the formats (`useFormats`): its decimal and
1386
1462
  * group separators are read and written, the group separators set on leaving
@@ -1391,7 +1467,7 @@ export declare interface NodeReader<K, S extends Key = string> {
1391
1467
  * present on hover or focus. Holding one down repeats the step (a short
1392
1468
  * run-up, then briskly); min/max disable the respective button.
1393
1469
  */
1394
- export declare function NumberInput({ ref, value, onChange, min, max, step, decimals, prefix, suffix, size: ownSize, chars, invalid, disabled, className, style, id, onFocus, onBlur, onKeyDown, ...rest }: NumberInputProps): JSX.Element;
1470
+ export declare function NumberInput({ ref, value, onChange, min, max, step, decimals, grouping, prefix, suffix, size: ownSize, chars, invalid, disabled, className, style, id, onFocus, onBlur, onKeyDown, ...rest }: NumberInputProps): JSX.Element;
1395
1471
 
1396
1472
  /** The props of `NumberInput`: a native input's attributes, with the value a
1397
1473
  number or `null`. */
@@ -1415,6 +1491,10 @@ export declare interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLI
1415
1491
  step?: number;
1416
1492
  /** Fixed decimal places; 0 = whole numbers, undefined = free. */
1417
1493
  decimals?: number;
1494
+ /** Group separators in the text: `false` writes none ("2024"), and the
1495
+ field still reads what it writes.
1496
+ @default true */
1497
+ grouping?: boolean;
1418
1498
  /** Adornment before the number, e.g. "±". */
1419
1499
  prefix?: ReactNode;
1420
1500
  /** Adornment after the number, e.g. "€" or "%". */
@@ -1433,6 +1513,12 @@ export declare interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLI
1433
1513
  invalid?: boolean;
1434
1514
  }
1435
1515
 
1516
+ /** Intl's number options, plus `decimals`: the shorthand for the minimum and the
1517
+ maximum fraction digits. An Intl digit option given beside it wins. */
1518
+ export declare type NumberOptions = Intl.NumberFormatOptions & {
1519
+ decimals?: number;
1520
+ };
1521
+
1436
1522
  /** The plus of `NumberInput`'s step buttons. */
1437
1523
  export declare function PlusGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
1438
1524
 
@@ -1451,7 +1537,7 @@ export declare function PlusGlyph({ ref, size, ...rest }: GlyphProps): JSX.Eleme
1451
1537
  * elements in the panel inherit the field id of the trigger, and a click on
1452
1538
  * their label closes the panel.
1453
1539
  */
1454
- export declare function Popover({ open, onOpenChange, anchorRef, focusRef, insideRefs, align, offset, width, minWidth, restoreFocus, hideOnScroll, role, ariaLabel, id, className, children, }: PopoverProps): ReactPortal | null;
1540
+ export declare function Popover({ open, onOpenChange, anchorRef, focusRef, insideRefs, align, offset, width, minWidth, restoreFocus, hideOnScroll, role, ariaLabel, "aria-label": name, id, className, children, }: PopoverProps): ReactPortal | null;
1455
1541
 
1456
1542
  /** The props of `Popover`. */
1457
1543
  export declare interface PopoverProps {
@@ -1488,6 +1574,9 @@ export declare interface PopoverProps {
1488
1574
  role?: "dialog" | "listbox" | "menu" | "tooltip";
1489
1575
  /** Accessible name of the surface. Needed as soon as it carries a `role`:
1490
1576
  a named role without a name is a riddle for a screen reader. */
1577
+ "aria-label"?: string;
1578
+ /** The old spelling of `aria-label`; both work for one further minor.
1579
+ @deprecated since 0.43 - use `aria-label`. */
1491
1580
  ariaLabel?: string;
1492
1581
  /** Fixed id of the surface – for `aria-controls` on the trigger. */
1493
1582
  id?: string;
@@ -1506,6 +1595,19 @@ export declare interface PopoverProps {
1506
1595
  */
1507
1596
  export declare type PortalTarget = HTMLElement | (() => HTMLElement | null) | null;
1508
1597
 
1598
+ /** Where the finger stands, in client coordinates. */
1599
+ export declare interface PressPoint {
1600
+ x: number;
1601
+ y: number;
1602
+ }
1603
+
1604
+ /** What the detector reads of a pointer event - a DOM or a React one fits. */
1605
+ export declare interface PressPointer {
1606
+ readonly pointerType: string;
1607
+ readonly clientX: number;
1608
+ readonly clientY: number;
1609
+ }
1610
+
1509
1611
  /** How far a task has come, from 0 to 1 - or, without a value, that it runs.
1510
1612
  It has no tone: a measured value judged against limits is a `Meter`. */
1511
1613
  export declare function ProgressBar({ ref, value, label, valueText, showLabel, className, ...rest }: ProgressBarProps): JSX.Element;
@@ -2359,22 +2461,30 @@ export declare interface TreeSnapshot<S extends Key = string> {
2359
2461
  /** The tree as a control: draws the nodes of a `Tree` from `useTree` as a
2360
2462
  `tree` with keyboard navigation, typeahead and, with `checkable`, ticks.
2361
2463
  What a node says is yours - `children` renders it. */
2362
- export declare function TreeView<K, S extends Key = string>({ ref, tree, ariaLabel, checkable, children, className, onKeyDown, onFocus, onBlur, onScroll, ...rest }: TreeViewProps<K, S>): JSX.Element;
2464
+ export declare function TreeView<K, S extends Key = string>({ ref, tree, ariaLabel, "aria-label": name, checkable, children, className, onKeyDown, onFocus, onBlur, onScroll, ...rest }: TreeViewProps<K, S>): JSX.Element;
2363
2465
 
2364
- /** The props of `TreeView`. */
2365
- export declare interface TreeViewProps<K, S extends Key = string> extends Omit<HTMLAttributes<HTMLDivElement>, "children">, RefProp<HTMLDivElement> {
2466
+ declare interface TreeViewBase<K, S extends Key = string> extends Omit<HTMLAttributes<HTMLDivElement>, "children">, RefProp<HTMLDivElement> {
2366
2467
  /** The tree from `useTree`. It is the whole state: flattening, active node,
2367
2468
  checks, anchor. The view holds nothing beside it. */
2368
2469
  tree: Tree<K, S>;
2369
- /** Required: the tree is a structure of its own and needs a name. */
2370
- ariaLabel: string;
2371
2470
  /** Show ticks. Without them a tree remains that knows only an active node -
2372
2471
  and no space is kept free for them. */
2373
2472
  checkable?: boolean;
2374
2473
  /** What the node says. */
2375
2474
  children: (entry: FlatteningEntry<K, S>) => ReactNode;
2475
+ /** The old spelling of `aria-label`; both work for one further minor.
2476
+ @deprecated since 0.43 - use `aria-label`. */
2477
+ ariaLabel?: string;
2376
2478
  }
2377
2479
 
2480
+ /** The props of `TreeView`. The tree is a structure of its own and needs a
2481
+ name: `aria-label` is required (`ariaLabel` stands for one further minor). */
2482
+ export declare type TreeViewProps<K, S extends Key = string> = TreeViewBase<K, S> & ({
2483
+ "aria-label": string;
2484
+ } | {
2485
+ ariaLabel: string;
2486
+ });
2487
+
2378
2488
  /** The settings of `UmrissProvider` as the components read them, every value
2379
2489
  filled in. */
2380
2490
  export declare interface UmrissConfig {
@@ -2433,6 +2543,21 @@ export declare interface UmrissProviderProps {
2433
2543
  */
2434
2544
  export declare function useCommandPaletteShortcut(onOpen: () => void): void;
2435
2545
 
2546
+ /**
2547
+ * Opens a `ContextMenu` the same way on every device: on a right-click (at the
2548
+ * pointer), on the context-menu key or Shift+F10 (at the target's box) and on
2549
+ * a long press with a finger (at the finger), which is the only way on iOS.
2550
+ * `open` receives the point to pass on as the menu's `position`.
2551
+ *
2552
+ * Spread the result on the target. It sets `style`, so a caller with a style
2553
+ * of their own merges it: `style={{ ...trigger.style, ...mine }}`. The click
2554
+ * and the `contextmenu` that end a long press do not reach the target.
2555
+ */
2556
+ export declare function useContextMenuTrigger(open: (position: {
2557
+ x: number;
2558
+ y: number;
2559
+ }) => void): ContextMenuTriggerProps;
2560
+
2436
2561
  /** The configured density; without a provider, "comfortable". */
2437
2562
  export declare const useDensity: () => Density;
2438
2563
 
@@ -3131,4 +3256,12 @@ export declare interface Wording {
3131
3256
  calculationNoOperands: string;
3132
3257
  }
3133
3258
 
3259
+ /**
3260
+ * A number as its format says, through the set's own functions - so an
3261
+ * application's replaced `number`, `percent` or `count` is the one called.
3262
+ * No format, or an object with only `decimals`, is `number`; every other
3263
+ * object is `numberWith`.
3264
+ */
3265
+ export declare function writeNumber(formats: Formats, n: number, format?: NumberFormat): string;
3266
+
3134
3267
  export { }
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { f as d } from "../formats-BdlPZDzb.js";
2
+ import { f as d } from "../formats-BccAYWgq.js";
3
3
  const u = d("de-DE"), h = {
4
4
  clearInput: "Eingabe leeren",
5
5
  clearSelection: "Auswahl leeren",