cognikit 1.0.2 → 1.1.0
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/builders/classification/index.d.ts +24 -0
- package/dist/builders/fill-blanks/index.d.ts +48 -0
- package/dist/client.js +2574 -2666
- package/dist/client.js.map +4 -4
- package/dist/core/builders/index.d.ts +48 -0
- package/dist/core/index.d.ts +2 -1
- package/dist/core/{BaseInteraction.d.ts → interactions/index.d.ts} +11 -12
- package/dist/engines/index.d.ts +0 -1
- package/dist/engines/tables/index.d.ts +40 -2
- package/dist/engines/tables/{implementation/utils.d.ts → utils.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2570 -2662
- package/dist/index.js.map +4 -4
- package/dist/interactions/adjacency-table/index.d.ts +6 -7
- package/dist/interactions/classification-matrix/index.d.ts +7 -6
- package/dist/interactions/fill-blanks/index.d.ts +36 -2
- package/dist/interactions/index.d.ts +0 -2
- package/dist/interactions/list-recall/index.d.ts +27 -1
- package/dist/interactions/lookup-table/index.d.ts +6 -7
- package/dist/interactions/mark-the-words/index.d.ts +34 -2
- package/dist/interactions/mcq-mrq/index.d.ts +37 -2
- package/dist/interactions/nary-choice-table/index.d.ts +7 -13
- package/dist/interactions/open-classification/index.d.ts +9 -6
- package/dist/interactions/rank-order/index.d.ts +49 -2
- package/dist/interactions/registry.d.ts +5 -5
- package/dist/interactions/sequential-classification/index.d.ts +8 -6
- package/dist/interactions/simultaneous-association/index.d.ts +7 -12
- package/dist/{shared/managers → managers}/AnimationsManager.d.ts +6 -1
- package/dist/managers/DragAndDropManager.d.ts +37 -0
- package/dist/{core/utilities/ProgressTracker.d.ts → managers/ProgressManager.d.ts} +8 -8
- package/dist/managers/ScoringManager.d.ts +73 -0
- package/dist/managers/index.d.ts +4 -0
- package/dist/shared/config.d.ts +1 -1
- package/dist/shared/index.d.ts +0 -2
- package/dist/shared/utils.d.ts +2 -1
- package/dist/shell/builders/index.d.ts +29 -0
- package/dist/shell/index.d.ts +2 -1
- package/dist/shell/{simple-shell/script.d.ts → interactions/index.d.ts} +8 -7
- package/dist/types/Builders.d.ts +17 -0
- package/dist/types/Data.d.ts +49 -9
- package/dist/types/Global.d.ts +2 -23
- package/dist/types/Grading.d.ts +2 -0
- package/dist/types/Input.d.ts +12 -16
- package/dist/types/Interactions.d.ts +10 -14
- package/dist/types/Tables.d.ts +2 -2
- package/dist/ui/{misc/block.d.ts → block/index.d.ts} +1 -1
- package/dist/ui/{misc/chip/chip.d.ts → chip/index.d.ts} +8 -4
- package/dist/ui/{misc/dialog.d.ts → dialog/index.d.ts} +0 -1
- package/dist/ui/index.d.ts +4 -1
- package/dist/ui/input/index.d.ts +22 -1
- package/dist/ui/{misc/media.d.ts → media/index.d.ts} +1 -1
- package/package.json +1 -1
- package/public/app.js +5874 -8649
- package/public/app.js.map +4 -4
- package/public/assets/images/landscape.jpg +0 -0
- package/public/assets/images/mountains.jpg +0 -0
- package/public/builders.html +87 -0
- package/public/examples/data.ts +167 -0
- package/public/index.html +1008 -779
- package/dist/core/utilities/index.d.ts +0 -1
- package/dist/engines/tables/implementation/graders.d.ts +0 -23
- package/dist/engines/tables/implementation/index.d.ts +0 -4
- package/dist/engines/tables/implementation/parsers.d.ts +0 -36
- package/dist/engines/tables/implementation/validators.d.ts +0 -9
- package/dist/engines/tables/script.d.ts +0 -37
- package/dist/engines/text/implementation/graders.d.ts +0 -69
- package/dist/engines/text/implementation/index.d.ts +0 -3
- package/dist/engines/text/implementation/parsers.d.ts +0 -9
- package/dist/engines/text/implementation/validators.d.ts +0 -41
- package/dist/engines/text/index.d.ts +0 -2
- package/dist/engines/text/script.d.ts +0 -56
- package/dist/interactions/categorize-the-words/index.d.ts +0 -2
- package/dist/interactions/categorize-the-words/sequential.d.ts +0 -33
- package/dist/interactions/categorize-the-words/static.d.ts +0 -22
- package/dist/interactions/fill-blanks/sequential.d.ts +0 -32
- package/dist/interactions/fill-blanks/static.d.ts +0 -23
- package/dist/interactions/list-recall/script.d.ts +0 -25
- package/dist/interactions/mark-the-words/sequential.d.ts +0 -34
- package/dist/interactions/mark-the-words/static.d.ts +0 -40
- package/dist/interactions/mcq-mrq/implementation/grader.d.ts +0 -20
- package/dist/interactions/mcq-mrq/implementation/index.d.ts +0 -3
- package/dist/interactions/mcq-mrq/implementation/parser.d.ts +0 -21
- package/dist/interactions/mcq-mrq/implementation/validator.d.ts +0 -17
- package/dist/interactions/mcq-mrq/script.d.ts +0 -37
- package/dist/interactions/rank-order/implementation/grader.d.ts +0 -15
- package/dist/interactions/rank-order/implementation/index.d.ts +0 -3
- package/dist/interactions/rank-order/implementation/parser.d.ts +0 -25
- package/dist/interactions/rank-order/implementation/validator.d.ts +0 -3
- package/dist/interactions/rank-order/script.d.ts +0 -39
- package/dist/interactions/shared/association-implementation/grader.d.ts +0 -3
- package/dist/interactions/shared/association-implementation/index.d.ts +0 -1
- package/dist/interactions/shared/association-implementation/validator.d.ts +0 -0
- package/dist/interactions/shared/classification-implementation/grader.d.ts +0 -3
- package/dist/interactions/shared/classification-implementation/index.d.ts +0 -1
- package/dist/interactions/shared/classification-implementation/parser.d.ts +0 -11
- package/dist/interactions/shared/classification-implementation/validator.d.ts +0 -3
- package/dist/interactions/text-transformation/index.d.ts +0 -2
- package/dist/interactions/text-transformation/sequential.d.ts +0 -37
- package/dist/interactions/text-transformation/static.d.ts +0 -47
- package/dist/shared/dsl.d.ts +0 -9
- package/dist/shared/managers/index.d.ts +0 -3
- package/dist/shared/types.d.ts +0 -25
- package/dist/shell/simple-shell/index.d.ts +0 -1
- package/dist/types/Text.d.ts +0 -125
- package/dist/ui/input/input/index.d.ts +0 -1
- package/dist/ui/input/input/input.d.ts +0 -22
- package/dist/ui/misc/chip/index.d.ts +0 -1
- package/dist/ui/misc/index.d.ts +0 -4
- package/public/assets/images/pointing-hand.svg +0 -1
- package/public/examples/chip.html +0 -495
- package/public/scalable-bare.html +0 -432
- package/public/tables-demo.html +0 -534
- package/public/text-interactions-demo.html +0 -604
- /package/dist/{interactions/list-recall/implementation → builders/list}/index.d.ts +0 -0
- /package/dist/{core/utilities/ScoringTracker.d.ts → builders/matching/inde.d.ts} +0 -0
- /package/dist/{ui/input/color → builders/ordering}/index.d.ts +0 -0
- /package/dist/{ui/input/letter → builders/tables}/index.d.ts +0 -0
- /package/dist/{interactions/list-recall/implementation/grader.d.ts → builders/text/index.d.ts} +0 -0
- /package/dist/interactions/{list-recall/implementation/parser.d.ts → exp/CategorizeTheWords.d.ts} +0 -0
- /package/dist/interactions/{list-recall/implementation/validator.d.ts → exp/DndFillBlanks.d.ts} +0 -0
- /package/dist/interactions/{shared/association-implementation/parser.d.ts → exp/TextTransformation.d.ts} +0 -0
- /package/dist/{shared/managers → managers}/SoundManager.d.ts +0 -0
- /package/dist/ui/{input/color/color-picker.d.ts → exp/color/index.d.ts} +0 -0
- /package/dist/ui/{input/letter/letter-picker.d.ts → exp/letter/index.d.ts} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import "@/interactions/register-builtins";
|
|
2
|
+
export declare class BuildersBaseShell extends HTMLElement {
|
|
3
|
+
private $wrap;
|
|
4
|
+
private $builderName;
|
|
5
|
+
private $interactionSelect;
|
|
6
|
+
private $tabButtons;
|
|
7
|
+
private $validateBtn;
|
|
8
|
+
private $exampleBtn;
|
|
9
|
+
private $syncToggle;
|
|
10
|
+
private $statusBadge;
|
|
11
|
+
private $statusCopy;
|
|
12
|
+
private $issuesPanel;
|
|
13
|
+
private $issuesList;
|
|
14
|
+
private $builderScreen;
|
|
15
|
+
private $previewScreen;
|
|
16
|
+
private currentTab;
|
|
17
|
+
private currentInteractionId;
|
|
18
|
+
private builder;
|
|
19
|
+
private previewShell;
|
|
20
|
+
constructor();
|
|
21
|
+
private populateInteractionSelect;
|
|
22
|
+
private bindShellEvents;
|
|
23
|
+
private getSeedData;
|
|
24
|
+
private setInteraction;
|
|
25
|
+
private selectTab;
|
|
26
|
+
private renderPreview;
|
|
27
|
+
private renderIssues;
|
|
28
|
+
private setStatus;
|
|
29
|
+
}
|
package/dist/shell/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { InteractionsBaseShell } from "./
|
|
1
|
+
export { InteractionsBaseShell } from "./interactions";
|
|
2
|
+
export { BuildersBaseShell } from "./builders";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { BaseInteraction } from "
|
|
2
|
-
import { InteractionData } from "
|
|
1
|
+
import { BaseInteraction } from "@/core";
|
|
2
|
+
import type { InteractionData } from "@/types/Data";
|
|
3
3
|
export declare class InteractionsBaseShell extends HTMLElement {
|
|
4
4
|
static get observedAttributes(): string[];
|
|
5
5
|
private soundManager;
|
|
6
6
|
private animationsManager;
|
|
7
|
+
private $wrap;
|
|
7
8
|
private $titleEl;
|
|
8
9
|
private $closeBtn;
|
|
9
10
|
private $promptBtn;
|
|
@@ -18,7 +19,6 @@ export declare class InteractionsBaseShell extends HTMLElement {
|
|
|
18
19
|
private $progressContainer;
|
|
19
20
|
private $progressBar;
|
|
20
21
|
private $progressIcon;
|
|
21
|
-
private $progressCounter;
|
|
22
22
|
private $interactionScreen;
|
|
23
23
|
private $errorContent;
|
|
24
24
|
private $attemptsMessage;
|
|
@@ -32,12 +32,10 @@ export declare class InteractionsBaseShell extends HTMLElement {
|
|
|
32
32
|
private attemptLimit;
|
|
33
33
|
private currentScreen;
|
|
34
34
|
constructor();
|
|
35
|
+
queryAll(): void;
|
|
35
36
|
connectedCallback(): void;
|
|
36
37
|
disconnectedCallback(): void;
|
|
37
38
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
38
|
-
setInteraction<T extends InteractionData>(interaction: BaseInteraction<T>): void;
|
|
39
|
-
removeInteraction(): void;
|
|
40
|
-
setCloseBtnVisible(visible: boolean, handler?: () => void): void;
|
|
41
39
|
private setupShellListeners;
|
|
42
40
|
private setupInteractionListeners;
|
|
43
41
|
private removeInteractionListeners;
|
|
@@ -53,10 +51,13 @@ export declare class InteractionsBaseShell extends HTMLElement {
|
|
|
53
51
|
private getFormattedTime;
|
|
54
52
|
private updateTimerDisplay;
|
|
55
53
|
private handleTimerComplete;
|
|
56
|
-
pauseTimer(): void;
|
|
57
54
|
resumeTimer(): void;
|
|
58
55
|
resetTimer(): void;
|
|
59
56
|
private updateVisibility;
|
|
60
57
|
private renderRadioNav;
|
|
58
|
+
setInteraction<T extends InteractionData>(interaction: BaseInteraction<T>): void;
|
|
59
|
+
removeInteraction(): void;
|
|
60
|
+
setCloseBtnVisible(visible: boolean, handler?: () => void): void;
|
|
61
|
+
setWallpaper(url: string): void;
|
|
61
62
|
getContentArea(): HTMLElement;
|
|
62
63
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { InteractionData } from "./Data";
|
|
2
|
+
export type BuilderMode = "manual" | "grammar";
|
|
3
|
+
export type ValidationIssue = {
|
|
4
|
+
path: string;
|
|
5
|
+
message: string;
|
|
6
|
+
severity: 'error' | 'warning';
|
|
7
|
+
};
|
|
8
|
+
export type ParsingResult<T extends InteractionData> = {
|
|
9
|
+
ok: boolean;
|
|
10
|
+
data: T | null;
|
|
11
|
+
issues: ValidationIssue[];
|
|
12
|
+
};
|
|
13
|
+
export type ValidationResult = {
|
|
14
|
+
ok: boolean;
|
|
15
|
+
issues: ValidationIssue[];
|
|
16
|
+
};
|
|
17
|
+
export type Validator = (data: InteractionData) => ValidationResult;
|
package/dist/types/Data.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { BaseTableData, ValueTableData } from "./Tables";
|
|
2
|
-
import {
|
|
3
|
-
export type InteractionData = ClassificationData | AssociationData | BaseTableData | ValueTableData |
|
|
2
|
+
import { EduInputData } from "./Input";
|
|
3
|
+
export type InteractionData = ClassificationData | AssociationData | BaseTableData | ValueTableData | MarkTheWordsData | FillBlanksData | FreeRecallData | RecognitionData | SeriationData;
|
|
4
|
+
export type Category = {
|
|
5
|
+
label: string;
|
|
6
|
+
items: string[];
|
|
7
|
+
};
|
|
4
8
|
export type ClassificationData = {
|
|
5
9
|
type: 'classification';
|
|
6
|
-
categories:
|
|
7
|
-
label: string;
|
|
8
|
-
items: string[];
|
|
9
|
-
}[];
|
|
10
|
-
distractors?: string[];
|
|
10
|
+
categories: Category[];
|
|
11
11
|
};
|
|
12
12
|
export type AssociationData = {
|
|
13
13
|
type: 'association';
|
|
@@ -16,17 +16,57 @@ export type AssociationData = {
|
|
|
16
16
|
right: string;
|
|
17
17
|
}[];
|
|
18
18
|
distractors?: string[];
|
|
19
|
+
columnNames?: {
|
|
20
|
+
left: string;
|
|
21
|
+
right: string;
|
|
22
|
+
};
|
|
23
|
+
vertical?: boolean;
|
|
19
24
|
};
|
|
20
25
|
export type SeriationData = {
|
|
21
26
|
type: 'seriation';
|
|
22
27
|
items: string[];
|
|
23
28
|
};
|
|
24
|
-
export type FreeRecallData = SeriationData
|
|
29
|
+
export type FreeRecallData = SeriationData & {
|
|
30
|
+
demandCorrectOrder?: boolean;
|
|
31
|
+
};
|
|
25
32
|
export interface RecognitionData {
|
|
26
33
|
type: 'recognition';
|
|
27
|
-
|
|
34
|
+
items: {
|
|
28
35
|
question: string;
|
|
29
36
|
correctOptions: string[];
|
|
30
37
|
options: string[];
|
|
31
38
|
}[];
|
|
32
39
|
}
|
|
40
|
+
export type Blanks = {
|
|
41
|
+
parts: string[];
|
|
42
|
+
items: {
|
|
43
|
+
id: string;
|
|
44
|
+
ref: string;
|
|
45
|
+
expectedValue: EduInputData;
|
|
46
|
+
}[];
|
|
47
|
+
targets: number[];
|
|
48
|
+
};
|
|
49
|
+
export type FillBlanksData = {
|
|
50
|
+
type: "fill-the-blanks";
|
|
51
|
+
items: Blanks[];
|
|
52
|
+
sequential: Boolean;
|
|
53
|
+
};
|
|
54
|
+
export type TargetWords = {
|
|
55
|
+
parts: string[];
|
|
56
|
+
targets: number[];
|
|
57
|
+
};
|
|
58
|
+
export type MarkTheWordsData = {
|
|
59
|
+
type: "mark-the-words";
|
|
60
|
+
slides: TargetWords[];
|
|
61
|
+
};
|
|
62
|
+
export type TargetCategory = {
|
|
63
|
+
categories: {
|
|
64
|
+
category: string;
|
|
65
|
+
targets: number[];
|
|
66
|
+
}[];
|
|
67
|
+
};
|
|
68
|
+
export type ClassifyTheWordsData = {
|
|
69
|
+
type: "classify-the-words";
|
|
70
|
+
parts: string[];
|
|
71
|
+
categories: TargetCategory[];
|
|
72
|
+
};
|
package/dist/types/Global.d.ts
CHANGED
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export type StyleVariant = 'elegant' | 'playful' | 'outline' | 'letter' | 'sign' | 'minimal' | 'card' | 'glass' | 'empty';
|
|
1
|
+
export type Variant = 'elegant' | 'playful' | 'outline' | 'letter' | 'sign' | 'minimal' | 'card' | 'glass' | 'empty';
|
|
2
|
+
export type Difficulty = 'N/A' | 'WARM-UP' | 'EASY' | 'NORMAL' | 'MEDIUM' | 'HARD' | 'HARDER' | 'EXTREME';
|
|
4
3
|
export type CognitiveOperation = 'discrimination' | 'classification' | 'freerecall' | 'production' | 'association' | 'comparisson' | 'transformation' | 'seriation' | 'recognition' | 'cuedrecall' | 'evaluation';
|
|
5
|
-
export type ParsingResult = {
|
|
6
|
-
ok: boolean;
|
|
7
|
-
data?: InteractionData | null;
|
|
8
|
-
errors?: Record<string, string> | null;
|
|
9
|
-
};
|
|
10
|
-
export type ValidationResult = {
|
|
11
|
-
ok: boolean;
|
|
12
|
-
errors: Record<string, string> | null;
|
|
13
|
-
};
|
|
14
|
-
type DataTypesUnion = InteractionData | InputElementData;
|
|
15
|
-
export type GrammarParseResult<T extends DataTypesUnion = DataTypesUnion> = {
|
|
16
|
-
ok: boolean;
|
|
17
|
-
data?: T | null;
|
|
18
|
-
errors?: SimpleErrorObject | SimpleErrorObject[] | null;
|
|
19
|
-
};
|
|
20
|
-
export type SimpleErrorObject = Record<string, string>;
|
|
21
|
-
export type ComplexErrorObject = SimpleErrorObject[];
|
|
22
|
-
export type GrammarParser<T extends DataTypesUnion = DataTypesUnion> = (code: string) => GrammarParseResult<T>;
|
|
23
|
-
export type Validator = (data: InteractionData) => ValidationResult;
|
|
24
|
-
export {};
|
package/dist/types/Grading.d.ts
CHANGED
package/dist/types/Input.d.ts
CHANGED
|
@@ -1,35 +1,31 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export
|
|
3
|
-
export type MediaRenference = 'im' | 'au' | 'tt' | 'vi' | 'ht';
|
|
4
|
-
export type InputElementData = TextData | NumberData | SelectData | DateData | TimeData;
|
|
5
|
-
interface InputElementBaseData {
|
|
6
|
-
type: InputModality;
|
|
7
|
-
id: string;
|
|
8
|
-
html: string;
|
|
9
|
-
}
|
|
10
|
-
export interface TextData extends InputElementBaseData {
|
|
1
|
+
export type EduInputData = TextData | NumberData | SelectData | DateData | TimeData;
|
|
2
|
+
export interface TextData {
|
|
11
3
|
type: 'text';
|
|
4
|
+
id: string;
|
|
12
5
|
value: string[];
|
|
13
6
|
}
|
|
14
|
-
export interface NumberData
|
|
7
|
+
export interface NumberData {
|
|
15
8
|
type: 'number';
|
|
9
|
+
id: string;
|
|
16
10
|
targets: number[];
|
|
17
11
|
ranges?: {
|
|
18
12
|
from: number;
|
|
19
13
|
to: number;
|
|
20
14
|
}[];
|
|
21
15
|
}
|
|
22
|
-
export interface SelectData
|
|
16
|
+
export interface SelectData {
|
|
23
17
|
type: 'select';
|
|
24
|
-
|
|
18
|
+
id: string;
|
|
25
19
|
options: string[];
|
|
20
|
+
correctOptions: string[];
|
|
26
21
|
}
|
|
27
|
-
export interface DateData
|
|
22
|
+
export interface DateData {
|
|
28
23
|
type: 'date';
|
|
24
|
+
id: string;
|
|
29
25
|
value: string;
|
|
30
26
|
}
|
|
31
|
-
export interface TimeData
|
|
27
|
+
export interface TimeData {
|
|
32
28
|
type: 'time';
|
|
29
|
+
id: string;
|
|
33
30
|
value: string;
|
|
34
31
|
}
|
|
35
|
-
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Variant } from "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Variant } from "./Global";
|
|
2
|
+
import type { AssetType } from "./Assets";
|
|
3
|
+
import type { Difficulty } from "./Global";
|
|
4
4
|
export type InteractionMechanic = 'static' | 'sequential' | 'automatic-sequencing' | 'prefers-horizontal-overflow' | 'prefers-vertical-overflow' | 'implements-open-canvas' | 'game';
|
|
5
|
-
export type IInteractionSpec = unknown;
|
|
6
5
|
export type InteractionConfig = {
|
|
7
6
|
prompt: string;
|
|
8
7
|
promptModality?: AssetType;
|
|
@@ -10,19 +9,16 @@ export type InteractionConfig = {
|
|
|
10
9
|
promptDataSpec?: string;
|
|
11
10
|
variant: Variant;
|
|
12
11
|
shuffle: boolean;
|
|
13
|
-
construct?: string;
|
|
14
|
-
playStaggeringAnimation?: boolean;
|
|
15
12
|
animationsEnabled?: boolean;
|
|
16
13
|
soundEnabled?: boolean;
|
|
17
|
-
inLineFeedback?: boolean;
|
|
18
14
|
immediateFeedback?: boolean;
|
|
15
|
+
showCorrectnessOnFeedback?: boolean;
|
|
19
16
|
attemptLimit: number | null;
|
|
20
17
|
timer: number | null;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
examples: Record<string, string>;
|
|
18
|
+
points?: number;
|
|
19
|
+
minimum?: number;
|
|
20
|
+
accent?: string;
|
|
21
|
+
wallpaper?: string;
|
|
22
|
+
construct?: string;
|
|
23
|
+
difficulty?: Difficulty;
|
|
28
24
|
};
|
package/dist/types/Tables.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Variant } from "
|
|
2
|
-
import { AssetType } from "
|
|
3
|
-
import { NormalizedAssets } from "
|
|
4
|
-
import { GradingState } from "
|
|
1
|
+
import type { Variant } from "@/types/Global";
|
|
2
|
+
import type { AssetType } from "@/types/Assets";
|
|
3
|
+
import type { NormalizedAssets } from "@/types/Assets";
|
|
4
|
+
import type { GradingState } from "@/types/Grading";
|
|
5
|
+
type ChipDisplayMode = 'in-line' | 'dialog';
|
|
5
6
|
/**
|
|
6
7
|
* The key is expected to be something like "@:name", where string[2:] is expected to be a reference to
|
|
7
8
|
* a key in assets.
|
|
@@ -41,6 +42,9 @@ export declare class EduChip extends HTMLElement {
|
|
|
41
42
|
set selected(v: boolean);
|
|
42
43
|
get value(): string;
|
|
43
44
|
set value(v: string);
|
|
45
|
+
get display(): ChipDisplayMode | null;
|
|
46
|
+
set display(v: ChipDisplayMode | null);
|
|
44
47
|
toggle(force?: boolean): boolean;
|
|
45
48
|
removeSelf(): void;
|
|
46
49
|
}
|
|
50
|
+
export {};
|
package/dist/ui/index.d.ts
CHANGED
package/dist/ui/input/index.d.ts
CHANGED
|
@@ -1 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import { Variant } from "@/types/Global";
|
|
2
|
+
export declare class EduInput extends HTMLElement {
|
|
3
|
+
static get observedAttributes(): string[];
|
|
4
|
+
private $slot;
|
|
5
|
+
private controlEl;
|
|
6
|
+
private currentTag;
|
|
7
|
+
constructor();
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
11
|
+
private handleSlotChange;
|
|
12
|
+
private getTag;
|
|
13
|
+
private render;
|
|
14
|
+
private applyAttr;
|
|
15
|
+
private applyBoolAttr;
|
|
16
|
+
private syncAttributes;
|
|
17
|
+
private syncContent;
|
|
18
|
+
get variant(): Variant;
|
|
19
|
+
set variant(v: Variant);
|
|
20
|
+
get value(): string;
|
|
21
|
+
set value(v: string);
|
|
22
|
+
}
|