@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.
Files changed (38) hide show
  1. package/dist/author/index.js +280 -277
  2. package/dist/author/index.js.map +1 -1
  3. package/dist/browser/{VennClassification-DKBN96xP.js → VennClassification-CaHr-K1i.js} +483 -480
  4. package/dist/browser/VennClassification-CaHr-K1i.js.map +1 -0
  5. package/dist/browser/author/index.js +1 -1
  6. package/dist/browser/author/index.js.map +1 -1
  7. package/dist/browser/controller--P8AQebj.js.map +1 -1
  8. package/dist/browser/delivery/index.js +1 -1
  9. package/dist/browser/delivery/index.js.map +1 -1
  10. package/dist/browser/editor-runtime/{VennClassification-DKBN96xP.js → VennClassification-CaHr-K1i.js} +483 -480
  11. package/dist/browser/editor-runtime/VennClassification-CaHr-K1i.js.map +1 -0
  12. package/dist/browser/editor-runtime/author/index.js +1 -1
  13. package/dist/browser/editor-runtime/author/index.js.map +1 -1
  14. package/dist/browser/editor-runtime/controller--P8AQebj.js.map +1 -1
  15. package/dist/browser/editor-runtime/delivery/index.js +1 -1
  16. package/dist/browser/editor-runtime/delivery/index.js.map +1 -1
  17. package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-BMXH-FVH.js → mathjax-CptWnMbQ-DVFde9An.js} +15 -15
  18. package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-BMXH-FVH.js.map → mathjax-CptWnMbQ-DVFde9An.js.map} +1 -1
  19. package/dist/browser/{mathjax-BKrHE4xs-BMXH-FVH.js → mathjax-CptWnMbQ-DVFde9An.js} +15 -15
  20. package/dist/browser/{mathjax-BKrHE4xs-BMXH-FVH.js.map → mathjax-CptWnMbQ-DVFde9An.js.map} +1 -1
  21. package/dist/controller/defaults.d.ts +6 -6
  22. package/dist/controller/index.d.ts +13 -13
  23. package/dist/controller/index.js.map +1 -1
  24. package/dist/controller/region.d.ts +2 -2
  25. package/dist/delivery/dnd.d.ts +8 -8
  26. package/dist/delivery/index.d.ts +2 -2
  27. package/dist/delivery/index.js +280 -277
  28. package/dist/delivery/index.js.map +1 -1
  29. package/dist/delivery/layout.d.ts +2 -2
  30. package/dist/index.d.ts +1 -0
  31. package/dist/index.iife.js +19 -19
  32. package/dist/schemas/configuration.schema.json +41 -0
  33. package/dist/schemas/model.schema.json +375 -0
  34. package/dist/schemas/session.schema.json +40 -0
  35. package/dist/types.d.ts +33 -4
  36. package/package.json +9 -5
  37. package/dist/browser/VennClassification-DKBN96xP.js.map +0 -1
  38. package/dist/browser/editor-runtime/VennClassification-DKBN96xP.js.map +0 -1
@@ -1,20 +1,20 @@
1
- import type { VennModel } from '../types.js';
1
+ import type { VennClassificationModel } from '../types.js';
2
2
  declare const _default: {
3
- model: VennModel;
3
+ model: Omit<VennClassificationModel, "id" | "element">;
4
4
  configuration: {
5
5
  prompt: {
6
6
  label: string;
7
- settings: boolean;
7
+ settings: true;
8
8
  };
9
9
  scoringPolicy: {
10
10
  label: string;
11
- settings: boolean;
11
+ settings: true;
12
12
  };
13
13
  teacherInstructions: {
14
14
  label: string;
15
- settings: boolean;
15
+ settings: true;
16
16
  };
17
- settingsPanelDisabled: boolean;
17
+ settingsPanelDisabled: false;
18
18
  };
19
19
  };
20
20
  export default _default;
@@ -1,30 +1,30 @@
1
- import type { Region, ScoringPolicy, VennModel, VennSession, VennTile, VennViewModel } from '../types.js';
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, VennModel, VennSession, VennTile, VennViewModel, } from '../types.js';
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<VennModel>): VennModel;
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: VennSession | null | undefined, model?: VennModel): VennSession;
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: VennModel | null | undefined, session: VennSession | null | undefined): boolean;
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: VennModel, session: VennSession | null | undefined): Record<string, Correctness>;
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<VennModel, 'scoringPolicy'>, env?: OutcomeEnv | null): ScoringPolicy;
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: VennModel | null | undefined, session: VennSession | null | undefined, env?: OutcomeEnv | null): Promise<VennOutcome>;
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: VennModel | null | undefined, session: VennSession | null | undefined, env?: {
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: VennModel | null | undefined, env?: {
59
+ export declare function createCorrectResponseSession(question: VennClassificationModel | null | undefined, env?: {
60
60
  mode?: string;
61
61
  role?: string;
62
- }): Promise<VennSession | null>;
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: VennModel | null | undefined, _config?: unknown): Record<string, string>;
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: VennModel | null | undefined): VennSession;
73
+ export declare function buildPreviewSession(model: VennClassificationModel | null | undefined): VennClassificationSession;