@pie-element/complex-rubric 8.0.4-next.20261011174919 → 8.0.4
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/author/defaults.d.ts +10 -10
- package/dist/author/defaults.js +14 -14
- package/dist/author/index.d.ts +20 -20
- package/dist/author/index.js +4 -0
- package/dist/author/main.d.ts +26 -13
- package/dist/author/main.js +20 -30
- package/dist/browser/author/index.js +54 -76
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +2 -2
- package/dist/browser/{delivery-Z7dq393G.js → delivery-pWFw_9mm.js} +2 -2
- package/dist/browser/{delivery-Z7dq393G.js.map → delivery-pWFw_9mm.js.map} +1 -1
- package/dist/browser/editor-runtime/author/index.js +54 -76
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +2 -2
- package/dist/browser/editor-runtime/{delivery-BD3aCYuV.js → delivery-DHFx9jYx.js} +2 -2
- package/dist/browser/editor-runtime/{delivery-BD3aCYuV.js.map → delivery-DHFx9jYx.js.map} +1 -1
- package/dist/browser/editor-runtime/print/index.js +2 -2
- package/dist/browser/editor-runtime/{private-tags-Dq8udgmI.js → private-tags-BRKFxLqP.js} +2 -2
- package/dist/browser/editor-runtime/{private-tags-Dq8udgmI.js.map → private-tags-BRKFxLqP.js.map} +1 -1
- package/dist/browser/print/index.js +2 -2
- package/dist/browser/{private-tags-C5WL6_In.js → private-tags-CMwniYBP.js} +2 -2
- package/dist/browser/{private-tags-C5WL6_In.js.map → private-tags-CMwniYBP.js.map} +1 -1
- package/dist/controller/defaults.d.ts +13 -12
- package/dist/controller/index.d.ts +88 -5
- package/dist/controller/utils.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.js +1 -1
- package/dist/private-tags.js +1 -1
- package/dist/schemas/configuration.schema.json +469 -0
- package/dist/schemas/model.schema.json +553 -0
- package/dist/schemas/session.schema.json +17 -0
- package/dist/types.d.ts +60 -0
- package/module/print.js +1 -1
- package/module/print.js.map +1 -1
- package/package.json +16 -12
|
@@ -1,31 +1,32 @@
|
|
|
1
|
+
import type { Scale } from '@pie-element/multi-trait-rubric';
|
|
1
2
|
declare const RUBRIC_TYPES: {
|
|
2
|
-
SIMPLE_RUBRIC:
|
|
3
|
-
MULTI_TRAIT_RUBRIC:
|
|
4
|
-
rubricless:
|
|
3
|
+
readonly SIMPLE_RUBRIC: "simpleRubric";
|
|
4
|
+
readonly MULTI_TRAIT_RUBRIC: "multiTraitRubric";
|
|
5
|
+
readonly rubricless: "rubricless";
|
|
5
6
|
};
|
|
6
7
|
declare const _default: {
|
|
7
|
-
rubricType:
|
|
8
|
+
rubricType: "simpleRubric";
|
|
8
9
|
rubrics: {
|
|
9
|
-
[RUBRIC_TYPES.
|
|
10
|
+
[RUBRIC_TYPES.RUBRICLESS]: {
|
|
11
|
+
maxPoints: number;
|
|
12
|
+
excludeZero: boolean;
|
|
13
|
+
rubriclessInstructionEnabled: boolean;
|
|
14
|
+
};
|
|
15
|
+
simpleRubric: {
|
|
10
16
|
points: string[];
|
|
11
17
|
sampleAnswers: null[];
|
|
12
18
|
maxPoints: number;
|
|
13
19
|
excludeZero: boolean;
|
|
14
20
|
};
|
|
15
|
-
|
|
21
|
+
multiTraitRubric: {
|
|
16
22
|
description: boolean;
|
|
17
23
|
excludeZero: boolean;
|
|
18
24
|
halfScoring: boolean;
|
|
19
25
|
pointLabels: boolean;
|
|
20
|
-
scales:
|
|
26
|
+
scales: Scale[];
|
|
21
27
|
standards: boolean;
|
|
22
28
|
visibleToStudent: boolean;
|
|
23
29
|
};
|
|
24
|
-
[RUBRIC_TYPES.RUBRICLESS]: {
|
|
25
|
-
maxPoints: number;
|
|
26
|
-
excludeZero: boolean;
|
|
27
|
-
rubriclessInstructionEnabled: boolean;
|
|
28
|
-
};
|
|
29
30
|
};
|
|
30
31
|
};
|
|
31
32
|
export default _default;
|
|
@@ -1,11 +1,93 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { MultiTraitRubricValidationErrors } from '@pie-element/multi-trait-rubric/controller';
|
|
2
|
+
import type { RubricValidationErrors } from '@pie-element/rubric/controller';
|
|
3
|
+
import type { PieEnvironment } from '@pie-element/shared-types';
|
|
4
|
+
import type { ComplexRubricConfiguration, ComplexRubricModel, ComplexRubricSession, EmbeddedMultiTraitRubricModel, EmbeddedRubricModel } from '../types.js';
|
|
5
|
+
/** Errors `validate()` reports: the simple rubric's or the multi trait rubric's, per `rubricType`. */
|
|
6
|
+
export type ComplexRubricValidationErrors = RubricValidationErrors & MultiTraitRubricValidationErrors;
|
|
7
|
+
/** A rubric model as `model()` hands it to delivery, which shows it when `visible`. */
|
|
8
|
+
type ViewRubric<T> = Partial<T> & {
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type NormalizedQuestion = Omit<ReturnType<typeof normalize>, 'rubrics'> & {
|
|
12
|
+
rubrics: {
|
|
13
|
+
simpleRubric?: ViewRubric<EmbeddedRubricModel>;
|
|
14
|
+
multiTraitRubric?: ViewRubric<EmbeddedMultiTraitRubricModel>;
|
|
15
|
+
rubricless?: ViewRubric<EmbeddedRubricModel>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
declare const RUBRIC_TYPES: {
|
|
19
|
+
readonly SIMPLE_RUBRIC: "simpleRubric";
|
|
20
|
+
readonly MULTI_TRAIT_RUBRIC: "multiTraitRubric";
|
|
21
|
+
readonly rubricless: "rubricless";
|
|
22
|
+
};
|
|
23
|
+
export declare function createDefaultModel(model?: Partial<ComplexRubricModel>): Promise<{
|
|
24
|
+
rubricType: import("../types.js").RubricType;
|
|
25
|
+
rubrics: import("../types.js").RubricModels | {
|
|
26
|
+
[RUBRIC_TYPES.
|
|
27
|
+
RUBRICLESS]: {
|
|
28
|
+
maxPoints: number;
|
|
29
|
+
excludeZero: boolean;
|
|
30
|
+
rubriclessInstructionEnabled: boolean;
|
|
31
|
+
};
|
|
32
|
+
simpleRubric: {
|
|
33
|
+
points: string[];
|
|
34
|
+
sampleAnswers: null[];
|
|
35
|
+
maxPoints: number;
|
|
36
|
+
excludeZero: boolean;
|
|
37
|
+
};
|
|
38
|
+
multiTraitRubric: {
|
|
39
|
+
description: boolean;
|
|
40
|
+
excludeZero: boolean;
|
|
41
|
+
halfScoring: boolean;
|
|
42
|
+
pointLabels: boolean;
|
|
43
|
+
scales: import("@pie-element/multi-trait-rubric").Scale[];
|
|
44
|
+
standards: boolean;
|
|
45
|
+
visibleToStudent: boolean;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
visibleToStudent?: boolean | undefined;
|
|
49
|
+
extraCSSRules?: import("@pie-element/shared-types").ExtraCSSRules | undefined;
|
|
50
|
+
id?: string | undefined;
|
|
51
|
+
element?: string | undefined;
|
|
52
|
+
accessibilityCatalogs?: import("@pie-element/shared-types").AccessibilityCatalog[] | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
export declare const normalize: (question: Partial<ComplexRubricModel>) => {
|
|
55
|
+
rubricType: import("../types.js").RubricType;
|
|
56
|
+
rubrics: import("../types.js").RubricModels | {
|
|
57
|
+
[RUBRIC_TYPES.
|
|
58
|
+
RUBRICLESS]: {
|
|
59
|
+
maxPoints: number;
|
|
60
|
+
excludeZero: boolean;
|
|
61
|
+
rubriclessInstructionEnabled: boolean;
|
|
62
|
+
};
|
|
63
|
+
simpleRubric: {
|
|
64
|
+
points: string[];
|
|
65
|
+
sampleAnswers: null[];
|
|
66
|
+
maxPoints: number;
|
|
67
|
+
excludeZero: boolean;
|
|
68
|
+
};
|
|
69
|
+
multiTraitRubric: {
|
|
70
|
+
description: boolean;
|
|
71
|
+
excludeZero: boolean;
|
|
72
|
+
halfScoring: boolean;
|
|
73
|
+
pointLabels: boolean;
|
|
74
|
+
scales: import("@pie-element/multi-trait-rubric").Scale[];
|
|
75
|
+
standards: boolean;
|
|
76
|
+
visibleToStudent: boolean;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
visibleToStudent?: boolean | undefined;
|
|
80
|
+
extraCSSRules?: import("@pie-element/shared-types").ExtraCSSRules | undefined;
|
|
81
|
+
id?: string | undefined;
|
|
82
|
+
element?: string | undefined;
|
|
83
|
+
accessibilityCatalogs?: import("@pie-element/shared-types").AccessibilityCatalog[] | undefined;
|
|
84
|
+
};
|
|
3
85
|
/**
|
|
4
86
|
* @param {*} question
|
|
5
87
|
* @param {*} session
|
|
6
88
|
* @param {*} env
|
|
7
89
|
*/
|
|
8
|
-
export declare function model(question:
|
|
90
|
+
export declare function model(question: ComplexRubricModel, _session: ComplexRubricSession | undefined, env: PieEnvironment): Promise<Partial<NormalizedQuestion>>;
|
|
9
91
|
export declare const getScore: () => number;
|
|
10
92
|
/**
|
|
11
93
|
* @param {Object} model - the main model
|
|
@@ -13,5 +95,6 @@ export declare const getScore: () => number;
|
|
|
13
95
|
* @param {Object} env
|
|
14
96
|
*/
|
|
15
97
|
export declare function outcome(): Promise<unknown>;
|
|
16
|
-
export declare const createCorrectResponseSession: (
|
|
17
|
-
export declare const validate: (model?:
|
|
98
|
+
export declare const createCorrectResponseSession: (_question: ComplexRubricModel, env: PieEnvironment) => Promise<ComplexRubricSession | null>;
|
|
99
|
+
export declare const validate: (model?: Partial<ComplexRubricModel>, _config?: ComplexRubricConfiguration) => ComplexRubricValidationErrors;
|
|
100
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const markupToText: (s:
|
|
1
|
+
export declare const markupToText: (s: string | undefined) => string;
|
package/dist/index.d.ts
CHANGED