@meltemi/diagrams-canvas 1.9.0 → 1.10.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 +15 -2
- package/canvas.css +619 -20
- package/dist/add-icons.d.ts +137 -0
- package/dist/add-icons.d.ts.map +1 -0
- package/dist/add-icons.js +387 -0
- package/dist/add-icons.js.map +1 -0
- package/dist/app.d.ts +162 -5
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +972 -58
- package/dist/app.js.map +1 -1
- package/dist/dom.d.ts +2 -0
- package/dist/dom.d.ts.map +1 -1
- package/dist/dom.js +2 -0
- package/dist/dom.js.map +1 -1
- package/dist/glyphs.d.ts +6 -1
- package/dist/glyphs.d.ts.map +1 -1
- package/dist/glyphs.js +85 -13
- package/dist/glyphs.js.map +1 -1
- package/dist/icon-picker.d.ts +5 -0
- package/dist/icon-picker.d.ts.map +1 -1
- package/dist/icon-picker.js +12 -1
- package/dist/icon-picker.js.map +1 -1
- package/dist/inspector.d.ts +88 -3
- package/dist/inspector.d.ts.map +1 -1
- package/dist/inspector.js +331 -17
- package/dist/inspector.js.map +1 -1
- package/dist/library.d.ts +6 -0
- package/dist/library.d.ts.map +1 -1
- package/dist/library.js +11 -2
- package/dist/library.js.map +1 -1
- package/dist/messages/en.d.ts +61 -3
- package/dist/messages/en.d.ts.map +1 -1
- package/dist/messages/en.js +58 -3
- package/dist/messages/en.js.map +1 -1
- package/dist/messages/es.d.ts.map +1 -1
- package/dist/messages/es.js +47 -3
- package/dist/messages/es.js.map +1 -1
- package/dist/messages/index.d.ts +50 -3
- package/dist/messages/index.d.ts.map +1 -1
- package/dist/presence-layer.d.ts +46 -10
- package/dist/presence-layer.d.ts.map +1 -1
- package/dist/presence-layer.js +133 -13
- package/dist/presence-layer.js.map +1 -1
- package/dist/presence.d.ts +47 -0
- package/dist/presence.d.ts.map +1 -1
- package/dist/presence.js +69 -0
- package/dist/presence.js.map +1 -1
- package/dist/trail.d.ts +60 -0
- package/dist/trail.d.ts.map +1 -0
- package/dist/trail.js +107 -0
- package/dist/trail.js.map +1 -0
- package/dist/view-only.d.ts +2 -2
- package/dist/view-only.d.ts.map +1 -1
- package/dist/view-only.js +5 -2
- package/dist/view-only.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -47,8 +47,21 @@ A host that shares the diagram can show who else is in it with `presence` messag
|
|
|
47
47
|
in `@meltemi/diagrams-editor`): the other people, each with a name, a colour and the ids they have
|
|
48
48
|
selected. The canvas draws an outline in the person's colour around each of those and a tag with
|
|
49
49
|
the name (always text, never markup) on a layer above the scene that is never selected, copied or
|
|
50
|
-
exported and that nothing of is sent back.
|
|
51
|
-
|
|
50
|
+
exported and that nothing of is sent back. A person may also have a `pointer` (`{ x, y }` in
|
|
51
|
+
diagram units): the canvas draws a cursor in their colour with the name at its tail, which glides
|
|
52
|
+
to the next point in 200 ms and keeps its size at every zoom. Each message replaces the last; a
|
|
53
|
+
message with nobody, an empty canvas or another diagram clears it, and ids the diagram does not
|
|
54
|
+
have, and pointers that are not two finite numbers, are ignored. Once a host has sent `presence`,
|
|
55
|
+
the canvas tells it where the person's own pointer is with `presencePointer` messages (diagram
|
|
56
|
+
units and the diagram's id, `null` when it leaves), at most every 50 ms.
|
|
57
|
+
|
|
58
|
+
The Pointer tool (K, or its toggle before the grid's) draws a trail that fades in 800 ms and edits
|
|
59
|
+
nothing, on every canvas, read-only ones included; the trail is no part of the document or of any
|
|
60
|
+
export. In the colour of the person: the `me: { colour }` of the last `presence` message, else the
|
|
61
|
+
render's `colors.accent`. A person's `laser` (`{ batch, points }`, at most 64 points `{ x, y, t }`,
|
|
62
|
+
`t` in milliseconds since the batch's first point) is drawn once per `batch` as that person's trail,
|
|
63
|
+
and the canvas posts the points of the person's own strokes with `presenceLaser` messages to a host
|
|
64
|
+
that has sent `presence`, at most every 50 ms.
|
|
52
65
|
|
|
53
66
|
Popovers, menus, side panels, tooltips and target outlines open and close with short transitions
|
|
54
67
|
on the motion tokens of `canvas.css` (`--mdg-motion-fast`, `--mdg-motion`, `--mdg-motion-slow`,
|