egatari 0.6.12 → 0.6.13

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 (107) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/README.ja.md +2 -2
  3. package/README.md +2 -2
  4. package/bin/egatari.mjs +3 -1
  5. package/components.lock.json +141 -51
  6. package/components2.lock.json +500 -1
  7. package/kit/browser.mjs +19 -7
  8. package/kit/check-messages.mjs +2 -0
  9. package/kit/check.mjs +2 -0
  10. package/kit/core/article-links.mjs +5 -4
  11. package/kit/core/article-messages.mjs +6 -1
  12. package/kit/core/article-render.mjs +61 -42
  13. package/kit/core/article-text.mjs +42 -1
  14. package/kit/core/article.mjs +7 -6
  15. package/kit/core/build-core.mjs +4 -0
  16. package/kit/core/caution.mjs +49 -0
  17. package/kit/core/check-parity.mjs +1 -0
  18. package/kit/core/check-rules.mjs +3 -0
  19. package/kit/core/check-source.mjs +2 -0
  20. package/kit/core/colab-core.mjs +1 -1
  21. package/kit/core/llm-pack-assemble.mjs +4 -3
  22. package/kit/core/llm-pack-data.mjs +124 -10
  23. package/kit/core/part-labels.mjs +3 -0
  24. package/kit/core/purposes.mjs +6 -8
  25. package/kit/instruction-version.json +1 -1
  26. package/kit/layouts.css +8 -1
  27. package/kit/player.json +1 -1
  28. package/kit/player.lock.json +2 -2
  29. package/package.json +1 -1
  30. package/themes/asagi/theme.json +1 -1
  31. package/themes/asagi/tokens.css +2 -0
  32. package/themes/bengara/theme.json +1 -1
  33. package/themes/bengara/tokens.css +2 -0
  34. package/themes/business/theme.json +1 -1
  35. package/themes/business/tokens.css +2 -0
  36. package/themes/default/theme.json +1 -1
  37. package/themes/default/tokens.css +2 -0
  38. package/themes/kogecha/theme.json +1 -1
  39. package/themes/kogecha/tokens.css +2 -0
  40. package/themes/kokugo/theme.json +1 -1
  41. package/themes/kokugo/tokens.css +2 -0
  42. package/themes/murasaki/theme.json +1 -1
  43. package/themes/murasaki/tokens.css +2 -0
  44. package/themes/sumi/theme.json +1 -1
  45. package/themes/sumi/tokens.css +2 -0
  46. package/themes/tokiwa/theme.json +1 -1
  47. package/themes/tokiwa/tokens.css +2 -0
  48. package/themes.lock.json +92 -28
  49. package/vendor/components/CATALOG.md +6 -3
  50. package/vendor/components/sha256/061415b5f5a1861e115103224ebbcaf689b602cd9972516001f50f4646d3692a/README.en.md +33 -0
  51. package/vendor/components/sha256/061415b5f5a1861e115103224ebbcaf689b602cd9972516001f50f4646d3692a/index.js +390 -0
  52. package/vendor/components/sha256/1854c2d9091a44f465a8de71de2ef3cfa26de3750c67aba4d0ab6eef9b826b8c/README.en.md +21 -0
  53. package/vendor/components/sha256/1854c2d9091a44f465a8de71de2ef3cfa26de3750c67aba4d0ab6eef9b826b8c/index.js +108 -0
  54. package/vendor/components/sha256/19803bbabc26cab7937b17c101f0529239ad505e2ef72a5b21c5d0b9afb063b5/README.en.md +35 -0
  55. package/vendor/components/sha256/19803bbabc26cab7937b17c101f0529239ad505e2ef72a5b21c5d0b9afb063b5/index.js +179 -0
  56. package/vendor/components/sha256/1fac9a4c6608f0150a51275fb11bad0dcff00bed1696c2d93d150fa97219e41a/README.en.md +23 -0
  57. package/vendor/components/sha256/1fac9a4c6608f0150a51275fb11bad0dcff00bed1696c2d93d150fa97219e41a/index.js +147 -0
  58. package/vendor/components/sha256/24e433f4e96427b5b4625ea6542ae74393a8610a9e3d331d01481b3185c827d4/README.en.md +66 -0
  59. package/vendor/components/sha256/24e433f4e96427b5b4625ea6542ae74393a8610a9e3d331d01481b3185c827d4/index.js +984 -0
  60. package/vendor/components/sha256/336f518ad98df0700348406a1fcc4a2de6843b68de0d2e6fcb2cf92428cc3f32/index.js +121 -0
  61. package/vendor/components/sha256/362590bb028486c9b92c90b0c04bb21c9989b7da1b9d234f0d3c26093770eb52/index.js +228 -0
  62. package/vendor/components/sha256/3c79d2605e1949c302a5e190dab3d12812e548af7d66e80dd73dc517dfa1ae3d/index.js +268 -0
  63. package/vendor/components/sha256/4526a332a77fce02370c58d6acd2b83777bfac10aca91e304f105ca2d6935e21/README.en.md +40 -0
  64. package/vendor/components/sha256/4526a332a77fce02370c58d6acd2b83777bfac10aca91e304f105ca2d6935e21/index.js +405 -0
  65. package/vendor/components/sha256/46fd8b2bfa296e18d7720dec9c9639421fb02cec1b641e50e2cadefcc3945675/README.en.md +31 -0
  66. package/vendor/components/sha256/46fd8b2bfa296e18d7720dec9c9639421fb02cec1b641e50e2cadefcc3945675/index.js +236 -0
  67. package/vendor/components/sha256/49fc5add9b34d9a34fcf9ffa3772da4a36d054feead033a7212b98ce1e18705d/index.js +465 -0
  68. package/vendor/components/sha256/4bedc6e22490461bb624d1801954aed230e9f47e393d2a9779c89c4c6483ab3e/README.en.md +42 -0
  69. package/vendor/components/sha256/4bedc6e22490461bb624d1801954aed230e9f47e393d2a9779c89c4c6483ab3e/index.js +549 -0
  70. package/vendor/components/sha256/5b3a29cd3ad1c572ba2864430fde589a0fa90f5a7cf6c8753ccfc97dd16d99f3/README.en.md +37 -0
  71. package/vendor/components/sha256/5b3a29cd3ad1c572ba2864430fde589a0fa90f5a7cf6c8753ccfc97dd16d99f3/index.js +501 -0
  72. package/vendor/components/sha256/6e9d8d26ba0427f26a8143ecaf1ff3a3fec1a6cb114ef5feed15a62f6a6e77c2/README.en.md +54 -0
  73. package/vendor/components/sha256/6e9d8d26ba0427f26a8143ecaf1ff3a3fec1a6cb114ef5feed15a62f6a6e77c2/index.js +470 -0
  74. package/vendor/components/sha256/9ffe48f7c39657aacbbca355c8268a4682f306c0e453bdd73b69c3ed7e0cb030/README.en.md +30 -0
  75. package/vendor/components/sha256/9ffe48f7c39657aacbbca355c8268a4682f306c0e453bdd73b69c3ed7e0cb030/index.js +192 -0
  76. package/vendor/components/sha256/a04ba1b59cae0406ad91c64da77df1f77d0ae6fb5629da4549452f68b926a20b/index.js +315 -0
  77. package/vendor/components/sha256/c129c1c6c5df8ddafed87ea41fe6f9fc03784b2904059321f970d16ff3238bf8/index.js +312 -0
  78. package/vendor/components/sha256/d831672acd189fd9e6bd294bdbceab539f4b2dc4ec0415e776a9fe740c499544/index.js +97 -0
  79. package/vendor/components/sha256/dc5d9e6da444ef49ac343c870271c6679601040bf3a38a389a7991ffd39dd0fc/index.js +607 -0
  80. package/vendor/components/sha256/deae02519dd79e53cf18137777d486cb3b3234ab02a71d26c4e2925593b047ba/LICENSE-tabler.txt +21 -0
  81. package/vendor/components/sha256/deae02519dd79e53cf18137777d486cb3b3234ab02a71d26c4e2925593b047ba/index.js +4868 -0
  82. package/vendor/components/sha256/deae02519dd79e53cf18137777d486cb3b3234ab02a71d26c4e2925593b047ba/names.txt +4808 -0
  83. package/vendor/components/sha256/e76667b8fbaeb6c5d05ada81b2230f21388e2e68f3437034d2a54ead1c8ccbef/README.en.md +32 -0
  84. package/vendor/components/sha256/e76667b8fbaeb6c5d05ada81b2230f21388e2e68f3437034d2a54ead1c8ccbef/index.js +222 -0
  85. package/vendor/components-2/manifest-2.9.0.json +2204 -0
  86. package/vendor/components-2/manifest-2.9.1.json +2204 -0
  87. package/vendor/egatari-spec/SOURCE.json +3 -3
  88. package/vendor/themes/asagi/1.3.0/theme.json +14 -0
  89. package/vendor/themes/asagi/1.3.0/tokens.css +36 -0
  90. package/vendor/themes/bengara/1.0.0/theme.json +13 -0
  91. package/vendor/themes/bengara/1.0.0/tokens.css +66 -0
  92. package/vendor/themes/business/1.3.0/theme.json +5 -0
  93. package/vendor/themes/business/1.3.0/tokens.css +47 -0
  94. package/vendor/themes/default/1.5.0/README.ja.md +65 -0
  95. package/vendor/themes/default/1.5.0/README.md +65 -0
  96. package/vendor/themes/default/1.5.0/theme.json +4 -0
  97. package/vendor/themes/default/1.5.0/tokens.css +95 -0
  98. package/vendor/themes/kogecha/1.3.0/theme.json +10 -0
  99. package/vendor/themes/kogecha/1.3.0/tokens.css +35 -0
  100. package/vendor/themes/kokugo/1.3.0/theme.json +5 -0
  101. package/vendor/themes/kokugo/1.3.0/tokens.css +31 -0
  102. package/vendor/themes/murasaki/1.3.0/theme.json +10 -0
  103. package/vendor/themes/murasaki/1.3.0/tokens.css +31 -0
  104. package/vendor/themes/sumi/1.3.0/theme.json +10 -0
  105. package/vendor/themes/sumi/1.3.0/tokens.css +57 -0
  106. package/vendor/themes/tokiwa/1.3.0/theme.json +10 -0
  107. package/vendor/themes/tokiwa/1.3.0/tokens.css +33 -0
@@ -385,6 +385,29 @@ export const PACK = {
385
385
  "ja": "地図、それから地域・点・矢印を 1 つずつ"
386
386
  },
387
387
  "icon": "map"
388
+ },
389
+ {
390
+ "id": "deviation",
391
+ "ids": [
392
+ "deviation"
393
+ ],
394
+ "label": {
395
+ "en": "Increase / decrease",
396
+ "ja": "差・増減"
397
+ },
398
+ "sub": {
399
+ "en": "waterfall",
400
+ "ja": "ウォーターフォール"
401
+ },
402
+ "name": {
403
+ "ja": "差・増減",
404
+ "en": "Deviation, increase and decrease"
405
+ },
406
+ "steps": {
407
+ "en": "The baseline, then the differences",
408
+ "ja": "基準、それから差"
409
+ },
410
+ "icon": "waterfall"
388
411
  }
389
412
  ],
390
413
  "components": {
@@ -418,9 +441,15 @@ export const PACK = {
418
441
  "spread",
419
442
  "compare"
420
443
  ],
444
+ "m-callout": [
445
+ "process"
446
+ ],
421
447
  "m-cards": [
422
448
  "process"
423
449
  ],
450
+ "m-checklist": [
451
+ "process"
452
+ ],
424
453
  "m-ci": [
425
454
  "spread"
426
455
  ],
@@ -433,6 +462,10 @@ export const PACK = {
433
462
  "m-cycle": [
434
463
  "cycle"
435
464
  ],
465
+ "m-diverge": [
466
+ "deviation",
467
+ "compare"
468
+ ],
436
469
  "m-fishbone": [
437
470
  "cause-effect"
438
471
  ],
@@ -498,11 +531,13 @@ export const PACK = {
498
531
  "fade",
499
532
  "draw"
500
533
  ],
534
+ "m-callout": [],
501
535
  "m-cards": [
502
536
  "rise",
503
537
  "fade",
504
538
  "draw"
505
539
  ],
540
+ "m-checklist": [],
506
541
  "m-ci": [],
507
542
  "m-code": [],
508
543
  "m-compare": [
@@ -516,6 +551,7 @@ export const PACK = {
516
551
  "draw",
517
552
  "grow"
518
553
  ],
554
+ "m-diverge": [],
519
555
  "m-fishbone": [
520
556
  "fade",
521
557
  "draw",
@@ -629,10 +665,18 @@ export const PACK = {
629
665
  "tag": "m-boxplot",
630
666
  "set": "stats"
631
667
  },
668
+ {
669
+ "tag": "m-callout",
670
+ "set": "tools"
671
+ },
632
672
  {
633
673
  "tag": "m-cards",
634
674
  "set": "standard"
635
675
  },
676
+ {
677
+ "tag": "m-checklist",
678
+ "set": "tools"
679
+ },
636
680
  {
637
681
  "tag": "m-ci",
638
682
  "set": "data"
@@ -653,6 +697,10 @@ export const PACK = {
653
697
  "tag": "m-cycle",
654
698
  "set": "standard"
655
699
  },
700
+ {
701
+ "tag": "m-diverge",
702
+ "set": "business"
703
+ },
656
704
  {
657
705
  "tag": "m-fishbone",
658
706
  "set": "standard"
@@ -791,9 +839,9 @@ export const PACK = {
791
839
  "m-collect",
792
840
  "m-kakijun"
793
841
  ],
794
- "partsSrc": "https://github.com/egatari/components/blob/v2.8.0/components/",
842
+ "partsSrc": "https://github.com/egatari/components/blob/v2.9.1/components/",
795
843
  "en": {
796
- "common": "# Instructions for the AI\n\nPack version: `f086a47b`\n\nYou will write one short **Egatari lesson**: HTML slides with step-by-step reveals (`deck.html`) and a spoken script for it (`narration.md`). Both are built and quality-checked automatically; only what is described here is available. Write slides and script in the language the user asks for. Standards have ids such as **R-fit**; a fix request names the standards a draft broke. The user's request is in **What I want** at the end (or in the conversation before it): choose sensibly for any field that is empty or missing, and if both A and B are left, follow the one with content.\n\n**Before you start (the most common failures):**\n\n- **Both code blocks must be complete and closed.** Never stop in the middle of a block (R-output). Without an outline, keep the lesson short (5–8 slides). Given an outline and a range of its slides, write exactly that range (at most 6 slides, so they fit).\n- **Sizes on the 1280×720 slide** (the quality checker measures them, R-fit): the body area is 1184 × 443 px (to 565 px; 1184 × 558 with `noconcl`). Body text is 32 px with 46 px per line, so about **8 lines** fit; every overflowing 46 px is one line to cut. **All text, also inside figures and parts, is at least 24 px.**\n- **Charts and figures:** parts draw their labels at 24–28 px whatever their size (their SVG uses their own pixels), so size the part, not the text. A part of 380 px leaves room for one short line; with two lines, use 330 px.\n- **Inline `<svg>`:** its text is scaled by displayed width ÷ viewBox width, so write the viewBox in the pixels it is shown at, e.g. `<svg viewBox=\"0 0 560 320\" width=\"560\" height=\"320\">`, with `font-size` ≥ 24. Never combine `width:100%` with another viewBox width (a 600-wide viewBox shown 580 px wide turns 24 into 23.2 px). Prefer a part when one fits.\n\n## 1. Output format\n\n- **R-output** Reply with **exactly two fenced code blocks**, in this order, labelled `deck.html` and `narration.md` (the opening lines are ```` ```deck.html ```` and ```` ```narration.md ````). Put nothing between them; a one-line note before or after is fine. Never split a file over several blocks. No files, canvas or attachments: write both blocks in your chat message. Do not reference other files (no images, no `{{FIG:…}}`, no `{{JSON:…}}`, no external URLs, no `<link>`), and never stop in the middle of a block: if the lesson would be too long, make fewer slides (but for a range of an outline, write exactly the requested slides).\n- **R-outline** When the request asks for an **outline only** (a long lesson made in two passes), reply with exactly one fenced code block labelled `outline` (the opening line is ```` ```outline ````) and no `deck.html` or `narration.md`: a Markdown table (columns `#`, heading, one-line point), one row per slide, all slides in order. Each later request names a range (“slides 7–12 of the outline”): write exactly those slides, following their headings and points.\n- **R-noids** Do **not** write slide ids. Write `<section class=\"slide\">` without `id`, and script headings without `{#…}`. The editor adds ids after import. When you are given a lesson that already has ids (a fix request), keep every existing `id=\"…\"` and `{#…}` exactly as it is.\n\n## 2. deck.html\n\n### 2.1 Skeleton\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Lesson title</title>\n</head>\n<body>\n<div id=\"stage\">\n <section class=\"slide cover noconcl static\"> … </section>\n <section class=\"slide\"> … </section>\n</div>\n</body>\n</html>\n```\n\n- `lang`: `en`, `ja`, … (the language of the lesson). `data-theme`: `sumi` for business and pitch decks, `kokugo` for Japanese language arts, otherwise `default`.\n- No `<script>` except part data (§2.6), no `<link>`. A `<style>` block is allowed only for layout (sizes, gaps), never colors.\n\n### 2.2 Slides\n\n- Normal slide: `<h2>` heading, `<div class=\"body\">…</div>`, then `<div class=\"concl\"><span>…</span></div>` (the conclusion line: one short sentence).\n- Optional kicker (a short line above the heading): one `<p class=\"kicker\">` just before the `<h2>` (ordinary slides only, not `layout-tate`); shown at step 0, not part of the heading. Type it normally, not in capitals (the theme capitalizes English).\n- Cover: `<section class=\"slide cover noconcl static\">` with optional `<div class=\"venue\">…</div>`, `<h1>title</h1>`, optional `<div class=\"au\">…</div>`.\n- Chapter divider: `<section class=\"slide sec noconcl static\"><h1>chapter title</h1></section>`.\n- Classes on `<section>`: `noconcl` (no conclusion line), `static` (no steps), `nostep` (all list items visible from the start), `layout-tate` (Japanese vertical writing; only with the kokugo part set, which describes it), and the `data-morph` attribute (§2.5).\n- Inside `.body`: `<p class=\"sub\">` sub-heading, `<div class=\"big\">` main equation, `<p class=\"note\">` note, `<div class=\"thm\">` theorem box, `<div class=\"cols\">` side-by-side columns, ordinary `<p>`, `<ul>`, `<ol>`, `<table>`.\n- Inline emphasis (the only way to color text): `term` (term or question), `emph` (conclusion, problem, goal), `muted` (known result, de-emphasized), `b` (bold).\n- **R-headings** Every slide heading (`h1` on the cover and dividers, `h2` elsewhere) is **different** from all the others (add a word if two would be the same), and the script section of that slide starts with `## ` followed by **exactly the same heading text** (tags such as `<br>` dropped).\n- **R-colors** Colors only through the theme: the classes above and the math macros `\\hlE` `\\hlT` `\\hlM`; no hex, `rgb()`, named colors, `\\color` or `\\textcolor`. In a part or inline SVG: **Use only the theme's CSS variables for colors**: `var(--fg)` `var(--term)` `var(--emph)` `var(--muted)` `var(--accent2)` `var(--line)`. In SVG write `style=\"stroke:var(--emph)\"` rather than an attribute (`DECK.el` moves `fill` and `stroke` into style automatically when they contain `var(`)\n\n### 2.3 Steps (reveal order = speaking order)\n\n- **R-steps** Step 0 is the slide as it first appears: context only (heading, sub-heading, one framing sentence). An element with `data-step=\"k\"` (k = 1, 2, …) appears at step k; material (list items, equations, table rows, figure parts) appears in the order you talk about it. An equation and the sentence that introduces it share one step (wrap both in `<div data-step=\"k\">`). About 5 steps per slide at most.\n- The conclusion line automatically becomes the **last step**, `concl`; never put `data-step` on it.\n- If a slide has **no** `data-step` anywhere, its top-level list items (`.body > ul > li`, `.body > ol > li`) are numbered 1, 2, … automatically. As soon as any element has `data-step`, nothing is automatic: give every revealed element its `data-step`.\n- A part adds its own steps (§3), starting at its `data-from` (default 1).\n- So the steps of a slide are `0 … max` plus `concl` if it has a conclusion line. A `static` slide has only step 0.\n\n### 2.4 Math (KaTeX, rendered at build time)\n\n- **R-math** Inline `\\( … \\)`, display `\\[ … \\]`. Write `<` as `\\lt` and `>` as `\\gt` inside math. Allowed macros besides standard KaTeX: `\\hlE{…}` (emph) `\\hlT{…}` (term) `\\hlM{…}` (muted), `\\htmlId{ID}{…}`, `\\htmlData{mark=ID}{…}`, `\\htmlClass{…}{…}`, `\\morph{ID}{…}`. No `\\newcommand`, no `\\color`. Define each symbol where it is first used (`\\(\\mu\\)`: the mean).\n\n### 2.5 Attention marks and morphs\n\n- **R-marks** The script’s `{mark:ID}` (§4) marks a target on the **same slide**. Targets: an element in the slide with `id=\"ID\"` or `data-mark=\"ID\"`. For part of an equation, KaTeX's `\\htmlId{ID}{…}` / `\\htmlData{mark=ID}{…}` (the build allows only these two and `\\htmlClass`). If the same ID is used on several slides, use `data-mark` (ids must be unique in the document)\n- Morph (optional): `<section class=\"slide\" data-morph>` slides elements from the previous slide into place; pair elements with the same `data-id=\"…\"` on both slides, or equation parts with `\\morph{ID}{…}` on both. Only elements visible at step 0 move.\n\n### 2.6 Parts\n\n- **R-components** Animated figures are the Web Components `<m-…>` of the catalog (§3), used inside `.body`. Give each a height (`style=\"height:380px\"`) and an `aria-label`. Data goes in **one** child `<script type=\"application/json\">…</script>` written inline (never `{{JSON:…}}`). **Numbers in figures must be correct** (compute them; never invent values for looks; label made-up business figures as fictional). Formulas are arithmetic only (`Math.exp(x)`, `x**2`), never run as code. Use parts only where motion explains something; most slides need none.\n\n### 2.7 Choosing a representation\n\n- **R-purpose** Choose the representation from what the slide must say, not from habit. If the author names a chart type, use it. The table names every part, but use only those described here (§3 and the included part sets). If a part that is not included would fit better, say so in a one-line note.\n\n{{PURPOSES}}\n\n- **R-whole** Lists, KPI cards and pies are shown whole; do not reveal them line by line unless the script discusses each item in turn (for a list, give it one `data-step` or put `nostep` on the slide).\n\n### 2.8 Fitting the slide (1280×720; the quality checker reports errors)\n\n- **R-title** Heading: Japanese at most 26 units (full-width character = 1, ASCII = 0.5); English at most 60 characters. Never ends with a colon.\n- **R-concl** Conclusion line: Japanese at most 35 units; English at most 70 characters. One line.\n- **R-fit** The body must end above 565 px (680 px with `noconcl`): about 8 lines / 100 Japanese characters / 60 English words per slide, or one `big` equation and 3 short bullets, or a part of height ≤ 380 px and one short line (≤ 330 px with two). If it does not fit, split the slide; never shrink text and never set font sizes.\n- **R-style** Japanese slides: plain style (だ・である, 体言止め), no です・ます on slides, one punctuation style in the whole lesson (`、。` or `,.`). English slides: short phrases, sentence case.\n\n## 3. Part catalog\n\nThese standard parts may be used in any lesson; a part set, when it is included after §6, adds the parts of its kind of material. Generated from the part READMEs (their notes are in Japanese). “steps” is how many slide steps a part uses (from `data-from`, default 1). Timing attributes (durations and delays in seconds) are not listed; their defaults fit the narration. Attribute values of type json are written as JSON in the attribute (`values=\"[0.1,0.5]\"`). In “data shape”, `?` marks an optional field; where no type is written, label, tex, note and tone are str, step is int and at is num. In a name or label, `*…*` is italic and `_` `^` make only the next character a subscript or superscript; to show the symbol itself, write the full-width _ ^ *.\n\n{{CATALOG}}\n\n## 4. narration.md\n\n```markdown\n# Script: <lesson title>\n\n## The decay law\n[0] Here is the decay law. We follow how many atoms are left.\n[1] The number left is the starting number times a shrinking exponential.\n[2] {mark:n0|circle}{N₀|N naught} is the number at the start, at time zero.\n[concl] The half-life depends only on the decay constant.\n```\n\n- One section per slide, **in slide order, for every slide (cover included)**: `## <slide heading>` (R-headings), no `{#id}` (R-noids).\n- **R-narr-steps** Step labels `[0]`, `[1]`, … and `[concl]`. **Every step of every slide has script lines** (step 0 to max, and `[concl]` if the slide has a conclusion line), and there are **no labels for steps that do not exist** (a `static` cover has only `[0]`; a slide without a conclusion line has no `[concl]`; never `[01]`). Within a step, talk only about what appears at that step.\n- **R-dialogue** **One narrator by default**: write no speaker names. Write a dialogue only when asked (if asked for three or more speakers, keep two roles and say so first): lines start with `Expert:` or `Novice:` (continuation lines indented; a line without a speaker is Expert), shaped as a cognitive apprenticeship:\n - Novice is never a mere backchannel: Novice voices the question a learner is likely to have, or paraphrases (“So …, is that right?”)\n - Expert answers and adds one example or analogy, or confirms (or corrects) the paraphrase and takes one step further\n - Only at a comprehension fork (where learners tend to misunderstand, or a “why” remains): at most one exchange per slide, 2–3 turns. Elsewhere Expert alone\n - Never a turn that is only “I see”, or that repeats the previous turn. Example: `Novice: So a larger rate always gets there faster?` `Expert: Not always. Too large, and each step jumps across the valley, like striding downhill onto the opposite slope.`\n- `{note:…}`: presenter directions.\n- `{cue}`: a sync point inside a step, one per entry of the part’s `cues(k)` (only where a part’s README asks for it; otherwise omit).\n- `{mark:ID}`, `{mark:ID|effect}`, `{mark:ID|effect|hold=seconds}`, `{mark:clear}`: placed **right before** the words about the target; at most 1–2 per step; still say the thing in words. Effects: `underline` (default; a hand-drawn underline from left to right), `circle` (a hand-drawn circle), `box` (a rounded frame), `spot` (dims everything except the area around the target with the background color), `laser` (a dot of light slides to below the target and stays briefly)\n- **R-reading** `{display|reading}` gives the reading of **one symbol or one term**: `{θ|theta}`, `{N₀|N naught}`, `{x̄|x bar}`, `{論語|ろんご}`. One symbol may carry a star, a prime, a subscript or superscript, or a hat/bar/tilde (`{Q*|Q star}`, `{x′|x prime}`, `{θ̂|theta hat}`). Write the display part in plain Unicode, not LaTeX, and never as an expression or several symbols (`{1-η|…}`, `{a*b|…}` and `{θとη|…}` are wrong: give each symbol its own reading and say the relation in words). Give a reading only to a term misread without one, and then everywhere it appears.\n- **R-formula** **Never read an equation aloud**: no LaTeX, no `\\`, `^`, `_`, and no strings such as `a + b = c` in the narration. Say what the equation means (“the number left is the starting number times a shrinking exponential”).\n- Japanese script is polite spoken Japanese (です・ます); English script is plain spoken English. About 5 Japanese characters or 2.5 English words per second; 1–3 sentences per turn.\n\n## 5. Fix requests\n\nWhen the user pastes a **fix request** (a list of findings with the ids of the standards, followed by the current files), fix exactly those findings, keep everything else, keep every `id=\"…\"` and `{#…}` unchanged (R-noids), and reply again with the two blocks (R-output). If the request contains only some slides, return only those `<section>` elements in the `deck.html` block (no `<html>`) and only their sections in the `narration.md` block; the editor puts them back in place by id.\n\n## 6. Worked example\n\nA small lesson, fictional, showing the structure only (do not copy its content). Note how the steps add up: the list of 2 items gives steps 1–2 and `[concl]`<!--part:m-flow-->; the `m-flow` with 4 boxes gives steps 1–4<!--/part-->. The static cover has `[0]` only. Some part sets end with an example of their own.\n\n### Common (English, default theme, marks<!--part:m-flow-->, m-flow<!--/part-->)\n\n```deck.html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>How a web page arrives</title>\n</head>\n<body>\n<div id=\"stage\">\n\n<section class=\"slide cover noconcl static\">\n <div class=\"venue\">Computing basics, lesson 1 (a fictional course)</div>\n <h1>How a web page arrives</h1>\n</section>\n\n<section class=\"slide\">\n <h2>Two programs take part</h2>\n <div class=\"body\">\n <p>Opening a page is a conversation between two programs.</p>\n <ul>\n <li id=\"browser\">The <span class=\"term\">browser</span> asks for the page and draws it</li>\n <li id=\"server\">The <span class=\"term\">server</span> keeps the page and sends it back</li>\n </ul>\n </div>\n <div class=\"concl\"><span>Every page load is a request and a reply</span></div>\n</section><!--part:m-flow-->\n\n<section class=\"slide\">\n <h2>From the address to the screen</h2>\n <div class=\"body\">\n <m-flow style=\"height:300px\" aria-label=\"Four stages: type the address, send a request, send the page back, draw the page\">\n <script type=\"application/json\">{\"nodes\": [\n {\"id\": \"a\", \"label\": \"Type the\\naddress\", \"x\": 10, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 1},\n {\"id\": \"b\", \"label\": \"Send a\\nrequest\", \"x\": 315, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 2},\n {\"id\": \"c\", \"label\": \"Send the\\npage back\", \"x\": 620, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 3, \"tone\": \"term\"},\n {\"id\": \"d\", \"label\": \"Draw the\\npage\", \"x\": 925, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 4, \"tone\": \"emph\"}\n ], \"edges\": [\n {\"from\": \"a\", \"to\": \"b\"}, {\"from\": \"b\", \"to\": \"c\"}, {\"from\": \"c\", \"to\": \"d\"}\n ]}</script>\n </m-flow>\n </div>\n <div class=\"concl\"><span>A slow page is slow in one of these four stages</span></div>\n</section><!--/part-->\n\n</div>\n</body>\n</html>\n```\n\n```narration.md\n# Narration: How a web page arrives\n\n## How a web page arrives\n[0] Today we follow a web page on its way from a server to your screen.\n\n## Two programs take part\n[0] Opening a page is a conversation between two programs.\n[1] {mark:browser}The browser is the program you look at. It asks for the page and then draws it.\n[2] {mark:server}The server is a program on another computer. It keeps the page and sends it back when asked.\n[concl] Every page load is a request and a reply.<!--part:m-flow-->\n\n## From the address to the screen\n[0] Let us put the steps in order.\n[1] First you type the address of the page.\n[2] The browser turns it into a request and sends it to the server.\n[3] The server finds the page and sends it back.\n[4] The browser draws the page on the screen.\n[concl] When a page is slow, one of these four stages is taking the time.<!--/part-->\n```",
844
+ "common": "# Instructions for the AI\n\nPack version: `7aef902d`\n\nYou will write one short **Egatari lesson**: HTML slides with step-by-step reveals (`deck.html`) and a spoken script for it (`narration.md`). Both are built and quality-checked automatically; only what is described here is available. Write slides and script in the language the user asks for. Standards have ids such as **R-fit**; a fix request names the standards a draft broke. The user's request is in **What I want** at the end (or in the conversation before it): choose sensibly for any field that is empty or missing, and if both A and B are left, follow the one with content.\n\n**Before you start (the most common failures):**\n\n- **Both code blocks must be complete and closed.** Never stop in the middle of a block (R-output). Without an outline, keep the lesson short (5–8 slides). Given an outline and a range of its slides, write exactly that range (at most 6 slides, so they fit).\n- **Sizes on the 1280×720 slide** (the quality checker measures them, R-fit): the body area is 1184 × 443 px (to 565 px; 1184 × 558 with `noconcl`). Body text is 32 px with 46 px per line, so about **8 lines** fit; every overflowing 46 px is one line to cut. **All text, also inside figures and parts, is at least 24 px.**\n- **Charts and figures:** parts draw their labels at 24–28 px whatever their size (their SVG uses their own pixels), so size the part, not the text. A part of 380 px leaves room for one short line; with two lines, use 330 px.\n- **Inline `<svg>`:** its text is scaled by displayed width ÷ viewBox width, so write the viewBox in the pixels it is shown at, e.g. `<svg viewBox=\"0 0 560 320\" width=\"560\" height=\"320\">`, with `font-size` ≥ 24. Never combine `width:100%` with another viewBox width (a 600-wide viewBox shown 580 px wide turns 24 into 23.2 px). Prefer a part when one fits.\n\n## 1. Output format\n\n- **R-output** Reply with **exactly two fenced code blocks**, in this order, labelled `deck.html` and `narration.md` (the opening lines are ```` ```deck.html ```` and ```` ```narration.md ````). Put nothing between them; a one-line note before or after is fine. Never split a file over several blocks. No files, canvas or attachments: write both blocks in your chat message. Do not reference other files (no images, no `{{FIG:…}}`, no `{{JSON:…}}`, no external URLs, no `<link>`), and never stop in the middle of a block: if the lesson would be too long, make fewer slides (but for a range of an outline, write exactly the requested slides).\n- **R-outline** When the request asks for an **outline only** (a long lesson made in two passes), reply with exactly one fenced code block labelled `outline` (the opening line is ```` ```outline ````) and no `deck.html` or `narration.md`: a Markdown table (columns `#`, heading, one-line point), one row per slide, all slides in order. Each later request names a range (“slides 7–12 of the outline”): write exactly those slides, following their headings and points.\n- **R-noids** Do **not** write slide ids. Write `<section class=\"slide\">` without `id`, and script headings without `{#…}`. The editor adds ids after import. When you are given a lesson that already has ids (a fix request), keep every existing `id=\"…\"` and `{#…}` exactly as it is.\n\n## 2. deck.html\n\n### 2.1 Skeleton\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Lesson title</title>\n</head>\n<body>\n<div id=\"stage\">\n <section class=\"slide cover noconcl static\"> … </section>\n <section class=\"slide\"> … </section>\n</div>\n</body>\n</html>\n```\n\n- `lang`: `en`, `ja`, … (the language of the lesson). `data-theme`: `sumi` for business and pitch decks, `kokugo` for Japanese language arts, otherwise `default`.\n- No `<script>` except part data (§2.6), no `<link>`. A `<style>` block is allowed only for layout (sizes, gaps), never colors.\n\n### 2.2 Slides\n\n- Normal slide: `<h2>` heading, `<div class=\"body\">…</div>`, then `<div class=\"concl\"><span>…</span></div>` (the conclusion line: one short sentence).\n- Optional kicker (a short line above the heading): one `<p class=\"kicker\">` just before the `<h2>` (ordinary slides only, not `layout-tate`); shown at step 0, not part of the heading. Type it normally, not in capitals (the theme capitalizes English).\n- Cover: `<section class=\"slide cover noconcl static\">` with optional `<div class=\"venue\">…</div>`, `<h1>title</h1>`, optional `<div class=\"au\">…</div>`.\n- Chapter divider: `<section class=\"slide sec noconcl static\"><h1>chapter title</h1></section>`.\n- Classes on `<section>`: `noconcl` (no conclusion line), `static` (no steps), `nostep` (all list items visible from the start), `layout-tate` (Japanese vertical writing; only with the kokugo part set, which describes it), and the `data-morph` attribute (§2.5).\n- Inside `.body`: `<p class=\"sub\">` sub-heading, `<div class=\"big\">` main equation, `<p class=\"note\">` note, `<div class=\"thm\">` theorem box, `<div class=\"cols\">` side-by-side columns, ordinary `<p>`, `<ul>`, `<ol>`, `<table>`.\n- **R-caution** In `.body`: `<div class=\"caution\">…</div>` for caution; add `warn` for warning. Labels are automatic.\n- Inline emphasis (the only way to color text): `term` (term or question), `emph` (conclusion, problem, goal), `muted` (known result, de-emphasized), `b` (bold).\n- **R-headings** Every slide heading (`h1` on the cover and dividers, `h2` elsewhere) is **different** from all the others (add a word if two would be the same), and the script section of that slide starts with `## ` followed by **exactly the same heading text** (tags such as `<br>` dropped).\n- **R-colors** Colors only through the theme: the classes above and the math macros `\\hlE` `\\hlT` `\\hlM`; no hex, `rgb()`, named colors, `\\color` or `\\textcolor`. In a part or inline SVG: **Use only the theme's CSS variables for colors**: `var(--fg)` `var(--term)` `var(--emph)` `var(--muted)` `var(--accent2)` `var(--line)`. In SVG write `style=\"stroke:var(--emph)\"` rather than an attribute (`DECK.el` moves `fill` and `stroke` into style automatically when they contain `var(`)\n\n### 2.3 Steps (reveal order = speaking order)\n\n- **R-steps** Step 0 is the slide as it first appears: context only (heading, sub-heading, one framing sentence). An element with `data-step=\"k\"` (k = 1, 2, …) appears at step k; material (list items, equations, table rows, figure parts) appears in the order you talk about it. An equation and the sentence that introduces it share one step (wrap both in `<div data-step=\"k\">`). About 5 steps per slide at most.\n- The conclusion line automatically becomes the **last step**, `concl`; never put `data-step` on it.\n- If a slide has **no** `data-step` anywhere, its top-level list items (`.body > ul > li`, `.body > ol > li`) are numbered 1, 2, … automatically. As soon as any element has `data-step`, nothing is automatic: give every revealed element its `data-step`.\n- A part adds its own steps (§3), starting at its `data-from` (default 1).\n- So the steps of a slide are `0 … max` plus `concl` if it has a conclusion line. A `static` slide has only step 0.\n\n### 2.4 Math (KaTeX, rendered at build time)\n\n- **R-math** Inline `\\( … \\)`, display `\\[ … \\]`. Write `<` as `\\lt` and `>` as `\\gt` inside math. Allowed macros besides standard KaTeX: `\\hlE{…}` (emph) `\\hlT{…}` (term) `\\hlM{…}` (muted), `\\htmlId{ID}{…}`, `\\htmlData{mark=ID}{…}`, `\\htmlClass{…}{…}`, `\\morph{ID}{…}`. No `\\newcommand`, no `\\color`. Define each symbol where it is first used (`\\(\\mu\\)`: the mean).\n\n### 2.5 Attention marks and morphs\n\n- **R-marks** The script’s `{mark:ID}` (§4) marks a target on the **same slide**. Targets: an element in the slide with `id=\"ID\"` or `data-mark=\"ID\"`. For part of an equation, KaTeX's `\\htmlId{ID}{…}` / `\\htmlData{mark=ID}{…}` (the build allows only these two and `\\htmlClass`). If the same ID is used on several slides, use `data-mark` (ids must be unique in the document)\n- Morph (optional): `<section class=\"slide\" data-morph>` slides elements from the previous slide into place; pair elements with the same `data-id=\"…\"` on both slides, or equation parts with `\\morph{ID}{…}` on both. Only elements visible at step 0 move.\n\n### 2.6 Parts\n\n- **R-components** Animated figures are the Web Components `<m-…>` of the catalog (§3), used inside `.body`. Give each a height (`style=\"height:380px\"`) and an `aria-label`. Data goes in **one** child `<script type=\"application/json\">…</script>` written inline (never `{{JSON:…}}`). **Numbers in figures must be correct** (compute them; never invent values for looks; label made-up business figures as fictional). Formulas are arithmetic only (`Math.exp(x)`, `x**2`), never run as code. Use parts only where motion explains something; most slides need none.\n\n### 2.7 Choosing a representation\n\n- **R-purpose** Choose the representation from what the slide must say, not from habit. If the author names a chart type, use it. The table names every part, but use only those described here (§3 and the included part sets). If a part that is not included would fit better, say so in a one-line note.\n\n{{PURPOSES}}\n\n- **R-whole** Lists, KPI cards and pies are shown whole; do not reveal them line by line unless the script discusses each item in turn (for a list, give it one `data-step` or put `nostep` on the slide).\n\n### 2.8 Fitting the slide (1280×720; the quality checker reports errors)\n\n- **R-title** Heading: Japanese at most 26 units (full-width character = 1, ASCII = 0.5); English at most 60 characters. Never ends with a colon.\n- **R-concl** Conclusion line: Japanese at most 35 units; English at most 70 characters. One line.\n- **R-fit** The body must end above 565 px (680 px with `noconcl`): about 8 lines / 100 Japanese characters / 60 English words per slide, or one `big` equation and 3 short bullets, or a part of height ≤ 380 px and one short line (≤ 330 px with two). If it does not fit, split the slide; never shrink text and never set font sizes.\n- **R-style** Japanese slides: plain style (だ・である, 体言止め), no です・ます on slides, one punctuation style in the whole lesson (`、。` or `,.`). English slides: short phrases, sentence case.\n\n## 3. Part catalog\n\nStandard parts fit any lesson; a part set after §6 adds the parts for its material. “steps” is how many slide steps a part uses (from `data-from`, default 1). Timing attributes (durations, delays) are not listed; their defaults fit the narration. Attribute values of type json are written as JSON in the attribute (`values=\"[0.1,0.5]\"`). In “data shape”, `?` marks an optional field; where no type is written, label, tex, note and tone are str, step is int and at is num. In a name or label, `*…*` is italic and `_` `^` make only the next character a subscript or superscript; to show the symbol itself, write the full-width _ ^ *.\n\n{{CATALOG}}\n\n## 4. narration.md\n\n```markdown\n# Script: <lesson title>\n\n## The decay law\n[0] Here is the decay law. We follow how many atoms are left.\n[1] The number left is the starting number times a shrinking exponential.\n[2] {mark:n0|circle}{N₀|N naught} is the number at the start, at time zero.\n[concl] The half-life depends only on the decay constant.\n```\n\n- One section per slide, **in slide order, for every slide (cover included)**: `## <slide heading>` (R-headings), no `{#id}` (R-noids).\n- **R-narr-steps** Step labels `[0]`, `[1]`, … and `[concl]`. **Every step of every slide has script lines** (step 0 to max, and `[concl]` if the slide has a conclusion line), and there are **no labels for steps that do not exist** (a `static` cover has only `[0]`; a slide without a conclusion line has no `[concl]`; never `[01]`). Within a step, talk only about what appears at that step.\n- **R-dialogue** **One narrator by default**: write no speaker names. Write a dialogue only when asked (if asked for three or more speakers, keep two roles and say so first): lines start with `Expert:` or `Novice:` (continuation lines indented; a line without a speaker is Expert), shaped as a cognitive apprenticeship:\n - Novice is never a mere backchannel: Novice voices the question a learner is likely to have, or paraphrases (“So …, is that right?”)\n - Expert answers and adds one example or analogy, or confirms (or corrects) the paraphrase and takes one step further\n - Only at a comprehension fork (where learners tend to misunderstand, or a “why” remains): at most one exchange per slide, 2–3 turns. Elsewhere Expert alone\n - Never a turn that is only “I see”, or that repeats the previous turn. Example: `Novice: So a larger rate always gets there faster?` `Expert: Not always. Too large, and each step jumps across the valley, like striding downhill onto the opposite slope.`\n- `{note:…}`: presenter directions.\n- `{cue}`: a sync point inside a step, one per entry of the part’s `cues(k)` (only where a part’s README asks for it; otherwise omit).\n- `{mark:ID}`, `{mark:ID|effect}`, `{mark:ID|effect|hold=seconds}`, `{mark:clear}`: placed **right before** the words about the target; at most 1–2 per step; still say the thing in words. Effects: `underline` (default; a hand-drawn underline from left to right), `circle` (a hand-drawn circle), `box` (a rounded frame), `spot` (dims everything except the area around the target with the background color), `laser` (a dot of light slides to below the target and stays briefly)\n- **R-reading** `{display|reading}` gives the reading of **one symbol or one term**: `{θ|theta}`, `{N₀|N naught}`, `{x̄|x bar}`, `{論語|ろんご}`. One symbol may carry a star, a prime, a subscript or superscript, or a hat/bar/tilde (`{Q*|Q star}`, `{x′|x prime}`, `{θ̂|theta hat}`). Write the display part in plain Unicode, not LaTeX, and never as an expression or several symbols (`{1-η|…}`, `{a*b|…}` and `{θとη|…}` are wrong: give each symbol its own reading and say the relation in words). Give a reading only to a term misread without one, and then everywhere it appears.\n- **R-formula** **Never read an equation aloud**: no LaTeX, no `\\`, `^`, `_`, and no strings such as `a + b = c` in the narration. Say what the equation means (“the number left is the starting number times a shrinking exponential”).\n- Japanese script is polite spoken Japanese (です・ます); English script is plain spoken English. About 5 Japanese characters or 2.5 English words per second; 1–3 sentences per turn.\n\n## 5. Fix requests\n\nWhen the user pastes a **fix request** (a list of findings with the ids of the standards, followed by the current files), fix exactly those findings, keep everything else, keep every `id=\"…\"` and `{#…}` unchanged (R-noids), and reply again with the two blocks (R-output). If the request contains only some slides, return only those `<section>` elements in the `deck.html` block (no `<html>`) and only their sections in the `narration.md` block; the editor puts them back in place by id.\n\n## 6. Worked example\n\nA small lesson, fictional, showing the structure only (do not copy its content). Note how the steps add up: the list of 2 items gives steps 1–2 and `[concl]`<!--part:m-flow-->; the `m-flow` with 4 boxes gives steps 1–4<!--/part-->. The static cover has `[0]` only. Some part sets end with an example of their own.\n\n### Common (English, default theme, marks<!--part:m-flow-->, m-flow<!--/part-->)\n\n```deck.html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>How a web page arrives</title>\n</head>\n<body>\n<div id=\"stage\">\n\n<section class=\"slide cover noconcl static\">\n <div class=\"venue\">Computing basics, lesson 1 (a fictional course)</div>\n <h1>How a web page arrives</h1>\n</section>\n\n<section class=\"slide\">\n <h2>Two programs take part</h2>\n <div class=\"body\">\n <p>Opening a page is a conversation between two programs.</p>\n <ul>\n <li id=\"browser\">The <span class=\"term\">browser</span> asks for the page and draws it</li>\n <li id=\"server\">The <span class=\"term\">server</span> keeps the page and sends it back</li>\n </ul>\n </div>\n <div class=\"concl\"><span>Every page load is a request and a reply</span></div>\n</section><!--part:m-flow-->\n\n<section class=\"slide\">\n <h2>From the address to the screen</h2>\n <div class=\"body\">\n <m-flow style=\"height:300px\" aria-label=\"Four stages: type the address, send a request, send the page back, draw the page\">\n <script type=\"application/json\">{\"nodes\": [\n {\"id\": \"a\", \"label\": \"Type the\\naddress\", \"x\": 10, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 1},\n {\"id\": \"b\", \"label\": \"Send a\\nrequest\", \"x\": 315, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 2},\n {\"id\": \"c\", \"label\": \"Send the\\npage back\", \"x\": 620, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 3, \"tone\": \"term\"},\n {\"id\": \"d\", \"label\": \"Draw the\\npage\", \"x\": 925, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 4, \"tone\": \"emph\"}\n ], \"edges\": [\n {\"from\": \"a\", \"to\": \"b\"}, {\"from\": \"b\", \"to\": \"c\"}, {\"from\": \"c\", \"to\": \"d\"}\n ]}</script>\n </m-flow>\n </div>\n <div class=\"concl\"><span>A slow page is slow in one of these four stages</span></div>\n</section><!--/part-->\n\n</div>\n</body>\n</html>\n```\n\n```narration.md\n# Narration: How a web page arrives\n\n## How a web page arrives\n[0] Today we follow a web page on its way from a server to your screen.\n\n## Two programs take part\n[0] Opening a page is a conversation between two programs.\n[1] {mark:browser}The browser is the program you look at. It asks for the page and then draws it.\n[2] {mark:server}The server is a program on another computer. It keeps the page and sends it back when asked.\n[concl] Every page load is a request and a reply.<!--part:m-flow-->\n\n## From the address to the screen\n[0] Let us put the steps in order.\n[1] First you type the address of the page.\n[2] The browser turns it into a request and sends it to the server.\n[3] The server finds the page and sends it back.\n[4] The browser draws the page on the screen.\n[concl] When a page is slow, one of these four stages is taking the time.<!--/part-->\n```",
797
845
  "request": "# What I want\n\n*(Fill in A or B and delete the other; delete fields you leave empty.)*\n\n**A. Make a new lesson**\n\n- Title (used as is on the cover):\n- Audience:\n- Length (slides or minutes):\n- Language:\n- Speakers: one narrator\n- Other wishes:\n\n**B. From the material and discussion in this chat**\n\nMake the lesson from the material given in this chat and what we have discussed so far.\n\n- Title (used as is on the cover):\n- Audience:\n- Length (slides or minutes):\n- Language:\n- Speakers: one narrator\n- Other wishes:",
798
846
  "sets": {
799
847
  "stats": "## Part set: stats (statistics charts)\n\nFor lessons and talks with data: distributions, box plots, heatmaps, and a distribution updated one observation at a time. Use the `default` theme. Give the source and the size of every data set on the slide or in the script, and never invent data that looks real (R-components).\n\n- **Axis charts** (<!--part:m-hist-->`m-hist`, <!--/part--><!--part:m-boxplot-->`m-boxplot`, <!--/part--><!--part:m-seq-->`m-seq`, <!--/part-->and the like) reserve 86 px at the left and 80 px in all at the top and bottom for ticks and axis names: give them a height of **300–380 px** and a width of **at least 560 px** (in `<div class=\"cols\">`, give the chart column at least 55%).\n- Make the axis ranges contain every plotted value (computed as R-components says).\n\nParts of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
@@ -815,8 +863,9 @@ export const PACK = {
815
863
  },
816
864
  "m-bars": {
817
865
  "set": "standard",
818
- "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}` |",
819
- "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"
866
+ "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[],err?:num\\|any[],step?,at?,tone?} (value or values),…],sig?:{from:int,to:int,group?:int,label?,step?}[],series?:{label?,tone?}[],scale?:{step,max?:num,at?}[],max?:num}` |",
867
+ "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| `mark` | string | `\"bar\"` | bar or dot (a point with its error bar) |\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- err: ± number or `[low, high]`; per series for `values`\n- sig: `[{\"from\": 0, \"to\": 2, \"label\": \"**\"}]` brackets groups 0 and 2 (`group`: series in a group); vertical, unstacked only\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",
868
+ "free": "### `<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| `mark` | string | `\"bar\"` | bar or dot (a point with its error bar) |\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"
820
869
  },
821
870
  "m-boxplot": {
822
871
  "set": "stats",
@@ -824,11 +873,21 @@ export const PACK = {
824
873
  "entry": "### `<m-boxplot>`\n\nData example (child `<script type=\"application/json\">`): `{\"groups\":[{\"label\":\"1 組\",\"values\":[3,5,6,7,8,9,10,12,13,15,18]}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `orient` | string | `\"h\"` | h(横向きの箱、値の軸が横)か v(縦向き) |\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| `method` | string | `\"jp\"` | 四分位数の求め方:jp(教科書)・inc・exc(表計算の QUARTILE.INC / EXC) |\n| `outliers` | string | `\"off\"` | on:1.5×四分位範囲の外を外れ値(点)にし、ひげはその内側まで |\n| `dots` | string | `\"off\"` | on:値の点を箱の下に並べる(build=\\ |\n| `build` | string | `\"steps\"` | steps(求める手順のとおり)か whole(群 1 つ = 1 ステップ) |\n| `unit` | string | `\"\"` | 書き出す値の後ろに付ける単位 |\n| `digits` | number | | 書き出す値の小数桁(書かなければ値の桁+1 まで) |\n\n値の代わりに `\"five\": [最小値, 第1四分位数, 中央値, 第3四分位数, 最大値]` も書ける。\n\n- `orient`:`h`(既定)か `v`\n- `method`:`jp`(既定、教科書)・`inc`・`exc`(表計算の QUARTILE.INC / EXC)\n- `outliers=\"on\"`:1.5×四分位範囲の外を外れ値の点に\n- `dots=\"on\"`:値の点を並べる\n- 群が 1 つの steps では、並べた値の行も出る",
825
874
  "sup": true
826
875
  },
876
+ "m-callout": {
877
+ "set": "tools",
878
+ "row": "| `<m-callout>` | Screen steps: numbered circles on a screenshot, joined by leader lines to labels beside it, one per step | max callout step (default 1 callout = 1 step) | `{callouts:{x:num,y:num,text:str,box?:[num,num,num,num],step?,at?}[]}` |",
879
+ "entry": "### `<m-callout>`\n\nData example (child `<script type=\"application/json\">`): `{\"callouts\":[{\"x\":0.12,\"y\":0.08,\"text\":\"Open the menu\"},{\"x\":0.7,\"y\":0.62,\"text\":\"Press Send\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `side` | string | `\"right\"` | labels on right, left or both |\n| `label-width` | number | `0.32` | label column (share of width) |\n| `per-step` | number | `1` | callouts per step (0 = all) |\n| `size` | number | `28` | label px (≥ 24) |\n\nFor training and how-to guides: where to click, in order.\n\nThe screenshot is a child `<img src alt width height>` (the build inlines it).\n\n- **Never show real personal data on a screenshot** (names, ID numbers, resident or patient records). Use made-up data, or blur it.\n- `alt`, `width` and `height` (px) are required (else data); an image over 1 MiB is size.\n\n; callout: `x`, `y` (0–1 of the image), `text`, `box` (`[x, y, w, h]`, highlighted during its step), `step`, `at`."
880
+ },
827
881
  "m-cards": {
828
882
  "set": "standard",
829
883
  "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?}[]}` |",
830
884
  "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"
831
885
  },
886
+ "m-checklist": {
887
+ "set": "tools",
888
+ "row": "| `<m-checklist>` | A checklist: items listed, one mark (✓ or ×) drawn per step. The marks are slide content; nothing a viewer does is stored | max item step (default 1 item = 1 step) | `{items:{label,note?,mark?:\"check\"\\|\"cross\"\\|\"none\",step?,at?}[]}` |",
889
+ "entry": "### `<m-checklist>`\n\nData example (child `<script type=\"application/json\">`): `{\"items\":[{\"label\":\"Name badge on\"},{\"label\":\"Hands washed\",\"note\":\"30 s\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `reveal` | bool | `false` | items appear with their step |\n| `per-step` | number | `1` | items per step (0 = all) |\n| `size` | number | `32` | label px (≥ 24) |\n\nFor checks done one at a time: training steps, checks before work, what to bring.\n\n- item: `label` (`\\n` = 2 lines), `note`, `mark` (`check`, `cross`, `none`), `step`, `at`\n- The marks are the author's; a viewer cannot tick them and nothing is stored."
890
+ },
832
891
  "m-ci": {
833
892
  "set": "data",
834
893
  "row": "| `<m-ci>` | Repeated z intervals | Axis → intervals → coverage (3) | `{mu:num,sigma:num,n:num,reps?:num,level?:num,seed?:num}` |",
@@ -854,6 +913,11 @@ export const PACK = {
854
913
  "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?}[]}` |",
855
914
  "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"
856
915
  },
916
+ "m-diverge": {
917
+ "set": "business",
918
+ "row": "| `<m-diverge>` | Waterfall: a baseline bar, then increases and decreases stacked from the previous bar's end, then a total bar | max item step (default 1 bar = 1 step) | `{items:{label,value?:num,total?:bool,tone?,step?,at?}[]}` |",
919
+ "entry": "### `<m-diverge>`\n\nData example (child `<script type=\"application/json\">`): `{\"items\":[{\"label\":\"Last year\",\"value\":120,\"total\":true},{\"label\":\"Sales\",\"value\":45},{\"label\":\"Costs\",\"value\":-30},{\"label\":\"This year\",\"total\":true}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `unit` | string | `\"\"` | value unit |\n| `digits` | number | `0` | decimals |\n| `per-step` | number | `1` | bars per step (0 = all) |\n| `min` | number | `0` | axis start (0 = from 0; > 0 cuts the axis, with a break mark) |\n| `ticks` | bool | `true` | ticks and grid |\n| `links` | bool | `true` | dotted links between bars |\n| `al` | string | `\"\"` | axis title |\n\nFor what was added and taken away between a baseline and a total: profit bridges, budget against actual, population change.\n\n- item: `label` (`\\n` = 2 lines), `value`, `total` (true = a total bar from 0), `tone`, `step`, `at`\n- The first total's `value` is the baseline; change bars start at the running total; a later total's `value` is checked (data)\n- `min`: axis start for small changes on large values (break mark)"
920
+ },
857
921
  "m-fishbone": {
858
922
  "set": "standard",
859
923
  "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) |",
@@ -1032,7 +1096,7 @@ export const PACK = {
1032
1096
  "extHead": "### `<{name}>`: extension for this part set (the part is described in §3)"
1033
1097
  },
1034
1098
  "ja": {
1035
- "common": "# AI への指示\n\n指示のバージョン:`f086a47b`\n\n短い **Egatari の教材**を 1 つ書いてください。ステップごとに出る HTML のスライド(`deck.html`)と台本(`narration.md`)で、どちらも自動で組まれ、品質チェックを受けます。ここにないものは使えません。教材は頼まれた言語で書きます(スライドと台本は同じ言語)。規格には **R-fit** のような名前があり、修正依頼は破った規格を名前で示します。依頼は最後の **頼みたいこと**(かその前の会話)にあります。空の項目やない項目はほどよく決め、A と B が両方残っていれば書き込みのある方に従います。\n\n**よくある失敗:**\n\n- **2 つの灰色の枠(コードブロック)はどちらも最後まで書いて閉じる。**コードブロックの途中で終わらない(R-output)。構成案がなければ、教材は短くする(5〜8 枚)。頼む文に構成案とその範囲があれば、その範囲のスライドをちょうどその枚数だけ書く(エディタは 1 回に 6 枚までしか頼まないので、収まる)\n- **1280×720 のスライドの大きさ**(品質チェックが測る。R-fit):本文の場所は 1184 × 443 px(565 px まで。`noconcl` なら 1184 × 558)。字は 32 px・1 行 46 px で、入るのは**およそ 8 行**。はみ出す 46 px ごとに 1 行を削る。**図やパーツの中も含め、字はすべて 24 px 以上**\n- **グラフと図:**パーツは大きさによらず字を 24〜28 px で描くので、決めるのはパーツの大きさ(R-fit)\n- **その場で書く `<svg>`:**字は「表示の幅 ÷ viewBox の幅」で縮むので、viewBox を表示の画素で書く(`<svg viewBox=\"0 0 560 320\" width=\"560\" height=\"320\">`)。`font-size` は 24 以上。`width:100%` と別の幅の viewBox を組み合わせない。合うパーツがあればパーツを使う\n\n## 1. 出力の形\n\n- **R-output** 返事は**ちょうど 2 つのコードブロック**にし、この順で、名前を `deck.html` と `narration.md` にする(始まりの行は ```` ```deck.html ```` と ```` ```narration.md ````)。間には何も書かない(前後に 1 行の添え書きはよい)。1 つのファイルを複数のコードブロックに分けない。ファイル・キャンバス・添付にせず、返事の本文に書く。ほかのファイルを参照しない(画像・`{{FIG:…}}`・`{{JSON:…}}`・外の URL・`<link>` は使わない)。コードブロックの途中で終わらない(長すぎるなら枚数を減らす。ただし構成案の範囲を頼まれたら、ちょうどその枚数)\n- **R-outline** **構成案だけ**を頼まれたら(長い教材を 2 回に分けて作るとき)、`outline` という名前のコードブロック 1 つ(始まりの行は ```` ```outline ````)だけで返し、`deck.html` と `narration.md` は書かない:列が「番号」「見出し」「要点(1 行)」の Markdown の表で、スライドごとに 1 行、全スライドを順に。その後の頼む文は範囲を示す(「構成案の 7〜12 枚目」)ので、その見出しと要点のとおりに、ちょうどそのスライドを書く\n- **R-noids** スライドの id を**書かない**。`<section class=\"slide\">` に `id` を付けず、台本の見出しにも `{#…}` を付けない。id は取り込みでエディタが付ける。id のある教材を渡されたとき(修正依頼)は、今ある `id=\"…\"` と `{#…}` をそのまま残す\n\n## 2. deck.html\n\n### 2.1 骨組み\n\n```html\n<!DOCTYPE html>\n<html lang=\"ja\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>教材の題名</title>\n</head>\n<body>\n<div id=\"stage\">\n <section class=\"slide cover noconcl static\"> … </section>\n <section class=\"slide\"> … </section>\n</div>\n</body>\n</html>\n```\n\n- `lang`:`ja`・`en` など(教材の言語)。`data-theme`:ビジネス・ピッチは `sumi`、国語は `kokugo`、ほかは `default`\n- `<script>` はパーツのデータ(§2.6)だけ。`<style>` は配置(大きさ・間隔)だけに使い、色は書かない\n\n### 2.2 スライド\n\n- 普通のスライド:`<h2>` の見出し、`<div class=\"body\">…</div>`、`<div class=\"concl\"><span>…</span></div>`(結論の行。短い 1 文)\n- 肩見出し(見出しの上の短い言葉)を添えるなら、`<h2>` の直前に `<p class=\"kicker\">` を 1 つ置く(普通のスライドだけ。`layout-tate` には置かない)。見出しには含めず、ステップ 0 で見せる。英語はテーマが大文字で表示するので、大文字で書かない。\n- 表紙:`<section class=\"slide cover noconcl static\">` に、あれば `<div class=\"venue\">…</div>`、`<h1>題名</h1>`、あれば `<div class=\"au\">…</div>`\n- 章の扉:`<section class=\"slide sec noconcl static\"><h1>章の題</h1></section>`\n- `<section>` の class:`noconcl`(結論の行なし)、`static`(ステップなし)、`nostep`(箇条書きも初めから全部)、`layout-tate`(縦書き。kokugo の束があるときだけ)、属性 `data-morph`(§2.5)\n- `.body` の中:`<p class=\"sub\">` 小見出し、`<div class=\"big\">` 主要な式、`<p class=\"note\">` 補足、`<div class=\"thm\">` 定理の枠、`<div class=\"cols\">` 横並び、普通の `<p>` `<ul>` `<ol>` `<table>`\n- 字の強調(色を付ける唯一の方法):`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 まで)。入らなければスライドを分ける。字を縮めず、字の大きさを書かない\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```",
1099
+ "common": "# AI への指示\n\n指示のバージョン:`7aef902d`\n\n短い **Egatari の教材**を 1 つ書いてください。ステップごとに出る HTML のスライド(`deck.html`)と台本(`narration.md`)で、どちらも自動で組まれ、品質チェックを受けます。ここにないものは使えません。教材は頼まれた言語で書きます(スライドと台本は同じ言語)。規格には **R-fit** のような名前があり、修正依頼は破った規格を名前で示します。依頼は最後の **頼みたいこと**(かその前の会話)にあります。空の項目やない項目はほどよく決め、A と B が両方残っていれば書き込みのある方に従います。\n\n**よくある失敗:**\n\n- **2 つの灰色の枠(コードブロック)はどちらも最後まで書いて閉じる。**コードブロックの途中で終わらない(R-output)。構成案がなければ、教材は短くする(5〜8 枚)。頼む文に構成案とその範囲があれば、その範囲のスライドをちょうどその枚数だけ書く(エディタは 1 回に 6 枚までしか頼まないので、収まる)\n- **1280×720 のスライドの大きさ**(品質チェックが測る。R-fit):本文の場所は 1184 × 443 px(565 px まで。`noconcl` なら 1184 × 558)。字は 32 px・1 行 46 px で、入るのは**およそ 8 行**。はみ出す 46 px ごとに 1 行を削る。**図やパーツの中も含め、字はすべて 24 px 以上**\n- **グラフと図:**パーツは大きさによらず字を 24〜28 px で描くので、決めるのはパーツの大きさ(R-fit)\n- **その場で書く `<svg>`:**字は「表示の幅 ÷ viewBox の幅」で縮むので、viewBox を表示の画素で書く(`<svg viewBox=\"0 0 560 320\" width=\"560\" height=\"320\">`)。`font-size` は 24 以上。`width:100%` と別の幅の viewBox を組み合わせない。合うパーツがあればパーツを使う\n\n## 1. 出力の形\n\n- **R-output** 返事は**ちょうど 2 つのコードブロック**にし、この順で、名前を `deck.html` と `narration.md` にする(始まりの行は ```` ```deck.html ```` と ```` ```narration.md ````)。間には何も書かない(前後に 1 行の添え書きはよい)。1 つのファイルを複数のコードブロックに分けない。ファイル・キャンバス・添付にせず、返事の本文に書く。ほかのファイルを参照しない(画像・`{{FIG:…}}`・`{{JSON:…}}`・外の URL・`<link>` は使わない)。コードブロックの途中で終わらない(長すぎるなら枚数を減らす。ただし構成案の範囲を頼まれたら、ちょうどその枚数)\n- **R-outline** **構成案だけ**を頼まれたら(長い教材を 2 回に分けて作るとき)、`outline` という名前のコードブロック 1 つ(始まりの行は ```` ```outline ````)だけで返し、`deck.html` と `narration.md` は書かない:列が「番号」「見出し」「要点(1 行)」の Markdown の表で、スライドごとに 1 行、全スライドを順に。その後の頼む文は範囲を示す(「構成案の 7〜12 枚目」)ので、その見出しと要点のとおりに、ちょうどそのスライドを書く\n- **R-noids** スライドの id を**書かない**。`<section class=\"slide\">` に `id` を付けず、台本の見出しにも `{#…}` を付けない。id は取り込みでエディタが付ける。id のある教材を渡されたとき(修正依頼)は、今ある `id=\"…\"` と `{#…}` をそのまま残す\n\n## 2. deck.html\n\n### 2.1 骨組み\n\n```html\n<!DOCTYPE html>\n<html lang=\"ja\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>教材の題名</title>\n</head>\n<body>\n<div id=\"stage\">\n <section class=\"slide cover noconcl static\"> … </section>\n <section class=\"slide\"> … </section>\n</div>\n</body>\n</html>\n```\n\n- `lang`:`ja`・`en` など(教材の言語)。`data-theme`:ビジネス・ピッチは `sumi`、国語は `kokugo`、ほかは `default`\n- `<script>` はパーツのデータ(§2.6)だけ。`<style>` は配置(大きさ・間隔)だけに使い、色は書かない\n\n### 2.2 スライド\n\n- 普通のスライド:`<h2>` の見出し、`<div class=\"body\">…</div>`、`<div class=\"concl\"><span>…</span></div>`(結論の行。短い 1 文)\n- 肩見出し(見出しの上の短い言葉)を添えるなら、`<h2>` の直前に `<p class=\"kicker\">` を 1 つ置く(普通のスライドだけ。`layout-tate` には置かない)。見出しには含めず、ステップ 0 で見せる。英語はテーマが大文字で表示するので、大文字で書かない。\n- 表紙:`<section class=\"slide cover noconcl static\">` に、あれば `<div class=\"venue\">…</div>`、`<h1>題名</h1>`、あれば `<div class=\"au\">…</div>`\n- 章の扉:`<section class=\"slide sec noconcl static\"><h1>章の題</h1></section>`\n- `<section>` の class:`noconcl`(結論の行なし)、`static`(ステップなし)、`nostep`(箇条書きも初めから全部)、`layout-tate`(縦書き。kokugo の束があるときだけ)、属性 `data-morph`(§2.5)\n- `.body` の中:`<p class=\"sub\">` 小見出し、`<div class=\"big\">` 主要な式、`<p class=\"note\">` 補足、`<div class=\"thm\">` 定理の枠、`<div class=\"cols\">` 横並び、普通の `<p>` `<ul>` `<ol>` `<table>`\n- **R-caution** `.body` に注意は `<div class=\"caution\">…</div>`、警告は `class=\"caution warn\"`。ラベルは自動で付く。\n- 字の強調(色を付ける唯一の方法):`term`(用語・問い)、`emph`(結論・問題・目標)、`muted`(既知の結果・控えめ)、`b`(太字)\n- **R-headings** スライドの見出し(表紙と扉は `h1`、ほかは `h2`)は**すべて違う**ものにする(同じなら語を足す)。そのスライドの台本の節は `## ` に続けて**見出しとまったく同じ文字列**で始める(`<br>` などのタグは除く)\n- **R-colors** 色はテーマだけで:上の class と式のマクロ `\\hlE` `\\hlT` `\\hlM`。16 進・`rgb()`・色の名前・`\\color`・`\\textcolor` は使わない。パーツや SVG の中では:**色はテーマの CSS 変数だけ**を使う:`var(--fg)` `var(--term)` `var(--emph)` `var(--muted)` `var(--accent2)` `var(--line)`。SVG では属性ではなく `style=\"stroke:var(--emph)\"` で書く(`DECK.el` は `fill` `stroke` に `var(` があれば自動で style に回す)\n\n### 2.3 ステップ(出す順 = 話す順)\n\n- **R-steps** ステップ 0 は現れたときの姿で、文脈だけ(見出し・小見出し・導入の 1 文)。`data-step=\"k\"`(k = 1, 2, …)の要素はステップ k で現れる。材料(箇条書きの項目・式・表の行・図の部分)は話す順に出す。式とそれを導く 1 文は同じステップ(`<div data-step=\"k\">` で一緒に囲む)。1 枚のステップの数は 5 前後まで\n- 結論の行は自動で**最後のステップ** `concl` になる(`data-step` を付けない)\n- `data-step` が 1 つもないスライドでは、上の階層の箇条書きの項目(`.body > ul > li`・`.body > ol > li`)に 1, 2, … が自動で付く。1 つでもあれば自動にならないので、出すものすべてに付ける\n- パーツは自分のステップを足す(§3)。`data-from`(既定 1)から始まる\n- つまりステップは `0 … max` と、結論の行があれば `concl`。`static` のスライドはステップ 0 だけ\n\n### 2.4 数式(KaTeX)\n\n- **R-math** 行内は `\\( … \\)`、別行は `\\[ … \\]`。式の中の `<` は `\\lt`、`>` は `\\gt`。標準のほかに使えるマクロ:`\\hlE{…}`(emph)`\\hlT{…}`(term)`\\hlM{…}`(muted)、`\\htmlId{ID}{…}`、`\\htmlData{mark=ID}{…}`、`\\htmlClass{…}{…}`、`\\morph{ID}{…}`。`\\newcommand` と `\\color` は使わない。記号は最初に使う所で定義する(`\\(\\mu\\)`:母平均)\n\n### 2.5 強調とモーフ\n\n- **R-marks** 台本の `{mark:ID}`(§4)は、**同じスライド**の目印に印を付ける。目印:スライドの中の `id=\"ID\"` か `data-mark=\"ID\"` の要素。式の一部は KaTeX の `\\htmlId{ID}{…}` / `\\htmlData{mark=ID}{…}`(build はこの 2 つと `\\htmlClass` だけを許す)。同じ ID を何枚かで使うなら `data-mark` にする(id は文書の中で一意に)\n- モーフ(なくてよい):`<section class=\"slide\" data-morph>` は前のスライドの要素を今の位置へ滑らせる。両方のスライドの要素に同じ `data-id=\"…\"`、式の一部は両方に `\\morph{ID}{…}`。ステップ 0 で見えている要素だけが動く\n\n### 2.6 パーツ\n\n- **R-components** 動く図は一覧(§3)の Web Components `<m-…>` で、`.body` の中に置く。どれにも高さ(`style=\"height:380px\"`)と `aria-label` を付ける。データは子の `<script type=\"application/json\">…</script>` **1 つ**にその場で書く。**図の数字は正しく**(計算する。見た目のために値を作らない。架空の数字は架空と書く)。関数の式は算術の式だけで、コードとしては実行されない(`Math.exp(x)`・`x**2`)。動きが説明になる所だけに使う(たいていのスライドには要らない)\n\n### 2.7 表し方を選ぶ\n\n- **R-purpose** 表し方は習慣でなく、そのスライドで言いたいことから選ぶ。作者がグラフの種類を言っていればそれに従う。表は全パーツの一覧を兼ねる。使うのは渡された文章にあるパーツだけ(§3 と、入っている束)。入っていないパーツの方が合うときは、1 行のメモでそう伝える\n\n{{PURPOSES}}\n\n- **R-whole** 箇条書き・数字の札・円グラフは全体を一度に見せる。台本が 1 つずつ取り上げるときだけ 1 行ずつ出す(箇条書きなら全体に 1 つの `data-step` を付けるか、スライドに `nostep`)\n\n### 2.8 スライドに収める(品質チェックのエラー)\n\n- **R-title** 見出し:日本語は 26 字まで(全角 1・半角 0.5)、英語は 60 文字まで。コロンで終えない\n- **R-concl** 結論の行:日本語は 35 字まで、英語は 70 文字まで。1 行\n- **R-fit** 本文は 565 px(`noconcl` なら 680 px)より上で終える:1 枚におよそ 8 行・100 字・英語 60 語、または `big` の式 1 つと短い箇条書き 3 つ、または高さ 380 px までのパーツと短い 1 行(2 行なら 330 px まで)。入らなければスライドを分ける。字を縮めず、字の大きさを書かない\n- **R-style** 日本語のスライドは常体(だ・である、体言止め)で、です・ます を使わない。句読点は教材全体で 1 つの組(`、。` か `,.`)。英語のスライドは短い句で\n\n## 3. パーツの一覧\n\nどの教材でも使える標準のパーツ。§6 の後に束の指示があれば、その種類の材料のパーツが加わる。「steps」はパーツが使うスライドのステップの数(`data-from` から。既定 1)。秒で測る属性(動きの長さ・ずれ)は載せない(既定で台本に合う)。型が json の属性は、値に JSON を書く(`values=\"[0.1,0.5]\"`)。「データの形」の `?` は省略できる欄。型を書いていない label・tex・note・tone は str、step は int、at は num。名前やラベルの `*…*` は斜体、`_` `^` は次の 1 字だけ下付き・上付き。記号のまま出すなら全角の _ ^ *。\n\n{{CATALOG}}\n\n## 4. narration.md\n\n```markdown\n# 台本:<教材の題名>\n\n## 減衰の式\n[0] 減衰の式です。時刻ごとに残っている原子の数を考えます。\n[1] 残る数は、はじめの数に、時間とともに小さくなる指数関数を掛けたものです。\n[2] {mark:n0|circle}{N₀|エヌゼロ} は、時刻ゼロのときの、はじめの数です。\n[concl] 半分になるまでの時間は、崩壊定数だけで決まります。\n```\n\n- スライドごとに 1 つの節を、**スライドの順に、すべてのスライド(表紙も)について**:`## <スライドの見出し>`(R-headings)。`{#id}` は付けない(R-noids)\n- **R-narr-steps** ステップの指定は `[0]` `[1]` … と `[concl]`。**どのスライドのどのステップにも台本を書き**(ステップ 0 から max まで、結論の行があれば `[concl]`)、**ないステップの指定は書かない**(`static` の表紙は `[0]` だけ。結論の行がなければ `[concl]` もない。`[01]` とは書かない)。ステップの中では、そのステップで現れるものだけを話す\n- **R-dialogue** **既定は話者 1 人**で、話者名を書かない。掛け合いは頼まれたときだけ(3 人以上を頼まれても 2 役にし、最初にそう書く):行を `Expert:` か `Novice:` で始め(続きの行は字下げ。話者なしは Expert)、認知的徒弟制の形にする:\n - Novice は相づち役にせず、学習者の疑問を代弁するか、「つまり〜ということですか」と言い換える\n - Expert は答えて具体例か比喩を 1 つ足すか、言い換えを確かめて(違えば直して)1 歩進める\n - 理解の分かれ目(誤解しやすい所、「なぜ」が残る所)にだけ、1 枚に 1 回・2〜3 発言まで。ほかは Expert 1 人\n - 「なるほど」だけの発言、前の発言のくり返しは書かない。例:`Novice: つまり、大きいほど早く着くのですか。` `Expert: いつもではありません。大きすぎると谷を飛び越えます。大股で坂を下りすぎて、向こうの斜面に足が着くように。`\n- `{note:…}` 発表者用\n- `{cue}`:ステップの中の同期点。パーツの `cues(k)` の 1 つに 1 つ(パーツの説明が求めるときだけ)\n- `{mark:ID}`・`{mark:ID|効果}`・`{mark:ID|効果|hold=秒}`・`{mark:clear}`:目印のことを言う言葉の**すぐ前**に置く。1 ステップに 1〜2 個まで。言葉でも言う。効果:`underline`(既定。手描きの下線を左から右へ)、`circle`(手描きの囲み)、`box`(角丸の枠)、`spot`(対象のまわり以外を背景色で薄くする)、`laser`(光の点が対象の下へ滑ってきて少し留まる)\n- **R-reading** `{表示|読み}` は **1 つの記号か 1 つの用語**の読み:`{θ|シータ}`、`{N₀|エヌゼロ}`、`{論語|ろんご}`。1 つの記号に星・プライム・添え字・ハットやバーが付いていてもよい(`{Q*|キュースター}`、`{θ̂|シータハット}`)。表示は普通の文字で書き、LaTeX にせず、式やいくつもの記号にしない(`{1-η|…}`・`{θとη|…}` は誤り:記号ごとに読みを付け、関係は言葉で言う)。読みは読みなしで読み違える語にだけ付ける(かなの読みは抑揚を崩しやすい)。読みは書いた所にだけ当たるので、付けた語がまた出てくるなら、出てくる所ごとに付ける\n- **R-formula** **式を読み上げない**:台本に LaTeX・`\\`・`^`・`_`・`a + b = c` のような文字列を書かない。式の意味を言葉で言う(§4 の見本の [1])\n- 日本語の台本は話し言葉の です・ます。英語は話し言葉の英語。目安は 1 秒に日本語 5 字・英語 2.5 語。1 回の発言は 1〜3 文\n\n## 5. 修正依頼\n\n利用者が**修正依頼**(規格の名前の付いた指摘の一覧と、今のファイル)を貼り付けたら、その指摘だけを直し、ほかは変えず、`id=\"…\"` と `{#…}` をすべてそのまま残し(R-noids)、また 2 つのコードブロックで返す(R-output)。依頼に一部のスライドしかなければ、そのスライドの `<section>` だけ(`<html>` なし)とその節だけを 2 つのコードブロックで返す(エディタが id で元の場所に戻す)。\n\n## 6. 見本\n\n小さな教材の見本(架空。形を見るためで、中身は写さない)。ステップの数え方:2 項目の箇条書きはステップ 1〜2 と `[concl]`<!--part:m-flow-->、箱が 4 つの `m-flow` はステップ 1〜4<!--/part-->。いくつかの束の指示の最後にも見本がある。\n\n### 共通(英語・default テーマ・強調<!--part:m-flow-->・m-flow<!--/part-->)\n\n```deck.html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>How a web page arrives</title>\n</head>\n<body>\n<div id=\"stage\">\n\n<section class=\"slide cover noconcl static\">\n <div class=\"venue\">Computing basics, lesson 1 (a fictional course)</div>\n <h1>How a web page arrives</h1>\n</section>\n\n<section class=\"slide\">\n <h2>Two programs take part</h2>\n <div class=\"body\">\n <p>Opening a page is a conversation between two programs.</p>\n <ul>\n <li id=\"browser\">The <span class=\"term\">browser</span> asks for the page and draws it</li>\n <li id=\"server\">The <span class=\"term\">server</span> keeps the page and sends it back</li>\n </ul>\n </div>\n <div class=\"concl\"><span>Every page load is a request and a reply</span></div>\n</section><!--part:m-flow-->\n\n<section class=\"slide\">\n <h2>From the address to the screen</h2>\n <div class=\"body\">\n <m-flow style=\"height:300px\" aria-label=\"Four stages: type the address, send a request, send the page back, draw the page\">\n <script type=\"application/json\">{\"nodes\": [\n {\"id\": \"a\", \"label\": \"Type the\\naddress\", \"x\": 10, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 1},\n {\"id\": \"b\", \"label\": \"Send a\\nrequest\", \"x\": 315, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 2},\n {\"id\": \"c\", \"label\": \"Send the\\npage back\", \"x\": 620, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 3, \"tone\": \"term\"},\n {\"id\": \"d\", \"label\": \"Draw the\\npage\", \"x\": 925, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 4, \"tone\": \"emph\"}\n ], \"edges\": [\n {\"from\": \"a\", \"to\": \"b\"}, {\"from\": \"b\", \"to\": \"c\"}, {\"from\": \"c\", \"to\": \"d\"}\n ]}</script>\n </m-flow>\n </div>\n <div class=\"concl\"><span>A slow page is slow in one of these four stages</span></div>\n</section><!--/part-->\n\n</div>\n</body>\n</html>\n```\n\n```narration.md\n# Narration: How a web page arrives\n\n## How a web page arrives\n[0] Today we follow a web page on its way from a server to your screen.\n\n## Two programs take part\n[0] Opening a page is a conversation between two programs.\n[1] {mark:browser}The browser is the program you look at. It asks for the page and then draws it.\n[2] {mark:server}The server is a program on another computer. It keeps the page and sends it back when asked.\n[concl] Every page load is a request and a reply.<!--part:m-flow-->\n\n## From the address to the screen\n[0] Let us put the steps in order.\n[1] First you type the address of the page.\n[2] The browser turns it into a request and sends it to the server.\n[3] The server finds the page and sends it back.\n[4] The browser draws the page on the screen.\n[concl] When a page is slow, one of these four stages is taking the time.<!--/part-->\n```",
1036
1100
  "request": "# 頼みたいこと\n\n*(A か B を埋め、もう一方は消します。書かない項目は消してかまいません)*\n\n**A. 新しく作る**\n\n- タイトル(表紙にそのまま使う):\n- 対象(だれ向け):\n- 長さ(枚数か分):\n- 言語:\n- 話者:1 人\n- そのほかの希望:\n\n**B. 渡した資料と話し合いの内容で作る**\n\nこのチャットで渡した資料と、ここまでの話し合いの内容で、教材を作ってください。\n\n- タイトル(表紙にそのまま使う):\n- 対象(だれ向け):\n- 長さ(枚数か分):\n- 言語:\n- 話者:1 人\n- そのほかの希望:",
1037
1101
  "sets": {
1038
1102
  "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}}",
@@ -1054,8 +1118,9 @@ export const PACK = {
1054
1118
  },
1055
1119
  "m-bars": {
1056
1120
  "set": "standard",
1057
- "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}` |",
1058
- "entry": "### `<m-bars>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"series\":[{\"label\":\"売上\"}],\"groups\":[{\"label\":\"1 年目\",\"value\":1.2},{\"label\":\"2 年目\",\"value\":3.4}]}`\n\n| 値 | 型 | 既定 | 意味 |\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 つまでにする"
1121
+ "row": "| `<m-bars>` | 棒をステップごとに 0 から伸ばす(縦棒・横棒・組の棒・積み上げ棒)。値の軸の上限をステップで広げて「軸を突き抜ける伸び」も見せられる | 組の step と scale の step の最大(既定は組 1 つ = 1 ステップ。per-step で n 組ずつ) | `{groups:[{label?,value?:num,values?:num[],err?:num\\|any[],step?,at?,tone?} (value or values),…],sig?:{from:int,to:int,group?:int,label?,step?}[],series?:{label?,tone?}[],scale?:{step,max?:num,at?}[],max?:num}` |",
1122
+ "entry": "### `<m-bars>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"series\":[{\"label\":\"売上\"}],\"groups\":[{\"label\":\"1 年目\",\"value\":1.2},{\"label\":\"2 年目\",\"value\":3.4}]}`\n\n| 値 | 型 | 既定 | 意味 |\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| `mark` | string | `\"bar\"` | bar(棒)か dot(点。平均と誤差棒を、0 からの棒にせずに見せる) |\n\n年ごとの売上・費用、聞き取りの結果の順位、導入の前と後の比較など、量を 1 つずつ見せて比べるときに使う。\n\n- group:`label`(`\\n` で 2 行)、`value`(系列が 1 つ)か `values`(系列の数だけ)、`err`(誤差棒)、`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- `err`:± 数か `[下, 上]`(区間の端)。`values` の組では系列ごと。何の区間かは見出しか脚注に書く\n- `mark=\"dot\"`:棒の代わりに点(平均と誤差棒)\n- `sig`:`[{\"from\": 0, \"to\": 2, \"label\": \"**\"}]` で組 0 と組 2 を括弧でつなぐ(`group` で組の中の系列どうし)。縦棒の、積み上げでない棒だけ\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 つまでにする",
1123
+ "free": "### `<m-bars>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"series\":[{\"label\":\"売上\"}],\"groups\":[{\"label\":\"1 年目\",\"value\":1.2},{\"label\":\"2 年目\",\"value\":3.4}]}`\n\n| 値 | 型 | 既定 | 意味 |\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| `mark` | string | `\"bar\"` | bar(棒)か dot(点。平均と誤差棒を、0 からの棒にせずに見せる) |\n\n年ごとの売上・費用、聞き取りの結果の順位、導入の前と後の比較など、量を 1 つずつ見せて比べるときに使う。\n\n- group:`label`(`\\n` で 2 行)、`value`(系列が 1 つ)か `values`(系列の数だけ)、`err`(誤差棒)、`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- `mark=\"dot\"`:棒の代わりに点(平均と誤差棒)\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 つまでにする"
1059
1124
  },
1060
1125
  "m-boxplot": {
1061
1126
  "set": "stats",
@@ -1063,11 +1128,21 @@ export const PACK = {
1063
1128
  "entry": "### `<m-boxplot>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"groups\":[{\"label\":\"1 組\",\"values\":[3,5,6,7,8,9,10,12,13,15,18]}]}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `orient` | string | `\"h\"` | h(横向きの箱、値の軸が横)か v(縦向き) |\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 | `\"\"` | 横軸の名前(`*斜体*` `_下付き` `^上付き`) * |\n| `yl` | string | `\"\"` | 縦軸の名前 * |\n| `method` | string | `\"jp\"` | 四分位数の求め方:jp(教科書)・inc・exc(表計算の QUARTILE.INC / EXC) |\n| `outliers` | string | `\"off\"` | on:1.5×四分位範囲の外を外れ値(点)にし、ひげはその内側まで |\n| `dots` | string | `\"off\"` | on:値の点を箱の下に並べる(build=\\ |\n| `build` | string | `\"steps\"` | steps(求める手順のとおり)か whole(群 1 つ = 1 ステップ) |\n| `unit` | string | `\"\"` | 書き出す値の後ろに付ける単位 |\n| `digits` | number | | 書き出す値の小数桁(書かなければ値の桁+1 まで) |\n\n値の代わりに `\"five\": [最小値, 第1四分位数, 中央値, 第3四分位数, 最大値]` も書ける。\n\n- `orient`:`h`(既定)か `v`\n- `method`:`jp`(既定、教科書)・`inc`・`exc`(表計算の QUARTILE.INC / EXC)\n- `outliers=\"on\"`:1.5×四分位範囲の外を外れ値の点に\n- `dots=\"on\"`:値の点を並べる\n- 群が 1 つの steps では、並べた値の行も出る",
1064
1129
  "sup": true
1065
1130
  },
1131
+ "m-callout": {
1132
+ "set": "tools",
1133
+ "row": "| `<m-callout>` | 画面の画像に番号の丸を置き、引き出し線で横の説明につなぐ。ステップごとに 1 つずつ(研修・手引き・操作の説明) | 説明の step の最大(既定は説明 1 つ = 1 ステップ。per-step で n 個ずつ) | `{callouts:{x:num,y:num,text:str,box?:[num,num,num,num],step?,at?}[]}` |",
1134
+ "entry": "### `<m-callout>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"callouts\":[{\"x\":0.12,\"y\":0.08,\"text\":\"メニューを開く\"},{\"x\":0.7,\"y\":0.62,\"text\":\"「送る」を押す\"}]}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `side` | string | `\"right\"` | 説明を置く側:right・left・both(both は画像の左半分の丸を左に、右半分の丸を右に) |\n| `label-width` | number | `0.32` | 説明の列の幅(要素の幅に対する割合。both なら片側の幅) |\n| `per-step` | number | `1` | 1 ステップに出す説明の数(0 = 全部をステップ 1 で) |\n| `size` | number | `28` | 説明の字の大きさ(px、24 以上) |\n\n研修・職員向けの手引き・アプリの使い方で、画面のどこをどの順に操作するかを 1 つずつ見せる。\n\n画像は子の `<img src=\"screens/apply.png\" alt=\"…\" width=\"1280\" height=\"800\">`(作業フォルダの画像。組み立てが教材に埋め込む)。\n\n- **画面の画像に本当の個人の情報を写さない**(名前・番号・住民や患者の記録など)。架空のデータで画面を作るか、ぼかしてから使う\n- `alt`(何の画面か)・`width`・`height`(画像の px)は必ず書く(ないと data)。1 MiB を超える画像は size\n\n- callout:`x`・`y`(丸の位置。画像の幅と高さに対する割合 0〜1)、`text`(説明。`\\n` で改行)、`box`(`[x, y, 幅, 高さ]`、同じ割合。そのステップの間だけ操作する所を `--emph` の枠で囲む)、`step`、`at`\n- 説明は画像の横(`side`:`right`(既定)・`left`・`both`)に、丸の上下の順に並ぶ。重なれば下へずらし、引き出し線どうしは交わらない\n\n注意\n\n- 1 枚に 6 つくらいまで。手順が多ければ画面を分ける\n- 丸が操作する所を隠さず、引き出し線がその上を通らないよう、x・y はボタンや欄の、説明の側の端に置く(side=\"right\" なら右の端)"
1135
+ },
1066
1136
  "m-cards": {
1067
1137
  "set": "standard",
1068
1138
  "row": "| `<m-cards>` | カード(番号の丸・アイコン・見出し・説明)を横一列か 2 段に並べ、ステップごとに出す。矢印で順を、枠の色で強調を見せる | カードの step の最大(既定はカード 1 枚 = 1 ステップ。per-step で n 枚ずつ) | `{cards:{n?:str,icon?:str,title:str,text?:str,step?,tone?}[]}` |",
1069
1139
  "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"
1070
1140
  },
1141
+ "m-checklist": {
1142
+ "set": "tools",
1143
+ "row": "| `<m-checklist>` | 確かめる項目を並べ、ステップごとに 1 つずつ印(✓・×)を描く。印はスライドの中身で、見ている人の操作を保存しない | 項目の step の最大(既定は項目 1 つ = 1 ステップ。per-step で n 個ずつ) | `{items:{label,note?,mark?:\"check\"\\|\"cross\"\\|\"none\",step?,at?}[]}` |",
1144
+ "entry": "### `<m-checklist>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"items\":[{\"label\":\"名札を付けた\"},{\"label\":\"手を洗った\",\"note\":\"30 秒\"}]}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `reveal` | bool | `false` | 項目もそのステップで現れる(false なら項目はステップ 0 から全部見え、印だけがステップごとに付く) |\n| `per-step` | number | `1` | 1 ステップに印を付ける項目の数(0 = 全部をステップ 1 で) |\n| `size` | number | `32` | 項目の字の大きさ(px、24 以上)。メモはその 0.8 倍(24 以上) |\n\n研修の手順の確かめ、作業の前の点検、窓口の持ち物、手術や処置の前の確認など、項目を 1 つずつ確かめていくときに使う。\n\n- item:`label`(`\\n` で 2 行)、`note`(項目の下に小さく書くメモ)、`mark`(`check`(既定)・`cross`・`none`)、`step`、`at`\n- `reveal=\"false\"`(既定):項目はステップ 0 から全部見え、ステップごとに次の項目の箱に印を描く。`reveal=\"true\"`:項目もそのステップで現れ、続けて印を描く\n- 印はスライドの中身(作者が決めた ✓ と ×)。見ている人が押しても変わらず、何も保存しない(学習者のデータを持たない)\n\n注意\n\n- 1 枚に 8 項目くらいまで。それより多ければスライドを分ける\n- 押して印を付ける「できたかな」の一覧ではない(学習者の操作を残すと個人のデータになる)"
1145
+ },
1071
1146
  "m-ci": {
1072
1147
  "set": "data",
1073
1148
  "row": "| `<m-ci>` | 正規標本の区間を重ね、母平均を含む割合で信頼水準を説明する | 軸と μ→区間を順に→含む数と外れの強調(3 ステップ) | `{mu:num,sigma:num,n:num,reps?:num,level?:num,seed?:num}` |",
@@ -1094,6 +1169,11 @@ export const PACK = {
1094
1169
  "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?}[]}` |",
1095
1170
  "entry": "### `<m-cycle>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"center\":{\"label\":\"PDCA\"},\"nodes\":[{\"label\":\"計画\"},{\"label\":\"実行\"},{\"label\":\"評価\"},{\"label\":\"改善\"}]}`\n\n| 値 | 型 | 既定 | 意味 |\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 つ目からの開始時刻を返す"
1096
1171
  },
1172
+ "m-diverge": {
1173
+ "set": "business",
1174
+ "row": "| `<m-diverge>` | 基準の棒から始め、増減の棒を前の棒の端から上下に積んで、最後に合計の棒を立てる(ウォーターフォール) | 棒の step の最大(既定は棒 1 本 = 1 ステップ。per-step で n 本ずつ) | `{items:{label,value?:num,total?:bool,tone?,step?,at?}[]}` |",
1175
+ "entry": "### `<m-diverge>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"items\":[{\"label\":\"前年\",\"value\":120,\"total\":true},{\"label\":\"増加\",\"value\":45},{\"label\":\"減少\",\"value\":-30},{\"label\":\"今年\",\"total\":true}]}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `unit` | string | `\"\"` | 値の単位(数字の後ろに付ける。億円、人、% など) |\n| `digits` | number | `0` | 値の小数桁 |\n| `per-step` | number | `1` | 1 ステップに出す棒の数(0 = 全部をステップ 1 で) |\n| `min` | number | `0` | 値の軸の始まり(0 = 0 から。正の値なら軸をそこから始め、切れ目の印を付ける。棒の端がすべてそれ以上のときだけ) |\n| `ticks` | bool | `true` | 値の軸の目盛りと格子 |\n| `links` | bool | `true` | 隣の棒を累計の高さの点線でつなぐ |\n| `al` | string | `\"\"` | 値の軸の名前 |\n\n前年の利益から今年の利益までの増減の内訳、予算と実績の差の要因、人口の増減(生まれた・亡くなった・転入・転出)など、\n基準から合計までの増減を 1 つずつ見せるときに使う。高さ 400px 以上を目安に置く。\n\n- item:`label`(`\\n` で 2 行)、`value`、`total`(`true` なら合計の棒)、`tone`(`emph` などテーマの変数の名前。棒と値の数字の色)、`step`(既定は per-step から)、`at`(ステップの中の開始秒)\n- 合計の棒(`\"total\": true`)は 0 から伸びる。最初の棒が合計の棒なら、その `value` が基準になる\n- 増減の棒は、前の棒の端(それまでの累計)から `value` の分だけ上(正)か下(負)へ伸びる\n- `min=\"50000\"`:軸の始まり(大きな値の小さな増減のとき。切れ目の印が付く)\n- 後の合計の棒は累計で描く。`value` を書くと累計と合うかを確かめる(合わなければ data)\n\n注意\n\n- 棒が多いと名前が詰まる。10 本くらいまでにし、名前は短く(2 行まで)する\n- 増加と減少の色は良し悪しを表さない(費用の減少も `--emph`)。良し悪しを示したい棒は `tone` で色を変える"
1176
+ },
1097
1177
  "m-fishbone": {
1098
1178
  "set": "standard",
1099
1179
  "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 段まで) |",
@@ -1272,9 +1352,9 @@ export const PACK = {
1272
1352
  "briefNote": "下に説明の節がないパーツは、表の「データの形」のとおりに子の JSON か属性を書き、ほかの属性は既定のままにする。",
1273
1353
  "extHead": "### `<{name}>`:この束の拡張(パーツの説明は §3)"
1274
1354
  },
1275
- "version": "f086a47b",
1355
+ "version": "7aef902d",
1276
1356
  "tiers": {
1277
- "catalogue": "2.8.0",
1357
+ "catalogue": "2.9.1",
1278
1358
  "parts": {
1279
1359
  "m-balance": {
1280
1360
  "tier": "specialized",
@@ -1304,6 +1384,17 @@ export const PACK = {
1304
1384
  "compare"
1305
1385
  ]
1306
1386
  },
1387
+ "m-callout": {
1388
+ "tier": "specialized",
1389
+ "set": "tools",
1390
+ "purposes": [
1391
+ "process"
1392
+ ],
1393
+ "display": {
1394
+ "ja": "画面の手順",
1395
+ "en": "Screen steps"
1396
+ }
1397
+ },
1307
1398
  "m-cards": {
1308
1399
  "tier": "standard",
1309
1400
  "purposes": [
@@ -1311,6 +1402,17 @@ export const PACK = {
1311
1402
  "grouping"
1312
1403
  ]
1313
1404
  },
1405
+ "m-checklist": {
1406
+ "tier": "specialized",
1407
+ "set": "tools",
1408
+ "purposes": [
1409
+ "process"
1410
+ ],
1411
+ "display": {
1412
+ "ja": "確かめる一覧",
1413
+ "en": "Checklist"
1414
+ }
1415
+ },
1314
1416
  "m-ci": {
1315
1417
  "tier": "specialized",
1316
1418
  "set": "data",
@@ -1370,6 +1472,18 @@ export const PACK = {
1370
1472
  "cycle"
1371
1473
  ]
1372
1474
  },
1475
+ "m-diverge": {
1476
+ "tier": "specialized",
1477
+ "set": "business",
1478
+ "purposes": [
1479
+ "deviation",
1480
+ "compare"
1481
+ ],
1482
+ "display": {
1483
+ "ja": "ウォーターフォール",
1484
+ "en": "Waterfall"
1485
+ }
1486
+ },
1373
1487
  "m-fishbone": {
1374
1488
  "tier": "standard",
1375
1489
  "purposes": [
@@ -1788,7 +1902,7 @@ export const PACK = {
1788
1902
  "id": "deviation",
1789
1903
  "label": {
1790
1904
  "ja": "差・増減",
1791
- "en": "Deviation, increase and decrease"
1905
+ "en": "Increase / decrease"
1792
1906
  }
1793
1907
  },
1794
1908
  {
@@ -63,6 +63,9 @@ const LOCAL = {
63
63
  'm-ci': { icon: 'boxplot', desc: { ja: '区間を重ね、母平均を含む割合で信頼水準を示す', en: 'Repeated intervals; the share that contains the mean shows the confidence level' } },
64
64
  'm-folds': { icon: 'matrix', desc: { ja: '検証用の区画を順に替え、誤差と平均を示す', en: 'Rotates the validation fold and shows each error and the mean' } },
65
65
  'm-balance': { icon: 'numberline', desc: { ja: '確率の重りを置き、期待値でつり合う様子を示す', en: 'Probabilities as weights that balance at the expected value' } },
66
+ 'm-callout': { icon: 'callout', desc: { ja: '画面の画像に番号を置き、手順を 1 つずつ説明する', en: 'Numbered marks on a screenshot, explained one step at a time' } },
67
+ 'm-checklist': { icon: 'checklist', desc: { ja: '確かめる項目に 1 つずつ ✓ を付ける', en: 'Items to check, ticked one at a time' } },
68
+ 'm-diverge': { icon: 'waterfall', desc: { ja: '基準から増減を積み上げ、合計まで見せる', en: 'Increases and decreases stacked from a baseline to the total' } },
66
69
  'm-code': { icon: 'syntax', desc: { ja: '短いコードを行ごとに説明し、出力を見せる', en: 'Explains short code line by line, then shows the output' } },
67
70
  };
68
71
  // 名前は manifest の display を先に。display だけあって表にない部品も名前を出す(絵は汎用)