@astl/engine 0.5.1 → 0.7.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 +50 -0
- package/dist/analyse.d.ts.map +1 -1
- package/dist/analyse.js +458 -21
- package/dist/analyse.js.map +1 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +7 -4
- package/dist/compile.js.map +1 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +16 -2
- package/dist/engine.js.map +1 -1
- package/dist/guard.d.ts.map +1 -1
- package/dist/guard.js +5 -2
- package/dist/guard.js.map +1 -1
- package/dist/messages/en.json +4 -0
- package/dist/messages/pl.json +4 -0
- package/package.json +2 -2
- package/src/analyse.ts +512 -23
- package/src/compile.ts +8 -3
- package/src/engine.ts +23 -1
- package/src/guard.ts +6 -1
- package/src/messages/en.json +4 -0
- package/src/messages/pl.json +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
# @astl/engine
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8ae6707: Tables in rich text: `table`, `caption`, `thead`, `tbody`, `tr`, `th` (`scope`, `colspan`, `rowspan`) and `td`
|
|
8
|
+
(`colspan`, `rowspan`), a block wherever a figure may be. Cells and the caption hold inline content, inline components
|
|
9
|
+
among it, which keep their ids and slots as anywhere. The source is read as a browser reads it; what stays broken is
|
|
10
|
+
`TABLE_INVALID` (parts out of order or missing, rows that cover different columns, a span past its rows), more than
|
|
11
|
+
12 columns or 50 rows `TABLE_TOO_LARGE`. The style allow-list adds `border-collapse` and `border-spacing`; tag rules
|
|
12
|
+
and named styles reach every part.
|
|
13
|
+
|
|
14
|
+
The player draws a table as wide as its column, its head tinted and its row headers lighter (lines only in high
|
|
15
|
+
contrast), in a box of its own that scrolls sideways when the table is too wide, never the page: at its content
|
|
16
|
+
width when it cannot fit wrapped tight, with fading edges where there is more to see, the box then a stop of the
|
|
17
|
+
keyboard named by the caption ("Table" otherwise). Fields in cells (a gap, a select, a drop) keep their size and
|
|
18
|
+
their words whole instead of being squeezed: inline components read `--astl-inline-line`, `--astl-inline-wrap`,
|
|
19
|
+
`--astl-inline-hyphens` and `--astl-inline-min`, which a cell sets. The TipTap surface keeps tables, their cells
|
|
20
|
+
written in place, a wide one scrolling in its box; tools to change a table's shape come with the table's editing.
|
|
21
|
+
- 0f89c80: Worked examples: a gap, a long answer or a select with `example` (public) is answered already, so students see what
|
|
22
|
+
to do before they start. A gap and a long answer show its text, a select the option whose id it holds as chosen;
|
|
23
|
+
written in by hand (the new tokens `--astl-font-hand`, a system cursive stack, and `--astl-example-ink`, in every
|
|
24
|
+
theme and built-in look), read-only and never a stop of the keyboard. A gap with boxes shows a letter in each box, a
|
|
25
|
+
long answer its box with its paper. Screen readers read "Example: ..." ("Przykład: ..."); the part is `example`.
|
|
26
|
+
|
|
27
|
+
An example has no slot: it is not graded, adds nothing to the maximum score, is left out of the player's numbers and
|
|
28
|
+
of what counts as unanswered, and needs no answer. A gap's `answer` is no longer required by its manifest: a gap
|
|
29
|
+
without one reports `GAP_ANSWER_MISSING` instead of `ATTRIBUTE_REQUIRED`. New issues: `GAP_EXAMPLE_WITH_ANSWER` and
|
|
30
|
+
`SELECT_EXAMPLE_WITH_CORRECT` (warnings, the example wins), `SELECT_EXAMPLE_UNKNOWN` (an error). The kit offers
|
|
31
|
+
"Example" ("Przykład") for all three, a select's from its own options: an attribute field's `options` without `from`
|
|
32
|
+
lists the element's own children.
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- Updated dependencies [8ae6707]
|
|
37
|
+
- Updated dependencies [0f89c80]
|
|
38
|
+
- @astl/core@0.7.0
|
|
39
|
+
|
|
40
|
+
## 0.6.0
|
|
41
|
+
|
|
42
|
+
### Minor Changes
|
|
43
|
+
|
|
44
|
+
- 839e146: Frames: `<astl-box>` groups text and components under a title (a "work with the text" box, a review card, a project sheet), a format element like a layout, so it holds block components, which `astl-callout` cannot. It goes on a page, in the document or in a column; a frame in a frame is the new error `BOX_NESTED`, its content still checked, and it holds a layout only where it is not in a column. `<astl-box-title>` (optional, first) and `<astl-box-tag>` (optional, after it, an outlined label) hold text with formatting, a badge or a picture; then come blocks, components, layouts and Check elements. Its questions grade as outside it, and the Check of a question in it stays in it. `title-place` is `inside`, `border`, `pill` or `tab`; `variant` is `outline`, `soft` or `card`; `icon` is `info`, `tip`, `warning`, `book`, `pencil`, `checklist` or `star`; `palette` 1 to 8. The player draws it with the module of styles, from `boxCss` and `BOX_ICON_PATHS` in `@astl/tokens`: a title that wraps on a phone grows down into the frame, text on a filled title at 4.5:1, and with a title it is a region named by the title's words. In the editor, "Frame" (pl "Ramka") in the Layout menu inserts one with the cursor in its title; its style form (the new style target `frame`, and `frame()` and `editFrame()` of `EditorStyles`) sets its title position, look, icon, colour and tag, removes it keeping its content or deletes it; blocks move into it and out of it, and a block inserted in it stays in it. Also: a component manifest can no longer take the tag `astl-badge`, nor the frame's tags, which are the format's own.
|
|
45
|
+
- 9f84f15: Tasks: `<astl-task>` is a numbered exercise of a page, a format element like a frame: its number, its instruction (`<astl-instruction>`), up to 3 tags (`<astl-tag>`, with an optional `icon`: `pair`, `group`, `notebook`), its lettered sub-tasks (`<astl-subtask>`, with `level` A to D) and what a page holds. It goes on a page, in the document, in a column or in a frame; a task in a task is the new error `TASK_NESTED`, its content still checked. Its `id` is required. The document's `task-numbering` (`page`, the default, `doc` or `none`) and a task's own `number`, after which the next ones count on, give its number, which the engine writes into the view. `level` 1 to 3 is a difficulty mark (stars, said in words to screen readers), `palette` 1 to 8 the colour of its number. With `check` it has one Check for every graded question in it, at its end ("Check the task"): core's rule for Check elements takes it (`CheckTree.taskCheck`), and the view holds it as a Check element at the end of the task. The player draws it with the module of styles, from `taskCss`, `TASK_ICON_PATHS` and `TASK_MARK_PATH` in `@astl/tokens`: the number and the stars in a gutter, the tags in the instruction's row, the sub-tasks lettered; on a phone the number beside the instruction. It is a region named "Task 3" in the player's language, its instruction its description. In the editor, "Task" (pl "Zadanie") in the Layout menu inserts one with a fresh id (`insertTask(adapter)` for a host's menu), the cursor in its instruction; its card (the inspector) sets its number, difficulty, Check, colour and tags with their icons, and the document's card how tasks are numbered. On the surface its number and stars are drawn as the player draws them; blocks move into a task and its sub-tasks and out of them. `scanElements` lists tasks, and the outline's checks say which is a task's own (`OutlineCheck.task`).
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- Updated dependencies [839e146]
|
|
50
|
+
- Updated dependencies [9f84f15]
|
|
51
|
+
- @astl/core@0.6.0
|
|
52
|
+
|
|
3
53
|
## 0.5.1
|
|
4
54
|
|
|
5
55
|
### Patch Changes
|
package/dist/analyse.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyse.d.ts","sourceRoot":"","sources":["../src/analyse.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"analyse.d.ts","sourceRoot":"","sources":["../src/analyse.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAwBL,KAAK,mBAAmB,EAMxB,KAAK,SAAS,EAId,KAAK,OAAO,EAEZ,KAAK,WAAW,EAOhB,KAAK,eAAe,EAEpB,KAAK,YAAY,EAKjB,KAAK,KAAK,EAiBV,KAAK,IAAI,EACT,KAAK,oBAAoB,EAWzB,KAAK,aAAa,EAoBlB,KAAK,SAAS,EACf,MAAM,YAAY,CAAC;AA0DpB,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;IACzC,qDAAqD;IACrD,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,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