egatari 0.6.15 → 0.6.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/README.ja.md +65 -64
  3. package/README.md +40 -39
  4. package/bin/egatari.mjs +3 -3
  5. package/kit/check-messages.mjs +95 -70
  6. package/kit/check.mjs +17 -11
  7. package/kit/core/article-messages.mjs +15 -15
  8. package/kit/core/check-parity.mjs +1 -1
  9. package/kit/core/check-rules.mjs +11 -6
  10. package/kit/core/colab-core.mjs +2 -2
  11. package/kit/core/export-name.mjs +2 -2
  12. package/kit/core/geometry-check.mjs +363 -25
  13. package/kit/core/layout-scan.mjs +8 -3
  14. package/kit/core/live-policy.mjs +2 -2
  15. package/kit/core/live.mjs +2 -2
  16. package/kit/core/llm-fix.mjs +12 -12
  17. package/kit/core/llm-insert.mjs +11 -11
  18. package/kit/core/llm-outline.mjs +7 -7
  19. package/kit/core/llm-pack-data.mjs +10 -10
  20. package/kit/core/parts2.mjs +5 -5
  21. package/kit/core/portable.mjs +5 -5
  22. package/kit/core/purposes.mjs +2 -2
  23. package/kit/core/ref-voice.mjs +1 -1
  24. package/kit/core/scorm.mjs +1 -1
  25. package/kit/core/sound-preferences.mjs +1 -1
  26. package/kit/core/theme-derive.mjs +209 -0
  27. package/kit/core/themes-list.mjs +1 -1
  28. package/kit/core/themes-lock.mjs +1 -1
  29. package/kit/core/tier-a.mjs +7 -7
  30. package/kit/deck.js +7 -4
  31. package/kit/instruction-version.json +1 -1
  32. package/kit/live.js +20 -20
  33. package/kit/player.json +1 -1
  34. package/kit/player.lock.json +2 -2
  35. package/kit/presenter.js +2 -2
  36. package/kit/templates/new-deck.mjs +6 -6
  37. package/kit/tools.js +5 -5
  38. package/kit/track.js +1 -1
  39. package/package.json +1 -1
  40. package/server/editor-ui.js +20 -17
  41. package/tts/yomi.yaml +8 -0
  42. package/vendor/egatari-spec/SOURCE.json +2 -2
  43. package/vendor/egatari-spec/schema/deck-meta.schema.json +1 -1
  44. package/vendor/egatari-spec/schema/egatari-metadata.schema.json +2 -2
@@ -0,0 +1,209 @@
1
+ // テーマを作る画面(新規作成の ③ の「オリジナル」。#58・handoff/theme-builder-v2-2026-10-27.md)の計算:
2
+ // 基調色 1 つからほかの色を導き、裏で色を確かめ、通らないときは通るいちばん近い色を探し、テーマのファイル(tokens.css・theme.json)を書く。
3
+ // 外の名前を使わない(ブラウザでも Node でも動く。app/theme-workshop.js と tools/test-theme-derive.mjs が使う)。色の計算は kit/core/color-check.mjs
4
+ //
5
+ // deriveTheme(base, overrides) → {base, title, term, rule, complement, accent2, 'base-tint', 'base-wash', 'comp-tint', emph, fg, muted, bg, 'concl-bg', 'sec-bg', 'sec-fg', 'ramp-1'…'ramp-5'}
6
+ // 式は themes/default/tokens.css の @supports の式と同じ(--title は明るさ 0.32 まで、補色は色相 +180°、淡色は OKLCH で白と混ぜる)。
7
+ // overrides(「詳しく」で替えた色。名前は上の鍵)はそのまま勝つ
8
+ // checkTheme(t, {coverBg}) → [{id, level: 'fail' | 'warn', token, value, need, kind?}] 通らなかったものだけ(全部通れば [])
9
+ // token:直すときに替える入力('base' か「詳しく」の鍵)。coverBg:表紙の背景画像の平均の色(あれば表紙のタイトルと比べる)
10
+ // fixFor(input, token, opts) → '#RRGGBB' | null その入力の fail がなくなる、元の色にいちばん近い色(CIEDE2000)
11
+ // pickColours(rgba, {max}) → ['#RRGGBB', …] ロゴの画素(RGBA の並び)から、目立つ有彩の色を 1〜3 つ(多い順)
12
+ // themeFiles(input, {name, title, font, coverImage, at}) → {'tokens.css': 文字列, 'theme.json': 文字列}
13
+ // readBuilder(themeJson) → 画面の入力 | null(このテーマを作る画面が書いた theme.json の builder)
14
+ //
15
+ // 基準(tools/test-themes.mjs が同梱のテーマに求めるものと同じ線):
16
+ // コントラスト(WCAG 2.x):用語・タイトル・補色・結論の色・本文と地 4.5:1、結論の行の字と地 4.5:1、章の扉の字と地 4.5:1、表紙のタイトルと背景画像 4.5:1
17
+ // 色覚(Machado ほか 2009):結論の色と用語の色の差が 3 色型・1 型・2 型で ΔE*ab 35 以上と CIEDE2000 20 以上、3 型は CIEDE2000 20(足りなければ warn)
18
+ // 基調色の色相が結論の赤に近い(OKLCH で 25° 未満、鮮やかさ 0.05 以上):fail
19
+ // 白黒(印刷・白黒の投影):用語の色と本文の黒の CIEDE2000(明るさだけの差)4 未満は fail、8 未満は warn(墨・焦茶・弁柄の基調色は 5〜6 で warn)
20
+ // 白飛び(明るい部屋の投影。周りの光 15%):用語の色と地のコントラスト 3:1 以上(fail)
21
+ // 印刷:書き出す tokens.css が章の扉と表紙に print-color-adjust:exact を書くので、背景のグラフィックを印刷しない設定でも地が消えない(検査は要らない)
22
+ import { contrast, de76, de2000, simulate, hex2rgb, rgb2hex, relLum } from './color-check.mjs';
23
+ import { FONT_LIST } from './build-core.mjs';
24
+
25
+ // ---------------------------------------------------------------- OKLab / OKLCH(Björn Ottosson 2020)
26
+ const R = Math.PI / 180;
27
+ const lin1 = (v) => (v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4));
28
+ const delin1 = (v) => { v = Math.min(1, Math.max(0, v)); return v <= 0.0031308 ? 12.92 * v : 1.055 * Math.pow(v, 1 / 2.4) - 0.055; };
29
+ function oklab(c) {
30
+ const [r, g, b] = hex2rgb(c).map(lin1);
31
+ const L = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b), M = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b), S = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
32
+ return [0.2104542553 * L + 0.7936177850 * M - 0.0040720468 * S, 1.9779984951 * L - 2.4285922050 * M + 0.4505937099 * S, 0.0259040371 * L + 0.7827717662 * M - 0.8086757660 * S];
33
+ }
34
+ function oklabToLin([l, a, b]) {
35
+ const L = (l + 0.3963377774 * a + 0.2158037573 * b) ** 3, M = (l - 0.1055613458 * a - 0.0638541728 * b) ** 3, S = (l - 0.0894841775 * a - 1.2914855480 * b) ** 3;
36
+ return [4.0767416621 * L - 3.3077115913 * M + 0.2309699292 * S, -1.2684380046 * L + 2.6097574011 * M - 0.3413193965 * S, -0.0041960863 * L - 0.7034186147 * M + 1.7076147010 * S];
37
+ }
38
+ export function oklch(c) { const [L, a, b] = oklab(c), C = Math.hypot(a, b); return [L, C, C < 1e-4 ? NaN : ((Math.atan2(b, a) / R) % 360 + 360) % 360]; }
39
+ // 色域の外なら鮮やかさを下げて入れる(ブラウザの色域の写し方と 1 段ずれることがある)
40
+ export function fromOklch(L, C, h) {
41
+ if (Number.isNaN(h)) { h = 0; C = 0; }
42
+ L = Math.min(1, Math.max(0, L));
43
+ for (let i = 0; i < 60; i++) {
44
+ const l = oklabToLin([L, C * Math.cos(h * R), C * Math.sin(h * R)]);
45
+ if (l.every((v) => v >= -1e-4 && v <= 1 + 1e-4)) return rgb2hex(l.map(delin1));
46
+ C *= 0.94;
47
+ }
48
+ return rgb2hex(oklabToLin([L, 0, 0]).map(delin1));
49
+ }
50
+ // color-mix(in oklch, c p, white)
51
+ function mixWhite(c, p) {
52
+ const [L, C, h] = oklch(c);
53
+ return fromOklch(p * L + (1 - p), p * C, h);
54
+ }
55
+ const hueGap = (a, b) => { const d = Math.abs(a - b) % 360; return d > 180 ? 360 - d : d; };
56
+ export const isHex = (s) => /^#?[0-9a-f]{6}$/i.test(String(s || '').trim());
57
+ export const normHex = (s) => '#' + String(s).trim().replace(/^#/, '').toUpperCase();
58
+ const grey = (c) => { const y = delin1(relLum(c)); return [y, y, y]; };
59
+ const washout = (c, a = 0.15) => hex2rgb(c).map(lin1).map((v) => delin1(a + (1 - a) * v));
60
+
61
+ // ---------------------------------------------------------------- 導く
62
+ // 基調色に依らない色(themes/default/tokens.css と同じ値)
63
+ export const FIXED = Object.freeze({ emph: '#BE3012', fg: '#222222', muted: '#5C5853', bg: '#FFFFFF', 'concl-bg': '#F5F5F5', 'sec-fg': '#FFFFFF' });
64
+ // 「詳しく」で替えられる色(画面の並び)
65
+ export const EDITABLE = Object.freeze(['title', 'term', 'emph', 'accent2', 'base-tint', 'base-wash']);
66
+ export function deriveTheme(base, overrides = {}) {
67
+ base = normHex(base);
68
+ const [L, C, h] = oklch(base);
69
+ const comp = fromOklch(L, C, Number.isNaN(h) ? h : (h + 180) % 360);
70
+ const [cL, cC, ch] = oklch(comp);
71
+ const t = {
72
+ base, rule: base, term: base, 'sec-bg': base,
73
+ title: fromOklch(Math.min(L, 0.32), C, h),
74
+ complement: comp, accent2: fromOklch(Math.min(cL, 0.55), cC, ch),
75
+ 'base-tint': mixWhite(base, 0.22), 'base-wash': mixWhite(base, 0.07), 'comp-tint': mixWhite(comp, 0.22),
76
+ ...FIXED,
77
+ };
78
+ // 量の色の段(format spec §8.4):基調色の色相で、明るさが単調に下がる 5 段(--ramp-5 は地と 3:1 以上)
79
+ const cc = Math.min(Number.isNaN(h) ? 0 : C, 0.14);
80
+ [0.94, 0.82, 0.68, 0.54, 0.40].forEach((l, i) => { t[`ramp-${i + 1}`] = fromOklch(l, cc * [0.25, 0.5, 0.75, 0.9, 1][i], h); });
81
+ for (const [k, v] of Object.entries(overrides || {})) if (EDITABLE.includes(k) && isHex(v)) t[k] = normHex(v);
82
+ return t;
83
+ }
84
+
85
+ // ---------------------------------------------------------------- 確かめる
86
+ export const NEED = Object.freeze({ text: 4.5, washout: 3, de76: 35, de2000: 20, grey: 8, greyFail: 4, redHue: 25 });
87
+ // input:{base, overrides}。返すのは通らなかったものだけ
88
+ export function checkTheme(t, { coverBg = null, overrides = {} } = {}) {
89
+ const out = [];
90
+ const who = (k) => (overrides && overrides[k] ? k : 'base'); // 直すときに替える入力
91
+ const text = (id, fg, bg, token) => { const v = contrast(fg, bg); if (v < NEED.text) out.push({ id, level: 'fail', token, value: v, need: NEED.text }); };
92
+ text('term-contrast', t.term, t.bg, who('term'));
93
+ text('title-contrast', t.title, t.bg, who('title'));
94
+ text('accent2-contrast', t.accent2, t.bg, who('accent2'));
95
+ text('sec-contrast', t['sec-fg'], t['sec-bg'], 'base');
96
+ if (overrides && overrides.emph) { text('emph-contrast', t.emph, t.bg, 'emph'); text('concl-contrast', t.emph, t['concl-bg'], 'emph'); }
97
+ if (coverBg) text('cover-title', t.title, coverBg, 'cover');
98
+ // 色覚:結論の色と用語の色
99
+ const ct = overrides && overrides.term ? 'term' : overrides && overrides.emph ? 'emph' : 'base';
100
+ let worst = null;
101
+ for (const kind of ['normal', 'protan', 'deutan']) {
102
+ const a = simulate(t.emph, kind), b = simulate(t.term, kind), d00 = de2000(a, b), d76 = de76(a, b);
103
+ if (d00 < NEED.de2000 || d76 < NEED.de76) { const v = d00 < NEED.de2000 ? d00 : d76, need = d00 < NEED.de2000 ? NEED.de2000 : NEED.de76; if (!worst || v / need < worst.value / worst.need) worst = { kind, value: v, need, metric: d00 < NEED.de2000 ? 'de2000' : 'de76' }; }
104
+ }
105
+ if (worst) out.push({ id: 'cvd', level: 'fail', token: ct, ...worst });
106
+ else { const d = de2000(simulate(t.emph, 'tritan'), simulate(t.term, 'tritan')); if (d < NEED.de2000) out.push({ id: 'cvd', level: 'warn', token: ct, kind: 'tritan', value: d, need: NEED.de2000, metric: 'de2000' }); }
107
+ // 基調色の色相が結論の赤に近い
108
+ const [, bc, bh] = oklch(t.base), [, , eh] = oklch(t.emph);
109
+ if (!Number.isNaN(bh) && !Number.isNaN(eh) && bc >= 0.05 && hueGap(bh, eh) < NEED.redHue) out.push({ id: 'red-hue', level: 'fail', token: 'base', value: hueGap(bh, eh), need: NEED.redHue });
110
+ // 白黒
111
+ const g = de2000(grey(t.term), grey(t.fg));
112
+ if (g < NEED.grey) out.push({ id: 'grey', level: g < NEED.greyFail ? 'fail' : 'warn', token: who('term'), value: g, need: NEED.grey });
113
+ // 白飛び
114
+ const w = contrast(washout(t.term), washout(t.bg));
115
+ if (w < NEED.washout) out.push({ id: 'washout', level: 'fail', token: who('term'), value: w, need: NEED.washout });
116
+ return out;
117
+ }
118
+ export const checkInput = (input, opts = {}) => checkTheme(deriveTheme(input.base, input.overrides), { ...opts, overrides: input.overrides || {} });
119
+
120
+ // ---------------------------------------------------------------- 直す色を探す
121
+ // token の fail がなくなる色のうち、元の色にいちばん近いもの(CIEDE2000)。OKLCH の明るさを動かし、色相も ±90° まで回して探す
122
+ export function fixFor(input, token, opts = {}) {
123
+ const now = token === 'base' ? input.base : (input.overrides || {})[token];
124
+ if (!isHex(now)) return null;
125
+ const [L, C, h] = oklch(now);
126
+ const at = (hex) => (token === 'base' ? { ...input, base: hex } : { ...input, overrides: { ...input.overrides, [token]: hex } });
127
+ const ok = (hex) => !checkInput(at(hex), opts).some((x) => x.level === 'fail' && x.token === token);
128
+ let best = null, bestD = Infinity;
129
+ for (const dh of [0, 10, -10, 20, -20, 30, -30, 45, -45, 60, -60, 90, -90]) {
130
+ if (dh && Number.isNaN(h)) break;
131
+ for (let l = 0.2; l <= 0.9001; l += 0.01) {
132
+ const hex = fromOklch(l, C, Number.isNaN(h) ? h : (h + dh + 360) % 360);
133
+ if (hex === normHex(now) || !ok(hex)) continue;
134
+ const d = de2000(hex, now);
135
+ if (d < bestD) { best = hex; bestD = d; }
136
+ }
137
+ }
138
+ return best;
139
+ }
140
+
141
+ // ---------------------------------------------------------------- ロゴから色を拾う
142
+ // rgba:Uint8ClampedArray か数の並び(canvas の getImageData の data)。透けた画素・白・黒・灰(鮮やかさ 0.04 未満)は数えない。
143
+ // 色相 30° × 明るさ 3 段の箱で数え、多い箱から(同じ色相の箱は 1 つだけ)、箱の平均の色
144
+ export function pickColours(rgba, { max = 3 } = {}) {
145
+ const bins = new Map();
146
+ for (let i = 0; i + 3 < rgba.length; i += 4) {
147
+ if (rgba[i + 3] < 128) continue;
148
+ const hex = rgb2hex([rgba[i], rgba[i + 1], rgba[i + 2]].map((v) => v / 255));
149
+ const [L, C, h] = oklch(hex);
150
+ if (C < 0.04 || L > 0.95 || L < 0.12 || Number.isNaN(h)) continue;
151
+ const k = `${Math.floor(h / 30)}:${Math.min(2, Math.floor(L * 3))}`;
152
+ const b = bins.get(k) || { n: 0, r: 0, g: 0, b: 0, hue: Math.floor(h / 30) };
153
+ b.n++; b.r += rgba[i]; b.g += rgba[i + 1]; b.b += rgba[i + 2];
154
+ bins.set(k, b);
155
+ }
156
+ const total = [...bins.values()].reduce((s, b) => s + b.n, 0), seen = new Set(), out = [];
157
+ for (const b of [...bins.values()].sort((x, y) => y.n - x.n)) {
158
+ if (out.length >= max || b.n < total * 0.04 || seen.has(b.hue)) continue;
159
+ seen.add(b.hue);
160
+ out.push(rgb2hex([b.r, b.g, b.b].map((v) => v / b.n / 255)));
161
+ }
162
+ return out;
163
+ }
164
+
165
+ // ---------------------------------------------------------------- 書き出す
166
+ export const FONT_CHOICES = Object.freeze(FONT_LIST.filter((f) => f.group !== 'mono'));
167
+ const FALLBACK = { ja: '"Hiragino Sans", "Yu Gothic", sans-serif', en: '"Helvetica Neue", Arial, sans-serif' };
168
+ const SERIF = /Mincho|Serif|Fraunces/i;
169
+ export const fontStack = (family) => {
170
+ const f = FONT_CHOICES.find((x) => x.family === family) || FONT_CHOICES[0];
171
+ return `"${f.family}", ${SERIF.test(f.family) ? (f.group === 'ja' ? '"Hiragino Mincho ProN", "Yu Mincho", serif' : 'Georgia, serif') : FALLBACK[f.group] || 'sans-serif'}`;
172
+ };
173
+ const TOKEN_ORDER = ['base', 'title', 'complement', 'accent2', 'base-tint', 'base-wash', 'comp-tint', 'term', 'emph', 'ramp-1', 'ramp-2', 'ramp-3', 'ramp-4', 'ramp-5'];
174
+ // input:{base, overrides, font}。coverImage:'data:image/…;base64,…'(そのまま tokens.css に入る。テーマの hash と 1 ファイルに入る。#171(b))
175
+ export function themeFiles(input, { name, title = '', coverImage = '', results = null } = {}) {
176
+ const t = deriveTheme(input.base, input.overrides);
177
+ const res = results || checkInput(input);
178
+ const head = [`/* ${title || name}: made with the theme builder in Egatari Studio (New…, step 3, Custom).`,
179
+ ` Main colour ${t.base}. The other colours are worked out from it${Object.keys(input.overrides || {}).length ? '; changed by hand: ' + Object.keys(input.overrides).join(', ') : ''}.`,
180
+ ` Checks: ${res.length ? res.map((x) => `${x.level} ${x.id}`).join(', ') : 'all passed'}. */`];
181
+ const lines = TOKEN_ORDER.map((k) => ` --${k}: ${t[k]};`);
182
+ lines.push(` --font-sans: ${fontStack(input.font)};`);
183
+ if (coverImage) lines.push(` --cover-bg: url("${coverImage}") center / cover no-repeat var(--bg);`);
184
+ const css = [...head, ':root{', ...lines, '}',
185
+ '/* print the section divider and cover backgrounds even when the browser does not print background graphics */',
186
+ '@media print{.slide.sec,.slide.cover{-webkit-print-color-adjust:exact;print-color-adjust:exact}}', ''].join('\n');
187
+ const f = FONT_CHOICES.find((x) => x.family === input.font);
188
+ const json = { name, ...(title ? { title } : {}), extends: 'default', version: '1.0.0',
189
+ ...(f && !f.default ? { fonts: { body: f.family } } : {}),
190
+ builder: { base: t.base, font: input.font || '', ...(Object.keys(input.overrides || {}).length ? { overrides: input.overrides } : {}) } };
191
+ return { 'tokens.css': css, 'theme.json': JSON.stringify(json, null, 2) + '\n' };
192
+ }
193
+ export function readBuilder(themeJson) {
194
+ let j;
195
+ try { j = typeof themeJson === 'string' ? JSON.parse(themeJson) : themeJson; } catch { return null; }
196
+ const b = j && j.builder;
197
+ if (!b || !isHex(b.base)) return null;
198
+ const overrides = {};
199
+ for (const [k, v] of Object.entries(b.overrides || {})) if (EDITABLE.includes(k) && isHex(v)) overrides[k] = normHex(v);
200
+ return { base: normHex(b.base), font: FONT_CHOICES.some((f) => f.family === b.font) ? b.font : '', overrides };
201
+ }
202
+ // 同梱のテーマの tokens.css から始める値(最後の --base と --font-sans の最初の名前)
203
+ export function startFrom(tokensCss) {
204
+ const c = String(tokensCss || '').replace(/\/\*[\s\S]*?\*\//g, '');
205
+ const b = [...c.matchAll(/--base\s*:\s*(#[0-9a-fA-F]{6})\b/g)].pop();
206
+ const f = [...c.matchAll(/--font-sans\s*:\s*([^;}]+)/g)].pop();
207
+ const fam = f ? f[1].split(',')[0].trim().replace(/^["']|["']$/g, '') : '';
208
+ return { base: b ? normHex(b[1]) : null, font: FONT_CHOICES.some((x) => x.family === fam) ? fam : '' };
209
+ }
@@ -15,7 +15,7 @@ export const CHOOSABLE = Object.freeze([
15
15
  export const RETIRED = Object.freeze(['business']);
16
16
  // 選べなくしたテーマの見せる名前(その教材を開いたときの「テーマを変更…」の今のテーマ)
17
17
  export const RETIRED_LABEL = Object.freeze({ business: { ja: 'ビジネス', en: 'Business' } });
18
- export const RETIRED_NOTE = Object.freeze({ ja: '新しくは選べない', en: 'No longer offered for new lessons' });
18
+ export const RETIRED_NOTE = Object.freeze({ ja: '新しくは選べない', en: 'No longer offered for new files' });
19
19
  // 同梱のテーマの名前の並び(have:同梱のテーマの名前)→ 選べるものを画面の順に。同梱にあって一覧にないもの(RETIRED を除く)は後ろに名前の順
20
20
  export function choosableOf(have) {
21
21
  const set = new Set(have);
@@ -162,5 +162,5 @@ export function themeUpdate(lock, name, from) {
162
162
  // 知らせの 1 行(CLI と編集アプリの警告の板)
163
163
  export function themePinnedWarning(u) {
164
164
  const list = u.tokens.map((x) => `${x.token} ${x.from} → ${x.to}`).join(', ');
165
- return `theme pinned: ${u.name} ${u.from} is the version this lesson recorded; the current ${u.name} is ${u.to}${list ? ` (${list})` : ''}. It is built with ${u.from}, never restyled silently. To update: in the editor press 「テーマを更新」 / Update theme; on the command line rebuild with --update-themes, or set "${u.name}": "${u.to}" under themes in egatari.json / 記録したバージョンのテーマで組む。黙って新しい色にしない`;
165
+ return `theme pinned: ${u.name} ${u.from} is the version this file recorded; the current ${u.name} is ${u.to}${list ? ` (${list})` : ''}. It is built with ${u.from}, never restyled silently. To update: in the editor press 「テーマを更新」 / Update theme; on the command line rebuild with --update-themes, or set "${u.name}": "${u.to}" under themes in egatari.json / 記録したバージョンのテーマでビルドする。自動では新しい色に変えない`;
166
166
  }
@@ -253,7 +253,7 @@ async function run(original, filesIn, opts) {
253
253
  const NEW = filesIn instanceof Map ? filesIn : new Map(Object.entries(filesIn || {}));
254
254
  const r = await readPortable(original);
255
255
  if (r.extractOnly) refuse('extract-only', 'the file can only be extracted (unknown version or feature)');
256
- if (!r.sourceMatches) refuse('source-mismatch', 'the compiled lesson and its source disagree (sourceSha256): tier A edits are not allowed (§3.4)');
256
+ if (!r.sourceMatches) refuse('source-mismatch', 'the built slides and their source disagree (sourceSha256): tier A edits are not allowed (§3.4)');
257
257
  const ix = r.index, old = r.files;
258
258
  const identity = opts.identity || null;
259
259
  const docId = identity ? identity.docId : ix.docId;
@@ -275,9 +275,9 @@ async function run(original, filesIn, opts) {
275
275
  const ARTICLE_FILES = new Set(artIx ? [...(typeof artIx.path === 'string' ? [artIx.path] : Array.isArray(artIx.chapters) ? artIx.chapters : []), ...(typeof artIx.references === 'string' ? [artIx.references] : [])] : []);
276
276
  const articleChanged = changed.filter((p) => ARTICLE_FILES.has(p));
277
277
  const outside = changed.filter((p) => !TIER_A_FILES.has(p) && !isAttachPath(p) && !ARTICLE_FILES.has(p));
278
- if (outside.length) refuse('source-changed', `slide source changed (${outside.join(', ')}): the lesson must be rebuilt (tier B)`, outside);
278
+ if (outside.length) refuse('source-changed', `slide source changed (${outside.join(', ')}): the file must be rebuilt (tier B)`, outside);
279
279
  const artGone = articleChanged.filter((p) => !NEW.get(p));
280
- if (artGone.length) refuse('source-changed', `an article file was removed (${artGone.join(', ')}): the lesson must be rebuilt (tier B)`, artGone);
280
+ if (artGone.length) refuse('source-changed', `an article file was removed (${artGone.join(', ')}): the file must be rebuilt (tier B)`, artGone);
281
281
  const articleHtml = opts.article && typeof opts.article.html === 'string' ? opts.article.html.replace(/\r\n?/g, '\n') : null;
282
282
  if (articleChanged.length && articleHtml === null) refuse('article-changed', `the article changed (${articleChanged.join(', ')}): render it again and pass it (opts.article), or rebuild`, articleChanged);
283
283
  if (articleChanged.length && !new RegExp(`^<article id="${ARTICLE_ID}"[\\s>][\\s\\S]*</article>$`).test(articleHtml)) refuse('layout', `opts.article.html is not one <article id="${ARTICLE_ID}"> element`);
@@ -286,7 +286,7 @@ async function run(original, filesIn, opts) {
286
286
  if (attachChanged.length) {
287
287
  const srcText = Object.keys(old).filter((p) => !isAttachPath(p) && !p.startsWith('audio/') && p !== CFG && /^text\/|json|xml|svg/.test(mimeOf(p))).map((p) => dec.decode(old[p])).join('\n');
288
288
  const used = attachChanged.filter((p) => srcText.includes(p));
289
- if (used.length) refuse('source-changed', `the slide source refers to the changed attachment (${used.join(', ')}): the lesson must be rebuilt (tier B)`, used);
289
+ if (used.length) refuse('source-changed', `the slide source refers to the changed attachment (${used.join(', ')}): the file must be rebuilt (tier B)`, used);
290
290
  }
291
291
  if (changed.includes(CFG)) {
292
292
  let c;
@@ -297,18 +297,18 @@ async function run(original, filesIn, opts) {
297
297
  // 編集の記録(§3.6.1):編集アプリが保存の前に足す(§7.3)。形が合えば、索引の metadata.edits と deck-meta.edits を同じ値に書き換える
298
298
  if (k === 'edits' && !deepEqual(cm.edits, im.edits)) {
299
299
  const ed = normalizeEdits(cm.edits);
300
- if (!ed.edits || ed.dropped || !deepEqual(ed.edits, cm.edits)) refuse('config-changed', `${CFG}: metadata.edits is not a list of {by?, note?} (the lesson must be rebuilt)`);
300
+ if (!ed.edits || ed.dropped || !deepEqual(ed.edits, cm.edits)) refuse('config-changed', `${CFG}: metadata.edits is not a list of {by?, note?} (the file must be rebuilt)`);
301
301
  editsNew = ed.edits;
302
302
  continue;
303
303
  }
304
304
  const want = k === 'derivedFrom' ? (identity ? identity.derivedFrom : im.derivedFrom) : im[k];
305
- if (!deepEqual(cm[k], want)) refuse('config-changed', `${CFG}: metadata.${k} differs from the document (the lesson must be rebuilt)`);
305
+ if (!deepEqual(cm[k], want)) refuse('config-changed', `${CFG}: metadata.${k} differs from the document (the file must be rebuilt)`);
306
306
  }
307
307
  for (const k of META_RIGHTS) if (k !== 'title' && own(im, k) && !own(cm, k)) refuse('config-changed', `${CFG}: metadata.${k} is missing`);
308
308
  // 章の読む順(article。§9C.7)が変われば本文の組み直し(段 B)。つながりの記録(articleLinks)は段 A の場所(§7.2):索引も同じ値に
309
309
  let oc = null;
310
310
  try { oc = own(old, CFG) ? parseJsonStrict(dec.decode(old[CFG])) : null; } catch { oc = null; }
311
- if (!deepEqual(isObj(oc) ? oc.article : undefined, c.article)) refuse('source-changed', `${CFG}: the order of the article's chapters changed: the lesson must be rebuilt (tier B)`);
311
+ if (!deepEqual(isObj(oc) ? oc.article : undefined, c.article)) refuse('source-changed', `${CFG}: the order of the article's chapters changed: the file must be rebuilt (tier B)`);
312
312
  if (own(c, 'articleLinks')) {
313
313
  const AL = c.articleLinks, okRec = (r) => isObj(r) && RE.sha256.test(String(r.article)) && RE.sha256.test(String(r.slide));
314
314
  if (!isObj(AL) || !Object.values(AL).every((m) => isObj(m) && Object.values(m).every(okRec))) refuse('config-changed', `${CFG}: articleLinks is not {slideKey: {sectionId: {article, slide}}}`);
package/kit/deck.js CHANGED
@@ -2052,7 +2052,7 @@ window.addEventListener("message", function(e){
2052
2052
  // 表示のモード(Player P8):learn は talk と読む(P1)。今のモードなら同じ形で答える。読み込んだ後にモードを替えることはしない(?mode= で読み込み直す)
2053
2053
  var want = normMode(m.mode), now = ctxMode();
2054
2054
  if (want === now) post({egatari: "mode", id: m.id, mode: now});
2055
- else post({egatari: "error", id: m.id, code: "mode", message: want === "talk" || want === "video" ? "the mode is chosen when the lesson loads (?mode=)" : "unknown mode"});
2055
+ else post({egatari: "error", id: m.id, code: "mode", message: want === "talk" || want === "video" ? "the mode is chosen when the file loads (?mode=)" : "unknown mode"});
2056
2056
  } else if (EMBED && e.source === window.parent && m.egatari === "rate"){
2057
2057
  var rv = DECK.rate(m.value);
2058
2058
  if (rv !== +m.value) post({egatari: "error", id: m.id, code: "rate", message: "unsupported rate"});
@@ -2326,7 +2326,7 @@ function extLink(a){
2326
2326
  }
2327
2327
  if (d.verdict === "open"){ extOpen(d.url); return; }
2328
2328
  var notes = d.reasons.map(function(r){ return L10N(EXT_WHY[r][0], EXT_WHY[r][1]); });
2329
- var ttl = d.must ? L10N("このリンクを開いてよいか確かめてください", "Check before opening this link") : L10N("授業の外のページを開きます", "This opens a page outside the lesson");
2329
+ var ttl = d.must ? L10N("このリンクを開いてよいか確認してください", "Check before opening this link") : L10N("このファイルの外のページを開きます", "This opens a page outside this file");
2330
2330
  extDialog({title: ttl, host: d.host || d.scheme + ":", url: d.url, notes: notes, from: from,
2331
2331
  open: function(){ EXT_LP.remember(EXT.hosts, d); extOpen(d.url); }});
2332
2332
  }
@@ -2433,10 +2433,13 @@ function whenLaidOut(fn){
2433
2433
  fonts();
2434
2434
  }
2435
2435
  // 隠れていた文書はまだ字(Web フォント)を読んでいない(並べて初めて読み始める)。読み終えてから mount する(ふつうの起動の load と同じく、測る字が揃ってから)
2436
+ // 字を待つ間にまた隠れたら(出してすぐ閉じた窓・取り替えた iframe)、mount せずにもう一度並ぶのを待つ。隠れたまま mount すると部品は幅 0 で
2437
+ // 描く(m-folds の角の丸みが負の rx になり、Windows の CI でコンソールのエラーになった)
2436
2438
  function fonts(){
2437
- if (document.fonts && document.fonts.status === "loading") document.fonts.ready.then(fonts, fn);
2438
- else fn();
2439
+ if (document.fonts && document.fonts.status === "loading") document.fonts.ready.then(fonts, go);
2440
+ else go();
2439
2441
  }
2442
+ function go(){ if (laidOut()) fn(); else whenLaidOut(fn); }
2440
2443
  if (typeof ResizeObserver === "function"){ ro = new ResizeObserver(check); ro.observe(st); }
2441
2444
  window.addEventListener("resize", check); // ResizeObserver のない環境と、窓の大きさが 0 から付いたとき
2442
2445
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "instruction": "049c5f95"
2
+ "instruction": "ac7fb486"
3
3
  }
package/kit/live.js CHANGED
@@ -34,35 +34,35 @@ if (bad.length){ console.warn("live: ignored (" + bad.join("; ") + ")"); return;
34
34
  var JA = /^ja\b/i.test(document.documentElement.lang || "ja");
35
35
  var HOST = LP.hostOf(live.endpoint);
36
36
  var S = JA ? {
37
- title: "ライブ(質問・投票)", again: "もう一度試す", notice: "この教材から、" + HOST + " のライブでホストに質問や投票を送れます", join: "参加する", leave: "退出する", fold: "たたむ", unfold: "ひらく", badge: "ライブ", pin: "開いたままにする", pollOpen: "このステップに投票があります。ライブのパネルを開きました",
37
+ title: "ライブ(質問・投票)", again: "もう一度試す", notice: "このファイルから、" + HOST + " のライブでホストに質問や投票を送信できます", join: "参加する", leave: "退出する", fold: "たたむ", unfold: "ひらく", badge: "ライブ", pin: "開いたままにする", pollOpen: "このステップに投票があります。ライブのパネルを開きました",
38
38
  off: "接続していません", connecting: "接続しています…", connected: "参加中", waiting: "待機室で待っています", retrying: function(s){ return s + " 秒後に再接続します"; },
39
- before: function(t){ return "ライブは " + t + " に始まります"; }, after: "ライブの時間は終わりました", noNet: "この画面からは参加できません。教材のファイルをダウンロードして、ブラウザ(Chrome・Safari など)で直接開いてください。ライブ ID:",
39
+ before: function(t){ return "ライブは " + t + " に始まります"; }, after: "ライブの時間は終わりました", noNet: "この画面からは参加できません。Egatari ファイルをダウンロードして、ブラウザ(Chrome・Safari など)で直接開いてください。ライブ ID:",
40
40
  noNetLink: "この画面からは参加できません。ブラウザの新しいタブで参加できます。", openJoin: "ブラウザで参加する", joinTo: "参加先:", roomLabel: "ライブ ID:",
41
- name: "名前(任意)", nameNote: "名前はホストだけに見えます(入れなければ名前なしで送られます)", ask: "ホストへの質問", send: "送る", sent: "質問を送りました",
42
- askBtn: "ホストに質問する", askHint: "質問はホストだけが見ます。名前を入れなければ、名前なしで届きます",
43
- where: function(t){ return "質問に付く場所:" + t; }, whereStep: function(i, k){ return "スライド " + i + "・ステップ " + k; }, whereAll: "教材全体",
41
+ name: "名前(任意)", nameNote: "名前はホストだけに見えます(入力しなければ名前なしで送信されます)", ask: "ホストへの質問", send: "送信", sent: "質問を送信しました",
42
+ askBtn: "ホストに質問する", askHint: "質問はホストだけが見ます。名前を入力しなければ、名前なしで届きます",
43
+ where: function(t){ return "質問に付く場所:" + t; }, whereStep: function(i, k){ return "スライド " + i + "・ステップ " + k; }, whereAll: "ファイル全体",
44
44
  circle: "囲む", circleOn: "囲むのを終える", circleHelp: "質問したいところを、スライドの上で指やマウスでなぞって囲めます(なくてもかまいません)。Esc で終わります",
45
- circled: function(n){ return "囲んだところ:" + n + " 本"; }, clearCircle: "囲みを消す", circleGone: "ステップが変わったので、囲んだところを消しました", circleStart: "スライドの上をなぞって囲んでください。Esc で終わります", circleEnd: "囲むのを終えました",
45
+ circled: function(n){ return "囲んだところ:" + n + " 本"; }, clearCircle: "囲みを削除", circleGone: "ステップが変わったので、囲んだところを削除しました", circleStart: "スライドの上をなぞって囲んでください。Esc で終わります", circleEnd: "囲むのを終えました",
46
46
  inkLabel: "囲むところ(スライドの上)",
47
- confused: "わからない", confusedTip: "このステップがわからないことを、ホストに伝えます(文は送りません)。もう一度押すと取り消します",
47
+ confused: "わからない", confusedTip: "このステップがわからないことを、ホストに伝えます(文は送信しません)。もう一度押すと取り消します",
48
48
  confusedSent: "「わからない」をホストに伝えました", confusedOff: "「わからない」を取り消しました",
49
49
  replies: "ホストからの回答", yourQ: "あなたの質問:", gotReply: "ホストから回答が届きました", replyPrefix: "ホストの回答:", newReply: "新しい回答があります", vote: "投票する", voted: "投票しました", revote: "選び直して投票できます",
50
- shown: "ホストが全員に表示した質問", leftMsg: "切断しました。もう一度参加できます", window: function(a, b){ return a + " – " + b; }, privacy: "送るのは、送ると決めた質問(そのときのステップと、囲んだところ)・投票・「わからない」(と入れたときの名前)、この端末で作った番号だけです。見ている位置や時間は送りません",
51
- stop: {bad_key: "この教材の参加コードではライブに入れません(参加コードが違います)", room_not_found: "ライブが見つかりません", superseded: "ほかのタブやウィンドウで参加したので、ここは切れました",
52
- room_expired: "ライブの時間が終わりました", room_closed: "ホストがライブを終えました。再開したら、もう一度「参加する」を押してください", too_early: "まだライブの時間になっていません(この端末の時計も確かめてください)",
53
- room_full: "ライブが満員です。少し待ってから、もう一度参加してください", key_replaced: "ホストが参加コードを替えました。このファイルでは入れません。新しいファイルをもらってください",
54
- not_approved: "ホストが参加を認めませんでした", bad_message: "通信の規約が合いません(教材かサーバーの不具合)", window_over: "ライブの時間は終わりました", unknown: "ライブから切断されました",
55
- bad_endpoint: "接続先が教材の宣言と違うので、接続しません", network: "接続できませんでした"},
50
+ shown: "ホストが全員に表示した質問", leftMsg: "切断しました。もう一度参加できます", window: function(a, b){ return a + " – " + b; }, privacy: "送信するのは、送信した質問(そのときのステップと、囲んだところ)・投票・「わからない」(入力したときは名前)と、この端末で作った番号だけです。表示中の位置や時間は送信しません",
51
+ stop: {bad_key: "このファイルの参加コードではライブに参加できません(参加コードが違います)", room_not_found: "ライブが見つかりません", superseded: "ほかのタブやウィンドウで参加したので、ここでの接続を切断しました",
52
+ room_expired: "ライブの時間が終わりました", room_closed: "ホストがライブを終えました。再開したら、もう一度「参加する」を押してください", too_early: "まだライブの時間になっていません(この端末の時計も確認してください)",
53
+ room_full: "ライブが満員です。少し待ってから、もう一度参加してください", key_replaced: "ホストが参加コードを変更しました。このファイルでは参加できません。新しいファイルを受け取ってください",
54
+ not_approved: "ホストが参加を認めませんでした", bad_message: "通信の規約が合いません(ファイルかサーバーの不具合)", window_over: "ライブの時間は終わりました", unknown: "ライブから切断されました",
55
+ bad_endpoint: "接続先がファイルの宣言と違うので、接続しません", network: "接続できませんでした"},
56
56
  err: {unknown_activity: "この質問・投票はライブにありません", wrong_kind: "質問・投票の種類が違います", bad_choice: "選択肢がありません", text_too_long: "質問が長すぎます", empty_text: "質問が空です",
57
- rate_limited: "送るのが速すぎます。少し待ってください", quota_exceeded: "送れる数を超えました", room_limit: "ライブがいっぱいで受け付けられませんでした", not_admitted: "ホストの許可を待っています", bad_region: "囲んだところを送れませんでした。囲みを消して送ってください", other: "送れませんでした"}
57
+ rate_limited: "送信の間隔が短すぎます。少し待ってください", quota_exceeded: "送信できる数を超えました", room_limit: "ライブがいっぱいで受け付けられませんでした", not_admitted: "ホストの許可を待っています", bad_region: "囲んだところを送信できませんでした。囲みを削除して送信してください", other: "送信できませんでした"}
58
58
  } : {
59
- title: "Live (questions and polls)", again: "Try again", notice: "From this lesson you can send questions and votes to the host through Live at " + HOST, join: "Join", leave: "Leave", fold: "Fold", unfold: "Unfold", badge: "Live", pin: "Keep open", pollOpen: "This step has a poll. The Live pane is open",
59
+ title: "Live (questions and polls)", again: "Try again", notice: "From this file you can send questions and votes to the host through Live at " + HOST, join: "Join", leave: "Leave", fold: "Fold", unfold: "Unfold", badge: "Live", pin: "Keep open", pollOpen: "This step has a poll. The Live pane is open",
60
60
  off: "Not connected", connecting: "Connecting…", connected: "Joined", waiting: "Waiting in the waiting room", retrying: function(s){ return "Reconnecting in " + s + " s"; },
61
- before: function(t){ return "The Live starts at " + t; }, after: "The live time is over", noNet: "You cannot join from this screen. Download the lesson file and open it directly in a browser (Chrome, Safari, …). Live ID: ",
61
+ before: function(t){ return "The Live starts at " + t; }, after: "The live time is over", noNet: "You cannot join from this screen. Download the Egatari file and open it directly in a browser (Chrome, Safari, …). Live ID: ",
62
62
  noNetLink: "You cannot join from this screen. You can join in a new browser tab.", openJoin: "Join in the browser", joinTo: "Goes to: ", roomLabel: "Live ID: ",
63
63
  name: "Name (optional)", nameNote: "Only the host sees your name (leave it empty to send without one)", ask: "Question for the host", send: "Send", sent: "Question sent",
64
64
  askBtn: "Ask the host a question", askHint: "Only the host sees questions. Without a name, they arrive without one",
65
- where: function(t){ return "The question is tied to: " + t; }, whereStep: function(i, k){ return "slide " + i + ", step " + k; }, whereAll: "the whole lesson",
65
+ where: function(t){ return "The question is tied to: " + t; }, whereStep: function(i, k){ return "slide " + i + ", step " + k; }, whereAll: "the whole file",
66
66
  circle: "Circle", circleOn: "Stop circling", circleHelp: "You can circle what you are asking about by tracing on the slide with a finger or the mouse (optional). Esc stops",
67
67
  circled: function(n){ return "Circled: " + n + (n === 1 ? " stroke" : " strokes"); }, clearCircle: "Clear the circle", circleGone: "The step changed, so the circle was cleared", circleStart: "Trace on the slide to circle. Esc stops", circleEnd: "Stopped circling",
68
68
  inkLabel: "Area to circle (on the slide)",
@@ -70,11 +70,11 @@ var S = JA ? {
70
70
  confusedSent: "Told the host you don't follow", confusedOff: "Took back “I don't follow”",
71
71
  replies: "Replies from the host", yourQ: "Your question: ", gotReply: "The host replied", replyPrefix: "Host's reply: ", newReply: "There is a new reply", vote: "Vote", voted: "Vote recorded", revote: "You can change your vote",
72
72
  shown: "Questions the host showed to everyone", leftMsg: "Disconnected. You can join again", window: function(a, b){ return a + " – " + b; }, privacy: "Only what you choose to send (questions with the step on screen and anything you circled, votes, “I don't follow”, and a name if you type one) and a random id made on this device are sent. Your viewing position and timing are not",
73
- stop: {bad_key: "This lesson's join code does not open the Live (wrong join code)", room_not_found: "The Live does not exist", superseded: "You joined in another tab or window, so this one was disconnected",
73
+ stop: {bad_key: "This file's join code does not open the Live (wrong join code)", room_not_found: "The Live does not exist", superseded: "You joined in another tab or window, so this one was disconnected",
74
74
  room_expired: "The live time is over", room_closed: "The host ended the Live. When it reopens, press Join again", too_early: "The Live has not started yet (also check this device's clock)",
75
75
  room_full: "The Live is full. Wait a little and join again", key_replaced: "The host replaced the join code: this file can no longer join. Ask for a new file",
76
- not_approved: "The host did not admit you", bad_message: "Protocol mismatch (a bug in the lesson or the server)", window_over: "The live time is over", unknown: "Disconnected by the Live",
77
- bad_endpoint: "The address does not match the one the lesson declares; not connecting", network: "Could not connect"},
76
+ not_approved: "The host did not admit you", bad_message: "Protocol mismatch (a bug in the file or the server)", window_over: "The live time is over", unknown: "Disconnected by the Live",
77
+ bad_endpoint: "The address does not match the one the file declares; not connecting", network: "Could not connect"},
78
78
  err: {unknown_activity: "This question or poll is not in the Live", wrong_kind: "Wrong kind of question or poll", bad_choice: "No such choice", text_too_long: "The question is too long", empty_text: "The question is empty",
79
79
  rate_limited: "Sending too fast. Wait a moment", quota_exceeded: "You have reached the maximum you can send", room_limit: "The Live is full and could not take it", not_admitted: "Waiting for the host to admit you", bad_region: "The circle could not be sent. Clear it and send again", other: "Could not send"}
80
80
  };
package/kit/player.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "egatari-player",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "title": "Egatari Player"
5
5
  }
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "1.9.0",
3
- "sha256": "374924c7ba7406f7180584538e3dd006d4519ac15f91d266baf9b06bdafb15a8"
2
+ "version": "1.9.1",
3
+ "sha256": "2ac85da2684660938ecddf704672966e8953f97dc0dca82e95eb40a5f1852a56"
4
4
  }
package/kit/presenter.js CHANGED
@@ -13,8 +13,8 @@ var L = DECK.ja === false
13
13
  feedback: "Send feedback", back: "Back", close: "Close presenter view (p)", tap: "Click here to control", black: "Black screen", blackT: "The audience screen is black (b, or click it, to return)",
14
14
  legend: [["→/Space", "next"], ["←", "prev"], ["a", "autoplay"], ["b", "black screen"], ["x", "laser pointer"], ["d", "pen"], ["v", "fading pen"], ["o", "overview"], ["Esc", "exit tool / close"], ["p", "close"]]}
15
15
  : {cur: "今の画面", nextFrame: "次のスライド", end: "終わり", auto: "自動再生", stop: "停止", autoKey: "自動再生(a)", reset: "経過時間を戻す", next: "次のスライド", notes: "台本", slide: "スライド ", step: "ステップ ", none: "(台本なし)", nextStep: "次のステップ",
16
- laser: "レーザーポインター(x)", pen: "ペン(d)", color: "ペンの色", vpen: "消えるペン(v)", clear: "書き込みを消す", over: "本体でスライド一覧(o)", lect: "先のステップを薄く見せる(l)",
17
- feedback: "フィードバックを送る", back: "戻る", close: "発表者ビューを閉じる(p)", tap: "ここを押すと操作できます", black: "黒い画面中", blackT: "本体の画面は真っ黒です(b か、本体の画面のクリックで戻る)",
16
+ laser: "レーザーポインター(x)", pen: "ペン(d)", color: "ペンの色", vpen: "消えるペン(v)", clear: "書き込みを消去", over: "本体でスライド一覧(o)", lect: "先のステップを薄く見せる(l)",
17
+ feedback: "フィードバックを送信", back: "戻る", close: "発表者ビューを閉じる(p)", tap: "ここを押すと操作できます", black: "黒い画面中", blackT: "本体の画面は真っ黒です(b か、本体の画面のクリックで戻る)",
18
18
  legend: [["→/Space", "次"], ["←", "前"], ["a", "自動再生"], ["b", "黒い画面"], ["x", "レーザーポインター"], ["d", "ペン"], ["v", "消えるペン"], ["o", "一覧"], ["Esc", "解除・閉じる"], ["p", "閉じる"]]};
19
19
  // 道具のボタン:[絵の名前, キー(DECK.ptools.key に渡す), 表示するキー]
20
20
  var TOOLS = [["laser", "x", "x"], ["pen", "d", "d"], ["vpen", "v", "v"], ["clear", "clear", "⌫"], ["over", "o", "o"], ["lect", "l", "l"]];
@@ -18,7 +18,7 @@ const T = EN ? {
18
18
  venue: 'Event or course name',
19
19
  au: 'Your name<br>Affiliation',
20
20
  hint: [
21
- 'A new lesson made by `npm run new`. Replace the sample slides with your own.',
21
+ 'New slides made by `npm run new`. Replace the sample slides with your own.',
22
22
  'Each sample shows one feature: steps (data-step), math (KaTeX, \\hlE, \\htmlId), emphasis ({mark} in narration.md) and a part (m-sweep).',
23
23
  'Keys: → / Space next step, ← previous, p presenter view, a autoplay, l Lecture view, ? list of keys',
24
24
  ],
@@ -31,10 +31,10 @@ const T = EN ? {
31
31
  },
32
32
  s2: {
33
33
  h: 'Math and emphasis',
34
- p: 'Math in TeX notation is typeset with KaTeX when the lesson is built',
34
+ p: 'Math in TeX notation is typeset with KaTeX when the slides are built',
35
35
  li: ['<code>\\hlE{…}</code> colors a term with the theme', '<code>{mark:ID}</code> in the script emphasizes a part of the slide'],
36
36
  concl: '→ Point at what you are talking about',
37
- n: ['Math is typeset when the lesson is built.', 'Here is a straight line.', 'A highlighted term uses the theme color.', 'Emphasis in the script can {mark:slope|circle}circle the slope while you say it.'],
37
+ n: ['Math is typeset when the slides are built.', 'Here is a straight line.', 'A highlighted term uses the theme color.', 'Emphasis in the script can {mark:slope|circle}circle the slope while you say it.'],
38
38
  nc: 'Use emphasis to point at what you are talking about.',
39
39
  },
40
40
  s3: {
@@ -47,12 +47,12 @@ const T = EN ? {
47
47
  },
48
48
  s4: { h: 'Summary', li: ['Steps follow the order you speak', 'Math and emphasis point at what matters', 'Parts animate with the steps'],
49
49
  n: ['To sum up.', 'Steps follow the order you speak.', 'Math and emphasis point at what matters.', 'Parts animate with the steps.'] },
50
- cover: 'Welcome. This is a new lesson.',
50
+ cover: 'Welcome. These are new slides.',
51
51
  } : {
52
52
  venue: '会の名前・授業名',
53
53
  au: '氏名<br>所属',
54
54
  hint: [
55
- '`npm run new` で作った新しい教材。サンプルのスライドを自分の内容に置き換えて使う。',
55
+ '`npm run new` で作った新しいスライド。サンプルのスライドを自分の内容に置き換えて使う。',
56
56
  'サンプルは 1 枚に 1 つの機能:ステップ(data-step)、数式(KaTeX・\\hlE・\\htmlId)、強調(narration.md の {mark})、パーツ(m-sweep)。',
57
57
  '操作:→ / Space で次のステップ、← で前、p で発表者ビュー、a で自動再生、l で授業の表示、? でキーの一覧',
58
58
  ],
@@ -81,7 +81,7 @@ const T = EN ? {
81
81
  },
82
82
  s4: { h: 'まとめ', li: ['ステップは、話す順に見せる', '数式と強調で、大事な所を指す', 'パーツは、ステップに合わせて動く'],
83
83
  n: ['まとめます。', 'ステップは、話す順に見せます。', '数式と強調で、大事な所を指します。', 'パーツは、ステップに合わせて動きます。'] },
84
- cover: 'ようこそ。これは新しい教材です。',
84
+ cover: 'ようこそ。これは新しいスライドです。',
85
85
  };
86
86
 
87
87
  const deck = `<!DOCTYPE html>
package/kit/tools.js CHANGED
@@ -776,8 +776,8 @@ if (RA){
776
776
  function press(k, shift){ document.dispatchEvent(new KeyboardEvent("keydown", {key: k, shiftKey: !!shift, bubbles: true, cancelable: true})); }
777
777
  var JA = DECK.ja !== false;
778
778
  var TIP = JA
779
- ? {prev: "前へ", next: "次へ", auto: "再生", laser: "レーザーポインター", pen: "ペン", vpen: "消えるペン", clear: "書き込みを消す", over: "スライド一覧", view: "表示",
780
- lect: "先のステップを薄く見せる", cap: "字幕", mute: "効果音を消す", read: "読み上げで聞く(音声ファイルにはなりません)", pres: "発表者ビュー", full: "全画面", help: "キーの一覧", ink: "マーカー"}
779
+ ? {prev: "前へ", next: "次へ", auto: "再生", laser: "レーザーポインター", pen: "ペン", vpen: "消えるペン", clear: "書き込みを消去", over: "スライド一覧", view: "表示",
780
+ lect: "先のステップを薄く見せる", cap: "字幕", mute: "効果音をミュート", read: "読み上げで聞く(音声ファイルにはなりません)", pres: "発表者ビュー", full: "全画面", help: "キーの一覧", ink: "マーカー"}
781
781
  : {prev: "Previous", next: "Next", auto: "Play", laser: "Laser pointer", pen: "Pen", vpen: "Fading pen", clear: "Clear ink", over: "Slide overview", view: "View",
782
782
  lect: "Show later steps faintly", cap: "Captions", mute: "Mute sound effects", read: "Listen with read-aloud (not saved as audio)", pres: "Presenter view", full: "Fullscreen", help: "Keyboard shortcuts", ink: "Marker"};
783
783
  // 再生(Player P1):前へ・再生 / 一時停止・次へ・再生速度。帯の前へ・次へは再生の状態を保つ(DECK.playStep。キーの ← → は発表者の送りで、再生を止める)。
@@ -1044,7 +1044,7 @@ function helpHtml(){
1044
1044
  row(K("?"), j ? "このキーの一覧" : "This help")]))),
1045
1045
  sec(j ? "ツール" : "Tools", [
1046
1046
  row(K("x"), j ? "レーザーポインター" : "Laser pointer"), row(K("d"), j ? "ペン" : "Pen"), row(K("v"), j ? "消えるペン" : "Fading pen"),
1047
- row(K("Shift") + "+" + K("d"), j ? "ペンの色" : "Pen color"), row(K("Backspace"), j ? "ペンのとき:書き込みを消す(Shift で全部)" : "With a pen: clear ink (Shift: all slides)"),
1047
+ row(K("Shift") + "+" + K("d"), j ? "ペンの色" : "Pen color"), row(K("Backspace"), j ? "ペンのとき:書き込みを消去(Shift で全部)" : "With a pen: clear ink (Shift: all slides)"),
1048
1048
  row(K("Esc"), j ? "ツールを解除" : "Exit tool")])
1049
1049
  ];
1050
1050
  if (isDev()) cols.push(sec(j ? "開発サーバー" : "Dev server", [
@@ -1055,7 +1055,7 @@ function helpHtml(){
1055
1055
  var fb = DECK.feedbackUrl && DECK.feedbackUrl();
1056
1056
  var about = aboutHtml();
1057
1057
  var fbHtml = fb ? '<div class="dt-fb"><a href="' + fb.replace(/&/g, "&amp;").replace(/"/g, "&quot;") + '" target="_blank" rel="noopener">' +
1058
- (j ? "フィードバックを送る" : "Send feedback") + "</a>" +
1058
+ (j ? "フィードバックを送信" : "Send feedback") + "</a>" +
1059
1059
  (DECK.VERSION && !about ? '<span class="dt-ver">v' + DECK.VERSION + "</span>" : "") + "</div>" : "";
1060
1060
  return '<div class="dt-card"><div class="dt-cols">' + cols.join("") + '</div><div class="dt-foot">' +
1061
1061
  (j ? "ツールバーのボタンでも同じ操作ができます · ? / Esc で閉じる" : "The buttons in the toolbar do the same · ? / Esc to close") + "</div>" +
@@ -1088,7 +1088,7 @@ function rightsHtml(){
1088
1088
  if (creators.length) rows.push([j ? "作成者" : "Created by", creators.join(j ? "、" : ", ")]);
1089
1089
  edits.forEach(function(x){
1090
1090
  var by = str(x.by).slice(0, 300), note = str(x.note).slice(0, 300);
1091
- var what = by || (j ? "元の教材から編集されています" : "Edited from the original lesson");
1091
+ var what = by || (j ? "元のファイルから編集されています" : "Edited from the original file");
1092
1092
  rows.push([j ? "編集" : by ? "Edited by" : "Edited", what + (note ? (j ? "(" + note + ")" : " (" + note + ")") : "")]);
1093
1093
  });
1094
1094
  if (copyright) rows.push([j ? "著作権" : "Copyright", copyright]);
package/kit/track.js CHANGED
@@ -260,7 +260,7 @@ function schedule(){ if (!tickT && document.visibilityState !== "hidden") tickT
260
260
  // ---------------------------------------------------------------- 起動
261
261
  function notice(){
262
262
  var d = document.createElement("div"); d.id = "deck-track-notice"; d.setAttribute("role", "status");
263
- d.textContent = JA ? "進行状況を記録できなくなりました。記録するには、この教材を開いた学習サイト(LMS)から開き直してください。" : "Progress can no longer be recorded. To record it, reopen this lesson from your learning platform (LMS).";
263
+ d.textContent = JA ? "進行状況を記録できなくなりました。記録するには、このファイルを開いた学習サイト(LMS)から開き直してください。" : "Progress can no longer be recorded. To record it, reopen this file from your learning platform (LMS).";
264
264
  d.style.cssText = "position:fixed;left:50%;top:12px;transform:translateX(-50%);z-index:60;max-width:min(92vw,560px);padding:8px 14px;border-radius:8px;" +
265
265
  "background:rgba(20,20,20,.9);color:#fff;font:14px/1.5 -apple-system,BlinkMacSystemFont,'Hiragino Sans','Segoe UI',sans-serif";
266
266
  document.body.appendChild(d);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egatari",
3
- "version": "0.6.15",
3
+ "version": "0.6.17",
4
4
  "license": "MIT",
5
5
  "homepage": "https://studio.egatari.org/",
6
6
  "repository": {