egatari 0.6.15 → 0.6.16
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 +29 -1
- package/README.ja.md +65 -64
- package/README.md +40 -39
- package/bin/egatari.mjs +3 -3
- package/kit/check-messages.mjs +95 -70
- package/kit/check.mjs +17 -11
- package/kit/core/article-messages.mjs +15 -15
- package/kit/core/check-parity.mjs +1 -1
- package/kit/core/check-rules.mjs +11 -6
- package/kit/core/colab-core.mjs +2 -2
- package/kit/core/export-name.mjs +2 -2
- package/kit/core/geometry-check.mjs +363 -25
- package/kit/core/layout-scan.mjs +8 -3
- package/kit/core/live-policy.mjs +2 -2
- package/kit/core/live.mjs +2 -2
- package/kit/core/llm-fix.mjs +12 -12
- package/kit/core/llm-insert.mjs +11 -11
- package/kit/core/llm-outline.mjs +7 -7
- package/kit/core/llm-pack-data.mjs +10 -10
- package/kit/core/parts2.mjs +5 -5
- package/kit/core/portable.mjs +5 -5
- package/kit/core/purposes.mjs +2 -2
- package/kit/core/ref-voice.mjs +1 -1
- package/kit/core/scorm.mjs +1 -1
- package/kit/core/sound-preferences.mjs +1 -1
- package/kit/core/theme-derive.mjs +209 -0
- package/kit/core/themes-list.mjs +1 -1
- package/kit/core/themes-lock.mjs +1 -1
- package/kit/core/tier-a.mjs +7 -7
- package/kit/deck.js +7 -4
- package/kit/instruction-version.json +1 -1
- package/kit/live.js +20 -20
- package/kit/player.json +1 -1
- package/kit/player.lock.json +2 -2
- package/kit/presenter.js +2 -2
- package/kit/templates/new-deck.mjs +6 -6
- package/kit/tools.js +5 -5
- package/kit/track.js +1 -1
- package/package.json +1 -1
- package/server/editor-ui.js +20 -17
- package/tts/yomi.yaml +8 -0
- package/vendor/egatari-spec/SOURCE.json +2 -2
- package/vendor/egatari-spec/schema/deck-meta.schema.json +1 -1
- package/vendor/egatari-spec/schema/egatari-metadata.schema.json +2 -2
package/kit/core/llm-fix.mjs
CHANGED
|
@@ -74,19 +74,19 @@ export function rulesFor(p) {
|
|
|
74
74
|
|
|
75
75
|
const L = {
|
|
76
76
|
en: {
|
|
77
|
-
head: 'Fix request for
|
|
77
|
+
head: 'Fix request for Egatari slides and script (deck.html + narration.md). The instructions you followed are the Egatari authoring guide; the standards are quoted below.',
|
|
78
78
|
ask: 'Fix only the findings listed. Keep everything else as it is, and keep every id="…" and {#…} exactly (R-noids). Do not use Canvas, slide-making or file features: reply in the body of your chat message with exactly two fenced code blocks, ```deck.html and ```narration.md (R-output).',
|
|
79
|
-
askPartial: (n) => `The
|
|
80
|
-
problems: 'Findings', rules: 'Standards', components: 'Parts used in this
|
|
81
|
-
where: (p) => (p.i === null || p.i === undefined ? 'Whole
|
|
79
|
+
askPartial: (n) => `The file is long, so only the ${n} ${plural(n, 'slide')} with problems ${n === 1 ? 'is' : 'are'} included below. Reply with the same two blocks, but put only those <section> elements in the deck.html block (no <html>, keep their ids) and only their sections in the narration.md block (keep the {#id} headings) (R-output).`,
|
|
80
|
+
problems: 'Findings', rules: 'Standards', components: 'Parts used in this file (from the instructions)', files: 'Current files', partialFiles: 'Current slides with problems',
|
|
81
|
+
where: (p) => (p.i === null || p.i === undefined ? 'Whole file' : `Slide ${p.i + 1}${p.id ? ` (id ${p.id})` : ''}${p.title ? ` “${p.title}”` : ''}`),
|
|
82
82
|
sev: { error: 'error', warn: 'warning' },
|
|
83
83
|
},
|
|
84
84
|
ja: {
|
|
85
|
-
head: 'Egatari
|
|
86
|
-
ask: '
|
|
87
|
-
askPartial: (n) =>
|
|
88
|
-
problems: '指摘', rules: '規格', components: '
|
|
89
|
-
where: (p) => (p.i === null || p.i === undefined ? '
|
|
85
|
+
head: 'Egatari のスライドと台本(deck.html と narration.md)の修正依頼です。書くときに従った指示は Egatari の書き方の指示(authoring guide)で、規格の文章は下に引いています。',
|
|
86
|
+
ask: '挙げた指摘だけを修正してください。ほかは変えず、id="…" と {#…} はすべて変えないでください(R-noids)。Canvas・スライド作成・ファイルの機能は使わず、チャットの本文に、ちょうど 2 つの灰色の枠(コードブロック) ```deck.html と ```narration.md を書いてください(R-output)。',
|
|
87
|
+
askPartial: (n) => `ファイルが長いので、問題のあるスライド ${n} 枚だけを下に載せています。出力は同じ 2 つのコードブロックで、deck.html のコードブロックにはそのスライドの <section> だけを(<html> なしで、id はそのまま)、narration.md のコードブロックにはその節だけを({#id} の見出しのまま)書いてください(R-output)。`,
|
|
88
|
+
problems: '指摘', rules: '規格', components: 'このファイルで使っているパーツ(指示の説明)', files: '今のファイル', partialFiles: '問題のあるスライド(今のもの)',
|
|
89
|
+
where: (p) => (p.i === null || p.i === undefined ? 'ファイル全体' : `スライド ${p.i + 1}${p.id ? `(id ${p.id})` : ''}${p.title ? quoteJa(p.title) : ''}`),
|
|
90
90
|
sev: { error: 'エラー', warn: '警告' },
|
|
91
91
|
},
|
|
92
92
|
};
|
|
@@ -149,14 +149,14 @@ export function partHeightHint(p, deck, secs, lang = 'en') {
|
|
|
149
149
|
export function cutOffRequest(err, lang = 'en') {
|
|
150
150
|
if (err && err.code === 'no-blocks') {
|
|
151
151
|
return lang === 'ja'
|
|
152
|
-
? '前の出力には灰色の枠(コードブロック)がありませんでした。ファイル・キャンバス・添付では出さず、チャットの本文に、2 つのコードブロック ```deck.html と ```narration.md
|
|
152
|
+
? '前の出力には灰色の枠(コードブロック)がありませんでした。ファイル・キャンバス・添付では出さず、チャットの本文に、2 つのコードブロック ```deck.html と ```narration.md を書いて送信し直してください。どちらも最後まで書いて閉じてください(R-output)。\n'
|
|
153
153
|
: 'Your previous reply had no code blocks. Do not output files, a canvas or attachments: write both code blocks, ```deck.html and ```narration.md, in the body of your chat message, complete and closed (R-output).\n';
|
|
154
154
|
}
|
|
155
155
|
const file = err.kind === 'deck' ? 'deck.html' : err.kind === 'narration' ? 'narration.md' : null;
|
|
156
156
|
return lang === 'ja'
|
|
157
|
-
? `前の出力は途中で切れていました${file ? `(${file} の灰色の枠(コードブロック)が閉じていません)` : ''}。${file === 'narration.md' ? 'narration.md
|
|
157
|
+
? `前の出力は途中で切れていました${file ? `(${file} の灰色の枠(コードブロック)が閉じていません)` : ''}。${file === 'narration.md' ? 'narration.md のコードブロックだけを、最初から最後まで書いて閉じた形で送信し直してください(deck.html は受け取りました)。' : `同じスライドと台本を、枚数を減らした短い形で、2 つの${file ? 'コードブロック' : '灰色の枠(コードブロック)'} \`\`\`deck.html と \`\`\`narration.md をどちらも閉じて送信し直してください。`}コードブロックの途中で終わらないでください(R-output)。
|
|
158
158
|
`
|
|
159
|
-
: `Your previous reply was cut off${file ? ` (the ${file} block is not closed)` : ''}. ${file === 'narration.md' ? 'Send only the narration.md block again, complete and closed (the deck.html block arrived).' : 'Send the
|
|
159
|
+
: `Your previous reply was cut off${file ? ` (the ${file} block is not closed)` : ''}. ${file === 'narration.md' ? 'Send only the narration.md block again, complete and closed (the deck.html block arrived).' : 'Send the slides and script again in a shorter form (fewer slides), as two closed blocks, ```deck.html and ```narration.md.'} Never stop in the middle of a block (R-output).
|
|
160
160
|
`;
|
|
161
161
|
}
|
|
162
162
|
|
package/kit/core/llm-insert.mjs
CHANGED
|
@@ -15,26 +15,26 @@ import { placeholderLine } from './template-text.mjs';
|
|
|
15
15
|
|
|
16
16
|
const L = {
|
|
17
17
|
ja: {
|
|
18
|
-
head: '#
|
|
19
|
-
lead: '
|
|
18
|
+
head: '# スライドの挿入の依頼',
|
|
19
|
+
lead: '今のスライドに、スライドを挿入してください。規格(R-…)と出力の形(R-output)は、最初に作ったときの AI への指示のとおりです。',
|
|
20
20
|
where: (x) => (x ? `スライド ${x.n}「${x.h}」の後ろ` : '先頭'),
|
|
21
|
-
one: (w) => `-
|
|
22
|
-
many: (w, n) => `-
|
|
23
|
-
wish: (t) => `-
|
|
24
|
-
list: (n) => `##
|
|
25
|
-
here: '←
|
|
26
|
-
near: '##
|
|
21
|
+
one: (w) => `- 依頼:ここ(${w})に、スライドを 1 枚挿入してください`,
|
|
22
|
+
many: (w, n) => `- 依頼:${w}に、続きのスライドを ${n} 枚挿入してください`,
|
|
23
|
+
wish: (t) => `- 挿入したい内容:${t}`,
|
|
24
|
+
list: (n) => `## 今のスライド(全 ${n} 枚、順に。返さない)`,
|
|
25
|
+
here: '← この後ろに挿入する',
|
|
26
|
+
near: '## 挿入する場所の前のスライド(参考。返さない)',
|
|
27
27
|
reply: '## 返し方',
|
|
28
|
-
replyText: '
|
|
28
|
+
replyText: '挿入するスライドだけを返してください。```deck.html の灰色の枠(コードブロック)に <section class="slide"> だけを並べ(<!DOCTYPE>・<html>・<head> は付けない。id は書かない)、```narration.md のコードブロックに、そのスライドの台本の節(## 見出し と [0] からの行)を同じ順で書きます。ほかのスライドは返しません。',
|
|
29
29
|
},
|
|
30
30
|
en: {
|
|
31
31
|
head: '# Please add slides',
|
|
32
|
-
lead: 'Add slides to the current
|
|
32
|
+
lead: 'Add slides to the current file. The standards (R-…) and the output format (R-output) are the ones in the instructions for the AI used to make it.',
|
|
33
33
|
where: (x) => (x ? `after slide ${x.n}, “${x.h}”` : 'at the beginning'),
|
|
34
34
|
one: (w) => `- What I want: one slide here, ${w}`,
|
|
35
35
|
many: (w, n) => `- What I want: the next ${n} slides, ${w}`,
|
|
36
36
|
wish: (t) => `- What to add: ${t}`,
|
|
37
|
-
list: (n) => `## The slides of the
|
|
37
|
+
list: (n) => `## The slides of the file now (${n} in all, in order; do not send them back)`,
|
|
38
38
|
here: '← add after this one',
|
|
39
39
|
near: '## The slide before the new ones (for reference; do not send it back)',
|
|
40
40
|
reply: '## How to reply',
|
package/kit/core/llm-outline.mjs
CHANGED
|
@@ -36,27 +36,27 @@ export function slideCountOf(text) {
|
|
|
36
36
|
const L = {
|
|
37
37
|
ja: {
|
|
38
38
|
outlineHead: '# まず構成案だけを返してください',
|
|
39
|
-
outlineText: (n) =>
|
|
39
|
+
outlineText: (n) => `スライドは全 ${n} 枚あるので、2 回に分けて作ります。今回は deck.html と narration.md はまだ書かず、構成案だけを返してください(R-outline)。` +
|
|
40
40
|
'```outline の灰色の枠(コードブロック) 1 つに、Markdown の表を書きます。列は「番号」「見出し」「要点(1 行)」で、スライドごとに 1 行、全スライドを順に並べます。コードブロックの外には 1 行の添え書きだけ。',
|
|
41
41
|
tableHead: '| 番号 | 見出し | 要点 |',
|
|
42
42
|
batchHead: (a, b) => `# 構成案の ${a}〜${b} 枚目を作ってください`,
|
|
43
|
-
batchFirst: (a, b, n) => `構成案(全 ${n} 枚)の ${a}〜${b} 枚目を、ちょうど ${b - a + 1} 枚作ってください。規格(R-…)と出力の形(R-output)は AI への指示のとおりで、deck.html は <!DOCTYPE html>
|
|
44
|
-
batchNext: (a, b, n, x) => `構成案(全 ${n} 枚)の ${a}〜${b} 枚目を、ちょうど ${b - a + 1}
|
|
43
|
+
batchFirst: (a, b, n) => `構成案(全 ${n} 枚)の ${a}〜${b} 枚目を、ちょうど ${b - a + 1} 枚作ってください。規格(R-…)と出力の形(R-output)は AI への指示のとおりで、deck.html は <!DOCTYPE html> からの全体を書きます。残りのスライドは後で依頼します。`,
|
|
44
|
+
batchNext: (a, b, n, x) => `構成案(全 ${n} 枚)の ${a}〜${b} 枚目を、ちょうど ${b - a + 1} 枚作ってください。今のスライドの${x}の後ろに挿入します。規格と出力の形は、最初に作ったときの AI への指示のとおりです。`,
|
|
45
45
|
where: (x) => `スライド ${x.n}「${x.h}」`,
|
|
46
46
|
outlineList: '## 構成案(全体。返さない)', range: (a, b) => `← 今回は ${a}〜${b} 枚目`,
|
|
47
|
-
near: '##
|
|
47
|
+
near: '## 挿入する場所の前のスライド(参考。返さない)',
|
|
48
48
|
reply: '## 返し方',
|
|
49
49
|
replyFirst: '```deck.html の灰色の枠(コードブロック)に deck.html の全体(今回のスライドだけ)を、```narration.md のコードブロックにその台本を書きます。',
|
|
50
|
-
replyNext: '
|
|
50
|
+
replyNext: '挿入するスライドだけを返してください。```deck.html の灰色の枠(コードブロック)に <section class="slide"> だけを並べ(<!DOCTYPE>・<html>・<head> は付けない。id は書かない)、```narration.md のコードブロックに、そのスライドの台本の節(## 見出し と [0] からの行)を同じ順で書きます。',
|
|
51
51
|
},
|
|
52
52
|
en: {
|
|
53
53
|
outlineHead: '# First, send only the outline',
|
|
54
|
-
outlineText: (n) => `
|
|
54
|
+
outlineText: (n) => `There are ${n} slides, so they are made in two passes. This time, write no deck.html or narration.md yet: send only the outline (R-outline). ` +
|
|
55
55
|
'In one ```outline block, write a Markdown table with the columns “#”, “Heading” and “Point (one line)”, one row per slide, every slide in order. Outside the block, at most a one-line note.',
|
|
56
56
|
tableHead: '| # | Heading | Point |',
|
|
57
57
|
batchHead: (a, b) => `# Please make slides ${a}–${b} of the outline`,
|
|
58
58
|
batchFirst: (a, b, n) => `Make slides ${a}–${b} of the outline (${n} slides in all), exactly ${b - a + 1} ${plural(b - a + 1, 'slide')}. The standards (R-…) and the output format (R-output) are those of the instructions for the AI; write the whole deck.html from <!DOCTYPE html>. The other slides are requested later.`,
|
|
59
|
-
batchNext: (a, b, n, x) => `Make slides ${a}–${b} of the outline (${n} slides in all), exactly ${b - a + 1} ${plural(b - a + 1, 'slide')}. They go ${x} of the current
|
|
59
|
+
batchNext: (a, b, n, x) => `Make slides ${a}–${b} of the outline (${n} slides in all), exactly ${b - a + 1} ${plural(b - a + 1, 'slide')}. They go ${x} of the current file. The standards and the output format are those of the instructions for the AI used to make it.`,
|
|
60
60
|
where: (x) => `after slide ${x.n}, “${x.h}”,`,
|
|
61
61
|
outlineList: '## The outline (all of it; do not send it back)', range: (a, b) => `← this time: ${a}–${b}`,
|
|
62
62
|
near: '## The slide before the new ones (for reference; do not send it back)',
|
|
@@ -889,15 +889,15 @@ export const PACK = {
|
|
|
889
889
|
],
|
|
890
890
|
"partsSrc": "https://github.com/egatari/components/blob/v2.15.0/components/",
|
|
891
891
|
"en": {
|
|
892
|
-
"common": "# Instructions for the AI\n\nPack version: `049c5f95`\n\nYou will write one short **Egatari lesson**: HTML slides with step-by-step reveals (`deck.html`) and a spoken script for it (`narration.md`). Both are built and quality-checked automatically; only what is described here is available. Write slides and script in the language the user asks for. Standards have ids such as **R-fit**; a fix request names the standards a draft broke. The user's request is in **What I want** at the end (or in the conversation before it): choose sensibly for any field that is empty or missing, and if both A and B are left, follow the one with content.\n\n**Before you start (the most common failures):**\n\n- **Both code blocks must be complete and closed.** Never stop in the middle of a block (R-output). Without an outline, keep the lesson short (5–8 slides). Given an outline and a range of its slides, write exactly that range (at most 6 slides, so they fit).\n- **Sizes on the 1280×720 slide** (the quality checker measures them, R-fit): the body area is 1184 × 443 px (to 565 px; 1184 × 558 with `noconcl`). Body text is 32 px with 46 px per line, so about **8 lines** fit; every overflowing 46 px is one line to cut. **All text, also inside figures and parts, is at least 24 px.**\n- **Charts and figures:** parts draw their labels at 24–28 px whatever their size (their SVG uses their own pixels), so size the part, not the text. A part of 380 px leaves room for one short line; with two lines, use 330 px.\n- **Inline `<svg>`:** its text is scaled by displayed width ÷ viewBox width, so write the viewBox in the pixels it is shown at, e.g. `<svg viewBox=\"0 0 560 320\" width=\"560\" height=\"320\">`, with `font-size` ≥ 24. Never combine `width:100%` with another viewBox width (a 600-wide viewBox shown 580 px wide turns 24 into 23.2 px). Prefer a part when one fits.\n\n## 1. Output format\n\n- **R-output** Reply with **exactly two fenced code blocks**, in this order, labelled `deck.html` and `narration.md` (the opening lines are ```` ```deck.html ```` and ```` ```narration.md ````). Put nothing between them; a one-line note before or after is fine. Never split a file over several blocks. No files, canvas or attachments: write both blocks in your chat message. Do not reference other files (no images, no `{{FIG:…}}`, no `{{JSON:…}}`, no external URLs, no `<link>`), and never stop in the middle of a block: if the lesson would be too long, make fewer slides (but for a range of an outline, write exactly the requested slides).\n- **R-outline** When the request asks for an **outline only** (a long lesson made in two passes), reply with exactly one fenced code block labelled `outline` (the opening line is ```` ```outline ````) and no `deck.html` or `narration.md`: a Markdown table (columns `#`, heading, one-line point), one row per slide, all slides in order. Each later request names a range (“slides 7–12 of the outline”): write exactly those slides, following their headings and points.\n- **R-noids** Do **not** write slide ids. Write `<section class=\"slide\">` without `id`, and script headings without `{#…}`. The editor adds ids after import. When you are given a lesson that already has ids (a fix request), keep every existing `id=\"…\"` and `{#…}` exactly as it is.\n\n## 2. deck.html\n\n### 2.1 Skeleton\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Lesson title</title>\n</head>\n<body>\n<div id=\"stage\">\n <section class=\"slide cover noconcl static\"> … </section>\n <section class=\"slide\"> … </section>\n</div>\n</body>\n</html>\n```\n\n- `lang`: `en`, `ja`, … (the language of the lesson). `data-theme`: `sumi` for business and pitch decks, `kokugo` for Japanese language arts, otherwise `default`.\n- No `<script>` except part data (§2.6), no `<link>`. A `<style>` block is allowed only for layout (sizes, gaps), never colors.\n\n### 2.2 Slides\n\n- Normal slide: `<h2>` heading, `<div class=\"body\">…</div>`, then `<div class=\"concl\"><span>…</span></div>` (the conclusion line: one short sentence).\n- Optional kicker (a short line above the heading): one `<p class=\"kicker\">` just before the `<h2>` (ordinary slides only, not `layout-tate`); shown at step 0, not part of the heading. Type it normally, not in capitals (the theme capitalizes English).\n- Cover: `<section class=\"slide cover noconcl static\">` with optional `<div class=\"venue\">…</div>`, `<h1>title</h1>`, optional `<div class=\"au\">…</div>`.\n- Chapter divider: `<section class=\"slide sec noconcl static\"><h1>chapter title</h1></section>`.\n- Classes on `<section>`: `noconcl` (no conclusion line), `static` (no steps), `nostep` (all list items visible from the start), `layout-tate` (Japanese vertical writing; only with the kokugo part set, which describes it), and the `data-morph` attribute (§2.5).\n- Inside `.body`: `<p class=\"sub\">` sub-heading, `<div class=\"big\">` main equation, `<p class=\"note\">` note, `<div class=\"thm\">` theorem box, `<div class=\"cols\">` side-by-side columns, ordinary `<p>`, `<ul>`, `<ol>`, `<table>`.\n- **R-caution** In `.body`: `<div class=\"caution\">…</div>` for caution; add `warn` for warning. Labels are automatic.\n- Inline emphasis (the only way to color text): `term` (term or question), `emph` (conclusion, problem, goal), `muted` (known result, de-emphasized), `b` (bold).\n- **R-headings** Every slide heading (`h1` on the cover and dividers, `h2` elsewhere) is **different** from all the others (add a word if two would be the same), and the script section of that slide starts with `## ` followed by **exactly the same heading text** (tags such as `<br>` dropped).\n- **R-colors** Colors only through the theme: the classes above and the math macros `\\hlE` `\\hlT` `\\hlM`; no hex, `rgb()`, named colors, `\\color` or `\\textcolor`. In a part or inline SVG: **Use only the theme's CSS variables for colors**: `var(--fg)` `var(--term)` `var(--emph)` `var(--muted)` `var(--accent2)` `var(--line)`. In SVG write `style=\"stroke:var(--emph)\"` rather than an attribute (`DECK.el` moves `fill` and `stroke` into style automatically when they contain `var(`)\n\n### 2.3 Steps (reveal order = speaking order)\n\n- **R-steps** Step 0 is the slide as it first appears: context only (heading, sub-heading, one framing sentence). An element with `data-step=\"k\"` (k = 1, 2, …) appears at step k; material (list items, equations, table rows, figure parts) appears in the order you talk about it. An equation and the sentence that introduces it share one step (wrap both in `<div data-step=\"k\">`). About 5 steps per slide at most.\n- The conclusion line automatically becomes the **last step**, `concl`; never put `data-step` on it.\n- If a slide has **no** `data-step` anywhere, its top-level list items (`.body > ul > li`, `.body > ol > li`) are numbered 1, 2, … automatically. As soon as any element has `data-step`, nothing is automatic: give every revealed element its `data-step`.\n- A part adds its own steps (§3), starting at its `data-from` (default 1).\n- So the steps of a slide are `0 … max` plus `concl` if it has a conclusion line. A `static` slide has only step 0.\n\n### 2.4 Math (KaTeX, rendered at build time)\n\n- **R-math** Inline `\\( … \\)`, display `\\[ … \\]`. Write `<` as `\\lt` and `>` as `\\gt` inside math. Allowed macros besides standard KaTeX: `\\hlE{…}` (emph) `\\hlT{…}` (term) `\\hlM{…}` (muted), `\\htmlId{ID}{…}`, `\\htmlData{mark=ID}{…}`, `\\htmlClass{…}{…}`, `\\morph{ID}{…}`. No `\\newcommand`, no `\\color`. To label a term, use `\\underbrace{…}_{\\text{…}}` or `\\overbrace{…}^{…}`. Never `$$`. Define each symbol where it is first used (`\\(\\mu\\)`: the mean).\n\n### 2.5 Attention marks and morphs\n\n- **R-marks** The script’s `{mark:ID}` (§4) marks a target on the **same slide**. Targets: an element in the slide with `id=\"ID\"` or `data-mark=\"ID\"`. For part of an equation, KaTeX's `\\htmlId{ID}{…}` / `\\htmlData{mark=ID}{…}` (the build allows only these two and `\\htmlClass`). If the same ID is used on several slides, use `data-mark` (ids must be unique in the document)\n- Morph (optional): `<section class=\"slide\" data-morph>` slides elements from the previous slide into place; pair elements with the same `data-id=\"…\"` on both slides, or equation parts with `\\morph{ID}{…}` on both. Only elements visible at step 0 move.\n\n### 2.6 Parts\n\n- **R-components** Animated figures are the Web Components `<m-…>` of the catalog (§3), used inside `.body`. Give each a height (`style=\"height:380px\"`) and an `aria-label`. Data goes in **one** child `<script type=\"application/json\">…</script>` written inline (never `{{JSON:…}}`). **Numbers in figures must be correct** (compute them; never invent values for looks; label made-up business figures as fictional). Formulas are arithmetic only (`Math.exp(x)`, `x**2`), never run as code. Use parts only where motion explains something; most slides need none.\n\n### 2.7 Choosing a representation\n\n- **R-purpose** Choose the representation from what the slide must say, not from habit. If the author names a chart type, use it. The table names every part, but use only those described here (§3 and the included part sets). If a part that is not included would fit better, say so in a one-line note.\n\n{{PURPOSES}}\n\n- **R-whole** Lists, KPI cards and pies are shown whole; do not reveal them line by line unless the script discusses each item in turn (for a list, give it one `data-step` or put `nostep` on the slide).\n\n### 2.8 Fitting the slide (1280×720; the quality checker reports errors)\n\n- **R-title** Heading: Japanese at most 26 units (full-width character = 1, ASCII = 0.5); English at most 60 characters. Never ends with a colon.\n- **R-concl** Conclusion line: Japanese at most 35 units; English at most 70 characters. One line.\n- **R-fit** The body must end above 565 px (680 px with `noconcl`): about 8 lines / 100 Japanese characters / 60 English words per slide, or one `big` equation and 3 short bullets, or a part of height ≤ 380 px and one short line (≤ 330 px with two). If it does not fit, split the slide; never shrink text and never set font sizes.\n- **R-style** Japanese slides: plain style (だ・である, 体言止め), no です・ます on slides, one punctuation style in the whole lesson (`、。` or `,.`). English slides: short phrases, sentence case.\n\n## 3. Part catalog\n\nStandard parts fit any lesson; a part set after §6 adds the parts for its material. “steps” is how many slide steps a part uses (from `data-from`, default 1). Timing attributes (durations, delays) are not listed; their defaults fit the narration. Attribute values of type json are written as JSON in the attribute (`values=\"[0.1,0.5]\"`). In “data shape”, `?` marks an optional field; where no type is written, label, tex, note and tone are str, step is int and at is num. In a name or label, `*…*` is italic and `_` `^` make only the next character a subscript or superscript; to show the symbol itself, write the full-width _ ^ *.\n\n{{CATALOG}}\n\n## 4. narration.md\n\n```markdown\n# Script: <lesson title>\n\n## The decay law\n[0] Here is the decay law. We follow how many atoms are left.\n[1] The number left is the starting number times a shrinking exponential.\n[2] {mark:n0|circle}{N₀|N naught} is the number at the start, at time zero.\n[concl] The half-life depends only on the decay constant.\n```\n\n- One section per slide, **in slide order, for every slide (cover included)**: `## <slide heading>` (R-headings), no `{#id}` (R-noids).\n- **R-narr-steps** Step labels `[0]`, `[1]`, … and `[concl]`. **Every step of every slide has script lines** (step 0 to max, and `[concl]` if the slide has a conclusion line), and there are **no labels for steps that do not exist** (a `static` cover has only `[0]`; a slide without a conclusion line has no `[concl]`; never `[01]`). Within a step, talk only about what appears at that step.\n- **R-dialogue** **One narrator by default**: write no speaker names. Write a dialogue only when asked (if asked for three or more speakers, keep two roles and say so first): lines start with `Expert:` or `Novice:` (continuation lines indented; a line without a speaker is Expert), shaped as a cognitive apprenticeship:\n - Novice is never a mere backchannel: Novice voices the question a learner is likely to have, or paraphrases (“So …, is that right?”)\n - Expert answers and adds one example or analogy, or confirms (or corrects) the paraphrase and takes one step further\n - Only at a comprehension fork (where learners tend to misunderstand, or a “why” remains): at most one exchange per slide, 2–3 turns. Elsewhere Expert alone\n - Never a turn that is only “I see”, or that repeats the previous turn. Example: `Novice: So a larger rate always gets there faster?` `Expert: Not always. Too large, and each step jumps across the valley, like striding downhill onto the opposite slope.`\n- `{note:…}`: presenter directions.\n- `{cue}`: a sync point inside a step, one per entry of the part’s `cues(k)` (only where a part’s README asks for it; otherwise omit).\n- `{mark:ID}`, `{mark:ID|effect}`, `{mark:ID|effect|hold=seconds}`, `{mark:clear}`: placed **right before** the words about the target; at most 1–2 per step; still say the thing in words. Effects: `underline` (default; a hand-drawn underline from left to right), `circle` (a hand-drawn circle), `box` (a rounded frame), `spot` (dims everything except the area around the target with the background color), `laser` (a dot of light slides to below the target and stays briefly)\n- **R-reading** `{display|reading}` gives the reading of **one symbol or one term**: `{θ|theta}`, `{N₀|N naught}`, `{x̄|x bar}`, `{論語|ろんご}`. One symbol may carry a star, a prime, a subscript or superscript, or a hat/bar/tilde (`{Q*|Q star}`, `{x′|x prime}`, `{θ̂|theta hat}`). Write the display part in plain Unicode, not LaTeX, and never as an expression or several symbols (`{1-η|…}`, `{a*b|…}` and `{θとη|…}` are wrong: give each symbol its own reading and say the relation in words). Give a reading only to a term misread without one, and then everywhere it appears.\n- **R-formula** **Never read an equation aloud**: no LaTeX, no `\\`, `^`, `_`, and no strings such as `a + b = c` in the narration. Say what the equation means (“the number left is the starting number times a shrinking exponential”).\n- Japanese script is polite spoken Japanese (です・ます); English script is plain spoken English. About 5 Japanese characters or 2.5 English words per second; 1–3 sentences per turn.\n\n## 5. Fix requests\n\nWhen the user pastes a **fix request** (a list of findings with the ids of the standards, followed by the current files), fix exactly those findings, keep everything else, keep every `id=\"…\"` and `{#…}` unchanged (R-noids), and reply again with the two blocks (R-output). If the request contains only some slides, return only those `<section>` elements in the `deck.html` block (no `<html>`) and only their sections in the `narration.md` block; the editor puts them back in place by id.\n\n## 6. Worked example\n\nA small lesson, fictional, showing the structure only (do not copy its content). Note how the steps add up: the list of 2 items gives steps 1–2 and `[concl]`<!--part:m-flow-->; the `m-flow` with 4 boxes gives steps 1–4<!--/part-->. The static cover has `[0]` only. Some part sets end with an example of their own.\n\n### Common (English, default theme, marks<!--part:m-flow-->, m-flow<!--/part-->)\n\n```deck.html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>How a web page arrives</title>\n</head>\n<body>\n<div id=\"stage\">\n\n<section class=\"slide cover noconcl static\">\n <div class=\"venue\">Computing basics, lesson 1 (a fictional course)</div>\n <h1>How a web page arrives</h1>\n</section>\n\n<section class=\"slide\">\n <h2>Two programs take part</h2>\n <div class=\"body\">\n <p>Opening a page is a conversation between two programs.</p>\n <ul>\n <li id=\"browser\">The <span class=\"term\">browser</span> asks for the page and draws it</li>\n <li id=\"server\">The <span class=\"term\">server</span> keeps the page and sends it back</li>\n </ul>\n </div>\n <div class=\"concl\"><span>Every page load is a request and a reply</span></div>\n</section><!--part:m-flow-->\n\n<section class=\"slide\">\n <h2>From the address to the screen</h2>\n <div class=\"body\">\n <m-flow style=\"height:300px\" aria-label=\"Four stages: type the address, send a request, send the page back, draw the page\">\n <script type=\"application/json\">{\"nodes\": [\n {\"id\": \"a\", \"label\": \"Type the\\naddress\", \"x\": 10, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 1},\n {\"id\": \"b\", \"label\": \"Send a\\nrequest\", \"x\": 315, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 2},\n {\"id\": \"c\", \"label\": \"Send the\\npage back\", \"x\": 620, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 3, \"tone\": \"term\"},\n {\"id\": \"d\", \"label\": \"Draw the\\npage\", \"x\": 925, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 4, \"tone\": \"emph\"}\n ], \"edges\": [\n {\"from\": \"a\", \"to\": \"b\"}, {\"from\": \"b\", \"to\": \"c\"}, {\"from\": \"c\", \"to\": \"d\"}\n ]}</script>\n </m-flow>\n </div>\n <div class=\"concl\"><span>A slow page is slow in one of these four stages</span></div>\n</section><!--/part-->\n\n</div>\n</body>\n</html>\n```\n\n```narration.md\n# Narration: How a web page arrives\n\n## How a web page arrives\n[0] Today we follow a web page on its way from a server to your screen.\n\n## Two programs take part\n[0] Opening a page is a conversation between two programs.\n[1] {mark:browser}The browser is the program you look at. It asks for the page and then draws it.\n[2] {mark:server}The server is a program on another computer. It keeps the page and sends it back when asked.\n[concl] Every page load is a request and a reply.<!--part:m-flow-->\n\n## From the address to the screen\n[0] Let us put the steps in order.\n[1] First you type the address of the page.\n[2] The browser turns it into a request and sends it to the server.\n[3] The server finds the page and sends it back.\n[4] The browser draws the page on the screen.\n[concl] When a page is slow, one of these four stages is taking the time.<!--/part-->\n```",
|
|
893
|
-
"request": "# What I want\n\n*(Fill in A or B and delete the other; delete fields you leave empty.)*\n\n**A. Make a new
|
|
892
|
+
"common": "# Instructions for the AI\n\nPack version: `ac7fb486`\n\nYou will write one short **Egatari file**: HTML slides with step-by-step reveals (`deck.html`) and a spoken script for it (`narration.md`). Both are built and quality-checked automatically; only what is described here is available. Write slides and script in the language the user asks for. Standards have ids such as **R-fit**; a fix request names the standards a draft broke. The user's request is in **What I want** at the end (or in the conversation before it): choose sensibly for any field that is empty or missing, and if both A and B are left, follow the one with content.\n\n**Before you start (the most common failures):**\n\n- **Both code blocks must be complete and closed.** Never stop in the middle of a block (R-output). Without an outline, keep it short (5–8 slides). Given an outline and a range of its slides, write exactly that range (at most 6 slides, so they fit).\n- **Sizes on the 1280×720 slide** (the quality checker measures them, R-fit): the body area is 1184 × 443 px (to 565 px; 1184 × 558 with `noconcl`). Body text is 32 px with 46 px per line, so about **8 lines** fit; every overflowing 46 px is one line to cut. **All text, also inside figures and parts, is at least 24 px.**\n- **Charts and figures:** parts draw their labels at 24–28 px whatever their size (their SVG uses their own pixels), so size the part, not the text. A part of 380 px leaves room for one short line; with two lines, use 330 px.\n- **Inline `<svg>`:** its text is scaled by displayed width ÷ viewBox width, so write the viewBox in the pixels it is shown at, e.g. `<svg viewBox=\"0 0 560 320\" width=\"560\" height=\"320\">`, with `font-size` ≥ 24. Never combine `width:100%` with another viewBox width (a 600-wide viewBox shown 580 px wide turns 24 into 23.2 px). Prefer a part when one fits.\n\n## 1. Output format\n\n- **R-output** Reply with **exactly two fenced code blocks**, in this order, labelled `deck.html` and `narration.md` (the opening lines are ```` ```deck.html ```` and ```` ```narration.md ````). Put nothing between them; a one-line note before or after is fine. Never split a file over several blocks. No files, canvas or attachments: write both blocks in your chat message. Do not reference other files (no images, no `{{FIG:…}}`, no `{{JSON:…}}`, no external URLs, no `<link>`), and never stop in the middle of a block: if the lesson would be too long, make fewer slides (but for a range of an outline, write exactly the requested slides).\n- **R-outline** When the request asks for an **outline only** (a long file made in two passes), reply with exactly one fenced code block labelled `outline` (the opening line is ```` ```outline ````) and no `deck.html` or `narration.md`: a Markdown table (columns `#`, heading, one-line point), one row per slide, all slides in order. Each later request names a range (“slides 7–12 of the outline”): write exactly those slides, following their headings and points.\n- **R-noids** Do **not** write slide ids. Write `<section class=\"slide\">` without `id`, and script headings without `{#…}`. The editor adds ids after import. When you are given slides that already have ids (a fix request), keep every existing `id=\"…\"` and `{#…}` exactly as it is.\n\n## 2. deck.html\n\n### 2.1 Skeleton\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Title</title>\n</head>\n<body>\n<div id=\"stage\">\n <section class=\"slide cover noconcl static\"> … </section>\n <section class=\"slide\"> … </section>\n</div>\n</body>\n</html>\n```\n\n- `lang`: `en`, `ja`, … (the language of the slides and script). `data-theme`: `sumi` for business and pitch decks, `kokugo` for Japanese language arts, otherwise `default`.\n- No `<script>` except part data (§2.6), no `<link>`. A `<style>` block is allowed only for layout (sizes, gaps), never colors.\n\n### 2.2 Slides\n\n- Normal slide: `<h2>` heading, `<div class=\"body\">…</div>`, then `<div class=\"concl\"><span>…</span></div>` (the conclusion line: one short sentence).\n- Optional kicker (a short line above the heading): one `<p class=\"kicker\">` just before the `<h2>` (ordinary slides only, not `layout-tate`); shown at step 0, not part of the heading. Type it normally, not in capitals (the theme capitalizes English).\n- Cover: `<section class=\"slide cover noconcl static\">` with optional `<div class=\"venue\">…</div>`, `<h1>title</h1>`, optional `<div class=\"au\">…</div>`.\n- Chapter divider: `<section class=\"slide sec noconcl static\"><h1>chapter title</h1></section>`.\n- Classes on `<section>`: `noconcl` (no conclusion line), `static` (no steps), `nostep` (all list items visible from the start), `layout-tate` (Japanese vertical writing; only with the kokugo part set, which describes it), and the `data-morph` attribute (§2.5).\n- Inside `.body`: `<p class=\"sub\">` sub-heading, `<div class=\"big\">` main equation, `<p class=\"note\">` note, `<div class=\"thm\">` theorem box, `<div class=\"cols\">` side-by-side columns, ordinary `<p>`, `<ul>`, `<ol>`, `<table>`.\n- **R-caution** In `.body`: `<div class=\"caution\">…</div>` for caution; add `warn` for warning. Labels are automatic.\n- Inline emphasis (the only way to color text): `term` (term or question), `emph` (conclusion, problem, goal), `muted` (known result, de-emphasized), `b` (bold).\n- **R-headings** Every slide heading (`h1` on the cover and dividers, `h2` elsewhere) is **different** from all the others (add a word if two would be the same), and the script section of that slide starts with `## ` followed by **exactly the same heading text** (tags such as `<br>` dropped).\n- **R-colors** Colors only through the theme: the classes above and the math macros `\\hlE` `\\hlT` `\\hlM`; no hex, `rgb()`, named colors, `\\color` or `\\textcolor`. In a part or inline SVG: **Use only the theme's CSS variables for colors**: `var(--fg)` `var(--term)` `var(--emph)` `var(--muted)` `var(--accent2)` `var(--line)`. In SVG write `style=\"stroke:var(--emph)\"` rather than an attribute (`DECK.el` moves `fill` and `stroke` into style automatically when they contain `var(`)\n\n### 2.3 Steps (reveal order = speaking order)\n\n- **R-steps** Step 0 is the slide as it first appears: context only (heading, sub-heading, one framing sentence). An element with `data-step=\"k\"` (k = 1, 2, …) appears at step k; material (list items, equations, table rows, figure parts) appears in the order you talk about it. An equation and the sentence that introduces it share one step (wrap both in `<div data-step=\"k\">`). About 5 steps per slide at most.\n- The conclusion line automatically becomes the **last step**, `concl`; never put `data-step` on it.\n- If a slide has **no** `data-step` anywhere, its top-level list items (`.body > ul > li`, `.body > ol > li`) are numbered 1, 2, … automatically. As soon as any element has `data-step`, nothing is automatic: give every revealed element its `data-step`.\n- A part adds its own steps (§3), starting at its `data-from` (default 1).\n- So the steps of a slide are `0 … max` plus `concl` if it has a conclusion line. A `static` slide has only step 0.\n\n### 2.4 Math (KaTeX, rendered at build time)\n\n- **R-math** Inline `\\( … \\)`, display `\\[ … \\]`. Write `<` as `\\lt` and `>` as `\\gt` inside math. Allowed macros besides standard KaTeX: `\\hlE{…}` (emph) `\\hlT{…}` (term) `\\hlM{…}` (muted), `\\htmlId{ID}{…}`, `\\htmlData{mark=ID}{…}`, `\\htmlClass{…}{…}`, `\\morph{ID}{…}`. No `\\newcommand`, no `\\color`. To label a term, use `\\underbrace{…}_{\\text{…}}` or `\\overbrace{…}^{…}`. Never `$$`. Define each symbol where it is first used (`\\(\\mu\\)`: the mean).\n\n### 2.5 Attention marks and morphs\n\n- **R-marks** The script’s `{mark:ID}` (§4) marks a target on the **same slide**. Targets: an element in the slide with `id=\"ID\"` or `data-mark=\"ID\"`. For part of an equation, KaTeX's `\\htmlId{ID}{…}` / `\\htmlData{mark=ID}{…}` (the build allows only these two and `\\htmlClass`). If the same ID is used on several slides, use `data-mark` (ids must be unique in the document)\n- Morph (optional): `<section class=\"slide\" data-morph>` slides elements from the previous slide into place; pair elements with the same `data-id=\"…\"` on both slides, or equation parts with `\\morph{ID}{…}` on both. Only elements visible at step 0 move.\n\n### 2.6 Parts\n\n- **R-components** Animated figures are the Web Components `<m-…>` of the catalog (§3), used inside `.body`. Give each a height (`style=\"height:380px\"`) and an `aria-label`. Data goes in **one** child `<script type=\"application/json\">…</script>` written inline (never `{{JSON:…}}`). **Numbers in figures must be correct** (compute them; never invent values for looks; label made-up business figures as fictional). Formulas are arithmetic only (`Math.exp(x)`, `x**2`), never run as code. Use parts only where motion explains something; most slides need none.\n\n### 2.7 Choosing a representation\n\n- **R-purpose** Choose the representation from what the slide must say, not from habit. If the author names a chart type, use it. The table names every part, but use only those described here (§3 and the included part sets). If a part that is not included would fit better, say so in a one-line note.\n\n{{PURPOSES}}\n\n- **R-whole** Lists, KPI cards and pies are shown whole; do not reveal them line by line unless the script discusses each item in turn (for a list, give it one `data-step` or put `nostep` on the slide).\n\n### 2.8 Fitting the slide (1280×720; the quality checker reports errors)\n\n- **R-title** Heading: Japanese at most 26 units (full-width character = 1, ASCII = 0.5); English at most 60 characters. Never ends with a colon.\n- **R-concl** Conclusion line: Japanese at most 35 units; English at most 70 characters. One line.\n- **R-fit** The body must end above 565 px (680 px with `noconcl`): about 8 lines / 100 Japanese characters / 60 English words per slide, or one `big` equation and 3 short bullets, or a part of height ≤ 380 px and one short line (≤ 330 px with two). If it does not fit, split the slide; never shrink text and never set font sizes.\n- **R-style** Japanese slides: plain style (だ・である, 体言止め), no です・ます on slides, one punctuation style in the whole file (`、。` or `,.`). English slides: short phrases, sentence case.\n\n## 3. Part catalog\n\nStandard parts fit any file; a part set after §6 adds the parts for its material. “steps” is how many slide steps a part uses (from `data-from`, default 1). Timing attributes (durations, delays) are not listed; their defaults fit the narration. Attribute values of type json are written as JSON in the attribute (`values=\"[0.1,0.5]\"`). In “data shape”, `?` marks an optional field; where no type is written, label, tex, note and tone are str, step is int and at is num. In a name or label, `*…*` is italic and `_` `^` make only the next character a subscript or superscript; to show the symbol itself, write the full-width _ ^ *.\n\n{{CATALOG}}\n\n## 4. narration.md\n\n```markdown\n# Script: <title>\n\n## The decay law\n[0] Here is the decay law. We follow how many atoms are left.\n[1] The number left is the starting number times a shrinking exponential.\n[2] {mark:n0|circle}{N₀|N naught} is the number at the start, at time zero.\n[concl] The half-life depends only on the decay constant.\n```\n\n- One section per slide, **in slide order, for every slide (cover included)**: `## <slide heading>` (R-headings), no `{#id}` (R-noids).\n- **R-narr-steps** Step labels `[0]`, `[1]`, … and `[concl]`. **Every step of every slide has script lines** (step 0 to max, and `[concl]` if the slide has a conclusion line), and there are **no labels for steps that do not exist** (a `static` cover has only `[0]`; a slide without a conclusion line has no `[concl]`; never `[01]`). Within a step, talk only about what appears at that step.\n- **R-dialogue** **One narrator by default**: write no speaker names. Write a dialogue only when asked (if asked for three or more speakers, keep two roles and say so first): lines start with `Expert:` or `Novice:` (continuation lines indented; a line without a speaker is Expert), shaped as a cognitive apprenticeship:\n - Novice is never a mere backchannel: Novice voices the question a learner is likely to have, or paraphrases (“So …, is that right?”)\n - Expert answers and adds one example or analogy, or confirms (or corrects) the paraphrase and takes one step further\n - Only at a comprehension fork (where learners tend to misunderstand, or a “why” remains): at most one exchange per slide, 2–3 turns. Elsewhere Expert alone\n - Never a turn that is only “I see”, or that repeats the previous turn. Example: `Novice: So a larger rate always gets there faster?` `Expert: Not always. Too large, and each step jumps across the valley, like striding downhill onto the opposite slope.`\n- `{note:…}`: presenter directions.\n- `{cue}`: a sync point inside a step, one per entry of the part’s `cues(k)` (only where a part’s README asks for it; otherwise omit).\n- `{mark:ID}`, `{mark:ID|effect}`, `{mark:ID|effect|hold=seconds}`, `{mark:clear}`: placed **right before** the words about the target; at most 1–2 per step; still say the thing in words. Effects: `underline` (default; a hand-drawn underline from left to right), `circle` (a hand-drawn circle), `box` (a rounded frame), `spot` (dims everything except the area around the target with the background color), `laser` (a dot of light slides to below the target and stays briefly)\n- **R-reading** `{display|reading}` gives the reading of **one symbol or one term**: `{θ|theta}`, `{N₀|N naught}`, `{x̄|x bar}`, `{論語|ろんご}`. One symbol may carry a star, a prime, a subscript or superscript, or a hat/bar/tilde (`{Q*|Q star}`, `{x′|x prime}`, `{θ̂|theta hat}`). Write the display part in plain Unicode, not LaTeX, and never as an expression or several symbols (`{1-η|…}`, `{a*b|…}` and `{θとη|…}` are wrong: give each symbol its own reading and say the relation in words). Give a reading only to a term misread without one, and then everywhere it appears.\n- **R-formula** **Never read an equation aloud**: no LaTeX, no `\\`, `^`, `_`, and no strings such as `a + b = c` in the narration. Say what the equation means (“the number left is the starting number times a shrinking exponential”).\n- Japanese script is polite spoken Japanese (です・ます); English script is plain spoken English. About 5 Japanese characters or 2.5 English words per second; 1–3 sentences per turn.\n\n## 5. Fix requests\n\nWhen the user pastes a **fix request** (a list of findings with the ids of the standards, followed by the current files), fix exactly those findings, keep everything else, keep every `id=\"…\"` and `{#…}` unchanged (R-noids), and reply again with the two blocks (R-output). If the request contains only some slides, return only those `<section>` elements in the `deck.html` block (no `<html>`) and only their sections in the `narration.md` block; the editor puts them back in place by id.\n\n## 6. Worked example\n\nA small example, fictional, showing the structure only (do not copy its content). Note how the steps add up: the list of 2 items gives steps 1–2 and `[concl]`<!--part:m-flow-->; the `m-flow` with 4 boxes gives steps 1–4<!--/part-->. The static cover has `[0]` only. Some part sets end with an example of their own.\n\n### Common (English, default theme, marks<!--part:m-flow-->, m-flow<!--/part-->)\n\n```deck.html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>How a web page arrives</title>\n</head>\n<body>\n<div id=\"stage\">\n\n<section class=\"slide cover noconcl static\">\n <div class=\"venue\">Computing basics, lesson 1 (a fictional course)</div>\n <h1>How a web page arrives</h1>\n</section>\n\n<section class=\"slide\">\n <h2>Two programs take part</h2>\n <div class=\"body\">\n <p>Opening a page is a conversation between two programs.</p>\n <ul>\n <li id=\"browser\">The <span class=\"term\">browser</span> asks for the page and draws it</li>\n <li id=\"server\">The <span class=\"term\">server</span> keeps the page and sends it back</li>\n </ul>\n </div>\n <div class=\"concl\"><span>Every page load is a request and a reply</span></div>\n</section><!--part:m-flow-->\n\n<section class=\"slide\">\n <h2>From the address to the screen</h2>\n <div class=\"body\">\n <m-flow style=\"height:300px\" aria-label=\"Four stages: type the address, send a request, send the page back, draw the page\">\n <script type=\"application/json\">{\"nodes\": [\n {\"id\": \"a\", \"label\": \"Type the\\naddress\", \"x\": 10, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 1},\n {\"id\": \"b\", \"label\": \"Send a\\nrequest\", \"x\": 315, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 2},\n {\"id\": \"c\", \"label\": \"Send the\\npage back\", \"x\": 620, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 3, \"tone\": \"term\"},\n {\"id\": \"d\", \"label\": \"Draw the\\npage\", \"x\": 925, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 4, \"tone\": \"emph\"}\n ], \"edges\": [\n {\"from\": \"a\", \"to\": \"b\"}, {\"from\": \"b\", \"to\": \"c\"}, {\"from\": \"c\", \"to\": \"d\"}\n ]}</script>\n </m-flow>\n </div>\n <div class=\"concl\"><span>A slow page is slow in one of these four stages</span></div>\n</section><!--/part-->\n\n</div>\n</body>\n</html>\n```\n\n```narration.md\n# Narration: How a web page arrives\n\n## How a web page arrives\n[0] Today we follow a web page on its way from a server to your screen.\n\n## Two programs take part\n[0] Opening a page is a conversation between two programs.\n[1] {mark:browser}The browser is the program you look at. It asks for the page and then draws it.\n[2] {mark:server}The server is a program on another computer. It keeps the page and sends it back when asked.\n[concl] Every page load is a request and a reply.<!--part:m-flow-->\n\n## From the address to the screen\n[0] Let us put the steps in order.\n[1] First you type the address of the page.\n[2] The browser turns it into a request and sends it to the server.\n[3] The server finds the page and sends it back.\n[4] The browser draws the page on the screen.\n[concl] When a page is slow, one of these four stages is taking the time.<!--/part-->\n```",
|
|
893
|
+
"request": "# What I want\n\n*(Fill in A or B and delete the other; delete fields you leave empty.)*\n\n**A. Make a new file**\n\n- Title (used as is on the cover):\n- Audience:\n- Length (slides or minutes):\n- Language:\n- Speakers: one narrator\n- Other wishes:\n\n**B. From the material and discussion in this chat**\n\nMake the slides and script from the material given in this chat and what we have discussed so far.\n\n- Title (used as is on the cover):\n- Audience:\n- Length (slides or minutes):\n- Language:\n- Speakers: one narrator\n- Other wishes:",
|
|
894
894
|
"sets": {
|
|
895
|
-
"stats": "## Part set: stats (statistics charts)\n\nFor
|
|
895
|
+
"stats": "## Part set: stats (statistics charts)\n\nFor classes and talks with data: distributions, box plots, heatmaps, and a distribution updated one observation at a time. Use the `default` theme. Give the source and the size of every data set on the slide or in the script, and never invent data that looks real (R-components).\n\n- **Axis charts** (<!--part:m-hist-->`m-hist`, <!--/part--><!--part:m-boxplot-->`m-boxplot`, <!--/part--><!--part:m-seq-->`m-seq`, <!--/part-->and the like) reserve 86 px at the left and 80 px in all at the top and bottom for ticks and axis names: give them a height of **300–380 px** and a width of **at least 560 px** (in `<div class=\"cols\">`, give the chart column at least 55%).\n- Make the axis ranges contain every plotted value (computed as R-components says).\n\nParts of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
896
896
|
"data": "## Part set: data (data science and code)\n\nFor information and data-science lessons (Information I, data science, programming). Give the source and the size of every data set on the slide or in the script (R-components). <!--part:m-code-->Show code with `m-code`.<!--/part-->\n\nParts of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
897
897
|
"algo": "## Part set: algo (algorithms)\n\nFor classes in computing or operations research that show a procedure one step at a time: graph search, shortest paths, tours. For the states and totals, write the output of a script that actually ran the procedure.\n\nParts of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
898
898
|
"ml": "## Part set: ml (machine learning)\n\nFor machine-learning classes that show a computation one step at a time: a neural network's forward pass, classification boundaries, loss contours and gradient descent. For the values (weights, probabilities, iterates), write the output of a script that actually computed them.\n\nParts of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
899
899
|
"math": "## Part set: math (arithmetic and mathematics)\n\nFor arithmetic and mathematics lessons: column arithmetic, number lines, tape diagrams, and a function that changes with a parameter. Use the `default` theme.\n\n- **Axis charts** (<!--part:m-sweep-->`m-sweep`, <!--/part--><!--part:m-curves-->`m-curves`, <!--/part-->and the like) reserve 86 px at the left and 80 px in all at the top and bottom for ticks and axis names: give them a height of **300–380 px** and a width of **at least 560 px** (in `<div class=\"cols\">`, give the chart column at least 55%).\n- Make the axis ranges contain every plotted value (computed as R-components says).\n\nParts of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}\n\n<!--part:m-sweep-->### Worked example: math (English, default theme, m-sweep)\n\n(only the slides with the part; the rest of `deck.html` is as in §6)\n\n```deck.html\n<section class=\"slide\">\n <h2>A larger λ decays faster</h2>\n <div class=\"body\">\n <div class=\"cols\" style=\"gap:24px\">\n <div style=\"flex:0 0 36%\">\n <div class=\"big\">\\[ \\frac{N(t)}{N_0}=e^{-\\lambda t} \\]</div>\n <ul class=\"nostep\"><li>Grey: the previous \\(\\lambda\\)</li></ul>\n </div>\n <m-sweep f=\"Math.exp(-c*u)\" values=\"[0.2,0.5,1.0]\" param=\"λ\" xr=\"[0,6]\" yr=\"[0,1]\" xt=\"[0,2,4,6]\" yt=\"[0,0.5,1]\"\n xl=\"*t*\" yl=\"share left\" digits=\"1\" style=\"height:380px\" aria-label=\"Share of atoms left over time for three decay constants\"></m-sweep>\n </div>\n </div>\n <div class=\"concl\"><span>Raising λ shortens the half-life</span></div>\n</section>\n```\n\n```narration.md\n## A larger λ decays faster\n[0] Let us change the decay constant and watch the share of atoms left.\n[1] Raising it from 0.2 to 0.5 makes the curve fall faster.\n[2] At 1.0 it falls faster still.\n[concl] A larger decay constant means a shorter half-life.\n```<!--/part-->\n\n<!--part:m-sweep-->Steps: the `m-sweep` with 3 values gives steps 1–2.<!--/part-->",
|
|
900
|
-
"maps": "## Part set: maps\n\nFor
|
|
900
|
+
"maps": "## Part set: maps\n\nFor classes and guides with maps: geography, history and local information on a map of Japan or of the world. Use the `default` theme. Give the year and the source of every figure (population, area, production) on the slide or in the narration.\n\nParts of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
901
901
|
"kokugo": "## Part set: kokugo (Japanese language arts)\n\nFor 国語 lessons: 漢文, 古文 and 現代文. Use the `kokugo` theme. In the script, give the reading of hard words and names with `{display|reading}` (R-reading).\n\n- **Vertical slides:** `<section class=\"slide layout-tate\">` sets the whole slide in vertical writing. The `<h2>` is one vertical column at the right edge (about 14 full-width characters; it does not wrap), the body runs in columns from right to left, and the conclusion line is a vertical column at the left edge (about 19 characters). The body must stay between the two columns (the quality checker reports an overlap). Parts, figures and tables in the body stay horizontal at the full body width: use their vertical option (<!--part:m-kobun-->`m-kobun tate`<!--/part--><!--part:m-kobun,m-gendai-->, <!--/part--><!--part:m-gendai-->`m-gendai tate`<!--/part--><!--part:m-kanbun-->; `m-kanbun` is always vertical<!--/part-->).\n\nParts of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}\n\n<!--part:m-kanbun-->### Worked example: kokugo (kokugo theme, m-kanbun)\n\n(only the slides with the part; the rest of `deck.html` is as in §6)\n\n```deck.html\n<section class=\"slide\">\n <h2>学びて時に之を習ふ</h2>\n <div class=\"body\">\n <m-kanbun style=\"height:440px\" aria-label=\"『論語』学而篇の冒頭の白文、訓点、読む順、書き下し文\">\n 学(ビテ)而{-}時(ニ)習(フ)[レ]之(ヲ)、\n 不{=ず}[二]亦(タ)説(バシカラ)[一]乎{=や}。\n </m-kanbun>\n </div>\n <div class=\"concl\"><span>一二点は、一を読んでから二へ戻る</span></div>\n</section>\n```\n\n```narration.md\n## 学びて時に之を習ふ\n[0] 返り点も送り仮名もない、白文です。\n[1] 返り点と送り仮名を付けます。而は、読まない置き字です。\n[2] 読む順に字をたどります。一句目は、レ点で之から習へ戻ります。\n[3] 二句目は、一二点で説から不へ戻ります。\n[4] 書き下し文にすると、学びて時に之を習ふ、亦た説ばしからずや、となります。\n[concl] 一二点は、一の字を読んでから、二の字へ戻ります。\n```<!--/part-->\n\n<!--part:m-kanbun-->Steps: `m-kanbun` gives 訓点 (step 1), then one step per 句 of the reading order, then the 書き下し文: write one `[n]` per 句.<!--/part-->",
|
|
902
902
|
"english": "## Part set: english (English as a foreign language)\n\nFor English lessons taught in Japanese: the structure of English sentences (S V O C M, phrases and clauses, what modifies what) with a Japanese translation. Use the `default` theme. Write the English sentences exactly as the class reads them, and keep the Japanese script short; read the English examples aloud only when the lesson needs it.\n\nParts of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
903
903
|
"music": "## Part set: music (pitch, scales, chords)\n\nFor music lessons: pitch, scales, intervals and chords on a piano keyboard. Use the `default` theme. Name notes as the class does (ドレミ, C D E, or ハニホ) and keep the same names on the slide and in the narration.\n\nParts of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
@@ -1178,20 +1178,20 @@ export const PACK = {
|
|
|
1178
1178
|
"extHead": "### `<{name}>`: extension for this part set (the part is described in §3)"
|
|
1179
1179
|
},
|
|
1180
1180
|
"ja": {
|
|
1181
|
-
"common": "# AI への指示\n\n指示のバージョン:`049c5f95`\n\n短い **Egatari の教材**を 1 つ書いてください。ステップごとに出る HTML のスライド(`deck.html`)と台本(`narration.md`)で、どちらも自動で組まれ、品質チェックを受けます。ここにないものは使えません。教材は頼まれた言語で書きます(スライドと台本は同じ言語)。規格には **R-fit** のような名前があり、修正依頼は破った規格を名前で示します。依頼は最後の **頼みたいこと**(かその前の会話)にあります。空の項目やない項目はほどよく決め、A と B が両方残っていれば書き込みのある方に従います。\n\n**よくある失敗:**\n\n- **2 つの灰色の枠(コードブロック)はどちらも最後まで書いて閉じる。**コードブロックの途中で終わらない(R-output)。構成案がなければ、教材は短くする(5〜8 枚)。頼む文に構成案とその範囲があれば、その範囲のスライドをちょうどその枚数だけ書く(エディタは 1 回に 6 枚までしか頼まないので、収まる)\n- **1280×720 のスライドの大きさ**(品質チェックが測る。R-fit):本文の場所は 1184 × 443 px(565 px まで。`noconcl` なら 1184 × 558)。字は 32 px・1 行 46 px で、入るのは**およそ 8 行**。はみ出す 46 px ごとに 1 行を削る。**図やパーツの中もテキストはすべて 24 px 以上**\n- **グラフと図:**パーツは大きさによらずテキストを 24〜28 px で描くので、決めるのはパーツの大きさ(R-fit)\n- **その場で書く `<svg>`:**字は「表示の幅 ÷ viewBox の幅」で縮むので、viewBox を表示の画素で書く(`<svg viewBox=\"0 0 560 320\" width=\"560\" height=\"320\">`)。`font-size` は 24 以上。`width:100%` と別の幅の viewBox を組み合わせない。合うパーツがあればパーツを使う\n\n## 1. 出力の形\n\n- **R-output** 出力は**ちょうど 2 つのコードブロック**にし、この順で、名前を `deck.html` と `narration.md` にする(始まりの行は ```` ```deck.html ```` と ```` ```narration.md ````)。間には何も書かない(前後に 1 行の添え書きはよい)。1 つのファイルを複数のコードブロックに分けない。ファイル・キャンバス・添付にせず、本文に書く。ほかのファイルを参照しない(画像・`{{FIG:…}}`・`{{JSON:…}}`・外の URL・`<link>` は使わない)。コードブロックの途中で終わらない(長すぎるなら枚数を減らす。ただし構成案の範囲を頼まれたら、ちょうどその枚数)\n- **R-outline** **構成案だけ**を頼まれたら(長い教材を 2 回に分けて作るとき)、`outline` という名前のコードブロック 1 つ(始まりの行は ```` ```outline ````)だけで返し、`deck.html` と `narration.md` は書かない:列が「番号」「見出し」「要点(1 行)」の Markdown の表で、スライドごとに 1 行、全スライドを順に。その後の頼む文は範囲を示す(「構成案の 7〜12 枚目」)ので、その見出しと要点のとおりに、ちょうどそのスライドを書く\n- **R-noids** スライドの id を**書かない**。`<section class=\"slide\">` に `id` を付けず、台本の見出しにも `{#…}` を付けない。id は取り込みでエディタが付ける。id のある教材を渡されたとき(修正依頼)は、今ある `id=\"…\"` と `{#…}` をそのまま残す\n\n## 2. deck.html\n\n### 2.1 骨組み\n\n```html\n<!DOCTYPE html>\n<html lang=\"ja\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>教材の題名</title>\n</head>\n<body>\n<div id=\"stage\">\n <section class=\"slide cover noconcl static\"> … </section>\n <section class=\"slide\"> … </section>\n</div>\n</body>\n</html>\n```\n\n- `lang`:`ja`・`en` など(教材の言語)。`data-theme`:ビジネス・ピッチは `sumi`、国語は `kokugo`、ほかは `default`\n- `<script>` はパーツのデータ(§2.6)だけ。`<style>` は配置(大きさ・間隔)だけに使い、色は書かない\n\n### 2.2 スライド\n\n- 普通のスライド:`<h2>` の見出し、`<div class=\"body\">…</div>`、`<div class=\"concl\"><span>…</span></div>`(結論の行。短い 1 文)\n- 肩見出し(見出しの上の短い言葉)を添えるなら、`<h2>` の直前に `<p class=\"kicker\">` を 1 つ置く(普通のスライドだけ。`layout-tate` には置かない)。見出しには含めず、ステップ 0 で見せる。英語はテーマが大文字で表示するので、大文字で書かない。\n- 表紙:`<section class=\"slide cover noconcl static\">` に、あれば `<div class=\"venue\">…</div>`、`<h1>題名</h1>`、あれば `<div class=\"au\">…</div>`\n- 章の扉:`<section class=\"slide sec noconcl static\"><h1>章の題</h1></section>`\n- `<section>` の class:`noconcl`(結論の行なし)、`static`(ステップなし)、`nostep`(箇条書きも初めから全部)、`layout-tate`(縦書き。kokugo のセットがあるときだけ)、属性 `data-morph`(§2.5)\n- `.body` の中:`<p class=\"sub\">` 小見出し、`<div class=\"big\">` 主要な式、`<p class=\"note\">` 補足、`<div class=\"thm\">` 定理の枠、`<div class=\"cols\">` 横並び、普通の `<p>` `<ul>` `<ol>` `<table>`\n- **R-caution** `.body` に注意は `<div class=\"caution\">…</div>`、警告は `class=\"caution warn\"`。ラベルは自動で付く。\n- 字の強調(色を付ける唯一の方法):`term`(用語・問い)、`emph`(結論・問題・目標)、`muted`(既知の結果・控えめ)、`b`(太字)\n- **R-headings** スライドの見出し(表紙と扉は `h1`、ほかは `h2`)は**すべて違う**ものにする(同じなら語を足す)。そのスライドの台本の節は `## ` に続けて**見出しとまったく同じ文字列**で始める(`<br>` などのタグは除く)\n- **R-colors** 色はテーマだけで:上の class と式のマクロ `\\hlE` `\\hlT` `\\hlM`。16 進・`rgb()`・色の名前・`\\color`・`\\textcolor` は使わない。パーツや SVG の中では:**色はテーマの CSS 変数だけ**を使う:`var(--fg)` `var(--term)` `var(--emph)` `var(--muted)` `var(--accent2)` `var(--line)`。SVG では属性ではなく `style=\"stroke:var(--emph)\"` で書く(`DECK.el` は `fill` `stroke` に `var(` があれば自動で style に回す)\n\n### 2.3 ステップ(出す順 = 話す順)\n\n- **R-steps** ステップ 0 は現れたときの姿で、文脈だけ(見出し・小見出し・導入の 1 文)。`data-step=\"k\"`(k = 1, 2, …)の要素はステップ k で現れる。材料(箇条書きの項目・式・表の行・図の部分)は話す順に出す。式とそれを導く 1 文は同じステップ(`<div data-step=\"k\">` で一緒に囲む)。1 枚のステップの数は 5 前後まで\n- 結論の行は自動で**最後のステップ** `concl` になる(`data-step` を付けない)\n- `data-step` が 1 つもないスライドでは、上の階層の箇条書きの項目(`.body > ul > li`・`.body > ol > li`)に 1, 2, … が自動で付く。1 つでもあれば自動にならないので、出すものすべてに付ける\n- パーツは自分のステップを足す(§3)。`data-from`(既定 1)から始まる\n- つまりステップは `0 … max` と、結論の行があれば `concl`。`static` のスライドはステップ 0 だけ\n\n### 2.4 数式(KaTeX)\n\n- **R-math** 行内は `\\( … \\)`、別行は `\\[ … \\]`。式の中の `<` は `\\lt`、`>` は `\\gt`。標準のほかに使えるマクロ:`\\hlE{…}`(emph)`\\hlT{…}`(term)`\\hlM{…}`(muted)、`\\htmlId{ID}{…}`、`\\htmlData{mark=ID}{…}`、`\\htmlClass{…}{…}`、`\\morph{ID}{…}`。`\\newcommand` と `\\color` は使わない。項の説明は `\\underbrace{…}_{\\text{…}}`・`\\overbrace{…}^{…}`。`$$` は使わない。記号は最初に使う所で定義する(`\\(\\mu\\)`:母平均)\n\n### 2.5 強調とモーフ\n\n- **R-marks** 台本の `{mark:ID}`(§4)は、**同じスライド**の目印に印を付ける。目印:スライドの中の `id=\"ID\"` か `data-mark=\"ID\"` の要素。式の一部は KaTeX の `\\htmlId{ID}{…}` / `\\htmlData{mark=ID}{…}`(build はこの 2 つと `\\htmlClass` だけを許す)。同じ ID を何枚かで使うなら `data-mark` にする(id は文書の中で一意に)\n- モーフ(なくてよい):`<section class=\"slide\" data-morph>` は前のスライドの要素を今の位置へ滑らせる。両方のスライドの要素に同じ `data-id=\"…\"`、式の一部は両方に `\\morph{ID}{…}`。ステップ 0 で見えている要素だけが動く\n\n### 2.6 パーツ\n\n- **R-components** パーツは一覧(§3)の Web Components `<m-…>` で、`.body` の中に置く。どれにも高さ(`style=\"height:380px\"`)と `aria-label` を付ける。データは子の `<script type=\"application/json\">…</script>` **1 つ**にその場で書く。**図の数字は正しく**(計算する。見た目のために値を作らない。架空の数字は架空と書く)。関数の式は算術の式だけで、コードとしては実行されない(`Math.exp(x)`・`x**2`)。動きが説明になる所だけに使う(たいていのスライドには要らない)\n\n### 2.7 表し方を選ぶ\n\n- **R-purpose** 表し方は習慣でなく、そのスライドで言いたいことから選ぶ。作者がグラフの種類を言っていればそれに従う。表は全パーツの一覧を兼ねる。使うのは渡された文章にあるパーツだけ(§3 と、入っているセット)。入っていないパーツの方が合うときは、1 行のメモでそう伝える\n\n{{PURPOSES}}\n\n- **R-whole** 箇条書き・数字のカード・円グラフは全体を一度に見せる。台本が 1 つずつ取り上げるときだけ 1 行ずつ出す(箇条書きなら全体に 1 つの `data-step` を付けるか、スライドに `nostep`)\n\n### 2.8 スライドに収める(品質チェックのエラー)\n\n- **R-title** 見出し:日本語は 26 字まで(全角 1・半角 0.5)、英語は 60 文字まで。コロンで終えない\n- **R-concl** 結論の行:日本語は 35 字まで、英語は 70 文字まで。1 行\n- **R-fit** 本文は 565 px(`noconcl` なら 680 px)より上で終える:1 枚におよそ 8 行・100 字・英語 60 語、または `big` の式 1 つと短い箇条書き 3 つ、または高さ 380 px までのパーツと短い 1 行(2 行なら 330 px まで)。入らなければスライドを分ける。字を縮めず、字の大きさを書かない\n- **R-style** 日本語のスライドは常体(だ・である、体言止め)で、です・ます を使わない。句読点は教材全体で 1 つの組(`、。` か `,.`)。英語のスライドは短い句で\n\n## 3. パーツの一覧\n\nどの教材でも使える標準のパーツ。§6 の後にセットの指示があれば、その種類の材料のパーツが加わる。「steps」はパーツが使うスライドのステップの数(`data-from` から。既定 1)。秒で測る属性(動きの長さ・ずれ)は載せない(既定で台本に合う)。型が json の属性は、値に JSON を書く(`values=\"[0.1,0.5]\"`)。「データの形」の `?` は省略できる欄。型を書いていない label・tex・note・tone は str、step は int、at は num。名前やラベルの `*…*` は斜体、`_` `^` は次の 1 字だけ下付き・上付き。記号のまま出すなら全角の _ ^ *。\n\n{{CATALOG}}\n\n## 4. narration.md\n\n```markdown\n# 台本:<教材の題名>\n\n## 減衰の式\n[0] 減衰の式です。時刻ごとに残っている原子の数を考えます。\n[1] 残る数は、はじめの数に、時間とともに小さくなる指数関数を掛けたものです。\n[2] {mark:n0|circle}{N₀|エヌゼロ} は、時刻ゼロのときの、はじめの数です。\n[concl] 半分になるまでの時間は、崩壊定数だけで決まります。\n```\n\n- スライドごとに 1 つの節を、**スライドの順に、すべてのスライド(表紙も)について**:`## <スライドの見出し>`(R-headings)。`{#id}` は付けない(R-noids)\n- **R-narr-steps** ステップの指定は `[0]` `[1]` … と `[concl]`。**どのスライドのどのステップにも台本を書き**(ステップ 0 から max まで、結論の行があれば `[concl]`)、**ないステップの指定は書かない**(`static` の表紙は `[0]` だけ。結論の行がなければ `[concl]` もない。`[01]` とは書かない)。ステップの中では、そのステップで現れるものだけを話す\n- **R-dialogue** **既定は話者 1 人**で、話者名を書かない。掛け合いは頼まれたときだけ(3 人以上を頼まれても 2 役にし、最初にそう書く):行を `Expert:` か `Novice:` で始め(続きの行は字下げ。話者なしは Expert)、認知的徒弟制の形にする:\n - Novice は相づち役にせず、学習者の疑問を代弁するか、「つまり〜ということですか」と言い換える\n - Expert は答えて具体例か比喩を 1 つ足すか、言い換えを確かめて(違えば直して)1 歩進める\n - 理解の分かれ目(誤解しやすい所、「なぜ」が残る所)にだけ、1 枚に 1 回・2〜3 発言まで。ほかは Expert 1 人\n - 「なるほど」だけの発言、前の発言のくり返しは書かない。例:`Novice: つまり、大きいほど早く着くのですか。` `Expert: いつもではありません。大きすぎると谷を飛び越えます。大股で坂を下りすぎて、向こうの斜面に足が着くように。`\n- `{note:…}` 発表者用\n- `{cue}`:ステップの中の同期点。パーツの `cues(k)` の 1 つに 1 つ(パーツの説明が求めるときだけ)\n- `{mark:ID}`・`{mark:ID|効果}`・`{mark:ID|効果|hold=秒}`・`{mark:clear}`:目印のことを言う言葉の**すぐ前**に置く。1 ステップに 1〜2 個まで。言葉でも言う。効果:`underline`(既定。手描きの下線を左から右へ)、`circle`(手描きの囲み)、`box`(角丸の枠)、`spot`(対象のまわり以外を背景色で薄くする)、`laser`(光の点が対象の下へ滑ってきて少し留まる)\n- **R-reading** `{表示|読み}` は **1 つの記号か 1 つの用語**の読み:`{θ|シータ}`、`{N₀|エヌゼロ}`、`{論語|ろんご}`。1 つの記号に星・プライム・添え字・ハットやバーが付いていてもよい(`{Q*|キュースター}`、`{θ̂|シータハット}`)。表示は普通の文字で書き、LaTeX にせず、式やいくつもの記号にしない(`{1-η|…}`・`{θとη|…}` は誤り:記号ごとに読みを付け、関係は言葉で言う)。読みは読みなしで読み違える語にだけ付ける(かなの読みは抑揚を崩しやすい)。読みは書いた所にだけ当たるので、付けた語がまた出てくるなら、出てくる所ごとに付ける\n- **R-formula** **式を読み上げない**:台本に LaTeX・`\\`・`^`・`_`・`a + b = c` のような文字列を書かない。式の意味を言葉で言う(§4 の例の [1])\n- 日本語の台本は話し言葉の です・ます。英語は話し言葉の英語。目安は 1 秒に日本語 5 字・英語 2.5 語。1 回の発言は 1〜3 文\n\n## 5. 修正依頼\n\n利用者が**修正依頼**(規格の名前の付いた指摘の一覧と、今のファイル)を貼り付けたら、その指摘だけを直し、ほかは変えず、`id=\"…\"` と `{#…}` をすべてそのまま残し(R-noids)、また 2 つのコードブロックで返す(R-output)。依頼に一部のスライドしかなければ、そのスライドの `<section>` だけ(`<html>` なし)とその節だけを 2 つのコードブロックで返す(エディタが id で元の場所に戻す)。\n\n## 6. 例\n\n小さな教材の例(架空。形を見るためで、中身はコピーしない)。ステップの数え方:2 項目の箇条書きはステップ 1〜2 と `[concl]`<!--part:m-flow-->、箱が 4 つの `m-flow` はステップ 1〜4<!--/part-->。いくつかのセットの指示の最後にも例がある。\n\n### 共通(英語・default テーマ・強調<!--part:m-flow-->・m-flow<!--/part-->)\n\n```deck.html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>How a web page arrives</title>\n</head>\n<body>\n<div id=\"stage\">\n\n<section class=\"slide cover noconcl static\">\n <div class=\"venue\">Computing basics, lesson 1 (a fictional course)</div>\n <h1>How a web page arrives</h1>\n</section>\n\n<section class=\"slide\">\n <h2>Two programs take part</h2>\n <div class=\"body\">\n <p>Opening a page is a conversation between two programs.</p>\n <ul>\n <li id=\"browser\">The <span class=\"term\">browser</span> asks for the page and draws it</li>\n <li id=\"server\">The <span class=\"term\">server</span> keeps the page and sends it back</li>\n </ul>\n </div>\n <div class=\"concl\"><span>Every page load is a request and a reply</span></div>\n</section><!--part:m-flow-->\n\n<section class=\"slide\">\n <h2>From the address to the screen</h2>\n <div class=\"body\">\n <m-flow style=\"height:300px\" aria-label=\"Four stages: type the address, send a request, send the page back, draw the page\">\n <script type=\"application/json\">{\"nodes\": [\n {\"id\": \"a\", \"label\": \"Type the\\naddress\", \"x\": 10, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 1},\n {\"id\": \"b\", \"label\": \"Send a\\nrequest\", \"x\": 315, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 2},\n {\"id\": \"c\", \"label\": \"Send the\\npage back\", \"x\": 620, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 3, \"tone\": \"term\"},\n {\"id\": \"d\", \"label\": \"Draw the\\npage\", \"x\": 925, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 4, \"tone\": \"emph\"}\n ], \"edges\": [\n {\"from\": \"a\", \"to\": \"b\"}, {\"from\": \"b\", \"to\": \"c\"}, {\"from\": \"c\", \"to\": \"d\"}\n ]}</script>\n </m-flow>\n </div>\n <div class=\"concl\"><span>A slow page is slow in one of these four stages</span></div>\n</section><!--/part-->\n\n</div>\n</body>\n</html>\n```\n\n```narration.md\n# Narration: How a web page arrives\n\n## How a web page arrives\n[0] Today we follow a web page on its way from a server to your screen.\n\n## Two programs take part\n[0] Opening a page is a conversation between two programs.\n[1] {mark:browser}The browser is the program you look at. It asks for the page and then draws it.\n[2] {mark:server}The server is a program on another computer. It keeps the page and sends it back when asked.\n[concl] Every page load is a request and a reply.<!--part:m-flow-->\n\n## From the address to the screen\n[0] Let us put the steps in order.\n[1] First you type the address of the page.\n[2] The browser turns it into a request and sends it to the server.\n[3] The server finds the page and sends it back.\n[4] The browser draws the page on the screen.\n[concl] When a page is slow, one of these four stages is taking the time.<!--/part-->\n```",
|
|
1182
|
-
"request": "# 頼みたいこと\n\n*(A か B
|
|
1181
|
+
"common": "# AI への指示\n\n指示のバージョン:`ac7fb486`\n\n短い **Egatari のスライドと台本**を 1 つ書いてください。ステップごとに出る HTML のスライド(`deck.html`)と台本(`narration.md`)で、どちらも自動で組まれ、品質チェックを受けます。ここにないものは使えません。スライドと台本は依頼された言語で書きます(どちらも同じ言語)。規格には **R-fit** のような名前があり、修正依頼は破った規格を名前で示します。依頼は最後の **頼みたいこと**(かその前の会話)にあります。空の項目やない項目はほどよく決め、A と B が両方残っていれば書き込みのある方に従います。\n\n**よくある失敗:**\n\n- **2 つの灰色の枠(コードブロック)はどちらも最後まで書いて閉じる。**コードブロックの途中で終わらない(R-output)。構成案がなければ、スライドは短くする(5〜8 枚)。指示に構成案とその範囲があれば、その範囲のスライドをちょうどその枚数だけ書く(エディタは 1 回に 6 枚までしか依頼しないので、収まる)\n- **1280×720 のスライドの大きさ**(品質チェックが測る。R-fit):本文の場所は 1184 × 443 px(565 px まで。`noconcl` なら 1184 × 558)。字は 32 px・1 行 46 px で、入るのは**およそ 8 行**。はみ出す 46 px ごとに 1 行を削る。**図やパーツの中もテキストはすべて 24 px 以上**\n- **グラフと図:**パーツは大きさによらずテキストを 24〜28 px で描くので、決めるのはパーツの大きさ(R-fit)\n- **その場で書く `<svg>`:**字は「表示の幅 ÷ viewBox の幅」で縮むので、viewBox を表示の画素で書く(`<svg viewBox=\"0 0 560 320\" width=\"560\" height=\"320\">`)。`font-size` は 24 以上。`width:100%` と別の幅の viewBox を組み合わせない。合うパーツがあればパーツを使う\n\n## 1. 出力の形\n\n- **R-output** 出力は**ちょうど 2 つのコードブロック**にし、この順で、名前を `deck.html` と `narration.md` にする(始まりの行は ```` ```deck.html ```` と ```` ```narration.md ````)。間には何も書かない(前後に 1 行の添え書きはよい)。1 つのファイルを複数のコードブロックに分けない。ファイル・キャンバス・添付にせず、本文に書く。ほかのファイルを参照しない(画像・`{{FIG:…}}`・`{{JSON:…}}`・外の URL・`<link>` は使わない)。コードブロックの途中で終わらない(長すぎるなら枚数を減らす。ただし構成案の範囲を頼まれたら、ちょうどその枚数)\n- **R-outline** **構成案だけ**を依頼されたら(長いものを 2 回に分けて作るとき)、`outline` という名前のコードブロック 1 つ(始まりの行は ```` ```outline ````)だけで返し、`deck.html` と `narration.md` は書かない:列が「番号」「見出し」「要点(1 行)」の Markdown の表で、スライドごとに 1 行、全スライドを順に。その後の指示は範囲を示す(「構成案の 7〜12 枚目」)ので、その見出しと要点のとおりに、ちょうどそのスライドを書く\n- **R-noids** スライドの id を**書かない**。`<section class=\"slide\">` に `id` を付けず、台本の見出しにも `{#…}` を付けない。id は取り込みでエディタが付ける。id のあるスライドを渡されたとき(修正依頼)は、今ある `id=\"…\"` と `{#…}` を変えない\n\n## 2. deck.html\n\n### 2.1 骨組み\n\n```html\n<!DOCTYPE html>\n<html lang=\"ja\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>題名</title>\n</head>\n<body>\n<div id=\"stage\">\n <section class=\"slide cover noconcl static\"> … </section>\n <section class=\"slide\"> … </section>\n</div>\n</body>\n</html>\n```\n\n- `lang`:`ja`・`en` など(スライドと台本の言語)。`data-theme`:ビジネス・ピッチは `sumi`、国語は `kokugo`、ほかは `default`\n- `<script>` はパーツのデータ(§2.6)だけ。`<style>` は配置(大きさ・間隔)だけに使い、色は書かない\n\n### 2.2 スライド\n\n- 普通のスライド:`<h2>` の見出し、`<div class=\"body\">…</div>`、`<div class=\"concl\"><span>…</span></div>`(結論の行。短い 1 文)\n- 肩見出し(見出しの上の短い言葉)を添えるなら、`<h2>` の直前に `<p class=\"kicker\">` を 1 つ置く(普通のスライドだけ。`layout-tate` には置かない)。見出しには含めず、ステップ 0 で見せる。英語はテーマが大文字で表示するので、大文字で書かない。\n- 表紙:`<section class=\"slide cover noconcl static\">` に、あれば `<div class=\"venue\">…</div>`、`<h1>題名</h1>`、あれば `<div class=\"au\">…</div>`\n- 章の扉:`<section class=\"slide sec noconcl static\"><h1>章の題</h1></section>`\n- `<section>` の class:`noconcl`(結論の行なし)、`static`(ステップなし)、`nostep`(箇条書きも初めから全部)、`layout-tate`(縦書き。kokugo のセットがあるときだけ)、属性 `data-morph`(§2.5)\n- `.body` の中:`<p class=\"sub\">` 小見出し、`<div class=\"big\">` 主要な式、`<p class=\"note\">` 補足、`<div class=\"thm\">` 定理の枠、`<div class=\"cols\">` 横並び、普通の `<p>` `<ul>` `<ol>` `<table>`\n- **R-caution** `.body` に注意は `<div class=\"caution\">…</div>`、警告は `class=\"caution warn\"`。ラベルは自動で付く。\n- 字の強調(色を付ける唯一の方法):`term`(用語・問い)、`emph`(結論・問題・目標)、`muted`(既知の結果・控えめ)、`b`(太字)\n- **R-headings** スライドの見出し(表紙と扉は `h1`、ほかは `h2`)は**すべて違う**ものにする(同じなら語を追加する)。そのスライドの台本の節は `## ` に続けて**見出しとまったく同じ文字列**で始める(`<br>` などのタグは除く)\n- **R-colors** 色はテーマだけで:上の class と式のマクロ `\\hlE` `\\hlT` `\\hlM`。16 進・`rgb()`・色の名前・`\\color`・`\\textcolor` は使わない。パーツや SVG の中では:**色はテーマの CSS 変数だけ**を使う:`var(--fg)` `var(--term)` `var(--emph)` `var(--muted)` `var(--accent2)` `var(--line)`。SVG では属性ではなく `style=\"stroke:var(--emph)\"` で書く(`DECK.el` は `fill` `stroke` に `var(` があれば自動で style に回す)\n\n### 2.3 ステップ(出す順 = 話す順)\n\n- **R-steps** ステップ 0 は現れたときの姿で、文脈だけ(見出し・小見出し・導入の 1 文)。`data-step=\"k\"`(k = 1, 2, …)の要素はステップ k で現れる。材料(箇条書きの項目・式・表の行・図の部分)は話す順に出す。式とそれを導く 1 文は同じステップ(`<div data-step=\"k\">` で一緒に囲む)。1 枚のステップの数は 5 前後まで\n- 結論の行は自動で**最後のステップ** `concl` になる(`data-step` を付けない)\n- `data-step` が 1 つもないスライドでは、上の階層の箇条書きの項目(`.body > ul > li`・`.body > ol > li`)に 1, 2, … が自動で付く。1 つでもあれば自動にならないので、出すものすべてに付ける\n- パーツは自分のステップを追加する(§3)。`data-from`(既定 1)から始まる\n- つまりステップは `0 … max` と、結論の行があれば `concl`。`static` のスライドはステップ 0 だけ\n\n### 2.4 数式(KaTeX)\n\n- **R-math** 行内は `\\( … \\)`、別行は `\\[ … \\]`。式の中の `<` は `\\lt`、`>` は `\\gt`。標準のほかに使えるマクロ:`\\hlE{…}`(emph)`\\hlT{…}`(term)`\\hlM{…}`(muted)、`\\htmlId{ID}{…}`、`\\htmlData{mark=ID}{…}`、`\\htmlClass{…}{…}`、`\\morph{ID}{…}`。`\\newcommand` と `\\color` は使わない。項の説明は `\\underbrace{…}_{\\text{…}}`・`\\overbrace{…}^{…}`。`$$` は使わない。記号は最初に使う所で定義する(`\\(\\mu\\)`:母平均)\n\n### 2.5 強調とモーフ\n\n- **R-marks** 台本の `{mark:ID}`(§4)は、**同じスライド**の目印に印を付ける。目印:スライドの中の `id=\"ID\"` か `data-mark=\"ID\"` の要素。式の一部は KaTeX の `\\htmlId{ID}{…}` / `\\htmlData{mark=ID}{…}`(build はこの 2 つと `\\htmlClass` だけを許す)。同じ ID を何枚かで使うなら `data-mark` にする(id は文書の中で一意に)\n- モーフ(なくてよい):`<section class=\"slide\" data-morph>` は前のスライドの要素を今の位置へ滑らせる。両方のスライドの要素に同じ `data-id=\"…\"`、式の一部は両方に `\\morph{ID}{…}`。ステップ 0 で見えている要素だけが動く\n\n### 2.6 パーツ\n\n- **R-components** パーツは一覧(§3)の Web Components `<m-…>` で、`.body` の中に置く。どれにも高さ(`style=\"height:380px\"`)と `aria-label` を付ける。データは子の `<script type=\"application/json\">…</script>` **1 つ**にその場で書く。**図の数字は正しく**(計算する。見た目のために値を作らない。架空の数字は架空と書く)。関数の式は算術の式だけで、コードとしては実行されない(`Math.exp(x)`・`x**2`)。動きが説明になる所だけに使う(たいていのスライドには要らない)\n\n### 2.7 表し方を選ぶ\n\n- **R-purpose** 表し方は習慣でなく、そのスライドで言いたいことから選ぶ。作者がグラフの種類を言っていればそれに従う。表は全パーツの一覧を兼ねる。使うのは渡された文章にあるパーツだけ(§3 と、入っているセット)。入っていないパーツの方が合うときは、1 行のメモでそう伝える\n\n{{PURPOSES}}\n\n- **R-whole** 箇条書き・数字のカード・円グラフは全体を一度に見せる。台本が 1 つずつ取り上げるときだけ 1 行ずつ出す(箇条書きなら全体に 1 つの `data-step` を付けるか、スライドに `nostep`)\n\n### 2.8 スライドに収める(品質チェックのエラー)\n\n- **R-title** 見出し:日本語は 26 字まで(全角 1・半角 0.5)、英語は 60 文字まで。コロンで終えない\n- **R-concl** 結論の行:日本語は 35 字まで、英語は 70 文字まで。1 行\n- **R-fit** 本文は 565 px(`noconcl` なら 680 px)より上で終える:1 枚におよそ 8 行・100 字・英語 60 語、または `big` の式 1 つと短い箇条書き 3 つ、または高さ 380 px までのパーツと短い 1 行(2 行なら 330 px まで)。入らなければスライドを分ける。字を縮めず、字の大きさを書かない\n- **R-style** 日本語のスライドは常体(だ・である、体言止め)で、です・ます を使わない。句読点はファイル全体で 1 つの組(`、。` か `,.`)。英語のスライドは短い句で\n\n## 3. パーツの一覧\n\nどのファイルでも使える標準のパーツ。§6 の後にセットの指示があれば、その種類の材料のパーツが追加される。「steps」はパーツが使うスライドのステップの数(`data-from` から。既定 1)。秒で測る属性(動きの長さ・ずれ)は載せない(既定で台本に合う)。型が json の属性は、値に JSON を書く(`values=\"[0.1,0.5]\"`)。「データの形」の `?` は省略できる欄。型を書いていない label・tex・note・tone は str、step は int、at は num。名前やラベルの `*…*` は斜体、`_` `^` は次の 1 字だけ下付き・上付き。記号のまま出すなら全角の _ ^ *。\n\n{{CATALOG}}\n\n## 4. narration.md\n\n```markdown\n# 台本:<題名>\n\n## 減衰の式\n[0] 減衰の式です。時刻ごとに残っている原子の数を考えます。\n[1] 残る数は、はじめの数に、時間とともに小さくなる指数関数を掛けたものです。\n[2] {mark:n0|circle}{N₀|エヌゼロ} は、時刻ゼロのときの、はじめの数です。\n[concl] 半分になるまでの時間は、崩壊定数だけで決まります。\n```\n\n- スライドごとに 1 つの節を、**スライドの順に、すべてのスライド(表紙も)について**:`## <スライドの見出し>`(R-headings)。`{#id}` は付けない(R-noids)\n- **R-narr-steps** ステップの指定は `[0]` `[1]` … と `[concl]`。**どのスライドのどのステップにも台本を書き**(ステップ 0 から max まで、結論の行があれば `[concl]`)、**ないステップの指定は書かない**(`static` の表紙は `[0]` だけ。結論の行がなければ `[concl]` もない。`[01]` とは書かない)。ステップの中では、そのステップで現れるものだけを話す\n- **R-dialogue** **既定は話者 1 人**で、話者名を書かない。掛け合いは依頼されたときだけ(3 人以上を依頼されても 2 役にし、最初にそう書く):行を `Expert:` か `Novice:` で始め(続きの行は字下げ。話者なしは Expert)、認知的徒弟制の形にする:\n - Novice は相づち役にせず、学習者の疑問を代弁するか、「つまり〜ということですか」と言い換える\n - Expert は答えて具体例か比喩を 1 つ追加するか、言い換えを確認して(違えば修正して)1 歩進める\n - 理解の分かれ目(誤解しやすい所、「なぜ」が残る所)にだけ、1 枚に 1 回・2〜3 発言まで。ほかは Expert 1 人\n - 「なるほど」だけの発言、前の発言のくり返しは書かない。例:`Novice: つまり、大きいほど早く着くのですか。` `Expert: いつもではありません。大きすぎると谷を飛び越えます。大股で坂を下りすぎて、向こうの斜面に足が着くように。`\n- `{note:…}` 発表者用\n- `{cue}`:ステップの中の同期点。パーツの `cues(k)` の 1 つに 1 つ(パーツの説明が求めるときだけ)\n- `{mark:ID}`・`{mark:ID|効果}`・`{mark:ID|効果|hold=秒}`・`{mark:clear}`:目印のことを言う言葉の**すぐ前**に置く。1 ステップに 1〜2 個まで。言葉でも言う。効果:`underline`(既定。手描きの下線を左から右へ)、`circle`(手描きの囲み)、`box`(角丸の枠)、`spot`(対象のまわり以外を背景色で薄くする)、`laser`(光の点が対象の下へ滑ってきて少し留まる)\n- **R-reading** `{表示|読み}` は **1 つの記号か 1 つの用語**の読み:`{θ|シータ}`、`{N₀|エヌゼロ}`、`{論語|ろんご}`。1 つの記号に星・プライム・添え字・ハットやバーが付いていてもよい(`{Q*|キュースター}`、`{θ̂|シータハット}`)。表示は普通の文字で書き、LaTeX にせず、式やいくつもの記号にしない(`{1-η|…}`・`{θとη|…}` は誤り:記号ごとに読みを付け、関係は言葉で言う)。読みは読みなしで読み違える語にだけ付ける(かなの読みは抑揚を崩しやすい)。読みは書いた所にだけ当たるので、付けた語がまた出てくるなら、出てくる所ごとに付ける\n- **R-formula** **式を読み上げない**:台本に LaTeX・`\\`・`^`・`_`・`a + b = c` のような文字列を書かない。式の意味を言葉で言う(§4 の例の [1])\n- 日本語の台本は話し言葉の です・ます。英語は話し言葉の英語。目安は 1 秒に日本語 5 字・英語 2.5 語。1 回の発言は 1〜3 文\n\n## 5. 修正依頼\n\n利用者が**修正依頼**(規格の名前の付いた指摘の一覧と、今のファイル)を貼り付けたら、その指摘だけを修正し、ほかは変えず、`id=\"…\"` と `{#…}` をすべて変えず(R-noids)、また 2 つのコードブロックで返す(R-output)。依頼に一部のスライドしかなければ、そのスライドの `<section>` だけ(`<html>` なし)とその節だけを 2 つのコードブロックで返す(エディタが id で元の場所に戻す)。\n\n## 6. 例\n\n小さな例(架空。形を見るためで、中身はコピーしない)。ステップの数え方:2 項目の箇条書きはステップ 1〜2 と `[concl]`<!--part:m-flow-->、箱が 4 つの `m-flow` はステップ 1〜4<!--/part-->。いくつかのセットの指示の最後にも例がある。\n\n### 共通(英語・default テーマ・強調<!--part:m-flow-->・m-flow<!--/part-->)\n\n```deck.html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>How a web page arrives</title>\n</head>\n<body>\n<div id=\"stage\">\n\n<section class=\"slide cover noconcl static\">\n <div class=\"venue\">Computing basics, lesson 1 (a fictional course)</div>\n <h1>How a web page arrives</h1>\n</section>\n\n<section class=\"slide\">\n <h2>Two programs take part</h2>\n <div class=\"body\">\n <p>Opening a page is a conversation between two programs.</p>\n <ul>\n <li id=\"browser\">The <span class=\"term\">browser</span> asks for the page and draws it</li>\n <li id=\"server\">The <span class=\"term\">server</span> keeps the page and sends it back</li>\n </ul>\n </div>\n <div class=\"concl\"><span>Every page load is a request and a reply</span></div>\n</section><!--part:m-flow-->\n\n<section class=\"slide\">\n <h2>From the address to the screen</h2>\n <div class=\"body\">\n <m-flow style=\"height:300px\" aria-label=\"Four stages: type the address, send a request, send the page back, draw the page\">\n <script type=\"application/json\">{\"nodes\": [\n {\"id\": \"a\", \"label\": \"Type the\\naddress\", \"x\": 10, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 1},\n {\"id\": \"b\", \"label\": \"Send a\\nrequest\", \"x\": 315, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 2},\n {\"id\": \"c\", \"label\": \"Send the\\npage back\", \"x\": 620, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 3, \"tone\": \"term\"},\n {\"id\": \"d\", \"label\": \"Draw the\\npage\", \"x\": 925, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 4, \"tone\": \"emph\"}\n ], \"edges\": [\n {\"from\": \"a\", \"to\": \"b\"}, {\"from\": \"b\", \"to\": \"c\"}, {\"from\": \"c\", \"to\": \"d\"}\n ]}</script>\n </m-flow>\n </div>\n <div class=\"concl\"><span>A slow page is slow in one of these four stages</span></div>\n</section><!--/part-->\n\n</div>\n</body>\n</html>\n```\n\n```narration.md\n# Narration: How a web page arrives\n\n## How a web page arrives\n[0] Today we follow a web page on its way from a server to your screen.\n\n## Two programs take part\n[0] Opening a page is a conversation between two programs.\n[1] {mark:browser}The browser is the program you look at. It asks for the page and then draws it.\n[2] {mark:server}The server is a program on another computer. It keeps the page and sends it back when asked.\n[concl] Every page load is a request and a reply.<!--part:m-flow-->\n\n## From the address to the screen\n[0] Let us put the steps in order.\n[1] First you type the address of the page.\n[2] The browser turns it into a request and sends it to the server.\n[3] The server finds the page and sends it back.\n[4] The browser draws the page on the screen.\n[concl] When a page is slow, one of these four stages is taking the time.<!--/part-->\n```",
|
|
1182
|
+
"request": "# 頼みたいこと\n\n*(A か B を埋め、もう一方は削除します。書かない項目は削除してかまいません)*\n\n**A. 新しく作る**\n\n- タイトル(表紙にそのまま使う):\n- 対象(だれ向け):\n- 長さ(枚数か分):\n- 言語:\n- 話者:1 人\n- そのほかの希望:\n\n**B. 渡した資料と話し合いの内容で作る**\n\nこのチャットで渡した資料と、ここまでの話し合いの内容で、スライドと台本を作ってください。\n\n- タイトル(表紙にそのまま使う):\n- 対象(だれ向け):\n- 長さ(枚数か分):\n- 言語:\n- 話者:1 人\n- そのほかの希望:",
|
|
1183
1183
|
"sets": {
|
|
1184
|
-
"stats": "## パーツのセット:stats(統計の図)\n\n
|
|
1184
|
+
"stats": "## パーツのセット:stats(統計の図)\n\nデータを見せる授業・発表向け。分布、箱ひげ図、ヒートマップ、観測が 1 つずつ加わって変わる分布を見せる。テーマは `default`。データの出どころと数(何人・何件)をスライドか台本に書き、本物らしく見えるデータを作らない(R-components)。\n\n- **軸のある図**(<!--part:m-hist-->`m-hist`・<!--/part--><!--part:m-boxplot-->`m-boxplot`・<!--/part--><!--part:m-seq-->`m-seq`・<!--/part-->など)は目盛りと軸の名前に左 86 px、上下合わせて 80 px を使うので、高さ **300〜380 px**、幅 **560 px 以上**にする(`<div class=\"cols\">` なら図の列を 55% 以上に)\n- 軸の範囲には、図の値(R-components のとおり計算したもの)がすべて入るようにする\n\nこのセットのパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
1185
1185
|
"data": "## パーツのセット:data(情報・データサイエンス)\n\n情報・データサイエンスの教材向け(情報I・データサイエンス・プログラミング)。データの出どころと数(何人・何件)をスライドか台本に書く(R-components)。<!--part:m-code-->コードは `m-code` で見せる。<!--/part-->\n\nこのセットのパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
1186
1186
|
"algo": "## パーツのセット:algo(アルゴリズム)\n\n情報や経営工学(オペレーションズ・リサーチ)の授業で、グラフの探索・最短経路・巡回路などの手順を 1 ステップずつ見せるときに使う。状態と合計は、手順を実際に実行したスクリプトの出力を書く。\n\nこのセットのパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
1187
1187
|
"ml": "## パーツのセット:ml(機械学習)\n\n機械学習の授業で、ニューラルネットの順伝播・分類の境界・損失の等高線と勾配降下法などを 1 ステップずつ見せるときに使う。重み・確率・反復の点などの値は、実際に計算したスクリプトの出力を書く。\n\nこのセットのパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
1188
1188
|
"math": "## パーツのセット:math(算数・数学)\n\n算数・数学の教材向け。筆算、数直線、テープ図、パラメータで形の変わる関数を見せる。テーマは `default`。\n\n- **軸のある図**(<!--part:m-sweep-->`m-sweep`・<!--/part--><!--part:m-curves-->`m-curves`・<!--/part-->など)は目盛りと軸の名前に左 86 px、上下合わせて 80 px を使うので、高さ **300〜380 px**、幅 **560 px 以上**にする(`<div class=\"cols\">` なら図の列を 55% 以上に)\n- 軸の範囲には、図の値(R-components のとおり計算したもの)がすべて入るようにする\n\nこのセットのパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}\n\n<!--part:m-sweep-->### 例:算数・数学(英語・default テーマ・m-sweep)\n\n(そのパーツを使うスライドだけ。`deck.html` の骨組みは §6 の例と同じ)\n\n```deck.html\n<section class=\"slide\">\n <h2>A larger λ decays faster</h2>\n <div class=\"body\">\n <div class=\"cols\" style=\"gap:24px\">\n <div style=\"flex:0 0 36%\">\n <div class=\"big\">\\[ \\frac{N(t)}{N_0}=e^{-\\lambda t} \\]</div>\n <ul class=\"nostep\"><li>Grey: the previous \\(\\lambda\\)</li></ul>\n </div>\n <m-sweep f=\"Math.exp(-c*u)\" values=\"[0.2,0.5,1.0]\" param=\"λ\" xr=\"[0,6]\" yr=\"[0,1]\" xt=\"[0,2,4,6]\" yt=\"[0,0.5,1]\"\n xl=\"*t*\" yl=\"share left\" digits=\"1\" style=\"height:380px\" aria-label=\"Share of atoms left over time for three decay constants\"></m-sweep>\n </div>\n </div>\n <div class=\"concl\"><span>Raising λ shortens the half-life</span></div>\n</section>\n```\n\n```narration.md\n## A larger λ decays faster\n[0] Let us change the decay constant and watch the share of atoms left.\n[1] Raising it from 0.2 to 0.5 makes the curve fall faster.\n[2] At 1.0 it falls faster still.\n[concl] A larger decay constant means a shorter half-life.\n```<!--/part-->\n\n<!--part:m-sweep-->ステップの数え方:値が 3 つの `m-sweep` はステップ 1〜2。<!--/part-->",
|
|
1189
|
-
"maps": "## パーツのセット:maps(地図)\n\n
|
|
1189
|
+
"maps": "## パーツのセット:maps(地図)\n\n地図を使う授業・案内向け(地理・歴史・地域の案内)。日本地図か世界地図を使う。テーマは `default`。数字(人口・面積・生産量など)には、何年の・どこの数字かをスライドか台本に書く。\n\nこのセットのパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
1190
1190
|
"kokugo": "## パーツのセット:kokugo(国語)\n\n国語(漢文・古文・現代文)の教材向け。テーマは `kokugo`。台本では、難しい語や名前に読み `{表示|読み}` を付ける(R-reading)。\n\n- **縦書きのスライド:**`<section class=\"slide layout-tate\">` でスライド全体を縦書きにする。`<h2>` は右端の縦 1 列(全角でおよそ 14 字。折り返さない)、本文は右から左へ列を重ね、結論の行は左端の縦 1 列(およそ 19 字)。本文は 2 つの列の間に収める(重なれば品質チェックが指摘する)。本文の中のパーツ・図・表は横書きのまま置かれるので、パーツの縦書きの指定を使う(<!--part:m-kobun-->`m-kobun tate`<!--/part--><!--part:m-kobun,m-gendai-->・<!--/part--><!--part:m-gendai-->`m-gendai tate`<!--/part--><!--part:m-kanbun-->。`m-kanbun` はいつも縦書き<!--/part-->)\n\nこのセットのパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}\n\n<!--part:m-kanbun-->### 例:国語(kokugo テーマ・m-kanbun)\n\n(そのパーツを使うスライドだけ。`deck.html` の骨組みは §6 の例と同じ)\n\n```deck.html\n<section class=\"slide\">\n <h2>学びて時に之を習ふ</h2>\n <div class=\"body\">\n <m-kanbun style=\"height:440px\" aria-label=\"『論語』学而篇の冒頭の白文、訓点、読む順、書き下し文\">\n 学(ビテ)而{-}時(ニ)習(フ)[レ]之(ヲ)、\n 不{=ず}[二]亦(タ)説(バシカラ)[一]乎{=や}。\n </m-kanbun>\n </div>\n <div class=\"concl\"><span>一二点は、一を読んでから二へ戻る</span></div>\n</section>\n```\n\n```narration.md\n## 学びて時に之を習ふ\n[0] 返り点も送り仮名もない、白文です。\n[1] 返り点と送り仮名を付けます。而は、読まない置き字です。\n[2] 読む順に字をたどります。一句目は、レ点で之から習へ戻ります。\n[3] 二句目は、一二点で説から不へ戻ります。\n[4] 書き下し文にすると、学びて時に之を習ふ、亦た説ばしからずや、となります。\n[concl] 一二点は、一の字を読んでから、二の字へ戻ります。\n```<!--/part-->\n\n<!--part:m-kanbun-->ステップの数え方:`m-kanbun` は訓点(ステップ 1)、読む順は句ごとに 1 ステップ、最後に書き下し文。`[n]` は句ごとに書く。<!--/part-->",
|
|
1191
1191
|
"english": "## パーツのセット:english(英語:外国語としての英語)\n\n日本語で教える英語の教材向け。英文の構造(S V O C M・句と節・何が何を修飾するか)を和訳と一緒に見せる。テーマは `default`。英文は授業で読むとおりに書き、日本語の台本は短くする。英文の例を読み上げるのは、教材に要るときだけ。\n\nこのセットのパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
1192
1192
|
"music": "## パーツのセット:music(音楽:音の高さ・音階・和音)\n\n音楽の教材向け。音の高さ・音階・音程・和音を、ピアノの鍵盤で見せる。テーマは `default`。音の名前は授業での呼び方(ドレミ・C D E・ハニホ)にそろえ、スライドと台本で同じにする。\n\nこのセットのパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
1193
1193
|
"business": "## パーツのセット:business(ビジネス)\n\nビジネスの報告・提案の資料向け(KPI・ポジショニングマップ・市場規模・お金とモノの流れ)。テーマは `sumi`。架空の数字の断り(R-components)は `note` か表紙に書き、スライドの間で数字をそろえる(内訳を足すと書いた合計になる)。\n\nこのセットのパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}\n\n<!--part:m-kpi-->### 例:ビジネス(日本語・sumi テーマ・m-kpi)\n\n(そのパーツを使うスライドだけ。`deck.html` の骨組みは §6 の例と同じ)\n\n```deck.html\n<section class=\"slide\">\n <h2>導入から 3 か月の結果</h2>\n <div class=\"body\">\n <p class=\"note muted\">新しい仕分けの手順を入れた 3 拠点の合計(数字は架空)</p>\n <m-kpi style=\"height:330px\" aria-label=\"1 日の出荷 1,240 件、誤配率 0.8%、残業 32% 減\">\n <script type=\"application/json\">{\"cards\": [\n {\"label\": \"1 日の出荷\", \"value\": 1240, \"unit\": \"件\", \"from\": 980, \"delta\": {\"dir\": \"up\", \"text\": \"導入前から 260 件\"}},\n {\"label\": \"誤配率\", \"value\": 0.8, \"digits\": 1, \"unit\": \"%\", \"from\": 2.1, \"tone\": \"emph\", \"delta\": {\"dir\": \"down\", \"text\": \"導入前は 2.1%\", \"good\": true}},\n {\"label\": \"残業時間\", \"value\": 32, \"unit\": \"%\", \"prefix\": \"−\", \"tone\": \"accent2\", \"note\": \"1 人あたり、月の平均\"}\n ]}</script>\n </m-kpi>\n </div>\n <div class=\"concl\"><span>→ 件数が増えても、誤りと残業は減った</span></div>\n</section>\n```\n\n```narration.md\n## 導入から 3 か月の結果\n[0] 新しい仕分けの手順を入れた、3 つの拠点の合計です。\n[1] 1 日の出荷は 1,240 件になり、導入前より 260 件増えました。\n[2] 誤配率は 2.1% から 0.8% に下がりました。件数が増えても、誤りは減っています。\n[3] 残業時間も、1 人あたり 32% 減っています。\n[concl] 件数が増えても、誤りと残業は減りました。\n```<!--/part-->\n\n<!--part:m-kpi-->ステップの数え方:カードが 3 枚の `m-kpi` はステップ 1〜3。<!--/part-->",
|
|
1194
|
-
"tools": "## パーツのセット:tools(ツール)\n\n
|
|
1194
|
+
"tools": "## パーツのセット:tools(ツール)\n\n授業・研修を進めるためのツール(演習やグループワークのタイマーなど)。依頼に演習の時間やワークショップがあるときだけ、その活動をするスライドに使う。\n\nこのセットのパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
1195
1195
|
"science": "## パーツのセット:science(理科)\n\n動くモデルで見せる理科の教材向け(月の満ち欠けなど)。テーマは `default`。大きさや距離が実際の比でないときは、スライドか台本でそう断る。\n\n色は R-colors のものに加えて `--lit` も使える:光と、光が照らすもの。輪郭線を付けた塗りに使う。\n\nこのセットのパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}"
|
|
1196
1196
|
},
|
|
1197
1197
|
"components": {
|
|
@@ -1468,7 +1468,7 @@ export const PACK = {
|
|
|
1468
1468
|
"briefNote": "下に説明の節がないパーツは、表の「データの形」のとおりに子の JSON か属性を書き、ほかの属性は既定のままにする。",
|
|
1469
1469
|
"extHead": "### `<{name}>`:このセットの拡張(パーツの説明は §3)"
|
|
1470
1470
|
},
|
|
1471
|
-
"version": "
|
|
1471
|
+
"version": "ac7fb486",
|
|
1472
1472
|
"tiers": {
|
|
1473
1473
|
"catalogue": "2.15.0",
|
|
1474
1474
|
"parts": {
|
package/kit/core/parts2.mjs
CHANGED
|
@@ -311,15 +311,15 @@ export function catalogueMessage(lang, a) {
|
|
|
311
311
|
const key = `"componentsCatalogue": "${a.value}"`;
|
|
312
312
|
switch (a.hint) {
|
|
313
313
|
case 'select2': return a.catalogue === '1.x'
|
|
314
|
-
? (ja ? `<${a.tag}>
|
|
315
|
-
: `<${a.tag}> is not in ${cat}, which this
|
|
314
|
+
? (ja ? `<${a.tag}> は、このファイルが使う${cat}にないパーツです(パーツライブラリ 2.x のパーツ)。egatari.json に ${key} と書いて、パーツライブラリ 2.x を選んでください`
|
|
315
|
+
: `<${a.tag}> is not in ${cat}, which this file uses; it is a parts library 2.x part. Select parts library 2.x: set ${key} in egatari.json.`)
|
|
316
316
|
: (ja ? `<${a.tag}> は、egatari.json で選んだ${cat}にないパーツです。egatari.json に ${key} と書いてください`
|
|
317
317
|
: `<${a.tag}> is not in ${cat}, which egatari.json selects. Set ${key} in egatari.json.`);
|
|
318
318
|
case 'pin': return ja
|
|
319
|
-
? `<${a.tag}> は egatari.json の components で ${a.pin}(パーツライブラリ 2.x
|
|
320
|
-
: `<${a.tag}> is pinned to ${a.pin} (a parts library 2.x version) under components in egatari.json, but this
|
|
319
|
+
? `<${a.tag}> は egatari.json の components で ${a.pin}(パーツライブラリ 2.x のバージョン)に固定されていますが、このファイルは${cat}を使います。egatari.json に ${key} と書くか、"${a.part}" の固定を解除してください`
|
|
320
|
+
: `<${a.tag}> is pinned to ${a.pin} (a parts library 2.x version) under components in egatari.json, but this file uses ${cat}. Set ${key} in egatari.json, or remove the "${a.part}" pin.`;
|
|
321
321
|
case 'select1': return ja
|
|
322
|
-
? `<${a.tag}> は、egatari.json で選んだ${cat}にないパーツです(パーツライブラリ 1.x のパーツ)。1.x を使うには egatari.json から "componentsCatalogue"
|
|
322
|
+
? `<${a.tag}> は、egatari.json で選んだ${cat}にないパーツです(パーツライブラリ 1.x のパーツ)。1.x を使うには egatari.json から "componentsCatalogue" を削除してください`
|
|
323
323
|
: `<${a.tag}> is not in ${cat}, which egatari.json selects; it is a parts library 1.x part. Remove "componentsCatalogue" from egatari.json to use parts library 1.x.`;
|
|
324
324
|
case 'library': return ja
|
|
325
325
|
? `<${a.tag}> は要素ではありません:${a.part} はほかのパーツが使うライブラリのパーツで、<${a.tag}> を定義しません。パーツの一覧にある要素を使うか、<${a.tag}> を外してください`
|
package/kit/core/portable.mjs
CHANGED
|
@@ -270,7 +270,7 @@ export function validateIndex(ix) {
|
|
|
270
270
|
if (!isObj(ix)) return ['index: not an object'];
|
|
271
271
|
// entry と article(§9C.1):少なくともどちらか(記事だけの教材は entry なし。§4「Lessons without slides」)
|
|
272
272
|
need(ix, ['format', 'version', 'profile', 'requires', 'contracts', 'player', 'generator', 'docId', 'sourceSha256', 'files', 'blobs', 'metadata'], 'index');
|
|
273
|
-
if (!own(ix, 'entry') && !own(ix, 'article')) e.push('index: missing "entry" (or "article": a
|
|
273
|
+
if (!own(ix, 'entry') && !own(ix, 'article')) e.push('index: missing "entry" (or "article": a file has slides, an article, or both)');
|
|
274
274
|
if (own(ix, 'format') && ix.format !== FID) e.push(`format: not "${FID}"`);
|
|
275
275
|
if (own(ix, 'version')) versionCheck(ix.version, 'version', e);
|
|
276
276
|
if (own(ix, 'profile') && !['core', 'extended'].includes(ix.profile)) e.push('profile: not core or extended');
|
|
@@ -817,7 +817,7 @@ function sectionTags(html) { return (html.match(/<section\b[^>]*>/gi) || []).fil
|
|
|
817
817
|
export async function exportPortable(env0, srcPath, opts = {}) {
|
|
818
818
|
const P = env0.path;
|
|
819
819
|
// 記事(§9C)のある教材は、本文の道具(env.articleTools)を持たない書き手では作り直さない(作り直すと記事が落ちる:§7.2)
|
|
820
|
-
if (isObj(opts.carry) && own(opts.carry, 'article') && typeof env0.articleTools !== 'function') fail('article-unsupported', 'the
|
|
820
|
+
if (isObj(opts.carry) && own(opts.carry, 'article') && typeof env0.articleTools !== 'function') fail('article-unsupported', 'the file has an article (§9C), which this editor does not implement: only tier A edits are possible');
|
|
821
821
|
const deckDir = P.dirname(P.resolve(srcPath));
|
|
822
822
|
const rel = (p) => P.relative(deckDir, p).split(P.sep).join('/');
|
|
823
823
|
const warnings = [], writes = dict();
|
|
@@ -1029,7 +1029,7 @@ export async function exportPortable(env0, srcPath, opts = {}) {
|
|
|
1029
1029
|
// 授業の部屋の設定(extensions.live。format spec の extensions/live.md):教材には鍵を残さない(鍵は書き出す再生専用の派生にだけ入る。kit/core/live.mjs)
|
|
1030
1030
|
if (isObj(econf.extensions) && own(econf.extensions, 'live')) {
|
|
1031
1031
|
if (!isObj(econf.extensions.live)) fail('bad-config', `${CFG}: extensions.live is not an object`);
|
|
1032
|
-
if (econf.extensions.live.v === 1 && own(econf.extensions.live, 'key')) fail('bad-config', `${CFG}: extensions.live.key must not be stored in the
|
|
1032
|
+
if (econf.extensions.live.v === 1 && own(econf.extensions.live, 'key')) fail('bad-config', `${CFG}: extensions.live.key must not be stored in the file (the key goes only into the exported play-only file); remove it`);
|
|
1033
1033
|
}
|
|
1034
1034
|
// 新しい教材として保存(§7.3):新しい docId と derivedFrom(§3.6.1)。原稿のフォルダの設定のファイルも書き換える(writes)
|
|
1035
1035
|
if (opts.identity) {
|
|
@@ -1805,12 +1805,12 @@ export async function readPortable(input, opts = {}) {
|
|
|
1805
1805
|
for (const p of paths) shas[p] = ix.blobs[ix.files[p]].sha256;
|
|
1806
1806
|
const computed = await sourceSha256(shas);
|
|
1807
1807
|
// §3.4:索引の値・計算し直した値・deck-meta の値のどれか 2 つが違えば「組んだ教材と原稿が食い違う」(段 A の編集はしない)
|
|
1808
|
-
if (computed !== ix.sourceSha256) warnings.push('the
|
|
1808
|
+
if (computed !== ix.sourceSha256) warnings.push('the built slides and their source disagree (the index sourceSha256 does not match its files): tier A edits are not allowed');
|
|
1809
1809
|
const sourceMatches = !!deckMeta && deckMeta.sourceSha256 === ix.sourceSha256 && computed === ix.sourceSha256;
|
|
1810
1810
|
if (!deckMeta) warnings.push('no deck-meta in the runtime layer');
|
|
1811
1811
|
else {
|
|
1812
1812
|
for (const e of validateDeckMeta(deckMeta, { preDraft })) warnings.push(e);
|
|
1813
|
-
if (deckMeta.sourceSha256 !== ix.sourceSha256) warnings.push('the
|
|
1813
|
+
if (deckMeta.sourceSha256 !== ix.sourceSha256) warnings.push('the built slides and their source disagree (deck-meta.sourceSha256 differs from the index): tier A edits are not allowed');
|
|
1814
1814
|
if (deckMeta.docId !== ix.docId) warnings.push('deck-meta.docId differs from the index docId');
|
|
1815
1815
|
}
|
|
1816
1816
|
// ファイルの決まり(§4.2):置き場所と中身(基準と、実行系が宣言した拡張の行き先だけ)。合わなければ知らせる(再生はできる。前の草案には決まりがない)
|
package/kit/core/purposes.mjs
CHANGED
|
@@ -177,8 +177,8 @@ export function purposesTable(P, parts, lang, src, { exclude = [], sets = null,
|
|
|
177
177
|
const head = L === 'ja' ? '| 言いたいこと | パーツ | ステップ |\n|---|---|---|' : '| purpose | parts | steps |\n|---|---|---|';
|
|
178
178
|
// 入っていない束:あることだけ(束・部品・言いたいことの名前を出さない。d5 2026-11-15。説明のない部品の属性を AI に推させない)
|
|
179
179
|
const other = elsewhere.length ? '\n\n' + (L === 'ja'
|
|
180
|
-
? `この指示に入っていないパーツもある。使わない。合いそうなら、何を見せたいかを 1
|
|
181
|
-
: `Some parts are not included in these instructions. Do not use them; if one would fit, say in a one-line note what you would show (the author can add parts when making a new
|
|
180
|
+
? `この指示に入っていないパーツもある。使わない。合いそうなら、何を見せたいかを 1 行のメモで伝える(作成者が新規作成でパーツを追加できる)`
|
|
181
|
+
: `Some parts are not included in these instructions. Do not use them; if one would fit, say in a one-line note what you would show (the author can add parts when making a new file).`) : '';
|
|
182
182
|
const url = src ? '\n\n' + (L === 'ja' ? `各パーツの説明(バージョンを固定):${src}<名前>/README.md(名前は \`m-\` を除いたもの)` : `Each part's description (pinned version): ${src}<name>/README.md (the name without \`m-\`)`) : '';
|
|
183
183
|
return head + '\n' + rows.join('\n') + other + url;
|
|
184
184
|
}
|
package/kit/core/ref-voice.mjs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// matchReference(refs, rel, bytes?) → 当たった参照音声(場所が同じか、中身のバイトが同じ)か null
|
|
10
10
|
// REFERENCE_VOICE_RULE 知らせに添える決まりの言葉(英語。画面は app/i18n.js・kit/check-messages.mjs)
|
|
11
11
|
|
|
12
|
-
export const REFERENCE_VOICE_RULE = '
|
|
12
|
+
export const REFERENCE_VOICE_RULE = 'an Egatari file does not carry the reference recording a voice was cloned from, only the narration audio made with it (Egatari §5, recipe)';
|
|
13
13
|
const DEFAULT_NAMES = Object.freeze({ expert: 'bob', novice: 'alice' });
|
|
14
14
|
const isPathForm = (v) => /[\\/]/.test(v) || /\.wav$/i.test(v);
|
|
15
15
|
const fold = (p) => p.normalize('NFC').toLowerCase();
|
package/kit/core/scorm.mjs
CHANGED
|
@@ -88,7 +88,7 @@ export function scormPackage(html) {
|
|
|
88
88
|
if (scan.byId.has(FORMAT.INDEX_ID)) fail('scorm-not-play-only', `the file still carries its editable source (${FORMAT.INDEX_ID}); package the play-only copy`);
|
|
89
89
|
if (!Array.isArray(meta.tracking) || !meta.tracking.includes('scorm12')) fail('scorm-no-tracking', 'the player in this file does not report progress through SCORM 1.2 (deck-meta.tracking has no "scorm12")');
|
|
90
90
|
if (typeof meta.docId !== 'string' || !/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(meta.docId)) fail('scorm-no-docid', 'deck-meta.docId is not a UUID');
|
|
91
|
-
const title = typeof meta.title === 'string' && meta.title.trim() ? meta.title : '
|
|
91
|
+
const title = typeof meta.title === 'string' && meta.title.trim() ? meta.title : 'Untitled';
|
|
92
92
|
const steps = stepCount(html);
|
|
93
93
|
if (suspendLength(steps) > SUSPEND_MAX) fail('scorm-too-many-steps', `${steps} steps: the resume data (cmi.suspend_data) could exceed ${SUSPEND_MAX} characters (SCORM 1.2 binding §2.2)`);
|
|
94
94
|
const manifest = scormManifest({ docId: meta.docId, title });
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// 保存先は関数で受けるので、localStorage 自体へのアクセスが断られる場合もメモリだけで使える。
|
|
3
3
|
// 音源(sounds.mjs)からは読み込まない。設定の保存は音の計算の外に置く。
|
|
4
4
|
export const MUTE_KEY = 'deck-mute-sounds';
|
|
5
|
-
export const MUTE_LABEL = Object.freeze({ ja: '
|
|
5
|
+
export const MUTE_LABEL = Object.freeze({ ja: '効果音をミュート', en: 'Mute sound effects' });
|
|
6
6
|
export function createMuteSetting(storage = () => globalThis.localStorage) {
|
|
7
7
|
let muted = false;
|
|
8
8
|
try { muted = storage()?.getItem(MUTE_KEY) === '1'; } catch { /* 保存できない端末 */ }
|