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
@@ -48,15 +48,15 @@ const STR = {
48
48
  save: 'Save', cancel: 'Cancel', editSrc: 'Edit HTML', closeEsc: 'Close (Esc)', editHint: '⌘/Ctrl+Enter to save · Esc to cancel · write math as \\( … \\)',
49
49
  loading: 'Loading…', loadFail: 'Could not load', stale: 'The HTML has changed. Please reload (this view was built from an older version)',
50
50
  saving: 'Saving…', saved: 'Saved', conflict: 'The HTML has changed. Please reload (copy what you typed first)', saveFail: 'Could not save', offline: 'Cannot reach the editor',
51
- reload: 'Reload', cPlace: 'e.g. make this line shorter / match the figure colors / add one example', cSave: 'Leave', cTitle: 'Comment', cHint: '⌘/Ctrl+Enter to leave · written to comments.json',
52
- cFail: 'Could not leave the comment', cDone: 'Comment left (comments.json)', cList: 'Comments (open)', cVolatile: 'Comments are not saved in an Egatari file (they disappear when you close it). To keep them, use a working folder.', closeC: 'Close (c)', resolve: 'Resolve', resolveT: 'Mark as done',
51
+ reload: 'Reload', cPlace: 'e.g. make this line shorter / match the figure colors / add one example', cSave: 'Save', cTitle: 'Comment', cHint: '⌘/Ctrl+Enter to save · written to comments.json',
52
+ cFail: 'Could not save the comment', cDone: 'Comment saved (comments.json)', cList: 'Comments (open)', cVolatile: 'Comments are not saved in an Egatari file (they disappear when you close it). To keep them, use a working folder.', closeC: 'Close (c)', resolve: 'Resolve', resolveT: 'Mark as done',
53
53
  toSlide: 'Click to go to the slide', nStale: (k) => 'You are editing a different step than the one shown (' + k + '). It will switch after you save or cancel',
54
54
  nLine: (n) => 'narration.md line ' + n, nNone: 'No script yet', revertT: 'Revert to before editing', nTitle: 'Script', step: 'Step ', closeN: 'Close (n)',
55
55
  discard: 'Discard unsaved changes?', slide: (n, t) => 'Slide ' + n + ': ' + t, dirty: 'Unsaved changes', nEmpty: 'No script for this step yet. Start with “Add a turn”',
56
56
  speaker: 'Speaker', expert: 'Explainer (Expert)', novice: 'Questioner (Novice)', tPlace: 'What to say. {cue} marks a sync point. To set how a word is read, select it and press “Pronunciation…”', tLabel: 'What to say',
57
57
  pron: 'Pronunciation…', pronT: 'Set how a word or symbol is read aloud (select it in the script first)', pTitle: (w) => 'Pronunciation of “' + w + '”', pLabel: 'Pronunciation', pPh: 'e.g. theta',
58
58
  pFrom: { step: 'Filled in from the same word elsewhere in this script', dict: 'Filled in from your dictionary' },
59
- pAll: (n) => (n ? 'Apply to all in this script (' + n + ' more)' : 'Apply to all in this script (no others)'), pDict: 'Add to dictionary', pDictOff: 'The dictionary cannot be used in this browser (it does not keep data here, as in private browsing). You can still apply the pronunciation', pDictT: 'Remembered in this browser. When you select the same word in another script, the field opens with this pronunciation',
59
+ pAll: (n) => (n ? 'Apply to all in this script (' + n + ' more)' : 'Apply to all in this script (no others)'), pDict: 'Add to dictionary', pDictOff: 'The dictionary cannot be used in this browser (it does not save data here, as in private browsing). You can still apply the pronunciation', pDictT: 'Saved in this browser. When you select the same word in another script, the field opens with this pronunciation',
60
60
  pDevice: 'Listen with read-aloud', pAi: 'Listen with AI voice', pApply: 'Apply', pRemove: 'Remove pronunciation', pAiBusy: 'Making AI voice…', pAiFail: 'Could not make the AI voice: ', pNoVoice: 'This device has no read-aloud voice for this language. Make AI voice to hear it',
61
61
  pNoSel: 'Select a word in the script first', pNoY: 'Type the pronunciation', pBadY: 'A pronunciation cannot contain { or }, and is at most 64 characters',
62
62
  pWhy: { space: 'Select one word or symbol without spaces', expr: 'Select only one word or symbol (a pronunciation cannot go on an expression or a sentence)', mark: 'The selection covers a pronunciation or a mark such as {cue}. Select only one word', long: 'Too long. Select only one word (up to ' + MAX_WORD + ' characters)', turns: 'Select within one turn' },
@@ -73,22 +73,22 @@ const STR = {
73
73
  ja: {
74
74
  mark: '編集中 — アプリ', editMode: '編集モード', where: (n, t) => 'スライド ' + n + (t ? ':' + t : ''), locked: 'この欄を開いている間、スライドはクリックを受けません', warn: '警告 ', editTip: (alt) => 'ダブルクリックで編集 · ' + alt + '+クリックでコメント · e で終了',
75
75
  save: '保存', cancel: 'キャンセル', editSrc: 'HTML を編集', closeEsc: '閉じる(Esc)', editHint: '⌘/Ctrl+Enter で保存 · Esc でキャンセル · 数式は \\( … \\) のまま書けます',
76
- loading: '読み込み中…', loadFail: '読み込めませんでした', stale: 'HTML が変わっています。再読み込みしてください(この画面は古いバージョンから作られています)',
76
+ loading: '読み込み中…', loadFail: '読み込めませんでした', stale: 'HTML が変わっています。再読み込みしてください(この表示は古いバージョンから作られています)',
77
77
  saving: '保存中…', saved: '保存しました', conflict: 'HTML が変わっています。再読み込みしてください(入力した内容はコピーしておいてください)', saveFail: '保存できませんでした', offline: 'サーバーに接続できません',
78
- reload: '再読み込み', cPlace: '例:この行をもっと短く / 図の色を合わせて / 例を一つ足して', cSave: '残す', cTitle: 'コメント', cHint: '⌘/Ctrl+Enter で残す · comments.json に書きます',
79
- cFail: '残せませんでした', cDone: 'コメントを残しました(comments.json)', cList: 'コメント(未対応)', cVolatile: 'Egatari ファイルではコメントは保存されません(閉じると消えます)。残すなら作業フォルダで', closeC: '閉じる(c)', resolve: '解決', resolveT: '対応済みにする',
78
+ reload: '再読み込み', cPlace: '例:この行をもっと短く / 図の色を合わせて / 例を一つ追加して', cSave: '保存', cTitle: 'コメント', cHint: '⌘/Ctrl+Enter で保存 · comments.json に書きます',
79
+ cFail: '保存できませんでした', cDone: 'コメントを保存しました(comments.json)', cList: 'コメント(未対応)', cVolatile: 'Egatari ファイルではコメントは保存されません(閉じると失われます)。保存するなら作業フォルダで', closeC: '閉じる(c)', resolve: '解決', resolveT: '対応済みにする',
80
80
  toSlide: 'クリックでそのスライドへ', nStale: (k) => '表示中のステップ(' + k + ')とは別のステップを編集中です。保存かキャンセルのあとで切り替わります',
81
81
  nLine: (n) => 'narration.md ' + n + ' 行目', nNone: 'まだ台本がありません', revertT: '編集前に戻す', nTitle: '台本', step: 'ステップ ', closeN: '閉じる(n)',
82
- discard: '保存していない変更を捨てますか', slide: (n, t) => 'スライド ' + n + ':' + t, dirty: '未保存の変更があります', nEmpty: 'このステップの台本はまだありません。「発言を足す」で書き始めます',
82
+ discard: '保存していない変更を破棄しますか', slide: (n, t) => 'スライド ' + n + ':' + t, dirty: '未保存の変更があります', nEmpty: 'このステップの台本はまだありません。「発言を追加」で書き始めます',
83
83
  speaker: '話者', expert: '説明する人(Expert)', novice: '質問する人(Novice)', tPlace: '話す内容。{cue} で同期点。読み方は、語を選んで「読み方…」で付けます', tLabel: '話す内容',
84
84
  pron: '読み方…', pronT: '語や記号の読み方を付けます(台本の欄で語を選んでから押します)', pTitle: (w) => '「' + w + '」の読み方', pLabel: '読み方', pPh: '例:シータ',
85
- pFrom: { step: '同じ台本のほかの所と同じ読み方を入れました', dict: '辞書の読み方を入れました' },
86
- pAll: (n) => (n ? 'この台本のすべてに(ほかに ' + n + ' か所)' : 'この台本のすべてに(ほかにはありません)'), pDict: '辞書に登録', pDictOff: 'このブラウザでは辞書を使えません(プライベートウィンドウなど、データを残さない設定のため)。読み方はこのまま付けられます', pDictT: 'このブラウザに覚えます。ほかの台本で同じ語を選ぶと、この読み方が入った状態で開きます',
87
- pDevice: '読み上げで聞く', pAi: 'AI 音声で聞く', pApply: '付ける', pRemove: '読み方を外す', pAiBusy: 'AI 音声を作っています…', pAiFail: 'AI 音声を作れませんでした:', pNoVoice: 'この端末に、この言語の読み上げの声がありません。聞くには AI 音声で',
88
- pNoSel: '読み方を付ける語を、台本の欄で選んでください', pNoY: '読み方を入れてください', pBadY: '読み方に { と } は使えません(64 字まで)',
85
+ pFrom: { step: '同じ台本のほかの所と同じ読み方を入力しました', dict: '辞書の読み方を入力しました' },
86
+ pAll: (n) => (n ? 'この台本のすべてに(ほかに ' + n + ' か所)' : 'この台本のすべてに(ほかにはありません)'), pDict: '辞書に登録', pDictOff: 'このブラウザでは辞書を使えません(プライベートウィンドウなど、データを保存しない設定のため)。読み方はこのまま付けられます', pDictT: 'このブラウザに保存します。ほかの台本で同じ語を選ぶと、この読み方が入った状態で開きます',
87
+ pDevice: '読み上げで聞く', pAi: 'AI 音声で聞く', pApply: '付ける', pRemove: '読み方を削除', pAiBusy: 'AI 音声を作っています…', pAiFail: 'AI 音声を作れませんでした:', pNoVoice: 'この端末に、この言語の読み上げの声がありません。聞くには AI 音声で',
88
+ pNoSel: '読み方を付ける語を、台本の欄で選んでください', pNoY: '読み方を入力してください', pBadY: '読み方に { と } は使えません(64 字まで)',
89
89
  pWhy: { space: '空白を含まない 1 つの語か記号を選んでください', expr: '1 つの語か記号だけを選んでください(式や文には付けられません)', mark: '読み方や {cue} の付いた所にかかっています。1 つの語だけを選んでください', long: '長すぎます。1 つの語だけを選んでください(' + MAX_WORD + ' 字まで)', turns: '1 つの発言の中で選んでください' },
90
90
  dirtyAll: (n) => '未保存の変更があります(保存すると、ほかのステップの ' + n + ' か所にも読み方を付けます)', savedAll: (n) => '保存しました(ほかのステップの ' + n + ' か所にも読み方を付けました)',
91
- up: '前へ', del: '削除', delT: 'この発言を消す', add: '+ 発言を足す', nConflict: '台本が変わっています。再読み込みしてください(入力した内容はコピーしておいてください)',
91
+ up: '前へ', del: '削除', delT: 'この発言を削除', add: '+ 発言を追加', nConflict: '台本が変わっています。再読み込みしてください(入力した内容はコピーしておいてください)',
92
92
  noChange: '変更はありません', next: (k, other) => '次のステップ(' + k + (other ? '、次のスライド' : '') + ')', concl: '結論の行', noNext: '次のステップはありません', noNarr: '(台本なし)',
93
93
  busy: '開いている編集の欄を、先に保存するか取り消してください', noSlideKey: 'このステップはスライドにありません', noOpen: (alt) => '未対応のコメントはありません。スライドの上で ' + alt + '+クリックすると残せます',
94
94
  pinAt: (x, y) => 'スライドの ' + x + ', ' + y, pinT: '押した所(スライドの座標、1280×720)',
@@ -731,8 +731,11 @@ export function createEditorUI(o) {
731
731
  return;
732
732
  }
733
733
  const sk = splitKey(key);
734
+ // saved:保存の結果の 1 行(「保存しました(ほかのステップの 2 か所にも…)」)。保存でプレビューが読み込み直され、同じステップの欄を
735
+ // 作り直しても残す(作り直しは保存の直後に来るので、残さないと 1 行がすぐ消えて読めなかった。handoff Issue #49)
736
+ const saved = narr && narr.key === key && !narr.dirty ? narr.saved : null;
734
737
  // edit:入力のたびに増える版。保存の応答は、送った版が今も同じときだけ「保存した」にする(保存の途中の入力を未保存のまま残す)
735
- const cur = narr = { key, slideKey: sk[0], stepKey: sk[1], turns: [], dirty: false, edit: 0, i: pos.i, pendingAll: new Map() };
738
+ const cur = narr = { key, slideKey: sk[0], stepKey: sk[1], turns: [], dirty: false, edit: 0, i: pos.i, pendingAll: new Map(), saved };
736
739
  renderDrawer(true);
737
740
  Promise.all([info ? info : loadInfo(), api('GET', '/__dev/narration?key=' + encodeURIComponent(key))]).then(([, j]) => {
738
741
  if (narr !== cur) return;
@@ -747,7 +750,7 @@ export function createEditorUI(o) {
747
750
  drawer.innerHTML = '';
748
751
  const s = slideOf(narr.slideKey);
749
752
  const title = (s && (s.heading || s.title)) || narr.slideKey;
750
- const status = h('span', { cls: 'dv-st', text: narr.line ? L.nLine(narr.line) : L.nNone });
753
+ const status = h('span', { cls: 'dv-st', text: narr.saved || (narr.line ? L.nLine(narr.line) : L.nNone) });
751
754
  const saveBtn = h('button', { cls: 'dv-pri', text: L.save });
752
755
  const revert = h('button', { text: L.cancel, title: L.revertT });
753
756
  const body = h('div', { cls: 'dv-body' });
@@ -765,7 +768,7 @@ export function createEditorUI(o) {
765
768
  if (narr.error) { saveBtn.disabled = true; showErr(nmsg, narr.error); return; }
766
769
  const pendingN = () => [...narr.pendingAll.values()].reduce((n, x) => n + x.n, 0);
767
770
  const dirtyText = () => (pendingN() ? L.dirtyAll(pendingN()) : L.dirty);
768
- const markDirty = () => { narr.edit++; narr.dirty = true; status.textContent = dirtyText(); status.className = 'dv-st dv-dirty'; updateSide(); };
771
+ const markDirty = () => { narr.edit++; narr.dirty = true; narr.saved = null; status.textContent = dirtyText(); status.className = 'dv-st dv-dirty'; updateSide(); };
769
772
  // 台本の欄(server/script-field.js)と、読み方の欄(#101)。fields:発言ごとの欄、lastField:最後に入った欄
770
773
  let fields = [], lastField = 0, pron = null;
771
774
  const narrLang = () => textLang(narr.turns.map((t) => t.text).join(' ')) ;
@@ -935,7 +938,7 @@ export function createEditorUI(o) {
935
938
  const cur = narr;
936
939
  function doSave() {
937
940
  if (saveBtn.disabled || narr !== cur) return;
938
- saveBtn.disabled = true; saveBtn.textContent = L.saving;
941
+ saveBtn.disabled = true; saveBtn.textContent = L.saving; cur.saved = null;
939
942
  const sent = cur.edit;
940
943
  api('POST', '/__dev/narration', { slideKey: cur.slideKey, stepKey: cur.stepKey, turns: cur.turns.map((t) => ({ ...t })), rev: cur.rev }).then((j) => {
941
944
  saveBtn.textContent = L.save;
@@ -946,7 +949,7 @@ export function createEditorUI(o) {
946
949
  // 送った後に入力があれば(版が進んだ)、未保存のまま:欄の中身を替えず、デッキに付いていかず、プレビューは inert のまま
947
950
  if (cur.edit !== sent) { status.textContent = L.dirty; status.className = 'dv-st dv-dirty'; updateSide(); return; }
948
951
  const finish = (n) => {
949
- cur.dirty = false; status.textContent = n ? L.savedAll(n) : j.changed ? L.saved : L.noChange; status.className = 'dv-st'; updateSide();
952
+ cur.dirty = false; status.textContent = cur.saved = n ? L.savedAll(n) : j.changed ? L.saved : L.noChange; status.className = 'dv-st'; updateSide();
950
953
  if (narr === cur && pos && pos.key !== cur.key) narrFollow(true);
951
954
  };
952
955
  // 読み方の「この台本のすべてに」:ほかのステップにも付ける(このステップを保存した後)
package/tts/yomi.yaml CHANGED
@@ -75,6 +75,14 @@ terms:
75
75
  NPV: エヌピーブイ
76
76
  PCA: ピーシーエー
77
77
  DX: ディーエックス
78
+ # 2026-11-18(handoff #48、規格化の機械の決まりを満たした語)
79
+ # Egatari は仮名(えがたり)では抑揚が変になるので漢字に(作者 11/18)。yomi.py と kit/core/yomi.mjs は読みの値を字のまま置くので漢字も受ける
80
+ # HTML は作者が聴いて足す(11/19)。PDF・URL は読みなしのほうが自然なので載せない(作者 11/19、handoff/yomi48-2026-11-18/)
81
+ Egatari: 絵語り
82
+ SCORM: スコーム
83
+ LMS: エルエムエス
84
+ CSS: シーエスエス
85
+ HTML: エイチティーエムエル
78
86
  # AI は載せない(#163、作者 11/15):辞書を通さない「AI」のほうが抑揚が自然で、bob・gendo とも作者が聴いて「エーアイ」と読めていた
79
87
 
80
88
  # 候補読みのリスト。先頭がこの原稿群での通常の読み(yomi_check.py が期待値に使う)。
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "repository": "https://github.com/egatari/egatari-spec",
3
- "commit": "080e6a0509661531e84d4f75ef8075e3d023b528",
4
- "snapshot": "wd-2026-11-18c",
3
+ "commit": "0d6c2d34c0211a984e9731edf6fae33c4bd69191",
4
+ "snapshot": "wd-2026-11-19",
5
5
  "files": 238,
6
6
  "note": "Copied by tools/sync-spec.mjs. Do not edit; change the spec repository and sync again."
7
7
  }
@@ -132,7 +132,7 @@
132
132
  }
133
133
  }
134
134
  },
135
- "description": "Modes and faces the author offers, and where the lesson opens (§1.2). The author's intent, not access control."
135
+ "description": "Modes and faces the author offers, and where the file opens (§1.2). The author's intent, not access control."
136
136
  }
137
137
  },
138
138
  "if": {
@@ -239,7 +239,7 @@
239
239
  }
240
240
  }
241
241
  },
242
- "description": "Modes and faces the author offers, and where the lesson opens (§1.2). The author's intent, not access control."
242
+ "description": "Modes and faces the author offers, and where the file opens (§1.2). The author's intent, not access control."
243
243
  },
244
244
  "series": {
245
245
  "type": "object",
@@ -261,7 +261,7 @@
261
261
  "minimum": 1
262
262
  }
263
263
  },
264
- "description": "The series the lesson belongs to (spec §9C.1A)."
264
+ "description": "The series the file belongs to (spec §9C.1A)."
265
265
  },
266
266
  "citations": {
267
267
  "type": "object",