egatari 0.6.7 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -1
- package/README.ja.md +2 -2
- package/README.md +2 -2
- package/bin/egatari.mjs +2 -1
- package/components.lock.json +6 -3
- package/components2.lock.json +119 -1
- package/kit/check-messages.mjs +9 -0
- package/kit/check.mjs +12 -2
- package/kit/core/colab-core.mjs +1 -1
- package/kit/core/color-vocab.mjs +172 -0
- package/kit/core/layout-scan.mjs +23 -0
- package/kit/core/llm-fix.mjs +2 -2
- package/kit/core/llm-pack-data.mjs +9 -9
- package/kit/deck.js +18 -1
- package/kit/instruction-version.json +1 -1
- package/kit/player.json +1 -1
- package/kit/player.lock.json +2 -2
- package/package.json +3 -1
- package/themes/asagi/theme.json +1 -1
- package/themes/asagi/tokens.css +1 -0
- package/themes/business/theme.json +1 -1
- package/themes/business/tokens.css +1 -0
- package/themes/default/README.ja.md +12 -1
- package/themes/default/README.md +12 -1
- package/themes/default/theme.json +1 -1
- package/themes/default/tokens.css +1 -0
- package/themes/kogecha/theme.json +1 -1
- package/themes/kogecha/tokens.css +1 -0
- package/themes/kokugo/theme.json +2 -1
- package/themes/kokugo/tokens.css +1 -0
- package/themes/murasaki/theme.json +1 -1
- package/themes/murasaki/tokens.css +1 -0
- package/themes/sumi/theme.json +1 -1
- package/themes/sumi/tokens.css +1 -0
- package/themes/tokiwa/theme.json +1 -1
- package/themes/tokiwa/tokens.css +1 -0
- package/themes.lock.json +92 -24
- package/tools/ids-of.mjs +69 -0
- package/vendor/components/CATALOG.md +2 -2
- package/vendor/components/sha256/2e9a35ce9e289196d0b5fd24b8546cf6e0f4a6df857e69f4f78e686cabb00e61/index.js +465 -0
- package/vendor/components/sha256/340f7678bb19a64f9d4ed63b95d290046367a6b49c44977184f1cec1e97a7d68/index.js +916 -0
- package/vendor/components-2/manifest-2.5.1.json +1919 -0
- package/vendor/egatari-spec/SOURCE.json +2 -2
- package/vendor/themes/asagi/1.0.0/theme.json +14 -0
- package/vendor/themes/asagi/1.0.0/tokens.css +17 -0
- package/vendor/themes/business/1.0.1/theme.json +5 -0
- package/vendor/themes/business/1.0.1/tokens.css +28 -0
- package/vendor/themes/default/1.2.0/theme.json +4 -0
- package/vendor/themes/default/1.2.0/tokens.css +73 -0
- package/vendor/themes/kogecha/1.0.0/theme.json +10 -0
- package/vendor/themes/kogecha/1.0.0/tokens.css +16 -0
- package/vendor/themes/kokugo/1.0.0/theme.json +4 -0
- package/vendor/themes/kokugo/1.0.0/tokens.css +12 -0
- package/vendor/themes/murasaki/1.0.0/theme.json +10 -0
- package/vendor/themes/murasaki/1.0.0/tokens.css +12 -0
- package/vendor/themes/sumi/1.0.0/theme.json +10 -0
- package/vendor/themes/sumi/1.0.0/tokens.css +36 -0
- package/vendor/themes/tokiwa/1.0.0/theme.json +10 -0
- package/vendor/themes/tokiwa/1.0.0/tokens.css +14 -0
|
@@ -748,9 +748,9 @@ export const PACK = {
|
|
|
748
748
|
"m-collect",
|
|
749
749
|
"m-kakijun"
|
|
750
750
|
],
|
|
751
|
-
"partsSrc": "https://github.com/egatari/components/blob/v2.5.
|
|
751
|
+
"partsSrc": "https://github.com/egatari/components/blob/v2.5.1/components/",
|
|
752
752
|
"en": {
|
|
753
|
-
"common": "# Instructions for the AI\n\nPack version: `69c736a1`\n\nYou will write one short **Egatari lesson**: an HTML slide deck with step-by-step reveals (`deck.html`) and a spoken script for it (`narration.md`). Both files are built and quality-checked automatically; anything not described here is not available. Write the lesson in the language the user asks for (slides and narration in the same language). Standards have ids such as **R-fit**; a fix request names the standards a draft broke. The user's request is in **What I want** at the end (or in the conversation before it): choose sensibly for any field that is empty or missing, and if both A and B are left, follow the one with content.\n\n**Before you start (the most common failures):**\n\n- **Both code blocks must be complete and closed.** Never stop in the middle of a block (R-output). Without an outline, keep the lesson short (5–8 slides). When the request gives an outline and a range of its slides, write exactly the slides of that range: the editor asks for at most 6 at a time, so they fit.\n- **Sizes on the 1280×720 slide** (the quality checker measures them, R-fit): the body area is 1184 × 443 px (to 565 px; 1184 × 558 with `noconcl`). Body text is 32 px with 46 px per line, so about **8 lines** fit; every overflowing 46 px is one line to cut. **All text, also inside figures and components, is at least 24 px.**\n- **Charts and figures:** components draw their labels at 24–28 px whatever their size (their SVG uses their own pixels), so size the component, not the text. A component of 380 px leaves room for one short line; with two lines, use 330 px.\n- **Inline `<svg>`:** its text is scaled by displayed width ÷ viewBox width, so write the viewBox in the pixels it is shown at, e.g. `<svg viewBox=\"0 0 560 320\" width=\"560\" height=\"320\">`, with `font-size` ≥ 24. Never combine `width:100%` with another viewBox width (a 600-wide viewBox shown 580 px wide turns 24 into 23.2 px). Prefer a component when one fits.\n\n## 1. Output format\n\n- **R-output** Reply with **exactly two fenced code blocks**, in this order, labelled `deck.html` and `narration.md` (the opening lines are ```` ```deck.html ```` and ```` ```narration.md ````). Put nothing between them; a one-line note before or after is fine. Never split a file over several blocks. Do not output files, a canvas or attachments: write both code blocks in the body of your chat message. Do not reference other files (no images, no `{{FIG:…}}`, no `{{JSON:…}}`, no external URLs, no `<link>`), and never stop in the middle of a block: if the deck would be too long, make fewer slides (but for a range of an outline, write exactly the requested slides).\n- **R-outline** When the request asks for an **outline only** (a long lesson made in two passes), reply with exactly one fenced code block labelled `outline` (the opening line is ```` ```outline ````) and no `deck.html` or `narration.md`: a Markdown table with the columns `#`, heading and point (one line), one row per slide, every slide of the lesson in order. Each later request names a range (“slides 7–12 of the outline”): write exactly those slides, following their headings and points.\n- **R-noids** Do **not** write slide ids. Write `<section class=\"slide\">` without `id`, and narration headings without `{#…}`. The editor adds ids after import. When you are given a deck that already has ids (a fix request), keep every existing `id=\"…\"` and `{#…}` exactly as it is.\n\n## 2. deck.html\n\n### 2.1 Skeleton\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Lesson title</title>\n</head>\n<body>\n<div id=\"stage\">\n <section class=\"slide cover noconcl static\"> … </section>\n <section class=\"slide\"> … </section>\n</div>\n</body>\n</html>\n```\n\n- `lang`: `en`, `ja`, … (the language of the lesson). `data-theme`: `sumi` for business and pitch decks, `kokugo` for Japanese language arts, otherwise `default`.\n- No `<script>` except component data (§2.6), no `<link>`. A `<style>` block is allowed only for layout (sizes, gaps), never colors.\n\n### 2.2 Slides\n\n- Normal slide: `<h2>` heading, `<div class=\"body\">…</div>`, then `<div class=\"concl\"><span>…</span></div>` (the conclusion line: one short sentence).\n- Cover: `<section class=\"slide cover noconcl static\">` with optional `<div class=\"venue\">…</div>`, `<h1>title</h1>`, optional `<div class=\"au\">…</div>`.\n- Chapter divider: `<section class=\"slide sec noconcl static\"><h1>chapter title</h1></section>`.\n- Classes on `<section>`: `noconcl` (no conclusion line), `static` (no steps), `nostep` (all list items visible from the start), `layout-tate` (Japanese vertical writing; only with the kokugo part set, which describes it), and the `data-morph` attribute (§2.5).\n- Inside `.body`: `<p class=\"sub\">` sub-heading, `<div class=\"big\">` main equation, `<p class=\"note\">` note, `<div class=\"thm\">` theorem box, `<div class=\"cols\">` side-by-side columns, ordinary `<p>`, `<ul>`, `<ol>`, `<table>`.\n- Inline emphasis (the only way to color text): `term` (term or question), `emph` (conclusion, problem, goal), `muted` (known result, de-emphasized), `b` (bold).\n- **R-headings** Every slide heading (`h1` on the cover and dividers, `h2` elsewhere) is **different** from all the others (add a word if two would be the same), and the narration section of that slide starts with `## ` followed by **exactly the same heading text** (tags such as `<br>` dropped).\n- **R-colors** Colors only through the theme: the classes above and the math macros `\\hlE` `\\hlT` `\\hlM`; no hex, `rgb()`, named colors, `\\color` or `\\textcolor`. In a component or inline SVG: **Use only the theme's CSS variables for colors**: `var(--fg)` `var(--term)` `var(--emph)` `var(--muted)` `var(--accent2)` `var(--line)`. In SVG write `style=\"stroke:var(--emph)\"` rather than an attribute (`DECK.el` moves `fill` and `stroke` into style automatically when they contain `var(`)\n\n### 2.3 Steps (reveal order = speaking order)\n\n- **R-steps** Step 0 is the slide as it first appears: context only (heading, sub-heading, one framing sentence). An element with `data-step=\"k\"` (k = 1, 2, …) appears at step k; material (list items, equations, table rows, figure parts) appears in the order you talk about it. An equation and the sentence that introduces it share one step (wrap both in `<div data-step=\"k\">`). About 5 steps per slide at most.\n- The conclusion line automatically becomes the **last step**, `concl`; never put `data-step` on it.\n- If a slide has **no** `data-step` anywhere, its top-level list items (`.body > ul > li`, `.body > ol > li`) are numbered 1, 2, … automatically. As soon as any element has `data-step`, nothing is automatic: give every revealed element its `data-step`.\n- A component adds its own steps (§3), starting at its `data-from` (default 1).\n- So the steps of a slide are `0 … max` plus `concl` if it has a conclusion line. A `static` slide has only step 0.\n\n### 2.4 Math (KaTeX, rendered at build time)\n\n- **R-math** Inline `\\( … \\)`, display `\\[ … \\]`. Write `<` as `\\lt` and `>` as `\\gt` inside math. Allowed macros besides standard KaTeX: `\\hlE{…}` (emph) `\\hlT{…}` (term) `\\hlM{…}` (muted), `\\htmlId{ID}{…}`, `\\htmlData{mark=ID}{…}`, `\\htmlClass{…}{…}`, `\\morph{ID}{…}`. No `\\newcommand`, no `\\color`. Define each symbol where it is first used (`\\(\\mu\\)`: the mean).\n\n### 2.5 Attention marks and morphs\n\n- **R-marks** The narration’s `{mark:ID}` (§4) marks a target on the **same slide**. Targets: an element in the slide with `id=\"ID\"` or `data-mark=\"ID\"`. For part of an equation, KaTeX's `\\htmlId{ID}{…}` / `\\htmlData{mark=ID}{…}` (the build allows only these two and `\\htmlClass`). If the same ID is used on several slides, use `data-mark` (ids must be unique in the document)\n- Morph (optional): `<section class=\"slide\" data-morph>` slides elements from the previous slide into place; pair elements with the same `data-id=\"…\"` on both slides, or equation parts with `\\morph{ID}{…}` on both. Only elements visible at step 0 move.\n\n### 2.6 Components\n\n- **R-components** Animated figures are the Web Components `<m-…>` of the catalog (§3), used inside `.body`. Give each a height (`style=\"height:380px\"`) and an `aria-label`. Data goes in **one** child `<script type=\"application/json\">…</script>` written inline (never `{{JSON:…}}`). **Numbers in figures must be correct** (compute them; never invent values for looks; label made-up business figures as fictional). Function formulas are arithmetic expressions only (`Math.exp(x)`, `x**2`); they are never run as code. Use components only where motion explains something; most slides need none.\n\n### 2.7 Choosing a representation\n\n- **R-purpose** Choose the representation from what the slide must say, not from habit. If the author names a chart type, use it. The table lists every part; use only those in the text you were given (§3, and the part sets included). If a part that is not included would fit better, say so in a one-line note.\n\n{{PURPOSES}}\n\n- **R-whole** Lists, KPI cards and pies are shown whole; do not reveal them line by line unless the narration discusses each item in turn (for a list, give it one `data-step` or put `nostep` on the slide).\n\n### 2.8 Fitting the slide (1280×720; the quality checker reports errors)\n\n- **R-title** Heading: Japanese at most 26 units (full-width character = 1, ASCII = 0.5); English at most 60 characters. Never ends with a colon.\n- **R-concl** Conclusion line: Japanese at most 35 units; English at most 70 characters. One line.\n- **R-fit** The body must end above 565 px (680 px with `noconcl`): about 8 lines / 100 Japanese characters / 60 English words per slide, or one `big` equation and 3 short bullets, or a component of height ≤ 380 px and one short line (≤ 330 px with two). If it does not fit, split the slide; never shrink text and never set font sizes. Text in figures is at least 24 px.\n- **R-style** Japanese slides: plain style (だ・である, 体言止め), no です・ます on slides, one punctuation style in the whole deck (`、。` or `,.`). English slides: short phrases, sentence case.\n\n## 3. Component catalog\n\nThese standard components may be used in any lesson; a part set, when it is included after §6, adds the components of its kind of material. Generated from the component READMEs (their notes are in Japanese). “steps” is how many slide steps a component uses (from `data-from`, default 1). Timing attributes (durations and delays in seconds) are not listed; their defaults fit the narration. Attribute values of type json are written as JSON in the attribute (`values=\"[0.1,0.5]\"`). In “data shape”, `?` marks an optional field; where no type is written, label, tex, note and tone are str, step is int and at is num. In a name or label, `*…*` is italic and `_` `^` make only the next character a subscript or superscript; to show the symbol itself, write the full-width _ ^ *.\n\n{{CATALOG}}\n\n## 4. narration.md\n\n```markdown\n# Narration: <lesson title>\n\n## The decay law\n[0] Here is the decay law. We follow how many atoms are left.\n[1] The number left is the starting number times a shrinking exponential.\n[2] {mark:n0|circle}{N₀|N naught} is the number at the start, at time zero.\n[concl] The half-life depends only on the decay constant.\n```\n\n- One section per slide, **in slide order, for every slide (cover included)**: `## <slide heading>` (R-headings), no `{#id}` (R-noids).\n- **R-narr-steps** Step markers `[0]`, `[1]`, … and `[concl]`. **Every step of every slide has narration** (step 0 to max, and `[concl]` if the slide has a conclusion line), and there are **no markers for steps that do not exist** (a `static` cover has only `[0]`; a slide without a conclusion line has no `[concl]`; never `[01]`). Within a step, talk only about what appears at that step.\n- **R-dialogue** **One narrator by default**: write no speaker names. Write a dialogue only when asked (if asked for three or more speakers, keep two roles and say so first): lines start with `Expert:` or `Novice:` (continuation lines indented; a line without a speaker is Expert), shaped as a cognitive apprenticeship:\n - Novice is never a mere backchannel: Novice voices the question a learner is likely to have, or paraphrases (“So …, is that right?”)\n - Expert answers and adds one example or analogy, or confirms (or corrects) the paraphrase and takes one step further\n - Only at a comprehension fork (where learners tend to misunderstand, or a “why” remains): at most one exchange per slide, 2–3 turns. Elsewhere Expert alone\n - Never a turn that is only “I see”, or that repeats the previous turn. Example: `Novice: So a larger rate always gets there faster?` `Expert: Not always. Too large, and each step jumps across the valley, like striding downhill onto the opposite slope.`\n- `{note:…}`: presenter directions.\n- `{cue}`: a sync point inside a step, one per entry of the component’s `cues(k)` (only where a component’s README asks for it; otherwise omit).\n- `{mark:ID}`, `{mark:ID|effect}`, `{mark:ID|effect|hold=seconds}`, `{mark:clear}`: placed **right before** the words about the target; at most 1–2 per step; still say the thing in words. Effects: `underline` (default; a hand-drawn underline from left to right), `circle` (a hand-drawn circle), `box` (a rounded frame), `spot` (dims everything except the area around the target with the background color), `laser` (a dot of light slides to below the target and stays briefly)\n- **R-reading** `{display|reading}` gives the reading of **one symbol or one term**: `{θ|theta}`, `{N₀|N naught}`, `{x̄|x bar}`, `{論語|ろんご}`. One symbol may carry a star, a prime, a subscript or superscript, or a hat/bar/tilde (`{Q*|Q star}`, `{x′|x prime}`, `{θ̂|theta hat}`). Write the display part in plain Unicode, not LaTeX, and never as an expression or several symbols (`{1-η|…}`, `{a*b|…}` and `{θとη|…}` are wrong: give each symbol its own reading and say the relation in words).\n- **R-formula** **Never read an equation aloud**: no LaTeX, no `\\`, `^`, `_`, and no strings such as `a + b = c` in the narration. Say what the equation means (“the number left is the starting number times a shrinking exponential”).\n- Japanese narration is polite spoken Japanese (です・ます); English narration is plain spoken English. About 5 Japanese characters or 2.5 English words per second; 1–3 sentences per turn.\n\n## 5. Fix requests\n\nWhen the user pastes a **fix request** (a list of findings with the ids of the standards, followed by the current files), fix exactly those findings, keep everything else, keep every `id=\"…\"` and `{#…}` unchanged (R-noids), and reply again with the two blocks (R-output). If the request contains only some slides, return only those `<section>` elements in the `deck.html` block (no `<html>`) and only their sections in the `narration.md` block; the editor puts them back in place by id.\n\n## 6. Worked example\n\nA small lesson, fictional, showing the structure only (do not copy its content). Note how the steps add up: the list of 2 items gives steps 1–2 and `[concl]`<!--part:m-flow-->; the `m-flow` with 4 boxes gives steps 1–4<!--/part-->. The static cover has `[0]` only. Some part sets end with an example of their own.\n\n### Common (English, default theme, marks<!--part:m-flow-->, m-flow<!--/part-->)\n\n```deck.html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>How a web page arrives</title>\n</head>\n<body>\n<div id=\"stage\">\n\n<section class=\"slide cover noconcl static\">\n <div class=\"venue\">Computing basics, lesson 1 (a fictional course)</div>\n <h1>How a web page arrives</h1>\n</section>\n\n<section class=\"slide\">\n <h2>Two programs take part</h2>\n <div class=\"body\">\n <p>Opening a page is a conversation between two programs.</p>\n <ul>\n <li id=\"browser\">The <span class=\"term\">browser</span> asks for the page and draws it</li>\n <li id=\"server\">The <span class=\"term\">server</span> keeps the page and sends it back</li>\n </ul>\n </div>\n <div class=\"concl\"><span>Every page load is a request and a reply</span></div>\n</section><!--part:m-flow-->\n\n<section class=\"slide\">\n <h2>From the address to the screen</h2>\n <div class=\"body\">\n <m-flow style=\"height:300px\" aria-label=\"Four stages: type the address, send a request, send the page back, draw the page\">\n <script type=\"application/json\">{\"nodes\": [\n {\"id\": \"a\", \"label\": \"Type the\\naddress\", \"x\": 10, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 1},\n {\"id\": \"b\", \"label\": \"Send a\\nrequest\", \"x\": 315, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 2},\n {\"id\": \"c\", \"label\": \"Send the\\npage back\", \"x\": 620, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 3, \"tone\": \"term\"},\n {\"id\": \"d\", \"label\": \"Draw the\\npage\", \"x\": 925, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 4, \"tone\": \"emph\"}\n ], \"edges\": [\n {\"from\": \"a\", \"to\": \"b\"}, {\"from\": \"b\", \"to\": \"c\"}, {\"from\": \"c\", \"to\": \"d\"}\n ]}</script>\n </m-flow>\n </div>\n <div class=\"concl\"><span>A slow page is slow in one of these four stages</span></div>\n</section><!--/part-->\n\n</div>\n</body>\n</html>\n```\n\n```narration.md\n# Narration: How a web page arrives\n\n## How a web page arrives\n[0] Today we follow a web page on its way from a server to your screen.\n\n## Two programs take part\n[0] Opening a page is a conversation between two programs.\n[1] {mark:browser}The browser is the program you look at. It asks for the page and then draws it.\n[2] {mark:server}The server is a program on another computer. It keeps the page and sends it back when asked.\n[concl] Every page load is a request and a reply.<!--part:m-flow-->\n\n## From the address to the screen\n[0] Let us put the steps in order.\n[1] First you type the address of the page.\n[2] The browser turns it into a request and sends it to the server.\n[3] The server finds the page and sends it back.\n[4] The browser draws the page on the screen.\n[concl] When a page is slow, one of these four stages is taking the time.<!--/part-->\n```",
|
|
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```",
|
|
754
754
|
"request": "# What I want\n\n*(Fill in A or B and delete the other; delete fields you leave empty.)*\n\n**A. Make a new lesson**\n\n- Title (used as is on the cover):\n- Audience:\n- Length (slides or minutes):\n- Language:\n- Speakers: one narrator\n- Other wishes:\n\n**B. From the material and discussion in this chat**\n\nMake the lesson from the material given in this chat and what we have discussed so far.\n\n- Title (used as is on the cover):\n- Audience:\n- Length (slides or minutes):\n- Language:\n- Speakers: one narrator\n- Other wishes:",
|
|
755
755
|
"sets": {
|
|
756
756
|
"stats": "## Part set: stats (statistics charts)\n\nFor lessons and talks with data: distributions, box plots, heatmaps, and a distribution updated one observation at a time. Use the `default` theme. Give the source and the size of every data set on the slide or in the narration, and never invent data that looks real (R-components).\n\n- **Axis charts** (<!--part:m-hist-->`m-hist`, <!--/part--><!--part:m-boxplot-->`m-boxplot`, <!--/part--><!--part:m-seq-->`m-seq`, <!--/part-->and the like) reserve 86 px at the left and 80 px in all at the top and bottom for ticks and axis names: give them a height of **300–380 px** and a width of **at least 560 px** (in `<div class=\"cols\">`, give the chart column at least 55%).\n- Make the axis ranges contain every plotted value (computed as R-components says).\n\nComponents of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
@@ -761,7 +761,7 @@ export const PACK = {
|
|
|
761
761
|
"music": "## Part set: music (pitch, scales, chords)\n\nFor music lessons: pitch, scales, intervals and chords on a piano keyboard. Use the `default` theme. Name notes as the class does (ドレミ, C D E, or ハニホ) and keep the same names on the slide and in the narration.\n\nComponents of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
762
762
|
"business": "## Part set: business\n\nFor business and pitch decks: KPI cards, positioning maps, market sizes and money flows. Use the `sumi` theme. Put the fictional label of R-components in a `note` or on the cover, and keep the numbers consistent across slides (parts add up to the totals you state).\n\nComponents of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}\n\n<!--part:m-kpi-->### Worked example: business (Japanese, sumi theme, m-kpi)\n\n(only the slides with the part; the rest of `deck.html` is as in §6)\n\n```deck.html\n<section class=\"slide\">\n <h2>導入から 3 か月の結果</h2>\n <div class=\"body\">\n <p class=\"note muted\">新しい仕分けの手順を入れた 3 拠点の合計(数字は架空)</p>\n <m-kpi style=\"height:330px\" aria-label=\"1 日の出荷 1,240 件、誤配率 0.8%、残業 32% 減\">\n <script type=\"application/json\">{\"cards\": [\n {\"label\": \"1 日の出荷\", \"value\": 1240, \"unit\": \"件\", \"from\": 980, \"delta\": {\"dir\": \"up\", \"text\": \"導入前から 260 件\"}},\n {\"label\": \"誤配率\", \"value\": 0.8, \"digits\": 1, \"unit\": \"%\", \"from\": 2.1, \"tone\": \"emph\", \"delta\": {\"dir\": \"down\", \"text\": \"導入前は 2.1%\", \"good\": true}},\n {\"label\": \"残業時間\", \"value\": 32, \"unit\": \"%\", \"prefix\": \"−\", \"tone\": \"accent2\", \"note\": \"1 人あたり、月の平均\"}\n ]}</script>\n </m-kpi>\n </div>\n <div class=\"concl\"><span>→ 件数が増えても、誤りと残業は減った</span></div>\n</section>\n```\n\n```narration.md\n## 導入から 3 か月の結果\n[0] 新しい仕分けの手順を入れた、3 つの拠点の合計です。\n[1] 1 日の出荷は 1,240 件になり、導入前より 260 件増えました。\n[2] 誤配率は 2.1% から 0.8% に下がりました。件数が増えても、誤りは減っています。\n[3] 残業時間も、1 人あたり 32% 減っています。\n[concl] 件数が増えても、誤りと残業は減りました。\n```<!--/part-->\n\n<!--part:m-kpi-->Steps: `m-kpi` with 3 cards gives steps 1–3.<!--/part-->",
|
|
763
763
|
"tools": "## Part set: tools (classroom tools)\n\nTools for running a class or workshop, such as a timer for an exercise or group work. Use them only where the request asks for one (an exercise time, a workshop), on the slide where the class does that activity.\n\nComponents of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
764
|
-
"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\nComponents of this set, in addition to those of §3:\n\n{{CATALOG}}\n\n{{EXTENSIONS}}"
|
|
764
|
+
"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
765
|
},
|
|
766
766
|
"components": {
|
|
767
767
|
"m-bars": {
|
|
@@ -852,7 +852,7 @@ export const PACK = {
|
|
|
852
852
|
"m-map-japan": {
|
|
853
853
|
"set": "maps",
|
|
854
854
|
"row": "| `<m-map-japan>` | 日本の 47 都道府県の地図。地域の強調、統計の塗り分け、点、矢印、経度・緯度の重ね描きを段階ごとに出す | 項目の step の最大(既定 1)。地図そのものは段階 0 から出ている | `{regions?:[{id?:str\\|int,group?:str,label?,tone?,step?,at?} (id or group),…],values?:object,classes?:num[],valuesStep?:int,points?:[{lon?:num,lat?:num,code?:str\\|int,label?,tone?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\"\\|\"top\"\\|\"bottom\",step?,at?} (lon + lat or code),…],flows?:{from:str\\|int\\|any[],to:str\\|int\\|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),…]}` — prefectures by JIS code \"01\"–\"47\" (or \"JP-13\", \"東京都\") in regions[].id; the 8 regions (hokkaido, tohoku, kanto, chubu, kinki, chugoku, shikoku, kyushu) in regions[].group; values is an object {code: number}; classes are the lower bounds of the classes (default 4, at most 5); points, shapes and flows[].via use lon/lat in degrees |",
|
|
855
|
-
"entry": "### `<m-map-japan>`\n\nData example (child `<script type=\"application/json\">`): `{\"regions\":[{\"id\":\"13\",\"tone\":\"emph\",\"step\":1},{\"group\":\"kinki\",\"tone\":\"series-2\",\"step\":2}],\"points\":[{\"lon\":135.5,\"lat\":34.69,\"label\":\"大阪\",\"step\":3}],\"flows\":[{\"from\":\"13\",\"to\":\"27\",\"step\":4}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `layout` | string | `\"inset\"` | inset(南西諸島を枠に入れて描く)か true(本当の位置。日本が小さくなる) |\n| `islands` | string | `\"main\"` | main か all(inset で小笠原諸島の枠も描く) |\n| `labels` | string | `\"focus\"` | 地域の名前:focus(regions に書いた地域だけ)・all(名前が中に入る都道府県すべて)・none |\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`(`\"01\"`〜`\"47\"`)か `group`(`hokkaido` `tohoku` `kanto` `chubu` `kinki` `chugoku` `shikoku` `kyushu`)。`label`\n- `values`:`{\"13\": 1406, …}` と `classes
|
|
855
|
+
"entry": "### `<m-map-japan>`\n\nData example (child `<script type=\"application/json\">`): `{\"regions\":[{\"id\":\"13\",\"tone\":\"emph\",\"step\":1},{\"group\":\"kinki\",\"tone\":\"series-2\",\"step\":2}],\"points\":[{\"lon\":135.5,\"lat\":34.69,\"label\":\"大阪\",\"step\":3}],\"flows\":[{\"from\":\"13\",\"to\":\"27\",\"step\":4}]}`\n\n| prop | type | default | meaning |\n|---|---|---|---|\n| `layout` | string | `\"inset\"` | inset(南西諸島を枠に入れて描く)か true(本当の位置。日本が小さくなる) |\n| `islands` | string | `\"main\"` | main か all(inset で小笠原諸島の枠も描く) |\n| `labels` | string | `\"focus\"` | 地域の名前:focus(regions に書いた地域だけ)・all(名前が中に入る都道府県すべて)・none |\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`(`\"01\"`〜`\"47\"`)か `group`(`hokkaido` `tohoku` `kanto` `chubu` `kinki` `chugoku` `shikoku` `kyushu`)。`label`\n- `values`:`{\"13\": 1406, …}` と `classes`(階級の下限。最初はいちばん小さい値以下に。書かなければ四分位で 4 階級。5 つまで)で塗り分け。凡例に階級を書く。塗り分けの段階は `valuesStep`(既定 1。`values` は `step` を持てない)\n- `points`:`lon` `lat`(または `code` で県庁の位置)、`label`、`anchor`\n- `flows`:`from` `to`(番号か `[経度, 緯度]`)の矢印。`via`(通る点 `[[経度, 緯度], …]`。海の道は沖に)、`label` `labelAt` `value`(数。線が値で太くなる)\n- `shapes`:`polygon` か `line`(`[[経度, 緯度], …]`)。`label` `dash`\n\n`labels`:`focus`(既定)・`all`・`none`。`show=\"value\"` で入る地域に値を書く(既定は書かない)。\n\n日本の範囲・東西南北の端・排他的経済水域を見せるときは layout=\"true\"(小窓なし、本当の位置)\n\n地図データ:Natural Earth(パブリックドメイン)を加工。"
|
|
856
856
|
},
|
|
857
857
|
"m-map-world": {
|
|
858
858
|
"set": "maps",
|
|
@@ -958,7 +958,7 @@ export const PACK = {
|
|
|
958
958
|
"extHead": "### `<{name}>`: extension for this part set (the component is described in §3)"
|
|
959
959
|
},
|
|
960
960
|
"ja": {
|
|
961
|
-
"common": "# AI への指示\n\n指示の版:`69c736a1`\n\n短い **Egatari の教材**を 1 つ書いてください。段階ごとに出る HTML のスライド(`deck.html`)と口述原稿(`narration.md`)で、どちらも自動で組まれ、品質チェックを受けます。ここにないものは使えません。教材は頼まれた言語で書きます(スライドと口述原稿は同じ言語)。規格には **R-fit** のような名前があり、修正依頼は破った規格を名前で示します。依頼は最後の **頼みたいこと**(かその前の会話)にあります。空の項目やない項目はほどよく決め、A と B が両方残っていれば書き込みのある方に従います。\n\n**よくある失敗:**\n\n- **2 つの囲みはどちらも最後まで書いて閉じる。**囲みの途中で終わらない(R-output)。構成案がなければ、教材は短くする(5〜8 枚)。頼む文に構成案とその範囲があれば、その範囲のスライドをちょうどその枚数だけ書く(エディタは 1 回に 6 枚までしか頼まないので、収まる)\n- **1280×720 のスライドの大きさ**(品質チェックが測る。R-fit):本文の場所は 1184 × 443 px(565 px まで。`noconcl` なら 1184 × 558)。字は 32 px・1 行 46 px で、入るのは**およそ 8 行**。はみ出す 46 px ごとに 1 行を削る。**図や部品の中も含め、字はすべて 24 px 以上**\n- **グラフと図:**部品は大きさによらず字を 24〜28 px で描くので、決めるのは部品の大きさ(R-fit)\n- **その場で書く `<svg>`:**字は「表示の幅 ÷ viewBox の幅」で縮むので、viewBox を表示の画素で書く(`<svg viewBox=\"0 0 560 320\" width=\"560\" height=\"320\">`)。`font-size` は 24 以上。`width:100%` と別の幅の viewBox を組み合わせない。合う部品があれば部品を使う\n\n## 1. 出力の形\n\n- **R-output** 返事は**ちょうど 2 つのコードの囲み**にし、この順で、名前を `deck.html` と `narration.md` にする(始まりの行は ```` ```deck.html ```` と ```` ```narration.md ````)。間には何も書かない(前後に 1 行の添え書きはよい)。1 つのファイルを囲みに分けない。ファイル・キャンバス・添付にせず、返事の本文に書く。ほかのファイルを参照しない(画像・`{{FIG:…}}`・`{{JSON:…}}`・外の URL・`<link>` は使わない)。囲みの途中で終わらない(長すぎるなら枚数を減らす。ただし構成案の範囲を頼まれたら、ちょうどその枚数)\n- **R-outline** **構成案だけ**を頼まれたら(長い教材を 2 回に分けて作るとき)、`outline` という名前の囲み 1 つ(始まりの行は ```` ```outline ````)だけで返し、`deck.html` と `narration.md` は書かない:列が「番号」「見出し」「要点(1 行)」の Markdown の表で、スライドごとに 1 行、全スライドを順に。その後の頼む文は範囲を示す(「構成案の 7〜12 枚目」)ので、その見出しと要点のとおりに、ちょうどそのスライドを書く\n- **R-noids** スライドの id を**書かない**。`<section class=\"slide\">` に `id` を付けず、口述原稿の見出しにも `{#…}` を付けない。id は取り込みでエディタが付ける。id のあるデッキを渡されたとき(修正依頼)は、今ある `id=\"…\"` と `{#…}` をそのまま残す\n\n## 2. deck.html\n\n### 2.1 骨組み\n\n```html\n<!DOCTYPE html>\n<html lang=\"ja\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>教材の題名</title>\n</head>\n<body>\n<div id=\"stage\">\n <section class=\"slide cover noconcl static\"> … </section>\n <section class=\"slide\"> … </section>\n</div>\n</body>\n</html>\n```\n\n- `lang`:`ja`・`en` など(教材の言語)。`data-theme`:ビジネス・ピッチは `sumi`、国語は `kokugo`、ほかは `default`\n- `<script>` は部品のデータ(§2.6)だけ。`<style>` は配置(大きさ・間隔)だけに使い、色は書かない\n\n### 2.2 スライド\n\n- 普通のスライド:`<h2>` の見出し、`<div class=\"body\">…</div>`、`<div class=\"concl\"><span>…</span></div>`(結論の行。短い 1 文)\n- 表紙:`<section class=\"slide cover noconcl static\">` に、あれば `<div class=\"venue\">…</div>`、`<h1>題名</h1>`、あれば `<div class=\"au\">…</div>`\n- 章の扉:`<section class=\"slide sec noconcl static\"><h1>章の題</h1></section>`\n- `<section>` の class:`noconcl`(結論の行なし)、`static`(段階なし)、`nostep`(箇条書きも初めから全部)、`layout-tate`(縦書き。kokugo の束があるときだけ)、属性 `data-morph`(§2.5)\n- `.body` の中:`<p class=\"sub\">` 小見出し、`<div class=\"big\">` 主要な式、`<p class=\"note\">` 補足、`<div class=\"thm\">` 定理の枠、`<div class=\"cols\">` 横並び、普通の `<p>` `<ul>` `<ol>` `<table>`\n- 字の強調(色を付ける唯一の方法):`term`(用語・問い)、`emph`(結論・問題・目標)、`muted`(既知の結果・控えめ)、`b`(太字)\n- **R-headings** スライドの見出し(表紙と扉は `h1`、ほかは `h2`)は**すべて違う**ものにする(同じなら語を足す)。そのスライドの口述原稿の節は `## ` に続けて**見出しとまったく同じ文字列**で始める(`<br>` などのタグは除く)\n- **R-colors** 色はテーマだけで:上の class と式のマクロ `\\hlE` `\\hlT` `\\hlM`。16 進・`rgb()`・色の名前・`\\color`・`\\textcolor` は使わない。部品や SVG の中では:**色はテーマの CSS 変数だけ**を使う:`var(--fg)` `var(--term)` `var(--emph)` `var(--muted)` `var(--accent2)` `var(--line)`。SVG では属性ではなく `style=\"stroke:var(--emph)\"` で書く(`DECK.el` は `fill` `stroke` に `var(` があれば自動で style に回す)\n\n### 2.3 段階(出す順 = 話す順)\n\n- **R-steps** 段階 0 は現れたときの姿で、文脈だけ(見出し・小見出し・導入の 1 文)。`data-step=\"k\"`(k = 1, 2, …)の要素は段階 k で現れる。材料(箇条書きの項目・式・表の行・図の部分)は話す順に出す。式とそれを導く 1 文は同じ段階(`<div data-step=\"k\">` で一緒に囲む)。1 枚の段階は 5 前後まで\n- 結論の行は自動で**最後の段階** `concl` になる(`data-step` を付けない)\n- `data-step` が 1 つもないスライドでは、上の階層の箇条書きの項目(`.body > ul > li`・`.body > ol > li`)に 1, 2, … が自動で付く。1 つでもあれば自動にならないので、出すものすべてに付ける\n- 部品は自分の段階を足す(§3)。`data-from`(既定 1)から始まる\n- つまり段階は `0 … max` と、結論の行があれば `concl`。`static` のスライドは段階 0 だけ\n\n### 2.4 数式(KaTeX)\n\n- **R-math** 行内は `\\( … \\)`、別行は `\\[ … \\]`。式の中の `<` は `\\lt`、`>` は `\\gt`。標準のほかに使えるマクロ:`\\hlE{…}`(emph)`\\hlT{…}`(term)`\\hlM{…}`(muted)、`\\htmlId{ID}{…}`、`\\htmlData{mark=ID}{…}`、`\\htmlClass{…}{…}`、`\\morph{ID}{…}`。`\\newcommand` と `\\color` は使わない。記号は最初に使う所で定義する(`\\(\\mu\\)`:母平均)\n\n### 2.5 注目の演出とモーフ\n\n- **R-marks** 口述原稿の `{mark:ID}`(§4)は、**同じスライド**の目印に印を付ける。目印:スライドの中の `id=\"ID\"` か `data-mark=\"ID\"` の要素。式の一部は KaTeX の `\\htmlId{ID}{…}` / `\\htmlData{mark=ID}{…}`(build はこの 2 つと `\\htmlClass` だけを許す)。同じ ID を何枚かで使うなら `data-mark` にする(id は文書の中で一意に)\n- モーフ(なくてよい):`<section class=\"slide\" data-morph>` は前のスライドの要素を今の位置へ滑らせる。両方のスライドの要素に同じ `data-id=\"…\"`、式の一部は両方に `\\morph{ID}{…}`。段階 0 で見えている要素だけが動く\n\n### 2.6 部品\n\n- **R-components** 動く図は一覧(§3)の Web Components `<m-…>` で、`.body` の中に置く。どれにも高さ(`style=\"height:380px\"`)と `aria-label` を付ける。データは子の `<script type=\"application/json\">…</script>` **1 つ**にその場で書く。**図の数字は正しく**(計算する。見た目のために値を作らない。架空の数字は架空と書く)。関数の式は算術の式だけで、コードとしては実行されない(`Math.exp(x)`・`x**2`)。動きが説明になる所だけに使う(たいていのスライドには要らない)\n\n### 2.7 表し方を選ぶ\n\n- **R-purpose** 表し方は習慣でなく、そのスライドで言いたいことから選ぶ。作者がグラフの種類を言っていればそれに従う。表は全パーツの一覧を兼ねる。使うのは渡された文章にあるパーツだけ(§3 と、入っている束)。入っていないパーツの方が合うときは、1 行のメモでそう伝える\n\n{{PURPOSES}}\n\n- **R-whole** 箇条書き・数字の札・円グラフは全体を一度に見せる。台本が 1 つずつ取り上げるときだけ 1 行ずつ出す(箇条書きなら全体に 1 つの `data-step` を付けるか、スライドに `nostep`)\n\n### 2.8 スライドに収める(品質チェックのエラー)\n\n- **R-title** 見出し:日本語は 26 字まで(全角 1・半角 0.5)、英語は 60 文字まで。コロンで終えない\n- **R-concl** 結論の行:日本語は 35 字まで、英語は 70 文字まで。1 行\n- **R-fit** 本文は 565 px(`noconcl` なら 680 px)より上で終える:1 枚におよそ 8 行・100 字・英語 60 語、または `big` の式 1 つと短い箇条書き 3 つ、または高さ 380 px までの部品と短い 1 行(2 行なら 330 px まで)。入らなければスライドを分ける。字を縮めず、字の大きさを書かない。図の中の字は 24 px 以上\n- **R-style** 日本語のスライドは常体(だ・である、体言止め)で、です・ます を使わない。句読点はデッキ全体で 1 つの組(`、。` か `,.`)。英語のスライドは短い句で\n\n## 3. 部品の一覧\n\nどの教材でも使える標準の部品。§6 の後に束の指示があれば、その種類の材料の部品が加わる。「steps」は部品が使うスライドの段階の数(`data-from` から。既定 1)。秒で測る属性(動きの長さ・ずれ)は載せない(既定で口述原稿に合う)。型が json の属性は、値に JSON を書く(`values=\"[0.1,0.5]\"`)。「データの形」の `?` は省略できる欄。型を書いていない label・tex・note・tone は str、step は int、at は num。名前やラベルの `*…*` は斜体、`_` `^` は次の 1 字だけ下付き・上付き。記号のまま出すなら全角の _ ^ *。\n\n{{CATALOG}}\n\n## 4. narration.md\n\n```markdown\n# 口述原稿:<教材の題名>\n\n## 減衰の式\n[0] 減衰の式です。時刻ごとに残っている原子の数を考えます。\n[1] 残る数は、はじめの数に、時間とともに小さくなる指数関数を掛けたものです。\n[2] {mark:n0|circle}{N₀|エヌゼロ} は、時刻ゼロのときの、はじめの数です。\n[concl] 半分になるまでの時間は、崩壊定数だけで決まります。\n```\n\n- スライドごとに 1 つの節を、**スライドの順に、すべてのスライド(表紙も)について**:`## <スライドの見出し>`(R-headings)。`{#id}` は付けない(R-noids)\n- **R-narr-steps** 段階の印は `[0]` `[1]` … と `[concl]`。**どのスライドのどの段階にも口述原稿を書き**(段階 0 から max まで、結論の行があれば `[concl]`)、**ない段階の印は書かない**(`static` の表紙は `[0]` だけ。結論の行がなければ `[concl]` もない。`[01]` とは書かない)。段階の中では、その段階で現れるものだけを話す\n- **R-dialogue** **既定は話者 1 人**で、話者名を書かない。掛け合いは頼まれたときだけ(3 人以上を頼まれても 2 役にし、最初にそう書く):行を `Expert:` か `Novice:` で始め(続きの行は字下げ。話者なしは Expert)、認知的徒弟制の形にする:\n - Novice は相づち役にせず、学習者の疑問を代弁するか、「つまり〜ということですか」と言い換える\n - Expert は答えて具体例か比喩を 1 つ足すか、言い換えを確かめて(違えば直して)1 歩進める\n - 理解の分かれ目(誤解しやすい所、「なぜ」が残る所)にだけ、1 枚に 1 回・2〜3 発言まで。ほかは Expert 1 人\n - 「なるほど」だけの発言、前の発言のくり返しは書かない。例:`Novice: つまり、大きいほど早く着くのですか。` `Expert: いつもではありません。大きすぎると谷を飛び越えます。大股で坂を下りすぎて、向こうの斜面に足が着くように。`\n- `{note:…}` 発表者用\n- `{cue}`:段階の中の同期点。部品の `cues(k)` の 1 つに 1 つ(部品の説明が求めるときだけ)\n- `{mark:ID}`・`{mark:ID|効果}`・`{mark:ID|効果|hold=秒}`・`{mark:clear}`:目印のことを言う言葉の**すぐ前**に置く。1 段階に 1〜2 個まで。言葉でも言う。効果:`underline`(既定。手描きの下線を左から右へ)、`circle`(手描きの囲み)、`box`(角丸の枠)、`spot`(対象のまわり以外を背景色で薄くする)、`laser`(光の点が対象の下へ滑ってきて少し留まる)\n- **R-reading** `{表示|読み}` は **1 つの記号か 1 つの用語**の読み:`{θ|シータ}`、`{N₀|エヌゼロ}`、`{論語|ろんご}`。1 つの記号に星・プライム・添え字・ハットやバーが付いていてもよい(`{Q*|キュースター}`、`{θ̂|シータハット}`)。表示は普通の文字で書き、LaTeX にせず、式やいくつもの記号にしない(`{1-η|…}`・`{θとη|…}` は誤り:記号ごとに読みを付け、関係は言葉で言う)\n- **R-formula** **式を読み上げない**:口述原稿に LaTeX・`\\`・`^`・`_`・`a + b = c` のような文字列を書かない。式の意味を言葉で言う(§4 の見本の [1])\n- 日本語の口述原稿は話し言葉の です・ます。英語は話し言葉の英語。目安は 1 秒に日本語 5 字・英語 2.5 語。1 回の発言は 1〜3 文\n\n## 5. 修正依頼\n\n利用者が**修正依頼**(規格の名前の付いた指摘の一覧と、今のファイル)を貼り付けたら、その指摘だけを直し、ほかは変えず、`id=\"…\"` と `{#…}` をすべてそのまま残し(R-noids)、また 2 つの囲みで返す(R-output)。依頼に一部のスライドしかなければ、そのスライドの `<section>` だけ(`<html>` なし)とその節だけを 2 つの囲みで返す(エディタが id で元の場所に戻す)。\n\n## 6. 見本\n\n小さな教材の見本(架空。形を見るためで、中身は写さない)。段階の数え方:2 項目の箇条書きは段階 1〜2 と `[concl]`<!--part:m-flow-->、箱が 4 つの `m-flow` は段階 1〜4<!--/part-->。いくつかの束の指示の最後にも見本がある。\n\n### 共通(英語・default テーマ・注目の演出<!--part:m-flow-->・m-flow<!--/part-->)\n\n```deck.html\n<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"default\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>How a web page arrives</title>\n</head>\n<body>\n<div id=\"stage\">\n\n<section class=\"slide cover noconcl static\">\n <div class=\"venue\">Computing basics, lesson 1 (a fictional course)</div>\n <h1>How a web page arrives</h1>\n</section>\n\n<section class=\"slide\">\n <h2>Two programs take part</h2>\n <div class=\"body\">\n <p>Opening a page is a conversation between two programs.</p>\n <ul>\n <li id=\"browser\">The <span class=\"term\">browser</span> asks for the page and draws it</li>\n <li id=\"server\">The <span class=\"term\">server</span> keeps the page and sends it back</li>\n </ul>\n </div>\n <div class=\"concl\"><span>Every page load is a request and a reply</span></div>\n</section><!--part:m-flow-->\n\n<section class=\"slide\">\n <h2>From the address to the screen</h2>\n <div class=\"body\">\n <m-flow style=\"height:300px\" aria-label=\"Four stages: type the address, send a request, send the page back, draw the page\">\n <script type=\"application/json\">{\"nodes\": [\n {\"id\": \"a\", \"label\": \"Type the\\naddress\", \"x\": 10, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 1},\n {\"id\": \"b\", \"label\": \"Send a\\nrequest\", \"x\": 315, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 2},\n {\"id\": \"c\", \"label\": \"Send the\\npage back\", \"x\": 620, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 3, \"tone\": \"term\"},\n {\"id\": \"d\", \"label\": \"Draw the\\npage\", \"x\": 925, \"y\": 100, \"w\": 250, \"h\": 110, \"step\": 4, \"tone\": \"emph\"}\n ], \"edges\": [\n {\"from\": \"a\", \"to\": \"b\"}, {\"from\": \"b\", \"to\": \"c\"}, {\"from\": \"c\", \"to\": \"d\"}\n ]}</script>\n </m-flow>\n </div>\n <div class=\"concl\"><span>A slow page is slow in one of these four stages</span></div>\n</section><!--/part-->\n\n</div>\n</body>\n</html>\n```\n\n```narration.md\n# Narration: How a web page arrives\n\n## How a web page arrives\n[0] Today we follow a web page on its way from a server to your screen.\n\n## Two programs take part\n[0] Opening a page is a conversation between two programs.\n[1] {mark:browser}The browser is the program you look at. It asks for the page and then draws it.\n[2] {mark:server}The server is a program on another computer. It keeps the page and sends it back when asked.\n[concl] Every page load is a request and a reply.<!--part:m-flow-->\n\n## From the address to the screen\n[0] Let us put the steps in order.\n[1] First you type the address of the page.\n[2] The browser turns it into a request and sends it to the server.\n[3] The server finds the page and sends it back.\n[4] The browser draws the page on the screen.\n[concl] When a page is slow, one of these four stages is taking the time.<!--/part-->\n```",
|
|
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```",
|
|
962
962
|
"request": "# 頼みたいこと\n\n*(A か B を埋め、もう一方は消します。書かない項目は消してかまいません)*\n\n**A. 新しく作る**\n\n- タイトル(表紙にそのまま使う):\n- 対象(だれ向け):\n- 長さ(枚数か分):\n- 言語:\n- 話者:1 人\n- そのほかの希望:\n\n**B. 渡した資料と話し合いの内容で作る**\n\nこのチャットで渡した資料と、ここまでの話し合いの内容で、教材を作ってください。\n\n- タイトル(表紙にそのまま使う):\n- 対象(だれ向け):\n- 長さ(枚数か分):\n- 言語:\n- 話者:1 人\n- そのほかの希望:",
|
|
963
963
|
"sets": {
|
|
964
964
|
"stats": "## 部品の束:stats(統計の図)\n\nデータを見せる教材・発表向け。分布、箱ひげ図、ヒートマップ、観測が 1 つずつ加わって変わる分布を見せる。テーマは `default`。データの出どころと数(何人・何件)をスライドか口述原稿に書き、本物らしく見えるデータを作らない(R-components)。\n\n- **軸のある図**(<!--part:m-hist-->`m-hist`・<!--/part--><!--part:m-boxplot-->`m-boxplot`・<!--/part--><!--part:m-seq-->`m-seq`・<!--/part-->など)は目盛りと軸の名前に左 86 px、上下合わせて 80 px を使うので、高さ **300〜380 px**、幅 **560 px 以上**にする(`<div class=\"cols\">` なら図の列を 55% 以上に)\n- 軸の範囲には、図の値(R-components のとおり計算したもの)がすべて入るようにする\n\nこの束の部品(§3 の部品に加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
@@ -969,7 +969,7 @@ export const PACK = {
|
|
|
969
969
|
"music": "## 部品の束:music(音楽:音の高さ・音階・和音)\n\n音楽の教材向け。音の高さ・音階・音程・和音を、ピアノの鍵盤で見せる。テーマは `default`。音の名前は授業での呼び方(ドレミ・C D E・ハニホ)にそろえ、スライドと口述原稿で同じにする。\n\nこの束の部品(§3 の部品に加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
970
970
|
"business": "## 部品の束:business(ビジネス)\n\nビジネスの報告・提案の資料向け(KPI・ポジショニングマップ・市場規模・お金とモノの流れ)。テーマは `sumi`。架空の数字の断り(R-components)は `note` か表紙に書き、スライドの間で数字をそろえる(内訳を足すと書いた合計になる)。\n\nこの束の部品(§3 の部品に加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}\n\n<!--part:m-kpi-->### 見本:ビジネス(日本語・sumi テーマ・m-kpi)\n\n(その部品を使うスライドだけ。`deck.html` の骨組みは §6 の見本と同じ)\n\n```deck.html\n<section class=\"slide\">\n <h2>導入から 3 か月の結果</h2>\n <div class=\"body\">\n <p class=\"note muted\">新しい仕分けの手順を入れた 3 拠点の合計(数字は架空)</p>\n <m-kpi style=\"height:330px\" aria-label=\"1 日の出荷 1,240 件、誤配率 0.8%、残業 32% 減\">\n <script type=\"application/json\">{\"cards\": [\n {\"label\": \"1 日の出荷\", \"value\": 1240, \"unit\": \"件\", \"from\": 980, \"delta\": {\"dir\": \"up\", \"text\": \"導入前から 260 件\"}},\n {\"label\": \"誤配率\", \"value\": 0.8, \"digits\": 1, \"unit\": \"%\", \"from\": 2.1, \"tone\": \"emph\", \"delta\": {\"dir\": \"down\", \"text\": \"導入前は 2.1%\", \"good\": true}},\n {\"label\": \"残業時間\", \"value\": 32, \"unit\": \"%\", \"prefix\": \"−\", \"tone\": \"accent2\", \"note\": \"1 人あたり、月の平均\"}\n ]}</script>\n </m-kpi>\n </div>\n <div class=\"concl\"><span>→ 件数が増えても、誤りと残業は減った</span></div>\n</section>\n```\n\n```narration.md\n## 導入から 3 か月の結果\n[0] 新しい仕分けの手順を入れた、3 つの拠点の合計です。\n[1] 1 日の出荷は 1,240 件になり、導入前より 260 件増えました。\n[2] 誤配率は 2.1% から 0.8% に下がりました。件数が増えても、誤りは減っています。\n[3] 残業時間も、1 人あたり 32% 減っています。\n[concl] 件数が増えても、誤りと残業は減りました。\n```<!--/part-->\n\n<!--part:m-kpi-->段階の数え方:札が 3 枚の `m-kpi` は段階 1〜3。<!--/part-->",
|
|
971
971
|
"tools": "## 部品の束:tools(道具)\n\n授業・研修を進めるための道具(演習やグループワークのタイマーなど)。頼みに演習の時間やワークショップがあるときだけ、その活動をするスライドに使う。\n\nこの束の部品(§3 の部品に加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}",
|
|
972
|
-
"science": "## 部品の束:science(理科)\n\n動くモデルで見せる理科の教材向け(月の満ち欠けなど)。テーマは `default`。大きさや距離が実際の比でないときは、スライドか口述原稿でそう断る。\n\nこの束の部品(§3 の部品に加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}"
|
|
972
|
+
"science": "## 部品の束:science(理科)\n\n動くモデルで見せる理科の教材向け(月の満ち欠けなど)。テーマは `default`。大きさや距離が実際の比でないときは、スライドか口述原稿でそう断る。\n\n色は R-colors のものに加えて `--lit` も使える:光と、光が照らすもの。輪郭線を付けた塗りに使う。\n\nこの束の部品(§3 の部品に加えて):\n\n{{CATALOG}}\n\n{{EXTENSIONS}}"
|
|
973
973
|
},
|
|
974
974
|
"components": {
|
|
975
975
|
"m-bars": {
|
|
@@ -1061,7 +1061,7 @@ export const PACK = {
|
|
|
1061
1061
|
"m-map-japan": {
|
|
1062
1062
|
"set": "maps",
|
|
1063
1063
|
"row": "| `<m-map-japan>` | 日本の 47 都道府県の地図。地域の強調、統計の塗り分け、点、矢印、経度・緯度の重ね描きを段階ごとに出す | 項目の step の最大(既定 1)。地図そのものは段階 0 から出ている | `{regions?:[{id?:str\\|int,group?:str,label?,tone?,step?,at?} (id or group),…],values?:object,classes?:num[],valuesStep?:int,points?:[{lon?:num,lat?:num,code?:str\\|int,label?,tone?,anchor?:\"right\"\\|\"left\"\\|\"above\"\\|\"below\"\\|\"top\"\\|\"bottom\",step?,at?} (lon + lat or code),…],flows?:{from:str\\|int\\|any[],to:str\\|int\\|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),…]}` — 都道府県は regions[].id に JIS の番号 \"01\"〜\"47\"(\"JP-13\"・\"東京都\" も可)、八地方区分は regions[].group(hokkaido・tohoku・kanto・chubu・kinki・chugoku・shikoku・kyushu)。values は {番号: 数} のオブジェクト、classes は階級の下限(既定は 4 階級、5 つまで)。points・shapes・flows[].via は経度・緯度(度) |",
|
|
1064
|
-
"entry": "### `<m-map-japan>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"regions\":[{\"id\":\"13\",\"tone\":\"emph\",\"step\":1},{\"group\":\"kinki\",\"tone\":\"series-2\",\"step\":2}],\"points\":[{\"lon\":135.5,\"lat\":34.69,\"label\":\"大阪\",\"step\":3}],\"flows\":[{\"from\":\"13\",\"to\":\"27\",\"step\":4}]}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `layout` | string | `\"inset\"` | inset(南西諸島を枠に入れて描く)か true(本当の位置。日本が小さくなる) |\n| `islands` | string | `\"main\"` | main か all(inset で小笠原諸島の枠も描く) |\n| `labels` | string | `\"focus\"` | 地域の名前:focus(regions に書いた地域だけ)・all(名前が中に入る都道府県すべて)・none |\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`(`\"01\"`〜`\"47\"`)か `group`(`hokkaido` `tohoku` `kanto` `chubu` `kinki` `chugoku` `shikoku` `kyushu`)。`label`\n- `values`:`{\"13\": 1406, …}` と `classes
|
|
1064
|
+
"entry": "### `<m-map-japan>`\n\nデータ(子の `<script type=\"application/json\">`)の見本: `{\"regions\":[{\"id\":\"13\",\"tone\":\"emph\",\"step\":1},{\"group\":\"kinki\",\"tone\":\"series-2\",\"step\":2}],\"points\":[{\"lon\":135.5,\"lat\":34.69,\"label\":\"大阪\",\"step\":3}],\"flows\":[{\"from\":\"13\",\"to\":\"27\",\"step\":4}]}`\n\n| 値 | 型 | 既定 | 意味 |\n|---|---|---|---|\n| `layout` | string | `\"inset\"` | inset(南西諸島を枠に入れて描く)か true(本当の位置。日本が小さくなる) |\n| `islands` | string | `\"main\"` | main か all(inset で小笠原諸島の枠も描く) |\n| `labels` | string | `\"focus\"` | 地域の名前:focus(regions に書いた地域だけ)・all(名前が中に入る都道府県すべて)・none |\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`(`\"01\"`〜`\"47\"`)か `group`(`hokkaido` `tohoku` `kanto` `chubu` `kinki` `chugoku` `shikoku` `kyushu`)。`label`\n- `values`:`{\"13\": 1406, …}` と `classes`(階級の下限。最初はいちばん小さい値以下に。書かなければ四分位で 4 階級。5 つまで)で塗り分け。凡例に階級を書く。塗り分けの段階は `valuesStep`(既定 1。`values` は `step` を持てない)\n- `points`:`lon` `lat`(または `code` で県庁の位置)、`label`、`anchor`\n- `flows`:`from` `to`(番号か `[経度, 緯度]`)の矢印。`via`(通る点 `[[経度, 緯度], …]`。海の道は沖に)、`label` `labelAt` `value`(数。線が値で太くなる)\n- `shapes`:`polygon` か `line`(`[[経度, 緯度], …]`)。`label` `dash`\n\n`labels`:`focus`(既定)・`all`・`none`。`show=\"value\"` で入る地域に値を書く(既定は書かない)。\n\n日本の範囲・東西南北の端・排他的経済水域を見せるときは layout=\"true\"(小窓なし、本当の位置)\n\n地図データ:Natural Earth(パブリックドメイン)を加工。"
|
|
1065
1065
|
},
|
|
1066
1066
|
"m-map-world": {
|
|
1067
1067
|
"set": "maps",
|
|
@@ -1167,9 +1167,9 @@ export const PACK = {
|
|
|
1167
1167
|
"briefNote": "下に説明の節がない部品は、表の「データの形」のとおりに子の JSON か属性を書き、ほかの属性は既定のままにする。",
|
|
1168
1168
|
"extHead": "### `<{name}>`:この束の拡張(部品の説明は §3)"
|
|
1169
1169
|
},
|
|
1170
|
-
"version": "
|
|
1170
|
+
"version": "03b74c31",
|
|
1171
1171
|
"tiers": {
|
|
1172
|
-
"catalogue": "2.5.
|
|
1172
|
+
"catalogue": "2.5.1",
|
|
1173
1173
|
"parts": {
|
|
1174
1174
|
"m-bars": {
|
|
1175
1175
|
"tier": "standard",
|
package/kit/deck.js
CHANGED
|
@@ -155,7 +155,7 @@ function Plot(box, o){
|
|
|
155
155
|
y: function(v){ return H - m.b - (v - o.yr[0]) / (o.yr[1] - o.yr[0]) * (H - m.t - m.b); }};
|
|
156
156
|
var cid = "clip" + (++Plot.n);
|
|
157
157
|
var cp = el("clipPath", {id: cid}, el("defs", {}, svg));
|
|
158
|
-
el("rect", {x: m.l, y: m.t - 4, width: W - m.l - m.r, height: H - m.t - m.b + 4}, cp);
|
|
158
|
+
el("rect", {x: m.l, y: m.t - 4, width: Math.max(0, W - m.l - m.r), height: Math.max(0, H - m.t - m.b + 4)}, cp);
|
|
159
159
|
p.clip = "url(#" + cid + ")";
|
|
160
160
|
var ax = el("g", {class: "axes"}, svg);
|
|
161
161
|
var K = "var(--fg)";
|
|
@@ -1922,6 +1922,22 @@ function rateLabel(){ return (DECK.ja ? "再生速度 " : "Playback speed ") + R
|
|
|
1922
1922
|
DECK.rateLabel = rateLabel;
|
|
1923
1923
|
// 埋め込み(Player P8):再生の状態と速さが変わるたびに {egatari:"state", playing, rate}
|
|
1924
1924
|
function postState(){ if (EMBED) post({egatari: "state", playing: !!auto, rate: RATE}); }
|
|
1925
|
+
// 埋め込み(Player P8):読み込んで命令を受けられるようになったら 1 度だけ {egatari:"ready", version, docId, sourceSha256?, timeline}。
|
|
1926
|
+
// version は動いているプレーヤーの版(DECK.VERSION)。docId・sourceSha256 は deck-meta から(docId のないふつうの build では null、sourceSha256 は持ち運べる形式だけ)。
|
|
1927
|
+
// timeline は段階ごとに {slideIndex, slideKey, stepKey, slideTitle, dur}(DECK.timeline と同じ順と長さ)。start() が部品の mount と並べの後、
|
|
1928
|
+
// 初めの position より前に送る。親がこれを受けて送る命令は後のタスクで届くので、そのときには DECK.ready が立っている
|
|
1929
|
+
var readySent = false;
|
|
1930
|
+
function postReady(){
|
|
1931
|
+
if (!EMBED || readySent) return;
|
|
1932
|
+
readySent = true;
|
|
1933
|
+
var m = DECK.META, msg = {egatari: "ready", version: DECK.VERSION, docId: typeof m.docId === "string" ? m.docId : null};
|
|
1934
|
+
if (typeof m.sourceSha256 === "string") msg.sourceSha256 = m.sourceSha256;
|
|
1935
|
+
// タイムラインを作れなくても起動は止めない(空のタイムラインで知らせる)
|
|
1936
|
+
try { msg.timeline = DECK.timeline().map(function(x){
|
|
1937
|
+
return {slideIndex: x.i, slideKey: x.slideKey, stepKey: stepKey(slides[x.i], x.k), slideTitle: x.title, dur: x.dur};
|
|
1938
|
+
}); } catch (e) { console.warn("deck.js: ready: " + errText(e)); msg.timeline = []; }
|
|
1939
|
+
post(msg);
|
|
1940
|
+
}
|
|
1925
1941
|
// 文書が隠れたら再生を止める(Player P3。一時停止なので、見えてから再生し直せばそこから続く)
|
|
1926
1942
|
document.addEventListener("visibilitychange", function(){ if (document.visibilityState === "hidden" && auto && DECK.mode !== "video") stopAuto(true); });
|
|
1927
1943
|
|
|
@@ -2323,6 +2339,7 @@ function start(){
|
|
|
2323
2339
|
if (h0.error){ console.warn("deck.js: #" + hs + ": " + h0.error); h0 = {i: 0, k: 0}; }
|
|
2324
2340
|
DECK.openHash = hs; // 開いたときの #(kit/panes.js の「前回の続きから」は、# で場所を指して開いたときには使わない)
|
|
2325
2341
|
if (pendingGo){ h0 = {i: pendingGo[0], k: pendingGo[1]}; pendingGo = null; }
|
|
2342
|
+
postReady(); // 埋め込み(Player P8):初めの position の前に
|
|
2326
2343
|
POS.setCause("seek"); go(h0.i, h0.k, false); POS.setCause(null);
|
|
2327
2344
|
if (pendingSeek){ var ps = pendingSeek; pendingSeek = null; seek.apply(null, ps); }
|
|
2328
2345
|
DECK.ready = true;
|
package/kit/player.json
CHANGED
package/kit/player.lock.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "egatari",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://studio.egatari.org/",
|
|
6
6
|
"repository": {
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"fonts/@fontsource/",
|
|
40
40
|
"tools/new.mjs",
|
|
41
41
|
"tools/ids.mjs",
|
|
42
|
+
"tools/ids-of.mjs",
|
|
42
43
|
"tools/portable.mjs",
|
|
43
44
|
"tools/sheet.mjs",
|
|
44
45
|
"tools/comment-shots.mjs",
|
|
@@ -64,6 +65,7 @@
|
|
|
64
65
|
"check": "node kit/check.mjs",
|
|
65
66
|
"new": "node tools/new.mjs",
|
|
66
67
|
"ids": "node tools/ids.mjs",
|
|
68
|
+
"ids-of": "node tools/ids-of.mjs",
|
|
67
69
|
"i18n": "node tools/i18n-pairs.mjs",
|
|
68
70
|
"lint:terms": "node tools/lint-terms.mjs",
|
|
69
71
|
"build:app": "node tools/build-app.mjs",
|
package/themes/asagi/theme.json
CHANGED
package/themes/asagi/tokens.css
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
--bg: #fbfaf6;
|
|
6
6
|
--cover-bg: #eaf3f5;
|
|
7
7
|
--font-sans: "Zen Maru Gothic", "BIZ UDPGothic", sans-serif;
|
|
8
|
+
--lit: #FFCE3A; /* 光と照らされる側。明るい黄(淡い地 1.4:1。1.1.0) */
|
|
8
9
|
}
|
|
9
10
|
/* look heading: soft */
|
|
10
11
|
.slide:not(.cover):not(.sec):not(.layout-tate) > h2{border-bottom:0;background:var(--base-wash);border-radius:16px;padding:8px 22px}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- i18n: pair=README.md sha256=
|
|
1
|
+
<!-- i18n: pair=README.md sha256=506765754fe23769 -->
|
|
2
2
|
# テーマ `default`
|
|
3
3
|
|
|
4
4
|
[English](README.md)
|
|
@@ -29,3 +29,14 @@
|
|
|
29
29
|
|
|
30
30
|
- **`--concl-bg` `#F5F5F5`。** 無彩の灰は色相を持たないので、どの型の色覚でも白黒の印刷でも同じに見え、行の帯がどこでも同じ程度に分かる。手がかりは縦線と太字が担うので、地はかろうじて見えれば足りる。行が分かる地のうちで、字のコントラストを最も落とさない(`--emph` 5.32:1。大きさによらず AA)。生成り `#F6F3EF` は色のある画面では少し目立つが、白黒では色の見た目ほど分かれず、コントラストも余計に落とす。
|
|
31
31
|
- `default` を継ぐテーマは形を受け継ぐ。`kokugo` は自分の赤の縦線と灰の地、`business` は自分の淡い橙の `--concl-bg` のまま。
|
|
32
|
+
|
|
33
|
+
## 光:`--lit`(1.3.0)
|
|
34
|
+
|
|
35
|
+
`--lit` は光と、光が照らすもの(太陽・灯り・月の明るい側。format spec §8.4)の役割。塗りの色で、字の色には使わず、いつも `--fg` か `--muted` の輪郭線と一緒に描く。
|
|
36
|
+
|
|
37
|
+
| 変数 | 値 | 白地 | 色覚の模擬での `--emph` との差(ΔE*ab 3 色型/1 型/2 型/3 型、ΔE00) |
|
|
38
|
+
|---|---|---|---|
|
|
39
|
+
| `--lit` | `#F5B800` | 1.79:1 | 65/55/42/54、44.4/39.8/28.3/30.7 |
|
|
40
|
+
|
|
41
|
+
- **`--lit` `#F5B800`。** 日の光や灯りの色として思い浮かぶ、少し山吹寄りの暖かい黄。白地では淡い(1.79:1)ので、形は輪郭線が見せる。WCAG 1.4.11 の 3:1 は塗りではなく輪郭線が満たす。模擬した 4 つの色覚の型のどれでも、`--emph` との差が `--emph` と `--term` と同じ線を越える(`node tools/test-themes.mjs`)ので、太陽と結論を取り違えない。
|
|
42
|
+
- 同梱のテーマはそれぞれ自分の `--lit` を持つ(配色に合う暖かい黄。`sumi` と `business` は橙の `--emph` から離した)。`default` を継ぐテーマで宣言しないものは `#F5B800` を受け継ぐ。
|
package/themes/default/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- i18n: pair=README.ja.md sha256=
|
|
1
|
+
<!-- i18n: pair=README.ja.md sha256=3d692c529201acca -->
|
|
2
2
|
# Theme `default`
|
|
3
3
|
|
|
4
4
|
[日本語](README.ja.md)
|
|
@@ -29,3 +29,14 @@ From the plain-theme proposal by @totasuko-lab (1.1.0 took its colours). The con
|
|
|
29
29
|
|
|
30
30
|
- **`--concl-bg` `#F5F5F5`.** A neutral grey has no hue, so it looks the same for every colour-vision type and in greyscale print: the row reads as a band everywhere to the same degree. The bar and bold carry the cue, so the ground only needs to be just visible; this one costs the least contrast among the grounds that still separate the row (`--emph` 5.32:1, above AA for any size). The warm `#F6F3EF` is a little more visible in colour, but in greyscale it separates less than its colour suggests and it costs more contrast.
|
|
31
31
|
- Themes that extend `default` take the shape: `kokugo` gets the bar in its own red and the grey ground; `business` keeps its own pale-orange `--concl-bg`.
|
|
32
|
+
|
|
33
|
+
## Light: `--lit` (1.3.0)
|
|
34
|
+
|
|
35
|
+
`--lit` is the role for light and what it lights (the sun, a lamp, the lit side of the Moon; format spec §8.4). It is a fill colour, never a text colour, and is always drawn with an outline in `--fg` or `--muted`.
|
|
36
|
+
|
|
37
|
+
| Token | Value | On white | vs `--emph` under simulation (ΔE*ab normal/protan/deutan/tritan; ΔE00) |
|
|
38
|
+
|---|---|---|---|
|
|
39
|
+
| `--lit` | `#F5B800` | 1.79:1 | 65/55/42/54; 44.4/39.8/28.3/30.7 |
|
|
40
|
+
|
|
41
|
+
- **`--lit` `#F5B800`.** A warm, slightly amber yellow, the colour people expect for sunlight and lamps. On white it is pale (1.79:1), so the outline carries the shape; the 3:1 of WCAG 1.4.11 is met by the outline, not the fill. Under all four simulated colour-vision types it stays apart from `--emph` by the same limits as `--emph` against `--term` (`node tools/test-themes.mjs`), so the sun and a conclusion are not confused.
|
|
42
|
+
- Each bundled theme sets its own `--lit` (a warm yellow fitting its palette; `sumi` and `business` lean away from their orange `--emph`). Themes that extend `default` without setting it inherit `#F5B800`.
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
--term-tint: var(--base-wash);
|
|
28
28
|
--emph-tint: #fbe7e3;
|
|
29
29
|
--concl-bg: #F5F5F5; /* 結論の行の地。無彩のごく淡い灰(--emph の字 5.3:1・--fg 14.6:1。色覚の型と白黒でも見え方が同じ。1.2.0) */
|
|
30
|
+
--lit: #F5B800; /* 光と、光が照らすもの(太陽・灯り・月の明るい側)。山吹寄りの黄(白地 1.8:1。字の色ではない:輪郭線と一緒に描く。色覚の模擬でも --emph と分かれる。1.3.0) */
|
|
30
31
|
|
|
31
32
|
/* 先のステップを薄く見せるときの濃さ(format spec §8.4 の --preview-opacity。プレーヤーも部品もこれを読む) */
|
|
32
33
|
--preview-opacity: .45;
|
package/themes/kokugo/theme.json
CHANGED
package/themes/kokugo/tokens.css
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
形は kit/core/theme-shapes.mjs の断片(theme.json の look) */
|
|
3
3
|
:root{
|
|
4
4
|
--base: #5a3d8f; /* 江戸紫 */
|
|
5
|
+
--lit: #F3BE00; /* 光と照らされる側。黄(紫の補色。白地 1.7:1。1.1.0) */
|
|
5
6
|
}
|
|
6
7
|
/* look heading: left-bar */
|
|
7
8
|
.slide:not(.cover):not(.sec):not(.layout-tate) > h2{border-bottom:0;border-left:10px solid var(--base);padding:4px 0 4px 18px}
|
package/themes/sumi/theme.json
CHANGED
package/themes/sumi/tokens.css
CHANGED
package/themes/tokiwa/theme.json
CHANGED
package/themes/tokiwa/tokens.css
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
赤との差を保つため緑を少し青に寄せた(1 型の模擬で赤との差 ΔE 33 → 40)。形は kit/core/theme-shapes.mjs の断片(theme.json の look) */
|
|
3
3
|
:root{
|
|
4
4
|
--base: #0a5753; /* 常盤 */
|
|
5
|
+
--lit: #F5C000; /* 光と照らされる側。菜の花の黄(白地 1.7:1。1.1.0) */
|
|
5
6
|
}
|
|
6
7
|
/* look heading: thick-square */
|
|
7
8
|
.slide:not(.cover):not(.sec):not(.layout-tate) > h2{border-bottom-width:5px;padding-left:34px}
|