@intellectif/lk-core 1.2.0 → 1.4.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/CHANGELOG.md +29 -0
- package/README.md +2 -2
- package/dist/ai-CnmLPMzd.d.cts +2417 -0
- package/dist/ai-CnmLPMzd.d.cts.map +1 -0
- package/dist/ai-CnmLPMzd.d.ts +2417 -0
- package/dist/ai-CnmLPMzd.d.ts.map +1 -0
- package/dist/ai-check.cjs +845 -620
- package/dist/ai-check.cjs.map +1 -1
- package/dist/ai-check.d.cts +82 -80
- package/dist/ai-check.d.cts.map +1 -0
- package/dist/ai-check.d.ts +82 -80
- package/dist/ai-check.d.ts.map +1 -0
- package/dist/ai-check.js +843 -621
- package/dist/ai-check.js.map +1 -1
- package/dist/ai-writing-CPpH9Qxq.js +2601 -0
- package/dist/ai-writing-CPpH9Qxq.js.map +1 -0
- package/dist/ai-writing-G6tnCGzw.cjs +2846 -0
- package/dist/ai-writing-G6tnCGzw.cjs.map +1 -0
- package/dist/index-2nigSf4N.d.cts +339 -0
- package/dist/index-2nigSf4N.d.cts.map +1 -0
- package/dist/index-B54baFUA.d.ts +339 -0
- package/dist/index-B54baFUA.d.ts.map +1 -0
- package/dist/index-BAfEHCnD.d.cts +1071 -0
- package/dist/index-BAfEHCnD.d.cts.map +1 -0
- package/dist/index-BqMXWuNC.d.cts +153 -0
- package/dist/index-BqMXWuNC.d.cts.map +1 -0
- package/dist/index-CVWvymVb.d.ts +1071 -0
- package/dist/index-CVWvymVb.d.ts.map +1 -0
- package/dist/index-CcHDTxIZ.d.ts +153 -0
- package/dist/index-CcHDTxIZ.d.ts.map +1 -0
- package/dist/index.cjs +1211 -1146
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +941 -861
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +941 -861
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1063 -1147
- package/dist/index.js.map +1 -1
- package/dist/item-group-DXiR8nOr.js +445 -0
- package/dist/item-group-DXiR8nOr.js.map +1 -0
- package/dist/item-group-DroFXgLb.cjs +505 -0
- package/dist/item-group-DroFXgLb.cjs.map +1 -0
- package/dist/registry-DVi0LR_i.cjs +5915 -0
- package/dist/registry-DVi0LR_i.cjs.map +1 -0
- package/dist/registry-Dsx9mNsS.js +5449 -0
- package/dist/registry-Dsx9mNsS.js.map +1 -0
- package/dist/schemas-Bdw0nGPo.js +152 -0
- package/dist/schemas-Bdw0nGPo.js.map +1 -0
- package/dist/schemas-DVbAOrtd.cjs +224 -0
- package/dist/schemas-DVbAOrtd.cjs.map +1 -0
- package/dist/schemas.cjs +16 -34
- package/dist/schemas.d.cts +2 -2
- package/dist/schemas.d.ts +2 -2
- package/dist/schemas.js +3 -34
- package/dist/scoring-B2_HEhMT.cjs +1748 -0
- package/dist/scoring-B2_HEhMT.cjs.map +1 -0
- package/dist/scoring-BZqUkuDF.js +1604 -0
- package/dist/scoring-BZqUkuDF.js.map +1 -0
- package/dist/scoring.cjs +37 -75
- package/dist/scoring.d.cts +3 -1103
- package/dist/scoring.d.ts +3 -1103
- package/dist/scoring.js +3 -75
- package/dist/xapi-CMTph7wG.js +332 -0
- package/dist/xapi-CMTph7wG.js.map +1 -0
- package/dist/xapi-DNzkSJ0S.cjs +362 -0
- package/dist/xapi-DNzkSJ0S.cjs.map +1 -0
- package/dist/xapi.cjs +7 -16
- package/dist/xapi.d.cts +2 -150
- package/dist/xapi.d.ts +2 -150
- package/dist/xapi.js +2 -16
- package/package.json +4 -4
- package/dist/activity-D705CXng.d.cts +0 -2162
- package/dist/activity-D705CXng.d.ts +0 -2162
- package/dist/chunk-46BXIGLG.cjs +0 -272
- package/dist/chunk-46BXIGLG.cjs.map +0 -1
- package/dist/chunk-4YANYTFN.cjs +0 -1256
- package/dist/chunk-4YANYTFN.cjs.map +0 -1
- package/dist/chunk-7KOWU4RO.js +0 -2207
- package/dist/chunk-7KOWU4RO.js.map +0 -1
- package/dist/chunk-7THXD7AN.cjs +0 -5057
- package/dist/chunk-7THXD7AN.cjs.map +0 -1
- package/dist/chunk-CYCTIXUN.cjs +0 -118
- package/dist/chunk-CYCTIXUN.cjs.map +0 -1
- package/dist/chunk-CYPA5BW5.js +0 -118
- package/dist/chunk-CYPA5BW5.js.map +0 -1
- package/dist/chunk-JTNDIBZO.js +0 -272
- package/dist/chunk-JTNDIBZO.js.map +0 -1
- package/dist/chunk-MV2N2WNS.js +0 -352
- package/dist/chunk-MV2N2WNS.js.map +0 -1
- package/dist/chunk-MXI26H62.cjs +0 -2207
- package/dist/chunk-MXI26H62.cjs.map +0 -1
- package/dist/chunk-QS7B42ZR.js +0 -5057
- package/dist/chunk-QS7B42ZR.js.map +0 -1
- package/dist/chunk-QX2ERL72.js +0 -1256
- package/dist/chunk-QX2ERL72.js.map +0 -1
- package/dist/chunk-ZWXQSKCX.cjs +0 -352
- package/dist/chunk-ZWXQSKCX.cjs.map +0 -1
- package/dist/index-BChYtrEe.d.ts +0 -548
- package/dist/index-VXt_v3YI.d.cts +0 -548
- package/dist/schemas.cjs.map +0 -1
- package/dist/schemas.js.map +0 -1
- package/dist/scoring.cjs.map +0 -1
- package/dist/scoring.js.map +0 -1
- package/dist/xapi.cjs.map +0 -1
- package/dist/xapi.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @intellectif/lk-core
|
|
2
2
|
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#107](https://github.com/intellectif/learning-kit/pull/107) [`8bf7d6e`](https://github.com/intellectif/learning-kit/commit/8bf7d6edb76ff45ce32e425ef83663692127acc9) Thanks [@diego28e](https://github.com/diego28e)! - **AI help reads a question's group**: hints, explanations and feedback on writing now carry the passage, or the shared instructions, a grouped question is read beside.
|
|
8
|
+
|
|
9
|
+
**Action required:** none. Requests gain an optional `material`, which your prompt uses once you tell it to. A port that sends the whole request to its model sends the material too: up to 12,000 code points more per call on a question in a group.
|
|
10
|
+
|
|
11
|
+
- **lk-core:** `aiExplanationRequest`, `aiHintRequest` and `aiWritingFeedbackRequest` take an optional `group` (an `ItemGroup`, a redacted one, or your own `{ title, stimulus }`) and add `material`: the kind, the title, the text, the media type and its alt text, the attribution and the language. The text is cut past `AI_MATERIAL_MAX_LENGTH` (12,000 code points), at a word boundary, and marked `truncated`. The author's transcript and media addresses never go, so a whole group and a redacted one give the same material. The checks are unchanged: a hint that quotes the passage where it prints the answer is refused like any other.
|
|
12
|
+
- **lk-react:** inside `<ActivitySequence>` and `<InteractiveVideo>`, the SDK's own components, and a question you draw with `useAiHints`, `useAiExplanation` or `useAiWritingFeedback`, send their group's material by themselves. Outside a pager, pass `group` to the hooks. lk-react 23.2.0 peers on lk-core `^1.4.0`, so upgrade the two together. Coaching on a reading is unchanged.
|
|
13
|
+
- **`@intellectif/lk-core/ai-check`** has four more cases in item groups: a reading question explained, and hinted at, from a passage that prints its answer; a word-formation blank under its group's instructions; and a summary of the passage.
|
|
14
|
+
|
|
15
|
+
Guide: https://github.com/intellectif/learning-kit/blob/main/docs/ai.md#a-question-in-an-item-group-140
|
|
16
|
+
|
|
17
|
+
## 1.3.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- [#90](https://github.com/intellectif/learning-kit/pull/90) [`9b5f5ef`](https://github.com/intellectif/learning-kit/commit/9b5f5ef6243f825c1336628d38816789993455b3) Thanks [@diego28e](https://github.com/diego28e)! - **Smaller bundles, one list of built-in types, and two deprecations**: importing one function from lk-core no longer bundles all of zod.
|
|
22
|
+
|
|
23
|
+
**Action required:** none. Two things are deprecated and keep working throughout 1.x: a fill-in-the-blanks blank's `caseSensitive` / `trimWhitespace` (write `match: { caseSensitive, trim }`), and `seededShuffle` without a `version` (write `{ version: 1 }` to keep an order already recorded).
|
|
24
|
+
|
|
25
|
+
- **Smaller bundles.** An app that imports only `score`, or only `xAPIBuilder` from `/xapi`, used to bundle every one of zod's 60-odd locales: about 121 kB gzipped for `{ score }`. It is now about 54 kB. Grades, validation results and error messages are unchanged — every grade vector and validation expectation replays identically — and new size budgets hold lk-core to it.
|
|
26
|
+
- **`BUILT_IN_ACTIVITY_TYPES`, `BuiltInActivityType` and `isBuiltInActivityType`** name the types the SDK ships. `ActivityType` cannot, since a host's module augmentation widens it: use these to tell your own registered types from the SDK's.
|
|
27
|
+
- **`hintRevealsAnswer` withholds a hint it cannot check.** Given facts of a kind it cannot read, it now answers `true` — the hint reveals — where it answered `false` and let the hint through. No built-in type reaches that case today; a new one would have.
|
|
28
|
+
- **The built-in types are registered however your bundler splits lk-core.** They were registered as a module loaded, which held only because the build put that module beside the lookups; lk-core declares `sideEffects: false`, so a bundler may drop such a module. The registry is now created holding them.
|
|
29
|
+
- **Deprecated, still working throughout 1.x:** a blank's `caseSensitive` and `trimWhitespace` (`match.caseSensitive` and `match.trim` mean the same), and calling `seededShuffle` without `version` — it still draws version 1, but a 2.0 may make version 2 the default. See [Stability](https://github.com/intellectif/learning-kit/blob/main/docs/stability.md#deprecation).
|
|
30
|
+
- **Built with tsdown**, as tsup is no longer maintained. Every entry point exports the same names in ESM and CommonJS, the declarations describe the same API, and the grade and validation corpora replay identically; only the names of the internal chunk files differ.
|
|
31
|
+
|
|
3
32
|
## 1.2.0
|
|
4
33
|
|
|
5
34
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -133,7 +133,7 @@ Zod is the single runtime dependency, pinned to one exact version and private: n
|
|
|
133
133
|
- **What is supported, and since when** — [Features](https://github.com/intellectif/learning-kit/blob/main/docs/features.md): every activity and capability, the `lk-core` / `lk-react` versions it arrived in, and its guide.
|
|
134
134
|
- **What changed** — [GitHub Releases](https://github.com/intellectif/learning-kit/releases), one per package version, and the same notes in each package's `CHANGELOG.md` (it ships in the npm package, so it is in your `node_modules` too). Notes written since release notes gained a template — every release after lk-core 0.20.0 / lk-react 20.0.0 — start with a one-line summary and **Action required**: `none`, or what to do. Earlier notes lead with the detail; the version map in the upgrading guide says what each one asks of you.
|
|
135
135
|
- **How to upgrade** — [Upgrading](https://github.com/intellectif/learning-kit/blob/main/docs/upgrading.md): which `lk-core` goes with which `lk-react`, and a section per release saying what, if anything, you need to change. A `lk-react` major is often only the `lk-core` peer bump; the map says so.
|
|
136
|
-
- **Hearing about a release** — on GitHub, **Watch → Custom → Releases**, or subscribe to [the releases feed](https://github.com/intellectif/learning-kit/releases.atom). Better still, let your dependency bot bring each release to you as a pull request, with its notes — and keep the two packages together in one, since
|
|
136
|
+
- **Hearing about a release** — on GitHub, **Watch → Custom → Releases**, or subscribe to [the releases feed](https://github.com/intellectif/learning-kit/releases.atom). Better still, let your dependency bot bring each release to you as a pull request, with its notes — and keep the two packages together in one, since a `lk-react` release names the `lk-core` it needs:
|
|
137
137
|
|
|
138
138
|
```yaml
|
|
139
139
|
# .github/dependabot.yml — one entry per directory with a package.json
|
|
@@ -149,7 +149,7 @@ Zod is the single runtime dependency, pinned to one exact version and private: n
|
|
|
149
149
|
|
|
150
150
|
With Renovate: `"packageRules": [{ "matchPackageNames": ["@intellectif/lk-core", "@intellectif/lk-react"], "groupName": "learning-kit" }]`.
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
A caret range installs every later minor and patch of its major — `^1.2.0` takes `1.3.0` — and never a new major. A bot is how you hear about either, with its notes.
|
|
153
153
|
|
|
154
154
|
## Documentation
|
|
155
155
|
|