@opencxh/ui-kit 3.137.12 → 3.137.13
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/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1111 -1105
- package/dist/index.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/utils/text.d.ts +20 -0
- package/package.json +1 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { cn, createSizes, createVariants } from './utils/cn';
|
|
|
2
2
|
export { useAnchoredPosition, type AnchoredPositionOptions } from './utils/useAnchoredPosition';
|
|
3
3
|
export { IDENTITY_TONE_COUNT, identityDotClass, identityPlateClass, identityTone, type IdentityTone } from './utils/identity';
|
|
4
4
|
export { catTone, type CatTone } from './utils/catTone';
|
|
5
|
+
export { normalizeText, text } from './utils/text';
|
|
5
6
|
export { MeetingGrid, type MeetingGridProps } from './meeting/MeetingGrid';
|
|
6
7
|
export { ParticipantTile, type ParticipantTileProps } from './meeting/ParticipantTile';
|
|
7
8
|
export { VideoSurface, type VideoSurfaceProps } from './meeting/VideoSurface';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coerce an unknown value to text.
|
|
3
|
+
*
|
|
4
|
+
* Every input component in this kit declares its `value` as `string`, and every
|
|
5
|
+
* one of them is fed straight out of form data, which is `any`. A field whose
|
|
6
|
+
* entity type is numeric therefore arrives as a number — `eylo-voip`'s time
|
|
7
|
+
* rules do exactly that (`interval?: number`, `days?: number[]`) — and the two
|
|
8
|
+
* failure modes are both silent from the type system's side:
|
|
9
|
+
*
|
|
10
|
+
* - a hard `TypeError: (…).trim is not a function` the moment anything calls a
|
|
11
|
+
* string method on it;
|
|
12
|
+
* - a comparison that simply never matches, because `1 === "1"` is false, so a
|
|
13
|
+
* stored option renders as unselected with no error at all.
|
|
14
|
+
*
|
|
15
|
+
* `null` and `undefined` become `""` so callers can treat "absent" and "empty"
|
|
16
|
+
* alike, which is what a text input does anyway.
|
|
17
|
+
*/
|
|
18
|
+
export declare const text: (value: unknown) => string;
|
|
19
|
+
/** {@link text} folded to a comparable key: trimmed and lower-cased. */
|
|
20
|
+
export declare const normalizeText: (value: unknown) => string;
|