egatari 0.6.8 → 0.6.9-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +2 -2
- package/README.md +2 -2
- package/components.lock.json +84 -3
- package/components2.lock.json +202 -1
- package/kit/check-messages.mjs +5 -0
- package/kit/check.mjs +9 -4
- package/kit/core/check-parity.mjs +62 -0
- package/kit/core/check-source.mjs +56 -0
- package/kit/core/colab-core.mjs +1 -1
- package/kit/core/color-vocab.mjs +8 -2
- package/kit/core/layout-scan.mjs +7 -4
- package/kit/core/llm-pack-assemble.mjs +1 -1
- package/kit/core/llm-pack-data.mjs +185 -9
- package/kit/core/llm-pack.mjs +1 -1
- package/kit/core/narration-lint.mjs +12 -0
- package/kit/core/new-deck.mjs +3 -0
- package/kit/core/part-labels.mjs +6 -0
- package/kit/core/template-text.mjs +5 -3
- package/kit/deck.js +88 -13
- package/kit/instruction-version.json +1 -1
- package/kit/player.json +1 -1
- package/kit/player.lock.json +2 -2
- package/kit/presenter.js +33 -9
- package/kit/tools.js +4 -0
- package/package.json +1 -1
- package/themes/asagi/theme.json +1 -1
- package/themes/asagi/tokens.css +12 -0
- package/themes/business/theme.json +1 -1
- package/themes/business/tokens.css +12 -0
- package/themes/default/README.ja.md +24 -1
- package/themes/default/README.md +24 -1
- package/themes/default/theme.json +1 -1
- package/themes/default/tokens.css +12 -0
- package/themes/kogecha/theme.json +1 -1
- package/themes/kogecha/tokens.css +12 -0
- package/themes/kokugo/theme.json +1 -1
- package/themes/kokugo/tokens.css +12 -0
- package/themes/murasaki/theme.json +1 -1
- package/themes/murasaki/tokens.css +12 -0
- package/themes/sumi/theme.json +1 -1
- package/themes/sumi/tokens.css +12 -0
- package/themes/tokiwa/theme.json +1 -1
- package/themes/tokiwa/tokens.css +12 -0
- package/themes.lock.json +80 -24
- package/vendor/components/CATALOG.md +7 -1
- package/vendor/components/sha256/1298d779fe60ccfc09747fbdba47e2111175bd7fd2385a5b68c8f2644cd267be/README.en.md +23 -0
- package/vendor/components/sha256/1298d779fe60ccfc09747fbdba47e2111175bd7fd2385a5b68c8f2644cd267be/index.js +120 -0
- package/vendor/components/sha256/7aea8341beffcd4ad95c12b7e7e3be3f0f52eb7932d424be9e74e2fbd7339e45/README.en.md +23 -0
- package/vendor/components/sha256/7aea8341beffcd4ad95c12b7e7e3be3f0f52eb7932d424be9e74e2fbd7339e45/index.js +289 -0
- package/vendor/components/sha256/90ed438b40ed8d765348834b2bed2baad9b0053c2168c218335b6d95b9c80283/README.en.md +44 -0
- package/vendor/components/sha256/90ed438b40ed8d765348834b2bed2baad9b0053c2168c218335b6d95b9c80283/index.js +203 -0
- package/vendor/components/sha256/a69ab76ff7d0746d093b4e606d7b113be921cbb156edc16c2ad40aafab280d42/README.en.md +22 -0
- package/vendor/components/sha256/a69ab76ff7d0746d093b4e606d7b113be921cbb156edc16c2ad40aafab280d42/index.js +145 -0
- package/vendor/components/sha256/d75c461bb7b2b1c9a2b6d15bee1e11bcec88ef94931174d6b222cd309f6a0287/README.en.md +24 -0
- package/vendor/components/sha256/d75c461bb7b2b1c9a2b6d15bee1e11bcec88ef94931174d6b222cd309f6a0287/index.js +103 -0
- package/vendor/components/sha256/decb7c026527ea269a401efedcb5d4d56d186074b286d2f94772068bef56b256/README.en.md +31 -0
- package/vendor/components/sha256/decb7c026527ea269a401efedcb5d4d56d186074b286d2f94772068bef56b256/index.js +267 -0
- package/vendor/components/sha256/f13af97d7ebf9893d5783eff27e4e1ce092ccd01783b332ad01aa0d201356548/README.en.md +38 -0
- package/vendor/components/sha256/f13af97d7ebf9893d5783eff27e4e1ce092ccd01783b332ad01aa0d201356548/index.js +266 -0
- package/vendor/components-2/manifest-2.6.0.json +2104 -0
- package/vendor/egatari-spec/SOURCE.json +2 -2
- package/vendor/egatari-spec/schema/egatari-audio.schema.json +21 -0
- package/vendor/themes/asagi/1.1.0/theme.json +14 -0
- package/vendor/themes/asagi/1.1.0/tokens.css +18 -0
- package/vendor/themes/business/1.1.0/theme.json +5 -0
- package/vendor/themes/business/1.1.0/tokens.css +29 -0
- package/vendor/themes/default/1.3.0/theme.json +4 -0
- package/vendor/themes/default/1.3.0/tokens.css +74 -0
- package/vendor/themes/kogecha/1.1.0/theme.json +10 -0
- package/vendor/themes/kogecha/1.1.0/tokens.css +17 -0
- package/vendor/themes/kokugo/1.1.0/theme.json +5 -0
- package/vendor/themes/kokugo/1.1.0/tokens.css +13 -0
- package/vendor/themes/murasaki/1.1.0/theme.json +10 -0
- package/vendor/themes/murasaki/1.1.0/tokens.css +13 -0
- package/vendor/themes/sumi/1.1.0/theme.json +10 -0
- package/vendor/themes/sumi/1.1.0/tokens.css +37 -0
- package/vendor/themes/tokiwa/1.1.0/theme.json +10 -0
- package/vendor/themes/tokiwa/1.1.0/tokens.css +15 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export const PACK = {
|
|
4
4
|
"sets": [
|
|
5
5
|
"stats",
|
|
6
|
+
"data",
|
|
6
7
|
"math",
|
|
7
8
|
"maps",
|
|
8
9
|
"kokugo",
|
|
@@ -420,6 +421,12 @@ export const PACK = {
|
|
|
420
421
|
"m-cards": [
|
|
421
422
|
"process"
|
|
422
423
|
],
|
|
424
|
+
"m-ci": [
|
|
425
|
+
"spread"
|
|
426
|
+
],
|
|
427
|
+
"m-code": [
|
|
428
|
+
"process"
|
|
429
|
+
],
|
|
423
430
|
"m-compare": [
|
|
424
431
|
"compare"
|
|
425
432
|
],
|
|
@@ -429,6 +436,9 @@ export const PACK = {
|
|
|
429
436
|
"m-fishbone": [
|
|
430
437
|
"cause-effect"
|
|
431
438
|
],
|
|
439
|
+
"m-folds": [
|
|
440
|
+
"compare"
|
|
441
|
+
],
|
|
432
442
|
"m-heatmap": [
|
|
433
443
|
"compare",
|
|
434
444
|
"correlation"
|
|
@@ -461,6 +471,9 @@ export const PACK = {
|
|
|
461
471
|
"m-predict": [
|
|
462
472
|
"predict"
|
|
463
473
|
],
|
|
474
|
+
"m-sampling": [
|
|
475
|
+
"spread"
|
|
476
|
+
],
|
|
464
477
|
"m-scatter": [
|
|
465
478
|
"correlation"
|
|
466
479
|
],
|
|
@@ -479,6 +492,7 @@ export const PACK = {
|
|
|
479
492
|
]
|
|
480
493
|
},
|
|
481
494
|
"variants": {
|
|
495
|
+
"m-balance": [],
|
|
482
496
|
"m-bars": [],
|
|
483
497
|
"m-boxplot": [
|
|
484
498
|
"fade",
|
|
@@ -489,6 +503,8 @@ export const PACK = {
|
|
|
489
503
|
"fade",
|
|
490
504
|
"draw"
|
|
491
505
|
],
|
|
506
|
+
"m-ci": [],
|
|
507
|
+
"m-code": [],
|
|
492
508
|
"m-compare": [
|
|
493
509
|
"fade",
|
|
494
510
|
"slide",
|
|
@@ -506,6 +522,7 @@ export const PACK = {
|
|
|
506
522
|
"grow"
|
|
507
523
|
],
|
|
508
524
|
"m-flow": [],
|
|
525
|
+
"m-folds": [],
|
|
509
526
|
"m-gendai": [],
|
|
510
527
|
"m-heatmap": [
|
|
511
528
|
"fade",
|
|
@@ -542,6 +559,7 @@ export const PACK = {
|
|
|
542
559
|
"sweep",
|
|
543
560
|
"draw"
|
|
544
561
|
],
|
|
562
|
+
"m-mapping": [],
|
|
545
563
|
"m-market": [],
|
|
546
564
|
"m-menu": [],
|
|
547
565
|
"m-numberline": [
|
|
@@ -560,6 +578,7 @@ export const PACK = {
|
|
|
560
578
|
"draw"
|
|
561
579
|
],
|
|
562
580
|
"m-quad": [],
|
|
581
|
+
"m-sampling": [],
|
|
563
582
|
"m-scatter": [
|
|
564
583
|
"fade",
|
|
565
584
|
"sweep",
|
|
@@ -598,6 +617,10 @@ export const PACK = {
|
|
|
598
617
|
}
|
|
599
618
|
},
|
|
600
619
|
"parts": [
|
|
620
|
+
{
|
|
621
|
+
"tag": "m-balance",
|
|
622
|
+
"set": "data"
|
|
623
|
+
},
|
|
601
624
|
{
|
|
602
625
|
"tag": "m-bars",
|
|
603
626
|
"set": "standard"
|
|
@@ -610,6 +633,14 @@ export const PACK = {
|
|
|
610
633
|
"tag": "m-cards",
|
|
611
634
|
"set": "standard"
|
|
612
635
|
},
|
|
636
|
+
{
|
|
637
|
+
"tag": "m-ci",
|
|
638
|
+
"set": "data"
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
"tag": "m-code",
|
|
642
|
+
"set": "data"
|
|
643
|
+
},
|
|
613
644
|
{
|
|
614
645
|
"tag": "m-compare",
|
|
615
646
|
"set": "standard"
|
|
@@ -630,6 +661,10 @@ export const PACK = {
|
|
|
630
661
|
"tag": "m-flow",
|
|
631
662
|
"set": "standard"
|
|
632
663
|
},
|
|
664
|
+
{
|
|
665
|
+
"tag": "m-folds",
|
|
666
|
+
"set": "data"
|
|
667
|
+
},
|
|
633
668
|
{
|
|
634
669
|
"tag": "m-gendai",
|
|
635
670
|
"set": "kokugo"
|
|
@@ -670,6 +705,10 @@ export const PACK = {
|
|
|
670
705
|
"tag": "m-map-world",
|
|
671
706
|
"set": "maps"
|
|
672
707
|
},
|
|
708
|
+
{
|
|
709
|
+
"tag": "m-mapping",
|
|
710
|
+
"set": "data"
|
|
711
|
+
},
|
|
673
712
|
{
|
|
674
713
|
"tag": "m-market",
|
|
675
714
|
"set": "business"
|
|
@@ -702,6 +741,10 @@ export const PACK = {
|
|
|
702
741
|
"tag": "m-quad",
|
|
703
742
|
"set": "standard"
|
|
704
743
|
},
|
|
744
|
+
{
|
|
745
|
+
"tag": "m-sampling",
|
|
746
|
+
"set": "data"
|
|
747
|
+
},
|
|
705
748
|
{
|
|
706
749
|
"tag": "m-scatter",
|
|
707
750
|
"set": "standard"
|
|
@@ -748,12 +791,13 @@ export const PACK = {
|
|
|
748
791
|
"m-collect",
|
|
749
792
|
"m-kakijun"
|
|
750
793
|
],
|
|
751
|
-
"partsSrc": "https://github.com/egatari/components/blob/v2.
|
|
794
|
+
"partsSrc": "https://github.com/egatari/components/blob/v2.6.0/components/",
|
|
752
795
|
"en": {
|
|
753
|
-
"common": "# Instructions for the AI\n\nPack version: `03b74c31`\n\nYou will write one short **Egatari lesson**: an HTML slide deck with step-by-step reveals (`deck.html`) and a spoken script for it (`narration.md`). Both files are built and quality-checked automatically; anything not described here is not available. Write the lesson in the language the user asks for (slides and narration in the same language). Standards have ids such as **R-fit**; a fix request names the standards a draft broke. The user's request is in **What I want** at the end (or in the conversation before it): choose sensibly for any field that is empty or missing, and if both A and B are left, follow the one with content.\n\n**Before you start (the most common failures):**\n\n- **Both code blocks must be complete and closed.** Never stop in the middle of a block (R-output). Without an outline, keep the lesson short (5–8 slides). When the request gives an outline and a range of its slides, write exactly the slides of that range: the editor asks for at most 6 at a time, so they fit.\n- **Sizes on the 1280×720 slide** (the quality checker measures them, R-fit): the body area is 1184 × 443 px (to 565 px; 1184 × 558 with `noconcl`). Body text is 32 px with 46 px per line, so about **8 lines** fit; every overflowing 46 px is one line to cut. **All text, also inside figures and components, is at least 24 px.**\n- **Charts and figures:** components draw their labels at 24–28 px whatever their size (their SVG uses their own pixels), so size the component, not the text. A component of 380 px leaves room for one short line; with two lines, use 330 px.\n- **Inline `<svg>`:** its text is scaled by displayed width ÷ viewBox width, so write the viewBox in the pixels it is shown at, e.g. `<svg viewBox=\"0 0 560 320\" width=\"560\" height=\"320\">`, with `font-size` ≥ 24. Never combine `width:100%` with another viewBox width (a 600-wide viewBox shown 580 px wide turns 24 into 23.2 px). Prefer a component when one fits.\n\n## 1. Output format\n\n- **R-output** Reply with **exactly two fenced code blocks**, in this order, labelled `deck.html` and `narration.md` (the opening lines are ```` ```deck.html ```` and ```` ```narration.md ````). Put nothing between them; a one-line note before or after is fine. Never split a file over several blocks. Do not output files, a canvas or attachments: write both code blocks in the body of your chat message. Do not reference other files (no images, no `{{FIG:…}}`, no `{{JSON:…}}`, no external URLs, no `<link>`), and never stop in the middle of a block: if the deck would be too long, make fewer slides (but for a range of an outline, write exactly the requested slides).\n- **R-outline** When the request asks for an **outline only** (a long lesson made in two passes), reply with exactly one fenced code block labelled `outline` (the opening line is ```` ```outline ````) and no `deck.html` or `narration.md`: a Markdown table with the columns `#`, heading and point (one line), one row per slide, every slide of the lesson in order. Each later request names a range (“slides 7–12 of the outline”): write exactly those slides, following their headings and points.\n- **R-noids** Do **not** write slide ids. Write `<section class=\"slide\">` without `id`, and narration headings without `{#…}`. The editor adds ids after import. When you are given a deck that already has ids (a fix request), keep every existing `id=\"…\"` and `{#…}` exactly as it is.\n\n## 2. deck.html\n\n### 2.1 Skeleton\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Lesson title</title>\n</head>\n<body>\n<div id=\"stage\">\n <section class=\"slide cover noconcl static\"> … </section>\n <section class=\"slide\"> … </section>\n</div>\n</body>\n</html>\n```\n\n- `lang`: `en`, `ja`, … (the language of the lesson). `data-theme`: `sumi` for business and pitch decks, `kokugo` for Japanese language arts, otherwise `default`.\n- No `<script>` except component data (§2.6), no `<link>`. A `<style>` block is allowed only for layout (sizes, gaps), never colors.\n\n### 2.2 Slides\n\n- Normal slide: `<h2>` heading, `<div class=\"body\">…</div>`, then `<div class=\"concl\"><span>…</span></div>` (the conclusion line: one short sentence).\n- Cover: `<section class=\"slide cover noconcl static\">` with optional `<div class=\"venue\">…</div>`, `<h1>title</h1>`, optional `<div class=\"au\">…</div>`.\n- Chapter divider: `<section class=\"slide sec noconcl static\"><h1>chapter title</h1></section>`.\n- Classes on `<section>`: `noconcl` (no conclusion line), `static` (no steps), `nostep` (all list items visible from the start), `layout-tate` (Japanese vertical writing; only with the kokugo part set, which describes it), and the `data-morph` attribute (§2.5).\n- Inside `.body`: `<p class=\"sub\">` sub-heading, `<div class=\"big\">` main equation, `<p class=\"note\">` note, `<div class=\"thm\">` theorem box, `<div class=\"cols\">` side-by-side columns, ordinary `<p>`, `<ul>`, `<ol>`, `<table>`.\n- Inline emphasis (the only way to color text): `term` (term or question), `emph` (conclusion, problem, goal), `muted` (known result, de-emphasized), `b` (bold).\n- **R-headings** Every slide heading (`h1` on the cover and dividers, `h2` elsewhere) is **different** from all the others (add a word if two would be the same), and the narration section of that slide starts with `## ` followed by **exactly the same heading text** (tags such as `<br>` dropped).\n- **R-colors** Colors only through the theme: the classes above and the math macros `\\hlE` `\\hlT` `\\hlM`; no hex, `rgb()`, named colors, `\\color` or `\\textcolor`. In a component or inline SVG: **Use only the theme's CSS variables for colors**: `var(--fg)` `var(--term)` `var(--emph)` `var(--muted)` `var(--accent2)` `var(--line)`. In SVG write `style=\"stroke:var(--emph)\"` rather than an attribute (`DECK.el` moves `fill` and `stroke` into style automatically when they contain `var(`)\n\n### 2.3 Steps (reveal order = speaking order)\n\n- **R-steps** Step 0 is the slide as it first appears: context only (heading, sub-heading, one framing sentence). An element with `data-step=\"k\"` (k = 1, 2, …) appears at step k; material (list items, equations, table rows, figure parts) appears in the order you talk about it. An equation and the sentence that introduces it share one step (wrap both in `<div data-step=\"k\">`). About 5 steps per slide at most.\n- The conclusion line automatically becomes the **last step**, `concl`; never put `data-step` on it.\n- If a slide has **no** `data-step` anywhere, its top-level list items (`.body > ul > li`, `.body > ol > li`) are numbered 1, 2, … automatically. As soon as any element has `data-step`, nothing is automatic: give every revealed element its `data-step`.\n- A component adds its own steps (§3), starting at its `data-from` (default 1).\n- So the steps of a slide are `0 … max` plus `concl` if it has a conclusion line. A `static` slide has only step 0.\n\n### 2.4 Math (KaTeX, rendered at build time)\n\n- **R-math** Inline `\\( … \\)`, display `\\[ … \\]`. Write `<` as `\\lt` and `>` as `\\gt` inside math. Allowed macros besides standard KaTeX: `\\hlE{…}` (emph) `\\hlT{…}` (term) `\\hlM{…}` (muted), `\\htmlId{ID}{…}`, `\\htmlData{mark=ID}{…}`, `\\htmlClass{…}{…}`, `\\morph{ID}{…}`. No `\\newcommand`, no `\\color`. Define each symbol where it is first used (`\\(\\mu\\)`: the mean).\n\n### 2.5 Attention marks and morphs\n\n- **R-marks** The narration’s `{mark:ID}` (§4) marks a target on the **same slide**. Targets: an element in the slide with `id=\"ID\"` or `data-mark=\"ID\"`. For part of an equation, KaTeX's `\\htmlId{ID}{…}` / `\\htmlData{mark=ID}{…}` (the build allows only these two and `\\htmlClass`). If the same ID is used on several slides, use `data-mark` (ids must be unique in the document)\n- Morph (optional): `<section class=\"slide\" data-morph>` slides elements from the previous slide into place; pair elements with the same `data-id=\"…\"` on both slides, or equation parts with `\\morph{ID}{…}` on both. Only elements visible at step 0 move.\n\n### 2.6 Components\n\n- **R-components** Animated figures are the Web Components `<m-…>` of the catalog (§3), used inside `.body`. Give each a height (`style=\"height:380px\"`) and an `aria-label`. Data goes in **one** child `<script type=\"application/json\">…</script>` written inline (never `{{JSON:…}}`). **Numbers in figures must be correct** (compute them; never invent values for looks; label made-up business figures as fictional). Function formulas are arithmetic expressions only (`Math.exp(x)`, `x**2`); they are never run as code. Use components only where motion explains something; most slides need none.\n\n### 2.7 Choosing a representation\n\n- **R-purpose** Choose the representation from what the slide must say, not from habit. If the author names a chart type, use it. The table lists every part; use only those in the text you were given (§3, and the part sets included). If a part that is not included would fit better, say so in a one-line note.\n\n{{PURPOSES}}\n\n- **R-whole** Lists, KPI cards and pies are shown whole; do not reveal them line by line unless the narration discusses each item in turn (for a list, give it one `data-step` or put `nostep` on the slide).\n\n### 2.8 Fitting the slide (1280×720; the quality checker reports errors)\n\n- **R-title** Heading: Japanese at most 26 units (full-width character = 1, ASCII = 0.5); English at most 60 characters. Never ends with a colon.\n- **R-concl** Conclusion line: Japanese at most 35 units; English at most 70 characters. One line.\n- **R-fit** The body must end above 565 px (680 px with `noconcl`): about 8 lines / 100 Japanese characters / 60 English words per slide, or one `big` equation and 3 short bullets, or a component of height ≤ 380 px and one short line (≤ 330 px with two). If it does not fit, split the slide; never shrink text and never set font sizes. Text in figures is at least 24 px.\n- **R-style** Japanese slides: plain style (だ・である, 体言止め), no です・ます on slides, one punctuation style in the whole deck (`、。` or `,.`). English slides: short phrases, sentence case.\n\n## 3. Component catalog\n\nThese standard components may be used in any lesson; a part set, when it is included after §6, adds the components of its kind of material. Generated from the component READMEs (their notes are in Japanese). “steps” is how many slide steps a component uses (from `data-from`, default 1). Timing attributes (durations and delays in seconds) are not listed; their defaults fit the narration. Attribute values of type json are written as JSON in the attribute (`values=\"[0.1,0.5]\"`). In “data shape”, `?` marks an optional field; where no type is written, label, tex, note and tone are str, step is int and at is num. In a name or label, `*…*` is italic and `_` `^` make only the next character a subscript or superscript; to show the symbol itself, write the full-width _ ^ *.\n\n{{CATALOG}}\n\n## 4. narration.md\n\n```markdown\n# Narration: <lesson title>\n\n## The decay law\n[0] Here is the decay law. We follow how many atoms are left.\n[1] The number left is the starting number times a shrinking exponential.\n[2] {mark:n0|circle}{N₀|N naught} is the number at the start, at time zero.\n[concl] The half-life depends only on the decay constant.\n```\n\n- One section per slide, **in slide order, for every slide (cover included)**: `## <slide heading>` (R-headings), no `{#id}` (R-noids).\n- **R-narr-steps** Step markers `[0]`, `[1]`, … and `[concl]`. **Every step of every slide has narration** (step 0 to max, and `[concl]` if the slide has a conclusion line), and there are **no markers for steps that do not exist** (a `static` cover has only `[0]`; a slide without a conclusion line has no `[concl]`; never `[01]`). Within a step, talk only about what appears at that step.\n- **R-dialogue** **One narrator by default**: write no speaker names. Write a dialogue only when asked (if asked for three or more speakers, keep two roles and say so first): lines start with `Expert:` or `Novice:` (continuation lines indented; a line without a speaker is Expert), shaped as a cognitive apprenticeship:\n - Novice is never a mere backchannel: Novice voices the question a learner is likely to have, or paraphrases (“So …, is that right?”)\n - Expert answers and adds one example or analogy, or confirms (or corrects) the paraphrase and takes one step further\n - Only at a comprehension fork (where learners tend to misunderstand, or a “why” remains): at most one exchange per slide, 2–3 turns. Elsewhere Expert alone\n - Never a turn that is only “I see”, or that repeats the previous turn. Example: `Novice: So a larger rate always gets there faster?` `Expert: Not always. Too large, and each step jumps across the valley, like striding downhill onto the opposite slope.`\n- `{note:…}`: presenter directions.\n- `{cue}`: a sync point inside a step, one per entry of the component’s `cues(k)` (only where a component’s README asks for it; otherwise omit).\n- `{mark:ID}`, `{mark:ID|effect}`, `{mark:ID|effect|hold=seconds}`, `{mark:clear}`: placed **right before** the words about the target; at most 1–2 per step; still say the thing in words. Effects: `underline` (default; a hand-drawn underline from left to right), `circle` (a hand-drawn circle), `box` (a rounded frame), `spot` (dims everything except the area around the target with the background color), `laser` (a dot of light slides to below the target and stays briefly)\n- **R-reading** `{display|reading}` gives the reading of **one symbol or one term**: `{θ|theta}`, `{N₀|N naught}`, `{x̄|x bar}`, `{論語|ろんご}`. One symbol may carry a star, a prime, a subscript or superscript, or a hat/bar/tilde (`{Q*|Q star}`, `{x′|x prime}`, `{θ̂|theta hat}`). Write the display part in plain Unicode, not LaTeX, and never as an expression or several symbols (`{1-η|…}`, `{a*b|…}` and `{θとη|…}` are wrong: give each symbol its own reading and say the relation in words).\n- **R-formula** **Never read an equation aloud**: no LaTeX, no `\\`, `^`, `_`, and no strings such as `a + b = c` in the narration. Say what the equation means (“the number left is the starting number times a shrinking exponential”).\n- Japanese narration is polite spoken Japanese (です・ます); English narration is plain spoken English. About 5 Japanese characters or 2.5 English words per second; 1–3 sentences per turn.\n\n## 5. Fix requests\n\nWhen the user pastes a **fix request** (a list of findings with the ids of the standards, followed by the current files), fix exactly those findings, keep everything else, keep every `id=\"…\"` and `{#…}` unchanged (R-noids), and reply again with the two blocks (R-output). If the request contains only some slides, return only those `<section>` elements in the `deck.html` block (no `<html>`) and only their sections in the `narration.md` block; the editor puts them back in place by id.\n\n## 6. Worked example\n\nA small lesson, fictional, showing the structure only (do not copy its content). Note how the steps add up: the list of 2 items gives steps 1–2 and `[concl]`<!--part:m-flow-->; the `m-flow` with 4 boxes gives steps 1–4<!--/part-->. The static cover has `[0]` only. Some part sets end with an example of their own.\n\n### Common (English, default theme, marks<!--part:m-flow-->, m-flow<!--/part-->)\n\n```deck.html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>How a web page arrives</title>\n</head>\n<body>\n<div id=\"stage\">\n\n<section class=\"slide cover noconcl static\">\n <div class=\"venue\">Computing basics, lesson 1 (a fictional course)</div>\n <h1>How a web page arrives</h1>\n</section>\n\n<section class=\"slide\">\n <h2>Two programs take part</h2>\n <div class=\"body\">\n <p>Opening a page is a conversation between two programs.</p>\n <ul>\n <li id=\"browser\">The <span class=\"term\">browser</span> asks for the page and draws it</li>\n <li id=\"server\">The <span class=\"term\">server</span> keeps the page and sends it back</li>\n </ul>\n </div>\n <div class=\"concl\"><span>Every page load is a request and a reply</span></div>\n</section><!--part:m-flow-->\n\n<section class=\"slide\">\n <h2>From the address to the screen</h2>\n <div class=\"body\">\n <m-flow style=\"height:300px\" aria-label=\"Four stages: type the address, send a request, send the page back, draw the page\">\n <script type=\"application/json\">{\"nodes\": [\n {\"id\": \"a\", \"label\": \"Type the\\naddress\", \"x\": 10, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 1},\n {\"id\": \"b\", \"label\": \"Send a\\nrequest\", \"x\": 315, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 2},\n {\"id\": \"c\", \"label\": \"Send the\\npage back\", \"x\": 620, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 3, \"tone\": \"term\"},\n {\"id\": \"d\", \"label\": \"Draw the\\npage\", \"x\": 925, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 4, \"tone\": \"emph\"}\n ], \"edges\": [\n {\"from\": \"a\", \"to\": \"b\"}, {\"from\": \"b\", \"to\": \"c\"}, {\"from\": \"c\", \"to\": \"d\"}\n ]}</script>\n </m-flow>\n </div>\n <div class=\"concl\"><span>A slow page is slow in one of these four stages</span></div>\n</section><!--/part-->\n\n</div>\n</body>\n</html>\n```\n\n```narration.md\n# Narration: How a web page arrives\n\n## How a web page arrives\n[0] Today we follow a web page on its way from a server to your screen.\n\n## Two programs take part\n[0] Opening a page is a conversation between two programs.\n[1] {mark:browser}The browser is the program you look at. It asks for the page and then draws it.\n[2] {mark:server}The server is a program on another computer. It keeps the page and sends it back when asked.\n[concl] Every page load is a request and a reply.<!--part:m-flow-->\n\n## From the address to the screen\n[0] Let us put the steps in order.\n[1] First you type the address of the page.\n[2] The browser turns it into a request and sends it to the server.\n[3] The server finds the page and sends it back.\n[4] The browser draws the page on the screen.\n[concl] When a page is slow, one of these four stages is taking the time.<!--/part-->\n```",
|
|
796
|
+
"common": "# Instructions for the AI\n\nPack version: `b2ad9e7c`\n\nYou will write one short **Egatari lesson**: an HTML slide deck with step-by-step reveals (`deck.html`) and a spoken script for it (`narration.md`). Both files are built and quality-checked automatically; anything not described here is not available. Write the lesson in the language the user asks for (slides and narration in the same language). Standards have ids such as **R-fit**; a fix request names the standards a draft broke. The user's request is in **What I want** at the end (or in the conversation before it): choose sensibly for any field that is empty or missing, and if both A and B are left, follow the one with content.\n\n**Before you start (the most common failures):**\n\n- **Both code blocks must be complete and closed.** Never stop in the middle of a block (R-output). Without an outline, keep the lesson short (5–8 slides). When the request gives an outline and a range of its slides, write exactly the slides of that range: the editor asks for at most 6 at a time, so they fit.\n- **Sizes on the 1280×720 slide** (the quality checker measures them, R-fit): the body area is 1184 × 443 px (to 565 px; 1184 × 558 with `noconcl`). Body text is 32 px with 46 px per line, so about **8 lines** fit; every overflowing 46 px is one line to cut. **All text, also inside figures and components, is at least 24 px.**\n- **Charts and figures:** components draw their labels at 24–28 px whatever their size (their SVG uses their own pixels), so size the component, not the text. A component of 380 px leaves room for one short line; with two lines, use 330 px.\n- **Inline `<svg>`:** its text is scaled by displayed width ÷ viewBox width, so write the viewBox in the pixels it is shown at, e.g. `<svg viewBox=\"0 0 560 320\" width=\"560\" height=\"320\">`, with `font-size` ≥ 24. Never combine `width:100%` with another viewBox width (a 600-wide viewBox shown 580 px wide turns 24 into 23.2 px). Prefer a component when one fits.\n\n## 1. Output format\n\n- **R-output** Reply with **exactly two fenced code blocks**, in this order, labelled `deck.html` and `narration.md` (the opening lines are ```` ```deck.html ```` and ```` ```narration.md ````). Put nothing between them; a one-line note before or after is fine. Never split a file over several blocks. Do not output files, a canvas or attachments: write both code blocks in the body of your chat message. Do not reference other files (no images, no `{{FIG:…}}`, no `{{JSON:…}}`, no external URLs, no `<link>`), and never stop in the middle of a block: if the deck would be too long, make fewer slides (but for a range of an outline, write exactly the requested slides).\n- **R-outline** When the request asks for an **outline only** (a long lesson made in two passes), reply with exactly one fenced code block labelled `outline` (the opening line is ```` ```outline ````) and no `deck.html` or `narration.md`: a Markdown table with the columns `#`, heading and point (one line), one row per slide, every slide of the lesson in order. Each later request names a range (“slides 7–12 of the outline”): write exactly those slides, following their headings and points.\n- **R-noids** Do **not** write slide ids. Write `<section class=\"slide\">` without `id`, and narration headings without `{#…}`. The editor adds ids after import. When you are given a deck that already has ids (a fix request), keep every existing `id=\"…\"` and `{#…}` exactly as it is.\n\n## 2. deck.html\n\n### 2.1 Skeleton\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Lesson title</title>\n</head>\n<body>\n<div id=\"stage\">\n <section class=\"slide cover noconcl static\"> … </section>\n <section class=\"slide\"> … </section>\n</div>\n</body>\n</html>\n```\n\n- `lang`: `en`, `ja`, … (the language of the lesson). `data-theme`: `sumi` for business and pitch decks, `kokugo` for Japanese language arts, otherwise `default`.\n- No `<script>` except component data (§2.6), no `<link>`. A `<style>` block is allowed only for layout (sizes, gaps), never colors.\n\n### 2.2 Slides\n\n- Normal slide: `<h2>` heading, `<div class=\"body\">…</div>`, then `<div class=\"concl\"><span>…</span></div>` (the conclusion line: one short sentence).\n- Cover: `<section class=\"slide cover noconcl static\">` with optional `<div class=\"venue\">…</div>`, `<h1>title</h1>`, optional `<div class=\"au\">…</div>`.\n- Chapter divider: `<section class=\"slide sec noconcl static\"><h1>chapter title</h1></section>`.\n- Classes on `<section>`: `noconcl` (no conclusion line), `static` (no steps), `nostep` (all list items visible from the start), `layout-tate` (Japanese vertical writing; only with the kokugo part set, which describes it), and the `data-morph` attribute (§2.5).\n- Inside `.body`: `<p class=\"sub\">` sub-heading, `<div class=\"big\">` main equation, `<p class=\"note\">` note, `<div class=\"thm\">` theorem box, `<div class=\"cols\">` side-by-side columns, ordinary `<p>`, `<ul>`, `<ol>`, `<table>`.\n- Inline emphasis (the only way to color text): `term` (term or question), `emph` (conclusion, problem, goal), `muted` (known result, de-emphasized), `b` (bold).\n- **R-headings** Every slide heading (`h1` on the cover and dividers, `h2` elsewhere) is **different** from all the others (add a word if two would be the same), and the narration section of that slide starts with `## ` followed by **exactly the same heading text** (tags such as `<br>` dropped).\n- **R-colors** Colors only through the theme: the classes above and the math macros `\\hlE` `\\hlT` `\\hlM`; no hex, `rgb()`, named colors, `\\color` or `\\textcolor`. In a component or inline SVG: **Use only the theme's CSS variables for colors**: `var(--fg)` `var(--term)` `var(--emph)` `var(--muted)` `var(--accent2)` `var(--line)`. In SVG write `style=\"stroke:var(--emph)\"` rather than an attribute (`DECK.el` moves `fill` and `stroke` into style automatically when they contain `var(`)\n\n### 2.3 Steps (reveal order = speaking order)\n\n- **R-steps** Step 0 is the slide as it first appears: context only (heading, sub-heading, one framing sentence). An element with `data-step=\"k\"` (k = 1, 2, …) appears at step k; material (list items, equations, table rows, figure parts) appears in the order you talk about it. An equation and the sentence that introduces it share one step (wrap both in `<div data-step=\"k\">`). About 5 steps per slide at most.\n- The conclusion line automatically becomes the **last step**, `concl`; never put `data-step` on it.\n- If a slide has **no** `data-step` anywhere, its top-level list items (`.body > ul > li`, `.body > ol > li`) are numbered 1, 2, … automatically. As soon as any element has `data-step`, nothing is automatic: give every revealed element its `data-step`.\n- A component adds its own steps (§3), starting at its `data-from` (default 1).\n- So the steps of a slide are `0 … max` plus `concl` if it has a conclusion line. A `static` slide has only step 0.\n\n### 2.4 Math (KaTeX, rendered at build time)\n\n- **R-math** Inline `\\( … \\)`, display `\\[ … \\]`. Write `<` as `\\lt` and `>` as `\\gt` inside math. Allowed macros besides standard KaTeX: `\\hlE{…}` (emph) `\\hlT{…}` (term) `\\hlM{…}` (muted), `\\htmlId{ID}{…}`, `\\htmlData{mark=ID}{…}`, `\\htmlClass{…}{…}`, `\\morph{ID}{…}`. No `\\newcommand`, no `\\color`. Define each symbol where it is first used (`\\(\\mu\\)`: the mean).\n\n### 2.5 Attention marks and morphs\n\n- **R-marks** The narration’s `{mark:ID}` (§4) marks a target on the **same slide**. Targets: an element in the slide with `id=\"ID\"` or `data-mark=\"ID\"`. For part of an equation, KaTeX's `\\htmlId{ID}{…}` / `\\htmlData{mark=ID}{…}` (the build allows only these two and `\\htmlClass`). If the same ID is used on several slides, use `data-mark` (ids must be unique in the document)\n- Morph (optional): `<section class=\"slide\" data-morph>` slides elements from the previous slide into place; pair elements with the same `data-id=\"…\"` on both slides, or equation parts with `\\morph{ID}{…}` on both. Only elements visible at step 0 move.\n\n### 2.6 Components\n\n- **R-components** Animated figures are the Web Components `<m-…>` of the catalog (§3), used inside `.body`. Give each a height (`style=\"height:380px\"`) and an `aria-label`. Data goes in **one** child `<script type=\"application/json\">…</script>` written inline (never `{{JSON:…}}`). **Numbers in figures must be correct** (compute them; never invent values for looks; label made-up business figures as fictional). Function formulas are arithmetic expressions only (`Math.exp(x)`, `x**2`); they are never run as code. Use components only where motion explains something; most slides need none.\n\n### 2.7 Choosing a representation\n\n- **R-purpose** Choose the representation from what the slide must say, not from habit. If the author names a chart type, use it. The table lists every part; use only those in the text you were given (§3, and the part sets included). If a part that is not included would fit better, say so in a one-line note.\n\n{{PURPOSES}}\n\n- **R-whole** Lists, KPI cards and pies are shown whole; do not reveal them line by line unless the narration discusses each item in turn (for a list, give it one `data-step` or put `nostep` on the slide).\n\n### 2.8 Fitting the slide (1280×720; the quality checker reports errors)\n\n- **R-title** Heading: Japanese at most 26 units (full-width character = 1, ASCII = 0.5); English at most 60 characters. Never ends with a colon.\n- **R-concl** Conclusion line: Japanese at most 35 units; English at most 70 characters. One line.\n- **R-fit** The body must end above 565 px (680 px with `noconcl`): about 8 lines / 100 Japanese characters / 60 English words per slide, or one `big` equation and 3 short bullets, or a component of height ≤ 380 px and one short line (≤ 330 px with two). If it does not fit, split the slide; never shrink text and never set font sizes. Text in figures is at least 24 px.\n- **R-style** Japanese slides: plain style (だ・である, 体言止め), no です・ます on slides, one punctuation style in the whole deck (`、。` or `,.`). English slides: short phrases, sentence case.\n\n## 3. Component catalog\n\nThese standard components may be used in any lesson; a part set, when it is included after §6, adds the components of its kind of material. Generated from the component READMEs (their notes are in Japanese). “steps” is how many slide steps a component uses (from `data-from`, default 1). Timing attributes (durations and delays in seconds) are not listed; their defaults fit the narration. Attribute values of type json are written as JSON in the attribute (`values=\"[0.1,0.5]\"`). In “data shape”, `?` marks an optional field; where no type is written, label, tex, note and tone are str, step is int and at is num. In a name or label, `*…*` is italic and `_` `^` make only the next character a subscript or superscript; to show the symbol itself, write the full-width _ ^ *.\n\n{{CATALOG}}\n\n## 4. narration.md\n\n```markdown\n# Narration: <lesson title>\n\n## The decay law\n[0] Here is the decay law. We follow how many atoms are left.\n[1] The number left is the starting number times a shrinking exponential.\n[2] {mark:n0|circle}{N₀|N naught} is the number at the start, at time zero.\n[concl] The half-life depends only on the decay constant.\n```\n\n- One section per slide, **in slide order, for every slide (cover included)**: `## <slide heading>` (R-headings), no `{#id}` (R-noids).\n- **R-narr-steps** Step markers `[0]`, `[1]`, … and `[concl]`. **Every step of every slide has narration** (step 0 to max, and `[concl]` if the slide has a conclusion line), and there are **no markers for steps that do not exist** (a `static` cover has only `[0]`; a slide without a conclusion line has no `[concl]`; never `[01]`). Within a step, talk only about what appears at that step.\n- **R-dialogue** **One narrator by default**: write no speaker names. Write a dialogue only when asked (if asked for three or more speakers, keep two roles and say so first): lines start with `Expert:` or `Novice:` (continuation lines indented; a line without a speaker is Expert), shaped as a cognitive apprenticeship:\n - Novice is never a mere backchannel: Novice voices the question a learner is likely to have, or paraphrases (“So …, is that right?”)\n - Expert answers and adds one example or analogy, or confirms (or corrects) the paraphrase and takes one step further\n - Only at a comprehension fork (where learners tend to misunderstand, or a “why” remains): at most one exchange per slide, 2–3 turns. Elsewhere Expert alone\n - Never a turn that is only “I see”, or that repeats the previous turn. Example: `Novice: So a larger rate always gets there faster?` `Expert: Not always. Too large, and each step jumps across the valley, like striding downhill onto the opposite slope.`\n- `{note:…}`: presenter directions.\n- `{cue}`: a sync point inside a step, one per entry of the component’s `cues(k)` (only where a component’s README asks for it; otherwise omit).\n- `{mark:ID}`, `{mark:ID|effect}`, `{mark:ID|effect|hold=seconds}`, `{mark:clear}`: placed **right before** the words about the target; at most 1–2 per step; still say the thing in words. Effects: `underline` (default; a hand-drawn underline from left to right), `circle` (a hand-drawn circle), `box` (a rounded frame), `spot` (dims everything except the area around the target with the background color), `laser` (a dot of light slides to below the target and stays briefly)\n- **R-reading** `{display|reading}` gives the reading of **one symbol or one term**: `{θ|theta}`, `{N₀|N naught}`, `{x̄|x bar}`, `{論語|ろんご}`. One symbol may carry a star, a prime, a subscript or superscript, or a hat/bar/tilde (`{Q*|Q star}`, `{x′|x prime}`, `{θ̂|theta hat}`). Write the display part in plain Unicode, not LaTeX, and never as an expression or several symbols (`{1-η|…}`, `{a*b|…}` and `{θとη|…}` are wrong: give each symbol its own reading and say the relation in words).\n- **R-formula** **Never read an equation aloud**: no LaTeX, no `\\`, `^`, `_`, and no strings such as `a + b = c` in the narration. Say what the equation means (“the number left is the starting number times a shrinking exponential”).\n- Japanese narration is polite spoken Japanese (です・ます); English narration is plain spoken English. About 5 Japanese characters or 2.5 English words per second; 1–3 sentences per turn.\n\n## 5. Fix requests\n\nWhen the user pastes a **fix request** (a list of findings with the ids of the standards, followed by the current files), fix exactly those findings, keep everything else, keep every `id=\"…\"` and `{#…}` unchanged (R-noids), and reply again with the two blocks (R-output). If the request contains only some slides, return only those `<section>` elements in the `deck.html` block (no `<html>`) and only their sections in the `narration.md` block; the editor puts them back in place by id.\n\n## 6. Worked example\n\nA small lesson, fictional, showing the structure only (do not copy its content). Note how the steps add up: the list of 2 items gives steps 1–2 and `[concl]`<!--part:m-flow-->; the `m-flow` with 4 boxes gives steps 1–4<!--/part-->. The static cover has `[0]` only. Some part sets end with an example of their own.\n\n### Common (English, default theme, marks<!--part:m-flow-->, m-flow<!--/part-->)\n\n```deck.html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>How a web page arrives</title>\n</head>\n<body>\n<div id=\"stage\">\n\n<section class=\"slide cover noconcl static\">\n <div class=\"venue\">Computing basics, lesson 1 (a fictional course)</div>\n <h1>How a web page arrives</h1>\n</section>\n\n<section class=\"slide\">\n <h2>Two programs take part</h2>\n <div class=\"body\">\n <p>Opening a page is a conversation between two programs.</p>\n <ul>\n <li id=\"browser\">The <span class=\"term\">browser</span> asks for the page and draws it</li>\n <li id=\"server\">The <span class=\"term\">server</span> keeps the page and sends it back</li>\n </ul>\n </div>\n <div class=\"concl\"><span>Every page load is a request and a reply</span></div>\n</section><!--part:m-flow-->\n\n<section class=\"slide\">\n <h2>From the address to the screen</h2>\n <div class=\"body\">\n <m-flow style=\"height:300px\" aria-label=\"Four stages: type the address, send a request, send the page back, draw the page\">\n <script type=\"application/json\">{\"nodes\": [\n {\"id\": \"a\", \"label\": \"Type the\\naddress\", \"x\": 10, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 1},\n {\"id\": \"b\", \"label\": \"Send a\\nrequest\", \"x\": 315, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 2},\n {\"id\": \"c\", \"label\": \"Send the\\npage back\", \"x\": 620, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 3, \"tone\": \"term\"},\n {\"id\": \"d\", \"label\": \"Draw the\\npage\", \"x\": 925, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 4, \"tone\": \"emph\"}\n ], \"edges\": [\n {\"from\": \"a\", \"to\": \"b\"}, {\"from\": \"b\", \"to\": \"c\"}, {\"from\": \"c\", \"to\": \"d\"}\n ]}</script>\n </m-flow>\n </div>\n <div class=\"concl\"><span>A slow page is slow in one of these four stages</span></div>\n</section><!--/part-->\n\n</div>\n</body>\n</html>\n```\n\n```narration.md\n# Narration: How a web page arrives\n\n## How a web page arrives\n[0] Today we follow a web page on its way from a server to your screen.\n\n## Two programs take part\n[0] Opening a page is a conversation between two programs.\n[1] {mark:browser}The browser is the program you look at. It asks for the page and then draws it.\n[2] {mark:server}The server is a program on another computer. It keeps the page and sends it back when asked.\n[concl] Every page load is a request and a reply.<!--part:m-flow-->\n\n## From the address to the screen\n[0] Let us put the steps in order.\n[1] First you type the address of the page.\n[2] The browser turns it into a request and sends it to the server.\n[3] The server finds the page and sends it back.\n[4] The browser draws the page on the screen.\n[concl] When a page is slow, one of these four stages is taking the time.<!--/part-->\n```",
|
|
754
797
|
"request": "# What I want\n\n*(Fill in A or B and delete the other; delete fields you leave empty.)*\n\n**A. Make a new lesson**\n\n- Title (used as is on the cover):\n- Audience:\n- Length (slides or minutes):\n- Language:\n- Speakers: one narrator\n- Other wishes:\n\n**B. From the material and discussion in this chat**\n\nMake the lesson from the material given in this chat and what we have discussed so far.\n\n- Title (used as is on the cover):\n- Audience:\n- Length (slides or minutes):\n- Language:\n- Speakers: one narrator\n- Other wishes:",
|
|
755
798
|
"sets": {
|
|
756
799
|
"stats": "## Part set: stats (statistics charts)\n\nFor lessons and talks with data: distributions, box plots, heatmaps, and a distribution updated one observation at a time. Use the `default` theme. Give the source and the size of every data set on the slide or in the narration, and never invent data that looks real (R-components).\n\n- **Axis charts** (<!--part:m-hist-->`m-hist`, <!--/part--><!--part:m-boxplot-->`m-boxplot`, <!--/part--><!--part:m-seq-->`m-seq`, <!--/part-->and the like) reserve 86 px at the left and 80 px in all at the top and bottom for ticks and axis names: give them a height of **300–380 px** and a width of **at least 560 px** (in `<div class=\"cols\">`, give the chart column at least 55%).\n- Make the axis ranges contain every plotted value (computed as R-components says).\n\nComponents of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
800
|
+
"data": "## Part set: data (data science and code)\n\nFor information and data-science lessons (Information I, data science, programming). Give the source and the size of every data set on the slide or in the narration (R-components). <!--part:m-code-->Show code with `m-code`.<!--/part-->\n\nComponents of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
757
801
|
"math": "## Part set: math (arithmetic and mathematics)\n\nFor arithmetic and mathematics lessons: column arithmetic, number lines, tape diagrams, and a function that changes with a parameter. Use the `default` theme.\n\n- **Axis charts** (<!--part:m-sweep-->`m-sweep`, <!--/part--><!--part:m-curves-->`m-curves`, <!--/part-->and the like) reserve 86 px at the left and 80 px in all at the top and bottom for ticks and axis names: give them a height of **300–380 px** and a width of **at least 560 px** (in `<div class=\"cols\">`, give the chart column at least 55%).\n- Make the axis ranges contain every plotted value (computed as R-components says).\n\nComponents of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}\n\n<!--part:m-sweep-->### Worked example: math (English, default theme, m-sweep)\n\n(only the slides with the part; the rest of `deck.html` is as in §6)\n\n```deck.html\n<section class=\"slide\">\n <h2>A larger λ decays faster</h2>\n <div class=\"body\">\n <div class=\"cols\" style=\"gap:24px\">\n <div style=\"flex:0 0 36%\">\n <div class=\"big\">\\[ \\frac{N(t)}{N_0}=e^{-\\lambda t} \\]</div>\n <ul class=\"nostep\"><li>Grey: the previous \\(\\lambda\\)</li></ul>\n </div>\n <m-sweep f=\"Math.exp(-c*u)\" values=\"[0.2,0.5,1.0]\" param=\"λ\" xr=\"[0,6]\" yr=\"[0,1]\" xt=\"[0,2,4,6]\" yt=\"[0,0.5,1]\"\n xl=\"*t*\" yl=\"share left\" digits=\"1\" style=\"height:380px\" aria-label=\"Share of atoms left over time for three decay constants\"></m-sweep>\n </div>\n </div>\n <div class=\"concl\"><span>Raising λ shortens the half-life</span></div>\n</section>\n```\n\n```narration.md\n## A larger λ decays faster\n[0] Let us change the decay constant and watch the share of atoms left.\n[1] Raising it from 0.2 to 0.5 makes the curve fall faster.\n[2] At 1.0 it falls faster still.\n[concl] A larger decay constant means a shorter half-life.\n```<!--/part-->\n\n<!--part:m-sweep-->Steps: the `m-sweep` with 3 values gives steps 1–2.<!--/part-->",
|
|
758
802
|
"maps": "## Part set: maps\n\nFor lessons and guides with maps: geography, history and local information on a map of Japan or of the world. Use the `default` theme. Give the year and the source of every figure (population, area, production) on the slide or in the narration.\n\nComponents of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
759
803
|
"kokugo": "## Part set: kokugo (Japanese language arts)\n\nFor 国語 lessons: 漢文, 古文 and 現代文. Use the `kokugo` theme. In the narration, give the reading of hard words and names with `{display|reading}` (R-reading).\n\n- **Vertical slides:** `<section class=\"slide layout-tate\">` sets the whole slide in vertical writing. The `<h2>` is one vertical column at the right edge (about 14 full-width characters; it does not wrap), the body runs in columns from right to left, and the conclusion line is a vertical column at the left edge (about 19 characters). The body must stay between the two columns (the quality checker reports an overlap). Components, figures and tables in the body stay horizontal at the full body width: use their vertical option (<!--part:m-kobun-->`m-kobun tate`<!--/part--><!--part:m-kobun,m-gendai-->, <!--/part--><!--part:m-gendai-->`m-gendai tate`<!--/part--><!--part:m-kanbun-->; `m-kanbun` is always vertical<!--/part-->).\n\nComponents of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}\n\n<!--part:m-kanbun-->### Worked example: kokugo (kokugo theme, m-kanbun)\n\n(only the slides with the part; the rest of `deck.html` is as in §6)\n\n```deck.html\n<section class=\"slide\">\n <h2>学びて時に之を習ふ</h2>\n <div class=\"body\">\n <m-kanbun style=\"height:440px\" aria-label=\"『論語』学而篇の冒頭の白文、訓点、読む順、書き下し文\">\n 学(ビテ)而{-}時(ニ)習(フ)[レ]之(ヲ)、\n 不{=ず}[二]亦(タ)説(バシカラ)[一]乎{=や}。\n </m-kanbun>\n </div>\n <div class=\"concl\"><span>一二点は、一を読んでから二へ戻る</span></div>\n</section>\n```\n\n```narration.md\n## 学びて時に之を習ふ\n[0] 返り点も送り仮名もない、白文です。\n[1] 返り点と送り仮名を付けます。而は、読まない置き字です。\n[2] 読む順に字をたどります。一句目は、レ点で之から習へ戻ります。\n[3] 二句目は、一二点で説から不へ戻ります。\n[4] 書き下し文にすると、学びて時に之を習ふ、亦た説ばしからずや、となります。\n[concl] 一二点は、一の字を読んでから、二の字へ戻ります。\n```<!--/part-->\n\n<!--part:m-kanbun-->Steps: `m-kanbun` gives 訓点 (step 1), then one step per 句 of the reading order, then the 書き下し文: write one `[n]` per 句.<!--/part-->",
|
|
@@ -764,6 +808,11 @@ export const PACK = {
|
|
|
764
808
|
"science": "## Part set: science\n\nFor science lessons with models that move, such as the phases of the Moon. Use the `default` theme. Say on the slide or in the narration when sizes and distances are not to scale.\n\nAlso usable as a colour, besides those of R-colors: `--lit`, light and what it lights, a fill with an outline.\n\nComponents of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}"
|
|
765
809
|
},
|
|
766
810
|
"components": {
|
|
811
|
+
"m-balance": {
|
|
812
|
+
"set": "data",
|
|
813
|
+
"row": "| `<m-balance>` | Balance at expectation | Weights → pivot → sum (3) | `{values:num[],probs:num[],name?:str}` |",
|
|
814
|
+
"entry": "### `<m-balance>`\n\nData example (child `<script type=\"application/json\">`): `{\"values\":[0,1,2,3],\"probs\":[0.1,0.3,0.4,0.2],\"name\":\"X\"}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `digits` | number | `2` | Decimal places |\n| `size` | number | `0` | Text px |\n\nJSON:\n- `values`: 2–12 distinct numbers.\n- `probs`: sum to 1 (else reported).\n- `name`: X."
|
|
815
|
+
},
|
|
767
816
|
"m-bars": {
|
|
768
817
|
"set": "standard",
|
|
769
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}` |",
|
|
@@ -780,6 +829,16 @@ export const PACK = {
|
|
|
780
829
|
"row": "| `<m-cards>` | Icon cards in a row or 2 rows, by step; arrows for order | largest card step (default 1 card = 1 step) | `{cards:{n?:str,icon?:str,title:str,text?:str,step?,tone?}[]}` |",
|
|
781
830
|
"entry": "### `<m-cards>`\n\nData example (child `<script type=\"application/json\">`): `{\"cards\":[{\"icon\":\"user\",\"title\":\"Listen\",\"text\":\"Hear the problem\"},{\"icon\":\"bulb\",\"title\":\"Think\",\"text\":\"Find 3 ideas\"},{\"icon\":\"rocket\",\"title\":\"Try\",\"text\":\"Build small, show\"}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `layout` | enum | `\"row\"` | row, or grid (2×2; 3×2 for 5–6) |\n| `arrows` | bool | `false` | order arrows (grid: Z order) |\n| `nums` | bool | `false` | number circles |\n| `hilite` | string | `\"\"` | last or a number (from 1) |\n| `per-step` | number | `1` | cards per step (0 = all) |\n\n3–4 short equal points or a 2×2: try cards over bullets; short steps: cards with arrows. Long or unequal items: bullets.\n\n(2–6 cards).\n\n- `title`: required, ≤ 2 lines. `text`: wraps; overflow cut with …, reported\n- `icon`: Tabler name (below); unknown = dashed box, reported\n- `n`: circle text (`\"A\"`, `\"1\"`); `nums` numbers the rest 1, 2, 3 …\n- `tone`: circle and icon colour (`term`, `emph`, `accent2`, `series-1..4`)\n- `arrows`; `hilite=\"last\"` or `\"3\"`: `--emph` frame and fill\n- `variant`: `rise` (default), `fade`, `draw`\n\nIcons:\n\n- People: user users user-check user-plus user-circle friends mood-smile man woman id-badge\n- Data: chart-bar chart-line chart-pie chart-dots trending-up trending-down table database filter adjustments percentage sum\n- Money: coin cash credit-card wallet receipt pig-money building-bank report-money shopping-cart tag\n- Time: clock calendar calendar-event calendar-time hourglass history alarm stopwatch\n- Place: map-pin map world home building building-factory building-store route truck\n- Flow: arrow-right arrows-right-left refresh repeat circle-check checklist list-numbers git-branch target flag rocket hand-click\n- Talk: message messages mail phone bell speakerphone share world-www microphone presentation\n- Docs: file file-text files notebook book clipboard-list folder news certificate award\n- Tools: tool settings hammer bulb puzzle cpu device-laptop device-mobile robot code scale\n- Nature: leaf tree plant sun moon cloud cloud-rain droplet flame snowflake\n- Safety: shield shield-check lock key alert-triangle first-aid-kit heart heart-rate-monitor eye\n- Learning: school pencil ruler math-function atom flask microscope palette music language"
|
|
782
831
|
},
|
|
832
|
+
"m-ci": {
|
|
833
|
+
"set": "data",
|
|
834
|
+
"row": "| `<m-ci>` | Repeated z intervals | Axis → intervals → coverage (3) | `{mu:num,sigma:num,n:num,reps?:num,level?:num,seed?:num}` |",
|
|
835
|
+
"entry": "### `<m-ci>`\n\nData example (child `<script type=\"application/json\">`): `{\"mu\":50,\"sigma\":10,\"n\":25,\"reps\":40,\"level\":0.95,\"seed\":2}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `size` | number | `0` | Text px |\n\nJSON:\n- `mu`, `sigma`, `n`: mean, SD, size.\n- `reps` (40), `level` (.95), `seed`."
|
|
836
|
+
},
|
|
837
|
+
"m-code": {
|
|
838
|
+
"set": "data",
|
|
839
|
+
"row": "| `<m-code>` | Code notes | Code → notes → output (n+1/+2) | `{code:str,lang?:str,output?:str,steps:{lines:int[],note}[]}` |",
|
|
840
|
+
"entry": "### `<m-code>`\n\nData example (child `<script type=\"application/json\">`): `{\"lang\":\"python\",\"code\":\"import pandas as pd\\ndf = pd.read_csv(\\\"sales.csv\\\")\\ndf.groupby(\\\"store\\\")[\\\"sales\\\"].mean()\",\"steps\":[{\"lines\":[1],\"note\":\"Load pandas\"},{\"lines\":[2],\"note\":\"Read CSV\"},{\"lines\":[3],\"note\":\"Mean\"}],\"output\":\"store\\nA 120.5\\nB 98.0\"}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `size` | number | `0` | Text px |\n| `outputPos` | enum | `\"auto\"` | Output |\n\n`<m-code>` child JSON.\n\n- `code`: ≤76 chars/line; height ≈ 132+34×lines+35×(list rows−1), ~40 chars/row; >440px: cut/split.\n- `lang`: tag; `steps[{lines,note}]`: 1-based range, note.\n- `output`: ≤8 lines.\n\nNarration: explain each line; never read code aloud."
|
|
841
|
+
},
|
|
783
842
|
"m-compare": {
|
|
784
843
|
"set": "standard",
|
|
785
844
|
"row": "| `<m-compare>` | Table comparing 2–3 things: one column, the other, then row differences | columns + 1 (diff step; none if no diff/better) | `{sides:{label,tone?,step?}[],rows:{label?,values:(str\\|num)[],diff?:str,better?:int}[]}` |",
|
|
@@ -787,8 +846,8 @@ export const PACK = {
|
|
|
787
846
|
},
|
|
788
847
|
"m-curves": {
|
|
789
848
|
"set": "standard",
|
|
790
|
-
"row": "| `<m-curves>` | Lines drawn one at a time on shared axes, each named at its end (no legend) | largest step (default: number of series) | `[{label?,f?:str,pts?:[num,num][],tone?,step?,labelAt?:num,color?:str,dash?:bool,xr?:[num,num],at?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\"\\|\"top\"\\|\"bottom\"\\|\"start\"\\|\"middle\"\\|\"end\",dx?:num,dy?:num,ly?:num} (f or pts),…]` — the data is the array itself, not {\"series\": […]}; axes go in attributes (xr=\"[0,10]\" xl=\"…\"); the expression field is f in x (not fn, not u) |",
|
|
791
|
-
"entry": "### `<m-curves>`\n\nData example (child `<script type=\"application/json\">`): `[{\"label\":\"Demand D\",\"f\":\"10 - x\"},{\"label\":\"Supply S\",\"f\":\"2 + x\"},{\"label\":\"Equilibrium\",\"pts\":[[4,0],[4,6]],\"dash\":true}]`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `xr` | json | `[0, 1]` | x range |\n| `yr` | json | `[0, 1]` | y range |\n| `xt` | json | `[]` | x ticks |\n| `yt` | json | `[]` | y ticks |\n| `xf` | number | | x tick decimals |\n| `yf` | number | | y tick decimals |\n| `xl` | string | `\"\"` | x title |\n| `yl` | string | `\"\"` | y title |\n| `n` | number | `300` | samples |\n| `lw` | number | `3.5` | line width |\n| `size` | number | `0` | text px (≥ 24; 0 = default) |\n\nOne comparison at a time
|
|
849
|
+
"row": "| `<m-curves>` | Lines drawn one at a time on shared axes, each named at its end (no legend) | largest step (default: number of series) | `[{label?,f?:str,pts?:[num,num][],tone?,step?,labelAt?:num,color?:str,dash?:bool,xr?:[num,num],area?:any[],areaLabel?:str\\|any[],at?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\"\\|\"top\"\\|\"bottom\"\\|\"start\"\\|\"middle\"\\|\"end\",dx?:num,dy?:num,ly?:num} (f or pts),…]` — the data is the array itself, not {\"series\": […]}; axes go in attributes (xr=\"[0,10]\" xl=\"…\"); the expression field is f in x (not fn, not u) |",
|
|
850
|
+
"entry": "### `<m-curves>`\n\nData example (child `<script type=\"application/json\">`): `[{\"label\":\"Demand D\",\"f\":\"10 - x\"},{\"label\":\"Supply S\",\"f\":\"2 + x\"},{\"label\":\"Equilibrium\",\"pts\":[[4,0],[4,6]],\"dash\":true}]`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `xr` | json | `[0, 1]` | x range |\n| `yr` | json | `[0, 1]` | y range |\n| `xt` | json | `[]` | x ticks |\n| `yt` | json | `[]` | y ticks |\n| `xf` | number | | x tick decimals |\n| `yf` | number | | y tick decimals |\n| `xl` | string | `\"\"` | x title |\n| `yl` | string | `\"\"` | y title |\n| `n` | number | `300` | samples |\n| `lw` | number | `3.5` | line width |\n| `size` | number | `0` | text px (≥ 24; 0 = default) |\n\nOne comparison at a time: mean, median, quantiles; losses.\n\nSeries: a JSON array in a child script. One series = one step; same `step` = together.\n\n| Field | Meaning |\n|---|---|\n| `label` | line name |\n| `f` | expression in x (see below) |\n| `pts` | points `[[x, y], …]` |\n| `tone` | `term` `emph` `accent2` `muted` `fg` `series-1..4` |\n| `dash` | dashed |\n| `area` / `areaLabel` | shaded span `[a, b]` (several; null = edge), labels |\n| `labelAt` / `anchor` / `dx` / `dy` / `ly` | name at x = `labelAt` (default: end); `anchor` `right` `left` `above` `below`; `ly` = y |\n\n`f` is arithmetic, not code: numbers, `x`, `Math` functions/constants (`sin(x)`, `PI`; no `random`), `N(x, mean, sd)`, `+ - * / % **`, comparisons, `&& || !`, `? :`. Powers: `**`. An unreadable `f` shows a card."
|
|
792
851
|
},
|
|
793
852
|
"m-cycle": {
|
|
794
853
|
"set": "standard",
|
|
@@ -808,6 +867,11 @@ export const PACK = {
|
|
|
808
867
|
"business": "Business-model edges:\n\n- `kind`: `money` (thick), `service`, `data` (dashed); `tone`/`dash` win\n- `amount`: bold figure\n- `shift`: px right of travel; both directions = 2 parallel lines\n- `pulse`: `pulse-n` dots run start→end in `pulse-dur` s; `true` = once after drawing; `[step, …]` = once per step; pulse steps count"
|
|
809
868
|
}
|
|
810
869
|
},
|
|
870
|
+
"m-folds": {
|
|
871
|
+
"set": "data",
|
|
872
|
+
"row": "| `<m-folds>` | Rotate validation folds | Rows → mean (k+1) | `{k:num,errors?:num[],labels?:str[]}` |",
|
|
873
|
+
"entry": "### `<m-folds>`\n\nData example (child `<script type=\"application/json\">`): `{\"k\":5,\"errors\":[0.21,0.18,0.25,0.19,0.22],\"labels\":[\"1\",\"2\",\"3\",\"4\",\"5\"]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `size` | number | `0` | Text px |\n\nJSON:\n- `k`: 2–10; k=5: ≥316px tall (264 without errors)\n- `errors`: k errors (optional).\n- `labels`: k names (optional)."
|
|
874
|
+
},
|
|
811
875
|
"m-gendai": {
|
|
812
876
|
"set": "kokugo",
|
|
813
877
|
"row": "| `<m-gendai>` | 現代文の読解の図:傍線・二重傍線を引き、指示語から指す内容へ矢印、段落を役割(主張・具体例・対比)の枠で囲んで線でつなぐ | 中身のある phases の数(既定 marks refs roles) | text inside the element (not JSON) |",
|
|
@@ -859,6 +923,11 @@ export const PACK = {
|
|
|
859
923
|
"row": "| `<m-map-world>` | 世界の国・地域の地図(太平洋が中央)。国や州の強調、区分と値の塗り分け、点、矢印を段階ごとに出す | 項目の step の最大(既定 1)。地図そのものは段階 0 から出ている | `{regions?:[{id?:str,group?:str,label?,tone?,step?,at?} (id or group),…],categories?:{label,ids:str[],tone?,step?,at?}[],values?:object,classes?:num[],valuesStep?:int,points?:[{lon?:num,lat?:num,code?:str,label?,tone?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\"\\|\"top\"\\|\"bottom\",step?,at?} (lon + lat or code),…],flows?:{from:str\\|any[],to:str\\|any[],label?,tone?,value?:num,bend?:num,via?:any[][],labelAt?:any[],step?,at?}[],shapes?:[{polygon?:any[][],line?:any[][],label?,labelAt?:any[],tone?,dash?:bool,step?,at?} (polygon or line),…]}` — countries by ISO alpha-3 or Natural Earth code (\"JPN\", \"USA\") or Japanese name; the six regions (asia, europe, africa, north-america, south-america, oceania) in regions[].group and categories[].ids; values is an object {code: number}; classes are the lower bounds (default 4, at most 5); points, shapes and [lon, lat] in flows use degrees |",
|
|
860
924
|
"entry": "### `<m-map-world>`\n\nData example (child `<script type=\"application/json\">`): `{\"regions\":[{\"id\":\"JPN\",\"tone\":\"emph\",\"step\":1},{\"group\":\"africa\",\"tone\":\"series-2\",\"step\":2}],\"points\":[{\"lon\":139.69,\"lat\":35.69,\"label\":\"東京\",\"step\":3}],\"flows\":[{\"from\":[139.69,35.69],\"to\":\"AUS\",\"step\":4}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `labels` | string | `\"focus\"` | 名前:focus(regions に書いた地域だけ)・all(名前が中に入る国すべて)・none |\n| `grid` | string | `\"none\"` | none・equator(赤道)・graticule(30° ごとの経線・緯線と赤道) |\n| `show` | string | `\"none\"` | 塗り分けた国の上に値を書くか:none(既定)・value(中に入る国だけ) |\n| `unit` | string | `\"\"` | 値の単位(凡例の見出しに書く) |\n| `digits` | number | `0` | 値の小数桁 |\n| `legend` | string | `\"\"` | 凡例の見出し(例:人口)。unit があれば後ろに(単位)を足す |\n\n世界地理・歴史の授業で国や都市の場所を示すときに使う。子の JSON(どれも `step` `at` `tone` を持てる):\n\n- `regions`:`id`(`\"JPN\"` など ISO の 3 文字か国名)か `group`(六州)。`label`\n- `categories`:`label` と `ids`(国か州)。凡例に出す。4 区分まで\n- `values`:`{\"JPN\": 72, …}` と `classes`(階級の下限)。塗り分けの段階は `valuesStep`(既定 1)\n- `points`:`lon` `lat`、`label`、`anchor`\n- `flows`:`from` `to`(`[経度, 緯度]` か国)、`via` `label` `bend`、`value`(数。線の太さが値で変わる:いちばん大きい値で 10 px)、`labelAt`(名前を置く `[経度, 緯度]`)\n- `shapes`:重ね描き。`polygon`(3 点以上の `[[経度, 緯度], …]`、薄く塗る)か `line`(2 点以上)。`label` `labelAt` `dash`\n\n継ぎ目は 30°W(大西洋を横切る矢印は描けない)。\n\n地図データ:Natural Earth(パブリックドメイン)を加工。"
|
|
861
925
|
},
|
|
926
|
+
"m-mapping": {
|
|
927
|
+
"set": "data",
|
|
928
|
+
"row": "| `<m-mapping>` | Outcomes → values → distribution | Outcomes → arrows → groups → bars (4) | `{outcomes:{label,x:num,p?:num,balls?:str[]}[],name?:str,unit?:str,fractions?:bool,picture?:\"dots\"\\|\"dice\"\\|\"coins\"\\|\"grapes\"\\|\"balls\"}` |",
|
|
929
|
+
"entry": "### `<m-mapping>`\n\nData example (child `<script type=\"application/json\">`): `{\"outcomes\":[{\"label\":\"HH\",\"x\":2},{\"label\":\"HT\",\"x\":1},{\"label\":\"TH\",\"x\":1},{\"label\":\"TT\",\"x\":0}],\"name\":\"X\",\"unit\":\"\",\"fractions\":true}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `stagger` | number | `0.15` | Arrow delay s |\n| `digits` | number | `2` | Decimals |\n| `size` | number | `0` | Text px |\n\n- `outcomes`: 2–12; `label`, `x`, `p` (default equal; sum ≠ 1 reported)\n- `name` (X), `fractions`\n- `picture`: `dots`, `grapes`, `dice`, `coins`, `balls` (colour names; 11 basic)"
|
|
930
|
+
},
|
|
862
931
|
"m-market": {
|
|
863
932
|
"set": "business",
|
|
864
933
|
"row": "| `<m-market>` | 市場規模の入れ子の円(TAM / SAM / SOM)。外の円から 1 つずつ、前の円の大きさから縮んで現れる | rings の数 | `{rings:{key?:str,value:num,basis?:str,tone?}[]}` |",
|
|
@@ -899,6 +968,11 @@ export const PACK = {
|
|
|
899
968
|
"row": "| `<m-quad>` | 2-axis positioning map (4 quadrants); points one per step | largest step / to.step (1 point = 1 step) | `{x?:{lo?:str,hi?:str},y?:{lo?:str,hi?:str},quads?:{tr?:str,tl?:str,bl?:str,br?:str,fill?:str},items:{label?,x:num,y:num,step?,at?,tone?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\",r?:num,self?:bool,to?:{x:num,y:num,label?,step?,at?}}[]}` |",
|
|
900
969
|
"entry": "### `<m-quad>`\n\nData example (child `<script type=\"application/json\">`): `{\"x\":{\"lo\":\"Manual\",\"hi\":\"Auto\"},\"y\":{\"lo\":\"Costly\",\"hi\":\"Cheap\"},\"items\":[{\"label\":\"Co. A\",\"x\":0.25,\"y\":0.7},{\"label\":\"Us\",\"x\":0.8,\"y\":0.82,\"self\":true}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `size` | number | `26` | label px |\n| `quads-step` | number | `0` | quadrant-name step (0 = start) |\n\nPositioning, effect×effort, SWOT: show the empty space.\n\n- `x` `y`: axis end words (step 0)\n- `quads`: names (tr = top-right, tl, bl, br); `fill: \"tr\"` tints one; names at `quads-step`\n- item: `label`, `x` `y` (0–1; 0.5 = axis cross), `step` (default next), `at`, `tone` (`term`/`fg`; default muted), `anchor` (`right`, `left`, `above`, `below`), `r`\n- `self: true`: big `--emph` point, ring pulse\n- `to: {\"x\", \"y\", \"label\", \"step\", \"at\"}`: slides at `to.step` (default next), dashed trail; `label` on arrival\n- `cues(k)`: start times of 2nd+ points in a step, for `{cue}`\n\nNotes\n\n- Quadrant names avoid points and labels (else labels move, or `ctx.report`)\n- Label overlaps not fixed: change `anchor` or shift"
|
|
901
970
|
},
|
|
971
|
+
"m-sampling": {
|
|
972
|
+
"set": "data",
|
|
973
|
+
"row": "| `<m-sampling>` | Sample; stack statistics | Population → sample → dot → repeat (4) | `{balls?:object,values?:num[],of?:str,n:num,replace?:bool,repeat?:num,seed?:num,stat?:\"mean\"\\|\"proportion\",digits?:num} (balls or values)` |",
|
|
974
|
+
"entry": "### `<m-sampling>`\n\nData example (child `<script type=\"application/json\">`): `{\"values\":[1,2,3,4,5,6],\"n\":2,\"replace\":true,\"repeat\":40,\"seed\":3}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `size` | number | `0` | Text px |\n\nChild JSON:\n- `balls`: colour counts, total 2–30; proportion of `of`.\n- `values`: 2–30 numbers; mean. One form.\n- `n`: 1–population size; 1–30 with replacement. Clamp/report.\n- `replace`: false; `repeat`: 1–200 (40); `seed`: integer (1).\n- `stat`: proportion/mean; `digits`: 0–10 (2)."
|
|
975
|
+
},
|
|
902
976
|
"m-scatter": {
|
|
903
977
|
"set": "standard",
|
|
904
978
|
"row": "| `<m-scatter>` | Scatter plot; point series by step, then a trend line (least squares or 2 points) | series + trend (default 1 series = 1 step, lines 1 step) | `{series:{label?,tone?,step?,at?,points:([num,num]\\|{x:num,y:num,label?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\"\\|\"top\"\\|\"bottom\",tone?})[]}[],trend?:str\\|{fit?:\"linear\",pts?:[[num,num],[num,num]],series?:int\\|any[],label?,tone?,dash?:bool,step?,at?,digits?:int}\\|[the same {…},…]}` — points are [x, y] or {\"x\", \"y\", \"label\"}; axes go in attributes (xr=\"[0,10]\" xl=\"…\"); trend is \"linear\" or {\"fit\": \"linear\", \"label\": \"…\"} or {\"pts\": [[x0, y0], [x1, y1]]} |",
|
|
@@ -958,10 +1032,11 @@ export const PACK = {
|
|
|
958
1032
|
"extHead": "### `<{name}>`: extension for this part set (the component is described in §3)"
|
|
959
1033
|
},
|
|
960
1034
|
"ja": {
|
|
961
|
-
"common": "# AI への指示\n\n指示の版:`03b74c31`\n\n短い **Egatari の教材**を 1 つ書いてください。段階ごとに出る HTML のスライド(`deck.html`)と口述原稿(`narration.md`)で、どちらも自動で組まれ、品質チェックを受けます。ここにないものは使えません。教材は頼まれた言語で書きます(スライドと口述原稿は同じ言語)。規格には **R-fit** のような名前があり、修正依頼は破った規格を名前で示します。依頼は最後の **頼みたいこと**(かその前の会話)にあります。空の項目やない項目はほどよく決め、A と B が両方残っていれば書き込みのある方に従います。\n\n**よくある失敗:**\n\n- **2 つの囲みはどちらも最後まで書いて閉じる。**囲みの途中で終わらない(R-output)。構成案がなければ、教材は短くする(5〜8 枚)。頼む文に構成案とその範囲があれば、その範囲のスライドをちょうどその枚数だけ書く(エディタは 1 回に 6 枚までしか頼まないので、収まる)\n- **1280×720 のスライドの大きさ**(品質チェックが測る。R-fit):本文の場所は 1184 × 443 px(565 px まで。`noconcl` なら 1184 × 558)。字は 32 px・1 行 46 px で、入るのは**およそ 8 行**。はみ出す 46 px ごとに 1 行を削る。**図や部品の中も含め、字はすべて 24 px 以上**\n- **グラフと図:**部品は大きさによらず字を 24〜28 px で描くので、決めるのは部品の大きさ(R-fit)\n- **その場で書く `<svg>`:**字は「表示の幅 ÷ viewBox の幅」で縮むので、viewBox を表示の画素で書く(`<svg viewBox=\"0 0 560 320\" width=\"560\" height=\"320\">`)。`font-size` は 24 以上。`width:100%` と別の幅の viewBox を組み合わせない。合う部品があれば部品を使う\n\n## 1. 出力の形\n\n- **R-output** 返事は**ちょうど 2 つのコードの囲み**にし、この順で、名前を `deck.html` と `narration.md` にする(始まりの行は ```` ```deck.html ```` と ```` ```narration.md ````)。間には何も書かない(前後に 1 行の添え書きはよい)。1 つのファイルを囲みに分けない。ファイル・キャンバス・添付にせず、返事の本文に書く。ほかのファイルを参照しない(画像・`{{FIG:…}}`・`{{JSON:…}}`・外の URL・`<link>` は使わない)。囲みの途中で終わらない(長すぎるなら枚数を減らす。ただし構成案の範囲を頼まれたら、ちょうどその枚数)\n- **R-outline** **構成案だけ**を頼まれたら(長い教材を 2 回に分けて作るとき)、`outline` という名前の囲み 1 つ(始まりの行は ```` ```outline ````)だけで返し、`deck.html` と `narration.md` は書かない:列が「番号」「見出し」「要点(1 行)」の Markdown の表で、スライドごとに 1 行、全スライドを順に。その後の頼む文は範囲を示す(「構成案の 7〜12 枚目」)ので、その見出しと要点のとおりに、ちょうどそのスライドを書く\n- **R-noids** スライドの id を**書かない**。`<section class=\"slide\">` に `id` を付けず、口述原稿の見出しにも `{#…}` を付けない。id は取り込みでエディタが付ける。id のあるデッキを渡されたとき(修正依頼)は、今ある `id=\"…\"` と `{#…}` をそのまま残す\n\n## 2. deck.html\n\n### 2.1 骨組み\n\n```html\n<!DOCTYPE html>\n<html lang=\"ja\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>教材の題名</title>\n</head>\n<body>\n<div id=\"stage\">\n <section class=\"slide cover noconcl static\"> … </section>\n <section class=\"slide\"> … </section>\n</div>\n</body>\n</html>\n```\n\n- `lang`:`ja`・`en` など(教材の言語)。`data-theme`:ビジネス・ピッチは `sumi`、国語は `kokugo`、ほかは `default`\n- `<script>` は部品のデータ(§2.6)だけ。`<style>` は配置(大きさ・間隔)だけに使い、色は書かない\n\n### 2.2 スライド\n\n- 普通のスライド:`<h2>` の見出し、`<div class=\"body\">…</div>`、`<div class=\"concl\"><span>…</span></div>`(結論の行。短い 1 文)\n- 表紙:`<section class=\"slide cover noconcl static\">` に、あれば `<div class=\"venue\">…</div>`、`<h1>題名</h1>`、あれば `<div class=\"au\">…</div>`\n- 章の扉:`<section class=\"slide sec noconcl static\"><h1>章の題</h1></section>`\n- `<section>` の class:`noconcl`(結論の行なし)、`static`(段階なし)、`nostep`(箇条書きも初めから全部)、`layout-tate`(縦書き。kokugo の束があるときだけ)、属性 `data-morph`(§2.5)\n- `.body` の中:`<p class=\"sub\">` 小見出し、`<div class=\"big\">` 主要な式、`<p class=\"note\">` 補足、`<div class=\"thm\">` 定理の枠、`<div class=\"cols\">` 横並び、普通の `<p>` `<ul>` `<ol>` `<table>`\n- 字の強調(色を付ける唯一の方法):`term`(用語・問い)、`emph`(結論・問題・目標)、`muted`(既知の結果・控えめ)、`b`(太字)\n- **R-headings** スライドの見出し(表紙と扉は `h1`、ほかは `h2`)は**すべて違う**ものにする(同じなら語を足す)。そのスライドの口述原稿の節は `## ` に続けて**見出しとまったく同じ文字列**で始める(`<br>` などのタグは除く)\n- **R-colors** 色はテーマだけで:上の class と式のマクロ `\\hlE` `\\hlT` `\\hlM`。16 進・`rgb()`・色の名前・`\\color`・`\\textcolor` は使わない。部品や SVG の中では:**色はテーマの CSS 変数だけ**を使う:`var(--fg)` `var(--term)` `var(--emph)` `var(--muted)` `var(--accent2)` `var(--line)`。SVG では属性ではなく `style=\"stroke:var(--emph)\"` で書く(`DECK.el` は `fill` `stroke` に `var(` があれば自動で style に回す)\n\n### 2.3 段階(出す順 = 話す順)\n\n- **R-steps** 段階 0 は現れたときの姿で、文脈だけ(見出し・小見出し・導入の 1 文)。`data-step=\"k\"`(k = 1, 2, …)の要素は段階 k で現れる。材料(箇条書きの項目・式・表の行・図の部分)は話す順に出す。式とそれを導く 1 文は同じ段階(`<div data-step=\"k\">` で一緒に囲む)。1 枚の段階は 5 前後まで\n- 結論の行は自動で**最後の段階** `concl` になる(`data-step` を付けない)\n- `data-step` が 1 つもないスライドでは、上の階層の箇条書きの項目(`.body > ul > li`・`.body > ol > li`)に 1, 2, … が自動で付く。1 つでもあれば自動にならないので、出すものすべてに付ける\n- 部品は自分の段階を足す(§3)。`data-from`(既定 1)から始まる\n- つまり段階は `0 … max` と、結論の行があれば `concl`。`static` のスライドは段階 0 だけ\n\n### 2.4 数式(KaTeX)\n\n- **R-math** 行内は `\\( … \\)`、別行は `\\[ … \\]`。式の中の `<` は `\\lt`、`>` は `\\gt`。標準のほかに使えるマクロ:`\\hlE{…}`(emph)`\\hlT{…}`(term)`\\hlM{…}`(muted)、`\\htmlId{ID}{…}`、`\\htmlData{mark=ID}{…}`、`\\htmlClass{…}{…}`、`\\morph{ID}{…}`。`\\newcommand` と `\\color` は使わない。記号は最初に使う所で定義する(`\\(\\mu\\)`:母平均)\n\n### 2.5 注目の演出とモーフ\n\n- **R-marks** 口述原稿の `{mark:ID}`(§4)は、**同じスライド**の目印に印を付ける。目印:スライドの中の `id=\"ID\"` か `data-mark=\"ID\"` の要素。式の一部は KaTeX の `\\htmlId{ID}{…}` / `\\htmlData{mark=ID}{…}`(build はこの 2 つと `\\htmlClass` だけを許す)。同じ ID を何枚かで使うなら `data-mark` にする(id は文書の中で一意に)\n- モーフ(なくてよい):`<section class=\"slide\" data-morph>` は前のスライドの要素を今の位置へ滑らせる。両方のスライドの要素に同じ `data-id=\"…\"`、式の一部は両方に `\\morph{ID}{…}`。段階 0 で見えている要素だけが動く\n\n### 2.6 部品\n\n- **R-components** 動く図は一覧(§3)の Web Components `<m-…>` で、`.body` の中に置く。どれにも高さ(`style=\"height:380px\"`)と `aria-label` を付ける。データは子の `<script type=\"application/json\">…</script>` **1 つ**にその場で書く。**図の数字は正しく**(計算する。見た目のために値を作らない。架空の数字は架空と書く)。関数の式は算術の式だけで、コードとしては実行されない(`Math.exp(x)`・`x**2`)。動きが説明になる所だけに使う(たいていのスライドには要らない)\n\n### 2.7 表し方を選ぶ\n\n- **R-purpose** 表し方は習慣でなく、そのスライドで言いたいことから選ぶ。作者がグラフの種類を言っていればそれに従う。表は全パーツの一覧を兼ねる。使うのは渡された文章にあるパーツだけ(§3 と、入っている束)。入っていないパーツの方が合うときは、1 行のメモでそう伝える\n\n{{PURPOSES}}\n\n- **R-whole** 箇条書き・数字の札・円グラフは全体を一度に見せる。台本が 1 つずつ取り上げるときだけ 1 行ずつ出す(箇条書きなら全体に 1 つの `data-step` を付けるか、スライドに `nostep`)\n\n### 2.8 スライドに収める(品質チェックのエラー)\n\n- **R-title** 見出し:日本語は 26 字まで(全角 1・半角 0.5)、英語は 60 文字まで。コロンで終えない\n- **R-concl** 結論の行:日本語は 35 字まで、英語は 70 文字まで。1 行\n- **R-fit** 本文は 565 px(`noconcl` なら 680 px)より上で終える:1 枚におよそ 8 行・100 字・英語 60 語、または `big` の式 1 つと短い箇条書き 3 つ、または高さ 380 px までの部品と短い 1 行(2 行なら 330 px まで)。入らなければスライドを分ける。字を縮めず、字の大きさを書かない。図の中の字は 24 px 以上\n- **R-style** 日本語のスライドは常体(だ・である、体言止め)で、です・ます を使わない。句読点はデッキ全体で 1 つの組(`、。` か `,.`)。英語のスライドは短い句で\n\n## 3. 部品の一覧\n\nどの教材でも使える標準の部品。§6 の後に束の指示があれば、その種類の材料の部品が加わる。「steps」は部品が使うスライドの段階の数(`data-from` から。既定 1)。秒で測る属性(動きの長さ・ずれ)は載せない(既定で口述原稿に合う)。型が json の属性は、値に JSON を書く(`values=\"[0.1,0.5]\"`)。「データの形」の `?` は省略できる欄。型を書いていない label・tex・note・tone は str、step は int、at は num。名前やラベルの `*…*` は斜体、`_` `^` は次の 1 字だけ下付き・上付き。記号のまま出すなら全角の _ ^ *。\n\n{{CATALOG}}\n\n## 4. narration.md\n\n```markdown\n# 口述原稿:<教材の題名>\n\n## 減衰の式\n[0] 減衰の式です。時刻ごとに残っている原子の数を考えます。\n[1] 残る数は、はじめの数に、時間とともに小さくなる指数関数を掛けたものです。\n[2] {mark:n0|circle}{N₀|エヌゼロ} は、時刻ゼロのときの、はじめの数です。\n[concl] 半分になるまでの時間は、崩壊定数だけで決まります。\n```\n\n- スライドごとに 1 つの節を、**スライドの順に、すべてのスライド(表紙も)について**:`## <スライドの見出し>`(R-headings)。`{#id}` は付けない(R-noids)\n- **R-narr-steps** 段階の印は `[0]` `[1]` … と `[concl]`。**どのスライドのどの段階にも口述原稿を書き**(段階 0 から max まで、結論の行があれば `[concl]`)、**ない段階の印は書かない**(`static` の表紙は `[0]` だけ。結論の行がなければ `[concl]` もない。`[01]` とは書かない)。段階の中では、その段階で現れるものだけを話す\n- **R-dialogue** **既定は話者 1 人**で、話者名を書かない。掛け合いは頼まれたときだけ(3 人以上を頼まれても 2 役にし、最初にそう書く):行を `Expert:` か `Novice:` で始め(続きの行は字下げ。話者なしは Expert)、認知的徒弟制の形にする:\n - Novice は相づち役にせず、学習者の疑問を代弁するか、「つまり〜ということですか」と言い換える\n - Expert は答えて具体例か比喩を 1 つ足すか、言い換えを確かめて(違えば直して)1 歩進める\n - 理解の分かれ目(誤解しやすい所、「なぜ」が残る所)にだけ、1 枚に 1 回・2〜3 発言まで。ほかは Expert 1 人\n - 「なるほど」だけの発言、前の発言のくり返しは書かない。例:`Novice: つまり、大きいほど早く着くのですか。` `Expert: いつもではありません。大きすぎると谷を飛び越えます。大股で坂を下りすぎて、向こうの斜面に足が着くように。`\n- `{note:…}` 発表者用\n- `{cue}`:段階の中の同期点。部品の `cues(k)` の 1 つに 1 つ(部品の説明が求めるときだけ)\n- `{mark:ID}`・`{mark:ID|効果}`・`{mark:ID|効果|hold=秒}`・`{mark:clear}`:目印のことを言う言葉の**すぐ前**に置く。1 段階に 1〜2 個まで。言葉でも言う。効果:`underline`(既定。手描きの下線を左から右へ)、`circle`(手描きの囲み)、`box`(角丸の枠)、`spot`(対象のまわり以外を背景色で薄くする)、`laser`(光の点が対象の下へ滑ってきて少し留まる)\n- **R-reading** `{表示|読み}` は **1 つの記号か 1 つの用語**の読み:`{θ|シータ}`、`{N₀|エヌゼロ}`、`{論語|ろんご}`。1 つの記号に星・プライム・添え字・ハットやバーが付いていてもよい(`{Q*|キュースター}`、`{θ̂|シータハット}`)。表示は普通の文字で書き、LaTeX にせず、式やいくつもの記号にしない(`{1-η|…}`・`{θとη|…}` は誤り:記号ごとに読みを付け、関係は言葉で言う)\n- **R-formula** **式を読み上げない**:口述原稿に LaTeX・`\\`・`^`・`_`・`a + b = c` のような文字列を書かない。式の意味を言葉で言う(§4 の見本の [1])\n- 日本語の口述原稿は話し言葉の です・ます。英語は話し言葉の英語。目安は 1 秒に日本語 5 字・英語 2.5 語。1 回の発言は 1〜3 文\n\n## 5. 修正依頼\n\n利用者が**修正依頼**(規格の名前の付いた指摘の一覧と、今のファイル)を貼り付けたら、その指摘だけを直し、ほかは変えず、`id=\"…\"` と `{#…}` をすべてそのまま残し(R-noids)、また 2 つの囲みで返す(R-output)。依頼に一部のスライドしかなければ、そのスライドの `<section>` だけ(`<html>` なし)とその節だけを 2 つの囲みで返す(エディタが id で元の場所に戻す)。\n\n## 6. 見本\n\n小さな教材の見本(架空。形を見るためで、中身は写さない)。段階の数え方:2 項目の箇条書きは段階 1〜2 と `[concl]`<!--part:m-flow-->、箱が 4 つの `m-flow` は段階 1〜4<!--/part-->。いくつかの束の指示の最後にも見本がある。\n\n### 共通(英語・default テーマ・注目の演出<!--part:m-flow-->・m-flow<!--/part-->)\n\n```deck.html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>How a web page arrives</title>\n</head>\n<body>\n<div id=\"stage\">\n\n<section class=\"slide cover noconcl static\">\n <div class=\"venue\">Computing basics, lesson 1 (a fictional course)</div>\n <h1>How a web page arrives</h1>\n</section>\n\n<section class=\"slide\">\n <h2>Two programs take part</h2>\n <div class=\"body\">\n <p>Opening a page is a conversation between two programs.</p>\n <ul>\n <li id=\"browser\">The <span class=\"term\">browser</span> asks for the page and draws it</li>\n <li id=\"server\">The <span class=\"term\">server</span> keeps the page and sends it back</li>\n </ul>\n </div>\n <div class=\"concl\"><span>Every page load is a request and a reply</span></div>\n</section><!--part:m-flow-->\n\n<section class=\"slide\">\n <h2>From the address to the screen</h2>\n <div class=\"body\">\n <m-flow style=\"height:300px\" aria-label=\"Four stages: type the address, send a request, send the page back, draw the page\">\n <script type=\"application/json\">{\"nodes\": [\n {\"id\": \"a\", \"label\": \"Type the\\naddress\", \"x\": 10, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 1},\n {\"id\": \"b\", \"label\": \"Send a\\nrequest\", \"x\": 315, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 2},\n {\"id\": \"c\", \"label\": \"Send the\\npage back\", \"x\": 620, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 3, \"tone\": \"term\"},\n {\"id\": \"d\", \"label\": \"Draw the\\npage\", \"x\": 925, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 4, \"tone\": \"emph\"}\n ], \"edges\": [\n {\"from\": \"a\", \"to\": \"b\"}, {\"from\": \"b\", \"to\": \"c\"}, {\"from\": \"c\", \"to\": \"d\"}\n ]}</script>\n </m-flow>\n </div>\n <div class=\"concl\"><span>A slow page is slow in one of these four stages</span></div>\n</section><!--/part-->\n\n</div>\n</body>\n</html>\n```\n\n```narration.md\n# Narration: How a web page arrives\n\n## How a web page arrives\n[0] Today we follow a web page on its way from a server to your screen.\n\n## Two programs take part\n[0] Opening a page is a conversation between two programs.\n[1] {mark:browser}The browser is the program you look at. It asks for the page and then draws it.\n[2] {mark:server}The server is a program on another computer. It keeps the page and sends it back when asked.\n[concl] Every page load is a request and a reply.<!--part:m-flow-->\n\n## From the address to the screen\n[0] Let us put the steps in order.\n[1] First you type the address of the page.\n[2] The browser turns it into a request and sends it to the server.\n[3] The server finds the page and sends it back.\n[4] The browser draws the page on the screen.\n[concl] When a page is slow, one of these four stages is taking the time.<!--/part-->\n```",
|
|
1035
|
+
"common": "# AI への指示\n\n指示の版:`b2ad9e7c`\n\n短い **Egatari の教材**を 1 つ書いてください。段階ごとに出る HTML のスライド(`deck.html`)と口述原稿(`narration.md`)で、どちらも自動で組まれ、品質チェックを受けます。ここにないものは使えません。教材は頼まれた言語で書きます(スライドと口述原稿は同じ言語)。規格には **R-fit** のような名前があり、修正依頼は破った規格を名前で示します。依頼は最後の **頼みたいこと**(かその前の会話)にあります。空の項目やない項目はほどよく決め、A と B が両方残っていれば書き込みのある方に従います。\n\n**よくある失敗:**\n\n- **2 つの囲みはどちらも最後まで書いて閉じる。**囲みの途中で終わらない(R-output)。構成案がなければ、教材は短くする(5〜8 枚)。頼む文に構成案とその範囲があれば、その範囲のスライドをちょうどその枚数だけ書く(エディタは 1 回に 6 枚までしか頼まないので、収まる)\n- **1280×720 のスライドの大きさ**(品質チェックが測る。R-fit):本文の場所は 1184 × 443 px(565 px まで。`noconcl` なら 1184 × 558)。字は 32 px・1 行 46 px で、入るのは**およそ 8 行**。はみ出す 46 px ごとに 1 行を削る。**図や部品の中も含め、字はすべて 24 px 以上**\n- **グラフと図:**部品は大きさによらず字を 24〜28 px で描くので、決めるのは部品の大きさ(R-fit)\n- **その場で書く `<svg>`:**字は「表示の幅 ÷ viewBox の幅」で縮むので、viewBox を表示の画素で書く(`<svg viewBox=\"0 0 560 320\" width=\"560\" height=\"320\">`)。`font-size` は 24 以上。`width:100%` と別の幅の viewBox を組み合わせない。合う部品があれば部品を使う\n\n## 1. 出力の形\n\n- **R-output** 返事は**ちょうど 2 つのコードの囲み**にし、この順で、名前を `deck.html` と `narration.md` にする(始まりの行は ```` ```deck.html ```` と ```` ```narration.md ````)。間には何も書かない(前後に 1 行の添え書きはよい)。1 つのファイルを囲みに分けない。ファイル・キャンバス・添付にせず、返事の本文に書く。ほかのファイルを参照しない(画像・`{{FIG:…}}`・`{{JSON:…}}`・外の URL・`<link>` は使わない)。囲みの途中で終わらない(長すぎるなら枚数を減らす。ただし構成案の範囲を頼まれたら、ちょうどその枚数)\n- **R-outline** **構成案だけ**を頼まれたら(長い教材を 2 回に分けて作るとき)、`outline` という名前の囲み 1 つ(始まりの行は ```` ```outline ````)だけで返し、`deck.html` と `narration.md` は書かない:列が「番号」「見出し」「要点(1 行)」の Markdown の表で、スライドごとに 1 行、全スライドを順に。その後の頼む文は範囲を示す(「構成案の 7〜12 枚目」)ので、その見出しと要点のとおりに、ちょうどそのスライドを書く\n- **R-noids** スライドの id を**書かない**。`<section class=\"slide\">` に `id` を付けず、口述原稿の見出しにも `{#…}` を付けない。id は取り込みでエディタが付ける。id のあるデッキを渡されたとき(修正依頼)は、今ある `id=\"…\"` と `{#…}` をそのまま残す\n\n## 2. deck.html\n\n### 2.1 骨組み\n\n```html\n<!DOCTYPE html>\n<html lang=\"ja\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>教材の題名</title>\n</head>\n<body>\n<div id=\"stage\">\n <section class=\"slide cover noconcl static\"> … </section>\n <section class=\"slide\"> … </section>\n</div>\n</body>\n</html>\n```\n\n- `lang`:`ja`・`en` など(教材の言語)。`data-theme`:ビジネス・ピッチは `sumi`、国語は `kokugo`、ほかは `default`\n- `<script>` は部品のデータ(§2.6)だけ。`<style>` は配置(大きさ・間隔)だけに使い、色は書かない\n\n### 2.2 スライド\n\n- 普通のスライド:`<h2>` の見出し、`<div class=\"body\">…</div>`、`<div class=\"concl\"><span>…</span></div>`(結論の行。短い 1 文)\n- 表紙:`<section class=\"slide cover noconcl static\">` に、あれば `<div class=\"venue\">…</div>`、`<h1>題名</h1>`、あれば `<div class=\"au\">…</div>`\n- 章の扉:`<section class=\"slide sec noconcl static\"><h1>章の題</h1></section>`\n- `<section>` の class:`noconcl`(結論の行なし)、`static`(段階なし)、`nostep`(箇条書きも初めから全部)、`layout-tate`(縦書き。kokugo の束があるときだけ)、属性 `data-morph`(§2.5)\n- `.body` の中:`<p class=\"sub\">` 小見出し、`<div class=\"big\">` 主要な式、`<p class=\"note\">` 補足、`<div class=\"thm\">` 定理の枠、`<div class=\"cols\">` 横並び、普通の `<p>` `<ul>` `<ol>` `<table>`\n- 字の強調(色を付ける唯一の方法):`term`(用語・問い)、`emph`(結論・問題・目標)、`muted`(既知の結果・控えめ)、`b`(太字)\n- **R-headings** スライドの見出し(表紙と扉は `h1`、ほかは `h2`)は**すべて違う**ものにする(同じなら語を足す)。そのスライドの口述原稿の節は `## ` に続けて**見出しとまったく同じ文字列**で始める(`<br>` などのタグは除く)\n- **R-colors** 色はテーマだけで:上の class と式のマクロ `\\hlE` `\\hlT` `\\hlM`。16 進・`rgb()`・色の名前・`\\color`・`\\textcolor` は使わない。部品や SVG の中では:**色はテーマの CSS 変数だけ**を使う:`var(--fg)` `var(--term)` `var(--emph)` `var(--muted)` `var(--accent2)` `var(--line)`。SVG では属性ではなく `style=\"stroke:var(--emph)\"` で書く(`DECK.el` は `fill` `stroke` に `var(` があれば自動で style に回す)\n\n### 2.3 段階(出す順 = 話す順)\n\n- **R-steps** 段階 0 は現れたときの姿で、文脈だけ(見出し・小見出し・導入の 1 文)。`data-step=\"k\"`(k = 1, 2, …)の要素は段階 k で現れる。材料(箇条書きの項目・式・表の行・図の部分)は話す順に出す。式とそれを導く 1 文は同じ段階(`<div data-step=\"k\">` で一緒に囲む)。1 枚の段階は 5 前後まで\n- 結論の行は自動で**最後の段階** `concl` になる(`data-step` を付けない)\n- `data-step` が 1 つもないスライドでは、上の階層の箇条書きの項目(`.body > ul > li`・`.body > ol > li`)に 1, 2, … が自動で付く。1 つでもあれば自動にならないので、出すものすべてに付ける\n- 部品は自分の段階を足す(§3)。`data-from`(既定 1)から始まる\n- つまり段階は `0 … max` と、結論の行があれば `concl`。`static` のスライドは段階 0 だけ\n\n### 2.4 数式(KaTeX)\n\n- **R-math** 行内は `\\( … \\)`、別行は `\\[ … \\]`。式の中の `<` は `\\lt`、`>` は `\\gt`。標準のほかに使えるマクロ:`\\hlE{…}`(emph)`\\hlT{…}`(term)`\\hlM{…}`(muted)、`\\htmlId{ID}{…}`、`\\htmlData{mark=ID}{…}`、`\\htmlClass{…}{…}`、`\\morph{ID}{…}`。`\\newcommand` と `\\color` は使わない。記号は最初に使う所で定義する(`\\(\\mu\\)`:母平均)\n\n### 2.5 注目の演出とモーフ\n\n- **R-marks** 口述原稿の `{mark:ID}`(§4)は、**同じスライド**の目印に印を付ける。目印:スライドの中の `id=\"ID\"` か `data-mark=\"ID\"` の要素。式の一部は KaTeX の `\\htmlId{ID}{…}` / `\\htmlData{mark=ID}{…}`(build はこの 2 つと `\\htmlClass` だけを許す)。同じ ID を何枚かで使うなら `data-mark` にする(id は文書の中で一意に)\n- モーフ(なくてよい):`<section class=\"slide\" data-morph>` は前のスライドの要素を今の位置へ滑らせる。両方のスライドの要素に同じ `data-id=\"…\"`、式の一部は両方に `\\morph{ID}{…}`。段階 0 で見えている要素だけが動く\n\n### 2.6 部品\n\n- **R-components** 動く図は一覧(§3)の Web Components `<m-…>` で、`.body` の中に置く。どれにも高さ(`style=\"height:380px\"`)と `aria-label` を付ける。データは子の `<script type=\"application/json\">…</script>` **1 つ**にその場で書く。**図の数字は正しく**(計算する。見た目のために値を作らない。架空の数字は架空と書く)。関数の式は算術の式だけで、コードとしては実行されない(`Math.exp(x)`・`x**2`)。動きが説明になる所だけに使う(たいていのスライドには要らない)\n\n### 2.7 表し方を選ぶ\n\n- **R-purpose** 表し方は習慣でなく、そのスライドで言いたいことから選ぶ。作者がグラフの種類を言っていればそれに従う。表は全パーツの一覧を兼ねる。使うのは渡された文章にあるパーツだけ(§3 と、入っている束)。入っていないパーツの方が合うときは、1 行のメモでそう伝える\n\n{{PURPOSES}}\n\n- **R-whole** 箇条書き・数字の札・円グラフは全体を一度に見せる。台本が 1 つずつ取り上げるときだけ 1 行ずつ出す(箇条書きなら全体に 1 つの `data-step` を付けるか、スライドに `nostep`)\n\n### 2.8 スライドに収める(品質チェックのエラー)\n\n- **R-title** 見出し:日本語は 26 字まで(全角 1・半角 0.5)、英語は 60 文字まで。コロンで終えない\n- **R-concl** 結論の行:日本語は 35 字まで、英語は 70 文字まで。1 行\n- **R-fit** 本文は 565 px(`noconcl` なら 680 px)より上で終える:1 枚におよそ 8 行・100 字・英語 60 語、または `big` の式 1 つと短い箇条書き 3 つ、または高さ 380 px までの部品と短い 1 行(2 行なら 330 px まで)。入らなければスライドを分ける。字を縮めず、字の大きさを書かない。図の中の字は 24 px 以上\n- **R-style** 日本語のスライドは常体(だ・である、体言止め)で、です・ます を使わない。句読点はデッキ全体で 1 つの組(`、。` か `,.`)。英語のスライドは短い句で\n\n## 3. 部品の一覧\n\nどの教材でも使える標準の部品。§6 の後に束の指示があれば、その種類の材料の部品が加わる。「steps」は部品が使うスライドの段階の数(`data-from` から。既定 1)。秒で測る属性(動きの長さ・ずれ)は載せない(既定で口述原稿に合う)。型が json の属性は、値に JSON を書く(`values=\"[0.1,0.5]\"`)。「データの形」の `?` は省略できる欄。型を書いていない label・tex・note・tone は str、step は int、at は num。名前やラベルの `*…*` は斜体、`_` `^` は次の 1 字だけ下付き・上付き。記号のまま出すなら全角の _ ^ *。\n\n{{CATALOG}}\n\n## 4. narration.md\n\n```markdown\n# 口述原稿:<教材の題名>\n\n## 減衰の式\n[0] 減衰の式です。時刻ごとに残っている原子の数を考えます。\n[1] 残る数は、はじめの数に、時間とともに小さくなる指数関数を掛けたものです。\n[2] {mark:n0|circle}{N₀|エヌゼロ} は、時刻ゼロのときの、はじめの数です。\n[concl] 半分になるまでの時間は、崩壊定数だけで決まります。\n```\n\n- スライドごとに 1 つの節を、**スライドの順に、すべてのスライド(表紙も)について**:`## <スライドの見出し>`(R-headings)。`{#id}` は付けない(R-noids)\n- **R-narr-steps** 段階の印は `[0]` `[1]` … と `[concl]`。**どのスライドのどの段階にも口述原稿を書き**(段階 0 から max まで、結論の行があれば `[concl]`)、**ない段階の印は書かない**(`static` の表紙は `[0]` だけ。結論の行がなければ `[concl]` もない。`[01]` とは書かない)。段階の中では、その段階で現れるものだけを話す\n- **R-dialogue** **既定は話者 1 人**で、話者名を書かない。掛け合いは頼まれたときだけ(3 人以上を頼まれても 2 役にし、最初にそう書く):行を `Expert:` か `Novice:` で始め(続きの行は字下げ。話者なしは Expert)、認知的徒弟制の形にする:\n - Novice は相づち役にせず、学習者の疑問を代弁するか、「つまり〜ということですか」と言い換える\n - Expert は答えて具体例か比喩を 1 つ足すか、言い換えを確かめて(違えば直して)1 歩進める\n - 理解の分かれ目(誤解しやすい所、「なぜ」が残る所)にだけ、1 枚に 1 回・2〜3 発言まで。ほかは Expert 1 人\n - 「なるほど」だけの発言、前の発言のくり返しは書かない。例:`Novice: つまり、大きいほど早く着くのですか。` `Expert: いつもではありません。大きすぎると谷を飛び越えます。大股で坂を下りすぎて、向こうの斜面に足が着くように。`\n- `{note:…}` 発表者用\n- `{cue}`:段階の中の同期点。部品の `cues(k)` の 1 つに 1 つ(部品の説明が求めるときだけ)\n- `{mark:ID}`・`{mark:ID|効果}`・`{mark:ID|効果|hold=秒}`・`{mark:clear}`:目印のことを言う言葉の**すぐ前**に置く。1 段階に 1〜2 個まで。言葉でも言う。効果:`underline`(既定。手描きの下線を左から右へ)、`circle`(手描きの囲み)、`box`(角丸の枠)、`spot`(対象のまわり以外を背景色で薄くする)、`laser`(光の点が対象の下へ滑ってきて少し留まる)\n- **R-reading** `{表示|読み}` は **1 つの記号か 1 つの用語**の読み:`{θ|シータ}`、`{N₀|エヌゼロ}`、`{論語|ろんご}`。1 つの記号に星・プライム・添え字・ハットやバーが付いていてもよい(`{Q*|キュースター}`、`{θ̂|シータハット}`)。表示は普通の文字で書き、LaTeX にせず、式やいくつもの記号にしない(`{1-η|…}`・`{θとη|…}` は誤り:記号ごとに読みを付け、関係は言葉で言う)\n- **R-formula** **式を読み上げない**:口述原稿に LaTeX・`\\`・`^`・`_`・`a + b = c` のような文字列を書かない。式の意味を言葉で言う(§4 の見本の [1])\n- 日本語の口述原稿は話し言葉の です・ます。英語は話し言葉の英語。目安は 1 秒に日本語 5 字・英語 2.5 語。1 回の発言は 1〜3 文\n\n## 5. 修正依頼\n\n利用者が**修正依頼**(規格の名前の付いた指摘の一覧と、今のファイル)を貼り付けたら、その指摘だけを直し、ほかは変えず、`id=\"…\"` と `{#…}` をすべてそのまま残し(R-noids)、また 2 つの囲みで返す(R-output)。依頼に一部のスライドしかなければ、そのスライドの `<section>` だけ(`<html>` なし)とその節だけを 2 つの囲みで返す(エディタが id で元の場所に戻す)。\n\n## 6. 見本\n\n小さな教材の見本(架空。形を見るためで、中身は写さない)。段階の数え方:2 項目の箇条書きは段階 1〜2 と `[concl]`<!--part:m-flow-->、箱が 4 つの `m-flow` は段階 1〜4<!--/part-->。いくつかの束の指示の最後にも見本がある。\n\n### 共通(英語・default テーマ・注目の演出<!--part:m-flow-->・m-flow<!--/part-->)\n\n```deck.html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>How a web page arrives</title>\n</head>\n<body>\n<div id=\"stage\">\n\n<section class=\"slide cover noconcl static\">\n <div class=\"venue\">Computing basics, lesson 1 (a fictional course)</div>\n <h1>How a web page arrives</h1>\n</section>\n\n<section class=\"slide\">\n <h2>Two programs take part</h2>\n <div class=\"body\">\n <p>Opening a page is a conversation between two programs.</p>\n <ul>\n <li id=\"browser\">The <span class=\"term\">browser</span> asks for the page and draws it</li>\n <li id=\"server\">The <span class=\"term\">server</span> keeps the page and sends it back</li>\n </ul>\n </div>\n <div class=\"concl\"><span>Every page load is a request and a reply</span></div>\n</section><!--part:m-flow-->\n\n<section class=\"slide\">\n <h2>From the address to the screen</h2>\n <div class=\"body\">\n <m-flow style=\"height:300px\" aria-label=\"Four stages: type the address, send a request, send the page back, draw the page\">\n <script type=\"application/json\">{\"nodes\": [\n {\"id\": \"a\", \"label\": \"Type the\\naddress\", \"x\": 10, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 1},\n {\"id\": \"b\", \"label\": \"Send a\\nrequest\", \"x\": 315, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 2},\n {\"id\": \"c\", \"label\": \"Send the\\npage back\", \"x\": 620, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 3, \"tone\": \"term\"},\n {\"id\": \"d\", \"label\": \"Draw the\\npage\", \"x\": 925, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 4, \"tone\": \"emph\"}\n ], \"edges\": [\n {\"from\": \"a\", \"to\": \"b\"}, {\"from\": \"b\", \"to\": \"c\"}, {\"from\": \"c\", \"to\": \"d\"}\n ]}</script>\n </m-flow>\n </div>\n <div class=\"concl\"><span>A slow page is slow in one of these four stages</span></div>\n</section><!--/part-->\n\n</div>\n</body>\n</html>\n```\n\n```narration.md\n# Narration: How a web page arrives\n\n## How a web page arrives\n[0] Today we follow a web page on its way from a server to your screen.\n\n## Two programs take part\n[0] Opening a page is a conversation between two programs.\n[1] {mark:browser}The browser is the program you look at. It asks for the page and then draws it.\n[2] {mark:server}The server is a program on another computer. It keeps the page and sends it back when asked.\n[concl] Every page load is a request and a reply.<!--part:m-flow-->\n\n## From the address to the screen\n[0] Let us put the steps in order.\n[1] First you type the address of the page.\n[2] The browser turns it into a request and sends it to the server.\n[3] The server finds the page and sends it back.\n[4] The browser draws the page on the screen.\n[concl] When a page is slow, one of these four stages is taking the time.<!--/part-->\n```",
|
|
962
1036
|
"request": "# 頼みたいこと\n\n*(A か B を埋め、もう一方は消します。書かない項目は消してかまいません)*\n\n**A. 新しく作る**\n\n- タイトル(表紙にそのまま使う):\n- 対象(だれ向け):\n- 長さ(枚数か分):\n- 言語:\n- 話者:1 人\n- そのほかの希望:\n\n**B. 渡した資料と話し合いの内容で作る**\n\nこのチャットで渡した資料と、ここまでの話し合いの内容で、教材を作ってください。\n\n- タイトル(表紙にそのまま使う):\n- 対象(だれ向け):\n- 長さ(枚数か分):\n- 言語:\n- 話者:1 人\n- そのほかの希望:",
|
|
963
1037
|
"sets": {
|
|
964
1038
|
"stats": "## 部品の束:stats(統計の図)\n\nデータを見せる教材・発表向け。分布、箱ひげ図、ヒートマップ、観測が 1 つずつ加わって変わる分布を見せる。テーマは `default`。データの出どころと数(何人・何件)をスライドか口述原稿に書き、本物らしく見えるデータを作らない(R-components)。\n\n- **軸のある図**(<!--part:m-hist-->`m-hist`・<!--/part--><!--part:m-boxplot-->`m-boxplot`・<!--/part--><!--part:m-seq-->`m-seq`・<!--/part-->など)は目盛りと軸の名前に左 86 px、上下合わせて 80 px を使うので、高さ **300〜380 px**、幅 **560 px 以上**にする(`<div class=\"cols\">` なら図の列を 55% 以上に)\n- 軸の範囲には、図の値(R-components のとおり計算したもの)がすべて入るようにする\n\nこの束の部品(§3 の部品に加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
1039
|
+
"data": "## 部品の束:data(情報・データサイエンス)\n\n情報・データサイエンスの教材向け(情報I・データサイエンス・プログラミング)。データの出どころと数(何人・何件)をスライドか口述原稿に書く(R-components)。<!--part:m-code-->コードは `m-code` で見せる。<!--/part-->\n\nこの束の部品(§3 の部品に加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
965
1040
|
"math": "## 部品の束:math(算数・数学)\n\n算数・数学の教材向け。筆算、数直線、テープ図、パラメータで形の変わる関数を見せる。テーマは `default`。\n\n- **軸のある図**(<!--part:m-sweep-->`m-sweep`・<!--/part--><!--part:m-curves-->`m-curves`・<!--/part-->など)は目盛りと軸の名前に左 86 px、上下合わせて 80 px を使うので、高さ **300〜380 px**、幅 **560 px 以上**にする(`<div class=\"cols\">` なら図の列を 55% 以上に)\n- 軸の範囲には、図の値(R-components のとおり計算したもの)がすべて入るようにする\n\nこの束の部品(§3 の部品に加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}\n\n<!--part:m-sweep-->### 見本:算数・数学(英語・default テーマ・m-sweep)\n\n(その部品を使うスライドだけ。`deck.html` の骨組みは §6 の見本と同じ)\n\n```deck.html\n<section class=\"slide\">\n <h2>A larger λ decays faster</h2>\n <div class=\"body\">\n <div class=\"cols\" style=\"gap:24px\">\n <div style=\"flex:0 0 36%\">\n <div class=\"big\">\\[ \\frac{N(t)}{N_0}=e^{-\\lambda t} \\]</div>\n <ul class=\"nostep\"><li>Grey: the previous \\(\\lambda\\)</li></ul>\n </div>\n <m-sweep f=\"Math.exp(-c*u)\" values=\"[0.2,0.5,1.0]\" param=\"λ\" xr=\"[0,6]\" yr=\"[0,1]\" xt=\"[0,2,4,6]\" yt=\"[0,0.5,1]\"\n xl=\"*t*\" yl=\"share left\" digits=\"1\" style=\"height:380px\" aria-label=\"Share of atoms left over time for three decay constants\"></m-sweep>\n </div>\n </div>\n <div class=\"concl\"><span>Raising λ shortens the half-life</span></div>\n</section>\n```\n\n```narration.md\n## A larger λ decays faster\n[0] Let us change the decay constant and watch the share of atoms left.\n[1] Raising it from 0.2 to 0.5 makes the curve fall faster.\n[2] At 1.0 it falls faster still.\n[concl] A larger decay constant means a shorter half-life.\n```<!--/part-->\n\n<!--part:m-sweep-->段階の数え方:値が 3 つの `m-sweep` は段階 1〜2。<!--/part-->",
|
|
966
1041
|
"maps": "## 部品の束:maps(地図)\n\n地図を使う教材・案内向け(地理・歴史・地域の案内)。日本地図か世界地図を使う。テーマは `default`。数字(人口・面積・生産量など)には、何年の・どこの数字かをスライドか口述原稿に書く。\n\nこの束の部品(§3 の部品に加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
967
1042
|
"kokugo": "## 部品の束:kokugo(国語)\n\n国語(漢文・古文・現代文)の教材向け。テーマは `kokugo`。口述原稿では、難しい語や名前に読み `{表示|読み}` を付ける(R-reading)。\n\n- **縦書きのスライド:**`<section class=\"slide layout-tate\">` でスライド全体を縦書きにする。`<h2>` は右端の縦 1 列(全角でおよそ 14 字。折り返さない)、本文は右から左へ列を重ね、結論の行は左端の縦 1 列(およそ 19 字)。本文は 2 つの列の間に収める(重なれば品質チェックが指摘する)。本文の中の部品・図・表は横書きのまま置かれるので、部品の縦書きの指定を使う(<!--part:m-kobun-->`m-kobun tate`<!--/part--><!--part:m-kobun,m-gendai-->・<!--/part--><!--part:m-gendai-->`m-gendai tate`<!--/part--><!--part:m-kanbun-->。`m-kanbun` はいつも縦書き<!--/part-->)\n\nこの束の部品(§3 の部品に加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}\n\n<!--part:m-kanbun-->### 見本:国語(kokugo テーマ・m-kanbun)\n\n(その部品を使うスライドだけ。`deck.html` の骨組みは §6 の見本と同じ)\n\n```deck.html\n<section class=\"slide\">\n <h2>学びて時に之を習ふ</h2>\n <div class=\"body\">\n <m-kanbun style=\"height:440px\" aria-label=\"『論語』学而篇の冒頭の白文、訓点、読む順、書き下し文\">\n 学(ビテ)而{-}時(ニ)習(フ)[レ]之(ヲ)、\n 不{=ず}[二]亦(タ)説(バシカラ)[一]乎{=や}。\n </m-kanbun>\n </div>\n <div class=\"concl\"><span>一二点は、一を読んでから二へ戻る</span></div>\n</section>\n```\n\n```narration.md\n## 学びて時に之を習ふ\n[0] 返り点も送り仮名もない、白文です。\n[1] 返り点と送り仮名を付けます。而は、読まない置き字です。\n[2] 読む順に字をたどります。一句目は、レ点で之から習へ戻ります。\n[3] 二句目は、一二点で説から不へ戻ります。\n[4] 書き下し文にすると、学びて時に之を習ふ、亦た説ばしからずや、となります。\n[concl] 一二点は、一の字を読んでから、二の字へ戻ります。\n```<!--/part-->\n\n<!--part:m-kanbun-->段階の数え方:`m-kanbun` は訓点(段階 1)、読む順は句ごとに 1 段階、最後に書き下し文。`[n]` は句ごとに書く。<!--/part-->",
|
|
@@ -972,6 +1047,11 @@ export const PACK = {
|
|
|
972
1047
|
"science": "## 部品の束:science(理科)\n\n動くモデルで見せる理科の教材向け(月の満ち欠けなど)。テーマは `default`。大きさや距離が実際の比でないときは、スライドか口述原稿でそう断る。\n\n色は R-colors のものに加えて `--lit` も使える:光と、光が照らすもの。輪郭線を付けた塗りに使う。\n\nこの束の部品(§3 の部品に加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}"
|
|
973
1048
|
},
|
|
974
1049
|
"components": {
|
|
1050
|
+
"m-balance": {
|
|
1051
|
+
"set": "data",
|
|
1052
|
+
"row": "| `<m-balance>` | 確率の重りを置き、支点が期待値でつり合う様子を示す | 数直線と重り→支点を期待値へ→値と和の式(3 段階) | `{values:num[],probs:num[],name?:str}` |",
|
|
1053
|
+
"entry": "### `<m-balance>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"values\":[0,1,2,3],\"probs\":[0.1,0.3,0.4,0.2],\"name\":\"X\"}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `digits` | number | `2` | 期待値の小数桁 |\n| `size` | number | `0` | 文字 px(0 は 26) |\n\n`<m-balance style=\"height:440px\">` の子に JSON を置く。\n\n- `values`:異なる数 2〜12 個\n- `probs`:同数の確率。合計 1(±1e-9)、外れは報告して描く\n- `name`:変数名(X)"
|
|
1054
|
+
},
|
|
975
1055
|
"m-bars": {
|
|
976
1056
|
"set": "standard",
|
|
977
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}` |",
|
|
@@ -988,6 +1068,16 @@ export const PACK = {
|
|
|
988
1068
|
"row": "| `<m-cards>` | カード(番号の丸・アイコン・見出し・説明)を横一列か 2 段に並べ、段階ごとに出す。矢印で順を、枠の色で強調を見せる | カードの step の最大(既定はカード 1 枚 = 1 段階。per-step で n 枚ずつ) | `{cards:{n?:str,icon?:str,title:str,text?:str,step?,tone?}[]}` |",
|
|
989
1069
|
"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"
|
|
990
1070
|
},
|
|
1071
|
+
"m-ci": {
|
|
1072
|
+
"set": "data",
|
|
1073
|
+
"row": "| `<m-ci>` | 正規標本の区間を重ね、母平均を含む割合で信頼水準を説明する | 軸と μ→区間を順に→含む数と外れの強調(3 段階) | `{mu:num,sigma:num,n:num,reps?:num,level?:num,seed?:num}` |",
|
|
1074
|
+
"entry": "### `<m-ci>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"mu\":50,\"sigma\":10,\"n\":25,\"reps\":40,\"level\":0.95,\"seed\":2}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `size` | number | `0` | 文字 px(0 は 26) |\n\n`<m-ci style=\"height:440px\">` の子に JSON を置く。\n\n- `mu`, `sigma`, `n`:母平均、正の母標準偏差、正の整数の標本数\n- `reps`:正の整数の区間数(40)。`level`:0〜1 の間(0.95)。`seed`:整数(2)"
|
|
1075
|
+
},
|
|
1076
|
+
"m-code": {
|
|
1077
|
+
"set": "data",
|
|
1078
|
+
"row": "| `<m-code>` | 短いコードを行ごとに説明し、最後に出力を見せる | コード全体→説明を順に→出力(説明数+1、出力ありは+2) | `{code:str,lang?:str,output?:str,steps:{lines:int[],note}[]}` |",
|
|
1079
|
+
"entry": "### `<m-code>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"lang\":\"python\",\"code\":\"import pandas as pd\\ndf = pd.read_csv(\\\"sales.csv\\\")\\ndf.groupby(\\\"store\\\")[\\\"sales\\\"].mean()\",\"steps\":[{\"lines\":[1],\"note\":\"pandas を読み込む\"},{\"lines\":[2],\"note\":\"CSV を表として読む\"},{\"lines\":[3],\"note\":\"店ごとの平均\"}],\"output\":\"store\\nA 120.5\\nB 98.0\"}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `size` | number | `0` | 文字 px(0 は既定) |\n| `outputPos` | enum | `\"auto\"` | 出力の位置 |\n\n`<m-code style=\"height:440px\">` の子に JSON を置く。\n\n- `code`:1184px 幅・24px で半角約 76 字/行。高さ ≈ 132 + 34×行 + 35×(説明一覧の行 − 1)、一覧は 1 行約 40 字。440px を超すなら行を減らすか分ける\n- `lang`:言語の札。`steps[{lines,note}]`:1 始まりの行番号か両端を含む範囲、短い説明\n- `output`:省略可の出力文字列(8 行まで)\n\n台本はコードを読み上げない。その行が何をするかを言葉で言う(変数名や記号は 1 つずつなら書いてよい)。"
|
|
1080
|
+
},
|
|
991
1081
|
"m-compare": {
|
|
992
1082
|
"set": "standard",
|
|
993
1083
|
"row": "| `<m-compare>` | 2 つ(3 つまで)を横に並べて比べる表。一方の列、もう一方の列、それから行ごとの違い | 列の数 + 1(違いの段階。diff も better もなければ列の数だけ) | `{sides:{label,tone?,step?}[],rows:{label?,values:(str\\|num)[],diff?:str,better?:int}[]}` |",
|
|
@@ -995,8 +1085,8 @@ export const PACK = {
|
|
|
995
1085
|
},
|
|
996
1086
|
"m-curves": {
|
|
997
1087
|
"set": "standard",
|
|
998
|
-
"row": "| `<m-curves>` | 同じ座標軸に線を 1 本ずつ引く(線の名前は凡例でなく線の端に直接書く) | step の最大(既定は系列の数) | `[{label?,f?:str,pts?:[num,num][],tone?,step?,labelAt?:num,color?:str,dash?:bool,xr?:[num,num],at?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\"\\|\"top\"\\|\"bottom\"\\|\"start\"\\|\"middle\"\\|\"end\",dx?:num,dy?:num,ly?:num} (f or pts),…]` — データは配列そのもの({\"series\": […]} ではない)。軸は属性に書く(xr=\"[0,10]\" xl=\"…\")。式の欄は f で、変数は x(fn・u ではない) |",
|
|
999
|
-
"entry": "### `<m-curves>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `[{\"label\":\"需要 D\",\"f\":\"10 - x\"},{\"label\":\"供給 S\",\"f\":\"2 + x\"},{\"label\":\"均衡\",\"pts\":[[4,0],[4,6]],\"dash\":true}]`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `xr` | json | `[0, 1]` | 横軸の範囲 |\n| `yr` | json | `[0, 1]` | 縦軸の範囲 |\n| `xt` | json | `[]` | 横軸の目盛りの値 * |\n| `yt` | json | `[]` | 縦軸の目盛りの値 * |\n| `xf` | number | | 横軸の目盛りの小数桁 |\n| `yf` | number | | 縦軸の目盛りの小数桁 |\n| `xl` | string | `\"\"` | 横軸の名前(`*斜体*` `_下付き` `^上付き`) * |\n| `yl` | string | `\"\"` | 縦軸の名前 * |\n| `n` | number | `300` | f を描く分割数 |\n| `lw` | number | `3.5` | 線の太さ |\n| `size` | number | `0` | 字の大きさ(24 以上。0 = 既定) |\n\n同じ予測分布に平均・中央値・分位点を順に引く、損失関数を 1 つずつ重ねる、など\n「一つの図で比較の軸を一つずつ見せる」ときに使う。\n\n系列は子の `<script type=\"application/json\">` に配列で書く。\n1 系列 = 1 段階(書いた順)。`step` で変えられ、同じ `step` の系列は一緒に引く。口述原稿の [n] はこの段階に合わせる。\n\n| 欄 | 意味 |\n|---|---|\n| `label` | 線の名前 |\n| `f` | x の算術の式(`exp(…)` `sqrt(…)` `PI` などの `Math` の関数と定数、`N(x, 平均, 標準偏差)`、`+ - * / % **`、比較と `? :`。下を見よ)。`xr` で描く範囲を狭められる |\n| `pts` | 点列 `[[x, y], …]`(縦線や実測の折れ線) |\n| `tone` | `term` `emph` `accent2` `muted` `fg` `series-1..4`(既定は `series-1..4` の順) |\n| `dash` | 破線 |\n| `labelAt` / `anchor` / `dx` / `dy` / `ly` | 名前の位置:横軸の値 `labelAt` の点に置く(既定は線の端)。`anchor` は向き(`right` `left` `above` `below`)。`ly` は縦軸の値で高さを決める |\n\n`size=\"40\"`:字の大きさ(24 以上)。\n\n`f` は算術の式で、コードとしては実行しない:数、`x`、`Math` の関数と定数(`sin(x)` とも `Math.sin(x)` とも書ける。`Math.random` は使えない)、`N(x, 平均, 標準偏差)`、`+ - * / % **`、比較(`< <= > >= == !=`)、`&& || !`、`? :`、括弧。べき乗は `**`(`^` は書けない)。書けない式は図の代わりに札が出る。",
|
|
1088
|
+
"row": "| `<m-curves>` | 同じ座標軸に線を 1 本ずつ引く(線の名前は凡例でなく線の端に直接書く) | step の最大(既定は系列の数) | `[{label?,f?:str,pts?:[num,num][],tone?,step?,labelAt?:num,color?:str,dash?:bool,xr?:[num,num],area?:any[],areaLabel?:str\\|any[],at?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\"\\|\"top\"\\|\"bottom\"\\|\"start\"\\|\"middle\"\\|\"end\",dx?:num,dy?:num,ly?:num} (f or pts),…]` — データは配列そのもの({\"series\": […]} ではない)。軸は属性に書く(xr=\"[0,10]\" xl=\"…\")。式の欄は f で、変数は x(fn・u ではない) |",
|
|
1089
|
+
"entry": "### `<m-curves>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `[{\"label\":\"需要 D\",\"f\":\"10 - x\"},{\"label\":\"供給 S\",\"f\":\"2 + x\"},{\"label\":\"均衡\",\"pts\":[[4,0],[4,6]],\"dash\":true}]`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `xr` | json | `[0, 1]` | 横軸の範囲 |\n| `yr` | json | `[0, 1]` | 縦軸の範囲 |\n| `xt` | json | `[]` | 横軸の目盛りの値 * |\n| `yt` | json | `[]` | 縦軸の目盛りの値 * |\n| `xf` | number | | 横軸の目盛りの小数桁 |\n| `yf` | number | | 縦軸の目盛りの小数桁 |\n| `xl` | string | `\"\"` | 横軸の名前(`*斜体*` `_下付き` `^上付き`) * |\n| `yl` | string | `\"\"` | 縦軸の名前 * |\n| `n` | number | `300` | f を描く分割数 |\n| `lw` | number | `3.5` | 線の太さ |\n| `size` | number | `0` | 字の大きさ(24 以上。0 = 既定) |\n\n同じ予測分布に平均・中央値・分位点を順に引く、損失関数を 1 つずつ重ねる、など\n「一つの図で比較の軸を一つずつ見せる」ときに使う。\n\n系列は子の `<script type=\"application/json\">` に配列で書く。\n1 系列 = 1 段階(書いた順)。`step` で変えられ、同じ `step` の系列は一緒に引く。口述原稿の [n] はこの段階に合わせる。\n\n| 欄 | 意味 |\n|---|---|\n| `label` | 線の名前 |\n| `f` | x の算術の式(`exp(…)` `sqrt(…)` `PI` などの `Math` の関数と定数、`N(x, 平均, 標準偏差)`、`+ - * / % **`、比較と `? :`。下を見よ)。`xr` で描く範囲を狭められる |\n| `pts` | 点列 `[[x, y], …]`(縦線や実測の折れ線) |\n| `tone` | `term` `emph` `accent2` `muted` `fg` `series-1..4`(既定は `series-1..4` の順) |\n| `dash` | 破線 |\n| `area` / `areaLabel` | 塗る区間 `[a, b]`(複数可、null は端)と札 |\n| `labelAt` / `anchor` / `dx` / `dy` / `ly` | 名前の位置:横軸の値 `labelAt` の点に置く(既定は線の端)。`anchor` は向き(`right` `left` `above` `below`)。`ly` は縦軸の値で高さを決める |\n\n`size=\"40\"`:字の大きさ(24 以上)。\n\n`f` は算術の式で、コードとしては実行しない:数、`x`、`Math` の関数と定数(`sin(x)` とも `Math.sin(x)` とも書ける。`Math.random` は使えない)、`N(x, 平均, 標準偏差)`、`+ - * / % **`、比較(`< <= > >= == !=`)、`&& || !`、`? :`、括弧。べき乗は `**`(`^` は書けない)。書けない式は図の代わりに札が出る。",
|
|
1000
1090
|
"sup": true
|
|
1001
1091
|
},
|
|
1002
1092
|
"m-cycle": {
|
|
@@ -1017,6 +1107,11 @@ export const PACK = {
|
|
|
1017
1107
|
"business": "お金・モノの流れ(ビジネスモデルの図)のための edge の欄(書かなければこれまでと同じ):\n\n- `kind`:`money`(`--emph` の太線)・`service`(`--term`)・`data`(`--muted` の破線)。`tone` と `dash` を書けばそちらが勝つ\n- `amount`:金額などを太字で添える。`label` もあれば線の反対の側に書く\n- `shift`:線に垂直に(進む向きの右へ)ずらす px。同じ 2 つの箱の行きと帰りを `shift` を同じ値にして 2 本並べる。字はずらした側に書く\n- `pulse`:点の列(`pulse-n` 個、0.22 秒おき)が始点から終点へ `pulse-dur` 秒で流れる。`true` なら辺の段階に(引き終わってから)1 回、`[段階, …]` ならその段階ごとに 1 回(辺の段階でなければ `pulseAt` 秒、既定 0.2 秒から)。位置は (k, t) だけで決まり、流れ終わると消える(最終状態には出ない)。`pulse` の段階は図の段階の数にも数える\n- `cues(k)`:pulse の開始時刻を返す(pulse のない図はこれまでどおり null)。口述原稿の `{cue}` の数と合えば、「お金は〜から〜へ{cue}」に合わせて流れる"
|
|
1018
1108
|
}
|
|
1019
1109
|
},
|
|
1110
|
+
"m-folds": {
|
|
1111
|
+
"set": "data",
|
|
1112
|
+
"row": "| `<m-folds>` | 検証用の区画を順に替え、各分割の誤差と平均を示す | 分割を 1 行ずつ→平均(k + 1 段階) | `{k:num,errors?:num[],labels?:str[]}` |",
|
|
1113
|
+
"entry": "### `<m-folds>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"k\":5,\"errors\":[0.21,0.18,0.25,0.19,0.22],\"labels\":[\"1\",\"2\",\"3\",\"4\",\"5\"]}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `size` | number | `0` | 文字 px(0 は 26) |\n\n`<m-folds style=\"height:440px\">` の子に JSON を置く。\n\n- `k`:分割数 2〜10 の整数。既定文字で k = 5 は高さ 316px 以上(誤差なし 264px)\n- `errors`:省略可。k 個の非負誤差\n- `labels`:省略可。k 個の区画名(既定 1〜k)"
|
|
1114
|
+
},
|
|
1020
1115
|
"m-gendai": {
|
|
1021
1116
|
"set": "kokugo",
|
|
1022
1117
|
"row": "| `<m-gendai>` | 現代文の読解の図:傍線・二重傍線を引き、指示語から指す内容へ矢印、段落を役割(主張・具体例・対比)の枠で囲んで線でつなぐ | 中身のある phases の数(既定 marks refs roles) | 要素の中の字(JSON ではない) |",
|
|
@@ -1068,6 +1163,11 @@ export const PACK = {
|
|
|
1068
1163
|
"row": "| `<m-map-world>` | 世界の国・地域の地図(太平洋が中央)。国や州の強調、区分と値の塗り分け、点、矢印を段階ごとに出す | 項目の step の最大(既定 1)。地図そのものは段階 0 から出ている | `{regions?:[{id?:str,group?:str,label?,tone?,step?,at?} (id or group),…],categories?:{label,ids:str[],tone?,step?,at?}[],values?:object,classes?:num[],valuesStep?:int,points?:[{lon?:num,lat?:num,code?:str,label?,tone?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\"\\|\"top\"\\|\"bottom\",step?,at?} (lon + lat or code),…],flows?:{from:str\\|any[],to:str\\|any[],label?,tone?,value?:num,bend?:num,via?:any[][],labelAt?:any[],step?,at?}[],shapes?:[{polygon?:any[][],line?:any[][],label?,labelAt?:any[],tone?,dash?:bool,step?,at?} (polygon or line),…]}` — 国・地域は ISO の 3 文字か Natural Earth の符号(\"JPN\"・\"USA\")か日本語の名前。六州(asia・europe・africa・north-america・south-america・oceania)は regions[].group と categories[].ids に。values は {符号: 数}、classes は階級の下限(既定は 4 階級、5 つまで)。points・shapes・flows の [経度, 緯度] は度 |",
|
|
1069
1164
|
"entry": "### `<m-map-world>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"regions\":[{\"id\":\"JPN\",\"tone\":\"emph\",\"step\":1},{\"group\":\"africa\",\"tone\":\"series-2\",\"step\":2}],\"points\":[{\"lon\":139.69,\"lat\":35.69,\"label\":\"東京\",\"step\":3}],\"flows\":[{\"from\":[139.69,35.69],\"to\":\"AUS\",\"step\":4}]}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `labels` | string | `\"focus\"` | 名前:focus(regions に書いた地域だけ)・all(名前が中に入る国すべて)・none |\n| `grid` | string | `\"none\"` | none・equator(赤道)・graticule(30° ごとの経線・緯線と赤道) |\n| `show` | string | `\"none\"` | 塗り分けた国の上に値を書くか:none(既定)・value(中に入る国だけ) |\n| `unit` | string | `\"\"` | 値の単位(凡例の見出しに書く) |\n| `digits` | number | `0` | 値の小数桁 |\n| `legend` | string | `\"\"` | 凡例の見出し(例:人口)。unit があれば後ろに(単位)を足す |\n\n世界地理・歴史の授業で国や都市の場所を示すときに使う。子の JSON(どれも `step` `at` `tone` を持てる):\n\n- `regions`:`id`(`\"JPN\"` など ISO の 3 文字か国名)か `group`(六州)。`label`\n- `categories`:`label` と `ids`(国か州)。凡例に出す。4 区分まで\n- `values`:`{\"JPN\": 72, …}` と `classes`(階級の下限)。塗り分けの段階は `valuesStep`(既定 1)\n- `points`:`lon` `lat`、`label`、`anchor`\n- `flows`:`from` `to`(`[経度, 緯度]` か国)、`via` `label` `bend`、`value`(数。線の太さが値で変わる:いちばん大きい値で 10 px)、`labelAt`(名前を置く `[経度, 緯度]`)\n- `shapes`:重ね描き。`polygon`(3 点以上の `[[経度, 緯度], …]`、薄く塗る)か `line`(2 点以上)。`label` `labelAt` `dash`\n\n継ぎ目は 30°W(大西洋を横切る矢印は描けない)。\n\n地図データ:Natural Earth(パブリックドメイン)を加工。"
|
|
1070
1165
|
},
|
|
1166
|
+
"m-mapping": {
|
|
1167
|
+
"set": "data",
|
|
1168
|
+
"row": "| `<m-mapping>` | 実験の結果を数値へ対応させ、同じ値になる結果をまとめて確率分布を作る | 結果の札→対応の矢印→同じ値の色と個数・確率の和→分布の横棒の 4 段階 | `{outcomes:{label,x:num,p?:num,balls?:str[]}[],name?:str,unit?:str,fractions?:bool,picture?:\"dots\"\\|\"dice\"\\|\"coins\"\\|\"grapes\"\\|\"balls\"}` |",
|
|
1169
|
+
"entry": "### `<m-mapping>`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `stagger` | number | `0.15` | 段階 2 の矢印ごとの開始のずれ(秒。0 以上) |\n| `digits` | number | `2` | 分数でない確率の小数桁(0〜10 の整数) |\n| `size` | number | `0` | 文字の大きさ(px。0 は既定の 26、指定時は 24 以上) |\n\n確率変数を「結果を数に対応させる規則」として見せる(結果 → 値 → 分布)。\n\n```html\n<m-mapping style=\"height:440px\"><script type=\"application/json\">{\"outcomes\":[{\"label\":\"表表\",\"x\":2},{\"label\":\"表裏\",\"x\":1},{\"label\":\"裏表\",\"x\":1},{\"label\":\"裏裏\",\"x\":0}],\"picture\":\"coins\"}</script></m-mapping>\n```\n\n- `outcomes`:2〜12 個。`label`、`x`(数)、`p`(省略すれば等確率。合計が 1 でなければ知らせる)\n- `name`(既定 X)・`fractions`(既約分数)\n- `picture`:`dots`・`grapes`(x 個)・`dice`(label の目)・`coins`(◯表 ●裏)・`balls`(色の名前の列。基本の 11 色、名前も書く)"
|
|
1170
|
+
},
|
|
1071
1171
|
"m-market": {
|
|
1072
1172
|
"set": "business",
|
|
1073
1173
|
"row": "| `<m-market>` | 市場規模の入れ子の円(TAM / SAM / SOM)。外の円から 1 つずつ、前の円の大きさから縮んで現れる | rings の数 | `{rings:{key?:str,value:num,basis?:str,tone?}[]}` |",
|
|
@@ -1108,6 +1208,11 @@ export const PACK = {
|
|
|
1108
1208
|
"row": "| `<m-quad>` | 2 軸の位置づけ(ポジショニングマップ・SWOT 風の 4 象限)に、点を段階ごとに 1 つずつ置く | 点の step と to.step の最大(既定は点 1 つ = 1 段階) | `{x?:{lo?:str,hi?:str},y?:{lo?:str,hi?:str},quads?:{tr?:str,tl?:str,bl?:str,br?:str,fill?:str},items:{label?,x:num,y:num,step?,at?,tone?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\",r?:num,self?:bool,to?:{x:num,y:num,label?,step?,at?}}[]}` |",
|
|
1109
1209
|
"entry": "### `<m-quad>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"x\":{\"lo\":\"手作業\",\"hi\":\"自動\"},\"y\":{\"lo\":\"高い\",\"hi\":\"安い\"},\"items\":[{\"label\":\"A 社\",\"x\":0.25,\"y\":0.7},{\"label\":\"自社\",\"x\":0.8,\"y\":0.82,\"self\":true}]}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `size` | number | `26` | 点の名前の字の大きさ(px) |\n| `quads-step` | number | `0` | 象限の名前を出す段階(0 = 初めから) |\n\n競合と自社の位置づけ、施策の分類(効果×手間)、SWOT のように、2 つの軸の上に項目を 1 つずつ置いて\n「空いている場所」を見せるときに使う。\n\n- `x` `y`:軸の両端の言葉(横軸は軸の下の両端、縦軸は軸の上端と下端の外)。軸と言葉は段階 0 から見える\n- `quads`:象限の名前(tr = 右上、tl = 左上、bl = 左下、br = 右下)。`fill` に象限の名前(`\"tr\"` など)を書くとその象限を淡く塗り、名前を `--term` で書く。名前は `quads-step` の段階で現れる(既定 0 = 初めから)\n- item:`label`、`x` `y`(0〜1。0.5 が軸の交わるところ)、`step`(既定は前の点の次の段階)、`at`(段階の中の開始秒)、`tone`(`term` / `fg`、既定は `--muted`)、`anchor`(名前の位置:`right`(既定)・`left`・`above`・`below`)、`r`(丸の半径)\n- `self: true` の点は `--emph` で大きく描き、現れたときに輪が 1 回広がる(最終状態では輪は出ない)\n- `to: {\"x\", \"y\", \"label\", \"step\", \"at\"}`:移動先。`to.step`(既定は点の次の段階)に、点が破線の跡を引きながら滑り、着いたら移動先の上に `label` を出す\n- `cues(k)`:同じ段階に 2 つ以上の点があれば、2 つ目からの開始時刻(at)を返す。口述原稿の `{cue}` の数と合えば、点が言葉に合わせて現れる\n\n注意\n\n- 象限の名前は、点・点の名前・軸の言葉にかからない隅に置く。どの隅もかかるときは点の名前を置き直す(置き場がなければ `ctx.report` で知らせる)\n- 点の名前どうし・移動先の名前との重なりは置き直さない。近い点の名前は重なることがあるので、`anchor` を変えるか座標をずらす"
|
|
1110
1210
|
},
|
|
1211
|
+
"m-sampling": {
|
|
1212
|
+
"set": "data",
|
|
1213
|
+
"row": "| `<m-sampling>` | 母集団から標本を取り、比率・平均の標本分布を積む | 母集団→抽出→統計量と点→反復の 4 段階 | `{balls?:object,values?:num[],of?:str,n:num,replace?:bool,repeat?:num,seed?:num,stat?:\"mean\"\\|\"proportion\",digits?:num} (balls or values)` |",
|
|
1214
|
+
"entry": "### `<m-sampling>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"values\":[1,2,3,4,5,6],\"n\":2,\"replace\":true,\"repeat\":40,\"seed\":3}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `size` | number | `0` | 文字 px(0 は 26) |\n\n母集団→標本→標本分布を説明する。`<m-sampling style=\"height:440px\">` の子に JSON を置く。\n\n- `balls`:色名と個数の辞書、計 2〜30 個。`of` の色の比率。基本 11 色の日英名、未知色は報告して灰色と名前\n- `values`:2〜30 個の数。標本平均。`balls` とどちらか一方\n- `n`:標本数。非復元は 1〜母集団数、復元は 1〜30。範囲外は報告して補正\n- `replace`:戻すなら true、既定 false。`repeat`:1〜200 回(既定 40)。`seed`:整数(既定 1)\n- `stat`:既定は玉で proportion、数で mean。`digits`:小数桁 0〜10(既定 2)"
|
|
1215
|
+
},
|
|
1111
1216
|
"m-scatter": {
|
|
1112
1217
|
"set": "standard",
|
|
1113
1218
|
"row": "| `<m-scatter>` | 散布図。点の組(系列)を段階ごとに出し、そのあと傾向の線(最小二乗の直線か、書いた 2 点)を引く | 系列の数 + 傾向の線(既定は系列 1 つ = 1 段階、そのあと線をまとめて 1 段階。系列・線の step で直接) | `{series:{label?,tone?,step?,at?,points:([num,num]\\|{x:num,y:num,label?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\"\\|\"top\"\\|\"bottom\",tone?})[]}[],trend?:str\\|{fit?:\"linear\",pts?:[[num,num],[num,num]],series?:int\\|any[],label?,tone?,dash?:bool,step?,at?,digits?:int}\\|[the same {…},…]}` — 点は [x, y] か {\"x\", \"y\", \"label\"}。軸は属性に書く(xr=\"[0,10]\" xl=\"…\")。trend は \"linear\" か {\"fit\": \"linear\", \"label\": \"…\"} か {\"pts\": [[x0, y0], [x1, y1]]} |",
|
|
@@ -1167,10 +1272,21 @@ export const PACK = {
|
|
|
1167
1272
|
"briefNote": "下に説明の節がない部品は、表の「データの形」のとおりに子の JSON か属性を書き、ほかの属性は既定のままにする。",
|
|
1168
1273
|
"extHead": "### `<{name}>`:この束の拡張(部品の説明は §3)"
|
|
1169
1274
|
},
|
|
1170
|
-
"version": "
|
|
1275
|
+
"version": "b2ad9e7c",
|
|
1171
1276
|
"tiers": {
|
|
1172
|
-
"catalogue": "2.
|
|
1277
|
+
"catalogue": "2.6.0",
|
|
1173
1278
|
"parts": {
|
|
1279
|
+
"m-balance": {
|
|
1280
|
+
"tier": "specialized",
|
|
1281
|
+
"set": "data",
|
|
1282
|
+
"purposes": [
|
|
1283
|
+
"model"
|
|
1284
|
+
],
|
|
1285
|
+
"display": {
|
|
1286
|
+
"ja": "期待値はつり合いの位置",
|
|
1287
|
+
"en": "Expectation as a balance point"
|
|
1288
|
+
}
|
|
1289
|
+
},
|
|
1174
1290
|
"m-bars": {
|
|
1175
1291
|
"tier": "standard",
|
|
1176
1292
|
"purposes": [
|
|
@@ -1195,6 +1311,30 @@ export const PACK = {
|
|
|
1195
1311
|
"grouping"
|
|
1196
1312
|
]
|
|
1197
1313
|
},
|
|
1314
|
+
"m-ci": {
|
|
1315
|
+
"tier": "specialized",
|
|
1316
|
+
"set": "data",
|
|
1317
|
+
"purposes": [
|
|
1318
|
+
"model",
|
|
1319
|
+
"spread"
|
|
1320
|
+
],
|
|
1321
|
+
"display": {
|
|
1322
|
+
"ja": "信頼区間の意味",
|
|
1323
|
+
"en": "Confidence intervals"
|
|
1324
|
+
}
|
|
1325
|
+
},
|
|
1326
|
+
"m-code": {
|
|
1327
|
+
"tier": "specialized",
|
|
1328
|
+
"set": "data",
|
|
1329
|
+
"purposes": [
|
|
1330
|
+
"process",
|
|
1331
|
+
"model"
|
|
1332
|
+
],
|
|
1333
|
+
"display": {
|
|
1334
|
+
"ja": "コードの解説",
|
|
1335
|
+
"en": "Code walkthrough"
|
|
1336
|
+
}
|
|
1337
|
+
},
|
|
1198
1338
|
"m-codetree": {
|
|
1199
1339
|
"tier": "extra",
|
|
1200
1340
|
"purposes": [
|
|
@@ -1242,6 +1382,18 @@ export const PACK = {
|
|
|
1242
1382
|
"process"
|
|
1243
1383
|
]
|
|
1244
1384
|
},
|
|
1385
|
+
"m-folds": {
|
|
1386
|
+
"tier": "specialized",
|
|
1387
|
+
"set": "data",
|
|
1388
|
+
"purposes": [
|
|
1389
|
+
"model",
|
|
1390
|
+
"compare"
|
|
1391
|
+
],
|
|
1392
|
+
"display": {
|
|
1393
|
+
"ja": "交差検証",
|
|
1394
|
+
"en": "Cross-validation"
|
|
1395
|
+
}
|
|
1396
|
+
},
|
|
1245
1397
|
"m-gendai": {
|
|
1246
1398
|
"tier": "specialized",
|
|
1247
1399
|
"set": "kokugo",
|
|
@@ -1318,6 +1470,18 @@ export const PACK = {
|
|
|
1318
1470
|
"spatial"
|
|
1319
1471
|
]
|
|
1320
1472
|
},
|
|
1473
|
+
"m-mapping": {
|
|
1474
|
+
"tier": "specialized",
|
|
1475
|
+
"set": "data",
|
|
1476
|
+
"purposes": [
|
|
1477
|
+
"model",
|
|
1478
|
+
"grouping"
|
|
1479
|
+
],
|
|
1480
|
+
"display": {
|
|
1481
|
+
"ja": "確率変数の対応",
|
|
1482
|
+
"en": "Random variable mapping"
|
|
1483
|
+
}
|
|
1484
|
+
},
|
|
1321
1485
|
"m-market": {
|
|
1322
1486
|
"tier": "specialized",
|
|
1323
1487
|
"set": "business",
|
|
@@ -1377,6 +1541,18 @@ export const PACK = {
|
|
|
1377
1541
|
"position"
|
|
1378
1542
|
]
|
|
1379
1543
|
},
|
|
1544
|
+
"m-sampling": {
|
|
1545
|
+
"tier": "specialized",
|
|
1546
|
+
"set": "data",
|
|
1547
|
+
"purposes": [
|
|
1548
|
+
"model",
|
|
1549
|
+
"spread"
|
|
1550
|
+
],
|
|
1551
|
+
"display": {
|
|
1552
|
+
"ja": "標本抽出",
|
|
1553
|
+
"en": "Sampling"
|
|
1554
|
+
}
|
|
1555
|
+
},
|
|
1380
1556
|
"m-scatter": {
|
|
1381
1557
|
"tier": "standard",
|
|
1382
1558
|
"purposes": [
|