@jswork/react-questkit 1.0.3 → 1.0.5
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 +1207 -919
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +67 -12
- package/dist/index.d.ts +67 -12
- package/dist/index.mjs +1200 -913
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -65,6 +65,8 @@ interface QuestCommonProps {
|
|
|
65
65
|
sound?: boolean;
|
|
66
66
|
/** 演示直达:0 未答 / 1 首错 / 2 二错 */
|
|
67
67
|
demoAttempt?: 0 | 1 | 2;
|
|
68
|
+
/** 嵌入为子分组:隐藏进度 / 说明 / 操作栏,壳层随内容撑开,默认 false */
|
|
69
|
+
bare?: boolean;
|
|
68
70
|
className?: string;
|
|
69
71
|
}
|
|
70
72
|
interface QuestOptionData {
|
|
@@ -115,29 +117,36 @@ interface FollowReadExtraProps {
|
|
|
115
117
|
}) => OralGrade | Promise<OralGrade>;
|
|
116
118
|
onRecordingChange?: (recording: boolean) => void;
|
|
117
119
|
}
|
|
118
|
-
/**
|
|
120
|
+
/** 连线节点类型;旧数据按整列声明,新数据按单项字段推断 */
|
|
119
121
|
type LinkMatchNodeKind = 'text' | 'image' | 'audio';
|
|
120
122
|
interface LinkMatchSideItem {
|
|
121
|
-
/**
|
|
123
|
+
/** 文本内容;文本项必填,图片/音频项可作为兜底或朗读文本 */
|
|
122
124
|
text?: ReactNode;
|
|
123
125
|
phonetic?: ReactNode;
|
|
124
|
-
/**
|
|
126
|
+
/** 图片地址;有 image/art 时按图片项渲染 */
|
|
125
127
|
image?: ImageSource;
|
|
126
128
|
/** 图片加载失败时的替代文案 */
|
|
127
129
|
imageAlt?: string;
|
|
128
130
|
/** 使用内置矢量插画作为图片 */
|
|
129
131
|
art?: ArtName;
|
|
130
132
|
audio?: AudioSource;
|
|
133
|
+
/** @deprecated 连线题不以 speak 触发播放;请使用 audio。 */
|
|
131
134
|
speak?: boolean;
|
|
132
|
-
/**
|
|
135
|
+
/** @deprecated 连线题不以 spokenText 合成语音;请使用 audio。 */
|
|
133
136
|
spokenText?: string;
|
|
134
137
|
}
|
|
135
138
|
interface LinkMatchData {
|
|
136
139
|
left: LinkMatchSideItem[];
|
|
137
140
|
right: LinkMatchSideItem[];
|
|
138
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* 旧数据兼容:整列节点类型。
|
|
143
|
+
* @deprecated 新数据省略;节点类型由单项字段推断,支持同列混排。
|
|
144
|
+
*/
|
|
139
145
|
leftKind?: LinkMatchNodeKind;
|
|
140
|
-
/**
|
|
146
|
+
/**
|
|
147
|
+
* 旧数据兼容:整列节点类型。
|
|
148
|
+
* @deprecated 新数据省略;节点类型由单项字段推断,支持同列混排。
|
|
149
|
+
*/
|
|
141
150
|
rightKind?: LinkMatchNodeKind;
|
|
142
151
|
/** 左 i ↔ 右 j */
|
|
143
152
|
pairs: Array<[number, number]>;
|
|
@@ -231,18 +240,28 @@ interface ReadingData {
|
|
|
231
240
|
analysis?: ReactNode;
|
|
232
241
|
answerText?: ReactNode;
|
|
233
242
|
}
|
|
243
|
+
interface ListenTaskTrack {
|
|
244
|
+
title: ReactNode;
|
|
245
|
+
audio?: AudioSource;
|
|
246
|
+
/** 秒 */
|
|
247
|
+
duration: number;
|
|
248
|
+
}
|
|
234
249
|
interface ListenTaskData {
|
|
235
250
|
title: ReactNode;
|
|
236
251
|
subtitle?: ReactNode;
|
|
237
252
|
badge?: ReactNode;
|
|
238
253
|
cover?: ArtName | ImageSource;
|
|
254
|
+
/** 单段音频;多段时改用 audios */
|
|
239
255
|
audio?: AudioSource;
|
|
240
|
-
/**
|
|
241
|
-
duration
|
|
256
|
+
/** 单段时长,秒;多段时由 audios 提供 */
|
|
257
|
+
duration?: number;
|
|
258
|
+
/** 多段音频,按顺序逐段播放 */
|
|
259
|
+
audios?: ListenTaskTrack[];
|
|
242
260
|
stats?: Array<{
|
|
243
261
|
label: ReactNode;
|
|
244
262
|
value: ReactNode;
|
|
245
263
|
}>;
|
|
264
|
+
finishTitle?: ReactNode;
|
|
246
265
|
}
|
|
247
266
|
interface VideoTaskItem {
|
|
248
267
|
title: ReactNode;
|
|
@@ -348,11 +367,42 @@ interface QuestShellProps {
|
|
|
348
367
|
footer?: ReactNode;
|
|
349
368
|
/** 反馈卡绝对定位在操作栏上方 */
|
|
350
369
|
feedback?: ReactNode;
|
|
370
|
+
/** 嵌入为子分组:隐藏进度 / 说明 / 操作栏,壳层随内容撑开 */
|
|
371
|
+
bare?: boolean;
|
|
351
372
|
dataQuest?: string;
|
|
352
373
|
className?: string;
|
|
353
374
|
children?: ReactNode;
|
|
354
375
|
}
|
|
355
|
-
declare function QuestShell({ mode, index, total, instruction, instructionVariant, footer, feedback, dataQuest, className, children }: QuestShellProps): react.JSX.Element;
|
|
376
|
+
declare function QuestShell({ mode, index, total, instruction, instructionVariant, footer, feedback, bare, dataQuest, className, children }: QuestShellProps): react.JSX.Element;
|
|
377
|
+
|
|
378
|
+
interface QuestCompleteStat {
|
|
379
|
+
label: ReactNode;
|
|
380
|
+
value: ReactNode;
|
|
381
|
+
unit?: ReactNode;
|
|
382
|
+
}
|
|
383
|
+
interface QuestCompleteProps {
|
|
384
|
+
/** 题包总数,同时作为完成后的进度值 */
|
|
385
|
+
total?: number;
|
|
386
|
+
/** 覆盖进度值,默认等于 total */
|
|
387
|
+
index?: number;
|
|
388
|
+
/** 完成页主标题,默认「题包完成啦」 */
|
|
389
|
+
title?: ReactNode;
|
|
390
|
+
/** 副标题,默认「共 N 道题已全部完成」 */
|
|
391
|
+
subtitle?: ReactNode;
|
|
392
|
+
/** 顶部插画,默认奖杯 */
|
|
393
|
+
art?: ArtName;
|
|
394
|
+
/** 统计项,默认展示完成题数与完成度 */
|
|
395
|
+
stats?: QuestCompleteStat[];
|
|
396
|
+
/** 完成并返回 */
|
|
397
|
+
onFinish?: () => void;
|
|
398
|
+
finishLabel?: ReactNode;
|
|
399
|
+
className?: string;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* 通用题包完成页:不绑定作业语义,可用于练习、测评、课程包等场景。
|
|
403
|
+
* 只负责呈现,何时进入本页由业务侧导航决定。
|
|
404
|
+
*/
|
|
405
|
+
declare function QuestComplete({ total, index, title, subtitle, art, stats, onFinish, finishLabel, className }: QuestCompleteProps): react.JSX.Element;
|
|
356
406
|
|
|
357
407
|
type OptionState = 'default' | 'selected' | 'correct' | 'wrong' | 'disabled' | 'faded';
|
|
358
408
|
interface OptionItemProps {
|
|
@@ -489,9 +539,11 @@ declare function ReadingComprehension({ data, mode, index, total, title, instruc
|
|
|
489
539
|
|
|
490
540
|
interface ListenTaskProps extends QuestCommonProps {
|
|
491
541
|
data: ListenTaskData;
|
|
542
|
+
/** 已听进度比例(0~1,按 tracks 顺序),用于回填回顾态进度。 */
|
|
543
|
+
initialRatios?: number[];
|
|
492
544
|
}
|
|
493
545
|
|
|
494
|
-
declare function ListenTask({ data, mode, index, total, title, instruction, onBack, onPrev, onNext, onSubmit, className, }: ListenTaskProps): react.JSX.Element;
|
|
546
|
+
declare function ListenTask({ data, mode, index, total, title, instruction, onBack, onPrev, onNext, onSubmit, bare, className, initialRatios, }: ListenTaskProps): react.JSX.Element;
|
|
495
547
|
|
|
496
548
|
interface VideoTaskProps extends QuestCommonProps {
|
|
497
549
|
data: VideoTaskData;
|
|
@@ -584,11 +636,13 @@ interface ActionBarProps {
|
|
|
584
636
|
actions: QuestAction[];
|
|
585
637
|
/** 当前页面进度,1-based;默认 1 */
|
|
586
638
|
index?: number;
|
|
639
|
+
/** 题包总题数;位于最后一题时 next 动作显示为完成文案 */
|
|
640
|
+
total?: number;
|
|
587
641
|
/** 上一题回调;传入后进入自动上一题模式 */
|
|
588
642
|
onPrev?: () => void;
|
|
589
643
|
className?: string;
|
|
590
644
|
}
|
|
591
|
-
declare function ActionBar({ actions, index, onPrev, className }: ActionBarProps): react.JSX.Element | null;
|
|
645
|
+
declare function ActionBar({ actions, index, total, onPrev, className }: ActionBarProps): react.JSX.Element | null;
|
|
592
646
|
|
|
593
647
|
interface AudioBarProps {
|
|
594
648
|
src?: string;
|
|
@@ -739,6 +793,7 @@ declare const version: string;
|
|
|
739
793
|
declare const questkit: {
|
|
740
794
|
version: string;
|
|
741
795
|
QuestShell: typeof QuestShell;
|
|
796
|
+
QuestComplete: typeof QuestComplete;
|
|
742
797
|
OptionItem: typeof OptionItem;
|
|
743
798
|
FeedbackSheet: typeof FeedbackSheet;
|
|
744
799
|
Instruction: typeof Instruction;
|
|
@@ -774,4 +829,4 @@ declare const questkit: {
|
|
|
774
829
|
};
|
|
775
830
|
};
|
|
776
831
|
|
|
777
|
-
export { ActionBar, type ActionBarProps, Art, type ArtName, AudioBar, type AudioBarProps, type AudioSource, BlankInput, type BlankInputProps, type BlankState, Card, type CardProps, Celebration, type CelebrationGrade, type CelebrationProps, Classify, type ClassifyData, type ClassifyProps, Cloze, type ClozeData, type ClozeProps, FeedbackSheet, type FeedbackSheetProps, FillBlank, type FillBlankData, type FillBlankProps, type FillBlankSlot, FollowRead, type FollowReadData, type FollowReadDemoState, type FollowReadExtraProps, type FollowReadProps, type FollowReadSentenceData, type FollowReadWordData, type ImageSource, Instruction, type InstructionProps, type InstructionVariant, type JudgePhase, type JudgeState, LinkMatch, type LinkMatchData, type LinkMatchNodeKind, type LinkMatchProps, type LinkMatchSideItem, ListenTask, type ListenTaskData, type ListenTaskProps, type MediaProgressApi, type MediaProgressOptions, OptionItem, type OralGrade, PictureBox, type PictureBoxProps, type PictureState, type PosterSource, Progress, type ProgressProps, type QuestAction, type QuestCommonProps, type QuestConfig, QuestConfigProvider, type QuestGrade, type QuestLabels, type QuestMode, type QuestOptionData, type QuestCommonProps as QuestProps, QuestConfigProvider as QuestProvider, type QuestResult, QuestShell, type QuestShellProps, type QuestResult as QuestSubmitResult, QuestToastProvider, type QuestToastProviderProps, ReadingComprehension, type ReadingComprehensionProps, type ReadingData, type ReadingQuestionData, Rearrange, type RearrangeData, type RearrangeProps, RecordCluster, type RecordClusterProps, type RecordHintTone, type RecordState, Rewrite, type RewriteData, type RewriteProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SingleChoice, type SingleChoiceData, type SingleChoiceProps, SortSentences, type SortSentencesData, type SortSentencesProps, type SpeakText, StarRating, type StarRatingProps, Toast, type ToastAlign, type ToastApi, type ToastController, type ToastOptions, type ToastPayload, type ToastProps, type UseJudgeOptions, type UseJudgeResult, VideoTask, type VideoTaskData, type VideoTaskItem, type VideoTaskProps, WordChip, type WordChipProps, type WordChipState, type WordChipVariant, WordSelect, type WordSelectData, type WordSelectProps, classNames, questkit as default, defaultQuestLabels, formatTime, questSfx, useJudge, useMediaProgress, useQuestConfig, useQuestLabels, useQuestToast, useToastController, version };
|
|
832
|
+
export { ActionBar, type ActionBarProps, Art, type ArtName, AudioBar, type AudioBarProps, type AudioSource, BlankInput, type BlankInputProps, type BlankState, Card, type CardProps, Celebration, type CelebrationGrade, type CelebrationProps, Classify, type ClassifyData, type ClassifyProps, Cloze, type ClozeData, type ClozeProps, FeedbackSheet, type FeedbackSheetProps, FillBlank, type FillBlankData, type FillBlankProps, type FillBlankSlot, FollowRead, type FollowReadData, type FollowReadDemoState, type FollowReadExtraProps, type FollowReadProps, type FollowReadSentenceData, type FollowReadWordData, type ImageSource, Instruction, type InstructionProps, type InstructionVariant, type JudgePhase, type JudgeState, LinkMatch, type LinkMatchData, type LinkMatchNodeKind, type LinkMatchProps, type LinkMatchSideItem, ListenTask, type ListenTaskData, type ListenTaskProps, type ListenTaskTrack, type MediaProgressApi, type MediaProgressOptions, OptionItem, type OralGrade, PictureBox, type PictureBoxProps, type PictureState, type PosterSource, Progress, type ProgressProps, type QuestAction, type QuestCommonProps, QuestComplete, type QuestCompleteProps, type QuestCompleteStat, type QuestConfig, QuestConfigProvider, type QuestGrade, type QuestLabels, type QuestMode, type QuestOptionData, type QuestCommonProps as QuestProps, QuestConfigProvider as QuestProvider, type QuestResult, QuestShell, type QuestShellProps, type QuestResult as QuestSubmitResult, QuestToastProvider, type QuestToastProviderProps, ReadingComprehension, type ReadingComprehensionProps, type ReadingData, type ReadingQuestionData, Rearrange, type RearrangeData, type RearrangeProps, RecordCluster, type RecordClusterProps, type RecordHintTone, type RecordState, Rewrite, type RewriteData, type RewriteProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SingleChoice, type SingleChoiceData, type SingleChoiceProps, SortSentences, type SortSentencesData, type SortSentencesProps, type SpeakText, StarRating, type StarRatingProps, Toast, type ToastAlign, type ToastApi, type ToastController, type ToastOptions, type ToastPayload, type ToastProps, type UseJudgeOptions, type UseJudgeResult, VideoTask, type VideoTaskData, type VideoTaskItem, type VideoTaskProps, WordChip, type WordChipProps, type WordChipState, type WordChipVariant, WordSelect, type WordSelectData, type WordSelectProps, classNames, questkit as default, defaultQuestLabels, formatTime, questSfx, useJudge, useMediaProgress, useQuestConfig, useQuestLabels, useQuestToast, useToastController, version };
|
package/dist/index.d.ts
CHANGED
|
@@ -65,6 +65,8 @@ interface QuestCommonProps {
|
|
|
65
65
|
sound?: boolean;
|
|
66
66
|
/** 演示直达:0 未答 / 1 首错 / 2 二错 */
|
|
67
67
|
demoAttempt?: 0 | 1 | 2;
|
|
68
|
+
/** 嵌入为子分组:隐藏进度 / 说明 / 操作栏,壳层随内容撑开,默认 false */
|
|
69
|
+
bare?: boolean;
|
|
68
70
|
className?: string;
|
|
69
71
|
}
|
|
70
72
|
interface QuestOptionData {
|
|
@@ -115,29 +117,36 @@ interface FollowReadExtraProps {
|
|
|
115
117
|
}) => OralGrade | Promise<OralGrade>;
|
|
116
118
|
onRecordingChange?: (recording: boolean) => void;
|
|
117
119
|
}
|
|
118
|
-
/**
|
|
120
|
+
/** 连线节点类型;旧数据按整列声明,新数据按单项字段推断 */
|
|
119
121
|
type LinkMatchNodeKind = 'text' | 'image' | 'audio';
|
|
120
122
|
interface LinkMatchSideItem {
|
|
121
|
-
/**
|
|
123
|
+
/** 文本内容;文本项必填,图片/音频项可作为兜底或朗读文本 */
|
|
122
124
|
text?: ReactNode;
|
|
123
125
|
phonetic?: ReactNode;
|
|
124
|
-
/**
|
|
126
|
+
/** 图片地址;有 image/art 时按图片项渲染 */
|
|
125
127
|
image?: ImageSource;
|
|
126
128
|
/** 图片加载失败时的替代文案 */
|
|
127
129
|
imageAlt?: string;
|
|
128
130
|
/** 使用内置矢量插画作为图片 */
|
|
129
131
|
art?: ArtName;
|
|
130
132
|
audio?: AudioSource;
|
|
133
|
+
/** @deprecated 连线题不以 speak 触发播放;请使用 audio。 */
|
|
131
134
|
speak?: boolean;
|
|
132
|
-
/**
|
|
135
|
+
/** @deprecated 连线题不以 spokenText 合成语音;请使用 audio。 */
|
|
133
136
|
spokenText?: string;
|
|
134
137
|
}
|
|
135
138
|
interface LinkMatchData {
|
|
136
139
|
left: LinkMatchSideItem[];
|
|
137
140
|
right: LinkMatchSideItem[];
|
|
138
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* 旧数据兼容:整列节点类型。
|
|
143
|
+
* @deprecated 新数据省略;节点类型由单项字段推断,支持同列混排。
|
|
144
|
+
*/
|
|
139
145
|
leftKind?: LinkMatchNodeKind;
|
|
140
|
-
/**
|
|
146
|
+
/**
|
|
147
|
+
* 旧数据兼容:整列节点类型。
|
|
148
|
+
* @deprecated 新数据省略;节点类型由单项字段推断,支持同列混排。
|
|
149
|
+
*/
|
|
141
150
|
rightKind?: LinkMatchNodeKind;
|
|
142
151
|
/** 左 i ↔ 右 j */
|
|
143
152
|
pairs: Array<[number, number]>;
|
|
@@ -231,18 +240,28 @@ interface ReadingData {
|
|
|
231
240
|
analysis?: ReactNode;
|
|
232
241
|
answerText?: ReactNode;
|
|
233
242
|
}
|
|
243
|
+
interface ListenTaskTrack {
|
|
244
|
+
title: ReactNode;
|
|
245
|
+
audio?: AudioSource;
|
|
246
|
+
/** 秒 */
|
|
247
|
+
duration: number;
|
|
248
|
+
}
|
|
234
249
|
interface ListenTaskData {
|
|
235
250
|
title: ReactNode;
|
|
236
251
|
subtitle?: ReactNode;
|
|
237
252
|
badge?: ReactNode;
|
|
238
253
|
cover?: ArtName | ImageSource;
|
|
254
|
+
/** 单段音频;多段时改用 audios */
|
|
239
255
|
audio?: AudioSource;
|
|
240
|
-
/**
|
|
241
|
-
duration
|
|
256
|
+
/** 单段时长,秒;多段时由 audios 提供 */
|
|
257
|
+
duration?: number;
|
|
258
|
+
/** 多段音频,按顺序逐段播放 */
|
|
259
|
+
audios?: ListenTaskTrack[];
|
|
242
260
|
stats?: Array<{
|
|
243
261
|
label: ReactNode;
|
|
244
262
|
value: ReactNode;
|
|
245
263
|
}>;
|
|
264
|
+
finishTitle?: ReactNode;
|
|
246
265
|
}
|
|
247
266
|
interface VideoTaskItem {
|
|
248
267
|
title: ReactNode;
|
|
@@ -348,11 +367,42 @@ interface QuestShellProps {
|
|
|
348
367
|
footer?: ReactNode;
|
|
349
368
|
/** 反馈卡绝对定位在操作栏上方 */
|
|
350
369
|
feedback?: ReactNode;
|
|
370
|
+
/** 嵌入为子分组:隐藏进度 / 说明 / 操作栏,壳层随内容撑开 */
|
|
371
|
+
bare?: boolean;
|
|
351
372
|
dataQuest?: string;
|
|
352
373
|
className?: string;
|
|
353
374
|
children?: ReactNode;
|
|
354
375
|
}
|
|
355
|
-
declare function QuestShell({ mode, index, total, instruction, instructionVariant, footer, feedback, dataQuest, className, children }: QuestShellProps): react.JSX.Element;
|
|
376
|
+
declare function QuestShell({ mode, index, total, instruction, instructionVariant, footer, feedback, bare, dataQuest, className, children }: QuestShellProps): react.JSX.Element;
|
|
377
|
+
|
|
378
|
+
interface QuestCompleteStat {
|
|
379
|
+
label: ReactNode;
|
|
380
|
+
value: ReactNode;
|
|
381
|
+
unit?: ReactNode;
|
|
382
|
+
}
|
|
383
|
+
interface QuestCompleteProps {
|
|
384
|
+
/** 题包总数,同时作为完成后的进度值 */
|
|
385
|
+
total?: number;
|
|
386
|
+
/** 覆盖进度值,默认等于 total */
|
|
387
|
+
index?: number;
|
|
388
|
+
/** 完成页主标题,默认「题包完成啦」 */
|
|
389
|
+
title?: ReactNode;
|
|
390
|
+
/** 副标题,默认「共 N 道题已全部完成」 */
|
|
391
|
+
subtitle?: ReactNode;
|
|
392
|
+
/** 顶部插画,默认奖杯 */
|
|
393
|
+
art?: ArtName;
|
|
394
|
+
/** 统计项,默认展示完成题数与完成度 */
|
|
395
|
+
stats?: QuestCompleteStat[];
|
|
396
|
+
/** 完成并返回 */
|
|
397
|
+
onFinish?: () => void;
|
|
398
|
+
finishLabel?: ReactNode;
|
|
399
|
+
className?: string;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* 通用题包完成页:不绑定作业语义,可用于练习、测评、课程包等场景。
|
|
403
|
+
* 只负责呈现,何时进入本页由业务侧导航决定。
|
|
404
|
+
*/
|
|
405
|
+
declare function QuestComplete({ total, index, title, subtitle, art, stats, onFinish, finishLabel, className }: QuestCompleteProps): react.JSX.Element;
|
|
356
406
|
|
|
357
407
|
type OptionState = 'default' | 'selected' | 'correct' | 'wrong' | 'disabled' | 'faded';
|
|
358
408
|
interface OptionItemProps {
|
|
@@ -489,9 +539,11 @@ declare function ReadingComprehension({ data, mode, index, total, title, instruc
|
|
|
489
539
|
|
|
490
540
|
interface ListenTaskProps extends QuestCommonProps {
|
|
491
541
|
data: ListenTaskData;
|
|
542
|
+
/** 已听进度比例(0~1,按 tracks 顺序),用于回填回顾态进度。 */
|
|
543
|
+
initialRatios?: number[];
|
|
492
544
|
}
|
|
493
545
|
|
|
494
|
-
declare function ListenTask({ data, mode, index, total, title, instruction, onBack, onPrev, onNext, onSubmit, className, }: ListenTaskProps): react.JSX.Element;
|
|
546
|
+
declare function ListenTask({ data, mode, index, total, title, instruction, onBack, onPrev, onNext, onSubmit, bare, className, initialRatios, }: ListenTaskProps): react.JSX.Element;
|
|
495
547
|
|
|
496
548
|
interface VideoTaskProps extends QuestCommonProps {
|
|
497
549
|
data: VideoTaskData;
|
|
@@ -584,11 +636,13 @@ interface ActionBarProps {
|
|
|
584
636
|
actions: QuestAction[];
|
|
585
637
|
/** 当前页面进度,1-based;默认 1 */
|
|
586
638
|
index?: number;
|
|
639
|
+
/** 题包总题数;位于最后一题时 next 动作显示为完成文案 */
|
|
640
|
+
total?: number;
|
|
587
641
|
/** 上一题回调;传入后进入自动上一题模式 */
|
|
588
642
|
onPrev?: () => void;
|
|
589
643
|
className?: string;
|
|
590
644
|
}
|
|
591
|
-
declare function ActionBar({ actions, index, onPrev, className }: ActionBarProps): react.JSX.Element | null;
|
|
645
|
+
declare function ActionBar({ actions, index, total, onPrev, className }: ActionBarProps): react.JSX.Element | null;
|
|
592
646
|
|
|
593
647
|
interface AudioBarProps {
|
|
594
648
|
src?: string;
|
|
@@ -739,6 +793,7 @@ declare const version: string;
|
|
|
739
793
|
declare const questkit: {
|
|
740
794
|
version: string;
|
|
741
795
|
QuestShell: typeof QuestShell;
|
|
796
|
+
QuestComplete: typeof QuestComplete;
|
|
742
797
|
OptionItem: typeof OptionItem;
|
|
743
798
|
FeedbackSheet: typeof FeedbackSheet;
|
|
744
799
|
Instruction: typeof Instruction;
|
|
@@ -776,4 +831,4 @@ declare const questkit: {
|
|
|
776
831
|
|
|
777
832
|
// @ts-ignore
|
|
778
833
|
export = questkit;
|
|
779
|
-
export { ActionBar, type ActionBarProps, Art, type ArtName, AudioBar, type AudioBarProps, type AudioSource, BlankInput, type BlankInputProps, type BlankState, Card, type CardProps, Celebration, type CelebrationGrade, type CelebrationProps, Classify, type ClassifyData, type ClassifyProps, Cloze, type ClozeData, type ClozeProps, FeedbackSheet, type FeedbackSheetProps, FillBlank, type FillBlankData, type FillBlankProps, type FillBlankSlot, FollowRead, type FollowReadData, type FollowReadDemoState, type FollowReadExtraProps, type FollowReadProps, type FollowReadSentenceData, type FollowReadWordData, type ImageSource, Instruction, type InstructionProps, type InstructionVariant, type JudgePhase, type JudgeState, LinkMatch, type LinkMatchData, type LinkMatchNodeKind, type LinkMatchProps, type LinkMatchSideItem, ListenTask, type ListenTaskData, type ListenTaskProps, type MediaProgressApi, type MediaProgressOptions, OptionItem, type OralGrade, PictureBox, type PictureBoxProps, type PictureState, type PosterSource, Progress, type ProgressProps, type QuestAction, type QuestCommonProps, type QuestConfig, QuestConfigProvider, type QuestGrade, type QuestLabels, type QuestMode, type QuestOptionData, type QuestCommonProps as QuestProps, QuestConfigProvider as QuestProvider, type QuestResult, QuestShell, type QuestShellProps, type QuestResult as QuestSubmitResult, QuestToastProvider, type QuestToastProviderProps, ReadingComprehension, type ReadingComprehensionProps, type ReadingData, type ReadingQuestionData, Rearrange, type RearrangeData, type RearrangeProps, RecordCluster, type RecordClusterProps, type RecordHintTone, type RecordState, Rewrite, type RewriteData, type RewriteProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SingleChoice, type SingleChoiceData, type SingleChoiceProps, SortSentences, type SortSentencesData, type SortSentencesProps, type SpeakText, StarRating, type StarRatingProps, Toast, type ToastAlign, type ToastApi, type ToastController, type ToastOptions, type ToastPayload, type ToastProps, type UseJudgeOptions, type UseJudgeResult, VideoTask, type VideoTaskData, type VideoTaskItem, type VideoTaskProps, WordChip, type WordChipProps, type WordChipState, type WordChipVariant, WordSelect, type WordSelectData, type WordSelectProps, classNames, defaultQuestLabels, formatTime, questSfx, useJudge, useMediaProgress, useQuestConfig, useQuestLabels, useQuestToast, useToastController, version };
|
|
834
|
+
export { ActionBar, type ActionBarProps, Art, type ArtName, AudioBar, type AudioBarProps, type AudioSource, BlankInput, type BlankInputProps, type BlankState, Card, type CardProps, Celebration, type CelebrationGrade, type CelebrationProps, Classify, type ClassifyData, type ClassifyProps, Cloze, type ClozeData, type ClozeProps, FeedbackSheet, type FeedbackSheetProps, FillBlank, type FillBlankData, type FillBlankProps, type FillBlankSlot, FollowRead, type FollowReadData, type FollowReadDemoState, type FollowReadExtraProps, type FollowReadProps, type FollowReadSentenceData, type FollowReadWordData, type ImageSource, Instruction, type InstructionProps, type InstructionVariant, type JudgePhase, type JudgeState, LinkMatch, type LinkMatchData, type LinkMatchNodeKind, type LinkMatchProps, type LinkMatchSideItem, ListenTask, type ListenTaskData, type ListenTaskProps, type ListenTaskTrack, type MediaProgressApi, type MediaProgressOptions, OptionItem, type OralGrade, PictureBox, type PictureBoxProps, type PictureState, type PosterSource, Progress, type ProgressProps, type QuestAction, type QuestCommonProps, QuestComplete, type QuestCompleteProps, type QuestCompleteStat, type QuestConfig, QuestConfigProvider, type QuestGrade, type QuestLabels, type QuestMode, type QuestOptionData, type QuestCommonProps as QuestProps, QuestConfigProvider as QuestProvider, type QuestResult, QuestShell, type QuestShellProps, type QuestResult as QuestSubmitResult, QuestToastProvider, type QuestToastProviderProps, ReadingComprehension, type ReadingComprehensionProps, type ReadingData, type ReadingQuestionData, Rearrange, type RearrangeData, type RearrangeProps, RecordCluster, type RecordClusterProps, type RecordHintTone, type RecordState, Rewrite, type RewriteData, type RewriteProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SingleChoice, type SingleChoiceData, type SingleChoiceProps, SortSentences, type SortSentencesData, type SortSentencesProps, type SpeakText, StarRating, type StarRatingProps, Toast, type ToastAlign, type ToastApi, type ToastController, type ToastOptions, type ToastPayload, type ToastProps, type UseJudgeOptions, type UseJudgeResult, VideoTask, type VideoTaskData, type VideoTaskItem, type VideoTaskProps, WordChip, type WordChipProps, type WordChipState, type WordChipVariant, WordSelect, type WordSelectData, type WordSelectProps, classNames, defaultQuestLabels, formatTime, questSfx, useJudge, useMediaProgress, useQuestConfig, useQuestLabels, useQuestToast, useToastController, version };
|