@enspiredigital/xlms-headless 0.0.12 → 0.0.13

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.
@@ -1,7 +1,7 @@
1
1
  import { DragDropQuestionType, DragDropAnswer, DragDropItem } from '../types';
2
2
  export declare function useDragDrop(question: DragDropQuestionType): {
3
3
  items: DragDropItem[];
4
- dropZones: import('..').DragDropZone[];
4
+ groups: import('..').DragDropGroup[];
5
5
  answers: DragDropAnswer[];
6
6
  availableItems: DragDropItem[];
7
7
  question: DragDropQuestionType;
@@ -10,10 +10,10 @@ export declare function useDragDrop(question: DragDropQuestionType): {
10
10
  isCorrect: boolean | null;
11
11
  attempts: number;
12
12
  canAnswer: boolean;
13
- dropItem: (itemId: string, zoneId: string) => void;
13
+ dropItem: (itemId: string, groupId: string) => void;
14
14
  removeItem: (itemId: string) => void;
15
- moveItem: (itemId: string, newZoneId: string) => void;
16
- getItemsInZone: (zoneId: string) => DragDropItem[];
15
+ moveItem: (itemId: string, newGroupId: string) => void;
16
+ getItemsInGroup: (groupId: string) => DragDropItem[];
17
17
  setDraggingItemId: import('react').Dispatch<import('react').SetStateAction<string | null>>;
18
18
  submit: () => {
19
19
  isCorrect: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"useDragDrop.d.ts","sourceRoot":"","sources":["../../src/hooks/useDragDrop.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,YAAY,EACb,MAAM,UAAU,CAAC;AAElB,wBAAgB,WAAW,CAAC,QAAQ,EAAE,oBAAoB;;;;;;;;;;;uBAwB9B,MAAM,UAAU,MAAM;yBAwBpB,MAAM;uBAKR,MAAM,aAAa,MAAM;6BAKnB,MAAM,KAAG,YAAY,EAAE;;;;;;;;EAsFxD"}
1
+ {"version":3,"file":"useDragDrop.d.ts","sourceRoot":"","sources":["../../src/hooks/useDragDrop.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,YAAY,EACb,MAAM,UAAU,CAAC;AAElB,wBAAgB,WAAW,CAAC,QAAQ,EAAE,oBAAoB;;;;;;;;;;;uBAoB9B,MAAM,WAAW,MAAM;yBAwBrB,MAAM;uBAKR,MAAM,cAAc,MAAM;+BAKlB,MAAM,KAAG,YAAY,EAAE;;;;;;;;EAqF1D"}
@@ -1,8 +1,10 @@
1
1
  import { LabelingQuestionType, LabelingAnswer, LabelingLabel } from '../types';
2
2
  export declare function useLabeling(question: LabelingQuestionType): {
3
- image: import('..').Media;
4
3
  labels: LabelingLabel[];
5
- points: import('..').LabelingPoint[];
4
+ blanks: import('..').LabelingBlank[];
5
+ groups: import('..').LabelingGroup[];
6
+ imageWidth: number | undefined;
7
+ imageHeight: number | undefined;
6
8
  answers: LabelingAnswer[];
7
9
  availableLabels: LabelingLabel[];
8
10
  question: LabelingQuestionType;
@@ -11,11 +13,11 @@ export declare function useLabeling(question: LabelingQuestionType): {
11
13
  isCorrect: boolean | null;
12
14
  attempts: number;
13
15
  canAnswer: boolean;
14
- attachLabel: (labelId: string, pointId: string, x?: number, y?: number) => void;
16
+ attachLabel: (labelId: string, blankId: string, x?: number, y?: number) => void;
15
17
  removeLabel: (labelId: string) => void;
16
- moveLabel: (labelId: string, newPointId: string, x?: number, y?: number) => void;
17
- getLabelAtPoint: (pointId: string) => LabelingLabel | null;
18
- getPointForLabel: (labelId: string) => string | null;
18
+ moveLabel: (labelId: string, newBlankId: string, x?: number, y?: number) => void;
19
+ getLabelAtBlank: (blankId: string) => LabelingLabel | null;
20
+ getBlankForLabel: (labelId: string) => string | null;
19
21
  setDraggingLabelId: import('react').Dispatch<import('react').SetStateAction<string | null>>;
20
22
  submit: () => {
21
23
  isCorrect: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"useLabeling.d.ts","sourceRoot":"","sources":["../../src/hooks/useLabeling.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,aAAa,EACd,MAAM,UAAU,CAAC;AAElB,wBAAgB,WAAW,CAAC,QAAQ,EAAE,oBAAoB;;;;;;;;;;;;2BA0B1B,MAAM,WAAW,MAAM,MAAM,MAAM,MAAM,MAAM;2BAqB/C,MAAM;yBAKR,MAAM,cAAc,MAAM,MAAM,MAAM,MAAM,MAAM;+BAK5C,MAAM,KAAG,aAAa,GAAG,IAAI;gCAW5B,MAAM,KAAG,MAAM,GAAG,IAAI;;;;;;;;EAyE1D"}
1
+ {"version":3,"file":"useLabeling.d.ts","sourceRoot":"","sources":["../../src/hooks/useLabeling.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,aAAa,EACd,MAAM,UAAU,CAAC;AAElB,wBAAgB,WAAW,CAAC,QAAQ,EAAE,oBAAoB;;;;;;;;;;;;;;2BAsB1B,MAAM,WAAW,MAAM,MAAM,MAAM,MAAM,MAAM;2BAqB/C,MAAM;yBAKR,MAAM,cAAc,MAAM,MAAM,MAAM,MAAM,MAAM;+BAK5C,MAAM,KAAG,aAAa,GAAG,IAAI;gCAW5B,MAAM,KAAG,MAAM,GAAG,IAAI;;;;;;;;EA+E1D"}
@@ -1,6 +1,7 @@
1
1
  import { OrderingQuestionType, OrderingItem } from '../types';
2
2
  export declare function useOrdering(question: OrderingQuestionType): {
3
3
  items: OrderingItem[];
4
+ groups: import('..').OrderingGroup[];
4
5
  orderedItems: OrderingItem[];
5
6
  orderedItemIds: string[];
6
7
  question: OrderingQuestionType;
@@ -1 +1 @@
1
- {"version":3,"file":"useOrdering.d.ts","sourceRoot":"","sources":["../../src/hooks/useOrdering.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE9D,wBAAgB,WAAW,CAAC,QAAQ,EAAE,oBAAoB;;;;;;;;;;0BA0B3B,MAAM,WAAW,MAAM;qBAU5B,MAAM;uBAQJ,MAAM;6BAQA,MAAM,eAAe,MAAM;;;;;;;;EAuE5D"}
1
+ {"version":3,"file":"useOrdering.d.ts","sourceRoot":"","sources":["../../src/hooks/useOrdering.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE9D,wBAAgB,WAAW,CAAC,QAAQ,EAAE,oBAAoB;;;;;;;;;;;0BA0B3B,MAAM,WAAW,MAAM;qBAU5B,MAAM;uBAQJ,MAAM;6BAQA,MAAM,eAAe,MAAM;;;;;;;;EAqE5D"}