@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
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* the controller (for scoring / validation) and delivery (for rendering)
|
|
7
7
|
* can share them.
|
|
8
8
|
*/
|
|
9
|
-
import type { Region, VennCircle,
|
|
9
|
+
import type { Region, VennCircle, VennClassificationModel } from '../types.js';
|
|
10
10
|
/**
|
|
11
11
|
* Returns the canonical region key: sorted-ascending indexes joined by commas.
|
|
12
12
|
* Outside / "neither" region is the empty string.
|
|
@@ -43,4 +43,4 @@ export declare function composeRegionLabel(circles: VennCircle[], region: Region
|
|
|
43
43
|
* `model.regionLabels` keyed by region-key, falling back to the auto-composed
|
|
44
44
|
* label.
|
|
45
45
|
*/
|
|
46
|
-
export declare function getRegionLabel(model: Pick<
|
|
46
|
+
export declare function getRegionLabel(model: Pick<VennClassificationModel, 'circles' | 'regionLabels' | 'language'>, region: Region): string;
|
package/dist/delivery/dnd.d.ts
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* it can be tested in isolation and stays identical between pointer and
|
|
7
7
|
* keyboard paths.
|
|
8
8
|
*/
|
|
9
|
-
import type { Region,
|
|
9
|
+
import type { Region, VennClassificationModel, VennClassificationSession, VennTile } from '../types.js';
|
|
10
10
|
export type PlacementValue = Region | null;
|
|
11
11
|
export interface ApplyPlacementArgs {
|
|
12
|
-
model:
|
|
13
|
-
session:
|
|
12
|
+
model: VennClassificationModel;
|
|
13
|
+
session: VennClassificationSession | null | undefined;
|
|
14
14
|
tileId: string;
|
|
15
15
|
/** `null` means "return to tray", otherwise the region to drop into. */
|
|
16
16
|
placement: PlacementValue;
|
|
@@ -28,18 +28,18 @@ export interface ApplyPlacementArgs {
|
|
|
28
28
|
* placement, and never on `set session`: a player counts a session carrying
|
|
29
29
|
* content as a response.
|
|
30
30
|
*/
|
|
31
|
-
export declare function applyPlacement({ model, session, tileId, placement, }: ApplyPlacementArgs):
|
|
31
|
+
export declare function applyPlacement({ model, session, tileId, placement, }: ApplyPlacementArgs): VennClassificationSession;
|
|
32
32
|
/** The tile's current placement: `null` when it is in the tray or has no key. */
|
|
33
|
-
export declare function currentPlacement(session:
|
|
33
|
+
export declare function currentPlacement(session: VennClassificationSession | null | undefined, tileId: string): PlacementValue;
|
|
34
34
|
/** True when dropping `tileId` at `placement` would leave the session as it is. */
|
|
35
|
-
export declare function isSamePlacement(session:
|
|
35
|
+
export declare function isSamePlacement(session: VennClassificationSession | null | undefined, tileId: string, placement: PlacementValue): boolean;
|
|
36
36
|
/**
|
|
37
37
|
* Compute the list of unplaced tile ids (in `model.tiles` order).
|
|
38
38
|
*/
|
|
39
|
-
export declare function unplacedTiles(model:
|
|
39
|
+
export declare function unplacedTiles(model: VennClassificationModel, session: VennClassificationSession | null | undefined): VennTile[];
|
|
40
40
|
/**
|
|
41
41
|
* Group placed tiles by their region key, in `model.tiles` order. Unplaced
|
|
42
42
|
* tiles are omitted. Used by the delivery component to drive slot-position
|
|
43
43
|
* indices within a region.
|
|
44
44
|
*/
|
|
45
|
-
export declare function groupTilesByRegion(model:
|
|
45
|
+
export declare function groupTilesByRegion(model: VennClassificationModel, session: VennClassificationSession | null | undefined): Record<string, VennTile[]>;
|
package/dist/delivery/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const VennClassificationElement: import("@pie-lib/delivery-events-svelte").DeliveryElementConstructor<
|
|
1
|
+
import type { VennClassificationModel, VennClassificationSession } from '../types.js';
|
|
2
|
+
declare const VennClassificationElement: import("@pie-lib/delivery-events-svelte").DeliveryElementConstructor<VennClassificationModel, VennClassificationSession>;
|
|
3
3
|
export default VennClassificationElement;
|