@altnovatrail/canvas 0.3.40 → 0.3.41
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 +1 -1
- package/lib/core/boxes.js +1 -1
- package/lib/core/crop.d.ts +1 -1
- package/lib/core/crop.js +1 -1
- package/lib/core/eraser.d.ts +1 -1
- package/lib/core/eraser.js +1 -1
- package/lib/core/example.js +1 -1
- package/lib/core/groups.d.ts +1 -1
- package/lib/core/hands.d.ts +1 -1
- package/lib/core/history.d.ts +1 -1
- package/lib/core/ink.js +1 -1
- package/lib/core/marks.d.ts +2 -2
- package/lib/core/marks.js +1 -1
- package/lib/core/page.js +1 -1
- package/lib/core/recorder.d.ts +1 -1
- package/lib/core/recorder.js +1 -1
- package/lib/core/sheet.d.ts +2 -2
- package/lib/core/sheet.js +2 -2
- package/lib/core/submission.d.ts +1 -1
- package/lib/core/tracing.d.ts +2 -2
- package/lib/core/tracing.js +1 -1
- package/lib/core/work.d.ts +1 -1
- package/lib/core/work.js +1 -1
- package/lib/core/zoom.d.ts +1 -1
- package/lib/core/zoom.js +1 -1
- package/lib/element/icons.d.ts +1 -1
- package/lib/element/icons.js +2 -2
- package/lib/element/index.js +4 -4
- package/lib/element/tools.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ The NovaTrail canvases: the UI package `@altnovatrail/canvas`, which the app bui
|
|
|
19
19
|
|
|
20
20
|
canvas knows no accounts, no api and no subject, and holds no data of its own: nothing on the tutor's layer ever changes the learner's work.
|
|
21
21
|
|
|
22
|
-
canvas is a component of [NovaTrail](https://github.com/altnovatrail/spec), a universal open platform for adaptive learning, interactive lessons and AI tutoring. Its card is [architecture
|
|
22
|
+
canvas is a component of [NovaTrail](https://github.com/altnovatrail/spec), a universal open platform for adaptive learning, interactive lessons and AI tutoring. Its card is in [spec's architecture](https://github.com/altnovatrail/spec/blob/main/docs/architecture.md#32-canvas--canvases).
|
|
23
23
|
|
|
24
24
|
- **app** builds the package in and gives it the task and the tutor's marks; app keeps the learner's strokes on the device and sends the picture of the work to api, since canvas itself calls no network.
|
|
25
25
|
- **spec** gives it the module format, the element's contract with app and the eval protocol of the sample file.
|
package/lib/core/boxes.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// The boxes of a workbook's page and the strokes in them
|
|
1
|
+
// The boxes of a workbook's page and the strokes in them. Each visible stroke is in one
|
|
2
2
|
// box or in none: the rule takes it alone, in whole numbers, with no DOM and no time, and what is
|
|
3
3
|
// in no box is the draft. A stroke is a box's if the middle of the box of its points lies in the
|
|
4
4
|
// box widened by 120 thousandths of its size — 12 units of a box of 100, short of the 16 to halfway
|
package/lib/core/crop.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type Box } from "./geometry.js";
|
|
|
3
3
|
import type { Group } from "./groups.js";
|
|
4
4
|
import type { Stroke } from "./ink.js";
|
|
5
5
|
/**
|
|
6
|
-
* The crop's rule in its numbers: sizes on the crop in pixels, heights on the sheet in units
|
|
6
|
+
* The crop's rule in its numbers: sizes on the crop in pixels, heights on the sheet in units.
|
|
7
7
|
* The rule counts in whole numbers — places in tenths of a unit, as the groups do — and each
|
|
8
8
|
* number it hands out that is not whole is one division of two whole numbers, so that tutor's
|
|
9
9
|
* runner, which crops by the same rule, gets the same numbers to the bit.
|
package/lib/core/crop.js
CHANGED
|
@@ -2,7 +2,7 @@ import RBush from "rbush";
|
|
|
2
2
|
import { around, extentOf } from "./geometry.js";
|
|
3
3
|
import { Sets } from "./sets.js";
|
|
4
4
|
/**
|
|
5
|
-
* The crop's rule in its numbers: sizes on the crop in pixels, heights on the sheet in units
|
|
5
|
+
* The crop's rule in its numbers: sizes on the crop in pixels, heights on the sheet in units.
|
|
6
6
|
* The rule counts in whole numbers — places in tenths of a unit, as the groups do — and each
|
|
7
7
|
* number it hands out that is not whole is one division of two whole numbers, so that tutor's
|
|
8
8
|
* runner, which crops by the same rule, gets the same numbers to the bit.
|
package/lib/core/eraser.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { Point } from "./screen.js";
|
|
|
5
5
|
export declare const ERASER_BUTTON = 5;
|
|
6
6
|
/**
|
|
7
7
|
* The eraser: one press of a pointer takes off the sheet, whole, every stroke its path comes
|
|
8
|
-
* near — a tap is a path of one point
|
|
8
|
+
* near — a tap is a path of one point. The strokes it comes near are pending while it is
|
|
9
9
|
* down, and when it lifts they go to the handler the eraser is made with, in one action, with the
|
|
10
10
|
* page's time of the lift: one undo brings them all back. `pointercancel` drops the press and
|
|
11
11
|
* erases nothing. One pointer erases at a time, with the primary button or a pen's eraser.
|
package/lib/core/eraser.js
CHANGED
|
@@ -6,7 +6,7 @@ const ERASER_HELD = 32;
|
|
|
6
6
|
const NONE = new Set();
|
|
7
7
|
/**
|
|
8
8
|
* The eraser: one press of a pointer takes off the sheet, whole, every stroke its path comes
|
|
9
|
-
* near — a tap is a path of one point
|
|
9
|
+
* near — a tap is a path of one point. The strokes it comes near are pending while it is
|
|
10
10
|
* down, and when it lifts they go to the handler the eraser is made with, in one action, with the
|
|
11
11
|
* page's time of the lift: one undo brings them all back. `pointercancel` drops the press and
|
|
12
12
|
* erases nothing. One pointer erases at a time, with the primary button or a pen's eraser.
|
package/lib/core/example.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// A lesson's worked example: the open view of a segment `worked_example`, of spec's
|
|
2
2
|
// type WorkedExample — its statement, the handwriting sheet or the workbook the
|
|
3
3
|
// author's demo is shown on, and the demo's parts in order: paragraphs, pictures beside the sheet,
|
|
4
|
-
// pictures on areas of a sheet, and on a workbook the boxes it fills
|
|
4
|
+
// pictures on areas of a sheet, and on a workbook the boxes it fills. The
|
|
5
5
|
// element checks it as the schema does, every object closed, and by the format's rules
|
|
6
6
|
// lesson.areas, lesson.example-fills and lesson.workbook-page too: an area lies on the sheet, the
|
|
7
7
|
// demo fills each box of the lines once, and the lines fit the page, each value its box. What the
|
package/lib/core/groups.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { Stroke } from "./ink.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* The rule of the groups of strokes: two strokes are neighbours if no more than `pause`
|
|
6
6
|
* milliseconds lie between them and their boxes come within `across` sheet units of each other
|
|
7
|
-
* across the sheet and within `down` units down it
|
|
7
|
+
* across the sheet and within `down` units down it. A group is the strokes a chain of
|
|
8
8
|
* neighbours joins. The rule counts in whole numbers — tenths of a unit and milliseconds, the
|
|
9
9
|
* precision of a sample file, rounded half up as `Math.round` rounds: 1000.5 tenths are 1001 — and
|
|
10
10
|
* only subtracts and compares them, so that tutor's runner, which groups by the same rule, gets the
|
package/lib/core/hands.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A pointer as the hands on the sheet see it: where it is on the screen, how big its contact
|
|
3
|
-
* is, and when
|
|
3
|
+
* is, and when. The DOM-free part sees no DOM, so the element hands it this much of each
|
|
4
4
|
* pointer event. The contact's size decides only what the pointer may do: it goes into no stroke,
|
|
5
5
|
* no history and no sample.
|
|
6
6
|
*/
|
package/lib/core/history.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { Stroke } from "./ink.js";
|
|
|
4
4
|
* An event of the history of writing: spec's type, of the contract of canvas and app.
|
|
5
5
|
* What an action on the sheet did, at the sheet's time `t` when it landed, in the
|
|
6
6
|
* order the actions landed; each event says which strokes it put on the sheet or took off, so
|
|
7
|
-
* whoever reads the history replays it without the rules of the stack of undo
|
|
7
|
+
* whoever reads the history replays it without the rules of the stack of undo. Those the
|
|
8
8
|
* sheet hands out are frozen through.
|
|
9
9
|
*/
|
|
10
10
|
export type { HistoryEvent };
|
package/lib/core/ink.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// A point of a stroke and a stroke: spec's types, of the contract of canvas
|
|
2
2
|
// and app — where a point lies on the sheet, in logical units, when it was written
|
|
3
3
|
// and how hard the pointer pressed, and a stroke's ID on its sheet, its pointer's type and its
|
|
4
|
-
// points. Only a pen's pressure changes the width of the line
|
|
4
|
+
// points. Only a pen's pressure changes the width of the line.
|
|
5
5
|
export {};
|
package/lib/core/marks.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { Stroke } from "./ink.js";
|
|
|
6
6
|
/**
|
|
7
7
|
* The rule that snaps a model's box to the learner's strokes: the box widens on every side by
|
|
8
8
|
* `margin` thousandths of the height its crop draws digits at, D′, and a stroke is taken if its
|
|
9
|
-
* share of points in it, its edges too, is `share` at least, and one point at least
|
|
9
|
+
* share of points in it, its edges too, is `share` at least, and one point at least. Both are
|
|
10
10
|
* parameters of eval (C2). The rule counts in whole numbers, places on the crop as the crop's
|
|
11
11
|
* raster has them, so that whoever snaps by it takes the same strokes.
|
|
12
12
|
*/
|
|
@@ -22,7 +22,7 @@ export interface SnapRule {
|
|
|
22
22
|
/**
|
|
23
23
|
* The rule the sheet snaps by: a quarter of a digit — 6 px at 24, a quarter of H on the
|
|
24
24
|
* sheet, H the height the crop scales by — and two thirds of the points. A sweep over the
|
|
25
|
-
* synthetic sheets chose two thirds over the half
|
|
25
|
+
* synthetic sheets chose two thirds over the half canvas-api took: as many strokes taken
|
|
26
26
|
* whole, and fewer of their neighbours.
|
|
27
27
|
*/
|
|
28
28
|
export declare const SNAP_RULE: SnapRule;
|
package/lib/core/marks.js
CHANGED
|
@@ -7,7 +7,7 @@ import { tracingFieldsOf } from "./tracing.js";
|
|
|
7
7
|
/**
|
|
8
8
|
* The rule the sheet snaps by: a quarter of a digit — 6 px at 24, a quarter of H on the
|
|
9
9
|
* sheet, H the height the crop scales by — and two thirds of the points. A sweep over the
|
|
10
|
-
* synthetic sheets chose two thirds over the half
|
|
10
|
+
* synthetic sheets chose two thirds over the half canvas-api took: as many strokes taken
|
|
11
11
|
* whole, and fewer of their neighbours.
|
|
12
12
|
*/
|
|
13
13
|
export const SNAP_RULE = Object.freeze({
|
package/lib/core/page.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// The layout of a workbook's page: where the template puts each item's number, the
|
|
2
|
-
// pieces of its line and its boxes, in whole page units, from the task's items alone
|
|
2
|
+
// pieces of its line and its boxes, in whole page units, from the task's items alone. The
|
|
3
3
|
// page is the sheet's, 1000 × 1400 units, and the boxes stay where the layout puts them on any
|
|
4
4
|
// device: the widths of the text come from the canvas's own table (widths.ts), and SVG fits the
|
|
5
5
|
// text to them. Short lines stand two to a row, in the task's order; a long line takes the page's
|
package/lib/core/recorder.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface PointerSample {
|
|
|
24
24
|
/**
|
|
25
25
|
* How close two recorded points of a stroke may come, in sheet units: 0.1, the precision of a
|
|
26
26
|
* sample file. A point nearer than that to the last one recorded adds nothing the file would
|
|
27
|
-
* keep
|
|
27
|
+
* keep.
|
|
28
28
|
*/
|
|
29
29
|
export declare const MIN_STEP = 0.1;
|
|
30
30
|
/** `button` of the primary button: a pen's tip, a finger, a mouse's left button. */
|
package/lib/core/recorder.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Clock } from "./clock.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* How close two recorded points of a stroke may come, in sheet units: 0.1, the precision of a
|
|
4
4
|
* sample file. A point nearer than that to the last one recorded adds nothing the file would
|
|
5
|
-
* keep
|
|
5
|
+
* keep.
|
|
6
6
|
*/
|
|
7
7
|
export const MIN_STEP = 0.1;
|
|
8
8
|
/** `button` of the primary button: a pen's tip, a finger, a mouse's left button. */
|
package/lib/core/sheet.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The task's page on the handwriting sheet in logical units: 1000 wide and 1400 tall, at the
|
|
3
|
-
* sheet's top left corner, the origin, with y pointing down, one scale on both axes
|
|
3
|
+
* sheet's top left corner, the origin, with y pointing down, one scale on both axes. Every
|
|
4
4
|
* layer of the sheet counts in these units, whatever the device's screen; the task's zones, the
|
|
5
5
|
* workbook's lines and the areas of a worked example lie on the page.
|
|
6
6
|
*/
|
|
@@ -34,7 +34,7 @@ export declare function extentOf(ink: {
|
|
|
34
34
|
} | undefined, room: Size): Size;
|
|
35
35
|
/**
|
|
36
36
|
* The bytes of a work's picture at most, before its encoding: the page's rows at a pixel a unit,
|
|
37
|
-
* each with its filter byte, which keep its PNG within the page's bound of bytes
|
|
37
|
+
* each with its filter byte, which keep its PNG within the page's bound of bytes.
|
|
38
38
|
*/
|
|
39
39
|
export declare const PICTURE_BYTES: number;
|
|
40
40
|
/**
|
package/lib/core/sheet.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The task's page on the handwriting sheet in logical units: 1000 wide and 1400 tall, at the
|
|
3
|
-
* sheet's top left corner, the origin, with y pointing down, one scale on both axes
|
|
3
|
+
* sheet's top left corner, the origin, with y pointing down, one scale on both axes. Every
|
|
4
4
|
* layer of the sheet counts in these units, whatever the device's screen; the task's zones, the
|
|
5
5
|
* workbook's lines and the areas of a worked example lie on the page.
|
|
6
6
|
*/
|
|
@@ -27,7 +27,7 @@ export function extentOf(ink, room) {
|
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* The bytes of a work's picture at most, before its encoding: the page's rows at a pixel a unit,
|
|
30
|
-
* each with its filter byte, which keep its PNG within the page's bound of bytes
|
|
30
|
+
* each with its filter byte, which keep its PNG within the page's bound of bytes.
|
|
31
31
|
*/
|
|
32
32
|
export const PICTURE_BYTES = (SHEET.width + 1) * SHEET.height;
|
|
33
33
|
/**
|
package/lib/core/submission.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface PaperForCheck {
|
|
|
16
16
|
readonly png: Uint8Array<ArrayBuffer>;
|
|
17
17
|
readonly submission: PaperSubmission;
|
|
18
18
|
}
|
|
19
|
-
/** The crop of one filled box of a workbook: its item and its slot, from 1, and its PNG
|
|
19
|
+
/** The crop of one filled box of a workbook: its item and its slot, from 1, and its PNG. */
|
|
20
20
|
export interface CellForCheck {
|
|
21
21
|
readonly item: number;
|
|
22
22
|
readonly slot: number;
|
package/lib/core/tracing.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { Stroke } from "./ink.js";
|
|
|
5
5
|
import type { Point } from "./screen.js";
|
|
6
6
|
/**
|
|
7
7
|
* Where the tracing paper of a task from paper lies on the sheet, and whether it is hidden:
|
|
8
|
-
* spec's type, of the contract of canvas and app
|
|
8
|
+
* spec's type, of the contract of canvas and app.
|
|
9
9
|
*/
|
|
10
10
|
export type { TracingState };
|
|
11
11
|
/**
|
|
@@ -25,7 +25,7 @@ export declare const TRACING: Readonly<{
|
|
|
25
25
|
/**
|
|
26
26
|
* The tracing paper's scale: from `min` to `max` times its own size, as the mockup's
|
|
27
27
|
* `Zadacha-masshtab` has it; a button's press multiplies it by `button`, a notch of the wheel by
|
|
28
|
-
* `wheel`, and a scale is kept in hundredths, as the percentage shows it
|
|
28
|
+
* `wheel`, and a scale is kept in hundredths, as the percentage shows it.
|
|
29
29
|
*/
|
|
30
30
|
export declare const SCALE: Readonly<{
|
|
31
31
|
min: 0.4;
|
package/lib/core/tracing.js
CHANGED
|
@@ -18,7 +18,7 @@ export const TRACING = Object.freeze({
|
|
|
18
18
|
/**
|
|
19
19
|
* The tracing paper's scale: from `min` to `max` times its own size, as the mockup's
|
|
20
20
|
* `Zadacha-masshtab` has it; a button's press multiplies it by `button`, a notch of the wheel by
|
|
21
|
-
* `wheel`, and a scale is kept in hundredths, as the percentage shows it
|
|
21
|
+
* `wheel`, and a scale is kept in hundredths, as the percentage shows it.
|
|
22
22
|
*/
|
|
23
23
|
export const SCALE = Object.freeze({ min: 0.4, max: 4, button: 1.2, wheel: 1.08 });
|
|
24
24
|
/** A scale kept to the rule's bounds, in hundredths. */
|
package/lib/core/work.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { Point } from "./screen.js";
|
|
|
8
8
|
* Clearing and erasing are actions too, so undo brings their strokes back. Nothing is
|
|
9
9
|
* redone. The times its methods take are the page's, and the sheet's clock turns one into the
|
|
10
10
|
* sheet's time only when the action lands: an undo that has nothing to take back is no event. A
|
|
11
|
-
* history given to the sheet is replayed by the same rules, each action at its own time
|
|
11
|
+
* history given to the sheet is replayed by the same rules, each action at its own time.
|
|
12
12
|
*/
|
|
13
13
|
export declare class Work {
|
|
14
14
|
#private;
|
package/lib/core/work.js
CHANGED
|
@@ -10,7 +10,7 @@ import { frozen, historyOf, sameEvent } from "./history.js";
|
|
|
10
10
|
* Clearing and erasing are actions too, so undo brings their strokes back. Nothing is
|
|
11
11
|
* redone. The times its methods take are the page's, and the sheet's clock turns one into the
|
|
12
12
|
* sheet's time only when the action lands: an undo that has nothing to take back is no event. A
|
|
13
|
-
* history given to the sheet is replayed by the same rules, each action at its own time
|
|
13
|
+
* history given to the sheet is replayed by the same rules, each action at its own time.
|
|
14
14
|
*/
|
|
15
15
|
export class Work {
|
|
16
16
|
#clock;
|
package/lib/core/zoom.d.ts
CHANGED
package/lib/core/zoom.js
CHANGED
package/lib/element/icons.d.ts
CHANGED
|
@@ -102,7 +102,7 @@ export type IconName = keyof typeof ICONS;
|
|
|
102
102
|
/**
|
|
103
103
|
* Each value of the row, by its button's key: the icon in outline, the one the button shows while
|
|
104
104
|
* chosen — the same for a value without a fill — and whether the icon is mirrored in a row that
|
|
105
|
-
* runs right to left
|
|
105
|
+
* runs right to left.
|
|
106
106
|
*/
|
|
107
107
|
export declare const ROW: {
|
|
108
108
|
readonly task: {
|
package/lib/element/icons.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Written by scripts/icons.ts — `just icons` — from @iconify-json/material-symbols 1.2.99:
|
|
2
|
-
// Material Symbols by Google, under the Apache License 2.0
|
|
2
|
+
// Material Symbols by Google, under the Apache License 2.0.
|
|
3
3
|
// ci-lint fails unless it is what the script writes, so it is never edited by hand. This module is
|
|
4
4
|
// no entry point of the package.
|
|
5
5
|
/** The icons of the row's buttons, by their names in the set, as the element draws them. */
|
|
@@ -152,7 +152,7 @@ export const ICONS = {
|
|
|
152
152
|
/**
|
|
153
153
|
* Each value of the row, by its button's key: the icon in outline, the one the button shows while
|
|
154
154
|
* chosen — the same for a value without a fill — and whether the icon is mirrored in a row that
|
|
155
|
-
* runs right to left
|
|
155
|
+
* runs right to left.
|
|
156
156
|
*/
|
|
157
157
|
export const ROW = {
|
|
158
158
|
task: { outline: "article-outline-rounded", filled: "article-rounded", mirrored: false },
|
package/lib/element/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// The package's entry point @altnovatrail/canvas: the canvas as a custom element, one for every
|
|
2
|
-
// canvas kind, with its markup in an open shadow root
|
|
2
|
+
// canvas kind, with its markup in an open shadow root. Importing it registers the element,
|
|
3
3
|
// once: a page has one element of this name. The types of its contract with app are spec's, of
|
|
4
4
|
// @altnovatrail/spec/canvas: the element implements its CanvasElement, and the package puts the
|
|
5
5
|
// element and its events in the DOM's maps.
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// over the work. The history of writing comes in and goes out, an event tells of every
|
|
13
13
|
// action, and the work for checking is the crop with the context of its submission. Over it
|
|
14
14
|
// all stand the element's own buttons — the tools the task allows, undo and clearing —, labelled
|
|
15
|
-
// in the element's `lang`, on a vertical bar of glass at its left edge
|
|
15
|
+
// in the element's `lang`, on a vertical bar of glass at its left edge. On a tablet a
|
|
16
16
|
// pen's touch puts the page in pen mode, where a finger writes nothing, a palm writes nothing, and
|
|
17
17
|
// two fingers scroll, one finger too.
|
|
18
18
|
// The task comes in the names of the module format 0.4, checked as its schema checks it, and the
|
|
@@ -474,7 +474,7 @@ canvas {
|
|
|
474
474
|
border: 2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor;
|
|
475
475
|
}
|
|
476
476
|
.tracing-scale .mode.back { background: #f2f2f7; color: var(--novatrail-canvas-ink, ${INK}); }
|
|
477
|
-
/* The one motion: a wait for the reading the learner asked for, and only to whom it is no harm
|
|
477
|
+
/* The one motion: a wait for the reading the learner asked for, and only to whom it is no harm. */
|
|
478
478
|
@media (prefers-reduced-motion: no-preference) {
|
|
479
479
|
.scan i { animation: novatrail-scan 1s ease-in-out infinite; }
|
|
480
480
|
.spinner, .tracing-scale .mode.busy::before { animation: novatrail-spin 0.8s linear infinite; }
|
|
@@ -545,7 +545,7 @@ const sheets = new WeakMap();
|
|
|
545
545
|
* Gives the element's shadow root its style, as a sheet the root adopts, and not a `<style>` in
|
|
546
546
|
* its tree: a consumer's content security policy that allows no inline style, as app's
|
|
547
547
|
* `style-src 'self'`, blocks the one and not the other, and the element asks of the policy only
|
|
548
|
-
* `img-src blob
|
|
548
|
+
* `img-src blob:`. A root adopts only a sheet made for its own document, by that
|
|
549
549
|
* document's window, and an element moved into another document comes there without its sheets:
|
|
550
550
|
* it adopts that document's sheet then. A document without a window, which can make no sheet,
|
|
551
551
|
* leaves the element unstyled till it comes into one that can.
|
package/lib/element/tools.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The element's own buttons: the tools the task allows — the pen and the eraser — and
|
|
2
2
|
// the hand, which moves the sheet, undo and clearing, on a vertical bar of glass at the left
|
|
3
|
-
// edge of the element, as the interface mockup draws it
|
|
3
|
+
// edge of the element, as the interface mockup draws it. It is a toolbar as WAI-ARIA's
|
|
4
4
|
// Authoring Practices have one: one stop of Tab, the arrow keys up and down from button to button,
|
|
5
5
|
// and the tools a group of radio buttons that the arrows go through without choosing one. Undo and
|
|
6
6
|
// Clear with nothing to take back or to clear stay where the focus can reach them, marked
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@altnovatrail/canvas",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.41",
|
|
4
4
|
"description": "NovaTrail's canvases: the workplace of a task, where the learner writes, draws and types.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"./lib/element/index.js"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@altnovatrail/spec": "0.19.
|
|
29
|
+
"@altnovatrail/spec": "0.19.12",
|
|
30
30
|
"perfect-freehand": "1.2.3",
|
|
31
31
|
"rbush": "4.0.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@altnovatrail/contracts": "0.19.
|
|
34
|
+
"@altnovatrail/contracts": "0.19.12",
|
|
35
35
|
"@biomejs/biome": "2.6.6",
|
|
36
36
|
"@bufbuild/protobuf": "2.17.0",
|
|
37
37
|
"@iconify-json/material-symbols": "1.2.99",
|