@tinyweb_dev/oe-exam-sdk 0.2.14 → 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 CHANGED
@@ -419,6 +419,18 @@ npm run dev
419
419
 
420
420
  ## Publish
421
421
 
422
+ CI release uses `.github/workflows/release_sdk.yml` on tags `sdk-v*` with
423
+ **npm Trusted Publishing (OIDC)** (no long-lived `NPM_TOKEN`).
424
+
425
+ Configure Trusted Publisher on npmjs.com for `@tinyweb_dev/oe-exam-sdk`:
426
+
427
+ - Organization or user: `ocean-edu`
428
+ - Repository: `oe-exam`
429
+ - Workflow filename: `release_sdk.yml`
430
+ - Allowed actions: `npm publish`
431
+
432
+ Manual local publish (maintainer + 2FA):
433
+
422
434
  ```bash
423
435
  cd sdk
424
436
  npm version patch
@@ -22,9 +22,8 @@ function OptionImage({ src, alt, className }) {
22
22
  } }));
23
23
  }
24
24
  export function ChooseTheCorrectAnswerClient({ questionData, onSubmit, isReviewMode = false, userAnswer, questionConfig, }) {
25
- // Coerce API option shapes ({ id, text } | string) to string[] before render.
26
- const displayOptions = useMemo(() => normalizeChooseAnswerOptions(questionData.options), [questionData.options]);
27
25
  const isMultipleAnswers = Boolean(questionData.multipleAnswers || Array.isArray(questionData.correctAnswer));
26
+ const displayOptions = useMemo(() => normalizeChooseAnswerOptions(questionData.options), [questionData.options]);
28
27
  const normalizedCorrectAnswers = useMemo(() => {
29
28
  const normalized = normalizeChooseAnswerCorrectAnswer(questionData.correctAnswer, questionData.options);
30
29
  return Array.isArray(normalized)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinyweb_dev/oe-exam-sdk",
3
- "version": "0.2.14",
3
+ "version": "1.0.0",
4
4
  "description": "Reusable OceanEdu question components.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",