@markgrafhq/markgraf-react 0.0.37 → 0.0.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 CHANGED
@@ -15,6 +15,16 @@ Import the package CSS for player styling:
15
15
  import "@markgrafhq/markgraf-react/css";
16
16
  ```
17
17
 
18
+ ## Browser requirements
19
+
20
+ The default Canvas renderer compiles and renders in an inline Web Worker. It
21
+ requires Workers, transferable OffscreenCanvas, FinalizationRegistry, and
22
+ worker-side CSS Font Loading; Content Security Policies must permit
23
+ `worker-src blob:`. Fonts load before `ready` becomes true.
24
+
25
+ There is no automatic renderer fallback. Select `renderer="svg"` explicitly
26
+ when a main-thread SVG player is required.
27
+
18
28
  ## `<MarkgrafPlayer src=... />`
19
29
 
20
30
  Headless component that draws the scene directly into the selected Canvas2D, SVG, or WebGL surface. Bring your own controls.
@@ -39,6 +49,9 @@ export default function App() {
39
49
 
40
50
  ## `useMarkgraf(src, opts?)` — custom UI
41
51
 
52
+ Markgraf does not draw scene names into the diagram. Render `api.keyframe` in
53
+ your own player shell when the current scene name should be visible.
54
+
42
55
  ```jsx
43
56
  import { useMarkgraf } from "@markgrafhq/markgraf-react";
44
57
 
@@ -49,6 +62,12 @@ export function Player({ src }) {
49
62
  <div>
50
63
  <canvas ref={api.elementRef} style={{ width: 600 }} />
51
64
  <button onClick={api.toggle}>{api.playing ? "Pause" : "Play"}</button>
65
+ <button
66
+ disabled={!api.ready}
67
+ onClick={() => api.playPrevious({ duration: 0.8, easing: { bounce: 0 } })}
68
+ >
69
+ Rewind one cue
70
+ </button>
52
71
  <input
53
72
  type="range"
54
73
  min={0}
@@ -75,11 +94,91 @@ export function Player({ src }) {
75
94
  | `playing` | `boolean` | |
76
95
  | `duration` | `number` | total seconds; 0 until `ready` |
77
96
  | `ready` | `boolean` | true after parse + layout + first render |
78
- | `play()` | `() => void` | |
97
+ | `play(options?)` | `(options?: MarkgrafPlaybackOptions) => void` | ordinary playback, optionally directional/looped |
79
98
  | `pause()` | `() => void` | |
80
99
  | `toggle()` | `() => void` | |
81
- | `seek(t)` | `(seconds: number) => void` | clamped to `[0, duration]`, pauses playback |
100
+ | `seek(t)` | `(seconds: number) => void` | clamped to `[0, duration]`; retains playing/paused state |
82
101
  | `setSpeed(x)` | `(speed: number) => void` | `1.0` is normal |
102
+ | `cues`, `steps` | readonly cue arrays | stable IDs, scheduler indices, timestamps, and graph paths |
103
+ | `seekCue(id)`, `seekStep(name)` | `(string) => void` | seek to an explicit cue or named step |
104
+ | `playToCue(id, options?)`, `playToStep(name, options?)` | bounded playback | stop exactly at the selected target |
105
+ | `playNext(options?)`, `playPrevious(options?)` | bounded playback | next/previous matching cue, or end/start boundary |
106
+ | `onCueEnter(fn)`, `onStepEnter(name, fn)` | return an unsubscribe function | cue events in traversal order |
107
+ | `onComplete(fn)` | returns an unsubscribe function | target/boundary completion, not cancellation |
108
+
109
+ ### Finite spring-shaped bounded playback
110
+
111
+ All four bounded methods accept the same options:
112
+
113
+ ```js
114
+ const options = { duration: 0.8, easing: { bounce: 0 } };
115
+ api.playToCue(cueId, options);
116
+ api.playToStep("received", options);
117
+ api.playNext(options);
118
+ api.playPrevious(options);
119
+ ```
120
+
121
+ `easing: {}` or `easing: { bounce: 0 }` opts into finite, monotonic
122
+ spring-shaped motion. The playhead never overshoots the target, lands exactly
123
+ at its timestamp, and has zero endpoint velocity. This is built into Markgraf:
124
+ no Motion installation, React animation loop, or timers are needed.
125
+
126
+ The clock starts when the shared engine accepts the command (in the worker for
127
+ Canvas). Dropped frames do not extend the move: the first frame at or after its
128
+ deadline renders the exact target and emits completion.
129
+
130
+ - With `easing` or `arrival`, a positive finite `duration` (seconds) wins over
131
+ `speed`. Otherwise the duration is derived once from the distance and the
132
+ normalized supplied speed, or current speed when omitted.
133
+ - These options are local to that move. Calling `setSpeed` during it changes
134
+ subsequent runs, not the current move's captured deadline.
135
+ - Without either new field, bounded playback remains constant-speed with
136
+ legacy **speed-first** precedence over duration.
137
+ - Invalid/nonpositive durations are ignored. Zero-distance moves complete
138
+ immediately without an arrival pulse.
139
+ - `stopAt: ["step"]` or `["tokenLine"]` filters next/previous selection; when
140
+ no matching cue remains, those methods move to the end/start boundary.
141
+
142
+ ### Optional arrival emphasis
143
+
144
+ Playhead bounce must be `0`; other values throw. For a visual bounce, explicitly
145
+ select the arriving node instead. For example, if `"received"` is a step and
146
+ `"api"` is a node inside `"cluster"`:
147
+
148
+ ```js
149
+ api.playToStep("received", {
150
+ duration: 0.8,
151
+ arrival: { node: "api", path: ["cluster"], bounce: 0.25 },
152
+ });
153
+ ```
154
+
155
+ `arrival` alone also opts into timed spring-shaped playback. It does not infer
156
+ a node from the cue, token, or camera. `node` is the exact node ID; `path` is the
157
+ ancestor-node path, outermost first, and defaults to `[]` for a root-level node.
158
+ Only that node is emphasized. Its scale pulse occupies the last 45% of the
159
+ move, grows to `1.08`, then springs back to normal by the deadline. Arrival
160
+ `bounce` defaults to `0.25`; finite values are clamped to `[0, 1]`.
161
+
162
+ ### Events and cancellation
163
+
164
+ Subscribe after `api.ready`; subscriptions made before a player exists are
165
+ no-ops. Retain and call each returned unsubscribe function (for example in a
166
+ React effect cleanup); register anew after a source/renderer remount.
167
+
168
+ ```js
169
+ const unsubscribe = api.onComplete(event => {
170
+ console.log(event.reason, event.time); // "target" or "boundary", exact time
171
+ });
172
+ // Later: unsubscribe();
173
+ ```
174
+
175
+ Cue events follow scheduler-index order in the direction of travel, including
176
+ coincident cues up to the chosen target, not beyond it. Completion is emitted
177
+ exactly once, after cue events and the paused state update. React state becomes
178
+ visible on its next render; `event.time` is the authoritative completion time.
179
+ Pausing, seeking, starting a replacement move, or unmounting cancels the
180
+ current bounded move and clears arrival emphasis without emitting completion.
181
+ All seek methods retain the existing playing/paused state; a seek is not a pause.
83
182
 
84
183
  ### Renderer choice
85
184
 
@@ -0,0 +1,90 @@
1
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
2
+ This license is copied below, and is also available with a FAQ at:
3
+ http://scripts.sil.org/OFL
4
+
5
+ -----------------------------------------------------------
6
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
7
+ -----------------------------------------------------------
8
+
9
+ PREAMBLE
10
+ The goals of the Open Font License (OFL) are to stimulate worldwide
11
+ development of collaborative font projects, to support the font creation
12
+ efforts of academic and linguistic communities, and to provide a free and
13
+ open framework in which fonts may be shared and improved in partnership
14
+ with others.
15
+
16
+ The OFL allows the licensed fonts to be used, studied, modified and
17
+ redistributed freely as long as they are not sold by themselves. The
18
+ fonts, including any derivative works, can be bundled, embedded,
19
+ redistributed and/or sold with any software provided that any reserved
20
+ names are not used by derivative works. The fonts and derivatives,
21
+ however, cannot be released under any other type of license. The
22
+ requirement for fonts to remain under this license does not apply
23
+ to any document created using the fonts or their derivatives.
24
+
25
+ DEFINITIONS
26
+ "Font Software" refers to the set of files released by the Copyright
27
+ Holder(s) under this license and clearly marked as such. This may
28
+ include source files, build scripts and documentation.
29
+
30
+ "Reserved Font Name" refers to any names specified as such after the
31
+ copyright statement(s).
32
+
33
+ "Original Version" refers to the collection of Font Software components as
34
+ distributed by the Copyright Holder(s).
35
+
36
+ "Modified Version" refers to any derivative made by adding to, deleting,
37
+ or substituting -- in part or in whole -- any of the components of the
38
+ Original Version, by changing formats or by porting the Font Software to a
39
+ new environment.
40
+
41
+ "Author" refers to any designer, engineer, programmer, technical
42
+ writer or other person who contributed to the Font Software.
43
+
44
+ PERMISSION & CONDITIONS
45
+ Permission is hereby granted, free of charge, to any person obtaining
46
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
47
+ redistribute, and sell modified and unmodified copies of the Font
48
+ Software, subject to the following conditions:
49
+
50
+ 1) Neither the Font Software nor any of its individual components,
51
+ in Original or Modified Versions, may be sold by itself.
52
+
53
+ 2) Original or Modified Versions of the Font Software may be bundled,
54
+ redistributed and/or sold with any software, provided that each copy
55
+ contains the above copyright notice and this license. These can be
56
+ included either as stand-alone text files, human-readable headers or
57
+ in the appropriate machine-readable metadata fields within text or
58
+ binary files as long as those fields can be easily viewed by the user.
59
+
60
+ 3) No Modified Version of the Font Software may use the Reserved Font
61
+ Name(s) unless explicit written permission is granted by the corresponding
62
+ Copyright Holder. This restriction only applies to the primary font name as
63
+ presented to the users.
64
+
65
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
66
+ Software shall not be used to promote, endorse or advertise any
67
+ Modified Version, except to acknowledge the contribution(s) of the
68
+ Copyright Holder(s) and the Author(s) or with their explicit written
69
+ permission.
70
+
71
+ 5) The Font Software, modified or unmodified, in part or in whole,
72
+ must be distributed entirely under this license, and must not be
73
+ distributed under any other license. The requirement for fonts to
74
+ remain under this license does not apply to any document created
75
+ using the Font Software.
76
+
77
+ TERMINATION
78
+ This license becomes null and void if any of the above conditions are
79
+ not met.
80
+
81
+ DISCLAIMER
82
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
83
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
84
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
85
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
86
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
87
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
88
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
89
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
90
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,37 @@
1
+ End User Licence Agreement (EULA)
2
+ Fonderie Typographique Coppers and Brasses
3
+ Version 2.0 issued in February 2015
4
+
5
+
6
+
7
+ The following is an agreement between the user (You) and Fonderie Typographique Coppers and Brasses (Coppers and Brasses). If you do not accept the terms, you may not complete the purchase of the font software license.
8
+
9
+ ¶What you are purchasing from Coppers and Brasses is a license to use font software. You are not purchasing the copyright of the typeface, but the rights to use the font software.
10
+
11
+ ¶The fonts are provided in OpenType (OTF) format. Additional formats are available upon request, and may require the purchase of a different license.
12
+
13
+ ¶You may install and use the font software on the number of computers stated on your receipt. Their geographical location is not limited but the users must belong to the same organization or household.
14
+
15
+ ¶You may back up the font files, but remember that they will stay available for download in your account on our website.
16
+
17
+ ¶You will not distribute the font software to anyone not covered by the license. A copy of the font software may be sent to a prepress bureau, if absolutely necessary. The prepress bureau must however agree to this license agreement and delete the font software when done with the work commissioned by the user.
18
+
19
+ ¶You may modify the font software for your own purposes, but the copyright remains with Coppers and Brasses and the terms of the license agreement remain the same. You may not sell or give away modified versions of the font software.
20
+
21
+ ¶You may not commission a third party to modify the font software without Coppers and Brasses’ written permission.
22
+
23
+ ¶You may embed the font software in a Portable Document Format (PDF), but you will take all reasonable care to embed the font software in a secure way.
24
+
25
+ ¶You will not embed the font files in e-books, applications or other software without a proper app-license. Contact us for more information about app-licenses.
26
+
27
+ ¶You may use images created using the font software on the web, but you will not host font software files on the web without a proper web-license. Contact us for more information about web-licenses.
28
+
29
+ ¶You will not use the font software to produce alphabet products such as, but not limited to: house numbers, stamp sets, rub-on letters, adhesive letters, alphabet punch, die sets or other methods for use in making such products. Any such use requires the purchase of a special license. Contact us for more information about this type of licensing.
30
+
31
+ If you do experience any difficulties with our font software within 90 days after the purchase, we will work with you to resolve any technical issues related to it. If, after we have worked to resolve any technical issues, you are still not satisfied with our software, we will be pleased to refund your money, which shall be the limit of our liability in this transaction.
32
+
33
+ Coppers and Brasses reserves the right to amend or modify this License Agreement at any time and without prior notification.
34
+
35
+ For any licensing situations not covered in this agreement, please contact us.
36
+
37
+ Thank you : )
@@ -0,0 +1,106 @@
1
+ End User License Agreement
2
+
3
+ Coppers and Brasses
4
+
5
+ 1. Definitions
6
+
7
+ "Licensor" is the company providing the License to the Licensee, in this case, Fonderie Typographique Coppers and Brasse Inc., Coppers and Brasses or the Foundry.
8
+
9
+ "Licensee" is the entity or organisation purchasing a License to use the Font Software.
10
+
11
+ "Licensee Size" is the total number of employees, including temporary staff, working for the licensee.
12
+
13
+ "Font Software" refers to the Font Files (Fonts) specified on the sales receipt.
14
+
15
+ "Designer" is any entity (such as a design agency or studio, individual designer, or other service bureau) that provides services to the Licensee involving use of the Fonts.
16
+
17
+ "Subcontractor" is any third party using the Fonts on behalf of the Licensee. Unless the Designer and Licensee are the same entity (i.e. the Designer is creating work for their own organisation), the Designer is a Subcontractor of the Licensee.
18
+
19
+
20
+ 2. Agreement and grant of rights
21
+
22
+ The following is a legal agreement between Fonderie Typographique Coppers and Brasses Inc. (Coppers and Brasses, the Licensor) and You (the Licensee, whose name is specified during the checkout process and appears on the sales receipt).
23
+
24
+ By purchasing, downloading, installing and or using the Font Software, You acknowledge that you have read, understood, and agree to be bound by the terms of this End User License Agreement (EULA, License or Agreement).
25
+
26
+ What You are purchasing from Coppers and Brasses is a License to use the Font Software for the purposes allowed by this agreement. Once the full payment for the appropriate License is processed, Coppers and Brasses will issue You a limited, non-exclusive, non-transferable, non-assignable License for the use of the Font Software.
27
+
28
+ You are not purchasing the rights of the Font Software. Coppers and Brasses together with any successors and assigns retain all rights to the Font Software, the trademarks, the copyrights and the designs embodied in the Font Software. You hereby agree that this term is contractual in nature and that the unauthorized use of the design of the Font and/or the Font Software shall be an infringement of Coppers and Brasses’ rights, causing significant monetary harm. Any rights that are not specifically given by us in this Agreement are reserved.
29
+
30
+
31
+ 3. License Scope
32
+
33
+ All Licensing is one-time, perpetual, and upgradable. If your current use of the Font Software exceeds the use allowed by your License, You agree to immediately contact Coppers and Brasses to purchase an upgrade to the License.
34
+
35
+ This License allows the Licensee to use the Font Software within the organization (or by the entity) specified on the sales receipt.
36
+
37
+ The fonts are provided in OTF (OpenType CFF), TTF (OpenType TrueType), WOFF, WOFF2 and EOT (Embedded OpenType) formats. Additional formats may be available upon request.
38
+
39
+ You may install the Font Software on any number of devices within your organization. You may use the Font Software on any number of websites owned and controlled by your organization. You may embed the Font Software in static documents (such as PDFs), eBooks, digital products, installable applications and other media produced for your organisation.
40
+
41
+ You may only serve the Fonts on websites using the CSS @font-face rule.
42
+
43
+ You may not host the Font Software on any public servers or repositories (ex: Github, Amazon S3, etc.) where they would be accessible to unlicensed third parties.
44
+
45
+ You may not modify, change, alter, edit, decompile, reverse engineer, disassemble, convert, reformat, or create derivative works of the Font Software in any way.
46
+
47
+ You may not commission a third party to modify the Font Software without the prior written permission of Coppers and Brasses.
48
+
49
+ You may not distribute, sell, lend, sublicense, gift, make available, lease and/or rent the Font Software to any third party (unless specifically permitted in this agreement).
50
+
51
+ You may not transfer this Agreement or any of your rights hereunder to any third party without the prior written permission of Coppers and Brasses.
52
+
53
+ You may not use the Font Software in any application in which an unlicensed third party could use it to customise their own designs or create static documents, images, videos, animations (such as but not limited to an online design application or print-on-demand services).
54
+
55
+ You may not use the Font Software to produce alphabet products such as, but not limited to: house numbers, stamp sets, rub-on letters, adhesive letters, alphabet punch, die sets or other methods for use in making such products. Any such use requires the purchase of a special License. Contact us for more information about this type of licensing.
56
+
57
+
58
+ 4. Subcontractors
59
+
60
+ A Commercial License permits any number of Subcontractors to use the Fonts, in accordance with this Agreement, on behalf of the Licensee. You are permitted to send copies of the Fonts to Subcontractors for this purpose. You must ensure that any Subcontractor has read and agreed to the terms of this Agreement before receiving the Fonts.
61
+
62
+ If a Subcontractor stops working for the Licensee, they must destroy all copies of the Fonts in their possession. At no time is any Subcontractor permitted to use the Fonts on behalf of themselves or any party other than the Licensee.
63
+
64
+ Unless a specific exception is granted by Coppers and Brasses, a Subcontractor must not be a subsidiary or parent organisation of the Licensee.
65
+
66
+
67
+ 5. Purchase by a designer
68
+
69
+ A Designer can purchase a Commercial license on behalf of the Licensee (their client), provided that: the Licensee and Licensee Size are correctly specified during the checkout process; the Licensee has read and agreed to the terms of this Agreement; and the Licensee has expressly permitted the Designer to complete the purchase on their behalf.
70
+
71
+ The Designer is not permitted to quote or invoice the Licensee for any price other than the amount they actually paid for the license.
72
+
73
+
74
+ 6. Warranty
75
+
76
+ If you encounter an issue or problem with the Font Software, Coppers and Brasses will make a good faith effort to provide a fix or replacement within 30 days of being notified. If the issue cannot be reasonably remedied, Coppers and Brasses may at their discretion offer to refund you, at which point this Agreement will immediately terminate. This shall be the limit of our liability in this transaction. In no event shall any liability of Coppers and Brasses exceed the purchase price of the License for the Font Software or replacement of the Font Software itself.
77
+
78
+ Coppers and Brasses shall in no event be liable to you or any other third party for any direct, indirect, consequential or incidental damages arising out of the use or inability to use the Fonts, even if notified in advance.
79
+
80
+ You agree to indemnify and hold Coppers and Brasses harmless from and against any claims or damage which may result from your misuse of the Fonts or breach of this Agreement.
81
+
82
+ 7. Legal
83
+
84
+ This License Agreement is subject to and governed by the laws of Canada.
85
+
86
+ This License Agreement is effective upon full payment of the amount charged for the License. This License may be terminated without notice if You breach and/or fail to comply with any term or terms contained herein.
87
+
88
+ Coppers and Brasses reserves the right to amend or modify this License Agreement at any time and without prior notification.
89
+
90
+ This Agreement constitutes the entire understanding between Coppers and Brasses and the Licensee (You) and supersedes all previous agreements, promises, representations and negotiations between the parties, wether verbal or in writing.
91
+
92
+ No amendment, modification or waiver will be valid or enforceable unless materialised in an agreement signed by Coppers and Brasses.
93
+
94
+ If any part of this Agreement is found void or unenforceable, it will not affect the validity of the rest of the Agreement, which shall remain valid and enforceable according to its terms.
95
+
96
+ The failure or election not to enforce a provision of this Agreement by Coppers and Brasses is not a waiver of its right to do so later.
97
+
98
+ The numberings and section titles within this Agreement are for convenience and shall not affect or alter the meaning or construction of any terms or provisions of the Agreement.
99
+
100
+
101
+
102
+ For any licensing situations not covered in this agreement or if you have any questions regarding this Agreement, please contact us at hello@coppersandbrasses.com.
103
+
104
+ Thank you.
105
+
106
+ Version 5.0 issued in June 2022
@@ -26,11 +26,16 @@
26
26
  .markgraf-embed svg[data-mg="stage"] {
27
27
  width: 100%;
28
28
  height: auto;
29
+ min-height: 180px;
29
30
  display: block;
30
31
  max-height: var(--mg-max-height, 90svh);
31
32
  object-fit: contain;
32
33
  }
33
34
 
35
+ .markgraf-embed canvas[data-mg="stage"] {
36
+ aspect-ratio: 16 / 9;
37
+ }
38
+
34
39
  .markgraf-embed :focus,
35
40
  .markgraf-embed :focus-visible {
36
41
  outline: none;
@@ -6,12 +6,29 @@ import type { FC, MutableRefObject } from "react";
6
6
  export type MarkgrafCueKind = "step" | "tokenLine";
7
7
  export type MarkgrafPlaybackDirection = "auto" | "forward" | "backward";
8
8
 
9
+ /** Finite, monotonic spring-shaped playhead easing; it never overshoots. */
10
+ export interface MarkgrafPlaybackEasing {
11
+ bounce?: 0;
12
+ }
13
+
14
+ /** Optional visual pulse on exactly one node, independent of the playhead. */
15
+ export interface MarkgrafArrival {
16
+ node: string;
17
+ /** Ancestor node IDs, outermost first. Omit for a root-level node. */
18
+ path?: string[];
19
+ /** Defaults to 0.25; finite values are clamped to [0, 1]. */
20
+ bounce?: number;
21
+ }
22
+
9
23
  export interface MarkgrafPlaybackOptions {
10
24
  direction?: MarkgrafPlaybackDirection;
11
25
  speed?: number;
26
+ /** Seconds for a bounded move; with easing/arrival, takes precedence over speed. */
12
27
  duration?: number;
13
28
  loop?: boolean;
14
29
  stopAt?: MarkgrafCueKind[];
30
+ easing?: MarkgrafPlaybackEasing;
31
+ arrival?: MarkgrafArrival;
15
32
  }
16
33
 
17
34
  export interface MarkgrafCueBase {
@@ -50,8 +67,8 @@ export interface MarkgrafCompleteEvent {
50
67
 
51
68
  /**
52
69
  * Reactive view of a mounted markgraf player. `time`, `keyframe`, and
53
- * `playing` update on every animation frame; the imperative methods are
54
- * stable across renders.
70
+ * `playing` update on every animation frame. Imperative methods address the
71
+ * currently mounted player, including when retained across renders.
55
72
  *
56
73
  * `elementRef` is typed by the renderer you chose:
57
74
  * - default / `"canvas"` → `Ref<HTMLCanvasElement | null>`
@@ -78,7 +95,7 @@ export interface MarkgrafApi<E extends Element = HTMLCanvasElement> {
78
95
  playWith(options?: MarkgrafPlaybackOptions): void;
79
96
  pause(): void;
80
97
  toggle(): void;
81
- /** Clamped to `[0, duration]`. Pauses the player. */
98
+ /** Clamped to `[0, duration]`. Cancels a bounded move but preserves playing/paused state. */
82
99
  seek(seconds: number): void;
83
100
  seekCue(cueId: string): void;
84
101
  seekStep(stepName: string): void;
@@ -86,7 +103,7 @@ export interface MarkgrafApi<E extends Element = HTMLCanvasElement> {
86
103
  playToStep(stepName: string, options?: MarkgrafPlaybackOptions): void;
87
104
  playNext(options?: MarkgrafPlaybackOptions): void;
88
105
  playPrevious(options?: MarkgrafPlaybackOptions): void;
89
- /** `1.0` is normal playback speed. */
106
+ /** `1.0` is normal. Does not change an opted-in move's captured deadline. */
90
107
  setSpeed(speed: number): void;
91
108
  onCueEnter(callback: (cue: MarkgrafCue) => void): () => void;
92
109
  onStepEnter(stepName: string, callback: (cue: MarkgrafStepCue) => void): () => void;