@altnovatrail/canvas 0.3.32 → 0.3.34

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.
Files changed (45) hide show
  1. package/lib/core/boxes.d.ts +1 -1
  2. package/lib/core/boxes.js +3 -3
  3. package/lib/core/crop.d.ts +1 -5
  4. package/lib/core/crop.js +1 -5
  5. package/lib/core/example.js +2 -2
  6. package/lib/core/grid.d.ts +3 -6
  7. package/lib/core/grid.js +2 -2
  8. package/lib/core/groups.d.ts +1 -1
  9. package/lib/core/groups.js +1 -1
  10. package/lib/core/hands.d.ts +7 -7
  11. package/lib/core/hands.js +6 -6
  12. package/lib/core/history.d.ts +3 -2
  13. package/lib/core/history.js +3 -2
  14. package/lib/core/index.js +2 -2
  15. package/lib/core/manifest.d.ts +2 -3
  16. package/lib/core/manifest.js +2 -3
  17. package/lib/core/marks.d.ts +3 -3
  18. package/lib/core/marks.js +3 -4
  19. package/lib/core/page.d.ts +2 -2
  20. package/lib/core/page.js +6 -6
  21. package/lib/core/recorder.d.ts +5 -5
  22. package/lib/core/recorder.js +5 -5
  23. package/lib/core/screen.d.ts +7 -8
  24. package/lib/core/screen.js +4 -4
  25. package/lib/core/submission.d.ts +2 -2
  26. package/lib/core/submission.js +2 -2
  27. package/lib/core/task.d.ts +6 -7
  28. package/lib/core/task.js +1 -1
  29. package/lib/core/zoom.d.ts +2 -2
  30. package/lib/core/zoom.js +2 -2
  31. package/lib/element/icons.d.ts +1 -1
  32. package/lib/element/icons.js +2 -2
  33. package/lib/element/index.d.ts +28 -30
  34. package/lib/element/index.js +125 -123
  35. package/lib/element/labels.d.ts +7 -7
  36. package/lib/element/labels.js +9 -10
  37. package/lib/element/parts.d.ts +1 -1
  38. package/lib/element/parts.js +9 -9
  39. package/lib/element/probe.d.ts +1 -1
  40. package/lib/element/probe.js +3 -4
  41. package/lib/element/session.js +1 -1
  42. package/lib/element/statement.js +1 -1
  43. package/lib/element/tools.d.ts +1 -1
  44. package/lib/element/tools.js +16 -18
  45. package/package.json +1 -1
@@ -10,8 +10,8 @@ import { type Task, type Tool } from "../core/task.js";
10
10
  * CanvasElement has it, what its events tell and the work it gives for checking, here, and the data
11
11
  * — the history of writing, the context of a submission, the filled slots and the state of a demo
12
12
  * — through the DOM-free part. The entry point gives them under spec's names, the same types, the
13
- * media (T73) and the tutor's marks (T16) too. The crop and a task with its temporary tools are
14
- * the element's own (R26, R41).
13
+ * media and the tutor's marks too. The crop and a task with its temporary tools are the element's
14
+ * own (R26, R41).
15
15
  */
16
16
  export type { Box, CanvasElement, CanvasEventMap, DemoChangeEvent, ExportedCell, ExportedSheet, ExportedWork, ExportedWorkbook, HistoryChange, HistoryChangeEvent, Media, ToolChange, ToolChangeEvent, } from "@altnovatrail/spec/canvas";
17
17
  export type { Filled, Filling } from "../core/boxes.js";
@@ -65,7 +65,7 @@ export declare class NovatrailCanvas extends HTMLElement implements CanvasElemen
65
65
  * A lesson's worked example (R42; R58 spec): the open view of a segment `worked_example` of the
66
66
  * module format 0.4 — its statement, which the element shows above the sheet as a task's (R23),
67
67
  * the grid of its sheet or the lines of its workbook, and the parts of the author's demo, which
68
- * on a workbook fill the lines' boxes with their values (T85). The type is spec's (R73 spec; R41).
68
+ * on a workbook fill the lines' boxes with their values (R61). The type is spec's (R73 spec; R41).
69
69
  * The element shows a task or a worked example, not both: an example while a task is given, while
70
70
  * the sheet has a history of writing, or while a stroke or an erasing is under way, is a
71
71
  * TypeError, and so is one the schema refuses, at its field. `undefined` takes the example off,
@@ -113,13 +113,13 @@ export declare class NovatrailCanvas extends HTMLElement implements CanvasElemen
113
113
  get manifest(): Manifest | undefined;
114
114
  set manifest(manifest: Manifest | undefined);
115
115
  /**
116
- * What gives the files of the pictures, by their references, as the contract has it (the
117
- * 2026-11-02 amendment to R36 spec; R07): a task's statement's, and a
118
- * worked example's — its statement's and every part's of its demo, which it asks for as the
119
- * example comes, before the learner opens them (R42). A reference is asked for once, whichever
120
- * pictures show it, and its file stays while the task or the example names it. Until a picture's
121
- * file comes, or if it never does, its frame shows what it shows in words. A new function serves
122
- * the references that have no file yet, and stops no load the last one began.
116
+ * What gives the files of the pictures, by their references, as the contract has it (R07;
117
+ * R36 spec): a task's statement's, and a worked example's — its statement's and every part's of
118
+ * its demo, which it asks for as the example comes, before the learner opens them (R42). A
119
+ * reference is asked for once, whichever pictures show it, and its file stays while the task or
120
+ * the example names it. Until a picture's file comes, or if it never does, its frame shows what
121
+ * it shows in words. A new function serves the references that have no file yet, and stops no
122
+ * load the last one began.
123
123
  */
124
124
  get media(): Media | undefined;
125
125
  set media(media: Media | undefined);
@@ -160,12 +160,11 @@ export declare class NovatrailCanvas extends HTMLElement implements CanvasElemen
160
160
  * workbook where an answer cell is, by its item and its slot (R39). A mark holds on to the
161
161
  * strokes the model saw there and is drawn around those of them the sheet shows, as they are now
162
162
  * — a cell's around its box too: new strokes do not move it, and when all of them are erased it
163
- * is gone, till undo brings them back. A box of a workbook that was empty is framed alone (the
164
- * second 2026-11-03 amendment to R74 spec). A box that comes near no stroke, and a cell on a
165
- * sheet, which takes no zones, have no frame: the question is asked without one. The type is
166
- * spec's (R83 spec; T16). A submission goes
167
- * back to a sheet whose history holds its strokes, as its digest tells (R27), and a workbook's
168
- * to a page of its boxes: one of other strokes or other boxes is a TypeError, and so are marks
163
+ * is gone, till undo brings them back. A box of a workbook that was empty is framed alone (R74
164
+ * spec). A box that comes near no stroke, and a cell on a sheet, which takes no zones, have no
165
+ * frame: the question is asked without one. The type is spec's (R83 spec). A submission goes back
166
+ * to a sheet whose history holds its strokes, as its digest tells (R27), and a workbook's to a
167
+ * page of its boxes: one of other strokes or other boxes is a TypeError, and so are marks
169
168
  * given before the task and the history they hold on to, and marks that are not marks. A new
170
169
  * history, and a new page, put the marks back on their strokes, or take them off. `undefined`
171
170
  * takes the marks off. Every value is checked as it comes, and marks equal to those shown write
@@ -180,9 +179,9 @@ export declare class NovatrailCanvas extends HTMLElement implements CanvasElemen
180
179
  * The element's `lang` came, changed or went: its buttons and a workbook's boxes are labelled in
181
180
  * it, or in English for a language their labels are not in, and for none (R28, R36). Or
182
181
  * `tools-hidden` did: while the element has it, the bar is out of sight and of the accessibility
183
- * tree, as `app` hides it on a phone under its tutor's sheet (R84; the 2026-11-17 amendment to
184
- * R36 spec). An attribute the element had before it was defined comes here just after the
185
- * constructor, which reads no attribute.
182
+ * tree, as `app` hides it on a phone under its tutor's sheet (R84; R36 spec). An attribute the
183
+ * element had before it was defined comes here just after the constructor, which reads no
184
+ * attribute.
186
185
  */
187
186
  attributeChangedCallback(name: string): void;
188
187
  /**
@@ -214,17 +213,16 @@ export declare class NovatrailCanvas extends HTMLElement implements CanvasElemen
214
213
  */
215
214
  exportWork(): Promise<ExportedWork | null>;
216
215
  /**
217
- * The picture of the work, for the `picture` of a stored work that app puts on the server
218
- * (contracts/README.md spec, section 15; R83), a method of the agreement with app (the second
219
- * 2026-11-17 amendment to R36 spec): the PNG of the strokes the surface shows, with no
220
- * condition — the whole sheet, or the workbook's whole page with its draft, one pixel a unit,
221
- * 1000 × 1400, whatever is filled and whether the work was sent to be checked or not; an empty
222
- * surface, and a worked example's, is white. The strokes are those `exportWork()` takes, as the
223
- * history has them: not the stroke under way, but those under an eraser not yet lifted. Each is
224
- * the outline the screen fills, black on white with no theme and no template, and the pixels go
225
- * through the crop's encoder, grey a byte each: so the picture looks as the sheet does, and holds
226
- * at most 1,576,640 bytes, for the encoder spends at most 9 bits on a byte of a row, under the
227
- * 4 MiB of a stored work.
216
+ * The picture of the work, for the `picture` of a stored work that app puts on the server, a
217
+ * method of the agreement with app (R83; R36 spec): the PNG of the strokes the surface shows,
218
+ * with no condition — the whole sheet, or the workbook's whole page with its draft, one pixel a
219
+ * unit, 1000 × 1400, whatever is filled and whether the work was sent to be checked or not; an
220
+ * empty surface, and a worked example's, is white. The strokes are those `exportWork()` takes, as
221
+ * the history has them: not the stroke under way, but those under an eraser not yet lifted. Each
222
+ * is the outline the screen fills, black on white with no theme and no template, and the pixels
223
+ * go through the crop's encoder, grey a byte each: so the picture looks as the sheet does, and
224
+ * holds at most 1,576,640 bytes, for the encoder spends at most 9 bits on a byte of a row, under
225
+ * the 4 MiB of a stored work.
228
226
  */
229
227
  exportPicture(): Promise<Blob>;
230
228
  disconnectedCallback(): void;