egatari 0.6.6 → 0.6.7

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.
Files changed (82) hide show
  1. package/CHANGELOG.md +92 -1
  2. package/NOTICE +6 -0
  3. package/README.ja.md +3 -3
  4. package/README.md +3 -3
  5. package/bin/egatari.mjs +2 -2
  6. package/components.lock.json +33 -15
  7. package/components2.lock.json +409 -1
  8. package/kit/build.mjs +28 -4
  9. package/kit/check-messages.mjs +14 -0
  10. package/kit/check.mjs +21 -0
  11. package/kit/core/build-core.mjs +84 -19
  12. package/kit/core/colab-core.mjs +3 -1
  13. package/kit/core/fill-measure.mjs +79 -0
  14. package/kit/core/font-coverage.mjs +52 -0
  15. package/kit/core/font-subset-core.mjs +101 -0
  16. package/kit/core/llm-fix.mjs +3 -2
  17. package/kit/core/llm-pack-data.mjs +39 -41
  18. package/kit/core/parts2.mjs +34 -0
  19. package/kit/core/portable.mjs +30 -2
  20. package/kit/core/scorm.mjs +109 -0
  21. package/kit/core/tier-a.mjs +72 -26
  22. package/kit/core/zip-write.mjs +57 -0
  23. package/kit/deck.js +118 -29
  24. package/kit/fill-scan.mjs +95 -0
  25. package/kit/font-subset.mjs +33 -0
  26. package/kit/instruction-version.json +1 -1
  27. package/kit/live.js +3 -1
  28. package/kit/llm-pack.mjs +15 -14
  29. package/kit/panes.js +26 -14
  30. package/kit/player.json +1 -1
  31. package/kit/player.lock.json +2 -2
  32. package/kit/tools.js +20 -23
  33. package/kit/track.js +11 -5
  34. package/package.json +4 -2
  35. package/render/audio-track.mjs +112 -0
  36. package/render/render.mjs +99 -51
  37. package/tools/video.mjs +17 -9
  38. package/vendor/components/CATALOG.md +2 -2
  39. package/vendor/components/sha256/0787c5bbf2e61801398aeefc39a3674b1fc0e556173c450b85cafa4201cb44a6/README.en.md +40 -0
  40. package/vendor/components/sha256/0787c5bbf2e61801398aeefc39a3674b1fc0e556173c450b85cafa4201cb44a6/index.js +348 -0
  41. package/vendor/components/sha256/0cab77d128c5f304c2d2ba32841b0bc5adc54b4e72f6681e0a0dda68c96b5d7e/README.en.md +32 -0
  42. package/vendor/components/sha256/0cab77d128c5f304c2d2ba32841b0bc5adc54b4e72f6681e0a0dda68c96b5d7e/index.js +222 -0
  43. package/vendor/components/sha256/25eab59287c5c52f9d2f8a7cee3d61ed513cc1c9ca846bba96b45cd59b39f822/README.en.md +42 -0
  44. package/vendor/components/sha256/25eab59287c5c52f9d2f8a7cee3d61ed513cc1c9ca846bba96b45cd59b39f822/index.js +481 -0
  45. package/vendor/components/sha256/28238c4fa50a377b96ce8a130ce5bdbf7bfc0536ed9c331499ea22377c43adb6/README.en.md +39 -0
  46. package/vendor/components/sha256/28238c4fa50a377b96ce8a130ce5bdbf7bfc0536ed9c331499ea22377c43adb6/index.js +323 -0
  47. package/vendor/components/sha256/2f1c797ecd028d04ce12b3d55d8ef9d5a4180d564aa99afb492d0bfc9cd39c94/README.en.md +42 -0
  48. package/vendor/components/sha256/2f1c797ecd028d04ce12b3d55d8ef9d5a4180d564aa99afb492d0bfc9cd39c94/index.js +267 -0
  49. package/vendor/components/sha256/389ab61c0dafed88074c0c459ed40b6738bec05ebf6e4566bba1394405f2392e/README.en.md +52 -0
  50. package/vendor/components/sha256/389ab61c0dafed88074c0c459ed40b6738bec05ebf6e4566bba1394405f2392e/index.js +219 -0
  51. package/vendor/components/sha256/3df7d0ec0c3ed4a6b06fbe3befec78b65a2202e5571580d8b28700a14b7b4321/README.en.md +66 -0
  52. package/vendor/components/sha256/3df7d0ec0c3ed4a6b06fbe3befec78b65a2202e5571580d8b28700a14b7b4321/index.js +920 -0
  53. package/vendor/components/sha256/40571cbc11cd649c447da73ede0f89937da344b05d4386abeb4afeecedfe7d3e/README.en.md +32 -0
  54. package/vendor/components/sha256/40571cbc11cd649c447da73ede0f89937da344b05d4386abeb4afeecedfe7d3e/index.js +352 -0
  55. package/vendor/components/sha256/4dd7e6a02f4128e90d4e2a86cccd9bf267a02cebcff1cdf36e0aaff8848af66e/README.en.md +31 -0
  56. package/vendor/components/sha256/4dd7e6a02f4128e90d4e2a86cccd9bf267a02cebcff1cdf36e0aaff8848af66e/index.js +232 -0
  57. package/vendor/components/sha256/520606a746b0d38fdc1aa380e665a1b95eead2487b11f389d2ebac4abe8f07cb/README.en.md +48 -0
  58. package/vendor/components/sha256/520606a746b0d38fdc1aa380e665a1b95eead2487b11f389d2ebac4abe8f07cb/index.js +384 -0
  59. package/vendor/components/sha256/554ed56e1ec963627be86ba1f573099ff57cf4cb22e8e10ce00e2128e30d39e2/README.en.md +42 -0
  60. package/vendor/components/sha256/554ed56e1ec963627be86ba1f573099ff57cf4cb22e8e10ce00e2128e30d39e2/index.js +481 -0
  61. package/vendor/components/sha256/782ae2154247b00451fc30aa140bf386d3a7a56ac4ad9ee04916f4bd1d29dda0/README.en.md +37 -0
  62. package/vendor/components/sha256/782ae2154247b00451fc30aa140bf386d3a7a56ac4ad9ee04916f4bd1d29dda0/index.js +424 -0
  63. package/vendor/components/sha256/808f748e76833742bb12a80482b37cb3dedaf3dcd592ee477d611cb40e95b094/README.en.md +44 -0
  64. package/vendor/components/sha256/808f748e76833742bb12a80482b37cb3dedaf3dcd592ee477d611cb40e95b094/index.js +304 -0
  65. package/vendor/components/sha256/8c3d7e9921f249cf45ce26d5a449f2b01fef683f500afed69d0b189312c4464e/index.js +904 -0
  66. package/vendor/components/sha256/96ad8eaf0ea7c23a31b72657964f23a02165765845991cafc41ee2835b97e40f/README.en.md +42 -0
  67. package/vendor/components/sha256/96ad8eaf0ea7c23a31b72657964f23a02165765845991cafc41ee2835b97e40f/index.js +170 -0
  68. package/vendor/components/sha256/b86c0e95622ff3be5fb0b208672ebca5018c34fd192e1b431cfd0fe912df2a7f/index.js +916 -0
  69. package/vendor/components/sha256/bec04685638f8fc1217c380d361fd9a425ffeade0291a4f2b2d4e41a5628e0ef/index.js +809 -0
  70. package/vendor/components/sha256/c3d3d56101f430f3468a8f281055c3ea5093fc5c77a35f14fabeb85ad363e209/README.en.md +37 -0
  71. package/vendor/components/sha256/c3d3d56101f430f3468a8f281055c3ea5093fc5c77a35f14fabeb85ad363e209/index.js +424 -0
  72. package/vendor/components/sha256/e1a0240f83e1925ee59ef2752662e2b0ec27f69251c012f8bab682aadcd8695f/README.en.md +34 -0
  73. package/vendor/components/sha256/e1a0240f83e1925ee59ef2752662e2b0ec27f69251c012f8bab682aadcd8695f/index.js +244 -0
  74. package/vendor/components/sha256/e2181655ed2050668133e08eb14b5683cda48d6af8d76fd7b551c58798c95287/README.en.md +50 -0
  75. package/vendor/components/sha256/e2181655ed2050668133e08eb14b5683cda48d6af8d76fd7b551c58798c95287/index.js +171 -0
  76. package/vendor/components/sha256/ef9c8c77ddf2b3953376a2db700c1277f550ea2606eab11cd8e18056dcba84c1/README.en.md +35 -0
  77. package/vendor/components/sha256/ef9c8c77ddf2b3953376a2db700c1277f550ea2606eab11cd8e18056dcba84c1/index.js +179 -0
  78. package/vendor/components/sha256/f3d5b6ce53f40c5f355a67538ff11b9cd28297da6292125ccb6e055aeddef906/README.en.md +51 -0
  79. package/vendor/components/sha256/f3d5b6ce53f40c5f355a67538ff11b9cd28297da6292125ccb6e055aeddef906/index.js +228 -0
  80. package/vendor/components-2/manifest-2.4.3.json +1962 -0
  81. package/vendor/components-2/manifest-2.4.4.json +1911 -0
  82. package/vendor/components-2/manifest-2.5.0.json +1911 -0
@@ -748,9 +748,9 @@ export const PACK = {
748
748
  "m-collect",
749
749
  "m-kakijun"
750
750
  ],
751
- "partsSrc": "https://github.com/egatari/components/blob/v2.4.2/components/",
751
+ "partsSrc": "https://github.com/egatari/components/blob/v2.5.0/components/",
752
752
  "en": {
753
- "common": "# Instructions for the AI\n\nPack version: `2dcfdea9`\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```",
753
+ "common": "# Instructions for the AI\n\nPack version: `69c736a1`\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```",
754
754
  "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:",
755
755
  "sets": {
756
756
  "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 narration, 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\nComponents of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
@@ -766,8 +766,8 @@ export const PACK = {
766
766
  "components": {
767
767
  "m-bars": {
768
768
  "set": "standard",
769
- "row": "| `<m-bars>` | 棒を段階ごとに 0 から伸ばす(縦棒・横棒・組の棒・積み上げ棒)。値の軸の上限を段階で広げて「軸を突き抜ける伸び」も見せられる | 組の step と scale の step の最大(既定は組 1 つ = 1 段階。per-step で n 組ずつ) | `{groups:[{label?,value?:num,values?:num[],step?,at?,tone?} (value or values),…],series?:{label?,tone?}[],scale?:{step,max?:num,at?}[],max?:num}` |",
770
- "entry": "### `<m-bars>`\n\nData example (child `<script type=\"application/json\">`): `{\"series\":[{\"label\":\"売上\"}],\"groups\":[{\"label\":\"1 年目\",\"value\":1.2},{\"label\":\"2 年目\",\"value\":3.4}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `orient` | string | `\"v\"` | v(縦棒)か h(横棒。順位や比較に) |\n| `max` | number | `0` | 値の軸の上限(0 = 自動。scale があれば最初の上限) |\n| `unit` | string | `\"\"` | 値の単位(数字の後ろに付ける。億円、%、社 など) |\n| `digits` | number | `0` | 値の小数桁 |\n| `per-step` | number | `1` | 1 段階に出す組の数(0 = 全部を段階 1 で) |\n| `count` | bool | `false` | 値の数字を伸びに合わせて数え上げる |\n| `ticks` | bool | `true` | 値の軸の目盛りと格子 |\n| `al` | string | `\"\"` | 値の軸の名前 |\n| `stack` | bool | `false` | 組の値を 1 本に積み上げる(積み上げ棒)。\\ |\n\n年ごとの売上・費用、聞き取りの結果の順位、導入の前と後の比較など、量を 1 つずつ見せて比べるときに使う。\n\n- group:`label`(`\\n` で 2 行)、`value`(系列が 1 つ)か `values`(系列の数だけ)、`step`(既定は per-step から)、`at`(段階の中の開始秒。既定は同じ段階の中で stagger ずつずらす)、`tone`(`emph` などテーマの変数の名前。その組の棒をすべてその色にし、値の数字も同じ色にする)\n- series:`label`(系列が 2 つ以上のとき、最初の組の棒に直接書く。縦棒は棒の上、横棒は値の数字の右(負の棒は下・左)。凡例は作らない)、`tone`(既定は `--series-1..4` の順。系列が 1 つなら `--term`)\n- scale:`[{\"step\": 3, \"max\": 27, \"at\": 0.4}]`。その段階の at 秒から zoom 秒かけて、値の軸の上限を max へ動かす(対数で補間)。動く間は前の上限までの範囲を薄い帯で残し、目盛りは前の組と次の組を入れ替える。上限を超える棒は軸の上端で止まり、上限が広がるにつれて伸びる\n- 横棒(`orient=\"h\"`)は組の名前を左に、値を棒の右に書く。順位を見せるなら `ticks=\"false\"` で目盛りを消してよい\n- 積み上げ棒(`stack=\"true\"`、`\"percent\"` なら各組 100 %):組の `values` を横に並べず 1 本に積み上げる(全体と内訳を組ごとに見せるとき)。合計を棒の端に、それぞれの値を区切りの中に書く。軸の上限は合計から決まる。組の `tone` は合計の数字の色。値は 0 以上にする(負の値は 0 として描く)\n\n注意\n\n- 値の数字は既定で棒が伸びきってから出す。伸びる途中の値は読めてしまうと「データ」に見えるため。数え上げたいときだけ `count=\"true\"`。積み上げ棒で `count=\"true\"` にすると数え上げるのは端の合計だけで、区切りの値と系列の名前は伸びきってから出る(段階の長さはその分 0.35 秒長い)\n- 系列の名前は最初の組の棒に書くので、組の棒が細いと隣の系列の名前と重なる。系列は 2〜3 つまでにする"
769
+ "row": "| `<m-bars>` | Bars grow from 0 by step (vertical, horizontal, grouped, stacked); the axis max can widen by step | max group/scale step (default 1 group = 1 step) | `{groups:[{label?,value?:num,values?:num[],step?,at?,tone?} (value or values),…],series?:{label?,tone?}[],scale?:{step,max?:num,at?}[],max?:num}` |",
770
+ "entry": "### `<m-bars>`\n\nData example (child `<script type=\"application/json\">`): `{\"series\":[{\"label\":\"Sales\"}],\"groups\":[{\"label\":\"Year 1\",\"value\":1.2},{\"label\":\"Year 2\",\"value\":3.4}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `orient` | string | `\"v\"` | v or h |\n| `max` | number | `0` | axis max (0 = auto) |\n| `unit` | string | `\"\"` | value unit |\n| `digits` | number | `0` | decimals |\n| `per-step` | number | `1` | groups per step (0 = all) |\n| `count` | bool | `false` | count values up |\n| `ticks` | bool | `true` | ticks and grid |\n| `al` | string | `\"\"` | axis title |\n| `stack` | bool | `false` | stack values; \"percent\" = 100 % |\n\nFor quantities shown and compared one at a time: yearly sales, ranked answers, before/after.\n\n- group: `label` (`\\n` = 2 lines), `value` or `values` (one per series), `step`, `at` (start s), `tone` (bar and value colour)\n- series: `label` (2+ series: on the first group's bars; no legend), `tone` (default `--series-1..4`)\n- scale: `[{\"step\": 3, \"max\": 27, \"at\": 0.4}]`: the max moves to `max` over `zoom` s; the old range stays as a faint band; taller bars stop at the top and grow as it widens\n- `orient=\"h\"`: names left, values right; `ticks=\"false\"` for ranks\n- `stack=\"true\"` (`\"percent\"` = 100 %): a group's `values` in one bar; total at the end, values inside segments; values ≥ 0\n\nNotes\n\n- Values appear once a bar is fully grown; `count=\"true\"` counts them up\n- Series names sit on the first group's bars: keep to 2–3 series"
771
771
  },
772
772
  "m-boxplot": {
773
773
  "set": "stats",
@@ -777,36 +777,35 @@ export const PACK = {
777
777
  },
778
778
  "m-cards": {
779
779
  "set": "standard",
780
- "row": "| `<m-cards>` | カード(番号の丸・アイコン・見出し・説明)を横一列か 2 段に並べ、段階ごとに出す。矢印で順を、枠の色で強調を見せる | カードの step の最大(既定はカード 1 枚 = 1 段階。per-step で n 枚ずつ) | `{cards:{n?:str,icon?:str,title:str,text?:str,step?,tone?}[]}` |",
781
- "entry": "### `<m-cards>`\n\nData example (child `<script type=\"application/json\">`): `{\"cards\":[{\"icon\":\"user\",\"title\":\"聞く\",\"text\":\"相手の困りごとを聞く\"},{\"icon\":\"bulb\",\"title\":\"考える\",\"text\":\"案を 3 つ出す\"},{\"icon\":\"rocket\",\"title\":\"試す\",\"text\":\"小さく作って見せる\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `layout` | enum | `\"row\"` | row:横一列。grid:2 段(4 枚までは 2×2、5〜6 枚は 3×2) |\n| `arrows` | bool | `false` | カードの間に順の矢印(grid では 1→2→3→4 の Z の順) |\n| `nums` | bool | `false` | 番号の丸を出す(カードの n が優先。n だけ書いたカードはそれを出す) |\n| `hilite` | string | `\"\"` | 強調するカード:last か番号(1 から)。--emph の枠と地 |\n| `per-step` | number | `1` | 1 段階に出すカードの数(0 = 全部を段階 1 で) |\n\n手順(聞く → まとめる → 返す)、要点の 3〜4 つ、事例の 2×2 の札などを、アイコン付きのカードで見せる。\n\n子の JSON の並び:2〜6 枚。\n\n- `title`:見出し(必須。2 行まで)。`text`:説明(入るだけ折り返す。入らなければ … で切って知らせる)\n- `icon`:アイコンの名前(Tabler Icons の線の形。下の一覧から。ほかの名前も使えるが、ない名前は点線の四角になって知らせる)\n- `n`:番号の丸に出す字(`\"A\"` `\"1\"` など)。`nums` を付けると n のないカードに 1, 2, 3 … を出す\n- `tone`:番号の丸とアイコンの色(`term`(既定)・`emph`・`accent2`・`series-1..4`)\n- `layout=\"grid\"`:2 段(4 枚までは 2×2、5〜6 枚は 3×2)。横に広いカードは 番号・アイコン・見出しを 1 行に並べる\n- `arrows`:カードの間に順の矢印(grid では 1→2→3→4 の Z の順)。`hilite=\"last\"` か `hilite=\"3\"`:そのカードを `--emph` の枠と地で強調\n- 見せ方(`variant`):`rise`・`fade`・`draw`。書かなければ資料のシード値で選ばれる(書かなくてよい)\n\nアイコンの名前(よく使うもの):\n\n- 人:user users user-check user-plus user-circle friends mood-smile man woman id-badge\n- データ:chart-bar chart-line chart-pie chart-dots trending-up trending-down table database filter adjustments percentage sum\n- お金:coin cash credit-card wallet receipt pig-money building-bank report-money shopping-cart tag\n- 時間:clock calendar calendar-event calendar-time hourglass history alarm stopwatch\n- 場所:map-pin map world home building building-factory building-store route truck\n- 進め方:arrow-right arrows-right-left refresh repeat circle-check checklist list-numbers git-branch target flag rocket hand-click\n- 伝える:message messages mail phone bell speakerphone share world-www microphone presentation\n- 書類:file file-text files notebook book clipboard-list folder news certificate award\n- 道具:tool settings hammer bulb puzzle cpu device-laptop device-mobile robot code scale\n- 自然:leaf tree plant sun moon cloud cloud-rain droplet flame snowflake\n- 安全:shield shield-check lock key alert-triangle first-aid-kit heart heart-rate-monitor eye\n- 学び:school pencil ruler math-function atom flask microscope palette music language"
780
+ "row": "| `<m-cards>` | Icon cards in a row or 2 rows, by step; arrows for order | largest card step (default 1 card = 1 step) | `{cards:{n?:str,icon?:str,title:str,text?:str,step?,tone?}[]}` |",
781
+ "entry": "### `<m-cards>`\n\nData example (child `<script type=\"application/json\">`): `{\"cards\":[{\"icon\":\"user\",\"title\":\"Listen\",\"text\":\"Hear the problem\"},{\"icon\":\"bulb\",\"title\":\"Think\",\"text\":\"Find 3 ideas\"},{\"icon\":\"rocket\",\"title\":\"Try\",\"text\":\"Build small, show\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `layout` | enum | `\"row\"` | row, or grid (2×2; 3×2 for 5–6) |\n| `arrows` | bool | `false` | order arrows (grid: Z order) |\n| `nums` | bool | `false` | number circles |\n| `hilite` | string | `\"\"` | last or a number (from 1) |\n| `per-step` | number | `1` | cards per step (0 = all) |\n\n3–4 short equal points or a 2×2: try cards over bullets; short steps: cards with arrows. Long or unequal items: bullets.\n\n(2–6 cards).\n\n- `title`: required, ≤ 2 lines. `text`: wraps; overflow cut with …, reported\n- `icon`: Tabler name (below); unknown = dashed box, reported\n- `n`: circle text (`\"A\"`, `\"1\"`); `nums` numbers the rest 1, 2, 3 …\n- `tone`: circle and icon colour (`term`, `emph`, `accent2`, `series-1..4`)\n- `arrows`; `hilite=\"last\"` or `\"3\"`: `--emph` frame and fill\n- `variant`: `rise` (default), `fade`, `draw`\n\nIcons:\n\n- People: user users user-check user-plus user-circle friends mood-smile man woman id-badge\n- Data: chart-bar chart-line chart-pie chart-dots trending-up trending-down table database filter adjustments percentage sum\n- Money: coin cash credit-card wallet receipt pig-money building-bank report-money shopping-cart tag\n- Time: clock calendar calendar-event calendar-time hourglass history alarm stopwatch\n- Place: map-pin map world home building building-factory building-store route truck\n- Flow: arrow-right arrows-right-left refresh repeat circle-check checklist list-numbers git-branch target flag rocket hand-click\n- Talk: message messages mail phone bell speakerphone share world-www microphone presentation\n- Docs: file file-text files notebook book clipboard-list folder news certificate award\n- Tools: tool settings hammer bulb puzzle cpu device-laptop device-mobile robot code scale\n- Nature: leaf tree plant sun moon cloud cloud-rain droplet flame snowflake\n- Safety: shield shield-check lock key alert-triangle first-aid-kit heart heart-rate-monitor eye\n- Learning: school pencil ruler math-function atom flask microscope palette music language"
782
782
  },
783
783
  "m-compare": {
784
784
  "set": "standard",
785
- "row": "| `<m-compare>` | 2 つ(3 つまで)を横に並べて比べる表。一方の列、もう一方の列、それから行ごとの違い | 列の数 + 1(違いの段階。diff も better もなければ列の数だけ) | `{sides:{label,tone?,step?}[],rows:{label?,values:(str\\|num)[],diff?:str,better?:int}[]}` |",
786
- "entry": "### `<m-compare>`\n\nData example (child `<script type=\"application/json\">`): `{\"sides\":[{\"label\":\"紙の申請\",\"tone\":\"muted\"},{\"label\":\"オンライン申請\"}],\"rows\":[{\"label\":\"受付時間\",\"values\":[\"平日 9〜17 時\",\"24 時間\"],\"better\":1,\"diff\":\"いつでも出せる\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `size` | number | `28` | 値の字の大きさ(px)。収まらなければ 24 まで縮める |\n| `diff-label` | string | `\"\"` | 違いの列の見出し(空なら「違い」) |\n\n従来の方法と新しい方法、A 案と B 案、植物の細胞と動物の細胞のように、2 つ(3 つまで)のものを同じ観点で並べて比べるときに使う。\n<!--part:m-bars,m-kpi-->量を棒の長さで比べるなら `m-bars`、数字を 1 つ大きく見せるなら `m-kpi`。<!--/part-->\n\n- `sides`:比べるもの(2 つか 3 つ)。`label` は列の見出し。`tone` は列の色(`term`・`emph`・`muted`・`accent2`・`series-1..4`。既定は 1 つ目 `term`、2 つ目 `accent2`、3 つ目 `series-4`)。従来のものを `muted` にすると新しいものが目立つ\n- `rows`:比べる観点(行)。`label` は左端の観点の名前(なくてもよい)、`values` は列の順の値(字か数。`\\n` で改行。長ければ列の幅で折り返す)。`values` の数は `sides` の数と同じにする(違えば図の代わりに誤りの札が出る)\n- `diff`:その行の違いの一言。右端の「違い」の列に `--emph` で書く(列の見出しは `diff-label` で変えられる)\n- `better`:その行で良い方の列の番号(0 から。1 つ目の列が 0。列の数より小さい)。値を太字にし、違いの段階で `--emph` の枠で囲む\n- 段階:既定は 1 つ目の列(観点の名前と一緒に)→ 2 つ目の列 →(3 つ目の列)→ 違い(`diff` の列と `better` の枠)。列の `step` で段階を変えられる(例:2 つの列を同じ段階に)\n- 見せ方(`variant`):`fade`・`slide`・`reveal`。書かなければ資料のシード値で選ばれる(書かなくてよい)\n- 字は `size`(既定 28 px)から 24 px まで縮めて要素の箱に収める。表は上にそろえ、余った高さは行に少し分ける"
785
+ "row": "| `<m-compare>` | Table comparing 2–3 things: one column, the other, then row differences | columns + 1 (diff step; none if no diff/better) | `{sides:{label,tone?,step?}[],rows:{label?,values:(str\\|num)[],diff?:str,better?:int}[]}` |",
786
+ "entry": "### `<m-compare>`\n\nData example (child `<script type=\"application/json\">`): `{\"sides\":[{\"label\":\"Paper form\",\"tone\":\"muted\"},{\"label\":\"Online form\"}],\"rows\":[{\"label\":\"Hours\",\"values\":[\"Weekdays 9–17\",\"24 h\"],\"better\":1,\"diff\":\"Any time\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `size` | number | `28` | value text px (shrinks to 24) |\n| `diff-label` | string | `\"\"` | diff column heading |\n\n<!--part:m-bars,m-kpi-->2–3 things on the same points (old vs new, A vs B). Bars: `m-bars`; one number: `m-kpi`.<!--/part-->\n\n- `sides`: 2 or 3; `label` = column heading; `tone` (`term`, `emph`, `muted`, `accent2`, `series-1..4`; default `term`, `accent2`, `series-4`); `muted` = old\n- `rows`: `label` = point (optional); `values` in column order (text/number; `\\n`), count = `sides` (else error card)\n- `diff`: short difference, `--emph`, right column\n- `better`: better column index (from 0): bold, `--emph` frame at diff step\n- Steps: column 1 (+ point names) → 2 → (3) → diffs; column `step` overrides\n- `variant`: `fade` (default), `slide`, `reveal` (row by row); same steps"
787
787
  },
788
788
  "m-curves": {
789
789
  "set": "standard",
790
- "row": "| `<m-curves>` | 同じ座標軸に線を 1 本ずつ引く(線の名前は凡例でなく線の端に直接書く) | step の最大(既定は系列の数) | `[{label?,f?:str,pts?:[num,num][],tone?,step?,labelAt?:num,color?:str,dash?:bool,xr?:[num,num],at?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\"\\|\"top\"\\|\"bottom\"\\|\"start\"\\|\"middle\"\\|\"end\",dx?:num,dy?:num,ly?:num} (f or pts),…]` — the data is the array itself, not {\"series\": […]}; axes go in attributes (xr=\"[0,10]\" xl=\"…\"); the expression field is f in x (not fn, not u) |",
791
- "entry": "### `<m-curves>`\n\nData example (child `<script type=\"application/json\">`): `[{\"label\":\"需要 D\",\"f\":\"10 - x\"},{\"label\":\"供給 S\",\"f\":\"2 + x\"},{\"label\":\"均衡\",\"pts\":[[4,0],[4,6]],\"dash\":true}]`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `xr` | json | `[0, 1]` | 横軸の範囲 |\n| `yr` | json | `[0, 1]` | 縦軸の範囲 |\n| `xt` | json | `[]` | x tick values * |\n| `yt` | json | `[]` | y tick values * |\n| `xf` | number | | 横軸の目盛りの小数桁 |\n| `yf` | number | | 縦軸の目盛りの小数桁 |\n| `xl` | string | `\"\"` | x axis name (`*italic*` `_sub` `^sup`) * |\n| `yl` | string | `\"\"` | y axis name * |\n| `n` | number | `300` | f を描く分割数 |\n| `lw` | number | `3.5` | 線の太さ |\n| `size` | number | `0` | 字の大きさ(24 以上。0 = 既定) |\n\n同じ予測分布に平均・中央値・分位点を順に引く、損失関数を 1 つずつ重ねる、など\n「一つの図で比較の軸を一つずつ見せる」ときに使う。\n\n系列は子の `<script type=\"application/json\">` に配列で書く。\n1 系列 = 1 段階(書いた順)。`step` で変えられ、同じ `step` の系列は一緒に引く。口述原稿の [n] はこの段階に合わせる。\n\n| 欄 | 意味 |\n|---|---|\n| `label` | 線の名前 |\n| `f` | x の算術の式(`exp(…)` `sqrt(…)` `PI` などの `Math` の関数と定数、`N(x, 平均, 標準偏差)`、`+ - * / % **`、比較と `? :`。下を見よ)。`xr` で描く範囲を狭められる |\n| `pts` | 点列 `[[x, y], …]`(縦線や実測の折れ線) |\n| `tone` | `term` `emph` `accent2` `muted` `fg` `series-1..4`(既定は `series-1..4` の順) |\n| `dash` | 破線 |\n| `labelAt` / `anchor` / `dx` / `dy` / `ly` | 名前の位置:横軸の値 `labelAt` の点に置く(既定は線の端)。`anchor` は向き(`right` `left` `above` `below`)。`ly` は縦軸の値で高さを決める |\n\n`size=\"40\"`:字の大きさ(24 以上)。\n\n`f` は算術の式で、コードとしては実行しない:数、`x`、`Math` の関数と定数(`sin(x)` とも `Math.sin(x)` とも書ける。`Math.random` は使えない)、`N(x, 平均, 標準偏差)`、`+ - * / % **`、比較(`< <= > >= == !=`)、`&& || !`、`? :`、括弧。べき乗は `**`(`^` は書けない)。書けない式は図の代わりに札が出る。",
792
- "sup": true
790
+ "row": "| `<m-curves>` | Lines drawn one at a time on shared axes, each named at its end (no legend) | largest step (default: number of series) | `[{label?,f?:str,pts?:[num,num][],tone?,step?,labelAt?:num,color?:str,dash?:bool,xr?:[num,num],at?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\"\\|\"top\"\\|\"bottom\"\\|\"start\"\\|\"middle\"\\|\"end\",dx?:num,dy?:num,ly?:num} (f or pts),…]` — the data is the array itself, not {\"series\": […]}; axes go in attributes (xr=\"[0,10]\" xl=\"…\"); the expression field is f in x (not fn, not u) |",
791
+ "entry": "### `<m-curves>`\n\nData example (child `<script type=\"application/json\">`): `[{\"label\":\"Demand D\",\"f\":\"10 - x\"},{\"label\":\"Supply S\",\"f\":\"2 + x\"},{\"label\":\"Equilibrium\",\"pts\":[[4,0],[4,6]],\"dash\":true}]`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `xr` | json | `[0, 1]` | x range |\n| `yr` | json | `[0, 1]` | y range |\n| `xt` | json | `[]` | x ticks |\n| `yt` | json | `[]` | y ticks |\n| `xf` | number | | x tick decimals |\n| `yf` | number | | y tick decimals |\n| `xl` | string | `\"\"` | x title |\n| `yl` | string | `\"\"` | y title |\n| `n` | number | `300` | samples |\n| `lw` | number | `3.5` | line width |\n| `size` | number | `0` | text px (≥ 24; 0 = default) |\n\nOne comparison at a time in one figure: mean, median, quantiles; losses one by one.\n\nSeries: a JSON array in a child script. One series = one step; same `step` = together.\n\n| Field | Meaning |\n|---|---|\n| `label` | line name |\n| `f` | expression in x (see below) |\n| `pts` | points `[[x, y], …]` |\n| `tone` | `term` `emph` `accent2` `muted` `fg` `series-1..4` |\n| `dash` | dashed |\n| `labelAt` / `anchor` / `dx` / `dy` / `ly` | name at x = `labelAt` (default: end); `anchor` `right` `left` `above` `below`; `ly` = y |\n\n`f` is arithmetic, not code: numbers, `x`, `Math` functions/constants (`sin(x)`, `PI`; no `random`), `N(x, mean, sd)`, `+ - * / % **`, comparisons, `&& || !`, `? :`. Powers: `**`. An unreadable `f` shows a card."
793
792
  },
794
793
  "m-cycle": {
795
794
  "set": "standard",
796
- "row": "| `<m-cycle>` | 循環の図。段階の箱を円の上に 12 時から時計回りに並べ、円に沿った矢印でつなぐ(最後から最初へ戻る矢印も) | 段階の数(既定は 1 つ = 1 段階。per-step で n 個ずつ、node の step が優先) | `{nodes:{id?:str\\|int,label?,tex?,note?,tone?,step?,at?}[],center?:{label?,tex?,note?,tone?,step?,at?},edges?:{from:str\\|int,to:str\\|int,label?,tone?,dash?:bool,step?,at?}[]}` |",
797
- "entry": "### `<m-cycle>`\n\nData example (child `<script type=\"application/json\">`): `{\"center\":{\"label\":\"PDCA\"},\"nodes\":[{\"label\":\"計画\"},{\"label\":\"実行\"},{\"label\":\"評価\"},{\"label\":\"改善\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `per-step` | number | `1` | 1 段階に出す段階(箱)の数(0 = 全部を段階 1 で) |\n| `size` | number | `26` | 箱の字の大きさ(px。入らなければ 24 まで縮める) |\n\nPDCA、水の循環、細胞周期、学習のサイクルなど、同じ順で回り続ける段階を見せるときに使う。\n座標は書かない。段階の中身を配列の順に書けば、部品が並べる(共通の決まり §2)。\n\n子の JSON の並び:`center` と `edges` は省ける。\n\n- `nodes`:段階(3〜8 個を想定)。配列の順に回る。12 時の位置から時計回りに置き、となりの段階へ円に沿った矢印を引く。最後から最初へ戻る矢印は自動で引く\n - `label`(`\\n` で改行)か `tex`(KaTeX)、`note`(箱の中の 2 行目に小さく、`--muted`)、`tone`(`term`(既定)・`emph`・`muted`・`accent2`・`series-1..4`)、`step`、`at`、`id`\n- `center`:真ん中の名前(`{\"label\": \"PDCA\", \"note\": \"…\"}`)。最初の段階と一緒に出る(`center.step` で変えられる)。`center` はオブジェクト。<!--part:m-pie-->`m-pie` の `center` は字(文字列)なので取り違えない<!--/part-->\n - `label`(`\\n` で改行)か `tex`(KaTeX)、`note`(箱の**中**の最後の行に小さく、`--muted`)、`tone`(`term`(既定)・`emph`・`muted`・`accent2`・`series-1..4`)、`step`、`at`\n - `tone: emph` の箱は、地が `--emph-tint`、枠と字が `--emph`\n- `edges`:ほかのつながり(`from` `to` は段階の `id`、`label` `tone` `dash` `step`)。箱の縁から縁への破線の矢印\n- 矢印の色は `--muted`、3 px(`edges` も `tone` がなければ `--muted`)\n\n並べ方:\n\n- 横に長い場所では円を横に伸ばした楕円にする(縦の 1.9 倍まで。縦に長くはしない)。箱と矢印が要素の箱に入る大きさにする\n- 段階:既定は 1 段階に 1 つ。入ってくる矢印はその段階の箱と一緒に出る。最後から最初へ戻る矢印は、最後の段階の箱が出たあとに引く\n- 見せ方(`variant`):`fade`・`draw`・`grow`。書かなければ資料のシード値で選ばれる(書かなくてよい)\n- 動きの上限:どの見せ方でも箱が動くのは 12 px まで(箱の中心で測る。大きさは 0.92 倍から、`fade` と同じ)、時間も `fade` の長さの中(共通の決まり §1.2)\n- 授業の表示(`ctx.preview`):後の段階の箱と矢印をテーマの薄さで見せる\n- `cues(k)`:同じ段階に 2 つ以上の箱があれば、2 つ目からの開始時刻を返す"
795
+ "row": "| `<m-cycle>` | Cycle diagram: stage boxes on a circle clockwise from 12, joined by arc arrows (last back to first too) | number of stages (default 1 per step; per-step n each; node step wins) | `{nodes:{id?:str\\|int,label?,tex?,note?,tone?,step?,at?}[],center?:{label?,tex?,note?,tone?,step?,at?},edges?:{from:str\\|int,to:str\\|int,label?,tone?,dash?:bool,step?,at?}[]}` |",
796
+ "entry": "### `<m-cycle>`\n\nData example (child `<script type=\"application/json\">`): `{\"center\":{\"label\":\"PDCA\"},\"nodes\":[{\"label\":\"Plan\"},{\"label\":\"Do\"},{\"label\":\"Check\"},{\"label\":\"Act\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `per-step` | number | `1` | stages per step (0 = all) |\n| `size` | number | `26` | box text px (shrinks to 24) |\n\nStages that repeat in order: PDCA, water cycle, cell cycle. No coordinates; list stages in order (conventions §2).\n\n(`center`, `edges` optional).\n\n- `nodes`: stages (3–8), in order clockwise from 12; arcs to the next, last→first automatic\n - `label` (`\\n`) or `tex` (KaTeX), `note` (small 2nd line, `--muted`), `tone` (`term` default, `emph`, `muted`, `accent2`, `series-1..4`), `step`, `at`, `id`\n- <!--part:m-pie-->`center`: middle name, an object (`{\"label\": \"PDCA\", \"note\": \"…\"}`); appears with stage 1 (`center.step`). `m-pie`'s `center` is a string<!--/part-->\n - same fields as nodes, no `id`; `tone: emph` box: `--emph-tint` fill, `--emph` frame/text\n- `edges`: extra links (`from` `to` = node `id`s, `label` `tone` `dash` `step`); dashed arrows edge to edge\n- Arrows `--muted`, 3 px\n\nLayout:\n\n- Wide spaces: ellipse up to 1.9× wider (never taller); sized to fit the element\n- Incoming arrow appears with its box; last→first after the last box\n- `variant`: `fade` (default), `draw` (arrows first), `grow`; same steps and end\n- `cues(k)`: start times of 2nd+ boxes in one step"
798
797
  },
799
798
  "m-fishbone": {
800
799
  "set": "standard",
801
- "row": "| `<m-fishbone>` | 原因と結果の図(特性要因図・フィッシュボーン図)を、大骨 1 本ずつ組み立て、最後に結果(頭)を出す。座標は書かず、配置は部品が決める | 大骨の数 + 1(頭)。節と edges の step があればその最大 | `{effect:{label?,tex?,note?,tone?,step?,at?},nodes:{id:str\\|int,label?,tex?,note?,tone?,parent?:str\\|int,step?,at?}[],edges?:{from:str\\|int,to:str\\|int,label?,tone?,dash?:bool,step?,at?}[]}` — parent のない節が大骨(分類)、その子が原因、孫が細かい原因(3 段まで) |",
802
- "entry": "### `<m-fishbone>`\n\nData example (child `<script type=\"application/json\">`): `{\"effect\":{\"label\":\"配送の遅れ\"},\"nodes\":[{\"id\":\"p\",\"label\":\"人\"},{\"id\":\"p1\",\"label\":\"人手が足りない\",\"parent\":\"p\"},{\"id\":\"m\",\"label\":\"機械\"},{\"id\":\"m1\",\"label\":\"車の故障\",\"parent\":\"m\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `order` | string | `\"causes-first\"` | 段階の順:causes-first(大骨 1 本ずつ、最後に頭、既定)か effect-first(頭と背骨が先) |\n| `size` | number | `0` | 箱の字の大きさ(px。0 = 27 から入るまで 24 まで縮める) |\n\n品質管理の 4M(人・機械・方法・材料)で不良や遅れの原因を洗い出すとき、理科で「なぜうまくいかないのか」を分けて考えるときなど、\n1 つの結果に効く原因を分類して見せるときに使う。座標は書かない(共通の決まり §2)。\n\n子の JSON の並び:`edges` は省いてよい。\n\n- effect:結果(頭)。`label`(`\\n` で改行)か `tex`、`note`(箱の下の一言)、`tone`(既定 `emph`)、`step`、`at`\n- node:`id`、`label`(または `tex`)、`note`、`parent`、`tone`、`step`、`at`。`parent` のない節が大骨(分類)、その子が原因、孫が細かい原因(3 段まで)\n - 大骨は配列の順に、左から、上・下・上・下と交互に付く。分類の名前は大骨の外の端の箱に書く(`note` は箱の**外側**に小さく)\n - 原因と細かい原因の `tex` は式(KaTeX)として線の上に、`note` は名前の後ろに続けて小さく(`--muted`)書く\n - 原因は大骨に付く横の線の上に、細かい原因は原因の線から大骨と平行に下ろした線に付く横の線の上に書く\n - `tone`:大骨なら箱と骨の色、原因なら字と線の色(`emph` は太字)。`emph` の箱は地が `--emph-tint`、枠と字が `--emph`\n - 線の色は `--muted`。背骨は 5 px(図の中心の線)、大骨は 3.5 px、原因の線は 2.5 px\n- edge:原因どうしのほかのつながり(`from` `to` `label` `tone` `dash` `step`)。破線で矢印つき、字の左へふくらむ。同じ大骨の原因どうしに向く\n- `order`:`causes-first`(既定。大骨 1 本ずつ(その原因と一緒に)、最後に頭)か `effect-first`(頭と背骨を先に出し、それから大骨 1 本ずつ)。節の `step` が勝つ(原因だけ後の段階にもできる)\n- 見せ方(`variant`):`fade`・`draw`・`grow`。書かなければ資料のシード値で選ばれる(書かなくてよい)\n- 動きの上限:どの見せ方でも箱と字が動くのは 12 px まで(箱の中心で測る)、時間も `fade` の長さの中(共通の決まり §1.2)\n- 入る大きさの目安(1280×720 の本文、高さ 440 px ほど):大骨 1 本あたりの行(原因と細かい原因の数)は 3 つまで(短ければ 4 つ)、大骨は 4〜6 本、原因は 10 字ほどまで。字は 24 px より小さくならず、入らない分は要素の箱から上下・左右にはみ出す(足りない px を `ctx.report` で知らせ、Studio の検査に出る)。多いときは図を分けるか、原因を短く言い換える\n- 授業の表示(`ctx.preview`)では、後の段階の骨と字をテーマの薄さで出しておく"
800
+ "row": "| `<m-fishbone>` | Fishbone (cause-and-effect) diagram, one main bone at a time, head last; auto layout | bones + 1 (head), or the largest step | `{effect:{label?,tex?,note?,tone?,step?,at?},nodes:{id:str\\|int,label?,tex?,note?,tone?,parent?:str\\|int,step?,at?}[],edges?:{from:str\\|int,to:str\\|int,label?,tone?,dash?:bool,step?,at?}[]}` — nodes without parent are main bones (categories); their children are causes, grandchildren finer causes (3 levels max) |",
801
+ "entry": "### `<m-fishbone>`\n\nData example (child `<script type=\"application/json\">`): `{\"effect\":{\"label\":\"Late delivery\"},\"nodes\":[{\"id\":\"p\",\"label\":\"People\"},{\"id\":\"p1\",\"label\":\"Short-staffed\",\"parent\":\"p\"},{\"id\":\"m\",\"label\":\"Machines\"},{\"id\":\"m1\",\"label\":\"Truck breakdown\",\"parent\":\"m\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `order` | string | `\"causes-first\"` | causes-first (default) or effect-first |\n| `size` | number | `0` | box text px (0 = 27, shrink to 24) |\n\nGrouped causes of one effect (e.g. 4M: people, machines, methods, materials). No coordinates.\n\n(`edges` optional).\n\n- effect (head): `label` (`\\n`) or `tex`, `note` (under box), `tone` (default `emph`), `step`, `at`\n- node: `id`, `label` (or `tex`), `note`, `parent`, `tone`, `step`, `at`. No `parent` = main bone; child = cause; grandchild = sub-cause (3 levels)\n - Bones in array order, left to right, top/bottom alternating; name boxed at the outer end (`note` outside)\n - Cause `tex` = KaTeX; `note` small after the name (`--muted`)\n - `tone`: bone = box and bone; cause = text and line (`emph` bold)\n- edge: extra cause links (`from` `to` `label` `tone` `dash` `step`), dashed arrow bulging left of text; best within one bone\n- `order`: `causes-first` or `effect-first` (head, spine first); node `step` wins\n- `variant`: `fade` (default), `draw` (lines first), `grow` (boxes grow in); moves ≤ 12 px\n- Fit (1280×720 body, ~440 px high): ≤ 3 rows (causes + sub-causes) per bone (4 if short), 4–6 bones, causes ≤ ~10 chars. Text ≥ 24 px; overflow spills and is reported. Too many: split or shorten"
803
802
  },
804
803
  "m-flow": {
805
804
  "set": "standard",
806
- "row": "| `<m-flow>` | 流れ図の箱と矢印を段階ごとに出して、図を組み立てる | nodes と edges の step の最大 | `{nodes:{id:str\\|int,label?,tex?,x:num,y:num,w:num,h:num,step?,tone?,at?,shape?:str}[],edges?:{from:str\\|int,to:str\\|int,step?,label?,tone?,dash?:bool,kind?:\"money\"\\|\"service\"\\|\"data\",amount?:str\\|num,shift?:num,pulse?:bool\\|any[],pulseAt?:num,offset?:num,at?,loop?:bool\\|str}[]}` |",
807
- "entry": "### `<m-flow>`\n\nData example (child `<script type=\"application/json\">`): `{\"nodes\":[{\"id\":\"a\",\"label\":\"観測\",\"x\":20,\"y\":40,\"w\":200,\"h\":70,\"step\":1},{\"id\":\"b\",\"label\":\"更新\",\"x\":320,\"y\":40,\"w\":200,\"h\":70,\"step\":2}],\"edges\":[{\"from\":\"a\",\"to\":\"b\",\"step\":2}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `size` | number | `26` | 箱の字の大きさ(px) |\n| `pulse-n` | number | `3` | pulse で流れる点の数 |\n| `label-gap` | number | `12` | 辺の名前・金額と箱との最小の間(px)。近ければ線から離す |\n\n証明や手法の各ステップに合わせて箱と矢印を出し、文と図の対応を見せるときに使う。\n\n座標は要素の箱の px(`x`, `y` は箱の左上、`w`, `h` は大きさ)。\n\n- node:`id` `label`(`\\n` で改行)または `tex`(KaTeX)、`step`、`tone`(`term` / `emph` / `muted`)、`at`(段階の中の開始秒)、`shape:\"diamond\"`(判断)\n- edge:`from` `to` `step`(既定は両端の箱の遅いほう)、`label`、`tone`、`dash`、`offset`(名前と線の距離)、`at`、`loop`(前の箱へ外側を回って戻る辺。回る側は `\"left\"` `\"right\"` `\"top\"` `\"bottom\"`、`true` なら両端が縦に並ぶとき右・横に並ぶとき下)\n- 色:線と線の名前は `--fg`(`tone` があればその色)。`muted` の箱は枠が `--muted`、地が `--bg`、字は `--fg`\n- 箱は薄く拡大しながら現れ、矢印は同じ段階の箱が出てから引く",
805
+ "row": "| `<m-flow>` | Flow chart: boxes and arrows by step | largest node/edge step | `{nodes:{id:str\\|int,label?,tex?,x:num,y:num,w:num,h:num,step?,tone?,at?,shape?:str}[],edges?:{from:str\\|int,to:str\\|int,step?,label?,tone?,dash?:bool,kind?:\"money\"\\|\"service\"\\|\"data\",amount?:str\\|num,shift?:num,pulse?:bool\\|any[],pulseAt?:num,offset?:num,at?,loop?:bool\\|str}[]}` |",
806
+ "entry": "### `<m-flow>`\n\nData example (child `<script type=\"application/json\">`): `{\"nodes\":[{\"id\":\"a\",\"label\":\"Observe\",\"x\":20,\"y\":40,\"w\":200,\"h\":70,\"step\":1},{\"id\":\"b\",\"label\":\"Update\",\"x\":320,\"y\":40,\"w\":200,\"h\":70,\"step\":2}],\"edges\":[{\"from\":\"a\",\"to\":\"b\",\"step\":2}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `size` | number | `26` | box text px |\n| `pulse-n` | number | `3` | pulse dots |\n| `label-gap` | number | `12` | min label–box gap px |\n\n; px; `x`, `y` = box top-left, `w`, `h` = size.\n\n- node: `id`, `label` (`\\n`) or `tex` (KaTeX), `step`, `tone` (`term`/`emph`/`muted`), `at` (start s), `shape:\"diamond\"` (decision; ~2× text width)\n- edge: `from` `to` `step` (default: later end), `label`, `tone`, `dash`, `offset` (label gap), `at`, `loop` (back edge: `\"left\"` `\"right\"` `\"top\"` `\"bottom\"` or `true` = auto)",
808
807
  "ext": {
809
- "business": "お金・モノの流れ(ビジネスモデルの図)のための edge の欄(書かなければこれまでと同じ):\n\n- `kind`:`money`(`--emph` の太線)・`service`(`--term`)・`data`(`--muted` の破線)。`tone` と `dash` を書けばそちらが勝つ\n- `amount`:金額などを太字で添える。`label` もあれば線の反対の側に書く\n- `shift`:線に垂直に(進む向きの右へ)ずらす px。同じ 2 つの箱の行きと帰りを `shift` を同じ値にして 2 本並べる。字はずらした側に書く\n- `pulse`:点の列(`pulse-n` 個、0.22 秒おき)が始点から終点へ `pulse-dur` 秒で流れる。`true` なら辺の段階に(引き終わってから)1 回、`[段階, …]` ならその段階ごとに 1 回(辺の段階でなければ `pulseAt` 秒、既定 0.2 秒から)。位置は (k, t) だけで決まり、流れ終わると消える(最終状態には出ない)。`pulse` の段階は図の段階の数にも数える\n- `cues(k)`:pulse の開始時刻を返す(pulse のない図はこれまでどおり null)。口述原稿の `{cue}` の数と合えば、「お金は〜から〜へ{cue}」に合わせて流れる"
808
+ "business": "Business-model edges:\n\n- `kind`: `money` (thick), `service`, `data` (dashed); `tone`/`dash` win\n- `amount`: bold figure\n- `shift`: px right of travel; both directions = 2 parallel lines\n- `pulse`: `pulse-n` dots run start→end in `pulse-dur` s; `true` = once after drawing; `[step, …]` = once per step; pulse steps count"
810
809
  }
811
810
  },
812
811
  "m-gendai": {
@@ -847,8 +846,8 @@ export const PACK = {
847
846
  },
848
847
  "m-kpi": {
849
848
  "set": "standard",
850
- "row": "| `<m-kpi>` | 大きな数字の札(KPI)を段階ごとに出す。数字は数え上げ、下に増減の矢印と一言 | 札の step の最大(既定は札 1 枚 = 1 段階。per-step で n 枚ずつ) | `{cards:{label?,value:num,digits?:int,unit?:str,prefix?:str,from?:num,tone?,delta?:{dir?:\"up\"\\|\"down\",text?:str,good?:bool},note?,step?,at?}[]}` |",
851
- "entry": "### `<m-kpi>`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `cols` | number | `0` | 1 行の札の数(0 = 札の数、4 まで) |\n| `digits` | number | `0` | 数字の小数桁(札の digits が優先) |\n| `per-step` | number | `1` | 1 段階に出す札の数(0 = 全部を段階 1 で) |\n| `count` | bool | `true` | 数字を数え上げる |\n| `size` | number | `0` | 数字の字の大きさ(px。0 = 札の高さから) |\n\n表紙の直後の「掴みの数字」、試験導入の結果、市場規模の要約など、少数の数字を大きく見せるときに使う。\n\n- `label`:札の上の名前。`value`:数字(`digits` 桁、3 桁ごとにカンマ)。`unit`:数字の後ろの単位(小さめの字)。`prefix`:数字の前の記号(`+` `約` など)。負の `value` は自分で − が付くので、`prefix` に `−` を重ねない(`\"prefix\": \"−\"` と `-12` は「−−12」)。減った量を正の数で見せるときだけ `value` を正にして `prefix: \"−\"`\n- `from`:数え上げを始める値(既定 0。「20 分 → 7.5 分」のように減らす数も見せられる)\n- `tone`:数字と札の上の帯の色(`term`(既定)・`emph`・`accent2`・`series-1..4`)\n- `delta`:`{\"dir\": \"up\" | \"down\", \"text\": \"前の期から 4 社\", \"good\": true}`。▲ / ▼ と一言を数字の下に出す。良い向き(`good`、既定は `up` なら良い)なら `--term`、悪い向きなら `--emph`\n- `note`:札の下端の一言(`--muted`)\n- 見せ方(`variant`):`count`・`rise`・`flip`・`underline`。書かなければ資料のシード値で選ばれる(書かなくてよい)\n- 札の並び:`cols`(既定は札の数、4 まで)列で、行が足りなければ折り返す\n- `cues(k)`:同じ段階に 2 枚以上の札があれば、2 枚目からの開始時刻を返す(口述原稿の `{cue}` に合わせられる)"
849
+ "row": "| `<m-kpi>` | KPI cards by step; count-up, change arrow, note | largest card step (default 1 card = 1 step) | `{cards:{label?,value:num,digits?:int,unit?:str,prefix?:str,from?:num,tone?,delta?:{dir?:\"up\"\\|\"down\",text?:str,good?:bool},note?,step?,at?}[]}` |",
850
+ "entry": "### `<m-kpi>`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `cols` | number | `0` | cards per row (0 = count, ≤ 4) |\n| `digits` | number | `0` | decimals (card wins) |\n| `per-step` | number | `1` | cards per step (0 = all) |\n| `count` | bool | `true` | count up |\n| `size` | number | `0` | number px (0 = auto) |\n\n- `label`: above. `value` (`digits`, commas). `unit`: after. `prefix`: before (`+`, `~`). Negative `value` has its own −: no `prefix` `−` (−−12); `prefix: \"−\"` only with a positive decrease\n- `from`: count start (default 0; may count down)\n- `tone`: number, top band (`term`, `emph`, `accent2`, `series-1..4`)\n- `delta`: `{\"dir\": \"up\" | \"down\", \"text\": \"+4\", \"good\": true}`: ▲/▼ + text; good (default `up`) `--term`, bad `--emph`\n- `note`: bottom line\n- `variant`: `count` (default), `rise`, `flip`, `underline`; `count=\"false\"` → `rise`\n- `cues(k)`: start times of 2nd+ cards in a step (for `{cue}`)"
852
851
  },
853
852
  "m-map-japan": {
854
853
  "set": "maps",
@@ -867,8 +866,8 @@ export const PACK = {
867
866
  },
868
867
  "m-menu": {
869
868
  "set": "standard",
870
- "row": "| `<m-menu>` | スライドへのリンクの札を格子に並べる(目次・単元の選び方)。札はふつうの <a href=\"#<スライドの id>\">、行ったスライドの札に「見た」の印 | ceil(札の数 / per-step)(既定の per-step=\"0\" なら 0:初めから全部) | child `<a href>` links (not JSON) |",
871
- "entry": "### `<m-menu>`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `cols` | number | `0` | 列の数(0 なら札の数から:3 枚までは 1 行、4 枚は 2 列、それより多ければ 3 列) |\n| `per-step` | number | `0` | 1 段階に出す札の数(0 なら初めから全部出し、段階を使わない) |\n| `size` | number | `34` | 札の題の字の大きさ(px)。副題はその 0.8 倍(本文の下限の 27px より小さくしない) |\n| `visited` | bool | `true` | このセッションで行き先のスライドを開いた札に「見た」の印を付ける |\n\n目次、授業の単元の選び方、「どこから見るか」を選ばせる 1 枚に使う。目次は取り込んだ後に足す。初稿では普通の箇条書き。(Add the menu after import; in the first draft use a plain list.)\n```html\n<m-menu cols=\"3\" aria-label=\"今日の内容\">\n <a href=\"#s-njd4kp\" data-icon=\"一\" data-sub=\"孟浩然\">春暁</a>\n <a href=\"#s-uhqygr:2\" data-icon=\"二\" data-sub=\"読む順から\">春望</a>\n</m-menu>\n```\n\n- 子の `<a href>` 1 つが札 1 枚。`href` は `#<スライドの id>`(その段階 0)か `#<id>:<段階の鍵>`(`0`・`1`・… か `concl`)。id は取り込みのときに付く。中身(文字・`<b>` など)が札の題になる\n- `data-icon`:題の左の丸に入れる短い字(`一`・`1`・`A` など。色は `--term`)。`data-sub`:題の下の副題(`--muted`)\n- 段階:`per-step=\"n\"` なら札が n 枚ずつ段階ごとに出る(`data-from` から。同じ段階の中は `stagger` 秒ずつずれる)。まだ出ていない札は押せず、Tab でも選べず、読み上げない。\n `per-step=\"0\"`(既定)なら初めから全部(段階を使わない)。段階は (k, t) だけで決まる\n- 並び:`cols`(既定は札の数から:3 枚までは 1 行、4 枚は 2 列、それより多ければ 3 列)。札の高さの下限は CSS の `--mm-h`(既定 104px)、間は `--mm-gap`(18px)。\n 本文いっぱいに置いて縦の真ん中にそろえるなら `style=\"height:100%;align-content:center;--mm-h:150px\"`"
869
+ "row": "| `<m-menu>` | Grid of slide-link cards (contents); plain <a href=\"#<slide id>\">; visited mark | ceil(cards / per-step) (per-step=\"0\": 0) | child `<a href>` links (not JSON) |",
870
+ "entry": "### `<m-menu>`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `cols` | number | `0` | columns (0 = auto) |\n| `per-step` | number | `0` | cards per step (0 = all, no steps) |\n| `size` | number | `34` | title px |\n| `visited` | bool | `true` | mark visited cards |\n\nContents; choosing where to start. Add the menu after import; in the first draft use a plain list.\n```html\n<m-menu cols=\"3\" aria-label=\"Today\">\n <a href=\"#s-njd4kp\" data-icon=\"1\" data-sub=\"Poet\">Poem A</a>\n <a href=\"#s-uhqygr:2\" data-icon=\"2\" data-sub=\"Order\">Poem B</a>\n</m-menu>\n```\n\n- One child `<a href>` = one card. `href`: `#<slide id>` (step 0) or `#<id>:<step>` (`0`, `1`, … `concl`); ids are added on import; content = title\n- `data-icon`: circle text (`1`, `A`). `data-sub`: subtitle\n- `per-step=\"n\"`: n cards per step (from `data-from`); unshown cards inert. `0` = all at once\n- `cols` default: ≤ 3 cards 1 row, 4 → 2, more → 3. Min height `--mm-h` (104px), gap `--mm-gap` (18px). Fill, centred: `style=\"height:100%;align-content:center;--mm-h:150px\"`"
872
871
  },
873
872
  "m-numberline": {
874
873
  "set": "math",
@@ -887,24 +886,23 @@ export const PACK = {
887
886
  },
888
887
  "m-pie": {
889
888
  "set": "standard",
890
- "row": "| `<m-pie>` | 円グラフとドーナツグラフ。切れの名前と値・割合は、大きい切れなら中に、小さい切れなら外に引き出し線で書く | 既定は 1(全部を一度に)。per-step で n 切れずつ、切れの step で直接 | `{slices:{label?,value:num,tone?,step?,place?:\"auto\"\\|\"in\"\\|\"out\"}[],center?:str}` — the slices go in \"slices\" (not \"data\" or \"groups\"); value is a number, not a percentage string; the slices are drawn clockwise from 12 o'clock in the written order |",
891
- "entry": "### `<m-pie>`\n\nData example (child `<script type=\"application/json\">`): `{\"slices\":[{\"label\":\"食費\",\"value\":7.2},{\"label\":\"住まい\",\"value\":8.5},{\"label\":\"その他\",\"value\":2.1,\"tone\":\"muted\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `donut` | number | `0` | ドーナツの内側の半径の割合(0 = 円グラフ。0.5〜0.6 がよい) |\n| `unit` | string | `\"\"` | 値の単位(数字の後ろに付ける。万円、人、% など) |\n| `digits` | number | `0` | 値の小数桁 |\n| `pct-digits` | number | `0` | 割合の小数桁 |\n| `show` | string | `\"pct\"` | 名前の下に書くもの:pct(割合)・value(値)・both(値と割合)・none |\n| `per-step` | number | `0` | 1 段階に出す切れの数(0 = 全部を段階 1 で) |\n\n家計や予算の内訳、回答の割合など、全体を 100% としたときの内訳を見せるときに使う。\n内訳は一度に全部見せる(共通の決まり §3)。<!--part:m-bars-->量どうしを細かく比べたいなら `m-bars` のほうが読みやすい。<!--/part-->\n\n- slice:`label`(名前)、`value`(数。割合はこの値から計算する)、`tone`(`term` `emph` `accent2` `muted` `fg` `series-1..4`)、`step`、`place`(`auto`(既定)・`in`・`out`)\n - 切れは 12 時の位置から時計回りに、書いた順に並ぶ。「その他」は最後に書き、`\"tone\": \"muted\"` にするとよい\n - 既定の色は `--series-1..3`、4〜6 切れ目は同じ 3 色を薄くしたもの、7 切れ目は `--series-4`。切れは 6〜7 つまでにする\n- `center`:ドーナツの穴の中の字(`\\n` で改行。`{total}` は合計の値に置き換わる。例:`\"回答\\n{total}\"`)。`center` は字(文字列)。<!--part:m-cycle-->`m-cycle` の `center` は `{\"label\": …}` のオブジェクトなので取り違えない<!--/part-->\n- `donut`:ドーナツにする(内側の半径の割合。`0.5`〜`0.6` がよい。0 なら円グラフ)\n- `show`:名前の下に書くもの:`pct`(割合、既定)・`value`(値)・`both`(値と割合)・`none`\n- `unit` `digits`:値の単位と小数桁(3 桁ごとにカンマ)。`pct-digits`:割合の小数桁(既定 0)。割合は足して 100% になるように丸める\n- 段階:既定は全部を段階 1 で出す。`per-step=\"1\"` で 1 切れずつ(口述原稿が 1 切れずつ話すときだけにする。そのときは全体の輪郭を初めから薄く見せる)。切れの `step` を書けばそれが勝つ\n- 字の置き場所:切れの中に収まれば中に(濃い切れでは背景の色の字)、収まらなければ外の左右の列に引き出し線で書く。外の字が縦に重ならないように並べ直し、字が片側だけなら字と円をまとめて真ん中に寄せる\n- 見せ方(`variant`):`fade`・`sweep`・`grow`。書かなければ資料のシード値で選ばれる(書かなくてよい)\n- 授業の表示(`ctx.preview`)では、先の段階の切れをテーマの薄さで見せる"
889
+ "row": "| `<m-pie>` | Pie/donut; labels inside big slices, leader lines for small | 1 (all at once); per-step n slices; or slice step | `{slices:{label?,value:num,tone?,step?,place?:\"auto\"\\|\"in\"\\|\"out\"}[],center?:str}` — the slices go in \"slices\" (not \"data\" or \"groups\"); value is a number, not a percentage string; the slices are drawn clockwise from 12 o'clock in the written order |",
890
+ "entry": "### `<m-pie>`\n\nData example (child `<script type=\"application/json\">`): `{\"slices\":[{\"label\":\"Food\",\"value\":7.2},{\"label\":\"Housing\",\"value\":8.5},{\"label\":\"Other\",\"value\":2.1,\"tone\":\"muted\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `donut` | number | `0` | inner radius ratio (0 = pie) |\n| `unit` | string | `\"\"` | value unit |\n| `digits` | number | `0` | value decimals |\n| `pct-digits` | number | `0` | percent decimals |\n| `show` | string | `\"pct\"` | pct, value, both or none |\n| `per-step` | number | `0` | slices per step (0 = all) |\n\n<!--part:m-bars-->Shares of a whole, all at once. Fine comparison: `m-bars`.<!--/part-->\n\n- slice: `label`, `value` (percent computed), `tone` (`term` `emph` `accent2` `muted` `fg` `series-1..4`), `step`, `place` (`auto` default, `in`, `out`)\n - Clockwise from 12 in order; \"Other\" last, `\"tone\": \"muted\"`\n - ≤ 6–7 slices\n- <!--part:m-cycle-->`center`: hole text, a string (`\\n`; `{total}` = sum, e.g. `\"Answers\\n{total}\"`); `m-cycle`'s `center` is an object<!--/part-->\n- `donut`: `0.5`–`0.6`\n- `show` (under name): `pct` (default), `value`, `both`, `none`\n- `unit` `digits`: value unit, decimals; `pct-digits` (default 0). Percents rounded to sum to 100%\n- Steps: all at step 1; `per-step=\"1\"` only if narrated slice by slice (outline faint). Slice `step` wins\n- `variant`: `fade` (default), `sweep` (clockwise from 12), `grow` (rim grows out)"
892
891
  },
893
892
  "m-predict": {
894
893
  "set": "standard",
895
- "row": "| `<m-predict>` | 予想してから答えを開く。選択肢ごとの人数を棒で見せ、答えの段階で正解に枠 | 0 問いと選択肢、1 人数の棒、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 |",
896
- "entry": "### `<m-predict>`\n\nData example (child `<script type=\"application/json\">`): `{\"question\":\"重い球と軽い球、どちらが先に落ちる?\",\"choices\":[{\"label\":\"重い球\"},{\"label\":\"軽い球\"},{\"label\":\"同時\"}],\"answer\":2,\"counts\":[14,3,9],\"note\":\"空気の抵抗を除けば同時に落ちる\"}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `answer-step` | number | `2` | 答えを開く段階(1 以上。1 なら数の棒と同時) |\n| `unit` | string | `\"\"` | 数の単位(人 など) |\n| `poll` | string | `\"\"` | Live poll ID (receives no live counts; viewer/author counts are used) |\n| `ticks` | bool | `true` | 数の軸の目盛りと格子 |\n\n「A だと思う人〜」と手を挙げてもらい、先生が −1・+1 で数える(数を打ち込んでもよい)。一人で自習する学習者は、選択肢を押すと自分の予想になる。\n\n- 選択肢は 2〜6。動画・印刷・最初の表示は `counts`(無ければ 0)。同じスライドにいるあいだは数が残る(答えの段階でも、戻っても)\n- 口述原稿は `counts` の数で書き、数える所は `{note:ここで手を挙げてもらう}` と書く(丸かっこは読み上げられる)\n- `poll=\"p1\"`: reserved for future reveals. No live source sends reveals yet; `ctx.live.poll(id)` returns null, so viewer/author counts are used"
894
+ "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 |",
895
+ "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` | answer step |\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"
897
896
  },
898
897
  "m-quad": {
899
898
  "set": "standard",
900
- "row": "| `<m-quad>` | 2 軸の位置づけ(ポジショニングマップ・SWOT 風の 4 象限)に、点を段階ごとに 1 つずつ置く | 点の step と to.step の最大(既定は点 1 つ = 1 段階) | `{x?:{lo?:str,hi?:str},y?:{lo?:str,hi?:str},quads?:{tr?:str,tl?:str,bl?:str,br?:str,fill?:str},items:{label?,x:num,y:num,step?,at?,tone?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\",r?:num,self?:bool,to?:{x:num,y:num,label?,step?,at?}}[]}` |",
901
- "entry": "### `<m-quad>`\n\nData example (child `<script type=\"application/json\">`): `{\"x\":{\"lo\":\"手作業\",\"hi\":\"自動\"},\"y\":{\"lo\":\"高い\",\"hi\":\"安い\"},\"items\":[{\"label\":\"A 社\",\"x\":0.25,\"y\":0.7},{\"label\":\"自社\",\"x\":0.8,\"y\":0.82,\"self\":true}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `size` | number | `26` | 点の名前の字の大きさ(px) |\n| `quads-step` | number | `0` | 象限の名前を出す段階(0 = 初めから) |\n\n競合と自社の位置づけ、施策の分類(効果×手間)、SWOT のように、2 つの軸の上に項目を 1 つずつ置いて\n「空いている場所」を見せるときに使う。\n\n- `x` `y`:軸の両端の言葉(横軸は軸の下の両端、縦軸は軸の上端と下端の外)。軸と言葉は段階 0 から見える\n- `quads`:象限の名前(tr = 右上、tl = 左上、bl = 左下、br = 右下)。`fill` に象限の名前(`\"tr\"` など)を書くとその象限を淡く塗り、名前を `--term` で書く。名前は `quads-step` の段階で現れる(既定 0 = 初めから)\n- item:`label`、`x` `y`(0〜1。0.5 が軸の交わるところ)、`step`(既定は前の点の次の段階)、`at`(段階の中の開始秒)、`tone`(`term` / `fg`、既定は `--muted`)、`anchor`(名前の位置:`right`(既定)・`left`・`above`・`below`)、`r`(丸の半径)\n- `self: true` の点は `--emph` で大きく描き、現れたときに輪が 1 回広がる(最終状態では輪は出ない)\n- `to: {\"x\", \"y\", \"label\", \"step\", \"at\"}`:移動先。`to.step`(既定は点の次の段階)に、点が破線の跡を引きながら滑り、着いたら移動先の上に `label` を出す\n- `cues(k)`:同じ段階に 2 つ以上の点があれば、2 つ目からの開始時刻(at)を返す。口述原稿の `{cue}` の数と合えば、点が言葉に合わせて現れる\n\n注意\n\n- 象限の名前は、点・点の名前・軸の言葉にかからない隅に置く。どの隅もかかるときは点の名前を置き直す(置き場がなければ `ctx.report` で知らせる)\n- 点の名前どうし・移動先の名前との重なりは置き直さない。近い点の名前は重なることがあるので、`anchor` を変えるか座標をずらす"
899
+ "row": "| `<m-quad>` | 2-axis positioning map (4 quadrants); points one per step | largest step / to.step (1 point = 1 step) | `{x?:{lo?:str,hi?:str},y?:{lo?:str,hi?:str},quads?:{tr?:str,tl?:str,bl?:str,br?:str,fill?:str},items:{label?,x:num,y:num,step?,at?,tone?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\",r?:num,self?:bool,to?:{x:num,y:num,label?,step?,at?}}[]}` |",
900
+ "entry": "### `<m-quad>`\n\nData example (child `<script type=\"application/json\">`): `{\"x\":{\"lo\":\"Manual\",\"hi\":\"Auto\"},\"y\":{\"lo\":\"Costly\",\"hi\":\"Cheap\"},\"items\":[{\"label\":\"Co. A\",\"x\":0.25,\"y\":0.7},{\"label\":\"Us\",\"x\":0.8,\"y\":0.82,\"self\":true}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `size` | number | `26` | label px |\n| `quads-step` | number | `0` | quadrant-name step (0 = start) |\n\nPositioning, effect×effort, SWOT: show the empty space.\n\n- `x` `y`: axis end words (step 0)\n- `quads`: names (tr = top-right, tl, bl, br); `fill: \"tr\"` tints one; names at `quads-step`\n- item: `label`, `x` `y` (0–1; 0.5 = axis cross), `step` (default next), `at`, `tone` (`term`/`fg`; default muted), `anchor` (`right`, `left`, `above`, `below`), `r`\n- `self: true`: big `--emph` point, ring pulse\n- `to: {\"x\", \"y\", \"label\", \"step\", \"at\"}`: slides at `to.step` (default next), dashed trail; `label` on arrival\n- `cues(k)`: start times of 2nd+ points in a step, for `{cue}`\n\nNotes\n\n- Quadrant names avoid points and labels (else labels move, or `ctx.report`)\n- Label overlaps not fixed: change `anchor` or shift"
902
901
  },
903
902
  "m-scatter": {
904
903
  "set": "standard",
905
- "row": "| `<m-scatter>` | 散布図。点の組(系列)を段階ごとに出し、そのあと傾向の線(最小二乗の直線か、書いた 2 点)を引く | 系列の数 + 傾向の線(既定は系列 1 つ = 1 段階、そのあと線をまとめて 1 段階。系列・線の step で直接) | `{series:{label?,tone?,step?,at?,points:([num,num]\\|{x:num,y:num,label?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\"\\|\"top\"\\|\"bottom\",tone?})[]}[],trend?:str\\|{fit?:\"linear\",pts?:[[num,num],[num,num]],series?:int\\|any[],label?,tone?,dash?:bool,step?,at?,digits?:int}\\|[the same {…},…]}` — points are [x, y] or {\"x\", \"y\", \"label\"}; axes go in attributes (xr=\"[0,10]\" xl=\"…\"); trend is \"linear\" or {\"fit\": \"linear\", \"label\": \"…\"} or {\"pts\": [[x0, y0], [x1, y1]]} |",
906
- "entry": "### `<m-scatter>`\n\nData example (child `<script type=\"application/json\">`): `{\"series\":[{\"label\":\"晴れ\",\"points\":[[24,210],[28,380],[31,560],{\"x\":34,\"y\":690,\"label\":\"猛暑日\"}]}],\"trend\":\"linear\"}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `xr` | json | `null` | 横軸の範囲(書かなければデータから) |\n| `yr` | json | `null` | 縦軸の範囲(書かなければデータから) |\n| `xt` | json | `null` | 横軸の目盛り(書かなければ自動) |\n| `yt` | json | `null` | 縦軸の目盛り(書かなければ自動) |\n| `xf` | number | | 横軸の目盛りの小数桁 |\n| `yf` | number | | 縦軸の目盛りの小数桁 |\n| `xl` | string | `\"\"` | x axis name (`*italic*` `_sub` `^sup`) * |\n| `yl` | string | `\"\"` | y axis name * |\n| `r` | number | `9` | 点の半径(px) |\n\n気温と売上、勉強時間と点数、価格と販売数など、2 つの量の関係を見せるときに使う。\n点を出してから傾向の線を引く(共通の決まり §3 の「点、それから傾向」)。\n\n- series:`points`(点の並び。`[x, y]` か `{\"x\", \"y\", \"label\", \"anchor\", \"tone\"}`)、`label`(系列の名前。図の上に印と一緒に書く)、`tone`(`term` `emph` `accent2` `muted` `fg` `series-1..4`。既定は `series-1..4` の順)、`step`(1 系列 = 1 段階(書いた順)。同じ `step` の系列は一緒に出す)、`at`(段階の中の開始秒)\n - 点の `label` は点の横に書く(右 → 左 → 上 → 下の順に、ほかの点・字・軸と重ならない所。`anchor`(`right` `left` `above` `below`)で最初に試す向きを決められる)。外れた点や目立つ点だけに付ける\n - 系列ごとに印の形が変わる(丸・四角・三角・ひし形)。色だけに頼らない。形と既定の色は 4 系列までで、5 つ目からは同じ組がくり返すので、系列は 4 つまでにする\n- trend:`\"linear\"`(全部の点の最小二乗の直線)、または `{\"fit\": \"linear\", \"series\": 0, \"label\", \"tone\", \"dash\", \"step\", \"at\", \"digits\"}`、または `{\"pts\": [[x0, y0], [x1, y1]]}`(書いた 2 点を結ぶ線分。ちょうど 2 つの `[x, y]`。縦の線も書ける)。2 本以上は配列にする\n - `series`:当てはめに使う系列の番号(0 から数える。1 つ目の系列が 0。数か番号の配列。既定は全部)\n - `label`:線の名前(図の上に書く)。`{r}` は相関係数、`{a}` は傾き、`{b}` は切片に置き換わる(`digits` 桁、既定 2)。例:`\"傾向(r = {r})\"`\n - `step`:既定は最後の系列の次の段階(線が何本あっても同じ段階)\n - 当てはめた直線は当てはめた点の x の範囲に、`pts` の線は書いた 2 点の間に引き、軸の枠の中で切る。枠の外に出る線は描かず、`ctx.report` で知らせる\n - `pts` の縦の線では `{a}` `{b}`(傾き・切片)は空になる。`{r}` は当てはめた直線だけ\n- 軸の属性:`xr` `yr`(範囲)、`xt` `yt`(目盛り)、`xf` `yf`(目盛りの小数桁)、`xl` `yl`(軸の名前)。`xr` `yr` を書かなければデータから切りのよい範囲を、`xt` `yt` を書かなければ目盛りを決める\n- 見せ方(`variant`):`fade`・`sweep`・`grow`。書かなければ資料のシード値で選ばれる(書かなくてよい)\n- 授業の表示(`ctx.preview`)では、先の段階の点と線をテーマの薄さで見せる",
907
- "sup": true
904
+ "row": "| `<m-scatter>` | Scatter plot; point series by step, then a trend line (least squares or 2 points) | series + trend (default 1 series = 1 step, lines 1 step) | `{series:{label?,tone?,step?,at?,points:([num,num]\\|{x:num,y:num,label?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\"\\|\"top\"\\|\"bottom\",tone?})[]}[],trend?:str\\|{fit?:\"linear\",pts?:[[num,num],[num,num]],series?:int\\|any[],label?,tone?,dash?:bool,step?,at?,digits?:int}\\|[the same {…},…]}` — points are [x, y] or {\"x\", \"y\", \"label\"}; axes go in attributes (xr=\"[0,10]\" xl=\"…\"); trend is \"linear\" or {\"fit\": \"linear\", \"label\": \"…\"} or {\"pts\": [[x0, y0], [x1, y1]]} |",
905
+ "entry": "### `<m-scatter>`\n\nData example (child `<script type=\"application/json\">`): `{\"series\":[{\"label\":\"Sunny\",\"points\":[[24,210],[28,380],[31,560],{\"x\":34,\"y\":690,\"label\":\"Heatwave\"}]}],\"trend\":\"linear\"}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `xr` | json | `null` | x range |\n| `yr` | json | `null` | y range |\n| `xt` | json | `null` | x ticks |\n| `yt` | json | `null` | y ticks |\n| `xf` | number | | x tick decimals |\n| `yf` | number | | y tick decimals |\n| `xl` | string | `\"\"` | x title |\n| `yl` | string | `\"\"` | y title |\n| `r` | number | `9` | point radius px |\n\nRelation of two quantities (heat vs sales). Points, then trend.\n\n- series: `points` (`[x, y]` or `{\"x\", \"y\", \"label\", \"anchor\", \"tone\"}`), `label` (series name, top with marker), `tone` (`term` `emph` `accent2` `muted` `fg` `series-1..4`), `step` (1 series = 1 step; same = together), `at` (start s)\n - Point `label` placed clear of overlaps (`anchor` = first try: `right` `left` `above` `below`); outliers only\n - Marker shape per series; repeats after 4, so ≤ 4 series\n- trend: `\"linear\"` (least squares on all points), or `{\"fit\": \"linear\", \"series\": 0, \"label\", \"tone\", \"dash\", \"step\", \"at\", \"digits\"}`, or `{\"pts\": [[x0, y0], [x1, y1]]}` (segment; exactly 2 points; vertical OK); several = array\n - `series`: fitted series index from 0, or array (default all)\n - `label`: `{r}` correlation, `{a}` slope, `{b}` intercept (`digits`, default 2), e.g. `\"Trend (r = {r})\"`\n - `step`: default after the last series\n - Clipped to the plot; lines outside reported. Vertical `pts`: `{a}` `{b}` empty; `{r}` only for fits\n- Axes: `xr` `yr` range, `xt` `yt` ticks, `xf` `yf` decimals, `xl` `yl` titles; range/ticks auto if omitted\n- `variant`: `fade` (default), `sweep` (left to right), `grow` (points grow, line from the middle)\n- Lecture view (`ctx.preview`): later points and lines faint"
908
906
  },
909
907
  "m-score": {
910
908
  "set": "music",
@@ -935,8 +933,8 @@ export const PACK = {
935
933
  },
936
934
  "m-timeline": {
937
935
  "set": "standard",
938
- "row": "| `<m-timeline>` | 年表。出来事を時間の軸の上に 1 つずつ出す。期間は帯にして、重なる期間は段を分けて積む。end は含まない(\"1912\" は 1912 年の初め) | 出来事の数(既定は時刻の順に 1 つ = 1 段階。per-step で n 個ずつ、node の step が優先) | `{nodes:{id?:str\\|int,label?,tex?,note?,tone?,when:num\\|str,whenLabel?:str,end?:num\\|str,lane?:str,step?,at?,after?:(str\\|int)[],progress?:num}[],edges?:{from:str\\|int,to:str\\|int,label?,tone?,dash?:bool,step?,at?}[]}` — when / end: a number or \"YYYY\", \"YYYY-MM\", \"YYYY-MM-DD\"; end is exclusive (\"1912\" is the start of 1912). whenLabel: the date text shown instead of the computed one (when still sets the position). A node with end is a period (a band); lane groups bands into named lanes |",
939
- "entry": "### `<m-timeline>`\n\nData example (child `<script type=\"application/json\">`): `{\"nodes\":[{\"id\":\"a\",\"label\":\"明治維新\",\"when\":\"1868\",\"whenLabel\":\"明治元年\"},{\"id\":\"b\",\"label\":\"憲法の発布\",\"when\":\"1889\",\"note\":\"2 月 11 日\"},{\"id\":\"c\",\"label\":\"日清戦争\",\"when\":\"1894\",\"end\":\"1895\",\"tone\":\"emph\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `orient` | string | `\"h\"` | h(左から右へ)か v(上から下へ) |\n| `scale` | string | `\"time\"` | time(時間に比例した間隔)か even(等間隔。間がとても不ぞろいなとき) |\n| `per-step` | number | `1` | 1 段階に出す出来事の数(0 = 全部を段階 1 で) |\n| `size` | number | `26` | 名前の字の大きさ(px。入らなければ 24 まで縮める) |\n| `unit` | string | `\"\"` | 目盛り:day・week・month |\n| `today` | string | `\"\"` | 今日の線(YYYY-MM-DD) |\n\n歴史の年表、人物の生涯の重なり、計画の日程など、出来事を時間の順に見せるときに使う。\n座標は書かない。中身と時刻だけを書けば、部品が並べる(共通の決まり §2)。\n\n子の JSON の並び:`edges` は省ける。\n\n- `when`:時刻。数(`1868`、`-500`、`0.5` など)か、文字列 `\"YYYY\"` `\"YYYY-MM\"` `\"YYYY-MM-DD\"`。箱の上の行に日付として出る(日本語の資料なら「1868年」「2026年10月」)\n- `whenLabel`:日付の行に、計算した日付の代わりに書く字(「明治元年」「平成の終わり」など)。位置は `when` で決まる\n- `label`:名前(`\\n` で改行)。または `tex`(KaTeX)\n- `note`:箱の**中**の最後の行に小さく(`--muted`)。期間と節目では名前の後ろに続けて。例:「2 月 11 日」「新橋〜横浜」\n- `tone`:`term`(既定)・`emph`・`muted`・`accent2`・`series-1..4`。`emph` の箱は地が `--emph-tint`、枠と字が `--emph`\n- `end`:あれば期間。軸の下の段に帯で描き、名前は帯の中(入らなければ帯の右か左)に書く。名前を `\\n` で何行かにすると、帯がその分太くなる\n- `end` は含まない(終わりの時点)。`\"1912\"` は 1912 年の初め。明治 1868–1912 と大正 1912–1926 は同じ段に並ぶ。12 月まで含めるなら次の月(`\"2027-01\"`)を書く。\n- `lane`:期間を名前の付いた段のまとまりに分ける(「時代」「作家」「設計」など)。まとまりの名前を左に書き、まとまりの間に薄い線を引く。重なる期間は、まとまりの中で自動で別の段に積む。`end` のない node に `lane` を書くと、その段の中の節目(◆)になる\n- `step`・`at`:出る段階と、段階の中の開始秒\n- `edges`:ほかのつながり(`from` `to` `label` `tone` `dash` `step`)。箱の縁から縁への破線の矢印(`dash: false` で実線)\n- 工程表:`after: [\"id\", …]`(前の作業の終わりから始まりへ矢印)、`progress`(0–100 %。濃く塗る)。今日の線は `today`、目盛りの単位は `unit`\n - `after` の矢印は期間(`end` のある node)か節目(`lane` のある node)のあいだだけ。`lane` のない出来事を指すと引かない。`today` の線は期間が 1 つ以上あるときだけ出る\n\n並べ方:\n\n- `orient`:`h`(既定、左から右へ)か `v`(上から下へ)\n- `scale`:`time`(既定、時間に比例した間隔)か `even`(使った時刻を等間隔に。間がとても不ぞろいなとき)\n- 出来事(`end` も `lane` もない node)は軸の上の点と、日付と名前の箱。箱は軸の上と下に交互に置く(`v` なら左と右)。混んでいて箱が点から離れすぎるときは 2 段にする\n- 期間があるときは、軸に切りのよい目盛り(年・月・数)を付け、出来事の箱はすべて軸の上に置く(下は期間の段)\n- 段階:既定は時刻の順に 1 つずつ(期間も出来事も同じ列で数える)。軸は最初の出来事と一緒に引かれる\n- 線:軸は `--muted` の 5 px(図の中心の線として 1 本だけ太い)。軸の目盛りと目盛りの字(図の字の大きさ)も `--muted`。段のまとまりの間の区切りの線だけ `--line`。箱から軸への線と `edges` は `--muted` の 3 px\n- 見せ方(`variant`):`fade`・`draw`・`grow`。書かなければ資料のシード値で選ばれる(書かなくてよい)\n- 動きの上限:どの見せ方でも箱が動くのは 12 px まで(箱の中心で測る)、時間も `fade` の長さの中(共通の決まり §1.2)\n- 授業の表示(`ctx.preview`):後の段階の出来事・期間をテーマの薄さで見せる\n- `cues(k)`:同じ段階に 2 つ以上あれば、2 つ目からの開始時刻を返す(口述原稿の `{cue}` に合わせられる)"
936
+ "row": "| `<m-timeline>` | Timeline; events one by one; periods as bands, overlaps stacked; end exclusive (\"1912\" = start of 1912) | event count (default 1 per step in time order; per-step n each; node step wins) | `{nodes:{id?:str\\|int,label?,tex?,note?,tone?,when:num\\|str,whenLabel?:str,end?:num\\|str,lane?:str,step?,at?,after?:(str\\|int)[],progress?:num}[],edges?:{from:str\\|int,to:str\\|int,label?,tone?,dash?:bool,step?,at?}[]}` — when / end: a number or \"YYYY\", \"YYYY-MM\", \"YYYY-MM-DD\"; end is exclusive (\"1912\" is the start of 1912). whenLabel: the date text shown instead of the computed one (when still sets the position). A node with end is a period (a band); lane groups bands into named lanes |",
937
+ "entry": "### `<m-timeline>`\n\nData example (child `<script type=\"application/json\">`): `{\"nodes\":[{\"id\":\"a\",\"label\":\"Meiji Restoration\",\"when\":\"1868\",\"whenLabel\":\"Meiji 1\"},{\"id\":\"b\",\"label\":\"Constitution\",\"when\":\"1889\",\"note\":\"Feb 11\"},{\"id\":\"c\",\"label\":\"Sino-Japanese War\",\"when\":\"1894\",\"end\":\"1895\",\"tone\":\"emph\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `orient` | string | `\"h\"` | h or v |\n| `scale` | string | `\"time\"` | time or even |\n| `per-step` | number | `1` | events per step (0 = all) |\n| `size` | number | `26` | label px (shrinks to 24) |\n| `unit` | string | `\"\"` | ticks: day, week, month |\n| `today` | string | `\"\"` | today line (YYYY-MM-DD) |\n\nHistory, lives, schedules. No coordinates; content and times only.\n\n(`edges` optional).\n\n- `when`: number (`1868`, `-500`, `0.5`) or `\"YYYY\"` `\"YYYY-MM\"` `\"YYYY-MM-DD\"`; shown as the date line\n- `whenLabel`: text replacing the date (\"Meiji 1\"); `when` still sets position\n- `label` (`\\n`) or `tex` (KaTeX)\n- `note`: small last line in the box (`--muted`); after the name for periods/milestones\n- `tone`: `term` (default), `emph`, `muted`, `accent2`, `series-1..4`\n- `end`: period, a band below the axis; name inside (or beside); `\\n` names thicken it\n- `end` is exclusive: Meiji 1868–1912 and Taishō 1912–1926 share a row; through December = next month (`\"2027-01\"`)\n- `lane`: named group of rows (\"Eras\", \"Authors\"); overlaps stack within; `lane` without `end` = milestone (◆)\n- `step`, `at` (start s)\n- `edges`: extra links (`from` `to` `label` `tone` `dash` `step`); dashed arrows (`dash: false` solid)\n- Schedules: `after: [\"id\", …]` (arrow end→start), `progress` (0–100 %); `today` line; tick `unit`\n - `after` only between periods and milestones; `today` needs a period\n\nLayout:\n\n- `orient`: `h` (default) or `v`; `scale`: `time` (default) or `even` (very uneven gaps)\n- Events (no `end` or `lane`): axis dot plus date-and-name box, alternating sides (`v`: left/right); 2 rows when crowded\n- With periods: round ticks; event boxes all above the axis\n- Steps: time order, periods and events together; the axis comes with the first\n- `variant`: `fade` (default), `draw` (lines first, bands drawn), `grow` (boxes grow, bands stretch); same steps and end\n- Lecture view (`ctx.preview`): later items faint\n- `cues(k)`: start times of 2nd+ items in a step (for `{cue}`)"
940
938
  },
941
939
  "m-timer": {
942
940
  "set": "tools",
@@ -945,13 +943,13 @@ export const PACK = {
945
943
  },
946
944
  "m-tree": {
947
945
  "set": "standard",
948
- "row": "| `<m-tree>` | 階層・分類の木(組織図、生物の分類など)を、根から 1 段ずつ組み立てる。座標は書かず、配置は部品が決める | 節の深さの数(by=\"level\"、既定)か節の数(by=\"node\")。節と edges の step があればその最大 | `{nodes:{id:str\\|int,label?,tex?,note?,tone?,parent?:str\\|int,branch?:str,step?,at?}[],edges?:{from:str\\|int,to:str\\|int,label?,tone?,dash?:bool,step?,at?}[],path?:(str\\|int)[],pathStep?:int,pathNote?:str}` — parent のない節(根)はちょうど 1 つ |",
949
- "entry": "### `<m-tree>`\n\nData example (child `<script type=\"application/json\">`): `{\"nodes\":[{\"id\":\"r\",\"label\":\"動物\"},{\"id\":\"a\",\"label\":\"脊椎動物\",\"parent\":\"r\"},{\"id\":\"b\",\"label\":\"無脊椎動物\",\"parent\":\"r\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `orient` | string | `\"down\"` | down(上から下、既定)か right(左から右) |\n| `by` | string | `\"level\"` | 段階の分け方:level(深さごと、既定)か node(1 つずつ、深さ優先の順) |\n| `link` | string | `\"elbow\"` | 親子の線:elbow(かぎ形、既定)か straight(まっすぐ) |\n| `size` | number | `0` | 箱の字の大きさ(px。0 = 27 から入るまで 24 まで縮める) |\n\n組織図、生物や物質の分類、概念の上位と下位、章と節の構成など、親子の関係で並ぶものを上から順に見せるときに使う。\n座標は書かない(共通の決まり §2)。中身とつながりだけを書けば、部品が重ならないように並べる。\n\n子の JSON の並び:`edges` は省いてよい。\n\n- node:`id`、`label`(`\\n` で改行)か `tex`(KaTeX)、`parent`(親の `id`。`parent` のない節(根)はちょうど 1 つ)、`note`(箱の**下**に小さな一言、`--muted`)、`tone`(`term`(既定)・`emph`・`muted`・`accent2`・`series-1..4`)、`step`、`at`(段階の中の開始秒)\n- 子は配列の順に並ぶ。親は子の並びの中央に置く\n- edge:親子のほかのつながり(`from` `to` `label` `tone` `dash` `step`)。破線で矢印つき、木の外側(`down` は下、`right` は右)へふくらむ。同じ深さの節どうしに向く。段階は既定で両端の遅いほう\n- 子の `branch`:線の字(確率など)。`path`:根からの `id` の道を順に強調(`pathStep` で一度に。`pathNote`:末尾の一言)\n- `orient`:`down`(既定、上から下)か `right`(左から右。分類を横に広げるとき)\n- `by`:`level`(既定。根、それから深さごとに 1 段)か `node`(深さ優先の順に 1 つずつ。1 つの枝をたどって話すとき)。節の `step` が勝つ\n- `link`:親子の線。`elbow`(既定、かぎ形)か `straight`(まっすぐ)。線の色は `--muted`、3 px\n- `tone: emph` の箱は、地が `--emph-tint`、枠と字が `--emph`\n- 入る大きさの目安(1280×720 の本文、高さ 440 px ほど):`down` は 1 段に 4 字ほどの箱が 8 個、`right` は 7 個ほど。深さは 5 段ほど。\n それより多い葉(子のない節)が 1 つの親に並ぶと、子を 2 段に互い違いに並べる(`down` で 16 個ほど、`right` で 11 個ほどまで)。\n さらに入らなければ名前を 2 行に折る。字は 24 px より小さくならず、入らない分は要素の箱からはみ出す(足りない px を `ctx.report` で知らせ、Studio の検査に出る)。多いときは木を分ける\n- 見せ方(`variant`):`fade`・`draw`・`grow`。書かなければ資料のシード値で選ばれる(書かなくてよい)\n- 動きの上限:どの見せ方でも箱が動くのは 12 px まで(箱の中心で測る)、時間も `fade` の長さの中(共通の決まり §1.2)\n- 授業の表示(`ctx.preview`)では、後の段階の箱と線をテーマの薄さで出しておく"
946
+ "row": "| `<m-tree>` | Hierarchy tree (org chart, taxonomy), built level by level from the root; auto layout | depth (by=\"level\") or node count (by=\"node\"); or the largest step | `{nodes:{id:str\\|int,label?,tex?,note?,tone?,parent?:str\\|int,branch?:str,step?,at?}[],edges?:{from:str\\|int,to:str\\|int,label?,tone?,dash?:bool,step?,at?}[],path?:(str\\|int)[],pathStep?:int,pathNote?:str}` — exactly one node without parent (the root) |",
947
+ "entry": "### `<m-tree>`\n\nData example (child `<script type=\"application/json\">`): `{\"nodes\":[{\"id\":\"r\",\"label\":\"Animals\"},{\"id\":\"a\",\"label\":\"Vertebrates\",\"parent\":\"r\"},{\"id\":\"b\",\"label\":\"Invertebrates\",\"parent\":\"r\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `orient` | string | `\"down\"` | down (default) or right |\n| `by` | string | `\"level\"` | level (default) or node (depth-first) |\n| `link` | string | `\"elbow\"` | elbow (default) or straight |\n| `size` | number | `0` | box text px (0 = 27, shrink to 24) |\n\nParent–child structures (org charts, taxonomies, outlines). No coordinates; laid out without overlaps.\n\n(`edges` optional).\n\n- node: `id`, `label` (`\\n`) or `tex` (KaTeX), `parent` (parent `id`; exactly one root without `parent`), `note` (small, **under** box), `tone` (`term` default, `emph`, `muted`, `accent2`, `series-1..4`), `step`, `at` (start s)\n- Children in array order; parent centred over them\n- edge: extra links (`from` `to` `label` `tone` `dash` `step`), dashed arrow outside the tree; best at same depth; step: later end\n- Child `branch`: line text (e.g. probability). `path`: root-first `id`s highlighted in turn (default 1 step per line, after the tree; `pathStep`: in one step; `pathNote`: end note)\n- `orient=\"right\"` for wide taxonomies. `by=\"node\"`: one at a time, depth-first (to follow a branch). Node `step` wins\n- Lines `--muted`, 3 px; `tone: emph` box: `--emph-tint` fill\n- Fit (~440 px high): ~8 four-character boxes per level (`down`), ~7 (`right`); ~5 levels. More leaves: 2 staggered rows (~16 / ~11), then 2-line names. Text ≥ 24 px; overflow spills, reported. Too many: split\n- `variant`: `fade` (default), `draw` (lines first), `grow`\n- Lecture view (`ctx.preview`): later parts faint"
950
948
  },
951
949
  "m-venn": {
952
950
  "set": "standard",
953
- "row": "| `<m-venn>` | 2 つか 3 つの集合の円(ベン図)。集合を 1 つずつ出し、最後に重なりを強めてその中の項目を出す | 集合の数 + 1(overlaps=\"each\" なら 集合の数 + 項目のある重なりの数。項目のある重なりがなければ重なりすべての数:2 集合で 1、3 集合で 4) | `{sets:{label,tone?}[],regions?:{A?:str[]\\|str,B?:str[]\\|str,C?:str[]\\|str,AB?:str[]\\|str,AC?:str[]\\|str,BC?:str[]\\|str,ABC?:str[]\\|str}}` |",
954
- "entry": "### `<m-venn>`\n\nData example (child `<script type=\"application/json\">`): `{\"sets\":[{\"label\":\"哺乳類\"},{\"label\":\"海の生き物\"}],\"regions\":{\"A\":[\"ライオン\"],\"B\":[\"マグロ\"],\"AB\":[\"クジラ\",\"イルカ\"]}}`\n\n| prop | type | default | meaning |\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`。書かなければ資料のシード値で選ばれる(書かなくてよい)"
951
+ "row": "| `<m-venn>` | Venn of 2–3 sets, one by one; then overlaps with items | sets + 1 (overlaps=\"each\": sets + overlaps with items, or all overlaps if none) | `{sets:{label,tone?}[],regions?:{A?:str[]\\|str,B?:str[]\\|str,C?:str[]\\|str,AB?:str[]\\|str,AC?:str[]\\|str,BC?:str[]\\|str,ABC?:str[]\\|str}}` |",
952
+ "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)"
955
953
  }
956
954
  },
957
955
  "tableHead": "| component | what it shows | steps | data shape |\n|---|---|---|---|",
@@ -960,7 +958,7 @@ export const PACK = {
960
958
  "extHead": "### `<{name}>`: extension for this part set (the component is described in §3)"
961
959
  },
962
960
  "ja": {
963
- "common": "# AI への指示\n\n指示の版:`2dcfdea9`\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```",
961
+ "common": "# AI への指示\n\n指示の版:`69c736a1`\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```",
964
962
  "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- そのほかの希望:",
965
963
  "sets": {
966
964
  "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}}",
@@ -988,7 +986,7 @@ export const PACK = {
988
986
  "m-cards": {
989
987
  "set": "standard",
990
988
  "row": "| `<m-cards>` | カード(番号の丸・アイコン・見出し・説明)を横一列か 2 段に並べ、段階ごとに出す。矢印で順を、枠の色で強調を見せる | カードの step の最大(既定はカード 1 枚 = 1 段階。per-step で n 枚ずつ) | `{cards:{n?:str,icon?:str,title:str,text?:str,step?,tone?}[]}` |",
991
- "entry": "### `<m-cards>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"cards\":[{\"icon\":\"user\",\"title\":\"聞く\",\"text\":\"相手の困りごとを聞く\"},{\"icon\":\"bulb\",\"title\":\"考える\",\"text\":\"案を 3 つ出す\"},{\"icon\":\"rocket\",\"title\":\"試す\",\"text\":\"小さく作って見せる\"}]}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `layout` | enum | `\"row\"` | row:横一列。grid:2 段(4 枚までは 2×2、5〜6 枚は 3×2) |\n| `arrows` | bool | `false` | カードの間に順の矢印(grid では 1→2→3→4 の Z の順) |\n| `nums` | bool | `false` | 番号の丸を出す(カードの n が優先。n だけ書いたカードはそれを出す) |\n| `hilite` | string | `\"\"` | 強調するカード:last か番号(1 から)。--emph の枠と地 |\n| `per-step` | number | `1` | 1 段階に出すカードの数(0 = 全部を段階 1 で) |\n\n手順(聞く → まとめる → 返す)、要点の 3〜4 つ、事例の 2×2 の札などを、アイコン付きのカードで見せる。\n\n子の JSON の並び:2〜6 枚。\n\n- `title`:見出し(必須。2 行まで)。`text`:説明(入るだけ折り返す。入らなければ … で切って知らせる)\n- `icon`:アイコンの名前(Tabler Icons の線の形。下の一覧から。ほかの名前も使えるが、ない名前は点線の四角になって知らせる)\n- `n`:番号の丸に出す字(`\"A\"` `\"1\"` など)。`nums` を付けると n のないカードに 1, 2, 3 … を出す\n- `tone`:番号の丸とアイコンの色(`term`(既定)・`emph`・`accent2`・`series-1..4`)\n- `layout=\"grid\"`:2 段(4 枚までは 2×2、5〜6 枚は 3×2)。横に広いカードは 番号・アイコン・見出しを 1 行に並べる\n- `arrows`:カードの間に順の矢印(grid では 1→2→3→4 の Z の順)。`hilite=\"last\"` か `hilite=\"3\"`:そのカードを `--emph` の枠と地で強調\n- 見せ方(`variant`):`rise`・`fade`・`draw`。書かなければ資料のシード値で選ばれる(書かなくてよい)\n\nアイコンの名前(よく使うもの):\n\n- 人:user users user-check user-plus user-circle friends mood-smile man woman id-badge\n- データ:chart-bar chart-line chart-pie chart-dots trending-up trending-down table database filter adjustments percentage sum\n- お金:coin cash credit-card wallet receipt pig-money building-bank report-money shopping-cart tag\n- 時間:clock calendar calendar-event calendar-time hourglass history alarm stopwatch\n- 場所:map-pin map world home building building-factory building-store route truck\n- 進め方:arrow-right arrows-right-left refresh repeat circle-check checklist list-numbers git-branch target flag rocket hand-click\n- 伝える:message messages mail phone bell speakerphone share world-www microphone presentation\n- 書類:file file-text files notebook book clipboard-list folder news certificate award\n- 道具:tool settings hammer bulb puzzle cpu device-laptop device-mobile robot code scale\n- 自然:leaf tree plant sun moon cloud cloud-rain droplet flame snowflake\n- 安全:shield shield-check lock key alert-triangle first-aid-kit heart heart-rate-monitor eye\n- 学び:school pencil ruler math-function atom flask microscope palette music language"
989
+ "entry": "### `<m-cards>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"cards\":[{\"icon\":\"user\",\"title\":\"聞く\",\"text\":\"相手の困りごとを聞く\"},{\"icon\":\"bulb\",\"title\":\"考える\",\"text\":\"案を 3 つ出す\"},{\"icon\":\"rocket\",\"title\":\"試す\",\"text\":\"小さく作って見せる\"}]}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `layout` | enum | `\"row\"` | row:横一列。grid:2 段(4 枚までは 2×2、5〜6 枚は 3×2) |\n| `arrows` | bool | `false` | カードの間に順の矢印(grid では 1→2→3→4 の Z の順) |\n| `nums` | bool | `false` | 番号の丸を出す(カードの n が優先。n だけ書いたカードはそれを出す) |\n| `hilite` | string | `\"\"` | 強調するカード:last か番号(1 から)。--emph の枠と地 |\n| `per-step` | number | `1` | 1 段階に出すカードの数(0 = 全部を段階 1 で) |\n\n同じ重さの短い要点が 3〜4 個なら、箇条書きよりカード(アイコン付き)を検討する。事例の 2×2 にも。短い手順は arrows で順を示す。長い文や重さの違う項目は箇条書きのまま。\n\n子の JSON の並び:2〜6 枚。\n\n- `title`:見出し(必須。2 行まで)。`text`:説明(入るだけ折り返す。入らなければ … で切って知らせる)\n- `icon`:アイコンの名前(Tabler Icons の線の形。下の一覧から。ほかの名前も使えるが、ない名前は点線の四角になって知らせる)\n- `n`:番号の丸に出す字(`\"A\"` `\"1\"` など)。`nums` を付けると n のないカードに 1, 2, 3 … を出す\n- `tone`:番号の丸とアイコンの色(`term`(既定)・`emph`・`accent2`・`series-1..4`)\n- `layout=\"grid\"`:2 段(4 枚までは 2×2、5〜6 枚は 3×2)。横に広いカードは 番号・アイコン・見出しを 1 行に並べる\n- `arrows`:カードの間に順の矢印(grid では 1→2→3→4 の Z の順)。`hilite=\"last\"` か `hilite=\"3\"`:そのカードを `--emph` の枠と地で強調\n- 見せ方(`variant`):`rise`・`fade`・`draw`。書かなければ資料のシード値で選ばれる(書かなくてよい)\n\nアイコンの名前(よく使うもの):\n\n- 人:user users user-check user-plus user-circle friends mood-smile man woman id-badge\n- データ:chart-bar chart-line chart-pie chart-dots trending-up trending-down table database filter adjustments percentage sum\n- お金:coin cash credit-card wallet receipt pig-money building-bank report-money shopping-cart tag\n- 時間:clock calendar calendar-event calendar-time hourglass history alarm stopwatch\n- 場所:map-pin map world home building building-factory building-store route truck\n- 進め方:arrow-right arrows-right-left refresh repeat circle-check checklist list-numbers git-branch target flag rocket hand-click\n- 伝える:message messages mail phone bell speakerphone share world-www microphone presentation\n- 書類:file file-text files notebook book clipboard-list folder news certificate award\n- 道具:tool settings hammer bulb puzzle cpu device-laptop device-mobile robot code scale\n- 自然:leaf tree plant sun moon cloud cloud-rain droplet flame snowflake\n- 安全:shield shield-check lock key alert-triangle first-aid-kit heart heart-rate-monitor eye\n- 学び:school pencil ruler math-function atom flask microscope palette music language"
992
990
  },
993
991
  "m-compare": {
994
992
  "set": "standard",
@@ -1169,9 +1167,9 @@ export const PACK = {
1169
1167
  "briefNote": "下に説明の節がない部品は、表の「データの形」のとおりに子の JSON か属性を書き、ほかの属性は既定のままにする。",
1170
1168
  "extHead": "### `<{name}>`:この束の拡張(部品の説明は §3)"
1171
1169
  },
1172
- "version": "2dcfdea9",
1170
+ "version": "69c736a1",
1173
1171
  "tiers": {
1174
- "catalogue": "2.4.2",
1172
+ "catalogue": "2.5.0",
1175
1173
  "parts": {
1176
1174
  "m-bars": {
1177
1175
  "tier": "standard",