@pie-element/venn-classification 0.1.5-next.20261008072957 → 0.1.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/author/index.js +280 -277
- package/dist/author/index.js.map +1 -1
- package/dist/browser/{VennClassification-DKBN96xP.js → VennClassification-CaHr-K1i.js} +483 -480
- package/dist/browser/VennClassification-CaHr-K1i.js.map +1 -0
- package/dist/browser/author/index.js +1 -1
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller--P8AQebj.js.map +1 -1
- package/dist/browser/delivery/index.js +1 -1
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/{VennClassification-DKBN96xP.js → VennClassification-CaHr-K1i.js} +483 -480
- package/dist/browser/editor-runtime/VennClassification-CaHr-K1i.js.map +1 -0
- package/dist/browser/editor-runtime/author/index.js +1 -1
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller--P8AQebj.js.map +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +1 -1
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-BMXH-FVH.js → mathjax-CptWnMbQ-DVFde9An.js} +15 -15
- package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-BMXH-FVH.js.map → mathjax-CptWnMbQ-DVFde9An.js.map} +1 -1
- package/dist/browser/{mathjax-BKrHE4xs-BMXH-FVH.js → mathjax-CptWnMbQ-DVFde9An.js} +15 -15
- package/dist/browser/{mathjax-BKrHE4xs-BMXH-FVH.js.map → mathjax-CptWnMbQ-DVFde9An.js.map} +1 -1
- package/dist/controller/defaults.d.ts +6 -6
- package/dist/controller/index.d.ts +13 -13
- package/dist/controller/index.js.map +1 -1
- package/dist/controller/region.d.ts +2 -2
- package/dist/delivery/dnd.d.ts +8 -8
- package/dist/delivery/index.d.ts +2 -2
- package/dist/delivery/index.js +280 -277
- package/dist/delivery/index.js.map +1 -1
- package/dist/delivery/layout.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.js +19 -19
- package/dist/schemas/configuration.schema.json +41 -0
- package/dist/schemas/model.schema.json +375 -0
- package/dist/schemas/session.schema.json +40 -0
- package/dist/types.d.ts +33 -4
- package/package.json +9 -5
- package/dist/browser/VennClassification-DKBN96xP.js.map +0 -1
- package/dist/browser/editor-runtime/VennClassification-DKBN96xP.js.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { VennClassificationModel } from '../types.js';
|
|
2
2
|
declare const _default: {
|
|
3
|
-
model:
|
|
3
|
+
model: Omit<VennClassificationModel, "id" | "element">;
|
|
4
4
|
configuration: {
|
|
5
5
|
prompt: {
|
|
6
6
|
label: string;
|
|
7
|
-
settings:
|
|
7
|
+
settings: true;
|
|
8
8
|
};
|
|
9
9
|
scoringPolicy: {
|
|
10
10
|
label: string;
|
|
11
|
-
settings:
|
|
11
|
+
settings: true;
|
|
12
12
|
};
|
|
13
13
|
teacherInstructions: {
|
|
14
14
|
label: string;
|
|
15
|
-
settings:
|
|
15
|
+
settings: true;
|
|
16
16
|
};
|
|
17
|
-
settingsPanelDisabled:
|
|
17
|
+
settingsPanelDisabled: false;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
export default _default;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import type { Region, ScoringPolicy,
|
|
1
|
+
import type { Region, ScoringPolicy, VennClassificationModel, VennClassificationSession, VennTile, VennViewModel } from '../types.js';
|
|
2
2
|
export { composeRegionLabel, enumerateRegions, getRegionLabel, normalizeRegion, regionKey, regionsEqual, } from './region.js';
|
|
3
|
-
export type { Region, ScoringPolicy, VennCircle,
|
|
3
|
+
export type { Region, ScoringPolicy, VennCircle, VennClassificationModel, VennClassificationSession, VennTile, VennViewModel, } from '../types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Circle counts that the v1 delivery surface will actually lay out.
|
|
6
6
|
* The data model is N-generic; widening to 3-set delivery is a one-line change
|
|
7
7
|
* plus the 3-set layout/picker once that work ships.
|
|
8
8
|
*/
|
|
9
9
|
export declare const SUPPORTED_CIRCLE_COUNTS: Set<number>;
|
|
10
|
-
export declare function createDefaultModel(model?: Partial<
|
|
10
|
+
export declare function createDefaultModel(model?: Partial<VennClassificationModel>): VennClassificationModel;
|
|
11
11
|
/**
|
|
12
12
|
* Return a session whose `placements` map has an entry for every authored tile.
|
|
13
13
|
* Unknown placement keys are preserved (so hosts that round-trip extra keys
|
|
14
14
|
* don't lose them), and arrays are normalized to sorted-ascending.
|
|
15
15
|
*/
|
|
16
|
-
export declare function normalizeSession(session:
|
|
16
|
+
export declare function normalizeSession(session: VennClassificationSession | null | undefined, model?: VennClassificationModel): VennClassificationSession;
|
|
17
17
|
/**
|
|
18
18
|
* True iff every authored tile has a non-null placement.
|
|
19
19
|
* Intentionally permissive about unauthored placement keys: they don't
|
|
20
20
|
* contribute to completeness.
|
|
21
21
|
*/
|
|
22
|
-
export declare function isComplete(model:
|
|
22
|
+
export declare function isComplete(model: VennClassificationModel | null | undefined, session: VennClassificationSession | null | undefined): boolean;
|
|
23
23
|
export type Correctness = 'correct' | 'incorrect' | 'unanswered';
|
|
24
24
|
/** Per-tile correctness verdict. */
|
|
25
25
|
export declare function getTileCorrectness(tile: VennTile, placement: Region | null | undefined): Correctness;
|
|
26
26
|
/** Map tile id -> correctness, for convenience in delivery `evaluate` mode. */
|
|
27
|
-
export declare function getCorrectnessMap(model:
|
|
27
|
+
export declare function getCorrectnessMap(model: VennClassificationModel, session: VennClassificationSession | null | undefined): Record<string, Correctness>;
|
|
28
28
|
export interface VennOutcome {
|
|
29
29
|
score: number;
|
|
30
30
|
empty: boolean;
|
|
@@ -40,34 +40,34 @@ export interface OutcomeEnv {
|
|
|
40
40
|
* all-or-nothing by `env.partialScoring === false` - the rule the React
|
|
41
41
|
* elements apply through `partialScoring.enabled(model, env)`.
|
|
42
42
|
*/
|
|
43
|
-
export declare function effectiveScoringPolicy(model: Pick<
|
|
43
|
+
export declare function effectiveScoringPolicy(model: Pick<VennClassificationModel, 'scoringPolicy'>, env?: OutcomeEnv | null): ScoringPolicy;
|
|
44
44
|
/**
|
|
45
45
|
* Score a session. Scores in every mode, as multiple-choice does: a player
|
|
46
46
|
* calls this with the env it scores under, not only `evaluate`.
|
|
47
47
|
*/
|
|
48
|
-
export declare function outcome(question:
|
|
48
|
+
export declare function outcome(question: VennClassificationModel | null | undefined, session: VennClassificationSession | null | undefined, env?: OutcomeEnv | null): Promise<VennOutcome>;
|
|
49
49
|
/**
|
|
50
50
|
* Build the view model consumed by the delivery Svelte component.
|
|
51
51
|
* Strips `correctRegion` from `tiles` unless the host is in `evaluate` mode so
|
|
52
52
|
* authored answers don't leak in `gather`.
|
|
53
53
|
*/
|
|
54
|
-
export declare function model(question:
|
|
54
|
+
export declare function model(question: VennClassificationModel | null | undefined, session: VennClassificationSession | null | undefined, env?: {
|
|
55
55
|
mode?: string;
|
|
56
56
|
role?: string;
|
|
57
57
|
[key: string]: unknown;
|
|
58
58
|
}): Promise<VennViewModel>;
|
|
59
|
-
export declare function createCorrectResponseSession(question:
|
|
59
|
+
export declare function createCorrectResponseSession(question: VennClassificationModel | null | undefined, env?: {
|
|
60
60
|
mode?: string;
|
|
61
61
|
role?: string;
|
|
62
|
-
}): Promise<
|
|
62
|
+
}): Promise<VennClassificationSession | null>;
|
|
63
63
|
/**
|
|
64
64
|
* Shallow model validation for authoring surfaces. Returns a map of
|
|
65
65
|
* `{field: message}`; an empty map means "valid enough to save".
|
|
66
66
|
*/
|
|
67
|
-
export declare function validate(model:
|
|
67
|
+
export declare function validate(model: VennClassificationModel | null | undefined, _config?: unknown): Record<string, string>;
|
|
68
68
|
/**
|
|
69
69
|
* Helper for authoring-time previews: build a session that places each tile in
|
|
70
70
|
* its authored correct region. Used by the authoring live preview so authors
|
|
71
71
|
* see the intended final state of the diagram.
|
|
72
72
|
*/
|
|
73
|
-
export declare function buildPreviewSession(model:
|
|
73
|
+
export declare function buildPreviewSession(model: VennClassificationModel | null | undefined): VennClassificationSession;
|