@examplary/cli 1.0.0 → 1.2.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/.turbo/turbo-release.log +150 -68
- package/package.json +13 -12
- package/src/commands/preview.js +7 -1
- package/src/preview-ui/App.tsx +9 -25
- package/src/preview-ui/components/json-editor.tsx +4 -18
- package/src/preview-ui/components/preview-assessment.tsx +4 -3
- package/src/preview-ui/components/preview-results.tsx +2 -0
- package/src/preview-ui/components/preview-settings-area.tsx +17 -11
- package/src/preview-ui/index.html +7 -0
- package/src/preview-ui/lib/demo-api.ts +29 -0
package/.turbo/turbo-release.log
CHANGED
|
@@ -1,69 +1,151 @@
|
|
|
1
|
-
[4:
|
|
2
|
-
[4:
|
|
3
|
-
[4:
|
|
4
|
-
[4:
|
|
5
|
-
[4:
|
|
6
|
-
[4:
|
|
7
|
-
[4:
|
|
8
|
-
[4:
|
|
9
|
-
[4:
|
|
10
|
-
[4:
|
|
11
|
-
[4:
|
|
12
|
-
[4:
|
|
13
|
-
[4:
|
|
14
|
-
[4:
|
|
1
|
+
[4:28:02 PM] [semantic-release] › ℹ Running semantic-release version 24.2.9
|
|
2
|
+
[4:28:02 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/npm"
|
|
3
|
+
[4:28:02 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/github"
|
|
4
|
+
[4:28:02 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/npm"
|
|
5
|
+
[4:28:02 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/npm"
|
|
6
|
+
[4:28:02 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/github"
|
|
7
|
+
[4:28:02 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/npm"
|
|
8
|
+
[4:28:02 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/github"
|
|
9
|
+
[4:28:11 PM] [semantic-release] › ✔ Run automated release from branch main on repository https://github.com/examplary-ai/examplary
|
|
10
|
+
[4:28:11 PM] [semantic-release] › ✔ Allowed to push to the Git repository
|
|
11
|
+
[4:28:11 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/npm"
|
|
12
|
+
[4:28:11 PM] [semantic-release] [@semantic-release/npm] › ℹ Verify authentication for registry https://registry.npmjs.org/
|
|
13
|
+
[4:28:11 PM] [semantic-release] [@semantic-release/npm] › ℹ Reading npm config from /home/runner/work/examplary/examplary/.npmrc
|
|
14
|
+
[4:28:11 PM] [semantic-release] [@semantic-release/npm] › ℹ Wrote NPM_TOKEN to /tmp/f3e36bc995df999594c039df4aa6c553/.npmrc
|
|
15
15
|
tschoffelen
|
|
16
|
-
[4:
|
|
17
|
-
[4:
|
|
18
|
-
[4:
|
|
19
|
-
[4:
|
|
20
|
-
[4:
|
|
21
|
-
[4:
|
|
22
|
-
[4:
|
|
23
|
-
[4:
|
|
24
|
-
[4:
|
|
25
|
-
[4:
|
|
26
|
-
[4:
|
|
27
|
-
[4:
|
|
28
|
-
[4:
|
|
29
|
-
[4:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
[4:
|
|
46
|
-
[4:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
[4:
|
|
62
|
-
[4:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
[
|
|
66
|
-
|
|
67
|
-
[
|
|
68
|
-
|
|
69
|
-
|
|
16
|
+
[4:28:12 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/npm"
|
|
17
|
+
[4:28:12 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/github"
|
|
18
|
+
[4:28:12 PM] [semantic-release] [@semantic-release/github] › ℹ Verify GitHub authentication (https://api.github.com)
|
|
19
|
+
[4:28:12 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/github"
|
|
20
|
+
[4:28:12 PM] [semantic-release] › ℹ Found git tag @examplary/cli-v1.1.0 associated with version 1.1.0 on branch main
|
|
21
|
+
[4:28:12 PM] [semantic-release] › ℹ Found 296 commits since last release
|
|
22
|
+
[4:28:12 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
23
|
+
[4:28:12 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
|
|
24
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Found 7 commits for package @examplary/cli since last release
|
|
25
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analyzing commit: chore(cli): remove scoring criteria from preview UI
|
|
26
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ The commit should not trigger a release
|
|
27
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analyzing commit: feat(cli): improve question development preview CLI tool
|
|
28
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ The release type for the commit is minor
|
|
29
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analyzing commit: chore(deps): bump tailwindcss from 4.1.12 to 4.1.14
|
|
30
|
+
|
|
31
|
+
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) from 4.1.12 to 4.1.14.
|
|
32
|
+
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
|
|
33
|
+
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
|
|
34
|
+
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.14/packages/tailwindcss)
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
updated-dependencies:
|
|
38
|
+
- dependency-name: tailwindcss
|
|
39
|
+
dependency-version: 4.1.14
|
|
40
|
+
dependency-type: direct:production
|
|
41
|
+
update-type: version-update:semver-patch
|
|
42
|
+
...
|
|
43
|
+
|
|
44
|
+
Signed-off-by: dependabot[bot] <support@github.com>
|
|
45
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ The commit should not trigger a release
|
|
46
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analyzing commit: chore(deps): bump react-i18next from 15.6.1 to 16.0.0
|
|
47
|
+
|
|
48
|
+
Bumps [react-i18next](https://github.com/i18next/react-i18next) from 15.6.1 to 16.0.0.
|
|
49
|
+
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
|
|
50
|
+
- [Commits](https://github.com/i18next/react-i18next/compare/v15.6.1...v16.0.0)
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
updated-dependencies:
|
|
54
|
+
- dependency-name: react-i18next
|
|
55
|
+
dependency-version: 16.0.0
|
|
56
|
+
dependency-type: direct:production
|
|
57
|
+
update-type: version-update:semver-major
|
|
58
|
+
...
|
|
59
|
+
|
|
60
|
+
Signed-off-by: dependabot[bot] <support@github.com>
|
|
61
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ The commit should not trigger a release
|
|
62
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analyzing commit: chore(deps): bump @vitejs/plugin-react from 4.7.0 to 5.0.4
|
|
63
|
+
|
|
64
|
+
Bumps [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react) from 4.7.0 to 5.0.4.
|
|
65
|
+
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
|
|
66
|
+
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md)
|
|
67
|
+
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/plugin-react@5.0.4/packages/plugin-react)
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
updated-dependencies:
|
|
71
|
+
- dependency-name: "@vitejs/plugin-react"
|
|
72
|
+
dependency-version: 5.0.4
|
|
73
|
+
dependency-type: direct:production
|
|
74
|
+
update-type: version-update:semver-major
|
|
75
|
+
...
|
|
76
|
+
|
|
77
|
+
Signed-off-by: dependabot[bot] <support@github.com>
|
|
78
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ The commit should not trigger a release
|
|
79
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analyzing commit: chore(dashboard): remove monaco dep
|
|
80
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ The commit should not trigger a release
|
|
81
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analyzing commit: chore(schemas): remove deprecated keys
|
|
82
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ The commit should not trigger a release
|
|
83
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analysis of 7 commits complete: minor release
|
|
84
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
|
|
85
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
86
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
87
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/release-notes-generator" does not provide step "analyzeCommits"
|
|
88
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
89
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
90
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/npm" does not provide step "analyzeCommits"
|
|
91
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
92
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
93
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/github" does not provide step "analyzeCommits"
|
|
94
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
95
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
96
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
97
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
98
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
99
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
100
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
101
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
102
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
103
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
104
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
105
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
106
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
107
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
108
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
109
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
110
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
111
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
112
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
113
|
+
[4:28:14 PM] [semantic-release] › ℹ The next release version is 1.2.0
|
|
114
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
115
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/commit-analyzer" does not provide step "generateNotes"
|
|
116
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
117
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
118
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
|
|
119
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Found 7 commits for package @examplary/cli since last release
|
|
120
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
|
|
121
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
122
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
123
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/npm" does not provide step "generateNotes"
|
|
124
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
125
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
126
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/github" does not provide step "generateNotes"
|
|
127
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
128
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
129
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
130
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
131
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
132
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
133
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
134
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
135
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
136
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
137
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
138
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
139
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
140
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
141
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
142
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
143
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
144
|
+
[4:28:14 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
145
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
146
|
+
[4:28:14 PM] [semantic-release] › ℹ Start step "prepare" of plugin "@semantic-release/npm"
|
|
147
|
+
[4:28:14 PM] [semantic-release] [@semantic-release/npm] › ℹ Write version 1.2.0 to package.json in /home/runner/work/examplary/examplary/cli
|
|
148
|
+
@examplary/cli
|
|
149
|
+
v1.2.0
|
|
150
|
+
[4:28:14 PM] [semantic-release] › ✔ Completed step "prepare" of plugin "@semantic-release/npm"
|
|
151
|
+
[4:28:16 PM] [semantic-release] › ✔ Created tag @examplary/cli-v1.2.0
|
package/package.json
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
"name": "@examplary/cli",
|
|
3
3
|
"description": "A bundler for Examplary question types.",
|
|
4
4
|
"packageManager": "yarn@4.8.1",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.2.0",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"bin":
|
|
7
|
+
"bin": {
|
|
8
|
+
"exp": "./bin/index.js"
|
|
9
|
+
},
|
|
8
10
|
"scripts": {
|
|
9
11
|
"release": "semantic-release -e semantic-release-monorepo"
|
|
10
12
|
},
|
|
@@ -18,31 +20,30 @@
|
|
|
18
20
|
"@examplary/schemas": "*",
|
|
19
21
|
"@examplary/ui": "*",
|
|
20
22
|
"@hono/node-server": "^1.19.0",
|
|
21
|
-
"@monaco-editor/react": "^4.7.0",
|
|
22
23
|
"@tailwindcss/postcss": "^4.1.11",
|
|
23
24
|
"@tailwindcss/vite": "^4.1.11",
|
|
24
|
-
"@vitejs/plugin-react": "^
|
|
25
|
+
"@vitejs/plugin-react": "^5.0.4",
|
|
25
26
|
"esbuild": "^0.25.8",
|
|
26
|
-
"hono": "^4.
|
|
27
|
+
"hono": "^4.9.12",
|
|
27
28
|
"i18next": "^25.3.2",
|
|
28
29
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
29
30
|
"lucide-react": "^0.535.0",
|
|
30
31
|
"open": "^10.2.0",
|
|
31
32
|
"postcss": "^8.5.6",
|
|
32
|
-
"react": "^19.
|
|
33
|
-
"react-dom": "^19.
|
|
33
|
+
"react": "^19.0.0",
|
|
34
|
+
"react-dom": "^19.0.0",
|
|
34
35
|
"react-error-boundary": "^6.0.0",
|
|
35
|
-
"react-i18next": "^
|
|
36
|
-
"swr": "^2.3.
|
|
37
|
-
"tailwindcss": "^4.1.
|
|
36
|
+
"react-i18next": "^16.0.0",
|
|
37
|
+
"swr": "^2.3.6",
|
|
38
|
+
"tailwindcss": "^4.1.14",
|
|
38
39
|
"use-local-storage": "^3.0.0",
|
|
39
|
-
"vite": "^7.
|
|
40
|
+
"vite": "^7.1.10",
|
|
40
41
|
"ws": "^8.18.3",
|
|
41
42
|
"yargs": "^18.0.0"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
45
|
"@types/node": "^24.1.0",
|
|
45
|
-
"typescript": "^5.
|
|
46
|
+
"typescript": "^5.9.2"
|
|
46
47
|
},
|
|
47
48
|
"homepage": "https://developers.examplary.ai/",
|
|
48
49
|
"author": {
|
package/src/commands/preview.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { watch } from "fs";
|
|
3
3
|
import { stat, readFile } from "fs/promises";
|
|
4
4
|
import { createServer as createHttpServer } from "http";
|
|
5
|
-
import { join, resolve } from "path";
|
|
5
|
+
import path, { join, resolve } from "path";
|
|
6
6
|
import { cwd, exit } from "process";
|
|
7
7
|
|
|
8
8
|
import { serve } from "@hono/node-server";
|
|
@@ -41,6 +41,12 @@ export const previewCommand = async (argv) => {
|
|
|
41
41
|
appType: "custom",
|
|
42
42
|
root,
|
|
43
43
|
plugins: [react(), tailwindcss()],
|
|
44
|
+
resolve: {
|
|
45
|
+
alias: {
|
|
46
|
+
react: path.dirname(import.meta.resolve("react")),
|
|
47
|
+
"react-dom": path.dirname(import.meta.resolve("react-dom")),
|
|
48
|
+
},
|
|
49
|
+
},
|
|
44
50
|
});
|
|
45
51
|
|
|
46
52
|
app.get("/api/bundle", async (c) => {
|
package/src/preview-ui/App.tsx
CHANGED
|
@@ -53,30 +53,14 @@ function App() {
|
|
|
53
53
|
"When Napoleon Bonaparte rose to power, he was seen as a hero of the French Revolution. However, his actions and policies during his rule have been debated by historians. What was Napoleon's role in the French Revolution?",
|
|
54
54
|
settings: {
|
|
55
55
|
...defaultSettings,
|
|
56
|
-
scoringCriteria: [
|
|
57
|
-
"The answer must correctly identify Napoleon's role in the French Revolution and provide relevant historical context.",
|
|
58
|
-
],
|
|
59
56
|
options: [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
correct: false,
|
|
67
|
-
value:
|
|
68
|
-
"To overthrow the revolutionary government and establish a dictatorship.",
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
correct: false,
|
|
72
|
-
value:
|
|
73
|
-
"To maintain the status quo and prevent further revolutionary changes.",
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
correct: false,
|
|
77
|
-
value: "To support the monarchy and restore the old regime.",
|
|
78
|
-
},
|
|
57
|
+
"To establish a centralized legal system and promote the principles of the Revolution.",
|
|
58
|
+
"To overthrow the revolutionary government and establish a dictatorship.",
|
|
59
|
+
"To maintain the status quo and prevent further revolutionary changes.",
|
|
60
|
+
"To support the monarchy and restore the old regime.",
|
|
79
61
|
],
|
|
62
|
+
correctAnswer:
|
|
63
|
+
"To establish a centralized legal system and promote the principles of the Revolution.",
|
|
80
64
|
},
|
|
81
65
|
},
|
|
82
66
|
);
|
|
@@ -88,7 +72,7 @@ function App() {
|
|
|
88
72
|
<h2 className="text-sm opacity-50">Question type preview</h2>
|
|
89
73
|
|
|
90
74
|
<h3 className="text-sm font-medium mb-1.5 mt-8">Preview options</h3>
|
|
91
|
-
<div className="grid grid-cols-3 items-center gap-3 border-
|
|
75
|
+
<div className="grid grid-cols-3 items-center gap-3 border border-border-accent rounded-md bg-white p-4">
|
|
92
76
|
<p className="text-gray-800 text-sm">Component</p>
|
|
93
77
|
<Select value={componentName} onValueChange={setComponentName}>
|
|
94
78
|
<SelectTrigger className="text-sm col-span-2">
|
|
@@ -118,12 +102,12 @@ function App() {
|
|
|
118
102
|
</div>
|
|
119
103
|
|
|
120
104
|
<h3 className="text-sm font-medium mb-1.5 mt-8">Question</h3>
|
|
121
|
-
<div className="border-
|
|
105
|
+
<div className="border border-border-accent rounded-md bg-white overflow-hidden">
|
|
122
106
|
<JsonEditor value={question} setValue={setQuestion} />
|
|
123
107
|
</div>
|
|
124
108
|
|
|
125
109
|
<h3 className="text-sm font-medium mb-1.5 mt-8">Answer</h3>
|
|
126
|
-
<div className="border-
|
|
110
|
+
<div className="border border-border-accent rounded-md bg-white overflow-hidden">
|
|
127
111
|
<JsonEditor value={answer} setValue={setAnswer} />
|
|
128
112
|
</div>
|
|
129
113
|
</aside>
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
2
|
|
|
3
|
-
import { Editor } from "@monaco-editor/react";
|
|
4
|
-
|
|
5
3
|
export const JsonEditor = ({ value, setValue }) => {
|
|
6
4
|
const [stringValue, setStringValue] = useState(() =>
|
|
7
5
|
JSON.stringify(value, null, 2),
|
|
@@ -11,11 +9,11 @@ export const JsonEditor = ({ value, setValue }) => {
|
|
|
11
9
|
}, [value]);
|
|
12
10
|
|
|
13
11
|
return (
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
defaultLanguage="json"
|
|
12
|
+
<textarea
|
|
13
|
+
className="h-[160px] font-mono text-xs p-3 w-full"
|
|
17
14
|
value={stringValue}
|
|
18
|
-
onChange={(
|
|
15
|
+
onChange={(e) => {
|
|
16
|
+
const newStringValue = e.target.value;
|
|
19
17
|
setStringValue(newStringValue || "");
|
|
20
18
|
try {
|
|
21
19
|
const parsedValue = JSON.parse(newStringValue || "");
|
|
@@ -24,18 +22,6 @@ export const JsonEditor = ({ value, setValue }) => {
|
|
|
24
22
|
console.error("Invalid JSON:", error);
|
|
25
23
|
}
|
|
26
24
|
}}
|
|
27
|
-
options={{
|
|
28
|
-
minimap: { enabled: false },
|
|
29
|
-
stickyScroll: { enabled: false },
|
|
30
|
-
tabSize: 3,
|
|
31
|
-
fontSize: 11,
|
|
32
|
-
lineNumbers: "off",
|
|
33
|
-
scrollBeyondLastLine: false,
|
|
34
|
-
padding: {
|
|
35
|
-
top: 8,
|
|
36
|
-
bottom: 8,
|
|
37
|
-
},
|
|
38
|
-
}}
|
|
39
25
|
/>
|
|
40
26
|
);
|
|
41
27
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RichTextDisplay } from "@examplary/ui";
|
|
2
2
|
|
|
3
3
|
import { QuestionComponent } from "./question-component";
|
|
4
|
+
import { api } from "../lib/demo-api";
|
|
4
5
|
|
|
5
6
|
export const PreviewAssessment = ({
|
|
6
7
|
questionType,
|
|
@@ -10,10 +11,9 @@ export const PreviewAssessment = ({
|
|
|
10
11
|
}) => {
|
|
11
12
|
return (
|
|
12
13
|
<div className="relative flex flex-col min-h-[calc(100vh-17.5rem)]">
|
|
13
|
-
<div className="rounded-
|
|
14
|
-
<div className="rounded-base shadow-light border-2 border-border bg-main text-black flex-1 bg-white py-7 px-10 md:mr-5 relative z-10">
|
|
14
|
+
<div className="rounded-xl border border-border bg-main text-black flex-1 bg-white py-7 px-10 relative z-10">
|
|
15
15
|
<div className="flex justify-between gap-2 mb-3">
|
|
16
|
-
<div className="size-6 bg-bright border
|
|
16
|
+
<div className="size-6 bg-bright border text-sm font-bold rounded-full flex items-center justify-center shrink-0">
|
|
17
17
|
1
|
|
18
18
|
</div>
|
|
19
19
|
<div className="flex-1">
|
|
@@ -28,6 +28,7 @@ export const PreviewAssessment = ({
|
|
|
28
28
|
type={questionType}
|
|
29
29
|
componentName="assessment"
|
|
30
30
|
props={{
|
|
31
|
+
api,
|
|
31
32
|
question,
|
|
32
33
|
answer,
|
|
33
34
|
saveAnswer,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RichTextDisplay } from "@examplary/ui";
|
|
2
2
|
|
|
3
3
|
import { QuestionComponent } from "./question-component";
|
|
4
|
+
import { api } from "../lib/demo-api";
|
|
4
5
|
|
|
5
6
|
export const PreviewResults = ({ questionType, question, answer }) => {
|
|
6
7
|
return (
|
|
@@ -19,6 +20,7 @@ export const PreviewResults = ({ questionType, question, answer }) => {
|
|
|
19
20
|
type={questionType}
|
|
20
21
|
componentName="results"
|
|
21
22
|
props={{
|
|
23
|
+
api,
|
|
22
24
|
question,
|
|
23
25
|
answer,
|
|
24
26
|
}}
|
|
@@ -2,6 +2,7 @@ import { cn, MinimalRichTextField } from "@examplary/ui";
|
|
|
2
2
|
import { FileQuestionIcon } from "lucide-react";
|
|
3
3
|
|
|
4
4
|
import { QuestionComponent } from "./question-component";
|
|
5
|
+
import { api } from "../lib/demo-api";
|
|
5
6
|
|
|
6
7
|
export const PreviewSettingsArea = ({
|
|
7
8
|
questionType,
|
|
@@ -13,20 +14,15 @@ export const PreviewSettingsArea = ({
|
|
|
13
14
|
data-type="question"
|
|
14
15
|
data-question-id={question.id}
|
|
15
16
|
className={cn(
|
|
16
|
-
"rounded-
|
|
17
|
-
"mb-3 relative bg-white transition-[border,shadow,opacity]",
|
|
18
|
-
"shadow-light",
|
|
17
|
+
"rounded-xl border border-border bg-main text-black",
|
|
18
|
+
"mb-3 relative bg-white transition-[border,shadow,opacity] p-6 px-7",
|
|
19
19
|
)}
|
|
20
20
|
>
|
|
21
|
-
<div className="
|
|
21
|
+
<div className="flex gap-3">
|
|
22
22
|
<div
|
|
23
23
|
className={cn(
|
|
24
|
-
"size-6 rounded-full border-2 items-center justify-center flex transition",
|
|
25
|
-
questionType?.iconBackgroundColor ? "" : "bg-bright",
|
|
24
|
+
"size-6 rounded-full border-2 items-center justify-center flex transition bg-bright",
|
|
26
25
|
)}
|
|
27
|
-
style={{
|
|
28
|
-
backgroundColor: questionType?.iconBackgroundColor || undefined,
|
|
29
|
-
}}
|
|
30
26
|
>
|
|
31
27
|
{questionType?.icon ? (
|
|
32
28
|
<img
|
|
@@ -65,14 +61,24 @@ export const PreviewSettingsArea = ({
|
|
|
65
61
|
</div>
|
|
66
62
|
</div>
|
|
67
63
|
</div>
|
|
68
|
-
<div className="border-t-
|
|
69
|
-
<div
|
|
64
|
+
<div className="border-t border-border pt-5 mt-5 ml-9 mb-4">
|
|
65
|
+
<div>
|
|
70
66
|
<QuestionComponent
|
|
71
67
|
type={questionType}
|
|
72
68
|
componentName="settings-area"
|
|
73
69
|
props={{
|
|
70
|
+
api,
|
|
74
71
|
question,
|
|
75
72
|
settings: question.settings,
|
|
73
|
+
setMultipleSettings: (newSettings) => {
|
|
74
|
+
setQuestion({
|
|
75
|
+
...question,
|
|
76
|
+
settings: {
|
|
77
|
+
...question.settings,
|
|
78
|
+
...newSettings,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
},
|
|
76
82
|
setSetting: (settingId, value) => {
|
|
77
83
|
setQuestion({
|
|
78
84
|
...question,
|
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Examplary - Question type preview</title>
|
|
7
|
+
|
|
8
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
9
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
10
|
+
<link
|
|
11
|
+
href="https://fonts.googleapis.com/css2?family=Epunda+Sans:ital,wght@0,300..900;1,300..900&family=Epunda+Slab:ital,wght@0,300..900;1,300..900&display=swap"
|
|
12
|
+
rel="stylesheet"
|
|
13
|
+
/>
|
|
7
14
|
</head>
|
|
8
15
|
<body class="bg-app-bg font-sans">
|
|
9
16
|
<div id="root"></div>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const api = {
|
|
2
|
+
get: async (path: string, options: any) => {
|
|
3
|
+
console.warn("API calls are not supported in the preview UI");
|
|
4
|
+
return {};
|
|
5
|
+
},
|
|
6
|
+
post: async (path: string, body: any, options: any) => {
|
|
7
|
+
console.warn("API calls are not supported in the preview UI");
|
|
8
|
+
return {};
|
|
9
|
+
},
|
|
10
|
+
put: async (path: string, body: any, options: any) => {
|
|
11
|
+
console.warn("API calls are not supported in the preview UI");
|
|
12
|
+
return {};
|
|
13
|
+
},
|
|
14
|
+
delete: async (path: string, options: any) => {
|
|
15
|
+
console.warn("API calls are not supported in the preview UI");
|
|
16
|
+
return {};
|
|
17
|
+
},
|
|
18
|
+
patch: async (path: string, body: any, options: any) => {
|
|
19
|
+
console.warn("API calls are not supported in the preview UI");
|
|
20
|
+
return {};
|
|
21
|
+
},
|
|
22
|
+
uploadFile: async (accept: "*/*") => {
|
|
23
|
+
console.warn("File uploads are not supported in the preview UI");
|
|
24
|
+
return {
|
|
25
|
+
url: `https://placehold.co/600x400?${Math.random()}`,
|
|
26
|
+
name: "image.jpg",
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
};
|