Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release v0.3.8
Browse files Browse the repository at this point in the history
willcrichton committed Sep 12, 2024
1 parent 4eeda22 commit 67f25a5
Showing 8 changed files with 16 additions and 12 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/mdbook-quiz-schema/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mdbook-quiz-schema"
version = "0.3.7"
version = "0.3.8"
authors = ["Will Crichton <[email protected]>"]
description = "Schema for quizzes used in mdbook-quiz"
license = "MIT OR Apache-2.0"
2 changes: 1 addition & 1 deletion crates/mdbook-quiz-validate/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mdbook-quiz-validate"
version = "0.3.7"
version = "0.3.8"
authors = ["Will Crichton <[email protected]>"]
description = "Input validation for quizzes used in mdbook-quiz"
license = "MIT OR Apache-2.0"
2 changes: 1 addition & 1 deletion crates/mdbook-quiz/Cargo.toml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ name = "mdbook-quiz"
authors = ["Will Crichton <[email protected]>"]
description = "Interactive quizzes for your mdBook"
license = "MIT OR Apache-2.0"
version = "0.3.7"
version = "0.3.8"
edition = "2021"
include = ["/src", "/js"]
repository = "https://github.com/cognitive-engineering-lab/mdbook-quiz"
2 changes: 1 addition & 1 deletion js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"depot": {
"depot-version": "0.2.17"
"depot-version": "0.2.18"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
2 changes: 1 addition & 1 deletion js/packages/quiz-embed/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wcrichto/quiz-embed",
"version": "0.3.5",
"version": "0.3.8",
"depot": {
"platform": "browser"
},
2 changes: 1 addition & 1 deletion js/packages/quiz/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wcrichto/quiz",
"version": "0.3.5",
"version": "0.3.8",
"files": [
"dist"
],
10 changes: 7 additions & 3 deletions js/packages/quiz/src/components/quiz.tsx
Original file line number Diff line number Diff line change
@@ -112,11 +112,13 @@ interface QuizState {
let loadState = ({
quiz,
answerStorage,
cacheAnswers
cacheAnswers,
autoStart
}: {
quiz: Quiz;
answerStorage: AnswerStorage;
cacheAnswers?: boolean;
autoStart?: boolean;
}): QuizState => {
let stored = answerStorage.load();

@@ -143,7 +145,7 @@ let loadState = ({
};
} else {
return {
started: false,
started: autoStart || false,
index: 0,
attempt: 0,
confirmedDone: false,
@@ -301,6 +303,7 @@ export interface QuizViewConfig {
cacheAnswers?: boolean;
allowRetry?: boolean;
showBugReporter?: boolean;
autoStart?: boolean;
}

export type QuizViewProps = QuizViewConfig & {
@@ -354,7 +357,8 @@ export let QuizView: React.FC<QuizViewProps> = observer(
loadState({
quiz: config.quiz,
answerStorage,
cacheAnswers: config.cacheAnswers
cacheAnswers: config.cacheAnswers,
autoStart: config.autoStart
})
);

0 comments on commit 67f25a5

Please sign in to comment.