strata-react 1.0.45 → 1.0.47
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/README.md +3 -3
- package/UPGRADING.md +4 -0
- package/dist/components/conversation.d.ts +14 -0
- package/dist/components/markable-text.d.ts +7 -3
- package/dist/components/selectable-grid.d.ts +17 -5
- package/dist/components/tile-grid.d.ts +9 -1
- package/dist/components/transcript-view.d.ts +16 -5
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1785 -1371
- package/dist/index.js.map +1 -1
- package/dist/lib/grouped-grid-layout.d.ts +30 -0
- package/dist/lib/transcript.d.ts +9 -0
- package/package.json +1 -1
|
@@ -6,6 +6,36 @@ export declare const groupKey: (group: string) => string;
|
|
|
6
6
|
export declare const isGroupKey: (key: unknown) => key is string;
|
|
7
7
|
/** The height of a group's heading row, in px. */
|
|
8
8
|
export declare const HEADER_HEIGHT = 40;
|
|
9
|
+
/** One picture to place in a justified row: its width over height, known before it loads. */
|
|
10
|
+
export type JustifyItem = {
|
|
11
|
+
key: string;
|
|
12
|
+
aspect: number;
|
|
13
|
+
};
|
|
14
|
+
/** Where `justifyRows` put a picture, relative to the row's left edge, and the height of the picture's row. */
|
|
15
|
+
export type Justified = {
|
|
16
|
+
key: string;
|
|
17
|
+
x: number;
|
|
18
|
+
width: number;
|
|
19
|
+
row: number;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Rows of equal height, each picture at its own shape (Google Photos, Lightroom): fill a row with
|
|
23
|
+
* pictures at the target height `rowHeight` until it is full, then scale the row's height so it spans
|
|
24
|
+
* `width` exactly. The last row of a run keeps the target height rather than stretching, so a short
|
|
25
|
+
* run does not become giant pictures. `padding` is each tile's own padding and border, added to
|
|
26
|
+
* every tile's width on top of the picture (the picture is `aspect` times the row's height). Returns
|
|
27
|
+
* the placements and each row's picture height.
|
|
28
|
+
*/
|
|
29
|
+
export declare function justifyRows(items: readonly JustifyItem[], width: number, rowHeight: number, gap: number, padding: number): {
|
|
30
|
+
placed: Justified[];
|
|
31
|
+
heights: number[];
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* The copy of the heading to draw at the top of the visible area, or null when the real one is already
|
|
35
|
+
* there. It is the last heading at or above `top`, moved to `top`, but never lower than the next
|
|
36
|
+
* heading's top less its own height, so the next heading pushes it up as it arrives.
|
|
37
|
+
*/
|
|
38
|
+
export declare function stuckHeader<H extends LayoutInfo>(headers: readonly H[], top: number): LayoutInfo | null;
|
|
9
39
|
/** `GridLayout` with full-width group headings (items keyed by `groupKey`) that stay at the top of the scroll box while their group is in view. */
|
|
10
40
|
export declare class GroupedGridLayout<T = unknown> extends GridLayout<T> {
|
|
11
41
|
private headers;
|
package/dist/lib/transcript.d.ts
CHANGED
|
@@ -7,7 +7,16 @@ export type TranscriptWord = {
|
|
|
7
7
|
confidence?: number;
|
|
8
8
|
/** The recogniser's own verdict, when it gives one instead of a number. Wins over `confidence`. */
|
|
9
9
|
doubtful?: boolean;
|
|
10
|
+
/** The word was corrected by a person: what the recogniser heard (shown on hover) and who changed it. Drawn as a dotted underline in the primary colour, and said to a screen reader. */
|
|
11
|
+
correction?: {
|
|
12
|
+
original: string;
|
|
13
|
+
by?: string;
|
|
14
|
+
};
|
|
10
15
|
};
|
|
16
|
+
/** The id of a word for marking (`TranscriptView`'s `marking`, `Mark`): its phrase and its place in it. */
|
|
17
|
+
export declare const wordId: (phraseId: string, index: number) => string;
|
|
18
|
+
/** The phrase an id made by `wordId` belongs to. */
|
|
19
|
+
export declare const phraseOfWordId: (id: string) => string;
|
|
11
20
|
/** A mark an app puts on a phrase ("Not sung", "Not a lyric"): a word, always, and the tone it is drawn in. */
|
|
12
21
|
export type TranscriptPhraseState = {
|
|
13
22
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "strata-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.47",
|
|
4
4
|
"description": "React + Tailwind v4 components that ship structure, behaviour, states and a token contract, and no look: each product brings a theme generated from its own subject.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|