@examplary/ui 1.1.0 → 1.2.1

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/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- export * from "./utils";
2
1
  export * from "./components/rich-text";
3
- export * as WebComponents from "./components/web-components";
2
+ export * from "./components/web-components";
3
+ export * from "./utils";
4
+ export * from "./types";
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
- export * from "./utils";
2
1
  export * from "./components/rich-text";
3
- export * as WebComponents from "./components/web-components";
2
+ export * from "./components/web-components";
3
+ export * from "./utils";
4
+ export * from "./types";
@@ -0,0 +1,27 @@
1
+ import { type ComponentType } from "react";
2
+ type Answer = {
3
+ value: string | string[];
4
+ completed?: boolean;
5
+ context?: any;
6
+ };
7
+ export type FrontendAssessmentComponent = ComponentType<{
8
+ question: any;
9
+ isPreview: boolean;
10
+ isLoading: boolean;
11
+ answer?: Answer;
12
+ saveAnswer: (answer: Answer) => Promise<void>;
13
+ }>;
14
+ export type FrontendPrintComponent = ComponentType<{
15
+ question: any;
16
+ answerBoxes: boolean;
17
+ }>;
18
+ export type FrontendResultsComponent = ComponentType<{
19
+ question: any;
20
+ answer: Answer;
21
+ }>;
22
+ export type FrontendQuestionSettingsAreaComponent = ComponentType<{
23
+ question: any;
24
+ value: any;
25
+ onChange: (value: any) => void;
26
+ }>;
27
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./frontend-components";
@@ -0,0 +1 @@
1
+ export * from "./frontend-components";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@examplary/ui",
3
3
  "description": "UI components for the Examplary testing platform.",
4
4
  "packageManager": "yarn@4.5.3",
5
- "version": "1.1.0",
5
+ "version": "1.2.1",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "files": [
@@ -33,6 +33,10 @@
33
33
  "tailwind-merge": "^3.3.1",
34
34
  "tailwindcss-animate": "^1.0.7"
35
35
  },
36
+ "peerDependencies": {
37
+ "react": ">=18.0.0",
38
+ "react-dom": ">=18.0.0"
39
+ },
36
40
  "devDependencies": {
37
41
  "typescript": "^5.8.3"
38
42
  },