postext 1.62.0 → 1.63.0
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/__tests__/exercises/config.test.js +32 -0
- package/dist/__tests__/exercises/config.test.js.map +1 -1
- package/dist/__tests__/exports.test.js +2 -0
- package/dist/__tests__/exports.test.js.map +1 -1
- package/dist/__tests__/pipeline/spanHeadingMidPage.test.js +99 -0
- package/dist/__tests__/pipeline/spanHeadingMidPage.test.js.map +1 -1
- package/dist/__tests__/pipeline/trailingBand.test.js +25 -0
- package/dist/__tests__/pipeline/trailingBand.test.js.map +1 -1
- package/dist/defaults/exercises.d.ts +13 -2
- package/dist/defaults/exercises.d.ts.map +1 -1
- package/dist/defaults/exercises.js +63 -11
- package/dist/defaults/exercises.js.map +1 -1
- package/dist/exercises/configWarnings.d.ts.map +1 -1
- package/dist/exercises/configWarnings.js +6 -2
- package/dist/exercises/configWarnings.js.map +1 -1
- package/dist/exercises/digital.d.ts +8 -3
- package/dist/exercises/digital.d.ts.map +1 -1
- package/dist/exercises/digital.js +6 -0
- package/dist/exercises/digital.js.map +1 -1
- package/dist/exercises/runtime.d.ts +68 -0
- package/dist/exercises/runtime.d.ts.map +1 -1
- package/dist/exercises/runtime.js +194 -21
- package/dist/exercises/runtime.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/pipeline/bandCaps.d.ts.map +1 -1
- package/dist/pipeline/bandCaps.js +8 -1
- package/dist/pipeline/bandCaps.js.map +1 -1
- package/dist/pipeline/build.d.ts.map +1 -1
- package/dist/pipeline/build.js +15 -4
- package/dist/pipeline/build.js.map +1 -1
- package/dist/types.d.ts +32 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -4262,9 +4262,33 @@ export interface ExerciseSolutionsConfig {
|
|
|
4262
4262
|
* each worked solution. Default `'full'`. */
|
|
4263
4263
|
layout?: 'key' | 'full';
|
|
4264
4264
|
}
|
|
4265
|
+
/** When an exercise's bar offers its solution (#1268). */
|
|
4266
|
+
export type ExerciseShowSolution = 'always' | 'afterCheck' | 'noChecksLeft' | 'never';
|
|
4267
|
+
/** How far a reader may go with an exercise in the digital outputs (HTML,
|
|
4268
|
+
* EPUB, SCORM; #1268): the limits that turn practice into a test. Set
|
|
4269
|
+
* for the book in `exercises.digital`, for a style in its `digital`. */
|
|
4270
|
+
export interface ExerciseAssessmentConfig {
|
|
4271
|
+
/** Check presses an attempt allows: once they are spent, the answers
|
|
4272
|
+
* lock until Try again starts a new attempt. `0`: no limit. Default
|
|
4273
|
+
* `0`. Not with `check: 'instant'`, which has no Check button. */
|
|
4274
|
+
maxChecks?: number;
|
|
4275
|
+
/** Offer Try again, which clears the answers and starts a new attempt.
|
|
4276
|
+
* Default `true`. */
|
|
4277
|
+
reset?: boolean;
|
|
4278
|
+
/** Try again uses allowed: `maxResets + 1` attempts in all. `0`: no
|
|
4279
|
+
* limit. Default `0`. */
|
|
4280
|
+
maxResets?: number;
|
|
4281
|
+
/** When the bar offers Show solution: `'always'`; `'afterCheck'`, once
|
|
4282
|
+
* the attempt has been checked; `'noChecksLeft'`, once the attempt's
|
|
4283
|
+
* checks are spent or its answers checked all right; `'never'`. Showing
|
|
4284
|
+
* the solution ends the attempt when checks are limited. Default
|
|
4285
|
+
* `'always'`. */
|
|
4286
|
+
showSolution?: ExerciseShowSolution;
|
|
4287
|
+
}
|
|
4265
4288
|
/** How an exercise behaves in the HTML and EPUB outputs
|
|
4266
|
-
* (`exerciseStyles[].digital`)
|
|
4267
|
-
|
|
4289
|
+
* (`exerciseStyles[].digital`): its colours, and limits over the book's
|
|
4290
|
+
* (`exercises.digital`). */
|
|
4291
|
+
export interface ExerciseDigitalStyle extends ExerciseAssessmentConfig {
|
|
4268
4292
|
/** Default a green. */
|
|
4269
4293
|
correctColor?: ColorValue;
|
|
4270
4294
|
/** Default a red. */
|
|
@@ -4314,8 +4338,8 @@ export interface ExercisesConfig {
|
|
|
4314
4338
|
/** What shuffles are drawn from: change it for another version of a
|
|
4315
4339
|
* test. Default `1`. */
|
|
4316
4340
|
seed?: number;
|
|
4317
|
-
/** The HTML and
|
|
4318
|
-
digital?: {
|
|
4341
|
+
/** The HTML, EPUB and SCORM outputs. */
|
|
4342
|
+
digital?: ExerciseAssessmentConfig & {
|
|
4319
4343
|
/** Answerable exercises. Default `true`. */
|
|
4320
4344
|
interactive?: boolean;
|
|
4321
4345
|
/** Keep the reader's answers in the browser. Default `true`. */
|
|
@@ -4323,6 +4347,10 @@ export interface ExercisesConfig {
|
|
|
4323
4347
|
/** `'button'`: checked on demand; `'instant'`: as answered. Default
|
|
4324
4348
|
* `'button'`. */
|
|
4325
4349
|
check?: 'button' | 'instant';
|
|
4350
|
+
/** The score that passes, a percentage of the graded slots right
|
|
4351
|
+
* (#1268): a SCORM package reports passed or failed against it.
|
|
4352
|
+
* `0`: none, no pass or fail. Default `0`. */
|
|
4353
|
+
passingScore?: number;
|
|
4326
4354
|
};
|
|
4327
4355
|
}
|
|
4328
4356
|
/**
|