cognikit 0.1.2 → 1.0.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/README.md +309 -237
- package/dist/client.d.ts +2 -1
- package/dist/client.js +264 -193
- package/dist/client.js.map +3 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.js +250 -179
- package/dist/index.js.map +3 -3
- package/dist/interactions/shared/classification-implementation/grader.d.ts +1 -1
- package/dist/shared/config.d.ts +10 -2
- package/dist/shell/simple-shell/script.d.ts +0 -1
- package/package.json +1 -1
- package/public/app.js +331 -140
- package/public/app.js.map +2 -2
- package/public/assets/DEMONSTRATION-1.jpeg +0 -0
- package/public/index.html +62 -16
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ClassificationData } from "../../../types/Data";
|
|
2
2
|
import { GradingResult } from "../../../types/Grading";
|
|
3
|
-
export declare function classificationGrader(correctData: ClassificationData["categories"], userData: Map<string, string>, els: any): GradingResult;
|
|
3
|
+
export declare function classificationGrader(correctData: ClassificationData["categories"], userData: Map<string, string>, els: any, distractors?: string[]): GradingResult;
|
package/dist/shared/config.d.ts
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import type { SoundName } from "./managers/SoundManager";
|
|
2
2
|
export type CognikitThemeVariableName = "--edu-bg" | "--edu-card" | "--edu-ink" | "--edu-second-ink" | "--edu-third-ink" | "--edu-inverted-ink" | "--edu-success" | "--edu-error" | "--edu-warning" | "--edu-neutral" | "--edu-first-accent" | "--edu-second-accent" | "--edu-third-accent" | "--edu-border" | "--edu-muted" | "--edu-radius" | "--edu-shadow-color" | "--edu-pad" | "--edu-mar";
|
|
3
3
|
export type CognikitThemeVariables = Record<CognikitThemeVariableName, string>;
|
|
4
|
+
export type CognikitThemeName = "default-light" | "default-dark" | "ocean-light" | "ocean-dark" | "forest-light" | "forest-dark";
|
|
4
5
|
export type CognikitConfig = {
|
|
5
6
|
audioBaseUrl?: string | null;
|
|
6
7
|
soundFiles?: Partial<Record<SoundName, string>>;
|
|
7
8
|
injectThemeVariables?: boolean;
|
|
8
|
-
|
|
9
|
+
theme?: CognikitThemeName | null;
|
|
10
|
+
themeVariables?: Partial<CognikitThemeVariables> | null;
|
|
9
11
|
};
|
|
12
|
+
export declare const cognikitThemePresets: Record<CognikitThemeName, CognikitThemeVariables>;
|
|
10
13
|
export declare const defaultCognikitThemeVariables: CognikitThemeVariables;
|
|
11
|
-
declare const cognikitConfig: Required<Omit<CognikitConfig, "themeVariables">> & {
|
|
14
|
+
declare const cognikitConfig: Required<Omit<CognikitConfig, "theme" | "themeVariables">> & {
|
|
15
|
+
theme: CognikitThemeName | null;
|
|
12
16
|
themeVariables: Partial<CognikitThemeVariables>;
|
|
13
17
|
};
|
|
14
18
|
export declare function configureCognikit(config: CognikitConfig): void;
|
|
15
19
|
export declare function getCognikitConfig(): Readonly<typeof cognikitConfig>;
|
|
20
|
+
export declare function getCognikitThemePresets(): Readonly<typeof cognikitThemePresets>;
|
|
21
|
+
export declare function resolveCognikitTheme(theme?: CognikitThemeName | null, themeVariables?: Partial<CognikitThemeVariables>): CognikitThemeVariables;
|
|
22
|
+
export declare function setCognikitTheme(theme: CognikitThemeName | null, themeVariables?: Partial<CognikitThemeVariables>): void;
|
|
23
|
+
export declare function resetCognikitTheme(): void;
|
|
16
24
|
export declare function ensureCognikitTheme(): void;
|
|
17
25
|
export declare function resolveConfiguredSoundUrl(soundName: SoundName, defaultFilename: string): string | null;
|
|
18
26
|
export {};
|