@umriss-ui/core 0.32.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -6
- package/README.md +15 -11
- package/dist/core.css +1 -1
- package/dist/core.js +3935 -4262
- package/dist/de.d.ts +6 -73
- package/dist/index.d.ts +58 -310
- package/dist/wording/de.js +5 -42
- package/docs/llms-full.md +227 -941
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -104,6 +104,22 @@ export declare function allBranches<K, S extends Key = string>(roots: readonly K
|
|
|
104
104
|
rotate it by 90 degrees for an open branch. */
|
|
105
105
|
export declare const AngleGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
106
106
|
|
|
107
|
+
/**
|
|
108
|
+
* The library's one voice: says `text` in a polite live region, for what
|
|
109
|
+
* happened without a visible change in the place a reader is at - a copy made,
|
|
110
|
+
* a count after a filter. Use it instead of a region of your own: there is one
|
|
111
|
+
* region, so two announcements never speak over each other.
|
|
112
|
+
*
|
|
113
|
+
* Says `text` once announcements have rested for `ANNOUNCE_REST`; a later call
|
|
114
|
+
* within the rest replaces an earlier one.
|
|
115
|
+
*
|
|
116
|
+
* `at` is the element that speaks. Inside a modal `<dialog>` everything else
|
|
117
|
+
* is inert and a region there is silent, so the region is the dialog's own -
|
|
118
|
+
* the portal target's rule, without the provider's setting: that decides where
|
|
119
|
+
* a surface is laid out, and a region is laid out nowhere.
|
|
120
|
+
*/
|
|
121
|
+
export declare function announce(text: string, at?: Element | null): void;
|
|
122
|
+
|
|
107
123
|
/**
|
|
108
124
|
* What the value is, given the limit set. A pure function of the two.
|
|
109
125
|
*
|
|
@@ -115,9 +131,7 @@ export declare const AngleGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref
|
|
|
115
131
|
* alarm, even where the value lies further beyond the warning.
|
|
116
132
|
*
|
|
117
133
|
* No hysteresis: that would need the previous state, and a function of a
|
|
118
|
-
* single value has none.
|
|
119
|
-
* duplicate; the trailing of an alarm belongs to its lifecycle and not to a
|
|
120
|
-
* bound.
|
|
134
|
+
* single value has none.
|
|
121
135
|
*/
|
|
122
136
|
export declare function assess(value: number | null | undefined, set?: LimitSet): Assessment;
|
|
123
137
|
|
|
@@ -132,10 +146,7 @@ export declare interface Assessment {
|
|
|
132
146
|
excess?: number;
|
|
133
147
|
/** The signed distance from the target. Absent where none is set: no target
|
|
134
148
|
means no deviation, not a deviation of zero.
|
|
135
|
-
|
|
136
|
-
Two fields, because they are two numbers. A single one meaning the one
|
|
137
|
-
thing when a bound is violated and the other otherwise reads well and is
|
|
138
|
-
wrong at three in the morning. */
|
|
149
|
+
*/
|
|
139
150
|
deviation?: number;
|
|
140
151
|
}
|
|
141
152
|
|
|
@@ -306,23 +317,9 @@ export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInpu
|
|
|
306
317
|
indeterminate?: boolean;
|
|
307
318
|
}
|
|
308
319
|
|
|
309
|
-
/**
|
|
310
|
-
* The height the field is allowed to take on. Without an upper bound it
|
|
311
|
-
* grows with its content; with one, up to that many rows and then no
|
|
312
|
-
* further.
|
|
313
|
-
*
|
|
314
|
-
* A line height of 0 is treated as "not measurable yet" (the font has not
|
|
315
|
-
* been loaded), because otherwise the field visibly collapsed while
|
|
316
|
-
* loading.
|
|
317
|
-
*/
|
|
318
|
-
export declare const clampedHeight: (measured: number, lineHeight: number, maxRows: number | undefined) => number;
|
|
319
|
-
|
|
320
320
|
/** A clock face at a quarter past - the time pickers' character. */
|
|
321
321
|
export declare const ClockGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
322
322
|
|
|
323
|
-
/** Closes a branch. Returns the same snapshot where it is closed already. */
|
|
324
|
-
export declare function collapse<S extends Key>(snapshot: TreeSnapshot<S>, key: S): TreeSnapshot<S>;
|
|
325
|
-
|
|
326
323
|
/** A searchable select field (the combobox pattern with a listbox panel). */
|
|
327
324
|
export declare const Combobox: <T extends string = string>(props: ComboboxProps<T> & {
|
|
328
325
|
ref?: ForwardedRef<HTMLDivElement>;
|
|
@@ -547,8 +544,8 @@ export declare const DatePicker: ForwardRefExoticComponent<DatePickerProps & Ref
|
|
|
547
544
|
export declare interface DatePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue"> {
|
|
548
545
|
/** The day, as a `Date` on local midnight; `null` means none. */
|
|
549
546
|
value: Date | null;
|
|
550
|
-
/** Runs as soon as a day is settled - on a click in the grid, on "Today"
|
|
551
|
-
clearing (`null`)
|
|
547
|
+
/** Runs as soon as a day is settled - on a click in the grid, on "Today" and
|
|
548
|
+
on clearing (`null`). Every one of these ways hands out
|
|
552
549
|
local midnight; there is none that delivers a time along with it. */
|
|
553
550
|
onChange: (date: Date | null) => void;
|
|
554
551
|
/** What stands in the empty field. */
|
|
@@ -767,9 +764,8 @@ export declare const DEFAULT_WORDING: Wording;
|
|
|
767
764
|
|
|
768
765
|
/** How densely the library builds. A component with a density of its own
|
|
769
766
|
takes it through `useDensityFor` as the default for its `density` - in
|
|
770
|
-
@umriss-ui/table the table
|
|
771
|
-
the calculation; a compact set of tokens
|
|
772
|
-
B.13. */
|
|
767
|
+
@umriss-ui/table the table, in @umriss-ui/calculation
|
|
768
|
+
the calculation; a compact set of tokens does not exist. */
|
|
773
769
|
export declare type Density = "comfortable" | "compact";
|
|
774
770
|
|
|
775
771
|
/** Where the active node moves: up and down the visible rows, in and out of a
|
|
@@ -789,72 +785,6 @@ export declare interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
789
785
|
label?: ReactNode;
|
|
790
786
|
}
|
|
791
787
|
|
|
792
|
-
/** A strip of tools that lies at an edge of one surface and carries the
|
|
793
|
-
actions for it. It moves to another edge by pointer or keyboard and reports
|
|
794
|
-
the place through `onPlaceChange`; at a side edge it stands upright, where
|
|
795
|
-
there is room. */
|
|
796
|
-
export declare const Dock: ForwardRefExoticComponent<DockProps & RefAttributes<HTMLDivElement>>;
|
|
797
|
-
|
|
798
|
-
/** The outside of the resting place: one of the four edges of the host.
|
|
799
|
-
There is no fifth and no corner. */
|
|
800
|
-
export declare type DockPlace = "top" | "right" | "bottom" | "left";
|
|
801
|
-
|
|
802
|
-
/** The props of `Dock`. */
|
|
803
|
-
export declare interface DockProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
804
|
-
/**
|
|
805
|
-
* The tools - a property and expressly not children.
|
|
806
|
-
*
|
|
807
|
-
* Children would read more flexibly and would cost exactly the one number
|
|
808
|
-
* that is needed: the dock must know how many tools it has in order to answer
|
|
809
|
-
* whether it would have room at a side edge at all - and to answer that
|
|
810
|
-
* before it is there.
|
|
811
|
-
*/
|
|
812
|
-
tools: readonly DockTool[];
|
|
813
|
-
/** Controlled: the dock reports and waits, it does not move itself. */
|
|
814
|
-
place?: DockPlace;
|
|
815
|
-
/** Uncontrolled: the resting place it starts with. */
|
|
816
|
-
defaultPlace?: DockPlace;
|
|
817
|
-
/** Reports the desired resting place. Controlled, the dock moves only once
|
|
818
|
-
`place` follows; uncontrolled it is merely a message. */
|
|
819
|
-
onPlaceChange?: (place: DockPlace) => void;
|
|
820
|
-
/**
|
|
821
|
-
* The mode - the tool the dock stands in. At most one, and without a value
|
|
822
|
-
* NONE is marked: a dock whose tools simply fire has no mode. None is
|
|
823
|
-
* invented either, and none is preset to the first tool - that would be a
|
|
824
|
-
* statement about the state of the application which this component cannot
|
|
825
|
-
* make.
|
|
826
|
-
*/
|
|
827
|
-
mode?: string;
|
|
828
|
-
/**
|
|
829
|
-
* Reported is only what is a CHANGE, and only as long as there is a mode at
|
|
830
|
-
* all: without `mode` there is no change of mode to report, and the taking
|
|
831
|
-
* itself reports `onUse`.
|
|
832
|
-
*/
|
|
833
|
-
onModeChange?: (id: string) => void;
|
|
834
|
-
/** A tool was taken. */
|
|
835
|
-
onUse?: (id: string) => void;
|
|
836
|
-
/** The accessible name of the dock.
|
|
837
|
-
@default the wording's "Tools" */
|
|
838
|
-
label?: string;
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
/** A tool: something one TAKES. That distinguishes it from the candidate of the
|
|
842
|
-
command palette, which one FINDS (CONTEXT.md, "Reaching for a tool"). */
|
|
843
|
-
export declare interface DockTool {
|
|
844
|
-
/** What is reported on taking. */
|
|
845
|
-
id: string;
|
|
846
|
-
/** The name. It reaches the eye through the tooltip and the screen reader
|
|
847
|
-
through the accessible name - it never stands written, because a standing
|
|
848
|
-
dock has no room for text. */
|
|
849
|
-
label: string;
|
|
850
|
-
/** The glyph. Drawn according to `packages/core/docs/glyphs.md`: only `currentColor`. */
|
|
851
|
-
icon: ReactNode;
|
|
852
|
-
/** Shows the tool but does not let it be taken. It stays standing in the
|
|
853
|
-
strip: a dock whose tools come and go grows and shrinks under the hand
|
|
854
|
-
reaching for them. */
|
|
855
|
-
disabled?: boolean;
|
|
856
|
-
}
|
|
857
|
-
|
|
858
788
|
/** A `Modal` that stands at an edge of the window and enters from it - the
|
|
859
789
|
same dialog with the same head, body and foot. Its width is the token
|
|
860
790
|
`--u-drawer-width`. */
|
|
@@ -867,7 +797,7 @@ export declare interface DrawerProps extends Omit<ModalProps, "size"> {
|
|
|
867
797
|
}
|
|
868
798
|
|
|
869
799
|
/** The first key that occurs twice, otherwise null. Two nodes with the same
|
|
870
|
-
key break the cascade and the active node silently -
|
|
800
|
+
key break the cascade and the active node silently - `useTree` reports
|
|
871
801
|
that during development. */
|
|
872
802
|
export declare function duplicateKey<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>): S | null;
|
|
873
803
|
|
|
@@ -887,9 +817,6 @@ export declare interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElem
|
|
|
887
817
|
icon?: ReactNode;
|
|
888
818
|
}
|
|
889
819
|
|
|
890
|
-
/** Opens a branch. Returns the same snapshot where it is open already. */
|
|
891
|
-
export declare function expand<S extends Key>(snapshot: TreeSnapshot<S>, key: S): TreeSnapshot<S>;
|
|
892
|
-
|
|
893
820
|
/** A file field with a drop zone: choose or drop files, and remove them from
|
|
894
821
|
the list again. Nothing is uploaded - that is the application's. */
|
|
895
822
|
export declare const FileInput: ForwardRefExoticComponent<FileInputProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -1026,7 +953,7 @@ export declare interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
1026
953
|
Checkbox. The triggers of the pickers and of the MultiSelect are
|
|
1027
954
|
buttons, on which `aria-required` is not a permitted attribute; there
|
|
1028
955
|
the mark carries it alone. It validates nothing - validation belongs to
|
|
1029
|
-
the caller. */
|
|
956
|
+
the caller (ADR-0060). */
|
|
1030
957
|
required?: boolean;
|
|
1031
958
|
/** Optional: a fixed id for the input element (instead of a generated
|
|
1032
959
|
one). */
|
|
@@ -1080,8 +1007,8 @@ export declare interface FreshnessReading {
|
|
|
1080
1007
|
/** The props of a glyph: an SVG's attributes and its edge length. */
|
|
1081
1008
|
export declare interface GlyphProps extends Omit<SVGProps<SVGSVGElement>, "viewBox" | "children"> {
|
|
1082
1009
|
/**
|
|
1083
|
-
* Edge length in pixels. The default is the size the glyph is
|
|
1084
|
-
*
|
|
1010
|
+
* Edge length in pixels. The default is the size the glyph is drawn at in
|
|
1011
|
+
* the components.
|
|
1085
1012
|
*/
|
|
1086
1013
|
size?: number;
|
|
1087
1014
|
}
|
|
@@ -1112,15 +1039,8 @@ export declare interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
1112
1039
|
gap?: SpaceStep;
|
|
1113
1040
|
}
|
|
1114
1041
|
|
|
1115
|
-
/** The grip a
|
|
1116
|
-
|
|
1117
|
-
the specification draws with the stroke.
|
|
1118
|
-
|
|
1119
|
-
The grooves stand the same way in both orientations of the dock. Turning
|
|
1120
|
-
them with it would be prettier and would need a `rotate()` in a component
|
|
1121
|
-
whose acceptance (ADR-0014, ticket 04) rules exactly that out - a glyph
|
|
1122
|
-
that has to be rotated to be right is one that would be rotated along at
|
|
1123
|
-
the change. */
|
|
1042
|
+
/** The grip a drag is taken by: two grooves. Dots are fill, and point 4 of
|
|
1043
|
+
the specification draws with the stroke. */
|
|
1124
1044
|
export declare const GripGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
1125
1045
|
|
|
1126
1046
|
/** A heading whose level and size are independent: a small heading can still
|
|
@@ -1195,11 +1115,6 @@ declare type Instant = Date | number | null | undefined;
|
|
|
1195
1115
|
/** A node's key, as `reader.key` returns it. */
|
|
1196
1116
|
export declare type Key = string | number;
|
|
1197
1117
|
|
|
1198
|
-
/** The checkable keys between two visible nodes, both ends included and
|
|
1199
|
-
independent of their order. Whatever may not be checked drops out: the
|
|
1200
|
-
gesture does what it can instead of nothing. */
|
|
1201
|
-
export declare function keysBetween<K, S extends Key = string>(flattening: readonly FlatteningEntry<K, S>[], from: S, to: S): S[];
|
|
1202
|
-
|
|
1203
1118
|
/** A complete language: the formats for numbers and dates, and the wording. */
|
|
1204
1119
|
export declare interface Language {
|
|
1205
1120
|
formats: Formats;
|
|
@@ -1235,8 +1150,7 @@ export declare interface LanguageProviderProps extends LanguageOptions {
|
|
|
1235
1150
|
|
|
1236
1151
|
No tolerance band as input. A band is derived - two limits of equal
|
|
1237
1152
|
severity on opposite sides enclose one - and as an input type it would
|
|
1238
|
-
force a `null` on one edge in the one-sided case.
|
|
1239
|
-
case, not the exception. */
|
|
1153
|
+
force a `null` on one edge in the one-sided case. */
|
|
1240
1154
|
export declare interface Limit {
|
|
1241
1155
|
value: number;
|
|
1242
1156
|
side: Side;
|
|
@@ -1246,8 +1160,7 @@ export declare interface Limit {
|
|
|
1246
1160
|
/** The set a value is read against.
|
|
1247
1161
|
|
|
1248
1162
|
The target stands beside the limits and is not one: it is missed, never
|
|
1249
|
-
violated, and it is never the edge of a region.
|
|
1250
|
-
tile turns red for being above target. */
|
|
1163
|
+
violated, and it is never the edge of a region. */
|
|
1251
1164
|
export declare interface LimitSet {
|
|
1252
1165
|
/** In any order; none, one or several. */
|
|
1253
1166
|
limits?: readonly Limit[];
|
|
@@ -1266,7 +1179,7 @@ export declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElemen
|
|
|
1266
1179
|
external?: boolean;
|
|
1267
1180
|
}
|
|
1268
1181
|
|
|
1269
|
-
/** Measuring: a line with two end marks. Not a ruler with a scale
|
|
1182
|
+
/** Measuring: a line with two end marks. Not a ruler with a scale: the teeth
|
|
1270
1183
|
would be a grey stripe at ten nominal units. */
|
|
1271
1184
|
export declare const MeasureGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
1272
1185
|
|
|
@@ -1304,7 +1217,7 @@ export declare interface MenuProps {
|
|
|
1304
1217
|
export declare const MenuSeparator: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
|
|
1305
1218
|
|
|
1306
1219
|
/** Builds a complete instance from the default and a partial value. */
|
|
1307
|
-
export declare function mergeLanguage(
|
|
1220
|
+
export declare function mergeLanguage(options: LanguageOptions | undefined): Language;
|
|
1308
1221
|
|
|
1309
1222
|
/** A narrow fill-level bar, e.g. for utilisation in table cells. */
|
|
1310
1223
|
export declare const Meter: ForwardRefExoticComponent<MeterProps & RefAttributes<HTMLSpanElement>>;
|
|
@@ -1385,16 +1298,6 @@ export declare interface ModalProps extends Omit<DialogHTMLAttributes<HTMLDialog
|
|
|
1385
1298
|
/** The width of a `Modal`. */
|
|
1386
1299
|
export declare type ModalSize = "sm" | "md" | "lg";
|
|
1387
1300
|
|
|
1388
|
-
/**
|
|
1389
|
-
* Move the active node.
|
|
1390
|
-
*
|
|
1391
|
-
* `in` and `out` have two meanings each, and that is intended: one key goes
|
|
1392
|
-
* deeper, no matter whether something has to be opened for it first. Doing
|
|
1393
|
-
* both at once - opening *and* stepping inside - makes the tree impossible to
|
|
1394
|
-
* inspect without expanding it.
|
|
1395
|
-
*/
|
|
1396
|
-
export declare function move<K, S extends Key = string>(flattening: readonly FlatteningEntry<K, S>[], snapshot: TreeSnapshot<S>, direction: Direction): TreeSnapshot<S>;
|
|
1397
|
-
|
|
1398
1301
|
/**
|
|
1399
1302
|
* Multiple selection. The trigger always stays on one line and measures the
|
|
1400
1303
|
* room: as many chips as fit, the rest as a "+N" counter. Chips are removed by
|
|
@@ -1446,8 +1349,8 @@ export declare interface MultiSelectProps<T extends string = string> extends Omi
|
|
|
1446
1349
|
padding and chevron. Given, the field is that wide wherever it stands,
|
|
1447
1350
|
and never wider than its place. Without it the field fills its place,
|
|
1448
1351
|
and is 20 characters wide where the place asks - in a toolbar or a row,
|
|
1449
|
-
room for two short chips and the counter. Either way, choosing and removing
|
|
1450
|
-
do not fit stand as "+N". */
|
|
1352
|
+
room for two short chips and the counter. Either way, choosing and removing
|
|
1353
|
+
values never moves it: the chips that do not fit stand as "+N". */
|
|
1451
1354
|
chars?: number;
|
|
1452
1355
|
/** Locks field and panel. */
|
|
1453
1356
|
disabled?: boolean;
|
|
@@ -1474,9 +1377,7 @@ export declare interface NodeReader<K, S extends Key = string> {
|
|
|
1474
1377
|
it stays navigable (ADR-0005). */
|
|
1475
1378
|
disabled?: (node: K) => boolean;
|
|
1476
1379
|
/** Can this branch have children that are not present? Without an answer:
|
|
1477
|
-
no.
|
|
1478
|
-
against `undefined` would be the kind of distinction that is got wrong
|
|
1479
|
-
more often than right. */
|
|
1380
|
+
no. */
|
|
1480
1381
|
unloaded?: (node: K) => boolean;
|
|
1481
1382
|
/** Does this node match? Given, it filters instead of the search text,
|
|
1482
1383
|
which is then not read - a table matches by its columns and filters,
|
|
@@ -1536,10 +1437,6 @@ export declare interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLI
|
|
|
1536
1437
|
invalid?: boolean;
|
|
1537
1438
|
}
|
|
1538
1439
|
|
|
1539
|
-
/** The keys from the root down to the target, the target included; null if
|
|
1540
|
-
the key does not exist in the data. */
|
|
1541
|
-
export declare function pathTo<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, key: S): S[] | null;
|
|
1542
|
-
|
|
1543
1440
|
/** The plus of `NumberInput`'s step buttons. */
|
|
1544
1441
|
export declare const PlusGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
1545
1442
|
|
|
@@ -1549,15 +1446,14 @@ export declare const PlusGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"
|
|
|
1549
1446
|
* return, travelling along on scroll, stacking order, entrance from its motion
|
|
1550
1447
|
* origin and exit.
|
|
1551
1448
|
*
|
|
1552
|
-
* Two things it takes off the callers' hands
|
|
1553
|
-
* itself before:
|
|
1449
|
+
* Two things it takes off the callers' hands:
|
|
1554
1450
|
*
|
|
1555
1451
|
* - It portals into the nearest <dialog> ancestor of the anchor, otherwise
|
|
1556
|
-
* into the body. A menu in a modal
|
|
1452
|
+
* into the body. A menu in a modal would land behind the dialog otherwise,
|
|
1557
1453
|
* because a portal at the body does not reach the top layer.
|
|
1558
1454
|
* - It resets the FormField context inside the panel. Without that, form
|
|
1559
1455
|
* elements in the panel inherit the field id of the trigger, and a click on
|
|
1560
|
-
* their label closes the panel
|
|
1456
|
+
* their label closes the panel.
|
|
1561
1457
|
*/
|
|
1562
1458
|
export declare function Popover({ open, onOpenChange, anchorRef, focusRef, insideRefs, align, offset, width, minWidth, restoreFocus, hideOnScroll, role, ariaLabel, id, className, children, }: PopoverProps): ReactPortal | null;
|
|
1563
1459
|
|
|
@@ -1699,33 +1595,6 @@ export declare interface RangePreset {
|
|
|
1699
1595
|
range: () => DateRange;
|
|
1700
1596
|
}
|
|
1701
1597
|
|
|
1702
|
-
/**
|
|
1703
|
-
* How many characters still fit. Without a limit there is nothing to
|
|
1704
|
-
* report. Counts the way the browser counts (UTF-16 units, an emoji is
|
|
1705
|
-
* two), so that the display and `maxLength` say the same thing.
|
|
1706
|
-
*
|
|
1707
|
-
* Negative is allowed and intended: a value set from outside does not know
|
|
1708
|
-
* `maxLength`, and then the display is meant to show that.
|
|
1709
|
-
*/
|
|
1710
|
-
export declare const remainingChars: (value: string, maxLength: number | undefined) => number | undefined;
|
|
1711
|
-
|
|
1712
|
-
/**
|
|
1713
|
-
* Expands along a path as far as the data reaches, and reports the deepest
|
|
1714
|
-
* key it got to.
|
|
1715
|
-
*
|
|
1716
|
-
* The path is handed over and not searched for: a deep link knows it, the
|
|
1717
|
-
* data does not know it yet. If the run gets stuck at an unloaded branch,
|
|
1718
|
-
* that branch's key is the answer - and because it is expanded in the
|
|
1719
|
-
* process, it triggers the loading at the same time. The caller loads and
|
|
1720
|
-
* calls again; the same loop it already has for expanding anyway.
|
|
1721
|
-
*
|
|
1722
|
-
* The target itself is not expanded: it is meant to be shown, not opened.
|
|
1723
|
-
*/
|
|
1724
|
-
export declare function revealPath<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>, path: readonly S[]): {
|
|
1725
|
-
snapshot: TreeSnapshot<S>;
|
|
1726
|
-
reached: S | null;
|
|
1727
|
-
};
|
|
1728
|
-
|
|
1729
1598
|
/** What `scrollForRow` needs to know about a scroll area. */
|
|
1730
1599
|
export declare interface RowPlacement {
|
|
1731
1600
|
rowHeight: number;
|
|
@@ -1751,9 +1620,8 @@ export declare interface RowWindow {
|
|
|
1751
1620
|
/**
|
|
1752
1621
|
* The scroll position at which a row is visible - or null where it already is.
|
|
1753
1622
|
*
|
|
1754
|
-
* This is the arithmetic the keyboard handling hangs on
|
|
1755
|
-
* moves into a row that is not rendered
|
|
1756
|
-
* virtualised table that cannot do this is worse than a paged one.
|
|
1623
|
+
* This is the arithmetic the keyboard handling hangs on: without it the focus
|
|
1624
|
+
* moves into a row that is not rendered.
|
|
1757
1625
|
*
|
|
1758
1626
|
* The sticky header counts against the upper edge: a row standing exactly at
|
|
1759
1627
|
* `scrollTop` lies behind it.
|
|
@@ -1859,35 +1727,13 @@ export declare interface Separators {
|
|
|
1859
1727
|
/** The separators a set of formats writes, read off the formats themselves.
|
|
1860
1728
|
|
|
1861
1729
|
A field that formats a number must be able to read its own output back, and
|
|
1862
|
-
an application may have replaced `number` with anything
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
decimal place, digits struck out, and what remains is the notation's own
|
|
1866
|
-
punctuation. */
|
|
1730
|
+
an application may have replaced `number` with anything. So the
|
|
1731
|
+
separators are measured: one number with one decimal place, digits struck
|
|
1732
|
+
out, and what remains is the notation's own punctuation. */
|
|
1867
1733
|
export declare function separatorsOf(formats: Formats): Separators;
|
|
1868
1734
|
|
|
1869
|
-
/** Sets the active node; `null` for none. Returns the same snapshot where
|
|
1870
|
-
nothing changes. */
|
|
1871
|
-
export declare function setActive<S extends Key>(snapshot: TreeSnapshot<S>, key: S | null): TreeSnapshot<S>;
|
|
1872
|
-
|
|
1873
|
-
/** Sets the node a range selection spans from; `null` for none. Returns the
|
|
1874
|
-
same snapshot where nothing changes. */
|
|
1875
|
-
export declare function setAnchor<S extends Key>(snapshot: TreeSnapshot<S>, key: S | null): TreeSnapshot<S>;
|
|
1876
|
-
|
|
1877
|
-
/**
|
|
1878
|
-
* Sets a set of nodes to checked or unchecked - and does not toggle.
|
|
1879
|
-
*
|
|
1880
|
-
* That is the decision which separates a range from a sequence of single
|
|
1881
|
-
* clicks: if it contains a branch *and* one of its children, a sequence of
|
|
1882
|
-
* toggles would touch the child twice and uncheck it again. Every target is
|
|
1883
|
-
* set together with its descendants; afterwards all ancestors of the targets
|
|
1884
|
-
* are reconciled, from the bottom up - and only those.
|
|
1885
|
-
*/
|
|
1886
|
-
export declare function setChecked<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>, targets: readonly S[], on: boolean): TreeSnapshot<S>;
|
|
1887
|
-
|
|
1888
1735
|
/** How seriously a violation weighs: one severity that advises and one that
|
|
1889
|
-
calls for action. Exactly two
|
|
1890
|
-
the screen, and five colours are noise. For a third distinction one sets a
|
|
1736
|
+
calls for action. Exactly two; for a third distinction one sets a
|
|
1891
1737
|
second limit. */
|
|
1892
1738
|
export declare type Severity = "warning" | "alarm";
|
|
1893
1739
|
|
|
@@ -2357,19 +2203,6 @@ export declare function ToastProvider({ children }: {
|
|
|
2357
2203
|
/** How the message turns out; `loading` is a toast still at work. */
|
|
2358
2204
|
export declare type ToastTone = "neutral" | "success" | "warning" | "danger" | "loading";
|
|
2359
2205
|
|
|
2360
|
-
/** Everything checkable on - or empty, if everything is on already. */
|
|
2361
|
-
export declare function toggleAll<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>): TreeSnapshot<S>;
|
|
2362
|
-
|
|
2363
|
-
/**
|
|
2364
|
-
* Toggle a check: cascade downwards, reconcile upwards.
|
|
2365
|
-
*
|
|
2366
|
-
* A single check is a range of one target - which is why the arithmetic
|
|
2367
|
-
* stands there only once, and the direction comes from the same definition of
|
|
2368
|
-
* "full" as in toggleAll. If the node is not checkable or does not exist, the
|
|
2369
|
-
* snapshot stays unchanged.
|
|
2370
|
-
*/
|
|
2371
|
-
export declare function toggleCheck<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>, key: S): TreeSnapshot<S>;
|
|
2372
|
-
|
|
2373
2206
|
/** Appears on hover and keyboard focus; purely descriptive (role="tooltip"). */
|
|
2374
2207
|
export declare function Tooltip({ content, children, delay }: TooltipProps): JSX.Element;
|
|
2375
2208
|
|
|
@@ -2478,9 +2311,8 @@ export declare interface TreeOptions<K, S extends Key = string> {
|
|
|
2478
2311
|
*/
|
|
2479
2312
|
onLoadChildren?: (node: K) => void;
|
|
2480
2313
|
/**
|
|
2481
|
-
* Render only what stands in the scroll area.
|
|
2482
|
-
*
|
|
2483
|
-
* whoever has not ordered it should not have to think about row heights.
|
|
2314
|
+
* Render only what stands in the scroll area. Optional: without it every
|
|
2315
|
+
* row is rendered and no row height is needed.
|
|
2484
2316
|
*/
|
|
2485
2317
|
virtual?: VirtualOptions;
|
|
2486
2318
|
}
|
|
@@ -2534,20 +2366,6 @@ export declare interface TreeViewProps<K, S extends Key = string> extends Omit<H
|
|
|
2534
2366
|
children: (entry: FlatteningEntry<K, S>) => ReactNode;
|
|
2535
2367
|
}
|
|
2536
2368
|
|
|
2537
|
-
/**
|
|
2538
|
-
* The next visible node whose label starts like this - or null.
|
|
2539
|
-
*
|
|
2540
|
-
* A single letter searches **behind** the active node, so that the same
|
|
2541
|
-
* letter pressed twice jumps onwards instead of finding the same node again.
|
|
2542
|
-
* Several letters search **from** the active node, so that refining does not
|
|
2543
|
-
* jump onwards. Both are intended and are the reason why the length of the
|
|
2544
|
-
* prefix matters here.
|
|
2545
|
-
*
|
|
2546
|
-
* At the end it wraps around. Disabled and unloaded nodes are valid targets:
|
|
2547
|
-
* typeahead moves only the focus, and both are navigable.
|
|
2548
|
-
*/
|
|
2549
|
-
export declare function typeaheadTarget<K, S extends Key = string>(flattening: readonly FlatteningEntry<K, S>[], prefix: string, active: S | null): S | null;
|
|
2550
|
-
|
|
2551
2369
|
/** The settings of `UmrissProvider` as the components read them, every value
|
|
2552
2370
|
filled in. */
|
|
2553
2371
|
export declare interface UmrissConfig {
|
|
@@ -2569,7 +2387,7 @@ export declare function UmrissProvider({ density, portalTarget, toast, language,
|
|
|
2569
2387
|
export declare interface UmrissProviderProps {
|
|
2570
2388
|
/**
|
|
2571
2389
|
* The default for the `density` of every component that reads it with
|
|
2572
|
-
* `useDensityFor` - in `@umriss-ui/table` `Table
|
|
2390
|
+
* `useDensityFor` - in `@umriss-ui/table` `Table`, in
|
|
2573
2391
|
* `@umriss-ui/calculation` `Calculation` ("comfortable" means "regular").
|
|
2574
2392
|
*
|
|
2575
2393
|
* @default none - a component keeps its own density
|
|
@@ -2611,8 +2429,7 @@ export declare const useDensity: () => Density;
|
|
|
2611
2429
|
* A component's `density`: its own value, else the density the provider
|
|
2612
2430
|
* explicitly configured, else its own default.
|
|
2613
2431
|
*
|
|
2614
|
-
* "comfortable" means "regular" here. A compact set of tokens does not exist
|
|
2615
|
-
* that is work package B.13; here only what exists is wired up.
|
|
2432
|
+
* "comfortable" means "regular" here. A compact set of tokens does not exist.
|
|
2616
2433
|
*/
|
|
2617
2434
|
export declare function useDensityFor(own: "regular" | "compact" | undefined, fallback: "regular" | "compact"): "regular" | "compact";
|
|
2618
2435
|
|
|
@@ -2670,9 +2487,8 @@ export declare const useUmriss: () => UmrissConfig;
|
|
|
2670
2487
|
* from them.
|
|
2671
2488
|
*
|
|
2672
2489
|
* It is measured on the first rendered row rather than taken from the caller's
|
|
2673
|
-
* value: row height depends on density, font size and zoom, and
|
|
2674
|
-
*
|
|
2675
|
-
* forty thousand pixels.
|
|
2490
|
+
* value: row height depends on density, font size and zoom, and a small error
|
|
2491
|
+
* adds up over many rows to a scrollbar that lies.
|
|
2676
2492
|
*/
|
|
2677
2493
|
export declare function useVirtual(count: number, options: VirtualOptions): VirtualRows;
|
|
2678
2494
|
|
|
@@ -2682,9 +2498,8 @@ export declare const useWording: () => Wording;
|
|
|
2682
2498
|
/** What a value is. Four outcomes, ordered by severity, `unknown` between
|
|
2683
2499
|
`ok` and `warning`: a value nobody has is a reason to look.
|
|
2684
2500
|
|
|
2685
|
-
The fourth outcome is not a `null
|
|
2686
|
-
call site
|
|
2687
|
-
against: a dead data source would look like a healthy service. */
|
|
2501
|
+
The fourth outcome is not a `null`, which would invite `?? "ok"` at the
|
|
2502
|
+
call site: a dead data source would look like a healthy service. */
|
|
2688
2503
|
export declare type Verdict = "ok" | "unknown" | "warning" | "alarm";
|
|
2689
2504
|
|
|
2690
2505
|
/** How heavily a verdict weighs - for sorting and comparing, as when a matrix
|
|
@@ -2842,20 +2657,6 @@ export declare interface Wording {
|
|
|
2842
2657
|
therefore do not stand here; "Esc" is a word and is called something else
|
|
2843
2658
|
elsewhere. */
|
|
2844
2659
|
paletteKeyEsc: string;
|
|
2845
|
-
/** Accessible name of a dock's tools. */
|
|
2846
|
-
dockTools: string;
|
|
2847
|
-
/** Accessible name of the grip - it says what it does, not what it is. */
|
|
2848
|
-
dockGrip: string;
|
|
2849
|
-
/** The four resting places, named. The keys are the `DockPlace` type's, and a
|
|
2850
|
-
register translates them: the German one answers "oben" where the
|
|
2851
|
-
English one answers "top". */
|
|
2852
|
-
dockPlace: (place: "top" | "right" | "bottom" | "left") => string;
|
|
2853
|
-
/** What the screen reader hears once the dock has taken a place. */
|
|
2854
|
-
dockPlaced: (place: string) => string;
|
|
2855
|
-
/** And what it hears when a place has refused. A refusal is not a fault: a
|
|
2856
|
-
wide, flat host with no room for a standing dock is not a mistake anyone
|
|
2857
|
-
made. */
|
|
2858
|
-
dockNoPlace: (place: string) => string;
|
|
2859
2660
|
datePlaceholder: string;
|
|
2860
2661
|
/** Accessible name of the panel. Deliberately kept apart from the
|
|
2861
2662
|
placeholder: whoever labels the field differently does not thereby rename
|
|
@@ -3064,6 +2865,12 @@ export declare interface Wording {
|
|
|
3064
2865
|
entries: (count: number, formatted: string) => string;
|
|
3065
2866
|
/** "3 selected" in the pagination bar and the table toolbar. */
|
|
3066
2867
|
selectedCount: (count: number, formatted: string) => string;
|
|
2868
|
+
/** Said to a screen reader after Ctrl+C copied rows: "3 rows copied". */
|
|
2869
|
+
copiedRows: (count: number, formatted: string) => string;
|
|
2870
|
+
/** Said after Ctrl+C copied the active cell of a grid. */
|
|
2871
|
+
copiedCell: string;
|
|
2872
|
+
/** Said when the clipboard refused or is not there. */
|
|
2873
|
+
copyFailed: string;
|
|
3067
2874
|
/** Empty because there are no rows. */
|
|
3068
2875
|
noEntries: string;
|
|
3069
2876
|
/** Empty because search and filters leave nothing - something else. */
|
|
@@ -3113,65 +2920,6 @@ export declare interface Wording {
|
|
|
3113
2920
|
freshnessDisconnected: string;
|
|
3114
2921
|
/** "As of: 3 minutes ago", where the duration comes from the formats. */
|
|
3115
2922
|
asOfAgo: (duration: string) => string;
|
|
3116
|
-
asOfUnknown: string;
|
|
3117
|
-
alarms: string;
|
|
3118
|
-
noAlarms: string;
|
|
3119
|
-
/** Empty, but the line is down - that is something other than quiet. */
|
|
3120
|
-
noAlarmsDisconnected: string;
|
|
3121
|
-
acknowledgeAlarm: string;
|
|
3122
|
-
/** Bulk acknowledgement; the number stands in the text on purpose. */
|
|
3123
|
-
acknowledgeAlarms: (count: number) => string;
|
|
3124
|
-
/** The alarm list's snooze menu, beside "Acknowledge": the word on its
|
|
3125
|
-
button, and the sentence with the number of alarms it acts on. */
|
|
3126
|
-
snoozeAlarm: string;
|
|
3127
|
-
snoozeAlarms: (count: number) => string;
|
|
3128
|
-
/** The labels in the panel that opens with `snoozeReason`: the duration to
|
|
3129
|
-
choose and the reason to give. The panel's own button is `snoozeAlarm`. */
|
|
3130
|
-
snoozeDuration: string;
|
|
3131
|
-
snoozeReason: string;
|
|
3132
|
-
/** Ends the snooze of the ticked alarms before its time. */
|
|
3133
|
-
unsnoozeAlarm: string;
|
|
3134
|
-
unsnoozeAlarms: (count: number) => string;
|
|
3135
|
-
priorityHigh: string;
|
|
3136
|
-
priorityMedium: string;
|
|
3137
|
-
priorityLow: string;
|
|
3138
|
-
/** The four lifecycle states, written out. */
|
|
3139
|
-
lifecycleActiveUnacknowledged: string;
|
|
3140
|
-
lifecycleActiveAcknowledged: string;
|
|
3141
|
-
lifecycleResolvedUnacknowledged: string;
|
|
3142
|
-
lifecycleResolvedAcknowledged: string;
|
|
3143
|
-
/** "Alarm flood: 12 in quick succession" - a flood is marked, never
|
|
3144
|
-
suppressed. */
|
|
3145
|
-
floodHint: (count: number) => string;
|
|
3146
|
-
/** "40×" on a chattering alarm type. */
|
|
3147
|
-
chatterHint: (count: number) => string;
|
|
3148
|
-
/** The text of the live region: the number of active unacknowledged alarms. */
|
|
3149
|
-
activeUnacknowledged: (count: number) => string;
|
|
3150
|
-
columnAlarm: string;
|
|
3151
|
-
columnLifecycleState: string;
|
|
3152
|
-
columnPriority: string;
|
|
3153
|
-
columnRaised: string;
|
|
3154
|
-
columnDuration: string;
|
|
3155
|
-
columnFrequency: string;
|
|
3156
|
-
/** The two columns of the alarm model the list does not show, but which do
|
|
3157
|
-
land in the column menu and the CSV header (`alarmColumns`). */
|
|
3158
|
-
columnAcknowledgement: string;
|
|
3159
|
-
columnAge: string;
|
|
3160
|
-
/** The availability of an alarm (ISA-18.2's special states), written out.
|
|
3161
|
-
A snooze names its end and who snoozed it - a snooze is tracked, not
|
|
3162
|
-
anonymous; the time comes from the formats. */
|
|
3163
|
-
availabilitySnoozed: (until: string, by: string) => string;
|
|
3164
|
-
/** A snooze as one word - the alarm list's badge; the sentence above stands
|
|
3165
|
-
in its tooltip and in what is spoken. */
|
|
3166
|
-
availabilitySnoozedShort: string;
|
|
3167
|
-
availabilitySuppressed: string;
|
|
3168
|
-
availabilityDisabled: string;
|
|
3169
|
-
/** "Hidden: 3" - the count of the view of snoozed, suppressed and disabled
|
|
3170
|
-
alarms, and its name where the list offers the view as a switch. */
|
|
3171
|
-
hiddenAlarms: (count: number) => string;
|
|
3172
|
-
/** The availability column of the alarm model: the column menu and the CSV
|
|
3173
|
-
header, like the two above. */
|
|
3174
|
-
columnAvailability: string;
|
|
3175
2923
|
close: string;
|
|
3176
2924
|
closeToast: string;
|
|
3177
2925
|
/** The count on the front toast of a closed deck; pressing it shows them all. */
|