egatari 0.6.9 → 0.6.10-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +151 -116
- package/README.md +145 -116
- package/bin/egatari.mjs +10 -7
- package/components.lock.json +12 -6
- package/components2.lock.json +151 -1
- package/kit/check-messages.mjs +123 -114
- package/kit/check.mjs +12 -8
- package/kit/core/article-messages.mjs +7 -7
- package/kit/core/build-core.mjs +8 -8
- package/kit/core/check-parity.mjs +1 -1
- package/kit/core/check-source.mjs +4 -0
- package/kit/core/colab-core.mjs +1 -1
- package/kit/core/llm-fix.mjs +15 -15
- package/kit/core/llm-insert.mjs +7 -7
- package/kit/core/llm-outline.mjs +6 -6
- package/kit/core/llm-pack-data.mjs +33 -33
- package/kit/core/narration-parse.mjs +3 -3
- package/kit/core/new-deck.mjs +1 -1
- package/kit/core/predict-steps.mjs +46 -0
- package/kit/core/template-text.mjs +2 -2
- package/kit/instruction-version.json +1 -1
- package/kit/player.json +1 -1
- package/kit/player.lock.json +2 -2
- package/kit/templates/new-deck.mjs +1 -1
- package/package.json +1 -1
- package/render/only.mjs +2 -2
- package/render/render.mjs +4 -4
- package/tools/ids.mjs +7 -7
- package/vendor/components/CATALOG.md +1 -1
- package/vendor/components/sha256/19f34ad938c3513d9268fcedb947e0049380232da2293d5c00922fe32ec1a088/README.en.md +32 -0
- package/vendor/components/sha256/19f34ad938c3513d9268fcedb947e0049380232da2293d5c00922fe32ec1a088/index.js +352 -0
- package/vendor/components/sha256/1d10fec0552198e3926b3d960046606668fa7f42f562cea539c6a16cc3e83338/README.en.md +40 -0
- package/vendor/components/sha256/1d10fec0552198e3926b3d960046606668fa7f42f562cea539c6a16cc3e83338/index.js +341 -0
- package/vendor/components-2/manifest-2.6.2.json +2104 -0
|
@@ -791,21 +791,21 @@ export const PACK = {
|
|
|
791
791
|
"m-collect",
|
|
792
792
|
"m-kakijun"
|
|
793
793
|
],
|
|
794
|
-
"partsSrc": "https://github.com/egatari/components/blob/v2.6.
|
|
794
|
+
"partsSrc": "https://github.com/egatari/components/blob/v2.6.2/components/",
|
|
795
795
|
"en": {
|
|
796
|
-
"common": "# Instructions for the AI\n\nPack version: `b2ad9e7c`\n\nYou will write one short **Egatari lesson**: an HTML slide deck with step-by-step reveals (`deck.html`) and a spoken script for it (`narration.md`). Both files are built and quality-checked automatically; anything not described here is not available. Write the lesson in the language the user asks for (slides and narration in the same language). 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). When the request gives an outline and a range of its slides, write exactly the slides of that range: the editor asks for at most 6 at a time, 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 components, is at least 24 px.**\n- **Charts and figures:** components draw their labels at 24–28 px whatever their size (their SVG uses their own pixels), so size the component, not the text. A component 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 component 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. Do not output files, a canvas or attachments: write both code blocks in the body of 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 deck 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 with the columns `#`, heading and point (one line), one row per slide, every slide of the lesson 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 narration headings without `{#…}`. The editor adds ids after import. When you are given a deck 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 component 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- 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- 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 narration 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 component 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 component 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`. Define each symbol where it is first used (`\\(\\mu\\)`: the mean).\n\n### 2.5 Attention marks and morphs\n\n- **R-marks** The narration’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 Components\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). Function formulas are arithmetic expressions only (`Math.exp(x)`, `x**2`); they are never run as code. Use components 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 lists every part; use only those in the text you were given (§3, and the part sets included). 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 narration 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 component 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. Text in figures is at least 24 px.\n- **R-style** Japanese slides: plain style (だ・である, 体言止め), no です・ます on slides, one punctuation style in the whole deck (`、。` or `,.`). English slides: short phrases, sentence case.\n\n## 3. Component catalog\n\nThese standard components may be used in any lesson; a part set, when it is included after §6, adds the components of its kind of material. Generated from the component READMEs (their notes are in Japanese). “steps” is how many slide steps a component uses (from `data-from`, default 1). Timing attributes (durations and delays in seconds) 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# Narration: <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 markers `[0]`, `[1]`, … and `[concl]`. **Every step of every slide has narration** (step 0 to max, and `[concl]` if the slide has a conclusion line), and there are **no markers 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 component’s `cues(k)` (only where a component’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).\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 narration is polite spoken Japanese (です・ます); English narration 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```",
|
|
796
|
+
"common": "# Instructions for the AI\n\nPack version: `dec25cea`\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 files are built and quality-checked automatically; anything not described here is not available. Write the lesson in the language the user asks for (slides and script in the same language). 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). When the request gives an outline and a range of its slides, write exactly the slides of that range: the editor asks for at most 6 at a time, 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. Do not output files, a canvas or attachments: write both code blocks in the body of 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 with the columns `#`, heading and point (one line), one row per slide, every slide of the lesson 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- 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- 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`. 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). Function formulas are arithmetic expressions only (`Math.exp(x)`, `x**2`); they are 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 lists every part; use only those in the text you were given (§3, and the part sets included). 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. Text in figures is at least 24 px.\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\nThese standard parts may be used in any lesson; a part set, when it is included after §6, adds the parts of its kind of material. Generated from the part READMEs (their notes are in Japanese). “steps” is how many slide steps a part uses (from `data-from`, default 1). Timing attributes (durations and delays in seconds) 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).\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```",
|
|
797
797
|
"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 lesson**\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 lesson 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:",
|
|
798
798
|
"sets": {
|
|
799
|
-
"stats": "## Part set: stats (statistics charts)\n\nFor lessons 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
|
|
800
|
-
"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
|
|
801
|
-
"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\
|
|
802
|
-
"maps": "## Part set: maps\n\nFor lessons 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\
|
|
803
|
-
"kokugo": "## Part set: kokugo (Japanese language arts)\n\nFor 国語 lessons: 漢文, 古文 and 現代文. Use the `kokugo` theme. In the
|
|
804
|
-
"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
|
|
805
|
-
"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\
|
|
806
|
-
"business": "## Part set: business\n\nFor business and pitch decks: KPI cards, positioning maps, market sizes and money flows. Use the `sumi` theme. Put the fictional label of R-components in a `note` or on the cover, and keep the numbers consistent across slides (parts add up to the totals you state).\n\
|
|
807
|
-
"tools": "## Part set: tools (classroom tools)\n\nTools for running a class or workshop, such as a timer for an exercise or group work. Use them only where the request asks for one (an exercise time, a workshop), on the slide where the class does that activity.\n\
|
|
808
|
-
"science": "## Part set: science\n\nFor science lessons with models that move, such as the phases of the Moon. Use the `default` theme. Say on the slide or in the
|
|
799
|
+
"stats": "## Part set: stats (statistics charts)\n\nFor lessons 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}}",
|
|
800
|
+
"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}}",
|
|
801
|
+
"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-->",
|
|
802
|
+
"maps": "## Part set: maps\n\nFor lessons 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}}",
|
|
803
|
+
"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-->",
|
|
804
|
+
"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}}",
|
|
805
|
+
"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}}",
|
|
806
|
+
"business": "## Part set: business\n\nFor business and pitch decks: KPI cards, positioning maps, market sizes and money flows. Use the `sumi` theme. Put the fictional label of R-components in a `note` or on the cover, and keep the numbers consistent across slides (parts add up to the totals you state).\n\nParts of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}\n\n<!--part:m-kpi-->### Worked example: business (Japanese, sumi theme, m-kpi)\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>導入から 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-->Steps: `m-kpi` with 3 cards gives steps 1–3.<!--/part-->",
|
|
807
|
+
"tools": "## Part set: tools (classroom tools)\n\nTools for running a class or workshop, such as a timer for an exercise or group work. Use them only where the request asks for one (an exercise time, a workshop), on the slide where the class does that activity.\n\nParts of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
808
|
+
"science": "## Part set: science\n\nFor science lessons with models that move, such as the phases of the Moon. Use the `default` theme. Say on the slide or in the script when sizes and distances are not to scale.\n\nAlso usable as a colour, besides those of R-colors: `--lit`, light and what it lights, a fill with an outline.\n\nParts of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}"
|
|
809
809
|
},
|
|
810
810
|
"components": {
|
|
811
811
|
"m-balance": {
|
|
@@ -961,7 +961,7 @@ export const PACK = {
|
|
|
961
961
|
"m-predict": {
|
|
962
962
|
"set": "standard",
|
|
963
963
|
"row": "| `<m-predict>` | Predict, reveal; votes as bars, answer framed | 0 question, 1 bars, answer-step (2) | `{question?:str,choices:{label,tone?}[],answer:int,counts?:int[],note?}` — choices are objects {\"label\": …} (not strings); answer is the 0-based index of the right choice; counts (optional) has one whole number ≥ 0 per choice |",
|
|
964
|
-
"entry": "### `<m-predict>`\n\nData example (child `<script type=\"application/json\">`): `{\"question\":\"Which falls first?\",\"choices\":[{\"label\":\"Heavy\"},{\"label\":\"Light\"},{\"label\":\"Same\"}],\"answer\":2,\"counts\":[14,3,9],\"note\":\"No air: same\"}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `answer-step` | number | `2` |
|
|
964
|
+
"entry": "### `<m-predict>`\n\nData example (child `<script type=\"application/json\">`): `{\"question\":\"Which falls first?\",\"choices\":[{\"label\":\"Heavy\"},{\"label\":\"Light\"},{\"label\":\"Same\"}],\"answer\":2,\"counts\":[14,3,9],\"note\":\"No air: same\"}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `answer-step` | number | `2` | 2 or more (default 2); after the step-1 count |\n| `unit` | string | `\"\"` | count unit |\n| `poll` | string | `\"\"` | poll id (no live counts yet) |\n| `ticks` | bool | `true` | grid |\n\n- 2–6 choices. Video/print/start show `counts` (or 0)\n- Script uses `counts`; vote at `{note:hands up}` (parens get read)\n- `poll=\"p1\"`: reserved; no live reveals yet (`ctx.live.poll(id)` is null), so viewer/author counts are used"
|
|
965
965
|
},
|
|
966
966
|
"m-quad": {
|
|
967
967
|
"set": "standard",
|
|
@@ -1026,25 +1026,25 @@ export const PACK = {
|
|
|
1026
1026
|
"entry": "### `<m-venn>`\n\nData example (child `<script type=\"application/json\">`): `{\"sets\":[{\"label\":\"Mammals\"},{\"label\":\"Sea animals\"}],\"regions\":{\"A\":[\"Lion\"],\"B\":[\"Tuna\"],\"AB\":[\"Whale\",\"Dolphin\"]}}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `size` | number | `26` | item text px (shrinks to 24) |\n| `spread` | number | `1` | centre distance ÷ radius (0.7–1.3) |\n| `overlaps` | string | `\"together\"` | together or each |\n\n<!--part:m-compare-->Shared and distinct traits. Per-point values: `m-compare`.<!--/part-->\n\n- `sets`: 2 or 3; `label` outside; `tone` (`term`, `emph`, `muted`, `accent2`, `series-1..4`; default `term`, `accent2`, `series-4`). Avoid `emph` (used for overlaps)\n- `regions`: items per region (array or `\\n` text). Keys: letters in alphabetical order, A B C = `sets` order:\n - `A`: only A; `AB`: A and B (with 3 sets, not C); `ABC`: all three\n - 2 sets: `A` `B` `AB`; 3: `A` `B` `C` `AB` `AC` `BC` `ABC`; all optional. C keys with 2 sets: error card\n- Area not to scale. `spread` (default 1): smaller = more overlap\n- Overlap items bold; 1–2 words with 3 sets\n- Steps: each set with its own items → overlaps (those with items tinted `--emph`, outlined, items shown; if none have items, all). `overlaps=\"each\"`: one by one (`AB`, `AC`, `BC`, `ABC`)\n- `variant`: `fade` (default), `draw` (outlines first)"
|
|
1027
1027
|
}
|
|
1028
1028
|
},
|
|
1029
|
-
"tableHead": "|
|
|
1029
|
+
"tableHead": "| part | what it shows | steps | data shape |\n|---|---|---|---|",
|
|
1030
1030
|
"supNote": "(* = description added by this guide)",
|
|
1031
|
-
"briefNote": "For a
|
|
1032
|
-
"extHead": "### `<{name}>`: extension for this part set (the
|
|
1031
|
+
"briefNote": "For a part without a section below, write the child JSON or attributes as its “data shape” column says and leave the other attributes at their defaults.",
|
|
1032
|
+
"extHead": "### `<{name}>`: extension for this part set (the part is described in §3)"
|
|
1033
1033
|
},
|
|
1034
1034
|
"ja": {
|
|
1035
|
-
"common": "# AI への指示\n\n指示の版:`b2ad9e7c`\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- 表紙:`<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- 字の強調(色を付ける唯一の方法):`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` は使わない。記号は最初に使う所で定義する(`\\(\\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 まで)。入らなければスライドを分ける。字を縮めず、字の大きさを書かない。図の中の字は 24 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```",
|
|
1035
|
+
"common": "# AI への指示\n\n指示の版:`dec25cea`\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- 表紙:`<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- 字の強調(色を付ける唯一の方法):`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` は使わない。記号は最初に使う所で定義する(`\\(\\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 まで)。入らなければスライドを分ける。字を縮めず、字の大きさを書かない。図の中の字は 24 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```",
|
|
1036
1036
|
"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- そのほかの希望:",
|
|
1037
1037
|
"sets": {
|
|
1038
|
-
"stats": "##
|
|
1039
|
-
"data": "##
|
|
1040
|
-
"math": "##
|
|
1041
|
-
"maps": "##
|
|
1042
|
-
"kokugo": "##
|
|
1043
|
-
"english": "##
|
|
1044
|
-
"music": "##
|
|
1045
|
-
"business": "##
|
|
1046
|
-
"tools": "##
|
|
1047
|
-
"science": "##
|
|
1038
|
+
"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}}",
|
|
1039
|
+
"data": "## パーツの束:data(情報・データサイエンス)\n\n情報・データサイエンスの教材向け(情報I・データサイエンス・プログラミング)。データの出どころと数(何人・何件)をスライドか台本に書く(R-components)。<!--part:m-code-->コードは `m-code` で見せる。<!--/part-->\n\nこの束のパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
1040
|
+
"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-->",
|
|
1041
|
+
"maps": "## パーツの束:maps(地図)\n\n地図を使う教材・案内向け(地理・歴史・地域の案内)。日本地図か世界地図を使う。テーマは `default`。数字(人口・面積・生産量など)には、何年の・どこの数字かをスライドか台本に書く。\n\nこの束のパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
1042
|
+
"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-->",
|
|
1043
|
+
"english": "## パーツの束:english(英語:外国語としての英語)\n\n日本語で教える英語の教材向け。英文の構造(S V O C M・句と節・何が何を修飾するか)を和訳と一緒に見せる。テーマは `default`。英文は授業で読むとおりに書き、日本語の台本は短くする。英文の例を読み上げるのは、教材に要るときだけ。\n\nこの束のパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
1044
|
+
"music": "## パーツの束:music(音楽:音の高さ・音階・和音)\n\n音楽の教材向け。音の高さ・音階・音程・和音を、ピアノの鍵盤で見せる。テーマは `default`。音の名前は授業での呼び方(ドレミ・C D E・ハニホ)にそろえ、スライドと台本で同じにする。\n\nこの束のパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
1045
|
+
"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-->",
|
|
1046
|
+
"tools": "## パーツの束:tools(道具)\n\n授業・研修を進めるための道具(演習やグループワークのタイマーなど)。頼みに演習の時間やワークショップがあるときだけ、その活動をするスライドに使う。\n\nこの束のパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
1047
|
+
"science": "## パーツの束:science(理科)\n\n動くモデルで見せる理科の教材向け(月の満ち欠けなど)。テーマは `default`。大きさや距離が実際の比でないときは、スライドか台本でそう断る。\n\n色は R-colors のものに加えて `--lit` も使える:光と、光が照らすもの。輪郭線を付けた塗りに使う。\n\nこの束のパーツ(§3 のパーツに加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}"
|
|
1048
1048
|
},
|
|
1049
1049
|
"components": {
|
|
1050
1050
|
"m-balance": {
|
|
@@ -1201,7 +1201,7 @@ export const PACK = {
|
|
|
1201
1201
|
"m-predict": {
|
|
1202
1202
|
"set": "standard",
|
|
1203
1203
|
"row": "| `<m-predict>` | 予想してから答えを開く。選択肢ごとの人数を棒で見せ、答えの段階で正解に枠 | 0 問いと選択肢、1 人数の棒、answer-step(既定 2)で答え | `{question?:str,choices:{label,tone?}[],answer:int,counts?:int[],note?}` — choices は {\"label\": …} の並び(字の並びではない)。answer は正しい選択肢の番号(0 から数える)。counts(省略可)は選択肢ごとに 0 以上の整数を 1 つずつ |",
|
|
1204
|
-
"entry": "### `<m-predict>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"question\":\"重い球と軽い球、どちらが先に落ちる?\",\"choices\":[{\"label\":\"重い球\"},{\"label\":\"軽い球\"},{\"label\":\"同時\"}],\"answer\":2,\"counts\":[14,3,9],\"note\":\"空気の抵抗を除けば同時に落ちる\"}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `answer-step` | number | `2` |
|
|
1204
|
+
"entry": "### `<m-predict>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"question\":\"重い球と軽い球、どちらが先に落ちる?\",\"choices\":[{\"label\":\"重い球\"},{\"label\":\"軽い球\"},{\"label\":\"同時\"}],\"answer\":2,\"counts\":[14,3,9],\"note\":\"空気の抵抗を除けば同時に落ちる\"}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `answer-step` | number | `2` | 2 以上(既定 2)。人数を数えるステップ 1 のあとに答えを開く |\n| `unit` | string | `\"\"` | 数の単位(人 など) |\n| `poll` | string | `\"\"` | 投票の id(今は見る人・作者の数を使う) |\n| `ticks` | bool | `true` | 数の軸の目盛りと格子 |\n\n「A だと思う人〜」と手を挙げてもらい、先生が −1・+1 で数える(数を打ち込んでもよい)。一人で自習する学習者は、選択肢を押すと自分の予想になる。\n\n- 選択肢は 2〜6。動画・印刷・最初の表示は `counts`(無ければ 0)。同じスライドにいるあいだは数が残る(答えの段階でも、戻っても)\n- 口述原稿は `counts` の数で書き、数える所は `{note:ここで手を挙げてもらう}` と書く(丸かっこは読み上げられる)\n- `poll=\"p1\"`:v0.6.3 は結果公開の送信元がなく、`ctx.live.poll(id)` は null。見る人・作者の数を使う"
|
|
1205
1205
|
},
|
|
1206
1206
|
"m-quad": {
|
|
1207
1207
|
"set": "standard",
|
|
@@ -1267,14 +1267,14 @@ export const PACK = {
|
|
|
1267
1267
|
"entry": "### `<m-venn>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"sets\":[{\"label\":\"哺乳類\"},{\"label\":\"海の生き物\"}],\"regions\":{\"A\":[\"ライオン\"],\"B\":[\"マグロ\"],\"AB\":[\"クジラ\",\"イルカ\"]}}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `size` | number | `26` | 項目の字の大きさ(px)。収まらなければ 24 まで縮める |\n| `spread` | number | `1` | 円の中心の間の距離 ÷ 半径(小さいほど重なりが広い。0.7〜1.3) |\n| `overlaps` | string | `\"together\"` | together(重なりを 1 段階でまとめて)か each(1 つずつ) |\n\n2 つか 3 つのものの共通点と違い(哺乳類と海の生き物、3 つのスキルの重なり など)を、重なりで見せるときに使う。\n<!--part:m-compare-->観点ごとに値を並べて比べるなら `m-compare`。<!--/part-->\n\n- `sets`:集合(2 つか 3 つ)。`label` は円の外に書く名前、`tone` は円の色(`term`・`emph`・`muted`・`accent2`・`series-1..4`。既定は `term`・`accent2`・`series-4` の順)。`--emph` は重なりを強めるのに使うので、集合には使わないほうがよい\n- `regions`:領域ごとの項目(1 つ 1 行の配列か、`\\n` で改行した字)。鍵は集合の文字の組で、アルファベット順に書く。文字は `sets` の順(`sets` の 1 つ目が A・2 つ目 B・3 つ目 C):\n - `A`:A だけ(ほかの集合には入らない)、`AB`:A と B の両方(3 つのときは、A と B に入り C には入らないところ)、`ABC`:3 つとも\n - 2 つなら `A` `B` `AB`、3 つなら `A` `B` `C` `AB` `AC` `BC` `ABC`。どれも省いてよい。集合が 2 つのときに C を含む鍵(`C` `AC` `BC` `ABC`)を書くと、図の代わりに誤りの札が出る\n- 円は左右対称の決まった配置で、面積は値に比例しない(2 つは左右、3 つは左上・右上・下)。`spread`(既定 1)は円の中心の間の距離 ÷ 半径で、小さいほど重なりが広い\n- 項目は、その領域の中で円の線から最も離れる位置に置く。字は `size`(既定 26 px)から 24 px まで縮める。重なりの項目は太字\n- 段階:既定は 集合を 1 つずつ(その集合だけの項目と一緒に)→ 重なり(項目のある重なりを `--emph` で薄く塗って縁を囲み、項目を出す。項目のある重なりがなければ重なりすべて)。`overlaps=\"each\"` なら重なりを 1 つずつ(`AB`・`AC`・`BC`・`ABC` の順)\n- 見せ方(`variant`):`fade`・`draw`。書かなければ資料のシード値で選ばれる(書かなくてよい)"
|
|
1268
1268
|
}
|
|
1269
1269
|
},
|
|
1270
|
-
"tableHead": "|
|
|
1270
|
+
"tableHead": "| パーツ | 内容 | steps | データの形 |\n|---|---|---|---|",
|
|
1271
1271
|
"supNote": "(* はこの指示が補った説明)",
|
|
1272
|
-
"briefNote": "
|
|
1273
|
-
"extHead": "### `<{name}
|
|
1272
|
+
"briefNote": "下に説明の節がないパーツは、表の「データの形」のとおりに子の JSON か属性を書き、ほかの属性は既定のままにする。",
|
|
1273
|
+
"extHead": "### `<{name}>`:この束の拡張(パーツの説明は §3)"
|
|
1274
1274
|
},
|
|
1275
|
-
"version": "
|
|
1275
|
+
"version": "dec25cea",
|
|
1276
1276
|
"tiers": {
|
|
1277
|
-
"catalogue": "2.6.
|
|
1277
|
+
"catalogue": "2.6.2",
|
|
1278
1278
|
"parts": {
|
|
1279
1279
|
"m-balance": {
|
|
1280
1280
|
"tier": "specialized",
|
|
@@ -152,7 +152,7 @@ export function parseNarration(text) {
|
|
|
152
152
|
if (/^#\s/.test(ln)) return;
|
|
153
153
|
const m = ln.match(/^\s*\[(\d+|concl)\]\s*(.*)$/);
|
|
154
154
|
if (m && slideKey !== null && !isStepKey(m[1])) {
|
|
155
|
-
warnings.push(`narration.md ${idx + 1} 行目:
|
|
155
|
+
warnings.push(`narration.md ${idx + 1} 行目: ステップの指定「[${m[1]}]」は使えない(使えるステップの指定は [0]・[1]…・[concl]。番号は 0〜999 で、先頭に 0 を付けない)。このステップは読まない`);
|
|
156
156
|
cur = null; turn = null; return;
|
|
157
157
|
}
|
|
158
158
|
if (m && slideKey !== null) {
|
|
@@ -165,7 +165,7 @@ export function parseNarration(text) {
|
|
|
165
165
|
const x = parseExtLine(ln);
|
|
166
166
|
if (x) {
|
|
167
167
|
if (cur) { cur.ext.push({ ...x, line: idx + 1 }); cur.end = idx + 1; }
|
|
168
|
-
else if (slideKey !== null) warnings.push(`narration.md ${idx + 1} 行目:
|
|
168
|
+
else if (slideKey !== null) warnings.push(`narration.md ${idx + 1} 行目: 拡張の行がステップ([k])の外にある(使わない)`);
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
171
|
if (cur && ln.trim()) { addLine(ln.trim()); cur.end = idx + 1; } // 空行は飛ばす(同じ段階の続き)
|
|
@@ -184,7 +184,7 @@ export function parseNarration(text) {
|
|
|
184
184
|
const last = new Map();
|
|
185
185
|
out.forEach((seg, j) => {
|
|
186
186
|
const key = `${seg.slideKey}:${seg.stepKey}`;
|
|
187
|
-
if (last.has(key)) warnings.push(`narration.md ${seg.line} 行目:
|
|
187
|
+
if (last.has(key)) warnings.push(`narration.md ${seg.line} 行目: ステップ「${key}」が重複(${out[last.get(key)].line} 行目を上書き)`);
|
|
188
188
|
last.set(key, j);
|
|
189
189
|
});
|
|
190
190
|
const uniq = out.filter((seg, j) => last.get(`${seg.slideKey}:${seg.stepKey}`) === j);
|
package/kit/core/new-deck.mjs
CHANGED
|
@@ -41,7 +41,7 @@ export const CATEGORIES = [
|
|
|
41
41
|
{ id: 'teaching', label: { ja: '授業・研修', en: 'Teaching' }, subs: [
|
|
42
42
|
{ id: 'class', label: { ja: '授業(小・中・高)', en: 'School lesson' },
|
|
43
43
|
structure: { ja: '導入(注意を引く・目標・前の学習の想起)→ 展開 → まとめ', en: 'introduction (gain attention, state the goal, recall prior learning) → development → summary' },
|
|
44
|
-
show: { ja: '1 画面に 1
|
|
44
|
+
show: { ja: '1 画面に 1 つのこと。ステップで 1 つずつ見せる。文字は台本に任せ、飾らない。国語は縦書き、隠して音読', en: 'one thing per screen; reveal step by step; leave the words to the narration; no decoration; Japanese language arts in vertical text, hidden for reading aloud' } },
|
|
45
45
|
{ id: 'lecture', label: { ja: '大学の講義', en: 'University lecture' },
|
|
46
46
|
structure: { ja: '導入 → 展開 → まとめ。式と図を積み上げる', en: 'introduction → development → summary, building up equations and figures' },
|
|
47
47
|
show: { ja: '見出しは主張の文にして図で示す。ステップで積み上げ、前のステップは残す', en: 'headings state the claim and a figure shows it; build up step by step and keep earlier steps on screen' } },
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// 予想のパーツ(m-predict)の段階を原稿(deck.html)から読む。品質チェックのコマンド版(kit/check.mjs)と編集アプリ(kit/core/check-source.mjs)が
|
|
2
|
+
// 同じ関数で predictAnswerWithCount・predictAnswerNeverShown(どちらも警告、R-steps)を出す。Node にもブラウザにも依存しない
|
|
3
|
+
// m-predict(vendor/components の predict 1.7.0〜2.0.3。どの版も同じ):段階 0 = 問いと選択肢、段階 1 = 数の棒と −1・+1 の操作(k >= 1 で出る)、
|
|
4
|
+
// answer-step(既定 2)= 答え(✓ 正解・枠・note)。読み方は get aStep(){ return Math.max(1, Math.round(this.props["answer-step"]) || 2); }、
|
|
5
|
+
// 属性は base の props で +a(数でない字・空は NaN か 0 → 既定の 2)。答えの段階が数の棒の段階(1)なら、数える前に答えが見える
|
|
6
|
+
// steps:get steps(){ return this.getAttribute("steps") !== null ? +this.getAttribute("steps") : this.aStep; }。プレーヤーはパーツの段階を
|
|
7
|
+
// steps までで止める(kit/deck.js の compPos:k = min(c.steps, …))ので、steps が答えの段階より小さいと答えが出ない。
|
|
8
|
+
// steps が数でない(NaN・Infinity)ときはプレーヤーがパーツのエラー(compData)にするので、ここでは見ない
|
|
9
|
+
// predictAnswerStep(raw) 属性の値(ないなら null)→ パーツが答えを開く段階
|
|
10
|
+
// predictStepProblems(src) → [{code, slide(0 からのスライドの番号か null), line, value(answer-step の字か null), step(答えの段階), steps(steps の字か null), count}]
|
|
11
|
+
// code 'predictAnswerNeverShown':steps < 答えの段階(答えが出ない。これがあれば predictAnswerWithCount は出さない:答えが出ないので「同時に出る」は当たらない)
|
|
12
|
+
// code 'predictAnswerWithCount' :答えの段階 ≤ 数の棒の段階(1)
|
|
13
|
+
import { parse } from 'parse5';
|
|
14
|
+
|
|
15
|
+
// m-predict が数の棒と数える操作を出す段階
|
|
16
|
+
export const PREDICT_COUNT_STEP = 1;
|
|
17
|
+
|
|
18
|
+
export function predictAnswerStep(raw) {
|
|
19
|
+
if (raw === null || raw === undefined) return 2;
|
|
20
|
+
return Math.max(1, Math.round(+raw) || 2);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const hasClass = (n, c) => (n.attrs || []).some((a) => a.name === 'class' && a.value.split(/\s+/).includes(c));
|
|
24
|
+
|
|
25
|
+
export function predictStepProblems(src) {
|
|
26
|
+
const text = String(src);
|
|
27
|
+
const doc = parse(text, { sourceCodeLocationInfo: true });
|
|
28
|
+
const lineOf = (off) => text.slice(0, off).split('\n').length;
|
|
29
|
+
const out = [];
|
|
30
|
+
let slides = 0;
|
|
31
|
+
const get = (n, name) => { const a = (n.attrs || []).find((x) => x.name === name); return a ? a.value : null; };
|
|
32
|
+
// スライドの番号は kit/core/build-core.mjs の analyzeSlideIds と同じ数え方(section.slide を出てくる順に。<template> の中も)
|
|
33
|
+
const walk = (n, slide) => {
|
|
34
|
+
if (n.tagName === 'section' && hasClass(n, 'slide')) slide = slides++;
|
|
35
|
+
if (n.tagName === 'm-predict') {
|
|
36
|
+
const value = get(n, 'answer-step'), steps = get(n, 'steps'), step = predictAnswerStep(value), ns = steps === null ? step : +steps;
|
|
37
|
+
const base = { slide, line: n.sourceCodeLocation ? lineOf(n.sourceCodeLocation.startOffset) : null, value, step, steps, count: PREDICT_COUNT_STEP };
|
|
38
|
+
if (Number.isFinite(ns) && ns < step) out.push({ code: 'predictAnswerNeverShown', ...base });
|
|
39
|
+
else if (step <= PREDICT_COUNT_STEP) out.push({ code: 'predictAnswerWithCount', ...base });
|
|
40
|
+
}
|
|
41
|
+
for (const c of n.childNodes || []) walk(c, slide);
|
|
42
|
+
if (n.content) walk(n.content, slide);
|
|
43
|
+
};
|
|
44
|
+
walk(doc, null);
|
|
45
|
+
return out;
|
|
46
|
+
}
|
|
@@ -84,7 +84,7 @@ export function draftLeftovers(deck, narration) {
|
|
|
84
84
|
// コマンド(kit/build.mjs の --portable / --play-only)が出す行(英語と日本語の両方)。編集アプリは app/i18n.js の言葉で出す
|
|
85
85
|
export function leftoverLines(left) {
|
|
86
86
|
const out = [];
|
|
87
|
-
for (const s of left.slides) out.push(`slide ${s.index + 1} (${s.key}): template text left /
|
|
88
|
-
for (const p of left.steps) out.push(`narration.md line ${p.line} (${p.slideKey}:${p.stepKey}): template placeholder (✎) left /
|
|
87
|
+
for (const s of left.slides) out.push(`slide ${s.index + 1} (${s.key}): template text left / テンプレートの字のまま: ${s.texts.map((x) => `“${x}”`).join(', ')}`);
|
|
88
|
+
for (const p of left.steps) out.push(`narration.md line ${p.line} (${p.slideKey}:${p.stepKey}): template placeholder (✎) left / 仮の台本のまま: “${p.text}”`);
|
|
89
89
|
return out;
|
|
90
90
|
}
|
package/kit/player.json
CHANGED
package/kit/player.lock.json
CHANGED
|
@@ -161,7 +161,7 @@ ${T.s4.li.map((l, i) => ` <li data-step="${i + 1}">${l}</li>`).join('\n')}
|
|
|
161
161
|
`;
|
|
162
162
|
|
|
163
163
|
const turns = (n, c) => n.map((t, i) => `[${i}] ${t}`).join('\n') + (c ? `\n[concl] ${c}` : '');
|
|
164
|
-
const narration = `# ${EN ? '
|
|
164
|
+
const narration = `# ${EN ? 'Script' : '台本'}: ${title}
|
|
165
165
|
|
|
166
166
|
${headingLine({ key: ID[0], id: ID[0], heading: title })}
|
|
167
167
|
[0] ${T.cover}
|
package/package.json
CHANGED
package/render/only.mjs
CHANGED
|
@@ -15,7 +15,7 @@ export function resolveOnly(tokens, tl, ids = []) {
|
|
|
15
15
|
|
|
16
16
|
export function unknownOnlyMessage(unknown, valid, max = 8) {
|
|
17
17
|
const shown = valid.slice(0, max).join(', ') + (valid.length > max ? `, …(ほか ${valid.length - max} 枚 / ${valid.length - max} more)` : '');
|
|
18
|
-
return `--only
|
|
19
|
-
+ `
|
|
18
|
+
return `--only に当たるスライド・ステップがない / --only matches no slide or step: ${unknown.join(', ')}\n`
|
|
19
|
+
+ ` 使えるのはスライドの id か見出しから決めた名前(そのスライドの全ステップ)、または スライドの id:ステップ / valid: a slide id or the name made from its heading (all its steps), or slide id:step\n`
|
|
20
20
|
+ ` スライド / slides: ${shown}`;
|
|
21
21
|
}
|