@mechane-ai/elements 0.67.0 → 0.69.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/dist/ai.js +226 -225
- package/dist/{article-anMy8fA5.js → article-CTSxWe4y.js} +104 -89
- package/dist/article.js +1 -1
- package/dist/catalog.json +131 -1
- package/dist/{categorical-values-Bh7ZkEQn.js → categorical-values-DwomVcSd.js} +1 -1
- package/dist/{cells-X8SVrZBc.js → cells-BRI8LpMU.js} +1 -1
- package/dist/charts/cartesian.js +1 -1
- package/dist/charts/cells.js +1 -1
- package/dist/charts/comparison.js +1 -1
- package/dist/charts/distribution.js +1 -1
- package/dist/charts/figure.js +12 -12
- package/dist/charts/graph.js +1 -1
- package/dist/charts/hierarchy.js +1 -1
- package/dist/charts/image.js +1 -1
- package/dist/charts/matrix.js +2 -2
- package/dist/charts/plot.js +16 -15
- package/dist/charts/relationship.js +1 -1
- package/dist/charts/text.js +1 -1
- package/dist/charts/timeline.js +2 -2
- package/dist/charts/trend.js +1 -1
- package/dist/charts.js +3 -3
- package/dist/{color-legend-CIo7DhXB.js → color-legend-4As8881l.js} +1 -1
- package/dist/content/markdown.js +1 -1
- package/dist/content.js +1 -1
- package/dist/{dumbbell-plot-BQDGe0sQ.js → dumbbell-plot-S4RyfxmW.js} +5 -5
- package/dist/{embedding-map-DmmknG7A.js → embedding-map-Bm7aTA6z.js} +5 -5
- package/dist/figure-format-BVb7yFCA.js +46 -0
- package/dist/{figure-frame-DlyNTDzh.js → figure-frame-BHCNceS4.js} +1 -1
- package/dist/{image-grid-CxEAQvTf.js → image-grid-TTrLxvaI.js} +3 -3
- package/dist/kits/evaluation.js +5 -5
- package/dist/kits/interpretability.js +8 -8
- package/dist/kits/operations.js +4 -4
- package/dist/kits/research.js +1087 -230
- package/dist/kits/training.js +4 -4
- package/dist/lesson.js +3 -3
- package/dist/locate-Dcq5ZZSk.js +14 -0
- package/dist/markdown-JeuBeMDZ.js +293 -0
- package/dist/mdx.js +4 -4
- package/dist/packages/charts/src/plot/index.d.ts +3 -0
- package/dist/packages/charts/src/plot/locate.d.ts +3 -1
- package/dist/packages/charts/src/plot/plot-layout.d.ts +2 -2
- package/dist/packages/charts/src/plot/spatial-layer.d.ts +36 -0
- package/dist/packages/charts/src/plot/step-history.d.ts +13 -0
- package/dist/packages/charts/src/plot/ticks.d.ts +2 -2
- package/dist/packages/content/src/timeline-scrubber.d.ts +3 -1
- package/dist/packages/foundations/src/visible-motion.d.ts +1 -1
- package/dist/packages/kits/src/research/index.d.ts +14 -0
- package/dist/packages/kits/src/research/motion-clip.d.ts +3 -0
- package/dist/packages/kits/src/research/motion-error.d.ts +8 -0
- package/dist/packages/kits/src/research/motion-figure.d.ts +12 -0
- package/dist/packages/kits/src/research/motion-frame.d.ts +22 -0
- package/dist/packages/kits/src/research/motion-inspection.d.ts +14 -0
- package/dist/packages/kits/src/research/motion-location.d.ts +9 -0
- package/dist/packages/kits/src/research/motion-scene.d.ts +29 -0
- package/dist/packages/kits/src/research/motion-types.d.ts +54 -0
- package/dist/packages/kits/src/research/motion-view.d.ts +9 -0
- package/dist/packages/kits/src/research/native-motion-figure.d.ts +17 -0
- package/dist/packages/kits/src/research/native-motion.d.ts +18 -0
- package/dist/packages/teaching/src/article/uncover.d.ts +2 -0
- package/dist/{param-CKr8EYxF.js → param-Dk92C-K1.js} +1 -1
- package/dist/plot-BIYlgY2B.js +223 -0
- package/dist/{plot-layout-CVzSbcU7.js → plot-layout-CNNFMC8H.js} +152 -102
- package/dist/{plot-surface-CBhI1alw.js → plot-surface-BSjoNIva.js} +1 -1
- package/dist/{reference-lines-C970JwWZ.js → reference-lines-Bet_hRyA.js} +1 -1
- package/dist/{scene-C3dCxckI.js → scene-C88Xkz4l.js} +7 -7
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-DekEJxsy.js → slope-chart-B6Mtcta2.js} +6 -6
- package/dist/{src-BsqbWDxS.js → src-DCozYUGI.js} +146 -131
- package/dist/styles2.css +16 -4
- package/dist/{time-series-BSNnijxf.js → time-series-DJk-2Mt0.js} +7 -7
- package/dist/{timeline-CnxfYSIg.js → timeline-BHpj7i7K.js} +4 -4
- package/dist/{token-heatmap-CJaXo56P.js → token-heatmap-DEqEaoGE.js} +273 -288
- package/dist/{token-predictions-Bi7aKPnh.js → token-predictions-Bjdh0K-A.js} +5 -5
- package/dist/{transport-CXj0DV6o.js → transport-DQ1yzsQl.js} +2 -2
- package/dist/{tree-diagram-BxOZsjr1.js → tree-diagram-BxSDOBFj.js} +4 -4
- package/dist/{treemap-B2yOAetT.js → treemap-DzHAp4ia.js} +5 -5
- package/dist/{use-tween-C1TWJwce.js → use-tween-DbXVZBR8.js} +1 -1
- package/dist/{violin-plot-W2L_2JRo.js → violin-plot-B4Cf38Y9.js} +5 -5
- package/dist/visible-motion-D6NwjGNz.js +24 -0
- package/dist/{waterfall-Bt73N2Ng.js → waterfall-C9_pHZzv.js} +4 -4
- package/package.json +1 -1
- package/recipes/recorded-motion.tsx +14 -0
- package/skills/review-elements/SKILL.md +6 -0
- package/skills/review-explainer/SKILL.md +4 -0
- package/skills/use-elements/SKILL.md +2 -0
- package/skills/use-elements/references/kits.md +33 -0
- package/skills/write-explainer/SKILL.md +5 -0
- package/dist/figure-format-B8kRZMlo.js +0 -36
- package/dist/locate-Bcg3QcP4.js +0 -11
- package/dist/markdown-Diffqqm7.js +0 -313
package/dist/kits/training.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "../src-DIS0YOj0.js";
|
|
2
2
|
import { i as t, t as n } from "../tone-scope-DKiSw-JR.js";
|
|
3
|
-
import { r, s as i } from "../slope-chart-
|
|
3
|
+
import { r, s as i } from "../slope-chart-B6Mtcta2.js";
|
|
4
4
|
import { c as a, o } from "../src-Bkov5TTa.js";
|
|
5
|
-
import { T as s } from "../plot-layout-
|
|
6
|
-
import { o as c, t as l } from "../cells-
|
|
7
|
-
import { r as u } from "../figure-format-
|
|
5
|
+
import { T as s } from "../plot-layout-CNNFMC8H.js";
|
|
6
|
+
import { o as c, t as l } from "../cells-BRI8LpMU.js";
|
|
7
|
+
import { r as u } from "../figure-format-BVb7yFCA.js";
|
|
8
8
|
import { d, g as f, h as p } from "../src-Dc1t1ugL.js";
|
|
9
9
|
import "@stylexjs/stylex";
|
|
10
10
|
import { useState as m } from "react";
|
package/dist/lesson.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e, t } from "./clock-DSm5lkNE.js";
|
|
2
|
-
import { _ as n, g as r, h as i, i as a, l as o, n as s, t as c, u as l } from "./param-
|
|
3
|
-
import { t as u } from "./use-tween-
|
|
4
|
-
import { a as d, c as f, d as p, i as m, l as h, n as g, o as _, r as v, s as y, t as b, u as x } from "./transport-
|
|
2
|
+
import { _ as n, g as r, h as i, i as a, l as o, n as s, t as c, u as l } from "./param-Dk92C-K1.js";
|
|
3
|
+
import { t as u } from "./use-tween-DbXVZBR8.js";
|
|
4
|
+
import { a as d, c as f, d as p, i as m, l as h, n as g, o as _, r as v, s as y, t as b, u as x } from "./transport-DQ1yzsQl.js";
|
|
5
5
|
export { a as BoundValue, h as Lesson, i as LessonLocale, c as Param, m as ParamChoice, d as ParamSlider, _ as ParamToggle, g as Playback, b as Transport, s as Value, n as createTween, o as defineLesson, t as isMotionReduced, l as lessonGraph, e as onFrame, x as playbackPaces, p as playbackRuns, y as useLesson, f as useLessonContext, r as useLessonLocale, v as usePlayback, u as useTween };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
function e({ marks: e, width: t, height: n, axis: r = "both", maxDistance: i }) {
|
|
2
|
+
return (a) => {
|
|
3
|
+
let o = a.width / t, s = a.height / n, c = {
|
|
4
|
+
distance: (i ?? Infinity) ** 2,
|
|
5
|
+
id: void 0
|
|
6
|
+
};
|
|
7
|
+
for (let t of e) {
|
|
8
|
+
let e = r === "y" ? 0 : t.x * o - a.x, n = r === "x" ? 0 : t.y * s - a.y, i = e * e + n * n;
|
|
9
|
+
i <= c.distance && (c.distance = i, c.id = t.id);
|
|
10
|
+
}
|
|
11
|
+
return c.id;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export { e as t };
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { t as e } from "./use-scroll-tab-index-Dxpdh4W7.js";
|
|
2
|
+
import { t } from "./visible-motion-D6NwjGNz.js";
|
|
3
|
+
import { t as n } from "./code-block-DbW_t9U4.js";
|
|
4
|
+
import { n as r, t as i } from "./content-link-BN4NPp0u.js";
|
|
5
|
+
import { t as a } from "./viewer-styles-DsFYri4K.js";
|
|
6
|
+
import * as o from "@stylexjs/stylex";
|
|
7
|
+
import { Children as s, createContext as c, createElement as l, memo as u, useContext as d, useMemo as f } from "react";
|
|
8
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
9
|
+
import { Block as g, Streamdown as _, defaultRehypePlugins as v, defaultRemarkPlugins as y, useIsCodeFenceIncomplete as b } from "streamdown";
|
|
10
|
+
// packages/content/src/markdown/markdown-options.ts
|
|
11
|
+
var x = /* @__PURE__ */ new Set(["href", "src"]), S = {
|
|
12
|
+
rehypePlugins: Object.entries(v).filter(([e]) => e === "sanitize").map(([, e]) => e),
|
|
13
|
+
remarkPlugins: Object.values(y),
|
|
14
|
+
skipHtml: !0,
|
|
15
|
+
urlTransform: (e, t) => {
|
|
16
|
+
if (x.has(t)) return r(e);
|
|
17
|
+
}
|
|
18
|
+
}, C = {
|
|
19
|
+
root: {
|
|
20
|
+
k7Eaqz: "xeuugli",
|
|
21
|
+
kMwMTN: "xbixft",
|
|
22
|
+
kMv6JI: "x1hz01jw",
|
|
23
|
+
khiITx: "xvmahel",
|
|
24
|
+
kGuDYH: "xtqrqnz",
|
|
25
|
+
kLWn49: "x1ytb0s6",
|
|
26
|
+
k63SB2: "xj57cvi",
|
|
27
|
+
kHjlTd: "xj0a0fe",
|
|
28
|
+
$$css: !0
|
|
29
|
+
},
|
|
30
|
+
block: {
|
|
31
|
+
keoZOQ: "xyrmp21 x14l7nz5",
|
|
32
|
+
k1K539: "x1jfksii xzboxd6",
|
|
33
|
+
$$css: !0
|
|
34
|
+
},
|
|
35
|
+
heading: {
|
|
36
|
+
keoZOQ: "x1m1vpj6 x14l7nz5",
|
|
37
|
+
k1K539: "x1jfksii xzboxd6",
|
|
38
|
+
k63SB2: "x1b5ytql",
|
|
39
|
+
$$css: !0
|
|
40
|
+
},
|
|
41
|
+
title: {
|
|
42
|
+
kGuDYH: "x1i2cqwi",
|
|
43
|
+
kLWn49: "x4fansv",
|
|
44
|
+
$$css: !0
|
|
45
|
+
},
|
|
46
|
+
section: {
|
|
47
|
+
kGuDYH: "x12myhf4",
|
|
48
|
+
kLWn49: "x1778rvt",
|
|
49
|
+
$$css: !0
|
|
50
|
+
},
|
|
51
|
+
minor: {
|
|
52
|
+
kGuDYH: "xtqrqnz",
|
|
53
|
+
kLWn49: "x1778rvt",
|
|
54
|
+
$$css: !0
|
|
55
|
+
},
|
|
56
|
+
tableRegion: {
|
|
57
|
+
k7Eaqz: "xeuugli",
|
|
58
|
+
ks0D6T: "x193iq5w",
|
|
59
|
+
kXHlph: "xw2csxc",
|
|
60
|
+
kMzoRj: "xmkeg23",
|
|
61
|
+
kt9PQ7: "x1qhh985",
|
|
62
|
+
ksu8eU: "x1y0btm7",
|
|
63
|
+
kVAM5u: "x1ey3b81",
|
|
64
|
+
$$css: !0
|
|
65
|
+
},
|
|
66
|
+
strong: {
|
|
67
|
+
k63SB2: "x1b5ytql",
|
|
68
|
+
$$css: !0
|
|
69
|
+
},
|
|
70
|
+
muted: {
|
|
71
|
+
kMwMTN: "x153jb6y",
|
|
72
|
+
$$css: !0
|
|
73
|
+
}
|
|
74
|
+
}, w = {
|
|
75
|
+
default: null,
|
|
76
|
+
muted: C.muted
|
|
77
|
+
}, T = {
|
|
78
|
+
regular: null,
|
|
79
|
+
strong: C.strong
|
|
80
|
+
}, E = c(1), D = {
|
|
81
|
+
animation: "fadeIn",
|
|
82
|
+
duration: 160,
|
|
83
|
+
stagger: 14,
|
|
84
|
+
maxBacklogMs: 100
|
|
85
|
+
}, O = /* @__PURE__ */ new Set(["string", "number"]);
|
|
86
|
+
function k(e) {
|
|
87
|
+
return O.has(typeof e);
|
|
88
|
+
}
|
|
89
|
+
function A({ children: e, className: t }) {
|
|
90
|
+
let r = b(), i = typeof t == "string" ? /(?:^|\s)language-([^\s]+)/u.exec(t) : null, a = i === null ? void 0 : i[1], o = s.toArray(e);
|
|
91
|
+
return o.every(k) ? /* @__PURE__ */ m("div", {
|
|
92
|
+
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6",
|
|
93
|
+
children: /* @__PURE__ */ m(n, {
|
|
94
|
+
code: o.join(""),
|
|
95
|
+
language: a,
|
|
96
|
+
isStreaming: r
|
|
97
|
+
})
|
|
98
|
+
}) : /* @__PURE__ */ m("code", {
|
|
99
|
+
className: "xiard35 xy8obcc x1r7kqkb x1ok0vyi x10dazmo x14w6jbu x17etxam",
|
|
100
|
+
children: e
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function j({ level: e, children: t, id: n }) {
|
|
104
|
+
let r = d(E), i = `h${Math.min(e + r - 1, 6)}`, a = e === 1 ? C.title : e === 2 ? C.section : C.minor;
|
|
105
|
+
return l(i, {
|
|
106
|
+
id: n,
|
|
107
|
+
...o.props(C.heading, a)
|
|
108
|
+
}, t);
|
|
109
|
+
}
|
|
110
|
+
function M({ children: t }) {
|
|
111
|
+
let n = e();
|
|
112
|
+
return /* @__PURE__ */ m("div", {
|
|
113
|
+
ref: n.ref,
|
|
114
|
+
role: "region",
|
|
115
|
+
"aria-label": "Markdown table",
|
|
116
|
+
tabIndex: n.tabIndex,
|
|
117
|
+
...o.props(a.scrollRegion, C.block, C.tableRegion),
|
|
118
|
+
children: /* @__PURE__ */ m("table", {
|
|
119
|
+
className: "xh8yej3 x1mwwwfo xss6m8b x1yc453h x1h4wwuj x1778rvt",
|
|
120
|
+
children: t
|
|
121
|
+
})
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
var N = c(void 0);
|
|
125
|
+
function P(e) {
|
|
126
|
+
let t = d(N);
|
|
127
|
+
return t === void 0 ? /* @__PURE__ */ m(i, {
|
|
128
|
+
href: e.href,
|
|
129
|
+
title: e.title,
|
|
130
|
+
children: e.children
|
|
131
|
+
}) : t(e);
|
|
132
|
+
}
|
|
133
|
+
var F = {
|
|
134
|
+
h1: (e) => /* @__PURE__ */ m(j, {
|
|
135
|
+
...e,
|
|
136
|
+
level: 1
|
|
137
|
+
}),
|
|
138
|
+
h2: (e) => /* @__PURE__ */ m(j, {
|
|
139
|
+
...e,
|
|
140
|
+
level: 2
|
|
141
|
+
}),
|
|
142
|
+
h3: (e) => /* @__PURE__ */ m(j, {
|
|
143
|
+
...e,
|
|
144
|
+
level: 3
|
|
145
|
+
}),
|
|
146
|
+
h4: (e) => /* @__PURE__ */ m(j, {
|
|
147
|
+
...e,
|
|
148
|
+
level: 4
|
|
149
|
+
}),
|
|
150
|
+
h5: (e) => /* @__PURE__ */ m(j, {
|
|
151
|
+
...e,
|
|
152
|
+
level: 5
|
|
153
|
+
}),
|
|
154
|
+
h6: (e) => /* @__PURE__ */ m(j, {
|
|
155
|
+
...e,
|
|
156
|
+
level: 6
|
|
157
|
+
}),
|
|
158
|
+
p: ({ children: e }) => /* @__PURE__ */ m("p", {
|
|
159
|
+
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6",
|
|
160
|
+
children: e
|
|
161
|
+
}),
|
|
162
|
+
ul: ({ children: e }) => /* @__PURE__ */ m("ul", {
|
|
163
|
+
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6 x1sbza1b",
|
|
164
|
+
children: e
|
|
165
|
+
}),
|
|
166
|
+
ol: ({ children: e, start: t }) => /* @__PURE__ */ m("ol", {
|
|
167
|
+
start: t,
|
|
168
|
+
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6 x1sbza1b",
|
|
169
|
+
children: e
|
|
170
|
+
}),
|
|
171
|
+
li: ({ children: e }) => /* @__PURE__ */ m("li", {
|
|
172
|
+
className: "x1vblts3 xnkn1qj",
|
|
173
|
+
children: e
|
|
174
|
+
}),
|
|
175
|
+
blockquote: ({ children: e }) => /* @__PURE__ */ m("blockquote", {
|
|
176
|
+
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6 xrxpjvj x1umj4g3 xyumdvf x1t7ytsu x97x49r x153jb6y",
|
|
177
|
+
children: e
|
|
178
|
+
}),
|
|
179
|
+
code: ({ children: e, className: t }) => /* @__PURE__ */ m(A, {
|
|
180
|
+
className: t,
|
|
181
|
+
children: e
|
|
182
|
+
}),
|
|
183
|
+
inlineCode: ({ children: e }) => /* @__PURE__ */ m("code", {
|
|
184
|
+
className: "xiard35 xy8obcc x1r7kqkb x1ok0vyi x10dazmo x14w6jbu x17etxam",
|
|
185
|
+
children: e
|
|
186
|
+
}),
|
|
187
|
+
a: ({ href: e, children: t, title: n }) => /* @__PURE__ */ m(P, {
|
|
188
|
+
kind: "link",
|
|
189
|
+
href: e,
|
|
190
|
+
title: n,
|
|
191
|
+
children: t
|
|
192
|
+
}),
|
|
193
|
+
img: ({ src: e, alt: t, title: n }) => /* @__PURE__ */ m(P, {
|
|
194
|
+
kind: "image",
|
|
195
|
+
href: typeof e == "string" ? e : void 0,
|
|
196
|
+
title: n,
|
|
197
|
+
children: t !== void 0 && t.length > 0 ? `Open image: ${t}` : "Open image"
|
|
198
|
+
}),
|
|
199
|
+
table: ({ children: e }) => /* @__PURE__ */ m(M, { children: e }),
|
|
200
|
+
thead: ({ children: e }) => /* @__PURE__ */ m("thead", { children: e }),
|
|
201
|
+
tbody: ({ children: e }) => /* @__PURE__ */ m("tbody", { children: e }),
|
|
202
|
+
tr: ({ children: e }) => /* @__PURE__ */ m("tr", { children: e }),
|
|
203
|
+
th: ({ children: e }) => /* @__PURE__ */ m("th", {
|
|
204
|
+
scope: "col",
|
|
205
|
+
className: "xn9t2bk x1doqdfy xso031l x1q0q8m5 x1qndepd x16dsc37 x1yc453h x153jb6y xk4h15q x1r7kqkb",
|
|
206
|
+
children: e
|
|
207
|
+
}),
|
|
208
|
+
td: ({ children: e }) => /* @__PURE__ */ m("td", {
|
|
209
|
+
className: "xn9t2bk x1doqdfy xso031l x1q0q8m5 x1qndepd x16dsc37 x1yc453h",
|
|
210
|
+
children: e
|
|
211
|
+
}),
|
|
212
|
+
input: ({ checked: e }) => /* @__PURE__ */ m("input", {
|
|
213
|
+
type: "checkbox",
|
|
214
|
+
checked: e ?? !1,
|
|
215
|
+
disabled: !0,
|
|
216
|
+
"aria-label": "Task item",
|
|
217
|
+
className: "x1bzlxqo x6e7ywc"
|
|
218
|
+
}),
|
|
219
|
+
hr: () => /* @__PURE__ */ m("hr", { className: "xhff0hu xc342km x178xt8z x13fuv20 xhjagg4" }),
|
|
220
|
+
strong: ({ children: e }) => /* @__PURE__ */ m("strong", {
|
|
221
|
+
className: "x1b5ytql",
|
|
222
|
+
children: e
|
|
223
|
+
}),
|
|
224
|
+
em: ({ children: e }) => /* @__PURE__ */ m("em", {
|
|
225
|
+
className: "x1k4tb9n",
|
|
226
|
+
children: e
|
|
227
|
+
}),
|
|
228
|
+
del: ({ children: e }) => /* @__PURE__ */ m("del", {
|
|
229
|
+
className: "x5lhwog",
|
|
230
|
+
children: e
|
|
231
|
+
})
|
|
232
|
+
}, I = /* @__PURE__ */ "p.span.h1.h2.h3.h4.h5.h6.ul.ol.li.blockquote.pre.code.a.img.table.thead.tbody.tr.th.td.input.hr.strong.em.del.br.sup.sub.section".split("."), L = u(({ children: e, isStreaming: n = !1, label: r, headingLevel: i = 1, tone: a = "default", weight: s = "regular", renderLink: c, remarkPlugins: l }) => {
|
|
233
|
+
let { ref: u, isActive: d } = t(n), p = f(() => [...S.remarkPlugins ?? [], ...l ?? []], [l]);
|
|
234
|
+
return /* @__PURE__ */ m(N, {
|
|
235
|
+
value: c,
|
|
236
|
+
children: /* @__PURE__ */ m(E, {
|
|
237
|
+
value: i,
|
|
238
|
+
children: /* @__PURE__ */ m("div", {
|
|
239
|
+
ref: u,
|
|
240
|
+
"data-streamdown-paused": n && !d ? "" : void 0,
|
|
241
|
+
children: /* @__PURE__ */ m(_, {
|
|
242
|
+
...S,
|
|
243
|
+
remarkPlugins: p,
|
|
244
|
+
...o.props(C.root, w[a], T[s]),
|
|
245
|
+
"aria-label": r,
|
|
246
|
+
components: F,
|
|
247
|
+
mode: n ? "streaming" : "static",
|
|
248
|
+
isAnimating: n,
|
|
249
|
+
animated: n ? D : !1,
|
|
250
|
+
controls: !1,
|
|
251
|
+
linkSafety: { enabled: !1 },
|
|
252
|
+
allowedElements: I,
|
|
253
|
+
children: e
|
|
254
|
+
})
|
|
255
|
+
})
|
|
256
|
+
})
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
// packages/content/src/markdown/markdown-preview.tsx
|
|
260
|
+
function R({ children: e }) {
|
|
261
|
+
return /* @__PURE__ */ h(p, { children: [e, " "] });
|
|
262
|
+
}
|
|
263
|
+
var z = {
|
|
264
|
+
p: R,
|
|
265
|
+
li: R,
|
|
266
|
+
h1: R,
|
|
267
|
+
h2: R,
|
|
268
|
+
h3: R,
|
|
269
|
+
h4: R,
|
|
270
|
+
h5: R,
|
|
271
|
+
h6: R,
|
|
272
|
+
blockquote: R,
|
|
273
|
+
pre: R,
|
|
274
|
+
code: ({ children: e }) => /* @__PURE__ */ m(p, { children: e }),
|
|
275
|
+
th: R,
|
|
276
|
+
td: R,
|
|
277
|
+
br: () => /* @__PURE__ */ m(p, { children: " " }),
|
|
278
|
+
img: ({ alt: e }) => /* @__PURE__ */ m(p, { children: e })
|
|
279
|
+
};
|
|
280
|
+
function B({ children: e }) {
|
|
281
|
+
return /* @__PURE__ */ m(g, {
|
|
282
|
+
...S,
|
|
283
|
+
content: e,
|
|
284
|
+
components: z,
|
|
285
|
+
allowedElements: Object.keys(z),
|
|
286
|
+
unwrapDisallowed: !0,
|
|
287
|
+
shouldParseIncompleteMarkdown: !1,
|
|
288
|
+
shouldNormalizeHtmlIndentation: !1,
|
|
289
|
+
isIncomplete: !1,
|
|
290
|
+
index: 0
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
export { L as n, B as t };
|
package/dist/mdx.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as e, b as t, d as n, f as r, g as i, i as ee, l as a, m as o, n as s, p as te, r as c, t as ne, u as re, v as ie, x as ae, y as oe } from "./article-
|
|
2
|
-
import { n as se, t as ce } from "./param-
|
|
3
|
-
import { a as l, i as u, n as d, o as f, t as p } from "./transport-
|
|
4
|
-
import { C as m, F as h, G as g, H as _, I as v, J as y, L as b, M as x, N as S, P as C, U as w, W as T, X as E, Y as D, b as O, g as k, i as A, l as j, q as M, r as N, t as P, tt as F, u as I, x as L } from "./scene-
|
|
1
|
+
import { _ as e, b as t, d as n, f as r, g as i, i as ee, l as a, m as o, n as s, p as te, r as c, t as ne, u as re, v as ie, x as ae, y as oe } from "./article-CTSxWe4y.js";
|
|
2
|
+
import { n as se, t as ce } from "./param-Dk92C-K1.js";
|
|
3
|
+
import { a as l, i as u, n as d, o as f, t as p } from "./transport-DQ1yzsQl.js";
|
|
4
|
+
import { C as m, F as h, G as g, H as _, I as v, J as y, L as b, M as x, N as S, P as C, U as w, W as T, X as E, Y as D, b as O, g as k, i as A, l as j, q as M, r as N, t as P, tt as F, u as I, x as L } from "./scene-C88Xkz4l.js";
|
|
5
5
|
import { t as R } from "./code-block-DbW_t9U4.js";
|
|
6
6
|
import { t as z } from "./content-link-BN4NPp0u.js";
|
|
7
7
|
import * as B from "@stylexjs/stylex";
|
|
@@ -47,3 +47,6 @@ export type { BandScale, BandScaleInput, ContinuousScale, ContinuousScaleInput }
|
|
|
47
47
|
export { bandScale, columnExtent, continuousScale, isFiniteDomain, outsideDomain, scaleDomainError } from './scale.ts';
|
|
48
48
|
export type { TickInput, TimeTickInput } from './ticks.ts';
|
|
49
49
|
export { linearTicks, logTicks, scaleTicks, symlogTicks, timeTicks } from './ticks.ts';
|
|
50
|
+
export { SpatialLayer } from './spatial-layer.tsx';
|
|
51
|
+
export type { SpatialLayerProps } from './spatial-layer.tsx';
|
|
52
|
+
export { StepHistory } from './step-history.tsx';
|
|
@@ -9,10 +9,12 @@ export type MarkPosition = {
|
|
|
9
9
|
* A chart `locate` for marks at known positions: the pointer inspects the nearest one. The `axis` option limits the
|
|
10
10
|
* distance to one direction, for marks a reader scans along a single axis such as the steps of a curve.
|
|
11
11
|
*/
|
|
12
|
-
export declare function locateNearest({ marks, width, height, axis, }: {
|
|
12
|
+
export declare function locateNearest({ marks, width, height, axis, maxDistance, }: {
|
|
13
13
|
readonly marks: ReadonlyArray<MarkPosition>;
|
|
14
14
|
/** The size the marks were laid out in. The pointer arrives in rendered pixels and is rescaled to it. */
|
|
15
15
|
readonly width: number;
|
|
16
16
|
readonly height: number;
|
|
17
|
+
/** Largest hit distance in rendered CSS pixels. */
|
|
18
|
+
readonly maxDistance?: number;
|
|
17
19
|
readonly axis?: 'x' | 'y' | 'both' | undefined;
|
|
18
20
|
}): (point: ChartPoint) => string | undefined;
|
|
@@ -209,7 +209,7 @@ export type TimeAxisTicksInput = {
|
|
|
209
209
|
/**
|
|
210
210
|
* The ticks of a time axis: instants on round clock steps in the format's zone, at least three on an axis longer than
|
|
211
211
|
* 120 pixels. When two ticks would read alike, such as two midnights written "00:00", the labels gain the date, then
|
|
212
|
-
* the year, then
|
|
213
|
-
* supplied.
|
|
212
|
+
* the year, seconds, then the offset for a repeated clock hour. Fields the format sets itself stay as it sets them, and
|
|
213
|
+
* a function format is used as supplied.
|
|
214
214
|
*/
|
|
215
215
|
export declare function timeAxisTicks({ domain, length, timeFormat, locale, timeZone }: TimeAxisTicksInput): AxisTicks;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ChartTone } from '../../../foundations/src/chart-tones.ts';
|
|
3
|
+
import type { SymbolShape } from './plot-marks.tsx';
|
|
4
|
+
type Bounds = readonly [number, number, number, number];
|
|
5
|
+
export type SpatialLayerProps = {
|
|
6
|
+
readonly label: string;
|
|
7
|
+
readonly origin?: {
|
|
8
|
+
readonly x: number;
|
|
9
|
+
readonly y: number;
|
|
10
|
+
readonly label: string;
|
|
11
|
+
} | undefined;
|
|
12
|
+
readonly destination?: readonly [number, number] | undefined;
|
|
13
|
+
readonly bounds: Bounds;
|
|
14
|
+
readonly locale: string;
|
|
15
|
+
readonly isDense: boolean;
|
|
16
|
+
readonly isCompact?: boolean;
|
|
17
|
+
readonly tone: ChartTone;
|
|
18
|
+
readonly shape: SymbolShape;
|
|
19
|
+
readonly regions: ReadonlyArray<{
|
|
20
|
+
readonly label: string;
|
|
21
|
+
readonly bounds: Bounds;
|
|
22
|
+
}>;
|
|
23
|
+
readonly points: ReadonlyArray<{
|
|
24
|
+
readonly id: string;
|
|
25
|
+
readonly label?: string;
|
|
26
|
+
readonly x: number;
|
|
27
|
+
readonly y: number;
|
|
28
|
+
readonly trail: ReadonlyArray<readonly [number, number]>;
|
|
29
|
+
}>;
|
|
30
|
+
readonly onSelectedChange?: ((id: string) => void) | undefined;
|
|
31
|
+
readonly showTrails?: boolean;
|
|
32
|
+
readonly selected?: string | null | undefined;
|
|
33
|
+
};
|
|
34
|
+
/** A fixed camera in screen coordinates. Preserve distances on both axes and clip paths outside the camera. */
|
|
35
|
+
export declare function SpatialLayer({ label, bounds, regions, points, tone, shape, selected, origin, locale, isDense, isCompact, showTrails, destination, onSelectedChange, }: SpatialLayerProps): ReactNode;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ChartTone } from '../../../foundations/src/chart-tones.ts';
|
|
2
|
+
type HistorySeries = {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly tone: ChartTone;
|
|
5
|
+
readonly values: ReadonlyArray<readonly [number, number]>;
|
|
6
|
+
};
|
|
7
|
+
/** A scrubber backdrop with bounded path complexity. Holds each measurement until its next change. */
|
|
8
|
+
export declare const StepHistory: import("react").MemoExoticComponent<({ series, first, last, }: {
|
|
9
|
+
readonly series: ReadonlyArray<HistorySeries>;
|
|
10
|
+
readonly first: number;
|
|
11
|
+
readonly last: number;
|
|
12
|
+
}) => import("react").JSX.Element | null>;
|
|
13
|
+
export {};
|
|
@@ -23,8 +23,8 @@ export type TimeTickInput = {
|
|
|
23
23
|
/** The first and last instant, in milliseconds since the epoch. */
|
|
24
24
|
readonly domain: NumericDomain;
|
|
25
25
|
readonly count: number;
|
|
26
|
-
/**
|
|
27
|
-
readonly zoneOffset: number;
|
|
26
|
+
/** Milliseconds ahead of UTC, either fixed or evaluated at each instant across clock changes. */
|
|
27
|
+
readonly zoneOffset: number | ((timestamp: number) => number);
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
30
|
* Instants on round clock steps in the reader's zone: seconds, minutes, hours or days. Spans of months and years fall
|
|
@@ -11,6 +11,8 @@ export type TimelineMarker = {
|
|
|
11
11
|
/** Why the timeline position changed: pointer scrubbing, keyboard stepping, marker navigation, or a call. */
|
|
12
12
|
export type TimelineScrubberChangeDetails = ChangeDetails<'scrub' | 'step-key' | 'marker' | 'imperative'>;
|
|
13
13
|
export type TimelineScrubberProps = {
|
|
14
|
+
/** An optional background plot covering the same linear domain as the scrub rail. */
|
|
15
|
+
readonly backdrop?: ReactNode;
|
|
14
16
|
readonly value: number;
|
|
15
17
|
readonly max: number;
|
|
16
18
|
readonly min?: number;
|
|
@@ -31,4 +33,4 @@ export type TimelineScrubberProps = {
|
|
|
31
33
|
* keyboard stepping, `[`/`]` and `Alt+Arrow` marker jumping, `Enter`/`Space` marker selection, pointer capture
|
|
32
34
|
* dragging, and `@mechane-ai/elements/agent` inspection while leaving playback timing to the caller.
|
|
33
35
|
*/
|
|
34
|
-
export declare function TimelineScrubber({ value, max, min, step, onValueChange, onScrubStart, onScrubEnd, markers, onMarkerSelect, formatValue, isDisabled, label, xstyle, }: TimelineScrubberProps): ReactNode;
|
|
36
|
+
export declare function TimelineScrubber({ backdrop, value, max, min, step, onValueChange, onScrubStart, onScrubEnd, markers, onMarkerSelect, formatValue, isDisabled, label, xstyle, }: TimelineScrubberProps): ReactNode;
|
|
@@ -8,3 +8,17 @@ export type { SpecimenDiffLabels, SpecimenDiffProps, SpecimenDiffRow, SpecimenFi
|
|
|
8
8
|
export { SpecimenDiff } from './specimen-diff.tsx';
|
|
9
9
|
export type { WorkHeartbeatLabels, WorkHeartbeatProps, WorkHeartbeatState, WorkProgress, WorkReportItem, } from './work-heartbeat.tsx';
|
|
10
10
|
export { WorkHeartbeat } from './work-heartbeat.tsx';
|
|
11
|
+
export type { MotionClip, MotionArm, MotionMoment, MotionPoint, MotionBounds, MotionTrack, MotionNote, } from './motion-types.ts';
|
|
12
|
+
export { parseMotionClip } from './motion-clip.ts';
|
|
13
|
+
export { motionSceneAt } from './motion-frame.ts';
|
|
14
|
+
export type { MotionLabels, MotionSceneProps } from './motion-scene.tsx';
|
|
15
|
+
export { MotionScene } from './motion-scene.tsx';
|
|
16
|
+
export type { MotionFigureProps } from './motion-figure.tsx';
|
|
17
|
+
export { MotionFigure } from './motion-figure.tsx';
|
|
18
|
+
export { defaultMotionView, normalizeMotionView } from './motion-view.ts';
|
|
19
|
+
export type { MotionView } from './motion-types.ts';
|
|
20
|
+
export { readMotionLocation, writeMotionLocation } from './motion-location.ts';
|
|
21
|
+
export type { NativeMotionMapping } from './native-motion.ts';
|
|
22
|
+
export { parseNativeMotionMapping, verifyNativeMotion, nativeMotionTime, motionSha256 } from './native-motion.ts';
|
|
23
|
+
export type { NativeMotionSource, NativeMotionFigureProps } from './native-motion-figure.tsx';
|
|
24
|
+
export { NativeMotionFigure } from './native-motion-figure.tsx';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export declare function invalidMotion(reason: string): never;
|
|
3
|
+
export declare function InvalidTick({ title, locale, first, last, }: {
|
|
4
|
+
readonly title: string;
|
|
5
|
+
readonly locale: string;
|
|
6
|
+
readonly first: number;
|
|
7
|
+
readonly last: number;
|
|
8
|
+
}): ReactNode;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { MotionSceneProps } from './motion-scene.tsx';
|
|
3
|
+
export type MotionFigureProps = MotionSceneProps & {
|
|
4
|
+
readonly scene?: ReactNode;
|
|
5
|
+
readonly speed?: number | undefined;
|
|
6
|
+
readonly onSpeedChange?: ((speed: number) => void) | undefined;
|
|
7
|
+
readonly onTickChange: (tick: number) => void;
|
|
8
|
+
readonly isPlaying?: boolean;
|
|
9
|
+
readonly onPlayingChange?: (isPlaying: boolean) => void;
|
|
10
|
+
};
|
|
11
|
+
/** Play only on request. Pause on every seek and when the reader enables reduced motion. */
|
|
12
|
+
export declare function MotionFigure({ clip, scene, speed: givenSpeed, onSpeedChange, view: controlledView, onViewChange, tick, onTickChange, isPlaying: controlled, onPlayingChange, isInspecting, isGuided, locale, labels: given, }: MotionFigureProps): ReactNode;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { MotionClip } from './motion-types.ts';
|
|
2
|
+
/** A seek in either direction has the same result. Only positions interpolate, within a single observed segment. */
|
|
3
|
+
export declare function motionSceneAt(clip: MotionClip, tick: number): {
|
|
4
|
+
label: string;
|
|
5
|
+
regions: readonly {
|
|
6
|
+
readonly label: string;
|
|
7
|
+
readonly bounds: import("./motion-types.ts").MotionBounds;
|
|
8
|
+
}[];
|
|
9
|
+
actors: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
sampled: boolean;
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
trail: (readonly [number, number])[];
|
|
16
|
+
note: import("./motion-types.ts").MotionNote | undefined;
|
|
17
|
+
}[];
|
|
18
|
+
metrics: {
|
|
19
|
+
label: string;
|
|
20
|
+
value: number | null;
|
|
21
|
+
}[];
|
|
22
|
+
}[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { MotionLabels } from './motion-scene.tsx';
|
|
3
|
+
import type { MotionClip, MotionView } from './motion-types.ts';
|
|
4
|
+
export declare function MotionInspection({ clip, view, onChange, labels, hasMap, }: {
|
|
5
|
+
readonly clip: MotionClip;
|
|
6
|
+
readonly view: MotionView;
|
|
7
|
+
readonly onChange: (view: MotionView) => void;
|
|
8
|
+
readonly labels: MotionLabels;
|
|
9
|
+
readonly hasMap: boolean;
|
|
10
|
+
}): ReactNode;
|
|
11
|
+
export declare function MotionHistory({ clip, metric }: {
|
|
12
|
+
readonly clip: MotionClip;
|
|
13
|
+
readonly metric: string;
|
|
14
|
+
}): ReactNode;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MotionClip, MotionView } from './motion-types.ts';
|
|
2
|
+
/** Restore the tick and supported inspection choices from a shared link. */
|
|
3
|
+
export declare function readMotionLocation(clip: MotionClip, params: URLSearchParams): {
|
|
4
|
+
tick: number;
|
|
5
|
+
isNative: boolean;
|
|
6
|
+
view: MotionView;
|
|
7
|
+
};
|
|
8
|
+
/** Keep shared links short by omitting the default camera and overlays. */
|
|
9
|
+
export declare function writeMotionLocation(tick: number, view: MotionView, isNative?: boolean): URLSearchParams;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { MotionClip, MotionView } from './motion-types.ts';
|
|
3
|
+
export type MotionLabels = {
|
|
4
|
+
readonly tick: string;
|
|
5
|
+
readonly metric: string;
|
|
6
|
+
readonly zoom: string;
|
|
7
|
+
readonly follow: string;
|
|
8
|
+
readonly trails: string;
|
|
9
|
+
readonly regions: string;
|
|
10
|
+
readonly start: string;
|
|
11
|
+
readonly moment: string;
|
|
12
|
+
readonly actor: string;
|
|
13
|
+
readonly sampled: string;
|
|
14
|
+
readonly interpolated: string;
|
|
15
|
+
readonly absent: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const defaultMotionLabels: MotionLabels;
|
|
18
|
+
export type MotionSceneProps = {
|
|
19
|
+
readonly clip: MotionClip;
|
|
20
|
+
readonly view?: MotionView | undefined;
|
|
21
|
+
readonly onViewChange?: ((view: MotionView) => void) | undefined;
|
|
22
|
+
readonly tick: number;
|
|
23
|
+
readonly isInspecting?: boolean;
|
|
24
|
+
readonly isGuided?: boolean;
|
|
25
|
+
readonly locale?: string;
|
|
26
|
+
readonly labels?: Partial<MotionLabels>;
|
|
27
|
+
};
|
|
28
|
+
/** Draw one frame at an integer tick. Posters, movies and interactive playback share this rendering. */
|
|
29
|
+
export declare function MotionScene({ clip, view: controlled, onViewChange, tick, isInspecting, isGuided, locale, labels: given, }: MotionSceneProps): ReactNode;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export declare const motionZoomLevels: readonly [1, 2, 4, 8];
|
|
2
|
+
export type MotionZoom = (typeof motionZoomLevels)[number];
|
|
3
|
+
export type MotionView = {
|
|
4
|
+
readonly selected: {
|
|
5
|
+
readonly arm: number;
|
|
6
|
+
readonly id: string;
|
|
7
|
+
} | null;
|
|
8
|
+
readonly zoom: MotionZoom;
|
|
9
|
+
readonly isFollowing: boolean;
|
|
10
|
+
readonly showTrails: boolean;
|
|
11
|
+
readonly showRegions: boolean;
|
|
12
|
+
readonly metric?: string;
|
|
13
|
+
};
|
|
14
|
+
export type MotionBounds = readonly [number, number, number, number];
|
|
15
|
+
export type MotionPoint = readonly [tick: number, horizontal: number, vertical: number];
|
|
16
|
+
export type MotionNote = readonly [tick: number, message: string, destination?: readonly [number, number]];
|
|
17
|
+
export type MotionTrack = {
|
|
18
|
+
readonly id: string;
|
|
19
|
+
readonly label: string;
|
|
20
|
+
readonly points: ReadonlyArray<MotionPoint>;
|
|
21
|
+
readonly end: number;
|
|
22
|
+
readonly notes?: ReadonlyArray<MotionNote>;
|
|
23
|
+
};
|
|
24
|
+
export type MotionArm = {
|
|
25
|
+
readonly label: string;
|
|
26
|
+
readonly tracks: ReadonlyArray<MotionTrack>;
|
|
27
|
+
readonly regions?: ReadonlyArray<{
|
|
28
|
+
readonly label: string;
|
|
29
|
+
readonly bounds: MotionBounds;
|
|
30
|
+
}>;
|
|
31
|
+
readonly metrics?: ReadonlyArray<{
|
|
32
|
+
readonly label: string;
|
|
33
|
+
readonly values: ReadonlyArray<readonly [number, number]>;
|
|
34
|
+
}>;
|
|
35
|
+
};
|
|
36
|
+
export type MotionMoment = {
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly label: string;
|
|
39
|
+
readonly tick: number;
|
|
40
|
+
readonly detail?: string;
|
|
41
|
+
readonly view?: Partial<MotionView>;
|
|
42
|
+
};
|
|
43
|
+
export type MotionClip = {
|
|
44
|
+
readonly version: 1;
|
|
45
|
+
readonly title: string;
|
|
46
|
+
readonly first: number;
|
|
47
|
+
readonly last: number;
|
|
48
|
+
readonly hz: number;
|
|
49
|
+
readonly speed: number;
|
|
50
|
+
readonly bounds: MotionBounds;
|
|
51
|
+
readonly arms: ReadonlyArray<MotionArm>;
|
|
52
|
+
readonly moments: ReadonlyArray<MotionMoment>;
|
|
53
|
+
readonly source?: unknown;
|
|
54
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MotionBounds, MotionClip, MotionView } from './motion-types.ts';
|
|
2
|
+
export declare const defaultMotionView: Readonly<MotionView>;
|
|
3
|
+
export declare function normalizeMotionView(clip: Pick<MotionClip, 'arms'>, input: Partial<MotionView>): MotionView;
|
|
4
|
+
export declare function inspectedMetric(clip: MotionClip, view: MotionView): string | undefined;
|
|
5
|
+
/** Every comparison arm uses the same camera, including when following an actor in one arm. */
|
|
6
|
+
export declare function motionCamera(bounds: MotionBounds, view: MotionView, actor: {
|
|
7
|
+
readonly x: number;
|
|
8
|
+
readonly y: number;
|
|
9
|
+
} | undefined): MotionBounds;
|