vizmatic 0.7.2 → 0.7.3
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/PROMPT.md +2 -2
- package/ROADMAP.md +1 -1
- package/dist/cli.js +8 -7
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/stage-browser/browser.d.ts +24 -3
- package/dist/stage-browser/stage.js +5 -5
- package/dist/stage.cjs +65 -0
- package/dist/stage.d.cts +24 -3
- package/dist/stage.d.ts +24 -3
- package/dist/stage.js +65 -0
- package/examples/_teaching/categorical-tail-loss.ts +3 -3
- package/examples/_teaching/teaching-byte-diff.ts +3 -3
- package/examples/_teaching/teaching-routed-transfer.ts +3 -3
- package/examples/_teaching/teaching-token-history.ts +2 -2
- package/examples/_teaching/teaching-weighted-vector.ts +3 -3
- package/examples/films/attention.ts +5 -4
- package/examples/films/fourier-epicycles.ts +5 -2
- package/examples/films/pythagoras.ts +2 -2
- package/examples/films/taylor-series.ts +3 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -17718,7 +17718,7 @@ function createTeachingVectorAccumulation(painter) {
|
|
|
17718
17718
|
});
|
|
17719
17719
|
}
|
|
17720
17720
|
const endpoint2 = point(state.sum);
|
|
17721
|
-
const vectorText = (values) => `(${values.map(format).join(", ")})`;
|
|
17721
|
+
const vectorText = (values) => `(${values.map((value) => format(value)).join(", ")})`;
|
|
17722
17722
|
const target = (id, draw) => painter.target ? painter.target(id, draw) : draw();
|
|
17723
17723
|
const paintedTerms = state.terms.map((term, index) => ({
|
|
17724
17724
|
term,
|
package/dist/index.js
CHANGED
|
@@ -13604,7 +13604,7 @@ function createTeachingVectorAccumulation(painter) {
|
|
|
13604
13604
|
});
|
|
13605
13605
|
}
|
|
13606
13606
|
const endpoint2 = point(state.sum);
|
|
13607
|
-
const vectorText = (values) => `(${values.map(format).join(", ")})`;
|
|
13607
|
+
const vectorText = (values) => `(${values.map((value) => format(value)).join(", ")})`;
|
|
13608
13608
|
const target = (id, draw) => painter.target ? painter.target(id, draw) : draw();
|
|
13609
13609
|
const paintedTerms = state.terms.map((term, index) => ({
|
|
13610
13610
|
term,
|
|
@@ -944,7 +944,7 @@ interface DecimalOptions {
|
|
|
944
944
|
/** A number readout that follows a function of the timeline, drawn fresh each frame. */
|
|
945
945
|
declare function decimal(read: () => number, options?: DecimalOptions): Node;
|
|
946
946
|
|
|
947
|
-
type FilmDiagnosticCode = 'film.off_canvas' | 'film.text_overlap' | 'film.text_crossed' | 'film.missing_glyph';
|
|
947
|
+
type FilmDiagnosticCode = 'film.off_canvas' | 'film.text_overlap' | 'film.text_crossed' | 'film.missing_glyph' | 'film.blank';
|
|
948
948
|
interface FilmDiagnostic {
|
|
949
949
|
code: FilmDiagnosticCode;
|
|
950
950
|
severity: 'error' | 'warning';
|
|
@@ -964,14 +964,24 @@ interface FilmDiagnostic {
|
|
|
964
964
|
text?: string;
|
|
965
965
|
/** The second text involved in an overlap. */
|
|
966
966
|
other?: string;
|
|
967
|
+
/**
|
|
968
|
+
* Set when a motion scan finds the problem only while something moves. `time` and `until` then
|
|
969
|
+
* bound the longest stretch. `spans` counts the separate stretches, and `seconds` is their total length.
|
|
970
|
+
*/
|
|
971
|
+
motion?: {
|
|
972
|
+
spans: number;
|
|
973
|
+
seconds: number;
|
|
974
|
+
};
|
|
967
975
|
}
|
|
968
976
|
interface FilmCheckReport {
|
|
969
977
|
ok: boolean;
|
|
970
978
|
width: number;
|
|
971
979
|
height: number;
|
|
972
980
|
duration: number;
|
|
973
|
-
/** The
|
|
981
|
+
/** The moments at rest that were inspected, in seconds. */
|
|
974
982
|
sampled: number[];
|
|
983
|
+
/** The number of frames that a motion scan inspected. */
|
|
984
|
+
frames?: number;
|
|
975
985
|
diagnostics: FilmDiagnostic[];
|
|
976
986
|
summary: {
|
|
977
987
|
errors: number;
|
|
@@ -983,11 +993,22 @@ interface FilmCheckOptions extends CompileOverrides {
|
|
|
983
993
|
times?: readonly number[];
|
|
984
994
|
/** Add this many evenly spaced samples to the moments at rest. */
|
|
985
995
|
samples?: number;
|
|
996
|
+
/**
|
|
997
|
+
* Also inspect every frame. A problem that appears only while something moves is a warning, because
|
|
998
|
+
* the check cannot tell a collision from one picture that replaces another. A stretch of 0.2 seconds
|
|
999
|
+
* or more with nothing visible is reported as `film.blank`.
|
|
1000
|
+
*/
|
|
1001
|
+
motion?: boolean;
|
|
1002
|
+
/**
|
|
1003
|
+
* For a motion scan, the canvas y where the content starts. Marks above it, such as a heading that
|
|
1004
|
+
* stays up, do not count as content when the scan looks for blank frames.
|
|
1005
|
+
*/
|
|
1006
|
+
contentTop?: number;
|
|
986
1007
|
}
|
|
987
1008
|
/**
|
|
988
1009
|
* Inspect a film for layout defects: marks off the canvas, text on text, strokes
|
|
989
1010
|
* through text, and characters that no font can draw. It looks where the film comes to rest, because objects may
|
|
990
|
-
* cross each other while moving. Runs anywhere, with no rendering.
|
|
1011
|
+
* cross each other while moving. With `motion`, it also looks at every frame. Runs anywhere, with no rendering.
|
|
991
1012
|
*/
|
|
992
1013
|
declare function checkFilm(film: FilmDefinition | CompiledFilm, options?: FilmCheckOptions): Promise<FilmCheckReport>;
|
|
993
1014
|
|