@salina-app/media-editor 0.1.40 → 0.1.42
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/components/customs/Transcription/SubComponents/TranscriptHighlight.d.ts +2 -2
- package/dist/components/customs/Transcription/SubComponents/Word.d.ts +5 -1
- package/dist/components/customs/Transcription/TranscriptSegment.d.ts +2 -2
- package/dist/index.js +8 -8
- package/dist/lib/typings/ISegment.d.ts +2 -0
- package/dist/lib/typings/IWord.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IWord } from '../../../../lib/typings/IWord';
|
|
2
|
-
import { OnMoveWordsProps } from './Word';
|
|
2
|
+
import { OnEditWordSaveProps, OnMoveWordsProps } from './Word';
|
|
3
3
|
import { ISegment } from '../../../../lib/typings/ISegment';
|
|
4
4
|
type Props = {
|
|
5
5
|
timestamp_start: string;
|
|
@@ -14,7 +14,7 @@ type Props = {
|
|
|
14
14
|
}[];
|
|
15
15
|
onMoveWords?: (props: OnMoveWordsProps) => void;
|
|
16
16
|
onAddSegment?: (props: OnMoveWordsProps) => void;
|
|
17
|
-
onEditWordSave?: (
|
|
17
|
+
onEditWordSave?: (props: OnEditWordSaveProps) => void;
|
|
18
18
|
onEditComplete?: () => void;
|
|
19
19
|
activeSegment?: ISegment;
|
|
20
20
|
};
|
|
@@ -9,6 +9,10 @@ export interface OnMoveWordsProps {
|
|
|
9
9
|
nextWord?: IWord;
|
|
10
10
|
direction: 'up' | 'down';
|
|
11
11
|
}
|
|
12
|
+
export interface OnEditWordSaveProps {
|
|
13
|
+
wordSegmentIdx: string | number;
|
|
14
|
+
editedWord: string;
|
|
15
|
+
}
|
|
12
16
|
interface WordProps {
|
|
13
17
|
word: IWord;
|
|
14
18
|
activeWord: IWord | null;
|
|
@@ -21,7 +25,7 @@ interface WordProps {
|
|
|
21
25
|
shouldEdit?: boolean;
|
|
22
26
|
onMoveWords?: (props: OnMoveWordsProps) => void;
|
|
23
27
|
onAddSegment?: (props: OnMoveWordsProps) => void;
|
|
24
|
-
onEditWordSave?: (
|
|
28
|
+
onEditWordSave?: (props: OnEditWordSaveProps) => void;
|
|
25
29
|
onEditComplete?: () => void;
|
|
26
30
|
activeSegment?: ISegment;
|
|
27
31
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ISegment } from '../../../lib/typings/ISegment';
|
|
2
2
|
import { IWord } from '../../../lib/typings/IWord';
|
|
3
|
-
import { OnMoveWordsProps } from './SubComponents/Word';
|
|
3
|
+
import { OnMoveWordsProps, OnEditWordSaveProps } from './SubComponents/Word';
|
|
4
4
|
interface SingleTranscriptProps {
|
|
5
5
|
segment: ISegment;
|
|
6
6
|
index?: number;
|
|
@@ -12,7 +12,7 @@ interface SingleTranscriptProps {
|
|
|
12
12
|
shouldEditActiveWord?: boolean;
|
|
13
13
|
onMoveWords?: (props: OnMoveWordsProps) => void;
|
|
14
14
|
onAddSegment?: (props: OnMoveWordsProps) => void;
|
|
15
|
-
onEditWordSave?: (
|
|
15
|
+
onEditWordSave?: (props: OnEditWordSaveProps) => void;
|
|
16
16
|
onEditComplete?: () => void;
|
|
17
17
|
className?: string;
|
|
18
18
|
badge?: React.ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -79462,7 +79462,10 @@ const b1e = ({
|
|
|
79462
79462
|
const ae = pe.currentTarget.innerText.replace(/\n/g, "").replace(/^\s+/, "");
|
|
79463
79463
|
q(ae);
|
|
79464
79464
|
}, he = () => {
|
|
79465
|
-
B(!1), b == null || b(
|
|
79465
|
+
B(!1), b == null || b({
|
|
79466
|
+
wordSegmentIdx: t == null ? void 0 : t.word_segment_idx,
|
|
79467
|
+
editedWord: z
|
|
79468
|
+
}), x == null || x();
|
|
79466
79469
|
}, ue = (pe) => {
|
|
79467
79470
|
pe.key === "Enter" ? (pe.preventDefault(), he()) : pe.key === "Escape" && (B(!1), q(t.timestamp_text), x == null || x());
|
|
79468
79471
|
}, xe = () => {
|
|
@@ -79656,7 +79659,7 @@ const b1e = ({
|
|
|
79656
79659
|
onEditWordSave: h,
|
|
79657
79660
|
onEditComplete: p,
|
|
79658
79661
|
activeSegment: m,
|
|
79659
|
-
shouldEdit: a && (r == null ? void 0 : r._id) === N._id
|
|
79662
|
+
shouldEdit: a && ((r == null ? void 0 : r._id) === N._id || (r == null ? void 0 : r._id) === N.word_segment_idx || (r == null ? void 0 : r.word_segment_idx) === N.word_segment_idx)
|
|
79660
79663
|
},
|
|
79661
79664
|
N._id || `word-${M}`
|
|
79662
79665
|
)), [
|
|
@@ -80165,12 +80168,9 @@ const w1e = Ka(nz), t6 = (t, e, n) => {
|
|
|
80165
80168
|
}
|
|
80166
80169
|
}
|
|
80167
80170
|
}, [h]);
|
|
80168
|
-
const N = ys(
|
|
80169
|
-
|
|
80170
|
-
|
|
80171
|
-
},
|
|
80172
|
-
[]
|
|
80173
|
-
), M = ys(
|
|
80171
|
+
const N = ys(async (j) => {
|
|
80172
|
+
console.log(j);
|
|
80173
|
+
}, []), M = ys(
|
|
80174
80174
|
async ({
|
|
80175
80175
|
segmentId: j,
|
|
80176
80176
|
firstWordId: B,
|