@supersuit/artifacts 0.44.1 → 0.44.2
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/CHANGELOG.md +14 -0
- package/lib/artifacts/render.js +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
`@supersuit/artifacts`. One entry per version, newest first. Each entry says what changed, how a
|
|
4
4
|
host can tell whether it is affected (DETECTOR), what a host does about it (REMEDY), and the tests.
|
|
5
5
|
|
|
6
|
+
## 0.44.2
|
|
7
|
+
|
|
8
|
+
**An embed's caption no longer throws the read-along out of step.** The caption under a
|
|
9
|
+
` ```simulator ` or ` ```messages ` block was wrapped as read-along words, but the narration skips
|
|
10
|
+
every fenced block, so each caption added words the voice never says and every word after it lit
|
|
11
|
+
early. A page carrying four embeds ran about sixty words ahead by its end. The embed's figure is now
|
|
12
|
+
`data-nospeak`: the caption still shows, and the highlighter skips it as the voice does.
|
|
13
|
+
|
|
14
|
+
- DETECTOR: on a narrated page with a simulator or messages block, play past the block. Before, the
|
|
15
|
+
highlight ran ahead of the voice; now it stays on the spoken word.
|
|
16
|
+
- REMEDY: update the dependency. Nothing to change on a page.
|
|
17
|
+
- Tests: "an embed block is not read aloud" in render.test.tsx, both kinds, with and without a
|
|
18
|
+
player, the wrapped words equal the narrated words.
|
|
19
|
+
|
|
6
20
|
## 0.44.1
|
|
7
21
|
|
|
8
22
|
**Highlighting text works like any page again.** A press in the gap between paragraphs, in a line's
|
package/lib/artifacts/render.js
CHANGED
|
@@ -134,7 +134,10 @@ function EmbedFence({ kind, source, ctx }) {
|
|
|
134
134
|
return null;
|
|
135
135
|
const src = ctx ? embedSrc(kind, ctx.embed, r.block.value) : null;
|
|
136
136
|
const wide = kind === 'simulator' && src != null;
|
|
137
|
-
return (
|
|
137
|
+
return (
|
|
138
|
+
// data-nospeak: the narration skips every fenced block (narration.ts), so the caption must not
|
|
139
|
+
// be a read-along word either, or every word after it lights out of step with the voice.
|
|
140
|
+
_jsxs("figure", { "data-artifact-embed": kind, "data-nospeak": true, ...(kind === 'simulator' ? { 'data-artifact-simulator': '' } : {}), ...(wide ? { 'data-wide': '' } : {}), className: "my-8", children: [wide ? _jsx("style", { children: WIDE_EMBED_CSS }) : null, src ? _jsx(EmbedFrame, { src: src, title: r.block.caption, height: r.block.height }) : null, _jsx("figcaption", { className: "mt-2 text-sm opacity-80", children: r.block.caption })] }));
|
|
138
141
|
}
|
|
139
142
|
/** The one image a paragraph holds and nothing else (whitespace aside), or null. */
|
|
140
143
|
function soleImage(node) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supersuit/artifacts",
|
|
3
|
-
"version": "0.44.
|
|
3
|
+
"version": "0.44.2",
|
|
4
4
|
"description": "Publish markdown as branded, read-aloud pages from a Next.js app: the artifacts store, the route factory, the read-along reader, brand packs, password and confidential pages, and share cards.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|